• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP member类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中member的典型用法代码示例。如果您正苦于以下问题:PHP member类的具体用法?PHP member怎么用?PHP member使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了member类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: logout

 /**
  */
 public function logout()
 {
     if ($access_token = $this->input['access_token']) {
         $data['access_token'] = $access_token;
     } else {
         $this->errorOutput(NO_ACCESS_TOKEN);
     }
     $Members = new members();
     $device_token = $Members->check_device_token(trim($this->input['device_token']));
     $udid = $Members->check_udid(trim($this->input['uuid']));
     if ($device_token === 0) {
         $this->errorOutput(ERROR_DEVICE_TOKEN);
     }
     if ($udid === 0) {
         $this->errorOutput(ERROR_UDID);
     }
     $auth = new auth();
     $logoutInfo = $auth->logout($data);
     //会员痕迹
     $member_trace_data = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'content_id' => $logoutInfo['user_id'], 'title' => $logoutInfo['user_name'], 'type' => 'logout', 'op_type' => '退出', 'appid' => $logoutInfo['appid'], 'appname' => $logoutInfo['display_name'], 'create_time' => TIMENOW, 'ip' => hg_getip(), 'device_token' => $device_token, 'udid' => $udid);
     $mMember = new member();
     $mMember->member_trace_create($member_trace_data);
     $_logoutInfo = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'is_member' => $logoutInfo['is_member'], 'logout' => $logoutInfo['logout']);
     $this->addItem($_logoutInfo);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:28,代码来源:logout.php


示例2: auth_user

 /**
  * This method will authenticate the present user. If the query returns one
  * row, the session is still valid. We then set the username and access
  * level and return the $user array.
  * 
  * If the query does not return a row, we return "false".
  * 
  * @return true if session is valid
  * @return false if session is invalid
  */
 public function auth_user()
 {
     // create a new member object and figure out what groups we're in
     $user = new member($this->session['user']);
     $this->groups = $user->get_groups_id();
     // query to check if there's a session_id <-> user_id combination in line with the cookie data
     $sql = "SELECT u.user_id, u.username";
     $sql = $sql . " FROM " . PHPBB_PREFIX . "_sessions s, " . PHPBB_PREFIX . "_users u ";
     $sql = $sql . " WHERE s.session_id = '" . $this->session['id'] . "'";
     $sql = $sql . " AND u.user_id = '" . $this->session['user'] . "'";
     $sql = $sql . " AND u.user_id = s.session_user_id";
     /*
     $sql = "SELECT u.user_id, u.username, e.tools_access, c.pf_p_nick, c.pf_phone";
     $sql = $sql . " FROM " . PHPBB_PREFIX . "sessions s, " . PHPBB_PREFIX . "users u, " . EVO_PREFIX . "users e, " . PHPBB_PREFIX . "profile_fields_data c";
     $sql = $sql . "	WHERE s.session_id = '" . $this -> session['id'] . "'";
     $sql = $sql . "	AND u.user_id = " . (int) $this -> session['user'];
     $sql = $sql . " AND u.user_id = s.session_user_id";
     $sql = $sql . "	AND u.user_id = e.user_id";
     $sql = $sql . " AND c.user_id = u.user_id;";
     */
     if ($result = $this->db->query($sql)) {
         // we found exactly one row, so the session seems valid
         if ($result->num_rows == 1 and in_array(TOOLS_GROUP, $this->groups)) {
             $row = $result->fetch_object();
             $this->my_username = $row->username;
             return true;
             // we found none or more than 1 row, so either the session is invalid or something is fishy
         } else {
             return false;
         }
     } else {
         echo $this->db->error;
         exit;
     }
 }
开发者ID:bradz,项目名称:bradzevo2,代码行数:45,代码来源:user.class.php


示例3: checkIdentifierUser

 public function checkIdentifierUser()
 {
     $member = new member();
     foreach ($this->getIusidS() as $v) {
         if ($identifier = $this->getIdentifierForIusid($v)) {
             if ($member->getMemberIdForIdentifier($identifier)) {
                 throw new Exception(IDENTIFIER_SYSTEM_NOT_DEL, 200);
             }
         }
     }
 }
开发者ID:h3len,项目名称:Project,代码行数:11,代码来源:identifierUserSystem.class.php


示例4: main

 public function main()
 {
     global $_G, $app;
     if (isset($_GET[code]) || isset($_GET[state])) {
         include_once libfile('action/member');
         $mb = new member();
         $mb->main();
         return false;
     }
     seo($_G['setting'][seo_title], $_G['setting'][seo_keywords], $_G['setting'][seo_description], false);
     $this->show();
 }
开发者ID:lqlstudio,项目名称:ttae_open,代码行数:12,代码来源:index.action.php


示例5: domanage

 function domanage()
 {
     member::MP("menu_models_manage");
     $rs = model::data();
     $_count = count($rs);
     include admincp::tpl();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:7,代码来源:models.mo.php


示例6: domanage

 function domanage()
 {
     member::MP("menu_template_manage");
     $dir = trim($_GET["dir"]);
     $L = FS::folder($dir, "templates", "");
     include admincp::tpl();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:7,代码来源:templates.mo.php


示例7: domanage

 function domanage()
 {
     member::MP("menu_plugin_manage");
     $plugins = $this->iCMS->getCache('system/plugins');
     $rs = plugin::doList();
     include admincp::tpl();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:7,代码来源:plugins.mo.php


示例8: process_mode_default

 /**
  * The default process
  *
  * @since ADD MVC 0.0
  */
 public function process_mode_default()
 {
     $this->view()->assign('current_controller', add::current_controller_class());
     $this->view()->assign('current_view', $this->view_filepath());
     $this->view()->assign('utc_timestamp', time());
     $this->view()->assign('member', member::current_logged_in());
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:12,代码来源:ctrl_page_index.class.php


示例9: domanage

 function domanage()
 {
     member::MP("menu_group_manage");
     include iPATH . 'include/group.class.php';
     $group = new group();
     $type = $_GET['type'];
     include admincp::tpl();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:8,代码来源:groups.mo.php


示例10: doDefault

 function doDefault()
 {
     member::MP("menu_filter");
     $cache = $this->iCMS->getCache(array('system/word.filter', 'system/word.disable'));
     foreach ((array) $cache['system/word.filter'] as $k => $val) {
         $filterArray[$k] = implode("=", (array) $val);
     }
     include admincp::tpl('filter');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:9,代码来源:filter.mo.php


示例11: doedit

 function doedit()
 {
     member::MP("menu_account_edit");
     include iPATH . 'include/group.class.php';
     $group = new group('a');
     $rs = iCMS_DB::getRow("SELECT * FROM `#iCMS@__members` WHERE `uid`='" . intval($_GET['uid']) . "'");
     $info = unserialize($rs->info);
     include admincp::tpl("account.edit");
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:9,代码来源:account.mo.php


示例12: dodefault

 function dodefault()
 {
     member::MP(array("menu_index_link", "menu_link"));
     $maxperpage = 60;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__links`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, '个链接');
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__links` ORDER BY `logo`, `orderNum` ASC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('link');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:10,代码来源:link.mo.php


示例13: domanage

 function domanage()
 {
     member::MP("menu_user_manage");
     $maxperpage = 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__members`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "位会员");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__members` where `type`='0' order by uid DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('user.manage');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:10,代码来源:user.mo.php


示例14: getDiscount

 function getDiscount($rowCoupon, $memberid)
 {
     global $DB;
     include_once MODELS . '/member_model.php';
     $objMember = new member();
     $InvRow = $this->getInvoice();
     if ($InvRow->id > 0) {
         $row = $objMember->getMembers($memberid);
         if ($rowCoupon->discount_price > 0) {
             $discount = $rowCoupon->discount_price;
         } else {
             $discount = $row->amount_paid * $rowCoupon->discount_perc / 100;
         }
         //$discount = (($row->amount_paid * $rowCoupon->discount) / 100);
         $finalAmount = $row->amount_paid - $discount;
         $_SESSION['register']['coupon_code'] = $rowCoupon->coupon_code;
         return json_encode(array('discount' => '$' . number_format($discount, 2), 'final' => '$' . number_format($finalAmount, 2), 'error' => '', 'success' => ' Coupon Discount HKD $' . number_format($discount, 2)));
     }
 }
开发者ID:business-expert,项目名称:prnsc,代码行数:19,代码来源:invoice.php


示例15: dodefault

 function dodefault()
 {
     member::MP("menu_search");
     $maxperpage = 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__search`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个关键字");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__search` order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('search');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:10,代码来源:search.mo.php


示例16: dodefault

 function dodefault()
 {
     member::MP(array("menu_index_advertise", "menu_advertise"));
     $maxperpage = 30;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__advertise`") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个广告");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__advertise` order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl("advertise");
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:10,代码来源:advertise.mo.php


示例17: dodefault

 function dodefault()
 {
     global $firstcount, $pagenav;
     member::MP("menu_message");
     $_GET['keywords'] && ($sql[] = " CONCAT(author,email,url,ip) REGEXP '{$_GET['keywords']}'");
     isset($_GET['status']) && ($sql[] = " `status`='" . $_GET['status'] . "'");
     $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : '';
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__plugins_message` {$where} order by id DESC");
     page($total, $maxperpage, "条留言");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__plugins_message` {$where} order by id DESC LIMIT {$firstcount},{$maxperpage}");
     $_count = count($rs);
     include plugin::acptpl();
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:14,代码来源:message.mo.php


示例18: dodefault

 function dodefault()
 {
     member::MP("menu_keywords");
     $_GET['keywords'] && ($sql[] = " `keyword` REGEXP '{$_GET['keywords']}'");
     $_GET['replace'] && ($sql[] = " `replace` REGEXP '{$_GET['replace']}'");
     isset($_GET['status']) && $_GET['status'] != '-1' && ($sql[] = " `status`='" . $_GET['status'] . "'");
     $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : '';
     $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20;
     $total = $page == 1 || empty($_GET['rowNum']) ? iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__keywords` {$where}") : (int) $_GET['rowNum'];
     page($total, $maxperpage, "个关键字");
     $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__keywords` {$where} order by id DESC LIMIT {$this->firstcount},{$maxperpage}");
     $_count = count($rs);
     include admincp::tpl('keywords');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:14,代码来源:keywords.mo.php


示例19: testCreateHasMeta

 public function testCreateHasMeta()
 {
     $data['member_lv']['member_group_id'] = 1;
     $data['pam_account']['login_name'] = 'cool' . time();
     $data['pam_account']['login_password'] = 'shopex';
     $data['pam_account']['login_password'] = md5(trim($data['account']['login_password']));
     $data['pam_account']['account_type'] = 'member';
     $data['pam_account']['createtime'] = time();
     $data['advance']['total'] = 0.0;
     $data['score']['total'] = 0.0;
     $data['reg_ip'] = base_request::get_remote_addr();
     $data['regtime'] = time();
     $data['contact']['email'] = '[email protected]';
     $data['contact']['qq'] = '5555555';
     $this->model->save($data);
     self::$id = $data['member_id'];
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:17,代码来源:member.php


示例20: process_mode_edit

 /**
  * Mode - edit
  *
  */
 public function process_mode_edit($gpc)
 {
     member::require_logged_in();
     extract($gpc);
     # see session_user and i_auth_entity
     $member = member::current_logged_in();
     # $name from $gpc['name']
     $member->name = $name;
     if ($password) {
         if ($password == $confirm_password) {
             $member->password = $password;
         } else {
             throw new e_user_input("Password mismatched");
         }
     } else {
         # do nothing if password is not filled
     }
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:22,代码来源:ctrl_page_member.class.php



注:本文中的member类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP menu类代码示例发布时间:2022-05-23
下一篇:
PHP memBuff类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap