Files
Testing/home-ajax.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

142 lines
4.8 KiB
PHP

<?php
/* $Id: home.php 8 2009-01-11 06:02:53Z john $ */
include "header.php";
$page = 'home-ajax';
$smarty->assign('homepage', 'homepage');
//if($user->user_info["user_email"]!=""){header("Location: /user_home.php");exit;}
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
$testers=array("joeblow2@aol.com", "bbird20@msn.com", "hookup43@yahoo.com", "benrd295@aol.com", "ali.bushell@gmail.com", "macgreg500@hotmail.com", "rodney2518@yahoo.com", "ctteddy2000@yahoo.com", "jackrabbit2c@yahoo.com", "jockbro22@yahoo.com", "midtownnycm4m@gmail.com", "undiesboy24uk@yahoo.com", "aztop4u@gmail.com", "randyirishboi@yahoo.co.uk", "simon44@gmail.com", "poptartxxx@gmail.com", "workinitm2m@yahoo.com", "moz815_99@yahoo.com", "massguy1977@yahoo.com", "sdtrvlr@att.net", "hookup43@yahoo.com", "leanhots@gmail.com", "bater.jeff@yahoo.com", "edwindavis1@gmail.com", "grflood@msn.com", "mnkaig@gmail.com", "pigletsatx@yahoo.com", "Ezduzit234@aol.com", "iagy7@aol.com", "jtpayne22@gmail.com", "jockedgedc@gmail.com", "dschwake@yahoo.com", "musclejock12@yahoo.com", "thosetwoguys_wa@yahoo.com", "michaeloz1@hotmail.com", "seattleplaytime@gmail.com", "jim-star@live.co.uk", "csangster@live.com", "sfmac1013@yahoo.com", "bearis40@yahoo.ca", "cumragbator@comcast.net", "risskov24@yahoo.it", "italjhnsn@yahoo.com", "haidjay@gmail.com", "philtomx@hotmail.com", "cjackbate@gmail.com", "leprakhauns@gmail.com", "maximail78@yahoo.com", "bateworld@gmail.com", "peterr2468@gmail.com");
//if(in_array(strtolower($user->user_info["user_email"]), $testers)){
if( !$user->user_exists && !$setting['setting_permission_portal'] )
{
if (rc_imobile::is_mobile_display()) {
//$page = "home_login_required";
$page = "error";
$home="true";
}
else {
$page = "error";
$home="true";
}
$page = "error";
$smarty->assign('home', $home);
$smarty->assign('error_header', 9000005);
$smarty->assign('error_message', 9000006);
$smarty->assign('error_submit', 641);
include "footer.php";
exit;
}
//}else{
if( !$user->user_exists && !$setting['setting_permission_portal'] )
{
$page = "error";
// $smarty->assign('error_header', 9000005);
$smarty->assign('error_message', 9000006);
//$smarty->assign('error_submit', 641);
include "footer.php";
exit;
}
//}
// IF PREVIOUSLY LOGGED IN EMAIL COOKIE AVAILABLE, SET IT
$prev_email = ( isset($_COOKIE['prev_email']) ? $_COOKIE['prev_email'] : "" );
// UPDATE REFERRING URLS TABLE
update_refurls();
// NOTE: THESE FUNCTIONS ARE MOSTLY IN include/functions_general.php
// Moved for simplicity in caching the results
// POPULATE USER SETTINGS ARRAY
//$user->user_settings();
// GET RECENT POPULAR USERS (MOST FRIENDS)
//$friend_array = popular_users();
//$smarty->assign_by_ref('friends', $friend_array);
/*
// GET "WHAT'S HOT" CONTENT
$whats_hot = new rc_page();
$page_info = $whats_hot->get_record(3);
$smarty->assign('whats_hot', $page_info['page_content']);
*/
// GET NEWS ITEMS
$news_array = site_news();
$smarty->assign_by_ref('news', $news_array);
// GET UPCOMING BIRTHDAYS, START BY CHECKING FOR BIRTHDAY PROFILE FIELDS
$birthday_array = friends_birthdays();
$smarty->assign_by_ref('birthdays', $birthday_array);
/*
// Backwards compatibility with old home.tpl template
$total_members = ( isset($stats_array['members']['stat']) ? $stats_array['members']['stat'] : 0 );
$total_friends = ( isset($stats_array['friends']['stat']) ? $stats_array['friends']['stat'] : 0 );
$total_comments = ( isset($stats_array['comments']['stat']) ? $stats_array['comments']['stat'] : 0 );
$smarty->assign('total_members', $total_members);
$smarty->assign('total_friends', $total_friends);
$smarty->assign('total_comments', $total_comments);
*/
// Get actions feed - Has code in it that is preventing direct caching
// ASSIGN SMARTY VARIABLES
$smarty->assign('prev_email', $prev_email);
$smarty->assign('ip', $_SERVER['REMOTE_ADDR']);
$smarty->assign('for', $for);
// ASSIGN SMARTY VARIABLES AND DISPLAY pollS PAGE
$_SESSION["pdp_nickname"]=$user->user_info['user_username'];
$_SESSION["pdp_blocklist"]=$user->user_info['user_blocklist'];
$_SESSION["cp_userlevel"]=$user->user_info['user_level_id'];
$smarty->assign('whats_hot', 1);
// Added 4/16/2014 Phil: For the What's Hot ad above content - corresponding code not added to home.tpl
$smarty->assign('showadabove', 'no');
$adabove = new rc_page();
$adabove_info = $adabove->get_record(118);
$smarty->assign('adabove', $adabove_info['page_content']);
if (strpos($adabove_info['page_content'],'<!-- show me //-->') !== false) {
$smarty->assign('showadabove', 'yes');
}
$smarty->assign('addcolumnc', 'no');
$ccolumn = new rc_page();
$ccolumn_info = $ccolumn->get_record(117);
if (strpos($ccolumn_info['page_content'],'<!--add column c//-->') !== false) {
$smarty->assign('addcolumnc', 'yes');
}
$smarty->assign('ccolumn', $ccolumn_info['page_content']);
include "footer.php";
?>