bu kodu nasıl taşına bilir bir hale getirebilirim ?

phpBB geliştirme, performans ve hızını arttırmak.

bu kodu nasıl taşına bilir bir hale getirebilirim ?

İleti eren 05.08.2006, 07:45

bu kodu nasıl taşına bilir bir hale getirebilirim ?

[syntax="php"]<?php
/***************************************************************************
* admin_styles_advance_html.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_styles_advance_html.php,v 1.51.2.3 2002/12/19 17:17:39 psotfx Exp $
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

/***************************************************************************
* This file has been modified for phpBB Fully Modded
* Last altered on 8/28/2005 10:11 AM
*
* Support and Any Enquires: http://phpbbfm.net
***************************************************************************/

define('IN_PHPBB', 1);

if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Styles']['Advanced_HTML'] = $file;
return;
}

//
// Let's set the root dir for phpBB
//
$phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);

//
// Pull all config data
//
$sql = "SELECT *
FROM " . ADVANCE_HTML_TABLE;
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, 'Could not query config advanced html information.', '', __LINE__, __FILE__, $sql);
}
else
{
while( $row = $db->sql_fetchrow($result) )
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;

$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];


if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . ADVANCE_HTML_TABLE . " SET
config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
WHERE config_name = '$config_name'";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
}
}

if( isset($HTTP_POST_VARS['submit']) )
{
$message = $lang['Advance_html_updated'] . '<br /><br />' . sprintf($lang['Click_return_advance_html'], '<a href="' . append_sid('admin_styles_advance_html.'.$phpEx) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.'.$phpEx.'?pane=right') . '">', '</a>');

message_die(GENERAL_MESSAGE, $message);
}
}

$template->set_filenames(array(
'body' => 'admin/styles_advance_html_body.tpl')
);
acp_jumpbox();

$template->assign_vars(array(
'S_CONFIG_ACTION' => append_sid('admin_styles_advance_html.'.$phpEx),

'L_ADVANCE_HTML_TITLE' => $lang['Advanced_HTML'] . ' ' . $lang['Configuration'],
'L_ADVANCE_HTML_DESCRIPTION' => $lang['Advance_HTML_Description'],
'L_CUSTOM_HEADER' => $lang['Custom_Header'],
'L_CUSTOM_BODY_START' => $lang['Custom_Body_Start'],
'L_CUSTOM_BODY_END' => $lang['Custom_Body_End'],
'L_CUSTOM_FOOTER' => $lang['Custom_Footer'],
'L_CUSTOM_END' => $lang['Custom_End'],

'CUSTOM_HEADER' => $new['custom_header'],
'CUSTOM_BODY' => $new['custom_body'],
'CUSTOM_BODY_HEADER' => $new['custom_body_header'],
'CUSTOM_FOOTER' => $new['custom_footer'])
);

$template->pparse('body');

include('./page_footer_admin.'.$phpEx);

?>[/syntax]
eren
Üye
Üye
 
İleti: 45
Kayıt: 30.12.2005, 10:05
Konum: İstanbul

phpBB Geliştirme



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron