本文整理汇总了PHP中admin::getAccessToken方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::getAccessToken方法的具体用法?PHP admin::getAccessToken怎么用?PHP admin::getAccessToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::getAccessToken方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$user_password = helper::clearText($user_password);
$user_username = helper::escapeText($user_username);
$user_password = helper::escapeText($user_password);
if (helper::getAuthenticityToken() !== $token) {
$error = true;
$error_message = 'Error!';
}
if (!$error) {
$access_data = array();
$admin = new admin($dbo);
$access_data = $admin->signin($user_username, $user_password);
if ($access_data['error'] === false) {
$clientId = 0;
// Desktop version
admin::createAccessToken();
admin::setSession($access_data['accountId'], admin::getAccessToken());
header("Location: /admin/main.php");
} else {
$error = true;
$error_message = 'Incorrect login or password.';
}
}
}
helper::newAuthenticityToken();
$css_files = array("admin.css");
$page_title = APP_TITLE;
include_once $_SERVER['DOCUMENT_ROOT'] . "/common/header.inc.php";
?>
<body style="background-color: transparent; background-image: none">
示例2:
} else {
?>
<div id="page_topbar">
<div class="topbar">
<div class="content">
<a href="/admin/main.php" class="logo"></a>
<div style="float: right">
<a href="/admin/main.php" class="topbar_item">General</a>
<a href="/admin/users.php" class="topbar_item">Users</a>
<a href="/admin/messages_stream.php" class="topbar_item">Messages Stream</a>
<a href="/admin/gifts.php" class="topbar_item">Gifts</a>
<a href="/admin/reports.php" class="topbar_item">Reports</a>
<a href="/admin/photo_reports.php" class="topbar_item">Photo Reports</a>
<a href="/admin/admob.php" class="topbar_item">AdMob</a>
<a href="/admin/gcm.php" class="topbar_item">GCM</a>
<a href="/admin/support.php" class="topbar_item">Support</a>
<a href="/admin/settings.php" class="topbar_item">Settings</a>
<a href="/admin/logout.php/?access_token=<?php
echo admin::getAccessToken();
?>
&continue=/" class="topbar_item">Logout</a>
</div>
</div>
</div>
</div>
<?php
}
示例3: header
<?php
/*!
* ifsoft.co.uk engine v1.0
*
* http://ifsoft.com.ua, http://ifsoft.co.uk
* qascript@ifsoft.co.uk
*
* Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
*/
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
header("Location: /admin/login.php");
}
$stats = new stats($dbo);
$admin = new admin($dbo);
$msgId = 0;
$msgInfo = array();
if (isset($_GET['id'])) {
$msgId = isset($_GET['id']) ? $_GET['id'] : 0;
$accessToken = isset($_GET['access_token']) ? $_GET['access_token'] : 0;
$act = isset($_GET['act']) ? $_GET['act'] : '';
$msgId = helper::clearInt($msgId);
if ($accessToken === admin::getAccessToken() && !APP_DEMO) {
$messages = new messages($dbo);
$messages->remove($msgId);
}
}
示例4: draw
function draw($msg, $helper = null)
{
$msg['message'] = helper::processMsgText($msg['message']);
$fromUserPhoto = "/img/profile_default_photo.png";
if (strlen($msg['fromUserPhotoUrl']) != 0) {
$fromUserPhoto = $msg['fromUserPhotoUrl'];
}
?>
<div class="post post_item" data-id="<?php
echo $msg['id'];
?>
">
<a class="profile_cont" href="/admin/profile.php/?id<?php
echo $msg['fromUserId'];
?>
">
<img src="<?php
echo $fromUserPhoto;
?>
">
</a>
<div class="post_content">
<div class="action_remove" onclick="Message.remove('<?php
echo $msg['id'];
?>
', '<?php
echo admin::getAccessToken();
?>
'); return false;"></div>
<div class="post_title">
<a href="/admin/profile.php/?id=<?php
echo $msg['fromUserId'];
?>
">
<span class="post_fullname"><?php
echo $msg['fromUserFullname'];
?>
</span>
<s>@</s><b class="post_username"><?php
echo $msg['fromUserUsername'];
?>
</b>
</a>
</div>
<div class="post_data">
<?php
echo $msg['message'];
?>
</div>
<?php
if (strlen($msg['imgUrl'])) {
?>
<div class="post_img">
<img src="<?php
echo $msg['imgUrl'];
?>
"/>
</div>
<?php
}
?>
<div class="post_footer">
<?php
$time = new language(NULL, "en");
?>
<a class="time" href="javascript:void(0);"><?php
echo $time->timeAgo($msg['createAt']);
?>
</a>
</div>
</div>
</div>
<?php
}
示例5: header
<?php
/*!
* ifsoft.co.uk engine v1.0
*
* http://ifsoft.com.ua, http://ifsoft.co.uk
* qascript@ifsoft.co.uk
*
* Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
*/
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
header('Location: /');
}
if (isset($_GET['access_token'])) {
$accessToken = isset($_GET['access_token']) ? $_GET['access_token'] : '';
$continue = isset($_GET['continue']) ? $_GET['continue'] : '/';
if (admin::getAccessToken() === $accessToken) {
admin::unsetSession();
header('Location: ' . $continue);
exit;
}
}
header('Location: /');
示例6: drawResultTable
function drawResultTable($result)
{
?>
<table class="admin_table">
<tr>
<th class="text-left">Id</th>
<th class="text-left"From account</th>
<th class="text-left">Email</th>
<th class="text-left">Subject</th>
<th class="text-left">Text</th>
<th class="text-left">Date</th>
<th>Action</th>
</tr>
<?php
foreach ($result['tickets'] as $key => $value) {
?>
<tr>
<td class="text-left"><?php
echo $value['id'];
?>
</td>
<td class="text-left"><?php
if ($value['accountId'] != 0) {
echo "<a href=\"/admin/profile.php/?id={$value['accountId']}\">Profile [Id = {$value['accountId']}]</a>";
} else {
echo "-";
}
?>
</td>
<td class="text-left"><?php
echo $value['email'];
?>
</a></td>
<td class="text-left" style="word-break: break-all;"><?php
echo $value['subject'];
?>
</td>
<td class="text-left" style="word-break: break-all;"><?php
echo $value['text'];
?>
</td>
<td class="text-left" style="white-space: nowrap;"><?php
echo date("Y-m-d H:i:s", $value['createAt']);
?>
</td>
<td><a href="/admin/support.php/?ticketId=<?php
echo $value['id'];
?>
&act=delete&access_token=<?php
echo admin::getAccessToken();
?>
">Delete</a></td>
</tr>
<?php
}
?>
</table>
<?php
}