Exemple #1
0
         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>";
                 }
             }
         }
     }
     break;
     // Show Module
 // Show Module
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";
                }
            }
        }
    }
}