mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r475
Fix при удаление шаблона в admin_topic_templates.php (Gemini_13) Убираем стрелку в Коммент viewtopic.tpl Пропустил ланг. Ну и мелкие фиксы git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@475 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
5b718d4428
commit
b73027fc20
16 changed files with 278 additions and 268 deletions
|
@ -190,7 +190,7 @@ switch($mode)
|
|||
case 'delete':
|
||||
delete_jobs($job_id);
|
||||
|
||||
$message = $lang['JOB_REMOVED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_JOBS'], "<a href=\"admin_cron.php?mode=list\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['JOB_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_JOBS'], '<a href="admin_cron.php?mode=list">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ if( isset($_POST['add_name']) )
|
|||
$result = DB()->sql_query( $sql );
|
||||
if ( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Could not add disallowed user.", '',__LINE__, __FILE__, $sql);
|
||||
}
|
||||
$message = $lang['DISALLOW_SUCCESSFUL'];
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ else if( isset($_POST['delete_name']) )
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", '',__LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message .= $lang['DISALLOWED_DELETED'] .'<br /><br />'. sprintf($lang['CLICK_RETURN_DISALLOWADMIN'], '<a href="admin_disallow.php">', '</a>') .'<br /><br />'. sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
@ -66,7 +66,7 @@ $sql = "SELECT * FROM " . BB_DISALLOW;
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
|
||||
message_die(GENERAL_ERROR, "Couldn't get disallowed users.", '', __LINE__, __FILE__, $sql );
|
||||
}
|
||||
|
||||
$disallowed = DB()->sql_fetchrowset($result);
|
||||
|
@ -93,7 +93,7 @@ $disallow_select .= '</select>';
|
|||
|
||||
$template->assign_vars(array(
|
||||
'S_DISALLOW_SELECT' => $disallow_select,
|
||||
'S_FORM_ACTION' => 'admin_disallow.php',
|
||||
'S_FORM_ACTION' => "admin_disallow.php",
|
||||
));
|
||||
|
||||
print_page('admin_disallow.tpl', 'admin');
|
||||
|
|
|
@ -125,22 +125,22 @@ if ($mode)
|
|||
$catlist = get_list('category', $cat_id, TRUE);
|
||||
$forumlocked = $forumunlocked = '';
|
||||
|
||||
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
|
||||
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = 'selected="selected"' : $forumunlocked = 'selected="selected"';
|
||||
|
||||
// These two options ($lang['STATUS_UNLOCKED'] and $lang['STATUS_LOCKED']) seem to be missing from
|
||||
// the language files.
|
||||
$lang['STATUS_UNLOCKED'] = isset($lang['STATUS_UNLOCKED']) ? $lang['STATUS_UNLOCKED'] : 'Unlocked';
|
||||
$lang['STATUS_LOCKED'] = isset($lang['STATUS_LOCKED']) ? $lang['STATUS_LOCKED'] : 'Locked';
|
||||
|
||||
$statuslist = "<option value=\"" . FORUM_UNLOCKED . "\" $forumunlocked>" . $lang['STATUS_UNLOCKED'] . "</option>\n";
|
||||
$statuslist .= "<option value=\"" . FORUM_LOCKED . "\" $forumlocked>" . $lang['STATUS_LOCKED'] . "</option>\n";
|
||||
$statuslist = '<option value="' . FORUM_UNLOCKED . '" '. $forumunlocked .'>' . $lang['STATUS_UNLOCKED'] . '</option>\n';
|
||||
$statuslist .= '<option value="' . FORUM_LOCKED . '" '. $forumlocked .'>' . $lang['STATUS_LOCKED'] . '</option>\n';
|
||||
|
||||
$forum_display_sort_list = get_forum_display_sort_option($forum_display_sort, 'list', 'sort');
|
||||
$forum_display_order_list = get_forum_display_sort_option($forum_display_order, 'list', 'order');
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode .'" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
|
||||
$s_parent = '<option value="-1"> '. $lang['SF_NO_PARENT'] ."</option>\n";
|
||||
$s_parent = '<option value="-1"> '. $lang['SF_NO_PARENT'] .'</option>\n';
|
||||
$sel_forum = ($forum_parent && !isset($_REQUEST['forum_parent'])) ? $forum_id : $forum_parent;
|
||||
$s_parent .= sf_get_list('forum', $forum_id, $sel_forum);
|
||||
|
||||
|
@ -161,8 +161,8 @@ if ($mode)
|
|||
'SHOW_ON_INDEX_CLASS' => (!$forum_parent) ? 'hidden' : '',
|
||||
'TPL_SELECT' => get_select('forum_tpl', $forum_tpl_id, 'html', $lang['TEMPLATE_DISABLE']),
|
||||
'ALLOW_REG_TRACKER' => build_select('allow_reg_tracker', array($lang['DISALLOWED'] => 0, $lang['ALLOWED'] => 1), $allow_reg_tracker),
|
||||
'ALLOW_PORNO_TOPIC' => build_select('allow_porno_topic', array($lang['NO'] => 0, $lang['YES'] => 1), $allow_porno_topic),
|
||||
'SELF_MODERATED' => build_select('self_moderated', array($lang['NO'] => 0, $lang['YES'] => 1), $self_moderated),
|
||||
'ALLOW_PORNO_TOPIC' => build_select('allow_porno_topic', array($lang['NONE'] => 0, $lang['YES'] => 1), $allow_porno_topic),
|
||||
'SELF_MODERATED' => build_select('self_moderated', array($lang['NONE'] => 0, $lang['YES'] => 1), $self_moderated),
|
||||
|
||||
'L_FORUM_TITLE' => $l_title,
|
||||
|
||||
|
@ -233,7 +233,7 @@ if ($mode)
|
|||
renumber_order('forum', $cat_id);
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"" . "admin_forums.php?c=$cat_id" . "\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php?c='. $cat_id .'">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -326,9 +326,9 @@ if ($mode)
|
|||
$fix = fix_orphan_sf();
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />";
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />';
|
||||
$message .= ($fix) ? "$fix<br /><br />" : '';
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"" . "admin_forums.php?c=$cat_id" . "\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php?c='. $cat_id .'">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -357,7 +357,7 @@ if ($mode)
|
|||
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"admin_forums.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '/a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -415,7 +415,7 @@ if ($mode)
|
|||
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"admin_forums.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -509,7 +509,7 @@ if ($mode)
|
|||
update_user_level('all');
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"admin_forums.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -586,9 +586,9 @@ if ($mode)
|
|||
$fix = fix_orphan_sf();
|
||||
$datastore->update('cat_forums');
|
||||
|
||||
$message = $lang['FORUMS_UPDATED'] . "<br /><br />";
|
||||
$message = $lang['FORUMS_UPDATED'] . '<br /><br />';
|
||||
$message .= ($fix) ? "$fix<br /><br />" : '';
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"admin_forums.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
break;
|
||||
|
@ -763,7 +763,7 @@ if (!$mode || $show_main_page)
|
|||
ORDER BY cat_id, forum_order";
|
||||
if(!$q_forums = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Could not query forums information", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
if( $total_forums = DB()->num_rows($q_forums) )
|
||||
|
@ -788,7 +788,7 @@ if (!$mode || $show_main_page)
|
|||
{
|
||||
$cat_id = $category_rows[$i]['cat_id'];
|
||||
|
||||
$template->assign_block_vars("catrow", array(
|
||||
$template->assign_block_vars('catrow', array(
|
||||
'S_ADD_FORUM_SUBMIT' => "addforum[$cat_id]",
|
||||
'S_ADD_FORUM_NAME' => "forumname[$cat_id]",
|
||||
|
||||
|
@ -813,7 +813,7 @@ if (!$mode || $show_main_page)
|
|||
if ($forum_rows[$j]['cat_id'] == $cat_id)
|
||||
{
|
||||
|
||||
$template->assign_block_vars("catrow.forumrow", array(
|
||||
$template->assign_block_vars('catrow.forumrow', array(
|
||||
'FORUM_NAME' => htmlCHR($forum_rows[$j]['forum_name']),
|
||||
'FORUM_DESC' => htmlCHR($forum_rows[$j]['forum_desc']),
|
||||
'NUM_TOPICS' => $forum_rows[$j]['forum_topics'],
|
||||
|
@ -865,14 +865,14 @@ function get_info($mode, $id)
|
|||
break;
|
||||
|
||||
default:
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", '', __LINE__, __FILE__);
|
||||
break;
|
||||
}
|
||||
$sql = "SELECT count(*) as total
|
||||
FROM $table";
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$count = DB()->sql_fetchrow($result);
|
||||
$count = $count['total'];
|
||||
|
@ -883,12 +883,12 @@ function get_info($mode, $id)
|
|||
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get Forum/Category information", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
if( DB()->num_rows($result) != 1 )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Forum/Category doesn't exist or multiple forums/categories with ID $id", "", __LINE__, __FILE__);
|
||||
message_die(GENERAL_ERROR, "Forum/Category doesn't exist or multiple forums/categories with ID $id", '', __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
$return = DB()->sql_fetchrow($result);
|
||||
|
@ -915,7 +915,7 @@ function get_list($mode, $id, $select)
|
|||
break;
|
||||
|
||||
default:
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", '', __LINE__, __FILE__);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -929,22 +929,21 @@ function get_list($mode, $id, $select)
|
|||
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$catlist = '';
|
||||
|
||||
while( $row = DB()->sql_fetchrow($result) )
|
||||
{
|
||||
$s = "";
|
||||
if ($row[$idfield] == $id)
|
||||
{
|
||||
$s = " selected=\"selected\"";
|
||||
}
|
||||
$catlist .= "<option value=\"$row[$idfield]\"$s> " . htmlCHR(str_short($row[$namefield], 60)) . "</option>\n";
|
||||
}
|
||||
|
||||
return($catlist);
|
||||
while( $row = DB()->sql_fetchrow($result) )
|
||||
{
|
||||
$s = '';
|
||||
if ($row[$idfield] == $id)
|
||||
{
|
||||
$s = ' selected="selected"';
|
||||
}
|
||||
$catlist .= '<option value="'. $row[$idfield] .'"'.$s.'> ' . htmlCHR(str_short($row[$namefield], 60)) . '</option>\n';
|
||||
}
|
||||
return($catlist);
|
||||
}
|
||||
|
||||
function renumber_order($mode, $cat = 0)
|
||||
|
@ -966,7 +965,7 @@ function renumber_order($mode, $cat = 0)
|
|||
break;
|
||||
|
||||
default:
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
|
||||
message_die(GENERAL_ERROR, "Wrong mode for generating select list", '', __LINE__, __FILE__);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -980,7 +979,7 @@ function renumber_order($mode, $cat = 0)
|
|||
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$i = 10;
|
||||
|
@ -993,14 +992,14 @@ function renumber_order($mode, $cat = 0)
|
|||
WHERE $idfield = " . $row[$idfield];
|
||||
if( !DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update order fields", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't update order fields", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$i += 10;
|
||||
}
|
||||
|
||||
if (!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1023,7 +1022,7 @@ function get_cat_forums ($cat_id = FALSE)
|
|||
|
||||
if (!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get list of Categories", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
if ($rowset = DB()->sql_fetchrowset($result))
|
||||
|
@ -1145,14 +1144,14 @@ function fix_orphan_sf ($orphan_sf_sql = '', $show_mess = FALSE)
|
|||
|
||||
if ($affectedrows = DB()->affected_rows())
|
||||
{
|
||||
$done_mess = "Subforums data corrected. <b>$affectedrows</b> orphan subforum(s) moved to root level.";
|
||||
$done_mess = 'Subforums data corrected. <b>'. $affectedrows .'</b> orphan subforum(s) moved to root level.';
|
||||
}
|
||||
|
||||
if ($show_mess)
|
||||
{
|
||||
$message = $done_mess .'<br /><br />';
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], "<a href=\"admin_forums.php\">", '</a>') .'<br /><br />';
|
||||
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", '</a>');
|
||||
$message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], '<a href="admin_forums.php">', '</a>') .'<br /><br />';
|
||||
$message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,31 +24,31 @@ else
|
|||
//
|
||||
if(isset($_POST['add']))
|
||||
{
|
||||
$mode = "add";
|
||||
$mode = 'add';
|
||||
}
|
||||
else if(isset($_POST['save']))
|
||||
{
|
||||
$mode = "save";
|
||||
$mode = 'save';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mode = "";
|
||||
$mode = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($mode != "")
|
||||
if($mode != '')
|
||||
{
|
||||
if($mode == "edit" || $mode == "add")
|
||||
if($mode == 'edit' || $mode == 'add')
|
||||
{
|
||||
//
|
||||
// They want to add a new rank, show the form.
|
||||
//
|
||||
$rank_id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
|
||||
|
||||
$s_hidden_fields = "";
|
||||
$s_hidden_fields = '';
|
||||
|
||||
if($mode == "edit")
|
||||
if($mode == 'edit')
|
||||
{
|
||||
if(empty($rank_id))
|
||||
{
|
||||
|
@ -59,11 +59,11 @@ if($mode != "")
|
|||
WHERE rank_id = $rank_id";
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain rank data", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain rank data", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$rank_info = DB()->sql_fetchrow($result);
|
||||
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $rank_id . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="id" value="'. $rank_id .'" />';
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -73,39 +73,39 @@ if($mode != "")
|
|||
|
||||
$s_hidden_fields .= '<input type="hidden" name="mode" value="save" />';
|
||||
|
||||
$rank_is_special = !empty($rank_info['rank_special']) ? HTML_CHECKED : "";
|
||||
$rank_is_not_special = empty($rank_info['rank_special']) ? HTML_CHECKED : "";
|
||||
$rank_is_special = !empty($rank_info['rank_special']) ? HTML_CHECKED : '';
|
||||
$rank_is_not_special = empty($rank_info['rank_special']) ? HTML_CHECKED : '';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_RANKS_EDIT' => true,
|
||||
|
||||
"RANK" => !empty($rank_info['rank_title']) ? $rank_info['rank_title'] : '',
|
||||
"SPECIAL_RANK" => $rank_is_special,
|
||||
"NOT_SPECIAL_RANK" => $rank_is_not_special,
|
||||
"MINIMUM" => ($rank_is_special) ? "" : @$rank_info['rank_min'],
|
||||
"IMAGE" => !empty($rank_info['rank_image']) ? $rank_info['rank_image'] : "images/ranks/rank_image.png",
|
||||
"STYLE" => !empty($rank_info['rank_style']) ? $rank_info['rank_style'] : '',
|
||||
"IMAGE_DISPLAY" => !empty($rank_info['rank_image']) ? '<img src="../' . $rank_info['rank_image'] . '" />' : "",
|
||||
'RANK' => !empty($rank_info['rank_title']) ? $rank_info['rank_title'] : '',
|
||||
'SPECIAL_RANK' => $rank_is_special,
|
||||
'NOT_SPECIAL_RANK' => $rank_is_not_special,
|
||||
'MINIMUM' => ($rank_is_special) ? '' : @$rank_info['rank_min'],
|
||||
'IMAGE' => !empty($rank_info['rank_image']) ? $rank_info['rank_image'] : 'images/ranks/rank_image.png',
|
||||
'STYLE' => !empty($rank_info['rank_style']) ? $rank_info['rank_style'] : '',
|
||||
'IMAGE_DISPLAY' => !empty($rank_info['rank_image']) ? '<img src="../'. $rank_info['rank_image'] .'" />' : '',
|
||||
|
||||
"S_RANK_ACTION" => "admin_ranks.php",
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields)
|
||||
);
|
||||
'S_RANK_ACTION' => "admin_ranks.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
));
|
||||
|
||||
}
|
||||
else if($mode == "save")
|
||||
else if($mode == 'save')
|
||||
{
|
||||
//
|
||||
// Ok, they sent us our info, let's update it.
|
||||
//
|
||||
|
||||
$rank_id = (isset($_POST['id'])) ? intval($_POST['id']) : 0;
|
||||
$rank_title = (isset($_POST['title'])) ? trim($_POST['title']) : "";
|
||||
$rank_style = (isset($_POST['style'])) ? trim($_POST['style']) : "";
|
||||
$rank_title = (isset($_POST['title'])) ? trim($_POST['title']) : '';
|
||||
$rank_style = (isset($_POST['style'])) ? trim($_POST['style']) : '';
|
||||
$special_rank = ($_POST['special_rank'] == 1) ? TRUE : 0;
|
||||
$min_posts = (isset($_POST['min_posts'])) ? intval($_POST['min_posts']) : -1;
|
||||
$rank_image = ((isset($_POST['rank_image']))) ? trim($_POST['rank_image']) : "";
|
||||
$rank_image = ((isset($_POST['rank_image']))) ? trim($_POST['rank_image']) : '';
|
||||
|
||||
if($rank_title == "")
|
||||
if($rank_title == '')
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['MUST_SELECT_RANK']);
|
||||
}
|
||||
|
@ -119,11 +119,11 @@ if($mode != "")
|
|||
//
|
||||
// The rank image has to be a jpg, gif or png
|
||||
//
|
||||
if($rank_image != "")
|
||||
if($rank_image != '')
|
||||
{
|
||||
if (!preg_match("/(\.gif|\.png|\.jpg)$/is", $rank_image))
|
||||
if (!preg_match('/(\.gif|\.png|\.jpg)$/is', $rank_image))
|
||||
{
|
||||
$rank_image = "";
|
||||
$rank_image = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ if($mode != "")
|
|||
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, $lang['NO_UPDATE_RANKS'], "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, $lang['NO_UPDATE_RANKS'], '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
$sql = "UPDATE " . BB_RANKS . "
|
||||
|
@ -156,17 +156,17 @@ if($mode != "")
|
|||
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message .= "<br /><br />" . sprintf($lang['CLICK_RETURN_RANKADMIN'], "<a href=\"admin_ranks.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message .= '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
$datastore->update('ranks');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
}
|
||||
else if($mode == "delete")
|
||||
else if($mode == 'delete')
|
||||
{
|
||||
//
|
||||
// Ok, they want to delete their rank
|
||||
|
@ -183,12 +183,11 @@ if($mode != "")
|
|||
|
||||
if($rank_id)
|
||||
{
|
||||
$sql = "DELETE FROM " . BB_RANKS . "
|
||||
WHERE rank_id = $rank_id";
|
||||
$sql = "DELETE FROM " . BB_RANKS . " WHERE rank_id = $rank_id";
|
||||
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't delete rank data", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . BB_USERS . "
|
||||
|
@ -197,10 +196,10 @@ if($mode != "")
|
|||
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, $lang['NO_UPDATE_RANKS'], "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, $lang['NO_UPDATE_RANKS'], '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message = $lang['RANK_REMOVED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_RANKADMIN'], "<a href=\"admin_ranks.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['RANK_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '<a href="admin_ranks.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
$datastore->update('ranks');
|
||||
|
||||
|
@ -222,11 +221,10 @@ else
|
|||
//
|
||||
// Show the default page
|
||||
//
|
||||
$sql = "SELECT * FROM " . BB_RANKS . "
|
||||
ORDER BY rank_min, rank_title";
|
||||
$sql = "SELECT * FROM " . BB_RANKS . " ORDER BY rank_min, rank_title";
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$rank_count = DB()->num_rows($result);
|
||||
|
||||
|
@ -234,8 +232,8 @@ else
|
|||
|
||||
$template->assign_vars(array(
|
||||
'TPL_RANKS_LIST' => true,
|
||||
"S_RANKS_ACTION" => "admin_ranks.php")
|
||||
);
|
||||
'S_RANKS_ACTION' => "admin_ranks.php",
|
||||
));
|
||||
|
||||
for($i = 0; $i < $rank_count; $i++)
|
||||
{
|
||||
|
@ -246,24 +244,24 @@ else
|
|||
|
||||
if($special_rank == 1)
|
||||
{
|
||||
$rank_min = $rank_max = "-";
|
||||
$rank_min = $rank_max = '-';
|
||||
}
|
||||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
|
||||
$rank_is_special = ($special_rank) ? $lang['YES'] : $lang['NO'];
|
||||
|
||||
$template->assign_block_vars("ranks", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
"RANK" => $rank,
|
||||
"STYLE" => $rank_rows[$i]['rank_style'],
|
||||
"IMAGE_DISPLAY" => ($rank_rows[$i]['rank_image']) ? '<img src="../' . $rank_rows[$i]['rank_image'] . '" />' : "",
|
||||
"SPECIAL_RANK" => $rank_is_special,
|
||||
"RANK_MIN" => $rank_min,
|
||||
$template->assign_block_vars('ranks', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'RANK' => $rank,
|
||||
'STYLE' => $rank_rows[$i]['rank_style'],
|
||||
'IMAGE_DISPLAY' => ($rank_rows[$i]['rank_image']) ? '<img src="../'. $rank_rows[$i]['rank_image'] .'" />' : '',
|
||||
'SPECIAL_RANK' => $rank_is_special,
|
||||
'RANK_MIN' => $rank_min,
|
||||
|
||||
"U_RANK_EDIT" => "admin_ranks.php?mode=edit&id=$rank_id",
|
||||
"U_RANK_DELETE" => "admin_ranks.php?mode=delete&id=$rank_id")
|
||||
);
|
||||
'U_RANK_EDIT' => "admin_ranks.php?mode=edit&id=$rank_id",
|
||||
'U_RANK_DELETE' => "admin_ranks.php?mode=delete&id=$rank_id",
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
|
|||
|
||||
$template->assign_vars(array(
|
||||
'U_ADD_REASON' => 'admin_reports.php?mode[]=reasons&' . POST_CAT_URL . "=$module_id&mode[]=add",
|
||||
'U_MODULES' => 'admin_reports.php'
|
||||
'U_MODULES' => "admin_reports.php",
|
||||
));
|
||||
|
||||
print_page('report_module_reasons_body.tpl', 'admin');
|
||||
|
@ -459,8 +459,8 @@ else if (isset($_POST['module']) || isset($_GET['module']))
|
|||
'MODULE_EXPLAIN' => $module_info['explain'],
|
||||
'MODULE_NOTIFY_ON' => ($bb_cfg['report_notify']) ? ' checked="checked"' : '',
|
||||
'MODULE_NOTIFY_OFF' => (!$bb_cfg['report_notify']) ? ' checked="checked"' : '',
|
||||
'MODULE_PRUNE' => 0)
|
||||
);
|
||||
'MODULE_PRUNE' => 0,
|
||||
));
|
||||
|
||||
//
|
||||
// Authorisation selects
|
||||
|
|
|
@ -20,7 +20,7 @@ if( isset($_POST['mode']) || isset($_GET['mode']) )
|
|||
}
|
||||
else
|
||||
{
|
||||
$mode = "";
|
||||
$mode = '';
|
||||
}
|
||||
|
||||
$delimeter = '=+:';
|
||||
|
@ -72,7 +72,7 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
FROM " . BB_SMILIES;
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't delete current smilies", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't delete current smilies", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$datastore->update('smile_replacements');
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
FROM ". BB_SMILIES;
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't get current smilies", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't get current smilies", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$cur_smilies = DB()->sql_fetchrowset($result);
|
||||
|
@ -98,7 +98,7 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
|
||||
if( empty($fcontents) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't read smiley pak file", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't read smiley pak file", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
for( $i = 0; $i < count($fcontents); $i++ )
|
||||
|
@ -110,8 +110,8 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
//
|
||||
// Replace > and < with the proper html_entities for matching.
|
||||
//
|
||||
$smile_data[$j] = str_replace("<", "<", $smile_data[$j]);
|
||||
$smile_data[$j] = str_replace(">", ">", $smile_data[$j]);
|
||||
$smile_data[$j] = str_replace('<', '<', $smile_data[$j]);
|
||||
$smile_data[$j] = str_replace('>', '>', $smile_data[$j]);
|
||||
$k = $smile_data[$j];
|
||||
|
||||
if( $smiles[$k] == 1 )
|
||||
|
@ -138,14 +138,14 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update smilies!", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't update smilies!", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$datastore->update('smile_replacements');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$message = $lang['SMILEY_IMPORT_SUCCESS'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "<a href=\"admin_smilies.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['SMILEY_IMPORT_SUCCESS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
}
|
||||
|
@ -154,24 +154,24 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) )
|
|||
//
|
||||
// Display the script to get the smile_pak cfg file...
|
||||
//
|
||||
$smile_paks_select = "<select name='smile_pak'><option value=''>" . $lang['SELECT_PAK'] . "</option>";
|
||||
$smile_paks_select = '<select name="smile_pak"><option value="">' . $lang['SELECT_PAK'] . '</option>';
|
||||
while( list($key, $value) = @each($smiley_paks) )
|
||||
{
|
||||
if ( !empty($value) )
|
||||
{
|
||||
$smile_paks_select .= "<option>" . $value . "</option>";
|
||||
$smile_paks_select .= '<option>' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
$smile_paks_select .= "</select>";
|
||||
$smile_paks_select .= '</select>';
|
||||
|
||||
$hidden_vars = "<input type='hidden' name='mode' value='import'>";
|
||||
$hidden_vars = '<input type="hidden" name="mode" value="import">';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_SMILE_IMPORT' => true,
|
||||
|
||||
"S_SMILEY_ACTION" => "admin_smilies.php",
|
||||
"S_SMILE_SELECT" => $smile_paks_select,
|
||||
"S_HIDDEN_FIELDS" => $hidden_vars)
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
'S_SMILE_SELECT' => $smile_paks_select,
|
||||
'S_HIDDEN_FIELDS' => $hidden_vars)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -182,18 +182,18 @@ else if( isset($_POST['export_pack']) || isset($_GET['export_pack']) )
|
|||
//
|
||||
$export_pack = (string) request_var('export_pack', '');
|
||||
|
||||
if ( $export_pack == "send" )
|
||||
if ( $export_pack == 'send' )
|
||||
{
|
||||
$sql = "SELECT *
|
||||
FROM " . BB_SMILIES;
|
||||
if( !$result = DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Could not get smiley list", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Could not get smiley list", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$resultset = DB()->sql_fetchrowset($result);
|
||||
|
||||
$smile_pak = "";
|
||||
$smile_pak = '';
|
||||
for($i = 0; $i < count($resultset); $i++ )
|
||||
{
|
||||
$smile_pak .= $resultset[$i]['smile_url'] . $delimeter;
|
||||
|
@ -209,7 +209,7 @@ else if( isset($_POST['export_pack']) || isset($_GET['export_pack']) )
|
|||
exit;
|
||||
}
|
||||
|
||||
$message = sprintf($lang['EXPORT_SMILES'], "<a href=\"admin_smilies.php?export_pack=send\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "<a href=\"admin_smilies.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = sprintf($lang['EXPORT_SMILES'], '<a href="admin_smilies.php?export_pack=send">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
|
||||
|
@ -219,24 +219,24 @@ else if( isset($_POST['add']) || isset($_GET['add']) )
|
|||
//
|
||||
// Admin has selected to add a smiley.
|
||||
//
|
||||
$filename_list = "";
|
||||
$filename_list = '';
|
||||
for( $i = 0; $i < count($smiley_images); $i++ )
|
||||
{
|
||||
$filename_list .= '<option value="' . $smiley_images[$i] . '">' . $smiley_images[$i] . '</option>';
|
||||
$filename_list .= '<option value="'. $smiley_images[$i] .'">'. $smiley_images[$i] .'</option>';
|
||||
}
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="savenew" />';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
"SMILEY_IMG" => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_images[0],
|
||||
"S_SMILEY_ACTION" => "admin_smilies.php",
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||
"S_FILENAME_OPTIONS" => $filename_list,
|
||||
"S_SMILEY_BASEDIR" => BB_ROOT . $bb_cfg['smilies_path'])
|
||||
);
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
'SMILEY_IMG' => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_images[0],
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_FILENAME_OPTIONS' => $filename_list,
|
||||
'S_SMILEY_BASEDIR' => BB_ROOT . $bb_cfg['smilies_path']
|
||||
));
|
||||
}
|
||||
else if ( $mode != "" )
|
||||
else if ( $mode != '' )
|
||||
{
|
||||
switch( $mode )
|
||||
{
|
||||
|
@ -253,11 +253,11 @@ else if ( $mode != "" )
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't delete smiley", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$datastore->update('smile_replacements');
|
||||
|
||||
$message = $lang['SMILEY_DEL_SUCCESS'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "<a href=\"admin_smilies.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['SMILEY_DEL_SUCCESS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
break;
|
||||
|
@ -276,42 +276,42 @@ else if ( $mode != "" )
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not obtain emoticon information', "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, 'Could not obtain emoticon information', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$smile_data = DB()->sql_fetchrow($result);
|
||||
|
||||
$filename_list = "";
|
||||
$filename_list = '';
|
||||
for( $i = 0; $i < count($smiley_images); $i++ )
|
||||
{
|
||||
if( $smiley_images[$i] == $smile_data['smile_url'] )
|
||||
{
|
||||
$smiley_selected = "selected=\"selected\"";
|
||||
$smiley_selected = 'selected="selected"';
|
||||
$smiley_edit_img = $smiley_images[$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
$smiley_selected = "";
|
||||
$smiley_selected = '';
|
||||
}
|
||||
|
||||
$filename_list .= '<option value="' . $smiley_images[$i] . '"' . $smiley_selected . '>' . $smiley_images[$i] . '</option>';
|
||||
}
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="smile_id" value="' . $smile_data['smilies_id'] . '" />';
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="smile_id" value="'. $smile_data['smilies_id'] .'" />';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
"SMILEY_CODE" => $smile_data['code'],
|
||||
"SMILEY_EMOTICON" => $smile_data['emoticon'],
|
||||
"SMILEY_IMG" => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_edit_img,
|
||||
"S_SMILEY_ACTION" => "admin_smilies.php",
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||
"S_FILENAME_OPTIONS" => $filename_list,
|
||||
"S_SMILEY_BASEDIR" => BB_ROOT . $bb_cfg['smilies_path'])
|
||||
);
|
||||
'TPL_SMILE_EDIT' => true,
|
||||
'SMILEY_CODE' => $smile_data['code'],
|
||||
'SMILEY_EMOTICON' => $smile_data['emoticon'],
|
||||
'SMILEY_IMG' => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smiley_edit_img,
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
'S_FILENAME_OPTIONS' => $filename_list,
|
||||
'S_SMILEY_BASEDIR' => BB_ROOT . $bb_cfg['smilies_path'],
|
||||
));
|
||||
|
||||
break;
|
||||
|
||||
case "save":
|
||||
case 'save':
|
||||
//
|
||||
// Admin has submitted changes while editing a smiley.
|
||||
//
|
||||
|
@ -346,16 +346,16 @@ else if ( $mode != "" )
|
|||
WHERE smilies_id = $smile_id";
|
||||
if( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't update smilies info", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$datastore->update('smile_replacements');
|
||||
|
||||
$message = $lang['SMILEY_EDIT_SUCCESS'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "<a href=\"admin_smilies.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['SMILEY_EDIT_SUCCESS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
break;
|
||||
|
||||
case "savenew":
|
||||
case 'savenew':
|
||||
//
|
||||
// Admin has submitted changes while adding a new smiley.
|
||||
//
|
||||
|
@ -392,11 +392,11 @@ else if ( $mode != "" )
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert new smiley", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't insert new smiley", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$datastore->update('smile_replacements');
|
||||
|
||||
$message = $lang['SMILEY_ADD_SUCCESS'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "<a href=\"admin_smilies.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['SMILEY_ADD_SUCCESS'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '<a href="admin_smilies.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
break;
|
||||
|
@ -414,16 +414,16 @@ else
|
|||
$result = DB()->sql_query($sql);
|
||||
if( !$result )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain smileys from database", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain smileys from database", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$smilies = DB()->sql_fetchrowset($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_SMILE_MAIN' => true,
|
||||
"S_HIDDEN_FIELDS" => @$s_hidden_fields,
|
||||
"S_SMILEY_ACTION" => "admin_smilies.php")
|
||||
);
|
||||
'S_HIDDEN_FIELDS' => @$s_hidden_fields,
|
||||
'S_SMILEY_ACTION' => "admin_smilies.php",
|
||||
));
|
||||
|
||||
//
|
||||
// Loop throuh the rows of smilies setting block vars for the template.
|
||||
|
@ -438,16 +438,16 @@ else
|
|||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
|
||||
$template->assign_block_vars("smiles", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
$template->assign_block_vars('smiles', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
|
||||
"SMILEY_IMG" => BB_ROOT . $bb_cfg['smilies_path'] . '/' . $smilies[$i]['smile_url'],
|
||||
"CODE" => $smilies[$i]['code'],
|
||||
"EMOT" => $smilies[$i]['emoticon'],
|
||||
'SMILEY_IMG' => BB_ROOT . $bb_cfg['smilies_path'] .'/'. $smilies[$i]['smile_url'],
|
||||
'CODE' => $smilies[$i]['code'],
|
||||
'EMOT' => $smilies[$i]['emoticon'],
|
||||
|
||||
"U_SMILEY_EDIT" => "admin_smilies.php?mode=edit&id=" . $smilies[$i]['smilies_id'],
|
||||
"U_SMILEY_DELETE" => "admin_smilies.php?mode=delete&id=" . $smilies[$i]['smilies_id'])
|
||||
);
|
||||
'U_SMILEY_EDIT' => "admin_smilies.php?mode=edit&id=". $smilies[$i]['smilies_id'],
|
||||
'U_SMILEY_DELETE' => "admin_smilies.php?mode=delete&id=". $smilies[$i]['smilies_id'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,14 @@ if ($mode == 'templates')
|
|||
));
|
||||
}
|
||||
else if ($mode == 'add' || $mode == 'edit')
|
||||
{
$template->assign_vars(array(
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'TPL' => true,
|
||||
));
|
||||
|
||||
if($mode == 'edit')
|
||||
{
$tpl_id = (int) request_var('tpl', '');
|
||||
{
|
||||
$tpl_id = (int) request_var('tpl', '');
|
||||
if(!$tpl_id) bb_die('');
|
||||
|
||||
$row = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id = $tpl_id");
|
||||
|
@ -48,9 +50,11 @@ else if ($mode == 'add' || $mode == 'edit')
|
|||
));
|
||||
}
|
||||
else
|
||||
{
$template->assign_vars(array(
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_ACTION' => "admin_topic_templates.php?mode=add",
|
||||
));
}
|
||||
));
|
||||
}
|
||||
|
||||
$tpl_name = isset($_POST['tpl_name']) ? $_POST['tpl_name'] : @$row['tpl_name'];
|
||||
$tpl_script = isset($_POST['tpl_script']) ? $_POST['tpl_script'] : @$row['tpl_script'];
|
||||
|
@ -67,24 +71,29 @@ else if ($mode == 'add' || $mode == 'edit')
|
|||
if(isset($_POST['submit']))
|
||||
{
|
||||
if($mode == 'edit')
|
||||
{
DB()->query("UPDATE ". BB_TOPIC_TPL_OLD ." SET
|
||||
{
|
||||
DB()->query("UPDATE ". BB_TOPIC_TPL_OLD ." SET
|
||||
tpl_name = '". DB()->escape($tpl_name) ."',
|
||||
tpl_script = '". DB()->escape($tpl_script) ."',
|
||||
tpl_template = '". DB()->escape($tpl_template) ."',
|
||||
tpl_desc = '". DB()->escape($tpl_desc) ."'
|
||||
WHERE tpl_id = $tpl_id
|
||||
");
|
||||
$message = 'изменено';
}
|
||||
$message = $lang['CHANGED'];
|
||||
}
|
||||
else
|
||||
{
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
|
||||
{
|
||||
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
|
||||
VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')");
|
||||
$message = 'добавлено';
}
|
||||
$message = $lang['ADEDD'];
|
||||
}
|
||||
|
||||
bb_die($message);
|
||||
}
|
||||
}
|
||||
else if ($mode == 'delete')
|
||||
{
$tpl_ids = isset($_POST['tpl_id']) ? $_POST['tpl_id'] : bb_die('вы ничего не выбрали');
|
||||
{
|
||||
$tpl_ids = isset($_POST['tpl_id']) ? $_POST['tpl_id'] : bb_die($lang['NOT_CHOOSE']);
|
||||
|
||||
foreach ($tpl_ids as $tpl_id)
|
||||
{
|
||||
|
@ -93,20 +102,21 @@ else if ($mode == 'delete')
|
|||
|
||||
if (isset($_POST['confirm']))
|
||||
{
|
||||
DB()->query("DELETE ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .")");
|
||||
bb_die('Удалено');
|
||||
DB()->query("DELETE FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .")");
|
||||
bb_die($lang['REMOVED']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$names = DB()->fetch_rowset("SELECT tpl_name FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .") ORDER BY tpl_name", 'tpl_name');
|
||||
|
||||
print_confirmation(array(
|
||||
'QUESTION' => 'Вы уверены, что хотите удалить?',
|
||||
'ITEMS_LIST' => join("\n</li>\n<li>\n", $names),
|
||||
'QUESTION' => $lang['QUESTION'],
|
||||
'ITEMS_LIST' => join('\n</li>\n<li>\n', $names),
|
||||
'FORM_ACTION' => "admin_topic_templates.php?mode=delete",
|
||||
'HIDDEN_FIELDS' => build_hidden_fields($hidden_fields),
|
||||
));
|
||||
}
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$forums = DB()->fetch_rowset("
|
||||
|
|
|
@ -234,7 +234,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id))
|
|||
'FORUM_NAME' => str_short($forums['forum_name_html'][$f_id], $max_forum_name_length),
|
||||
'SF_SPACER' => ($f_data['forum_parent']) ? HTML_SF_SPACER : '',
|
||||
'IS_MODERATOR' => (bool) $auth_mod,
|
||||
'MOD_STATUS' => ($auth_mod) ? $lang['MODERATOR'] : $lang['NO'],
|
||||
'MOD_STATUS' => ($auth_mod) ? $lang['MODERATOR'] : $lang['NONE'],
|
||||
'MOD_CLASS' => ($auth_mod) ? (($disabled) ? 'yesDisabled' : 'yesMOD') : 'noMOD',
|
||||
'AUTH_MOD_VAL' => ($auth_mod) ? 1 : 0,
|
||||
));
|
||||
|
|
|
@ -197,7 +197,7 @@ if ( isset($_POST['submit']) )
|
|||
VALUES ('" . $ip_list[$i] . "')";
|
||||
if ( !DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ if ( isset($_POST['submit']) )
|
|||
WHERE $kill_session_sql";
|
||||
if ( !DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ if ( isset($_POST['submit']) )
|
|||
VALUES ('" . DB()->escape($email_list[$i]) . "')";
|
||||
if ( !DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ if ( isset($_POST['submit']) )
|
|||
WHERE ban_id IN ($where_sql)";
|
||||
if ( !DB()->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't delete ban info from database", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't delete ban info from database", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,8 +298,8 @@ if ( isset($_POST['submit']) )
|
|||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_BANLIST_ACTION' => "admin_user_ban.php")
|
||||
);
|
||||
'S_BANLIST_ACTION' => "admin_user_ban.php",
|
||||
));
|
||||
|
||||
$userban_count = 0;
|
||||
$ipban_count = 0;
|
||||
|
@ -385,8 +385,8 @@ else
|
|||
'S_UNBAN_USERLIST_SELECT' => $select_userlist,
|
||||
'S_UNBAN_IPLIST_SELECT' => $select_iplist,
|
||||
'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist,
|
||||
'S_BAN_ACTION' => "admin_user_ban.php")
|
||||
);
|
||||
'S_BAN_ACTION' => "admin_user_ban.php",
|
||||
));
|
||||
}
|
||||
|
||||
print_page('admin_user_ban.tpl', 'admin');
|
|
@ -21,22 +21,22 @@ $mode = htmlspecialchars($mode);
|
|||
//
|
||||
if( isset($_POST['add']) )
|
||||
{
|
||||
$mode = "add";
|
||||
$mode = 'add';
|
||||
}
|
||||
else if( isset($_POST['save']) )
|
||||
{
|
||||
$mode = "save";
|
||||
$mode = 'save';
|
||||
}
|
||||
|
||||
if( $mode != "" )
|
||||
if( $mode != '' )
|
||||
{
|
||||
if( $mode == "edit" || $mode == "add" )
|
||||
if( $mode == 'edit' || $mode == 'add' )
|
||||
{
|
||||
$word_id = intval(request_var('id', 0));
|
||||
|
||||
$s_hidden_fields = $word = $replacement = '';
|
||||
|
||||
if( $mode == "edit" )
|
||||
if( $mode == 'edit' )
|
||||
{
|
||||
if( $word_id )
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ if( $mode != "" )
|
|||
WHERE word_id = $word_id";
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Could not query words table", "Error", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Could not query words table", $lang['ERROR'], __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$word_info = DB()->sql_fetchrow($result);
|
||||
|
@ -62,20 +62,20 @@ if( $mode != "" )
|
|||
$template->assign_vars(array(
|
||||
'TPL_ADMIN_WORDS_EDIT' => true,
|
||||
|
||||
"WORD" => $word,
|
||||
"REPLACEMENT" => $replacement,
|
||||
'WORD' => $word,
|
||||
'REPLACEMENT' => $replacement,
|
||||
|
||||
"S_WORDS_ACTION" => "admin_words.php",
|
||||
"S_HIDDEN_FIELDS" => $s_hidden_fields)
|
||||
);
|
||||
'S_WORDS_ACTION' => "admin_words.php",
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
));
|
||||
}
|
||||
else if( $mode == "save" )
|
||||
else if( $mode == 'save' )
|
||||
{
|
||||
$word_id = intval(request_var('id', 0));
|
||||
$word = trim(request_var('word', ""));
|
||||
$replacement = trim(request_var('replacement', ""));
|
||||
$word = trim(request_var('word', ''));
|
||||
$replacement = trim(request_var('replacement', ''));
|
||||
|
||||
if($word == "" || $replacement == "")
|
||||
if($word == '' || $replacement == '')
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['MUST_ENTER_WORD']);
|
||||
}
|
||||
|
@ -99,11 +99,11 @@ if( $mode != "" )
|
|||
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['ERROR'], __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message .= "<br /><br />" . sprintf($lang['CLICK_RETURN_WORDADMIN'], "<a href=\"admin_words.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message .= '<br /><br />' . sprintf($lang['CLICK_RETURN_WORDADMIN'], '<a href="admin_words.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
}
|
||||
else if( $mode == "delete" )
|
||||
else if( $mode == 'delete' )
|
||||
{
|
||||
$word_id = intval(request_var('id', 0));
|
||||
|
||||
|
@ -117,7 +117,7 @@ if( $mode != "" )
|
|||
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['ERROR'], __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$message = $lang['WORD_REMOVED'] . "<br /><br />" . sprintf($lang['CLICK_RETURN_WORDADMIN'], "<a href=\"admin_words.php\">", "</a>") . "<br /><br />" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "<a href=\"index.php?pane=right\">", "</a>");
|
||||
$message = $lang['WORD_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_WORDADMIN'], '<a href="admin_words.php">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
|
||||
|
||||
message_die(GENERAL_MESSAGE, $message);
|
||||
}
|
||||
|
@ -143,9 +143,9 @@ else
|
|||
$template->assign_vars(array(
|
||||
'TPL_ADMIN_WORDS_LIST' => true,
|
||||
|
||||
"S_WORDS_ACTION" => "admin_words.php",
|
||||
"S_HIDDEN_FIELDS" => '')
|
||||
);
|
||||
'S_WORDS_ACTION' => "admin_words.php",
|
||||
'S_HIDDEN_FIELDS' => '',
|
||||
));
|
||||
|
||||
for($i = 0; $i < $word_count; $i++)
|
||||
{
|
||||
|
@ -155,14 +155,14 @@ else
|
|||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
|
||||
$template->assign_block_vars("words", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
"WORD" => $word,
|
||||
"REPLACEMENT" => $replacement,
|
||||
$template->assign_block_vars('words', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'WORD' => $word,
|
||||
'REPLACEMENT' => $replacement,
|
||||
|
||||
"U_WORD_EDIT" => "admin_words.php?mode=edit&id=$word_id",
|
||||
"U_WORD_DELETE" => "admin_words.php?mode=delete&id=$word_id")
|
||||
);
|
||||
'U_WORD_EDIT' => "admin_words.php?mode=edit&id=$word_id",
|
||||
'U_WORD_DELETE' => "admin_words.php?mode=delete&id=$word_id",
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@ require('./pagestart.php');
|
|||
//
|
||||
if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
|
||||
{
|
||||
$dir = @opendir(".");
|
||||
$dir = @opendir('.');
|
||||
|
||||
$setmodules = 1;
|
||||
while( $file = @readdir($dir) )
|
||||
{
|
||||
if( preg_match("/^admin_.*?\.php$/", $file) )
|
||||
if( preg_match('/^admin_.*?\.php$/', $file) )
|
||||
{
|
||||
include('./' . $file);
|
||||
}
|
||||
|
@ -24,19 +24,19 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
|
|||
|
||||
$template->assign_vars(array(
|
||||
'TPL_ADMIN_NAVIGATE' => true,
|
||||
"U_FORUM_INDEX" => "../index.php",
|
||||
"U_ADMIN_INDEX" => "index.php?pane=right")
|
||||
);
|
||||
'U_FORUM_INDEX' => "../index.php",
|
||||
'U_ADMIN_INDEX' => "index.php?pane=right",
|
||||
));
|
||||
|
||||
ksort($module);
|
||||
|
||||
while( list($cat, $action_array) = each($module) )
|
||||
{
|
||||
$cat = ( !empty($lang[strtoupper($cat)]) ) ? $lang[strtoupper($cat)] : preg_replace("/_/", " ", $cat);
|
||||
$cat = ( !empty($lang[strtoupper($cat)]) ) ? $lang[strtoupper($cat)] : preg_replace('/_/', ' ', $cat);
|
||||
|
||||
$template->assign_block_vars("catrow", array(
|
||||
"ADMIN_CATEGORY" => $cat)
|
||||
);
|
||||
$template->assign_block_vars('catrow', array(
|
||||
'ADMIN_CATEGORY' => $cat,
|
||||
));
|
||||
|
||||
ksort($action_array);
|
||||
|
||||
|
@ -45,12 +45,12 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' )
|
|||
{
|
||||
$row_class = !($row_count % 2) ? 'row1' : 'row2';
|
||||
|
||||
$action = ( !empty($lang[strtoupper($action)]) ) ? $lang[strtoupper($action)] : preg_replace("/_/", " ", $action);
|
||||
$action = ( !empty($lang[strtoupper($action)]) ) ? $lang[strtoupper($action)] : preg_replace('/_/', ' ', $action);
|
||||
|
||||
$template->assign_block_vars("catrow.modulerow", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
"ADMIN_MODULE" => $action,
|
||||
"U_ADMIN_MODULE" => $file)
|
||||
$template->assign_block_vars('catrow.modulerow', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'ADMIN_MODULE' => $action,
|
||||
'U_ADMIN_MODULE' => $file)
|
||||
);
|
||||
$row_count++;
|
||||
}
|
||||
|
@ -73,9 +73,9 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
|
||||
$boarddays = ( TIMENOW - $bb_cfg['board_startdate'] ) / 86400;
|
||||
|
||||
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
|
||||
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
|
||||
$users_per_day = sprintf("%.2f", $total_users / $boarddays);
|
||||
$posts_per_day = sprintf('%.2f', $total_posts / $boarddays);
|
||||
$topics_per_day = sprintf('%.2f', $total_topics / $boarddays);
|
||||
$users_per_day = sprintf('%.2f', $total_users / $boarddays);
|
||||
|
||||
$avatar_dir_size = 0;
|
||||
|
||||
|
@ -83,9 +83,9 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
{
|
||||
while( $file = @readdir($avatar_dir) )
|
||||
{
|
||||
if( $file != "." && $file != ".." )
|
||||
if( $file != '.' && $file != '..' )
|
||||
{
|
||||
$avatar_dir_size += @filesize(BB_ROOT . $bb_cfg['avatar_path'] . "/" . $file);
|
||||
$avatar_dir_size += @filesize(BB_ROOT . $bb_cfg['avatar_path'] . '/' . $file);
|
||||
}
|
||||
}
|
||||
@closedir($avatar_dir);
|
||||
|
@ -127,7 +127,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
$row = DB()->sql_fetchrow($result);
|
||||
$version = $row['mysql_version'];
|
||||
|
||||
if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
|
||||
if( preg_match('/^(3\.23|4\.|5\.)/', $version) )
|
||||
{
|
||||
$dblist = array();
|
||||
foreach($bb_cfg['db'] as $name => $row)
|
||||
|
@ -141,7 +141,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
$dbsize = 0;
|
||||
for($i = 0; $i < count($tabledata_ary); $i++)
|
||||
{
|
||||
if( @$tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
|
||||
if( @$tabledata_ary[$i]['Type'] != 'MRG_MyISAM' )
|
||||
{
|
||||
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
|
||||
}
|
||||
|
@ -162,17 +162,17 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
"NUMBER_OF_POSTS" => $total_posts,
|
||||
"NUMBER_OF_TOPICS" => $total_topics,
|
||||
"NUMBER_OF_USERS" => $total_users,
|
||||
"START_DATE" => $start_date,
|
||||
"POSTS_PER_DAY" => $posts_per_day,
|
||||
"TOPICS_PER_DAY" => $topics_per_day,
|
||||
"USERS_PER_DAY" => $users_per_day,
|
||||
"AVATAR_DIR_SIZE" => $avatar_dir_size,
|
||||
"DB_SIZE" => $dbsize,
|
||||
"GZIP_COMPRESSION" => ( $bb_cfg['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'])
|
||||
);
|
||||
'NUMBER_OF_POSTS' => $total_posts,
|
||||
'NUMBER_OF_TOPICS' => $total_topics,
|
||||
'NUMBER_OF_USERS' => $total_users,
|
||||
'START_DATE' => $start_date,
|
||||
'POSTS_PER_DAY' => $posts_per_day,
|
||||
'TOPICS_PER_DAY' => $topics_per_day,
|
||||
'USERS_PER_DAY' => $users_per_day,
|
||||
'AVATAR_DIR_SIZE' => $avatar_dir_size,
|
||||
'DB_SIZE' => $dbsize,
|
||||
'GZIP_COMPRESSION' => ( $bb_cfg['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'],
|
||||
));
|
||||
//
|
||||
// End forum statistics
|
||||
//
|
||||
|
@ -193,7 +193,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
ORDER BY s.session_ip ASC, s.session_time DESC";
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$onlinerow_reg = DB()->sql_fetchrowset($result);
|
||||
|
||||
|
@ -204,7 +204,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
ORDER BY session_ip ASC, session_time DESC";
|
||||
if(!$result = DB()->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql);
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$onlinerow_guest = DB()->sql_fetchrowset($result);
|
||||
|
||||
|
@ -237,13 +237,13 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
|
||||
$reg_ip = decode_ip($onlinerow_reg[$i]['session_ip']);
|
||||
|
||||
$template->assign_block_vars("reg_user_row", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
"USER" => profile_url($onlinerow_reg[$i]),
|
||||
"STARTED" => bb_date($onlinerow_reg[$i]['session_start'], 'H:i', 'false'),
|
||||
"LASTUPDATE" => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', 'false'),
|
||||
"IP_ADDRESS" => $reg_ip,
|
||||
"U_WHOIS_IP" => $bb_cfg['whois_info'] . $reg_ip,
|
||||
$template->assign_block_vars('reg_user_row', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'USER' => profile_url($onlinerow_reg[$i]),
|
||||
'STARTED' => bb_date($onlinerow_reg[$i]['session_start'], 'H:i', 'false'),
|
||||
'LASTUPDATE' => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', 'false'),
|
||||
'IP_ADDRESS' => $reg_ip,
|
||||
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $reg_ip,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -265,12 +265,12 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||
|
||||
$guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']);
|
||||
|
||||
$template->assign_block_vars("guest_user_row", array(
|
||||
"ROW_CLASS" => $row_class,
|
||||
"STARTED" => bb_date($onlinerow_guest[$i]['session_start'], 'H:i', 'false'),
|
||||
"LASTUPDATE" => bb_date($onlinerow_guest[$i]['session_time'], 'H:i' , 'false'),
|
||||
"IP_ADDRESS" => $guest_ip,
|
||||
"U_WHOIS_IP" => $bb_cfg['whois_info'] . $guest_ip,
|
||||
$template->assign_block_vars('guest_user_row', array(
|
||||
'ROW_CLASS' => $row_class,
|
||||
'STARTED' => bb_date($onlinerow_guest[$i]['session_start'], 'H:i', 'false'),
|
||||
'LASTUPDATE' => bb_date($onlinerow_guest[$i]['session_time'], 'H:i' , 'false'),
|
||||
'IP_ADDRESS' => $guest_ip,
|
||||
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $guest_ip,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 Beta';
|
||||
|
||||
$bb_cfg['tp_release_date'] = '09-11-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R474';
|
||||
$bb_cfg['tp_release_date'] = '14-11-2012';
|
||||
$bb_cfg['tp_release_state'] = 'R475';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -135,6 +135,7 @@ $lang['ADEDD'] = 'added';
|
|||
$lang['CHANGED'] = 'changed';
|
||||
$lang['REMOVED'] = 'Removed';
|
||||
$lang['QUESTION'] = 'Are you sure want to delete?';
|
||||
$lang['NOT_CHOOSE'] = 'you do not choose';
|
||||
|
||||
$lang['RELEASE_EXP'] = 'This page displays all forums. For each of them you can set the release type which should be posted in the forum.';
|
||||
$lang['TPL_NONE'] = 'Don\'t use templates';
|
||||
|
|
|
@ -136,6 +136,7 @@ $lang['ADEDD_TPL'] = 'добавлено';
|
|||
$lang['CHANGED'] = 'изменено';
|
||||
$lang['REMOVED'] = 'Удалено';
|
||||
$lang['QUESTION'] = 'Вы уверены, что хотите удалить?';
|
||||
$lang['NOT_CHOOSE'] = 'вы ничего не выбрали';
|
||||
|
||||
$lang['RELEASE_EXP'] = 'На этой странице отображаются форумы, для которых можно выбрать шаблон нового топика (релиза).';
|
||||
$lang['TPL_NONE'] = 'Не использовать шаблоны';
|
||||
|
|
|
@ -919,6 +919,7 @@ a.menu-root, a.menu-root:visited, a.menu-root:hover {
|
|||
.menu-a a { color: #0000A0; background: #E7E7E7; padding: 4px 10px 5px; margin: 1px; display: block; text-decoration: none !important; }
|
||||
.menu-a a:hover { color: #0000FF; background: #D1D7DC; text-decoration: none !important; }
|
||||
|
||||
.mc_b { background: none !important; padding: 0px; !important; }
|
||||
.mc{ background:#E7E7E7; padding:5px; font-size:11px;}
|
||||
.mc-bord{ background:#fff; padding:1px; border:1px solid #92A3A4;}
|
||||
.mc-th{ background:#71869F; color:#F0F8FF; padding:4px; border-bottom:1px solid #fff; font-weight:bold; font-size:11px; text-align:center;}
|
||||
|
|
|
@ -358,7 +358,7 @@ ajax.callback.post_mod_comment = function(data) {
|
|||
<!-- IF postrow.MOD_CHECKBOX --><input type="checkbox" class="select_post" onclick="set_hid_chbox('{postrow.POST_ID}');"><!-- ENDIF -->
|
||||
|
||||
<p style="float: right;<!-- IF TEXT_BUTTONS --> padding: 3px 2px 4px;<!-- ELSE --> padding: 1px 6px 2px;<!-- ENDIF -->" class="post_btn_1">
|
||||
<!-- IF AUTH_MOD --><a class="txtb menu-root" href="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF AUTH_MOD --><a class="txtb menu-root mc_b" href="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.QUOTE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'reply'}); return false;<!-- ELSE -->{QUOTE_URL}{postrow.POST_ID}<!-- ENDIF -->">{QUOTE_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.EDIT --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="edit_post({postrow.POST_ID}, 'edit'); return false;<!-- ELSE -->{EDIT_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{EDIT_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
<!-- IF postrow.DELETE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'delete'}); return false;<!-- ELSE -->{DELETE_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{DELETE_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue