Exemplo n.º 1
0
        $alertred[] = NOFILE_UPLOADED;
    }
    if (!isset($alertred)) {
        //Mod::activate($_GET['modules']);
        $path = "/inc/mod/";
        $allowed = array('zip');
        $mod = Upload::go('module', $path, $allowed);
        //print_r($mod);
        $zip = new ZipArchive();
        if ($zip->open($mod['filepath']) === TRUE) {
            $zip->extractTo(GX_MOD);
            $zip->close();
            Hooks::run('module_install_action', $mod);
            $data['alertgreen'][] = MSG_MOD_INSTALLED;
        } else {
            $data['alertred'][] = MSG_MOD_CANT_EXTRACT;
        }
        unlink($mod['filepath']);
    } else {
        $data['alertred'] = $alertred;
    }
    if (isset($_POST['token'])) {
        Token::remove($_POST['token']);
    }
}
$data['mods'] = Mod::modList();
Theme::admin('header', $data);
System::inc('modules', $data);
Theme::admin('footer');
/* End of file mods.control.php */
/* Location: ./inc/lib/Control/Backend/mods.control.php */
Exemplo n.º 2
0
                # code...
                // echo "<pre>";
                // print_r($_POST['order']);
                // echo "</pre>";
                if (!isset($_POST['token']) || !Token::isExist($_POST['token'])) {
                    // VALIDATE ALL
                    $alertred[] = TOKEN_NOT_EXIST;
                }
                if (isset($alertred)) {
                    $data['alertred'] = $alertred;
                } else {
                    Menus::updateMenuOrder($_POST['order']);
                    $data['alertgreen'][] = 'Menu Order Changed';
                }
                if (isset($_POST['token'])) {
                    Token::remove($_POST['token']);
                }
                break;
            default:
                # code...
                break;
        }
        // CHANGE ORDER END
        $data['menus'] = Options::get('menus');
        Theme::admin('header', $data);
        System::inc('menus', $data);
        Theme::admin('footer');
        break;
}
/* End of file menus.control.php */
/* Location: ./inc/lib/Control/Backend/menus.control.php */
Exemplo n.º 3
0
            $where .= "AND `date` >= '{$_GET['from']}' ";
            $qpage .= "&from={$_GET['from']}";
        }
        if (isset($_GET['to']) && $_GET['to'] != '') {
            $where .= "AND `date` <= '{$_GET['to']}' ";
            $qpage .= "&to={$_GET['to']}";
        }
        if (isset($_GET['status']) && $_GET['status'] != '') {
            $status = Typo::int($_GET['status']);
            $where .= "AND `status` LIKE '%%{$status}%%' ";
            $qpage .= "&status={$status}";
        }
        $max = "15";
        if (isset($_GET['paging'])) {
            $paging = Typo::int($_GET['paging']);
            $offset = ($paging - 1) * $max;
        } else {
            $paging = 1;
            $offset = 0;
        }
        $data['posts'] = Db::result("SELECT * FROM `posts` \n            WHERE `type` = 'page' {$where} \n            ORDER BY `date` DESC \n            LIMIT {$offset},{$max}");
        $data['num'] = Db::$num_rows;
        Theme::admin('header', $data);
        System::inc('pages', $data);
        Theme::admin('footer');
        $page = array('paging' => $paging, 'table' => 'posts', 'where' => "`type` = 'page'" . $where, 'max' => $max, 'url' => 'index.php?page=pages' . $qpage, 'type' => 'pager');
        echo Paging::create($page);
        break;
}
/* End of file pages.control.php */
/* Location: ./inc/lib/Control/Backend/pages.control.php */
Exemplo n.º 4
0
                Theme::activate($_GET['themes']);
                $data['alertgreen'][] = THEME_ACTIVATED;
            } else {
                $data['alertred'] = $alertred;
            }
        } elseif ($_GET['act'] == 'remove') {
            if (!Token::isExist($_GET['token'])) {
                $alertred[] = TOKEN_NOT_EXIST;
            }
            if (Theme::isActive($_GET['themes'])) {
                $alertred[] = MSG_THEME_IS_ACTIVE;
            }
            if (!isset($alertred)) {
                if (Files::delTree(GX_THEME . "/" . $_GET['themes'])) {
                    $data['alertgreen'][] = THEME_REMOVED;
                } else {
                    $data['alertred'][] = MSG_THEME_NOT_REMOVED;
                }
            } else {
                $data['alertred'] = $alertred;
            }
        }
    }
    $data['sitetitle'] = THEMES;
    $data['themes'] = Theme::thmList();
    Theme::admin('header', $data);
    System::inc('themes', $data);
    Theme::admin('footer');
}
/* End of file mods.control.php */
/* Location: ./inc/lib/Control/Backend/mods.control.php */
Exemplo n.º 5
0
    </div>
    <div class="col-sm-12">
        <div class="row">
            <div class="col-sm-12">
            <?php 
if (isset($data['menus']) && $data['menus'] != '') {
    # code...
    foreach (json_decode($data['menus']) as $k => $m) {
        # code...
        echo "\n                        <div class=\"panel-group\" id=\"accordion\">\n                          <div class=\"panel panel-default\">\n                            <div class=\"panel-heading\">\n                              <div class=\"panel-title clearfix\">\n                                <a data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#{$k}\">\n                                    <div class=\"col-md-4\">\n                                        <h4><strong>{$m->name} </strong></h4>\n                                    </div>\n                                    <div class=\"col-md-4\">\n                                        <h4>\n                                        <small>\n                                            <em>{$k}</em>\n                                        </small>\n                                        </h4>\n                                    </div>\n                                </a>\n                                <div class=\"col-md-3\">\n                                    <div class=\"input-group\">\n                                        <input type=\"text\" value=\"{$m->class}\" placeholder=\"Class Style\" class=\"form-control\">\n                                        <span class=\"input-group-btn\">\n                                        <button name=\"editclass\" type=\"submit\" class=\"btn btn-default\">\n                                            Go!\n                                        </button>\n                                        </span>\n\n                                    </div>\n                                </div>\n                                <div class=\"col-md-1\">\n                                    <h5><a href=\"index.php?page=menus&act=remove&menuid={$k}&token=" . TOKEN . "\"><i class=\"fa fa-remove\"></i></a></h5>\n                                </div>\n                              </div>\n                            </div>\n                            <div id=\"{$k}\" class=\"panel-collapse collapse\">\n                                <div class=\"panel-body\">\n                                    <!-- Nav tabs -->\n                                        <ul class=\"nav nav-tabs\" role=\"tablist\">\n                                            <li class=\"active\"><a href=\"#{$k}menuitem\" role=\"tab\" data-toggle=\"tab\">" . MENU_ITEMS . "</a></li>\n                                            <li><a href=\"#{$k}additem\" role=\"tab\" data-toggle=\"tab\">" . ADD_MENU_ITEM . "</a></li>\n                                        </ul>\n                                        <!-- Tab panes -->\n                                        <div class=\"tab-content\">\n                                          <div class=\"tab-pane active\" id=\"{$k}menuitem\">\n                                          <br />\n                                              <div class=\"col-md-12\">\n                                           ";
        echo Menus::getMenuAdmin($k, 'nav nav-pills nav-stacked');
        echo "\n                                              </div>\n                                          </div>\n                                          <div class=\"tab-pane\" id=\"{$k}additem\">\n                                          ";
        $data['parent'] = Menus::isHadParent('', $k);
        //print_r($data['parent']);
        $data['menuid'] = $k;
        System::inc('menus_form', $data);
        echo "\n                                          </div>\n                                        </div>\n\n\n                                </div>\n                            </div>\n                        </div>\n                      </div>\n\n\n                    ";
    }
}
//echo "<pre>"; print_r(json_decode($data['menus'])); echo "</pre>";
?>
                </div>
        </div>

    </div>
</div>

<!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
Exemplo n.º 6
0
        if (isset($_GET['from']) && $_GET['from'] != '') {
            $where .= "AND `join_date` >= '{$_GET['from']}' ";
            $qpage .= "&from={$_GET['from']}";
        }
        if (isset($_GET['to']) && $_GET['to'] != '') {
            $where .= "AND `join_date` <= '{$_GET['to']}' ";
            $qpage .= "&to={$_GET['to']}";
        }
        if (isset($_GET['status']) && $_GET['status'] != '') {
            $where .= "AND `status` LIKE '%%{$_GET['status']}%%' ";
            $qpage .= "&status={$_GET['status']}";
        }
        $max = "10";
        if (isset($_GET['paging'])) {
            $paging = Typo::int($_GET['paging']);
            $offset = ($paging - 1) * $max;
        } else {
            $paging = 1;
            $offset = 0;
        }
        $data['usr'] = Db::result("SELECT * FROM `user` WHERE {$where} ORDER BY `userid` ASC LIMIT {$offset}, {$max}");
        $data['num'] = Db::$num_rows;
        $page = array('paging' => $paging, 'table' => 'user', 'where' => $where, 'max' => $max, 'url' => 'index.php?page=users' . $qpage, 'type' => 'pager');
        $data['paging'] = Paging::create($page);
        Theme::admin('header', $data);
        System::inc('user', $data);
        Theme::admin('footer');
        break;
}
/* End of file users.control.php */
/* Location: ./inc/lib/Control/Backend/users.control.php */
Exemplo n.º 7
0
        if (isset($_GET['from']) && $_GET['from'] != '') {
            $where .= "AND `date` >= '{$_GET['from']}' ";
            $qpage .= "&from={$_GET['from']}";
        }
        if (isset($_GET['to']) && $_GET['to'] != '') {
            $where .= "AND `date` <= '{$_GET['to']}' ";
            $qpage .= "&to={$_GET['to']}";
        }
        if (isset($_GET['status']) && $_GET['status'] != '') {
            $where .= "AND `status` LIKE '%{$_GET['status']}%' ";
            $qpage .= "&status={$_GET['status']}";
        }
        $max = "15";
        if (isset($_GET['paging'])) {
            $paging = Typo::int($_GET['paging']);
            $offset = ($paging - 1) * $max;
        } else {
            $paging = 1;
            $offset = 0;
        }
        $data['posts'] = Db::result("SELECT * FROM `posts`\n                        WHERE `type` = 'post' {$where} \n                        ORDER BY `date` DESC \n                        LIMIT {$offset},{$max}");
        $data['num'] = Db::$num_rows;
        $page = array('paging' => $paging, 'table' => 'posts', 'where' => "`type` = 'post' " . $where, 'max' => $max, 'url' => 'index.php?page=posts' . $qpage, 'type' => 'number');
        $data['paging'] = Paging::create($page);
        Theme::admin('header', $data);
        System::inc('posts', $data);
        Theme::admin('footer');
        break;
}
/* End of file posts.control.php */
/* Location: ./inc/lib/Control/Backend/posts.control.php */
Exemplo n.º 8
0
<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20141006
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$data['sitetitle'] = DASHBOARD;
Theme::admin('header', $data);
System::inc('dashboard', $data);
//Mod::Options('moviedb');
Theme::admin('footer');
/* End of file default.control.php */
/* Location: ./inc/lib/Control/Backend/default.control.php */
Exemplo n.º 9
0
                    $vars[$ob->name] = 'on';
                    //echo $ob->name;
                } else {
                    $vars[$ob->name] = 'off';
                    //echo $ob->name;
                }
            }
            //print_r($ob);
            foreach ($_POST as $key => $val) {
                # code...
                $vars[$key] = Typo::cleanX($val);
            }
            unset($vars['change']);
            //print_r($vars);
            Options::update($vars);
            $data['alertgreen'][] = MSG_SETTINGS_SAVED;
        }
        if (isset($_POST['token'])) {
            Token::remove($_POST['token']);
        }
        break;
    default:
        # code...
        //print_r($data);
        break;
}
Theme::admin('header', $data);
System::inc('settings', $data);
Theme::admin('footer');
/* End of file settings.control.php */
/* Location: ./inc/lib/Control/Backend/settings.control.php */
Exemplo n.º 10
0
        }
        if (isset($_POST['token'])) {
            Token::remove($_POST['token']);
        }
        break;
    default:
        # code...
        break;
}
if (isset($_GET['act']) == 'del') {
    if (!isset($_GET['token']) || !Token::isExist($_GET['token'])) {
        // VALIDATE ALL
        $alertred[] = TOKEN_NOT_EXIST;
    }
    if (isset($alertred)) {
        $data['alertred'] = $alertred;
    } else {
        Categories::delete($_GET['id']);
        $data['alertgreen'][] = MSG_CATEGORY_REMOVED;
    }
    if (isset($_GET['token'])) {
        Token::remove($_GET['token']);
    }
}
$data['cat'] = Db::result("SELECT * FROM `cat` WHERE `type` = 'post' ORDER BY `id` DESC");
$data['num'] = Db::$num_rows;
Theme::admin('header', $data);
System::inc('categories', $data);
Theme::admin('footer');
/* End of file categories.control.php */
/* Location: ./inc/lib/Control/Backend/categories.control.php */