本文整理汇总了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();
}
示例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;
}
}
示例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);
}
}
}
}
示例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();
}
示例5: domanage
function domanage()
{
member::MP("menu_models_manage");
$rs = model::data();
$_count = count($rs);
include admincp::tpl();
}
示例6: domanage
function domanage()
{
member::MP("menu_template_manage");
$dir = trim($_GET["dir"]);
$L = FS::folder($dir, "templates", "");
include admincp::tpl();
}
示例7: domanage
function domanage()
{
member::MP("menu_plugin_manage");
$plugins = $this->iCMS->getCache('system/plugins');
$rs = plugin::doList();
include admincp::tpl();
}
示例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());
}
示例9: domanage
function domanage()
{
member::MP("menu_group_manage");
include iPATH . 'include/group.class.php';
$group = new group();
$type = $_GET['type'];
include admincp::tpl();
}
示例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');
}
示例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");
}
示例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');
}
示例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');
}
示例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)));
}
}
示例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');
}