<?php /** * 设计师资源 */ require_once 'lib/WriteLog.lib.php'; try { require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $nCoolType = isset($_GET['type']) ? $_GET['type'] : 0; $strCyid = isset($_GET['cyid']) ? $_GET['cyid'] : 10; $nPage = isset($_GET['page']) ? $_GET['page'] : 0; $nNum = isset($_GET['num']) ? $_GET['num'] : 10; $nStart = $nPage * $nNum; $coolshow = new CoolShowSearch(); $json_result = $coolshow->getDesignerCoolShow($nCoolType, $strCyid, $nStart, $nNum); echo $json_result; } catch (Exception $e) { Log::write('collect exception:' . $e->getMessage(), 'log'); echo get_rsp_result(false, 'collect exception'); }
<?php $req_page = isset($_GET['page']) ? $_GET['page'] : 0; $req_num = isset($_GET['reqNum']) ? $_GET['reqNum'] : 10; $start = $req_num * $req_page; $nCoolType = (int) isset($_GET['type']) ? $_GET['type'] : 0; require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $coolshow = new CoolShowSearch(); $protocol = $coolshow->getBanner($nCoolType); if (!$protocol || count($protocol) <= 0) { return get_rsp_result(false, 'get banner error'); } $result = array('result' => true, 'banners' => $protocol); echo $json_result;
<?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);
* “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);
$nWidth = isset($_GET['width']) ? $_GET['width'] : 0; $nHeight = isset($_GET['height']) ? $_GET['height'] : 0; $nSceneCode = isset($_GET['scenecode']) ? $_GET['scenecode'] : 0; $nKernelCode = isset($_GET['kernelcode']) ? $_GET['kernelcode'] : 0; $nIsOrder = isset($_GET['isorder']) ? $_GET['isorder'] : 0; //是否命令 $nIsShow = isset($_GET['isshow']) ? $_GET['isshow'] : 0; //是否命令 $nDisplayType = isset($_GET['displaytype']) ? $_GET['displaytype'] : 0; //是否分离托盘和图标打点0全部1托盘2图标 $nIsLarge = isset($_GET['islarge']) ? $_GET['islarge'] : 0; //是否图片 $nIsGoing = isset($_GET['isgoing']) ? $_GET['isgoing'] : 0; //是否锁定 $strTitle = isset($_GET['title']) ? $_GET['title'] : 0; //推送标题 $strContent = isset($_GET['content']) ? $_GET['content'] : 0; //推送内容描述 $strUrl = isset($_GET['url']) ? $_GET['url'] : 0; //推送内容描述 $nIsDetail = isset($_GET['url']) ? $_GET['url'] : 0; //是否详情 require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $result = array('coolshow' => 'order'); if (!$nIsOrder) { $coolshow = new CoolShowSearch(); $result = $coolshow->getRsc($nCoolType, $strId); } $arrResult = array('isdirect' => true, 'entity' => array('pushtype' => (int) $nCoolType, 'isalbum' => $isAlbum, 'isdetail' => $nIsDetail ? true : false, 'isorder' => $nIsOrder ? true : false, 'pushDisplayType' => $nDisplayType, 'isshow' => $nIsShow, 'title' => $strTitle, 'content' => $strContent, 'isgoing' => $nIsGoing ? true : false, 'islarge' => $nIsLarge ? true : false, 'url' => $strUrl, 'detailurl' => $strDetailUrl, 'id' => $strId, $result['key'] => $result['result'])); echo json_encode($arrResult);
$strImsi = ''; $strMeid = ''; $protocolCode = 0; $strUid = ''; 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; }
<?php require_once 'lib/WriteLog.lib.php'; try { $nCoolType = isset($_GET['type']) ? $_GET['type'] : ''; $id = isset($_GET['id']) ? $_GET['id'] : ''; if (empty($id)) { Log::write('thbrowse:ID is empty', 'log'); exit; } $product = isset($_GET['product']) ? $_GET['product'] : ''; $channel = isset($_GET['channel']) ? $_GET['channel'] : 0; require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $coolshow = new CoolShowSearch(); $json_result = $coolshow->getCoolShowDetail($nCoolType, $id, $channel); echo $json_result; } catch (Exception $e) { Log::write('thbrowse:: exception error:' . $e->getMessage(), 'log'); exit; }
<?php require_once 'lib/WriteLog.lib.php'; require_once 'configs/config.php'; try { $nType = isset($_GET['type']) ? $_GET['type'] : 0; $id = isset($_GET['id']) ? $_GET['id'] : ''; $cpid = isset($_GET['cpid']) ? $_GET['cpid'] : ''; if (empty($id) && empty($cpid)) { Log::write('thbrowse:ID is empty', 'log'); exit; } $product = isset($_GET['product']) ? $_GET['product'] : ''; $chanel = isset($_GET['channel']) ? $_GET['channel'] : 0; $width = isset($_GET['width']) ? $_GET['width'] : 0; $heith = isset($_GET['height']) ? $_GET['height'] : 0; require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $coolshow = new CoolShowSearch(); if ($chanel == REQUEST_CHANNEL_WEB) { $json_result = $coolshow->getCoolShowDetail($nType, $cpid); } else { $json_result = $coolshow->getCoolShowRelevant($nType, $id, $cpid); } echo $json_result; } catch (Exception $e) { Log::write('thbrowse:: exception error:' . $e->getMessage(), 'log'); exit; }
<?php /** * 获取当前资源专辑 * *兼容了安卓壁纸的资源 */ $nCoolType = isset($_GET['type']) ? $_GET['type'] : 0; //cooltype:主题、壁纸、铃声、专题等分类 $bColor = isset($_GET['iscolor']) ? $_GET['iscolor'] : false; //iscolor:获取延时关键词 require_once 'tasks/CoolShow/CoolShowSearch.class.php'; $rsc = new CoolShowSearch(); $result = $rsc->getHotWord($nCoolType); echo $result;
<?php if (isset($_GET['page']) && isset($_GET['reqNum'])) { $req_page = isset($_GET['page']) ? $_GET['page'] : 0; $req_num = isset($_GET['reqNum']) ? $_GET['reqNum'] : 10; $start = $req_num * $req_page; } else { $req_page = isset($_POST['start']) ? $_POST['start'] : 0; $req_num = isset($_POST['limit']) ? $_POST['limit'] : 10; $start = $req_page; } if ($req_num === null || $req_page === null || !is_numeric($req_num) || !is_numeric($req_page)) { $result = get_rsp_result(false, 'request skip or limit failed'); exit; } require_once "tasks/CoolShow/CoolShowSearch.class.php"; $coolshow = new CoolShowSearch(); $json_result = $coolshow->getCoolShow(COOLXIU_TYPE_THEMES, $req_page, $req_num); echo $json_result;
public function searchWpList($sorttype = 0) { /** * 2015.08.06 * 自运营壁纸叠加到安卓壁纸智商 * 需要兼容旧版本 * */ $num = $this->_num; $start = $this->_start; $nCpTotal = 0; $nRetNum = 0; $arrRetWallpaper = array(); $bChoice = false; if ($this->_type == 0) { $bChoice = true; } $coolshow = new CoolShowSearch(); $result = $coolshow->getWallpaper($bChoice, $this->_type, $this->_start, $this->_num); if (!$result) { return false; } return json_encode($result); if ($result) { $nCpTotal = $result['total_number']; $nRetNum = $result['ret_number']; $arrRetWallpaper = $result['wallpapers']; // if ($nCpTotal >= ($this->_start + $this->_num)){ // return json_encode($result); // } if ($nRetNum == 0) { $num = $this->_num; $start = $this->_start - $nCpTotal; } else { $num = $this->_num - $nRetNum; $start = 0; } } // } $this->_adWp->setReqNum($start, $num); $result = $this->_getWpList($sorttype); if (!$result) { return false; } $json_rsp = array('total_number' => (int) $nCpTotal + (int) $result['total_number'], 'ret_number' => (int) $nRetNum + (int) $result['ret_number'], 'wallpapers' => array_merge($arrRetWallpaper, $result['wallpapers'])); return json_encode($json_rsp); }
$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; #0表示拉取订单号和收费信息,1表示查询收费信息 if ($bQuery) { exit; } require_once 'tasks/CoolShow/CoolShowSearch.class.php'; require_once 'tasks/Records/RecordTask.class.php'; $coolshow = new CoolShowSearch(); $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;
<?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);
<?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);
<?php /** *评论评分的终端获取接口 * $type : 资源类型 * $id : 资源ID */ try { $id = isset($_GET['id']) ? $_GET['id'] : ''; $cpid = isset($_GET['cpid']) ? $_GET['cpid'] : ''; if (empty($id) && empty($cpid)) { Log::write('comment is empty', 'log'); exit; } $nType = isset($_GET['type']) ? $_GET['type'] : 0; $page = isset($_GET['page']) ? $_GET['page'] : 0; $limit = isset($_GET['reqNum']) ? $_GET['reqNum'] : 10; $skip = $page * $limit; require_once 'configs/config.php'; require_once "tasks/CoolShow/CoolShowSearch.class.php"; $coolshow = new CoolShowSearch(); $json_result = $coolshow->getCoolShowComment($nType, $id, $cpid, $limit, $skip); echo $json_result; } catch (Exception $e) { Log::write('comment:: exception error:' . $e->getMessage(), 'log'); exit; }