session_start(); //add a session start just in case we add stuff later that requires it require_once '/var/www/html/mysql_old_functions.php'; $dbhost = "localhost"; $dbuser = "websites"; $dbpassword = "1232websites"; $dbdatabase = "1232web"; $sitebase = "../../../admin"; $config_basedir = "https://www.drmarkdoudle.com.au"; $currentstyle = "style.css"; $websiteid = "916"; $db = mysql_connect($dbhost, $dbuser, $dbpassword); mysql_select_db($dbdatabase, $db); $usernameg = "SELECT * FROM website,webconfig WHERE website.webno = webconfig.websiteid AND webno = '$websiteid'"; $hostnameget = mysql_query($usernameg); $showhost = mysql_fetch_array($hostnameget); //this below is a waste of time and will be removed asap $userid = $showhost['webno']; $sitename = $showhost['domain']; $thisstyle = $showhost['styleid']; $thisweb = $showhost['webname']; $thisbusname = $showhost['busname']; $thisfirst = $showhost['firstname']; $thismobile = $showhost['mobile']; $thiscity = $showhost['city']; $thisserv = $showhost['servicereg']; $thislic = $showhost['license']; $thisemail = $showhost['email']; $thisadd1 = $showhost['post1']; $thisadd2 = $showhost['post2']; $thisadd3 = $showhost['post3']; $thisphone = $showhost['landline']; $keywords = $showhost['keywords']; $contents = $showhost['content']; //we dont need this but i willl leave it here to be used at a later date $currentstyleget = "SELECT * FROM styles WHERE styleid = '$thisstyle'"; $getstyle = mysql_query($currentstyleget); $getstylename = mysql_fetch_array($getstyle); $currentstyle = $getstylename['stylefiletarget']; //this arae below will et the details for the page from the page id which will be stored in the lead file, simple stuff really $getpagedetails = "SELECT * FROM websitepages WHERE websiteid = '$websiteid' AND webpageid = '$webpageid'"; $getpagestuff = mysql_query($getpagedetails); $getpagestuffnum = mysql_num_rows($getpagestuff); if($getpagestuffnum == 0){ $pagetitle = 'Title not found'; } else{ $getpage = mysql_fetch_array($getpagestuff); $pagetitle = $getpage['pagetitle']; if(!empty($getpage['pagedesc'])){ $contents = $getpage['pagedesc']; } if(!empty($getpage['keywords'])){ $keywords = $getpage['keywords']; } } $configbasedir= $config_basedir.$thisweb; ?>