"home", "resource"=>"p_resource")); $p_resource_destination = parameter("p_resource_destination"); $p_resource_popup = parameter("p_resource_popup"); $p_resource_redirect = parameter("p_resource_redirect"); //$p_splash = parameter("p_splash"); if($p_splash == "r6agmo9p") $_SESSION["s_splash"] = ("no"); if($_SESSION["s_splash"] != "no") $p_resource = ("splash"); if($_SESSION["s_verification"] == "") $_SESSION["s_verification"] = rand(0, (count($GLOBALS["g_verification"]) - 1)); // initialize resource if($p_resource == "error") { if(function_exists('http_response_code')) http_response_code(404); else header("HTTP/1.0 404 Not Found"); } $rs_rsg = database_query("SELECT rsr.*,rsm.footer,rsm.menu,rsm.message,rsm.meta_description,rsm.meta_keywords,rsm.meta_title,rsm.promotion FROM ".$GLOBALS["g_database"]["table"]."resources rsr LEFT JOIN ".$GLOBALS["g_database"]["table"]."resource_messages rsm ON (rsm.resource = rsr.pk) WHERE (rsr.resource = 'global')"); $r_rsg = database_results(array("replace"=>"yes", "results"=>$rs_rsg)); $rs_rsr = database_query("SELECT rsr.*,rsm.footer,rsm.menu,rsm.message,rsm.meta_description,rsm.meta_keywords,rsm.meta_title,rsm.promotion FROM ".$GLOBALS["g_database"]["table"]."resources rsr LEFT JOIN ".$GLOBALS["g_database"]["table"]."resource_messages rsm ON (rsm.resource = rsr.pk) WHERE ((rsr.resource = '".$p_resource."') AND (rsr.status = 'active'))"); $r_rsr = database_results(array("replace"=>"yes", "results"=>$rs_rsr)); database_query("UPDATE ".$GLOBALS["g_database"]["table"]."resources SET views = (views + 1) WHERE (pk = '".$r_rsr["pk"]."')"); $l_meta = array("description"=>$r_rsr["meta_description"], "keywords"=>$r_rsr["meta_keywords"], "title"=>$r_rsr["meta_title"]); if($p_resource == "items_item") { $rs_itm = database_query("SELECT itm.pk,itm.title FROM ".$GLOBALS["g_database"]["table"]."items itm WHERE (itm.redirect = '".$GLOBALS["g_server"]["redirect"][0]."')"); $r_itm = database_results(array("replace"=>"yes", "results"=>$rs_itm)); $rs_iim = database_query("SELECT iim.image FROM ".$GLOBALS["g_database"]["table"]."item_images iim WHERE ((iim.item = '".$r_itm["pk"]."') AND (iim.status = 'active')) ORDER BY iim.rank ASC,iim.title ASC LIMIT 0,1"); $r_iim = database_results($rs_iim); $rs_ims = database_query("SELECT ims.meta_description,ims.meta_keywords,ims.meta_title FROM ".$GLOBALS["g_database"]["table"]."item_messages ims WHERE (ims.item = '".$r_itm["pk"]."')"); $r_ims = database_results(array("replace"=>"yes", "results"=>$rs_ims)); if($r_ims["meta_description"] != "") $l_meta["description"] = ($r_ims["meta_description"]); if($r_ims["meta_keywords"] != "") $l_meta["keywords"] = ($r_ims["meta_keywords"]); if($r_ims["meta_title"] != "") $l_meta["title"] = ($r_ims["meta_title"]);else $l_meta["title"] = ($r_itm["title"]." | ".$GLOBALS["g_server"]["title"]); $l_meta["image"] = ($GLOBALS["g_url"]["http"].$GLOBALS["g_url"]["uploads"]["items"].$r_iim["image"]); } else if($p_resource == "items") $l_meta["title"] = (ucwords(str_replace("-", " ", $GLOBALS["g_server"]["redirect"][0]))." | ".$GLOBALS["g_server"]["title"]); if($l_meta["description"] == "") $l_meta["description"] = ($r_rsg["meta_description"]); if($l_meta["keywords"] == "") $l_meta["keywords"] = ($r_rsg["meta_keywords"]); if($l_meta["title"] == "") $l_meta["title"] = ($r_rsr["title"]." | ".$GLOBALS["g_server"]["title"]); if($_SESSION["s_usr"]["pk"] == "") $l_popup_windows = ("yes"); else $l_popup_windows = ($_SESSION["s_usr"]["windows"]); ?> <? echo($l_meta["title"]) ?> "> "> "> "> "> "> "> " rel="canonical"> = 1000) database_query("UPDATE ".$GLOBALS["g_database"]["table"]."user_sessions SET user = '".$_SESSION["s_usr"]["pk"]."', session = '".base64_encode(serialize($_SESSION))."', modified = '".date("Y-m-d H:i:s")."' WHERE (user = '".$_SESSION["s_usr"]["pk"]."')"); ?>