Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: del banner panel

Parašė paulius7· 2009 Bal. 3 16:04:12
#6

per naujo idek wiew.php ir idek sita koda
<?php

   $result = dbquery("SELECT * FROM `".$db_prefix."banner` WHERE `status`='3' ORDER by RAND() LIMIT 3");
   
   while ($data = dbarray($result)) {
   echo "<td><a href='/reklama-".$data['bid']."/' target='_blank'><img src='".$data['imageurl']."' border='0' height='60' width='468'></a></td>";
   
   $kiek = $data['impmade'] + 1;
   dbquery("UPDATE `".$db_prefix."banner` set impmade='$kiek' WHERE bid='".$data['bid']."'");
   
   
   if($data['impmade'] >= $data['imptotal'] && $data['imptotal']!='0') {
      dbquery("UPDATE `".$db_prefix."banner` SET `enddate`='NOW( )',`status`='0' WHERE `bid`='".$data['bid']."'");
   }
   
   }
?>