Exemplo n.º 1
0
//收货人电话号码
$receive_phone = $_POST['WIDreceive_phone'];
//如:0571-88158090
//收货人手机号码
$receive_mobile = $_POST['WIDreceive_mobile'];
//如:13312341234
/************************************************************/
//构造要请求的参数数组,无需改动
$parameter = array("service" => "trade_create_by_buyer", "partner" => trim($alipay_config['partner']), "payment_type" => $payment_type, "notify_url" => $notify_url, "return_url" => $return_url, "seller_email" => $alipay_config['no'], "out_trade_no" => $out_trade_no, "subject" => $subject, "price" => $price, "quantity" => $quantity, "logistics_fee" => $logistics_fee, "logistics_type" => $logistics_type, "logistics_payment" => $logistics_payment, "body" => $body, "show_url" => $show_url, "receive_name" => $receive_name, "receive_address" => $receive_address, "receive_zip" => $receive_zip, "receive_phone" => $receive_phone, "receive_mobile" => $receive_mobile, "_input_charset" => trim(strtolower($alipay_config['input_charset'])));
$db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
$sql = 'select count(*) from {pre}user_pay where p_order=' . $out_trade_no;
$num = $db->getOne($sql);
if ($num > 0) {
    showErr('System', "订单号错误无法提交数据");
} else {
    $db->Add('{pre}user_pay', array('p_uid', 'p_order', 'p_price', 'p_point', 'p_time'), array($_SESSION["userid"], $out_trade_no, $price, $price * $MAC['pay']['app']['exc'], time()));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>支付宝标准双接口接口</title>
</head>
<?php 
//建立请求
$alipaySubmit = new AlipaySubmit($alipay_config);
$html_text = $alipaySubmit->buildRequestForm($parameter, "get", "确认");
echo $html_text;
?>
</body>
Exemplo n.º 2
0
Arquivo: user.php Projeto: klarclm/sgv
                alert('UC同步注册失败:用户名已经存在');
            } elseif ($uid == -4) {
                alert('UC同步注册失败:Email 格式有误');
            } elseif ($uid == -5) {
                alert('UC同步注册失败:Email 不允许注册');
            } elseif ($uid == -6) {
                alert('UC同步注册失败:该 Email 已经被注册');
            } else {
                alert('UC同步注册失败:未定义');
            }
        }
    }
    $u_password1 = md5($u_password1);
    $row = $db->getRow("SELECT * FROM {pre}user WHERE u_name='" . mysql_real_escape_string($u_name) . "'");
    if (!$row) {
        $db->Add("{pre}user", array("u_name", "u_password", "u_qq", "u_email", "u_regtime", "u_status", "u_points", "u_group", "u_phone", "u_question", "u_answer"), array($u_name, $u_password1, $u_qq, $u_email, time(), $MAC['user']['regstate'], $MAC['user']['regpoint'], $MAC['user']['reggroup'], $u_phone, $u_question, $u_answer));
        alertUrl("注册成功,正在转向登录页面", "?m=user-login.html");
        return;
    } else {
        alert("注册失败,该用户名已经被使用");
        return;
    }
    unset($row);
} elseif ($method == 'findpasssave') {
    $u_name = be("post", "u_name");
    $u_name = chkSql($u_name);
    $u_password = be("post", "u_password");
    $u_email = be("post", "u_email");
    $u_email = chkSql($u_email);
    $u_question = be("post", "u_question");
    $u_question = chkSql($u_question);
Exemplo n.º 3
0
    }
    $pattern = '/[^\\x00-\\x80]/';
    if (!preg_match($pattern, $g_content)) {
        alert('内容必须包含中文,请重新输入!');
        exit;
    }
    $g_name = badFilter($g_name);
    $g_name = strip_tags($g_name);
    $g_content = badFilter($g_content);
    $g_content = strip_tags($g_content);
    $g_ip = ip2long(getIP());
    $g_time = time();
    if ($MAC['other']['gbookaudit'] == 1) {
        $g_hide = 1;
    } else {
        $g_hide = 0;
    }
    if (strlen($g_name) > 64) {
        $g_name = substring($g_name, 64);
    }
    if (strlen($g_content) > 255) {
        $g_content = substring($g_content, 255);
    }
    $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
    $db->Add("{pre}gbook", array("g_vid", "g_hide", "g_name", "g_ip", "g_time", "g_content"), array($g_vid, $g_hide, $g_name, $g_ip, $g_time, $g_content));
    $_SESSION["last_gbooktime"] = time();
    $_SESSION["code_gbook"] = "";
    alert('留言成功');
} else {
    showErr('System', '未找到指定系统模块');
}
Exemplo n.º 4
0
    }
    $pattern = '/[^\\x00-\\x80]/';
    if (!preg_match($pattern, $c_content)) {
        echo '内容必须包含中文,请重新输入!';
        exit;
    }
    $c_name = badFilter($c_name);
    $c_name = strip_tags($c_name);
    $c_content = badFilter($c_content);
    $c_content = strip_tags($c_content);
    $c_ip = ip2long(getIP());
    $c_time = time();
    if ($MAC['other']['commentaudit'] == 1) {
        $c_hide = 1;
    } else {
        $c_hide = 0;
    }
    if (strlen($c_name) > 64) {
        $c_name = substring($c_name, 64);
    }
    if (strlen($c_content) > 255) {
        $c_content = substring($c_content, 255);
    }
    $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']);
    $db->Add("{pre}comment", array("c_vid", "c_hide", "c_type", "c_name", "c_ip", "c_time", "c_content"), array($c_vid, $c_hide, $c_type, $c_name, $c_ip, $c_time, $c_content));
    $_SESSION["last_commenttime"] = time();
    $_SESSION["code_comment"] = "";
    echo "ok";
} else {
    showErr('System', '未找到指定系统模块');
}