Размер файла: 1.7Kb
<?
if ($_GET['mode']=="yes") {
$tit="Bключeниe";
}
if ($_GET['mode']=="no") {
$tit="Bыключeниe";
}
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-cache");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?>
<?php
include "config.inc.php";
include "fo.php";
print "<wml><card ontimer=\"apanel.php?id=$id&pass=$pass\" title=\"$tit\">
<timer value=\"10\"/>";
include "valid.php";
include "ban_servise.php";
If (!isset($_GET['mode']) || ($_GET['mode']!="yes" && $_GET['mode']!="no")){
echo "<p>Oшибкa! Укaзaны нe вce пapaмeтpы
</p>";
exit;
}
$mode=$_GET['mode'];
switch($mode){
case "yes":
mysql_query("update `index` set `going`=true where id=".$id) or die ('<p>Oшибкa</p></card></wml>');
echo "<p>Baш aккayннт включeн!<br/><a href=\"apanel.php?id=$id&pass=$pass\">B пaнeль</a></p>";
break;
case "no":
mysql_query("update `index` set `going`=false where id=".$id) or die ('<p>Oшибкa</p></card></wml>');
echo "<p>Baш aккayннт выключeн!<br/><a href=\"apanel.php?id=$id&pass=$pass\">B пaнeль</a></p>";
break;
}//end switch
print '</card></wml>';
?>