Размер файла: 4.18Kb
<?
error_reporting(E_ALL ^ E_NOTICE); //<--
session_start();
require ('../data/config.php');
require ('../data/mysql.php');
require ('../data/functions.php');
if (!authenticateUser( $cookie_user, $cookie_passwd))
{
header("Location:/index.php?err=falce");
exit();
}
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>'; ?>
<card title="<?print "$site_title";?>">
<p>
<?require ('../html/up_user.php');?>
<small> <b>Перевод кредитов</b>:<br/><br/>
<?
$err=0;$out=0;
$err_txt="";
if ($seenform=="yes")
{
$tid=strip_tags($tid); // убирает все теги из текста
$cred=strip_tags($cred);
if ($tid=="")
{
$err=1;
$err_txt.= "<br/>-Неуказан id получателя!!!";
}
if ($cred=="")
{
$err=1;
$err_txt.= "<br/>-Неуказано число кредитов!!!";
}
$res= mysql_query("SELECT * FROM accounts WHERE user_login='$cookie_user' and status='1' ORDER BY id DESC");
$rows = mysql_fetch_array($res);
$result1= mysql_query("SELECT * FROM view WHERE id_account='$rows[id]'");
$cr=mysql_num_rows($result1);
if ($cr>=$cred)
{
//////////////////
$result7= mysql_query("SELECT * FROM accounts WHERE id='$tid'");
$row7 = mysql_fetch_array($result7);
$view=$cred;
$text_mail="Вам добавили $view показов";
/* send_mail($rows[email],"XPClub-Баннер - Вам добавили показы(Перевод показов)",$text_mail,$admin_email,$site_title,$http_address); */
$subject = "XPClub-Баннер - Вам добавили показы(Перевод показов)";
$subject=substr($subject,0,100);
$text_mail=substr($text_mail,0,1000);
//$mail = utf_to_win($mail);
$mail=substr($mail,0,100);
$now= date("j-m-Y");
$subject = convert_cyr_string($subject, 'w','k');
$text_mail = convert_cyr_string($text_mail, 'w','k');
$mail = convert_cyr_string($mail, 'w','k');
$adds = "From: [email protected] \n";
$adds .= "X-sender: < [email protected] >\n";
$adds .= "Content-Type: text/plain; charset=koi8-r\n";
mail($rows[email],$subject,$text_mail,$adds);
for ($i=1;$i<=$view;$i++)
{
$result= mysql_query("INSERT INTO view (id_account) VALUES ('$tid')");
}
$res= mysql_query("SELECT * FROM accounts WHERE user_login='$cookie_user' and status='1' ORDER BY id DESC");
$rows = mysql_fetch_array($res);
$result5= mysql_query("DELETE FROM `view` WHERE `id_account` = '$rows[id]' LIMIT $view;");
print "Перевод завершен успешно!";
//////////////////
} else { print "Ошибка!!<br/>"; }
{
if ($err=1)
print "$err_txt<br/><br/>";
}
}
$result= mysql_query("SELECT * FROM accounts WHERE user_login='$cookie_user'");
$row = mysql_fetch_array($result);
echo "</small><small>Введите ID получателя:</small><br/>
<input type=\"text\" name=\"tid\" size=\"40\"/> <br/>
<small>Введите сколько хотите передать кредитов:</small>
<br/>
<input type=\"text\" name=\"cred\" size=\"40\"/><br/>
\n";
echo "<small><anchor>Go!
<go href=\"$PHP_SELF\" method=\"post\">
<postfield name=\"tid\" value=\"$(tid)\"/>
<postfield name=\"cred\" value=\"$(cred)\"/>
<postfield name=\"seenform\" value=\"yes\"/>
</go></anchor><br/>\n";
?>
••••••••••<br/>
<a href="index.php">Управление аккаунтом</a> <br/>
</small> </p>
</card>
</wml>