當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Sys::S方法代碼示例

本文整理匯總了PHP中Sys::S方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sys::S方法的具體用法?PHP Sys::S怎麽用?PHP Sys::S使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sys的用法示例。


在下文中一共展示了Sys::S方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: verify

 static function verify()
 {
     $data = array('uname' => array(null, 'string', '', '用戶名為空'), 'password' => array(null, 'length', array(4, 16), '密碼錯誤'), 'checkcode' => array(null, 'string', '', '驗證碼為空'));
     Sys::S('core.Verify.Input');
     $data = Input::dataFilter($data, 'post');
     if (!isset($_SESSION['verify_code']) || strtoupper($data['checkcode']) != $_SESSION['verify_code']) {
         Error::halt(self::WRONG_CHECK_CODE, '驗證碼錯誤!');
     }
     $oUcenterMember = Sys::D('UcenterMember');
     $loginStatus = UcenterMemberModel::login($data['uname'], $data['password']);
     if ($loginStatus >= 10) {
         if ($loginStatus == 10) {
             Error::halt(UcenterMemberModel::LOGIN_SUCCESS, array('msg' => '登錄成功', 'redirect' => DOMAIN . 'Index_index.jsp'));
         } else {
             if ($loginStatus == UcenterMemberModel::ACCOUNT_LOCKED) {
                 Error::halt($loginStatus, '賬號已被鎖定!');
             } else {
                 if ($loginStatus == UcenterMemberModel::ACCOUNT_DISABLED) {
                     Error::halt($loginStatus, '賬號無效');
                 } else {
                     Error::halt($loginStatus, '用戶名或密碼錯誤');
                 }
             }
         }
     } else {
         $msg = $loginStatus <= 0 ? '您的賬號已被鎖定' : '登錄失敗,您還有' . $loginStatus . '次機會登錄!';
         Error::halt($loginStatus, $msg);
     }
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:29,代碼來源:LoginAjax.class.php

示例2: index

 static function index()
 {
     Sys::D('StoreVisitStatic');
     //        StoreVisitStaticModel::newAccessNum(1);
     //        $accessNum=StoreVisitStaticModel::getVisitedNum(1);
     //        Sys::D('StoreOrderStatic');
     //        $num= StoreOrderStaticModel::getDateOrderNum(1,'20150819');
     //
     //        var_dump($num);
     //        Sys::D('SysMessage');
     //        $msgData=SysMessageModel::getMsgList();
     //        Sys::D('UserAddress');
     //
     //        UserAddressModel::newAddress(1,'bee','18224087281','成都市高新區天府軟件園D區6棟一樓232');
     //        UserAddressModel::disabledAddress(1);
     //
     //        $data= UserAddressModel::getList(1);
     //
     //        var_dump($data);
     //        Sys::D('AreaLnglat');
     //        $data= AreaLnglatModel::getLngLatByCode('340403');
     //        $data=AreaLnglatModel::getInfoByCode('510100');
     //        $address=AreaLnglatModel::decorateAddress('510100','510100','詳細地址');
     //        var_dump($address);
     Sys::S('core.PhpExcel.PHPExcel.php');
     PHPExcel::init();
     $PHPExcel = PHPExcel::load();
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:28,代碼來源:TestAction.class.php

示例3: add

 static function add($user_id, $store_id, $goodsData = array(), $receiveData = array(), $remark = '')
 {
     Sys::D('OrderDateStatic');
     Sys::S('core.SerialNumber.SerialNumber');
     $date = date('Ymd', NOW);
     OrderDateStaticModel::sync($date);
     $curDayMaxId = OrderDateStaticModel::getOrderId($date);
     $orderNum = SerialNumber::orderNum(self::BUSINESS_NORMAL, $curDayMaxId);
     $totalPrice = self::saveGoodsInfo($goodsData, $orderNum);
     /*訂單基本信息*/
     Sys::D('OrderBaseinfo');
     OrderBaseinfoModel::addOrder($user_id, $store_id, $orderNum, $totalPrice);
     /*同步店鋪訂單統計信息*/
     Sys::D('StoreOrderStatic');
     StoreOrderStaticModel::sync($store_id, $orderNum, $date);
     /*同步派送信息*/
     Sys::D('OrderDelivery');
     isset($receiveData['zipCode']) || ($receiveData['zipCode'] = '');
     OrderDeliveryModel::sync($orderNum, $receiveData['username'], $receiveData['tel'], $receiveData['address'], $receiveData['zipCode']);
     /*備注*/
     if ($remark) {
         Sys::D('OrderRemark');
         OrderRemarkModel::sync($orderNum, $remark);
     }
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:25,代碼來源:OrderModel.class.php

示例4: index

 static function index()
 {
     $treeData = array(array('id' => 1, 'pid' => 0, 'name' => 'bee1', 'age' => '12', 'href' => 'javascript:;', 'html' => 'test1', 'icon' => 'fa fa-home'), array('id' => 2, 'pid' => 1, 'name' => 'bee2', 'age' => '13', 'href' => 'javascript:;', 'html' => 'test2', 'icon' => 'fa fa-home'), array('id' => 3, 'pid' => 2, 'name' => 'bee3', 'age' => '14', 'href' => 'javascript:;', 'html' => 'test3', 'icon' => 'fa fa-home'), array('id' => 4, 'pid' => 1, 'name' => 'bee4', 'age' => '15', 'href' => 'javascript:;', 'html' => 'test4', 'icon' => 'fa fa-home'), array('id' => 8, 'pid' => 2, 'name' => 'bee8', 'age' => '16', 'href' => 'javascript:;', 'html' => 'test5', 'icon' => 'fa fa-home'), array('id' => 6, 'pid' => 4, 'name' => 'bee6', 'age' => '17', 'href' => 'javascript:;', 'html' => 'test6', 'icon' => 'fa fa-home'), array('id' => 7, 'pid' => 1, 'name' => 'bee7', 'age' => '18', 'href' => 'javascript:;', 'html' => 'test7', 'icon' => 'fa fa-home'));
     Sys::S('core.Html5.Menu.LeftMenu');
     $data = LeftMenu::getMenu($treeData, 'id', 'pid', 'href', 'html', 'icon');
     View::assign('userinfo', $_SESSION['userinfo']);
     View::assign('leftMenu', $data);
     View::display();
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:9,代碼來源:IndexAction.class.php

示例5: log

 public static function log($username, $psd, $ip = '')
 {
     if (empty($ip)) {
         Sys::S('core.Server.Ip');
         $ip = Ip::get_client_ip();
     }
     $data = array('username' => addslashes($username), 'psd' => addslashes($psd), 'ip' => bindec(decbin(ip2long($ip))), 'record_time' => NOW);
     return Sys::M(self::$trueTableName)->insert($data);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:9,代碼來源:LoginFailLogModel.class.php

示例6: loginSuccess

 private static function loginSuccess($userId, $ip = '')
 {
     if (empty($ip)) {
         Sys::S('core.Server.Ip');
         $ip = Ip::get_client_ip();
     }
     $intIp = Ip::getInt($ip);
     $data = array('last_login_ip' => array($intIp, 'int'), 'last_login_time' => array(NOW, 'int'), 'login_err_times' => array(0, 'int'));
     return Sys::M(self::$trueTableName)->update($data, '`id`=' . $userId);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:10,代碼來源:UcenterMemberModel.class.php

示例7: getMenu

 static function getMenu($data, $k_id, $k_pid, $k_href, $k_html, $k_icon = 'k_icon')
 {
     Sys::S('Tree.Tree');
     $data = Tree::getTreeData($data, $k_id, $k_pid);
     self::$k_id = $k_id;
     self::$k_pid = $k_pid;
     self::$k_href = $k_href;
     self::$k_html = $k_html;
     self::$k_icon = $k_icon;
     return self::decorateData($data);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:11,代碼來源:LeftMenu.class.php

示例8: modifyPassword

 public function modifyPassword()
 {
     Sys::S('core.Verify.Input');
     $data = array('src_password' => array(null, 'string', '', '原密碼不能為空'), 'new_password' => array(null, 'string', '', '新密碼不能為空'));
     $data = Input::dataFilter($data, 'post');
     if (md5($data['src_password']) != $_SESSION['userinfo']['password']) {
         Error::halt(FAIL, '原密碼不正確');
     } else {
         if ($data['src_password'] == $data['new_password']) {
             Error::halt(FAIL, '新密碼不能與原密碼一致');
         } else {
             Sys::D('UcenterMember');
             UcenterMemberModel::savePassword($_SESSION['userinfo']['id'], $data['new_password']);
             Error::halt(SUCCESS, '操作成功');
         }
     }
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:17,代碼來源:UcenterMemberAjax.class.php

示例9: jsonReturn

 private static function jsonReturn($msgCode, $msg, $url = '')
 {
     Sys::S('core.Return.JsonReturn');
     JsonReturn::output($msgCode, $msg, $url);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:5,代碼來源:Error.class.php

示例10: parseUrl

 public static function parseUrl($url = '')
 {
     empty($url) && ($uri = $_SERVER['REQUEST_URI']);
     Sys::S('core.Url.Uri');
     Uri::setParam(array('m', 'a'), array('pg', 'order'));
     self::$urlTpl = Uri::toPageUriTpl($_SERVER['REQUEST_URI']);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:7,代碼來源:Table.class.php

示例11: errorHandle

 static function errorHandle($data)
 {
     if (defined('AJAX_REQUEST') && AJAX_REQUEST == 1) {
         Exception::redirect('error', $data, 5);
     } else {
         $ret = Sys::S('core.JsonReturn');
         JsonReturn::output(FAIL, $data);
     }
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:9,代碼來源:InputFilter.class.php

示例12: imgCheckcode

 static function imgCheckcode()
 {
     Sys::S('core.VerifyCode.VerifyCode');
     VerifyCode::getCode(6);
 }
開發者ID:beelibrary820145,項目名稱:tanxiongfeng,代碼行數:5,代碼來源:CheckcodeAction.class.php


注:本文中的Sys::S方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。