displays"); //die($rs_t_query); $cnt= mysql_num_rows($rs_t_query); $rs_t_query1=mysql_query("select * from sbjks_affiliate_banner where sbaff_active= 'yes'"); //die($rs_t_query); $cnt2 = mysql_num_rows($rs_t_query1); $sbdowhat=0; //stands for do nothing if ( ($cnt == 0) && ($cnt2 > 0) ) { //no banner but affiliate exists $sbdowhat=1; /// stands for "affiliate"; } elseif( ($cnt > 0) && ($cnt2 == 0) ) { //no affiliate but banner exists $sbdowhat=2; // stands for "banner"; } elseif( ($cnt > 0) && ($cnt2 > 0) ) { // $sbrandon=mt_rand(1,2); if($sbrandon == 1) $sbdowhat=1; else $sbdowhat=2; } if($sbdowhat == 1) { $rnum=1; if($cnt2>1) $rnum= mt_rand(1,$cnt2); for ($i=0;$i<$rnum;$i++) $rs_t=mysql_fetch_array($rs_t_query1); echo $rs_t["sbaff_text"]; } elseif($sbdowhat == 2) { $rnum=1; if($cnt>1) $rnum= mt_rand(1,$cnt); for ($i=0;$i<$rnum;$i++) $rs_t=mysql_fetch_array($rs_t_query); $id=$rs_t["id"]; $sbtitle=$rs_t["sbtitle"]; $url=$rs_t["url"]; $bannerurl=$rs_t["bannerurl"]; echo ""; mysql_query("update sbjks_ads set displays=displays+1 where id=$id"); } ?>

 
  ΚΑΤΗΓΟΡΙΕΣ
 
Ολα τα ανέκδοτα
 
   
 
  SUBSCRIBE JOKES
 
Email Address
Subscribe
Unsubscribe
 
 
   ΑΝΕΚΔΟΤO ΤΗΣ ΗΜΕΡΑΣ
 
  No Joke Available in this section
 
  ΝΕΑ ΑΚΕΚΔΟΤΑ
 
No Joke available in this section
 
  ΑΝΕΚΔΟΤΑ ΜΕ ΤΟΥΣ ΠΕΡΙΣΣΟΤΕΡΟΥΣ ΨΗΦΟΥΣ
 
No Joke available in this section