+ Censorlist was extended - added replacement parametr
+ Fixed bug with DB Size in check_script.php + Deleted a lot of indexes in check_script_data.php + Deleted cache index and forum lastpost section in cache_index.php and cache_forum.php + Fixed other bugs in warnings + Fixed pagination in search.php + Replaced DSF logo to uForum logo + Moved differend elements in skin + Added "WHOIS" option in "Admin/Mod Pool" in view topic + Fixed bug in add warnings: couldn't add warn for admin/mod git-svn-id: https://svn.pioder.pl/uf-svn/uF@29 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -57,7 +57,7 @@ switch($_GET['mode'])
|
||||
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.');
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word','[censored]')",GENERAL,'Could not add censored word.');
|
||||
$last = $last +1;
|
||||
}
|
||||
admin_message_forum($lng['words_added'],'censorlist.php');
|
||||
@@ -90,20 +90,23 @@ switch($_GET['mode'])
|
||||
if (isset($_POST['word']))
|
||||
{
|
||||
$word = strip_tags($_POST['word']);
|
||||
$replace = (strlen($_POST['replace']) > 0) ? $_POST['replace'] : '[censored]';
|
||||
$sql = "SELECT `w_id` FROM ".CENSORLIST_TABLE." ORDER BY `w_id` DESC";
|
||||
$last = DataBase::fetch(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.');
|
||||
DataBase::sql_query("INSERT INTO ".CENSORLIST_TABLE." VALUES ('$last','$word','$replace')",GENERAL,'Could not add censored word.');
|
||||
admin_message_forum($lng['word_added'],'censorlist.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST['word']='';
|
||||
$_POST['replace']='';
|
||||
$skin = array(
|
||||
'action'=>'censorlist.php?mode=addword',
|
||||
'L.main_beam'=>$lng['add_word'],
|
||||
'L.word_name'=>$lng['word_name'],
|
||||
'L.replace_to'=>$lng['replace_to'],
|
||||
'L.save'=>$lng['submit'],
|
||||
'L.reset'=>$lng['reset'],
|
||||
'L.censorlist'=>$lng['admin_censorlist']
|
||||
@@ -120,7 +123,8 @@ switch($_GET['mode'])
|
||||
{
|
||||
$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.');
|
||||
$replace = $_POST['replace'];
|
||||
DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word', `replace`='$replace' WHERE `w_id`='$wid'",GENERAL,'Could not update censored word.');
|
||||
admin_message_forum($lng['word_edited'],'censorlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
@@ -130,10 +134,12 @@ switch($_GET['mode'])
|
||||
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain censorlist words');
|
||||
$result = DataBase::fetch($query);
|
||||
$_POST['word']=$result['word'];
|
||||
$_POST['replace']=$result['replace'];
|
||||
$skin = array(
|
||||
'action'=>'censorlist.php?mode=edit&w='.$wid,
|
||||
'L.main_beam'=>$lng['edit_word'],
|
||||
'L.word_name'=>$lng['word_name'],
|
||||
'L.replace_to'=>$lng['replace_to'],
|
||||
'L.save'=>$lng['submit'],
|
||||
'L.reset'=>$lng['reset'],
|
||||
'L.censorlist'=>$lng['admin_censorlist']
|
||||
@@ -171,11 +177,12 @@ switch($_GET['mode'])
|
||||
{
|
||||
$skin = array(
|
||||
'L.word_name'=>$item['word'],
|
||||
'L.word_replacement'=>$item['replace'],
|
||||
'w_id'=>$item['w_id'],
|
||||
'L.delete'=>$lng['delete'],
|
||||
'L.edit'=>$lng['edit'],
|
||||
);
|
||||
include('./template/censorlist_word_add.tpl');
|
||||
include('./template/censorlist_list_word.tpl');
|
||||
}
|
||||
}
|
||||
include('./template/overall_footer.tpl');
|
||||
|
||||
@@ -66,6 +66,7 @@ function db_size()
|
||||
while ($result = DataBase::fetch($query))
|
||||
{
|
||||
$db_size += $result['Index_length'];
|
||||
$db_size += $result['Data_length'];
|
||||
}
|
||||
$db_size = $db_size / 1024;
|
||||
if ($db_size >=1024)
|
||||
|
||||
@@ -13,49 +13,22 @@ if ( !defined('IN_uF') )
|
||||
}
|
||||
//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/db.php'] = 'a376033f78e144f494bfc743c0be3330';
|
||||
$size_md5['../includes/emailer.php'] = 'e37b08dd3015330dcbb5d6663667b8b8';
|
||||
$size_md5['../includes/errors.php'] = '8232e119d8f59aa83050a741631803a6';
|
||||
$size_md5['../includes/classes/class_forum.php'] = '87f7ee4fdb57bdfd52179947211b7ebb';
|
||||
$size_md5['../includes/classes/class_mod.php'] = '4764f37856fc727f70b666b8d0c4ab7a';
|
||||
$size_md5['../includes/classes/class_pms.php'] = '850af92f8d9903e7a4e0559a98ecc857';
|
||||
$size_md5['../includes/misc_functions.php'] = '92c3d054835eff3d5a7f7ed731d2a3db';
|
||||
$size_md5['../includes/classes/class_posting.php'] = '9c72e0c8882794b79d65f14776a0a974';
|
||||
$size_md5['../includes/class_shoutbox.php'] = 'cd14821dab219ea06e2fd1a2df2e3582';
|
||||
$size_md5['../includes/classes/class_topic.php'] = '48f7d3043bc03e6c48a6f0ebc0f258a8';
|
||||
$size_md5['../includes/classes/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);
|
||||
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
<input type="text" name="word" style="width: 200px" value="<?= $_POST['word']; ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" class="fitem">
|
||||
<span class="fstandard"><b><?php echo $skin['L.replace_to']; ?>:</b></span>
|
||||
</td>
|
||||
<td class="fitem" >
|
||||
<textarea name="replace" style="width: 400px; height: 100px"><?= $_POST['replace']; ?></textarea>
|
||||
</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']; ?>" />
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<table class="maintable" width="<?= TABLES_WIDTH; ?>">
|
||||
<tr>
|
||||
<td width="668" height="7" class="fitem">
|
||||
<td height="7" class="fitem">
|
||||
<span class="fstandard"><?= $skin['L.word_name']; ?></span>
|
||||
</td>
|
||||
<td width="500" height="7" class="fitem">
|
||||
<span class="fstandard"><?= $skin['L.word_replacement']; ?></span>
|
||||
</td>
|
||||
<td width="40" height="7" class="fitem" align="center">
|
||||
<a href="censorlist.php?mode=edit&w=<?= $skin['w_id']; ?>" class="fstandard">
|
||||
Reference in New Issue
Block a user