user && $_POST['txtPassword']===$rr->pass){ setcookie("adminTest", 1); $userLogged = 1; header('Location: http://www.momentuminvest.com.au/index.php/cmsid__1/pageid__1'); //header('Location: http://www.momentuminvest.com.au/index.php'); }else{ //header('Location: http://www.momentuminvest.com.au/index.php?cmsid=52&pageid=52&logincorrect=1'); header('Location: http://www.momentuminvest.com.au/index.php/cmsid__52/pageid__52/logincorrect__1'); } }else{ setcookie("adminTest", 0); $userLogged = 0; header('Location: http://www.momentuminvest.com.au/index.php'); //header('Location: http://www.momentuminvest.com.au/index.php'); } } if (strstr($url_array[$i], 'pageid')){ $x = stripos($url_array[$i], '__'); $pageid = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'cmsid')){ $x = stripos($url_array[$i], '__'); $cmsid = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'form')){ $x = stripos($url_array[$i], '__'); $formname = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'form1')){ $x = stripos($url_array[$i], '__'); $formname1 = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'pagefrom')){ $x = stripos($url_array[$i], '__'); $pagefrom = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'newsid')){ $x = stripos($url_array[$i], '__'); $newsid = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'cat')){ $x = stripos($url_array[$i], '__'); $cat = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'news')){ $x = stripos($url_array[$i], '__'); $news = substr($url_array[$i], $x+2); } if (strstr($url_array[$i], 'search')){ $x = stripos($url_array[$i], '__'); $search = substr($url_array[$i], $x+2); } } //echo $url_array[1]; //echo "/ "; //echo $url_array[2]; //echo "/ "; //echo $url_array[3]; //echo "/ "; //echo $url_array[4]; //echo "/ pageid = "; //echo $pageid; //echo "/ cmsid = "; //echo $cmsid; //echo "/ search = "; //echo $search; //echo "/ formname = "; //echo $formname; //echo "/ formname1 = "; //echo $formname1; //echo "/ pagefrom = "; //echo $pagefrom; //echo "/ newsid = "; //echo $newsid; //echo "/ news = "; //echo $news; //echo "/ search = "; //echo $search; //end for ////////////////////////////////////////////////////////////////////////////////////////// //$pageid=1; /*/ //set cookie if (isset($_GET['userLogged'])){ if ($_GET['userLogged']==1){ if ($_POST['txtUsername'] === $rr->user && $_POST['txtPassword']===$rr->pass){ setcookie("adminTest", 1); $userLogged = 1; header('Location: http://www.momentuminvest.com.au/index.php'); //header('Location: http://www.momentuminvest.com.au/index.php'); }else{ //header('Location: http://www.momentuminvest.com.au/index.php?cmsid=52&pageid=52&logincorrect=1'); header('Location: http://www.momentuminvest.com.au/index.php/cmsid__52/pageid__52/logincorrect__1'); } }else{ setcookie("adminTest", 0); $userLogged = 0; header('Location: http://www.momentuminvest.com.au/index.php'); //header('Location: http://www.momentuminvest.com.au/momentum/index.php'); } }*/ ////////////////////////////////////////////////////////////StartHTML//////////////////////// function cms_closehead(){ $html= "\n\n"; return $html; } function detectBrowser(){ global $errormsg; if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape') ) { $browser = 'Netscape (Gecko/Netscape)'; $errormsg = "**"; } else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') ) { $browser = 'Mozilla Firefox (Gecko/Firefox)'; $errormsg = "**"; } else { $browser = 'Mozilla (Gecko/Mozilla)'; $errormsg = "**"; } } else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') ) { $browser = 'Opera (MSIE/Opera/Compatible)'; $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; } else { $browser = 'Internet Explorer (MSIE/Compatible)'; $errormsg = "**"; // $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; //echo $_SERVER['HTTP_USER_AGENT']."888"; } } else { $browser = 'Others browsers'; $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; } if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Macintosh') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape') ) { $browser = 'Macintosh, Netscape (Gecko/Netscape)'; $errormsg = "**"; } else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') ) { $browser = 'Macintosh, Mozilla Firefox (Gecko/Firefox)'; $errormsg = "**"; } else { $browser = 'Macintosh, Mozilla (Gecko/Mozilla)'; $errormsg = "**"; } } else if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') ) { $browser = 'Macintosh, Opera (MSIE/Opera/Compatible)'; $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; } else { $browser = 'Macintosh, Internet Explorer (MSIE/Compatible)'; $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; // echo $_SERVER['HTTP_USER_AGENT']."888"; } } else { $browser = 'Macintosh, Others browsers'; $errormsg = "This website can only be viewed in IE, Netscape of Firefox on a PC, and Safari and Firefox on a Mac."; } } //echo "err: ".$errormsg; return $browser; }//end detectBrowser function cms_starthtml($pageid, $root){ global $root, $browser, $errormsg; //echo $_SERVER['HTTP_USER_AGENT']; //$browser = get_browser(null, true); //print_r($browser); $browser = detectBrowser(); //require("cms_admin/connect.php"); $str = "select * from contentdata where contentid = '".$pageid."'"; $run = mysql_query($str); $result=mysql_fetch_object($run); if ($result->browsertitle){ $btitle = $result->browsertitle; }else{ $btitle = $result->title; } $html= "\n\n"; $html.= "".$btitle."\n"; $html.= "\n"; $html.= "description\">\n"; $html.= "keywords\">\n"; $path = "http://www.momentumcapital.com.au/site_files/style/"; if ($browser === 'Internet Explorer (MSIE/Compatible)'){ $html.= "\n"; }else{ $html.= "\n"; } $html.= " "; return $html; } //echo $HTTP_HOST; ///vcariable def below get script functioning //$cmsid = null; //start html///// echo cms_starthtml($pageid, $root); echo cms_closehead(); //check what to display, left col etc $id = $pageid; //echo $pageid; $left=0;$right=0;$main=0;$foot=0; /*if(isset($_GET['pageid'])){ $id = $_GET['pageid']; }*/ ////////////////////////SEO STUFF //echo $id."***"; $s= "select seo from contentdata where contentid = '$id'"; $r = mysql_query($s); $u = mysql_fetch_object($r); if (browser === 'Mac'){ echo "
"; echo $u->seo." "; echo "
"; } else if ($u->seo){ echo "
"; echo $u->seo." "; echo "
"; } /////////////////////////////////////////// $str = "select * from category where pageid = '$id'"; $run = mysql_query($str); $ran = mysql_fetch_object($run); $left = $ran->left_col; $right = $ran->right_col; $main = $ran->main_content; $foot = $ran->footer; $leftpath= $ran->left_path; $rightpath=$ran->right_path; $mainpath=$ran->main_path; $footpath=$ran->foot_path; if ($leftpath ==="none"){ $leftpath=""; } //echo "*".$leftpath."*".$rightpath."*".$mainpath."*".$footpath; //echo "*".$left."*".$right."*".$main."*".$foot; $sum = $left+$right+$main; $mainWidth=587; $colspan=null; switch($sum){ case 1: $colspan=1; //$mainWidth=587; case 2: $colspan=3; //$mainWidth=587; case 3: $colspan=5; //$mainWidth=420; } //echo "            "; if ($left === '1' && $right ==='1'){ $mainWidth=400; }elseif ($left === '0' && $right ==='0'){ $mainWidth=700; }else{$mainWidth=590;} /////****INSERT DATA //MAIN MENU PANEL //echo"err: ".$errormsg; ////////IF BAD BROWSER DO NOT SHOW CONTENT if ($errormsg === "**"){?>
 
>
"; echo "
".$errormsg; ?>