All pastes #234689 Raw Edit

Someone

public php v1 · immutable
·published 2006-11-02 19:39 UTC
rendered paste body
<?	$pageid = (int) $_GET['pageid'];	if($pageid>100 || $pageid<1) 	$pageid=1;	$per_page = 12;	$total_num = 30; 	if($_GET['galid'] == "null") { $height=""; } else { $height=450; }?><table align=center border=0>	<tr>		<td  valign=top>			<table align=center cellpadding=0 cellspacing=15 background=images/gbg.gif dir=rtl height=$height style="border:1px solid; border-color:#FFBE58;" border=0>			<tr>				<td colspan=3 align=center class=border dir=rtl bgcolor=orange>					<font class=title>&#1490;&#1500;&#1512;&#1497;&#1493;&#1514; 99Zone</font>					</td>			</tr>			<tr>				<td colspan=3 valign=middle align=center>					<form>						<?php 							echo"								<select id=\"galid\" onChange=\"go()\" class=input style=\"width: 								150px;background-color: orange;text-align: right; text-direction: rtl;\">								<option value=null"; if($_GET['galid'] == "null") { 								echo" selected=selected"; } echo">&#1489;&#1495;&#1512; &#1490;&#1500;&#1512;&#1497;&#1492;</option>";								$result = mysql_query("SELECT * FROM `gallery` ORDER BY `id` ASC");								for ($i=1; $row=mysql_fetch_array($result); $i++) {								$name=$row['name'];								$galid=$row['galid'];								$uploader=$row['uploader'];								$galdate=$row['galdate'];								$date=$row['date'];								echo"								<option value=\"$galid\" name=\"$galid\""; if($_GET['galid'] == "$galid") 								{ echo" selected=selected"; } 								echo">&nbsp;&middot;&nbsp;".$name."&nbsp;</option>";}							echo"								</select>					</form>				</td>			</tr>	<tr>";	$i=0;	if($_GET['galid'] != "null") {					foreach (glob("gallery/$galid/*.{jpg,png,gif}", GLOB_BRACE) as $filename) {				if($i >= ($_GET['pageid'] * 12) && $i < (($_GET['pageid'] * 12)+12))	{						if($i % 3== 0) {echo "<tr>";}						echo"						<td>						<x><img src=\"$filename\" onclick=\"changeImage('$filename')\" width=75 height=75 							style=\"cursor: pointer;\" class=border></x>						</td>";						if ($i % 3 == 2) { echo"</tr>";}		         									     }						 $i++;										         }			       }			echo"				</table>				</td>				<td valign=top height=100% class=border>";				if($_GET['galid'] != "null")  				{ echo"				<img name=mainimage src=".$filename." height=100% width=450 valign=middle>				</tr>					<tr>						<td width=450 bgcolor=orange class=border align=right dir=rtl colspan=2 nowrap>				<font class=title>".$name."						[".$galdate."]						&#1492;&#1493;&#1506;&#1500;&#1514;&#1492; &#1506;\"&#1497;:".$uploader."						&#1489;&#1514;&#1488;&#1512;&#1497;&#1498;:<font class=regular>".$date."</font>				</font>						</td>					</tr>";				} else {				echo"";}			echo"				</td>	</tr></table>		<div align=center class=regular>";	if($_GET['galid'] != "null") {			$num_pages = ceil($total_num / $per_page);			$i=0;			for ($i=1; $i<= $num_pages; $i++) 				{       			if ($pageid == $i) { echo"".$i."&nbsp;";} 				elseif($pageid != $i) 					{			echo "			<a href=\"index.php?page=gallery&galid=".$galid."&pageid=".$i."\" class=regular>".$i."</a>"; 					}				}			} else			?>		</div>