📄 insert_adv_transaction.php
字号:
<?
include_once "logincheck.php";
include_once "myconnect.php";
if (!get_magic_quotes_gpc()) {
$amount=str_replace('$', '\$',addslashes($_REQUEST["amount"]));
$description=str_replace('$', '\$',addslashes($_REQUEST["comments"]));
$email=str_replace('$', '\$',addslashes($_REQUEST["email"]));
}
else
{
$amount=str_replace('$', '\$',$_REQUEST["amount"]);
$description=str_replace('$', '\$',$_REQUEST["comments"]);
$email=str_replace('$', '\$',$_REQUEST["email"]);
}
$rst=mysql_fetch_array(mysql_query("select * from sbbleads_advertisers where email='$email'"));
if($rst)
{
$id=$rst["id"];
mysql_query("insert into sbbleads_adv_transactions (adv_id,amount,description,date_submitted)
values ($id,$amount,'$description','".date("Ymdhis",time())."')");
$msg="Successfully added $".$amount." to member account";
if($amount<0)
{
$msg="Successfully deducted $".((-1)*$amount)." from member account";
}
}
else
{
$msg="No Advertiser found with this email";
header("Location:"."add_adv_transaction.php?msg=".urlencode($msg));
die();
}
header("Location:"."view_adv_transactions.php?id=$id&msg=".urlencode($msg));
die();
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -