HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com/admin/sponsors.php
<? 
require "header.php"; 

if($_POST['list']) {
	foreach($_POST['list'] as $i) {
		if(is_numeric($i)) {
			mysql_query("DELETE FROM users WHERE record_num = '$i'");
		}
	}
}

if(!isset($_GET['page']) || $_GET[page] == '') { 
	$page = 1; 
} else { 
	$page = $_GET['page']; 
}
if(!$_GET[setmax]) { $max_results = 100; } else { $max_results = $_GET[setmax]; }
$from = (($page * $max_results) - $max_results); 
?>


     <div id="right_column">
        <div id="right_top">
        	<div id="right_home"></div>
            <div id="right_right">  
            <a href="index.php">Admin Home</a>          
            <span><a href="sponsors.php">Manage Partners</a></span>  
            </div>
        </div>
        <div id="right_bg">
        
      		<h2>Manage<strong>Partners</strong></h2>
            <p>To find the user you are looking for faster, you can enter either a whole or partial username or email address into the search box below.</p>
            <div id="index_left" style='width: 100%;'>            
            
           <form id="form1" name="form1" method="post" action="">
           <table border="0" align="center" cellpadding="3" cellspacing="0" class='pagetable'> 
  <thead>
  <tr>
  <th colspan=2 align='left'>Search Partners</th>
  </tr>
  </thead>
    <tr>
      <td width="99" height="25" class="style4">Username/Email</td>
      <td width="446" height="25" align="left" class="style4"><input type="text" name="q" id="q" /></td>
    </tr>
    <tr>
      <td height="25" colspan="2" align="center" class="style4"><input type="submit" name="Submit2" value="Search" /></td>
    </tr>
  </table>
  <br />
  <br />
  <table width="750" border="0" align="center" cellpadding="3" cellspacing="0" class='pagetable'>
    <thead>
    <tr>
      <th width="150" align='left'>Username</th>
	  <th width="254" align='left'>Email Address</th>
	  <th width="98" align='center'>Content</th>
	  <th width="104" align='center'>Comments</th>
	  <th width="50" align="center">Edit</th>
      <th width="58" align="center">Delete</th>
    </tr>
    </thead>
<?
$bgcolor = '#ffffff';
if($_POST[q]) {
	$q = mysql_real_escape_string($_POST[q]); 
	$query = "AND (username LIKE '%$q%' OR email LIKE '%$q%')";
}
$result_count = mysql_query("SELECT record_num FROM users WHERE user_level = 2 $query ");
$result = mysql_query("SELECT * FROM users WHERE user_level = 2 $query ORDER BY username ASC LIMIT $from,$max_results");
$total_results = mysql_num_rows($result_count);
$total_pages = ceil($total_results / $max_results);
while($row = mysql_fetch_array($result)) { 
?>
    <tr bgcolor = '<? echo $bgcolor; ?>'>
      <td class="style4"><? echo $row[username]; ?></td>
	  <td class="style4"><? echo $row[email]; ?></td>
	  <td align="center" class="style4"><a href='existing_content.php?channel=&pornstar=&paysite=&type=&keywords=&user=<? echo $row[record_num]; ?>&Submit2=Search'>Content</a></td>
	  <td align="center" class="style4"><a href='user_comments.php?id=<? echo $row[record_num]; ?>'>Comments</a></td>
	  <td align="center"><a href="edit_user.php?id=<? echo $row[record_num]; ?>">Edit</a></td>
      <td align="center"><input name="list[]" type="checkbox" class="style4" value="<? echo $row[record_num]; ?>" /></td>
    </tr>
<? 
if($bgcolor == '#ffffff') { $bgcolor = "#EBEBEB"; } else { $bgcolor = '#ffffff'; }
}
?>
    <tr bgcolor = '<? echo $bgcolor; ?>'>
      <td colspan="8" class="style4"><center><br />
           <input name="Submit" type="submit" class="style4" value="Delete Selected" />
      </center></td>
    </tr>
</table>
  <p>&nbsp;</p>
</form>
 <? 
if($page > 1){ 
			$prev = ($page - 1); 
			if($prev == 1) { $prev = '1'; }
			echo " <a style='font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #000000'  href=\"users.php?page=$prev\">&laquo; Prev</a> / "; 
		} 
		
		for($i = 1; $i <= $total_pages; $i++){ 
			if(($page) == $i){ 
				echo "<span style='font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold;' >$i</span> / "; 
			} else { 
			if($i == 1) { $link = '1'; } else { $link = $i; }
			echo " <a style='font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold;'  href=\"users.php?page=$link\">$i</a> / "; 
		} 
		} 

	// Build Next Link 
		if($page < $total_pages){ 
		$next = ($page + 1); 
		echo " <a style='font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #000000'  href=\"users.php?page=$next\">Next &raquo;</a> "; 
		} 
?>  


            </div>
        </div>
        <div id="right_bottom"></div>
        </div>
    </div>
</div>








<? require "footer.php"; ?>