appname="www.furaffinity.net"; $sql->database=$mysqldb; $sql->server=$mysqlhost; $sql->user=$mysqluser; $sql->password=$mysqlpassword; $sql->connect(); // Get the functions library require("./core.functions.fpd"); // Get the handling file for user functionality require("./user.class.fpd"); //start up the user functionionality $CUSER = new user; //Check to see if a session is established... $setcookie = $CUSER->_check_sid(); //if not, start one... if($setcookie) setcookie('slSesIdent',$setcookie,time()+3600*24*365); $sid = $CUSER->$sessionid; //Check to see if a session has been started within the DB... $session = $CUSER->_get_session(); $user_info = $CUSER->main(); if($user_info['userid'] > 0) { if($user_info['accesslevel'] == "1" || $user_info['userid'] == "1") { $adminstatus = true; $adminchatpassword = "adminzrulez199"; } $user_id = $user_info['userid']; $username = $user_info['username']; } else { $username = "Guest"; $user_id = "0"; } // Set paths for templates, configpacks, css, and images in case of early death in the script... $PATHS = DEBUG_setpaths(); $PATHS['fromdb'] = false; if( !empty( $_SERVER[ "SERVER_SOFTWARE" ]) && strstr( $_SERVER[ "SERVER_SOFTWARE" ], "Apache/2" )) { header( "Cache-Control: no-cache, pre-check=0, post-check=0" ); } else { header( "Cache-Control: private, pre-check=0, post-check=0, max-age=0" ); } header( "Expires: 0" ); header( "Pragma: no-cache" ); $globaldata['proxy_blacklists'] = array('$4.$3.$2.$1.opm.blitzed.org', '$4.$3.$2.$1.cbl.abuseat.org', '$4.$3.$2.$1.web.dnsbl.sorbs.net'); // Start clocking the script now. settimer(); // Set up the last URL... $_LASTURL = $filename."?".$QUERY_STRING; // Set the time type located in the config file... $timetype = $config['timetype']; ////////////////////////////////////////////////////////////////////////////////// // Set up global variables // ////////////////////////////////////////////////////////////////////////////////// $sitename = $config['sitename']; $timenow = XBdate($config['timeformat'],time(),1); $stylefolder = $user_info['stylefolder']; if(!$stylefolder) $stylefolder = "default"; if($_REQUEST['prevstyle']) $stylefolder = $_REQUEST['prevstyle']; //include the style configuration... if(!file_exists("./!style/".$stylefolder."/configuration/default.style.fpd")) { require("./!style/default/configuration/default.style.fpd"); $stylefolder = "default"; } else { require("./!style/".$stylefolder."/configuration/default.style.fpd"); } if($filename == "user.fpd" || $filename == "gallery.fpd" || $filename == "viewjournal.fpd" || $user_info['override_default'] == 1) { if($filename == "user.fpd") { $user = $sql->query_first("SELECT * FROM iworks_users WHERE strlower = '$name'"); $name = strlower($_REQUEST['name']); $name = addslashes($name); if(!$name || strlower($name) == "guest") { header("LOCATION: index.fpd"); exit(); } } elseif($filename == "viewjournal.fpd") { if($_REQUEST['i']) { $journal = $sql->query_first("SELECT * FROM iworks_journals WHERE date = '$_REQUEST[i]'"); $user = $sql->query_first("SELECT * FROM iworks_users WHERE userid='$journal[user]'"); } else { $user = $sql->query_first("SELECT * FROM iworks_users WHERE strlower='".strlower($_REQUEST['name'])."'"); } } elseif($filename == "gallery.fpd") { $submission = $sql->query_first("SELECT * FROM iworks_submissions WHERE strlower='$_REQUEST[name]' AND date = '$_REQUEST[i]'"); $user = $sql->query_first("SELECT * FROM iworks_users WHERE strlower = '$_REQUEST[name]'"); }else { $user = $user_info; } if($user['var1color']) $theme['var1color'] = htmlspecialchars($user['var1color']); if($user['var2color']) $theme['var2color'] = htmlspecialchars($user['var2color']); if($user['var1image']) $theme['var1image'] = htmlspecialchars($user['var1image']); if($user['var2image']) $theme['var2image'] = htmlspecialchars($user['var2image']); if($user['tblbgcolor']) $theme['table_bg_color'] = htmlspecialchars($user['tblbgcolor']); if($user['bgcolor']) $theme['bgcolor'] = htmlspecialchars($user['bgcolor']); if($user['bgimage']) $theme['bgimage'] = htmlspecialchars($user['bgimage']); if($user['tblwidth_main']) $theme['large_tblwidth'] = htmlspecialchars($user['tblwidth_main']); if($user['tblwidth_inner']) $theme['small_tblwidth'] = htmlspecialchars($user['tblwidth_inner']); if($user['fontcolor']) $theme['fontcolor'] = htmlspecialchars($user['fontcolor']); if($user['tblalign']) $theme['tblalign'] = htmlspecialchars($user['tblalign']); if($user['headerimage']) $custheaderimage = htmlspecialchars($user['headerimage']); if($user['usewings'] == 0) $unsetwings = true; if($user['css_table']) $theme['css_table'] = htmlspecialchars($user['css_table']); if($user['css_alink']) $theme['css_alink'] = htmlspecialchars($user['css_alink']); if($user['css_avisited']) $theme['css_avisited'] = htmlspecialchars($user['css_avisited']); if($user['css_ahover']) $theme['css_ahover'] = htmlspecialchars($user['css_ahover']); if($user['css_body']) $theme['css_body'] = htmlspecialchars($user['css_body']); if($user['maintblcolor']) $theme['maintblcolor'] = htmlspecialchars($user['maintblcolor']); //if a font color is specified, and there is no CSS coding, cut out default color specification from the CSS_TABLE code... if($user['fontcolor']) $theme['css_table'] .= "\ncolor:".htmlspecialchars($user[fontcolor]).";"; if($user['transbg'] == 0) { $translucentbg_border="bgcolor='{tbbgcolor}'"; $transbg="bgcolor='$theme[maintblcolor]'"; } if($user['wing_left']) $theme['wing_left'] = htmlspecialchars($user[wing_left]); if($user['wing_center']) $theme['wing_center'] = htmlspecialchars($user[wing_center]); if($user['wing_right']) $theme['wing_right'] = htmlspecialchars($user[wing_right]); if($theme['wing_center']) eval ("\$topwing = \"".gettemplate("topwing_cust")."\";"); if($user['bgcolor'] || $user['bgimage']) $theme['bodytag']="
"; } else { $translucentbg_border="bgcolor='{tbbgcolor}'"; $transbg="bgcolor='$theme[maintblcolor]'"; } if($custheaderimage) { eval ("\$headerimage = \"".gettemplate("cust_header")."\";"); } else { eval ("\$headerimage = \"".gettemplate("default_header")."\";"); } $strlower = strlower($username); $thisyear = XBdate("Y",time()); $thismonth = XBdate("m",time()); $thisday = XBdate("d",time()); $yearjump = $thisyear-$user_info['bdayyear']; $monthjump = $thismonth-$user_info['bdaymonth']; $dayjump = $thisday-$user_info['bdayday']; if($monthjump < 0 || $dayjump < 0) $yearjump = $yearjump-1; unset($seemature); if($user_info['seeadultart'] == 0 || $yearjump < 18 || $user_info['maturelocked'] == "1") { $seemature = " AND adultsubmission='0'"; } $cliptimeamount = 1; $activetime = time()-($cliptimeamount*60); $activeusers = $sql->get_count("online","iworks_useronline","online<'$activetime'"); // misc stuff... if($user_id) { $logstring = "Log out"; } else { $logstring = "Register | Log in"; } ?>