From 5b718d4428cb1b1e412837d38d387e32cf035184 Mon Sep 17 00:00:00 2001 From: "fly.dvorkin" Date: Tue, 13 Nov 2012 14:03:13 +0000 Subject: [PATCH] r474 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Частичный откат к 471, с сохранением фиксов. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@474 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/admin/admin_ranks.php | 88 +++++++++--------- upload/admin/admin_smilies.php | 124 ++++++++++++------------- upload/admin/admin_topic_templates.php | 10 +- upload/admin/index.php | 64 ++++++------- upload/config.php | 4 +- upload/login.php | 2 +- upload/misc.php | 2 +- 7 files changed, 147 insertions(+), 147 deletions(-) diff --git a/upload/admin/admin_ranks.php b/upload/admin/admin_ranks.php index 2c6f95da5..7082c42c8 100644 --- a/upload/admin/admin_ranks.php +++ b/upload/admin/admin_ranks.php @@ -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)) { @@ -79,33 +79,33 @@ if($mode != '') $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']) ? '' : '', + "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']) ? '' : "", - '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)) { - $rank_image = ''; + $rank_image = ""; } } @@ -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 .= '

' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message .= "

" . sprintf($lang['CLICK_RETURN_RANKADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); $datastore->update('ranks'); message_die(GENERAL_MESSAGE, $message); } - else if($mode == 'delete') + else if($mode == "delete") { // // Ok, they want to delete their rank @@ -188,7 +188,7 @@ if($mode != '') 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 +197,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'] . '

' . sprintf($lang['CLICK_RETURN_RANKADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = $lang['RANK_REMOVED'] . "

" . sprintf($lang['CLICK_RETURN_RANKADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); $datastore->update('ranks'); @@ -226,7 +226,7 @@ else 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 +234,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 +246,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']) ? '' : '', - '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']) ? '' : "", + "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") + ); } } diff --git a/upload/admin/admin_smilies.php b/upload/admin/admin_smilies.php index 42e3fd604..ac18da402 100644 --- a/upload/admin/admin_smilies.php +++ b/upload/admin/admin_smilies.php @@ -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'] . '

' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = $lang['SMILEY_IMPORT_SUCCESS'] . "

" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); message_die(GENERAL_MESSAGE, $message); } @@ -154,25 +154,25 @@ if( isset($_GET['import_pack']) || isset($_POST['import_pack']) ) // // Display the script to get the smile_pak cfg file... // - $smile_paks_select = '"; while( list($key, $value) = @each($smiley_paks) ) { if ( !empty($value) ) { - $smile_paks_select .= ''; + $smile_paks_select .= ""; } } - $smile_paks_select .= ''; + $smile_paks_select .= ""; - $hidden_vars = ''; + $hidden_vars = ""; $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) + ); } } else if( isset($_POST['export_pack']) || isset($_GET['export_pack']) ) @@ -182,7 +182,7 @@ 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; @@ -193,12 +193,12 @@ else if( isset($_POST['export_pack']) || isset($_GET['export_pack']) ) $resultset = DB()->sql_fetchrowset($result); - $smile_pak = ''; + $smile_pak = ""; for($i = 0; $i < count($resultset); $i++ ) { $smile_pak .= $resultset[$i]['smile_url'] . $delimeter; $smile_pak .= $resultset[$i]['emoticon'] . $delimeter; - $smile_pak .= $resultset[$i]['code'] . '\n'; + $smile_pak .= $resultset[$i]['code'] . "\n"; } header("Content-Type: text/x-delimtext; name=\"smiles.pak\""); @@ -209,7 +209,7 @@ else if( isset($_POST['export_pack']) || isset($_GET['export_pack']) ) exit; } - $message = sprintf($lang['EXPORT_SMILES'], '', '') . '

' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = sprintf($lang['EXPORT_SMILES'], "", "") . "

" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); message_die(GENERAL_MESSAGE, $message); @@ -219,7 +219,7 @@ 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 .= ''; @@ -229,14 +229,14 @@ else if( isset($_POST['add']) || isset($_GET['add']) ) $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'], - )); + "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'] . '

' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = $lang['SMILEY_DEL_SUCCESS'] . "

" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); message_die(GENERAL_MESSAGE, $message); break; @@ -276,21 +276,21 @@ 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 .= ''; @@ -299,19 +299,19 @@ else if ( $mode != '' ) $s_hidden_fields = ''; $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'] . '

' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = $lang['SMILEY_EDIT_SUCCESS'] . "

" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); 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'] . '

' . sprintf($lang['CLICK_RETURN_SMILEADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message = $lang['SMILEY_ADD_SUCCESS'] . "

" . sprintf($lang['CLICK_RETURN_SMILEADMIN'], "", "") . "

" . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], "", ""); 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", - )); + 'TPL_SMILE_MAIN' => true, + "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']) + ); } } diff --git a/upload/admin/admin_topic_templates.php b/upload/admin/admin_topic_templates.php index 0dfe37095..17a167dd3 100644 --- a/upload/admin/admin_topic_templates.php +++ b/upload/admin/admin_topic_templates.php @@ -74,11 +74,11 @@ else if ($mode == 'add' || $mode == 'edit') tpl_desc = '". DB()->escape($tpl_desc) ."' WHERE tpl_id = $tpl_id "); - $message = $lang['CHANGED'] ; } + $message = 'изменено'; } else { 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 = $lang['ADEDD']; } + $message = 'добавлено'; } bb_die($message); } @@ -94,15 +94,15 @@ else if ($mode == 'delete') if (isset($_POST['confirm'])) { DB()->query("DELETE ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .")"); - bb_die($lang['REMOVED']); + bb_die('Удалено'); } 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' => $lang['QUESTION'], - 'ITEMS_LIST' => join('\n\n
  • \n', $names), + 'QUESTION' => 'Вы уверены, что хотите удалить?', + 'ITEMS_LIST' => join("\n
  • \n
  • \n", $names), 'FORM_ACTION' => "admin_topic_templates.php?mode=delete", 'HIDDEN_FIELDS' => build_hidden_fields($hidden_fields), )); diff --git a/upload/admin/index.php b/upload/admin/index.php index fa154a114..c65e326ac 100644 --- a/upload/admin/index.php +++ b/upload/admin/index.php @@ -24,9 +24,9 @@ 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); @@ -35,7 +35,7 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' ) $cat = ( !empty($lang[strtoupper($cat)]) ) ? $lang[strtoupper($cat)] : preg_replace("/_/", " ", $cat); $template->assign_block_vars("catrow", array( - 'ADMIN_CATEGORY' => $cat) + "ADMIN_CATEGORY" => $cat) ); ksort($action_array); @@ -47,10 +47,10 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' ) $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++; } @@ -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 // @@ -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, )); } } diff --git a/upload/config.php b/upload/config.php index 76712c3b3..781882cce 100644 --- a/upload/config.php +++ b/upload/config.php @@ -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'] = '13-11-2012'; -$bb_cfg['tp_release_state'] = 'R473'; +$bb_cfg['tp_release_date'] = '09-11-2012'; +$bb_cfg['tp_release_state'] = 'R474'; // Database $charset = 'utf8'; diff --git a/upload/login.php b/upload/login.php index 8d9c68bd7..819a3cb39 100644 --- a/upload/login.php +++ b/upload/login.php @@ -4,7 +4,7 @@ define('IN_PHPBB', true); define('BB_SCRIPT', 'login'); define('IN_LOGIN', true); define('BB_ROOT', './'); -require(BB_ROOT .'common.php'); +require(BB_ROOT ."common.php"); array_deep($_POST, 'trim'); diff --git a/upload/misc.php b/upload/misc.php index 8883d1659..a5b0b1e9c 100644 --- a/upload/misc.php +++ b/upload/misc.php @@ -3,7 +3,7 @@ define('IN_PHPBB', true); define('BB_SCRIPT', 'misc'); define('BB_ROOT', './'); -require(BB_ROOT .'common.php'); +require(BB_ROOT ."common.php"); // Start Session Management $user->session_start();