Jump to content

arr mine eyes


ghqwerty

Recommended Posts

my table is going all screwy and ive been looking for the last 10 mins but can see any extra or any less html tags

 

help

 

<html>
<head>
</head>
<body bgcolor="#ffffcc">
    <table name="shell" height="99%" width="99%" border="1">
	<tr >
		<td colspan="3" height="15%">
			<center>
				<h1>
					_-_Bliss wars_-_
				</h1>
			</center>
		</td>
	</tr>
	<tr>
		<td width="10%">
			<?php require("links.php");?>
		</td>
		<td with="80%">
			<center>   
				<br />
				<br />
				<br />
						<?php
						$max = 20; //amount of users per page. change to what you want
							$users = $_GET['users'];
								if(empty($users))
								{
									$users = 1;
								}
						$limits = ($users - 1) * $max; 
						//view the users
						if(isset($_GET['items']) && $_GET['items'] == "view"){
							$id = $_GET['id'];
							$sql = mysql_query("SELECT * FROM members");
								while($r = mysql_fetch_array($sql)){
									$id = $r['id'];
									$user = $r['username'];
									$rank = $r['rank'];
										echo "<div><p>$id</p><p>$user</p><p>$rank</p></div>";
								}	
						}else{
							//view all the users
							$sql = mysql_query("SELECT * FROM members LIMIT ".$limits.",$max") or die(mysql_error());
							//the total rows in the table
							$totalres = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM members"),0);	
							//the total number of pages (calculated result), math stuff...
							$totalpages = ceil($totalres / $max); 
							//the table
								echo "
								<table id='inventory' height='20%' width='35%' border='1'>
									<tr>
										<td colspan='3'>
											<center>
												users
											</center>
										</td>
									</tr>
									<tr>
										<td width='25%'>
											<center>
												userid
											</center>
										</td>
										<td width='45%' >
											<center>
												username
											</center>
										</td>
										<td width='30%'>
											<center>	
												rank
											</center>
										</td>
									</tr>";
							if($totalres < 1){
								echo "<tr><td colspan=\"3\"><center>Where'd everyone go !!!<center></td></tr></table>";

							}else{
								while($r = mysql_fetch_array($sql)){
									$id = $r['id'];
									$user = $r['username'];										
									$rank = $r['rank'];										
									echo "
											<tr>
												<td width='25%'>
													<center>
														".$id."
													</center>
												</td>
												<td width=\"45%\">
													<center>
														".$user."
													</center>
												</td>
												<td width=\"30$\">  
													 <center>
														".$rank."
													</center>  
										        </td>
											</tr> ";
								}
								$prev_page = $users - 1;


							echo "<tr><td colspan='3'>";

									if($prev_page >= 1){
										echo "<b><< <a href=users.php?users=$prev_page>Prev.</a></b>"; 
									}
								if($totalpages <= 3){
									//this is the pagination link										 
									for($i = 1; $i <= $totalpages; $i++){ 
										echo "<a href='users.php?users=$i'> $i </a>| ";
									}

								}else{
									$twobefore = $users-2;
									$onebefore = $users-1;
									$oneafter = $users+1;
									$twoafter = $users+2;
									if($twobefore >= 1){
										echo "<a href=users.php?users=$twobefore> $twobefore </a>";
										if($onebefore >= 1){
											echo "<a href=users.php?users=$onebefore> $onebefore </a>";
											echo "<a href=users.php?users=$user> $user </a>";
											if($oneafter <= $totalpages){
												echo "<a href=users.php?users=$oneafter> $oneafter </a>";
												if($twoafter <= $totalpages){
													echo "<a href=users.php?users=$twoafter> $twoafter </a>";
													if($twoafter < totalpages){
														echo "...<a href=users.php?users=$totalpages> $totalpages </a>";
													}
												}
											}
										}
									}

									$next_page = $users + 1;
									if($next_page <= $totalpages) {
									   echo"<a href=inventory.php?users=$next_page><b>Next</b></a> <b>>></b>";										   
									}
								echo "</td></tr>";
							//close up the table
							echo "</table>";

							}

							}
							}

							?>



			</center>
		</td>
		<td width="10%">
			<?php require("links.php");?>
		</td>
	</tr>
    </table>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/126908-arr-mine-eyes/
Share on other sites

<a href="home.php.php" target="_top">Home</a>
<br>
<a href="stats.php" target="_top">Stats</a>
<br>
<a href="page1.php" target="_top">Slots</a>
<br />
<a href="bank.php" target="_top">bank</a> 
<br />
<a href="extortion.php" target="_top">extortion</a>
<br />
<a href="inventory.php" target="_top">inventory</a>
<br />
<a href="users.php" target="_top">users</a>
<br />
<a href="checklogin.php" target="_top">logout</a>

 

cant see anything wrong with that

 

i have a page very similiar to this that works fine :S

Link to comment
https://forums.phpfreaks.com/topic/126908-arr-mine-eyes/#findComment-656413
Share on other sites

thanks for the spot but still no change

 

heres the source

 

 

 

<html>
<head>
</head>
<body bgcolor="#ffffcc">
    <table name="shell" height="99%" width="99%" border="1">
	<tr >
		<td colspan="3" height="15%">
			<center>
				<h1>
					_-_Bliss wars_-_
				</h1>
			</center>
		</td>
	</tr>
	<tr>
		<td width="10%">
			<a href="home.php.php" target="_top">Home</a>
<br>
<a href="stats.php" target="_top">Stats</a>
<br>
<a href="page1.php" target="_top">Slots</a>
<br />
<a href="bank.php" target="_top">bank</a> 
<br />
<a href="extortion.php" target="_top">extortion</a>
<br />
<a href="inventory.php" target="_top">inventory</a>
<br />
<a href="users.php" target="_top">users</a>
<br />
<a href="checklogin.php" target="_top">logout</a>			</td>
		<td width="80%">
			<center>   
				<br />
				<br />
				<br />

								<table id='users' height='20%' width='35%' border='1'>
									<tr>
										<td colspan='3'>
											<center>
												users
											</center>
										</td>
									</tr>
									<tr>
										<td width='25%'>
											<center>
												userid
											</center>
										</td>
										<td width='45%' >
											<center>
												username
											</center>
										</td>
										<td width='30%'>
											<center>	
												rank
											</center>
										</td>
									</tr>
											<tr>
												<td width='25%'>
													<center>
														1
													</center>
												</td>
												<td width="45%">
													<center>
														matty
													</center>
												</td>
												<td width="30%">  
													 <center>
														100
													</center>  
										        </td>
											</tr> 
											<tr>
												<td width='25%'>
													<center>
														11
													</center>
												</td>
												<td width="45%">
													<center>
														whisky
													</center>
												</td>
												<td width="30%">  
													 <center>
														100
													</center>  
										        </td>
											</tr> 
											<tr>
												<td width='25%'>
													<center>
														12
													</center>
												</td>
												<td width="45%">
													<center>
														james
													</center>
												</td>
												<td width="30%">  
													 <center>
														10
													</center>  
										        </td>
											</tr> 
											<tr>
												<td width='25%'>
													<center>
														13
													</center>
												</td>
												<td width="45%">
													<center>
														brandy
													</center>
												</td>
												<td width="30%">  
													 <center>
														10
													</center>  
										        </td>
											</tr> 
											<tr>
												<td width='25%'>
													<center>
														14
													</center>
												</td>
												<td width="45%">
													<center>
														ghqwerty
													</center>
												</td>
												<td width="30%">  
													 <center>
														10
													</center>  
										        </td>
											</tr> 
											<tr>
												<td width='25%'>
													<center>
														15
													</center>
												</td>
												<td width="45%">
													<center>
														guinness
													</center>
												</td>
												<td width="30%">  
													 <center>
														0
													</center>  
										        </td>
											</tr> <tr><td colspan='2'><a href='users.php?users=1'> 1 </a>| 


			</center>
		</td>
		<td width="10%">
			<a href="home.php.php" target="_top">Home</a>
<br>
<a href="stats.php" target="_top">Stats</a>
<br>
<a href="page1.php" target="_top">Slots</a>
<br />
<a href="bank.php" target="_top">bank</a> 
<br />
<a href="extortion.php" target="_top">extortion</a>
<br />
<a href="inventory.php" target="_top">inventory</a>
<br />
<a href="users.php" target="_top">users</a>
<br />
<a href="checklogin.php" target="_top">logout</a>			</td>
	</tr>
    </table>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/126908-arr-mine-eyes/#findComment-656420
Share on other sites

I'd like to look at it but I don't know how. I opened it in dreamweaver to see what I could do with it. I made links.php included, not required, because I don't actually have links.php...

I also can't see your user table because I don't have access to your database...

So, not much help from that direction.

Can you take a screen shot or give us a link?

Link to comment
https://forums.phpfreaks.com/topic/126908-arr-mine-eyes/#findComment-656421
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.