function controller_pages($args)
{
    default_html(true);
    html_add_css(base_url() . 'modules/page_browser/page_browser.css');
    if (USE_MIN_FILES) {
        html_add_js(base_url() . 'modules/page_browser/page_browser.min.js');
    } else {
        html_add_js(base_url() . 'modules/page_browser/page_browser.js');
    }
    html_add_js_var('$.glue.conf.page.startpage', startpage());
    $bdy =& body();
    elem_attr($bdy, 'id', 'pages');
    body_append('<h1>All pages</h1>');
    load_modules('glue');
    $pns = pagenames(array());
    $pns = $pns['#data'];
    foreach ($pns as $pn) {
        // display only pages with 'head'
        if (is_dir(CONTENT_DIR . '/' . $pn . '/head')) {
            body_append('<div class="page_browser_entry" id="' . htmlspecialchars($pn, ENT_COMPAT, 'UTF-8') . '"><span class="page_browser_pagename"><a href="' . base_url() . '?' . htmlspecialchars(urlencode($pn), ENT_COMPAT, 'UTF-8') . '">' . htmlspecialchars($pn, ENT_NOQUOTES, 'UTF-8') . '</a></span> ');
            if ($pn . '.head' == startpage()) {
                body_append('<span id="page_browser_startpage">[startpage]</span> ');
            }
        }
        body_append('</div>');
    }
    echo html_finalize();
}
Beispiel #2
0
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
startpage(UNRESTRICTED);
session_destroy();
unset($logged_in_username);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="theme.css" />
<link rel="icon" type="image/png" href="shcicon.png" />
<title>Logged out</title>
</head>
<body>
<h1>Logged out</h1>
<p>You have logged out.</p>
<?php 
Beispiel #3
0
<?php

if (!isset($_SESSION["uid"])) {
    header("location:miniadm.logon.php");
    die;
}
include_once dirname(__FILE__) . "/ressources/class.mini.admin.inc";
include_once dirname(__FILE__) . "/ressources/class.templates.inc";
include_once dirname(__FILE__) . "/ressources/class.user.inc";
include_once dirname(__FILE__) . "/ressources/class.langages.inc";
if (isset($_GET["loggoff"])) {
    logoff();
}
if (isset($_GET["start-page"])) {
    startpage();
    exit;
}
if (isset($_GET["auth"])) {
    auth_popup();
    exit;
}
if (isset($_POST["username-logon"])) {
    auth_verif();
    exit;
}
$mini = new miniadmin();
echo $mini->webpage;
function startpage()
{
    $page = CurrentPageName();
    $tpl = new templates();
Beispiel #4
0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// NOTE: not web-accessible; use Apache .htaccess to restrict access to
// this script
$time = microtime(true);
$report = '';
require_once 'common.inc';
require_once 'simple_html_dom.php';
startpage(ADMIN);
function report_error($err)
{
    global $admin_address, $report, $time;
    $message = <<<MESSAGE
An error occurred running the check_posters.php script.
The text of the error is as follows:

    %s

%sThe script ran in %0.3f seconds.
SHC Manager
MESSAGE;
    $body = sprintf($message, $err, (isset($report) and $report != '') ? sprintf(<<<REPORT
Additionally, the following report was made prior to exiting:
Beispiel #5
0
<?php

$GLOBALS["ICON_FAMILY"] = "VPN";
session_start();
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.openvpn.inc';
include_once 'ressources/class.system.network.inc';
include_once 'ressources/class.tcpip.inc';
$users = new usersMenus();
if (!$users->AsSystemAdministrator) {
    die("alert('no access');");
}
if (isset($_GET["startpage"])) {
    echo startpage();
    exit;
}
if (isset($_GET["wizard"])) {
    wizard();
    exit;
}
if (isset($_GET["wizard-key"])) {
    wizard_key();
    exit;
}
if (isset($_GET["wizard-server"])) {
    wizard_server();
    exit;
}
if (isset($_GET["wizard-finish"])) {
    wizard_finish();
Beispiel #6
0
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
startpage(RESTRICTED);
/* USAGE OF THIS PAGE: This is an internal page used only by edit_player.php.

id is an required parameter that autoselects
the player whose responses are to be filled in.

The result is not well-formed html, as it is intended for inclusion in
the edit_player.php form.  */
do {
    if (!isset($_GET['id']) or is_null($_GET['id'])) {
        $errortext = "No user id provided";
        break;
    }
    $id = $_GET['id'];
    $mysqli = connect_mysql();
    if (!$mysqli) {
Beispiel #7
0
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
require_once 'common.inc';
$isloggedin = startpage(RESTRICTED);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="theme.css" />
<link rel="icon" type="image/png" href="shcicon.png" />
<title>Ungraded responses</title>
</head>
<body>
<h1>Ungraded responses</h1>
<?php 
$mysqli = connect_mysql();
$mysqli->query("USE {$mysql_dbname};");
if ($mysqli->errno) {
/**
 *	this is the default (fallback) controller
 *
 *	it mainly invokes other controllers or sends error messages
 */
function controller_default($args)
{
    if (empty($args[0][0]) && empty($args[0][1])) {
        // take the default page
        $args[0][0] = startpage();
        log_msg('debug', 'controller_default: using the default page');
    } elseif ($args[0][0] == 'edit' && empty($args[0][1])) {
        // quirk: edit the default page
        $args[0][0] = startpage();
        $args[0][1] = 'edit';
        log_msg('debug', 'controller_default: using the default page');
        invoke_controller($args);
        return;
    }
    page_canonical($args[0][0]);
    $obj = expl('.', $args[0][0]);
    if (count($obj) == 2) {
        // page requested
        if (page_exists($args[0][0])) {
            if (DEFAULT_TO_EDIT && is_auth()) {
                log_msg('debug', 'controller_default: invoking controller_edit');
                controller_edit($args);
            } else {
                log_msg('debug', 'controller_default: invoking controller_show');
                controller_show($args);
            }
        } elseif (ALWAYS_PROMPT_CREATE_PAGE || is_auth() || $args[0][0] == startpage()) {
            log_msg('debug', 'controller_default: invoking controller_create_page');
            controller_create_page($args);
        } else {
            log_msg('info', 'controller_default: page ' . quot($args[0][0]) . ' not found, serving 404');
            hotglue_error(404);
        }
    } else {
        // possibly object requested
        if (object_exists($args[0][0])) {
            // try to serve upload
            if (isset($args['download']) && $args['download']) {
                // prompt file save dialog on client
                $dl = true;
            } else {
                $dl = false;
            }
            log_msg('debug', 'controller_default: invoking serve_resource');
            if (!serve_resource($args[0][0], $dl)) {
                log_msg('info', 'controller_default: object ' . quot($args[0][0]) . ' has no associated resource, serving 404');
                hotglue_error(404);
            }
        } else {
            log_msg('info', 'controller_default: object ' . quot($args[0][0]) . ' not found, serving 404');
            hotglue_error(404);
        }
    }
}
Beispiel #9
0
<?php
session_start();
include_once('ressources/class.templates.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.openvpn.inc');
include_once('ressources/class.system.network.inc');
include_once('ressources/class.tcpip.inc');
$users=new usersMenus();
if(!$users->AsSystemAdministrator){die("alert('no access');");}

if(isset($_GET["startpage"])){echo startpage();exit;}
if(isset($_GET["wizard"])){wizard();exit;}
if(isset($_GET["wizard-key"])){wizard_key();exit;}
if(isset($_GET["wizard-server"])){wizard_server();exit;}
if(isset($_GET["wizard-finish"])){wizard_finish();exit;}
if(isset($_GET["KEY_COUNTRY_NAME"])){SaveCertificate();exit;}
if(isset($_GET["ENABLE_SERVER"])){SaveServerConf();exit;}
if(isset($_GET["ENABLE_BRIDGE"])){SaveBridgeMode();exit;}
if(isset($_GET["VPN_DNS_DHCP_1"])){SaveServerConf();exit;}
if(isset($_GET["restart-server"])){RestartServer();exit;}
if(isset($_GET["server-settings"])){server_settings();exit;}
if(isset($_GET["server-settings-js"])){server_settings_js();exit;}
if(isset($_GET["routes"])){routes_settings();exit;}
if(isset($_GET["ROUTE_SHOULD_BE"])){routes_shouldbe();exit;}
if(isset($_GET["ROUTE_FROM"])){routes_add();exit;}
if(isset($_GET["routes-list"])){routes_list();exit;}
if(isset($_GET["DELETE_ROUTE_FROM"])){routes_delete();exit;}

if(isset($_GET["events-js"])){events_js();exit;}
if(isset($_GET["events"])){events();exit;}
if(isset($_GET["events-session"])){events_sessions();exit;}