private function getRealName($user_id) { $user = core::Singleton('user.borrow_info'); $result = $user->getRealName($user_id); unset($user); return $result; }
/** * 精选标 */ public function _homeAct() { core::Singleton('comm.remote.remote'); $data['sname'] = 'topborrow.get'; $data = transferAPI($data); if ($data['code'] == 0) { if ($data['ratio']) { core::Singleton('comm.remote.remote'); $data['sname'] = 'topborrow.get'; $data = transferAPI($data); } $this->view->assign('bondname', $data["data"]["bname"]); $this->view->assign('rate', sprintf('%.1f', $data["data"]["interest_rate"])); $this->view->assign('deadline', $data['data']["borrow_duration"]); $this->view->assign('ratio', $data['data']["ratio"]); $this->view->assign('min', str2val_money($data['data']["borrow_min"])); $monery = $data['data']["borrow_money"] / 10000; $this->view->assign('money', '<i>' . $monery . '</i>'); $this->view->assign('bid', $data['data']['id']); } $data['sname'] = 'banner.get'; $data['latest_time'] = time(); $data = transferAPI($data); $a = $img = ''; if ($data['code'] == 0) { foreach ($data['data'] as $k => $d) { $img = $img . ',' . '"' . $d['pic_url'] . '"'; $a = $a . ',' . '"' . $d['link'] . '"'; } $this->view->assign('img', trim($img, ',')); $this->view->assign('a', trim($a, ',')); $this->view->assign('BENNERTIME', BENNERTIME); } }
private function modifyUserPass($userId, $passwd) { $user = core::Singleton('user.dts_user'); $isOrNot = $user->modifyUserPassword($userId, $passwd); unset($user); return $isOrNot; }
private function getSingleList($bid) { $user = core::Singleton('user.borrow_info'); $borrowSingle = $user->getSingleBorrow($bid); unset($user); return $borrowSingle; }
private function isRegisted($mobile) { $user = core::Singleton('user.dts_user'); $isOrNot = $user->is_exist_cell_phone_number($mobile); unset($user); return $isOrNot; }
private function getTotal() { $user = core::Singleton('user.dts_user'); $total = $user->getBorrowTotal(); unset($user); return $total; }
public function getTodayInvest($userId) { $lj = core::Singleton('user.borrow_info'); $result = $lj->getTodayInvest($userId); unset($lj); return $result; }
private function getReceivePlan($userId, $year, $search_month) { $user = core::Singleton('user.receive'); $result = $user->getMyInvest($userId, $year, $search_month); unset($user); return $result; }
private function getPact($bid) { $user = core::Singleton('user.borrow_info'); $bpact = $user->getPact($bid); unset($user); return $bpact; }
private function getAreaInfo($idno) { $user = core::Singleton('user.area'); $result = $user->getArea($idno); unset($user); return $result; }
function _accesstokenAct() { //$weixin = core::Singleton("comm.application.weixin"); $test = core::Singleton('comm.remote.wxcurl'); $test->curl_send(WX_URL_access_token); exit; }
private function getDescription($bid) { $user = core::Singleton('user.borrow_info'); $result = $user->getBorrowDescription($bid); unset($user); return $result; }
public function initialize() { $this->config = core::Singleton('comm.application.config.config'); $this->urlParams = $_GET[$this->paramsName]; $this->prepareParms(); $this->parse(); }
/** * 发送短信 * @return int 操作结果状态码 */ function dahanSMS($mobiles, $msg) { // $error_mobiles[] = '13567012211'; // $error_mobiles[] = '15921743399'; // $error_mobiles[] = '15921741132'; // $error_mobiles[] = '18919344113'; // $error_mobiles[] = '18116341417'; // $error_mobiles[] = '13482492354'; // $error_mobiles[] = '13162894954'; // $error_mobiles[] = '13818164224'; // $error_mobiles[] = '13524552711'; // $error_mobiles[] = '13916866929'; // $error_mobiles[] = '18930056835'; $user = core::Singleton('user.member'); $error_mobiles = $user->getBlackList($bid); unset($user); if (in_array($mobiles, $error_mobiles)) { $response = " 手机号{$mobiles在不通知人名单内}"; return $response; } //发送短信 $message = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><message>" . "<account>" . $this->userName . "</account><password>" . $this->userPass . "</password>" . "<msgid></msgid><phones>" . $mobiles . "</phones><content>" . $msg . "</content><subcode>" . "" . "</subcode><sendtime></sendtime></message>"; try { $response = $this->soap->submit($message); // } catch (SoapFault $soapFault) { file_put_contents('/tmp/sms', date('m-d H:i:s') . " " . print_r($message, true) . "\n", FILE_APPEND); file_put_contents('/tmp/sms', date('m-d H:i:s') . " " . print_r(htmlentities($this->soap->__getLastRequest()), true) . "\n", FILE_APPEND); } //$response = $this->soap->submit($message);// return $response; }
private function getTending($userId) { $user = core::Singleton('user.borrow_info'); $investList = $user->getTending($userId); unset($user); return $investList; }
function socket($host, $id) { $socket =& core::Singleton('comm.remote.Socket'); $msg = "GET /shop/view/{$id} HTTP/1.1\nAccept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\nAccept-Encoding:gzip, deflate\nAccept-Language:zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3\nConnection:keep-alive\nCookie:aQQ_ajkguid=AB96CA53-D062-0EB5-1ED0-08CBA5A3E796; lps=http%3A%2F%2Fshanghai.anjuke.com%2Fshop%2Fview\n%2F1744936%7C; ctid=11; sessid=2A6D3042-6B75-1196-02F0-CD1E2E0267AB; twe=2\nHost:{$host}\nUser-Agent:Mozilla/5.0 (Windows NT 6.1; rv:39.0) Gecko/20100101 Firefox/39.0\r\n"; $msg .= "\r\n"; $response = $socket->sendhttp($msg, $host, 80); return $response; }
private function getBorrower($bid) { $user = core::Singleton('user.borrow_info'); $result = $user->getBorrowerInfo($bid); unset($user); if (isset($result['user_email'])) { //敏感信息不显示 unset($result['user_email']); } return $result; }
public function setUserChannelId($userId, $channelId) { $user = core::Singleton('user.user_push'); $result = $user->setUserChannelId($userId, $channelId); unset($user); if ($result) { return $result; } else { return false; } }
public function runFirst() { $uagent_obj = core::Singleton('comm.helper.uagent_info'); $mobile_client = "http://a.app.qq.com/o/simple.jsp?pkgname=com.cailai.app"; $pc_client = "http://www.cailai.com/borrow/app.html"; if ($uagent_obj->DetectMobileQuick() == $uagent_obj->true) { header('Location: ' . $mobile_client); } else { header('Location: ' . $pc_client); } exit; }
public function login($uname, $upwd) { $user = core::Singleton('user.dts_user'); $userinfo = $user->login($uname, $upwd); unset($user); if ($userinfo) { $session_id = $this->login_type . $userinfo['session_id']; //设置header cookie值 header("Set-Cookie: session_id=" . $session_id . "; expires=" . strftime("%A, %d-%b-%Y %H:%M:%S", time() + 86400) . '; path=/; domain=cailai.com'); //转化成接口所需要的格式 $userinfo2['id'] = (int) $userinfo['id']; $userinfo2['mobile'] = $userinfo['user_name']; $userinfo2['reg_time'] = date('Y-m-d H:i:s', $userinfo['reg_time']); $userinfo2['real_name'] = $userinfo['real_name']; unset($userinfo); return $userinfo2; } return false; }
private function sendsmscode($mobile) { $data['telephone'] = $mobile; $data['cur_time'] = time(); $arr = range(0, 9); $arrs = array_rand($arr, 6); $sendsms = ""; foreach ($arrs as $value) { $smscode .= $value; } $data['telcode'] = $smscode; $user = core::Singleton('user.dts_user'); $admin = $user->addCode($data); unset($user); sendsms($mobile, '欢迎注册财来网,您的注册短信验证码为' . $smscode . ',30分钟内有效!'); if ($admin) { return true; } else { return false; } }
public function _loginAct() { $phone = V('mobile'); $pas = $_POST['pwd']; if (empty($phone) || empty($pas)) { return 0; } $data = array('sname' => 'user.login', 'mobile' => $phone, 'passwd' => $pas); core::Singleton('comm.remote.remote'); $result = remote::send($data); setcookie("version", remote::$session_id, time() + 3600 * 12, '/', 'cailai.com'); $data = json_decode($result, TRUE); if ($data['code'] != 0) { $this->view->assign('tipMsg', $data['msg']); } setcookie("uid", md5(uniqid()) . $data['data']['mobile'], time() + 3600 * 12, '/', 'cailai.com'); if (empty(remote::$session_id)) { $this->view->assign('n', $phone); return 0; } else { skip(); } }
public function run() { core::Singleton('comm.remote.remote'); $this->prepare(); $response_data = $this->get_response(); $is_new_interface = $this->is_new_interface($response_data); if ($is_new_interface == true) { $response_data2 = json_decode($response_data, true); $this->result['code'] = $response_data2['code']; $this->result['msg'] = $response_data2['msg']; $this->result['data'] = $response_data2['data']; unset($response_data2); } else { if ($this->result['code']) { $msg = core::Singleton('api.api_check')->get_msg($this->result['code']); if ($msg) { $this->result['msg'] = $msg; } } $this->result['data'] = $response_data; } unset($response_data); return $this->result; }
public function getDealTotal($userId) { $zw = core::Singleton('user.member_moneylog'); return $zw->getDealTotal($userId); }
/** * 初始化 application 对像 * * @param void * @return void */ public function initialize() { $this->appRoot = dirname($_SERVER['SCRIPT_FILENAME']) . "/"; ini_set('include_path', ini_get('include_path') . _PATH_SEPARATOR . $this->appRoot); @set_magic_quotes_runtime(false); //加了个@,新版本php中废弃了此函数 $this->config = core::Singleton('comm.application.config.config'); require_once 'comm/application/intface/intface.urlparse.php'; require_once 'comm/application/intface/intface.request.php'; $this->params = $this->loadModule($this->config->paramsFix . '/class.params.php', 'params', urlparse); $this->params->initialize(); $this->request = $this->params->getRequest(); require_once 'comm/application/intface/intface.view.php'; $this->view = core::Singleton('comm.application.view.defaultView'); require_once 'comm/application/intface/intface.action.php'; $fileName = sprintf('/class.act.%s.php', $this->request->getAction()); $className = sprintf('act_%s', $this->request->getAction()); $this->action = $this->loadModule($this->config->actionFix . $fileName, $className, action); $this->action->setRequest($this->request); $this->action->setView($this->view); $this->view->setConfig($this->config); $this->view->setRequest($this->request); }
public function get_banner($latest_time) { $banner = core::Singleton('banner.dts_banner'); return $banner->get_banner($latest_time); }
private function getTopBorrow() { $zw = core::Singleton('user.borrow_info'); return $zw->getLastBorrow(); }
<?php require_once dirname(__FILE__) . '/../../www/header.php'; $argv = $_SERVER["argv"]; $run_num = $argv[1] ? $argv[1] : 5000; $agent = core::Singleton("comm.anjuke.agent"); $objDb = core::db()->getConnect('CAILAI'); $sql = "select agent_id from lzh_anjuke_agent order by id desc limit 1"; $res = $objDb->query($sql, 'array'); $agent_id = $res['agent_id'] ? $res['agent_id'] + 1 : 1100000; $run_num = $run_num + $agent_id; while ($agent_id < $run_num) { echo 'agent_id:' . $agent_id; $req = $agent->get_message($agent_id); var_dump($req); $datetime = date('Y-m-d H:i:s', time()); if (is_array($req)) { echo 'success'; $sql = sprintf("insert into lzh_anjuke_agent set name='%s',mobile='%s',shop='%s',agent_id='%s',city='%s',update_time='%s'", $req['name'], $req['phone'], $req['shop'], $agent_id, $req['diqu'], $datetime); $objDb->query($sql); } $agent_id++; }
public function getAllbid($userId) { $zw = core::Singleton('user.borrow_info'); return $zw->getAllbid($userId); }
<?php //header('Access-Control-Allow-Origin:*'); //header('Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept'); //file_put_contents('/tmp/re3',date('H:i:s').': '.print_r(file_get_contents('php://input', 'r'),true). ' '.print_r($_REQUEST,true) . ' '.print_r($_SERVER,true),FILE_APPEND); //file_put_contents('/tmp/re2',date('H:i:s').': '.print_r($_REQUEST,true),FILE_APPEND); //file_put_contents('/tmp/re2',date('H:i:s').': '.print_r($_SERVER,true),FILE_APPEND); // 引入核心文件 require_once dirname(__FILE__) . '/../header.php'; // 引入管理类 $api = core::Singleton('api.api'); $content = $_REQUEST['content']; //json格式 $token = $_REQUEST['token']; /* file_put_contents('D:\test.txt',date('H:i:s').': '.print_r($token,true),FILE_APPEND); exit; $content = '{"pname":"web","sname":"banner.get","latest_time":"2015-04-13 11:12"}'; $token = '36a332242972cadd5c0ee25180b2d4a1'; * * */ if (ini_get("magic_quotes_gpc") == "1") { $content = stripslashes($content); } $result = $api->exec($content, $token); echo $result; //是json格式的