File: /home/awaldron/public_html/archive/demo/admin/style.php
<?php
session_start();
include("../_functions.php");
dbconnect();
if (!is_logged()) auto_login();
$bg = dbVAR("color_bg");
$tbar = dbVAR("color_tbar");
$tfont = dbVAR("color_tfont");
$link = dbVAR("color_link");
$hover = dbVAR("color_hover");
if (isset($_POST["setstyle"])) {
update_dbVAR("color_bg",alpha($_POST["tbar"],3));
update_dbVAR("color_tbar",$_POST["tbar"]);
update_dbVAR("color_tfont",$_POST["tfont"]);
update_dbVAR("color_link",$_POST["link"]);
update_dbVAR("color_hover",$_POST["hover"]);
require("gen_css.php");
update_constants();
echo "<script>parent.location.href='index.php?p=styleok';</script>\n";
}
echo "<html>\n";
echo "<head>\n";
echo "<title>".COMPANY_NAME." : Navigation</title>\n";
echo "<style type=\"text/css\">\n";
echo "a.temp, a.temp:link, a.temp:active, a.temp:visited { color:#".(isset($_POST["link"])?$_POST["link"]:$tbar)."; text-decoration:none; font-weight:bold; }\n";
echo "a.temp:hover { color:#".(isset($_POST["hover"])?$_POST["hover"]:$hover)."; text-decoration:none; font-weight:bold; }\n";
echo "</style>\n";
echo "</head>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../default.css\">\n";
echo "<body style=\"margin:15px;\">\n";
if (!admin_panel($_SESSION["auth_user"])) {
echo "<br><br><br><br>".error("You must be logged in to access the administration panel!");
} else {
echo "<P><img src=\"/gui/icons/cog.gif\" align=\"left\">\n";
echo "<div class=\"headline\">Site Styles</div>\n";
echo "<P>An color scheme can be set with the input of just three hexidecimal color codes. If you're not sure what exactly a hexidecimal color code is, <a href=\"color_wheel.htm\" target=\"cc\">use this extremely useful color selection tool</a> to generate your hexidecimal color codes.\n";
echo "<br><br><br>\n";
echo "<form action=\"style.php\" method=\"post\">\n";
echo "<P><center><table class=\"textdn\" border=0 cellspacing=0 cellpadding=8>\n";
if (isset($_GET["ok"])) {
echo "<tr><td colspan=3> </td></tr>\n";
echo "<tr><td colspan=3>".notice("Intranet Site Style has been successfully updated.")."<br><span style=\"color:#009900;font-size:12px;\">You may have to refresh your browser a few times before the style sheet is updated on your local machine.</span>"."</td></tr>\n";
echo "<tr><td colspan=3> </td></tr>\n";
}
echo "<tr><td>Title Bar Color:</td><td>#<input type=\"text\" name=\"tbar\" maxlength=6 size=10 value=\"".(isset($_POST["tbar"])?$_POST["tbar"]:$tbar)."\"></td>\n";
echo " <td rowspan=4 valign=\"middle\">\n";
echo "<div style=\"width:300px; height:20px; background:#".(isset($_POST["tbar"])?$_POST["tbar"]:$tbar)." url('../gui/headerbg.gif') top right no-repeat; color:#".(isset($_POST["tfont"])?$_POST["tfont"]:$tfont)."; font:bold 12px Verdana, Arial; padding:3px 0px 0px 4px;\">Title Bar Font Color</div>\n";
echo "<div style=\"width:300px; height:75px; background:#".(isset($_POST["tbar"])?alpha($_POST["tbar"],3):alpha($tbar,3))."; border:solid #".(isset($_POST["tbar"])?$_POST["tbar"]:$tbar)."; border-width:0px 2px 2px 2px; padding:4px; margin-bottom:8px;\">By default, all main body text such as this remains black.<center><br><a href=\"#\" class=\"temp\">Link / Link Hover Color</a></center></div>\n";
echo "</td></tr>\n";
echo "<tr><td>Title Bar Font Color:</td><td>#<input type=\"text\" name=\"tfont\" value=\"".(isset($_POST["tfont"])?$_POST["tfont"]:$tfont)."\" maxlength=6 size=10></td></tr>\n";
echo "<tr><td>Link Color:</td><td>#<input type=\"text\" name=\"link\" maxlength=6 size=10 value=\"".(isset($_POST["link"])?$_POST["link"]:$link)."\"></td></tr>\n";
echo "<tr><td>Link Hover Color:</td><td>#<input type=\"text\" name=\"hover\" maxlength=6 size=10 value=\"".(isset($_POST["hover"])?$_POST["hover"]:$hover)."\"></td></tr>\n";
echo "<tr><td colspan=3><center><input type=\"submit\" value=\" Preview Style \" name=\"preview\"> <input type=\"submit\" value=\" Set Style to Intranet \" name=\"setstyle\"></center></td></tr>\n";
echo "</table></center>\n";
echo "</form>\n";
echo "<br><br><br><br>\n";
echo "<center>Powered by <a href=\"http://www.intrabreeze.com\">IntraBreeze</a> © 2005 IntraBreeze, LLC</center>\n";
}
echo "</body>\n</html>\n";
?>