output_header($title);
echo "<h1>{$title}</h1>\n";
echo "<p>" . _("This page allows you to grant or revoke various site access permissions for a user and adjust some limits. Round accesses are managed from the user's statistics page.") . "</p>";
show_username_form($username);
if ($username) {
    try {
        $user = new User($username);
    } catch (NonexistentUserException $exception) {
        echo "<p class='error'>" . _("Invalid username") . "</p>";
        exit;
    }
    $user_settings =& Settings::get_settings($username);
    echo "<hr>";
    echo "<h2>{$username} ({$user->real_name})</h2>";
    if ($action == "update") {
        update_settings($username, $user_settings);
    } else {
        show_toggles_form($username, $user_settings);
    }
}
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function show_username_form($username)
{
    echo "<form method='GET'>\n";
    echo "<p>" . _("Username") . ": ";
    echo "<input name='username' type='text' value='{$username}' size='20'>\n";
    echo "</p>";
    echo "<input type='submit' value='" . attr_safe(_("Look up this user")) . "'>\n";
    echo "</form>\n";
}
// ------------------------------------------------
Exemplo n.º 2
0
function check_status()
{
    global $page, $webimroot, $settings, $dbversion;
    $page['done'][] = getlocal2("install.0.php", array(phpversion()));
    if (!check_webimroot()) {
        return;
    }
    if (!check_files()) {
        return;
    }
    $link = check_connection();
    if (!$link) {
        return;
    }
    if (!check_database($link)) {
        mysql_close($link);
        return;
    }
    if (!check_tables($link)) {
        mysql_close($link);
        return;
    }
    if (!check_columns($link)) {
        mysql_close($link);
        return;
    }
    check_sound();
    $page['done'][] = getlocal("installed.message");
    if (!check_admin($link)) {
        $page['nextstep'] = getlocal("installed.login_link");
        $page['nextnotice'] = getlocal2("installed.notice", array("{$webimroot}/install/"));
        $page['nextstepurl'] = "{$webimroot}/operator/login.php?login=admin";
    }
    $page['show_small_login'] = true;
    mysql_close($link);
    loadsettings();
    $settings['dbversion'] = $dbversion;
    update_settings();
}
Exemplo n.º 3
0
require "../includes/functions.php";
page_protect();
$cable = filter($_POST['cable']);
if ($_POST['submit'] == 'Stop') {
    $q = mysql_query("DELETE FROM `settings` where `setting_name`='calibrate'");
    if ($q) {
        $status_msg = '<div class="alertMessage inline success"><center>Cable calibrated successfully!</center></div>';
        header("refresh: 5,url=calibrate.php");
    } else {
        $status_msg = '<a href="calibrate.php"><div class="alertMessage inline error"><center>Error: Error at db query, click here to try again!' . mysql_error() . '</center></div></a>';
    }
    $delete = 1;
}
if (is_numeric($cable) && !$delete) {
    if ($_POST['submit'] == 'Start') {
        $q = update_settings('calibrate', $cable);
    }
    if ($q) {
        $status_msg = '<div class="alertMessage inline success"><center>Cable calibrated successfully!</center></div>';
        header("refresh: 5,url=calibrate.php");
    } else {
        $status_msg = '<a href="calibrate.php"><div class="alertMessage inline error"><center>Error: Error at db query, click here to try again!' . mysql_error() . '</center></div></a>';
    }
} elseif (!$delete) {
    //Fail Red
    $status_msg = '<a href="calibrate.php"><div class="alertMessage inline error"><center>Error: Cable must be a number, click here to try again!</center></div></a>';
}
echo '<!-- CSS Stylesheet-->
<link type="text/css" rel="stylesheet" href="../components/bootstrap/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="../components/bootstrap/bootstrap-responsive.css" />
<link type="text/css" rel="stylesheet" href="../css/style.css"/>';
Exemplo n.º 4
0
    }
    if ($params['email'] && !is_valid_email($params['email'])) {
        $errors[] = getlocal("settings.wrong.email");
    }
    if ($params['geolinkparams']) {
        foreach (preg_split("/,/", $params['geolinkparams']) as $oneparam) {
            if (!preg_match("/^\\s*(toolbar|scrollbars|location|status|menubar|width|height|resizable)=\\d{1,4}\$/", $oneparam)) {
                $errors[] = "Wrong link parameter: \"{$oneparam}\", should be one of 'toolbar, scrollbars, location, status, menubar, width, height or resizable'";
            }
        }
    }
    if (count($errors) == 0) {
        foreach ($options as $opt) {
            $settings[$opt] = $params[$opt];
        }
        update_settings();
        header("Location: {$webimroot}/operator/settings.php?stored");
        exit;
    }
}
$page['formemail'] = topage($params['email']);
$page['formtitle'] = topage($params['title']);
$page['formlogo'] = topage($params['logo']);
$page['formhosturl'] = topage($params['hosturl']);
$page['formgeolink'] = topage($params['geolink']);
$page['formgeolinkparams'] = topage($params['geolinkparams']);
$page['formusernamepattern'] = topage($params['usernamepattern']);
$page['formchatstyle'] = $params['chatstyle'];
$page['formchattitle'] = topage($params['chattitle']);
$page['formsendmessagekey'] = $params['sendmessagekey'];
$page['availableStyles'] = $stylelist;
Exemplo n.º 5
0
 if (isset($_POST['next'])) {
     $_SESSION['admin']['require_approval'] = $_POST['require_approval'] == '1' ? TRUE : FALSE;
     if (generate_config('../bin/config.php') === FALSE) {
         $g_params['errors'] = 'Unable to write the config file (/bin/config.php)';
     } else {
         // Other settings that require changes in db tables.
         $data = array();
         $data['allow_uploads'] = $_POST['uploads'] == '1' ? 1 : 0;
         $data['timeout_snail'] = (double) $_POST['timeout_snail'];
         $data['timeout_slow'] = (double) $_POST['timeout_slow'];
         $data['timeout_normal'] = (double) $_POST['timeout_normal'];
         $data['timeout_fast'] = (double) $_POST['timeout_fast'];
         $data['timeout_blitz'] = (double) $_POST['timeout_blitz'];
         $data['language'] = $_POST['language'] . '.txt';
         $data['max_players'] = (int) $_POST['max_players'];
         $result = update_settings($data);
         if ($result['success']) {
             unset($_POST['next']);
             $_SESSION['stage'] = $g_stage = 6;
             $_SESSION['allow_uploads'] = $data['allow_uploads'];
         } else {
             // Display the error message.
             $g_params['errors'] = implode('<br/>', $result['errors']);
         }
     }
 } elseif (isset($_POST['continue'])) {
     $_SESSION['stage'] = $g_stage = 6;
 } else {
     $g_params['languages'] = array('english');
     $g_params['errors'] = NULL;
 }
Exemplo n.º 6
0
Arquivo: Show.php Projeto: Chiru/RADE
<p style="margin-left:200px">&#xA0;</p>

<h1>Resource-aware Browser-to-browser 3D Graphics Delivery Load Balancing Algorithm</h1>

<form action="Show.php" method="post">
<h3>Settings</h3>
<?php 
if (isset($_POST["settings"])) {
    if (isset($_POST["random"]) && $_POST["random"] == "random") {
        $random = "true";
    } else {
        $random = "false";
    }
    $new_settings = array();
    $new_settings[0] = array(key => "random", "value" => $random);
    update_settings($new_settings);
}
$settings = get_settings();
$random = FALSE;
foreach ($settings as $setting) {
    if ($setting['key'] == 'random') {
        $random = $setting['value'];
    }
    if (is_string($random) && $random) {
        $random = $random[0] != 'F' && $random[0] != 'f';
    }
}
?>
<input type="hidden" name="settings" value="settings">
<p><input type="checkbox" name="random" value="random"<?php 
if ($random) {
Exemplo n.º 7
0
        update_settings('ip_address', $address);
    } else {
        $error[] = "IP Address Invalid";
    }
    if (filter_var($mask, FILTER_VALIDATE_IP)) {
        update_settings('ip_netmask', $mask);
    } else {
        $error[] = "IP Mask Invalid";
    }
    if (filter_var($gateway, FILTER_VALIDATE_IP)) {
        update_settings('ip_gateway', $gateway);
    } else {
        $error[] = "IP Gateway Invalid";
    }
    if (filter_var($dns, FILTER_VALIDATE_IP)) {
        update_settings('ip_dns', $dns);
    } else {
        $error[] = "IP DNS Invalid";
    }
    //Exec bash file
    $exec_file = shell_exec("sudo -u root /var/www/setip.sh {$address} {$mask} {$gateway} {$dns}");
    //$exec_file = shell_exec("sudo -u root /var/www/setip.sh $address $mask $gateway $dns");
    //Show the message
    if (!$error) {
        $msg = '<div class="alertMessage inline success"><center>Changes done!</center></div>';
    } else {
        foreach ($error as $error) {
            $msg .= '<div class="alertMessage inline error"><center>' . $error . '</center></div>';
        }
    }
}
Exemplo n.º 8
0
<?php

//Change le champ demande par l'utilisateur en fonction de son entree
$change = htmlspecialchars($_GET["change"]);
$value = htmlspecialchars($_POST["change_value"]);
if (!check_value($change, $value, $db)) {
    update_settings($change, $value, $_SESSION["id"], $db);
    header("Location: settings.php");
    //On renvoie a la page des parametres une fois la modification terminee
    exit;
}
$_SESSION["error_change"] = true;
header("Location: settings.php");
//Sinon on affiche un message d'erreur
Exemplo n.º 9
0
* @copyright (c) 2010 Jari Kanerva (tumba25)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_QUICKINSTALL')) {
    exit;
}
if ($mode == 'update_settings') {
    // Time to save some settings.
    $qi_config = utf8_normalize_nfc(request_var('qi_config', array('' => ''), true));
    // make sure qi_config.php is writable
    if (is_writable($quickinstall_path . 'qi_config.cfg')) {
        $error = update_settings($qi_config);
    }
    if (empty($error)) {
        $s_settings_success = true;
        $qi_install = false;
        $language = $qi_config['qi_lang'];
    } else {
        $s_settings_failure = true;
    }
}
gen_lang_select($language);
if ($qi_install) {
    // Fill some default vaues.
}
$template->assign_vars(array('S_BOARDS_WRITABLE' => is_writable($quickinstall_path . 'boards'), 'S_CACHE_WRITABLE' => is_writable($quickinstall_path . 'cache'), 'S_CONFIG_WRITABLE' => is_writable($quickinstall_path . 'qi_config.cfg'), 'S_IN_INSTALL' => $qi_install, 'S_IN_SETTINGS' => true, 'S_SETTINGS_SUCCESS' => !empty($s_settings_success) ? true : false, 'S_SETTINGS_FAILURE' => !empty($s_settings_failure) ? true : false, 'ERROR' => !empty($error) ? !$qi_install ? $error : '' : '', 'U_UPDATE_SETTINGS' => qi::url('update_settings'), 'TABLE_PREFIX' => htmlspecialchars($qi_config['table_prefix']), 'SITE_NAME' => $qi_config['site_name'], 'SITE_DESC' => $qi_config['site_desc'], 'ALT_ENV' => !empty($alt_env) ? $alt_env : false, 'PAGE_MAIN' => false, 'CONFIG_ADMIN_EMAIL' => !empty($qi_config['admin_email']) ? $qi_config['admin_email'] : '', 'CONFIG_ADMIN_NAME' => !empty($qi_config['admin_name']) ? $qi_config['admin_name'] : '', 'CONFIG_ADMIN_PASS' => !empty($qi_config['admin_pass']) ? $qi_config['admin_pass'] : '', 'CONFIG_AUTOMOD' => isset($qi_config['automod']) ? $qi_config['automod'] : 1, 'CONFIG_BOARD_EMAIL' => !empty($qi_config['board_email']) ? $qi_config['board_email'] : '', 'CONFIG_BOARDS_DIR' => !empty($qi_config['boards_dir']) ? $qi_config['boards_dir'] : 'boards/', 'CONFIG_COOKIE_DOMAIN' => !empty($qi_config['cookie_domain']) ? $qi_config['cookie_domain'] : 'localhost', 'CONFIG_COOKIE_SECURE' => !empty($qi_config['cookie_secure']) ? $qi_config['cookie_secure'] : 0, 'CONFIG_DB_PREFIX' => !empty($qi_config['db_prefix']) ? $qi_config['db_prefix'] : 'qi_', 'CONFIG_DBHOST' => !empty($qi_config['dbhost']) ? $qi_config['dbhost'] : 'localhost', 'CONFIG_DBMS' => !empty($qi_config['dbms']) ? $qi_config['dbms'] : 'mysql', 'CONFIG_DBPASSWD' => !empty($qi_config['dbpasswd']) ? $qi_config['dbpasswd'] : '', 'CONFIG_DBPORT' => !empty($qi_config['dbport']) ? $qi_config['dbport'] : '', 'CONFIG_DBUSER' => !empty($qi_config['dbuser']) ? $qi_config['dbuser'] : '', 'CONFIG_DEFAULT_LANG' => !empty($qi_config['default_lang']) ? $qi_config['default_lang'] : 'en', 'CONFIG_EMAIL_ENABLE' => !empty($qi_config['email_enable']) ? $qi_config['email_enable'] : 0, 'CONFIG_MAKE_WRITABLE' => !empty($qi_config['make_writable']) ? $qi_config['make_writable'] : 0, 'CONFIG_NO_PASSWORD' => isset($qi_config['no_dbpasswd']) ? $qi_config['no_dbpasswd'] : 0, 'CONFIG_POPULATE' => isset($qi_config['populate']) ? $qi_config['populate'] : 0, 'CONFIG_QI_DST' => !empty($qi_config['qi_dst']) ? $qi_config['qi_dst'] : 0, 'CONFIG_QI_TZ' => !empty($qi_config['qi_tz']) ? $qi_config['qi_tz'] : 0, 'CONFIG_REDIRECT' => isset($qi_config['redirect']) ? $qi_config['redirect'] : 1, 'CONFIG_SERVER_NAME' => !empty($qi_config['server_name']) ? $qi_config['server_name'] : 'localhost', 'CONFIG_SERVER_PORT' => !empty($qi_config['server_port']) ? $qi_config['server_port'] : '80', 'CONFIG_SITE_DESC' => !empty($qi_config['site_desc']) ? $qi_config['site_desc'] : 'eviLs testing hood', 'CONFIG_SITE_NAME' => !empty($qi_config['site_name']) ? $qi_config['site_name'] : 'Testing Board', 'CONFIG_SMTP_AUTH' => !empty($qi_config['smtp_auth']) ? $qi_config['smtp_auth'] : 'PLAIN', 'CONFIG_SMTP_DELIVERY' => !empty($qi_config['smtp_delivery']) ? $qi_config['smtp_delivery'] : 0, 'CONFIG_SMTP_HOST' => !empty($qi_config['smtp_host']) ? $qi_config['smtp_host'] : '', 'CONFIG_SMTP_PASS' => !empty($qi_config['smtp_pass']) ? $qi_config['smtp_pass'] : '', 'CONFIG_SMTP_PORT' => !empty($qi_config['smtp_port']) ? $qi_config['smtp_port'] : 25, 'CONFIG_SMTP_USER' => !empty($qi_config['smtp_user']) ? $qi_config['smtp_user'] : '', 'CONFIG_SUBSILVER' => isset($qi_config['subsilver']) ? $qi_config['subsilver'] : 0, 'CONFIG_TABLE_PREFIX' => !empty($qi_config['table_prefix']) ? $qi_config['table_prefix'] : 'phpbb_', 'CONFIG_NUM_USERS' => isset($qi_config['num_users']) ? $qi_config['num_users'] : 150, 'CONFIG_NUM_NEW_GROUP' => isset($qi_config['num_new_group']) ? $qi_config['num_new_group'] : 50, 'CONFIG_CREATE_ADMIN' => !empty($qi_config['create_admin']) ? 1 : 0, 'CONFIG_CREATE_MOD' => !empty($qi_config['create_mod']) ? 1 : 0, 'CONFIG_NUM_CATS' => isset($qi_config['num_cats']) ? $qi_config['num_cats'] : 2, 'CONFIG_NUM_FORUMS' => isset($qi_config['num_forums']) ? $qi_config['num_forums'] : 10, 'CONFIG_NUM_TOPICS_MIN' => isset($qi_config['num_topics_min']) ? $qi_config['num_topics_min'] : 1, 'CONFIG_NUM_TOPICS_MAX' => isset($qi_config['num_topics_max']) ? $qi_config['num_topics_max'] : 25, 'CONFIG_NUM_REPLIES_MIN' => isset($qi_config['num_replies_min']) ? $qi_config['num_replies_min'] : 1, 'CONFIG_NUM_REPLIES_MAX' => isset($qi_config['num_replies_max']) ? $qi_config['num_replies_max'] : 15, 'CONFIG_EMAIL_DOMAIN' => isset($qi_config['email_domain']) ? $qi_config['email_domain'] : '', 'SEL_LANG' => !empty($language) ? $language : ''));
// Output page
Exemplo n.º 10
0
    update_settings($db, $name_option, $value_option);
}
if (!empty($_POST) && isset($_POST["update_site_description"]) && $_POST["update_site_description"] == "1") {
    $name_option = $_POST["name_option"];
    $value_option = addslashes($_POST["site_description"]);
    update_settings($db, $name_option, $value_option);
}
if (!empty($_POST) && isset($_POST["update_theme"]) && $_POST["update_theme"] == "1") {
    $name_option = $_POST["name_option"];
    $value_option = $_POST["css_bootstrap"];
    update_settings($db, $name_option, $value_option);
}
if (!empty($_POST) && isset($_POST["update_footer"]) && $_POST["update_footer"] == "1") {
    $name_option = $_POST["name_option"];
    $value_option = addslashes($_POST["footer"]);
    update_settings($db, $name_option, $value_option);
}
?>

<div class="container-fluid">
	<div class="row">
		<div class="col-md-6">
			<fieldset class="well"><h2>NOM DE L'APPLICATION</h2><em>("site_title")</em>
			<hr />
			<center>Titre actuel = <em><?php 
echo $line_site_title["value"];
?>
</em></center>
				<br />
			<form role="form" method="POST"> <input type="hidden" name="update_site_title" value="1" /> <input type="hidden" name="name_option" value="site_title" />
				<input type="text" name="site_title" class="form-control" />
Exemplo n.º 11
0
        }
    }
    $_SESSION['next'] = $next;
    header('location: index.php');
    die('Redirecting you...');
}
require 'config.php';
require_once 'header.php';
require_once 'mod_errorlogs.php';
require_once 'mod_settings.php';
$show_default = true;
echo '<h1>Enthusiast 3 Settings</h1>';
$action = isset($_REQUEST["action"]) ? $_REQUEST['action'] : '';
/*______________________________________________________________________EDIT_*/
if ($action == 'edit') {
    update_settings($_POST);
    echo '<p class="success">Settings updated.</p>';
}
/*___________________________________________________________________DEFAULT_*/
if ($show_default) {
    $mail_settings = get_setting('mail_settings');
    ?>
   <p>Via this page, you can edit the current settings of Enthusiast 3.
   The current value of each setting is shown in the text fields. Edit
   these values and click "Update settings" to change the settings.</p>

   <form action="settings.php" method="post">
   <input type="hidden" name="action" value="edit" />

   <table>