Location: PHPKode > projects > WH Community > wh_community/moderator/moderators.php
<?php include('files/header.php'); ?>
<div id="content-outer">
<div id="content">

	<div id="page-heading">
		<h1><?php echo $lang_moderator['moderators']; ?></h1>
	</div>
	
	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="files/shared/side_shadowleft.jpg" width="20" height="300" alt="shadow_l"></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="files/shared/side_shadowright.jpg" width="20" height="300" alt="shadow_r"></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td><div id="content-table-inner">
			<div id="table-content">
			<p><?php
			
			$pfad = $_SERVER['PHP_SELF'];
			$query = mysql_query("SELECT user_id FROM users WHERE user_level = '2'");
			$datensaetze_pro_seitea = "15";
			$p = "5";
			$total = intval(mysql_num_rows($query));
			$seiten = ceil($total / $datensaetze_pro_seitea);
		
			if(empty($_GET['go'])){
				$go = 1;
			}elseif($_GET['go'] <= 0 || $_GET['go'] > $seiten){
				$go = 1;
			}else{
				$go = mysql_real_escape_string($_GET['go']);
				}
			
			$links = array();
		
			if(($go - $p) < 1){ $davor = $go - 1;  }else { $davor = $p; }            
			if(($go + $p) > $seiten){ $danach = $seiten - $go; }else{ $danach = $p; }        
				$off = ($go - $davor);              
			if($go- $davor > 1){
				$first = 1;
				   $links[] = "<a href=\"$pfad?go=$first\">&laquo; " . $lang_moderator['first'] . " ...</a>\n";      
					}      
		
			if($go != 1){
				$prev = $go-1;
				$links[] = "<a href=\"$pfad?go=$prev\"> &laquo;</a>\n";     
			}    
			
			for($i = $off; $i <= ($go + $danach); $i++){
		
			  if($i != $go){
					$links[] = "<a href=\"$pfad?go=$i\">$i</a>\n";
			  }elseif($i == $seiten) {
					$links[] = "<span class=\"current\">[ $i ]</span>\n";  
			  }elseif($i == $go){
					$links[] = "<span class=\"current\">[ $i ]</span>\n";
			  		}
			}                
		
			if($go != $seiten){
				$next = $go+1;
				$links[] = "<a href=\"$pfad?go=$next\"> &raquo;</a>\n";
				}      
			
			if($seiten - $go - $p > 0 ){
				$last = $seiten; 
				$links[] = "<a href=\"$pfad?go=$last\">... " . $lang_moderator['last'] . " &raquo;</a>\n";
				}      
		
			$start = ($go-1) * $datensaetze_pro_seitea;
			$link_string = implode(" ", $links);
		   
		   $query = "SELECT
						*
					 FROM
						users
					 WHERE
						user_level = '2'
					 ORDER BY
						user_id DESC
					 LIMIT
						$start,$datensaetze_pro_seitea";
		   
		   $result = mysql_query($query);
		
		   if($result) {
		   
		   echo '<table width="100%" class="maintable">
				 <tr>
				 <td width="5%"><strong>ID</strong></td>
				 <td width="30%"><strong>User Name</strong></td>
				 <td width="50%"><strong>' . $lang_moderator['email_adress'] . '</strong></td>
				 <td width="15%"><strong>' . $lang_moderator['level'] . '</strong></td>
				 </tr>
				 </table>';
		
		   while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		   
		   echo '<table width="100%" class="maintable">
				 <tr>
				 <td width="5%"><strong>' . htmlentities($row['user_id']) . '</strong></td>
				 <td width="30%"><span class="blue">' . htmlentities($row['user_name']) . '</span></td>
				 <td width="50%"><a href="mailto:' . htmlentities($row['user_email']) . '">' . htmlentities($row['user_email']) . '</a></td>
				 <td width="15%">'; if($row['user_level']==0) {
										echo '<span class="user">User</span>';
									}elseif ($row['user_level']==2) {
										echo '<span class="mod">Moderator</span>';
									}elseif ($row['user_level']==1) {
										echo '<span class="admin">Administrator</span>'; }
			echo '</td>
				  </tr>
				  </table>';
				  }
		   
		   }else{
		   echo '<p class="false">' . $lang_moderator['no_records'] . '.</p>';
		   }
		   
			echo "<br><div id=\"navigation\">";
			echo "<span class=\"pages\">" . $lang_moderator['page'] . " " . $go . " " . $lang_moderator['of'] . " " . $seiten . "</span>";
			echo $link_string;
			echo "</div>";
		
			?></p>
			</div>
		</div></td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
			
	<div class="clear"></div>
		 
	</div>

	<div class="clear">&nbsp;</div>

</div>
<div class="clear">&nbsp;</div>
</div>
<?php include('files/footer.php'); ?>
Return current item: WH Community