- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
class core {
public static function txt($var){
$var = trim($var);
$var = stripslashes($var);
$var = str_replace("\00", '', $var);
$var = htmlspecialchars($var, ENT_QUOTES, 'UTF-8');
$var = str_replace("%", "\%", $var);
$var = str_replace("_", "\_", $var);
$var = iconv('utf-8', 'windows-1251', $var);
$var = iconv('windows-1251', 'utf-8', $var);
return $var;
}
public static function nik($id){
global $dbs;
$nick = $dbs->query("SELECT * FROM `users` WHERE `id` = '$id'")->fetch_assoc();
if(empty($nick)){
$us = '[Удален]';
}else{
$us = ($nick['onl']<time()-600?'<font color="red">[off]</font>':'<font color="green">[on]</font>').' <a href="/'.$nick['login'].'" style="color:black;"><b>'.$nick['login'].'</b></a>';
}
return $us;
}
/*.....и еще куча срани*/