From 5df084c0ff6a88d35fe3ace84fde17461201a22e Mon Sep 17 00:00:00 2001 From: pioder Date: Fri, 1 May 2009 18:47:20 +0000 Subject: [PATCH] Deleted a few moved files. git-svn-id: https://svn.pioder.pl/uf-svn/uF@18 72ec579a-5ced-4fa4-82f3-afba5d98df2f --- includes/class_error.php | 72 ------------- includes/class_forum.php | 136 ------------------------ includes/class_mod.php | 96 ----------------- includes/class_posting.php | 116 --------------------- includes/class_topic.php | 197 ----------------------------------- includes/class_user.php | 208 ------------------------------------- 6 files changed, 825 deletions(-) delete mode 100644 includes/class_error.php delete mode 100644 includes/class_forum.php delete mode 100644 includes/class_mod.php delete mode 100644 includes/class_posting.php delete mode 100644 includes/class_topic.php delete mode 100644 includes/class_user.php diff --git a/includes/class_error.php b/includes/class_error.php deleted file mode 100644 index af7e161..0000000 --- a/includes/class_error.php +++ /dev/null @@ -1,72 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -function message_die($type, $msm, $sql) -{ - $msg =''; - $msg = ' - - - - - - - - - -
- DSF v'.VERSION.' - '; - $msg .= ($type='CRITICAL') ? 'CRITICAL ERROR' : 'GENERAL ERROR' ; - $msg .= ' -
- '; - $msg = $msg.$msm.' - -
'; - if ($sql !='') - { - $msg = $msg.''.$sql.''; - } - $msg = $msg.'
Problems? Questions? Visit: - http://pioder.gim2przemysl.int.pl/forum
'; - die($msg); - -} -function message_forum($text, $url, $interval = 1.8) -{ - global $lng; - global $forum_config; - $skin = array( - 'url' => $url, - 'msg' => $text, - 'queries' => '', - 'pa_link' => '', - ); - $skin = array_push_associative($skin,Over::generate_header($lng['message_forum'], '> '.$lng['message_forum'])); - die( - include('./skins/'.Over::ViewSkinName().'/message_body.tpl') - ); -} -function admin_message_forum($text, $url) -{ -$skin = array( -'url'=>$url, -'msg'=>$text, -); -$skin['queries'] = ''; -$skin['pa_link'] = ''; -die( - include('./../skins/'.Admin_Over::ViewSkinName().'/admin/message_body.tpl') - ); -} -?> diff --git a/includes/class_forum.php b/includes/class_forum.php deleted file mode 100644 index 968c0cb..0000000 --- a/includes/class_forum.php +++ /dev/null @@ -1,136 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -class Forum -{ - function AddForums($tid) - { - global $forum_config; - $forum = Topic::TopicInformation($tid,'f_id'); - $all=''; - $query = DataBase::sql_query("SELECT `name`, `f_id` FROM `".FORUMS_TABLE."` ORDER BY `f_id`",'GENERAL','Could not obtain forum information'); - while($t = @mysql_fetch_array($query)) - { - - if ($t['f_id']==$forum) - { - $all .= ''."\n"; - } - else - { - $all .= ''."\n"; - } - } - return $all; - unset($t, $all); - } - function PostsInForum($forum_name) - { - $sql = "SELECT count(*) as `p_id` FROM ".POSTS_TABLE." WHERE f_id='$forum_name'"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain posts information.'); - $result = mysql_fetch_array($query); - return $result['p_id']; - } - function LastPost($posts, $forum) - { - global $lng; - global $user; - global $last_post; - global $userdata; - global $forum_config; - if ($posts==0) { return '

'.$lng['nopost'].'

';} - else - { - $id = $last_post[$forum]['tp_id']; - $topic = $last_post[$forum]['t_id']; - $userid = $last_post[$forum]['u_id']; - $un = $last_post[$forum]['user_nick']; - $rank = $last_post[$forum]['user_rank']; - switch($rank) - { - case '0': - { - $user_color_name = $un; - break; - } - case '1': - { - $user_color_name = ''.$un.''; - break; - } - case '2': - { - $user_color_name = ''.$un.''; - break; - } - } - if ($_SESSION['uid']>0) - { - $limiter = $userdata['limit_tpid']; - } - else - { - $limiter = $forum_config['limit_tpid']; - } - $count = ceil($id / $limiter); - if ($count >1) - { - $page= '&page='.$count; - } - else - { - $page=''; - } - return '

'.Over::GenerateTime($last_post[$forum]['time']).'
'.$lng['topic'].' #'.$topic.': '.$user_color_name.'

'; - } - } - function LastPostImg($postsinforum) - { - global $last_post; - global $i; - global $forum; - global $default_skin; - $time = time()-129600; - if ($_SESSION['uid']>0) - { - if ($postsinforum>0) - { - if ($last_post[$forum[$i]['f_id']]['time']>$time) - { - return 'folder_new_posts'; - } - else - { - return 'folder_no_new_posts'; - } - } - else - { - return 'folder_no_new_posts'; - } - } - else - { - return 'folder_no_new_posts'; - } - } - function ForumInformation($fid, $inf) - { - $sql = "SELECT `f_id`, `$inf` FROM ".FORUMS_TABLE." WHERE f_id='$fid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain forum information.'); - $result = mysql_fetch_array($query); - $result = $result[$inf]; - return $result; - } -} -?> diff --git a/includes/class_mod.php b/includes/class_mod.php deleted file mode 100644 index aed40be..0000000 --- a/includes/class_mod.php +++ /dev/null @@ -1,96 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -class Mod -{ - function MoveTopic($tid, $fid) - { - $sql = "UPDATE `".TOPICS_TABLE."` SET `f_id`='$fid' WHERE `t_id`='$tid'"; - DataBase::sql_query($sql,'GENERAL','Could not update topic'); - $sql = "UPDATE `".POSTS_TABLE."` SET `f_id`='$fid' WHERE `t_id`='$tid'"; - DataBase::sql_query($sql,'GENERAL','Could not update post'); - } - function TopicLocked($tid) - { - global $default_skin; - global $default_lang; - $lock = Topic::TopicInformation($tid,'lock'); - if ($lock=='1') - { - return 'unlock'; - } - else - { - return 'lock'; - } - } - function DeleteTopic($topicid) - { - $sql="SELECT * FROM ".POSTS_TABLE." WHERE `t_id`='$topicid'"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain post information'); - while($item = @mysql_fetch_array($query)) - { - $uid = Topic::PostInformation($item['p_id'],'u_id'); - $posts = User::UserInformation($uid,'posts'); - $posts = $posts -1; - $sql = "UPDATE `".USERS_TABLE."` SET `posts`='$posts' WHERE `u_id`='$uid'"; - DataBase::sql_query($sql,'GENERAL','Could not update user amout of posts'); - } - $sql = "DELETE FROM ".POSTS_TABLE." WHERE t_id='$topicid';"; - DataBase::sql_query($sql,'GENERAL','Could not delete topic posts.'); - $sql = "DELETE FROM ".TOPICS_TABLE." WHERE t_id='$topicid';"; - DataBase::sql_query($sql,'GENERAL','Could not delete topic posts.'); - } - function LockTopic($topicid) - { - $sql = "UPDATE `".TOPICS_TABLE."` SET `lock` = '1' WHERE `t_id` =$topicid;"; - DataBase::sql_query($sql,'GENERAL','Could not lock topic.'); - } - function StickTopic($topicid, $mode) - { - $sql = "UPDATE `".TOPICS_TABLE."` SET `sticky` = '$mode' WHERE `t_id` =$topicid;"; - DataBase::sql_query($sql,'GENERAL','Could not stick topic.'); - } - function UnlockTopic($topicid) - { - $sql = "UPDATE `".TOPICS_TABLE."` SET `lock` = '0' WHERE `t_id` =$topicid;"; - DataBase::sql_query($sql,'GENERAL','Could not unlock topic.'); - } - function DeletePost($postid) - { - $uid = Topic::PostInformation($postid,'u_id'); - $tid = Topic::PostInformation($postid,'t_id'); - $posts = User::UserInformation($uid,'posts'); - $posts = $posts -1; - $sql = "UPDATE `".USERS_TABLE."` SET `posts`='$posts' WHERE `u_id`='$uid'"; - DataBase::sql_query($sql,'GENERAL','Could not update user amout of posts'); - $sql2 = "DELETE FROM ".POSTS_TABLE." WHERE p_id='$postid';"; - DataBase::sql_query($sql2,'GENERAL','Could not delete post.'); - $sql = "SELECT * FROM ".POSTS_TABLE." WHERE p_id>'$postid' AND `t_id`='$tid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain post information.'); - while($item=mysql_fetch_array($query)) - { - $number = $item['tp_id']; - $number = $number-1; - $number2 = $item['p_id']; - $sql3 = "UPDATE `".POSTS_TABLE."` SET `tp_id` = '$number' WHERE `p_id` =$number2;"; - DataBase::sql_query($sql3,'GENERAL','Could not update post.'); - } - } - function AcceptPost($postid) - { - $sql = "UPDATE `".POSTS_TABLE."` SET `moderated`='0' WHERE `p_id`='$postid'"; - DataBase::sql_query($sql, 'GENERAL', 'Could not accept post'); - } -} -?> diff --git a/includes/class_posting.php b/includes/class_posting.php deleted file mode 100644 index 2226f22..0000000 --- a/includes/class_posting.php +++ /dev/null @@ -1,116 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -class Post -{ - - function NewPost($tid, $post, $uid) - { - #read last post - $last = DataBase::new_id(POSTS_TABLE); - #read last post in topic - $sql = "SELECT * FROM ".POSTS_TABLE." WHERE t_id='$tid' ORDER BY tp_id DESC LIMIT 1;"; - $query = DataBase::sql_query($sql,'GENERAL','Could not last post information.'); - $result = mysql_fetch_array($query); - $forum = $result['f_id'];//forum id - $moderate = Forum::ForumInformation($forum,'moderate'); - $tpid = $result['tp_id'];//post in topic id - $tpid = $tpid+1; - # - $time = time(); - #add new post - $sql = "INSERT INTO `".POSTS_TABLE."` VALUES ('$last','$tid', '$uid', '$post', '".$_SERVER['HTTP_USER_AGENT']."', '$time', '$tpid', '$forum','$moderate','".$_SERVER['REMOTE_ADDR']."')"; - $query = DataBase::sql_query($sql,'GENERAL','Could not add new post.'); - $result=User::UserInformation($uid,'posts'); - $result = $result+1; - $sql="UPDATE ".TOPICS_TABLE." SET lastpost_time='$time' WHERE t_id='$tid' "; - $query = DataBase::sql_query($sql,'GENERAL','Could not update user information.'); - $sql="UPDATE ".USERS_TABLE." SET posts='$result' WHERE u_id='$uid' "; - $query = DataBase::sql_query($sql,'GENERAL','Could not update user information.'); - return $tpid; - } - function EditPost($postid, $text) - { - $sql = "UPDATE `".POSTS_TABLE."` SET text='$text' WHERE `p_id`='$postid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not edit post.'); - } - function NewTopic($posttext, $ntopic, $forum, $uid, $sticky) - { - //Select last topic - $moderate = Forum::ForumInformation($forum,'moderate'); - $time = time(); - $lastt=DataBase::new_id(TOPICS_TABLE); - $sql = "INSERT INTO ".TOPICS_TABLE." VALUES ('$lastt', '$forum', '0', '$sticky', '$ntopic', '$uid','$time')"; - $query = DataBase::sql_query($sql,'GENERAL','Could not add new topic'); - //add post - //select last post - $last = DataBase::new_id(POSTS_TABLE); - //add post - $sql = "INSERT INTO ".POSTS_TABLE." VALUES ('$last','$lastt', '$uid', '$posttext','".$_SERVER['HTTP_USER_AGENT']."', '$time', '1', '$forum', '$moderate','".$_SERVER['REMOTE_ADDR']."');"; - $query = DataBase::sql_query($sql,'GENERAL','Could not add new post.'); - $sql = "SELECT * FROM ".USERS_TABLE." WHERE u_id='$uid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'); - $result = mysql_fetch_array($query); - $result = $result['posts']; - $result = $result+1; - $sql = "UPDATE ".USERS_TABLE." SET posts='$result' WHERE u_id='$uid' "; - $query = DataBase::sql_query($sql,'GENERAL','Could not update user information.'); - return $lastt; - } - function SmilesShow() - { - $text =''; - $result=''; - $sql = "SELECT * FROM ".SMILES_TABLE.""; - $query = DataBase::sql_query($sql,'GENERAL','Cold not obtain smiles information.'); - $i = 1; - while($smile = mysql_fetch_array($query)) - { - $action = "insertSmile('".$smile['url']."','".$smile['smile']."')"; - $mouse = "this.style.cursor='hand';"; - $text = "\n".''.$smile['smile'].' '."\n"; - $result = $result.$text; - if ($i%5==0) - { - $i = 1; - $result=$result.'
'; - } - else - { - $i +=1; - } - } - return $result; - } - function SmilesReplace($text) - { - $sql = "SELECT * FROM ".SMILES_TABLE.""; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain emoticons information.'); - $i = 1; - while($result = mysql_fetch_array($query)) - { - $smile[$i]['smile'] = $result['smile']; - $smile[$i]['url'] = $result['url']; - $i +=1; - } - $smile = (!isset($smile)) ? array() : $smile; - $i = 1; - for($i=1;$i<=count($smile);$i++) - { - $text = str_replace(' '.$smile[$i]['smile'],''.$smile[$i]['smile'].'', $text); - $text = str_replace(' '.$smile[$i]['smile'],''.$smile[$i]['smile'].'', $text); - } - return $text; - } -} -?> diff --git a/includes/class_topic.php b/includes/class_topic.php deleted file mode 100644 index 4f88011..0000000 --- a/includes/class_topic.php +++ /dev/null @@ -1,197 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -class Topic -{ - function LastPostInTopic($topic) - { - global $lng; - global $lastpost; - global $forum_config; - global $userdata; - $id = $lastpost[$topic]['tp_id']; - $userid = $lastpost[$topic]['u_id']; - $un = $lastpost[$topic]['user_nick']; - $rank = $lastpost[$topic]['user_rank']; - switch($rank) - { - case '0': - { - $user_color_name = $un; - break; - } - case '1': - { - $user_color_name = ''.$un.''; - break; - } - case '2': - { - $user_color_name = ''.$un.''; - break; - } - } - if ($_SESSION['uid']>0) - { - $limiter = $userdata['limit_tpid']; - } - else - { - $limiter = $forum_config['limit_tpid']; - } - $count = ceil($id / $limiter); - if ($count >1) - { - $page= '&page='.$count; - } - else - { - $page=''; - } - return '

'.Over::GenerateTime($lastpost[$topic]['time']).'
Post #'.$id.': '.$user_color_name.'

'; - } - function LastPostImg() - { - global $lastpost; - global $record; - global $default_skin; - $time = time()-129600; - if ($_SESSION['uid']>0) - { - if ($lastpost[$record['t_id']]['time']>$time) - { - return 'folder_new_posts'; - } - else - { - return 'folder_no_new_posts'; - } - } - else - { - return 'folder_no_new_posts'; - } - } - function TopicAuthor($uid) - { - global $record; - global $forum_config; - $rank = $record['rank']; - $nick = $record['nick']; - switch($rank) - { - case '0': - { - $user_color_name = $nick; - break; - } - case '1': - { - - $user_color_name = ''.$nick.''; - break; - } - case '2': - { - $user_color_name = ''.$nick.''; - break; - } - } - return ''.$user_color_name.''; - } - function TopicInformation($tid, $mode) - { - $sql = "SELECT * FROM ".TOPICS_TABLE." WHERE t_id='$tid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain topic information'); - $result = mysql_fetch_array($query); - $result = $result[$mode]; - return $result; - } - function PostInformation($pid, $mode) - { - $sql = "SELECT * FROM ".POSTS_TABLE." WHERE p_id='$pid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain topic information'); - $result = mysql_fetch_array($query); - $result = $result[$mode]; - return $result; - } - function PostText($text,$postmoderate, $pid) - { - global $forum; - global $lng; - $text = stripslashes($text); - $text = Topic::TagsReplace($text); - if($forum['moderate']==1) - { - if ($postmoderate==1) - { - if ($_SESSION['uid']>0) - { - if (RANK>0) - { - return ''.$lng['moderated_post_text'].':
'.Topic::TagsReplace('[quote]'.$text.'[/quote]').'
'.$lng['visible_of_post'].''; - } - else - { - return ''.$lng['post_moderated'].''; - } - } - else - { - return ''.$lng['post_moderated'].''; - } - } - else - { - return $text; - } - } - else - { - return $text; - } - - } - function UserName($nick, $rank) - { - global $forum_config; - switch($rank) - { - case '0': - { - return $nick; - break; - } - case '1': - { - return ''.$nick.''; - break; - } - case '2': - { - return ''.$nick.''; - break; - } - } - } - function TagsReplace($text) - { - global $lng; - //quote - $text = preg_replace("#\[quote\](.*?)\[/quote]#si", "
".$lng['quote2'].":
\\1
", $text); - //code - $text = preg_replace("#\[code\](.*?)\[/code]#si", "
Code:
\\1
", $text); - return $text; - } -} -?> diff --git a/includes/class_user.php b/includes/class_user.php deleted file mode 100644 index a239f63..0000000 --- a/includes/class_user.php +++ /dev/null @@ -1,208 +0,0 @@ - -* @link http://pioder.gim2przemysl.int.pl/ -* @license GNU GPL v3 -**/ -if ( !defined('IN_uF') ) -{ - die('Hacking attempt'); -} -class User -{ - function LastUser() - { - global $lastuser; - $usr = $lastuser['nick']; - $uid = $lastuser['u_id']; - return ''.$usr.''; - } - function UserInformation($uid, $inf) - { - $sql = "SELECT `$inf` FROM ".USERS_TABLE." WHERE u_id='$uid';"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'); - $result = mysql_fetch_array($query); - $result = $result[$inf]; - return $result; - } - function UserIdByNick($nick) - { - $sql = "SELECT * FROM `".USERS_TABLE."` WHERE `nick`='$nick';"; - $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.')); - $result = $result['u_id']; - /*if ($result=='') - { - message_forum('nick failed','admin_groups.php'); - }*/ - return $result; - } - function AddToGroup($uid, $gid) - { - $last= DataBase::new_id(USERS_GROUP_TABLE); - $sql = "INSERT INTO `".USERS_GROUP_TABLE."` VALUES ('$last','$uid', '$gid')"; - DataBase::sql_query($sql,'GENERAL','Could not add user to group.'); - } - function DeleteFromGroup($uid, $gid) - { - $sql = "DELETE FROM `".USERS_GROUP_TABLE."` WHERE `u_id`='$uid' AND `g_id`='$gid'"; - DataBase::sql_query($sql,'GENERAL','Could not delete user for group.'); - } - function LogedAs($sid, $uid) - { - global $lng; - global $userdata; - if ($uid>0) - { - $nick = $userdata['nick']; - return(''.$lng['youareloggedas'].' '.$nick.''); - } - else - { - return($lng['youarenotlogd']); - } - } - function PostWithForum($posts) - { - $result2 = Over::TotalPosts(); - if($result2>0) - { - $result3 = ($posts/$result2*100); - $result3 = round($result3,2); - return($result3); - } - else - { - return(0); - } - - } - function LastRegVisit($uid, $mode) - { - global $lng; - $result = User::UserInformation($uid,$mode); - if ($result=='0') - { - return($lng['never']); - } - else - { - $date = date('d-m-Y, G:i',$result); - return($date); - } - } - function UserRank($rank) - { - global $lng; - global $forum_config; - switch($rank) - { - case '0': {$result=$lng['user']; break; } - case '1': {$result=''.$lng['mod'].''; break; } - case '2': {$result=''.$lng['admin'].''; break; } - } - return($result); - } - function RankAdminMod($uid) - { - if ($uid>0) - { - $sql = "SELECT * FROM ".USERS_TABLE." WHERE u_id='$uid'"; - $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user`s rank information.'); - $result = mysql_fetch_array($query); - $rank = $result['rank']; - if (($rank=='1') or ($rank=='2')) - { - return '1'; - } - else - { - return '0'; - } - } - else - { - return '0'; - } - - } - function UpdateProfile($uid, $gg, $email, $interests, $sig, $avatar, $allow_qr, $allow_email, $allow_gg, $skin, $lang, $limit_tpid, $limit_ftid, $limit_users, $allow_shoutbox) - { - $sql ="UPDATE `".USERS_TABLE."` SET - `gg` = '$gg', - `email` = '$email', - `allow_gg` = '$allow_gg', - `allow_email` = '$allow_email', - `allow_qr` = '$allow_qr', - `interests` = '$interests', - `sig` = '$sig', - `avatar` = '$avatar', - `skin`='$skin', - `lang`='$lang', - `limit_tpid` = '$limit_tpid', - `limit_ftid` = '$limit_ftid', - `view_shoutbox` = '$allow_shoutbox', - `limit_users` = '$limit_users' - WHERE `u_id` ='$uid' LIMIT 1 ;"; - DataBase::sql_query($sql,'CRITICAL','Could not update user information'); - } - function UpdateAdminPools($uid, $posts, $rank, $active, $nick) - { - $sql ="UPDATE `".USERS_TABLE."` SET - `posts` = '$posts', - `rank` = '$rank', - `active` = '$active' - WHERE `u_id` ='$uid' LIMIT 1 ;"; - DataBase::sql_query($sql,'CRITICAL','Could not update user information'); - } - function UpdatePassword($uid, $pass) - { - $sql ="UPDATE `".USERS_TABLE."` SET - `pass` = '$pass' - WHERE `u_id` ='$uid' LIMIT 1 ;"; - DataBase::sql_query($sql,'CRITICAL','Could not update user information'); - } - function CreateProfile($nick, $pass, $email, $gg, $allow_gg, $allow_email, $allow_qr, $sig, $av, $interests) - { - global $forum_config; - $last = DataBase::new_id(USERS_TABLE); - $time = time(); - $sql = "INSERT INTO ".USERS_TABLE." VALUES - ('$last', '$nick', '$pass', '$email', '0', '$time', '0', '$gg', '$allow_gg', '$allow_email', '$allow_qr', '".$forum_config['view_shoutbox']."', '".$forum_config['defaultskin']."', '".$forum_config['defaultlang']."','".$forum_config['limit_tpid']."', '".$forum_config['limit_ftid']."', '".$forum_config['limit_users']."', '$sig', '$av', '1','0','$interests');"; - DataBase::sql_query($sql,'CRITICAL','Could not create new user'); - } - function UserMsgs() - { - $uid = $_SESSION['uid']; - if($uid>0) - { - $sql = "SELECT count(*) as `m_id` FROM ".PM_INBOX_TABLE." WHERE `u_id`='$uid' AND `read`='0'"; - $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain amounts PM of User.')); - $result = $result['m_id']; - if ($result>0) - { - return ''.$result.''; - } - else - { - return $result; - } - } - } - function UserAddWarn($uid, $value, $motive) - { - $sql = "INSERT INTO `".WARNINGS_TABLE."` ( `w_id` , `u_id` , `value` , `motive` ) VALUES('','$uid','$value','$motive');"; - DataBase::sql_query($sql,'GENERAL','Could not add new warn.'); - if (User::UserLevelWarns($uid)==100) - { - $ban_ip = '0.0.0.0'; - $ban_uid = $uid; - $ban_motive = $lng['warns_ban']; - $sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('', '$ban_uid', '$ban_ip', '$ban_motive')"; - DataBase::sql_query($sql,'GENERAL','Could not update add ban.'); - } - } -} -?>