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


PHP spClass函數代碼示例

本文整理匯總了PHP中spClass函數的典型用法代碼示例。如果您正苦於以下問題:PHP spClass函數的具體用法?PHP spClass怎麽用?PHP spClass使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: agree

 public function agree($apply_id)
 {
     $conditions['apply_id'] = $apply_id;
     $apply = $this->find_one($conditions);
     if ($apply) {
         $this->update(array('apply_id' => $apply_id), array('status' => 1));
         $ptx_user = spClass("ptx_user");
         if ($apply['apply_type'] == 1) {
             $ptx_user->update_staruser($apply['user_id'], 1);
             $ptx_staruser = spClass("ptx_staruser");
             $data['user_id'] = $apply['user_id'];
             $data['medal_id'] = $apply['medal_id'];
             $data['star_reason'] = $apply['message_txt'];
             $ptx_staruser->add_one($data);
             $ptx_staruser->update_staruser_cache();
         } elseif ($apply['apply_type'] == 2) {
             $data['user_id'] = $apply['user_id'];
             $data['store_category_id'] = $apply['store_category_id'];
             $data['shop_desc'] = $apply['message_txt'];
             $ptx_goodshop = spClass('ptx_goodshop');
             $ptx_goodshop->add_one($data);
             $ptx_user->update_shopuser($apply['user_id'], 1);
         }
         $this->deleteByPk($apply_id);
     }
     return;
 }
開發者ID:httvncoder,項目名稱:151722441,代碼行數:27,代碼來源:ptx_apply.php

示例2: logout

 function logout()
 {
     unset($_SESSION['username']);
     unset($_SESSION['password']);
     spClass('spAcl')->set("");
     $this->display("login.htm");
     // 顯示模板,這裏使用的模板是根目錄/tpl/green/index.html。
 }
開發者ID:wateronface,項目名稱:php,代碼行數:8,代碼來源:main.php

示例3: updatesave

 function updatesave()
 {
     $i_order = spClass("i_order");
     $param = $this->spArgs();
     $conditions = array('id' => $param['chk_list'][0]);
     $this->results = $i_order->find($conditions);
     $this->display("i_order_updateform.htm");
     // 顯示模板
 }
開發者ID:wateronface,項目名稱:php,代碼行數:9,代碼來源:i_pay_action.php

示例4: index

 /** @brief 顯示首頁 */
 function index()
 {
     if (!$this->visitor->is_login()) {
         $this->login();
     } else {
         $members = spClass('UserModel')->findAll(array('store_id' => $this->visitor['user']['store_id']));
         $this->member = $members;
         $this->display('index.html');
     }
 }
開發者ID:eon-hong,項目名稱:anypay,代碼行數:11,代碼來源:main.php

示例5: updatesave

 function updatesave()
 {
     $model = spClass("product");
     $param = $this->spArgs();
     $conditions = array('id' => $param['id']);
     $model->update($conditions, $param);
     //		echo($model->dumpSql());
     $this->results = spUrl("product_action", "index");
     $this->display("ok.htm");
     // 顯示模板
 }
開發者ID:wateronface,項目名稱:php,代碼行數:11,代碼來源:product_action.php

示例6: userlogin

 public function userlogin($uname, $upass)
 {
     $conditions = array('uname' => $uname, 'upass' => $upass);
     if ($result = $this->find($conditions)) {
         spClass('FeiAcl')->set($result['acl']);
         $_SESSION["userinfo"] = $result;
         return true;
     } else {
         return false;
     }
 }
開發者ID:daolei,項目名稱:grw,代碼行數:11,代碼來源:model_user.php

示例7: addfuncs

 /**
  * 注冊已掛靠的視圖函數
  */
 public function addfuncs()
 {
     if (is_array($GLOBALS['G_SP']["view_registered_functions"]) && method_exists($this->engine, 'register_function')) {
         foreach ($GLOBALS['G_SP']["view_registered_functions"] as $alias => $func) {
             if (is_array($func) && !is_object($func[0])) {
                 $func = array(spClass($func[0]), $func[1]);
             }
             $this->engine->register_function($alias, $func);
         }
     }
 }
開發者ID:eon-hong,項目名稱:anypay,代碼行數:14,代碼來源:spView.php

示例8: addfuncs

 /**
  * 注冊視圖函數
  */
 public function addfuncs()
 {
     if (is_array($GLOBALS['G_SP']["view_registered_functions"])) {
         foreach ($GLOBALS['G_SP']["view_registered_functions"] as $alias => $func) {
             if (is_array($func) && !is_object($func[0])) {
                 $func = array(spClass($func[0]), $func[1]);
             }
             $this->engine->registerPlugin("function", $alias, $func);
             unset($GLOBALS['G_SP']["view_registered_functions"][$alias]);
         }
     }
 }
開發者ID:ngsoqia,項目名稱:soupian,代碼行數:15,代碼來源:spView.php

示例9: verify

 public function verify($var)
 {
     if (empty($var)) {
         return false;
     }
     $text = spClass('spSession')->get('vcode');
     if ($var != $text) {
         return false;
     } else {
         return true;
     }
 }
開發者ID:eon-hong,項目名稱:anypay,代碼行數:12,代碼來源:spVerifyCode.php

示例10: login

 public function login($username, $password)
 {
     $conditions = array('username' => $username, 'password' => $password);
     if ($result = $this->find($conditions)) {
         spClass('spAcl')->set($result['acl_name']);
         $result['password'] = md5($result['password']);
         $_SESSION["user"] = $result;
         return true;
     } else {
         return false;
     }
 }
開發者ID:hfutxqd,項目名稱:keding_website,代碼行數:12,代碼來源:user.php

示例11: user

 public function user()
 {
     $this->parameter_need('sname');
     $ptx_user = spClass('ptx_user');
     $user = $ptx_user->find(array('domain' => $this->sname), ' ptx_user.user_id ');
     $this->user_id = $user['user_id'];
     $act = $this->spArgs("act");
     if (in_array($act, array('focus', 'shares', 'album', 'favorite_share', 'following', 'fans', 'timeline', 'forumline'))) {
         eval("\$this->{$act}();");
     } else {
         $this->timeline();
     }
 }
開發者ID:httvncoder,項目名稱:151722441,代碼行數:13,代碼來源:pub.php

示例12: action

 public function action()
 {
     $user = spClass("users");
     $userAppId = $this->spArgs("userAppId", 123);
     $sql = "select * from users where users.userAppId=" . $userAppId;
     $result = $user->findSql($sql);
     // 執行查找
     //dump($result);                                                        //輸出數組
     $json_Str = json_encode($result);
     if ($json_Str != "false") {
         echo $json_Str;
     }
 }
開發者ID:as3long,項目名稱:as3long,代碼行數:13,代碼來源:dbTest.php

示例13: getUserSkin

 private function getUserSkin($bid = 0)
 {
     if ($this->spArgs('domain') != 'home' && $this->spArgs('domain') != '') {
         $rs = spClass('db_theme')->getByDomain($this->spArgs('domain'));
     } elseif ($this->spArgs('uid') != '') {
         $rs = spClass('db_theme')->getByUid($this->spArgs('uid'));
     } else {
         $rs = spClass('db_theme')->getByBid($this->spArgs('bid'));
     }
     if (!is_array($rs)) {
         err404('您訪問的用戶不存在,用戶可能已經更改了個性域名');
     }
     $skin = spClass('db_theme')->find(array('uid' => $rs['uid']));
     $this->user_data = $rs;
     $this->user_skin = $skin;
     //將數據賦值給全局變量
 }
開發者ID:as3long,項目名稱:as3long,代碼行數:17,代碼來源:userblog.php

示例14: alert

 private function alert()
 {
     $this->ajax_check_login();
     $ptx_event_log = spClass('ptx_event_log');
     $conditions['to_user_id'] = $this->current_user['user_id'];
     $conditions['event_type'] = 'alert';
     $conditions['is_read'] = '0';
     $message_count = $ptx_event_log->findCount($conditions);
     if ($message_count > 99) {
         $message_html = "<em>N</em>";
     } elseif ($message_count) {
         $message_html = "<em>{$message_count}</em>";
     } else {
         $message_html = "";
     }
     $this->ajax_success_response(array('message_html' => $message_html), 'alert');
 }
開發者ID:httvncoder,項目名稱:151722441,代碼行數:17,代碼來源:ajaxmessage.php

示例15: __call

 /**
  * 魔術函數  通過函數名來調用不同的緩存驅動類
  */
 public function __call($name, $args)
 {
     $driverClass = 'access_driver_' . $name;
     if (!class_exists($driverClass)) {
         spError('spAccess無法找到名為{$name}緩存驅動程序,請檢查!');
     }
     extract(array_pop($args));
     if ('w' == $method) {
         // 寫數據
         $life_time = -1 == $life_time ? '300000000' : $life_time;
         return spClass($driverClass)->set($name, serialize($value), $life_time);
     } elseif ('c' == $method) {
         // 清除數據
         return spClass($driverClass)->del($name);
     } else {
         // 讀數據
         return unserialize(spClass($driverClass)->get($name));
     }
 }
開發者ID:wjgjb1109,項目名稱:huicms,代碼行數:22,代碼來源:spAccessCache.php


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