*/ global $timezone; switch ($do) { // Module Admin case 'admin': if (isset($GLOBALS['pixie_user']) && $GLOBALS['pixie_user_privs'] >= 1) { if ($x == "") { $message = 'Please create a dynamic page in the settings area.'; } else { $type = 'dynamic'; $table_name = 'pixie_dynamic_posts'; $edit_id = 'post_id'; $page_id = safe_field('page_id', 'pixie_core', "page_name='{$x}'"); if (isset($go) && $go == 'new') { admin_head(); admin_new($table_name, $edit_exclude = array('page_id', 'post_id', 'last_modified', 'author', 'post_views', 'post_slug')); } else { if (isset($edit) && $edit) { admin_head(); admin_edit($table_name, $edit_id, $edit, $edit_exclude = array('page_id', 'post_id', 'last_modified', 'last_modified_by', 'author', 'post_views', 'post_slug')); } else { admin_carousel($x); echo "\t\t\t<div id=\"blocks\">\n"; admin_block_search($type); admin_block_tag_cloud($table_name, 'page_id = ' . $page_id . ''); echo "\t\t\t\t</div>\n"; admin_head(); echo "\t\t\t\t<div id=\"pixie_content\">"; admin_overview($table_name, 'where page_id = ' . $page_id . '', 'posted', 'desc', $exclude = array('page_id', 'post_id', 'author', 'public', 'comments', 'tags', 'content', 'last_modified', 'last_modified_by', 'post_views', 'post_slug'), '15', $type); echo "\t\t\t\t</div>"; }
if (table_exists($table)) { admin_edit($table, $id, '1', $edit_exclude = array($id)); } } } else { if (isset($do) && $do == 'newpage') { if ($type == 'dynamic') { echo "<div id=\"page_header\">\r\n\t\t\t\t<h2>" . $lang['settings_page_new'] . " {$type} " . $lang['settings_page'] . "</h2>\r\n\t\t\t</div>"; if (isset($table_name)) { admin_new($table_name, $edit_exclude = array('page_id', 'page_type', 'page_views', 'publish', 'admin', 'page_content', 'last_modified', 'page_parent', 'page_order')); } } else { if ($type == 'static') { echo "<div id=\"page_header\">\r\n\t\t\t\t<h2>" . $lang['settings_page_new'] . " {$type} " . $lang['settings_page'] . "</h2>\r\n\t\t\t</div>"; if (isset($table_name)) { admin_new($table_name, $edit_exclude = array('page_id', 'page_type', 'page_views', 'publish', 'admin', 'page_content', 'last_modified', 'page_parent', 'page_order')); } } else { if (isset($install) && $install) { if (!$modplug) { $message = $lang['no_module_selected']; } else { /* Lets install */ $do = 'install'; include 'modules/' . $modplug . '.php'; if (isset($execute) && $execute) { $execute = str_replace('pixie_', $pixieconfig['table_prefix'] . 'pixie_', $execute); safe_query($execute); } if (isset($execute1) && $execute1) { $execute1 = str_replace('pixie_', $pixieconfig['table_prefix'] . 'pixie_', $execute1);
function admin_module($module_name, $table_name, $order_by, $asc_desc, $exclude = array(NULL), $edit_exclude = array(NULL), $view_number, $tags) { global $type, $go, $page, $message, $s, $m, $x, $edit, $submit_new, $submit_edit, $delete, $messageok, $new, $search_submit, $field, $search_words; if (isset($GLOBALS['pixie_user_privs']) && $GLOBALS['pixie_user_privs'] >= 1) { $type = 'module'; if (isset($go) && $go == 'new' && isset($table_name)) { admin_head(); admin_new($table_name, $edit_exclude); } else { if (isset($edit) && $edit && isset($table_name)) { admin_head(); admin_edit($table_name, $module_name . '_id', $edit, $edit_exclude); } else { if (isset($table_name)) { admin_carousel($x); echo "\n\t\t\t\t<div id=\"blocks\">\n"; admin_block_search($type); if (isset($tags) && $tags == 'yes') { admin_block_tag_cloud($table_name, $module_name . "_id >= 0"); } echo "\t\t\t\t</div>\n"; admin_head(); echo "\t\t\t\t<div id=\"pixie_content\">"; admin_overview($table_name, '', $order_by, $asc_desc, $exclude, $view_number, $type); echo "\t\t\t\t</div>\n"; } } } } }