- | Afiseaza codul
<?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Default style ID $sql = 'SELECT config_value FROM ' . CONFIG_TABLE . " WHERE config_name = 'default_style'"; $result = $db->sql_query($sql); $default_style_id = (int) $db->sql_fetchfield('config_value'); $db->sql_freeresult($result); // Default style name $sql = 'SELECT style_name FROM ' . STYLES_TABLE . ' WHERE style_id = ' . $default_style_id; $result = $db->sql_query($sql); $default_style_name = $db->sql_fetchfield('style_name'); $db->sql_freeresult($result); // Active styles $sql = 'SELECT style_id, style_name, style_active FROM ' . STYLES_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $styles_list[] = $row; } $db->sql_freeresult($result); echo 'Default style: ' . $default_style_name . ' (' . $default_style_id . ')<br />'; $exists = file_exists('./styles/' . $default_style_name . '/style.cfg'); if ($exists) { echo 'Default style exists, no work to be done.'; exit; } if (!file_exists('./styles/prosilver/style.cfg')) { echo 'Prosilver does not exist. Please upload a copy of prosilver from the <a href="https://www.phpbb.com/downloads/">3.1.0 Full Package</a>.'; exit; } $prosilver = array(); foreach ($styles_list as $style) { if ($style['style_name'] == 'prosilver') { $prosilver = $style; break; } } // Install style if it doesn't exist if (!sizeof($prosilver)) { $sql_ary = array( 'style_name' => 'prosilver', 'style_copyright' => '© phpBB Group', 'style_active' => 1, 'style_path' => 'prosilver', 'bbcode_bitfield' => 'lNg=', 'style_parent_id' => '0', 'style_parent_tree' => '', ); $sql = 'INSERT INTO ' . STYLES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $id = $db->sql_nextid(); $prosilver = array( 'style_name' => 'prosilver', 'style_id' => $id, 'style_active' => 1, ); echo 'Installed prosilver (' . $id . ').<br />'; } else { // Activate prosilver $sql = 'UPDATE ' . STYLES_TABLE . " SET style_active = 1 WHERE style_name = 'prosilver'"; $db->sql_query($sql); } // Set it as the default style $sql = 'UPDATE ' . CONFIG_TABLE . ' SET config_value = ' . $prosilver['style_id'] . " WHERE config_name = 'default_style'"; $db->sql_query($sql); $cache->purge(); echo 'Set prosilver as the default style.<br />'; // Set all users' styles to prosilver $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $prosilver['style_id']; $db->sql_query($sql); echo 'Updated user styles to prosilver.<br />'; echo 'Done.'; ?>
problema phpbb
Moderators: Moderatori ajutatori, Moderatori
-
- Fost administrator
- Posts: 13707
- Joined: 09 Oct 2010, 12:39
- Detinator Steam: Da
- CS Status: In grajd!
- SteamID: kalulord
- Reputatie: Fost Administrator
Fost membru Club eXtreamCS (6 luni)
Nume anterior: Terra - Location: Romania, Ploiesti
- Has thanked: 328 times
- Been thanked: 646 times
- Contact:
Faci un fisier clear_template.php, este din cauza la templateul pe care il folosesti.
-
- Membru, skill +2
- Posts: 562
- Joined: 07 Apr 2010, 17:02
- Detinator Steam: Nu
- CS Status: Iesi acasa !
- Detinator server CS: zm.lacs.ro
- Location: Italia
- Has thanked: 18 times
- Been thanked: 6 times
- Contact:
am asta acuma
General Error
SQL ERROR [ mysqli ]
Unknown column 'ext_active' in 'where clause' [1054]
SQL
SELECT * FROM phpbb_ext WHERE ext_active = 1
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 344
CALL: phpbb\db\driver\mysqli->sql_query()
FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 151
CALL: phpbb\di\container_builder->get_installed_extensions()
FILE: [ROOT]/common.php
LINE: 98
CALL: phpbb\di\container_builder->get_container()
FILE: [ROOT]/index.php
LINE: 23
CALL: include('[ROOT]/common.php')
General Error
SQL ERROR [ mysqli ]
Unknown column 'ext_active' in 'where clause' [1054]
SQL
SELECT * FROM phpbb_ext WHERE ext_active = 1
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 344
CALL: phpbb\db\driver\mysqli->sql_query()
FILE: [ROOT]/phpbb/di/container_builder.php
LINE: 151
CALL: phpbb\di\container_builder->get_installed_extensions()
FILE: [ROOT]/common.php
LINE: 98
CALL: phpbb\di\container_builder->get_container()
FILE: [ROOT]/index.php
LINE: 23
CALL: include('[ROOT]/common.php')