예제 #1
0
파일: api.php 프로젝트: klarclm/sgv
     $sql1 .= " AND d_type =" . $t;
 }
 if ($h > 0) {
     $todaydate = date('Y-m-d');
     if ($h == 24) {
         $tommdate = date('Y-m-d', strtotime('+1 day'));
     } elseif ($h == 98) {
         $tommdate = date('Y-m-d', strtotime('+7 day'));
     }
     $todayunix = strtotime($todaydate);
     $tommunix = strtotime($tommdate);
     $whereStr = ' AND d_time>= ' . $todayunix . ' AND d_time<=' . $tommunix;
     $sql .= $whereStr;
     $sql1 .= $whereStr;
 }
 $nums = $db->getOne($sql1);
 $pagecount = ceil($nums / $MAC['api']['vod']['pagesize']);
 $sql = $sql . " limit " . $MAC['api']['vod']['pagesize'] * ($pg - 1) . "," . $MAC['api']['vod']['pagesize'];
 $rs = $db->query($sql);
 if (!$rs) {
     echo "err:" . "<br>" . $sql;
     exit;
 } else {
     $xml .= "<list page=\"" . $pg . "\" pagecount=\"" . $pagecount . "\" pagesize=\"" . $MAC['api']['vod']['pagesize'] . "\" recordcount=\"" . $nums . "\">";
     while ($row = $db->fetch_array($rs)) {
         $tempurl = urlDeal($row["d_playurl"], $row["d_playfrom"]);
         if (strpos("," . $row["d_pic"], "http://") > 0) {
             $temppic = $row["d_pic"];
         } else {
             $temppic = $MAC['api']['vod']['imgurl'] . $row["d_pic"];
         }
예제 #2
0
파일: alipayapi.php 프로젝트: klarclm/sgv
//如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号
//收货人邮编
$receive_zip = $_POST['WIDreceive_zip'];
//如:123456
//收货人电话号码
$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);
예제 #3
0
파일: user.php 프로젝트: klarclm/sgv
            break;
        case "u_qq":
            $where = " AND u_qq='" . mysql_real_escape_string($s) . "'";
            break;
        case "u_code":
            if ($_SESSION["code_userreg"] != $s) {
                $status = "false";
            }
            break;
        default:
            $where = "";
            break;
    }
    if ($t != "u_code" && $status == "true") {
        $sql = "SELECT count(*) FROM {pre}user WHERE 1=1 " . $where;
        $num = $db->getOne($sql);
        if ($num > 0) {
            $status = "false";
        }
    }
    echo "{\"res\":" . $status . "}";
} elseif ($method == 'regsave') {
    if ($MAC['user']['reg'] == 0) {
        showErr('System', '系统已经关闭注册');
        return;
    }
    $u_code = be("post", "u_code");
    if ($u_code == "") {
        alert("请返回输入确认码。返回后请刷新登陆页面后重新输入正确的信息。");
        exit;
    }