Ejemplo n.º 1
0
/**
 * 付费后上报已付费的订单号及终端信息
 * 
 */
require_once 'public/public.php';
require_once 'lib/WriteLog.lib.php';
try {
    $strExorder = isset($_GET['exorder']) ? $_GET['exorder'] : '';
    //订单号
    if (empty($strExorder)) {
        echo get_rsp_result(false, 'exorder is empty');
        exit;
    }
    $isScore = (int) (isset($_GET['isscore']) ? $_GET['isscore'] : 0);
    require_once 'tasks/Exorder/ExorderRecordDb.class.php';
    $erDb = new ExorderRecordDb();
    $bResult = $erDb->updateMobileExorder($strExorder, $isScore);
    if (!$bResult) {
        Log::write('mcharge updateMobileExorder() failed', 'log');
        echo get_rsp_result(false, 'save mobile charge failed');
        exit;
    }
    echo get_rsp_result(true);
    require_once 'tasks/Records/RecordTask.class.php';
    $rt = new RecordTask();
    $nCoolType = isset($_GET['mtype']) ? $_GET['mtype'] : 0;
    $strCyid = isset($_GET['uid']) ? $_GET['uid'] : '';
    if (!empty($strUid)) {
        $strId = isset($_GET['id']) ? $_GET['id'] : '';
        $strCpid = isset($_GET['cpid']) ? $_GET['cpid'] : '';
        $erDb->saveChargeRecord($strExorder, $strCyid, $nCoolType, $strId, $strCpid);
Ejemplo n.º 2
0
Archivo: myrsc.php Proyecto: vvcumt/zk
/**
 * 根据资源类型和ID获取单个资源的协议
 * 
 * $type : 资源类型
 * $id   : 资源ID
 */
require_once 'lib/WriteLog.lib.php';
try {
    $nCoolType = isset($_GET['type']) ? $_GET['type'] : 0;
    //cooltype:主题、壁纸、铃声、字体等分类
    $strUid = isset($_GET['uid']) ? $_GET['uid'] : '';
    $nPage = isset($_GET['page']) ? $_GET['page'] : 0;
    $nNum = isset($_GET['num']) ? $_GET['num'] : 0;
    $nStart = $nPage * $nNum;
    require_once 'tasks/Exorder/ExorderRecordDb.class.php';
    $erDb = new ExorderRecordDb();
    $rows = $erDb->getChargeRecord($strUid, $nCoolType, $nStart, $nNum);
    if ($rows === false) {
        Log::write('myrsc getChargeRecord() failed', 'log');
        echo get_rsp_result(false, 'get charge record failed');
        exit;
    }
    require_once 'tasks/protocol/MyResProtocol.php';
    $arrProtocol = array();
    foreach ($rows as $row) {
        $myRes = new MyResProtocol();
        $myRes->setProtocol($row);
        array_push($arrProtocol, $myRes);
    }
    $arrResult = array('result' => true, 'list' => $arrProtocol);
    echo json_encode($arrResult);
Ejemplo n.º 3
0
    if (isset($_POST['statis'])) {
        $json_param = isset($_POST['statis']) ? $_POST['statis'] : '';
        $json_param = stripslashes($json_param);
        $arr_param = json_decode($json_param, true);
        $strProduct = isset($arr_param['product']) ? $arr_param['product'] : '';
        $strMeid = isset($arr_param['meid']) ? $arr_param['meid'] : '';
        $strUid = isset($arr_param['uid']) ? $arr_param['uid'] : '';
        $procode = (int) (isset($arr_param['procode']) ? $arr_param['procode'] : 0);
    }
    require_once "tasks/CoolShow/CoolShowSearch.class.php";
    //下面两个数据库操作可以合并优化
    $coolshow = new CoolShowSearch();
    $bIsCharge = $coolshow->checkIscharge(COOLXIU_TYPE_THEMES, $id);
    if ($bIsCharge) {
        require_once 'tasks/Exorder/ExorderRecordDb.class.php';
        $erDb = new ExorderRecordDb();
        $bResult = $erDb->checkMobileCharged($strProduct, $nCoolType, $id, $cpid, $strMeid, $strImsi, $strUid);
        if (!$bResult) {
            $result = get_rsp_result(false, 'the resource is not paid');
            exit($result);
        }
    }
    $url = $coolshow->getUrl($nCoolType, $id);
    if ($url === false) {
        Log::write('CoolShowSearch::getUrl(COOLXIU_TYPE_THEMES) id:' . $id, 'log');
        exit;
    }
    url_skip_download($url);
} catch (Exception $e) {
    Log::write('thdownload:: exception error:' . $e->getMessage(), 'log');
    exit;
Ejemplo n.º 4
0
$strUid = '';
$strNet = '';
$kernel = isset($_GET['kernel']) ? $_GET['kernel'] : 0;
$strVercode = isset($_GET['vercode']) ? $_GET['vercode'] : 0;
$json_param = isset($_POST['statis']) ? $_POST['statis'] : '';
if (!empty($json_param)) {
    $json_param = stripslashes($json_param);
    $arr_param = json_decode($json_param, true);
    $strProduct = isset($arr_param['product']) ? $arr_param['product'] : '';
    $strMeid = isset($arr_param['meid']) ? $arr_param['meid'] : '';
    $strImei = isset($arr_param['imei']) ? $arr_param['imei'] : '';
    $strImsi = isset($arr_param['imsi']) ? $arr_param['imsi'] : '';
    $strUid = isset($arr_param['uid']) ? $arr_param['uid'] : '';
    $strNet = isset($arr_param['net']) ? $arr_param['net'] : '';
}
$erDb = new ExorderRecordDb();
$bResult = $erDb->checkMobileCharged($strProduct, $nCoolType, $strId, $strCpid, $strMeid, $strImsi, $strUid);
if ($bResult) {
    $reuslt = array('result' => true, 'exorder' => '', 'charged' => true);
    echo json_encode($reuslt);
    exit;
}
$exorderDb = new ExorderDb();
$strExorder = $exorderDb->createExorder($nCoolType);
if (!$strExorder) {
    echo get_rsp_result(false, 'create exorder failed');
    exit;
}
$reuslt = array('result' => true, 'exorder' => $strExorder, 'charged' => false);
echo json_encode($reuslt);
$bQuery = isset($_GET['query']) ? $_GET['query'] : 0;