diff --git a/upload/admin/admin_ranks.php b/upload/admin/admin_ranks.php index 7082c42c8..2c6f95da5 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 ac18da402..a41243510 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 17a167dd3..0dfe37095 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 = 'изменено'; } + $message = $lang['CHANGED'] ; } 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 = 'добавлено'; } + $message = $lang['ADEDD']; } 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('Удалено'); + 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\n
  • \n", $names), + 'QUESTION' => $lang['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 c65e326ac..fa154a114 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 6eb43d62e..74b5a9584 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'] = '09-11-2012'; -$bb_cfg['tp_release_state'] = 'R471'; +$bb_cfg['tp_release_date'] = '13-11-2012'; +$bb_cfg['tp_release_state'] = 'R472'; // Database $charset = 'utf8'; diff --git a/upload/language/lang_english/lang_admin_bt.php b/upload/language/lang_english/lang_admin_bt.php index 6814937d5..62537bcfe 100644 --- a/upload/language/lang_english/lang_admin_bt.php +++ b/upload/language/lang_english/lang_admin_bt.php @@ -131,6 +131,10 @@ $lang['LIST_OF_PATTERNS'] = 'List of patterns'; $lang['ADD_TEMPLATE'] = 'Add the template'; $lang['TEMPLATE_DISABLE'] = 'Template disabled'; $lang['FOR_NEW_TEMPLATE'] = 'for new patterns!'; +$lang['ADEDD'] = 'added'; +$lang['CHANGED'] = 'changed'; +$lang['REMOVED'] = 'Removed'; +$lang['QUESTION'] = 'Are you sure want to delete?'; $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'; diff --git a/upload/language/lang_russian/lang_admin_bt.php b/upload/language/lang_russian/lang_admin_bt.php index 9bb162831..8c2653323 100644 --- a/upload/language/lang_russian/lang_admin_bt.php +++ b/upload/language/lang_russian/lang_admin_bt.php @@ -132,6 +132,10 @@ $lang['LIST_OF_PATTERNS'] = 'Список шаблонов'; $lang['ADD_TEMPLATE'] = 'Добавить шаблон'; $lang['TEMPLATE_DISABLE'] = 'Шаблон отключен'; $lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!'; +$lang['ADEDD_TPL'] = 'добавлено'; +$lang['CHANGED'] = 'изменено'; +$lang['REMOVED'] = 'Удалено'; +$lang['QUESTION'] = 'Вы уверены, что хотите удалить?'; $lang['RELEASE_EXP'] = 'На этой странице отображаются форумы, для которых можно выбрать шаблон нового топика (релиза).'; $lang['TPL_NONE'] = 'Не использовать шаблоны'; diff --git a/upload/login.php b/upload/login.php index 819a3cb39..8d9c68bd7 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/memberlist.php b/upload/memberlist.php index 7571e22a0..0c05e572b 100644 --- a/upload/memberlist.php +++ b/upload/memberlist.php @@ -234,4 +234,8 @@ if ( $mode != 'topten' || $bb_cfg['topics_per_page'] < 10 ) DB()->sql_freeresult($result); } +$template->assign_vars(array( + 'PAGE_TITLE' => $lang['MEMBERLIST'], +)); + print_page('memberlist.tpl'); diff --git a/upload/misc.php b/upload/misc.php index a5b0b1e9c..8883d1659 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(); diff --git a/upload/templates/default/page_footer.tpl b/upload/templates/default/page_footer.tpl index a74949385..05d6c2f90 100644 --- a/upload/templates/default/page_footer.tpl +++ b/upload/templates/default/page_footer.tpl @@ -6,7 +6,7 @@ -
    +