<?php
function getLang($ID){
if(isset($GLOBALS['LANGARRAY'][$ID])){
return $GLOBALS['LANGARRAY'][$ID];
}else
return "NOT DEFINED";
}
function formatSQL($string)
{
$string = trim(mysql_real_escape_string( $string));
return($string);
}
function dbOut($in){
return stripslashes($in);
}
function jsOut($in){
$out = str_replace('\r\n','',$in);
return trim($out);
}
function UserNameGetir($string)
{
$result = mysql_query("SELECT tblusers.USERNAME FROM tblusers WHERE ID=" . formatSQL($string));
if($row = mysql_fetch_array($result))
{
return $row['USERNAME'];
}
else{
return "";
}
}
function SendMail($email,$message_in,$subject)
{
try{
$headers = "From: " . $GLOBALS['siteTitle'] . "<" . $GLOBALS['siteEmail'] . ">\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-9\r\n";
if(mail($email,$subject, $message_in, $headers)){
return true;
}
else
{
return false;
}
}catch (Exception $e) {
return false;
}
}
?>main.php içeriği.burası.