Ejemplo n.º 1
0
function utilities_view_tech() {
	global $colors, $config, $rrdtool_versions;

	/* Remove all cached settings, cause read of database */
	kill_session_var("sess_config_array");

	$tabs = array(
		"general" => __("General"),
		"database" => __("DB Info"),
		"process" => __("DB Processes"),
		"php" => __("PHP Info"),
		"i18n" => __("Languages")
	);

	/* set the default settings category */
	if (!isset($_REQUEST["tab"])) {
		/* there is no selected tab; select the first one */
		$current_tab = array_keys($tabs);
		$current_tab = $current_tab[0];
	}else{
		$current_tab = $_REQUEST["tab"];
	}

	/* draw the categories tabs on the top of the page */
	print "<table width='100%' cellspacing='0' cellpadding='0' align='center'><tr>";
	print "<td><div class='tabs'>";

	if (sizeof($tabs) > 0) {
	foreach (array_keys($tabs) as $tab_short_name) {
		print "<div class='tabDefault'><a " . (($tab_short_name == $current_tab) ? "class='tabSelected'" : "class='tabDefault'") . " href='" . htmlspecialchars("utilities.php?action=view_tech&tab=$tab_short_name") . "'>$tabs[$tab_short_name]</a></div>";
	}
	}
	print "</div></td></tr></table>";

	if (!isset($_REQUEST["tab"])) {
		$_REQUEST["tab"] = "general";
	}

	switch (get_request_var_request("tab")) {
		case "general":
			display_general();

			break;
		case "database":
			display_database();

			break;
		case "process":
			display_database_processes();

			break;
		case "php":
			display_php();

			break;
		case "i18n":
			display_languages();
		default:

			break;
	}
}
Ejemplo n.º 2
0
                     user_skinpath = "' . str_replace('"', ' ', $_POST['user_skinpath']) . '",
                     language = "' . $_POST['user_language'] . '",
                     tutorial = "' . $_POST['user_tutorial'] . '",
                     notepad_cols = "' . (int) $_POST['notepad_cols'] . '",
                     notepad_width = "' . (int) $_POST['notepad_width'] . '",
                     skin_farbe = "' . htmlspecialchars($_POST['skin_farbe']) . '",
                     user_enable_sig = ' . (int) $_POST['user_enable_sig'] . ',
                     plz = "' . addslashes($_POST['plz']) . '",
                     country = "' . $_POST['country'] . '"
                 WHERE user_id = ' . $game->player['user_id'];
         if (!$db->query($sql)) {
             message(DATABASE_ERROR, 'Could not update user data');
         }
         redirect('a=settings&view=general');
     }
     display_general();
     break;
 case 'delete_account':
     if ($game->SITTING_MODE) {
         message(NOTICE, constant($game->sprache("TEXT120")));
     }
     if (!empty($_POST['submit_del'])) {
         if (md5($_POST['current_password']) != $game->player['user_password']) {
             display_delete_account(constant($game->sprache("TEXT121")));
             return;
         }
         $sql = 'UPDATE user
                 SET user_active = 3
                 WHERE user_id = ' . $game->player['user_id'];
         if (!$db->query($sql)) {
             message(DATABASE_ERROR, 'Could not update user active data');