$server = "helandetoner.com.mysql"; //Servernamn
$databas = "helandetoner_com"; //Databas
$anvandare = "helandetoner_com"; //Användarnamn
$losen = "fTD}SD+JDdm*rnjNkq89S6%^C"; //Lösenord
$conn = mysql_connect($server,$anvandare,$losen) or die(mysql_error());
mysql_select_db($databas,$conn) or die(mysql_error());
mysql_query("SET NAMES 'UTF8'");
$sqlX = mysql_query("Select hp_url,homepage_name,title_text,sidfot,epost From php_cms_sanne_settings") or die(mysql_error());
$RSX = mysql_fetch_array($sqlX);
$hp_url = $RSX['hp_url'];
$homepage_name = $RSX['homepage_name'];
$title_text = $RSX['title_text'];
$footer = $RSX['sidfot'];
$strOwnEpost = $RSX['epost'];
function fixSQL($sHTML){
$sHTML=stripslashes(ereg_replace("'","''",$sHTML));
return $sHTML;
}
function encodeHTML($sHTML){
$sHTML=ereg_replace("&","&",$sHTML);
$sHTML=ereg_replace("<","<",$sHTML);
$sHTML=ereg_replace(">",">",$sHTML);
return $sHTML;
}
function fixname($username = "", $tolower = true){
$match = array('Å', 'Ä', 'Ö', 'å', 'ä', 'ö', ' ', '_', 'Ã¥', 'ä', 'ö', 'Ã…', 'Ä', 'Ö');
$replace = array('a', 'ae', 'o', 'a', 'ae', 'o', '', '','a', 'ae', 'o','a', 'ae', 'o');
$username = str_replace($match, $replace, ($tolower ? strtolower($username) : $username));
$username = ereg_replace('[^a-z0-9_]', '', $username);
return $username;
}
function replace_code($sHTML){
$sHTML=ereg_replace("
","
",$sHTML);
$sHTML=ereg_replace(" />",">",$sHTML);
$sHTML=ereg_replace("©","©",$sHTML);
$sHTML=ereg_replace("å","å",$sHTML);
$sHTML=ereg_replace("å","Å",$sHTML);
$sHTML=ereg_replace("ä","ä",$sHTML);
$sHTML=ereg_replace("ä","Ä",$sHTML);
$sHTML=ereg_replace("ö","ö",$sHTML);
$sHTML=ereg_replace("ö","Ö",$sHTML);
$sHTML=ereg_replace("ü","ü",$sHTML);
$sHTML=ereg_replace("é","é",$sHTML);
return $sHTML;
}
function replace_code_mapp($sHTML){
$search = array('å','ä','ö','Å','Ä','Ö',"Ã","Ã","Ã","Ã¥","ä","ö");
$replace = array('a','a','o','a','a','o','a','a','o','a','a','o');
$sHTML=str_replace($search, $replace, $sHTML);
$sHTML=ereg_replace(" ","_",$sHTML);
return $sHTML;
}
function dtLeft($sDT){
$y = substr($sDT, 0, 4);
$m = substr($sDT, 5, 2);
$d = substr($sDT, 8, 2);
$tim = substr($sDT, 11, 2);
$min = substr($sDT, 14, 2);
$VD = Veckodag(date("w", mktime(0,0,0, $m, $d, $y)));
$Dag = date("j", mktime(0,0,0, $m, $d, $y));
$Man = ManSwe(date("m", mktime(0,0,0, $m, $d, $y)));
return $Dag." ".$Man.", ".$y;
}
function tidRight($sDT){
$tim = substr($sDT, 11, 2);
$min = substr($sDT, 14, 2);
$sek = substr($sDT, 17, 2);
return $tim.":".$min.":".$sek;
}
function ManSwe($man){
switch($man){
case '01': $manNamn = "Jan"; break;
case '02': $manNamn = "Feb"; break;
case '03': $manNamn = "Mars"; break;
case '04': $manNamn = "April"; break;
case '05': $manNamn = "Maj"; break;
case '06': $manNamn = "Juni"; break;
case '07': $manNamn = "Juli"; break;
case '08': $manNamn = "Aug"; break;
case '09': $manNamn = "Sept"; break;
case '10': $manNamn = "Okt"; break;
case '11': $manNamn = "Nov"; break;
case '12': $manNamn = "Dec"; break;
}
return $manNamn;
}
function Veckodag($dag){
$dagNamn = array('Sön','Mån','Tis','Ons','Tors','Fre','Lör');
return $dagNamn[$dag];
}
?>
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /var/www/helandetoner.com/index.php:24
Stack trace:
#0 {main}
thrown in /var/www/helandetoner.com/index.php on line 24