Jump to content
php.lv forumi

Next page next 10


Braiens

Recommended Posts

Un ka var katru reizi kad spiezu next tad paardas next 10

<?
$db = mysql_connect($host, $user, $pass);
mysql_select_db($datubaze,$db);
if($_GET['sort_by']==""||$_GET['ka']==""){
$result = mysql_query("SELECT * FROM `down` ORDER BY id DESC",$db);
} else {
$result = mysql_query("SELECT * FROM `down` ORDER BY ".$_GET['sort_by']." ".$_GET['ka'],$db);
}
while ($myrow = mysql_fetch_array($result))
{
$id = $myrow['id'];
$fails = $myrow['fails'];
$name = $myrow['name'];
$t = $myrow['type'];
if($t=="soft"){ $t = "<font color=\"red\">".$t."</font>"; } elseif($t=="mp3"){ $t = "<font color=\"blue\">".$t."</font>"; } elseif($t=="mirc script"){ $t = "<font color=\"silver\">".$t."</font>"; } elseif($t=="mirc addons"){ $t = "<font color=\"yellow\">".$t."</font>"; } elseif($t=="Cita noderīga lieta"){ $t = "<font color=\"orange\">".$t."</font>"; }
echo '  <tr>
       <td width="10%" align="center" valign="top">'.$id.'</td>
       <td width="47%" align="left" valign="top"> <a href="down.php?id='.$id.'" name="'.$name.'" target="_blank" title="'.$name.'" style="text-decoration: none">'.$name.'</a></td>
       <td width="119%" align="center" valign="top">'.$t.'</td>
      </tr>'; }
?>

Link to comment
Share on other sites

×
×
  • Create New...