include("config.php"); $my_host = $SERVER_NAME; $my_arr = explode(".",$my_host); if (sizeof($my_arr) == '2'){ $try_first = $SERVER_NAME; $try_second = "www." . $SERVER_NAME; $htaccess = $my_arr[0]; $domainparsed = $try_first; } else { $try_first = "$my_arr[1].$my_arr[2]"; $try_second = $SERVER_NAME; $htaccess = $my_arr[1]; $domainparsed = $try_first; } if (is_dir("/web/sites/beano33/$try_first")){ $include = "/web/sites/beano33/$try_first/header_logo.php"; } elseif (is_dir("/web/sites/beano33/$try_second")){ $include = "/web/sites/beano33/$try_second/header_logo.php"; } else { $include = "/web/sites/beano33/ezine_inc/header_logo.php"; } // get this sites, siteid... $sql = "SELECT websiteid, websitename FROM websites WHERE htaccess='$htaccess'"; $sql_exe = mysql_query($sql); $sql_res = mysql_fetch_array($sql_exe); $sql_num = mysql_num_rows($sql_exe); if ($sql_num < 1){ echo("No Site ID Detected.. Please contact the sysadmin and send them the URL in your location bar."); exit; } else { $siteid = $sql_res[websiteid]; $sitename = $sql_res[websitename]; } if (!$trigger){ ?>