当前位置: 首页>>代码示例>>PHP>>正文


PHP member类代码示例

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


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


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