Browse Source

Added files - test

git-svn-id: https://svn.pioder.pl/uf-svn/uF@11 72ec579a-5ced-4fa4-82f3-afba5d98df2f
master
pioder 15 years ago
commit
968d0b7b53
429 changed files with 15882 additions and 0 deletions
  1. +587
    -0
      admin/admin_forums.php
  2. +248
    -0
      admin/admin_groups.php
  3. +415
    -0
      admin/admin_script.php
  4. +458
    -0
      admin/admin_users.php
  5. +377
    -0
      admin/banlist.php
  6. +205
    -0
      admin/censorlist.php
  7. +197
    -0
      admin/check_script.php
  8. +64
    -0
      admin/check_script_data.php
  9. +107
    -0
      admin/forum_info.php
  10. +46
    -0
      admin/header.php
  11. +66
    -0
      admin/index.php
  12. +1
    -0
      admin/info.php
  13. +67
    -0
      admin/mass_email.php
  14. +230
    -0
      admin/smilelist.php
  15. +112
    -0
      admin/styles.php
  16. +382
    -0
      admin/template/admin_script.tpl
  17. +52
    -0
      admin/template/banlist_add_file_body.tpl
  18. +50
    -0
      admin/template/banlist_add_ip_body.tpl
  19. +50
    -0
      admin/template/banlist_add_user_body.tpl
  20. +62
    -0
      admin/template/banlist_edit_body.tpl
  21. +21
    -0
      admin/template/banlist_item_add.tpl
  22. +25
    -0
      admin/template/banlist_view_body.tpl
  23. +1
    -0
      admin/template/blank.tpl
  24. +29
    -0
      admin/template/cat_new_edit_body.tpl
  25. +35
    -0
      admin/template/censorlist_add_edit_body.tpl
  26. +30
    -0
      admin/template/censorlist_main_body.tpl
  27. +34
    -0
      admin/template/censorlist_upload_body.tpl
  28. +16
    -0
      admin/template/censorlist_view_body.tpl
  29. +17
    -0
      admin/template/censorlist_word_add.tpl
  30. +77
    -0
      admin/template/check_script.tpl
  31. +24
    -0
      admin/template/forum_category_add.tpl
  32. +22
    -0
      admin/template/forum_forum_add.tpl
  33. +69
    -0
      admin/template/forum_new_edit_body.tpl
  34. +30
    -0
      admin/template/forums_beam_body.tpl
  35. +5
    -0
      admin/template/forums_view_end_body.tpl
  36. +21
    -0
      admin/template/group_add_body.tpl
  37. +48
    -0
      admin/template/group_new_edit_body.tpl
  38. +21
    -0
      admin/template/groups_beam_body.tpl
  39. BIN
      admin/template/images/Thumbs.db
  40. BIN
      admin/template/images/body_bg.gif
  41. BIN
      admin/template/images/delete.gif
  42. BIN
      admin/template/images/delete_small.gif
  43. BIN
      admin/template/images/delete_small_active.gif
  44. BIN
      admin/template/images/dsf_logo.gif
  45. BIN
      admin/template/images/email.gif
  46. BIN
      admin/template/images/email_active.gif
  47. BIN
      admin/template/images/favicon.ico
  48. BIN
      admin/template/images/folder_new_posts.gif
  49. BIN
      admin/template/images/folder_no_new_posts.gif
  50. BIN
      admin/template/images/gg.gif
  51. BIN
      admin/template/images/gg_active.gif
  52. BIN
      admin/template/images/gg_small.gif
  53. BIN
      admin/template/images/gg_small_active.gif
  54. +15
    -0
      admin/template/images/index.html
  55. BIN
      admin/template/images/lng_Polish/Thumbs.db
  56. BIN
      admin/template/images/lng_Polish/edit_small.gif
  57. BIN
      admin/template/images/lng_Polish/edit_small_active.gif
  58. BIN
      admin/template/images/lng_Polish/inbox.gif
  59. BIN
      admin/template/images/lng_Polish/inbox_active.gif
  60. +15
    -0
      admin/template/images/lng_Polish/index.html
  61. BIN
      admin/template/images/lng_Polish/lock.gif
  62. BIN
      admin/template/images/lng_Polish/newmsg.gif
  63. BIN
      admin/template/images/lng_Polish/newmsg_active.gif
  64. BIN
      admin/template/images/lng_Polish/pm.gif
  65. BIN
      admin/template/images/lng_Polish/pm_active.gif
  66. BIN
      admin/template/images/lng_Polish/pm_small.gif
  67. BIN
      admin/template/images/lng_Polish/pm_small_active.gif
  68. BIN
      admin/template/images/lng_Polish/quote_small.gif
  69. BIN
      admin/template/images/lng_Polish/quote_small_active.gif
  70. BIN
      admin/template/images/lng_Polish/reply.gif
  71. BIN
      admin/template/images/lng_Polish/reply_active.gif
  72. BIN
      admin/template/images/lng_Polish/sentbox.gif
  73. BIN
      admin/template/images/lng_Polish/sentbox_active.gif
  74. BIN
      admin/template/images/lng_Polish/topic.gif
  75. BIN
      admin/template/images/lng_Polish/topic_active.gif
  76. BIN
      admin/template/images/lock.gif
  77. BIN
      admin/template/images/move.gif
  78. BIN
      admin/template/images/stick.gif
  79. BIN
      admin/template/images/td_beam.jpg
  80. BIN
      admin/template/images/td_beam_left.gif
  81. BIN
      admin/template/images/td_beam_right.gif
  82. BIN
      admin/template/images/td_beam_top.gif
  83. BIN
      admin/template/images/td_category.jpg
  84. BIN
      admin/template/images/td_category_left.gif
  85. BIN
      admin/template/images/td_category_right.gif
  86. BIN
      admin/template/images/td_editor.jpg
  87. BIN
      admin/template/images/unlock.gif
  88. BIN
      admin/template/images/unstick.gif
  89. BIN
      admin/template/images/wyzz/Thumbs.db
  90. BIN
      admin/template/images/wyzz/backcolor.gif
  91. BIN
      admin/template/images/wyzz/bold.gif
  92. BIN
      admin/template/images/wyzz/close.gif
  93. BIN
      admin/template/images/wyzz/copy.gif
  94. BIN
      admin/template/images/wyzz/cut.gif
  95. BIN
      admin/template/images/wyzz/downsize.gif
  96. BIN
      admin/template/images/wyzz/font.gif
  97. BIN
      admin/template/images/wyzz/forecolor.gif
  98. BIN
      admin/template/images/wyzz/headers.gif
  99. BIN
      admin/template/images/wyzz/help.gif
  100. BIN
      admin/template/images/wyzz/htmlmode.gif

+ 587
- 0
admin/admin_forums.php View File

@ -0,0 +1,587 @@
<?php
/**
* @package µForum
* @file admin/admin_forums.php
* @version 1.0.x, 30-04-2009, 12:17
* @copyright 2009(c) PioDer <pioder@wp.pl>
* @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 '<span class="fsmall">&nbsp;<br></span>';
}
$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;
}
}
?>

+ 248
- 0
admin/admin_groups.php View File

@ -0,0 +1,248 @@
<?php
/**
* @package µForum
* @file admin/admin_groups.php
* @version 1.0.x, 22-08-2007, 11:26
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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 '</table>';
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');
?>

+ 415
- 0
admin/admin_script.php View File

@ -0,0 +1,415 @@
<?php
/**
* @package µForum
* @file admin/admin_scripts.php
* @version 1.0.x, 06-07-2007, 14:59
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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 .= '<option value="'.$t['s_id'].'" selected="selected">'.$t['name'].'</option>';
}
else
{
$all .= '<option value="'.$t['s_id'].'">'.$t['name'].'</option>';
}
}
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 .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
}
else
{
$content .= '<option value="'.$i.'">'.$i.'</option>';
}
}
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 .='<option value="'.$file.'" selected="selected">'.$file.'</option>';
}
else
{
$result .='<option value="'.$file.'">'.$file.'</option>';
}
}
}
}
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');
?>

+ 458
- 0
admin/admin_users.php View File

@ -0,0 +1,458 @@
<?php
/**
* @package µForum
* @file admin/admin_users.php
* @version 1.0.x, 07-11-2008, 13:51
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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;
}
}
?>

+ 377
- 0
admin/banlist.php View File

@ -0,0 +1,377 @@
<?php
/**
* @package µForum
* @file admin/banlist.php
* @version 1.0.x, 04-05-2007, 14:17
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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&amp;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&amp;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&amp;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<count($item);$i++)
{
$ban_ip = $item[$i];
$sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$ban_uid', '$ban_ip', '$ban_motive')";
DataBase::sql_query($sql,'GENERAL','Could not update add ban.');
$bid = $bid +1;
}
admin_message_forum($lng['ban_added'],'banlist.php?mode=view');
}
else
{
$_POST['motive'] = '';
$skin = array(
'L.banlist'=>$lng['admin_banlist'],
'action'=>'banlist.php?mode=add&amp;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 '<tr><td width="'.TABLES_WIDTH.'" colspan="5" height="19"
class="fitem"><p class="fstandard" align="center">'.$lng['banlist_no_items'].'!</p></td></tr>';
}
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 '</table>';
include('./template/overall_footer.tpl');
break;
}
default:
{
header('Location: banlist.php?mode=view');
break;
}
}
?>

+ 205
- 0
admin/censorlist.php View File

@ -0,0 +1,205 @@
<?php
/**
* @package Dynamic Script Forum
* @file admin/censorlist.php
* @version 1.0.x, 17-08-2007, 13:26
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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<count($item);$i++)
{
$word = $item[$i];
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word')",'GENERAL','Could not add censored word.');
$last = $last +1;
}
admin_message_forum($lng['words_added'],'censorlist.php');
}
else
{
$skin = array(
'L.main_beam'=>$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 '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19"
class="fitem"><p class="fstandard" align="center">'.$lng['no_words'].'!</p></td></tr></table>';
}
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;
}
}
?>

+ 197
- 0
admin/check_script.php View File

@ -0,0 +1,197 @@
<?php
/**
* @package µForum
* @file admin/check_script.php
* @version 1.0.x, 16-05-2008, 20:25
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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.'&nbsp;MB';
}
else
{
$db_size = round($db_size,2);
$db_size = $db_size.'&nbsp;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.'&nbsp;MB';
}
else
{
$forum_size = round($forum_size,2);
$forum_size = $forum_size.'&nbsp;KB';
}
$count =0;
for($i=0; $i<count($script_files);$i++)
{
$actual = check_size_md5($script_files[$i]);
$rule = $size_md5[$script_files[$i]];
if ($actual!=$rule)
{
$count +=1;
}
}
$sql_version = mysqlversion();
$skin=array(
'main_beam'=>$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') ? '<font color="green">OK</font>' : ' <font color="red">Error - No OK</font>',
//mysql version
'mySQL.version'=>$sql_version,
'L.mySQL_version'=>$lng['mysql_version'],
'mySQL.value'=>($sql_version>='4.1') ? '<font color="green">OK</font>' : ' <font color="red">Error - No OK</font>',
//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])) ? '<font color="green">'.$lng['is_writable'].' - OK</font>' : '<font color="red">'.$lng['not_writable'].' Error - No OK</font>',
'cat2.name'=> $folders[1],
'cat2.value'=> (@is_writable($folders[1])) ? '<font color="green">'.$lng['is_writable'].' - OK</font>' : '<font color="red">'.$lng['not_writable'].' Error - No OK</font>',
'cat3.name'=> $folders[2],
'cat3.value'=> (!@is_writable($folders[2])) ? '<font color="green">'.$lng['not_writable'].' - OK</font>' : '<font color="red">'.$lng['is_writable'].' Error - No OK</font>',
'successfully' => ($count <1) ? '<font color="green">'.$lng['files_is_good'].' ('.count($script_files).')</font>' : '<font color="red">'.$lng['files_not_good'].$count.'</font>'
);
Admin_Over::GenerateHeader();
include('./template/check_script.tpl');
for($i=0; $i<count($script_files);$i++)
{
$actual = check_size_md5($script_files[$i]);
$rule = $size_md5[$script_files[$i]];
if (file_exists($script_files[$i]))
{
if ($actual!=$rule)
{
$skin=array(
'L.sum_rule'=>$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');
?>

+ 64
- 0
admin/check_script_data.php View File

@ -0,0 +1,64 @@
<?php
/**
* @package µForum
* @file admin/check_script_data.php
* @version 1.0.x, 04-02-2007, 14:13
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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');
?>

+ 107
- 0
admin/forum_info.php View File

@ -0,0 +1,107 @@
<?
/**
* @package µForum
* @file admin/forum_info.php
* @version 1.0.x, 27-11-2007, 15:26
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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 '
<table width="'.TABLES_WIDTH.'" class="maintable" align="center">
<tr>
<td class="fstandard">
<font color="red"><b>Could not connect to script server. Server is unavailable.</b></font>
</td>
</tr>
</table>';
$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');
?>

+ 46
- 0
admin/header.php View File

@ -0,0 +1,46 @@
<?php
/**
* @package µForum
* @file admin/header.php
* @version 1.0.x, 04-02-2007, 14:13
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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');
?>

+ 66
- 0
admin/index.php View File

@ -0,0 +1,66 @@
<?php
/**
* @package µForum
* @file admin/index.php
* @version 1.0.x, 04-02-2007, 14:13
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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 '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="../skins/'.$default_skin.'/images/favicon.ico">
<link rel="favicon" href="../skins/'.$default_skin.'/images/favicon.ico">
<title>DSF Administration</title>
<frameset rows="90,*" border="2" framespacing="0" frameborder="yes">
<frame src="header.php" name="nav" marginheight="3" scrolling="no">
<frame src="forum_info.php" name="main" marginwidth="10" marginheight="10">
</frameset>
</head>
<body>
Sorry, you browser doesn\'t support frames.
</body>
</html>
';*/
echo '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="../skins/'.$default_skin.'/images/favicon.ico">
<link rel="favicon" href="../skins/'.$default_skin.'/images/favicon.ico">
<title>&micro;Forum Administration</title>
<frameset cols="200,*" rows="*" border="2" framespacing="0" frameborder="yes">
<frame src="header.php" name="nav" marginwidth="3" marginheight="3" scrolling="auto">
<frame src="forum_info.php" name="main" marginwidth="10" marginheight="10" scrolling="auto">
</frameset>
</head>
<body>
Sorry, you browser doesn\'t support frames.
</body>
</html>
';
?>

+ 1
- 0
admin/info.php View File

@ -0,0 +1 @@
<? phpinfo(); ?>

+ 67
- 0
admin/mass_email.php View File

@ -0,0 +1,67 @@
<?php
/**
* @package µForum
* @file admin/mass_email.php
* @version 1.0.x, 17-08-2007, 13:16
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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');
?>

+ 230
- 0
admin/smilelist.php View File

@ -0,0 +1,230 @@
<?php
/**
* @package µForum
* @file admin/smilelist.php
* @version 1.0.x, 17-08-2007, 13:24
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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&amp;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<count($item);$i++)
{
$subitem = @explode(" :: ",$item[$i]);
$smile_word = $subitem[0];
$smile_url = $subitem[1];
$sql = "INSERT INTO ".SMILES_TABLE." VALUES ('$sid', '$smile_word', '$smile_url')";
DataBase::sql_query($sql,'GENERAL','Could not add smile.');
$sid = $bid +1;
}
admin_message_forum($lng['smiles_added'],'smilelist.php?mode=view');
}
else
{
$_POST['file'] = '';
$skin = array(
'L.smilelist'=>$lng['admin_smilelist'],
'action'=>'smilelist.php?mode=add&amp;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 '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19"
class="fitem"><p class="fstandard" align="center">'.$lng['smilelist_no_items'].'!</p></td></tr></table>';
}
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;
}
}
?>

+ 112
- 0
admin/styles.php View File

@ -0,0 +1,112 @@
<?php
/**
* @package µForum
* @file admin/styles.php
* @version 1.0.x, 06-12-2007, 17:32
* @copyright 2008(c) PioDer <pioder@wp.pl>
* @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 '</table>';
include('./template/overall_footer.tpl');
break;
}
default:
{
header('Location: styles.php?mode=view');
break;
}
}
?>

+ 382
- 0
admin/template/admin_script.tpl View File

@ -0,0 +1,382 @@
<form action="admin_script.php" method="POST">
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;"><br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.scriptoptions']; ?></span>
</div>
<?php include($ERROR); ?>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<!-- general preferences beam -->
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" align="center" colspan="2" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.general_preferences']; ?>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- forum path -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.forum_path']; ?>:&nbsp;&nbsp;</span><br>
<span class="fverysmall"><?= $skin['L.forum_path.D']; ?>&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" style="width: 250px" name="forum_path" value="<? echo $skin['forum_path']; ?>">
</td>
</tr>
<!-- forum name -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.forum_name']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" style="width: 250px" name="forum_name" value="<?= $skin['forum_name'] ?>" maxlength="30">
</td>
</tr>
<!-- forum description -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.forum_desc']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" style="width: 250px" name="forum_desc" value="<?= $skin['forum_desc'] ?>" maxlength="30">
</td>
</tr>
<!-- forum disabled -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.forum_disabled']; ?>:&nbsp;&nbsp;</span><br>
<span class="fverysmall"><?= $skin['L.forum_disabled.D']; ?>&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<textarea style="width: 250px" name="forum_disabled"><?= $skin['forum_disabled']; ?></textarea>
</td>
</tr>
<!-- default skin -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.default_skin']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<select name="default_skin" style="width: 150px">
<option value="-1"><?= $skin['L2.default_skin']; ?></option>
<option value="-1"></option>
<?= $skin['OPTIONS.default_skin']; ?>
</select>
</td>
</tr>
<!-- tables width -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.tables_width']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="tables_width" value="<?= $skin['OPTION.tables_width']; ?>">
</td>
</tr>
<!-- default language -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.default_lang']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<select name="default_lang" style="width: 150px">
<option value="-1"><?= $skin['L2.default_lang']; ?></option>
<option value="-1"></option>
<?= $skin['OPTIONS.default_lang']; ?>
</select>
</td>
</tr>
<!-- enable send email -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.enable_send_email']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="enable_send_email" <?= $skin['OPTION.enable_send_email']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- allow upload avatars -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.allow_upload_avatars']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="allow_upload_avatars" <?= $skin['OPTION.allow_upload_avatars']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- avatar max x -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.max_av_x']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="max_av_x" value="<?= $skin['OPTION.max_av_x']; ?>">
</td>
</tr>
<!-- avatar max y -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.max_av_y']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="max_av_y" value="<?= $skin['OPTION.max_av_y']; ?>">
</td>
</tr>
<!-- avatar max filesize -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.max_av_filesize']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="max_av_filesize" value="<?= $skin['OPTION.max_av_filesize']; ?>">
</td>
</tr>
<!-- max signature length -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.sig_len']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="sig_len" value="<?= $skin['OPTION.sig_len']; ?>">
</td>
</tr>
<!-- time antiflood -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.time_antiflood']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="time_antiflood" value="<?= $skin['OPTION.time_antiflood']; ?>">
</td>
</tr>
<!-- time antiflood -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.newpasswd_len']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="1" name="newpasswd_len" value="<?= $skin['OPTION.newpasswd_len']; ?>">
</td>
</tr>
</table>
<span class="fverysmall">&nbsp;</span>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<!-- general preferences beam -->
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" align="center" colspan="2" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.positioning']; ?>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- meta_keywords -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.meta_keywords']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" style="width: 250px" name="meta_keywords" value="<?= $skin['meta_keywords']; ?>">
</td>
</tr>
<!-- meta_description -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.meta_description']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" style="width: 250px" name="meta_description" value="<?= $skin['meta_description']; ?>">
</td>
</tr>
</table>
<span class="fverysmall">&nbsp;</span>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<!-- general preferences beam -->
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" align="center" colspan="2" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.other']; ?>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- view time generation -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.time_generation']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="allow_time_generation" <?= $skin['OPTION.time_generation']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- topics in forum -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.topics_in_forum']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<select name="limit_ftid" style="width: 150px">
<option value="-1"><?= $skin['L.select_value']; ?></option>
<option value="-1"></option>
<?= $skin['OPTIONS.limit_ftid']; ?>
</select>
</td>
</tr>
<!-- posts in topic -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.posts_in_topic']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<select name="limit_tpid" style="width: 150px">
<option value="-1"><?= $skin['L.select_value']; ?></option>
<option value="-1"></option>
<?= $skin['OPTIONS.limit_tpid']; ?>
</select>
</td>
</tr>
<!-- limit users -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.limit_users']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<select name="limit_users" style="width: 150px">
<option value="-1"><?= $skin['L.select_value']; ?></option>
<option value="-1"></option>
<?= $skin['OPTIONS.limit_users']; ?>
</select>
</td>
</tr>
</table>
<span class="fverysmall">&nbsp;</span>
<table class="maintable" style="border-width:0px" width="<?= TABLES_WIDTH; ?>">
<!-- general preferences beam -->
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" align="center" colspan="2" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.shoutbox']; ?>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- allow shoutbox-->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.allow_shoutbox']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="allow_shoutbox" <?= $skin['OPTION.allow_shoutbox']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- posts in topic -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.shoutbox_limit']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="4" name="shoutbox_limit" value="<?= $skin['OPTION.shoutbox_limit']; ?>">
</td>
</tr>
<!-- posts in topic -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.shoutbox_max_time']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="10" name="shoutbox_max_time" value="<?= $skin['OPTION.shoutbox_max_time']; ?>">
</td>
</tr>
</table>
<span class="fverysmall">&nbsp;</span>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<!-- admin mod beam -->
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" align="center" colspan="2" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.admin_mod']; ?>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- color mod -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.color_mod']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="8" name="color_mod" value="<?= $skin['OPTION.color_mod']; ?>">
</td>
</tr>
<!-- color admin -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.color_admin']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="text" maxlength="8" name="color_admin" value="<?= $skin['OPTION.color_admin']; ?>">
</td>
</tr>
<!-- enable warnings in topic -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.warnings_in_topic']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="warnings_in_topic" <?= $skin['OPTION.warnings_in_topic']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- allow IP for mods -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.allow_ip_for_mods']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="allow_ip_for_mods" <?= $skin['OPTION.allow_ip_for_mods']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- enable confirms -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.enable_confirms']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="enable_confirms" <?= $skin['OPTION.enable_confirms']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- enable censor list -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.enable_censorlist']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="enable_censorlist" <?= $skin['OPTION.enable_censorlist']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- enable warnings -->
<tr>
<td class="fitem" align="right" width="50%" height="19">
<span class="fstandard"><?= $skin['L.enable_warnings']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="50%" height="19">
<input type="checkbox" name="enable_warnings" <?= $skin['OPTION.enable_warnings']; ?> value="1"><span class="fstandard"><b><?= $skin['L.allow']; ?></b></span>
</td>
</tr>
<!-- submit / reset pool -->
<tr>
<tr>
<td class="fitem" colspan="2" align="center" height="19">
<input type="submit" name="submit" value="<?= $skin['L.submit']; ?>" class="fbutton">
<input type="reset" name="reset" value="<?= $skin['L.reset']; ?>" class="fbutton">
</td>
</tr>
</form>
</table>

+ 52
- 0
admin/template/banlist_add_file_body.tpl View File

@ -0,0 +1,52 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.banlist']; ?></span>
</div>
<form action="<?= $skin['action']; ?>" method="POST">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.edit_ban']; ?></p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- file url -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?php echo $skin['L.file_name']; ?>:</b></span>
</td>
<td class="fitem">
<input type="hidden" name="MAX_FILE_SIZE" value="52000">
<input type="file" name="file">
</td>
<td class="fitem">
<span class="fsmall"><?= $skin['L.file.HELP']; ?></span>
</td>
</tr>
<!-- edit motive -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?= $skin['L.motive']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="motive" style="width: 200px" value="<?= $_POST['motive']; ?>">
</td>
<td class="fitem">
&nbsp;
</td>
</tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="3">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 50
- 0
admin/template/banlist_add_ip_body.tpl View File

@ -0,0 +1,50 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.banlist']; ?></span>
</div>
<form action="<?= $skin['action']; ?>" method="POST">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.edit_ban']; ?></p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- edit IP --->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b>IP:</b></span>
</td>
<td class="fitem">
<input type="text" name="ip" style="width: 200px" value="<?= $_POST['ip']; ?>">
</td>
<td class="fitem">
<span class="fsmall"><?= $skin['L.ip.HELP']; ?></span>
</td>
</tr>
<!-- edit motive -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?= $skin['L.motive']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="motive" style="width: 200px" value="<?= $_POST['motive']; ?>">
</td>
<td class="fitem">
&nbsp;
</td>
</tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="3">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 50
- 0
admin/template/banlist_add_user_body.tpl View File

@ -0,0 +1,50 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.banlist']; ?></span>
</div>
<form action="<?= $skin['action']; ?>" method="POST">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.edit_ban']; ?></p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- edit user name -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?php echo $skin['L.user_name']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="u_id" style="width: 200px" value="<?= $_POST['u_id']; ?>">
</td>
<td class="fitem">
<span class="fsmall"><?= $skin['L.user_name.HELP']; ?></span>
</td>
</tr>
<!-- edit motive -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?= $skin['L.motive']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="motive" style="width: 200px" value="<?= $_POST['motive']; ?>">
</td>
<td class="fitem">
&nbsp;
</td>
</tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="3">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 62
- 0
admin/template/banlist_edit_body.tpl View File

@ -0,0 +1,62 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.banlist']; ?></span>
</div>
<form action="<?= $skin['action']; ?>" method="POST">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.edit_ban']; ?></p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<!-- edit IP --->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b>IP:</b></span>
</td>
<td class="fitem">
<input type="text" name="ip" style="width: 200px" value="<?= $_POST['ip']; ?>">
</td>
<td class="fitem">
<span class="fsmall"><?= $skin['L.ip.HELP']; ?></span>
</td>
</tr>
<!-- edit user name -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?php echo $skin['L.user_name']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="u_id" style="width: 200px" value="<?= $_POST['u_id']; ?>">
</td>
<td class="fitem">
<span class="fsmall"><?= $skin['L.user_name.HELP']; ?></span>
</td>
</tr>
<!-- edit motive -->
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?= $skin['L.motive']; ?>:</b></span>
</td>
<td class="fitem">
<input type="text" name="motive" style="width: 200px" value="<?= $_POST['motive']; ?>">
</td>
<td class="fitem">
&nbsp;
</td>
</tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="3">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 21
- 0
admin/template/banlist_item_add.tpl View File

@ -0,0 +1,21 @@
<tr>
<td width="100" height="7" class="fitem" align="center">
<span class="fstandard"><?= $skin['user_name']; ?></span>
</td>
<td width="488" height="7" class="fitem" align="center">
<span class="fstandard"><?= $skin['motive'];?></span>
</td>
<td width="120" height="7" class="fitem" align="center">
<span class="fstandard"><?= $skin['ip'];?></span>
</td>
<td width="40" height="7" class="fitem" align="center">
<a href="banlist.php?mode=edit&id=<?= $skin['b_id']; ?>" class="fstandard">
<font color="brown"><?= $skin['L.edit'];?></font>
</a>
</td>
<td width="40" height="7" class="fitem" align="center">
<a href="banlist.php?mode=delete&id=<?= $skin['b_id']; ?>" class="fstandard">
<font color="brown"><b><?= $skin['L.delete'];?></b></font>
</a>
</td>
</tr>

+ 25
- 0
admin/template/banlist_view_body.tpl View File

@ -0,0 +1,25 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.banlist']; ?></span>
</div>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.select_mode']; ?>?</p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td align="center" colspan="5" style="color: brown">
<a href="banlist.php?mode=add&amp;submode=user" class="fsmall"><b><font color="brown"><?= $skin['L.add_user']; ?></font></b></a>
&#8226;&nbsp;<a href="banlist.php?mode=add&amp;submode=ip" class="fsmall"><b><font color="brown"><?= $skin['L.add_ip']; ?></font></b></a>
&#8226;&nbsp;<a href="banlist.php?mode=add&amp;submode=all" class="fsmall"><b><font color="brown"><?= $skin['L.add_all']; ?></font></b></a>
&#8226;&nbsp;<a href="banlist.php?mode=add&amp;submode=file" class="fsmall"><b><font color="brown"><?= $skin['L.add_file']; ?></font></b></a>
&#8226;&nbsp;<a href="banlist.php?mode=clear" class="fsmall"><b><font color="brown"><?= $skin['L.clean_banlist']; ?></font></b></a>
</td>

+ 1
- 0
admin/template/blank.tpl View File

@ -0,0 +1 @@

+ 29
- 0
admin/template/cat_new_edit_body.tpl View File

@ -0,0 +1,29 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['forums&cats']; ?></span>
</div>
<?php include $msg; ?>
<form method="POST" action="<? echo $skin['action']; ?>" name="form_dsf">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td colspan="3" height="14" class="beam" style="background-image: url('template/images/td_beam_top.gif')"><?= $skin['L.main_beam']; ?></td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td align="right" class="fitem"><span class="fstandard"><b><?php echo $skin['L.cat_name']; ?>:</b></span></td>
<td class="fitem" >
<input type="text" name="cat_name" style="width: 410px" maxlength="30" value="<?= $_POST['cat_name']; ?>" size="20"></td>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="2">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="submit" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />
</td>
</tr>
</table>
</form>

+ 35
- 0
admin/template/censorlist_add_edit_body.tpl View File

@ -0,0 +1,35 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.censorlist']; ?></span>
</div>
<form action="<?= $skin['action']; ?>" method="POST" enctype="multipart/form-data">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.main_beam']; ?>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td align="right" class="fitem">
<span class="fstandard"><b><?php echo $skin['L.word_name']; ?>:</b></span>
</td>
<td class="fitem" >
<input type="text" name="word" style="width: 200px" value="<?= $_POST['word']; ?>">
</td>
</tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="2">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 30
- 0
admin/template/censorlist_main_body.tpl View File

@ -0,0 +1,30 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.censorlist']; ?></span>
</div>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.what_do_you_want']; ?>?</p>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td class="fitem" align="center"><a href="censorlist.php?mode=view" class="fsmall" style="font-weight: bold"><?= $skin['L.show_all_words']; ?></a></td>
</td>
<tr>
<td class="fitem" align="center"><a href="censorlist.php?mode=deleteall" class="fsmall" style="font-weight: bold"><?= $skin['L.delete_all_words']; ?></a></td>
</td>
<tr>
<td class="fitem" align="center"><a href="censorlist.php?mode=addfile" class="fsmall" style="font-weight: bold"><?= $skin['L.add_from_file']; ?></a></td>
</td>
<tr>
<td class="fitem" align="center"><a href="censorlist.php?mode=addword" class="fsmall" style="font-weight: bold"><?= $skin['L.add_word']; ?></a></td>
</td>
</table>

+ 34
- 0
admin/template/censorlist_upload_body.tpl View File

@ -0,0 +1,34 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.censorlist']; ?></span>
</div>
<form action="censorlist.php?mode=addfile" method="POST" enctype="multipart/form-data">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.main_beam']; ?>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td align="right" class="fitem"><span class="fstandard"><b><?php echo $skin['L.file_name']; ?>:</b></span></td>
<td class="fitem" >
<input type="hidden" name="MAX_FILE_SIZE" value="52000">
<input type="file" name="file">
</td>
<td class="fitem">&nbsp;</td></tr>
<tr>
<td width="738" height="20" class="fitem" align="center" valign="top" colspan="3">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />&nbsp;
</td>
</tr>
</table>
</form>

+ 16
- 0
admin/template/censorlist_view_body.tpl View File

@ -0,0 +1,16 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.censorlist']; ?></span>
</div>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<p align="center"><?= $skin['L.view_all_words']; ?>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>

+ 17
- 0
admin/template/censorlist_word_add.tpl View File

@ -0,0 +1,17 @@
<table class="maintable" width="<?= TABLES_WIDTH; ?>">
<tr>
<td width="668" height="7" class="fitem">
<span class="fstandard"><?= $skin['L.word_name']; ?></span>
</td>
<td width="40" height="7" class="fitem" align="center">
<a href="censorlist.php?mode=edit&w=<?= $skin['w_id']; ?>" class="fstandard">
<font color="brown"><?= $skin['L.edit'];?></font>
</a>
</td>
<td width="40" height="7" class="fitem" align="center">
<a href="censorlist.php?mode=delete&&w=<?= $skin['w_id']; ?>" class="fstandard">
<font color="brown"><b><?= $skin['L.delete'];?></b></font>
</a>
</td>
</tr>
</table>

+ 77
- 0
admin/template/check_script.tpl View File

@ -0,0 +1,77 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['main_beam']; ?></span>
</div>
<? include $ERROR; ?>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td height="14" colspan="2" class="beam" style="background-image: url('template/images/td_beam_top.gif')"><?= $skin['main_beam']; ?></td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.php_version']; ?> (<?= $skin['PHP.version']?>):&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['PHP.value'] ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.mySQL_version']; ?> (<?= $skin['mySQL.version']?>):&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['mySQL.value'] ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.db_size']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['db_size']; ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.forum_size']; ?>:&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['forum_size']; ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.cat_name']; ?> (<?= $skin['cat1.name']?>):&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['cat1.value'] ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.cat_name']; ?> (<?= $skin['cat2.name']?>):&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['cat2.value'] ?></b></span>
</td>
<tr>
<td class="fitem" align="right" width="40%" height="19">
<span class="fstandard"><?= $skin['L.cat_name']; ?> (<?= $skin['cat3.name']?>):&nbsp;&nbsp;</span>
</td>
<td class="fitem" width="60%" height="19">
<span class="fstandard"><b><?= $skin['cat3.value'] ?></b></span>
</td>
</tr>
<tr>
<td class="fitem" align="left" width="100%" height="19" colspan="2">
<span class="fstandard"><b><?= $skin['successfully']; ?></b></span>
</td>
</tr>
</table>

+ 24
- 0
admin/template/forum_category_add.tpl View File

@ -0,0 +1,24 @@
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="14" height="7" style="background-image: url('template/images/td_category_left.gif')" class="category"></td>
<td height="7" width="540" class="category" style="background-image: url('template/images/td_category.jpg')">
<a href="admin_forums.php?mode=edit&submode=cat&c=<?= $skin['c_id']; ?>" title="<?= $lng['edit_cat']; ?>">
<span class="fstandard" style="color: white"><? echo $skin['category']; ?></span></a>
</td>
<td width="48" height="7" class="category" style="background-image: url('template/images/td_category.jpg')">
<a href="javascript:confirm_action('<?= $skin['del_cat']; ?>','admin_forums.php?mode=delete&submode=cat&c=<?= $skin['c_id']; ?>') " class="fstandard">
<font color="white"><?= $skin['delete'];?></font>
</a>
</td>
<td class="category" style="background-image: url('template/images/td_category.jpg')">
<a href="admin_forums.php?mode=moveup&submode=cat&c=<?= $skin['c_id'] ?>" class="fstandard">
<font color="white"><?= $skin['move_up']; ?></font>
</a>
<span class="fstandard"><font color="white"> || </font></span>
<a href="admin_forums.php?mode=movedown&submode=cat&c=<?= $skin['c_id'] ?>" class="fstandard">
<font color="white"><?= $skin['move_down']; ?></font>
</a>
</td>
<td width="14" height="7" style="background-image: url('template/images/td_category_right.gif')" class="category"></td>
</tr>
</table>

+ 22
- 0
admin/template/forum_forum_add.tpl View File

@ -0,0 +1,22 @@
<table class="maintable" style="border-top: 0px; border-bottom: 1px" width="<?= TABLES_WIDTH; ?>">
<tr>
<td width="585" height="1" class="fitem" onMouseOver="set_color(this);" onMouseOut="unset_color(this);">
<a href="admin_forums.php?mode=edit&submode=forum&f=<?= $skin['forum_id']; ?>" class="sect" title="<?= $skin['edit_forum']; ?>"><?= $skin['forum_name']; ?></a><br>
<span class="desc"><? echo $skin['description']; ?></span>
</td>
<td width="48" height="1" class="fitem" onMouseOver="set_color(this);" onMouseOut="unset_color(this);">
<a href="javascript:confirm_action('<?= $skin['del_forum']; ?>','admin_forums.php?mode=delete&submode=forum&f=<?= $skin['forum_id']; ?>')" class="fstandard">
<font color="brown"><?= $skin['delete'];?></font>
</a>
</td>
<td width="109" height="1" class="fitem" align="center" onMouseOver="set_color(this);" onMouseOut="unset_color(this);">
<a href="admin_forums.php?mode=moveup&submode=forum&f=<?= $skin['forum_id'] ?>" class="fstandard">
<font color="brown"><?= $skin['move_up']; ?></font>
</a>
<span class="fstandard"><font color="brown"> || </font></span>
<a href="admin_forums.php?mode=movedown&submode=forum&f=<?= $skin['forum_id'] ?>" class="fstandard">
<font color="brown"><?= $skin['move_down']; ?></font>
</a>
</td>
</tr>
</table>

+ 69
- 0
admin/template/forum_new_edit_body.tpl View File

@ -0,0 +1,69 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['forums&cats']; ?></span>
</div>
<?php include $msg; ?>
<form method="POST" action="<? echo $skin['action']; ?>" name="form_dsf">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td colspan="3" height="14" class="beam" style="background-image: url('template/images/td_beam_top.gif')"><?= $skin['L.main_beam']; ?></td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td width="180" height="16" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?= $skin['L.forum_name']; ?>:</b></span>
</td>
<td width="388" height="16" class="fitem" align="left" valign="top">
<input type="text" style="width: 345px" name="forum_name" value="<?= $_POST['forum_name']; ?>" maxlength="30">
</td>
</tr>
<tr>
<td width="180" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?php echo $skin['L.forum_desc']; ?>:</b></span></td>
<td width="388" class="fitem" align="left" valign="top">
<textarea name="forum_desc" style="width: 345px" rows="3" cols="40" maxlength="100"><?= $_POST['forum_desc']; ?></textarea><br>
</td>
</tr>
<tr>
<td width="180" height="16" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?= $skin['L.change_cat']; ?>:</b></span>
</td>
<td width="388" height="16" class="fitem" align="left" valign="top">
<select name="forum_cat">
<?= $skin['OPTIONS.forum_cat']; ?>
</select>
</td>
</tr>
<tr>
<td width="180" height="16" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?= $skin['L.forum_locked']; ?>:</b></span>
</td>
<td width="388" height="16" class="fitem" align="left" valign="top">
<input type="checkbox" name="forum_locked" <?= $skin['OPTION.forum_locked']; ?> >
<span class="fstandard"><b><?= $skin['on']; ?></b></span>
</td>
</tr>
<tr>
<td width="180" height="16" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?= $skin['L.allow_moderate']; ?>:</b></span>
</td>
<td width="388" height="16" class="fitem" align="left" valign="top">
<input type="checkbox" name="allow_moderate" <?= $skin['OPTION.allow_moderate']; ?>>
<span class="fstandard"><b><?= $skin['on']; ?></b></span>
</td>
</tr>
<tr>
<td colspan="2" class="fitem" align="center">
<input type="hidden" name="last_cid" value="<?= $_POST['last_cid']; ?>">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="reset" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />
</td>
</tr>
</table>
</form>

+ 30
- 0
admin/template/forums_beam_body.tpl View File

@ -0,0 +1,30 @@
<script type="text/javascript" language="JavaScript">
function confirm_action(c_name, url)
{
<? if($forum_config['enable_confirms']) {?>if (confirm(c_name))
{
document.location = url;
}
<? } else { ?> document.location = url; <? } echo "\n"; ?>
}
function set_color(element)
{
element.style.backgroundColor='#F1F3FE';
}
function unset_color(element)
{
element.style.backgroundColor='';
}
</script>
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['forums&cats']; ?></span>
<form action="admin_forums.php?mode=new&amp;submode=forum" method="POST">
<input type="text" name="forum_name" maxlength="25" value="<?= $skin['here_write_name_forum']; ?>">&nbsp;
<input type="submit" class="fbutton" value="<?= $skin['new_forum_submit']; ?>">
</form>
</div>

+ 5
- 0
admin/template/forums_view_end_body.tpl View File

@ -0,0 +1,5 @@
<div align="left" style="width: <?= TABLES_WIDTH; ?>">
<form action="admin_forums.php?mode=new&submode=cat" method="POST">
<input type="text" name="cat_name" maxlength="25" value="<?= $skin['here_write_name_cat']; ?>">&nbsp;
<input type="submit" class="fbutton" value="<?= $skin['new_cat_submit']; ?>">
</form>

+ 21
- 0
admin/template/group_add_body.tpl View File

@ -0,0 +1,21 @@
<tr>
<td width="680" class="fitem">
<a href="admin_groups.php?mode=edit&amp;id=<?= $skin['g_id']; ?>"><span class="fstandard"><b><?= $skin['name']; ?></b></span></a><br>
<span class="fsmall"><?= $skin['desc']; ?></span>
</td>
<td width="48" class="fitem">
<a href="javascript:confirm_action('<?= $skin['c_delete']; ?>','admin_groups.php?mode=delete&id=<?= $skin['g_id']; ?>')" class="fstandard">
<font color="brown"><?= $skin['delete'];?></font>
</a>
</td>
<td width="120" class="fitem">
<a href="admin_groups.php?mode=moveup&amp;id=<?= $skin['g_id'] ?>" class="fstandard">
<font color="brown"><?= $skin['move_up']; ?></font>
</a>
<span class="fstandard"><font color="brown"> || </font></span>
<a href="admin_groups.php?mode=movedown&amp;id=<?= $skin['g_id'] ?>" class="fstandard">
<font color="brown"><?= $skin['move_down']; ?></font>
</a>
</td>
</tr>

+ 48
- 0
admin/template/group_new_edit_body.tpl View File

@ -0,0 +1,48 @@
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.groups']; ?></span>
</div>
<?php include $msg; ?>
<form method="POST" action="<? echo $skin['action']; ?>" name="form_dsf">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
<?= $skin['L.main_beam']; ?>
</td>
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
</tr>
</table>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td width="180" height="16" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?= $skin['L.group_name']; ?>:</b></span>
</td>
<td width="388" height="16" class="fitem" align="left" valign="top">
<input type="text" style="width: 345px" name="group_name" value="<?= $_POST['group_name']; ?>">
</td>
</tr>
<tr>
<td width="180" class="fitem" align="right" valign="top">
<span class="fstandard"><b><?php echo $skin['L.group_desc']; ?>:</b></span></td>
<td width="388" class="fitem" align="left" valign="top">
<textarea name="group_desc" rows="3" cols="40" style="width: 345px"><?= $_POST['group_desc']; ?></textarea><br>
</td>
</tr>
<tr>
<td align="right" class="fitem"><span class="fstandard"><b><?php echo $skin['L.group_mod']; ?>:</b></span></td>
<td class="fitem" >
<input type="text" name="group_mod" style="width: 345px" maxlength="30" value="<?= $_POST['group_mod']; ?>" size="20">
</td>
</tr>
<tr>
<td colspan="2" class="fitem" align="center">
<input type="submit" class="fbutton" value="<?php echo $skin['L.save']; ?>" />&nbsp;
<input type="submit" class="fbutton" value="<?php echo $skin['L.reset']; ?>" />
</td>
</tr>
</table>
</form>

+ 21
- 0
admin/template/groups_beam_body.tpl View File

@ -0,0 +1,21 @@
<script type="text/javascript" language="JavaScript">
function confirm_action(c_name, url)
{
<? if($forum_config['enable_confirms']) {?>if (confirm(c_name))
{
document.location = url;
}
<? } else { ?> document.location = url; <? } echo "\n"; ?>
}
</script>
<center>
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<br>
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
<span class="pa_sect"><?= $skin['L.groups']; ?></span>
<form action="admin_groups.php?mode=add" method="POST">
<input type="submit" class="fbutton" value="<?= $skin['L.new_group']; ?>">
</form>
</div>
<table class="maintable" width="<?= TABLES_WIDTH; ?>">

BIN
admin/template/images/Thumbs.db View File


BIN
admin/template/images/body_bg.gif View File

Before After
Width: 3  |  Height: 3  |  Size: 45 B

BIN
admin/template/images/delete.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 911 B

BIN
admin/template/images/delete_small.gif View File

Before After
Width: 17  |  Height: 17  |  Size: 634 B

BIN
admin/template/images/delete_small_active.gif View File

Before After
Width: 17  |  Height: 17  |  Size: 1.2 KiB

BIN
admin/template/images/dsf_logo.gif View File

Before After
Width: 246  |  Height: 130  |  Size: 9.4 KiB

BIN
admin/template/images/email.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 1.9 KiB

BIN
admin/template/images/email_active.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 2.7 KiB

BIN
admin/template/images/favicon.ico View File

Before After

BIN
admin/template/images/folder_new_posts.gif View File

Before After
Width: 20  |  Height: 25  |  Size: 1.8 KiB

BIN
admin/template/images/folder_no_new_posts.gif View File

Before After
Width: 20  |  Height: 25  |  Size: 1.4 KiB

BIN
admin/template/images/gg.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 1.9 KiB

BIN
admin/template/images/gg_active.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 2.6 KiB

BIN
admin/template/images/gg_small.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 1.5 KiB

BIN
admin/template/images/gg_small_active.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 2.0 KiB

+ 15
- 0
admin/template/images/index.html View File

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled</title>
<meta http-equiv="refresh" content="0; url=../../../index.php" />
</head>
<body>
<p>
</p>
</body>
</html>

BIN
admin/template/images/lng_Polish/Thumbs.db View File


BIN
admin/template/images/lng_Polish/edit_small.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 1.4 KiB

BIN
admin/template/images/lng_Polish/edit_small_active.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 2.0 KiB

BIN
admin/template/images/lng_Polish/inbox.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.7 KiB

BIN
admin/template/images/lng_Polish/inbox_active.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 3.4 KiB

+ 15
- 0
admin/template/images/lng_Polish/index.html View File

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled</title>
<meta http-equiv="refresh" content="0; url=../../../index.php" />
</head>
<body>
<p>
</p>
</body>
</html>

BIN
admin/template/images/lng_Polish/lock.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.8 KiB

BIN
admin/template/images/lng_Polish/newmsg.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.8 KiB

BIN
admin/template/images/lng_Polish/newmsg_active.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 3.5 KiB

BIN
admin/template/images/lng_Polish/pm.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 1.9 KiB

BIN
admin/template/images/lng_Polish/pm_active.gif View File

Before After
Width: 70  |  Height: 20  |  Size: 2.7 KiB

BIN
admin/template/images/lng_Polish/pm_small.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 1.5 KiB

BIN
admin/template/images/lng_Polish/pm_small_active.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 2.0 KiB

BIN
admin/template/images/lng_Polish/quote_small.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 1.5 KiB

BIN
admin/template/images/lng_Polish/quote_small_active.gif View File

Before After
Width: 50  |  Height: 15  |  Size: 2.0 KiB

BIN
admin/template/images/lng_Polish/reply.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.8 KiB

BIN
admin/template/images/lng_Polish/reply_active.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 3.5 KiB

BIN
admin/template/images/lng_Polish/sentbox.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.8 KiB

BIN
admin/template/images/lng_Polish/sentbox_active.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 3.4 KiB

BIN
admin/template/images/lng_Polish/topic.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 2.8 KiB

BIN
admin/template/images/lng_Polish/topic_active.gif View File

Before After
Width: 90  |  Height: 30  |  Size: 4.1 KiB

BIN
admin/template/images/lock.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 900 B

BIN
admin/template/images/move.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 881 B

BIN
admin/template/images/stick.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 910 B

BIN
admin/template/images/td_beam.jpg View File

Before After
Width: 1  |  Height: 19  |  Size: 333 B

BIN
admin/template/images/td_beam_left.gif View File

Before After
Width: 19  |  Height: 19  |  Size: 648 B

BIN
admin/template/images/td_beam_right.gif View File

Before After
Width: 19  |  Height: 19  |  Size: 648 B

BIN
admin/template/images/td_beam_top.gif View File

Before After
Width: 1  |  Height: 19  |  Size: 139 B

BIN
admin/template/images/td_category.jpg View File

Before After
Width: 1  |  Height: 17  |  Size: 697 B

BIN
admin/template/images/td_category_left.gif View File

Before After
Width: 17  |  Height: 17  |  Size: 985 B

BIN
admin/template/images/td_category_right.gif View File

Before After
Width: 17  |  Height: 17  |  Size: 664 B

BIN
admin/template/images/td_editor.jpg View File

Before After
Width: 1  |  Height: 30  |  Size: 407 B

BIN
admin/template/images/unlock.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 890 B

BIN
admin/template/images/unstick.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 899 B

BIN
admin/template/images/wyzz/Thumbs.db View File


BIN
admin/template/images/wyzz/backcolor.gif View File

Before After
Width: 20  |  Height: 19  |  Size: 894 B

BIN
admin/template/images/wyzz/bold.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 76 B

BIN
admin/template/images/wyzz/close.gif View File

Before After
Width: 9  |  Height: 9  |  Size: 56 B

BIN
admin/template/images/wyzz/copy.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 381 B

BIN
admin/template/images/wyzz/cut.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 353 B

BIN
admin/template/images/wyzz/downsize.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 88 B

BIN
admin/template/images/wyzz/font.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 908 B

BIN
admin/template/images/wyzz/forecolor.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 174 B

BIN
admin/template/images/wyzz/headers.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 930 B

BIN
admin/template/images/wyzz/help.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 930 B

BIN
admin/template/images/wyzz/htmlmode.gif View File

Before After
Width: 20  |  Height: 20  |  Size: 79 B

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save