$style = 'css/style.css'; /* The stylesheet */ /* * Read the config file if it exists */ if (file_exists('config.php')) { require_once 'config.php'; } /* * Parse incoming args */ parse_str($_SERVER['QUERY_STRING']); /* * Create our primary class, and read the working directory */ $pm = new PageMaker($rootdir, $template, $style); /* * $d is the relative directory we'll append to the rootdir */ $pm->read_directory($d); if (isset($f)) { $pm->process_file($f); } else { } /* * Make sure we have a template before we call one. */ if (!file_exists($template)) { die("We are homeless, gimme shelter, missing template " . $template); } include $template;
} } } else { $page_info = DB::getRecord($CFG->is_tab ? 'admin_tabs' : 'admin_pages', $CFG->id, 0, 1); if (!$page_info['is_ctrl_panel'] || $page_info['is_ctrl_panel'] == 'N') { echo ' <div class="menu_item"><a class="' . (!$CFG->action ? 'high' : false) . '" href="#">' . $CFG->pm_list_tab . '</a></div> <div class="menu_item"><a class="' . ($CFG->action == 'form' ? 'high' : false) . '" href="#">' . $CFG->pm_form_tab . '</a></div> <div class="menu_item"><a class="' . ($CFG->action == 'record' ? 'high' : false) . '" href="#">' . $CFG->pm_record_tab . '</a></div>'; } else { echo ' <div class="menu_item"><a class="' . (!$CFG->action ? 'high' : false) . '" href="#">' . $CFG->pm_ctrl_tab . '</a></div>'; } echo ' <div class="pm_nav">'; PageMaker::showTabsPages(); echo ' <div class="pm_exit"><div class="pm_exit_icon" onclick="pmExitEditor();"></div> <a href="index.php" onclick="pmExitEditor();return false;">' . $CFG->pm_exit . '</a></div> </div>'; } ?> </div> </div> <?php if ($CFG->url != 'edit_page') { echo '<div id="content">'; } } if (!$_REQUEST['inset_id'] && !$_REQUEST['cal_bypass'] && !$_REQUEST['fm_bypass'] && $CFG->url != 'edit_page' && !$CFG->print) { String::showPath(); }
<?php date_default_timezone_set($CFG->default_timezone); String::magicQuotesOff(); if ($CFG->action != 'add_class') { $pm = new PageMaker($_REQUEST['id'], $CFG->action, $CFG->is_tab); $pm->showEditor($_REQUEST['tab_bypass']); } else { if ($_REQUEST['method'] == 'grid') { $_REQUEST['parent_method_id'] = 0; } if (!($_REQUEST['parent_method_id'] > 0)) { $parent_method_id = 0; $c_id = $_REQUEST['control_id']; $class = $_REQUEST['class']; $method = $_REQUEST['method'] ? $_REQUEST['method'] : '__construct'; $table = $c_id > 0 ? 'admin_controls_methods' : 'admin_controls'; } else { $class = 'Form'; $parent_method_id = $_REQUEST['parent_method_id']; $parent_method_text = ' in grid'; $method = $_REQUEST['method']; $table = 'admin_controls_methods'; } $db_tables = DB::getTables(); $is_tab = $_REQUEST['is_tab']; $next_page_id = $_REQUEST['pm_page_id']; $next_page_action = $_REQUEST['pm_action']; $method = $method == 'selectInput' ? 'fauxSelect' : $method; if (!empty($_REQUEST['field_name'])) { $fn = $_REQUEST['field_name'];