<?require ('../config.php');
$res100=mysql_query("select * from tb_ban where play = '0'");
$i100=0;$spisokban100 = "<?";
 while($row=mysql_fetch_assoc($res100)){
 $urlpic=$row["urlpic"];
 $id=$row["id"];
 $i100++;
 $spisokban100 .= "
 \$BAN100_URL[$i100]='{$urlpic}';
 \$BAN100_ID[$i100]={$id};
 "; }
$spisokban100 .="
\$i={$i100};
?>";
$fremov = @fopen("../kech/file_rotator100.php","w+");
@fwrite($fremov,$spisokban100);
@fclose($fremov);


$res200=mysql_query("select * from tb_advban200 where play = '0'");
$i200=0;$spisokban200 = "<?";
 while($row=mysql_fetch_assoc($res200)){
 $urlpic=$row["urlpic"];
 $id=$row["id"];
 $i200++;
 $spisokban200 .= "
 \$BAN200_URL[$i200]='{$urlpic}';
 \$BAN200_ID[$i200]={$id};
 "; }
$spisokban200 .= "
\$i={$i200};
?>";
$fremov = @fopen("../kech/file_rotator200.php","w+");
@fwrite($fremov,$spisokban200);
@fclose($fremov);


$res468=mysql_query("select * from tb_advban where play = '0'");
$i468=0;$spisokban468 .= "<?";
 while($row=mysql_fetch_assoc($res468)){
 $urlpic=$row["urlpic"];
 $id=$row["id"];
 $i468++;
 $spisokban468 .= "
 \$BAN468_URL[$i468]='{$urlpic}';
 \$BAN468_ID[$i468]={$id};
 "; }
$spisokban468 .= "
\$i={$i468};
?>";
$fremov = @fopen("../kech/file_rotator468.php","w+");
@fwrite($fremov,$spisokban468);
@fclose($fremov);

?>