View file _E29/message.inc.php

File size: 1.65Kb
<?php

function MessageCase($case, $w=0){
$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM punish WHERE user='".$w."'"));
if(($w!=0)&&($count[0]!=0)){
$punish = mysql_fetch_array(mysql_query("SELECT * FROM punish WHERE user='".$w."'"));
$remain = $punish[timeto] - time();
$time = gettimemsg($remain);
$text = "You're banned! Time left: ".$time.". Reason: ".htmlentities($punish[reason]).".";
}else{
$text = "You're banned!";
}
switch($case){
case 1:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Database not connected</span><br />";
return $text;
break;
case 2:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Invalid Username</span><br />";
return $text;
break;
case 3:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Invalid password</span><br />";
return $text;
break;
case 4:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Username doest exists</span><br />";
return $text;
break;
case 5:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Invalid username or password</span><br />";
return $text;
break;
case 6:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>Session expired, Please login first.</span><br />";
return $text;
break;
case 7:
$text = "<span class=\"spanfailed\"><img src=\"_IMAGES/notok.png\" alt=\"*\"/>$text</span><br />";
return $text;
break;


}

}

function errorSQL(){
$text = "<span class=\"spanfailed\">Could not connect to server or clone data submit</span><br />";
return $text;
}

function dataEmpty(){
$text = "No data found in database.";
return $text;
}
?>