function renderWidgetHeaders($widget, $params = "") { global $DEBUG; switch ($widget["type"]) { case "ajax": echo "\t\t<script type=\"text/javascript\" language=\"javascript\">\n"; $loader = !empty($widget["loader"]) ? $widget["loader"] : "ajaxPageLoad('" . $widget["call"] . "', '" . $widget["block"] . "');"; if ((int) $widget["interval"] > 0) { echo "\t\t\tvar " . $widget["block"] . "_interval = setInterval(\"" . $loader . "\", " . $widget["interval"] . ");\n"; } echo "\t\t\t" . $loader . "\n"; echo "\t\t</script>\n"; break; case "mixed": foreach ($widget["parts"] as $widgetsub) { renderWidgetHeaders($widgetsub); } break; } if (!empty($widget["stylesheet"]) && strlen($widget["stylesheet"]) > 0) { echo "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $widget["stylesheet"] . "\">\n"; } if (!empty($widget["script"]) && strlen($widget["script"]) > 0) { echo "\t\t<link type=\"text/javascript\" language=\"javascript\\ src=\"" . $widget["script"] . "\">\n"; } if (!empty($widget["headerinclude"]) && strlen($widget["headerinclude"]) > 0) { echo "\t\t" . $widget["headerinclude"] . "\n"; } if (!empty($widget["headerfunction"]) && strlen($widget["headerfunction"]) > 0) { if ($DEBUG) { echo "\n<!-- Calling Function:" . $widget["headerfunction"] . " -->\n"; } eval($widget["headerfunction"]); } }
//]]> </script> <style type="text/css"> .highslide-dimming { background: black; } a.highslide { border: 0; } </style> <link href="css/widget.css" rel="stylesheet" type="text/css" /> <link href="css/front.css" rel="stylesheet" type="text/css" /> <!-- START: Dynamic Header Inserts From Widgets --> <?php foreach( $wIndex as $wId => $widget ) { renderWidgetHeaders($widget); } if(!empty($customStyleSheet)) { echo "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$customStyleSheet."\">\n"; } ?> <!-- END: Dynamic Header Inserts From Widgets --> <script type="text/javascript">InitPopupBox();</script> </head> <body> <div id="main"> <?php