View Single Post
  #79  
Old 02-04-2010, 01:48 PM
 
A1Gifts A1Gifts is offline
 

Advanced Member
  
Join Date: Sep 2009
Location: Ridgecrest, CA
Posts: 64
 

Default Re: IP Addresses in Users Online for all users

I know this is an old thread but I have 4.2.2 and my postauth.php is different than the example given on any page. My postauth.php looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?php
/************************************************** ***************************\
#
# $Id: postauth.php,v 1.6.2.2 2009/06/18 07:34:23 aim Exp $
#

if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); }
# Prevent double inclusion.
if (defined('INCLUDED_POSTAUTH_PHP')) {
return;
}

define('INCLUDED_POSTAUTH_PHP', 1);
x_session_register("logout_user");
x_session_register("session_failed_transaction");
x_session_register("add_to_cart_time");

x_session_register("always_allow_shop");
x_session_register("search_data");

if (!empty($_GET["shopkey"]))
$always_allow_shop = (!empty($config["General"]["shop_closed_key"]) && $_GET["shopkey"] == $config["General"]["shop_closed_key"]);

if ($config["General"]["shop_closed"] == "Y" && !$always_allow_shop){
#
# Close store front
# Thanks to rubyaryat for the Shop Closed mod
#
if (!func_readfile($xcart_dir.DIRECTORY_SEPARATOR.$sh op_closed_file, true))
echo func_get_langvar_by_name("txt_shop_temporarily_una ccessible",false,false,true);
exit();
}

require $xcart_dir."/include/nocookie_warning.php";
if (!defined('HTTPS_CHECK_SKIP')) {
@include $xcart_dir.DIR_CUSTOMER."/https.php";
}

if (!empty($active_modules['Users_online']) || !empty($active_modules["Greet_Visitor"])) {
x_session_register("session_create_date");
if (empty($session_create_date))
$session_create_date = time();
}

if (!empty($active_modules['Users_online'])) {
x_session_register("current_url_page");
x_session_register("current_date");
$current_url_page = $php_url['url'].($php_url['query_string']?"?".$php_url['query_string']:"");

$current_date = time();
}

#
# Display
#
x_session_register("wlid");
if (isset($_GET["wlid"]) and $_GET["wlid"])
$wlid = $_GET["wlid"];

$smarty->assign("wlid", $wlid);
#
# Browser have disabled/enabled javasript switching
#
x_session_register("js_enabled", "Y");

if (!isset($js_enabled)) $js_enabled="Y";
if (isset($_GET["js"])) {
if ($_GET["js"]=="y") {
$js_enabled = "Y";
$config['Adaptives']['isJS'] = "Y";
$adaptives['isJS'] = "Y";
}
elseif ($_GET["js"]=="n") {
$js_enabled = "";
}
}

$qry_string = func_qs_remove($php_url['query_string'], 'js');
$js_update_link = $php_url['url'].'?'.(!empty($qry_string) ? $qry_string."&" : "");
if ($js_enabled == "Y") {
$js_update_link .= "js=n";
} else {
$js_update_link .= "js=y";
}
unset($qry_string);

$smarty->assign("js_update_link", $js_update_link);
$smarty->assign("js_enabled", $js_enabled);

x_session_register("top_message");
if (!empty($top_message)) {
$top_message['type'] = !empty($top_message['type']) ? $top_message['type'] : "I";
switch ($top_message['type']) {
case "E":
$top_message['title'] = func_get_langvar_by_name("lbl_error", array(), false, true);
break;

case "W":
$top_message['title'] = func_get_langvar_by_name("lbl_warning", array(), false, true);
break;

default:
$top_message['title'] = func_get_langvar_by_name("lbl_information", array(), false, true);
}
$smarty->assign("top_message", $top_message);
if ($config['Adaptives']['is_first_start'] != 'Y')
$top_message = "";

x_session_save("top_message");
}

$cat = intval(@$cat);
$page = intval(@$page);

if (!empty($active_modules['XAffiliate'])) {
include $xcart_dir."/include/partner_info.php";
include $xcart_dir."/include/adv_info.php";
}

include $xcart_dir.DIR_CUSTOMER."/referer.php";
include $xcart_dir."/include/check_useraccount.php";
include $xcart_dir."/include/get_language.php";
$lbl_site_name = strip_tags(func_get_langvar_by_name("lbl_site_titl e", "", false, true));
$location = array();
$location[] = array((!empty($lbl_site_name) ? $lbl_site_name : $config["Company"]["company_name"]), "home.php");

include $xcart_dir.DIR_CUSTOMER."/minicart.php";
if (!empty($active_modules["Interneka"])) {
include $xcart_dir."/modules/Interneka/interneka.php";
}

if (!empty($active_modules["Subscriptions"])) {
if ($login) {
include $xcart_dir."/modules/Subscriptions/get_subscription_info.php";
$smarty->assign("user_subscription", is_user_subscribed($login));
}
}

$pages_menu = func_query("SELECT * FROM $sql_tbl[pages] WHERE language='$store_language' AND active='Y' AND level='E' AND show_in_menu='Y' ORDER BY orderby, title");
$smarty->assign("pages_menu", $pages_menu);

$speed_bar = unserialize($config["speed_bar"]);
if (!empty($speed_bar)) {
$tmp_labels = array();

foreach ($speed_bar as $k => $v) {
if ($v["active"] != "Y") {
unset($speed_bar[$k]);
continue;
}

$speed_bar[$k] = func_array_map("stripslashes", $v);
$tmp_labels[] = "speed_bar_".$v['id'];
}

if (!empty($speed_bar)) {
$tmp = func_get_languages_alt($tmp_labels);
foreach ($speed_bar as $k => $v) {
if (isset($tmp['speed_bar_'.$v['id']]))
$speed_bar[$k]['title'] = $tmp['speed_bar_'.$v['id']];
}

$smarty->assign("speed_bar", array_reverse($speed_bar));
}
}

unset($speed_bar);
$smarty->assign("redirect", "customer");
if (!empty($active_modules["News_Management"]))
include $xcart_dir."/modules/News_Management/news_last.php";

if (!empty($active_modules["Feature_Comparison"])) {
include $xcart_dir."/modules/Feature_Comparison/comparison_products.php";

if ($config['Feature_Comparison']['fcomparison_show_product_list'] == 'Y') {
$comparison_list = func_get_comparison_list();
$smarty->assign("comparison_list",$comparison_list);
}
}

if (!empty($active_modules["Survey"])) {
include_once $xcart_dir."/modules/Survey/surveys_list.php";
}

if (!empty($active_modules['Special_Offers'])) {
include_once $xcart_dir."/modules/Special_Offers/check_new_offers.php";
}

if (isset($printable))
$smarty->assign("printable", $printable);
$smarty->assign("logout_user", $logout_user);

?>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I hate to just assume I can change anything even if it doesn't like the examples given.

Anyone able to help??

Thank you!

A1Gifts
www.A1DiscountGifts.com
__________________
4.2.2
Currently using Template:
Fashion Mosaic- Pink
Reply With Quote