diff options
Diffstat (limited to 'phpBB/adm')
-rw-r--r-- | phpBB/adm/style/colour_swatch.html | 76 | ||||
-rw-r--r-- | phpBB/adm/swatch.php | 115 |
2 files changed, 121 insertions, 70 deletions
diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html new file mode 100644 index 0000000000..19fa008d00 --- /dev/null +++ b/phpBB/adm/style/colour_swatch.html @@ -0,0 +1,76 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> +<head> +<meta http-equiv="Content-Style-Type" content="text/css" /> +<meta http-equiv="imagetoolbar" content="no" /> +<title>{L_COLOUR_SWATCH}</title> + +<style type="text/css"> +<!-- + body { + background-color: #404040; + color: #fff; + } + + td { + border: solid 1px #333; + } + + .over { + border-color: white; + } + + .out { + border-color: #333333; + } + + img { + border: 0; + } +//--> +</style> +</head> + +<body> + +<script type="text/javascript"> +<!-- + var r = 0, g = 0, b = 0; + + var numberList = new Array(6); + numberList[0] = '00'; + numberList[1] = '33'; + numberList[2] = '66'; + numberList[3] = '99'; + numberList[4] = 'CC'; + numberList[5] = 'FF'; + + document.writeln('<table cellspacing="0" cellpadding="0" border="0">'); + + for (r = 0; r < 6; r++) + { + document.writeln('<tr>'); + + for (g = 0; g < 6; g++) + { + for (b = 0; b < 6; b++) + { + color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); + document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">'); + document.write('<a href="javascript:cell(\'' + color + '\');"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>'); + document.writeln('<\/td>'); + } + } + document.writeln('<\/tr>'); + } + document.writeln('<\/table>'); + + function cell(color) + { + opener.document.forms["{OPENER}"].{NAME}.value = color; + } +//--> +</script> + +</body> +</html>
\ No newline at end of file diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php index ee3a5455c5..1051523a70 100644 --- a/phpBB/adm/swatch.php +++ b/phpBB/adm/swatch.php @@ -1,73 +1,48 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> -<head> -<meta http-equiv="Content-Style-Type" content="text/css" /> -<meta http-equiv="imagetoolbar" content="no" /> -<title>Color Swatch</title> - -<style type="text/css"> -<!-- -body { - background-color: #404040; - color: #fff; -} - -td { - border: solid 1px #333; -} - -.over { - border-color: white; -} - -.out { - border-color: #333333; -} - -img { - border: 0; -} - -//--> -</style> -</head> - -<body> - -<script type="text/javascript"> -<!-- - var r = 0, g = 0, b = 0; - var numberList = new Array(6); - numberList[0] = "00"; - numberList[1] = "33"; - numberList[2] = "66"; - numberList[3] = "99"; - numberList[4] = "CC"; - numberList[5] = "FF"; - document.writeln('<table cellspacing="0" cellpadding="0" border="0">'); - for(r = 0; r < 6; r++) - { - document.writeln('<tr>'); - for(g = 0; g < 6; g++) - { - for(b = 0; b < 6; b++) - { - color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write('<td bgcolor="#' + color + '" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">'); - document.write('<a href="javascript:cell(\'' + color + '\');"><img src="./images/spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>'); - document.writeln('<\/td>'); - } - } - document.writeln('<\/tr>'); - } - document.writeln('<\/table>'); - -function cell(color) +<?php +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ +define('IN_PHPBB', true); +$phpbb_root_path = './../'; +$phpEx = substr(strrchr(__FILE__, '.'), 1); +include($phpbb_root_path . 'common.' . $phpEx); + +// Start session management +$user->session_begin(false); +$auth->acl($user->data); +$user->setup(); + +// Set custom template for admin area +$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin'); + +$template->set_filenames(array( + 'body' => 'colour_swatch.html') +); + +$template->assign_vars(array( + 'OPENER' => addslashes(request_var('form', '')), + 'NAME' => request_var('name', ''), + 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",) +); + +$template->display('body'); + +// Unload cache, must be done before the DB connection if closed +if (!empty($cache)) { - opener.document.forms['<?php echo htmlspecialchars(addslashes($_GET['form'])); ?>'].<?php echo htmlspecialchars(addslashes($_GET['name'])); ?>.value = color; + $cache->unload(); } -//--> -</script> -</body> -</html>
\ No newline at end of file +// Close our DB connection. +$db->sql_close(); + +?>
\ No newline at end of file |