timeZoneArray List of time zones in array format. * @return array $this->monthArray List of months in array format. */ $tz = array(); $tz["GMT"] = "000"; $tz["UTC"] = "000"; $tz["ECT"] = "+100"; $tz["EET"] = "+200"; $tz["ART"] = "+200"; $tz["EAT"] = "+300"; $tz["MET"] = "+330"; $tz["NET"] = "+400"; $tz["PLT"] = "+500"; $tz["IST"] = "+530"; $tz["BST"] = "+600"; $tz["VST"] = "+700"; $tz["CTT"] = "+800"; $tz["JST"] = "+900"; $tz["ACT"] = "+930"; $tz["AET"] = "+1000"; $tz["SST"] = "+1100"; $tz["NST"] = "+1200"; $tz["MIT"] = "-1100"; $tz["HST"] = "-1000"; $tz["AST"] = "-900"; $tz["PST"] = "-800"; $tz["PNT"] = "-700"; $tz["MST"] = "-700"; $tz["CST"] = "-600"; $tz["EST"] = "-500"; $tz["IET"] = "-500"; $tz["PRT"] = "-400"; $tz["CNT"] = "-330"; $tz["AGT"] = "-300"; $tz["BET"] = "-300"; $tz["CAT"] = "-100"; $this->timeZoneArray = $tz; $months = array(); $months["1"] = "Jan"; $months["2"] = "Feb"; $months["3"] = "Mar"; $months["4"] = "Apr"; $months["5"] = "May"; $months["6"] = "Jun"; $months["7"] = "Jul"; $months["8"] = "Aug"; $months["9"] = "Sep"; $months["10"] = "Oct"; $months["11"] = "Nov"; $months["12"] = "Dec"; $this->months = $months; } function themex_admin_page(){ /** * Creates the Admin page * */ global $pluginBase; clearstatcache(); $this->formLists(); $options = get_option('themex_options'); if ($_POST['action'] == "update"){ if ($_POST['type'] == "simple"){ $options["type"] = "simple"; $options["dayTheme"] = $_POST["dayTheme"]; $options["dayStart"] = $_POST["dayStart"]; $options["nightTheme"] = $_POST["nightTheme"]; $options["nightStart"] = $_POST["nightStart"]; $message = 'Options Updated. Simple Rotation Active.'; } else if ($_POST["type"] == "time"){ $options["timeZone"] = $this->timeZoneArray[$_POST["timezone"]]; $options["timeZoneAbbr"] = $_POST["timezone"]; $message = 'Time Zone Updated'; } else if ($_POST["type"] == "date"){ $options["type"] = "date"; for($m=1;$m<13;$m++){ $fieldName = "theme" . $m; $monthName = "theme" . $m . "-month"; $dayName = "theme" . $m . "-day"; $yearName = "theme" . $m . "-year"; $timeName = "theme" . $m . "-time"; if ($_POST[$dayName] != '' && $_POST[$yearName] != ''){ $options[$fieldName] = $_POST[$fieldName]; $options[$monthName] = $_POST[$monthName]; $options[$dayName] = $_POST[$dayName]; $options[$yearName] = $_POST[$yearName]; $options[$timeName] = $_POST[$timeName]; } else { $options[$fieldName] = ''; $options[$monthName] = ''; $options[$dayName] = ''; $options[$yearName] = ''; $options[$timeName] = ''; } } } update_option('themex_options', $options); } $themes = get_themes(); $tArray = array(); foreach($themes as $t){ $tArray[$t["Template"]] = $t["Name"]; } $text .= ""; $text .= "