hi
i want to add a theme section to my program
namely to change the skin of the program
in the technic it would work like that
there is a file called "def_theme"
in this file there is the name of the default theme (like default, or gray_small and etc...)
and another file called main_vars.php
main_vars.php will be included in the main program pages
in main_vars.php there is variables like font color, face, bgcolor and etc
when main_vars.php is included, it will look up the def_theme file for the default theme
and after that it will run the if statement for the string that file contains
if there is written default it will call default theme
or if there is written gray_small it will call gray_small theme
here is main_vars.php
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
$file = "def_theme";
$fp = fopen($file, "r");
$contents = fread($fp, filesize($file));
fclose($fp);
if ($contents == "default" || strlen($contents) < 2) {
$bgcolor = "#12323F";
$bgcolordark = "#000000";
$bgcolorlight = "#365c6d";
$textcolordark = "#406687";
$textcolorlight = "#5f99cc";
$face = "Helvetica, Arial, sans-serif";
$big_size = "-1";
$small_size = "-2";
} else if ($contents == "gray_small") {
$bgcolor = "#FFFFFF";
$bgcolordark = "#545454";
$bgcolorlight = "#7F7F7F";
$textcolordark = "#262626";
$textcolorlight = "#909090";
$face = "Helvetica, Arial, sans-serif";
$big_size = "-1";
$small_size = "-2";
}
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
eventually when i include main_vars.php it is working with no errors
but it is sending no variables
for example there is being no bgcolor or no textcolorlight
i am changing the string that def_theme contains
but there was appearing no change
where am i doing a mistake?
please help me immeditaly
i need your help so much...