global $pod_page_exists;
        if (!empty($pod_page_exists['page_template'])) {
            $tpl = $pod_page_exists['page_template'];
        }
    }
    $DW->template = basename($tpl);
    $DW->message('Template = ' . $DW->template);
}
// WPML Plugin support
include_once DW_MODULES . 'wpml_module.php';
if (DW_WPML::detect(FALSE)) {
    $curlang = DW_WPML::detectLanguage();
}
// QT Plugin support
include_once DW_MODULES . 'qt_module.php';
if (DW_QT::detect(FALSE)) {
    $curlang = DW_QT::detectLanguage();
}
foreach ($sidebars as $sidebar_id => $widgets) {
    // Only processing active sidebars with widgets
    if ($sidebar_id != 'wp_inactive_widgets' && count($widgets) > 0 && is_array($widgets)) {
        foreach ($widgets as $widget_key => $widget_id) {
            // Check if the widget has options set
            if (in_array($widget_id, $DW->dynwid_list)) {
                $act = array();
                $opt = $DW->getOpt($widget_id, $DW->whereami, FALSE);
                $DW->message('Number of rules to check for widget ' . $widget_id . ': ' . count($opt));
                $init = array_merge(array('display'), $DW->overrule_maintype);
                foreach ($init as $m) {
                    ${$m} = TRUE;
                }
<?php

/**
 * dynwid_admin_edit.php - Options settings
 *
 * @version $Id: dynwid_admin_edit.php 532982 2012-04-18 17:35:12Z qurl $
 * @copyright 2011 Jacco Drabbe
 */
// Plugins support
DW_BP::detect();
DW_QT::detect();
DW_WPSC::detect();
DW_WPML::detect();
// Sanitizing some stuff
$widget_id = isset($_GET['id']) && !empty($_GET['id']) ? esc_attr($_GET['id']) : '';
$return_url = isset($_GET['returnurl']) && !empty($_GET['returnurl']) ? esc_url($_GET['returnurl']) : '';
if (!array_key_exists($widget_id, $DW->registered_widgets)) {
    wp_die('WidgetID is not valid');
}
?>

<style type="text/css">
label {
  cursor : default;
}

.condition-select {
  width : 300px;
  -moz-border-radius-topleft : 6px;
  -moz-border-radius-topright : 6px;
  -moz-border-radius-bottomleft : 6px;