commit 968d0b7b53847fcb566fbbfa96e6e8a5c26cf01f Author: pioder Date: Fri May 1 08:28:11 2009 +0000 Added files - test git-svn-id: https://svn.pioder.pl/uf-svn/uF@11 72ec579a-5ced-4fa4-82f3-afba5d98df2f diff --git a/admin/admin_forums.php b/admin/admin_forums.php new file mode 100644 index 0000000..27125c8 --- /dev/null +++ b/admin/admin_forums.php @@ -0,0 +1,587 @@ + +* @link http://pioder.gim2przemysl.int.pl/ +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +//$default_skin = Admin_Over::ViewSkinName(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +function GenerateDefaultDisplay() +{ + //cache forums --don't modify!!! + $cache_id=1; + $sql = "SELECT * FROM ".FORUMS_TABLE." ORDER BY `c_id`, `sort`"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.'); + while($result = @mysql_fetch_array($query)) + { + $forum[$cache_id]['f_id'] = $result['f_id']; + $forum[$cache_id]['name'] = $result['name']; + $forum[$cache_id]['desc'] = $result['desc']; + $forum[$cache_id]['c_id'] = $result['c_id']; + $forum[$cache_id]['sort'] = $result['sort']; + $cache_id+=1; + } + global $lng; + global $default_skin; + global $forum_config; + //add skin variables + $skin = array( + 'forums&cats'=>$lng['forums_and_cats'], + 'here_write_name_forum'=>$lng['here_write_name_forum'], + 'new_forum_submit'=>$lng['new_forum_submit'], + ); + Admin_Over::GenerateHeader(); + include('./template/forums_beam_body.tpl'); + //add forums and categories + $sql = "SELECT * FROM `".CATS_TABLE."` ORDER BY `sort`"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain categories information.'); + while($result = mysql_fetch_array($query)) + { + $skin = array( + 'category' => $result['name'], + 'c_id'=>$result['c_id'], + 'edit_cat'=>$lng['edit_cat'], + 'move_up'=>$lng['moveup'], + 'move_down'=>$lng['movedown'], + 'delete'=>$lng['delete'], + 'del_cat'=>$lng['c_del_cat'] + ); + include('./template/forum_category_add.tpl'); + for ($i=1; $i<=count($forum); $i++) + { + if ($forum[$i]['c_id']==$result['c_id']) + { + $skin = array( + 'forum_name' => $forum[$i]['name'], + 'forum_id' => $forum[$i]['f_id'], + 'description' => $forum[$i]['desc'], + 'move_up'=>$lng['moveup'], + 'edit_forum'=>$lng['edit_forum'], + 'del_forum'=>$lng['c_del_forum'], + 'move_down'=>$lng['movedown'], + 'delete'=>$lng['delete'] + ); + include('./template/forum_forum_add.tpl'); + } + } + echo ' 
'; + } + $skin = array( + 'here_write_name_cat'=>$lng['here_write_name_cat'], + 'new_cat_submit'=>$lng['new_cat_submit'] + ); + include('./template/forums_view_end_body.tpl'); + include('./template/overall_footer.tpl'); +} +if (!isset($_GET['mode'])) +{ + header('Location: admin_forums.php?mode=view'); +} +switch($_GET['mode']) +{ + case 'new': + { + switch($_GET['submode']) + { + case 'cat': + { + if (isset($_POST['cat_name'])) + { + if (strlen($_POST['cat_name'])>=5) + { + $cat_name = strip_tags($_POST['cat_name']); + $sql = "SELECT `sort` FROM `".CATS_TABLE."` ORDER BY `sort` DESC LIMIT 1"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last category sort id')); + $sort = $last ['sort']; + $sort = $sort+1; + $sql = "SELECT `c_id` FROM `".CATS_TABLE."` ORDER BY `c_id` DESC LIMIT 1"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last category id')); + $last = $last['c_id']; + $last = $last +1; + $sql = "INSERT INTO `".CATS_TABLE."` VALUES ('$last','$cat_name','$sort')"; + DataBase::sql_query($sql,'GENERAL','Could not add category'); + $msg='./template/blank.tpl'; + admin_message_forum($lng['cat_saved'],'admin_forums.php'); + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_cat_name']; + } + } + else + { + $_POST['cat_name'] = ''; + $msg='./../skins/'.$default_skin.'/blank.tpl'; + } + $skin = array( + 'here_write_name_forum'=>$lng['here_write_name_forum'], + 'here_write_name_cat'=>$lng['here_write_name_cat'], + 'new_forum_submit'=>$lng['new_forum_submit'], + 'new_cat_submit'=>$lng['new_cat_submit'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.cat_name'=>$lng['cat_name'], + 'forums&cats'=>$lng['forums_and_cats'], + 'L.main_beam'=>$lng['new_cat'], + 'action'=>'admin_forums.php?mode=new&submode=cat' + ); + Admin_Over::GenerateHeader(); + include('./template/cat_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + case 'forum': + { + if (isset($_POST['forum_name'], $_POST['forum_desc'])) + { + if (strlen($_POST['forum_name'])>=5) + { + if (strlen($_POST['forum_desc'])>=5) + { + $forum_name = strip_tags($_POST['forum_name']); + $forum_desc = strip_tags($_POST['forum_desc']); + $forum_cat = $_POST['forum_cat']; + $forum_lock = (isset($_POST['forum_locked'])) ? 1 : 0; + $allow_moderate = (isset($_POST['allow_moderate'])) ? 1 : 0; + $sql = "SELECT `sort`, `c_id` FROM `".FORUMS_TABLE."` WHERE `c_id`='$forum_cat' ORDER BY `sort` DESC LIMIT 1"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last forum sort id')); + $sort = $last ['sort']; + $sort = $sort+1; + $sql = "SELECT `f_id` FROM `".FORUMS_TABLE."` ORDER BY `f_id` DESC LIMIT 1"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last forum id')); + $last = $last['f_id']; + $last = $last +1; + $sql = "INSERT INTO `".FORUMS_TABLE."` VALUES ('$last','$forum_lock','$allow_moderate', '$forum_name', '$forum_desc','$forum_cat','$sort')"; + DataBase::sql_query($sql,'GENERAL','Could not add forum'); + $msg='./../skins/'.$default_skin.'/blank.tpl'; + admin_message_forum($lng['forum_saved'],'admin_forums.php'); + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_forum_desc']; + } + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_forum_name']; + } + } + else + { + if (!isset($_POST['forum_name'])) { $_POST['forum_name'] = ''; } + if (!isset($_POST['forum_desc'])) { $_POST['forum_desc'] = ''; } + $msg='./../skins/'.$default_skin.'/blank.tpl'; + } + $skin = array( + 'here_write_name_forum'=>$lng['here_write_name_forum'], + 'here_write_name_cat'=>$lng['here_write_name_cat'], + 'new_forum_submit'=>$lng['new_forum_submit'], + 'new_cat_submit'=>$lng['new_cat_submit'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.forum_name'=>$lng['forum_name'], + 'L.change_cat'=>$lng['change_cat'], + 'L.forum_locked'=>$lng['forum_locked'], + 'on'=>$lng['allow'], + 'OPTION.forum_locked'=> '', + 'L.allow_moderate'=>$lng['moderate_posts'], + 'forums&cats'=>$lng['forums_and_cats'], + 'OPTION.allow_moderate'=>'', + 'OPTIONS.forum_cat'=>Admin_Forum::AddCats(0), + 'L.forum_desc'=>$lng['forum_desc'], + 'L.main_beam'=>$lng['new_forum'], + 'action'=>'admin_forums.php?mode=new&submode=forum' + ); + Admin_Over::GenerateHeader(); + include('./template/forum_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + } + break; + } + case 'moveup': + { + //temp variables + $i1 = 0; + $i2 = 0; + $r1 = 0; + $r2 = 0; + //BEGIN switch - submode + switch($_GET['submode']) + { + case 'cat': + { + if (isset($_GET['c'])) + { + $i1 = $_GET['c']; + $sql = "SELECT `sort`, `c_id` FROM ".CATS_TABLE." WHERE `c_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain category information.')); + $s1 = $s1['sort']; + $s2 = $s1 -1; + if ($s1>1) + { + $sql = "SELECT `sort`, `c_id` FROM ".CATS_TABLE." WHERE `sort`='$s2'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain category information.')); + $i2 = $s2['c_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".CATS_TABLE." SET `sort`='$s2' WHERE `c_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update category position'); + $sql = "UPDATE ".CATS_TABLE." SET `sort`='$s1' WHERE `c_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update category position'); + } + } + break; + } + case 'forum': + { + if (isset($_GET['f'])) + { + $i1 = $_GET['f']; + $sql = "SELECT `sort`, `c_id`, `f_id` FROM ".FORUMS_TABLE." WHERE `f_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.')); + $cid = $s1['c_id']; + $s1 = $s1['sort']; + $s2 = $s1 -1; + if ($s1>1) + { + $sql = "SELECT `sort`, `c_id`, `f_id` FROM ".FORUMS_TABLE." WHERE `sort`='$s2' AND `c_id`='$cid'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not forum forum information.')); + $i2 = $s2['f_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".FORUMS_TABLE." SET `sort`='$s2' WHERE `f_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum position'); + $sql = "UPDATE ".FORUMS_TABLE." SET `sort`='$s1' WHERE `f_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum position'); + } + } + break; + } + } + //END switch - submode + GenerateDefaultDisplay(); + break; + } + case 'movedown': + { + //temp variables + $i1 = 0; + $i2 = 0; + $r1 = 0; + $r2 = 0; + //BEGIN switch - submode + switch($_GET['submode']) + { + case 'cat': + { + if (isset($_GET['c'])) + { + $i1 = $_GET['c']; + $i2 = $i1 +1; + $sql = "SELECT `sort`, `c_id` FROM ".CATS_TABLE." WHERE `c_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain category information.')); + $s1 = $s1['sort']; + $s2 = $s1 +1; + $sql = "SELECT `c_id` FROM ".CATS_TABLE; + $count = @mysql_num_rows(DataBase::sql_query($sql,'CRITICAL','Could not obtain category information.')); + if ($s1<$count) + { + $sql = "SELECT `sort`, `c_id` FROM ".CATS_TABLE." WHERE `sort`='$s2'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain category information.')); + $i2 = $s2['c_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".CATS_TABLE." SET `sort`='$s2' WHERE `c_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update category position'); + $sql = "UPDATE ".CATS_TABLE." SET `sort`='$s1' WHERE `c_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update category position'); + } + } + break; + } + case 'forum': + { + if (isset($_GET['f'])) + { + $i1 = $_GET['f']; + $i2 = $i1 +1; + $sql = "SELECT `sort`, `c_id`, `f_id` FROM ".FORUMS_TABLE." WHERE `f_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.')); + $cid = $s1['c_id']; + $s1 = $s1['sort']; + $s2 = $s1 +1; + $sql = "SELECT `f_id` FROM ".FORUMS_TABLE." WHERE `c_id`='$cid'"; + $count = @mysql_num_rows(DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.')); + if ($s1<$count) + { + $sql = "SELECT `sort`, `f_id` FROM ".FORUMS_TABLE." WHERE `sort`='$s2'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.')); + $i2 = $s2['f_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".FORUMS_TABLE." SET `sort`='$s2' WHERE `f_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum position'); + $sql = "UPDATE ".FORUMS_TABLE." SET `sort`='$s1' WHERE `f_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum position'); + } + } + break; + } + } + //END switch - submode + GenerateDefaultDisplay(); + break; + } + case 'delete': + { + //BEGIN switch - submode + switch($_GET['submode']) + { + case 'cat': + { + if (isset($_GET['c'])) + { + $cid = intval($_GET['c']); + $sql = "SELECT * FROM `".CATS_TABLE."` WHERE `c_id`='$cid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain category information'); + $result = @mysql_fetch_array($query); + $sort = $result['sort']; + $sql = "SELECT * FROM `".CATS_TABLE."` WHERE `sort`>'$sort'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain categories information'); + while($item = @mysql_fetch_array($query)) + { + $new_sort = $item['sort']-1; + $cid2 = $item['c_id']; + $sql2 = "UPDATE `".CATS_TABLE."` SET `sort`='$new_sort' WHERE `c_id`='$cid2'"; + DataBase::sql_query($sql,'GENERAL','Could not update category'); + } + $sql = "SELECT `f_id` FROM `".FORUMS_TABLE."` WHERE `c_id`='$cid'"; + $query = DataBase::sql_query($sql, 'GENERAL','Could not obtain forum information.'); + while($item = @mysql_fetch_array($query)) + { + $fid = $item['f_id']; + $sql="DELETE FROM `".POSTS_TABLE."` WHERE `f_id`='$fid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete post.'); + $sql = "DELETE FROM `".TOPICS_TABLE."` WHERE `f_id`='$fid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete topic'); + } + $sql = "DELETE FROM `".FORUMS_TABLE."` WHERE `c_id`='$cid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete topic'); + $sql = "DELETE FROM `".CATS_TABLE."` WHERE `c_id`='$cid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete category.'); + } + } + case 'forum': + { + if (isset($_GET['f'])) + { + $fid = intval($_GET['f']); + $sql = "SELECT * FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain forum information'); + $result = @mysql_fetch_array($query); + $sort = $result['sort']; + $sql = "SELECT * FROM `".FORUMS_TABLE."` WHERE `sort`>'$sort'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain forums information'); + while($item = @mysql_fetch_array($query)) + { + $new_sort = $item['sort']-1; + $fid1 = $item['f_id']; + $sql2 = "UPDATE `".FORUMS_TABLE."` SET `sort`='$new_sort' WHERE `f_id`='$fid1'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum'); + } + $sql="DELETE FROM `".POSTS_TABLE."` WHERE `f_id`='$fid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete post.'); + $sql = "DELETE FROM `".TOPICS_TABLE."` WHERE `f_id`='$fid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete topic'); + $sql = "DELETE FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'"; + DataBase::sql_query($sql, 'GENERAL','Could not delete forum'); + } + } + } + GenerateDefaultDisplay(); + break; + } + case 'edit': + { + switch($_GET['submode']) + { + case 'cat': + { + $cid = intval($_GET['c']); + if (isset($_POST['cat_name'])) + { + if (strlen($_POST['cat_name'])>=5) + { + $cat_name = strip_tags($_POST['cat_name']); + $sql = "SELECT `sort`, `c_id` FROM `".FORUMS_TABLE."` WHERE `c_id`='$cat_name' ORDER BY `sort` DESC LIMIT 1"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last forum sort id')); + $sort = $last ['sort']; + $sort = $sort+1; + $sql = "UPDATE `".CATS_TABLE."` SET `name`='$cat_name', `sort`='$sort' WHERE `c_id`='$cid'"; + DataBase::sql_query($sql,'GENERAL','Could not update category'); + $msg='./../skins/'.$default_skin.'/blank.tpl'; + admin_message_forum($lng['cat_saved'],'admin_forums.php'); + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_cat_name']; + } + } + else + { + $tmp = mysql_fetch_array(DataBase::sql_query("SELECT `name` FROM `".CATS_TABLE."` WHERE `c_id`='$cid'",'GENERAL','Could not obtain category information')); + $tmp = $tmp['name']; + $_POST['cat_name'] = $tmp; + if($tmp['name']=='') + { + admin_message_forum($lng['no_category'],'admin_forums.php?mode=view'); + } + unset($tmp); + $msg='./../skins/'.$default_skin.'/blank.tpl'; + } + $skin = array( + 'here_write_name_forum'=>$lng['here_write_name_forum'], + 'here_write_name_cat'=>$lng['here_write_name_cat'], + 'new_forum_submit'=>$lng['new_forum_submit'], + 'new_cat_submit'=>$lng['new_cat_submit'], + 'L.save'=>$lng['submit'], + 'forums&cats'=>$lng['forums_and_cats'], + 'L.reset'=>$lng['reset'], + 'L.cat_name'=>$lng['cat_name'], + 'L.main_beam'=>$lng['edit_cat'], + 'action'=>'admin_forums.php?mode=edit&submode=cat&c='.$cid + ); + Admin_Over::GenerateHeader(); + include('./template/cat_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + case 'forum': + { + $fid = intval($_GET['f']); + if (isset($_POST['forum_name'],$_POST['forum_desc'])) + { + if (strlen($_POST['forum_name'])>=5) + { + if (strlen($_POST['forum_desc'])>=5) + { + $forum_name = strip_tags($_POST['forum_name']); + $forum_desc = strip_tags($_POST['forum_desc']); + $forum_cat = $_POST['forum_cat']; + $sql = "SELECT * FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain forum information'); + $result = @mysql_fetch_array($query); + $actual_cid = $result['c_id']; + $sort = $result['sort']; + if ($actual_cid != $forum_cat) + { + $sql = "SELECT * FROM `".FORUMS_TABLE."` WHERE `c_id`='$forum_cat' ORDER BY `sort` DESC LIMIT 1"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain forums information'); + $result = @mysql_fetch_array($query); + $sort = $result['sort']+1; + } + + $forum_lock = (isset($_POST['forum_locked'])) ? 1 : 0; + $forum_moderate = (isset($_POST['allow_moderate'])) ? 1 : 0; + $sql = "UPDATE `".FORUMS_TABLE."` SET + `name`='$forum_name', + `desc`='$forum_desc', + `lock`='$forum_lock', + `moderate`='$forum_moderate', + `c_id`='$forum_cat', + `sort`='$sort' + WHERE `f_id`='$fid'"; + DataBase::sql_query($sql,'GENERAL','Could not update forum'); + $msg='./../skins/'.$default_skin.'/blank.tpl'; + admin_message_forum($lng['forum_saved'],'admin_forums.php'); + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_forum_desc']; + } + } + else + { + $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $message = $lng['to_short_forum_name']; + } + } + else + { + $tmp = mysql_fetch_array(DataBase::sql_query("SELECT `name`, `desc` FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'",'GENERAL','Could not obtain forum information')); + $_POST['forum_name'] = $tmp['name']; + $msg='./../skins/'.$default_skin.'/blank.tpl'; + $_POST['forum_desc'] = $tmp['desc']; + if($tmp['name']=='') + { + admin_message_forum($lng['no_forum'],'admin_forums.php?mode=view'); + } + unset($tmp); + } + $skin = array( + 'here_write_name_forum'=>$lng['here_write_name_forum'], + 'here_write_name_cat'=>$lng['here_write_name_cat'], + 'new_forum_submit'=>$lng['new_forum_submit'], + 'new_cat_submit'=>$lng['new_cat_submit'], + 'L.save'=>$lng['submit'], + 'forums&cats'=>$lng['forums_and_cats'], + 'L.reset'=>$lng['reset'], + 'L.forum_name'=>$lng['forum_name'], + 'L.change_cat'=>$lng['change_cat'], + 'L.forum_locked'=>$lng['forum_locked'], + 'on'=>$lng['allow'], + 'OPTION.forum_locked'=>(Forum::ForumInformation($fid,'lock')==1) ? 'checked="checked"' : '', + 'OPTIONS.forum_cat'=>Admin_Forum::AddCats($fid), + 'L.allow_moderate'=>$lng['moderate_posts'], + 'OPTION.allow_moderate'=>(Forum::ForumInformation($fid,'moderate')==1) ? 'checked="checked"' : '', + 'L.forum_desc'=>$lng['forum_desc'], + 'L.main_beam'=>$lng['edit_forum'], + 'action'=>'admin_forums.php?mode=edit&submode=forum&f='.$fid + ); + Admin_Over::GenerateHeader(); + include('./template/forum_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + } + break; + } + case 'view': + { + GenerateDefaultDisplay(); + break; + } + default: + { + header('Location: admin_forums.php?mode=view'); + break; + } +} +?> diff --git a/admin/admin_groups.php b/admin/admin_groups.php new file mode 100644 index 0000000..5164f12 --- /dev/null +++ b/admin/admin_groups.php @@ -0,0 +1,248 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +include('./../includes/classes/class_pms.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../includes/classes/secure.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +function GenerateDefaultDisplay() +{ + global $lng; + global $default_skin; + global $forum_config; + $skin['L.groups'] = $lng['admin_groups']; + $skin['L.new_group'] = $lng['new_group']; + Admin_Over::GenerateHeader(); + include('./template/groups_beam_body.tpl'); + $sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`"; + $query = DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.'); + while($item = mysql_fetch_array($query)) + { + $skin = array( + 'g_id'=>$item['g_id'], + 'name'=>$item['name'], + 'desc'=>$item['desc'], + 'move_up'=>$lng['moveup'], + 'move_down'=>$lng['movedown'], + 'delete'=>$lng['delete'], + 'c_delete'=>$lng['c_delete_group'] + ); + include('./template/group_add_body.tpl'); + } + echo ''; + include('./template/overall_footer.tpl'); +} +if (!isset($_GET['mode'])) +{ + header('Location: admin_groups.php?mode=view'); +} +switch($_GET['mode']) +{ + case 'delete': + { + $gid = $_GET['id']; + Secure::group_exists($gid); + $sql = "DELETE FROM ".GROUPS_TABLE." WHERE `g_id`='$gid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete group.'); + $sql = "DELETE FROM ".USERS_GROUP_TABLE." WHERE `g_id`='$gid'"; + DataBase::sql_query($sql,'GENERAL','Could users in group.'); + GenerateDefaultDisplay(); + break; + } + case 'add': + { + global $lng; + global $forum_config; + global $_POST; + if (isset($_POST['group_name'])) + { + if (strlen(trim($_POST['group_name']))>=5) + { + $group_name = htmlspecialchars($_POST['group_name']); + $group_desc = htmlspecialchars($_POST['group_desc']); + $group_mod = User::UserIdByNick(htmlspecialchars($_POST['group_mod'])); + $result = @mysql_fetch_array(DataBase::sql_query("SELECT `sort` FROM `".GROUPS_TABLE."` + ORDER BY `sort` DESC LIMIT 1",'GENERAL','Could not obtain last category sort id')); + $group_sort = $result['sort']; + $group_sort = $group_sort+1; + $result = @mysql_fetch_array(DataBase::sql_query("SELECT + `g_id` FROM ".GROUPS_TABLE." ORDER BY `g_id` DESC LIMIT 1",'GENERAL','Could not obtain last group id.')); + $group_id = $result['g_id']; + $group_id = $group_id+1; + $sql = "INSERT INTO ".GROUPS_TABLE." VALUES ('$group_id', '$group_name', '$group_desc', '$group_mod', '$group_sort')"; + DataBase::sql_query($sql, 'GENERAL', 'Could not add group'); + unset($group_name, $group_desc, $group_mod, $group_id); + admin_message_forum($lng['group_saved'],'admin_groups.php'); + } + else + { + $msg = './template/post_error_body.tpl'; + $message = $lng['to_short_group_name']; + } + } + else + { + $_POST['group_name'] = ''; + $_POST['group_desc'] = ''; + $_POST['group_mod'] = ''; + $msg='./template/blank.tpl'; + } + $skin = array( + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.group_name'=>$lng['group_name'], + 'L.group_desc'=>$lng['group_desc'], + 'L.group_mod'=>$lng['group_mod'], + 'L.main_beam'=>$lng['new_group'], + 'action'=>'admin_groups.php?mode=add', + 'L.groups' => $lng['admin_groups'] + ); + Admin_Over::GenerateHeader(); + include('./template/group_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + case 'edit': + { + global $lng; + $gid = $_GET['id']; + global $forum_config; + global $_POST; + Secure::group_exists($gid); + if (isset($_POST['group_name'])) + { + if (strlen(trim($_POST['group_name']))>=5) + { + $group_name = htmlspecialchars($_POST['group_name']); + $group_desc = htmlspecialchars($_POST['group_desc']); + $group_mod = User::UserIdByNick(htmlspecialchars($_POST['group_mod'])); + $group_id = htmlspecialchars($gid); + $sql = "UPDATE ".GROUPS_TABLE." SET + `name` = '$group_name', + `desc` = '$group_desc', + `m_id` = '$group_mod' + WHERE `g_id` = '$group_id'"; + DataBase::sql_query($sql, 'GENERAL', 'Could not update group'); + unset($group_name, $group_desc, $group_mod, $group_id); + admin_message_forum($lng['group_saved'],'admin_groups.php'); + } + else + { + $msg = './template/post_error_body.tpl'; + $message = $lng['to_short_group_name']; + } + } + else + { + $sql = "SELECT * FROM `".GROUPS_TABLE."` WHERE `g_id`='$gid'"; + $g = @mysql_fetch_array(DataBase::sql_query($sql, 'GENERAL','Could not obtain group information.')); + $_POST['group_name'] = $g['name']; + $_POST['group_desc'] = $g['desc']; + $_POST['group_mod'] = User::UserInformation($g['m_id'],'nick'); + $msg='./../skins/'.$default_skin.'/blank.tpl'; + } + $skin = array( + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.group_name'=>$lng['group_name'], + 'L.group_desc'=>$lng['group_desc'], + 'L.group_mod'=>$lng['group_mod'], + 'L.main_beam'=>$lng['edit_group'], + 'action'=>'admin_groups.php?mode=edit&id='.$gid, + 'L.groups' => $lng['admin_groups'] + ); + Admin_Over::GenerateHeader(); + include('./template/group_new_edit_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + case 'moveup': + { + if (isset($_GET['id'])) + { + $i1 = intval($_GET['id']); + $sql = "SELECT `sort`, `g_id` FROM ".GROUPS_TABLE." WHERE `g_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain group information.')); + $s1 = $s1['sort']; + $s2 = $s1 -1; + if ($s1>1) + { + $sql = "SELECT `sort`, `g_id` FROM ".GROUPS_TABLE." WHERE `sort`='$s2'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain group information.')); + $i2 = $s2['g_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".GROUPS_TABLE." SET `sort`='$s2' WHERE `g_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update group position'); + $sql = "UPDATE ".GROUPS_TABLE." SET `sort`='$s1' WHERE `g_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update group position'); + } + } + GenerateDefaultDisplay(); + break; + } + case 'movedown': + { + if (isset($_GET['id'])) + { + $i1 = intval($_GET['id']); + $i2 = $i1 +1; + $sql = "SELECT `sort`, `g_id` FROM ".GROUPS_TABLE." WHERE `g_id`='$i1'"; + $s1 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain group information.')); + $s1 = $s1['sort']; + $s2 = $s1 +1; + $sql = "SELECT `g_id` FROM ".GROUPS_TABLE; + $count = @mysql_num_rows(DataBase::sql_query($sql,'CRITICAL','Could not obtain group information.')); + if ($s1<$count) + { + $sql = "SELECT `sort`, `g_id` FROM ".GROUPS_TABLE." WHERE `sort`='$s2'"; + $s2 = @mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain group information.')); + $i2 = $s2['g_id']; + $s2 = $s2['sort']; + $sql = "UPDATE ".GROUPS_TABLE." SET `sort`='$s2' WHERE `g_id`='$i1'"; + DataBase::sql_query($sql,'GENERAL','Could not update group position'); + $sql = "UPDATE ".GROUPS_TABLE." SET `sort`='$s1' WHERE `g_id`='$i2'"; + DataBase::sql_query($sql,'GENERAL','Could not update group position'); + } + } + GenerateDefaultDisplay(); + break; + } + case 'view': + { + GenerateDefaultDisplay(); + break; + } + default: + { + header('Location: admin_groups.php?mode=view'); + break; + } +} +@ini_set('display_errors', '1'); +?> diff --git a/admin/admin_script.php b/admin/admin_script.php new file mode 100644 index 0000000..87bdaa7 --- /dev/null +++ b/admin/admin_script.php @@ -0,0 +1,415 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} + +function AddSkins() +{ + global $forum_config; + $all=''; + $query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",'GENERAL','Could not obtain skins information'); + while($t = @mysql_fetch_array($query)) + { + + if ($t['s_id']==$forum_config['defaultskin']) + { + $all .= ''; + } + else + { + $all .= ''; + } + } + return $all; + unset($t, $all); +} +function AddPages2($page)//for admin script, not used in limit! +{ + $content = ''; + for ($i=1;$i<=50;$i++) + { + if ($i==$page) + { + $content .= ''; + } + else + { + $content .= ''; + } + } + return $content; + unset($content); +} +function AddLangs() +{ + global $forum_config; + $result=''; + $rep=opendir('./../lngs'); + while ($file = readdir($rep)) + { + if($file != '..' && $file !='.' && $file !='') + { + if (is_dir('./../lngs/'.$file)){ + if ($file==$forum_config['defaultlang']) + { + $result .=''; + } + else + { + $result .=''; + } + } + } + } + return $result; + unset($rep, $file, $result); +} +$errors = true; +if (isset($_POST['forum_path'])) +{ + if (!$_POST['forum_path']) + { + $message = $lng['no_path']; + $ERROR = './template/in_error_body.tpl'; + } + else + { + if ((strlen(trim($_POST['forum_name']))<3) or (strlen(trim($_POST['forum_name']))>30)) + { + $message = $lng['invalid_forum_name']; + $ERROR = './template/in_error_body.tpl'; + } + else + { + if ($_POST['default_skin']!='-1') + { + if ($_POST['default_lang']!='-1') + { + if($_POST['limit_tpid']!='-1') + { + if($_POST['limit_ftid']!='-1') + { + if($_POST['limit_users']!='-1') + { + if((strlen($_POST['forum_desc'])>3) or (strlen($_POST['forum_desc'])<30)) + { + $errors = false; + } + else + { + $message = $lng['invalid_forum_desc']; + $ERROR = './template/in_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_users']; + $ERROR = './template/in_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_ftid']; + $ERROR = './template/in_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_tpid']; + $ERROR = './template/in_error_body.tpl'; + } + } + else + { + $message = $lng['no_lang']; + $ERROR = './template/in_error_body.tpl'; + } + } + else + { + $message = $lng['no_skin']; + $ERROR = './template/in_error_body.tpl'; + } + } + } + if (!$errors) + { + $name = array(); + $value = array(); + /* forum name */ + $name[] = 'forumname'; + $value[] = strip_tags($_POST['forum_name']); + + /* forum description */ + $name[] = 'forumdesc'; + $value[] = strip_tags($_POST['forum_desc']); + + /* forum path */ + $name[] = 'forumpatch'; + $value[] = strip_tags($_POST['forum_path']); + + /* forum disabled */ + $name[] = 'disable_forum'; + $value[] = strip_tags($_POST['forum_disabled']); + + /* default_skin */ + $name[] = 'defaultskin'; + $value[] = $_POST['default_skin']; + + /* default lang */ + $name[] = 'defaultlang'; + $value[] = $_POST['default_lang']; + + /* limit users */ + $name[] = 'limit_users'; + $value[] = $_POST['limit_users']; + + /* limit posts in topic */ + $name[] = 'limit_tpid'; + $value[] = $_POST['limit_tpid']; + + /* limit topics in forum*/ + $name[] = 'limit_ftid'; + $value[] = $_POST['limit_ftid']; + + /* meta keywords */ + $name[] = 'meta_keywords'; + $value[] = strip_tags($_POST['meta_keywords']); + + /* meta description */ + $name[] = 'meta_description'; + $value[] = strip_tags($_POST['meta_description']); + + /* show queries */ + $name[] = 'show_time_generation'; + $value[] = (!isset($_POST['allow_time_generation'])) ? 0 : 1; + + /* enable_confirms */ + $name[] = 'enable_confirms'; + $value[] = (!isset($_POST['enable_confirms'])) ? 0 : 1; + + /* enable_confirms */ + $name[] = 'ip_post_for_mod'; + $value[] = (!isset($_POST['allow_ip_for_mods'])) ? 0 : 1; + + /* use censorlist */ + $name[] = 'use_censorlist'; + $value[] = (!isset($_POST['enable_censorlist'])) ? 0 : 1; + + /* enable warns */ + $name[] = 'allow_warns'; + $value[] = (!isset($_POST['enable_warnings'])) ? 0 : 1; + + /* warns in topic */ + $name[] = 'warns_in_topic'; + $value[] = (!isset($_POST['warnings_in_topic'])) ? 0 : 1; + + //allow_email + $name[] = 'allow_send_email'; + $value[] = (!isset($_POST['enable_send_email'])) ? 0 : 1; + + //allow_upload_avatars + $name[] = 'allow_upload_avatars'; + $value[] = (!isset($_POST['allow_upload_avatars'])) ? 0 : 1; + + /* allow shoutbox */ + $name[] = 'view_shoutbox'; + $value[] = (!isset($_POST['allow_shoutbox'])) ? 0 : 1; + + /* shoutbox max time*/ + $name[] = 'shoutbox_max_time'; + $value[] = (!is_numeric($_POST['shoutbox_max_time'])) ? '14400' : $_POST['shoutbox_max_time']; + + /* color mod */ + $name[] = 'color_mod'; + $value[] = ($_POST['color_mod']=='') ? 'green' : strip_tags($_POST['color_mod']); + + /* color admin */ + $name[] = 'color_admin'; + $value[] = ($_POST['color_admin']=='') ? 'red' : strip_tags($_POST['color_admin']); + + /* av max x */ + $name[] = 'max_av_x'; + $value[] = (!is_numeric($_POST['max_av_x'])) ? '150' : $_POST['max_av_x']; + + /* av max y */ + $name[] = 'max_av_y'; + $value[] = (!is_numeric($_POST['max_av_y'])) ? '150' : $_POST['max_av_y']; + + /* av max filesize */ + $name[] = 'max_av_filesize'; + $value[] = (!is_numeric($_POST['max_av_filesize'])) ? '102400' : ($_POST['max_av_filesize'] * 1024); + + /* sig len */ + $name[] = 'sig_len'; + $value[] = (!is_numeric($_POST['sig_len'])) ? '200' : $_POST['sig_len']; + + /* antiflood time */ + $name[] = 'time_antiflood'; + $value[] = (!is_numeric($_POST['time_antiflood'])) ? '30' : $_POST['time_antiflood']; + + /* tables width */ + $name[] = 'tables_width'; + $value[] = (!is_numeric($_POST['tables_width'])) ? '900' : $_POST['tables_width']; + + /* sig len */ + $name[] = 'sig_len'; + $value[] = (!is_numeric($_POST['sig_len'])) ? '200' : $_POST['sig_len']; + + /* new password len */ + $name[] = 'newpasswd_len'; + $value[] = (!is_numeric($_POST['newpasswd_len'])) ? '6' : $_POST['newpasswd_len']; + + /* shoutbox_max_msgs */ + $name[] = 'shoutbox_max'; + $value[] = (!is_numeric($_POST['shoutbox_limit'])) ? '50' : $_POST['shoutbox_limit']; + + $count_o = count($name); + for($i=0;$i<$count_o;$i++) + { + $sql = "UPDATE `".CONFIG_TABLE."` SET `value`='".$value[$i]."' WHERE `name`='".$name[$i]."'"; + DataBase::sql_query($sql, 'GENERAL', 'Could not update script config'); + } + //end... + unset($name, $value, $count_o, $sql); + admin_message_forum($lng['forum_config_modernized'],'admin_script.php'); + } +} +else +{ + $ERROR='./template/blank.tpl'; +} +//add skin variables +$skin = array( +'main_beam'=>$lng['scriptconfig'], +'L.submit'=>$lng['submit'], +'L.reset'=>$lng['reset'], +'L.general_preferences'=>$lng['general_preferences'], +'L.positioning'=>$lng['positioning_preferences'], +'L.other'=>$lng['other'], +'L.users'=>$lng['users_preferences'], +'L.forum_path'=>$lng['forum_path'], +'L.forum_path.D'=>$lng['t_forum_path'], +'forum_path'=>$forum_config['forumpatch'], +'L.forum_name'=>$lng['forum_name'], +'L.forum_desc'=>$lng['forum_description'], +'forum_desc'=>$forum_config['forumdesc'], +'forum_name'=>$forum_config['forumname'], +'L.forum_disabled'=>$lng['forum_disabled'], +'L.forum_disabled.D'=>$lng['t_forum_disabled'], +'forum_disabled'=>$forum_config['disable_forum'], +'L.default_skin'=>$lng['default_skin'], +'L2.default_skin'=>$lng['select_skin'], +'OPTIONS.default_skin'=>AddSkins(), +'L.default_lang'=>$lng['default_lang'], +'L2.default_lang'=>$lng['select_lang'], +'OPTIONS.default_lang'=>AddLangs(), +'L.meta_keywords'=>$lng['meta_keywords'], +'meta_keywords'=>$forum_config['meta_keywords'], +'L.meta_description'=>$lng['meta_description'], +'meta_description'=>$forum_config['meta_description'], +'L.allow'=>$lng['allow'], +'L.time_generation'=>$lng['show_time_generation'], +'OPTION.time_generation'=>($forum_config['show_time_generation']) ? 'checked="checked"' : '', +'L.enable_censorlist'=>$lng['enable_censorlist'], +'OPTION.enable_censorlist'=>($forum_config['use_censorlist']) ? 'checked="checked"' : '', +'L.enable_warnings'=>$lng['warns_enabled'], +'OPTION.enable_warnings'=>($forum_config['allow_warns']) ? 'checked="checked"' : '', +'L.allow_ip_for_mods'=>$lng['allow_ip_for_mods'], +'OPTION.allow_ip_for_mods'=>($forum_config['ip_post_for_mod']) ? 'checked="checked"' : '', +'L.warnings_in_topic'=>$lng['warns_in_topic'], +'OPTION.warnings_in_topic'=>($forum_config['warns_in_topic']) ? 'checked="checked"' : '', +'L.enable_confirms'=>$lng['enable_confirms'], +'OPTION.enable_confirms'=>($forum_config['enable_confirms']) ? 'checked="checked"' : '', +'L.enable_send_email'=>$lng['enable_send_email'], +'OPTION.enable_send_email'=>($forum_config['allow_send_email']) ? 'checked="checked"' : '', +'L.allow_upload_avatars'=>$lng['allow_upload_avatars'], +'OPTION.allow_upload_avatars'=>($forum_config['allow_upload_avatars']) ? 'checked="checked"' : '', +'L.select_value'=>$lng['select_value'], +'L.limit_users'=>$lng['limit_users'], +'OPTIONS.limit_users'=>AddPages2($forum_config['limit_users']), +'L.posts_in_topic'=>$lng['limit_posts'], +'L.scriptoptions'=>$lng['scriptconfig'], +'OPTIONS.limit_tpid'=>AddPages2($forum_config['limit_tpid']), +'L.topics_in_forum'=>$lng['limit_topics'], +'OPTIONS.limit_ftid'=>AddPages2($forum_config['limit_ftid']), +'L.admin_mod'=>$lng['admin_mod_preferences'], +'L.shoutbox'=>$lng['shoutbox_preferences'], +'L.allow_shoutbox'=>$lng['allow_shoutbox'], +'OPTION.allow_shoutbox'=>($forum_config['view_shoutbox']) ? 'checked="checked"' : '', +'L.shoutbox_max_time'=>$lng['shoutbox_time_clear'], +'OPTION.shoutbox_max_time'=>$forum_config['shoutbox_max_time'], +'L.shoutbox_limit'=>$lng['shoutbox_max_view'], +'OPTION.shoutbox_limit'=>$forum_config['shoutbox_max'], + +/* color mod */ +'L.color_mod'=>$lng['color_mod'], +'OPTION.color_mod' => $forum_config['color_mod'], + +/* color admin */ +'L.color_admin'=>$lng['color_admin'], +'OPTION.color_admin' => $forum_config['color_admin'], + +/* max avatar x */ +'L.max_av_x'=>$lng['max_av_x'], +'OPTION.max_av_x' => $forum_config['max_av_x'], + +/* max avatar y */ +'L.max_av_y'=>$lng['max_av_y'], +'OPTION.max_av_y' => $forum_config['max_av_y'], + +/* max avatar filesize */ +'L.max_av_filesize'=>$lng['max_av_filesize'], +'OPTION.max_av_filesize' => ($forum_config['max_av_filesize'] / 1024), + +/* signature len */ +'L.sig_len'=>$lng['sig_len'], +'OPTION.sig_len' => $forum_config['sig_len'], + +/* antiflood time */ +'L.time_antiflood'=>$lng['time_antiflood'], +'OPTION.time_antiflood' => $forum_config['time_antiflood'], + +/* tables width */ +'L.tables_width'=>$lng['tables_width'], +'OPTION.tables_width' => $forum_config['tables_width'], + +/* new password len */ +'L.newpasswd_len'=>$lng['newpasswd_len'], +'OPTION.newpasswd_len' => $forum_config['newpasswd_len'], + +/* sig len */ +'L.sig_len'=>$lng['sig_len'], +'OPTION.sig_len'=>$forum_config['sig_len'] +); +//do it! +Admin_Over::GenerateHeader(); +include('./template/admin_script.tpl'); +include('./template/overall_footer.tpl'); +?> diff --git a/admin/admin_users.php b/admin/admin_users.php new file mode 100644 index 0000000..13461d2 --- /dev/null +++ b/admin/admin_users.php @@ -0,0 +1,458 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_topic.php'); +include('./../includes/classes/secure.php'); +$default_lang = Admin_Over::DefaultLang(); +include('./../lngs/'.$default_lang.'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} + +if (!isset($_GET['mode'])) +{ + header('Location: admin_users.php?mode=view'); +} +switch($_GET['mode']) +{ + case 'delete': + { + $uid = intval($_GET['id']); + + //delete from users table + $sql = "DELETE FROM ".USERS_TABLE." WHERE `u_id`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete user.'); + + //delete from PM SentBox table + $sql = "DELETE FROM ".PM_SENTBOX_TABLE." WHERE `u_n_id`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete user sentbox messages.'); + + //update PM InBox table -> change u_n_id to Anonymous + $sql = "UPDATE ".PM_INBOX_TABLE." SET `u_n_id`='-1' WHERE `u_n_id`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could not update user inbox messages.'); + + //update user posts -> change u_id to Anonymous + $sql = "UPDATE ".POSTS_TABLE." SET `u_id`='-1' WHERE `u_id`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could edit post.'); + + //update shoutbox messages -> change u_id to Anonymous + $sql = "UPDATE ".SHOUTBOX_TABLE." SET `u_id`='-1' WHERE `u_id`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could edit shoutbox messages.'); + + //update user topics -> change u_id to Anonymous + $sql = "UPDATE ".TOPICS_TABLE." SET `author`='-1' WHERE `author`='$uid'"; + DataBase::sql_query($sql,'GENERAL','Could edit post.'); + + //back to admin users + admin_message_forum($lng['user_deleted'],'admin_users.php'); + break; + } + case 'edit': + { + $uid = intval($_GET['id']); + $msg=''; + $errors = true; + if (isset($_POST['email'])) + { + if ( ereg ("^.+@.+\..+$", $_POST['email'])) + { + //if user changing password... + if ($_POST['password']!='') + { + if (md5($_POST['password'])==User::UserInformation($_SESSION['uid'],'pass')) + { + if ($_POST['newpassword']==$_POST['confirmpassword']) + { + User::UpdatePassword($_SESSION['uid'], md5(strip_tags($_POST['newpassword']))); + $errors = false; + } + else + { + $message=$lng['incorrect_password2']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message=$lng['incorrect_password']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + if ($_POST['default_skin']!='-1') + { + if ($_POST['default_lang']!='-1') + { + if ($_POST['limit_tpid']!='-1') + { + if ($_POST['limit_ftid']!='-1') + { + if ($_POST['limit_users']!='-1') + { + if (strlen(trim($_POST['sig']))<$forum_config['sig_len']) + { + $errors = false; + } + else + { + $message = $lng['signature_too_long']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_users']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_ftid']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_tpid']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message=$lng['invalid_lang']; + $msg = './template/post_error_body.tpl'; + } + } + else + { + $message=$lng['invalid_skin']; + $msg = './template/post_error_body.tpl'; + } + } + if (!$errors) + { + $_POST['ggnumber']=strip_tags($_POST['ggnumber']); + $_POST['interests']=strip_tags($_POST['interests']); + $_POST['sig']=Secure::TagsReplace($_POST['sig']); + $allow_shoutbox = (isset($_POST['allow_shoutbox'])) ? '1' : 0; + if (isset($_FILES['avatar_file']['tmp_name'])) + { + $extension = substr($_FILES['avatar_file']['name'],(strlen($_FILES['avatar_file']['name'])-3)); + if (($extension == 'jpg') or ($extension == 'gif')) + { + if (file_exists(AV_CATALOG.'av-'.$_SESSION['uid'].'.jpg')) + { + unlink(AV_CATALOG.'av-'.$_SESSION['uid'].'.jpg'); + } + if (file_exists(AV_CATALOG.'av-'.$_SESSION['uid'].'.gif')) + { + unlink(AV_CATALOG.'av-'.$_SESSION['uid'].'.gif'); + } + move_uploaded_file($_FILES['avatar_file']['tmp_name'], AV_CATALOG.'av-'.$_SESSION['uid'].'.'.$extension); + $_POST['avatar'] = AV_CATALOG.'av-'.$_SESSION['uid'].'.'.$extension; + } + else + { + $_POST['avatar'] = strip_tags($_POST['avatar']); + } + } + else + { + $_POST['avatar'] = strip_tags($_POST['avatar']); + } + User::UpdateAdminPools($uid,strip_tags($_POST['posts']),$_POST['user_rank'],$_POST['user_active'], strip_tags($_POST['nick'])); + User::UpdateProfile($uid,$_POST['ggnumber'],$_POST['email'],$_POST['interests'], $_POST['sig'],$_POST['avatar'],$_POST['allow_qr'],$_POST['allow_email'],$_POST['allow_gg'],$_POST['default_skin'],$_POST['default_lang'], $_POST['limit_tpid'],$_POST['limit_ftid'], $_POST['limit_users'], $allow_shoutbox); + admin_message_forum($lng['profile_modernized'],'admin_users.php?mode=edit&id='.$uid); + } + } + else + { + $message=$lng['invalid_email']; + $msg = './template/post_error_body.tpl'; + } + } + $sql = "SELECT * FROM ".USERS_TABLE." WHERE `u_id`='$uid'"; + $userinfo = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information')); + if ($userinfo['rank']=='') + { + admin_message_forum($lng['no_user'],'admin_users.php?mode=view'); + } + //add skin variables + $skin = array( + //labels profile + 'L.admin_users'=>$lng['admin_users'], + 'lnick'=>$lng['user_name'], + 'lpass'=>$lng['lpassw'], + 'lnewpass'=>$lng['new_password'], + 'lcpass'=>$lng['confirm_password'], + 'lemail'=>'E-mail', + 'lgg'=>$lng['gg_number'], + 'lallow_gg'=>$lng['allow_gg'], + 'lallow_email'=>$lng['allow_email'], + 'lallow_qr'=>$lng['allow_qr'], + 'linterests'=>$lng['luinterests'], + 'lsig'=>$lng['sig'], + 'lavaddr'=>$lng['picture_adress'], + 'lovpr'=>$lng['general_settings'], + 'L.select_value'=>$lng['select_value'], + 'L.limit_users'=>$lng['limit_users'], + 'OPTIONS.limit_users'=>Admin_Over::AddPages2($userinfo['limit_users']), + 'L.posts_in_topic'=>$lng['limit_posts'], + 'OPTIONS.limit_tpid'=>Admin_Over::AddPages2($userinfo['limit_tpid']), + 'L.topics_in_forum'=>$lng['limit_topics'], + 'OPTIONS.limit_ftid'=>Admin_Over::AddPages2($userinfo['limit_ftid']), + 'lupr'=>$lng['profile_settings'], + 'lspr'=>$lng['signature_settings'], + 'ladmpr'=>$lng['admin_settings'], + 'luser_rank'=>$lng['user_rank'], + 'luser_actived'=>$lng['user_actived'], + 'lposts'=>$lng['posts'], + 'posts'=>$userinfo['posts'], + 'ldefault_lang'=>$lng['default_lang'], + 'default_lang'=>Admin_Over::AddLangs(), + 'l2default_lang'=>$lng['select_lang'], + 'ldefault_skin'=>$lng['default_skin2'], + 'default_skin'=>Admin_Over::AddSkins(), + 'l2default_skin'=>$lng['select_skin'], + 'lapr'=>$lng['avatar_settings'], + 'lsubmit'=>$lng['save'], + 'allow'=>$lng['allow'], + 'lreset'=>$lng['reset'], + 'nick'=>$userinfo['nick'], + 'user'=>$lng['user'], + 'lallow_shoutbox'=>$lng['allow_shoutbox'], + 'allow_shoutbox'=>($userinfo['view_shoutbox']==1) ? 'checked="checked"' : '', + //options profile + 'sig'=>$userinfo['sig'], + 'avatar'=>$userinfo['avatar'], + 'interests'=>$userinfo['interests'], + 'email'=>$userinfo['email'], + 'gg'=>$userinfo['gg'], + //options values + 'option_no_gg'=>($userinfo['allow_gg']==0) ? 'checked="checked"' : '', + 'option_no_email'=>($userinfo['allow_email']==0) ? 'checked="checked"' : '', + 'option_no_qr'=>($userinfo['allow_qr']==0) ? 'checked="checked"' : '', + 'option_yes_gg'=>($userinfo['allow_gg']==1) ? 'checked="checked"' : '', + 'option_yes_email'=>($userinfo['allow_email']==1) ? 'checked="checked"' : '', + 'option_yes_qr'=>($userinfo['allow_qr']==1) ? 'checked="checked"' : '', + 'option_no_ua'=>($userinfo['active']==0) ? 'checked="checked"' : '', + 'option_yes_ua'=>($userinfo['active']==1) ? 'checked="checked"' : '', + //user rank + 'option_0_rank'=>($userinfo['rank']==0) ? 'checked="checked"' : '', + 'option_1_rank'=>($userinfo['rank']==1) ? 'checked="checked"' : '', + 'option_2_rank'=>($userinfo['rank']==2) ? 'checked="checked"' : '', + 'no'=>$lng['no'], + 'lavfile'=>$lng['avatar_file'], + 'yes'=>$lng['yes'] + ); + if ($msg=='') + { + $msg = './template/blank.tpl'; + } + Admin_Over::GenerateHeader(); + include('./template/user_edit_body.tpl'); + include('./template/overall_footer.tpl');; + break; + } + case 'view': + { + if (isset($_GET['page'])&&($_GET['page']!=1)) + { + if (!is_numeric($_GET['page'])) + { + die('Hacking attempt'); + } + $value = ($_GET['page']-1)*30; + $limit = 'LIMIT '.$value . ', 30'; + $page = $_GET['page']; + } + else + { + $limit = 'LIMIT 0, 30'; + $page=1; + } + $count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`u_id`) as `u_id` + FROM ".USERS_TABLE,'GENERAL','Could not obtain count amout of users')); + $count = $count['u_id']; + $count = ceil($count /30); + if(isset($_GET['page']) && ($_GET['page']>$count)) + { + message_forum($lng['invalidpage'],'admin_users.php'); + } + if (isset($_COOKIE['users_desc'], $_POST['desc'])) + { + unset($_COOKIE['users_desc']); + } + if (isset($_POST['sort'],$_COOKIE['users_sort'])) + { + unset($_COOKIE['users_sort']); + } + if (!isset($_COOKIE['users_desc'])) + { + if (isset($_POST['desc'])) + { + switch($_POST['desc']) + { + case 'yes': + { + @setcookie('users_desc','desc',time()+3600); + $_COOKIE['users_desc'] = 'desc'; + $desc = 'DESC'; + break; + } + case 'no': + { + @setcookie('users_desc','no',time()+3600); + $_COOKIE['users_desc'] = 'no'; + $desc = ''; + break; + } + } + } + else + { + @setcookie('users_desc','no',time()+3600); + $_COOKIE['users_desc'] = 'no'; + $desc = ''; + } + } + else + { + $desc = ($_COOKIE['users_desc']=='desc') ? 'DESC' : ''; + } + if (!isset($_COOKIE['users_sort'])) + { + if (isset($_POST['sort'])) + { + switch($_POST['sort']) + { + case 'regdate': + { + @setcookie('users_sort','regdate',time()+3600); + $_COOKIE['users_sort'] = 'regdate'; + break; + } + case 'lastvisit': + { + @setcookie('users_sort','lastvisit',time()+3600); + $_COOKIE['users_sort'] = 'lastvisit'; + break; + } + case 'uname': + { + @setcookie('users_sort','uname',time()+3600); + $_COOKIE['users_sort'] = 'uname'; + break; + } + case 'posts': + { + @setcookie('users_sort','posts',time()+3600); + $_COOKIE['users_sort'] = 'posts'; + break; + } + } + } + else + { + @setcookie('users_sort','regdate',time()+3600); + $_COOKIE['users_sort'] = 'regdate'; + } + } + //add skin variables + $skin = array( + 'ldesc' => $lng['desc'], + 'lselectusers'=>$lng['sort_u_by'], + 'ltitle'=>$lng['admin_users'], + 'lregdate'=>$lng['luregister'], + 'llastvisit'=>$lng['lulastvisit'], + 'lposts'=>$lng['posts'], + 'luname'=>$lng['user_name'], + 'lgo'=>$lng['lgo'], + 'desc_yes_option'=>(($_COOKIE['users_desc']=='desc') || ((isset ($_POST['desc'])) && ($_POST['desc']=='yes'))) ? 'selected="selected"' : '', + 'desc_no_option'=>(($_COOKIE['users_desc']=='no') || ((isset ($_POST['desc'])) && ($_POST['desc']=='no'))) ? 'selected="selected"' : '', + 'regdate_option'=>(($_COOKIE['users_sort']=='regdate') || ((isset ($_POST['sort'])) && ($_POST['sort']=='posts'))) ? 'selected="selected"' : '', + 'lastvisit_option'=>(($_COOKIE['users_sort']=='lastvisit') || ((isset ($_POST['sort'])) && ($_POST['sort']=='lastvisit'))) ? 'selected="selected"' : '', + 'posts_option'=>(($_COOKIE['users_sort']=='posts') || ((isset ($_POST['sort'])) && ($_POST['sort']=='posts'))) ? 'selected="selected"' : '', + 'uname_option'=>(($_COOKIE['users_sort']=='uname') || ((isset ($_POST['sort'])) && ($_POST['sort']=='uname'))) ? 'selected="selected"' : '', + 'lyes'=>$lng['yes'], + 'lno'=>$lng['no'] + ); + //do it! + Admin_Over::GenerateHeader(); + include('./template/users_beam_body.tpl'); + switch($_COOKIE['users_sort']) + { + case 'regdate': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `regdate` $desc $limit;"; + break; + } + case 'lastvisit': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `lastvisit` $desc $limit;"; + break; + } + case 'uname': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `nick` $desc $limit;"; + break; + } + case 'posts': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `posts` $desc $limit;"; + break; + } + } + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain user information.'); + while($result = mysql_fetch_array($query)) + { + $skin = array( + 'id'=>$result['u_id'], + 'uname'=>Topic::UserName($result['nick'], $result['rank']), + 'regdate'=>date('d-m-Y, G:i',$result['regdate']), + 'lastvisit'=>($result['lastvisit']!='0') ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'], + 'posts'=>$result['posts'], + 'c_del_user'=>$lng['c_delete_user'] + ); + include('./template/user_item_add_body.tpl'); + } + $skin = array( + 'option_pages'=>Admin_Over::AddPages(), + 'lwith'=>$lng['with'], + 'lpage'=>$lng['page'], + 'lpages'=>$count + ); + include('./template/users_end_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + default: + { + header('Location: admin_users.php?mode=view'); + break; + } +} +?> diff --git a/admin/banlist.php b/admin/banlist.php new file mode 100644 index 0000000..95f114b --- /dev/null +++ b/admin/banlist.php @@ -0,0 +1,377 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +include('./../includes/classes/class_pms.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../includes/classes/secure.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +if (!isset($_GET['mode'])) +{ + header('Location: banlist.php?mode=view'); +} + +switch($_GET['mode']) +{ + case 'add': + { + switch($_GET['submode']) + { + //ban for user id only + case 'user': + { + if (isset($_POST['u_id'],$_POST['motive'])) + { + $ban_ip = '0.0.0.0'; + $ban_uid = (($_POST['u_id']=='') || ($_POST['u_id']=='No profile') || ($_POST['u_id']=='Guest')) ? '-2' + : strip_tags(User::UserIdByNick(strip_tags($_POST['u_id']))); + if ($ban_uid==$_SESSION['uid']) + { + admin_message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + else + { + if (User::UserInformation($ban_uid,'rank')==2) + { + admin_message_forum($lng['no_ban_admin'],'banlist.php?mode=view'); + } + } + if (($ban_ip=='127.0.0.1') || ($ban_ip==$_SERVER['REQUEST_URI'])) + { + message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + $ban_motive = strip_tags($_POST['motive']); + $sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('', '$ban_uid', '$ban_ip', '$ban_motive')"; + DataBase::sql_query($sql,'GENERAL','Could not update add ban.'); + admin_message_forum($lng['ban_added'],'banlist.php?mode=view'); + } + else + { + $_POST['motive'] = ''; + $_POST['u_id'] = 'No profile'; + $skin = array( + 'L.banlist'=>$lng['admin_banlist'], + 'action'=>'banlist.php?mode=add&submode=user', + 'L.edit_ban'=>$lng['banlist_add_user'], + 'L.user_name'=>$lng['user_name'], + 'L.motive' => $lng['motive'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.user_name.HELP' => $lng['banlist_info_1'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_add_user_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + //ban for ip only + case 'ip': + { + if (isset($_POST['ip'],$_POST['motive'])) + { + $ban_ip = strip_tags($_POST['ip']); + $ban_uid = '-2'; + $ban_motive = strip_tags($_POST['motive']); + if ($ban_uid==$_SESSION['uid']) + { + admin_message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + else + { + if (User::UserInformation($ban_uid,'rank')==2) + { + admin_message_forum($lng['no_ban_admin'],'banlist.php?mode=view'); + } + } + if (($ban_ip=='127.0.0.1') || ($ban_ip==$_SERVER['REQUEST_URI'])) + { + message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + $bid =$bid = @mysql_fetch_array(DataBase::sql_query("SELECT + `b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL', + 'Could not obtain last ban id')); + $bid = $bid['b_id']; + $bid = $bid +1; + $sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$ban_uid', '$ban_ip', '$ban_motive')"; + DataBase::sql_query($sql,'GENERAL','Could not update add ban.'); + admin_message_forum($lng['ban_added'],'banlist.php?mode=view'); + } + else + { + $_POST['ip']='0.0.0.0'; + $_POST['motive'] = ''; + $skin = array( + 'L.banlist'=>$lng['admin_banlist'], + 'action'=>'banlist.php?mode=add&submode=ip', + 'L.edit_ban'=>$lng['banlist_add_ip'], + 'L.user_name'=>$lng['user_name'], + 'L.motive' => $lng['motive'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.ip.HELP' => $lng['banlist_info_2'], + 'L.user_name.HELP' => $lng['banlist_info_1'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_add_ip_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + //ban for ip & user id + case 'all': + { + if (isset($_POST['ip'],$_POST['u_id'],$_POST['motive'])) + { + $ban_ip = strip_tags($_POST['ip']); + $ban_uid = (($_POST['u_id']=='') || ($_POST['u_id']=='No profile') || ($_POST['u_id']=='Guest')) ? '-2' + : User::UserIdByNick(strip_tags($_POST['u_id'])); + $ban_motive = strip_tags($_POST['motive']); + if ($ban_uid==$_SESSION['uid']) + { + admin_message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + else + { + if (User::UserInformation($ban_uid,'rank')==2) + { + admin_message_forum($lng['no_ban_admin'],'banlist.php?mode=view'); + } + } + if (($ban_ip=='127.0.0.1') || ($ban_ip==$_SERVER['REQUEST_URI'])) + { + message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + $bid =$bid = @mysql_fetch_array(DataBase::sql_query("SELECT + `b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL', + 'Could not obtain last ban id')); + $bid = $bid['b_id']; + $bid = $bid +1; + $sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$ban_uid', '$ban_ip', '$ban_motive')"; + DataBase::sql_query($sql,'GENERAL','Could not update add ban.'); + admin_message_forum($lng['ban_added'],'banlist.php?mode=view'); + } + else + { + $_POST['ip']= (isset($_GET['ip'])) ? strip_tags($_GET['ip']) : '0.0.0.0'; + $_POST['motive'] = ''; + $_POST['u_id'] = (isset($_GET['uid'])) ? User::UserInformation(intval($_GET['uid']),'nick') : 'No profile'; + $skin = array( + 'L.banlist'=>$lng['admin_banlist'], + 'action'=>'banlist.php?mode=add&submode=all', + 'L.main_beam'=>$lng['edit_word'], + 'L.edit_ban'=>$lng['banlist_add_all'], + 'L.user_name'=>$lng['user_name'], + 'L.motive' => $lng['motive'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.ip.HELP' => $lng['banlist_info_2'], + 'L.user_name.HELP' => $lng['banlist_info_1'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + //ban with file + case 'file': + { + if (isset($_FILES['file'],$_POST['motive'])) + { + $ban_uid = '-2'; + $ban_motive = strip_tags($_POST['motive']); + $catalog = '../tmp/'; + if(!move_uploaded_file($_FILES['file']['tmp_name'], $catalog.$_FILES['file']['name'])) + { + message_die('GENERAL','Could not upload file.',''); + } + $open = fopen($catalog.$_FILES['file']['name'],'r'); + $file = fread($open, filesize($catalog.$_FILES['file']['name'])); + $item = @explode("\n",$file); + $bid = $bid = @mysql_fetch_array(DataBase::sql_query("SELECT + `b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL', + 'Could not obtain last ban id')); + $bid = $bid['b_id']; + $bid = $bid +1; + for($i=0;$i$lng['admin_banlist'], + 'action'=>'banlist.php?mode=add&submode=file', + 'L.main_beam'=>$lng['edit_word'], + 'L.edit_ban'=>$lng['banlist_add_from_file'], + 'L.file_name'=>$lng['file_name'], + 'L.motive' => $lng['motive'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.file.HELP' => $lng['banlist_info_3'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_add_file_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + } + break; + } + case 'delete': + { + $bid = $_GET['id']; + $sql = "DELETE FROM ".BANLIST_TABLE." WHERE `b_id`='$bid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete banlist item.'); + admin_message_forum($lng['ban_deleted'],'banlist.php?mode=view'); + break; + } + case 'edit': + { + if (isset($_POST['ip'],$_POST['u_id'],$_POST['motive'],$_GET['id'])) + { + $ban_ip = strip_tags($_POST['ip']); + $ban_uid = (($_POST['u_id']=='') || ($_POST['u_id']!='No profile') || ($_POST['u_id']!='Guest')) ? '-2' + : User::UserIdByNick(strip_tags($_POST['u_id'])); + $ban_motive = $_POST['motive']; + if ($ban_uid==$_SESSION['uid']) + { + admin_message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + else + { + if (User::UserInformation($ban_uid,'rank')==2) + { + admin_message_forum($lng['no_ban_admin'],'banlist.php?mode=view'); + } + } + if (($ban_ip=='127.0.0.1') || ($ban_ip==$_SERVER['REQUEST_URI'])) + { + message_forum($lng['no_ban_me'],'banlist.php?mode=view'); + } + $bid = intval($_GET['id']); + $sql = "UPDATE ".BANLIST_TABLE." SET + `IP`='$ban_ip', + `u_id`='$ban_uid', + `motive`='$ban_motive' + WHERE `b_id`='$bid'"; + DataBase::sql_query($sql,'GENERAL','Could not update ban.'); + admin_message_forum($lng['ban_edited'],'banlist.php?mode=view'); + } + else + { + $bid = $_GET['id']; + $sql = "SELECT * FROM ".BANLIST_TABLE." WHERE `b_id`='$bid'"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain banlist item information'); + $result = @mysql_fetch_array($query); + $_POST['ip']=$result['IP']; + $_POST['motive'] = $result['motive']; + $_POST['u_id'] = ($result['u_id']>0) ? User::UserInformation($result['u_id'],'nick') : 'No profile'; + $skin = array( + 'L.banlist'=>$lng['admin_banlist'], + 'action'=>'banlist.php?mode=edit&id='.$bid, + 'L.main_beam'=>$lng['edit_word'], + 'L.edit_ban'=>$lng['banlist_edit_ban'], + 'L.user_name'=>$lng['user_name'], + 'L.motive' => $lng['motive'], + 'L.reset'=>$lng['reset'], + 'L.save'=>$lng['submit'], + 'L.ip.HELP' => $lng['banlist_info_2'], + 'L.user_name.HELP' => $lng['banlist_info_1'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + case 'clear': + { + $sql = "TRUNCATE `".BANLIST_TABLE."`"; + DataBase::sql_query($sql, 'GENERAL','Could not empty banlist'); + admin_message_forum($lng['banlist_cleanout'],'banlist.php?mode=view'); + } + case 'view': + { + $query = DataBase::sql_query("SELECT `u_id`, `nick` FROM ".USERS_TABLE,'GENERAL','Could not obtain user information'); + while($result = @mysql_fetch_array($query)) + { + $user[$result['u_id']]['nick'] = $result['nick']; + } + $sql = "SELECT * FROM ".BANLIST_TABLE.""; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain banlist items'); + $skin=array( + 'L.banlist'=>$lng['admin_banlist'], + 'L.select_mode'=>$lng['what_do_you_want'], + 'L.add_user'=>$lng['banlist_add_user'], + 'L.add_ip'=>$lng['banlist_add_ip'], + 'L.add_all'=>$lng['banlist_add_all'], + 'L.add_file'=>$lng['banlist_add_from_file'], + 'L.clean_banlist' => $lng['banlist_clean'] + ); + Admin_Over::GenerateHeader(); + include('./template/banlist_view_body.tpl'); + if (@mysql_num_rows($query)<1) + { + echo '

'.$lng['banlist_no_items'].'!

'; + } + else + { + while($item = @mysql_fetch_array($query)) + { + $skin = array( + 'user_name'=>($item['u_id']>-1) ? $user[$item['u_id']]['nick'] : 'No profile', + 'ip'=> $item['IP'], + 'motive' => $item['motive'], + 'b_id'=>$item['b_id'], + 'L.delete'=>$lng['delete'], + 'L.edit'=>$lng['edit'] + ); + include('./template/banlist_item_add.tpl'); + } + } + echo ''; + include('./template/overall_footer.tpl'); + break; + } + default: + { + header('Location: banlist.php?mode=view'); + break; + } +} +?> diff --git a/admin/censorlist.php b/admin/censorlist.php new file mode 100644 index 0000000..bfa7189 --- /dev/null +++ b/admin/censorlist.php @@ -0,0 +1,205 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +include('./../includes/classes/class_pms.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../includes/classes/secure.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} + +if (!isset($_GET['mode'])) +{ + header('Location: censorlist.php?mode=main'); +} +switch($_GET['mode']) +{ + case 'addfile': + { + if (isset($_FILES['file'])) + { + $catalog = '../tmp/'; + if(!move_uploaded_file($_FILES['file']['tmp_name'], $catalog.$_FILES['file']['name'])) + { + message_die('GENERAL','Could not upload file.',''); + } + $open = fopen($catalog.$_FILES['file']['name'],'r'); + $file = fread($open, filesize($catalog.$_FILES['file']['name'])); + $item = @explode(',',$file); + $sql = "SELECT `w_id` FROM ".CENSORLIST_TABLE." ORDER BY `w_id` DESC"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last word id')); + $last = $last['w_id']; + $last= $last +1; + for($i=0;$i$lng['add_from_file'], + 'L.file_name'=>$lng['file_name'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.censorlist'=>$lng['admin_censorlist'] + ); + Admin_Over::GenerateHeader(); + include('./template/censorlist_upload_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + case 'delete': + { + $wid = intval($_GET['w']); + $sql = "DELETE FROM ".CENSORLIST_TABLE." WHERE `w_id`='$wid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete word.'); + admin_message_forum($lng['word_deleted'],'censorlist.php?mode=view'); + break; + } + case 'addword': + { + if (isset($_POST['word'])) + { + $word = strip_tags($_POST['word']); + $sql = "SELECT `w_id` FROM ".CENSORLIST_TABLE." ORDER BY `w_id` DESC"; + $last = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain last word id')); + $last = $last['w_id']; + $last= $last +1; + DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word')",'GENERAL','Could not add censored word.'); + admin_message_forum($lng['word_added'],'censorlist.php'); + } + else + { + $_POST['word']=''; + $skin = array( + 'action'=>'censorlist.php?mode=addword', + 'L.main_beam'=>$lng['add_word'], + 'L.word_name'=>$lng['word_name'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.censorlist'=>$lng['admin_censorlist'] + ); + Admin_Over::GenerateHeader(); + include('./template/censorlist_add_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + case 'edit': + { + if (isset($_POST['word'],$_GET['w'])) + { + $word = strip_tags(trim($_POST['word'])); + $wid = intval($_GET['w']); + DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word' WHERE `w_id`='$wid'",'GENERAL','Could not update censored word.'); + admin_message_forum($lng['word_edited'],'censorlist.php?mode=view'); + } + else + { + $wid = intval($_GET['w']); + $sql = "SELECT * FROM ".CENSORLIST_TABLE." WHERE `w_id`='$wid'"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain censorlist words'); + $result = @mysql_fetch_array($query); + $_POST['word']=$result['word']; + $skin = array( + 'action'=>'censorlist.php?mode=edit&w='.$wid, + 'L.main_beam'=>$lng['edit_word'], + 'L.word_name'=>$lng['word_name'], + 'L.save'=>$lng['submit'], + 'L.reset'=>$lng['reset'], + 'L.censorlist'=>$lng['admin_censorlist'] + ); + Admin_Over::GenerateHeader(); + include('./template/censorlist_add_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + case 'deleteall': + { + DataBase::sql_query("TRUNCATE TABLE ".CENSORLIST_TABLE,'GENERAL','Could not empty censorlist table.'); + admin_message_forum($lng['table_cleanout'],'censorlist.php'); + break; + } + case 'view': + { + $sql = "SELECT * FROM ".CENSORLIST_TABLE." ORDER BY `word`"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain censorlist words'); + $skin = array( + 'L.censorlist'=>$lng['admin_censorlist'], + 'L.view_all_words'=>$lng['view_all_words'] + ); + Admin_Over::GenerateHeader(); + include('./template/censorlist_view_body.tpl'); + if (@mysql_num_rows($query)<1) + { + echo '

'.$lng['no_words'].'!

'; + } + else + { + while($item = @mysql_fetch_array($query)) + { + $skin = array( + 'L.word_name'=>$item['word'], + 'w_id'=>$item['w_id'], + 'L.delete'=>$lng['delete'], + 'L.edit'=>$lng['edit'], + ); + include('./template/censorlist_word_add.tpl'); + } + } + include('./template/overall_footer.tpl'); + break; + } + case 'main': + { + $skin = array( + 'L.show_all_words' => $lng['show_all_words'], + 'L.what_do_you_want'=> $lng['what_do_you_want'], + 'L.delete_all_words' => $lng['delete_all_words'], + 'L.add_from_file' => $lng['add_from_file'], + 'L.add_word' => $lng['add_word'], + 'L.censorlist'=>$lng['admin_censorlist'] + ); + Admin_Over::GenerateHeader(); + include('./template/censorlist_main_body.tpl'); + include('./template/overall_footer.tpl'); + break; + } + default: + { + header('Location: censorlist.php?mode=main'); + break; + } +} +?> diff --git a/admin/check_script.php b/admin/check_script.php new file mode 100644 index 0000000..a77e0b9 --- /dev/null +++ b/admin/check_script.php @@ -0,0 +1,197 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +include('./../admin/check_script_data.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); + +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +$ERROR = './template/blank.tpl'; +//functions .. in this script +function check_size_md5($file) +{ + if ( file_exists($file) ) + { + $result = @filesize($file); + return md5($result); + } + else + { + return false; + } +} +function mysqlversion() +{ + $temp = ''; + $result = mysql_fetch_array(DataBase::sql_query("SELECT VERSION() AS mysql_version",'GENERAL','Could not read mysql version.')); + $result = $result['mysql_version']; + for($i=0;$i<5;$i++) + { + $temp .= $result[$i]; + } + $result = $temp; + unset($temp); + return($result); +} + +function db_size() +{ + $sql = "SHOW TABLE STATUS"; + $db_size = 0; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain database size'); + while ($result = @mysql_fetch_array($query)) + { + $db_size += $result['Index_length']; + } + $db_size = $db_size / 1024; + if ($db_size >=1024) + { + $db_size = $db_size / 1024; + $db_size = round($db_size,2); + $db_size = $db_size.' MB'; + } + else + { + $db_size = round($db_size,2); + $db_size = $db_size.' KB'; + } + return $db_size; +} + +function forum_size($path = './../') +{ + $size = 0; + if (is_dir($path)) + { + if ($dh = opendir($path)) + { + while (($file = readdir($dh)) !== false) + { + if ($file != '.' && $file != '..') + { + if (is_dir($path.$file)) + { + $size+= forum_size($path.$file.'/'); + } + else + { + $size+= filesize($path.$file); + } + } + } + closedir($dh); + } + return $size; + } + else + { + return filesize($path); + } +} +$forum_size = forum_size(); +$forum_size = $forum_size / 1024; +if ($forum_size >=1024) +{ + $forum_size = $forum_size / 1024; + $forum_size = round($forum_size,2); + $forum_size = $forum_size.' MB'; +} +else +{ + $forum_size = round($forum_size,2); + $forum_size = $forum_size.' KB'; +} + +$count =0; + +for($i=0; $i$lng['scriptstat'], +'L.name'=>$lng['name'], +'L.value'=>$lng['value'], + +//php version +'L.php_version'=>$lng['php_version'], +'PHP.version'=>phpversion(), +'PHP.value' => (phpversion()>='4.3.10') ? 'OK' : ' Error - No OK', + +//mysql version +'mySQL.version'=>$sql_version, +'L.mySQL_version'=>$lng['mysql_version'], +'mySQL.value'=>($sql_version>='4.1') ? 'OK' : ' Error - No OK', + +//database size +'L.db_size' => $lng['db_size'], +'db_size' => db_size(), + +//forum size +'L.forum_size' => $lng['forum_size'], +'forum_size' => $forum_size, + +//catalogs writable +'L.cat_name'=>$lng['catalog'], +'cat1.name'=> $folders[0], +'cat1.value'=> (@is_writable($folders[0])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', +'cat2.name'=> $folders[1], +'cat2.value'=> (@is_writable($folders[1])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', +'cat3.name'=> $folders[2], +'cat3.value'=> (!@is_writable($folders[2])) ? ''.$lng['not_writable'].' - OK' : ''.$lng['is_writable'].' Error - No OK', +'successfully' => ($count <1) ? ''.$lng['files_is_good'].' ('.count($script_files).')' : ''.$lng['files_not_good'].$count.'' +); +Admin_Over::GenerateHeader(); +include('./template/check_script.tpl'); +for($i=0; $i$lng['original_sum'], + 'L.sum_actual'=>$lng['actual_sum'], + 'sum_rule'=>$rule, + 'sum_actual'=>$actual, + 'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')' + ); + include('./template/invalidfile_body.tpl'); + } + } +} +include('./template/overall_footer.tpl'); + +?> diff --git a/admin/check_script_data.php b/admin/check_script_data.php new file mode 100644 index 0000000..76210c7 --- /dev/null +++ b/admin/check_script_data.php @@ -0,0 +1,64 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +//size files in md5 +$size_md5['../common.php'] = '426f990b332ef8193a61cc90516c1245'; +$size_md5['../eprofile.php'] = '1868f17c2c15b5eafdc3cce2f5ac97d5'; +$size_md5['../forum.php'] = 'acf666483bc8723fae7feda6f6a9cb7a'; +$size_md5['../groups.php'] = '6b493230205f780e1bc26945df7481e5'; +$size_md5['../index.php'] = 'd71f5142463efcf6dc7be216cf4644b5'; +$size_md5['../login.php'] = 'e275193bc089e9b3ca1aeef3c44be496'; +$size_md5['../moderate.php'] = '6562c5c1f33db6e05a082a88cddab5ea'; +$size_md5['../pms.php'] = 'f22e4747da1aa27e363d86d40ff442fe'; +$size_md5['../posting.php'] = 'f5dffc111454b227fbcdf36178dfe6ac'; +$size_md5['../search.php'] = '3016a447172f3045b65f5fc83e04b554'; +$size_md5['../shoutbox.php'] = '102f0bb6efb3a6128a3c750dd16729be'; +$size_md5['../quick_reply.php'] = '7a53928fa4dd31e82c6ef826f341daec'; +$size_md5['../register.php'] = '14f2ebeab937ca128186e7ba876faef9'; +$size_md5['../topic.php'] = 'b0bf8b3daf61246d13276dc8dcdfb87d'; +$size_md5['../user.php'] = 'bf56a1b37b94243486b2034f8479c475'; +$size_md5['../users.php'] = '7990ec44fcf3d7a0e5a2add28362213c'; +$size_md5['../warns.php'] = '9570efef719d705326f0ff817ef084e6'; + +$size_md5['../includes/class_db.php'] = 'a376033f78e144f494bfc743c0be3330'; +$size_md5['../includes/class_email.php'] = 'e37b08dd3015330dcbb5d6663667b8b8'; +$size_md5['../includes/class_error.php'] = '8232e119d8f59aa83050a741631803a6'; +$size_md5['../includes/class_forum.php'] = '87f7ee4fdb57bdfd52179947211b7ebb'; +$size_md5['../includes/class_mod.php'] = '4764f37856fc727f70b666b8d0c4ab7a'; +$size_md5['../includes/classes/class_pms.php'] = '850af92f8d9903e7a4e0559a98ecc857'; +$size_md5['../includes/class_overall.php'] = '92c3d054835eff3d5a7f7ed731d2a3db'; +$size_md5['../includes/class_posting.php'] = '9c72e0c8882794b79d65f14776a0a974'; +$size_md5['../includes/class_shoutbox.php'] = 'cd14821dab219ea06e2fd1a2df2e3582'; +$size_md5['../includes/class_topic.php'] = '48f7d3043bc03e6c48a6f0ebc0f258a8'; +$size_md5['../includes/class_user.php'] = '2d5951d1e3b31dfb7fd2dcc172df17fd'; +$size_md5['../includes/constants.php'] = 'fc79250f8c5b804390e8da280b4cf06e'; +$size_md5['../includes/msgs_delete.php'] = '571e0f7e2d992e738adff8b1bd43a521'; +$size_md5['../includes/msgs_folder.php'] = 'd756d3d2b9dac72449a6a6926534558a'; +$size_md5['../includes/msgs_view.php'] = '291d43c696d8c3704cdbe0a72ade5f6c'; +$size_md5['../includes/msgs_write.php'] = 'b0b79da57b95837f14be95aaa4d54cf8'; +$size_md5['../includes/classes/secure.php'] = 'a084f26f690dbc23a52e67027693f2b2'; +$size_md5['../includes/sessions.php'] = 'e91068fff3d7fa1594dfdf3b4308433a'; +$size_md5['../includes/sql_parse.php'] = '4a1590df1d5968d41b855005bb8b67bf'; + +$size_md5['../includes/admin/class_forum.php'] = 'e205ee2a5de471a70c1fd1b46033a75f'; +$size_md5['../includes/admin/class_main.php'] = '65ae450c5536606c266f49f1c08321f2'; + +$size_md5['../includes/cache/cache_index.php'] = '88a839f2f6f1427879fc33ee4acf4f66'; +$size_md5['../includes/cache/cache_forums.php'] = '6ef80bb237adf4b6f77d0700e1255907'; +$size_md5['../includes/cache/cache_topic.php'] = '9a11883317fde3aef2e2432a58c86779'; + +$script_files = array_keys($size_md5); + +//name folders for writing... +$folders = array('../images/avatars','../tmp','../config.php'); +?> diff --git a/admin/forum_info.php b/admin/forum_info.php new file mode 100644 index 0000000..e5605b1 --- /dev/null +++ b/admin/forum_info.php @@ -0,0 +1,107 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} + +//check script version... +$errno = 0; +$errstr = ''; +$version = ''; +if ($open = @fsockopen('pioder.gim2przemysl.int.pl', 80, $errno, $errstr, 10)) +{ + @fputs($open, "GET /updates.php?app=dsf HTTP/1.1\r\n"); + @fputs($open, "HOST: pioder.gim2przemysl.int.pl\r\n"); + @fputs($open, "Connection: close\r\n\r\n"); + $get_info = false; + while (!@feof($open)) + { + if ($get_info) + { + $version .= @fread($open, 1024); + } + else + { + if (@fgets($open, 1024) == "\r\n") + { + $get_info = true; + } + } + } + @fclose($open); + if ($version==VERSION) + { + $result = $lng['noupdates']; + } + else + { + $result = $lng['updatenow']; + } +} +else +{ + echo ' + + + + +
+ Could not connect to script server. Server is unavailable. +
'; + $result = $lng['noupdates']; +} +unset($addr,$open, $version, $get_info, $errstr, $errno); +//add skin variables +$skin = array( +'dsf_pa'=>$lng['dsf_pa'], +'index'=>$lng['index'], +'gotoforum'=>$lng['go_to_forum'], +'scriptstat'=>$lng['scriptstat'], +'scriptoptions'=>$lng['scriptconfig'], +'admin_forums'=>$lng['admin_forums'], +'admin_groups'=>$lng['admin_groups'], +'admin_users'=>$lng['admin_users'], +'admin_banlist'=>$lng['admin_banlist'], +'main_beam'=>$lng['pa_mainpage'], +'L.forum_stats'=>$lng['forum_stats'], +'L.install_date'=>$lng['forum_installed'], +'L.topics'=>$lng['topics'], +'L.posts'=>$lng['posts'], +'L.script_version'=>$lng['scriptversion'], +'L.updates'=>$lng['updates'], +'install_date'=>date('d-m-Y, G:i',$forum_config['date_install']), +'topics'=>Admin_Over::TotalTopics(), +'posts'=>Admin_Over::TotalPosts(), +'updates'=>$result, +'L.welcome_pa'=>$lng['pa_welcome'] +); +//do it! +Admin_Over::GenerateHeader(); +include('./template/index_body.tpl'); +include('./template/overall_footer.tpl'); +?> diff --git a/admin/header.php b/admin/header.php new file mode 100644 index 0000000..4155208 --- /dev/null +++ b/admin/header.php @@ -0,0 +1,46 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +$skin = array( + 'uf_pa'=>$lng['uf_pa_nav'], + 'index'=>$lng['index'], + 'gotoforum'=>$lng['go_to_forum'], + 'scriptstat'=>$lng['scriptstat'], + 'scriptoptions'=>$lng['scriptconfig'], + 'admin_forums'=>$lng['admin_forums'], + 'admin_groups'=>$lng['admin_groups'], + 'admin_users'=>$lng['admin_users'], + 'admin_banlist'=>$lng['admin_banlist'], + 'admin_censorlist'=>$lng['admin_censorlist'], + 'admin_smilelist'=>$lng['admin_smilelist'], + 'mass_email' => $lng['mass_email'], + 'admin_styles' => $lng['styles'], + 'main_beam'=>$lng['pa_mainpage'] + ); + include('./template/overall_header.tpl'); +?> diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..a6dc79b --- /dev/null +++ b/admin/index.php @@ -0,0 +1,66 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +$default_skin = Admin_Over::ViewSkinName(); +sess_del_invalid(); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +/*echo ' + + + + + +DSF Administration + + + + + + +Sorry, you browser doesn\'t support frames. + + +';*/ +echo ' + + + + + +µForum Administration + + + + + + +Sorry, you browser doesn\'t support frames. + + +'; +?> diff --git a/admin/info.php b/admin/info.php new file mode 100644 index 0000000..99b6f2f --- /dev/null +++ b/admin/info.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/mass_email.php b/admin/mass_email.php new file mode 100644 index 0000000..565b103 --- /dev/null +++ b/admin/mass_email.php @@ -0,0 +1,67 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_email.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +if (!$forum_config['allow_send_email']) +{ + admin_message_forum($lng['mass_email_disabled'],'forum_info.php'); +} + +if (isset($_POST['msg_content'])) +{ + if (strlen($_POST['msg_content'])>=5) + { + Email::SendMassEmail(str_replace('%email%',$forum_config['forumname'],$lng['mass']),Post::TagsReplace($_POST['msg_content'])); + $msg='./template/blank.tpl'; + admin_message_forum($lng['mass_email_sended'],'forum_info.php'); + } + else + { + $msg = './template/post_error_body.tpl'; + $message = $lng['to_short_msg_content']; + } +} +else +{ + $_POST['msg_content'] = ''; + $msg='./template/blank.tpl'; +} +$skin = array( +'L.save'=>$lng['submit'], +'mass_email'=>$lng['mass_email'], +'L.reset'=>$lng['reset'], +'L.msg_content'=>$lng['msg_content'], +'L.main_beam'=>$lng['mass_email2'] +); +Admin_Over::GenerateHeader(); +include('./template/mass_email.tpl'); +include('./template/overall_footer.tpl'); +?> diff --git a/admin/smilelist.php b/admin/smilelist.php new file mode 100644 index 0000000..5bb6e2e --- /dev/null +++ b/admin/smilelist.php @@ -0,0 +1,230 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +include('./../includes/classes/class_pms.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../includes/classes/secure.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} + +if (!isset($_GET['mode'])) +{ + header('Location: smilelist.php?mode=view'); +} +switch($_GET['mode']) +{ + case 'add': + { + switch($_GET['submode']) + { + //add one smile + case 'one': + { + if (isset($_POST['word'],$_POST['url'])) + { + $sql = "SELECT * FROM ".SMILES_TABLE." ORDER BY `s_id` DESC LIMIT 1"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain smilelist item information'); + $result = @mysql_fetch_array($query); + $smile_id = $result['s_id']; + $smile_id = $smile_id +1; + $smile_word = strip_tags($_POST['word']); + $smile_url = strip_tags($_POST['url']); + $sql = "INSERT INTO ".SMILES_TABLE." VALUES('$smile_id','$smile_word','$smile_url')"; + DataBase::sql_query($sql,'GENERAL','Could not add smile.'); + admin_message_forum($lng['smile_added'],'smilelist.php?mode=view'); + } + else + { + $_POST['word']=''; + $_POST['url'] = ''; + $skin = array( + 'L.smilelist'=>$lng['admin_smilelist'], + 'action'=>'smilelist.php?mode=add&submode=one', + 'L.edit_smile'=>$lng['smilelist_add'], + 'L.smile'=>$lng['smile'], + 'L.url' => $lng['url'], + 'L.save'=>$lng['submit'], + 'L.clear'=>$lng['reset'] + ); + Admin_Over::GenerateHeader(); + include('./template/smilelist_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + //add smiles with file + case 'file': + { + if (isset($_FILES['file'],$_POST['motive'])) + { + $ban_uid = '-2'; + $ban_motive = strip_tags($_POST['motive']); + $catalog = '../tmp/'; + if(!move_uploaded_file($_FILES['file']['tmp_name'], $catalog.$_FILES['file']['name'])) + { + message_die('GENERAL','Could not upload file.',''); + } + $open = @fopen($catalog.$_FILES['file']['name'],'r'); + $file = @fread($open, filesize($catalog.$_FILES['file']['name'])); + $item = @explode("\n",$file); + $bid = $bid = @mysql_fetch_array(DataBase::sql_query("SELECT + `s_id` FROM ".SMILES_TABLE." ORDER BY `s_id` DESC",'GENERAL', + 'Could not obtain last smile id')); + $sid = $sid['s_id']; + $sid = $sid +1; + for($i=0;$i$lng['admin_smilelist'], + 'action'=>'smilelist.php?mode=add&submode=file', + 'L.add_file'=>$lng['smilelist_add_from_file'], + 'L.file_name'=>$lng['file_name'], + 'L.save'=>$lng['submit'], + 'L.clear'=>$lng['reset'], + 'L.file.HELP' => $lng['smilelist_info_1'] + ); + Admin_Over::GenerateHeader(); + include('./template/smilelist_add_file_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + } + break; + } + case 'delete': + { + $sid = $_GET['id']; + $sql = "DELETE FROM ".SMILES_TABLE." WHERE `s_id`='$sid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete smilelist item.'); + admin_message_forum($lng['smile_deleted'],'smilelist.php?mode=view'); + break; + } + case 'edit': + { + if (isset($_POST['word'],$_POST['url'],$_GET['id'])) + { + $smile_id = strip_tags($_GET['id']); + $smile_word = strip_tags($_POST['word']); + $smile_url = strip_tags($_POST['url']); + $bid = $_GET['id']; + $sql = "UPDATE ".SMILES_TABLE." SET + `smile`='$smile_word', + `url`='$smile_url' + WHERE `s_id`='$smile_id'"; + DataBase::sql_query($sql,'GENERAL','Could not update smile.'); + admin_message_forum($lng['smile_edited'],'smilelist.php?mode=view'); + } + else + { + $sid = intval($_GET['id']); + $sql = "SELECT * FROM ".SMILES_TABLE." WHERE `s_id`='$sid'"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain smilelist item information'); + $result = @mysql_fetch_array($query); + if ($result['s_id']=='') + { + admin_message_forum($lng['no_smile'],'smilelist.php?mode=view'); + } + $_POST['word']=$result['smile']; + $_POST['url'] = $result['url']; + $skin = array( + 'L.smilelist'=>$lng['admin_smilelist'], + 'action'=>'smilelist.php?mode=edit&id='.$sid, + 'L.edit_smile'=>$lng['smilelist_edit'], + 'L.smile'=>$lng['smile'], + 'L.url' => $lng['url'], + 'L.save'=>$lng['submit'], + 'L.clear'=>$lng['reset'] + ); + Admin_Over::GenerateHeader(); + include('./template/smilelist_edit_body.tpl'); + include('./template/overall_footer.tpl'); + } + break; + } + case 'clear': + { + $sql = "TRUNCATE `".SMILES_TABLE."`"; + DataBase::sql_query($sql, 'GENERAL','Could not empty smilelist'); + admin_message_forum($lng['smilelist_cleanout'],'smilelist.php?mode=view'); + } + case 'view': + { + $sql = "SELECT * FROM ".SMILES_TABLE.""; + $query = DataBase::sql_query($sql,'CRITICAL','Could not obtain smilelist items'); + $skin=array( + 'L.smilelist'=>$lng['admin_smilelist'], + 'L.select_mode'=>$lng['what_do_you_want'], + 'L.add'=>$lng['smilelist_add'], + 'L.add_file'=>$lng['smilelist_add_from_file'], + 'L.clean_smilelist' => $lng['smilelist_clean'] + ); + Admin_Over::GenerateHeader(); + include('./template/smilelist_view_body.tpl'); + if (@mysql_num_rows($query)<1) + { + echo '

'.$lng['smilelist_no_items'].'!

'; + } + else + { + while($item = @mysql_fetch_array($query)) + { + $skin = array( + 'smile_word'=>$item['smile'], + 'addr'=> $item['url'], + 'visual_smile' => $item['url'], + 's_id'=>$item['s_id'], + 'L.delete'=>$lng['delete'], + 'L.edit'=>$lng['edit'] + ); + include('./template/smilelist_item_add.tpl'); + } + } + include('./template/overall_footer.tpl'); + break; + } + default: + { + header('Location: smilelist.php?mode=view'); + break; + } +} +?> diff --git a/admin/styles.php b/admin/styles.php new file mode 100644 index 0000000..22a4917 --- /dev/null +++ b/admin/styles.php @@ -0,0 +1,112 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./../config.php'); +include('./../includes/constants.php'); +include('./../includes/class_db.php'); +include('./../includes/class_error.php'); +include('./../includes/classes/class_pms.php'); +//connect to database +DataBase::db_connect(); +include('./../includes/sessions.php'); +include('./../includes/class_user.php'); +include('./../common.php'); +include('./../includes/admin/class_main.php'); +include('./../includes/class_forum.php'); +include('./../includes/admin/class_forum.php'); +include('./../includes/classes/secure.php'); +include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); + +if (User::UserInformation($_SESSION['uid'],'rank')!=2) +{ + admin_message_forum($lng['yournotadmin'],'../index.php'); +} +if (!isset($_GET['mode'])) +{ + header('Location: styles.php?mode=view'); +} +switch($_GET['mode']) +{ + case 'delete': + { + $sid = intval($_GET['id']); + if ($sid!=$forum_config['defaultskin']) + { + $sql = "DELETE FROM ".SKINS_TABLE." WHERE `s_id`='$sid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete skin'); + $sql = "UPDATE ".USERS_TABLE." SET `skin`='".$forum_config['defaultskin']."' WHERE `skin`='$sid'"; + DataBase::sql_query($sql,'GENERAL','Could not update user'); + admin_message_forum($lng['skins_deleted'],'styles.php?mode=view'); + } + else + { + admin_message_forum($lng['styles_info_1'],'styles.php?mode=view'); + } + break; + } + case 'view': + { + if (isset($_POST['skin'])) + { + if(strlen(trim($_POST['skin']))>3) + { + if (is_dir('./../skins/'.$_POST['skin'])) + { + $last = DataBase::new_id(SKINS_TABLE); + DataBase::sql_query("INSERT INTO ".SKINS_TABLE." VALUES ('$last','".strip_tags($_POST['skin'])."')",'GENERAL','Could not add skin'); + $_POST['skin']=''; + admin_message_forum($lng['skins_added'],'styles.php?mode=view'); + } + else + { + $_POST['skin']=''; + admin_message_forum($lng['invalid_skin'],'styles.php?mode=view'); + } + } + } + else + { + $_POST['skin']=''; + } + $skin = array( + 'L.main_beam'=>$lng['admin_styles'], + 'L.install'=>$lng['install'], + 'L.new_skin'=>$lng['new_skin'], + 'L.delete'=>$lng['delete'], + 'L.actual_skins'=>$lng['actual_skins'] + ); + Admin_Over::GenerateHeader(); + include('./template/skins_beam_body.tpl'); + $sql = "SELECT * FROM ".SKINS_TABLE; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain skins information'); + while ($item = @mysql_fetch_array($query)) + { + $skin=array( + 'L.delete' => $lng['delete'], + 'skin_name' => $item['name'], + 's_id' => $item['s_id'] + ); + include('./template/skins_item_add.tpl'); + } + echo ''; + include('./template/overall_footer.tpl'); + break; + } + default: + { + header('Location: styles.php?mode=view'); + break; + } +} +?> diff --git a/admin/template/admin_script.tpl b/admin/template/admin_script.tpl new file mode 100644 index 0000000..538afd5 --- /dev/null +++ b/admin/template/admin_script.tpl @@ -0,0 +1,382 @@ +
+
+
+

+
+ +
+ + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ :  
+    +
+ +
+ :   + + +
+ :   + + +
+ :  
+    +
+ +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + value="1"> +
+ :   + + value="1"> +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + +
+  + + + + + + + +
+ +
+ + + + + + + + + + + +
+ :   + + +
+ :   + + +
+  + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + +
+ :   + + value="1"> +
+ :   + + +
+ :   + + +
+ :   + + +
+  + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+ :   + + value="1"> +
+ :   + + +
+ :   + + +
+  + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ :   + + +
+ :   + + +
+ :   + + value="1"> +
+ :   + + value="1"> +
+ :   + + value="1"> +
+ :   + + value="1"> +
+ :   + + value="1"> +
+ + +
diff --git a/admin/template/banlist_add_file_body.tpl b/admin/template/banlist_add_file_body.tpl new file mode 100644 index 0000000..d0b8529 --- /dev/null +++ b/admin/template/banlist_add_file_body.tpl @@ -0,0 +1,52 @@ + +
+
+
+
+
+ +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + +
+ : + + + + + +
+ : + + + +   +
+   +   +
+
diff --git a/admin/template/banlist_add_ip_body.tpl b/admin/template/banlist_add_ip_body.tpl new file mode 100644 index 0000000..2df832d --- /dev/null +++ b/admin/template/banlist_add_ip_body.tpl @@ -0,0 +1,50 @@ +
+
+
+
+
+ +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + +
+ IP: + + + + +
+ : + + + +   +
+   +   +
+
diff --git a/admin/template/banlist_add_user_body.tpl b/admin/template/banlist_add_user_body.tpl new file mode 100644 index 0000000..2636242 --- /dev/null +++ b/admin/template/banlist_add_user_body.tpl @@ -0,0 +1,50 @@ +
+
+
+
+
+ +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + +
+ : + + + + +
+ : + + + +   +
+   +   +
+
diff --git a/admin/template/banlist_edit_body.tpl b/admin/template/banlist_edit_body.tpl new file mode 100644 index 0000000..a47cf92 --- /dev/null +++ b/admin/template/banlist_edit_body.tpl @@ -0,0 +1,62 @@ +
+
+
+
+
+ +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + +
+ IP: + + + + +
+ : + + + + +
+ : + + + +   +
+   +   +
+
diff --git a/admin/template/banlist_item_add.tpl b/admin/template/banlist_item_add.tpl new file mode 100644 index 0000000..03fb9c3 --- /dev/null +++ b/admin/template/banlist_item_add.tpl @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/admin/template/banlist_view_body.tpl b/admin/template/banlist_view_body.tpl new file mode 100644 index 0000000..db34f75 --- /dev/null +++ b/admin/template/banlist_view_body.tpl @@ -0,0 +1,25 @@ +
+
+
+
+
+ +
+ + + + + + +
+

?

+
+ + + diff --git a/admin/template/blank.tpl b/admin/template/blank.tpl new file mode 100644 index 0000000..d3f5a12 --- /dev/null +++ b/admin/template/blank.tpl @@ -0,0 +1 @@ + diff --git a/admin/template/cat_new_edit_body.tpl b/admin/template/cat_new_edit_body.tpl new file mode 100644 index 0000000..0397274 --- /dev/null +++ b/admin/template/cat_new_edit_body.tpl @@ -0,0 +1,29 @@ +
+
+
+
+
+ +
+ +
+
+ + •  + •  + •  + •  +
+ + + + + +
+ + + + + + + +
: +
+   + +
+ diff --git a/admin/template/censorlist_add_edit_body.tpl b/admin/template/censorlist_add_edit_body.tpl new file mode 100644 index 0000000..2e04133 --- /dev/null +++ b/admin/template/censorlist_add_edit_body.tpl @@ -0,0 +1,35 @@ +
+
+
+
+
+ +
+
+ + + + + + +
+

+

+ + + + + + + + +
+ : + + +
+   +   + +
+
diff --git a/admin/template/censorlist_main_body.tpl b/admin/template/censorlist_main_body.tpl new file mode 100644 index 0000000..ec4bb75 --- /dev/null +++ b/admin/template/censorlist_main_body.tpl @@ -0,0 +1,30 @@ +
+
+
+
+
+ +
+ + + + + + +
+

?

+
+ + + + + + + + + + + + + +
diff --git a/admin/template/censorlist_upload_body.tpl b/admin/template/censorlist_upload_body.tpl new file mode 100644 index 0000000..25f013a --- /dev/null +++ b/admin/template/censorlist_upload_body.tpl @@ -0,0 +1,34 @@ +
+
+
+
+
+ +
+
+ + + + + + +
+

+

+ + + + + + + + +
: + + + 
+   +   + +
+
diff --git a/admin/template/censorlist_view_body.tpl b/admin/template/censorlist_view_body.tpl new file mode 100644 index 0000000..baa0b16 --- /dev/null +++ b/admin/template/censorlist_view_body.tpl @@ -0,0 +1,16 @@ +
+
+
+
+
+ +
+ + + + + + +
+

+

diff --git a/admin/template/censorlist_word_add.tpl b/admin/template/censorlist_word_add.tpl new file mode 100644 index 0000000..c7d0fe6 --- /dev/null +++ b/admin/template/censorlist_word_add.tpl @@ -0,0 +1,17 @@ + + + + + + +
+ + + + + + + + + +
diff --git a/admin/template/check_script.tpl b/admin/template/check_script.tpl new file mode 100644 index 0000000..9bba17f --- /dev/null +++ b/admin/template/check_script.tpl @@ -0,0 +1,77 @@ +
+
+
+
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ():   + + +
+ ():   + + +
+ :   + + +
+ :   + + +
+ ():   + + +
+ ():   + + +
+ ():   + + +
+ +
diff --git a/admin/template/forum_category_add.tpl b/admin/template/forum_category_add.tpl new file mode 100644 index 0000000..0ec4359 --- /dev/null +++ b/admin/template/forum_category_add.tpl @@ -0,0 +1,24 @@ + + + + + + + + +
+ + + + + + + + + + + || + + + +
diff --git a/admin/template/forum_forum_add.tpl b/admin/template/forum_forum_add.tpl new file mode 100644 index 0000000..748ff75 --- /dev/null +++ b/admin/template/forum_forum_add.tpl @@ -0,0 +1,22 @@ + + + + + + +
+
+ +
+ + + + + + + + || + + + +
\ No newline at end of file diff --git a/admin/template/forum_new_edit_body.tpl b/admin/template/forum_new_edit_body.tpl new file mode 100644 index 0000000..ea023bf --- /dev/null +++ b/admin/template/forum_new_edit_body.tpl @@ -0,0 +1,69 @@ +
+
+
+
+
+ +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ : + + +
+ : +
+
+ : + + +
+ : + + > + +
+ : + + > + +
+ +   + +
+
diff --git a/admin/template/forums_beam_body.tpl b/admin/template/forums_beam_body.tpl new file mode 100644 index 0000000..b77e15a --- /dev/null +++ b/admin/template/forums_beam_body.tpl @@ -0,0 +1,30 @@ + +
+
+
+
+
+ +
+   + +
+
diff --git a/admin/template/forums_view_end_body.tpl b/admin/template/forums_view_end_body.tpl new file mode 100644 index 0000000..f915abf --- /dev/null +++ b/admin/template/forums_view_end_body.tpl @@ -0,0 +1,5 @@ +
+
+  + +
\ No newline at end of file diff --git a/admin/template/group_add_body.tpl b/admin/template/group_add_body.tpl new file mode 100644 index 0000000..2b3e794 --- /dev/null +++ b/admin/template/group_add_body.tpl @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + || + + + + + diff --git a/admin/template/group_new_edit_body.tpl b/admin/template/group_new_edit_body.tpl new file mode 100644 index 0000000..675b4ee --- /dev/null +++ b/admin/template/group_new_edit_body.tpl @@ -0,0 +1,48 @@ +
+
+
+
+
+ +
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+ : + + +
+ : +
+
: + +
+   + +
+
diff --git a/admin/template/groups_beam_body.tpl b/admin/template/groups_beam_body.tpl new file mode 100644 index 0000000..84d8eb0 --- /dev/null +++ b/admin/template/groups_beam_body.tpl @@ -0,0 +1,21 @@ + +
+
+
+
+
+ +
+ +
+
+ diff --git a/admin/template/images/Thumbs.db b/admin/template/images/Thumbs.db new file mode 100644 index 0000000..b72e01e Binary files /dev/null and b/admin/template/images/Thumbs.db differ diff --git a/admin/template/images/body_bg.gif b/admin/template/images/body_bg.gif new file mode 100644 index 0000000..881c4cc Binary files /dev/null and b/admin/template/images/body_bg.gif differ diff --git a/admin/template/images/delete.gif b/admin/template/images/delete.gif new file mode 100644 index 0000000..28a3f01 Binary files /dev/null and b/admin/template/images/delete.gif differ diff --git a/admin/template/images/delete_small.gif b/admin/template/images/delete_small.gif new file mode 100644 index 0000000..2676b02 Binary files /dev/null and b/admin/template/images/delete_small.gif differ diff --git a/admin/template/images/delete_small_active.gif b/admin/template/images/delete_small_active.gif new file mode 100644 index 0000000..2733f4a Binary files /dev/null and b/admin/template/images/delete_small_active.gif differ diff --git a/admin/template/images/dsf_logo.gif b/admin/template/images/dsf_logo.gif new file mode 100644 index 0000000..f689922 Binary files /dev/null and b/admin/template/images/dsf_logo.gif differ diff --git a/admin/template/images/email.gif b/admin/template/images/email.gif new file mode 100644 index 0000000..aeb1ce6 Binary files /dev/null and b/admin/template/images/email.gif differ diff --git a/admin/template/images/email_active.gif b/admin/template/images/email_active.gif new file mode 100644 index 0000000..54f11a0 Binary files /dev/null and b/admin/template/images/email_active.gif differ diff --git a/admin/template/images/favicon.ico b/admin/template/images/favicon.ico new file mode 100644 index 0000000..0772662 Binary files /dev/null and b/admin/template/images/favicon.ico differ diff --git a/admin/template/images/folder_new_posts.gif b/admin/template/images/folder_new_posts.gif new file mode 100644 index 0000000..75ed4d4 Binary files /dev/null and b/admin/template/images/folder_new_posts.gif differ diff --git a/admin/template/images/folder_no_new_posts.gif b/admin/template/images/folder_no_new_posts.gif new file mode 100644 index 0000000..ef41246 Binary files /dev/null and b/admin/template/images/folder_no_new_posts.gif differ diff --git a/admin/template/images/gg.gif b/admin/template/images/gg.gif new file mode 100644 index 0000000..96fc936 Binary files /dev/null and b/admin/template/images/gg.gif differ diff --git a/admin/template/images/gg_active.gif b/admin/template/images/gg_active.gif new file mode 100644 index 0000000..620c66d Binary files /dev/null and b/admin/template/images/gg_active.gif differ diff --git a/admin/template/images/gg_small.gif b/admin/template/images/gg_small.gif new file mode 100644 index 0000000..617f3a3 Binary files /dev/null and b/admin/template/images/gg_small.gif differ diff --git a/admin/template/images/gg_small_active.gif b/admin/template/images/gg_small_active.gif new file mode 100644 index 0000000..c51dd57 Binary files /dev/null and b/admin/template/images/gg_small_active.gif differ diff --git a/admin/template/images/index.html b/admin/template/images/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/admin/template/images/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/admin/template/images/lng_Polish/Thumbs.db b/admin/template/images/lng_Polish/Thumbs.db new file mode 100644 index 0000000..b886c58 Binary files /dev/null and b/admin/template/images/lng_Polish/Thumbs.db differ diff --git a/admin/template/images/lng_Polish/edit_small.gif b/admin/template/images/lng_Polish/edit_small.gif new file mode 100644 index 0000000..3600a0e Binary files /dev/null and b/admin/template/images/lng_Polish/edit_small.gif differ diff --git a/admin/template/images/lng_Polish/edit_small_active.gif b/admin/template/images/lng_Polish/edit_small_active.gif new file mode 100644 index 0000000..e2c0a5b Binary files /dev/null and b/admin/template/images/lng_Polish/edit_small_active.gif differ diff --git a/admin/template/images/lng_Polish/inbox.gif b/admin/template/images/lng_Polish/inbox.gif new file mode 100644 index 0000000..629623a Binary files /dev/null and b/admin/template/images/lng_Polish/inbox.gif differ diff --git a/admin/template/images/lng_Polish/inbox_active.gif b/admin/template/images/lng_Polish/inbox_active.gif new file mode 100644 index 0000000..9d1d3f1 Binary files /dev/null and b/admin/template/images/lng_Polish/inbox_active.gif differ diff --git a/admin/template/images/lng_Polish/index.html b/admin/template/images/lng_Polish/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/admin/template/images/lng_Polish/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/admin/template/images/lng_Polish/lock.gif b/admin/template/images/lng_Polish/lock.gif new file mode 100644 index 0000000..127130b Binary files /dev/null and b/admin/template/images/lng_Polish/lock.gif differ diff --git a/admin/template/images/lng_Polish/newmsg.gif b/admin/template/images/lng_Polish/newmsg.gif new file mode 100644 index 0000000..b8b52ce Binary files /dev/null and b/admin/template/images/lng_Polish/newmsg.gif differ diff --git a/admin/template/images/lng_Polish/newmsg_active.gif b/admin/template/images/lng_Polish/newmsg_active.gif new file mode 100644 index 0000000..f2a6921 Binary files /dev/null and b/admin/template/images/lng_Polish/newmsg_active.gif differ diff --git a/admin/template/images/lng_Polish/pm.gif b/admin/template/images/lng_Polish/pm.gif new file mode 100644 index 0000000..25871f3 Binary files /dev/null and b/admin/template/images/lng_Polish/pm.gif differ diff --git a/admin/template/images/lng_Polish/pm_active.gif b/admin/template/images/lng_Polish/pm_active.gif new file mode 100644 index 0000000..67dce1e Binary files /dev/null and b/admin/template/images/lng_Polish/pm_active.gif differ diff --git a/admin/template/images/lng_Polish/pm_small.gif b/admin/template/images/lng_Polish/pm_small.gif new file mode 100644 index 0000000..31b50f5 Binary files /dev/null and b/admin/template/images/lng_Polish/pm_small.gif differ diff --git a/admin/template/images/lng_Polish/pm_small_active.gif b/admin/template/images/lng_Polish/pm_small_active.gif new file mode 100644 index 0000000..0cfd2cc Binary files /dev/null and b/admin/template/images/lng_Polish/pm_small_active.gif differ diff --git a/admin/template/images/lng_Polish/quote_small.gif b/admin/template/images/lng_Polish/quote_small.gif new file mode 100644 index 0000000..ba4b4be Binary files /dev/null and b/admin/template/images/lng_Polish/quote_small.gif differ diff --git a/admin/template/images/lng_Polish/quote_small_active.gif b/admin/template/images/lng_Polish/quote_small_active.gif new file mode 100644 index 0000000..b897f7a Binary files /dev/null and b/admin/template/images/lng_Polish/quote_small_active.gif differ diff --git a/admin/template/images/lng_Polish/reply.gif b/admin/template/images/lng_Polish/reply.gif new file mode 100644 index 0000000..fa88838 Binary files /dev/null and b/admin/template/images/lng_Polish/reply.gif differ diff --git a/admin/template/images/lng_Polish/reply_active.gif b/admin/template/images/lng_Polish/reply_active.gif new file mode 100644 index 0000000..0ca48f6 Binary files /dev/null and b/admin/template/images/lng_Polish/reply_active.gif differ diff --git a/admin/template/images/lng_Polish/sentbox.gif b/admin/template/images/lng_Polish/sentbox.gif new file mode 100644 index 0000000..7c3e65d Binary files /dev/null and b/admin/template/images/lng_Polish/sentbox.gif differ diff --git a/admin/template/images/lng_Polish/sentbox_active.gif b/admin/template/images/lng_Polish/sentbox_active.gif new file mode 100644 index 0000000..ed90c46 Binary files /dev/null and b/admin/template/images/lng_Polish/sentbox_active.gif differ diff --git a/admin/template/images/lng_Polish/topic.gif b/admin/template/images/lng_Polish/topic.gif new file mode 100644 index 0000000..d139cfe Binary files /dev/null and b/admin/template/images/lng_Polish/topic.gif differ diff --git a/admin/template/images/lng_Polish/topic_active.gif b/admin/template/images/lng_Polish/topic_active.gif new file mode 100644 index 0000000..537dca7 Binary files /dev/null and b/admin/template/images/lng_Polish/topic_active.gif differ diff --git a/admin/template/images/lock.gif b/admin/template/images/lock.gif new file mode 100644 index 0000000..415e68e Binary files /dev/null and b/admin/template/images/lock.gif differ diff --git a/admin/template/images/move.gif b/admin/template/images/move.gif new file mode 100644 index 0000000..65c6943 Binary files /dev/null and b/admin/template/images/move.gif differ diff --git a/admin/template/images/stick.gif b/admin/template/images/stick.gif new file mode 100644 index 0000000..0b1f0d1 Binary files /dev/null and b/admin/template/images/stick.gif differ diff --git a/admin/template/images/td_beam.jpg b/admin/template/images/td_beam.jpg new file mode 100644 index 0000000..7dac0e4 Binary files /dev/null and b/admin/template/images/td_beam.jpg differ diff --git a/admin/template/images/td_beam_left.gif b/admin/template/images/td_beam_left.gif new file mode 100644 index 0000000..0616e04 Binary files /dev/null and b/admin/template/images/td_beam_left.gif differ diff --git a/admin/template/images/td_beam_right.gif b/admin/template/images/td_beam_right.gif new file mode 100644 index 0000000..204308e Binary files /dev/null and b/admin/template/images/td_beam_right.gif differ diff --git a/admin/template/images/td_beam_top.gif b/admin/template/images/td_beam_top.gif new file mode 100644 index 0000000..89a14e6 Binary files /dev/null and b/admin/template/images/td_beam_top.gif differ diff --git a/admin/template/images/td_category.jpg b/admin/template/images/td_category.jpg new file mode 100644 index 0000000..6a89ee1 Binary files /dev/null and b/admin/template/images/td_category.jpg differ diff --git a/admin/template/images/td_category_left.gif b/admin/template/images/td_category_left.gif new file mode 100644 index 0000000..a267990 Binary files /dev/null and b/admin/template/images/td_category_left.gif differ diff --git a/admin/template/images/td_category_right.gif b/admin/template/images/td_category_right.gif new file mode 100644 index 0000000..e322829 Binary files /dev/null and b/admin/template/images/td_category_right.gif differ diff --git a/admin/template/images/td_editor.jpg b/admin/template/images/td_editor.jpg new file mode 100644 index 0000000..d1eec1a Binary files /dev/null and b/admin/template/images/td_editor.jpg differ diff --git a/admin/template/images/unlock.gif b/admin/template/images/unlock.gif new file mode 100644 index 0000000..b8d436a Binary files /dev/null and b/admin/template/images/unlock.gif differ diff --git a/admin/template/images/unstick.gif b/admin/template/images/unstick.gif new file mode 100644 index 0000000..90a638b Binary files /dev/null and b/admin/template/images/unstick.gif differ diff --git a/admin/template/images/wyzz/Thumbs.db b/admin/template/images/wyzz/Thumbs.db new file mode 100644 index 0000000..046bdd8 Binary files /dev/null and b/admin/template/images/wyzz/Thumbs.db differ diff --git a/admin/template/images/wyzz/backcolor.gif b/admin/template/images/wyzz/backcolor.gif new file mode 100644 index 0000000..f20f3c2 Binary files /dev/null and b/admin/template/images/wyzz/backcolor.gif differ diff --git a/admin/template/images/wyzz/bold.gif b/admin/template/images/wyzz/bold.gif new file mode 100644 index 0000000..4ec8e72 Binary files /dev/null and b/admin/template/images/wyzz/bold.gif differ diff --git a/admin/template/images/wyzz/close.gif b/admin/template/images/wyzz/close.gif new file mode 100644 index 0000000..f60d705 Binary files /dev/null and b/admin/template/images/wyzz/close.gif differ diff --git a/admin/template/images/wyzz/copy.gif b/admin/template/images/wyzz/copy.gif new file mode 100644 index 0000000..296ffdf Binary files /dev/null and b/admin/template/images/wyzz/copy.gif differ diff --git a/admin/template/images/wyzz/cut.gif b/admin/template/images/wyzz/cut.gif new file mode 100644 index 0000000..6e9d70f Binary files /dev/null and b/admin/template/images/wyzz/cut.gif differ diff --git a/admin/template/images/wyzz/downsize.gif b/admin/template/images/wyzz/downsize.gif new file mode 100644 index 0000000..a17e486 Binary files /dev/null and b/admin/template/images/wyzz/downsize.gif differ diff --git a/admin/template/images/wyzz/font.gif b/admin/template/images/wyzz/font.gif new file mode 100644 index 0000000..c48befb Binary files /dev/null and b/admin/template/images/wyzz/font.gif differ diff --git a/admin/template/images/wyzz/forecolor.gif b/admin/template/images/wyzz/forecolor.gif new file mode 100644 index 0000000..61e0fb1 Binary files /dev/null and b/admin/template/images/wyzz/forecolor.gif differ diff --git a/admin/template/images/wyzz/headers.gif b/admin/template/images/wyzz/headers.gif new file mode 100644 index 0000000..4a35d38 Binary files /dev/null and b/admin/template/images/wyzz/headers.gif differ diff --git a/admin/template/images/wyzz/help.gif b/admin/template/images/wyzz/help.gif new file mode 100644 index 0000000..777f28a Binary files /dev/null and b/admin/template/images/wyzz/help.gif differ diff --git a/admin/template/images/wyzz/htmlmode.gif b/admin/template/images/wyzz/htmlmode.gif new file mode 100644 index 0000000..4b4ec2d Binary files /dev/null and b/admin/template/images/wyzz/htmlmode.gif differ diff --git a/admin/template/images/wyzz/indent.gif b/admin/template/images/wyzz/indent.gif new file mode 100644 index 0000000..58ba3e5 Binary files /dev/null and b/admin/template/images/wyzz/indent.gif differ diff --git a/admin/template/images/wyzz/index.html b/admin/template/images/wyzz/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/admin/template/images/wyzz/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/admin/template/images/wyzz/inserthorizontalrule.gif b/admin/template/images/wyzz/inserthorizontalrule.gif new file mode 100644 index 0000000..7d43566 Binary files /dev/null and b/admin/template/images/wyzz/inserthorizontalrule.gif differ diff --git a/admin/template/images/wyzz/insertimage.gif b/admin/template/images/wyzz/insertimage.gif new file mode 100644 index 0000000..9b2fcb3 Binary files /dev/null and b/admin/template/images/wyzz/insertimage.gif differ diff --git a/admin/template/images/wyzz/insertorderedlist.gif b/admin/template/images/wyzz/insertorderedlist.gif new file mode 100644 index 0000000..a7a1c0a Binary files /dev/null and b/admin/template/images/wyzz/insertorderedlist.gif differ diff --git a/admin/template/images/wyzz/insertunorderedlist.gif b/admin/template/images/wyzz/insertunorderedlist.gif new file mode 100644 index 0000000..0f36014 Binary files /dev/null and b/admin/template/images/wyzz/insertunorderedlist.gif differ diff --git a/admin/template/images/wyzz/italic.gif b/admin/template/images/wyzz/italic.gif new file mode 100644 index 0000000..8fd547e Binary files /dev/null and b/admin/template/images/wyzz/italic.gif differ diff --git a/admin/template/images/wyzz/justifycenter.gif b/admin/template/images/wyzz/justifycenter.gif new file mode 100644 index 0000000..6f1c340 Binary files /dev/null and b/admin/template/images/wyzz/justifycenter.gif differ diff --git a/admin/template/images/wyzz/justifyfull.gif b/admin/template/images/wyzz/justifyfull.gif new file mode 100644 index 0000000..f881b54 Binary files /dev/null and b/admin/template/images/wyzz/justifyfull.gif differ diff --git a/admin/template/images/wyzz/justifyleft.gif b/admin/template/images/wyzz/justifyleft.gif new file mode 100644 index 0000000..f2e6142 Binary files /dev/null and b/admin/template/images/wyzz/justifyleft.gif differ diff --git a/admin/template/images/wyzz/justifyright.gif b/admin/template/images/wyzz/justifyright.gif new file mode 100644 index 0000000..5df6220 Binary files /dev/null and b/admin/template/images/wyzz/justifyright.gif differ diff --git a/admin/template/images/wyzz/link.gif b/admin/template/images/wyzz/link.gif new file mode 100644 index 0000000..d492406 Binary files /dev/null and b/admin/template/images/wyzz/link.gif differ diff --git a/admin/template/images/wyzz/outdent.gif b/admin/template/images/wyzz/outdent.gif new file mode 100644 index 0000000..18e7ea0 Binary files /dev/null and b/admin/template/images/wyzz/outdent.gif differ diff --git a/admin/template/images/wyzz/paste.gif b/admin/template/images/wyzz/paste.gif new file mode 100644 index 0000000..111bb95 Binary files /dev/null and b/admin/template/images/wyzz/paste.gif differ diff --git a/admin/template/images/wyzz/redo.gif b/admin/template/images/wyzz/redo.gif new file mode 100644 index 0000000..a713be1 Binary files /dev/null and b/admin/template/images/wyzz/redo.gif differ diff --git a/admin/template/images/wyzz/removeformat.gif b/admin/template/images/wyzz/removeformat.gif new file mode 100644 index 0000000..a1d9d19 Binary files /dev/null and b/admin/template/images/wyzz/removeformat.gif differ diff --git a/admin/template/images/wyzz/specialchar.gif b/admin/template/images/wyzz/specialchar.gif new file mode 100644 index 0000000..b24452a Binary files /dev/null and b/admin/template/images/wyzz/specialchar.gif differ diff --git a/admin/template/images/wyzz/strikethrough.gif b/admin/template/images/wyzz/strikethrough.gif new file mode 100644 index 0000000..ea26e51 Binary files /dev/null and b/admin/template/images/wyzz/strikethrough.gif differ diff --git a/admin/template/images/wyzz/subscript.gif b/admin/template/images/wyzz/subscript.gif new file mode 100644 index 0000000..a29140f Binary files /dev/null and b/admin/template/images/wyzz/subscript.gif differ diff --git a/admin/template/images/wyzz/superscript.gif b/admin/template/images/wyzz/superscript.gif new file mode 100644 index 0000000..14f2020 Binary files /dev/null and b/admin/template/images/wyzz/superscript.gif differ diff --git a/admin/template/images/wyzz/underline.gif b/admin/template/images/wyzz/underline.gif new file mode 100644 index 0000000..e32b6e8 Binary files /dev/null and b/admin/template/images/wyzz/underline.gif differ diff --git a/admin/template/images/wyzz/undo.gif b/admin/template/images/wyzz/undo.gif new file mode 100644 index 0000000..8885006 Binary files /dev/null and b/admin/template/images/wyzz/undo.gif differ diff --git a/admin/template/images/wyzz/upsize.gif b/admin/template/images/wyzz/upsize.gif new file mode 100644 index 0000000..409886e Binary files /dev/null and b/admin/template/images/wyzz/upsize.gif differ diff --git a/admin/template/in_error_body.tpl b/admin/template/in_error_body.tpl new file mode 100644 index 0000000..a7d4423 --- /dev/null +++ b/admin/template/in_error_body.tpl @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/admin/template/index.html b/admin/template/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/admin/template/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/admin/template/index_body.tpl b/admin/template/index_body.tpl new file mode 100644 index 0000000..9abc58a --- /dev/null +++ b/admin/template/index_body.tpl @@ -0,0 +1,60 @@ +
+
+
+
+
+ +
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + +
+ :   + + +
+
diff --git a/admin/template/invalidfile_body.tpl b/admin/template/invalidfile_body.tpl new file mode 100644 index 0000000..4567e99 --- /dev/null +++ b/admin/template/invalidfile_body.tpl @@ -0,0 +1,5 @@ +
+
+ : => : +
+  \ No newline at end of file diff --git a/admin/template/mass_email.tpl b/admin/template/mass_email.tpl new file mode 100644 index 0000000..f49e3c5 --- /dev/null +++ b/admin/template/mass_email.tpl @@ -0,0 +1,44 @@ + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+ + + + + + + +
: + + +
+   + +
+
diff --git a/admin/template/message_body.tpl b/admin/template/message_body.tpl new file mode 100644 index 0000000..0f78341 --- /dev/null +++ b/admin/template/message_body.tpl @@ -0,0 +1,25 @@ + + + + + + + + +DSF Administration + + +
+
+
+
+
+ + + + + +
DSF v
+ +
+ diff --git a/admin/template/overall_footer.tpl b/admin/template/overall_footer.tpl new file mode 100644 index 0000000..be0add8 --- /dev/null +++ b/admin/template/overall_footer.tpl @@ -0,0 +1,13 @@ + + + + +
+
+
+
+
+ + diff --git a/admin/template/overall_header.tpl b/admin/template/overall_header.tpl new file mode 100644 index 0000000..8409656 --- /dev/null +++ b/admin/template/overall_header.tpl @@ -0,0 +1,67 @@ + + + + + +DSF Administration + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ =><= +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ + diff --git a/admin/template/post_error_body.tpl b/admin/template/post_error_body.tpl new file mode 100644 index 0000000..a7d4423 --- /dev/null +++ b/admin/template/post_error_body.tpl @@ -0,0 +1,5 @@ + + + + +
diff --git a/admin/template/skin.css b/admin/template/skin.css new file mode 100644 index 0000000..f2e11ab --- /dev/null +++ b/admin/template/skin.css @@ -0,0 +1,228 @@ +/* +//skin defines for DSF v1.0 +*/ + +a:hover +{ + text-decoration: underline; color : navy; +} + +/* beam */ +.beam +{ + color: #800000; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; + background-color: #C6D1FB; + text-align: center; + background-image: url('images/td_beam.jpg'); +} + +/* body class */ +.body +{ + background-color: #E8E8FF; + background-image: url('images/body_bg.gif'); + margin: 4px; +} + +/* style category */ +.category +{ + color: #FFFFFF; + font-family: Verdana; + font-size: 12px; + font-weight: bold; +} + +/* class copyright */ +.copyright +{ + font-family: Verdana; + font-size: 8pt; + color: #FFFFFF; + text-decoration: none; +} + +/* description forum */ +.desc +{ + color: #434354; + font-family: Verdana; + font-size: 8pt; +} +/* configuration footer */ +.footer +{ + background-color: #CCCCFF; +} + +/* heading forum - main title */ +.hforum +{ + color: #008000; + font-family: Verdana; + font-size: 16pt; + font-weight: bold; +} + +/* main */ +.main +{ + color: #7D96F7; + font-family: Verdana; + font-size: 12px; + font-weight: bold; +} + +/* standard error font*/ +.ferror +{ + color: red; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; +} + +/* forum item */ +.fitem +{ + background-color: #E1E7FD; + border-width : 1pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; +} + +/* main menu link*/ +.flink +{ + color: #000080; + font-family: Verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +/* small font */ +.fsmall +{ + color: #434354; + font-family: Verdana; + font-size: 8pt; + text-decoration: none; +} + +/* standard font */ +.fstandard +{ + color: #434354; + font-family: Verdana; + font-size: 9pt; + text-decoration: none; +} + +/* very small font */ +.fverysmall +{ + color: #434354; + font-family: Verdana; + font-size: 9px; + text-decoration: none; +} + +/* button class */ +input.fbutton +{ + background-color: #CCCCFF; + font-weight: bold; + cursor: pointer; + color: #800000; +} + + +input:hover +{ + background-color: lightyellow; +} + +/* main table forum(header, footer) */ +.maintable +{ + border-width : 1.5pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; +} + +/* mesage forum */ +.message { + z-index: 100; + border-width : 0pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; + background-color: #CCCCFF; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; +} + +/* moderate options */ +.moderate +{ + background-color: #D9E0FD; + text-align: center; +} + +.navigator +{ + color: blue; + text-decoration: none; +} + +/* section forum */ +.sect +{ + color: #434354; + font-family: Verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +/* table post error */ +.tableerror +{ + border-width : 1pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; + background-color: #CCCCFF; + font-family: Verdana; + font-size: 9pt; + text-align: center; + font-weight: bold; +} +/* quote text */ +.textquote +{ + font-family: Verdana; + font-size: 9pt; + font-style: italic; +} + +/* PANEL ADMINISTRATION SECTION ----------------------------------------------*/ +.pa_h1 +{ + font-family: Verdana; + font-size: 25pt; + font-weight: bold; +} +.pa_sect +{ + font-family: Verdana; + font-size: 15pt; + font-weight: bold; +} \ No newline at end of file diff --git a/admin/template/skins_beam_body.tpl b/admin/template/skins_beam_body.tpl new file mode 100644 index 0000000..33517ae --- /dev/null +++ b/admin/template/skins_beam_body.tpl @@ -0,0 +1,20 @@ +
+
+
+
+
+ +
+:     + +
+ + + + + + +
+

+

+ diff --git a/admin/template/skins_item_add.tpl b/admin/template/skins_item_add.tpl new file mode 100644 index 0000000..f4d3f24 --- /dev/null +++ b/admin/template/skins_item_add.tpl @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/admin/template/smilelist_add_file_body.tpl b/admin/template/smilelist_add_file_body.tpl new file mode 100644 index 0000000..549ce8e --- /dev/null +++ b/admin/template/smilelist_add_file_body.tpl @@ -0,0 +1,37 @@ +
+
+
+
+
+
+
+ + + + + +
+ + + + + +
+

+

+ + + + + + + + + + +
+ : + + + + + +
+   +   +
+ diff --git a/admin/template/smilelist_edit_body.tpl b/admin/template/smilelist_edit_body.tpl new file mode 100644 index 0000000..1a81a0a --- /dev/null +++ b/admin/template/smilelist_edit_body.tpl @@ -0,0 +1,42 @@ +
+
+
+
+
+
+ + + + + + +
+

+

+ + + + + + + + + + + + + + +
+ : + + +
+ : + + +
+   +   +
+ diff --git a/admin/template/smilelist_item_add.tpl b/admin/template/smilelist_item_add.tpl new file mode 100644 index 0000000..f004bac --- /dev/null +++ b/admin/template/smilelist_item_add.tpl @@ -0,0 +1,23 @@ + + + + + + + + +
+ + + + + + + + + + + + + +
diff --git a/admin/template/smilelist_view_body.tpl b/admin/template/smilelist_view_body.tpl new file mode 100644 index 0000000..8dd7263 --- /dev/null +++ b/admin/template/smilelist_view_body.tpl @@ -0,0 +1,23 @@ +
+
+
+
+
+
+ + + + + + +
+

+

+ + + +
+    +    +    +
diff --git a/admin/template/user_beam_body.tpl b/admin/template/user_beam_body.tpl new file mode 100644 index 0000000..2d7c145 --- /dev/null +++ b/admin/template/user_beam_body.tpl @@ -0,0 +1,29 @@ +
+
+ + + + + + + +
+ : + + + +
+ + + + + + + + + diff --git a/admin/template/user_edit_body.tpl b/admin/template/user_edit_body.tpl new file mode 100644 index 0000000..2541d8b --- /dev/null +++ b/admin/template/user_edit_body.tpl @@ -0,0 +1,237 @@ + + +
+
+
+
+
+ +
+ + +
ID
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + +
:
: +
: +
: +
: +
+  
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
: +
: + size="46" /> + +
: /> +    + />
: /> +    + />
: /> +    + />
+ :   + + +
+ :   + + +
+ :   + + +
: +
: + +
: +
+  
+ + + + + + +
+ + + + + +
: + + +
+  
+ + + + + + + +
+ + + + + + + + + +
: + +
: + + +
+  
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
: + />   + /> +
: + />   + />Moderator   + />Administator +
: +
+   + +
+
diff --git a/admin/template/user_item_add_body.tpl b/admin/template/user_item_add_body.tpl new file mode 100644 index 0000000..136228c --- /dev/null +++ b/admin/template/user_item_add_body.tpl @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/admin/template/users_beam_body.tpl b/admin/template/users_beam_body.tpl new file mode 100644 index 0000000..83b1a65 --- /dev/null +++ b/admin/template/users_beam_body.tpl @@ -0,0 +1,46 @@ + +
+
+
+
+
+ +
+
+
+ : + + : + + +
+
+  + + + + + + + + + +
+ diff --git a/admin/template/users_end_body.tpl b/admin/template/users_end_body.tpl new file mode 100644 index 0000000..4498c2e --- /dev/null +++ b/admin/template/users_end_body.tpl @@ -0,0 +1,10 @@ +
+
+: + + + +
+ \ No newline at end of file diff --git a/admin/template/wyzz_editarea.css b/admin/template/wyzz_editarea.css new file mode 100644 index 0000000..25f6d1d --- /dev/null +++ b/admin/template/wyzz_editarea.css @@ -0,0 +1,81 @@ +/**************** body and tag styles ****************/ + body, p { + margin-top: 0px; + margin-bottom: 30px; + background-color: #fefefe; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #333333; + font-size: 13px; + } + + #container { + width: 750px; + margin: 0 auto; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + line-height: 1.6em; + color: #666666; + background-color: #FFFFFF; + } + + #container2 { + width: 746px; + margin: 0 auto; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + line-height: 1.6em; + color: #666666; + background-color: #FFFFFF; + border-bottom: 2px solid #2763A5; + } + + pre { + font-family: "courier new", sans-serif; + font-weight: normal; + font-size: 12px; + color: #6DA6E2; + background-color: #FFFFFF; + } + + h1 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 32px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + h2 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 28px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + h3 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 24px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + a { + color: #6DA6E2; + background-color: #FFFFFF; + text-decoration: none; + font-weight: bold; + font-family: Verdana; + } + + a:hover { + background-color: #FFFFFF; + color: inherit; + font-weight: bold; + text-decoration: underline; + font-family: Verdana; + } \ No newline at end of file diff --git a/admin/template/wyzz_style.css b/admin/template/wyzz_style.css new file mode 100644 index 0000000..865a64b --- /dev/null +++ b/admin/template/wyzz_style.css @@ -0,0 +1,24 @@ +/* WYSIWYG EDITOR */ + +/* Toolbar */ +.toolbar { border: 1px solid #999999; height: 24px; background-image: url('images/td_editor.jpg'); background-color:#cccccc; } +.wyzz_alleditor { display: block; border:1px #aaa solid; width:520px; background:#e0e0e0; padding:2px;position:relative;} +.wyzz_alleditor div { display:block;} + +/* Command Buttons */ +.button { width: 20px; height: 20px; border: 1px solid transparent; margin: 0px; padding: 0px; background: transparent; } +.closebutton { float:right; padding: 2px; } +.buttonOver { width: 20px; height: 20px; border: 1px solid #999999; margin: 0px; padding: 0px; } +.separator { width: 2px; border-left: 1px solid #eeeeee; margin: 0px; padding: 0px; } + +/* others */ +.colorpicker, .colorbackpicker, .fontpicker, .headerpicker, .helpbox, .linkdialog { position:absolute; width: 216px; background:#eee; display:block; padding:0px; margin-top:0px; border:1px #555 solid;line-height:1.4} +.specialpicker { position:absolute; width: 216px; background:#eee; display:block; padding-top:20px;padding-left:20px; margin-top:0px; border:1px #555 solid;line-height:1.4} +.help {margin: 10px; font: 12px bold verdana,helvetica,arial,sans-serif black; text-align:center } +.help h4 {font: 18px bold verdana,helvetica,arial,sans-serif black; padding-top:10px} +.colorpicker a, .colorbackpicker a { border:1px #fff solid; height:10px; width:10px; font-size:0.01em; display:block;float:left; margin-right:0px;} +.colorpicker a:hover, .colorbackpicker a:hover { border:1px #f00 solid;} +.fontpicker a, .headerpicker a { color:#333;text-decoration:none;background:#eee;} +.fontpicker a:hover, .headerpicker a:hover, .specialpicker a:hover { color: #666 } +.specialpicker a { color:#333;font-family:arial;text-decoration:none;background:#eee;height:13px; width:12px;font-size:14px} +.charbutton { width:12px;height:14px; } \ No newline at end of file diff --git a/common.php b/common.php new file mode 100644 index 0000000..9cb0b13 --- /dev/null +++ b/common.php @@ -0,0 +1,84 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ + +if (is_dir('install')) +{ + die('Please delete or rename catalog "install"'); +} +//set global preferences from DataBase +$sql="SELECT * FROM ".CONFIG_TABLE.""; +$query=DataBase::sql_query($sql,'CRITICAL','Could not obtain config information'); +while($result=mysql_fetch_array($query)) +{ + if (($result['name']=='') or ($result['name']=='0')) + { + $forum_config['name']==false; + } + else + { + $forum_config[$result['name']] = $result['value']; + } +} +//check for disable forum +if ($_SESSION>0) +{ + if (($forum_config['disable_forum']) and (User::UserInformation($_SESSION['uid'],'rank')<2)) + { + die($forum_config['disable_forum']); + } +} +else +{ + if ($forum_config['disable_forum']) + { + die($forum_config['disable_forum']); + } +} + +//check for banned user +if ($_SESSION['uid']>0) +{ + $ip = $_SERVER['REMOTE_ADDR']; + $uid = $_SESSION['uid']; + $sql = "SELECT `IP`, `u_id`, `motive` FROM ".BANLIST_TABLE." WHERE `IP`='$ip' OR `u_id`='$uid'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain ban information')); + $motive = $result['motive']; + $db_ip = $result['IP']; + $db_uid = $result['u_id']; + if (($db_ip==$ip) || ($db_uid==$uid)) + { + include('./includes/class_overall.php'); + include('./lngs/'.Over::DefaultLang().'/main.php'); + sess_delete($_SESSION['uid']); + $_SESSION['uid']='0'; + message_forum($motive,'index.php', '10'); + } +} + +//set to variable userdata loged user informations +if ($_SESSION['uid']>0) +{ + $sql = "SELECT * FROM ".USERS_TABLE." WHERE `u_id`=".$_SESSION['uid']." LIMIT 1"; +} +else +{ + $sql = "SELECT * FROM ".USERS_TABLE." WHERE `u_id`='-1'"; +} +$query = DataBase::sql_query($sql, 'GENERAL','Could not obtain loged user information'); +$userdata = mysql_fetch_array($query); +define('RANK', $userdata['rank']); + +define('TABLES_WIDTH',$forum_config['tables_width']); +//protect of database - add the backslashes +/*foreach ($_POST as $name => $value) +{ + $_POST[$name] = mysql_real_escape_string($value); +}*/ +?> diff --git a/config.php b/config.php new file mode 100644 index 0000000..8ba4240 --- /dev/null +++ b/config.php @@ -0,0 +1,22 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +@ini_set('display_errors', '1'); +define('DB_HOST','localhost'); +define('DB_USER','root'); +define('DB_PASS',''); +define('DB_NAME','uf'); +define('DB_PREFIX','uf_'); +define('VERSION','9.4.29'); +define('DSF_INSTALLED',true); +?> diff --git a/eprofile.php b/eprofile.php new file mode 100644 index 0000000..4463092 --- /dev/null +++ b/eprofile.php @@ -0,0 +1,292 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_posting.php'); +include('./includes/class_forum.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +$default_skin = Over::ViewSkinName(); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if ($_SESSION['uid']==0) +{ + $stop = Over::TimeGeneration(); + message_forum($lng['youarenotlogd'],'login.php?mode=login'); +} +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +$msg=''; +$errors = true; +if (isset($_POST['email'])) +{ + if ( ereg ("^.+@.+\..+$", $_POST['email'])) + { + //if user changing password... + if ($_POST['password']!='') + { + if (md5($_POST['password'])==User::UserInformation($_SESSION['uid'],'pass')) + { + if ($_POST['newpassword']==$_POST['confirmpassword']) + { + User::UpdatePassword($_SESSION['uid'], md5(strip_tags($_POST['newpassword']))); + $errors = false; + } + else + { + $message=$lng['incorrect_password2']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['incorrect_password']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + if ($_POST['default_skin']!='-1') + { + if ($_POST['default_lang']!='-1') + { + if ($_POST['limit_tpid']!='-1') + { + if ($_POST['limit_ftid']!='-1') + { + if ($_POST['limit_users']!='-1') + { + if (strlen(trim($_POST['sig']))<$forum_config['sig_len']) + { + $errors = false; + } + else + { + $message = $lng['signature_too_long']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_users']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_ftid']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message = $lng['no_limit_tpid']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['invalid_lang']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['invalid_skin']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + if (!$errors) + { + $_POST['ggnumber']=intval($_POST['ggnumber']); + $_POST['interests']=strip_tags($_POST['interests']); + $_POST['sig']=Secure::TagsReplace($_POST['sig']); + $allow_shoutbox = (isset($_POST['allow_shoutbox'])) ? '1' : 0; + if (isset($_FILES['avatar_file']['tmp_name'])) + { + $extension = substr($_FILES['avatar_file']['name'],(strlen($_FILES['avatar_file']['name'])-3)); + if (($extension == 'jpg') or ($extension == 'gif')) + { + if (file_exists(AV_CATALOG.'av-'.$_SESSION['uid'].'.jpg')) + { + unlink(AV_CATALOG.'av-'.$_SESSION['uid'].'.jpg'); + } + if (file_exists(AV_CATALOG.'av-'.$_SESSION['uid'].'.gif')) + { + unlink(AV_CATALOG.'av-'.$_SESSION['uid'].'.gif'); + } + move_uploaded_file($_FILES['avatar_file']['tmp_name'], AV_CATALOG.'av-'.$_SESSION['uid'].'.'.$extension); + $imagesize = @getimagesize(AV_CATALOG.'av-'.$_SESSION['uid'].'.'.$extension); + if (($imagesize[0]<$forum_config['max_av_x']) && ($imagesize[1]<$forum_config['max_av_y'])) + { + $_POST['avatar'] = AV_CATALOG.'av-'.$_SESSION['uid'].'.'.$extension; + } + else + { + $_POST['avatar'] = 'images/av-to-big.jpg'; + } + } + else + { + $_POST['avatar'] = htmlspecialchars($_POST['avatar']); + if (!preg_match('#^(http)|(ftp):\/\/#i', $_POST['avatar']) && $_POST['avatar'] != 'images/av-to-big.jpg') + { + $_POST['avatar'] = 'http://' . $_POST['avatar']; + } + + if (!preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|gif))$)#is", $_POST['avatar']) && $_POST['avatar'] != 'images/av-to-big.jpg') + { + $_POST['avatar'] = ''; + } + else + { + $imagesize = getimagesize($_POST['avatar']); + if (($imagesize[0]<$forum_config['max_av_x']) && ($imagesize[1]<$forum_config['max_av_y'])) + { + $_POST['avatar'] = $_POST['avatar']; + } + else + { + $_POST['avatar'] = 'images/av-to-big.jpg'; + } + } + } + } + else + { + $_POST['avatar'] = htmlspecialchars($_POST['avatar']); + if (!preg_match('#^(http)|(ftp):\/\/#i', $_POST['avatar']) && $_POST['avatar'] != 'images/av-to-big.jpg') + { + $_POST['avatar'] = 'http://' . $_POST['avatar']; + } + + if (!preg_match("#^((ht|f)tp://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|gif))$)#is", $_POST['avatar']) && $_POST['avatar'] != 'images/av-to-big.jpg') + { + $_POST['avatar'] = ''; + } + else + { + $imagesize = getimagesize($_POST['avatar']); + if (($imagesize[0]<$forum_config['max_av_x']) && ($imagesize[1]<$forum_config['max_av_y'])) + { + $_POST['avatar'] = $_POST['avatar']; + } + else + { + $_POST['avatar'] = 'images/av-to-big.jpg'; + } + } + } + User::UpdateProfile($_SESSION['uid'],$_POST['ggnumber'],strip_tags($_POST['email']),$_POST['interests'], $_POST['sig'],$_POST['avatar'],$_POST['allow_qr'],$_POST['allow_email'],$_POST['allow_gg'],$_POST['default_skin'],$_POST['default_lang'], $_POST['limit_tpid'],$_POST['limit_ftid'], $_POST['limit_users'], $allow_shoutbox); + message_forum($lng['profile_modernized'],'eprofile.php'); + } + } + else + { + $message=$lng['invalid_email']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } +} +//add skin variables +$skin = array( +//labels profile +'lnick'=>$lng['user_name'], +'lpass'=>$lng['lpassw'], +'lnewpass'=>$lng['new_password'], +'lcpass'=>$lng['confirm_password'], +'lemail'=>'E-mail', +'lgg'=>$lng['gg_number'], +'lallow_gg'=>$lng['allow_gg'], +'lallow_email'=>$lng['allow_email'], +'lallow_qr'=>$lng['allow_qr'], +'linterests'=>$lng['luinterests'], +'lsig'=>$lng['sig'], +'lavaddr'=>$lng['picture_adress'], +'lovpr'=>$lng['general_settings'], +'L.select_value'=>$lng['select_value'], +'L.limit_users'=>$lng['limit_users'], +'OPTIONS.limit_users'=>Over::AddPages2($userdata['limit_users']), +'L.posts_in_topic'=>$lng['limit_posts'], +'OPTIONS.limit_tpid'=>Over::AddPages2($userdata['limit_tpid']), +'L.topics_in_forum'=>$lng['limit_topics'], +'OPTIONS.limit_ftid'=>Over::AddPages2($userdata['limit_ftid']), +'lupr'=>$lng['profile_settings'], +'lspr'=>$lng['signature_settings'], +'ldefault_lang'=>$lng['default_lang'], +'default_lang'=>Over::AddLangs(), +'l2default_lang'=>$lng['select_lang'], +'ldefault_skin'=>$lng['default_skin'], +'default_skin'=>Over::AddSkins(), +'l2default_skin'=>$lng['select_skin'], +'lapr'=>$lng['avatar_settings'], +'lsubmit'=>$lng['save'], +'lreset'=>$lng['reset'], +'nick'=>$userdata['nick'], + +//options profile +'sig'=>$userdata['sig'], +'allow'=>$lng['allow'], +'allow_shoutbox'=>($userdata['view_shoutbox']==1) ? 'checked="checked"' : '', +'avatar'=>$userdata['avatar'], +'interests'=>$userdata['interests'], +'email'=>$userdata['email'], +'gg'=>$userdata['gg'], + +//options values +'option_no_gg'=>($userdata['allow_gg']==0) ? 'checked="checked"' : '', +'option_no_email'=>($userdata['allow_email']==0) ? 'checked="checked"' : '', +'option_no_qr'=>($userdata['allow_qr']==0) ? 'checked="checked"' : '', +'option_yes_gg'=>($userdata['allow_gg']==1) ? 'checked="checked"' : '', +'option_yes_email'=>($userdata['allow_email']==1) ? 'checked="checked"' : '', +'option_yes_qr'=>($userdata['allow_qr']==1) ? 'checked="checked"' : '', +'no'=>$lng['no'], +'lallow_shoutbox'=>$lng['allow_shoutbox'], +'lavfile'=>$lng['avatar_file'], +'yes'=>$lng['yes'] +); +$skin = array_push_associative($skin,Over::generate_header($lng['leprofile'],'> '.$lng['leprofile'])); +if ($msg=='') +{ + $msg = './skins/'.$default_skin.'/blank.tpl'; +} +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/eprofile_body.tpl'); +if(RANK=='2') +{ + $skin['pa_link']=''.$lng['pa_link'].''; +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/forum.php b/forum.php new file mode 100644 index 0000000..d3d9246 --- /dev/null +++ b/forum.php @@ -0,0 +1,110 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +$start = Over::TimeGeneration(); +$fid = intval($_GET['f']); + +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); + +include('./includes/cache/cache_forums.php'); + +//add skin variables +$skin = array( +'ntopic' => ($forum['lock']==1) ? 'ntopic' : ' + reply', +'lposts'=>$lng['posts'], +'llastposts'=>$lng['lastpost'], +'lposts'=>$lng['posts'], +'lauthor'=>$lng['author'], +'llastpost'=>$lng['lastpost'], +'ltopicname'=>$lng['ltopicname'], +'f_id' => $fid, +'lang'=> $default_lang +); +$skin = array_push_associative($skin,Over::generate_header($lng['showforum'].': '.$forum['name'], '> '.$forum['name'])); +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/forum_body.tpl'); +$sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; +$query = DataBase::sql_query($sql,'GENERAL','Could not obtain topics information'); +$value = mysql_num_rows($query); +if ($value>0) +{ + while($record = mysql_fetch_array($query)) + { + $skin = array( + 't_id'=>$record['t_id'], + 'fname'=>($record['sticky']=='1') ? ''.$lng['sticky'].''.$record['name'] : $record['name'], + 'author'=>Topic::TopicAuthor($record['author']), + 'tposts'=>$count_topic[$record['t_id']], + 'new_post'=>Topic::LastPostImg(), + 'lastpost'=>Topic::LastPostInTopic($record['t_id']) + ); + include('./skins/'.$default_skin.'/forum_forum_add.tpl'); + } + $skin['noposts']=''; +} +else +{ + $skin['noposts']='

'.$lng['nopost'].'!

'; +} +$skin = array_push_associative($skin, array( +'option_pages' => Over::AddPages(), +'lwith' => $lng['with'], +'lpage' => $lng['page'], +'lpages' => $count, +'f_id' => $fid, +'lang' => $default_lang, +'ntopic' => ($forum['lock']==1) ? 'ntopic' : '
+ reply' +)); +include('./skins/'.$default_skin.'/forum_end_body.tpl'); +if ($_SESSION['uid']>0) +{ + if(RANK=='2') + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/groups.php b/groups.php new file mode 100644 index 0000000..be5fd63 --- /dev/null +++ b/groups.php @@ -0,0 +1,182 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +include('./lngs/'.Over::DefaultLang().'/main.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$start = Over::TimeGeneration(); +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +if(isset($_GET['mode'])) +{ + switch($_GET['mode']) + { + case 'view': + { + $start = Over::TimeGeneration(); + $default_skin = Over::ViewSkinName(); + $gid = intval($_GET['id']); + if ((isset($_POST['nick']))and ($_POST['nick']!='')) + { + if($_POST['nick']!='') + { + $uid =User::UserIdByNick($_POST['nick']); + Secure::user_exists($uid); + User::AddToGroup($uid, $gid); + message_forum($lng['useraddedtogroup'],'groups.php?mode=view&id='.$gid); + } + else + { + + } + } + elseif ((isset($_POST['delnick']))and ($_POST['delnick']!='')) + { + $uid =User::UserIdByNick($_POST['delnick']); + Secure::user_exists($uid); + User::DeleteFromGroup($uid, $gid); + message_forum($lng['userdeletedforgroup'],'groups.php?mode=view&id='.$gid); + } + else + { + $_POST['nick']=''; + $_POST['delnick']=''; + } + $sql = "SELECT `g_id`, `name`, `desc`, `m_id` FROM `".GROUPS_TABLE."` WHERE `g_id`='$gid'"; + $group = mysql_fetch_array(DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.')); + if ($group['g_id']=='') + { + message_forum($lng['no_group'], 'index.php'); + } + unset($tmp); + $skin = Over::generate_header($lng['showgroup'].': '.$group['name'], '> '.$lng['showgroup'].': '.$group['name']); + include('./skins/'.$default_skin.'/overall_header.tpl'); + $skin = array( + 'moderate'=>Over::IfModGroup($group['m_id']), + 'name'=>$group['name'], + 'desc'=>$group['desc'], + 'lregdate'=>$lng['luregister'], + 'llastvisit'=>$lng['lulastvisit'], + 'lposts'=>$lng['posts'], + 'luname'=>$lng['user_name'], + 'g_id'=>$group['g_id'] + ); + include('./skins/'.$default_skin.'/group_view_head_body.tpl'); + $sql = "SELECT ".USERS_GROUP_TABLE.".*, ".USERS_TABLE.".* FROM `".USERS_GROUP_TABLE."` LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id =".USERS_GROUP_TABLE.".u_id WHERE `g_id`='$gid'"; + $query = DataBase::sql_query($sql, 'GENERAL', 'Could not obtain users in groups information.'); + $amout = @mysql_num_rows($query); + if ($amout>0) + { + while($result = mysql_fetch_array($query)) + { + $skin = array( + 'id'=>$result['u_id'], + 'uname'=>Topic::UserName($result['nick'], $result['rank']), + 'regdate'=>date('d-m-Y, G:i',$result['regdate']), + 'lastvisit'=>($result['lastvisit']>0) ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'], + 'posts'=>$result['posts'] + ); + include('./skins/'.$default_skin.'/users_item_add_body.tpl'); + } + } + else + { + echo '

'.$lng['no_elements'].'!

'; + } + if ($_SESSION['uid']>0) + { + if(RANK=='2') + { + $skin['pa_link']='
'.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } + } + else + { + $skin['pa_link']=''; + } + echo ''; + $stop = Over::TimeGeneration(); + $skin['queries'] = Over::ShowQueries($start, $stop); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + default: + { + message_forum($lng['invalidmode'],'groups.php'); + } + } +} +else +{ + $default_skin = Over::ViewSkinName(); + $skin = Over::generate_header($lng['lgroups'], '> '.$lng['lgroups']); + include('./skins/'.$default_skin.'/overall_header.tpl'); + $sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`"; + $query = DataBase::sql_query($sql, 'GENERAL', 'Could not obtain groups information.'); + if (@mysql_num_rows($query)>0) + { + while($item = mysql_fetch_array($query)) + { + $skin = array( + 'g_id'=>$item['g_id'], + 'name'=>$item['name'], + 'desc'=>$item['desc'] + ); + include('./skins/'.$default_skin.'/group_add_body.tpl'); + } + } + else + { + echo '

'.$lng['no_groups'].'!

'; + } + if ($_SESSION['uid']>0) + { + if(RANK=='2') + { + $skin['pa_link']='
'.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } + } + else + { + $skin['pa_link']=''; + } + $stop = Over::TimeGeneration(); + $skin['queries'] = Over::ShowQueries($start, $stop); + include('./skins/'.$default_skin.'/overall_footer.tpl'); +} +?> diff --git a/images/Thumbs.db b/images/Thumbs.db new file mode 100644 index 0000000..6935bf5 Binary files /dev/null and b/images/Thumbs.db differ diff --git a/images/av-to-big.jpg b/images/av-to-big.jpg new file mode 100644 index 0000000..b3c3b4f Binary files /dev/null and b/images/av-to-big.jpg differ diff --git a/images/avatars/index.html b/images/avatars/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/images/avatars/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/images/index.html b/images/index.html new file mode 100644 index 0000000..c2733fd --- /dev/null +++ b/images/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/images/offline.gif b/images/offline.gif new file mode 100644 index 0000000..3a95107 Binary files /dev/null and b/images/offline.gif differ diff --git a/images/online.gif b/images/online.gif new file mode 100644 index 0000000..9ecac56 Binary files /dev/null and b/images/online.gif differ diff --git a/images/smiles/Thumbs.db b/images/smiles/Thumbs.db new file mode 100644 index 0000000..c8e0afd Binary files /dev/null and b/images/smiles/Thumbs.db differ diff --git a/images/smiles/icon_arrow.gif b/images/smiles/icon_arrow.gif new file mode 100644 index 0000000..2880055 Binary files /dev/null and b/images/smiles/icon_arrow.gif differ diff --git a/images/smiles/icon_biggrin.gif b/images/smiles/icon_biggrin.gif new file mode 100644 index 0000000..d352772 Binary files /dev/null and b/images/smiles/icon_biggrin.gif differ diff --git a/images/smiles/icon_confused.gif b/images/smiles/icon_confused.gif new file mode 100644 index 0000000..0c49e06 Binary files /dev/null and b/images/smiles/icon_confused.gif differ diff --git a/images/smiles/icon_cool.gif b/images/smiles/icon_cool.gif new file mode 100644 index 0000000..cead030 Binary files /dev/null and b/images/smiles/icon_cool.gif differ diff --git a/images/smiles/icon_cry.gif b/images/smiles/icon_cry.gif new file mode 100644 index 0000000..7d54b1f Binary files /dev/null and b/images/smiles/icon_cry.gif differ diff --git a/images/smiles/icon_curve.gif b/images/smiles/icon_curve.gif new file mode 100644 index 0000000..fa9f58b Binary files /dev/null and b/images/smiles/icon_curve.gif differ diff --git a/images/smiles/icon_eek.gif b/images/smiles/icon_eek.gif new file mode 100644 index 0000000..5d39781 Binary files /dev/null and b/images/smiles/icon_eek.gif differ diff --git a/images/smiles/icon_evil.gif b/images/smiles/icon_evil.gif new file mode 100644 index 0000000..ab1aa8e Binary files /dev/null and b/images/smiles/icon_evil.gif differ diff --git a/images/smiles/icon_exclaim.gif b/images/smiles/icon_exclaim.gif new file mode 100644 index 0000000..6e50e2e Binary files /dev/null and b/images/smiles/icon_exclaim.gif differ diff --git a/images/smiles/icon_idea.gif b/images/smiles/icon_idea.gif new file mode 100644 index 0000000..a40ae0d Binary files /dev/null and b/images/smiles/icon_idea.gif differ diff --git a/images/smiles/icon_lol.gif b/images/smiles/icon_lol.gif new file mode 100644 index 0000000..374ba15 Binary files /dev/null and b/images/smiles/icon_lol.gif differ diff --git a/images/smiles/icon_mad.gif b/images/smiles/icon_mad.gif new file mode 100644 index 0000000..1f6c3c2 Binary files /dev/null and b/images/smiles/icon_mad.gif differ diff --git a/images/smiles/icon_mrgreen.gif b/images/smiles/icon_mrgreen.gif new file mode 100644 index 0000000..e53c5ae Binary files /dev/null and b/images/smiles/icon_mrgreen.gif differ diff --git a/images/smiles/icon_neutral.gif b/images/smiles/icon_neutral.gif new file mode 100644 index 0000000..4f31156 Binary files /dev/null and b/images/smiles/icon_neutral.gif differ diff --git a/images/smiles/icon_question.gif b/images/smiles/icon_question.gif new file mode 100644 index 0000000..9d07226 Binary files /dev/null and b/images/smiles/icon_question.gif differ diff --git a/images/smiles/icon_razz.gif b/images/smiles/icon_razz.gif new file mode 100644 index 0000000..7ddefe3 Binary files /dev/null and b/images/smiles/icon_razz.gif differ diff --git a/images/smiles/icon_redface.gif b/images/smiles/icon_redface.gif new file mode 100644 index 0000000..ad76283 Binary files /dev/null and b/images/smiles/icon_redface.gif differ diff --git a/images/smiles/icon_rolleyes.gif b/images/smiles/icon_rolleyes.gif new file mode 100644 index 0000000..d7f5f2f Binary files /dev/null and b/images/smiles/icon_rolleyes.gif differ diff --git a/images/smiles/icon_sad.gif b/images/smiles/icon_sad.gif new file mode 100644 index 0000000..d2ac78c Binary files /dev/null and b/images/smiles/icon_sad.gif differ diff --git a/images/smiles/icon_smile.gif b/images/smiles/icon_smile.gif new file mode 100644 index 0000000..7b1f6d3 Binary files /dev/null and b/images/smiles/icon_smile.gif differ diff --git a/images/smiles/icon_smile2.gif b/images/smiles/icon_smile2.gif new file mode 100644 index 0000000..202d6c7 Binary files /dev/null and b/images/smiles/icon_smile2.gif differ diff --git a/images/smiles/icon_surprised.gif b/images/smiles/icon_surprised.gif new file mode 100644 index 0000000..cb21424 Binary files /dev/null and b/images/smiles/icon_surprised.gif differ diff --git a/images/smiles/icon_twisted.gif b/images/smiles/icon_twisted.gif new file mode 100644 index 0000000..502fe24 Binary files /dev/null and b/images/smiles/icon_twisted.gif differ diff --git a/images/smiles/icon_wink.gif b/images/smiles/icon_wink.gif new file mode 100644 index 0000000..d148288 Binary files /dev/null and b/images/smiles/icon_wink.gif differ diff --git a/images/smiles/index.html b/images/smiles/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/images/smiles/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/images/smiles/smiles.dsfpak b/images/smiles/smiles.dsfpak new file mode 100644 index 0000000..6054037 --- /dev/null +++ b/images/smiles/smiles.dsfpak @@ -0,0 +1,17 @@ +:) :: images/smiles/icon_smile.gif +;( :: images/smiles/icon_cry.gif +:( :: images/smiles/icon_sad.gif +:/ :: images/smiles/icon_curve.gif +:| :: images/smiles/icon_neutral.gif +:idea: :: images/smiles/icon_idea.gif +:lol: :: images/smiles/icon_lol.gif +;) :: images/smiles/icon_wink.gif +:?: :: images/smiles/icon_question.gif +:!: :: images/smiles/icon_exclaim.gif +:P :: images/smiles/icon_razz.gif +:roll: :: images/smiles/icon_rolleyes.gif +:> :: images/smiles/icon_smile2.gif +:diabolek: :: images/smiles/icon_twisted.gif +:o :: images/smiles/icon_surprised.gif +:zly: :: images/smiles/icon_mad.gif +:zawstydzony: :: images/smiles/icon_redface.gif diff --git a/images/user_agent/Thumbs.db b/images/user_agent/Thumbs.db new file mode 100644 index 0000000..ee7ea57 Binary files /dev/null and b/images/user_agent/Thumbs.db differ diff --git a/images/user_agent/icon_aix.gif b/images/user_agent/icon_aix.gif new file mode 100644 index 0000000..6b081af Binary files /dev/null and b/images/user_agent/icon_aix.gif differ diff --git a/images/user_agent/icon_amiga.gif b/images/user_agent/icon_amiga.gif new file mode 100644 index 0000000..7c5ac6a Binary files /dev/null and b/images/user_agent/icon_amiga.gif differ diff --git a/images/user_agent/icon_athe.gif b/images/user_agent/icon_athe.gif new file mode 100644 index 0000000..dfe30d7 Binary files /dev/null and b/images/user_agent/icon_athe.gif differ diff --git a/images/user_agent/icon_avant.gif b/images/user_agent/icon_avant.gif new file mode 100644 index 0000000..a4e9cb2 Binary files /dev/null and b/images/user_agent/icon_avant.gif differ diff --git a/images/user_agent/icon_beos.gif b/images/user_agent/icon_beos.gif new file mode 100644 index 0000000..8a860da Binary files /dev/null and b/images/user_agent/icon_beos.gif differ diff --git a/images/user_agent/icon_dillo.gif b/images/user_agent/icon_dillo.gif new file mode 100644 index 0000000..2d48c03 Binary files /dev/null and b/images/user_agent/icon_dillo.gif differ diff --git a/images/user_agent/icon_firebird.gif b/images/user_agent/icon_firebird.gif new file mode 100644 index 0000000..147d029 Binary files /dev/null and b/images/user_agent/icon_firebird.gif differ diff --git a/images/user_agent/icon_firefox.gif b/images/user_agent/icon_firefox.gif new file mode 100644 index 0000000..03c302c Binary files /dev/null and b/images/user_agent/icon_firefox.gif differ diff --git a/images/user_agent/icon_galeon.gif b/images/user_agent/icon_galeon.gif new file mode 100644 index 0000000..68d65b8 Binary files /dev/null and b/images/user_agent/icon_galeon.gif differ diff --git a/images/user_agent/icon_ie.gif b/images/user_agent/icon_ie.gif new file mode 100644 index 0000000..68dd5aa Binary files /dev/null and b/images/user_agent/icon_ie.gif differ diff --git a/images/user_agent/icon_ie7.gif b/images/user_agent/icon_ie7.gif new file mode 100644 index 0000000..121203d Binary files /dev/null and b/images/user_agent/icon_ie7.gif differ diff --git a/images/user_agent/icon_konqueror.gif b/images/user_agent/icon_konqueror.gif new file mode 100644 index 0000000..3409c43 Binary files /dev/null and b/images/user_agent/icon_konqueror.gif differ diff --git a/images/user_agent/icon_lindows.gif b/images/user_agent/icon_lindows.gif new file mode 100644 index 0000000..2d36851 Binary files /dev/null and b/images/user_agent/icon_lindows.gif differ diff --git a/images/user_agent/icon_links.gif b/images/user_agent/icon_links.gif new file mode 100644 index 0000000..f619768 Binary files /dev/null and b/images/user_agent/icon_links.gif differ diff --git a/images/user_agent/icon_linux.gif b/images/user_agent/icon_linux.gif new file mode 100644 index 0000000..5c5d8cf Binary files /dev/null and b/images/user_agent/icon_linux.gif differ diff --git a/images/user_agent/icon_linux_arch.gif b/images/user_agent/icon_linux_arch.gif new file mode 100644 index 0000000..fed0239 Binary files /dev/null and b/images/user_agent/icon_linux_arch.gif differ diff --git a/images/user_agent/icon_linux_cdlinux.gif b/images/user_agent/icon_linux_cdlinux.gif new file mode 100644 index 0000000..b16d0dd Binary files /dev/null and b/images/user_agent/icon_linux_cdlinux.gif differ diff --git a/images/user_agent/icon_linux_debian.gif b/images/user_agent/icon_linux_debian.gif new file mode 100644 index 0000000..85099db Binary files /dev/null and b/images/user_agent/icon_linux_debian.gif differ diff --git a/images/user_agent/icon_linux_freebsd.gif b/images/user_agent/icon_linux_freebsd.gif new file mode 100644 index 0000000..3af7cd4 Binary files /dev/null and b/images/user_agent/icon_linux_freebsd.gif differ diff --git a/images/user_agent/icon_linux_gentoo.gif b/images/user_agent/icon_linux_gentoo.gif new file mode 100644 index 0000000..d69ecee Binary files /dev/null and b/images/user_agent/icon_linux_gentoo.gif differ diff --git a/images/user_agent/icon_linux_kateos.gif b/images/user_agent/icon_linux_kateos.gif new file mode 100644 index 0000000..32cc60f Binary files /dev/null and b/images/user_agent/icon_linux_kateos.gif differ diff --git a/images/user_agent/icon_linux_knoppix.gif b/images/user_agent/icon_linux_knoppix.gif new file mode 100644 index 0000000..d454540 Binary files /dev/null and b/images/user_agent/icon_linux_knoppix.gif differ diff --git a/images/user_agent/icon_linux_lycoris.gif b/images/user_agent/icon_linux_lycoris.gif new file mode 100644 index 0000000..bf60352 Binary files /dev/null and b/images/user_agent/icon_linux_lycoris.gif differ diff --git a/images/user_agent/icon_linux_mandriva.gif b/images/user_agent/icon_linux_mandriva.gif new file mode 100644 index 0000000..91c4b80 Binary files /dev/null and b/images/user_agent/icon_linux_mandriva.gif differ diff --git a/images/user_agent/icon_linux_redhat.gif b/images/user_agent/icon_linux_redhat.gif new file mode 100644 index 0000000..b27db1f Binary files /dev/null and b/images/user_agent/icon_linux_redhat.gif differ diff --git a/images/user_agent/icon_linux_slackware.gif b/images/user_agent/icon_linux_slackware.gif new file mode 100644 index 0000000..9373109 Binary files /dev/null and b/images/user_agent/icon_linux_slackware.gif differ diff --git a/images/user_agent/icon_linux_suse.gif b/images/user_agent/icon_linux_suse.gif new file mode 100644 index 0000000..20564be Binary files /dev/null and b/images/user_agent/icon_linux_suse.gif differ diff --git a/images/user_agent/icon_linux_turbolinux.gif b/images/user_agent/icon_linux_turbolinux.gif new file mode 100644 index 0000000..650fe95 Binary files /dev/null and b/images/user_agent/icon_linux_turbolinux.gif differ diff --git a/images/user_agent/icon_linux_ubuntu.gif b/images/user_agent/icon_linux_ubuntu.gif new file mode 100644 index 0000000..93a1bc7 Binary files /dev/null and b/images/user_agent/icon_linux_ubuntu.gif differ diff --git a/images/user_agent/icon_macos.gif b/images/user_agent/icon_macos.gif new file mode 100644 index 0000000..db6832b Binary files /dev/null and b/images/user_agent/icon_macos.gif differ diff --git a/images/user_agent/icon_maxthon.gif b/images/user_agent/icon_maxthon.gif new file mode 100644 index 0000000..69b8200 Binary files /dev/null and b/images/user_agent/icon_maxthon.gif differ diff --git a/images/user_agent/icon_mozilla.gif b/images/user_agent/icon_mozilla.gif new file mode 100644 index 0000000..2ccdb7e Binary files /dev/null and b/images/user_agent/icon_mozilla.gif differ diff --git a/images/user_agent/icon_myie2.gif b/images/user_agent/icon_myie2.gif new file mode 100644 index 0000000..08cac83 Binary files /dev/null and b/images/user_agent/icon_myie2.gif differ diff --git a/images/user_agent/icon_netscape.gif b/images/user_agent/icon_netscape.gif new file mode 100644 index 0000000..46dd4b6 Binary files /dev/null and b/images/user_agent/icon_netscape.gif differ diff --git a/images/user_agent/icon_netsprint.gif b/images/user_agent/icon_netsprint.gif new file mode 100644 index 0000000..42577e4 Binary files /dev/null and b/images/user_agent/icon_netsprint.gif differ diff --git a/images/user_agent/icon_next.gif b/images/user_agent/icon_next.gif new file mode 100644 index 0000000..39d5144 Binary files /dev/null and b/images/user_agent/icon_next.gif differ diff --git a/images/user_agent/icon_omniweb.gif b/images/user_agent/icon_omniweb.gif new file mode 100644 index 0000000..aaadd5a Binary files /dev/null and b/images/user_agent/icon_omniweb.gif differ diff --git a/images/user_agent/icon_opera.gif b/images/user_agent/icon_opera.gif new file mode 100644 index 0000000..5a33c73 Binary files /dev/null and b/images/user_agent/icon_opera.gif differ diff --git a/images/user_agent/icon_qnx.gif b/images/user_agent/icon_qnx.gif new file mode 100644 index 0000000..b1b115e Binary files /dev/null and b/images/user_agent/icon_qnx.gif differ diff --git a/images/user_agent/icon_risc.gif b/images/user_agent/icon_risc.gif new file mode 100644 index 0000000..56d9ca5 Binary files /dev/null and b/images/user_agent/icon_risc.gif differ diff --git a/images/user_agent/icon_seamonkey.gif b/images/user_agent/icon_seamonkey.gif new file mode 100644 index 0000000..63fa0d2 Binary files /dev/null and b/images/user_agent/icon_seamonkey.gif differ diff --git a/images/user_agent/icon_solaris.gif b/images/user_agent/icon_solaris.gif new file mode 100644 index 0000000..37878a6 Binary files /dev/null and b/images/user_agent/icon_solaris.gif differ diff --git a/images/user_agent/icon_symbian.gif b/images/user_agent/icon_symbian.gif new file mode 100644 index 0000000..8356261 Binary files /dev/null and b/images/user_agent/icon_symbian.gif differ diff --git a/images/user_agent/icon_unix.gif b/images/user_agent/icon_unix.gif new file mode 100644 index 0000000..699f505 Binary files /dev/null and b/images/user_agent/icon_unix.gif differ diff --git a/images/user_agent/icon_unknown.gif b/images/user_agent/icon_unknown.gif new file mode 100644 index 0000000..f2f6acd Binary files /dev/null and b/images/user_agent/icon_unknown.gif differ diff --git a/images/user_agent/icon_warp.gif b/images/user_agent/icon_warp.gif new file mode 100644 index 0000000..2334d75 Binary files /dev/null and b/images/user_agent/icon_warp.gif differ diff --git a/images/user_agent/icon_windows_98_nt_2000.gif b/images/user_agent/icon_windows_98_nt_2000.gif new file mode 100644 index 0000000..c0d7d1f Binary files /dev/null and b/images/user_agent/icon_windows_98_nt_2000.gif differ diff --git a/images/user_agent/icon_windows_vista.gif b/images/user_agent/icon_windows_vista.gif new file mode 100644 index 0000000..66f9d84 Binary files /dev/null and b/images/user_agent/icon_windows_vista.gif differ diff --git a/images/user_agent/icon_windows_xp_2003.gif b/images/user_agent/icon_windows_xp_2003.gif new file mode 100644 index 0000000..1e68d2c Binary files /dev/null and b/images/user_agent/icon_windows_xp_2003.gif differ diff --git a/images/user_agent/index.html b/images/user_agent/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/images/user_agent/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/images/wyzz.js b/images/wyzz.js new file mode 100644 index 0000000..5190db5 --- /dev/null +++ b/images/wyzz.js @@ -0,0 +1,696 @@ +/** +* @package Dynamic Script Forum +* @file wyzz.js +* @version 1.0.x, 19-10-2007, 18:03 +* @copyright 2008(c) DSF Team +* @author ------------------ +* @link http://dsf.gim2przemysl.int.pl/ +* @license GNU GPL v3 +**/ +// Editor Width and Height +wyzzW = 600; +wyzzH = 200; + +image_path = skin_path + 'images/'; +// Number of toolbars - must be either 1 or 2 +// If set to 1, the first tooolbar (defined in array buttonName below) will be ignored +toolbarCount = 2; + +// Edit region stylesheet +editstyle = skin_path + 'wyzz_editarea.css'; +// Do we want to try to clean the code to emulate xhtml? 1=Yes, 0=No +xhtml_out = 0; + +// Style Sheet +document.write('\n'); + +// TOOLBARS ARRAYS +// Order of available commands in toolbar +// Remove from this any buttons not required in your application +var buttonName = new Array("font","headers","separator","bold","italic","underline","strikethrough","separator","cut","copy","paste","separator","subscript","superscript","separator","justifyleft","justifycenter","justifyright","justifyfull","indent","outdent","separator","insertunorderedlist","insertorderedlist","separator","link","insertimage","separator","undo","redo"); + + +// Order of available commands in toolbar2 +// Remove from this any buttons not required in your application +var buttonName2 = new Array("specialchar","separator","forecolor","backcolor","separator","inserthorizontalrule","separator","removeformat","separator","upsize","downsize","separator","htmlmode","separator"); + + +var myFonts = new Array("Andale Mono","Georgia","Verdana","Arial","Arial Black","impact","Times New Roman","Courier New","Comic Sans MS","Helvetica","Trebuchet MS","Tahoma"); + +var specialChars = new Array("©","®","™","à","á","ç","è","é","ë","ì","í","ñ","ò","ó","ö","ù","ú","ü","£","¢","¥","€","“","”","«","»","•","—","…","¶","†","‡","×","÷","°","±","¼","½","¾","¬","<",">","Δ","λ","Φ","Ψ","Σ","∫","α","β","Ω","μ","π","θ","↔","∞","√","≈","≠","≡","≤","≥","¡","¿","♠","♣","♥","♦"); + +// DON'T MODIFY BEYOND THIS LINE unless you know what you are doing ////////////// +/********************************************************************************/ + +version = "0.62"; // Please leave this + +var Headers = new Array("P","PRE","H1","H2","H3","H4","H5","H6"); + +// Mode wysiwyg = 1 or sourcecode = 0 +mode = 1; + +// Get browser +browserName = navigator.appName; + +nlBefore = new Array("div","p","li","h1","h2","h3","h4","h5","h6","hr","ul","ol"); + +function h2x(node,inPre) { // we will pass the node containing the Wyzz-generated html + var xout = ''; + var i; + var j; + // for each child of the node + for(i=0;i'; + } else { + if(tagname == 'style'||tagname == 'title'||tagname=='script'||tagname=='textarea'||tagname=='a') { + xout += '>'; + var innertext; + if(tagname=='script') { + innertext = node.childNodes[i].text; + } else { + innertext = node.childNodes[i].innerHTML; + } + if(tagname=='style') { + innertext = String(innertext).replace(/[\n]+/g,'\n'); + } + xout += innertext + ''; + } else { + xout += '/>'; + } + } + break; + } +// else if(node.childNodes[i].nodeType == 2) { // for attribute nodes + +// } + case 3: { // for text nodes + if(!inPre) { // don't change inside a
 tag
+        if(node.childNodes[i] != '\n') {
+          xout += fixents(fixtext(node.childNodes[i].nodeValue));
+        }
+      } else {
+          xout += node.childNodes[i].nodeValue;     
+        break;
+      }
+    }
+    default: 
+      break;
+    }
+  }
+  return xout;
+}
+
+function fixents(text) {
+  var i;
+  var ents = {8364 : "euro",402  : "fnof",8240 : "permil",352  : "Scaron",338  : "OElig",381  : "#381",8482 : "trade",353  : "scaron",339  : "oelig",382  : "#382",376  : "Yuml",162  : "cent",163  : "pound",164  : "curren",165  : "yen",166  : "brvbar",167  : "sect",168  : "uml",169  : "copy",170  : "ordf",171  : "laquo",172  : "not",173  : "shy",174  : "reg",175  : "macr",176  : "deg",177  : "plusmn",178  : "sup2",179  : "sup3",180  : "acute",181  : "micro",182  : "para",183  : "middot",184  : "cedil",185  : "sup1",186  : "ordm",187  : "raquo",188  : "frac14",189  : "frac12",190  : "frac34",191  : "iquest",192  : "Agrave",193  : "Aacute",194  : "Acirc",195  : "Atilde",196  : "Auml",197  : "Aring",198  : "AElig",199  : "Ccedil",200  : "Egrave",201  : "Eacute",202  : "Ecirc",203  : "Euml",204  : "Igrave",205  : "Iacute",206  : "Icirc",207  : "Iuml",208  : "ETH",209  : "Ntilde",210  : "Ograve",211  : "Oacute",212  : "Ocirc",213  : "Otilde",214  : "Ouml",215  : "times",216  : "Oslash",217  : "Ugrave",218  : "Uacute",219  : "Ucirc",220  : "Uuml",221  : "Yacute",222  : "THORN",223  : "szlig",224  : "agrave",225  : "aacute",226  : "acirc",227  : "atilde",228  : "auml",229  : "aring",230  : "aelig",231  : "ccedil",232  : "egrave",233  : "eacute",234  : "ecirc",235  : "euml",236  : "igrave",237  : "iacute",238  : "icirc",239  : "iuml",240  : "eth",241  : "ntilde",242  : "ograve",243  : "oacute",244  : "ocirc",245  : "otilde",246  : "ouml",247  : "divide",248  : "oslash",249  : "ugrave",250  : "uacute",251  : "ucirc",252  : "uuml",253  : "yacute",254  : "thorn",255  : "yuml",913  : "Alpha",914  : "Beta",915  : "Gamma",916  : "Delta",917  : "Epsilon",918  : "Zeta",919  : "Eta",920  : "Theta",921  : "Iota",922  : "Kappa",923  : "Lambda",924  : "Mu",925  : "Nu",926  : "Xi",927  : "Omicron",928  : "Pi",929  : "Rho",	931  : "Sigma",932  : "Tau",933  : "Upsilon",934  : "Phi",935  : "Chi",936  : "Psi",937  : "Omega",8756 : "there4",8869 : "perp",945  : "alpha",946  : "beta",947  : "gamma",948  : "delta",949  : "epsilon",950  : "zeta",951  : "eta",952  : "theta",953  : "iota",954  : "kappa",955  : "lambda",956  : "mu",957  : "nu",968  : "xi",969  : "omicron",960  : "pi",961  : "rho",962  : "sigmaf",963  : "sigma",964  : "tau",965  : "upsilon",966  : "phi",967  : "chi",968  : "psi",969  : "omega",8254 : "oline",8804 : "le",8260 : "frasl",8734 : "infin",8747 : "int",9827 : "clubs",9830 : "diams",9829 : "hearts",9824 : "spades",8596 : "harr",8592 : "larr",8594 : "rarr",8593 : "uarr",8595 : "darr",8220 : "ldquo",8221 : "rdquo",8222 : "bdquo",8805 : "ge",8733 : "prop",8706 : "part",8226 : "bull",8800 : "ne",8801 : "equiv",8776 : "asymp",8230 : "hellip",8212 : "mdash",8745 : "cap",8746 : "cup",8835 : "sup",8839 : "supe",8834 : "sub",8838 : "sube",8712 : "isin",8715 : "ni",8736 : "ang",8711 : "nabla",8719 : "prod",8730 : "radic",8743 : "and",8744 : "or",8660 : "hArr",8658 : "rArr",9674 : "loz",8721 : "sum",8704 : "forall",8707 : "exist",8216 : "lsquo",8217 : "rsquo",161  : "iexcl",977  : "thetasym",978  : "upsih",982  : "piv",8242 : "prime",8243 : "Prime",8472 : "weierp",8465 : "image",8476 : "real",8501 : "alefsym",8629 : "crarr",8656 : "lArr",8657 : "uArr",8659 : "dArr",8709 : "empty",8713 : "notin",8727 : "lowast",8764 : "sim",8773 : "cong",8836 : "nsub",8853 : "oplus",8855 : "otimes",8901 : "sdot",8968 : "lceil",8969 : "rceil",8970 : "lfloor",8971 : "rfloor",9001 : "lang",9002 : "rang",710  : "circ",732  : "tilde",8194 : "ensp",8195 : "emsp",8201 : "thinsp",8204 : "zwnj",8205 : "zwj",8206 : "lrm",8207 : "rlm",8211 : "ndash",8218 : "sbquo",8224 : "dagger",8225 : "Dagger",8249 : "lsaquo",8250 : "rsaquo"};
+
+  var new_text = '';
+
+  var temp = new RegExp();
+  temp.compile("[a]|[^a]", "g");
+
+  var parts = text.match(temp);
+
+  if (!parts) return text;
+  for (i=0; i/g,">").replace(/\u00A0/g," ");
+  return temptext.replace(/#h2x_lt/g,"&alt;").replace(/#h2x_gt/g,">");
+}
+
+function fixatt(text) {
+  var temptext = String(text).replace(/\</g,"#h2x_lt").replace(/\>/g,"#h2x_gt");
+  temptext = temptext.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""");
+  return temptext.replace(/#h2x_lt/g,"&alt;").replace(/#h2x_gt/g,">");  
+}
+
+function indexOf(thisarray, value)
+{
+    var i;
+    for (i=0; i < thisarray.length; i++) {
+        if (thisarray[i] == value) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+// Color picker - here we make an array of all websafe colors
+// If you want to limit the colors available to users (e.g. to fit in with
+// a site design) then use a restricted array of colors
+// e.g. var buttonName = new Array("336699","66abff", .... etc
+var buttonColors = new Array(216);
+
+// Colors - replace this function with your own if you have special requirements for colors
+function getColorArray() {
+// Color code table 
+c = new Array('00', '33', '66', '99', 'cc', 'ff'); 
+var count = 0;
+// Iterate red
+for (r = 0; r < 6; r++) 
+  { 
+    // Iterate green
+    for (g = 0; g < 6; g++) 
+      { 
+        // Iterate blue
+        for (b = 0; b < 6; b++) 
+          { 
+            // Get RGB color
+            buttonColors[count] = c[r] + c[g] + c[b]; 
+            count++;
+          } 
+      } 
+  }
+}
+
+getColorArray();
+	
+/* Emulates insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement() three functions 
+so they work with Netscape 6/Mozilla - By Thor Larholm me@jscript.dk */
+if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement) {
+  HTMLElement.prototype.insertAdjacentElement = function (where,parsedNode) {
+  switch (where) {
+    case 'beforeBegin':
+      this.parentNode.insertBefore(parsedNode,this)
+      break;
+    case 'afterBegin':
+      this.insertBefore(parsedNode,this.firstChild);
+      break;
+    case 'beforeEnd':
+      this.appendChild(parsedNode);
+      break;
+    case 'afterEnd':
+      if (this.nextSibling) {
+        this.parentNode.insertBefore(parsedNode,this.nextSibling);
+      } else {
+        this.parentNode.appendChild(parsedNode);
+        break;
+      }
+    }
+  }
+
+  HTMLElement.prototype.insertAdjacentHTML = function (where,htmlStr) {
+    var r = this.ownerDocument.createRange();
+    r.setStartBefore(this);
+    var parsedHTML = r.createContextualFragment(htmlStr);
+    this.insertAdjacentElement(where,parsedHTML)
+  }
+
+  HTMLElement.prototype.insertAdjacentText = function (where,txtStr) {
+    var parsedText = document.createTextNode(txtStr)
+    this.insertAdjacentElement(where,parsedText)
+  }
+}
+
+function closeColorPicker(thisid) {
+  document.getElementById(thisid).style.display = "none";
+}
+
+// the hyperlink dialog
+function insertLink(n) {
+  var newWindow = 'blank';
+  var linkurl = '';
+  var linktitle = '';
+  var targetText = grabSelectedText(n);
+  var linkurl = prompt(editor_lng2);
+  var linktitle = prompt(editor_lng3);  
+  if(newWindow==''||linkurl==''||linktitle=='') {
+    alert();
+    insertLink(n);
+  } else {
+    var hyperLink = '' + linktitle + '';
+    insertHTML(hyperLink, n);
+  }
+}
+  
+function insertImage(n) {
+  var imgurl = prompt(editor_lng4);
+  var imgtitle = 'image';
+  var theImage = '' + imgtitle + '';
+  insertHTML(theImage, n);  }
+
+function insertSmile(imgurl, imgtitle) {
+  if(mode==0) {
+    alert(editor_lng1);
+  } else {
+  var n = 'textedit'; 
+  var theImage = '' + imgtitle + '';
+  insertHTML(theImage, n); } }
+
+function make_wyzz(textareaID) {
+  
+  // Hide the textarea 
+  document.getElementById(textareaID).style.display = 'none'; 
+	
+  // get textareaID
+  var n = textareaID;
+	
+  // Toolbars width is 2 pixels wider than the editor
+  toolbarWidth = parseFloat(wyzzW) + 2;
+
+  var toolbar = '';
+  
+  // We only generate toolbar 1 if toolbarCount is set to 2
+  if(toolbarCount == 2) {
+    // Generate WYSIWYG toolbar
+    toolbar =  '';
+  
+    // Output buttons for toolbar
+    var colNumbers = 0;
+    for (btn in buttonName) {
+      colNumbers ++;
+      if(buttonName[btn] == "separator") {
+        toolbar += '';
+        } else {
+        toolbar += '';
+        }
+    }
+    toolbar += '
  
'; + } + + + // Generate WYSIWYG toolbar2 + var toolbar2 = ''; + + // Output buttons for toolbar2 + var colNumbers = 0; + for (btn in buttonName2) { + colNumbers ++; + if(buttonName2[btn] == "separator") { + toolbar2 += ''; + } else { + toolbar2 += ''; + } + } + toolbar2 += ''; + +// the foreground color picker + var swatchcount = 0; + toolbar2 += '
  
'; + toolbar2 += ''; + // the background color picker + toolbar2 += ''; + // the font picker + toolbar2 += ''; + // the special character picker + toolbar2 += ''; + // the header picker + toolbar2 += ''; + // Add extra popups here + // The help/about box + // The copyright and link must remain unaltered + toolbar2 += '
'; + +// Create iframe for editor +var iframe = '
\n' + + '\n' + + '
\n'; + + // Insert toolbar after the textArea + document.getElementById(n).insertAdjacentHTML("afterEnd", toolbar + toolbar2 + iframe); + + // Give the iframe the required height and width + document.getElementById("wysiwyg" + n).style.height = wyzzH + "px"; + document.getElementById("wysiwyg" + n).style.width = wyzzW + "px"; + + // Pass the textarea's existing text into the editor + var content = document.getElementById(n).value; + var doc = document.getElementById("wysiwyg" + n).contentWindow.document; + + // Write the textarea's content into the iframe + doc.open(); + if (browserName == "Microsoft Internet Explorer") { + doc.write('' + content); + } else { + doc.write('' + content + '
'); + } + doc.close(); + +// var browserName = navigator.appName; + if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") { + // Make the iframe editable + doc.body.contentEditable = true; + } else { + // Make the iframe editable + doc.designMode = "on"; + } + + // Update the textarea with content in WYSIWYG when user submits form + // var browserName = navigator.appName; + if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") { + for (var idx=0; idx < document.forms.length; idx++) { + document.forms[idx].attachEvent('onsubmit', function() { updateTextArea(n); }); + } + } + else { + for (var idx=0; idx < document.forms.length; idx++) { + document.forms[idx].addEventListener('submit',function OnSumbmit() { updateTextArea(n); }, true); + } + } +} + +function formatTextColor(color, n, selected) { + document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('forecolor', false, color); + document.getElementById('colorpicker' + n).style.display = "none"; +} + +function formatBackColor(color, n, selected) { + if (browserName == "Microsoft Internet Explorer") { + document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('backcolor', false, color); + } else { + document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('hilitecolor', false, color); + } + document.getElementById('colorbackpicker' + n).style.display = "none"; +} + +function formatFontName(fontname, n, selected) { + document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('fontName', false, fontname); + document.getElementById('fontpicker' + n).style.display = "none"; +} + +function formatSpecialChar(charname, n, selected) { + insertHTML(charname, n); + document.getElementById('specialpicker' + n).style.display = "none"; +} + +function formatHeader(headername, n, selected) { + document.getElementById('wysiwyg' + n).contentWindow.document.execCommand('formatBlock', false, '<'+headername+'>'); + document.getElementById('headerpicker' + n).style.display = "none"; +} + +function formatText(id, n, selected) { + if(mode==0&&id!='htmlmode') { + alert(editor_lng1); + } else { + // When user clicks button make sure it always targets correct textarea + document.getElementById("wysiwyg" + n).contentWindow.focus(); + if(id=="upsize") { + var currentFontSize = document.getElementById("wysiwyg"+n).contentWindow.document.queryCommandValue("FontSize"); + if(currentFontSize == ''||!currentFontSize) currentFontSize = 3; // fudge for FF + if(currentFontSize < 7) { + var newFontSize = parseInt(currentFontSize) + 1; + } else { + var newFontSize = currentFontSize; + } + document.getElementById("wysiwyg" + n).contentWindow.document.execCommand("FontSize", false, newFontSize); + } + else if(id=="downsize") { + var currentFontSize = document.getElementById("wysiwyg"+n).contentWindow.document.queryCommandValue("FontSize"); + if(currentFontSize > 1) { + var newFontSize = currentFontSize - 1; + } else { + var newFontSize = currentFontSize; + } + document.getElementById("wysiwyg" + n).contentWindow.document.execCommand("FontSize", false, newFontSize); + } + else if(id=="forecolor"){ + if(document.getElementById('colorpicker' + n).style.display == ""){ + document.getElementById('colorpicker' + n).style.display = "none"; + } else { + document.getElementById('colorpicker' + n).style.display = ""; + } + } + else if(id=="backcolor"){ + if(document.getElementById('colorbackpicker' + n).style.display == ""){ + document.getElementById('colorbackpicker' + n).style.display = "none"; + } else { + document.getElementById('colorbackpicker' + n).style.display = ""; + } + } + else if(id=="font"){ + if(document.getElementById('fontpicker' + n).style.display == ""){ + document.getElementById('fontpicker' + n).style.display = "none"; + } else { + document.getElementById('fontpicker' + n).style.display = ""; + } + } + else if(id=="specialchar"){ + if(document.getElementById('specialpicker' + n).style.display == ""){ + document.getElementById('specialpicker' + n).style.display = "none"; + } else { + document.getElementById('specialpicker' + n).style.display = ""; + } + } + else if(id=="headers"){ + if(document.getElementById('headerpicker' + n).style.display == ""){ + document.getElementById('headerpicker' + n).style.display = "none"; + } else { + document.getElementById('headerpicker' + n).style.display = ""; + } + } + else if(id=="htmlmode"){ + var getDoc = document.getElementById("wysiwyg" + n).contentWindow.document; + if(mode == 1) { + if(navigator.appName == "Microsoft Internet Explorer"||browserName == "Opera") { + var iHTML = getDoc.body.innerHTML; + getDoc.body.innerText = iHTML; + } else { + var html = document.createTextNode(getDoc.body.innerHTML); + getDoc.body.innerHTML = ""; + getDoc.body.appendChild(html); + } + getDoc.body.style.fontSize = "12px"; + getDoc.body.style.fontFamily = "Courier New"; + mode = 0; + } else { + if(navigator.appName == "Microsoft Internet Explorer"||browserName == "Opera") { + var iText = getDoc.body.innerText; + getDoc.body.innerHTML = iText; + } else { + var html = getDoc.body.ownerDocument.createRange(); + html.selectNodeContents(getDoc.body); + getDoc.body.innerHTML = html.toString(); + } + mode = 1; + } + } + else if(id=="help"){ + if(document.getElementById('helpbox' + n).style.display == ""){ + document.getElementById('helpbox' + n).style.display = "none"; + } else { + document.getElementById('helpbox' + n).style.display = ""; + } + } + else if(id=="link"){ + // var browserName = navigator.appName; + if (browserName == "Microsoft Internet Explorer") { + var target = confirm('Should this link open in a new window?\n\nOK = Open in NEW Window\nCancel = Open in THIS window'); + document.getElementById("wysiwyg" + n).contentWindow.document.execCommand('createLink',true,' '); + if(target == true) + { + document.getElementById("wysiwyg" + n).contentWindow.document.selection.createRange().parentElement().target="_blank"; + } + } else { + insertLink(n); + } + } + else if(id=="insertimage") { + // var browserName = navigator.appName; + if (browserName == "Microsoft Internet Explorer") { + document.getElementById("wysiwyg" + n).contentWindow.document.execCommand(id, true, null); + } else { + insertImage(n); + } + } + else { + document.getElementById("wysiwyg" + n).contentWindow.document.execCommand(id, false, null); + } + } +} + +function insertHTML(html, n) { + // var browserName = navigator.appName; + if (browserName == "Microsoft Internet Explorer") { + document.getElementById('wysiwyg' + n).contentWindow.document.selection.createRange().pasteHTML(html); + } + + else { + var div = document.getElementById('wysiwyg' + n).contentWindow.document.createElement("span"); + + div.innerHTML = html; + var node = insertNodeAtSelection(div, n); + } +} + +function insertNodeAtSelection(insertNode, n) { + // get current selection + var sel = document.getElementById('wysiwyg' + n).contentWindow.getSelection(); + + // get the first range of the selection (there's almost always only one range) + var range = sel.getRangeAt(0); + + // deselect everything + sel.removeAllRanges(); + + // remove content of current selection from document + range.deleteContents(); + + // get location of current selection + var container = range.startContainer; + var pos = range.startOffset; + + // make a new range for the new selection + range = document.createRange(); + + if (container.nodeType==3 && insertNode.nodeType==3) { + + // if we insert text in a textnode, do optimized insertion + container.insertData(pos, insertNode.nodeValue); + + // put cursor after inserted text + range.setEnd(container, pos+insertNode.length); + range.setStart(container, pos+insertNode.length); + } + + else { + var afterNode; + + if (container.nodeType==3) { + // when inserting into a textnode we create 2 new textnodes and put the insertNode in between + var textNode = container; + container = textNode.parentNode; + var text = textNode.nodeValue; + + // text before the split + var textBefore = text.substr(0,pos); + + // text after the split + var textAfter = text.substr(pos); + + var beforeNode = document.createTextNode(textBefore); + afterNode = document.createTextNode(textAfter); + + // insert the 3 new nodes before the old one + container.insertBefore(afterNode, textNode); + container.insertBefore(insertNode, afterNode); + container.insertBefore(beforeNode, insertNode); + + // remove the old node + container.removeChild(textNode); + } + + else { + // else simply insert the node + afterNode = container.childNodes[pos]; + container.insertBefore(insertNode, afterNode); + } + + range.setEnd(afterNode, 0); + range.setStart(afterNode, 0); + } + + sel.addRange(range); +} + +function updateTextArea(n) { + if(xhtml_out == 1) { + document.getElementById(n).value = h2x(document.getElementById("wysiwyg" + n).contentWindow.document.body); + } else { + document.getElementById(n).value = document.getElementById("wysiwyg" + n).contentWindow.document.body.innerHTML; + } +} + + +function grabSelectedText(n){ + // var browserName = navigator.appName; + var selectedText = ''; + // for IE + if (browserName == "Microsoft Internet Explorer"||browserName == "Opera") { + var theText = document.getElementById("wysiwyg" + n).contentWindow.document.selection; + if(theText.type =='Text') { + var newText = theText.createRange(); + selectedText = newText.text; + } + } + // for Mozilla/Netscape + else { + var selectedText = document.getElementById("wysiwyg" + n).contentWindow.document.getSelection(); + } + return selectedText; +} diff --git a/includes/admin/class_forum.php b/includes/admin/class_forum.php new file mode 100644 index 0000000..f795ae7 --- /dev/null +++ b/includes/admin/class_forum.php @@ -0,0 +1,38 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Admin_Forum +{ + function AddCats($fid) + { + global $forum_config; + $cat = Forum::ForumInformation($fid,'c_id'); + $all=''; + $query = DataBase::sql_query("SELECT `name`, `c_id` FROM `".CATS_TABLE."`",'GENERAL','Could not obtain category information'); + while($t = @mysql_fetch_array($query)) + { + + if ($t['c_id']==$cat) + { + $all .= ''."\n"; + } + else + { + $all .= ''."\n"; + } + } + return $all; + unset($t, $all); + } +} +?> diff --git a/includes/admin/class_main.php b/includes/admin/class_main.php new file mode 100644 index 0000000..6dad0dc --- /dev/null +++ b/includes/admin/class_main.php @@ -0,0 +1,160 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Admin_Over +{ + function AddPages() + { + global $count; + global $page; + $content = ''; + for ($i=1;$i<=$count;$i++) + { + if ($i==$page) + { + $content .= ''; + } + else + { + $content .= ''; + } + } + return $content; + unset($content); + } + function AddSkins() + { + global $forum_config; + global $default_skin; + $all=''; + $query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",'GENERAL','Could not obtain skins information'); + while($t = @mysql_fetch_array($query)) + { + + if ($t['name']==$default_skin) + { + $all .= ''; + } + else + { + $all .= ''; + } + } + return $all; + unset($t, $all); + } + function AddPages2($page)//for edit profile, not used in limit! + { + $content = ''; + for ($i=1;$i<=50;$i++) + { + if ($i==$page) + { + $content .= ''; + } + else + { + $content .= ''; + } + } + return $content; + unset($content); + } + function AddLangs() + { + global $forum_config; + global $default_lang; + $result=''; + $rep=opendir('./../lngs'); + $bAuMoinsUnRepertoire = false; + while ($file = readdir($rep)) + { + if($file != '..' && $file !='.' && $file !='') + { + if (is_dir('./../lngs/'.$file)){ + $bAuMoinsUnRepertoire = true; + if ($file==$default_lang) + { + $result .=''; + } + else + { + $result .=''; + } + } + } + } + return $result; + unset($rep, $bAuMoinsUnRepertoire, $file, $result); + } + function ViewSkinName() + { + global $forum_config; + if ($_SESSION['uid']>0) + { + $result = User::UserInformation($_SESSION['uid'],'skin'); + $sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.')); + return $result['name']; + } + else + { + $result = $forum_config['defaultskin']; + $sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.')); + return $result['name']; + } + } + function DefaultLang() + { + global $forum_config; + if ($_SESSION['uid']>0) + { + return User::UserInformation($_SESSION['uid'],'lang'); + } + else + { + return $forum_config['defaultlang']; + } + } + function TotalTopics() + { + $sql = "SELECT `t_id` FROM ".TOPICS_TABLE.";"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information'); + $result = mysql_num_rows($query); + return($result); + } + function TotalPosts() + { + $sql = "SELECT `p_id` FROM ".POSTS_TABLE.";"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information'); + $result = mysql_num_rows($query); + return($result); + } + function GenerateHeader() + { + global $default_skin; + global $lng; + echo ' + + + + + + DSF Administration + + +
'.$lng['uf_pa'].'
'; + } +} +?> diff --git a/includes/admin/index.html b/includes/admin/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/includes/admin/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/includes/cache/cache_forums.php b/includes/cache/cache_forums.php new file mode 100644 index 0000000..feba837 --- /dev/null +++ b/includes/cache/cache_forums.php @@ -0,0 +1,83 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if(!defined('IN_uF')) +{ + die('Hacking attempt'); +} +//cache forums and posts - version v1.0 Alpha 2--------------------------------- +$default_skin = Over::ViewSkinName(); +$sql = "SELECT `name`,`lock` FROM ".FORUMS_TABLE." WHERE `f_id`='$fid' LIMIT 1"; +$result = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain forum information')); +if ($result['name']=='') +{ + message_forum($lng['no_forum'],'index.php'); +} +$forum = array( +'name'=>$result['name'], +'lock'=>$result['lock'] +); +$sql = "SELECT COUNT(*) as `p_id`, `t_id` FROM ".POSTS_TABLE." GROUP BY `t_id`"; +$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum'); +while($result = @mysql_fetch_array($query)) +{ + $count_topic[$result['t_id']]=$result['p_id']; +} +$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id WHERE `f_id`='$fid' ORDER BY `ptime`"; +$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum'); +while($result = @mysql_fetch_array($query)) +{ + $lastpost[$result['t_id']]['tp_id']=$result['tp_id']; + $lastpost[$result['t_id']]['u_id']=$result['u_id']; + $lastpost[$result['t_id']]['time']=$result['ptime']; + $lastpost[$result['t_id']]['user_nick']=$result['nick']; + $lastpost[$result['t_id']]['user_rank']=$result['rank']; +} +// +//generate output pages +// +if ($_SESSION['uid']>0) +{ + $limiter = $userdata['limit_ftid']; +} +else +{ + $limiter = $forum_config['limit_ftid']; +} +if (isset($_GET['page'])&&($_GET['page']!=1)) +{ + if (!is_numeric($_GET['page'])) + { + die('Hacking attempt'); + } + $value = ($_GET['page']-1)*$limiter; + $limit = 'LIMIT '.$value . ', '.$limiter; + $page = $_GET['page']; +} +else +{ + $limit = 'LIMIT 0, '.$limiter; + $page=1; +} +$count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`t_id`) as `t_id` +FROM ".TOPICS_TABLE." WHERE `f_id`='$fid'",'GENERAL','Could not obtain count amout of topics')); +$count = $count['t_id']; +$count = ceil($count / $limiter); +if ($count==0) +{ + $count +=1; +} +if(isset($_GET['page']) && ($_GET['page']>$count)) +{ + message_forum($lng['invalidpage'],'index.php'); +} +// +//end generating pages +// +?> diff --git a/includes/cache/cache_index.php b/includes/cache/cache_index.php new file mode 100644 index 0000000..3249758 --- /dev/null +++ b/includes/cache/cache_index.php @@ -0,0 +1,48 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if(!defined('IN_uF')) +{ + die('Hacking attempt'); +} +// +//cache forums and posts - version v1.0 Alpha 2--------------------------------- +// +//lastpost in forum cache +$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".POSTS_TABLE.".u_id = ".USERS_TABLE.".u_id GROUP BY `f_id`, `ptime` ORDER BY `ptime`"; +$query = DataBase::sql_query($sql,'GENERAL','Could not obtain last post in topic', true); +$post_count = @mysql_num_rows($query); +while($result = @mysql_fetch_array($query)) +{ + $last_post[$result['f_id']]['tp_id'] = $result['tp_id']; + $last_post[$result['f_id']]['u_id'] = $result['u_id']; + $last_post[$result['f_id']]['t_id'] = $result['t_id']; + $last_post[$result['f_id']]['time'] = $result['ptime']; + $last_post[$result['f_id']]['user_rank'] = $result['rank']; + $last_post[$result['f_id']]['user_nick'] = $result['nick']; +} +//cache forums --don't modify!!! +$cache_id=1; +$sql = "SELECT ".FORUMS_TABLE.".*, COUNT(".POSTS_TABLE.".p_id) as amout, ".POSTS_TABLE.".f_id AS count FROM ".FORUMS_TABLE." LEFT JOIN ".POSTS_TABLE." ON ".FORUMS_TABLE.".f_id= ".POSTS_TABLE.".f_id GROUP BY `f_id` ORDER BY `c_id`, `sort`"; +$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain forum information.'); +while($result = @mysql_fetch_array($query)) +{ + $forum[$cache_id]['f_id'] = $result['f_id']; + $forum[$cache_id]['name'] = $result['name']; + $forum[$cache_id]['desc'] = $result['desc']; + $forum[$cache_id]['c_id'] = $result['c_id']; + $forum[$cache_id]['sort'] = $result['sort']; + $count_forum[$result['f_id']] = $result['amout']; + $cache_id+=1; +} +$sql = "SELECT `u_id`,`nick`, `regdate` AS count FROM ".USERS_TABLE." ORDER BY `regdate` DESC"; +$query = DataBase::sql_query($sql,'GENERAL','Could not obtain amout of count users information'); +$lastuser = @mysql_fetch_array($query); +$count_users = @mysql_num_rows($query) -1; +?> diff --git a/includes/cache/cache_topic.php b/includes/cache/cache_topic.php new file mode 100644 index 0000000..81e2172 --- /dev/null +++ b/includes/cache/cache_topic.php @@ -0,0 +1,95 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if(!defined('IN_uF')) +{ + die('Hacking attempt'); +} +//||topic.php script cache ------------------------------------------------------------------------------ +$sql = "SELECT ".TOPICS_TABLE.".*, ".TOPICS_TABLE.".name AS topic_name, ".TOPICS_TABLE.".lock AS topic_lock, ".FORUMS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".FORUMS_TABLE." ON ".TOPICS_TABLE.".f_id = ".FORUMS_TABLE.".f_id WHERE `t_id`='$tid' LIMIT 1"; +$result = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain forum information')); +if ($result['t_id']=='') +{ + message_forum($lng['no_topic'], 'index.php'); +} +$topic['name']=$result['topic_name']; +$topic['lock']=$result['topic_lock']; +$topic['sticky']=$result['sticky']; +$topic['f_id']=$result['f_id']; +$fid = $topic['f_id']; +$forum['name']=$result['name']; +$forum['lock']=$result['lock']; +$forum['moderate']=$result['moderate']; + + +$sql = "SELECT `u_id`,`value` FROM `".WARNINGS_TABLE."`"; +$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user warns information'); +$result = mysql_num_rows($query); +while ($result = @mysql_fetch_array($query)) +{ + if(!isset($user_warnlevel[$result['u_id']])) + { + $user_warnlevel[$result['u_id']]=0; + } + if ($result['value']=='-') + { + $user_warnlevel[$result['u_id']] -=1; + } + else + { + $user_warnlevel[$result['u_id']] +=1; + } +} + +//check online for user +$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".time(); +$query = DataBase::sql_query($sql, 'GENERAL', 'Could not read user active.'); +while($result = @mysql_fetch_array($query)) +{ + $user[$result['u_id']]['online']='1'; +} +unset($sql, $query, $result); +// +//generate output pages +// +if ($_SESSION['uid']>0) +{ + $limiter = $userdata['limit_tpid']; +} +else +{ + $limiter = $forum_config['limit_tpid']; +} +if (isset($_GET['page'])&&($_GET['page']!=1)) +{ + if (!is_numeric($_GET['page'])) + { + die('Hacking attempt'); + } + $value = ($_GET['page']-1)*$limiter; + $limit = 'LIMIT '.$value . ', '.$limiter; + $page = $_GET['page']; +} +else +{ + $limit = 'LIMIT 0, '.$limiter; + $page=1; +} +$count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`p_id`) as `p_id` +FROM ".POSTS_TABLE." WHERE `t_id`='$tid'",'GENERAL','Could not obtain count amout of posts')); +$count = $count['p_id']; +$count = ceil($count / $limiter); +if(isset($_GET['page']) && ($_GET['page']>$count)) +{ + message_forum($lng['invalidpage'],'index.php'); +} +// +//end generating pages +// +?> diff --git a/includes/cache/index.html b/includes/cache/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/includes/cache/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

+ + +

+ + diff --git a/includes/class_db.php b/includes/class_db.php new file mode 100644 index 0000000..8d4992b --- /dev/null +++ b/includes/class_db.php @@ -0,0 +1,65 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class DataBase +{ + function db_connect() + { + $connect = mysql_pconnect(DB_HOST, DB_USER, DB_PASS) or message_die('CRITICAL',' Could not connect to database server.',mysql_error()); + mysql_query("SET NAMES 'utf8'",$connect); + mysql_select_db(DB_NAME, $connect) or message_die('CRITICAL',' Could not connect to database.',mysql_error()); + } + function sql_query($sql, $type, $msg, $no_count = false) + { + if (isset($_COOKIE['queries'])) + { + $no_count = false; + if(!$no_count) + { + $_COOKIE['queries'] = $_COOKIE['queries']+1; + } + } + //echo ''.$sql.'
'; //for optymalization ONLY!!!!!!!!!!!!!! + $query = mysql_query($sql) or message_die($type, $msg, mysql_error()); + return $query; + } + function new_id($table) + { + //check table id + switch($table) + { + case BANLIST_TABLE: { $id = 'b_id'; break; } + case CATS_TABLE: { $id = 'c_id'; break; } + case CENSORLIST_TABLE: { $id = 'w_id'; break; } + case FORUMS_TABLE: { $id = 'f_id'; break; } + case GROUPS_TABLE: { $id = 'g_id'; break; } + case PM_INBOX_TABLE: { $id = 'm_id'; break; } + case PM_SENTBOX_TABLE: { $id = 'm_id'; break; } + case POSTS_TABLE: { $id = 'p_id'; break; } + case TOPICS_TABLE: { $id = 't_id'; break; } + case SESSIONS_TABLE: { $id = 's_id'; break; } + case SKINS_TABLE: { $id = 's_id'; break; } + case SMILES_TABLE: { $id = 's_id'; break; } + case USERS_TABLE: { $id = 'u_id'; break; } + case USERS_GROUP_TABLE: { $id = 'id'; break; } + case WARNINGS_TABLE: { $id = 'w_id'; break; } + } + $sql = "SELECT `$id` FROM $table ORDER BY `$id` DESC LIMIT 1"; + $return_id = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Error with obtain last id.
File: class_db.php, Line: '.__LINE__)); + $return_id = $return_id[$id]; + $return_id = $return_id+1; + return $return_id; + unset($table, $return_id, $id, $sql); + } +} +?> diff --git a/includes/class_email.php b/includes/class_email.php new file mode 100644 index 0000000..ffae7fa --- /dev/null +++ b/includes/class_email.php @@ -0,0 +1,80 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Email +{ + function SendEmail($email, $title, $content) + { + global $forum_config; + $email_headers = "MIME-Version: 1.0\r\n"; + $email_headers .= "Content-type: text/html; charset=iso-8859-2\r\n"; + $email_headers .= "From: ".$forum_config['forumname']." \n"; + $email_date = date('d-m-Y, G:i',time()); + $email_content = ' + + + '.$title.' + + + '.$content.'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ + Message generated automatic by DSF v'.VERSION.'. ('.$email_date.') + + '; + if ( !mail($email, $title, $email_content, $email_headers )) + { + message_die('GENERAL','Could not send email from: '.$email.'. sorry :(',''); + } + } + function SendRegisterEmail() + { + global $forum_config; + global $original_pass; + global $lng; + $email_content = $lng['email_newpasswd_msg']; + $email_content = str_replace('%forum%',$forum_config['forumname'],$email_content); + $email_content = str_replace('%url_f%',$forum_config['forumpatch'],$email_content); + $email_content = str_replace('%ip%',$_SERVER['REMOTE_ADDR'],$email_content); + $email_content = str_replace('%forum%',$forum_config['forumname'],$email_content); + $email_content = str_replace('%login%',$_POST['nick'],$email_content); + $email_content = str_replace('%pass%',$original_pass,$email_content); + Email::SendEmail($_POST['email'],$lng['email_welcome'].$forum_config['forumname'],$email_content); + + } + function SendForgotPassEmail($newpass) + { + global $forum_config; + global $original_pass; + global $lng; + global $uid; + $email_content = $lng['email_register_msg']; + $email_content = str_replace('%forum%',$forum_config['forumname'],$email_content); + $email_content = str_replace('%url_f%',$forum_config['forumpatch'],$email_content); + $email_content = str_replace('%ip%',$_SERVER['REMOTE_ADDR'],$email_content); + $email_content = str_replace('%forum%',$forum_config['forumname'],$email_content); + $email_content = str_replace('%login%',$_POST['username'],$email_content); + $email_content = str_replace('%pass%',$newpass,$email_content); + Email::SendEmail(User::UserInformation($uid,'email'),$lng['email_sent_forget_pass'].$forum_config['forumname'],$email_content); + } + function SendMassEmail($title,$content) + { + $sql = "SELECT `email`,`u_id` FROM ".USERS_TABLE." WHERE `u_id`>0"; + $query = DataBase::sql_query($sql,'CRITICAL','Could not read users table'); + while($item = @mysql_fetch_array($query)) + { + Email::SendEmail($item['email'], $title, $content); + } + } +} +?> diff --git a/includes/class_error.php b/includes/class_error.php new file mode 100644 index 0000000..fa8ece6 --- /dev/null +++ b/includes/class_error.php @@ -0,0 +1,72 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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 new file mode 100644 index 0000000..c58353a --- /dev/null +++ b/includes/class_forum.php @@ -0,0 +1,136 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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 new file mode 100644 index 0000000..b158d0f --- /dev/null +++ b/includes/class_mod.php @@ -0,0 +1,96 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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_overall.php b/includes/class_overall.php new file mode 100644 index 0000000..e0818f4 --- /dev/null +++ b/includes/class_overall.php @@ -0,0 +1,328 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Over +{ + function set_counter() + { + global $forum_config; + if (!isset($_COOKIE['forum_visited'])) + { + setcookie('forum_visited','1'); + $visit_count = $forum_config['forum_counter'] +1; + DataBase::sql_query("UPDATE `".CONFIG_TABLE."` SET `value`='$visit_count' WHERE `name`='forum_counter'",'GENERAL','Could not update forum counter'); + } + else + { + $visit_count = $forum_config['forum_counter']; + } + return $visit_count; + } + function generate_header($title, $navigator) + { + global $lng; + global $forum_config; + $skin = array( + 'forumname' => $forum_config['forumname'], + 'forumdesc' => $forum_config['forumdesc'], + 'users' => $lng['lusers'], + 'pm' => $lng['lpm'], + 'register' => $lng['lregister'], + 'search' => $lng['lsearch'], + 'eprofile' => $lng['leprofile'], + 'groups' => $lng['lgroups'], + 'keywords' => $forum_config['meta_keywords'], + 'description' => $forum_config['meta_description'], + 'mainpage' => $title, + 'lmainpage' => $navigator, + 'lactual_time'=>$lng['lactualtime'], + 'modelogin' => ($_SESSION['uid']>0) ? 'logout' : 'login', + 'llogin' => ($_SESSION['uid']>0) ? $lng['lunlogin'] : $lng['llogin'] + ); + return $skin; + } + function user_agent($agent) + { + global $lng; + /*This original function is in phpBB 1.12.5 modified by Przemo*/ + /*Modified by PioDer: added new browsers and systems and other replaces*/ + $agent_tst = ' ' . strtolower($agent); + $system = $browser = ''; + if ( + strpos($agent_tst, 'windows') || + strpos($agent_tst, 'win9') || + strpos($agent_tst, 'win32') || + strpos($agent_tst, 'nt 5.') || + strpos($agent_tst, 'nt 4') ) + { + $system = ( strpos($agent_tst, 'windows 9') || strpos($agent_tst, 'nt 4') || strpos($agent_tst, 'windows') || strpos($agent_tst, 'win32') ) ? 'windows_98_nt_2000' : $system; + $system = ( strpos($agent_tst, 'nt 5.') || strpos($agent_tst, 'nt 6.') || strpos($agent_tst, 'nt 7.') || strpos($agent_tst, 'nt 8.') ) ? 'windows_xp_2003' : $system; + $system = (strpos($agent_tst, 'nt 5.0')) ? 'windows_98_nt_2000' : $system; + $system = (strpos($agent_tst, 'nt 6.0')) ? 'windows_vista' : $system; + } + else + { + $system = (strpos($agent_tst, 'linux')) ? 'linux' : $system; + $system = (strpos($agent_tst, 'suse')) ? 'linux_suse' : $system; + $system = (strpos($agent_tst, 'knoppix')) ? 'linux_knoppix' : $system; + $system = (strpos($agent_tst, 'turbolinux')) ? 'linux_turbolinux' : $system; + $system = (strpos($agent_tst, 'slackware')) ? 'linux_slackware' : $system; + $system = (strpos($agent_tst, 'gentoo')) ? 'linux_gentoo' : $system; + $system = (strpos($agent_tst, 'lycoris')) ? 'linux_lycoris' : $system; + $system = (strpos($agent_tst, 'debian')) ? 'linux_debian' : $system; + $system = (strpos($agent_tst, 'redhat')) ? 'linux_redhat' : $system; + $system = (strpos($agent_tst, 'archlinux')) ? 'linux_arch' : $system; + $system = (strpos($agent_tst, 'ubuntu')) ? 'linux_ubuntu' : $system; + $system = (strpos($agent_tst, 'cdlinux')) ? 'linux_cdlinux' : $system; + $system = (strpos($agent_tst, 'mandriva')) ? 'linux_mandriva' : $system; + $system = (strpos($agent_tst, 'kateos')) ? 'linux_kateos' : $system; + $system = (strpos($agent_tst, 'bsd')) ? 'linux_freebsd' : $system; + } + if ( $system == '') + { + $system = (strpos($agent_tst, 'mac')) ? 'macos' : $system; + $system = (strpos($agent_tst, 'aix')) ? 'aix' : $system; + $system = (strpos($agent_tst, 'lindows')) ? 'lindows' : $system; + $system = (strpos($agent_tst, 'amiga')) ? 'amiga' : $system; + $system = (strpos($agent_tst, 'athe')) ? 'athe' : $system; + $system = (strpos($agent_tst, 'beos')) ? 'beos' : $system; + $system = (strpos($agent_tst, 'zeta')) ? 'beos' : $system; + $system = (strpos($agent_tst, 'BlueEyed')) ? 'beos' : $system; + $system = (strpos($agent_tst, 'nextstep')) ? 'nextstep' : $system; + $system = (strpos($agent_tst, 'warp')) ? 'warp' : $system; + $system = (strpos($agent_tst, 'qnx')) ? 'qnx' : $system; + $system = (strpos($agent_tst, 'risc')) ? 'risc' : $system; + $system = (strpos($agent_tst, 'solaris')) ? 'solaris' : $system; + $system = (strpos($agent_tst, 'unix')) ? 'unix' : $system; + $system = (strpos($agent_tst, 'macos')) ? 'macos' : $system; + $system = (strpos($agent_tst, 'mac os')) ? 'macos' : $system; + $system = (strpos($agent_tst, 'symbian')) ? 'symbian' : $system; + $system = ($system == '' && strpos($agent_tst, 'win9') || strpos($agent_tst, 'win3') || strpos($agent_tst, 'windows') ) ? 'windows_98_nt_2000' : $system; + } + $browser = (strpos($agent_tst, 'mozilla')) ? 'mozilla' : $browser; + $browser = (strpos($agent_tst, 'msie')) ? 'ie' : $browser; + $browser = (strpos($agent_tst, 'msie 7')) ? 'ie7' : $browser; + $browser = (strpos($agent_tst, 'netscape')) ? 'netscape' : $browser; + $browser = (strpos($agent_tst, 'opera')) ? 'opera' : $browser; + $browser = (strpos($agent_tst, 'konqueror')) ? 'konqueror' : $browser; + $browser = (strpos($agent_tst, 'galeon')) ? 'galeon' : $browser; + $browser = (strpos($agent_tst, 'firefox')) ? 'firefox' : $browser; + $browser = (strpos($agent_tst, 'netsprint')) ? 'netsprint' : $browser; + $browser = (strpos($agent_tst, 'firebird')) ? 'firebird' : $browser; + $browser = (strpos($agent_tst, 'links')) ? 'links' : $browser; + $browser = (strpos($agent_tst, 'dillo')) ? 'dillo' : $browser; + $browser = (strpos($agent_tst, 'omniweb')) ? 'omniweb' : $browser; + $browser = (strpos($agent_tst, 'avant')) ? 'avant' : $browser; + $browser = (strpos($agent_tst, 'myie2')) ? 'myie2' : $browser; + $browser = (strpos($agent_tst, 'seamonkey')) ? 'seamonkey' : $browser; + $browser = (strpos($agent_tst, 'maxthon')) ? 'maxthon' : $browser; + + $browser = ($browser == '') ? 'unknown' : $browser; + $system = ($system == '') ? 'unknown' : $system; + + return array('icon_' . $system . '.gif', 'icon_' . $browser . '.gif', ($system=='unknown') ? $lng['unknown'] : $system, ($browser=='unknown') ? $lng['unknown'] : $browser); + } + function GenerateTime($request_time) + { + global $lng; + if (date('d-m-Y',$request_time)== date('d-m-Y',time())) + { + $date = $lng['today'].', '.date('G:i', $request_time); + } + else + { + if ((date('d',$request_time))== (date('d',time())-1) && (date('m-Y',$request_time)== date('m-Y',time()))) + { + $date = $lng['yesterday'].', '.date('G:i', $request_time); + } + else + { + $date = date('d-m-Y, G:i',$request_time); + } + } + return $date; + } + function AddPages() + { + global $count; + global $page; + $content = ''; + for ($i=1;$i<=$count;$i++) + { + if ($i==$page) + { + $content .= ''; + } + else + { + $content .= ''; + } + } + return $content; + unset($content); + } + function AddPages2($page)//for edit profile, not used in limit! + { + $content = ''; + for ($i=1;$i<=50;$i++) + { + if ($i==$page) + { + $content .= ''; + } + else + { + $content .= ''; + } + } + return $content; + unset($content); + } + function AddSkins() + { + global $forum_config; + global $default_skin; + $all=''; + $query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",'GENERAL','Could not obtain skins information'); + while($t = @mysql_fetch_array($query)) + { + + if ($t['name']==$default_skin) + { + $all .= ''; + } + else + { + $all .= ''; + } + } + return $all; + unset($t, $all); + } + function AddLangs() + { + global $forum_config; + global $default_lang; + $result=''; + $rep=opendir('./lngs'); + $browseruMoinsUnRepertoire = false; + while ($file = readdir($rep)) + { + if($file != '..' && $file !='.' && $file !='') + { + if (is_dir('./lngs/'.$file)){ + $browseruMoinsUnRepertoire = true; + if ($file==$default_lang) + { + $result .=''; + } + else + { + $result .=''; + } + } + } + } + return $result; + unset($rep, $browseruMoinsUnRepertoire, $file, $result); + } + function TimeGeneration() + { + list($usec, $sec ) = explode(" ",microtime()); + return ((float)$usec + (float)$sec); + } + function IfModGroup($guid) + { + global $lng; + $uid = $_SESSION['uid']; + if ($guid==$uid) + { + return' + + + '.$lng['addusrtogrp'].': + + + '.$lng['delusrforgrp'].': + + + + + '; + } + } + function TotalPosts() + { + $sql = "SELECT count(*) as `p_id` FROM ".POSTS_TABLE.""; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain total posts information'); + $result = mysql_fetch_array($query); + $result = $result['p_id']; + return($result); + } + function DefaultLang() + { + global $forum_config; + global $userdata; + if ($_SESSION['uid']>0) + { + //$sql = "SELECT `u_id`, `lang` FROM ".USERS_TABLE." WHERE `u_id`='".$_SESSION['uid']."' LIMIT 1"; + //$result = @mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information')); + return $userdata['lang']; + } + else + { + return $forum_config['defaultlang']; + } + } + function ShowQueries($start, $stop) + { + global $forum_config; + global $lng; + if ($forum_config['show_time_generation']) + { + $result = $stop - $start; + $result = round($result,3); + if (extension_loaded('xdebug')) + { + return $lng['script_generated'].$result.' '.$lng['seconds'].'. SQL: '.$_COOKIE['queries'].'.
+ Wersja Xdebug: '.phpversion('xdebug').', Użycie pamięci: '.round((xdebug_memory_usage()/1024),2).'KB.'; + } + else + { + return $lng['script_generated'].$result.' '.$lng['seconds'].'. SQL: '.$_COOKIE['queries'].'.'; + } + } + else + { + return ''; + } + } + function ViewSkinName() + { + + global $forum_config; + global $userdata; + if ($_SESSION['uid']>0) + { + $result = $userdata['skin']; + } + else + { + $result = $forum_config['defaultskin']; + } + $sql = "SELECT * FROM `".SKINS_TABLE."` WHERE `s_id`='$result'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'CRITICAL','Could not obtain skin information.')); + return $result['name']; + } +} +?> diff --git a/includes/class_posting.php b/includes/class_posting.php new file mode 100644 index 0000000..0d420d1 --- /dev/null +++ b/includes/class_posting.php @@ -0,0 +1,116 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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_shoutbox.php b/includes/class_shoutbox.php new file mode 100644 index 0000000..cdb0303 --- /dev/null +++ b/includes/class_shoutbox.php @@ -0,0 +1,51 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class ShoutBox +{ + function new_message($message,$uid) + { + $time = time(); + $sql = "INSERT INTO ".SHOUTBOX_TABLE." VALUES ('', '$uid', '$message','$time')"; + DataBase::sql_query($sql,'GENERAL','Could not add shoutbox message.'); + } + function read_messages($limit) + { + $sb_content = ''; + $rank_mod = ($_SESSION['uid']>0) ? User::UserInformation($_SESSION['uid'],'rank') : 0; + global $user; + global $default_skin; + $sql = "SELECT * FROM ".SHOUTBOX_TABLE." ORDER BY `time` LIMIT $limit"; + $query = DataBase::sql_query($sql,'CRITICAL', 'Could not read shoutbox table'); + while($sb_msg = @mysql_fetch_array($query)) + { + $del_edit_msg = ($rank_mod>0) ? 'x e' : ' '; + $sb_content .= ''.$del_edit_msg.' + ' + .Topic::UserName($user[$sb_msg['u_id']]['nick'],$user[$sb_msg['u_id']]['rank']). + ' ['.date('d-m, G:i',$sb_msg['time']).']: + '.$sb_msg['msg_content'].''; + } + return $sb_content; + + } + function del_old_msgs($limiter) + { + $sql = "DELETE FROM ".SHOUTBOX_TABLE." WHERE `time`+$limiter<'".time()."'"; + DataBase::sql_query($sql,'GENERAL','Could not delete old messages in shoutbox'); + unset($sql); + } +} +?> diff --git a/includes/class_topic.php b/includes/class_topic.php new file mode 100644 index 0000000..de1a3a7 --- /dev/null +++ b/includes/class_topic.php @@ -0,0 +1,197 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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 new file mode 100644 index 0000000..46ee71d --- /dev/null +++ b/includes/class_user.php @@ -0,0 +1,208 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @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.'); + } + } +} +?> diff --git a/includes/classes/class_pms.php b/includes/classes/class_pms.php new file mode 100644 index 0000000..695ec7e --- /dev/null +++ b/includes/classes/class_pms.php @@ -0,0 +1,79 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Pms +{ + function UserName($uid) + { + global $user; + global $forum_config; + $nick = $user[$uid]['nick']; + $rank = $user[$uid]['rank']; + switch($rank) + { + case '0': + { + return $nick; + break; + } + case '1': + { + return ''.$nick.''; + break; + } + case '2': + { + return ''.$nick.''; + break; + } + } + } + function SendMessage($text, $name, $nick) + { + //general variables + $u_n_id = $_SESSION['uid']; + $uid = User::UserIdByNick($nick); + //For work! + NewMessage::AddToInbox($text, $name, $u_n_id, $uid); + NewMessage::AddToSentbox($text, $name, $u_n_id, $uid); + } + function DeleteMsgUser($mid) + { + $sql = "DELETE FROM `".PM_INBOX_TABLE."` WHERE `m_id`='$mid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete message in inbox'); + } + function DeleteMsgAuthor($mid) + { + $sql = "DELETE FROM `".PM_SENTBOX_TABLE."` WHERE `m_id`='$mid'"; + DataBase::sql_query($sql,'GENERAL','Could not delete message in sentbox'); + } +} + +class NewMessage +{ + function AddToInbox($text, $name, $unid, $uid) + { + $last = DataBase::new_id(PM_INBOX_TABLE); + $time = time(); + $sql = "INSERT INTO `".PM_INBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid','0')"; + DataBase::sql_query($sql,'GENERAL','Could not add new message at inbox'); + } + function AddToSentbox($text, $name, $unid, $uid) + { + $last=DataBase::new_id(PM_SENTBOX_TABLE); + $time = time(); + $sql = "INSERT INTO `".PM_SENTBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid')"; + DataBase::sql_query($sql,'GENERAL','Could not add new message at inbox'); + } +} +?> diff --git a/includes/classes/secure.php b/includes/classes/secure.php new file mode 100644 index 0000000..1165246 --- /dev/null +++ b/includes/classes/secure.php @@ -0,0 +1,193 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +class Secure +{ + function forum_exists($fid) + { + global $lng; + $sql = "SELECT * 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['f_id']; + if ($result=='') + { + message_forum($lng['no_forum'],'index.php'); + } + } + function UseCensorList($text) + { + global $forum_config; + if ($forum_config['use_censorlist']) + { + $sql = "SELECT * FROM ".CENSORLIST_TABLE.";"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain censorlist information.'); + while($word = mysql_fetch_array($query)) + { + $text = str_replace($word['word'],'[censored]', $text); + } + } + return $text; + } + function generate_code() + { + $number = array( + 1 => 1, + 2 => 2, + 3 => 4, + 4 => 6, + 5 => 10, + 6 => 20, + 7 => 30, + 8 => 40, + 9 => 50, + 10 => 60, + 11 => 70, + 12 => 80, + 13 => 90, + 14 => 100 + ); + $first_id = rand(1,14); + $second_id = rand(1,14); + $first_num = $number[$first_id]; + $second_num = $number[$second_id]; + return array($first_num, $second_num, ($first_num + $second_num)); + } + + function message_u_exists($mid) + { + global $lng; + $sql = "SELECT * FROM ".PM_INBOX_TABLE." WHERE m_id='$mid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'); + $result = mysql_fetch_array($query); + $result = $result['m_id']; + if ($result=='') + { + message_forum($lng['no_message'],'pms.php'); + } + } + function message_author_loged($mid) + { + global $lng; + $sql = "SELECT * FROM ".PM_SENTBOX_TABLE." WHERE m_id='$mid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'); + $result = mysql_fetch_array($query); + $result = $result['u_n_id']; + if ($result!=$_SESSION['uid']) + { + message_forum($lng['merror_1'],'index.php'); + } + } + function message_user_loged($mid) + { + global $lng; + $sql = "SELECT * FROM ".PM_INBOX_TABLE." WHERE m_id='$mid'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.')); + $result = $result['u_id']; + if ($result!=$_SESSION['uid']) + { + message_forum($lng['merror_2'],'index.php'); + } + } + function message_a_exists($mid) + { + global $lng; + $sql = "SELECT * FROM ".PM_SENTBOX_TABLE." WHERE m_id='$mid'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.')); + $result = $result['m_id']; + if ($result=='') + { + message_forum($lng['no_message'],'index.php'); + } + } + function topic_exists($tid) + { + global $lng; + $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['t_id']; + if ($result=='') + { + message_forum($lng['no_topic'],'index.php'); + } + } + function post_exists($pid) + { + global $lng; + $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['p_id']; + if ($result=='') + { + message_forum($lng['no_post'],'pms.php'); + } + } + function user_exists($uid) + { + global $lng; + $sql = "SELECT * FROM ".USERS_TABLE." WHERE u_id='$uid'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.')); + $result = $result['u_id']; + if (($result=='') or ($result=='-1')) + { + message_forum($lng['no_user'],'index.php'); + } + } + function group_exists($gid) + { + global $lng; + $sql = "SELECT `g_id` FROM `".GROUPS_TABLE."` WHERE g_id='$gid'"; + $result = mysql_fetch_array(DataBase::sql_query($sql,'GENERAL','Could not obtain group information.')); + $result = $result['g_id']; + if ($result=='') + { + message_forum($lng['no_group'],'groups.php'); + } + } + function TagsReplace($text) + { + $text = strip_tags($text,ALLOWED_TAGS); + $text = str_replace('?>', '?>', $text); + $text = str_replace(' diff --git a/includes/constants.php b/includes/constants.php new file mode 100644 index 0000000..c899437 --- /dev/null +++ b/includes/constants.php @@ -0,0 +1,68 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if (!defined('IN_uF')) +{ + die('Hacking attempt'); +} + +//sessions constants +define('SESSION_LIFETIME',129600); +define('SESS_NAME','uf_auth'); +//maximum filesize of avatar +define('AV_CATALOG','images/avatars/'); +//posting allowed tags HTML + +define('ALLOWED_TAGS','



  • '; + } + break; + } + case 'step2': + { + if (isset($_POST['accept'])) + { + header('Location: index.php?page=step3'); + } + else + { + echo $header.' + '.$lng['licence'].' + + + + +
    '; + } + break; + } + case 'step3': + { + if (isset($_POST['next'])) + { + header('Location: index.php?page=step4'); + } + else + { + $bad = 0; + if (!@is_writable($folders[0])) { $bad =+1; } + if (!@is_writable($folders[1])) { $bad =+1; } + if (!@is_writable($folders[2])) { $bad =+1; } + if (phpversion()<'4.3.10') { $bad=+1; } + if (mysql_get_client_info()<'4.1') { $bad =+1; } + if ($count>1) { $bad =+1; } + echo $header; + $skin=array( + 'L.name'=>$lng['name'], + 'L.value'=>$lng['value'], + 'L.php_version'=>$lng['php_version'], + 'PHP.version'=>phpversion(), + 'PHP.value' => (phpversion()>='4.3.10') ? 'OK' : ' Error - No OK', + 'mySQL.version'=>mysql_get_client_info(), + 'L.mySQL_version'=>$lng['mysql_version'], + 'mySQL.value'=>(mysql_get_client_info()>='4.1') ? 'OK' : ' Error - No OK', + 'L.cat_name'=>$lng['catalog'], + 'cat1.name'=> $folders[0], + 'cat1.value'=> (@is_writable($folders[0])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', + 'cat2.name'=> $folders[1], + 'cat2.value'=> (@is_writable($folders[1])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', + 'cat3.name'=> $folders[2], + 'cat3.value'=> (@is_writable($folders[2])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', + 'successfully' => ($count <1) ? ''.$lng['files_is_good'].' ('.count($script_files).')' : ''.$lng['files_not_good'].' ('.$count.')' + ); + include('./tpls/install_check_script.tpl'); + for($i=0; $i$lng['actual_sum'], + 'sum_actual'=>$actual, + 'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')' + ); + include('./tpls/invalidfile_body.tpl'); + } + } + echo ''; + if ($bad>0) + { + echo '
    '; + echo ''.$lng['click_next'].''; + } + else + { + echo ''; + } + echo ''; + } + break; + + } + case 'step4': + { + if (isset($_POST['mysql_host'],$_POST['database'],$_POST['mysql_prefix'],$_POST['mysql_user'],$_POST['mysql_pass'])) + { + $open = @fopen('../config.php','a+'); + $config_file = @fread($open,@filesize('../config.php')); + $config_file = str_replace('%host%',strip_tags($_POST['mysql_host']),$config_file); + $config_file = str_replace('%user%',strip_tags($_POST['mysql_user']),$config_file); + $config_file = str_replace('%pass%',strip_tags($_POST['mysql_pass']),$config_file); + $config_file = str_replace('%dbname%',strip_tags($_POST['database']),$config_file); + $config_file = str_replace('%dbprefix%',strip_tags($_POST['mysql_prefix']),$config_file); + $connect = @mysql_connect($_POST['mysql_host'],$_POST['mysql_user'],$_POST['mysql_pass']) or message_die('GENERAL','Could not connect to database server. Error with installation!',@mysql_error()); + @fwrite(@fopen('../config.php','w'),$config_file) or message_die('GENERAL','Could not write config file. Error with installation!',''); + @mysql_query("SET NAMES 'utf8'",$connect); + @mysql_select_db($_POST['database'],$connect) or message_die('GENERAL','Could not connect to database. Error with installation!',@mysql_error()); + include('./../includes/sql_parse.php'); + $sql = @fread(@fopen('uf_tables.sql','r'),@filesize('uf_tables.sql')); + $sql = preg_replace('/uf_/', $_POST['mysql_prefix'], $sql); + $sql = remove_remarks($sql); + $sql = split_sql_file($sql); + for ($i=0;$i$lng['mysql_host'], + 'L.mysql_user'=>$lng['mysql_user'], + 'L.database'=>$lng['db_name'], + 'L.mysql_pass'=>$lng['mysql_pass'], + 'L.mysql_prefix'=>$lng['mysql_prefix'], + 'L.submit'=>$lng['start_install'], + ); + include('./tpls/install_step4.tpl'); + break; + } + case 'step5': + { + echo $header.''.$lng['install_complete'].''; + break; + } + case 'step6': + { + DataBase::db_connect(); + if (isset($_POST['user_name'],$_POST['password'],$_POST['retype_password'],$_POST['email'])) + { + if ($_POST['password']==$_POST['retype_password']) + { + if (ereg("^.+@.+\..+$", $_POST['email'])) + { + $sql = "UPDATE `".USERS_TABLE."` SET + `nick`='".htmlspecialchars($_POST['user_name'])."', + `pass`='".md5(htmlspecialchars($_POST['password']))."', + `email`='".htmlspecialchars($_POST['email'])."', + `lang`= '".$_COOKIE['lang']."', + `regdate`='".time()."', + `lastvisit`='".time()."' + WHERE `u_id`='1';"; + DataBase::sql_query($sql,'CRITICAL','Could not update user. Error with install script!'); + $sql = "UPDATE `".POSTS_TABLE."` SET `ptime`='".time()."' WHERE `p_id`='1'"; + DataBase::sql_query($sql,'CRITICAL','Could not update post. Error with install script!'); + $sql = "UPDATE `".TOPICS_TABLE."` SET `lastpost_time`='".time()."' WHERE `t_id`='1'"; + DataBase::sql_query($sql,'CRITICAL','Could not update topic. Error with install script!'); + header('Location: index.php?page=step7'); + } + else + { + alert($lng['invalid_email']); + } + } + else + { + alert($lng['invalid_passwords']); + } + } + else + { + if (!isset($_POST['user_name'])) { $_POST['user_name'] = ''; } + if (!isset($_POST['email'])) { $_POST['email'] = ''; } + $_POST['password'] = ''; + $_POST['retype_password'] = ''; + } + echo $header; + $skin = array( + 'L.user_name'=>$lng['user_name'], + 'L.password'=>$lng['password'], + 'L.retype_password'=>$lng['retype_password'], + 'L.email'=>$lng['email'], + 'L.submit'=>$lng['save'] + ); + include('./tpls/install_step6.tpl'); + break; + } + case 'step7': + { + $open = @fopen('../config.php','a+'); + $config_file = @fread($open,@filesize('../config.php')); + $config_file = str_replace('false','true',$config_file); + @fwrite(@fopen('../config.php','w'),$config_file) or message_die('GENERAL','Could not write config file. Error with installation!',''); + echo $header.''.$lng['info_2'].''; + break; + } +} +?> diff --git a/install/licence.html b/install/licence.html new file mode 100644 index 0000000..ecadb99 --- /dev/null +++ b/install/licence.html @@ -0,0 +1,627 @@ +

    GNU GENERAL PUBLIC LICENSE

    +

    Version 3, 29 June 2007

    + +

    Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>

    + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed.

    + +

    Preamble

    + +

    The GNU General Public License is a free, copyleft license for +software and other kinds of works.

    + +

    The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too.

    + +

    When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things.

    + +

    To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others.

    + +

    For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights.

    + +

    Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it.

    + +

    For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions.

    + +

    Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users.

    + +

    Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free.

    + +

    The precise terms and conditions for copying, distribution and +modification follow.

    + +

    TERMS AND CONDITIONS

    + +

    0. Definitions.

    + +

    “This License” refers to version 3 of the GNU General Public License.

    + +

    “Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks.

    + +

    “The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations.

    + +

    To “modify” a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a “modified version” of the +earlier work or a work “based on” the earlier work.

    + +

    A “covered work” means either the unmodified Program or a work based +on the Program.

    + +

    To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well.

    + +

    To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying.

    + +

    An interactive user interface displays “Appropriate Legal Notices” +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion.

    + +

    1. Source Code.

    + +

    The “source code” for a work means the preferred form of the work +for making modifications to it. “Object code” means any non-source +form of a work.

    + +

    A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language.

    + +

    The “System Libraries” of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +“Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it.

    + +

    The “Corresponding Source” for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work.

    + +

    The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source.

    + +

    The Corresponding Source for a work in source code form is that +same work.

    + +

    2. Basic Permissions.

    + +

    All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law.

    + +

    You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you.

    + +

    Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary.

    + +

    3. Protecting Users' Legal Rights From Anti-Circumvention Law.

    + +

    No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures.

    + +

    When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures.

    + +

    4. Conveying Verbatim Copies.

    + +

    You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program.

    + +

    You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee.

    + +

    5. Conveying Modified Source Versions.

    + +

    You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions:

    + +
      +
    • a) The work must carry prominent notices stating that you modified + it, and giving a relevant date.
    • + +
    • b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + “keep intact all notices”.
    • + +
    • c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it.
    • + +
    • d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so.
    • +
    + +

    A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +“aggregate” if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate.

    + +

    6. Conveying Non-Source Forms.

    + +

    You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways:

    + +
      +
    • a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange.
    • + +
    • b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge.
    • + +
    • c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b.
    • + +
    • d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements.
    • + +
    • e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d.
    • +
    + +

    A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work.

    + +

    A “User Product” is either (1) a “consumer product”, which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, “normally used” refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product.

    + +

    “Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made.

    + +

    If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM).

    + +

    The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network.

    + +

    Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying.

    + +

    7. Additional Terms.

    + +

    “Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions.

    + +

    When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission.

    + +

    Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms:

    + +
      +
    • a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or
    • + +
    • b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or
    • + +
    • c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or
    • + +
    • d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or
    • + +
    • e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or
    • + +
    • f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors.
    • +
    + +

    All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying.

    + +

    If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms.

    + +

    Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way.

    + +

    8. Termination.

    + +

    You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11).

    + +

    However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation.

    + +

    Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice.

    + +

    Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10.

    + +

    9. Acceptance Not Required for Having Copies.

    + +

    You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so.

    + +

    10. Automatic Licensing of Downstream Recipients.

    + +

    Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License.

    + +

    An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts.

    + +

    You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it.

    + +

    11. Patents.

    + +

    A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's “contributor version”.

    + +

    A contributor's “essential patent claims” are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License.

    + +

    Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version.

    + +

    In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To “grant” such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party.

    + +

    If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. “Knowingly relying” means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid.

    + +

    If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it.

    + +

    A patent license is “discriminatory” if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007.

    + +

    Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law.

    + +

    12. No Surrender of Others' Freedom.

    + +

    If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program.

    + +

    13. Use with the GNU Affero General Public License.

    + +

    Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such.

    + +

    14. Revised Versions of this License.

    + +

    The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns.

    + +

    Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License “or any later version” applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation.

    + +

    If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program.

    + +

    Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version.

    + +

    15. Disclaimer of Warranty.

    + +

    THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    + +

    16. Limitation of Liability.

    + +

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES.

    + +

    17. Interpretation of Sections 15 and 16.

    + +

    If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee.

    + +

    END OF TERMS AND CONDITIONS

    \ No newline at end of file diff --git a/install/tpls/index.html b/install/tpls/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/install/tpls/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/install/tpls/install_check_script.tpl b/install/tpls/install_check_script.tpl new file mode 100644 index 0000000..d209b57 --- /dev/null +++ b/install/tpls/install_check_script.tpl @@ -0,0 +1,49 @@ + +  + + + + + + + + + + + + + + + + + + + + + + + + +
    + ():   + + +
    + ():   + + +
    + ():   + + +
    + ():   + + +
    + ():   + + +
    + +
    diff --git a/install/tpls/install_step4.tpl b/install/tpls/install_step4.tpl new file mode 100644 index 0000000..8851424 --- /dev/null +++ b/install/tpls/install_step4.tpl @@ -0,0 +1,26 @@ + +  +
    + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    + \ No newline at end of file diff --git a/install/tpls/install_step6.tpl b/install/tpls/install_step6.tpl new file mode 100644 index 0000000..2970cfc --- /dev/null +++ b/install/tpls/install_step6.tpl @@ -0,0 +1,22 @@ + +  + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    + \ No newline at end of file diff --git a/install/tpls/install_step8.tpl b/install/tpls/install_step8.tpl new file mode 100644 index 0000000..6355456 --- /dev/null +++ b/install/tpls/install_step8.tpl @@ -0,0 +1,279 @@ + +  + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + :  
    +    +
    + +
    + :   + + +
    + :   + + +
    + :  
    +    +
    + +
    + :   + + +
    + :   + + value="1"> +
    + :   + + value="1"> +
    +  + + + + + + + +
    + +
    + + + + + + + + + + + +
    + :   + + +
    + :   + + +
    +  + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + :   + + value="1"> +
    + :   + + +
    + :   + + +
    + :   + + +
    +  + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + +
    + :   + + value="1"> +
    + :   + + +
    + :   + + +
    +  + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + :   + + value="1"> +
    + :   + + value="1"> +
    + :   + + value="1"> +
    + :   + + value="1"> +
    + :   + + value="1"> +
    + + + +
    + diff --git a/install/tpls/invalidfile_body.tpl b/install/tpls/invalidfile_body.tpl new file mode 100644 index 0000000..4ab39bb --- /dev/null +++ b/install/tpls/invalidfile_body.tpl @@ -0,0 +1,5 @@ +
    + , + : +
    +  \ No newline at end of file diff --git a/install/uf_tables.sql b/install/uf_tables.sql new file mode 100644 index 0000000..6ad74c2 --- /dev/null +++ b/install/uf_tables.sql @@ -0,0 +1,396 @@ +#uF tables for uForum + +#---------------------------------------------------- + +#- +#- Table structure for `uf_banlist` +#- + +CREATE TABLE `uf_banlist` ( + `b_id` mediumint(8) NOT NULL auto_increment, + `u_id` varchar(8) NOT NULL default '-2', + `IP` varchar(15) NOT NULL default '0.0.0.0', + `motive` varchar(40) NOT NULL default '', + PRIMARY KEY (`b_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +#- +#- Table structure for `uf_banlist` +#- + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_categories` +#- + +CREATE TABLE `uf_categories` ( + `c_id` mediumint(8) NOT NULL default '0', + `name` varchar(30) NOT NULL default '', + `sort` mediumint(8) NOT NULL default '0', + PRIMARY KEY (`c_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_categories` +#- + +INSERT INTO `uf_categories` VALUES (1, 'Testowa Kategoria', 1); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_censorlist` +#- + +CREATE TABLE `uf_censorlist` ( + `w_id` mediumint(8) NOT NULL default '0', + `word` varchar(45) NOT NULL default '', + PRIMARY KEY (`w_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_censorlist` +#- + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_config` +#- + +CREATE TABLE `uf_config` ( + `name` varchar(255) NOT NULL default '', + `value` text NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_config` +#- + +INSERT INTO `uf_config` VALUES ('forumname', 'Forum Test'); +INSERT INTO `uf_config` VALUES ('forumpatch', ''); +INSERT INTO `uf_config` VALUES ('meta_keywords', ''); +INSERT INTO `uf_config` VALUES ('meta_description', ''); +INSERT INTO `uf_config` VALUES ('defaultlang', 'Polish'); +INSERT INTO `uf_config` VALUES ('defaultskin', '1'); +INSERT INTO `uf_config` VALUES ('show_time_generation', '1'); +INSERT INTO `uf_config` VALUES ('disable_forum', ''); +INSERT INTO `uf_config` VALUES ('date_install', '1162663995'); +INSERT INTO `uf_config` VALUES ('use_censorlist', '1'); +INSERT INTO `uf_config` VALUES ('allow_warns', '1'); +INSERT INTO `uf_config` VALUES ('warns_in_topic', '1'); +INSERT INTO `uf_config` VALUES ('enable_confirms', '1'); +INSERT INTO `uf_config` VALUES ('allow_send_email', '1'); +INSERT INTO `uf_config` VALUES ('forum_counter','0'); +INSERT INTO `uf_config` VALUES ('limit_tpid', '20'); +INSERT INTO `uf_config` VALUES ('limit_ftid', '20'); +INSERT INTO `uf_config` VALUES ('limit_users', '30'); +INSERT INTO `uf_config` VALUES ('shoutbox_max_time', '14400'); +INSERT INTO `uf_config` VALUES ('shoutbox_max', '50'); +INSERT INTO `uf_config` VALUES ('view_shoutbox', '1'); +INSERT INTO `uf_config` VALUES ('allow_upload_avatars', '1'); +INSERT INTO `uf_config` VALUES ('forumdesc', 'Tu wpisz swój opis forum'); +INSERT INTO `uf_config` VALUES ('ip_post_for_mod', '1'); +INSERT INTO `uf_config` VALUES ('color_mod', 'green'); +INSERT INTO `uf_config` VALUES ('color_admin', 'red'); +INSERT INTO `uf_config` VALUES ('max_av_x', '150'); +INSERT INTO `uf_config` VALUES ('max_av_y', '150'); +INSERT INTO `uf_config` VALUES ('max_av_filesize', '102400'); +INSERT INTO `uf_config` VALUES ('sig_len', '300'); +INSERT INTO `uf_config` VALUES ('time_antiflood', '30'); +INSERT INTO `uf_config` VALUES ('tables_width', '900'); +INSERT INTO `uf_config` VALUES ('newpasswd_len', '6'); + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_forums` +#- + +CREATE TABLE `uf_forums` ( + `f_id` mediumint(8) NOT NULL default '0', + `lock` tinyint(1) NOT NULL default '0', + `moderate` int(11) NOT NULL default '0', + `name` varchar(30) NOT NULL default '', + `desc` text NOT NULL, + `c_id` int(8) NOT NULL default '0', + `sort` mediumint(8) NOT NULL default '0', + PRIMARY KEY (`f_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_forums` +#- +INSERT INTO `uf_forums` VALUES (1, 0, 0, 'Testowe Forum', 'Pierwsze testowe forum skryptu Dynamic Script Forum.', 1, 1); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_groups` +#- + +CREATE TABLE `uf_groups` ( + `g_id` mediumint(8) NOT NULL default '0', + `name` varchar(50) NOT NULL default '', + `desc` varchar(255) NOT NULL default '', + `m_id` mediumint(8) NOT NULL default '0', + `sort` mediumint(8) NOT NULL default '0', + PRIMARY KEY (`g_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_groups` +#- + +#---------------------------------------------------- + +#- +#- Table structure for `uf_msg_inbox` +#- + +CREATE TABLE `uf_msg_inbox` ( + `m_id` mediumint(8) NOT NULL default '0', + `u_id` mediumint(8) NOT NULL default '0', + `name` varchar(30) NOT NULL default '', + `message` text NOT NULL, + `time` varchar(40) NOT NULL default '', + `u_n_id` mediumint(8) NOT NULL default '0', + `read` int(1) NOT NULL default '0', + PRIMARY KEY (`m_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_msg_inbox` +#- + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_msg_sentbox` +#- + +CREATE TABLE `uf_msg_sentbox` ( + `m_id` mediumint(8) NOT NULL default '0', + `u_id` mediumint(8) NOT NULL default '0', + `name` varchar(30) NOT NULL default '', + `message` text NOT NULL, + `time` varchar(40) NOT NULL default '', + `u_n_id` mediumint(8) NOT NULL default '0', + PRIMARY KEY (`m_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_msg_sentbox` +#- + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_posts` +#- + +CREATE TABLE `uf_posts` ( + `p_id` mediumint(8) NOT NULL default '0', + `t_id` mediumint(8) NOT NULL default '0', + `u_id` mediumint(8) NOT NULL default '0', + `text` text NOT NULL, + `user_agent` varchar(255) NOT NULL, + `ptime` int(1) NOT NULL default '0', + `tp_id` int(2) NOT NULL default '0', + `f_id` mediumint(8) NOT NULL default '0', + `moderated` int(1) NOT NULL default '0', + `post_ip` varchar(30) NOT NULL default '0.0.0.0', + PRIMARY KEY (`p_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_posts` +#- + +INSERT INTO `uf_posts` VALUES +(1, 1, 1, 'Witamy na forum opartym na skrypcie uf(Dynamic Script Forum). Miłego korzystania z niego ;)
    W razie pytań, pisz:
    uf Forum', '', 1181666444, 1, 1, 0, '127.0.0.1'); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_sessions` +#- + +CREATE TABLE `uf_sessions` ( + `s_id` mediumint(3) NOT NULL auto_increment, + `session_id` varchar(50) NOT NULL default '', + `u_id` int(2) NOT NULL default '0', + `time` varchar(30) NOT NULL default '', + PRIMARY KEY (`s_id`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; + +#---------------------------------------------------- + +#- +#- Table structure for `uf_shoutbox` +#- + +CREATE TABLE `uf_shoutbox` ( + `m_id` mediumint(8) NOT NULL auto_increment, + `u_id` mediumint(8) NOT NULL, + `message` text NOT NULL, + `mtime` varchar(20) NOT NULL, + PRIMARY KEY (`m_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + + +#- +#- Table structure for `uf_skins` +#- + +CREATE TABLE `uf_skins` ( + `s_id` mediumint(8) NOT NULL default '0', + `name` varchar(20) NOT NULL default '', + PRIMARY KEY (`s_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_skins` +#- + +INSERT INTO `uf_skins` VALUES (1, 'subPurple'); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_smiles` +#- + +CREATE TABLE `uf_smiles` ( + `s_id` mediumint(8) NOT NULL default '0', + `smile` varchar(20) NOT NULL default '', + `url` varchar(40) NOT NULL default '', + PRIMARY KEY (`s_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_smiles` +#- + +INSERT INTO `uf_smiles` VALUES (1, ':)', 'images/smiles/icon_smile.gif'); +INSERT INTO `uf_smiles` VALUES (2, ';(', 'images/smiles/icon_cry.gif'); +INSERT INTO `uf_smiles` VALUES (3, ':(', 'images/smiles/icon_sad.gif'); +INSERT INTO `uf_smiles` VALUES (4, ':/', 'images/smiles/icon_curve.gif'); +INSERT INTO `uf_smiles` VALUES (5, ':|', 'images/smiles/icon_neutral.gif'); +INSERT INTO `uf_smiles` VALUES (6, ':idea:', 'images/smiles/icon_idea.gif'); +INSERT INTO `uf_smiles` VALUES (7, ':lol:', 'images/smiles/icon_lol.gif'); +INSERT INTO `uf_smiles` VALUES (8, ';)', 'images/smiles/icon_wink.gif'); +INSERT INTO `uf_smiles` VALUES (9, ':?:', 'images/smiles/icon_question.gif'); +INSERT INTO `uf_smiles` VALUES (10, ':!:', 'images/smiles/icon_exclaim.gif'); +INSERT INTO `uf_smiles` VALUES (11, ':P', 'images/smiles/icon_razz.gif'); +INSERT INTO `uf_smiles` VALUES (12, ':roll:', 'images/smiles/icon_rolleyes.gif'); +INSERT INTO `uf_smiles` VALUES (13, ':>', 'images/smiles/icon_smile2.gif'); +INSERT INTO `uf_smiles` VALUES (14, ':evil:', 'images/smiles/icon_twisted.gif'); +INSERT INTO `uf_smiles` VALUES (15, ':o', 'images/smiles/icon_surprised.gif'); +INSERT INTO `uf_smiles` VALUES (16, ':mad:', 'images/smiles/icon_mad.gif'); +INSERT INTO `uf_smiles` VALUES (17, ':redface:', 'images/smiles/icon_redface.gif'); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_topics` +#- + +CREATE TABLE `uf_topics` ( + `t_id` mediumint(8) NOT NULL default '0', + `f_id` mediumint(8) NOT NULL default '0', + `lock` int(1) NOT NULL default '0', + `sticky` int(1) NOT NULL, + `name` varchar(100) NOT NULL default '', + `author` mediumint(8) NOT NULL default '0', + `lastpost_time` int(1) NOT NULL, + PRIMARY KEY (`t_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_topics` +#- + +INSERT INTO `uf_topics` VALUES (1, 1, 0, 0, 'Witamy na forum uf', 1,0); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_users` +#- + +CREATE TABLE `uf_users` ( + `u_id` mediumint(8) NOT NULL default '0', + `nick` varchar(25) NOT NULL default '', + `pass` varchar(32) NOT NULL default '', + `email` varchar(40) default NULL, + `rank` int(11) NOT NULL default '0', + `regdate` int(1) NOT NULL default '0', + `lastvisit` int(1) NOT NULL default '0', + `gg` int(7) NOT NULL default '0', + `allow_gg` tinyint(1) NOT NULL default '0', + `allow_email` tinyint(1) NOT NULL default '0', + `allow_qr` tinyint(1) NOT NULL default '0', + `view_shoutbox` int(1) NOT NULL default '1', + `skin` mediumint(4) NOT NULL default '0', + `lang` varchar(30) NOT NULL default '', + `limit_tpid` mediumint(2) NOT NULL default '15', + `limit_ftid` mediumint(2) NOT NULL default '20', + `limit_users` mediumint(2) NOT NULL default '30', + `sig` text NOT NULL, + `avatar` varchar(100) NOT NULL default '', + `active` tinyint(1) NOT NULL default '0', + `posts` int(11) NOT NULL default '0', + `interests` varchar(100) NOT NULL default '', + PRIMARY KEY (`u_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_users` +#- + +INSERT INTO `uf_users` VALUES (-1, 'Guest', 'null', NULL, 0, 0, 0, 0, 0, 0, 0, 1, 1, '', 15, 20, 30, '', '', 0, 0, ''); +INSERT INTO `uf_users` VALUES (1, '%login%', '%pass%', '%email%', 2, '%regdate%', 0, 0, 1, 1, 1, 1, 1, '%lang%', 15, 20, 30, '', '', 1, 1, ''); + +#---------------------------------------------------- + +#- +#- Table structure for `uf_users_group` +#- + +CREATE TABLE `uf_users_group` ( + `id` mediumint(8) NOT NULL default '0', + `u_id` mediumint(8) NOT NULL default '0', + `g_id` mediumint(8) NOT NULL default '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +#- +#- Table structure for `uf_users_group` +#- + + +#---------------------------------------------------- + +#- +#- Table structure for `uf_warns` +#- + +CREATE TABLE `uf_warns` ( + `w_id` mediumint(8) NOT NULL auto_increment, + `u_id` mediumint(8) NOT NULL default '0', + `value` varchar(10) NOT NULL default '', + `motive` varchar(255) NOT NULL default '', + PRIMARY KEY (`w_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +#- +#- Table structure for `uf_warns` +#- diff --git a/lngs/Polish/admin.php b/lngs/Polish/admin.php new file mode 100644 index 0000000..db86d77 --- /dev/null +++ b/lngs/Polish/admin.php @@ -0,0 +1,286 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +include('./../lngs/Polish/wysiwyg.php'); +// +//on all...------------------------------------------------ +// +$lng['with']='z'; +$lng['page']='Strona'; +$lng['invalid_email']='Nieprawidłowy adres email!'; +$lng['uf_pa']='µForum - Panel Administracyjny'; +$lng['uf_pa_nav']='µForum
    PA'; +$lng['go_to_forum']='Przejdź na forum'; +$lng['index']='Indeks'; +$lng['scriptstat']='Stan skryptu'; +$lng['scriptconfig']='Ustawienia'; +$lng['admin_forums']='Zarządzaj forami'; +$lng['admin_groups']='Grupy'; +$lng['mass_email']='Masowa wiadomość'; +$lng['styles']='Style'; +$lng['admin_users']='Użytkownicy'; +$lng['admin_banlist']='Banuj użytkowników'; +$lng['admin_censorlist']='Cenzura słów'; +$lng['admin_smilelist']='Zarządzaj emotikonami'; +$lng['invalidmode']='Nieprawidłowa opcja pliku'; +$lng['submit']='Zapisz'; +$lng['reset']='Wyczyść'; +$lng['yournotadmin']='Nie jesteś administratorem'; +$lng['allow']='Włącz'; +$lng['yes']='Tak'; +$lng['no']='Nie'; +$lng['lpassw'] = 'Hasło'; +// +//on mass email....------------------------------------------- +// +$lng['mass_email2']='Wyślij email do wszystkich użytkowników'; +$lng['msg_content']='Treść wiadomości'; +$lng['mass_email3']='Masowa wiadomość z forum %forum%'; +$lng['mass_email_sended']='Masowa wiadomość przez email została rozesłana.
    Powrót do strony głównej administracji'; +$lng['mass_email_disabled']='Masowa wiadomość przez email została wyłączona w ustawieniach forum.
    Powrót do strony głównej administracji'; +$lng['to_short_msg_content']='Za krótka treść wiadomości!'; +// +//on admin groups....------------------------------------------- +// +$lng['edit_group']='Edytuj grupę'; +$lng['new_group']='Nowa grupa'; +$lng['group_name']='Nazwa grupy'; +$lng['group_desc']='Opis grupy'; +$lng['group_mod']='Moderator grupy'; +$lng['group_saved']='Grupa została zapisana.
    Powrót do administracji grupami.'; +$lng['to_short_group_name'] = 'Nazwa forum jest za krótka!'; +$lng['c_delete_group']='Czy NAPEWNO chcesz usunąć grupę?'; +// +//on admin users... -------------------------------------------- +// +$lng['allow_shoutbox']='Pokaż ShoutBox'; +$lng['no_user']='Użytkownik nie istnieje!'; +$lng['incorrect_password']='Nieprawidłowe obecne hasło!'; +$lng['incorrect_password2']='Hasła nie pasują do siebie!'; +$lng['user']='Użytkownik'; +$lng['luregister']='Zarejestrowany'; +$lng['profile_modernized']='Twój profil został zaktualizowany.
    Powrót do administracji uzytkownikami.
    '; +$lng['luinterests']='Zainteresowania'; +$lng['save']='Zapisz'; +$lng['user_name']='Nazwa użytkownika'; +$lng['profile_settings']='Ustawienia profilu'; +$lng['general_settings']='Ustawienia ogólne'; +$lng['avatar_file']='Wyślij avatar z komputera'; +$lng['signature_settings']='Ustawienia podpisu'; +$lng['avatar_settings']='Ustawienia Avatara'; +$lng['allow_gg']='Pokaż moje GG'; +$lng['allow_email']='Pokaż mój e-mail'; +$lng['allow_qr']='Pokaż szybką odpowiedź'; +$lng['picture_adress']='Adres do obrazka'; +$lng['serve_email']='Podaj e-mail'; +$lng['new_password']='Nowe hasło'; +$lng['confirm_password']='Powtórz hasło'; +$lng['gg_number']='Numer Gadu-Gadu'; +$lng['sig']='Podpis'; +$lng['lulastvisit']='Ostatnia wizyta'; +$lng['user_name']='Nazwa użytkownika'; +$lng['admin_settings']='Ustawienia administatora'; +$lng['user_rank']='Ranga użytkownika'; +$lng['user_actived']='Użytkownik jest aktywny'; +$lng['sort_u_by']='Sortuj użytkowników według'; +$lng['desc']='Rosnąco'; +$lng['lgo']='Wykonaj'; +$lng['never']='Nigdy'; +$lng['c_delete_user']='Czy NAPEWNO chcesz usunąć użytkownika?'; +$lng['user_deleted']='Użytkownik został skasowany.
    Powrót do administracji użytkownikami.'; +$lng['signature_too_long']='Podpis jest za długi!'; +// +//on main page...------------------------------------------------ +// +$lng['forum_stats']='Statystyki Forum'; +$lng['pa_mainpage']='Strona Główna PA'; +$lng['pa_welcome']='Witamy w panelu administracji skryptu µForum!
    Możesz tutaj zmieniać ustawienia forum, edytować konta użytkowników, banować, zarządzać grupami oraz forami. Jeżeli nie jesteś administratorem - wyloguj się natychmiast! Pamiętaj - aby forum było bezpieczne, musi być zawsze aktualne!'; +$lng['name']='Nazwa'; +$lng['value']='Wartość'; +$lng['forum_installed']='Data instalacji skryptu'; +$lng['topics']='Liczba tematów'; +$lng['posts']='Liczba postów'; +$lng['scriptversion']='Wersja skryptu'; +$lng['updates']='Aktualizacje'; +$lng['noupdates']='Twoje forum jest aktualne.'; +$lng['updatenow']='Skrypt jest nieaktualny, zaaktualizuj najszybciej!'; +// +//on check script.......---------------------------------------- +// +$lng['invalid_md5sum']='Nieprawidłowa wielkość pliku!'; +$lng['original_sum']='Praw. wartość'; +$lng['actual_sum']='Aktualna wartość'; +$lng['files_is_good']='Wszystkie pliki są poprawne!'; +$lng['files_not_good']='Nie wszystkie pliki są poprawne. Jest ich: '; +$lng['php_version']='Wersja PHP'; +$lng['mysql_version']='Wersja mySQL'; +$lng['not_writable']='Katalog nie do zapisu!'; +$lng['is_writable']='Katalog do zapisu'; +$lng['catalog']='Katalog'; +$lng['db_size']='Wielkość bazy'; +$lng['forum_size']='Wielkość plików forum'; +// +//on forum config....-------------------------------------------------- +// +//|| messages------------------- +$lng['no_skin']='Nie podałeś domyślnego stylu!'; +$lng['no_limit_tpid']='Nie podałeś limitu postów!'; +$lng['no_limit_ftid']='Nie podałeś limitu tematów!'; +$lng['no_limit_users']='Nie podałeś limitu użytkowników!'; +$lng['no_lang']='Nie podałeś domyślnego języka!'; +$lng['no_path']='Nieprawidłowo zapisana ścieżka forum!'; +$lng['invalid_forum_name']='Nazwa dla forum musi być dłuższa niż 3 znaki i nie dłuższa niż 30.'; +$lng['invalid_forum_desc']='Opis dla forum musi być dłuższy niż 3 znaki i nie dłuższy niż 30.'; +$lng['forum_config_modernized']='Konfiguracja forum została zmianiona.
    Powrót do konfiguracji skryptu.'; +//|| shoutbox------------------ +$lng['shoutbox_preferences']='Ustawienia ShoutBox\'a'; +$lng['shoutbox_time_clear']='Maksymalny czas (w sek.) wiadomości'; +$lng['shoutbox_max_view']='Maksymalna ilość pokazywanych wiadomości'; +$lng['allow_shoutbox']='Włącz ShoutBox'; +//|| other---------------------- +$lng['sig_len']='Długość podpisu'; +$lng['color_mod']='Kolor Moderatora'; +$lng['color_admin']='Kolor Administratora'; +$lng['time_antiflood']='Czas reakcji (antiflood)'; +$lng['newpasswd_len']='Długość generowanego hasła'; +$lng['max_av_x']='Maksymalna szerokość awataru'; +$lng['max_av_y']='Maksymalna wysokość awataru'; +$lng['max_av_filesize']='Maksymalna rozmiar awataru(w KB)'; +$lng['tables_width']='Szerokość forum (w pikselach)'; +$lng['allow_ip_for_mods'] = 'Pokazuj IP postu moderatorom'; +$lng['forum_description']='Krótki opis forum'; +$lng['allow_upload_avatars']='Włącz wysyłanie awatatów na serwer'; +$lng['enable_send_email']='Wysyłaj email\'e'; +$lng['warns_enabled']='Ostrzeżenia włączone'; +$lng['warns_in_topic']='Poziom ostrzeżeń w temacie'; +$lng['general_preferences']='Ustawienia ogólne'; +$lng['users_preferences']='Ustawienia użytkowników'; +$lng['forum_path']='Ścieżka do forum'; +$lng['t_forum_path']='Jeżeli forum działa poprawnie nie zmieniaj tej ścieżki!'; +$lng['forum_name']='Nazwa forum'; +$lng['forum_disabled']='Forum wyłączone'; +$lng['t_forum_disabled']='Aby wyłączyć forum podaj powód, w innym przypadku pozostaw pole puste!'; +$lng['default_skin']='Domyślny styl forum (Zarządzaj)'; +$lng['default_skin2']='Styl forum'; +$lng['select_skin']='Wybierz styl'; +$lng['default_lang']='Domyślny język'; +$lng['select_lang']='Wybierz język'; +$lng['positioning_preferences']='Pozycjonowanie'; +$lng['meta_keywords']='Słowa kluczowe'; +$lng['meta_description']='Opis'; +$lng['other']='Inne'; +$lng['show_time_generation']='Pokazuj czas generowania strony'; +$lng['enable_censorlist']='Cenzura słów włączączona'; +$lng['enable_confirms']='Potwierdzenia czynności(Kasacja, przenoszenie, itp.)'; +$lng['select_value']='Wybierz wartość'; +$lng['limit_users']='Użytkowników na stronę'; +$lng['limit_posts']='Postów na stronę'; +$lng['limit_topics']='Tematów na stronę'; +$lng['admin_mod_preferences']='Ustawienia administracji/moderowania'; +// +//on admin forums...--------------------------------------------------- +// +//|| messages-------------------- +$lng['to_short_cat_name'] = 'Nazwa kategorii jest za krótka!'; +$lng['to_short_forum_name'] = 'Nazwa forum jest za krótka!'; +$lng['to_short_forum_desc'] = 'Opis forum jest za krótki!'; +$lng['cat_saved']='Kategoria została zapisana.
    Powrót do administracji forami.'; +$lng['forum_saved']='Forum zostało zapisane.
    Powrót do administracji forami.'; +$lng['c_del_forum']='CZY NAPEWNO CHCESZ USUNĄĆ DZIAŁ ZE WSZYSTKIMI POSTAMI I TEMATAMI?'; +$lng['c_del_cat']='CZY NAPEWNO CHCESZ USUNĄĆ KATEGORIĘ I WSZYSTKIE DZIAŁY Z ZAWARTOŚCIĄ?'; +//|| main------------------------ +$lng['new_cat']='Nowa kategoria'; +$lng['change_cat']='Wybierz kategorię'; +$lng['forum_locked']='Forum zablokowane'; +$lng['forum_desc']='Opis forum'; +$lng['edit_cat']='Edytuj kategorię'; +$lng['cat_name']='Nazwa kategorii'; +$lng['new_cat']='Nowa kategoria'; +$lng['edit_forum']='Edytuj forum'; +$lng['new_forum']='Nowe forum'; +$lng['forums_and_cats']='Fora i kategorie'; +$lng['moveup']='W górę'; +$lng['movedown']='W dół'; +$lng['delete']='Usuń'; +$lng['here_write_name_forum']='Tu wpisz nazwę forum'; +$lng['here_write_name_cat']='Tu wpisz nazwę kategorii'; +$lng['new_forum_submit']='Nowe Forum'; +$lng['new_cat_submit']='Nowa Kategoria'; +$lng['moderate_posts']='Włącz moderowanie postów'; +$lng['no_forum']='Forum nie istnieje!
    Powrót do administracji forami.'; +$lng['no_category']='Kategoria nie istnieje!
    Powrót do administracji forami.'; +// +//on censorlist...--------------------------------------------------------- +// +$lng['show_all_words']='Pokaż wszystkie słowa (Uwaga, może obciążyć serwer!)'; +$lng['view_all_words']='Pokaż wszystkie słowa'; +$lng['delete_all_words']='Usuń wszystkie słowa (Uwaga, może obciążyć serwer!)'; +$lng['what_do_you_want']='Co chcesz zrobić'; +$lng['add_from_file']='Dodaj z pliku *.txt'; +$lng['add_word']='Dodaj słowo'; +$lng['words_added']='Słowa zostały dodane.
    Powrót do cenzury słów'; +$lng['word_added']='Słowo zostało dodane.
    Powrót do cenzury słów'; +$lng['table_cleanout']='Wszystkie słowa zostały usunięte.
    Powrót do cenzury słów'; +$lng['edit']='Edytuj'; +$lng['file_name']='Nazwa pliku'; +$lng['word_name']='Słowo'; +$lng['no_words']='Cenzura słów jest pusta'; +$lng['word_deleted']='Słowo zostało usunięte.
    Powrót do cenzury słów.'; +$lng['word_edited']='Słowo zostało wyedytowane.
    Powrót do cenzury słów.'; +$lng['edit_word']='Edytuj słowo'; +// +//on banlist... ------------------------------------------------------------ +// +$lng['motive']='Powód'; +$lng['banlist_add_user']='Zabanuj Użytkownika'; +$lng['banlist_add_ip']='Zabanuj IP'; +$lng['banlist_add_all']='Zabanuj Użytkownika i IP'; +$lng['banlist_add_from_file']='Zabanuj IP z pliku *.txt'; +$lng['ban_deleted']='BAN został ściągnięty.
    Powrót do banlisty'; +$lng['ban_edited']='BAN został wyedytowany.
    Powrót do banlisty'; +$lng['ban_added']='BAN został dodany.
    Powrót do banlisty'; +$lng['banlist_no_items']='Banlista jest pusta'; +$lng['banlist_clean']='Wyczyść Banlistę'; +$lng['banlist_cleanout']='Wszystkie BANy zostały usunięte.
    Powrót do banlisty'; +$lng['banlist_info_1']='Jeżeli pole pozostawisz puste to nikt nie zostanie zbanowany po ID'; +$lng['banlist_info_2']='Jeżeli wpiszesz 0.0.0.0 to nikt nie zostanie zbanowany po IP'; +$lng['banlist_info_3']='IP w pliku oddzielaj klawiszem ENTER, nie używaj spacji!'; +$lng['banlist_edit_ban']='Edytuj bana'; +$lng['banlist_user_id']='Nr. ID użytkownika'; +$lng['no_ban_me']='Nie możesz zbanować samego siebie!'; +$lng['no_ban_admin']='Nie możesz zbanować administratora!'; +// +//on admin styles...--------------------------------------------------------- +// +$lng['admin_styles']='Zarządzaj stylami'; +$lng['install']='Instaluj'; +$lng['skins_added']='Styl został dodany.
    Powrót do administracji stylami.'; +$lng['skins_deleted']='Styl został usunięty.
    Powrót do administracji stylami.'; +$lng['invalid_skin']='Nieprawidłowa nazwa stylu.
    Powrót do administracji stylami.'; +$lng['styles_info_1']='Nie możesz kasować domyślnego stylu forum!'; +$lng['new_skin']='Nazwa nowego stylu'; +$lng['actual_skins']='Obecnie zainstalowane style'; +// +//on admin smiles...--------------------------------------------------------- +// +$lng['no_smile']='Emotikon nie istnieje!'; +$lng['smilelist_add']='Dodaj emotikon'; +$lng['smilelist_add_from_file']='Dodaj emotikony z pliku *.dsfpak'; +$lng['smilelist_edit']='Edytuj emotikonę'; +$lng['smilelist_clean']='Wyczyść listę emotikonów'; +$lng['smilelist_cleanout']='Wszystkie uśmieszki zostały usunięte.
    Powrót do administracji emotikonami'; +$lng['smile_added']='Emotikon został dodany.
    Powrót do administracji emotikonami'; +$lng['smiles_added']='Emotikony zostały dodane.
    Powrót do administracji emotikonami'; +$lng['smile_edited']='Emotikon został wyedytowany.
    Powrót do administracji emotikonami'; +$lng['smile_deleted']='Emotikon został usnięty.
    Powrót do administracji emotikonami'; +$lng['smilelist_no_items']='Lista emotikonów jest pusta'; +$lng['url']='Adres'; +$lng['smile']='Emotikon'; +$lng['smilelist_info_1']='Emotikony umieszczaj w formie: "emotka :: adres" oddzielając
    każdą linijkę enterem, bez spacji!'; +?> diff --git a/lngs/Polish/email.php b/lngs/Polish/email.php new file mode 100644 index 0000000..39ee98f --- /dev/null +++ b/lngs/Polish/email.php @@ -0,0 +1,43 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +//register message :] +$lng['email_welcome']='Witamy na forum'; +$lng['email_sent_forget_pass']='Twoje zapomniane hasło'; +$lng['email_register_msg']=' +Witamy na forum %forum%!
    +Zarejestrowałeś się na forum: %url_f% z IP: %ip%.
    +Miło nam Cię gościć, oto Twoje dane dotyczące logowania:
    +Login: %login%
    +Hasło: %pass%
    +Zapamiętaj te dane do logowania na forum(obecna wersja nie pozwala odzyskać hasła!).
    +Pamiętaj o przestrzeganiu regulaminu forum oraz +NETYKIETY
    -----------
    +Pozdrawiamy, administracja forum.
    '; +//send new passwd +$lng['email_newpasswd_msg']=' +Witamy na forum %forum%!
    +Otrzymałeś tego emaila, ponieważ poprosiłeś o nowe hasło do profilu na forum: %url_f% z IP: %ip%.
    +Oto Twoje obecne hasło i login (dane dotyczące logowania):
    +Login: %login%
    +Hasło: %pass%
    +Zapamiętaj te dane do logowania na forum.
    +
    -----------
    +Pozdrawiamy, administracja forum.
    '; +//account deleted :| +$lng['email_delete_msg']='Wiadomość z %forum%
    +Twoje konto zostało usunięte. Jeżeli chcesz dowiedzieć się więcej, skontaktuj się +z administracją forum.
    -----------
    +Pozdrawiamy, administracja forum.
    '; +//ban :D +$lng['email_ban_msg']='Wiadomość z %forum%
    +Twoje konto zostało zablokowane dożywotnio. Jeżeli chcesz dowiedzieć się więcej, + skontaktuj się z administracją forum.
    -----------
    +Pozdrawiamy, administracja forum.
    '; +?> diff --git a/lngs/Polish/index.html b/lngs/Polish/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/lngs/Polish/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/lngs/Polish/install.php b/lngs/Polish/install.php new file mode 100644 index 0000000..09fe5e9 --- /dev/null +++ b/lngs/Polish/install.php @@ -0,0 +1,58 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +$lng['install_header']='Instalator skryptu µForum'; +$lng['licence']='Licencja'; +$lng['accept_licence']='Akceptuję warunki licencji'; +$lng['catalog']='Katalog'; +$lng['is_writable']='Jest do zapisu'; +$lng['not_writable']='Nie jest do zapisu.'; +$lng['php_version']='Wersja PHP'; +$lng['next_page']='Następny krok'; +$lng['click_next']='Jeżeli sam edytowałeś pliki, lub wiesz, co robisz - kliknij tutaj, aby kontynuować.'; +$lng['files_is_good']='Wszystkie pliki są poprawne!'; +$lng['files_not_good']='Nie wszystkie pliki są poprawne!'; +$lng['invalid_md5_sum']='Nieprawidłowa wielkość pliku!'; +$lng['original_sum']='Prawidłowa suma'; +$lng['actual_sum']='Aktualna suma'; +$lng['name']='Nazwa'; +$lng['value']='Wartość'; +$lng['no_next_page']='Popraw wszystkie błędy, aby przejść dalej.'; +$lng['mysql_host']='Adres bazy danych(domyślnie localhost)'; +$lng['mysql_user']='Użytkownik bazy'; +$lng['mysql_pass']='Hasło do bazy'; +$lng['db_name']='Nazwa bazy danych'; +$lng['mysql_prefix']='Prefiks dla tabel'; +$lng['install_complete']='Instalacja zakończona sukcesem.
    Zaraz zostaniesz przeniesiony do konfiguracji konta administratora'; +$lng['admin_name']='Nazwa administratora'; +$lng['admin_pass']='Hasło'; +$lng['retype_pass']='Powtórz hasło'; +$lng['admin_email']='Adres email'; +$lng['install_error_1']='Uzupełnij wszystkie pola'; +$lng['start_install']='Rozpocznij instalację'; +$lng['mysql_version']='Wersja MySQL'; +$lng['user_name']='Nazwa użytkownika'; +$lng['password']='Hasło'; +$lng['retype_password']='Powtórz hasło'; +$lng['email']='Adres email'; +$lng['save']='Zapisz'; +$lng['invalid_md5sum']='Nieprawidłowa suma kontrolna!'; +$lng['invalid_email']='Podałeś nieprawidłowy email!'; +$lng['info_1']='Zaraz zostaniesz przeniesiony do krótkiej konfiguracji skryptu'; +$lng['info_2']='Dziękujemy za wybranie µForum do obsługi Twojego forum! +Dołożymy wszelkich starań,
    aby skrypt był bezpieczny. Wszelkie aktualizacje +znajdziesz na stronie internetowej:
    PioDer Website
    Miłego dnia!'; +$lng['name_forum']='Nazwa Twojego Forum'; +$lng['no_lang']='Nie podałeś domyślnego języka!'; +$lng['no_path']='Nieprawidłowo zapisana ścieżka forum!'; +$lng['invalid_forum_name']='Nazwa dla forum musi być dłuższa niż dłuższa niż 3 znaki i nie dłuższa niż 30.'; +$lng['forum_config_modernized']='Konfiguracja forum została zmianiona.
    Powrót do konfiguracji skryptu.'; +$lng['invalid_passwords']='Hasła nie pasują do siebie!'; +?> diff --git a/lngs/Polish/main.php b/lngs/Polish/main.php new file mode 100644 index 0000000..b576068 --- /dev/null +++ b/lngs/Polish/main.php @@ -0,0 +1,251 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +include('./lngs/Polish/wysiwyg.php'); +//on header....------------------------------------------------------ +// +$lng['forumname']='Nazwa Forum'; +$lng['lastpost']='Ostatni Post'; +$lng['lusers']='Użytkownicy'; +$lng['lgroups']='Grupy'; +$lng['leprofile']='Edytuj Profil'; +$lng['lpm']='Prywatne Wiadomości'; +$lng['lregister']='Rejestracja'; +$lng['lsearch']='Wyszukiwarka'; +$lng['llogin']='Zaloguj'; +$lng['lunlogin']='Wyloguj'; +$lng['mainpage']='Strona Główna'; +$lng['llog_in']='Zaloguj'; +$lng['no_send_newpass']='Funkcja Wysyłania Emaili wyłączona. Aby odzyskać konto skontaktuj się z Administratorem Forum'; +// +//on search....--------------------------------------------------------- +// +$lng['insert_keywords']='Tu wpisz słowa wyszukiwania'; +$lng['view_user_topics']='Pokaż tematy użytkownika'; +$lng['search']='Szukaj'; +$lng['search_results']='Wyniki wyszukiwania'; +// +//on index....--------------------------------------------------------- +// +$lng['posts'] ='Postów'; +$lng['by'] = 'przez: '; +$lng['nopost'] = 'Brak postów'; +$lng['statistics']='Statystyki'; +$lng['showlastposts']='Pokaż ostatnie posty'; +$lng['forum_counter']='Forum odwiedzono %x% razy.'; +$lng['total_posts']='Nasi użytkownicy napisali %x% postów'; +$lng['reg_users']='Na forum jest zarejestrowanych %x% użytkowników'; +$lng['users_groups']='Grupy użytkowników: AdministratorModerator • Użytkownik'; +$lng['youareloggedas']='Jesteś zalogowany jako'; +$lng['youarenotlogd']='Nie jesteś zalogowany'; +$lng['last_user']='Ostatnio zarejestrował się'; +$lng['user']='Użytkownik'; +$lng['lactualtime']='Obecny czas to'; +$lng['sort_desc']='Do dołu'; +$lng['logged_users']='To forum przegląda %x% zalogowanych użytkowników (lista)'; +$lng['topic'] = 'Temat'; +$lng['sort_normal']='Do góry'; +// +//on profile....------------------------------------------------------- +// +$lng['lforgot_pass2']='Odzyskaj hasło'; +$lng['lforgot_pass']='Zapomniałeś hasła?'; +$lng['allow']='Włącz'; +$lng['allow_shoutbox']='Pokaż ShoutBox'; +$lng['select_value']='Wybierz wartość'; +$lng['limit_users']='Użytkowników na stronę'; +$lng['limit_posts']='Postów na stronę'; +$lng['limit_topics']='Tematów na stronę'; +$lng['avatar_file']='Wyślij avatar z komputera'; +$lng['user_info']='Informacje o użytkowniku'; +$lng['stat']= 'Status'; +$lng['invalid_lang']='Wybierz język!'; +$lng['invalid_email']='Adres Email jest nieprawidłowy!'; +$lng['invalid_skin']='Wybierz styl forum!'; +$lng['default_lang']='Domyślny język'; +$lng['select_lang']='Wybierz język'; +$lng['default_skin']='Domyślny styl'; +$lng['default_skin']='Domyślny Styl forum'; +$lng['select_skin']='Wybierz styl'; +$lng['default_skin']='Domyślny styl'; +$lng['lurank']='Poziom'; +$lng['showprofile']='Pokaż Profil'; +$lng['avatar']='Avatar'; +$lng['luregister']='Zarejestrowany'; +$lng['lulastvisit']='Ostatnia wizyta'; +$lng['luinterests']='Zainteresowania'; +$lng['user_name']='Nazwa użytkownika'; +$lng['profile_settings']='Ustawienia profilu'; +$lng['general_settings']='Ustawienia ogólne'; +$lng['signature_settings']='Ustawienia podpisu'; +$lng['avatar_settings']='Ustawienia Avatara'; +$lng['allow_gg']='Pokaż moje GG'; +$lng['allow_email']='Pokaż mój e-mail'; +$lng['allow_qr']='Pokaż szybką odpowiedź'; +$lng['picture_adress']='Adres do obrazka'; +$lng['serve_email']='Podaj e-mail'; +$lng['new_password']='Nowe hasło'; +$lng['confirm_password']='Powtórz hasło'; +$lng['gg_number']='Numer Gadu-Gadu'; +$lng['date_of_registration']='Data dołączenia'; +$lng['witch_all_post_forum']='z całej liczby forum.'; +$lng['sig']='Podpis'; +$lng['lastpost']='Ostatni post'; +$lng['contact']='Kontakt'; +$lng['lurank2']='Ranga'; +$lng['lmod']='Moderacja'; +$lng['addusrtogrp']='Dodaj użytkownika(nick)'; +$lng['delusrforgrp']='Usuń z grupy(nick)'; +$lng['empty_password']='Hasło jest puste!'; +$lng['key_not_valid']='Nieprawidłowy wynik dodawania!'; +// +//moderate... ------------------------------------------------------- +// +$lng['ban']='Zabanuj użytkownika'; +$lng['edit_profile']='Edytuj profil'; +$lng['admin_mod_administration']='Pole Admina/Mod\'a'; +// +//other...------------------------------------------------------------ +// +$lng['yesterday']='Wczoraj'; +$lng['today']='Dzisiaj'; +$lng['message_forum']='Komunikat Forum'; +$lng['page']='Strona'; +$lng['with']='z'; +$lng['admin']='Administrator'; +$lng['mod']='Moderator'; +$lng['move_topic']='Panel Moderacji :: Przesuń temat'; +$lng['showtopic']='Pokaż Temat'; +$lng['showforum']='Pokaż Forum'; +$lng['showgroup']='Pokaż Grupę'; +$lng['author']='Autor'; +$lng['info']='Komunikat Forum'; +$lng['islogout']='Zostałeś wylogowany'; +$lng['lpassw'] = 'Hasło'; +$lng['lgo']='Wykonaj'; +$lng['yes']='Tak'; +$lng['never']='Nigdy'; +$lng['no.']='nr'; +$lng['desc']='Rosnąco'; +$lng['script_generated']='Skrypt został wykonany w '; +$lng['no']='Nie'; +$lng['pa_link']='Administruj forum'; +$lng['select_forum']='Wybierz forum'; +$lng['empty']='Brak'; +$lng['sticky']='Przyklejony: '; +$lng['visible_of_post']='Kliknij tutaj, aby zatwierdzić post'; +$lng['post_moderated']='Ten post nie został jeszcze zatwierdzony u moderatora'; +$lng['moderated_post_text']='Treść nie zatwierdzonego postu'; +// +//on private messages.....-------------------------------------------- +// +$lng['write_pm'] = 'Napisz Prywatną wiadomość'; +$lng['pm_messages']='Prywatnych Wiadomości'; +$lng['inbox']='Skrzynka odbiorcza'; +$lng['sentbox']='Elementy wysłane'; +$lng['content_message']='Treśc Wiadomości'; +$lng['show_message']='Pokaż wiadomość'; +$lng['message_name']='Nazwa wiadomości'; +$lng['regdate2']='Dołączył'; +$lng['date']='Data'; +$lng['postinfo']='Info postu'; +// +//on format text....--------------------------------------------------- +// +$lng['editpost']='Edytuj Post'; +$lng['quote']='Cytuj'; +$lng['quote2']='Cytat'; +$lng['answer']='Odpowiedz w'; +$lng['smiles']='Emotikony'; +$lng['message']='Wiadomość (dodatkowo. dostępne tagi [code] i [quote])'; +$lng['save']='Zapisz'; +$lng['reset']='Wyczyść'; +$lng['writetopic']='Napisz temat'; +$lng['sort_u_by']='Sortuj użytkowników według'; +$lng['you_re']='Masz'; +$lng['seconds']='sekund'; +$lng['ltopicname']='Nazwa tematu'; +$lng['msgname']='Nazwa wiadomości'; +$lng['sticky_topic']='Przyklej temat'; +// +//on warnings...-------------------------------------------------------------- +// +$lng['show_warns']='Pokaż ostrzeżenia'; +$lng['motive']='Powód'; +$lng['value']='Wartość'; +$lng['all_warns']='Całkowity poziom ostrzeżeń'; +$lng['add_warn']='Dodaj ostrzeżenie'; +$lng['warn']='Ostrzeżenie'; +$lng['warns']='Ostrzeżeń'; +$lng['add']='Dodaj'; +$lng['delete']='Odejmij'; +$lng['warns_ban']='Zostałeś zbanowany, ponieważ Twój poziom ostrzeżeń wynosi 100%.'; +// +//messages...----------------------------------------------------------------- +// +$lng['signature_too_long']='Podpis jest za długi!'; +$lng['no_limit_tpid']='Nie podałeś limitu postów!'; +$lng['no_limit_ftid']='Nie podałeś limitu tematów!'; +$lng['no_limit_users']='Nie podałeś limitu użytkowników!'; +$lng['post_accepted']='Post został zaakceptowany.
    Powrót do tematu.'; +$lng['pass_changed']='Twóje hasło został zmienione. Poczekaj na emaila z danymi.'; +$lng['antiflood_enabled']= (isset($_COOKIE['antiflood_time'])) ? 'Blokada antifloodowa włączona. Odczekaj do '.date('d-m-Y, G:i',$_COOKIE['antiflood_time']).', aby wysłać temat/post' : ''; +$lng['c_delete_post']='Czy napewno chcesz skasować post?'; +$lng['c_delete_topic']='Czy napewno chcesz skasować temat?'; +$lng['c_delete_pm']='Czy napewno chcesz skasować prywatną wiadomość?'; +$lng['warns_disabled']='System ostrzeżeń wyłączony.'; +$lng['topic_moved']='Temat został przeniesiony.
    Powrót na forum.'; +$lng['youareexist']='Jesteś już zarejestrowany na forum!'; +$lng['account_disabled']='Twoje konto jest nieaktywne.
    Zostałeś wylogowany.'; +$lng['useraddedtogroup']='Użytkownik został dodany do grupy.
    Powrót na forum.'; +$lng['userdeletedforgroup']='Użytkownik został usunięty z grupy.
    Powrót na forum.'; +$lng['no_elements']='Brak elementów w tym folderze'; +$lng['werror_1']='Nieprawidłowa wartość ostrzeżenia!'; +$lng['invalidlogin']='Nieprawidłowy login'; +$lng['invalidpass']='Nieprawidłowe hasło'; +$lng['invalidpage']='Strona nie istnieje!'; +$lng['invalidmode']='Nieprawidłowa opcja pliku'; +$lng['no_group']='Grupa nie istnieje!
    Powrót do strony głównej grup.'; +$lng['message_sent']='Twoja wiadomość została wysłana
    Powrót na forum
    '; +$lng['perror_2']='Nie jesteś autorem tego postu albo moderatorem'; +$lng['empty password']='Podaj Hasło!'; +$lng['empty email']='Podaj Email!'; +$lng['warn_is_added']='Ostrzeżenie zostało dodane.
    Powrót na forum.'; +$lng['merror_1']='Nie jesteś autorem tej wiadomości.'; +$lng['merror_2']='Nie jesteś odbiorcą tej wiadomości.'; +$lng['no_message']='Wiadomość nie istnienie!'; +$lng['no_posting_topic_locked']='Nie masz prawa do pisania wiadomości w tym temacie.
    Temat jest zablokowany.'; +$lng['no_posting_forum_locked']='Nie masz prawa do pisania wiadomości w tym forum.
    Forum jest zablokowane.'; +$lng['pm_is_deleted']='Prywatna wiadomość została skasowana.
    Powrót do Prywatnych Wiadomości'; +$lng['profile_modernized']='Twój profil został zaktualizowany.
    Powrót na forum.
    '; +$lng['incorrect_password']='Nieprawidłowe obecne hasło!'; +$lng['incorrect_password2']='Hasła nie pasują do siebie!'; +$lng['user_is_exist']='Użytkownik o tej nazwie już istnieje'; +$lng['account_created']='Twoje konto zostało utworzone. Możesz się zalogować.'; +$lng['post_is_saved']='Twoja wiadomość została zapisana.
    Powrót na forum.'; +$lng['perror_1']='Nie wszystkie pola formularza zostały wypełnione bądź wiadomość jest krótsza niż 10 znaków!'; +$lng['no_forum']='Forum nie istnieje.'; +$lng['no_user']='Użytkownik nie istnieje.'; +$lng['no_topic']='Temat nie istnieje.'; +$lng['tlocked']='Temat został zablokowany'; +$lng['tunlocked']='Temat został odblokowany.'; +$lng['pdeleted']='Post został usunięty.'; +$lng['tdeleted']='Temat został usunięty.'; +$lng['is_no_mod']='Nie masz uprawnień moderatora.'; +$lng['no_groups']='Żadna grupa nie istnieje'; +$lng['tstuck']='Temat został przyklejony.'; +$lng['tunstuck']='Temat został odklejony.'; +$lng['too_short_keywords']='Poszukiwany ciąg znaków jest za krótki!'; +//shoutbox +$lng['insert_msg']='Wpisz wiadomość'; +//user agent +$lng['system']='System:'; +$lng['browser']='Przeglądarka:'; +$lng['unknown']='Nieznany(a)'; +?> diff --git a/lngs/Polish/quick_reply.php b/lngs/Polish/quick_reply.php new file mode 100644 index 0000000..a8b86b5 --- /dev/null +++ b/lngs/Polish/quick_reply.php @@ -0,0 +1,15 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +$lng['title']='Szybka Odpowiedź'; +$lng['message']='Wiadomość'; +$lng['save']='Zapisz'; +$lng['reset']='Wyczyść'; +$lng['message']='Wiadomość (dodatkowo. dostępne tagi [code] i [quote])'; +?> diff --git a/lngs/Polish/wysiwyg.php b/lngs/Polish/wysiwyg.php new file mode 100644 index 0000000..e75df53 --- /dev/null +++ b/lngs/Polish/wysiwyg.php @@ -0,0 +1,19 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +$lng['function_disabled_html_mode']='Funkcja niedostępna w trybie HTML'; +$lng['lang_titles_1']=' +var buttonNameLng = new Array("Czcionka","Nagłówki","separator","Pogrubienie","Pochyła","Podkreślenie","Przekreślenie","separator","Wytnij","Skopiuj","Wklej","separator","Indeks dolny","Indeks górny","separator","Wyrównanie w lewo","Wyśrodkuj","Wyrównanie w prawo","Wyjustowanie","Wcięcie","Usuń wcięcie","separator","Wstaw punktory","Wstaw numerację","separator","Adres","Wstaw obrazek","separator","Cofnij","Powtórz");'; +$lng['lang_titles_2']=' +var buttonName2Lng = new Array("Specjalny znak","sepatator","Kolor czcionki","Kolor podkreślenia","separator","Pozioma linia","separator","Usuń formatowanie","separator","Małe na duże","Duże na małe","separator","tryb HTML","separator");'."\n"; +$lng['url_addr']='Proszę wpisać adres odnośnika:'; +$lng['url_title']='Proszę wpisać tytuł odnośnika:'; +$lng['img_url']='Proszę podać adres do obrazka:'; +$lng['enter_informations']='Proszę podać wszystkie informacje!'; +?> diff --git a/lngs/index.html b/lngs/index.html new file mode 100644 index 0000000..c2733fd --- /dev/null +++ b/lngs/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/login.php b/login.php new file mode 100644 index 0000000..fc65650 --- /dev/null +++ b/login.php @@ -0,0 +1,189 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_email.php'); +include('./includes/class_overall.php'); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +include('./lngs/'.$default_lang.'/email.php'); +include('./includes/classes/secure.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +if (isset($_GET['mode'])) +{ + switch($_GET['mode']) + { + case 'logout': + { + if ($_SESSION['uid']==0) + { + header('Location: index.php'); + } + $uid = $_SESSION['uid']; + $_SESSION['uid']=0; + $_SESSION['sessionid']='0'; + sess_delete($uid); + $stop = Over::TimeGeneration(); + message_forum($lng['islogout'], 'index.php'); + break; + } + case 'login': + { + $default_skin = Over::ViewSkinName(); + if ($_SESSION['uid']>0) + { + header('Location: index.php'); + } + if (isset($_POST['user'])) + { + $user = strip_tags(addslashes($_POST['user'])); + $pass = md5(strip_tags($_POST['pass'])); + $sql = "SELECT `u_id`, `nick`, `pass` FROM `".USERS_TABLE."` WHERE nick='$user'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user inforamtion'); + $result = @mysql_fetch_array($query); + $nick = $result['nick']; + if ($result['nick']==$user) + { + if ($result['u_id']!='-1') + { + if($pass==$result['pass']) + { + $user_id = $result['u_id']; + $sql = "DELETE FROM `".SESSIONS_TABLE."` WHERE `u_id`='$user_id'"; + DataBase::sql_query($sql,'GENERAL','Could not delete session.'); + if (User::UserInformation($user_id,'active')==0) + { + sess_delete($_SESSION['uid']); + $_SESSION['uid']='0'; + message_forum($lng['account_disabled'],'index.php'); + } + $ssid = md5(time().'donothackthiscriptplease!');//session identifier + $_SESSION['uid']=$user_id; + $_SESSION['sessionid']=$ssid; + //session register + $sql = "INSERT INTO `".SESSIONS_TABLE."` VALUES ('', '".$_COOKIE[SESS_NAME]."','$user_id','".time()."')";//query + DataBase::sql_query($sql,'GENERAL','Could not add new session.');//run query + //next... + $sql = "UPDATE `".USERS_TABLE."` SET lastvisit='".time()."' WHERE u_id='$user_id'";//update lastvisit for user + DataBase::sql_query($sql,'GENERAL','Could not update user lastvisit');//run query + $msg = $lng['youareloggedas'].': '.$nick.'';// messaage "login as.." + $skin['pa_link']=''; + $stop = Over::TimeGeneration();//generate generation's time + message_forum($msg, 'index.php');//message and require to index.php + } + else + { + $msg = '
    '.$lng['invalidpass'].'
    '; + } + } + else + { + message_forum('Access denied.','index.php'); + } + } + else + { + $msg = '
    '.$lng['invalidlogin'].'
    '; + } + } + else + { + $msg = ''; + $_POST['user']=''; + } + $skin = array( + 'lforumname' => $lng['forumname'], + 'user' => $lng['user'], + 'lpass' => $lng['lpassw'], + 'lforgotpass' => $lng['lforgot_pass'], + 'llog_in'=> $lng['llog_in'], + 'msg' => $msg + ); + $skin = array_push_associative($skin, Over::generate_header($lng['llogin'],'> '.$lng['llogin'])); + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/login_body.tpl'); + $skin['pa_link']=''; + $stop = Over::TimeGeneration(); + $skin['queries'] = Over::ShowQueries($start, $stop); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + case 'forgotpassword': + { + if ($_SESSION['uid']>0) + { + header('Location: index.php'); + } + $default_skin = Over::ViewSkinName(); + if (!$forum_config['allow_send_email']) + { + message_forum($lng['no_send_newpass'],'index.php'); + } + if (isset($_POST['username'])) + { + $uid = User::UserIdByNick(htmlspecialchars($_POST['username'])); + if (User::UserInformation($uid,'email')!='') + { + $int_rand = rand(1, (strlen(PASSWD_HASH)-$forum_config['newpasswd_len'])); + $newpass = substr(PASSWD_HASH, $int_rand, $forum_config['newpasswd_len']); + User::UpdatePassword($uid, md5($newpass)); + Email::SendForgotPassEmail($newpass); + message_forum($lng['pass_changed'],'index.php'); + } + else + { + message_forum($lng['no_user'],$_SERVER['REQUEST_URI']); + } + } + $skin = array( + 'user' => $lng['user'], + 'lsave' => $lng['save'], + 'pa_link'=>'' + ); + $skin = array_push_associative($skin, Over::generate_header($lng['lforgot_pass2'], '> '.$lng['lforgot_pass2'])); + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/newpass_body.tpl'); + $stop = Over::TimeGeneration(); + $skin['queries'] = Over::ShowQueries($start, $stop); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + default: + { + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'], 'index.php'); + } + } +} +else +{ + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'], 'index.php'); +} +?> diff --git a/moderate.php b/moderate.php new file mode 100644 index 0000000..41511ad --- /dev/null +++ b/moderate.php @@ -0,0 +1,171 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/classes/secure.php'); +include('./includes/class_mod.php'); +include('./includes/class_forum.php'); +include('./includes/class_topic.php'); +include('./lngs/'.Over::DefaultLang().'/main.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if ($_SESSION['uid']>0) +{ + if (RANK==0) + { + $stop = Over::TimeGeneration(); + message_forum($lng['is_no_mod'],'index.php'); + } +} +else +{ + message_forum($lng['youarenotlogd'],'login.php?mode=login'); +} +switch(trim($_GET['action'])) +{ + case 'delete': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + $fid = Topic::TopicInformation($tid,'f_id'); + Mod::DeleteTopic($tid); + $stop = Over::TimeGeneration(); + message_forum($lng['tdeleted'], 'forum.php?f='.$fid); + break; + } + case 'lock': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + Mod::LockTopic($tid); + $stop = Over::TimeGeneration(); + message_forum($lng['tlocked'], 'topic.php?t='.$tid); + break; + } + case 'unlock': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + Mod::UnlockTopic($tid); + $stop = Over::TimeGeneration(); + message_forum($lng['tunlocked'], 'topic.php?t='.$tid); + break; + } + case 'postdelete': + { + $pid = intval($_GET['id']); + Secure::post_exists($pid); + $tid = Topic::PostInformation($pid,'t_id'); + $tpid = Topic::PostInformation($pid,'tp_id'); + if ($tpid >1) + { + Mod::DeletePost($pid); + } + $stop = Over::TimeGeneration(); + message_forum($lng['pdeleted'],'topic.php?t='.$tid); + break; + } + case 'stick': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + Mod::StickTopic($tid,'1'); + $stop = Over::TimeGeneration(); + message_forum($lng['tstuck'], 'topic.php?t='.$tid); + break; + } + case 'unstick': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + Mod::StickTopic($tid,'0'); + $stop = Over::TimeGeneration(); + message_forum($lng['tunstuck'], 'topic.php?t='.$tid); + break; + } + case 'move': + { + $tid = intval($_GET['id']); + Secure::topic_exists($tid); + if (isset($_POST['forum_id'])) + { + $fid = $_POST['forum_id']; + Mod::MoveTopic($tid,$fid); + message_forum($lng['topic_moved'],'topic.php?t='.$tid); + } + else + { + $start = Over::TimeGeneration(); + $default_skin = Over::ViewSkinName(); + //add skin variables + $skin = array( + 't' => $tid, + 'L.select_forum' => $lng['select_forum'], + 'L.save' => $lng['save'], + 'L.reset' => $lng['reset'], + 'OPTIONS.select_forum' => Forum::AddForums($tid) + ); + $skin = array_push_associative($skin, Over::generate_header($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'),'' + .$lng['move_topic'].': ' + .Topic::TopicInformation($tid,'name'))); + if ($_SESSION['uid']>0) + { + if(RANK=='2') + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } + } + else + { + $skin['pa_link']=''; + } + $stop = Over::TimeGeneration(); + $skin['queries'] = Over::ShowQueries($start, $stop); + //do it! + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/move_topic_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + } + break; + } + case 'accept': + { + $pid = intval($_GET['id']); + Secure::post_exists($pid); + Mod::AcceptPost($pid); + $stop = Over::TimeGeneration(); + $tid = Topic::PostInformation($pid,'t_id'); + message_forum($lng['post_accepted'], 'topic.php?t='.$tid); + break; + } + default: + { + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'],'index.php'); + break; + } +} +?> diff --git a/pms.php b/pms.php new file mode 100644 index 0000000..3b4fcc4 --- /dev/null +++ b/pms.php @@ -0,0 +1,84 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/classes/class_pms.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_posting.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +include('./lngs/'.Over::DefaultLang().'/main.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +if ($_SESSION['uid']<1) +{ + $stop = Over::TimeGeneration(); + message_forum($lng['youarenotlogd'],'login.php?mode=login'); +} +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +$uid = $_SESSION['uid']; +$default_skin = Over::ViewSkinName(); +if (isset($_GET['mode'])) +{ + switch($_GET['mode']) + { + case 'folder': + { + include ('./includes/pms/pms_folder.php'); + break; + } + //delete message + case 'delete': + { + include ('./includes/pms/pms_delete.php'); + break; + } + case 'view': + { + include ('./includes/pms/pms_view.php'); + break; + } + //write message + case 'write': + { + include ('./includes/pms/pms_write.php'); + break; + } + default: + { + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'],'index.php'); + break; + } + } +} +else +{ + header('Location: pms.php?mode=folder&submode=inbox'); +} +?> diff --git a/posting.php b/posting.php new file mode 100644 index 0000000..46bd542 --- /dev/null +++ b/posting.php @@ -0,0 +1,330 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_posting.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +include('./lngs/'.Over::DefaultLang().'/main.php'); +$start = Over::TimeGeneration(); +$default_skin = Over::ViewSkinName(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$msg=''; +if ($_SESSION['uid']<1) +{ + message_forum($lng['youarenotlogd'],'login.php?mode=login'); +} +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +$start = Over::TimeGeneration(); +//add skin variables +$skin = array( +'smiles'=>Post::SmilesShow(), +//labels +'lsmiles'=>$lng['smiles'], +'ltopicname'=>$lng['ltopicname'], +'lsave'=>$lng['save'], +'lreset'=>$lng['reset'], +'lmsg'=>$lng['message'], +'lsticky_topic'=>$lng['sticky_topic'], +'lwritetopic'=>$lng['writetopic'], +); +$skin = array_push_associative($skin, Over::generate_header('','')); +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +if(RANK=='2') +{ + $skin['pa_link']=''.$lng['pa_link'].''; +} +else +{ + $skin['pa_link']=''; +} +switch(trim($_GET['mode'])) +{ + /** + * + functions for reply: normal, editing, quoting... + * + **/ + case 'qpost': //quote post + { + $msg =''; + if (isset($_POST['textedit'])) + { + if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10)) + { + if (isset($_COOKIE['antiflood_time'])) + { + if ($_COOKIE['antiflood_time']>time()) + { + message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); + } + } + else + { + setcookie('antiflood_time',(time() + $forum_config['time_antiflood'])); + } + $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); + $id = Post::NewPost(intval($_GET['t']),$_POST['textedit'], $_SESSION['uid']); + $count = ceil(($id / 15 )); + if ($count >1) + { + $page= '&page='.$count; + } + else + { + $page=''; + } + $stop = Over::TimeGeneration(); + message_forum($lng['post_is_saved'],'topic.php?t='.$_GET['t'].$page.'#'.$id); + } + else + { + $message = $lng['perror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $_POST['textedit']='[quote]'.stripslashes(Topic::PostInformation($_GET['id'],'text')).'[/quote]'; + } + Secure::topic_exists(intval($_GET['t'])); + Secure::TopicLocked(intval($_GET['t'])); + $skin['mainpage'] = $lng['quote']; + $skin['lmainpage'] = '> '.$lng['quote']; + $skin['f_id'] = $_GET['id']; + $skin['action'] = 'posting.php?mode=qpost&id='.$_GET['id'].'&t='.$_GET['t']; + if ($msg=='') + { + $msg='./skins/'.$default_skin.'/blank.tpl'; + } + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/posting_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + case 'edit': //edit post + { + if ((User::RankAdminMod($_SESSION['uid'])) or ($_SESSION['uid']==Topic::PostInformation($_GET['id'],'u_id'))) + { + $msg =''; + if (isset($_POST['textedit'])) + { + if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10)) + { + if (isset($_COOKIE['antiflood_time'])) + { + if ($_COOKIE['antiflood_time']>time()) + { + message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); + } + } + else + { + setcookie('antiflood_time',(time() + $forum_config['time_antiflood'])); + } + $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); + Post::EditPost(intval($_GET['id']),$_POST['textedit']); + $count = ceil((Topic::PostInformation(intval($_GET['id']),'tp_id') / 15 )); + if ($count >1) + { + $page= '&page='.$count; + } + else + { + $page=''; + } + $stop = Over::TimeGeneration(); + message_forum($lng['post_is_saved'],'topic.php?t='.Topic::PostInformation(intval($_GET['id']),'t_id').$page.'#p'.$_GET['id']); + } + else + { + $message = $lng['perror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $_POST['textedit']=stripslashes(Topic::PostInformation($_GET['id'],'text')); + } + } + $skin['mainpage'] = $lng['editpost']; + $skin['lmainpage'] = '> '.$lng['editpost']; + $skin['f_id'] = intval($_GET['id']); + $skin['action'] = 'posting.php?mode=edit&id='.intval($_GET['id']); + if ($msg=='') + { + $msg='./skins/'.$default_skin.'/blank.tpl'; + } + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/posting_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + + case 'rpost': //reply post + { + $msg =''; + if (isset($_POST['textedit'])) + { + if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10)) + { + if (isset($_COOKIE['antiflood'])) + { + if ($_COOKIE['antiflood_time']>time()) + { + message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); + } + } + else + { + setcookie('antiflood_time',(time() + $forum_config['time_antiflood'])); + } + $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); + $id = Post::NewPost(intval($_GET['id']),$_POST['textedit'], $_SESSION['uid']); + $count =ceil(($id / 15 )); + if ($count >1) + { + $page= '&page='.$count; + } + else + { + $page=''; + } + $stop = Over::TimeGeneration(); + message_forum($lng['post_is_saved'],'topic.php?t='.$_GET['id'].$page.'#p'.$id); + } + else + { + $message = $lng['perror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $_POST['textedit']=''; + } + Secure::topic_exists(intval($_GET['id'])); + Secure::TopicLocked(intval($_GET['id'])); + $skin['mainpage'] = $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'); + $skin['lmainpage'] = '> '.$lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'); + $skin['f_id'] = $_GET['id']; + $skin['action'] = 'posting.php?mode=rpost&id='.$_GET['id']; + if ($msg=='') + { + $msg='./skins/'.$default_skin.'/blank.tpl'; + } + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/posting_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + /** + * + Select new TOPIC + * + **/ + case 'ntopic': //new topic + { + $msg =''; + if ((isset($_POST['textedit'])) and (isset($_POST['ntopic']))) + { + if (($_POST['textedit'] !='' ) and ($_POST['ntopic']!='') and (strlen(trim($_POST['textedit']))>10) and (strlen(trim($_POST['ntopic']))>5)) + { + $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); + if (isset($_COOKIE['antiflood_time'])) + { + if ($_COOKIE['antiflood_time']>time()) + { + message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); + } + } + else + { + setcookie('antiflood_time',(time() + $forum_config['time_antiflood'])); + } + $_POST['ntopic'] = strip_tags(addslashes($_POST['ntopic'])); + if (isset($_POST['topic_sticky'])) + { + $_POST['topic_sticky']='1'; + } + else + { + $_POST['topic_sticky']='0'; + } + $last = Post::NewTopic($_POST['textedit'],$_POST['ntopic'], intval($_GET['f']), $_SESSION['uid'], $_POST['topic_sticky']); + $stop = Over::TimeGeneration(); + message_forum($lng['post_is_saved'],'topic.php?t='.$last); + } + else + { + $message = $lng['perror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $_POST['ntopic'] = ''; + $_POST['textedit']=''; + } + $sql = "SELECT `lock`, `name`, `f_id` FROM ".FORUMS_TABLE." WHERE `f_id`='".intval($_GET['f'])."'"; + $forum = mysql_fetch_array(DataBase::sql_query($sql, 'GENERAL', 'Could not obtain forum information')); + if($forum['name']=='') + { + message_forum($lng['no_forum'], 'index.php'); + } + if($forum['lock']=='1') + { + message_forum($lng['no_posting_forum_locked'],'index.php'); + } + $skin['mainpage'] = $lng['writetopic']; + $skin['action'] = $_SERVER['REQUEST_URI']; + $skin['lmainpage'] = '> '.$forum['name'].' >'.$lng['writetopic']; + $skin['f_id']=$_GET['f']; + if ($msg=='') + { + $msg='./skins/'.$default_skin.'/blank.tpl'; + } + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/posting_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + // if no mode... :D + default: + { + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'],'index.php'); + break; + } +} diff --git a/quick_reply.php b/quick_reply.php new file mode 100644 index 0000000..bbcead3 --- /dev/null +++ b/quick_reply.php @@ -0,0 +1,32 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +if ( !defined('IN_uF') ) +{ + die('Hacking attempt'); +} +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +include('./lngs/'.$default_lang.'/quick_reply.php'); +include('./includes/class_posting.php'); +$skin = array( +'ltitle'=>$lng['title'], +'lmsg'=>$lng['message'], +'lsave'=>$lng['save'], +'url'=>'posting.php?mode=rpost&id='.$_GET['t'], +'lreset'=>$lng['reset'], +'smiles'=>Post::SmilesShow() +); +include('./skins/'.$default_skin.'/quick_reply_body.tpl'); +?> diff --git a/register.php b/register.php new file mode 100644 index 0000000..33e8c87 --- /dev/null +++ b/register.php @@ -0,0 +1,161 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_posting.php'); +include('./includes/class_topic.php'); +include('./includes/class_email.php'); +include('./includes/class_mod.php'); +include('./includes/classes/secure.php'); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +include('./lngs/'.$default_lang.'/email.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$default_skin = Over::ViewSkinName(); +$msg=''; +if ($_SESSION['uid']>0) +{ + message_forum($lng['youareexist'],'index.php'); +} +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +if (isset($_POST['email'])) +{ +if ( ereg ("^.+@.+\..+$", $_POST['email'])) +{ $nick = $_POST['nick']; + if ($nick!='') + { + $sql = "SELECT * FROM `".USERS_TABLE."` WHERE `nick`='$nick'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'); + $result = mysql_fetch_array($query); + $result = $result['nick']; + if ($result!=$nick) + { + if ($_POST['password']!='') + { + if ($_POST['password']==$_POST['confirmpassword']) + { + if ($_POST['valid_match']==$_POST['valid_key']) + { + $_POST['nick']= addslashes(strip_tags($_POST['nick'])); + $original_pass = $_POST['password']; + $_POST['password']=md5($_POST['password']); + User::CreateProfile($_POST['nick'],$_POST['password'], $_POST['email'],0,1,0,1,'','',''); + $stop = Over::TimeGeneration(); + if ($forum_config['allow_send_email']) + { + Email::SendRegisterEmail(); + } + message_forum($lng['account_created'],'index.php'); + } + else + { + $message = $lng['key_not_valid']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['incorrect_password2']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['empty_password']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['user_is_exist']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message=$lng['empty_email']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } +} +else +{ + $message=$lng['invalid_email']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; +} +} +else +{ + $_POST['nick']=''; + $_POST['email']=''; + $_POST['interests']=''; + $_POST['sig']=''; + $_POST['avatar']=''; +} +$match_array = Secure::generate_code(); +//add skin variables +$skin = array( +//labels profile +'lnick' => $lng['user_name'], +'lpass' => $lng['lpassw'], +'lnewpass' => $lng['new_password'], +'lcpass' => $lng['confirm_password'], +'lemail' => 'E-mail', +'lgg' => $lng['gg_number'], +'lallow_gg' => $lng['allow_gg'], +'lallow_email' => $lng['allow_email'], +'lallow_qr' => $lng['allow_qr'], +'linterests' => $lng['luinterests'], +'lsig' => $lng['sig'], +'lavaddr' => $lng['picture_adress'], +'lmatch'=> $match_array[0].' + '.$match_array[1].' = ', +'valid_key' => $match_array[2], +'lovpr' => $lng['general_settings'], +'lupr' => $lng['profile_settings'], +'lspr' => $lng['signature_settings'], +'lapr' => $lng['avatar_settings'], +'lsubmit' => $lng['save'], +'lreset' => $lng['reset'], +'no' => $lng['no'], +'yes' => $lng['yes'], +'pa_link'=>'' +); +$_POST['allow_gg']='1'; +$skin = array_push_associative($skin, Over::generate_header($lng['lregister'],'> '.$lng['lregister'])); +if ($msg=='') +{ + $msg = './skins/'.$default_skin.'/blank.tpl'; +} +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/register_body.tpl'); +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/search.php b/search.php new file mode 100644 index 0000000..5f89b60 --- /dev/null +++ b/search.php @@ -0,0 +1,255 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_topic.php'); +include('./includes/classes/secure.php'); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +$start = Over::TimeGeneration(); +$default_skin = Over::ViewSkinName(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id ORDER BY `ptime`"; +$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum'); +while($result = @mysql_fetch_array($query)) +{ + $lastpost[$result['t_id']]['tp_id']=$result['tp_id']; + $lastpost[$result['t_id']]['u_id']=$result['u_id']; + $lastpost[$result['t_id']]['time']=$result['ptime']; + $lastpost[$result['t_id']]['user_nick']=$result['nick']; + $lastpost[$result['t_id']]['user_rank']=$result['rank']; +} +$sql = "SELECT COUNT(*) as `p_id`, `t_id` FROM ".POSTS_TABLE." GROUP BY `t_id`"; +$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum'); +while($result = @mysql_fetch_array($query)) +{ + $count_topic[$result['t_id']]=$result['p_id']; +} +if (!isset($_GET['content'])) +{ + header('Location: search.php?content=posts'); +} +// +//generate output pages +// +if ($_SESSION['uid']>0) +{ + $limiter = $userdata['limit_ftid']; +} +else +{ + $limiter = $forum_config['limit_ftid']; +} +if (isset($_GET['page'])&&($_GET['page']!=1)) +{ + if (!is_numeric($_GET['page'])) + { + die('Hacking attempt'); + } + $value = ($_GET['page']-1)*$limiter; + $limit = 'LIMIT '.$value . ', '.$limiter; + $page = $_GET['page']; +} +else +{ + $limit = 'LIMIT 0, '.$limiter; + $page=1; +} +// +//end generating pages +// +if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['content']=='userposts')) +{ + $errors = true; + switch($_GET['content']) + { + case 'lastposts': + { + if ($_SESSION['uid']>0) + { + $time = time()-129600; + $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE lastpost_time>$time ORDER BY `sticky` DESC, `lastpost_time` DESC LIMIT 60;"; + $errors = false; + $window_title = $lng['showlast30posts']; + $navigator_title = '> '.$lng['showlast30posts']; + break; + } + else + { + message_forum($lng['youarenotlogd'],'login.php?mode=login'); + break; + } + } + case 'userposts': + { + if (isset($_GET['u'])) + { + $count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`t_id`) as `t_id` + FROM ".TOPICS_TABLE." WHERE `author`='".intval($_GET['u'])."'",'GENERAL','Could not obtain count amout of topics')); + $count = $count['t_id']; + $count = ceil($count / $limiter); + if ($count==0) + { + $count +=1; + } + if(isset($_GET['page']) && ($_GET['page']>$count)) + { + message_forum($lng['invalidpage'],'index.php'); + } + $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE `u_id`='".intval($_GET['u'])."' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; + $errors = false; + $window_title = $lng['view_user_topics']; + $navigator_title = '> '.$lng['view_user_topics']; + break; + } + else + { + message_forum($lng['no_user'],'index.php'); + break; + } + } + case 'posts': + { + if(strlen(trim($_POST['keywords']))>=3) + { + $keyword = explode(' ', strip_tags(addslashes($_POST['keywords']))); + $like_where = ' `text` LIKE \'%'.$keyword[0].'%\''; + for($i=1; $i$count)) + { + message_forum($lng['invalidpage'],'index.php'); + } + $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".POSTS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id LEFT JOIN ".POSTS_TABLE." ON ".POSTS_TABLE.".t_id = ".TOPICS_TABLE.".t_id WHERE $like_where ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; + $window_title = $lng['search_results']; + $navigator_title = '> '.$lng['search_results']; + $errors = false; + + } + else + { + message_forum($lng['too_short_keywords'],'search.php?content=posts'); + } + break; + } + } + if (!$errors) + { + //add skin variables + $skin = array( + 'lposts'=>$lng['posts'], + 'llastposts'=>$lng['lastpost'], + 'lposts'=>$lng['posts'], + 'lauthor'=>$lng['author'], + 'llastpost'=>$lng['lastpost'], + 'ltopicname'=>$lng['ltopicname'], + 'lang'=> $default_lang + ); + $skin = array_push_associative($skin,Over::generate_header($window_title,$navigator_title)); + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/forum_body.tpl'); + $query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain topics information'); + $value = mysql_num_rows($query); + if ($value>0) + { + $isset_topics = array(); + while($record = mysql_fetch_array($query)) + { + if (!in_array($record['t_id'], $isset_topics)) + { + $skin = array( + 't_id'=>$record['t_id'], + 'fname'=>($record['sticky']=='1') ? ''.$lng['sticky'].''.$record['name'] : $record['name'], + 'author'=>Topic::TopicAuthor($record['author']), + 'new_post'=>Topic::LastPostImg(), + 'tposts'=>$count_topic[$record['t_id']], + 'lastpost'=>Topic::LastPostInTopic($record['t_id']) + ); + include('./skins/'.$default_skin.'/forum_forum_add.tpl'); + array_push($isset_topics, $record['t_id']); + } + } + } + else + { + echo '

    '.$lng['nopost'].'!

    '; + } + if ($_GET['content']=='lastposts') + { + echo ''; + } + else + { + $skin = array( + 'option_pages' => Over::AddPages(), + 'lwith' => $lng['with'], + 'lpage' => $lng['page'], + 'lpages' => $count, + ); + include('./skins/'.$default_skin.'/search_end_body.tpl'); + } + } +} +else +{ + $skin = array( + 'mainpage'=>$lng['lsearch'], + 'lsubmit'=>$lng['search'], + 'lreset'=>$lng['reset'], + 'insert_keywords'=>$lng['insert_keywords'] + ); + $window_title = $lng['lsearch']; + $navigator_title = '
    > '.$lng['lsearch']; + $skin = array_push_associative($skin,Over::generate_header($window_title,$navigator_title)); + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/search_body.tpl'); +} +if ($_SESSION['uid']>0) +{ + if(RANK=='2') + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/shoutbox.php b/shoutbox.php new file mode 100644 index 0000000..f367ed4 --- /dev/null +++ b/shoutbox.php @@ -0,0 +1,73 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ + +if (!defined('IN_uF')) +{ + die('Hacking attempt'); +} +if (isset($_GET['mode'])) +{ + switch($_GET['mode']) + { + case 'shoutbox_add': + { + if (isset($_POST['shoutbox_message'])) + { + $content = strip_tags($_POST['shoutbox_message']); + $content = Post::SmilesReplace($content); + if ((strlen($content)>3) and (strlen($content)<300)) + { + $sql = "DELETE FROM ".SHOUTBOX_TABLE." WHERE `mtime`<'".(time()-$forum_config['shoutbox_max_time'])."'"; + DataBase::sql_query($sql,'GENERAL','Could not delete old messages'); + $sql = "INSERT INTO ".SHOUTBOX_TABLE." VALUES('','".$_SESSION['uid']."','".$content."','".time()."')"; + DataBase::sql_query($sql,'GENERAL','Could not add shoutbox message'); + } + } + echo ''; + break; + } + case 'shoutbox_delete': + { + if (isset($_GET['id']) && (RANK>0)) + { + DataBase::sql_query("DELETE FROM ".SHOUTBOX_TABLE." WHERE `m_id`='".intval($_GET['id'])."'",'GENERAL','Could not delete shoutbox message'); + } + break; + } + case 'shoutbox_desc': + { + $desc = ''; + break; + } + } +} +if(!isset($desc)) +{ + $desc = 'DESC'; +} +else +{ + $desc = ''; +} +$shoutbox_content = ''; +$sql = "SELECT ".SHOUTBOX_TABLE.".*, ".USERS_TABLE.".* FROM ".SHOUTBOX_TABLE." LEFT JOIN ".USERS_TABLE." ON ".SHOUTBOX_TABLE.".u_id = ".USERS_TABLE.".u_id ORDER BY `mtime` $desc LIMIT ".$forum_config['shoutbox_max']; +$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain shoutbox information'); +while($sb_msg = @mysql_fetch_array($query)) +{ + $allow_del = (RANK>0) ? 'X ' : ''; + $shoutbox_content .= ' + + + '.$allow_del.''.Topic::UserName($sb_msg['nick'], $sb_msg['rank']).' ['.Over::GenerateTime($sb_msg['mtime']).']: '.$sb_msg['message'].' + + '; +} +include('./skins/'.$default_skin.'/shoutbox_body.tpl'); +?> diff --git a/skins/index.html b/skins/index.html new file mode 100644 index 0000000..c2733fd --- /dev/null +++ b/skins/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/skins/subPurple/blank.tpl b/skins/subPurple/blank.tpl new file mode 100644 index 0000000..d3f5a12 --- /dev/null +++ b/skins/subPurple/blank.tpl @@ -0,0 +1 @@ + diff --git a/skins/subPurple/eprofile_body.tpl b/skins/subPurple/eprofile_body.tpl new file mode 100644 index 0000000..35d1021 --- /dev/null +++ b/skins/subPurple/eprofile_body.tpl @@ -0,0 +1,189 @@ + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    :
    : +
    : +
    : +
    : +
    +  
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : +
    : +
    : + size="46" /> + +
    : /> +    + />
    : /> +    + />
    : /> +    + />
    + :   + + +
    + :   + + +
    + :   + + +
    : + +
    : +
    +  
    + + + + + + +
    + + + + + +
    : + + +
    +  
    + + + + + + + +
    + + + + + + + + + + + + + + +
    : + +
    : + + +
    +   + +
    +
    diff --git a/skins/subPurple/forum_body.tpl b/skins/subPurple/forum_body.tpl new file mode 100644 index 0000000..fadcce1 --- /dev/null +++ b/skins/subPurple/forum_body.tpl @@ -0,0 +1,16 @@ + +
    + +
    + + + + + + + + + + +
    + \ No newline at end of file diff --git a/skins/subPurple/forum_end_body.tpl b/skins/subPurple/forum_end_body.tpl new file mode 100644 index 0000000..7c7005d --- /dev/null +++ b/skins/subPurple/forum_end_body.tpl @@ -0,0 +1,15 @@ + +
    +
    + + + +
    +
    + : + + + +
    \ No newline at end of file diff --git a/skins/subPurple/forum_forum_add.tpl b/skins/subPurple/forum_forum_add.tpl new file mode 100644 index 0000000..9b61158 --- /dev/null +++ b/skins/subPurple/forum_forum_add.tpl @@ -0,0 +1,17 @@ + + + folder + + + + + + + + +

    + + + + + diff --git a/skins/subPurple/group_add_body.tpl b/skins/subPurple/group_add_body.tpl new file mode 100644 index 0000000..40964be --- /dev/null +++ b/skins/subPurple/group_add_body.tpl @@ -0,0 +1,8 @@ + + + + +
    +
    + +
    diff --git a/skins/subPurple/group_view_head_body.tpl b/skins/subPurple/group_view_head_body.tpl new file mode 100644 index 0000000..371a670 --- /dev/null +++ b/skins/subPurple/group_view_head_body.tpl @@ -0,0 +1,19 @@ +
    +
    +
    + +
    +
    + +
    +  + + + + + + + + + +
    diff --git a/skins/subPurple/images/Thumbs.db b/skins/subPurple/images/Thumbs.db new file mode 100644 index 0000000..8fb3294 Binary files /dev/null and b/skins/subPurple/images/Thumbs.db differ diff --git a/skins/subPurple/images/body_bg.gif b/skins/subPurple/images/body_bg.gif new file mode 100644 index 0000000..881c4cc Binary files /dev/null and b/skins/subPurple/images/body_bg.gif differ diff --git a/skins/subPurple/images/delete.gif b/skins/subPurple/images/delete.gif new file mode 100644 index 0000000..28a3f01 Binary files /dev/null and b/skins/subPurple/images/delete.gif differ diff --git a/skins/subPurple/images/delete_small.gif b/skins/subPurple/images/delete_small.gif new file mode 100644 index 0000000..2676b02 Binary files /dev/null and b/skins/subPurple/images/delete_small.gif differ diff --git a/skins/subPurple/images/delete_small_active.gif b/skins/subPurple/images/delete_small_active.gif new file mode 100644 index 0000000..2733f4a Binary files /dev/null and b/skins/subPurple/images/delete_small_active.gif differ diff --git a/skins/subPurple/images/dsf_logo.gif b/skins/subPurple/images/dsf_logo.gif new file mode 100644 index 0000000..f689922 Binary files /dev/null and b/skins/subPurple/images/dsf_logo.gif differ diff --git a/skins/subPurple/images/email.gif b/skins/subPurple/images/email.gif new file mode 100644 index 0000000..aeb1ce6 Binary files /dev/null and b/skins/subPurple/images/email.gif differ diff --git a/skins/subPurple/images/email_active.gif b/skins/subPurple/images/email_active.gif new file mode 100644 index 0000000..54f11a0 Binary files /dev/null and b/skins/subPurple/images/email_active.gif differ diff --git a/skins/subPurple/images/favicon.ico b/skins/subPurple/images/favicon.ico new file mode 100644 index 0000000..0772662 Binary files /dev/null and b/skins/subPurple/images/favicon.ico differ diff --git a/skins/subPurple/images/folder_new_posts.gif b/skins/subPurple/images/folder_new_posts.gif new file mode 100644 index 0000000..75ed4d4 Binary files /dev/null and b/skins/subPurple/images/folder_new_posts.gif differ diff --git a/skins/subPurple/images/folder_no_new_posts.gif b/skins/subPurple/images/folder_no_new_posts.gif new file mode 100644 index 0000000..ef41246 Binary files /dev/null and b/skins/subPurple/images/folder_no_new_posts.gif differ diff --git a/skins/subPurple/images/gg.gif b/skins/subPurple/images/gg.gif new file mode 100644 index 0000000..96fc936 Binary files /dev/null and b/skins/subPurple/images/gg.gif differ diff --git a/skins/subPurple/images/gg_active.gif b/skins/subPurple/images/gg_active.gif new file mode 100644 index 0000000..620c66d Binary files /dev/null and b/skins/subPurple/images/gg_active.gif differ diff --git a/skins/subPurple/images/gg_small.gif b/skins/subPurple/images/gg_small.gif new file mode 100644 index 0000000..617f3a3 Binary files /dev/null and b/skins/subPurple/images/gg_small.gif differ diff --git a/skins/subPurple/images/gg_small_active.gif b/skins/subPurple/images/gg_small_active.gif new file mode 100644 index 0000000..c51dd57 Binary files /dev/null and b/skins/subPurple/images/gg_small_active.gif differ diff --git a/skins/subPurple/images/index.html b/skins/subPurple/images/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/skins/subPurple/images/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/skins/subPurple/images/lng_Polish/Thumbs.db b/skins/subPurple/images/lng_Polish/Thumbs.db new file mode 100644 index 0000000..e90d9b6 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/Thumbs.db differ diff --git a/skins/subPurple/images/lng_Polish/edit_small.gif b/skins/subPurple/images/lng_Polish/edit_small.gif new file mode 100644 index 0000000..3600a0e Binary files /dev/null and b/skins/subPurple/images/lng_Polish/edit_small.gif differ diff --git a/skins/subPurple/images/lng_Polish/edit_small_active.gif b/skins/subPurple/images/lng_Polish/edit_small_active.gif new file mode 100644 index 0000000..e2c0a5b Binary files /dev/null and b/skins/subPurple/images/lng_Polish/edit_small_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/inbox.gif b/skins/subPurple/images/lng_Polish/inbox.gif new file mode 100644 index 0000000..629623a Binary files /dev/null and b/skins/subPurple/images/lng_Polish/inbox.gif differ diff --git a/skins/subPurple/images/lng_Polish/inbox_active.gif b/skins/subPurple/images/lng_Polish/inbox_active.gif new file mode 100644 index 0000000..9d1d3f1 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/inbox_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/index.html b/skins/subPurple/images/lng_Polish/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/skins/subPurple/images/lng_Polish/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/skins/subPurple/images/lng_Polish/lock.gif b/skins/subPurple/images/lng_Polish/lock.gif new file mode 100644 index 0000000..127130b Binary files /dev/null and b/skins/subPurple/images/lng_Polish/lock.gif differ diff --git a/skins/subPurple/images/lng_Polish/newmsg.gif b/skins/subPurple/images/lng_Polish/newmsg.gif new file mode 100644 index 0000000..b8b52ce Binary files /dev/null and b/skins/subPurple/images/lng_Polish/newmsg.gif differ diff --git a/skins/subPurple/images/lng_Polish/newmsg_active.gif b/skins/subPurple/images/lng_Polish/newmsg_active.gif new file mode 100644 index 0000000..f2a6921 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/newmsg_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/pm.gif b/skins/subPurple/images/lng_Polish/pm.gif new file mode 100644 index 0000000..25871f3 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/pm.gif differ diff --git a/skins/subPurple/images/lng_Polish/pm_active.gif b/skins/subPurple/images/lng_Polish/pm_active.gif new file mode 100644 index 0000000..67dce1e Binary files /dev/null and b/skins/subPurple/images/lng_Polish/pm_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/pm_small.gif b/skins/subPurple/images/lng_Polish/pm_small.gif new file mode 100644 index 0000000..31b50f5 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/pm_small.gif differ diff --git a/skins/subPurple/images/lng_Polish/pm_small_active.gif b/skins/subPurple/images/lng_Polish/pm_small_active.gif new file mode 100644 index 0000000..0cfd2cc Binary files /dev/null and b/skins/subPurple/images/lng_Polish/pm_small_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/quote_small.gif b/skins/subPurple/images/lng_Polish/quote_small.gif new file mode 100644 index 0000000..ba4b4be Binary files /dev/null and b/skins/subPurple/images/lng_Polish/quote_small.gif differ diff --git a/skins/subPurple/images/lng_Polish/quote_small_active.gif b/skins/subPurple/images/lng_Polish/quote_small_active.gif new file mode 100644 index 0000000..b897f7a Binary files /dev/null and b/skins/subPurple/images/lng_Polish/quote_small_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/reply.gif b/skins/subPurple/images/lng_Polish/reply.gif new file mode 100644 index 0000000..fa88838 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/reply.gif differ diff --git a/skins/subPurple/images/lng_Polish/reply_active.gif b/skins/subPurple/images/lng_Polish/reply_active.gif new file mode 100644 index 0000000..0ca48f6 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/reply_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/sentbox.gif b/skins/subPurple/images/lng_Polish/sentbox.gif new file mode 100644 index 0000000..7c3e65d Binary files /dev/null and b/skins/subPurple/images/lng_Polish/sentbox.gif differ diff --git a/skins/subPurple/images/lng_Polish/sentbox_active.gif b/skins/subPurple/images/lng_Polish/sentbox_active.gif new file mode 100644 index 0000000..ed90c46 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/sentbox_active.gif differ diff --git a/skins/subPurple/images/lng_Polish/topic.gif b/skins/subPurple/images/lng_Polish/topic.gif new file mode 100644 index 0000000..d139cfe Binary files /dev/null and b/skins/subPurple/images/lng_Polish/topic.gif differ diff --git a/skins/subPurple/images/lng_Polish/topic_active.gif b/skins/subPurple/images/lng_Polish/topic_active.gif new file mode 100644 index 0000000..537dca7 Binary files /dev/null and b/skins/subPurple/images/lng_Polish/topic_active.gif differ diff --git a/skins/subPurple/images/lock.gif b/skins/subPurple/images/lock.gif new file mode 100644 index 0000000..415e68e Binary files /dev/null and b/skins/subPurple/images/lock.gif differ diff --git a/skins/subPurple/images/move.gif b/skins/subPurple/images/move.gif new file mode 100644 index 0000000..65c6943 Binary files /dev/null and b/skins/subPurple/images/move.gif differ diff --git a/skins/subPurple/images/stick.gif b/skins/subPurple/images/stick.gif new file mode 100644 index 0000000..0b1f0d1 Binary files /dev/null and b/skins/subPurple/images/stick.gif differ diff --git a/skins/subPurple/images/td_beam.jpg b/skins/subPurple/images/td_beam.jpg new file mode 100644 index 0000000..7dac0e4 Binary files /dev/null and b/skins/subPurple/images/td_beam.jpg differ diff --git a/skins/subPurple/images/td_beam_left.gif b/skins/subPurple/images/td_beam_left.gif new file mode 100644 index 0000000..0616e04 Binary files /dev/null and b/skins/subPurple/images/td_beam_left.gif differ diff --git a/skins/subPurple/images/td_beam_right.gif b/skins/subPurple/images/td_beam_right.gif new file mode 100644 index 0000000..204308e Binary files /dev/null and b/skins/subPurple/images/td_beam_right.gif differ diff --git a/skins/subPurple/images/td_beam_top.gif b/skins/subPurple/images/td_beam_top.gif new file mode 100644 index 0000000..89a14e6 Binary files /dev/null and b/skins/subPurple/images/td_beam_top.gif differ diff --git a/skins/subPurple/images/td_category.jpg b/skins/subPurple/images/td_category.jpg new file mode 100644 index 0000000..6a89ee1 Binary files /dev/null and b/skins/subPurple/images/td_category.jpg differ diff --git a/skins/subPurple/images/td_category_left.gif b/skins/subPurple/images/td_category_left.gif new file mode 100644 index 0000000..a267990 Binary files /dev/null and b/skins/subPurple/images/td_category_left.gif differ diff --git a/skins/subPurple/images/td_category_right.gif b/skins/subPurple/images/td_category_right.gif new file mode 100644 index 0000000..e322829 Binary files /dev/null and b/skins/subPurple/images/td_category_right.gif differ diff --git a/skins/subPurple/images/td_editor.jpg b/skins/subPurple/images/td_editor.jpg new file mode 100644 index 0000000..d1eec1a Binary files /dev/null and b/skins/subPurple/images/td_editor.jpg differ diff --git a/skins/subPurple/images/unlock.gif b/skins/subPurple/images/unlock.gif new file mode 100644 index 0000000..b8d436a Binary files /dev/null and b/skins/subPurple/images/unlock.gif differ diff --git a/skins/subPurple/images/unstick.gif b/skins/subPurple/images/unstick.gif new file mode 100644 index 0000000..90a638b Binary files /dev/null and b/skins/subPurple/images/unstick.gif differ diff --git a/skins/subPurple/images/wyzz/Thumbs.db b/skins/subPurple/images/wyzz/Thumbs.db new file mode 100644 index 0000000..31b0cd3 Binary files /dev/null and b/skins/subPurple/images/wyzz/Thumbs.db differ diff --git a/skins/subPurple/images/wyzz/backcolor.gif b/skins/subPurple/images/wyzz/backcolor.gif new file mode 100644 index 0000000..f20f3c2 Binary files /dev/null and b/skins/subPurple/images/wyzz/backcolor.gif differ diff --git a/skins/subPurple/images/wyzz/bold.gif b/skins/subPurple/images/wyzz/bold.gif new file mode 100644 index 0000000..4ec8e72 Binary files /dev/null and b/skins/subPurple/images/wyzz/bold.gif differ diff --git a/skins/subPurple/images/wyzz/close.gif b/skins/subPurple/images/wyzz/close.gif new file mode 100644 index 0000000..f60d705 Binary files /dev/null and b/skins/subPurple/images/wyzz/close.gif differ diff --git a/skins/subPurple/images/wyzz/copy.gif b/skins/subPurple/images/wyzz/copy.gif new file mode 100644 index 0000000..296ffdf Binary files /dev/null and b/skins/subPurple/images/wyzz/copy.gif differ diff --git a/skins/subPurple/images/wyzz/cut.gif b/skins/subPurple/images/wyzz/cut.gif new file mode 100644 index 0000000..6e9d70f Binary files /dev/null and b/skins/subPurple/images/wyzz/cut.gif differ diff --git a/skins/subPurple/images/wyzz/downsize.gif b/skins/subPurple/images/wyzz/downsize.gif new file mode 100644 index 0000000..a17e486 Binary files /dev/null and b/skins/subPurple/images/wyzz/downsize.gif differ diff --git a/skins/subPurple/images/wyzz/font.gif b/skins/subPurple/images/wyzz/font.gif new file mode 100644 index 0000000..c48befb Binary files /dev/null and b/skins/subPurple/images/wyzz/font.gif differ diff --git a/skins/subPurple/images/wyzz/forecolor.gif b/skins/subPurple/images/wyzz/forecolor.gif new file mode 100644 index 0000000..61e0fb1 Binary files /dev/null and b/skins/subPurple/images/wyzz/forecolor.gif differ diff --git a/skins/subPurple/images/wyzz/headers.gif b/skins/subPurple/images/wyzz/headers.gif new file mode 100644 index 0000000..4a35d38 Binary files /dev/null and b/skins/subPurple/images/wyzz/headers.gif differ diff --git a/skins/subPurple/images/wyzz/help.gif b/skins/subPurple/images/wyzz/help.gif new file mode 100644 index 0000000..777f28a Binary files /dev/null and b/skins/subPurple/images/wyzz/help.gif differ diff --git a/skins/subPurple/images/wyzz/htmlmode.gif b/skins/subPurple/images/wyzz/htmlmode.gif new file mode 100644 index 0000000..4b4ec2d Binary files /dev/null and b/skins/subPurple/images/wyzz/htmlmode.gif differ diff --git a/skins/subPurple/images/wyzz/indent.gif b/skins/subPurple/images/wyzz/indent.gif new file mode 100644 index 0000000..58ba3e5 Binary files /dev/null and b/skins/subPurple/images/wyzz/indent.gif differ diff --git a/skins/subPurple/images/wyzz/index.html b/skins/subPurple/images/wyzz/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/skins/subPurple/images/wyzz/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/skins/subPurple/images/wyzz/inserthorizontalrule.gif b/skins/subPurple/images/wyzz/inserthorizontalrule.gif new file mode 100644 index 0000000..7d43566 Binary files /dev/null and b/skins/subPurple/images/wyzz/inserthorizontalrule.gif differ diff --git a/skins/subPurple/images/wyzz/insertimage.gif b/skins/subPurple/images/wyzz/insertimage.gif new file mode 100644 index 0000000..9b2fcb3 Binary files /dev/null and b/skins/subPurple/images/wyzz/insertimage.gif differ diff --git a/skins/subPurple/images/wyzz/insertorderedlist.gif b/skins/subPurple/images/wyzz/insertorderedlist.gif new file mode 100644 index 0000000..a7a1c0a Binary files /dev/null and b/skins/subPurple/images/wyzz/insertorderedlist.gif differ diff --git a/skins/subPurple/images/wyzz/insertunorderedlist.gif b/skins/subPurple/images/wyzz/insertunorderedlist.gif new file mode 100644 index 0000000..0f36014 Binary files /dev/null and b/skins/subPurple/images/wyzz/insertunorderedlist.gif differ diff --git a/skins/subPurple/images/wyzz/italic.gif b/skins/subPurple/images/wyzz/italic.gif new file mode 100644 index 0000000..8fd547e Binary files /dev/null and b/skins/subPurple/images/wyzz/italic.gif differ diff --git a/skins/subPurple/images/wyzz/justifycenter.gif b/skins/subPurple/images/wyzz/justifycenter.gif new file mode 100644 index 0000000..6f1c340 Binary files /dev/null and b/skins/subPurple/images/wyzz/justifycenter.gif differ diff --git a/skins/subPurple/images/wyzz/justifyfull.gif b/skins/subPurple/images/wyzz/justifyfull.gif new file mode 100644 index 0000000..f881b54 Binary files /dev/null and b/skins/subPurple/images/wyzz/justifyfull.gif differ diff --git a/skins/subPurple/images/wyzz/justifyleft.gif b/skins/subPurple/images/wyzz/justifyleft.gif new file mode 100644 index 0000000..f2e6142 Binary files /dev/null and b/skins/subPurple/images/wyzz/justifyleft.gif differ diff --git a/skins/subPurple/images/wyzz/justifyright.gif b/skins/subPurple/images/wyzz/justifyright.gif new file mode 100644 index 0000000..5df6220 Binary files /dev/null and b/skins/subPurple/images/wyzz/justifyright.gif differ diff --git a/skins/subPurple/images/wyzz/link.gif b/skins/subPurple/images/wyzz/link.gif new file mode 100644 index 0000000..d492406 Binary files /dev/null and b/skins/subPurple/images/wyzz/link.gif differ diff --git a/skins/subPurple/images/wyzz/outdent.gif b/skins/subPurple/images/wyzz/outdent.gif new file mode 100644 index 0000000..18e7ea0 Binary files /dev/null and b/skins/subPurple/images/wyzz/outdent.gif differ diff --git a/skins/subPurple/images/wyzz/paste.gif b/skins/subPurple/images/wyzz/paste.gif new file mode 100644 index 0000000..111bb95 Binary files /dev/null and b/skins/subPurple/images/wyzz/paste.gif differ diff --git a/skins/subPurple/images/wyzz/redo.gif b/skins/subPurple/images/wyzz/redo.gif new file mode 100644 index 0000000..a713be1 Binary files /dev/null and b/skins/subPurple/images/wyzz/redo.gif differ diff --git a/skins/subPurple/images/wyzz/removeformat.gif b/skins/subPurple/images/wyzz/removeformat.gif new file mode 100644 index 0000000..a1d9d19 Binary files /dev/null and b/skins/subPurple/images/wyzz/removeformat.gif differ diff --git a/skins/subPurple/images/wyzz/specialchar.gif b/skins/subPurple/images/wyzz/specialchar.gif new file mode 100644 index 0000000..b24452a Binary files /dev/null and b/skins/subPurple/images/wyzz/specialchar.gif differ diff --git a/skins/subPurple/images/wyzz/strikethrough.gif b/skins/subPurple/images/wyzz/strikethrough.gif new file mode 100644 index 0000000..ea26e51 Binary files /dev/null and b/skins/subPurple/images/wyzz/strikethrough.gif differ diff --git a/skins/subPurple/images/wyzz/subscript.gif b/skins/subPurple/images/wyzz/subscript.gif new file mode 100644 index 0000000..a29140f Binary files /dev/null and b/skins/subPurple/images/wyzz/subscript.gif differ diff --git a/skins/subPurple/images/wyzz/superscript.gif b/skins/subPurple/images/wyzz/superscript.gif new file mode 100644 index 0000000..14f2020 Binary files /dev/null and b/skins/subPurple/images/wyzz/superscript.gif differ diff --git a/skins/subPurple/images/wyzz/underline.gif b/skins/subPurple/images/wyzz/underline.gif new file mode 100644 index 0000000..e32b6e8 Binary files /dev/null and b/skins/subPurple/images/wyzz/underline.gif differ diff --git a/skins/subPurple/images/wyzz/undo.gif b/skins/subPurple/images/wyzz/undo.gif new file mode 100644 index 0000000..8885006 Binary files /dev/null and b/skins/subPurple/images/wyzz/undo.gif differ diff --git a/skins/subPurple/images/wyzz/upsize.gif b/skins/subPurple/images/wyzz/upsize.gif new file mode 100644 index 0000000..409886e Binary files /dev/null and b/skins/subPurple/images/wyzz/upsize.gif differ diff --git a/skins/subPurple/index.html b/skins/subPurple/index.html new file mode 100644 index 0000000..408e221 --- /dev/null +++ b/skins/subPurple/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/skins/subPurple/index_body.tpl b/skins/subPurple/index_body.tpl new file mode 100644 index 0000000..f180297 --- /dev/null +++ b/skins/subPurple/index_body.tpl @@ -0,0 +1,6 @@ +
    + + + + +
    . :
    diff --git a/skins/subPurple/index_body_end.tpl b/skins/subPurple/index_body_end.tpl new file mode 100644 index 0000000..4473421 --- /dev/null +++ b/skins/subPurple/index_body_end.tpl @@ -0,0 +1,21 @@ +
    + + + + + + +
    + + + +
    + + .
    + .
    +
    +
    +
    + :
    +
    diff --git a/skins/subPurple/index_category_add.tpl b/skins/subPurple/index_category_add.tpl new file mode 100644 index 0000000..e7a05ca --- /dev/null +++ b/skins/subPurple/index_category_add.tpl @@ -0,0 +1,14 @@ + 
    + + + + + + +
     
    + + + + + + diff --git a/skins/subPurple/index_forum_add.tpl b/skins/subPurple/index_forum_add.tpl new file mode 100644 index 0000000..2382164 --- /dev/null +++ b/skins/subPurple/index_forum_add.tpl @@ -0,0 +1,14 @@ + + + + + + diff --git a/skins/subPurple/login_body.tpl b/skins/subPurple/login_body.tpl new file mode 100644 index 0000000..54c09aa --- /dev/null +++ b/skins/subPurple/login_body.tpl @@ -0,0 +1,34 @@ + + +
    + folder +
    + +
    +

    +
    + +
    + + + + + +
    + + + + + + + + + + + + + + + +
    + :   + +
    +
    + :   + + +
    +
    diff --git a/skins/subPurple/message_body.tpl b/skins/subPurple/message_body.tpl new file mode 100644 index 0000000..afdf81a --- /dev/null +++ b/skins/subPurple/message_body.tpl @@ -0,0 +1,18 @@ + +
    + + + + + + +
    + + + + +
    + + +
    + diff --git a/skins/subPurple/move_topic_body.tpl b/skins/subPurple/move_topic_body.tpl new file mode 100644 index 0000000..829d862 --- /dev/null +++ b/skins/subPurple/move_topic_body.tpl @@ -0,0 +1,24 @@ +
    + + + + + + +
     
    + + + + + + + +
    : + +
    +   + +
    +
    \ No newline at end of file diff --git a/skins/subPurple/msgs_is_body.tpl b/skins/subPurple/msgs_is_body.tpl new file mode 100644 index 0000000..dc49b47 --- /dev/null +++ b/skins/subPurple/msgs_is_body.tpl @@ -0,0 +1,21 @@ +
    +NEW Message +    + SENTBOX +    + INBOX +
    + +
    + + + + + + + +
    + diff --git a/skins/subPurple/msgs_is_end_body.tpl b/skins/subPurple/msgs_is_end_body.tpl new file mode 100644 index 0000000..081c1df --- /dev/null +++ b/skins/subPurple/msgs_is_end_body.tpl @@ -0,0 +1,2 @@ + +
    diff --git a/skins/subPurple/msgs_is_item_body.tpl b/skins/subPurple/msgs_is_item_body.tpl new file mode 100644 index 0000000..fb0df50 --- /dev/null +++ b/skins/subPurple/msgs_is_item_body.tpl @@ -0,0 +1,6 @@ + + + + + + diff --git a/skins/subPurple/msgs_msg_body.tpl b/skins/subPurple/msgs_msg_body.tpl new file mode 100644 index 0000000..1e3b008 --- /dev/null +++ b/skins/subPurple/msgs_msg_body.tpl @@ -0,0 +1,30 @@ + + + + + + + +
    + + + + + + + + + +
    +
    + +
    +

    +
    : : : :
    + + + + +
    + +
    diff --git a/skins/subPurple/msgs_new_body.tpl b/skins/subPurple/msgs_new_body.tpl new file mode 100644 index 0000000..20d29f5 --- /dev/null +++ b/skins/subPurple/msgs_new_body.tpl @@ -0,0 +1,55 @@ + + +
    + + + + + + +
    + + + + + + + + + +
    +

    +

    + +
    +

    +

    + +
    +  + + + + + + + +
    Post
    + + + + + + + +

    +

    :
    +
    + +

    +   + +
    +
    diff --git a/skins/subPurple/newpass_body.tpl b/skins/subPurple/newpass_body.tpl new file mode 100644 index 0000000..3f8ff16 --- /dev/null +++ b/skins/subPurple/newpass_body.tpl @@ -0,0 +1,24 @@ +
    + + + + + + +
    + + + + + + + + +
    + :   + +
    +
    + +
    +
    diff --git a/skins/subPurple/ntopic_body.tpl b/skins/subPurple/ntopic_body.tpl new file mode 100644 index 0000000..224c543 --- /dev/null +++ b/skins/subPurple/ntopic_body.tpl @@ -0,0 +1,49 @@ + +
    + +
    + + + + + +
    + + + + +
    +

    +

    + +
    +  + + + + + + + +
    Post
    + + + + + + + +

    +

    :
    +
    + + 0) { ?> + + +

    +   + +
    +
    diff --git a/skins/subPurple/overall_footer.tpl b/skins/subPurple/overall_footer.tpl new file mode 100644 index 0000000..a9e7314 --- /dev/null +++ b/skins/subPurple/overall_footer.tpl @@ -0,0 +1,17 @@ + + + + +
    +  +
    +
    + +

    + +
    +
    + + diff --git a/skins/subPurple/overall_header.tpl b/skins/subPurple/overall_header.tpl new file mode 100644 index 0000000..45bfd7c --- /dev/null +++ b/skins/subPurple/overall_header.tpl @@ -0,0 +1,65 @@ + + + + + + + + +<? echo $skin['forumname']; ?> - <? echo $skin['mainpage']; ?> + + + + +
    +
    +
    +
    + + + + + + + + +
    + DSF logo +


    +

    +    +    +    +   
    +   +    +    +

    +
    + Forum
    diff --git a/skins/subPurple/post_add_body.tpl b/skins/subPurple/post_add_body.tpl new file mode 100644 index 0000000..c3cb01d --- /dev/null +++ b/skins/subPurple/post_add_body.tpl @@ -0,0 +1,61 @@ + + + + + + + + + + +
    Post
    + + + + + + + + +0) { if(RANK>0) {?> + + + + + + + + + + + +
    +
    +


    +
    +

    +
    + Post + #
    + :
    + : online +
    + quote
    + + + pw
    + <?= $skin['ua_system_desc']; ?> <?= $skin['ua_browser_desc']; ?> +
    +
    + + +
    + +
    +
    + +
    : : : :
    + 
    + diff --git a/skins/subPurple/post_error_body.tpl b/skins/subPurple/post_error_body.tpl new file mode 100644 index 0000000..a7d4423 --- /dev/null +++ b/skins/subPurple/post_error_body.tpl @@ -0,0 +1,5 @@ + + + + +
    diff --git a/skins/subPurple/posting_body.tpl b/skins/subPurple/posting_body.tpl new file mode 100644 index 0000000..4d4058a --- /dev/null +++ b/skins/subPurple/posting_body.tpl @@ -0,0 +1,48 @@ + +
    + + + + + + + +
    + + + + +
    +

    +

    + +
    +  + + + + + + + + +
    Post
    + + + + + + + +

    +

    :
    +
    + + +

    +   + +
    +
    diff --git a/skins/subPurple/quick_reply_body.tpl b/skins/subPurple/quick_reply_body.tpl new file mode 100644 index 0000000..3d86caa --- /dev/null +++ b/skins/subPurple/quick_reply_body.tpl @@ -0,0 +1,38 @@ + + 
    +
    + + + + + + +
    + + + + + + + + +
    + :
    +
    + +
    +   + +
    +
    diff --git a/skins/subPurple/register_body.tpl b/skins/subPurple/register_body.tpl new file mode 100644 index 0000000..515930f --- /dev/null +++ b/skins/subPurple/register_body.tpl @@ -0,0 +1,43 @@ + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    : +
    : +
    : +
    + +
    +   + +
    +
    diff --git a/skins/subPurple/search_body.tpl b/skins/subPurple/search_body.tpl new file mode 100644 index 0000000..67fb489 --- /dev/null +++ b/skins/subPurple/search_body.tpl @@ -0,0 +1,25 @@ +
    + + + + + + +
    + + + + + + + + +
    + :   + +
    +
    + + +
    +
    diff --git a/skins/subPurple/search_end_body.tpl b/skins/subPurple/search_end_body.tpl new file mode 100644 index 0000000..698b68e --- /dev/null +++ b/skins/subPurple/search_end_body.tpl @@ -0,0 +1,9 @@ + +
    + : + + + +
    \ No newline at end of file diff --git a/skins/subPurple/shoutbox_body.tpl b/skins/subPurple/shoutbox_body.tpl new file mode 100644 index 0000000..b08ca9d --- /dev/null +++ b/skins/subPurple/shoutbox_body.tpl @@ -0,0 +1,33 @@ +
    + + + + + + +
    ShoutBox
    + + + + + + + +
    +
    + + +
    +
    +
    + 0) { ?> +
    + : + + + + + +
    +
    +
    diff --git a/skins/subPurple/skin.css b/skins/subPurple/skin.css new file mode 100644 index 0000000..f2e11ab --- /dev/null +++ b/skins/subPurple/skin.css @@ -0,0 +1,228 @@ +/* +//skin defines for DSF v1.0 +*/ + +a:hover +{ + text-decoration: underline; color : navy; +} + +/* beam */ +.beam +{ + color: #800000; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; + background-color: #C6D1FB; + text-align: center; + background-image: url('images/td_beam.jpg'); +} + +/* body class */ +.body +{ + background-color: #E8E8FF; + background-image: url('images/body_bg.gif'); + margin: 4px; +} + +/* style category */ +.category +{ + color: #FFFFFF; + font-family: Verdana; + font-size: 12px; + font-weight: bold; +} + +/* class copyright */ +.copyright +{ + font-family: Verdana; + font-size: 8pt; + color: #FFFFFF; + text-decoration: none; +} + +/* description forum */ +.desc +{ + color: #434354; + font-family: Verdana; + font-size: 8pt; +} +/* configuration footer */ +.footer +{ + background-color: #CCCCFF; +} + +/* heading forum - main title */ +.hforum +{ + color: #008000; + font-family: Verdana; + font-size: 16pt; + font-weight: bold; +} + +/* main */ +.main +{ + color: #7D96F7; + font-family: Verdana; + font-size: 12px; + font-weight: bold; +} + +/* standard error font*/ +.ferror +{ + color: red; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; +} + +/* forum item */ +.fitem +{ + background-color: #E1E7FD; + border-width : 1pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; +} + +/* main menu link*/ +.flink +{ + color: #000080; + font-family: Verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +/* small font */ +.fsmall +{ + color: #434354; + font-family: Verdana; + font-size: 8pt; + text-decoration: none; +} + +/* standard font */ +.fstandard +{ + color: #434354; + font-family: Verdana; + font-size: 9pt; + text-decoration: none; +} + +/* very small font */ +.fverysmall +{ + color: #434354; + font-family: Verdana; + font-size: 9px; + text-decoration: none; +} + +/* button class */ +input.fbutton +{ + background-color: #CCCCFF; + font-weight: bold; + cursor: pointer; + color: #800000; +} + + +input:hover +{ + background-color: lightyellow; +} + +/* main table forum(header, footer) */ +.maintable +{ + border-width : 1.5pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; +} + +/* mesage forum */ +.message { + z-index: 100; + border-width : 0pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; + background-color: #CCCCFF; + font-family: Verdana; + font-size: 9pt; + font-weight: bold; +} + +/* moderate options */ +.moderate +{ + background-color: #D9E0FD; + text-align: center; +} + +.navigator +{ + color: blue; + text-decoration: none; +} + +/* section forum */ +.sect +{ + color: #434354; + font-family: Verdana; + font-size: 10pt; + font-weight: bold; + text-decoration: none; +} + +/* table post error */ +.tableerror +{ + border-width : 1pt; + border-color: #CCCCFF; + border-collapse: collapse; + border-style: solid; + background-color: #CCCCFF; + font-family: Verdana; + font-size: 9pt; + text-align: center; + font-weight: bold; +} +/* quote text */ +.textquote +{ + font-family: Verdana; + font-size: 9pt; + font-style: italic; +} + +/* PANEL ADMINISTRATION SECTION ----------------------------------------------*/ +.pa_h1 +{ + font-family: Verdana; + font-size: 25pt; + font-weight: bold; +} +.pa_sect +{ + font-family: Verdana; + font-size: 15pt; + font-weight: bold; +} \ No newline at end of file diff --git a/skins/subPurple/topic_body.tpl b/skins/subPurple/topic_body.tpl new file mode 100644 index 0000000..9f87e14 --- /dev/null +++ b/skins/subPurple/topic_body.tpl @@ -0,0 +1,5 @@ +
    + +  +
    + diff --git a/skins/subPurple/topic_end_body.tpl b/skins/subPurple/topic_end_body.tpl new file mode 100644 index 0000000..0e98248 --- /dev/null +++ b/skins/subPurple/topic_end_body.tpl @@ -0,0 +1,15 @@ + + + + + +
    +  +
    +: + + + +
    diff --git a/skins/subPurple/topic_mod_body.tpl b/skins/subPurple/topic_mod_body.tpl new file mode 100644 index 0000000..6d2516a --- /dev/null +++ b/skins/subPurple/topic_mod_body.tpl @@ -0,0 +1,11 @@ + + + + + + delete + + + move + + diff --git a/skins/subPurple/topic_post_body.tpl b/skins/subPurple/topic_post_body.tpl new file mode 100644 index 0000000..bd2dd03 --- /dev/null +++ b/skins/subPurple/topic_post_body.tpl @@ -0,0 +1,61 @@ + + + + + + + + + + +
    Post
    + + + + + + + + +0) { if(RANK>0) {?> + + + + + + + + + + + +
    +
    +


    +
    +

    +
    + Post + #
    + :
    + : online +
    + quote
    + + + pw
    + <?= $skin['ua_system_desc']; ?> <?= $skin['ua_browser_desc']; ?> +
    +
    + + +
    + +
    +
    + +
    : : : :
    + 
    + diff --git a/skins/subPurple/user_body.tpl b/skins/subPurple/user_body.tpl new file mode 100644 index 0000000..4a09b12 --- /dev/null +++ b/skins/subPurple/user_body.tpl @@ -0,0 +1,51 @@ + + + + + + + + + + + + + +
    + + + + : online
    + :
    + :
    + : ; %
    + :
    + :
    + + : %
    + + +
    +
    + +
    + pm
    +
    +
    +
    +  + + + + + + +
    + + + + +
    +   +
    diff --git a/skins/subPurple/users_body.tpl b/skins/subPurple/users_body.tpl new file mode 100644 index 0000000..6fc8ddb --- /dev/null +++ b/skins/subPurple/users_body.tpl @@ -0,0 +1,39 @@ +
    + + + + + + +
    + + + + +
    + : + + : + + +
    +  + + + + + + + + + +
    + \ No newline at end of file diff --git a/skins/subPurple/users_end_body.tpl b/skins/subPurple/users_end_body.tpl new file mode 100644 index 0000000..0c248af --- /dev/null +++ b/skins/subPurple/users_end_body.tpl @@ -0,0 +1,10 @@ +
    +
    +: + + + +
    +
    diff --git a/skins/subPurple/users_item_add_body.tpl b/skins/subPurple/users_item_add_body.tpl new file mode 100644 index 0000000..db575bc --- /dev/null +++ b/skins/subPurple/users_item_add_body.tpl @@ -0,0 +1,7 @@ + + + + + + + diff --git a/skins/subPurple/warns_add_body.tpl b/skins/subPurple/warns_add_body.tpl new file mode 100644 index 0000000..bb64f3f --- /dev/null +++ b/skins/subPurple/warns_add_body.tpl @@ -0,0 +1,36 @@ + +
    + + + + + + + +
    + + + + + + + +

    +

    +
    + +
    + :
    + + +

    +
    +   + +
    +
    diff --git a/skins/subPurple/warns_view_body.tpl b/skins/subPurple/warns_view_body.tpl new file mode 100644 index 0000000..4912018 --- /dev/null +++ b/skins/subPurple/warns_view_body.tpl @@ -0,0 +1,13 @@ + + + + + + + +
    +

    +

    +

    +

    + \ No newline at end of file diff --git a/skins/subPurple/warns_view_end_body.tpl b/skins/subPurple/warns_view_end_body.tpl new file mode 100644 index 0000000..217b286 --- /dev/null +++ b/skins/subPurple/warns_view_end_body.tpl @@ -0,0 +1,10 @@ + +
    + + + + + +
    + : +
    diff --git a/skins/subPurple/warns_view_item_body.tpl b/skins/subPurple/warns_view_item_body.tpl new file mode 100644 index 0000000..21977f3 --- /dev/null +++ b/skins/subPurple/warns_view_item_body.tpl @@ -0,0 +1,4 @@ + + 10% + + diff --git a/skins/subPurple/wyzz_editarea.css b/skins/subPurple/wyzz_editarea.css new file mode 100644 index 0000000..25f6d1d --- /dev/null +++ b/skins/subPurple/wyzz_editarea.css @@ -0,0 +1,81 @@ +/**************** body and tag styles ****************/ + body, p { + margin-top: 0px; + margin-bottom: 30px; + background-color: #fefefe; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #333333; + font-size: 13px; + } + + #container { + width: 750px; + margin: 0 auto; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + line-height: 1.6em; + color: #666666; + background-color: #FFFFFF; + } + + #container2 { + width: 746px; + margin: 0 auto; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + line-height: 1.6em; + color: #666666; + background-color: #FFFFFF; + border-bottom: 2px solid #2763A5; + } + + pre { + font-family: "courier new", sans-serif; + font-weight: normal; + font-size: 12px; + color: #6DA6E2; + background-color: #FFFFFF; + } + + h1 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 32px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + h2 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 28px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + h3 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + font-size: 24px; + color: #6DA6E2; + margin-bottom: 30px; + background-color: #FFFFFF; + } + + a { + color: #6DA6E2; + background-color: #FFFFFF; + text-decoration: none; + font-weight: bold; + font-family: Verdana; + } + + a:hover { + background-color: #FFFFFF; + color: inherit; + font-weight: bold; + text-decoration: underline; + font-family: Verdana; + } \ No newline at end of file diff --git a/skins/subPurple/wyzz_style.css b/skins/subPurple/wyzz_style.css new file mode 100644 index 0000000..865a64b --- /dev/null +++ b/skins/subPurple/wyzz_style.css @@ -0,0 +1,24 @@ +/* WYSIWYG EDITOR */ + +/* Toolbar */ +.toolbar { border: 1px solid #999999; height: 24px; background-image: url('images/td_editor.jpg'); background-color:#cccccc; } +.wyzz_alleditor { display: block; border:1px #aaa solid; width:520px; background:#e0e0e0; padding:2px;position:relative;} +.wyzz_alleditor div { display:block;} + +/* Command Buttons */ +.button { width: 20px; height: 20px; border: 1px solid transparent; margin: 0px; padding: 0px; background: transparent; } +.closebutton { float:right; padding: 2px; } +.buttonOver { width: 20px; height: 20px; border: 1px solid #999999; margin: 0px; padding: 0px; } +.separator { width: 2px; border-left: 1px solid #eeeeee; margin: 0px; padding: 0px; } + +/* others */ +.colorpicker, .colorbackpicker, .fontpicker, .headerpicker, .helpbox, .linkdialog { position:absolute; width: 216px; background:#eee; display:block; padding:0px; margin-top:0px; border:1px #555 solid;line-height:1.4} +.specialpicker { position:absolute; width: 216px; background:#eee; display:block; padding-top:20px;padding-left:20px; margin-top:0px; border:1px #555 solid;line-height:1.4} +.help {margin: 10px; font: 12px bold verdana,helvetica,arial,sans-serif black; text-align:center } +.help h4 {font: 18px bold verdana,helvetica,arial,sans-serif black; padding-top:10px} +.colorpicker a, .colorbackpicker a { border:1px #fff solid; height:10px; width:10px; font-size:0.01em; display:block;float:left; margin-right:0px;} +.colorpicker a:hover, .colorbackpicker a:hover { border:1px #f00 solid;} +.fontpicker a, .headerpicker a { color:#333;text-decoration:none;background:#eee;} +.fontpicker a:hover, .headerpicker a:hover, .specialpicker a:hover { color: #666 } +.specialpicker a { color:#333;font-family:arial;text-decoration:none;background:#eee;height:13px; width:12px;font-size:14px} +.charbutton { width:12px;height:14px; } \ No newline at end of file diff --git a/tmp/index.html b/tmp/index.html new file mode 100644 index 0000000..ff17433 --- /dev/null +++ b/tmp/index.html @@ -0,0 +1,15 @@ + + + + + Untitled + + + + +

    + + +

    + + diff --git a/topic.php b/topic.php new file mode 100644 index 0000000..d55abf7 --- /dev/null +++ b/topic.php @@ -0,0 +1,166 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/class_topic.php'); +include('./includes/class_mod.php'); +include('./includes/classes/secure.php'); + +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); + +$tid = intval($_GET['t']); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$default_skin = Over::ViewSkinName(); +include('./includes/cache/cache_topic.php'); + +$forum_locked = $forum['lock']; +//add skin variables +$skin = array( +'lreply'=>(($topic['lock']==1) or ($forum_locked==1)) ? + 'reply' + : + ' + reply' +); + +$skin = array_push_associative($skin, Over::generate_header($lng['showtopic'].': '.$topic['name'], '> '.$forum['name'].' > '.$topic['name'])); + +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/topic_body.tpl'); + +$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".*, ".USERS_TABLE.".u_id AS user_id,".SESSIONS_TABLE.".* FROM `".POSTS_TABLE."` LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id LEFT JOIN ".SESSIONS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".POSTS_TABLE.".u_id WHERE t_id='$tid' ORDER BY tp_id $limit;"; +$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain post information.'); +while($item=mysql_fetch_array($query)) +{ + $ua = Over::user_agent($item['user_agent']); + $warn_pool = ($forum_config['allow_warns'] && $forum_config['warns_in_topic'] ) ? (isset($user_warnlevel[$item['u_id']])) ? + ''.$lng['warns'].': + '.($user_warnlevel[$item['u_id']]*10).'%' : ''.$lng['warns'].': + 0%' : ' '; + $skin = array( + 'tp_id' => $item['tp_id'], + 'p_id' => $item['p_id'], + 'u_id' => $item['user_id'], + 'username' => Topic::UserName($item['nick'], $item['rank']), + 'pdate' => Over::GenerateTime($item['ptime']), + 'user_gg' => (($item['allow_gg'])&& ($item['gg']!='0')) ? + 'gg
    ' : '', + 'edit' => ($_SESSION['uid']>0) ? (($item['u_id']==$_SESSION['uid']) ||(RANK>0)) ? + ' + edit
    ' : '' : '', + 'userrank' => User::UserRank($item['rank']), + 'avatar' => ($item['avatar']!='') ? 'av' : '



    ', + 'posttext' => Topic::PostText($item['text'], $item['moderated'], $item['p_id']), + 'sig'=>($item['sig']!='') ? '

    ----------------
    '.$item['sig'] : '', + 'posts'=>$item['posts'], + 'regdate' => date('d-m-Y',$item['regdate']), + 'lastvisit' => date('d-m-Y',$item['lastvisit']), + 'warns_pool' => $warn_pool, + 'lstat'=>$lng['stat'], + 'rowspan'=> ($_SESSION['uid']>0) ? ((RANK>0) ? '3' : '2') : '2', + 'L.IP' => ($_SESSION['uid']>0) ? ((($forum_config['ip_post_for_mod'] && (RANK>0)) || (RANK==2) ) ? 'IP: '.$item['post_ip'].'
    ' : '') : '', + 'IP'=>$item['post_ip'], + 'admin'=>$lng['admin_mod_administration'], + 'mode_p_del' => ($item['tp_id']!='1') ? + ' + pdelete
    ' : '', + 'ban'=> $lng['ban'], + 'edit_profile'=>$lng['edit_profile'], + 'add_warn'=>$lng['add_warn'], + 'online'=>($item['time']!=NULL) ? (($item['time']+1250)>time()) ? 'online.gif' : 'offline.gif' : 'offline.gif', + //labels + 'lwarns'=>$lng['warns'], + 'lang'=>$default_lang, + 'ldate'=>$lng['date'], + 'lrank'=>$lng['lurank2'], + 'llastvisit'=>$lng['lulastvisit'], + 'lregdate'=>$lng['regdate2'], + 'lposts'=>$lng['posts'], + 'ua_system'=>$ua[0], + 'ua_system_desc'=>$lng['system'].' '.$ua[2], + 'ua_browser'=>$ua[1], + 'ua_browser_desc'=>$lng['browser'].' '.$ua[3], + 'lno'=>$lng['no.'], + 'lpinfo'=>$lng['postinfo'], + 'C.delete_post'=>$lng['c_delete_post'] + ); + //do it! + include('./skins/'.$default_skin.'/topic_post_body.tpl'); +} + +//generate end template variables +$skin = array( +'functions_moderate'=> ($_SESSION['uid']>0) ? (RANK>0) ? './skins/'.$default_skin.'/topic_mod_body.tpl' : './skins/'.$default_skin.'/blank.tpl' : './skins/'.$default_skin.'/blank.tpl', +'lock' => ($topic['lock']==1) ? 'unlock' : 'lock', +'stick' => ($topic['sticky']==1) ? ' +unstick' +: 'stick', +'lmod' => $lng['lmod'], +'c_delete_topic'=>$lng['c_delete_topic'], +'option_pages'=>Over::AddPages(), +'lwith'=>$lng['with'], +'lpage'=>$lng['page'], +'lpages'=>$count +); +$skin['lreply']=(($topic['lock']==1) or ($forum_locked==1)) + ? 'reply' : ' + reply0) and ($topic['lock']==0) and ($forum_locked==0) and ($userdata['allow_qr']=='1')) +{ + include './quick_reply.php'; +} +if($_SESSION['uid']>0) +{ + if(RANK==2) + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/user.php b/user.php new file mode 100644 index 0000000..3fc6e06 --- /dev/null +++ b/user.php @@ -0,0 +1,122 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +include('./includes/classes/secure.php'); +$default_lang = Over::DefaultLang(); +include('./lngs/'.$default_lang.'/main.php'); +$start = Over::TimeGeneration(); +$default_skin = Over::ViewSkinName(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$uid = intval($_GET['id']); +//check online for user +$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE `u_id`='$uid' AND time+1250>".time()." LIMIT 1"; +$query = DataBase::sql_query($sql, 'GENERAL', 'Could not read user active.'); +$result = @mysql_fetch_array($query); +if ($result['u_id']==$uid) +{ + $active = 1; +} +else +{ + $active = 0; +} +unset($sql, $query, $result); +$userwarn = 0; +$sql = "SELECT `u_id`,`value` FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'"; +$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user warns information'); +$result = mysql_num_rows($query); +while ($result = @mysql_fetch_array($query)) +{ + if ($result['value']=='-') + { + $userwarn -=1; + } + else + { + $userwarn +=1; + } +} +$userwarn = ($userwarn>0) ? $userwarn*10 : $userwarn; +//add skin variables +$sql = "SELECT * FROM `".USERS_TABLE."` WHERE u_id='$uid'"; +$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain user information'); +$user_info = @mysql_fetch_array($query); +if ($user_info['u_id']=='') +{ + message_forum($lng['no_user'],'index.php'); +} +$skin = array( +'u_id'=>$_GET['id'], +'lang'=>$default_lang, +'sig'=>$user_info['sig'], +'lsig'=>$lng['sig'], +'posts'=>$user_info['posts'], +'luposts'=>$lng['posts'], +'lstat'=>$lng['stat'], +'stat'=>($active==1) ? 'online.gif' : 'offline.gif', +'prposts'=>User::PostWithForum($user_info['posts']), +'lastvisit'=>($user_info['lastvisit']!='0') ? date('d-m-Y, G:i',$user_info['lastvisit']) : $lng['never'], +'llastvisit'=>$lng['lulastvisit'], +'avatar'=>($user_info['avatar']!='') ? 'av' : '



    ', +'lavatar'=>$lng['avatar'], +'regdate'=>date('d-m-Y, G:i',$user_info['regdate']), +'lpalf'=>$lng['witch_all_post_forum'], +'lregdate'=>$lng['luregister'], +'interests'=>$user_info['interests'], +'linterests'=>$lng['luinterests'], +'userrank'=>User::UserRank($user_info['rank']), +'luserrank'=>$lng['lurank'], +'lwarns'=> $lng['warns'], +'show_topics'=> $lng['view_user_topics'], +'warnlevel' => $userwarn, +'warncolor'=>($userwarn>0) ? 'red' : 'green', +'lcontact'=>$lng['contact'], +'user_gg'=>(($user_info['allow_gg'])&& ($user_info['gg']!='0')) ? 'gg' : '', +'user_email'=>($user_info['allow_email']=='1') ? 'email' : '', +); +$skin = array_push_associative($skin,Over::generate_header($lng['showprofile'].': '.$user_info['nick'], '> '.$lng['showprofile'].': '.$user_info['nick'])); +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/user_body.tpl'); +if($_SESSION['uid']>0) +{ + if(RANK==2) + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/users.php b/users.php new file mode 100644 index 0000000..a72cfc3 --- /dev/null +++ b/users.php @@ -0,0 +1,229 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_topic.php'); +include('./includes/class_overall.php'); +include('./includes/class_forum.php'); +$start = Over::TimeGeneration(); +include('./lngs/'.Over::DefaultLang().'/main.php'); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +$default_skin = Over::ViewSkinName(); +// +//generate output pages +// +if ($_SESSION['uid']>0) +{ + $limiter = User::UserInformation($_SESSION['uid'], 'limit_users'); +} +else +{ + $limiter = $forum_config['limit_users']; +} +if (isset($_GET['page'])&&($_GET['page']!=1)) +{ + if (!is_numeric($_GET['page'])) + { + die('Hacking attempt'); + } + $value = ($_GET['page']-1)*$limiter; + $limit = 'LIMIT '.$value . ', '.$limiter; + $page = $_GET['page']; +} +else +{ + $limit = 'LIMIT 0, '.$limiter; + $page=1; +} +$count = @mysql_fetch_array(DataBase::sql_query("SELECT COUNT(`u_id`) as `u_id` +FROM ".USERS_TABLE,'GENERAL','Could not obtain count amout of users')); +$count = $count['u_id'] -1; +$count = ceil($count / $limiter); +if(isset($_GET['page']) && ($_GET['page']>$count)) +{ + message_forum($lng['invalidpage'],'index.php'); +} +// +//end generating pages +// +if (isset($_COOKIE['users_desc'], $_POST['desc'])) +{ + unset($_COOKIE['users_desc']); +} +if (isset($_POST['sort'],$_COOKIE['users_sort'])) +{ + unset($_COOKIE['users_sort']); +} +if (!isset($_COOKIE['users_desc'])) +{ + if (isset($_POST['desc'])) + { + switch($_POST['desc']) + { + case 'yes': + { + @setcookie('users_desc','desc',time()+3600); + $_COOKIE['users_desc'] = 'desc'; + $desc = 'DESC'; + break; + } + case 'no': + { + @setcookie('users_desc','no',time()+3600); + $_COOKIE['users_desc'] = 'no'; + $desc = ''; + break; + } + } + } + else + { + @setcookie('users_desc','no',time()+3600); + $_COOKIE['users_desc'] = 'no'; + $desc = ''; + } +} +else +{ + $desc = ($_COOKIE['users_desc']=='desc') ? 'DESC' : ''; +} +if (!isset($_COOKIE['users_sort'])) +{ + if (isset($_POST['sort'])) + { + switch($_POST['sort']) + { + case 'regdate': + { + @setcookie('users_sort','regdate',time()+3600); + $_COOKIE['users_sort'] = 'regdate'; + break; + } + case 'lastvisit': + { + @setcookie('users_sort','lastvisit',time()+3600); + $_COOKIE['users_sort'] = 'lastvisit'; + break; + } + case 'uname': + { + @setcookie('users_sort','uname',time()+3600); + $_COOKIE['users_sort'] = 'uname'; + break; + } + case 'posts': + { + @setcookie('users_sort','posts',time()+3600); + $_COOKIE['users_sort'] = 'posts'; + break; + } + } + } + else + { + @setcookie('users_sort','regdate',time()+3600); + $_COOKIE['users_sort'] = 'regdate'; + } +} +//add skin variables +$skin = array( +'ldesc' => $lng['desc'], +'desc_yes_option'=>(($_COOKIE['users_desc']=='desc') || ((isset ($_POST['desc'])) && ($_POST['desc']=='yes'))) ? 'selected="selected"' : '', +'desc_no_option'=>(($_COOKIE['users_desc']=='no') || ((isset ($_POST['desc'])) && ($_POST['desc']=='no'))) ? 'selected="selected"' : '', +'regdate_option'=>(($_COOKIE['users_sort']=='regdate') || ((isset ($_POST['sort'])) && ($_POST['sort']=='posts'))) ? 'selected="selected"' : '', +'lastvisit_option'=>(($_COOKIE['users_sort']=='lastvisit') || ((isset ($_POST['sort'])) && ($_POST['sort']=='lastvisit'))) ? 'selected="selected"' : '', +'posts_option'=>(($_COOKIE['users_sort']=='posts') || ((isset ($_POST['sort'])) && ($_POST['sort']=='posts'))) ? 'selected="selected"' : '', +'uname_option'=>(($_COOKIE['users_sort']=='uname') || ((isset ($_POST['sort'])) && ($_POST['sort']=='uname'))) ? 'selected="selected"' : '', +'lselectusers'=>$lng['sort_u_by'], +'ltitle'=>$lng['lusers'], +'lyes'=>$lng['yes'], +'lno'=>$lng['no'], +'lregdate'=>$lng['luregister'], +'llastvisit'=>$lng['lulastvisit'], +'lposts'=>$lng['posts'], +'luname'=>$lng['user_name'], +'lgo'=>$lng['lgo'] +); +$skin = array_push_associative($skin, Over::generate_header($lng['lusers'],'> '.$lng['lusers'])); +//do it! +include('./skins/'.$default_skin.'/overall_header.tpl'); +include('./skins/'.$default_skin.'/users_body.tpl'); +switch($_COOKIE['users_sort']) +{ + case 'regdate': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `regdate` $desc $limit;"; + break; + } + case 'lastvisit': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `lastvisit` $desc $limit;"; + break; + } + case 'uname': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `nick` $desc $limit;"; + break; + } + case 'posts': + { + $sql = "SELECT `u_id`,`nick`, `rank`, `regdate`, `lastvisit`, `posts` FROM `".USERS_TABLE."` WHERE `u_id`>0 ORDER BY `posts` $desc $limit;"; + break; + } +} +$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain user information.'); +while($result = mysql_fetch_array($query)) +{ + $skin = array( + 'id'=>$result['u_id'], + 'uname'=>Topic::UserName($result['nick'], $result['rank']), + 'regdate'=>date('d-m-Y, G:i',$result['regdate']), + 'lastvisit'=>($result['lastvisit']!='0') ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'], + 'posts'=>$result['posts'] + ); + include('./skins/'.$default_skin.'/users_item_add_body.tpl'); +} +$skin = array( +'option_pages'=>Over::AddPages(), +'lwith'=>$lng['with'], +'lpage'=>$lng['page'], +'lpages'=>$count +); +include('./skins/'.$default_skin.'/users_end_body.tpl'); +if($_SESSION['uid']>0) +{ + if(RANK==2) + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } +} +else +{ + $skin['pa_link']=''; +} +$stop = Over::TimeGeneration(); +$skin['queries'] = Over::ShowQueries($start, $stop); +include('./skins/'.$default_skin.'/overall_footer.tpl'); +?> diff --git a/warns.php b/warns.php new file mode 100644 index 0000000..59f08f8 --- /dev/null +++ b/warns.php @@ -0,0 +1,192 @@ + +* @link http://pioder.gim2przemysl.int.pl/dsf.html +* @license GNU GPL v3 +**/ +define('IN_uF', true); +//include files +include('./config.php'); +include('./includes/constants.php'); +include('./includes/class_db.php'); +include('./includes/class_error.php'); +//connect to database +DataBase::db_connect(); +include('./includes/sessions.php'); +include('./includes/class_user.php'); +include('./common.php'); +include('./includes/class_overall.php'); +include('./includes/class_topic.php'); +include('./includes/class_posting.php'); +include('./includes/class_forum.php'); +include('./includes/classes/secure.php'); +include('./lngs/'.Over::DefaultLang().'/main.php'); +$start = Over::TimeGeneration(); +sess_del_invalid($_SESSION['uid']); +sess_register($_SESSION['uid']); +sess_delete_old(); +foreach ($_POST as $name => $value) +{ + if ($forum_config['use_censorlist']) + { + $_POST[$name] = Secure::UseCensorlist($value); + } +} +if (!$forum_config['allow_warns']) +{ + message_forum($lng['warns_disabled'],'index.php'); +} + +$default_skin = Over::ViewSkinName(); + +switch(trim($_GET['mode'])) +{ + case 'add': + { + $uid = intval($_GET['id']); + if (User::RankAdminMod($_SESSION['uid'])=='0') + { + message_forum($lng['is_no_mod'],'warns.php?mode=view&id='.$uid); + } + $msg ='./skins/'.$default_skin.'/blank.tpl'; + if ((isset($_POST['textedit'])) and (isset($_POST['value']))) + { + if (($_POST['textedit'] !="" ) and (strlen($_POST['textedit'])>10)) + { + if ((strpos($_POST['value'],'+')!==false) or (strpos($_POST['value'],'-')!==false)) + { + $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); + User::UserAddWarn($_GET['id'],$_POST['value'] ,addslashes(strip_tags($_POST['textedit']))); + $stop = Over::TimeGeneration(); + message_forum($lng['warn_is_added'],'warns.php?mode=view&id='.$_GET['id']); + } + else + { + $message = $lng['werror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $message = $lng['perror_1']; + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + } + } + else + { + $_POST['textedit']=''; + $_POST['value']=''; + } + $nick_name = User::UserInformation($_GET['id'],'nick'); + if($nick_name=='') + { + message_forum($lng['no_user'],'index.php'); + } + //add skin variables + $skin = array( + 'f_id'=>$_GET['id'], + 'smiles'=>Post::SmilesShow(), + 'action'=>'warns.php?mode=add&id='.$_GET['id'], + //labels + 'lsmiles'=>$lng['smiles'], + 'lmsg'=>$lng['motive'], + 'ladd'=>$lng['add'], + 'ldelete'=>$lng['delete'], + 'lsave'=>$lng['save'], + 'lvalue'=>$lng['value'], + 'lreset'=>$lng['reset'], + 'lwarn'=>$lng['warn'], + 'lall_warns'=>$lng['all_warns'], + 'queries'=>Over::ShowQueries($start, Over::TimeGeneration()) + ); + $skin = array_push_associative($skin, Over::generate_header($lng['add_warn'].': '.$nick_name,'> '.$lng['add_warn'].': '.$nick_name)); + if(User::UserInformation($_SESSION['uid'],'rank')=='2') + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/warns_add_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + case 'view': + { + $uid = $_GET['id']; + $sql = "SELECT `u_id`, `nick` FROM `".USERS_TABLE."` WHERE `u_id`='$uid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information'); + $user = @mysql_fetch_array($query); + if ($user['u_id']=='') + { + message_forum($lng['no_user'],'index.php'); + } + //add skin variables + $skin = array( + 'lvalue' => $lng['value'], + 'lmotive' => $lng['motive'] + ); + $skin = array_push_associative($skin, Over::generate_header($lng['show_warns'].': '.$user['nick'],'> '.$lng['show_warns'].': '.$user['nick'])); + include('./skins/'.$default_skin.'/overall_header.tpl'); + include('./skins/'.$default_skin.'/warns_view_body.tpl'); + $sql = "SELECT * FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'"; + $query = DataBase::sql_query($sql,'GENERAL','Could not obtain user warns information'); + $result = mysql_num_rows($query); + $warns_count = 0; + while($item = mysql_fetch_array($query)) + { + $skin = array( + 'value'=>$item['value'], + 'motive'=>$item['motive'] + ); + include('./skins/'.$default_skin.'/warns_view_item_body.tpl'); + $warns_count = ($item['value']=='+') ? $warns_count + 1 : $warns_count -1; + } + $stop = Over::TimeGeneration(); + $skin = array( + 'lall_warns'=>$lng['all_warns'], + 'all_warns'=>($warns_count>0) ? ''.($warns_count*10).'%' : ''.$warns_count.'%', + 'queries'=>Over::ShowQueries($start, $stop) + ); + $user_rank = ($_SESSION['uid']>0) ? RANK : 0; + if ($user_rank>0) + { + $skin['add']=''.$lng['add_warn'].''; + } + else + { + $skin['add']=''; + } + if ($result>0) + { + $skin['no_elements']=''; + } + else + { + $skin['no_elements']='

    '.$lng['no_elements'].'!

    '; + } + if($user_rank=='2') + { + $skin['pa_link']=''.$lng['pa_link'].''; + } + else + { + $skin['pa_link']=''; + } + include('./skins/'.$default_skin.'/warns_view_end_body.tpl'); + include('./skins/'.$default_skin.'/overall_footer.tpl'); + break; + } + default: + { + $stop = Over::TimeGeneration(); + message_forum($lng['invalidmode'],'index.php'); + break; + } +} +?>