Code:<?php
/****************************************************************/
/***************Hacking Color Mod********************************/
/* ..::phpbb themes color mod by hicux::.. */
/****************************************************************/
if (!defined('PHP_EOL')) define ('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");
require_once 'mainfile.php';
global $admin;
if (!is_admin($admin)) { die ('Sorry you are not an administrator, You can not use this hack. Please log into your nuke admin panel..'); }
switch($op) {
default:
include_once 'header.php';
OpenTable();
echo '<form action="phpbbcolors.php" method="post">' , PHP_EOL
, '<table align="center" border="0" cellpadding="2" cellspacing="2">' , PHP_EOL
, '<tr><td>This hack will change the colors for your admin and moderators for your phpbb forums.</td></tr>' , PHP_EOL
, '<tr><td><b>Backup data tables before going on! [Not neccessary but a precaution :)]</b><br /><br /><i>*How to use : Place the web colors for each font in the text boxes below. ONLY use the number, not the "#". So the only thing to place in the box is like the following... FF0000 .<br /> You can leave blank either of the text box that you don\'t want the color changed.</i></td></tr>' , PHP_EOL
, '<tr><td>Admin color # <input type="text" name="font3" /> <br /><br />' , PHP_EOL
, 'Moderator color # <input type="text" name="font2" /> <br /><br />' , PHP_EOL
, '<input type="hidden" name="op" value="update" />' , PHP_EOL
, '<input type="submit" value="Change" /></td></tr>' , PHP_EOL
, '<tr><td><b>Once you have finished with this script, delete it from your server!</b></td></tr>' , PHP_EOL
, '</table>' , PHP_EOL
, '</form>' , PHP_EOL;
CloseTable();
include_once 'footer.php';
break;
case 'update':
require_once 'mainfile.php';
global $prefix, $db;
include_once 'header.php';
OpenTable();
echo 'Installation Status<br /><br />';
if($font3 !=''){
$result = $db->sql_query('UPDATE `' . $prefix . '_bbthemes` SET `fontcolor3` = \'' . $font3 . '\'');
if (!$result) { echo '- Update admin color failed<br /><br />' , PHP_EOL; } else { echo '- Update admin color succeded<br /><br />' , PHP_EOL; }
}
if($font2 !=''){
$result2 = $db->sql_query('UPDATE `' . $prefix . '_bbthemes` SET `fontcolor2` = \'' . $font2 . '\'');
if (!$result2) { echo '- Update Moderator color failed<br /><br />' , PHP_EOL; } else { echo '- Update Moderator color succeded<br /><br />' , PHP_EOL; }
}
CloseTable();
include_once 'footer.php';
break;
}
|