File size: 1.53Kb
<?php
$DB_HOST = "localhost";
$DB_USER = "db_xjast";
$DB_PASS = "g5hNatDt";
$DB_NAME = "db_xjast";
////////////
@mysql_connect($DB_HOST,$DB_USER,$DB_PASS) or die ('<card id="error" title="-------------!">'.
'<p>'.
'---------------------------------------------------------------------------!'.
'<br/>'.
'<anchor>На данный момент сайт закрыт !!!! приносим ваm свои извинения<prev/></anchor><br/>'.
'<u><a href="/">2wa.ru</a></u>'.
'</p>'.
'</card>'.
'</wml>');
@mysql_select_db($DB_NAME);
header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\"><wml>\n";
echo "<card id=\"questions\" title=\"QUESTIONS DB\"><p>\n";
@mysql_query("truncate table `c_msgmess`");
@mysql_query("truncate table `c_bots_v`");
$file=file("questions.dat");
for($i=0;$i<count($file);$i++) {
$ex=explode("::",$file[$i]);
$ex[1] = str_replace("\r\n", "\n", $ex[1]);
$ex[1] = str_replace("\n", "", $ex[1]);
@mysql_query("insert into `c_bots_v` values(0,'".@htmlspecialchars($ex[0])."','".$ex[1]."','');");
}
$koll_c_bots_v=@mysql_query("SELECT count(*) FROM `c_bots_v`;");
$itog_c_bots_v=@mysql_fetch_array($koll_c_bots_v);
print"".$itog_c_bots_v['count(*)']."";
echo "</p></card></wml>";
?>