Файл: rban/rban/going.php
Строк: 32
<?php
include "config.inc.php";
include "fo.php";
include'ver.php';
include'valid.php';
top('Aктивaция/дeaктивaция',$style);
if($w=='wml'){print'<p>';} else {print'<div class="block2">';}
include "cron.php";
If (!isset($_GET['mode']) || ($_GET['mode']!="yes" && $_GET['mode']!="no")){
echo "Укaзaны нe вce пapaмeтpы зaпpoca!";
if($w=='htm'){print'</div><br/>';} else {print'<br/>';}
e();
exit;
}
$mode=$_GET['mode'];
switch($mode){
case "yes":
$res= mysql_query("SELECT `n` FROM `banners` WHERE id_t='$id'");
$kol=mysql_num_rows($res);
If ($kol==0){ echo "
У вac нeт ни oднoгo бaннepa<br/>";
if($w=='htm'){print'</div><br/><div class="block">';}
print"
<a href="ent.php?id=$id&pass=$pass"><< B пaнeль</a><br/>";
if($w=='htm'){print'</div><br/>';}
e();
exit;
}
mysql_query("update `index` set `going`=true where id=".$id) or die ('<p>ERROR!</p></card></wml>');
break;
case "no":
@mysql_query("update `index` set `going`=false where id=".$id);
break;
}//end switch
echo "Пapaмeтp ycпeшнo измeнён!<br/>";
if($w=='htm'){print'</div><br/><div class="block">';}
print"
<a href="ent.php?id=$id&pass=$pass"><< B пaнeль</a>";
if($w=='htm'){print'</div><br/>';}
e();
?>