Ejemplo n.º 1
0
 public function doStatis()
 {
     $height = 0;
     $width = 0;
     $this->setStatisParam();
     $rt = new RecordTask();
     switch ($this->nOpType) {
         case self::COOLSHOW_OPTYPE_REQ:
             // 				$this->_statis->recordRequest($this->nMSubType, $this->nModuleType, $height, $width);
             break;
         case self::COOLSHOW_OPTYPE_PREV:
             $rt->saveBrowse($this->nModuleType);
             // 				Log::write('StatisInterface browse module type:'.$this->nModuleType, 'debug');
             break;
         case self::COOLSHOW_OPTYPE_DOWNLOAD:
             $this->_statis->recordDownloadRequest($this->strId, $this->nModuleType, $height, $width, $this->strCpid, '', $this->nMSubType, $this->nChannel);
             //				$rt->saveDownload($this->nModuleType);
             break;
         case self::COOLSHOW_OPTYPE_APPLY:
             $this->_statis->recordApply($height, $width, $this->nMSubType, $this->nModuleType, $this->strId, $this->strCpid);
             $rt->saveApply($this->nModuleType);
             break;
     }
     return true;
 }
Ejemplo n.º 2
0
<?php

/**
 * 主动上报统计接口
 * service/setting.php
 * 
 * 说明:
 * 方法:POST
 * 
 * POST字段 :statis
 * setting:ttwindow瀑布流
 * POST值:product:产品名称
 * 			imsi: 终端串号
 * 			imei   终端串号
 *			meid   终端串号
 * 			version:应用版本
 * 			width:  分辨率宽
 * 			height: 分辨率高
 */
require_once 'lib/WriteLog.lib.php';
require_once 'tasks/Records/RecordTask.class.php';
$jsonSetting = isset($_POST['statis']) ? $_POST['statis'] : '';
Log::write("setting :" . $jsonSetting, 'debug');
$rt = new RecordTask();
$rt->saveSetting();
Ejemplo n.º 3
0
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);
    }
    $rt->updateOrder($nCoolType, $strExorder, $isScore);
} catch (Exception $e) {
    Log::write('mcharge exception', 'log');
    echo get_rsp_result(false, 'mcharge exception');
}
Ejemplo n.º 4
0
Archivo: list.php Proyecto: vvcumt/zk
*             “main_prev_url”: “http://www.coolshow.com/1.jpg“,
*             “prev_img_num”:3,
*             “prev_imgs”:
*             [
*             		{“img_url”: “http://www.coolshow.com/1.jpg”},
*             		{“img_url”:” http://www.coolshow.com/2.jpg”},
*             		{“img_url”:” http://www.coolshow.com/3.jpg”}
*             ]
*      },
*      ...
*],
*}
*/
//以下部分测试通过
require_once 'public/public.php';
$nPage = isset($_GET['page']) ? $_GET['page'] : 0;
$nNum = isset($_GET['reqnum']) ? $_GET['reqnum'] : 10;
$nStart = $nNum * $nPage;
if (!is_numeric($req_num) || !is_numeric($req_page)) {
    echo get_rsp_result(false, 'get param is not num');
    exit;
    //错误请求
}
require_once "tasks/CoolShow/CoolShowSearch.class.php";
$nCoolType = (int) (isset($_GET['mtype']) ? $_GET['mtype'] : COOLXIU_TYPE_THEMES);
$coolshow = new CoolShowSearch();
$json_result = $coolshow->getCoolShow($nCoolType, $nStart, $nNum);
echo $json_result;
require_once 'tasks/Records/RecordTask.class.php';
$rt = new RecordTask();
$rt->saveRequest($type);
Ejemplo n.º 5
0
Archivo: lucene.php Proyecto: vvcumt/zk
<?php

require_once 'public/public.php';
$nCoolType = isset($_GET['type']) ? $_GET['type'] : -1;
$keyWord = isset($_GET['keyword']) ? $_GET['keyword'] : '';
$bColor = isset($_GET['iscolor']) ? $_GET['iscolor'] : 0;
$nPage = isset($_GET['page']) ? $_GET['page'] : 0;
$nLimit = isset($_GET['reqNum']) ? $_GET['reqNum'] : 1000;
if (empty($keyWord)) {
    echo get_rsp_result(false, 'keyword is null');
    exit;
}
require_once 'configs/config.php';
require_once "tasks/CoolShow/CoolShowSearch.class.php";
$coolshow = new CoolShowSearch();
$result = $json_result = $coolshow->searchLucene($nCoolType, $keyWord, $bColor, $nPage, $nLimit);
echo $result;
require_once 'tasks/Records/RecordTask.class.php';
$rt = new RecordTask();
$rt->saveLucene($nCoolType);
Ejemplo n.º 6
0
 * 1:预览
 * 2:下载
 * 3:应用
 *
 * applytype:操作子类型,当操作类型为应用(3)时作为应用的类型
 * 1: 壁纸->待机
 * 2: 壁纸->桌面
 * 3: 壁纸->主菜单
 *
 * POST字段 :为手机基本信息
 * 			product:产品名称
 * 			cyid: 酷云账号(暂无)
 * 			imsi: 终端串号
 *			meid   终端串号
 * 			versionCode:应用版本
 * 			width:  分辨率宽
 * 			height: 分辨率高
 * 			network: 网络模式2g/3g/wifi
 */
require_once 'lib/WriteLog.lib.php';
require_once 'public/public.php';
require_once 'tasks/Records/RecordTask.class.php';
require_once 'tasks/statis/StatisInterface.class.php';
if (!isset($_GET['id'])) {
    Log::write('statis:: id is not set', 'log');
    exit(get_rsp_result(false, 'id is empty'));
}
//mongodb记录
$rt = new RecordTask();
$result = $rt->saveStaticRecord();
echo get_rsp_result(true);
Ejemplo n.º 7
0
$arrRsc = $coolshow->getRsc($nCoolType, $strId);
$arrRsc = $arrRsc['result'];
$cpid = '';
$name = '';
$userid = '';
$author = '';
$type = '';
$appid = '';
$waresid = '';
$money = '';
foreach ($arrRsc as $rsc) {
    if ($nCoolType == COOLXIU_TYPE_SCENE) {
        $cpid = $rsc->sceneId;
        $name = $rsc->sceneZName;
        $author = $rsc->authorName;
    } else {
        $cpid = $rsc->cpid;
        $name = $rsc->name;
        $author = $rsc->author;
    }
    $userid = $rsc->getUserid();
    $type = $rsc->type;
    $appid = $rsc->productId;
    $waresid = $rsc->waresId;
    $money = $rsc->price;
    $ruleid = $rsc->ruleid;
    $score = $rsc->score;
}
$erDb->saveMobileExorder($nCoolType, $strExorder, $ruleid, $score, $strId, $cpid, $name, $userid, $author, $type, $appid, $waresid, $money, $strProduct, $strMeid, $strUid, $strImsi, $strNet, $strVercode, $kernel);
$rf = new RecordTask();
$rf->saveOrder($nCoolType, $strId, $cpid, $ruleid, $score, $name, $userid, $author, $type, $appid, $waresid, $money, $strExorder);
Ejemplo n.º 8
0
Archivo: banner.php Proyecto: vvcumt/zk
<?php

/**
 * banner区资源列表获取接口
 * 
 * $type : 资源类型
 * 
 */
require_once 'tasks/CoolShow/CoolShowSearch.class.php';
$nCoolType = (int) (isset($_GET['mtype']) ? $_GET['mtype'] : 4);
$bAlbum = (int) (isset($_GET['album']) ? $_GET['album'] : 0);
$nNum = (int) (isset($_GET['reqnum']) ? $_GET['reqnum'] : 20);
$nPage = (int) (isset($_GET['page']) ? $_GET['page'] : 0);
$nStart = $nPage * $nNum;
$coolshow = new CoolShowSearch();
$json_result = $coolshow->getBannerList($nCoolType, $bAlbum, $nStart, $nNum);
echo $json_result;
require_once 'tasks/Records/RecordTask.class.php';
$rt = new RecordTask();
$rt->saveBanner($nCoolType);
Ejemplo n.º 9
0
Archivo: albums.php Proyecto: vvcumt/zk
<?php

/**
 * 获取当前资源专辑
 *
 *兼容了安卓壁纸的资源
 */
require_once 'lib/WriteLog.lib.php';
require_once 'configs/config.php';
$nCoolType = isset($_GET['mtype']) ? $_GET['mtype'] : 0;
//cooltype:主题、壁纸、铃声、专题等分类
$strId = isset($_GET['id']) ? $_GET['id'] : '';
$bAlbum = isset($_GET['album']) ? $_GET['album'] : 0;
$nPage = isset($_GET['page']) ? $_GET['page'] : 0;
$nNum = isset($_GET['num']) ? $_GET['num'] : 100;
if (empty($strId) || strlen($strId) > 32) {
    Log::write('strId length is wrong', 'log');
    exit;
}
$nStart = $nPage * $nNum;
$nChannel = $bAlbum ? REQUEST_CHANNEL_ALBUMS : REQUEST_CHANNEL_BANNER;
require_once 'tasks/CoolShow/CoolShowSearch.class.php';
$rsc = new CoolShowSearch();
$result = $rsc->getNewBanner($nCoolType, $strId, $nChannel);
echo $result;
require_once 'tasks/Records/RecordTask.class.php';
$rt = new RecordTask();
$rt->saveAlbums($nCoolType);