当前位置: 首页>>代码示例>>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;未经允许,请勿转载。