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


PHP AUTH::set_timezone方法代码示例

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


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

示例1: require_user

 function require_user($auth_type = '')
 {
     if (AUTH::logged_in() == false) {
         if ($auth_type == "toolbar") {
             $_SESSION['toolbar'] = 'true';
         }
         //echo "what";
         die(include_once $_SERVER['DOCUMENT_ROOT'] . '/202-access-denied.php');
     }
     AUTH::set_timezone($_SESSION['user_timezone']);
 }
开发者ID:viasmonster,项目名称:prosper202,代码行数:11,代码来源:functions-auth.php

示例2: PeriodicalExecuter

<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php';
AUTH::require_user();
//set the timezone for the user, for entering their dates.
AUTH::set_timezone($_SESSION['user_timezone']);
//show the template
template_top('Spy View', NULL, NULL, NULL);
?>

<div id="info">
	<h2>Spy View</h2>
	Spy is a live view of visitors interacting with your affiliate campaigns.
</div>


<?php 
display_calendar('/tracking202/ajax/click_history.php?spy=1', false, true, true, false, false, true, false);
?>
	
<script type="text/javascript">
	if($('s-status-loading')) {   $('s-status-loading').style.display='';       }  
   	runSpy();
   	new PeriodicalExecuter(runSpy, 5); 
</script>  

<?php 
template_bottom();
开发者ID:samuelpj,项目名称:prosper202,代码行数:28,代码来源:index.php

示例3: USING

$tracker_sql = "SELECT 202_trackers.user_id,\n\t\t\t\t\t\t202_trackers.aff_campaign_id,\n\t\t\t\t\t\ttext_ad_id,\n\t\t\t\t\t\tppc_account_id,\n\t\t\t\t\t\tclick_cpc,\n\t\t\t\t\t\tclick_cloaking,\n\t\t\t\t\t\taff_campaign_rotate,\n\t\t\t\t\t\taff_campaign_url,\n\t\t\t\t\t\taff_campaign_url_2,\n\t\t\t\t\t\taff_campaign_url_3,\n\t\t\t\t\t\taff_campaign_url_4,\n\t\t\t\t\t\taff_campaign_url_5,\n\t\t\t\t\t\taff_campaign_payout,\n\t\t\t\t\t\taff_campaign_cloaking\n\t\t\t\tFROM    202_trackers \n\t\t\t\tLEFT JOIN 202_aff_campaigns USING (aff_campaign_id) \n\t\t\t\tWHERE   tracker_id_public='" . $mysql['tracker_id_public'] . "'";
$tracker_row = memcache_mysql_fetch_assoc($db, $tracker_sql);
if ($memcacheWorking) {
    $url = $tracker_row['aff_campaign_url'];
    $tid = $t202id;
    $getKey = $memcache->get(md5('url_' . $tid . systemHash()));
    if ($getKey === false) {
        $setUrl = $memcache->set(md5('url_' . $tid . systemHash()), $url, false, 0);
    }
}
//set the timezone to the users timezone
$mysql['user_id'] = $db->real_escape_string($tracker_row['user_id']);
$user_sql = "\n\tSELECT\n\t\tuser_timezone, \n\t\tuser_keyword_searched_or_bidded,\n\t\tmaxmind_isp \n\tFROM\n\t\t202_users\n\t\tLEFT JOIN 202_users_pref USING (user_id)\n\tWHERE\n\t\t202_users.user_id='" . $mysql['user_id'] . "'\n";
$user_row = memcache_mysql_fetch_assoc($db, $user_sql);
//now this sets it
AUTH::set_timezone($user_row['user_timezone']);
if (!$tracker_row) {
    die;
}
//get mysql variables
$mysql['aff_campaign_id'] = $db->real_escape_string($tracker_row['aff_campaign_id']);
$mysql['ppc_account_id'] = $db->real_escape_string($tracker_row['ppc_account_id']);
$mysql['click_cpc'] = $db->real_escape_string($tracker_row['click_cpc']);
$mysql['click_payout'] = $db->real_escape_string($tracker_row['aff_campaign_payout']);
$mysql['click_time'] = time();
$mysql['text_ad_id'] = $db->real_escape_string($tracker_row['text_ad_id']);
/* ok, if $_GET['OVRAW'] that is a yahoo keyword, if on the REFER, there is a $_GET['q], that is a GOOGLE keyword... */
//so this is going to check the REFERER URL, for a ?q=, which is the ACUTAL KEYWORD searched.
$referer_url_parsed = @parse_url($_SERVER['HTTP_REFERER']);
$referer_url_query = $referer_url_parsed['query'];
@parse_str($referer_url_query, $referer_query);
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:dl.php

示例4: grab_timeframe

function grab_timeframe()
{
    AUTH::set_timezone($_SESSION['user_timezone']);
    $database = DB::getInstance();
    $db = $database->getConnection();
    $mysql['user_id'] = $db->real_escape_string($_SESSION['user_id']);
    $user_sql = "SELECT user_pref_time_predefined, user_pref_time_from, user_pref_time_to FROM 202_users_pref WHERE user_id='" . $mysql['user_id'] . "'";
    $user_result = _mysqli_query($user_sql);
    //($user_sql);
    $user_row = $user_result->fetch_assoc();
    if ($user_row['user_pref_time_predefined'] == 'today' or $user_row['pref_time_from'] != '') {
        $time['from'] = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'yesterday') {
        $time['from'] = mktime(0, 0, 0, date('m', time() - 86400), date('d', time() - 86400), date('Y', time() - 86400));
        $time['to'] = mktime(23, 59, 59, date('m', time() - 86400), date('d', time() - 86400), date('Y', time() - 86400));
    }
    if ($user_row['user_pref_time_predefined'] == 'last7') {
        $time['from'] = mktime(0, 0, 0, date('m', time() - 86400 * 7), date('d', time() - 86400 * 7), date('Y', time() - 86400 * 7));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'last14') {
        $time['from'] = mktime(0, 0, 0, date('m', time() - 86400 * 14), date('d', time() - 86400 * 14), date('Y', time() - 86400 * 14));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'last30') {
        $time['from'] = mktime(0, 0, 0, date('m', time() - 86400 * 30), date('d', time() - 86400 * 30), date('Y', time() - 86400 * 30));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'thismonth') {
        $time['from'] = mktime(0, 0, 0, date('m', time()), 1, date('Y', time()));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'lastmonth') {
        $time['from'] = mktime(0, 0, 0, date('m', time() - 2629743), 1, date('Y', time() - 2629743));
        $time['to'] = mktime(23, 59, 59, date('m', time() - 2629743), getLastDayOfMonth(date('m', time() - 2629743), date('Y', time() - 2629743)), date('Y', time() - 2629743));
    }
    if ($user_row['user_pref_time_predefined'] == 'thisyear') {
        $time['from'] = mktime(0, 0, 0, 1, 1, date('Y', time()));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == 'lastyear') {
        $time['from'] = mktime(0, 0, 0, 1, 1, date('Y', time() - 31556926));
        $time['to'] = mktime(0, 0, 0, 12, getLastDayOfMonth(date('m', time() - 31556926), date('Y', time() - 31556926)), date('Y', time() - 31556926));
    }
    if ($user_row['user_pref_time_predefined'] == 'alltime') {
        //for the time from, do something special select the exact date this user was registered and use that :)
        $mysql['user_id'] = $db->real_escape_string($_SESSION['user_id']);
        $user2_sql = "SELECT user_time_register FROM 202_users WHERE user_id='" . $mysql['user_id'] . "'";
        $user2_result = $db->query($user2_sql) or record_mysql_error($user2_sql);
        $user2_row = $user2_result->fetch_assoc();
        $time['from'] = $user2_row['user_time_register'];
        $time['from'] = mktime(0, 0, 0, date('m', $time['from']), date('d', $time['from']), date('Y', $time['from']));
        $time['to'] = mktime(23, 59, 59, date('m', time()), date('d', time()), date('Y', time()));
    }
    if ($user_row['user_pref_time_predefined'] == '') {
        $time['from'] = $user_row['user_pref_time_from'];
        $time['to'] = $user_row['user_pref_time_to'];
    }
    $time['user_pref_time_predefined'] = $user_row['user_pref_time_predefined'];
    return $time;
}
开发者ID:viasmonster,项目名称:prosper202,代码行数:63,代码来源:functions-tracking202.php

示例5: memcache_mysql_fetch_assoc

}
include_once $_SERVER['DOCUMENT_ROOT'] . '/202-config/connect2.php';
//grab tracker data
$mysql['tracker_id_public'] = $db->real_escape_string($tracker_id);
$rotator_sql = "SELECT  tr.user_id,\n\t\t\t\t\t\ttr.ppc_account_id,\n\t\t\t\t\t\ttr.rotator_id,\n\t\t\t\t\t\ttr.click_cpc,\n\t\t\t\t\t\trt.default_url,\n\t\t\t\t\t\trt.default_campaign,\n\t\t\t\t\t\tca.aff_campaign_id,\n\t\t\t\t\t\tca.aff_campaign_rotate,\n\t\t\t\t\t    ca.aff_campaign_url,\n\t\t\t\t\t    ca.aff_campaign_url_2,\n\t\t\t\t\t    ca.aff_campaign_url_3,\n\t\t\t\t\t    ca.aff_campaign_url_4,\n\t\t\t\t\t    ca.aff_campaign_url_5,\n\t\t\t\t\t    ca.aff_campaign_payout,\n\t\t\t\t\t    ca.aff_campaign_cloaking,\n\t\t\t\t\t\tur.user_timezone,\n\t\t\t\t\t   \tup.user_keyword_searched_or_bidded,\n\t\t\t\t\t   \tup.maxmind_isp\n\t\t\t\tFROM    202_trackers AS tr\n\t\t\t\tLEFT JOIN 202_rotators AS rt ON rt.id = tr.rotator_id\n\t\t\t\tLEFT JOIN 202_aff_campaigns AS ca ON ca.aff_campaign_id = rt.default_campaign\n\t\t\t\tLEFT JOIN 202_users AS ur ON ur.user_id = tr.user_id\n\t\t\t\tLEFT JOIN 202_users_pref AS up ON up.user_id = tr.user_id\n\t\t\t\tWHERE   tracker_id_public='" . $mysql['tracker_id_public'] . "'";
$rotator_row = memcache_mysql_fetch_assoc($db, $rotator_sql);
$user_id = $db->real_escape_string($rotator_row['user_id']);
$user_keyword_searched_or_bidded = $db->real_escape_string($rotator_row['user_keyword_searched_or_bidded']);
//grab rules data
$mysql['rotator_id'] = $db->real_escape_string($rotator_row['rotator_id']);
$rule_sql = "SELECT ru.id as rule_id,\n\t\t\t\t\t   ru.redirect_url,\n\t\t\t\t\t   ru.redirect_campaign,\n\t\t\t\t\t   ca.aff_campaign_id,\n\t\t\t\t\t   ca.aff_campaign_rotate,\n\t\t\t\t\t   ca.aff_campaign_url,\n\t\t\t\t\t   ca.aff_campaign_url_2,\n\t\t\t\t\t   ca.aff_campaign_url_3,\n\t\t\t\t\t   ca.aff_campaign_url_4,\n\t\t\t\t\t   ca.aff_campaign_url_5,\n\t\t\t\t\t   ca.aff_campaign_payout,\n\t\t\t\t\t   ca.aff_campaign_cloaking\n\t\t\t\tFROM 202_rotator_rules AS ru\n\t\t\t\tLEFT JOIN 202_aff_campaigns AS ca ON ca.aff_campaign_id = ru.redirect_campaign\n\t\t\t\tWHERE rotator_id='" . $mysql['rotator_id'] . "' AND status='1'";
$rule_row = foreach_memcache_mysql_fetch_assoc($db, $rule_sql);
if (!$rotator_row) {
    die;
}
AUTH::set_timezone($rotator_row['user_timezone']);
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
if ($rotator_row['maxmind'] == '1') {
    $IspData = getIspData($ip_address);
} else {
    $IspData = null;
}
//GEO Lookup
$GeoData = getGeoData($ip_address);
//User-agent parser
$parser = Parser::create();
//Device type
$detect = new Mobile_Detect();
$ua = $detect->getUserAgent();
$result = $parser->parse($ua);
if (!$detect->isMobile() && !$detect->isTablet()) {
开发者ID:viasmonster,项目名称:prosper202,代码行数:31,代码来源:rtr.php


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