本文整理汇总了PHP中AUTH::require_user方法的典型用法代码示例。如果您正苦于以下问题:PHP AUTH::require_user方法的具体用法?PHP AUTH::require_user怎么用?PHP AUTH::require_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AUTH
的用法示例。
在下文中一共展示了AUTH::require_user方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
<?php
//with php redirect them to the #top automatically everytime
include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
AUTH::require_user();
AUTH::require_valid_app_key('stats202', $_SESSION['user_api_key'], $_SESSION['user_stats202_app_key']);
header("Content-type: application/octet-stream");
# replace excelfile.xls with whatever you want the filename to default to
header("Content-Disposition: attachment; filename=Stats202-Stats-" . time() . ".xls");
header("Pragma: public");
//header("Expires: 0");
//get the dates for this users' preferences
$dates = userPrefDate();
//build the get query for the offers202 restful api
$get = array();
$get['apiKey'] = $_SESSION['user_api_key'];
$get['stats202AppKey'] = $_SESSION['user_stats202_app_key'];
$get['dateFrom'] = $dates['from_date'];
$get['dateTo'] = $dates['to_date'];
if ($_SESSION['stats202_order']) {
$get['order'] = $_SESSION['stats202_order'];
}
if ($_SESSION['stats202_by']) {
$get['by'] = $_SESSION['stats202_by'];
}
if (!$_SESSION['stats202_by']) {
$_SESSION['stats202_by'] = 'DESC';
}
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getStats?{$query}";
示例2:
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
AUTH::require_user('toolbar');
AUTH::set_timezone($_SESSION['user_timezone']);
include_once '202-ministats.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'>
</script>
<script type='text/javascript'>
GS_googleAddAdSenseService("ca-pub-9868787942961354");
GS_googleEnableAllServices();
</script>
<script type='text/javascript'>
GA_googleAddSlot("ca-pub-9868787942961354", "T202Bar_Sponsors_250x60");
</script>
<script type='text/javascript'>
GA_googleFetchAds();
</script>
<title>Mini Account Overview</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="description" />
<meta name="keywords" content="keywords" />
<meta name="copyright" content="Prosper202, Inc" />