function php_generic_environment()
{
    require_once "lib/register_global.php";
    register_global($_SERVER);
    sanitize_uri();
}
예제 #2
0
		<td colspan="2">
			<strong><font color="#FF0000">*** Forced Password Change ***</font></strong><br><br>
			Please enter a new password for cacti:
		</td>
	</tr>
	<tr style="height:10px;"><td></td></tr>
	<tr>
		<td>Password:</td>
		<td><input type="password" name="password" size="40"></td>
	</tr>
	<tr>
		<td>Confirm:</td>
		<td><input type="password" name="confirm" size="40"></td>
	</tr>
	<tr style="height:10px;"><td></td></tr>
	<tr>
		<td><input type="submit" value="Save"></td>
	</tr>
</table>

<input type="hidden" name="action" value="changepassword">
<input type="hidden" name="ref" value="<?php 
print isset($_REQUEST["ref"]) ? sanitize_uri($_REQUEST["ref"]) : '';
?>
">

</form>

</body>
</html>
예제 #3
0
        } else {
            $bad_password = true;
        }
        break;
}
if (api_plugin_hook_function('custom_password', OPER_MODE_NATIVE) == OPER_MODE_RESKIN) {
    exit;
}
if ($bad_password && $errorMessage == "") {
    $errorMessage = "<span color='#FF0000'><strong>Your new passwords do not match, please retype.</strong></span>";
} elseif ($_REQUEST['action'] == 'force') {
    $errorMessage = "<span color='#FF0000'><strong>*** Forced password change ***</strong></span>";
}
print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>\n";
print "<html>\n";
print "<head>\n";
print "\t<title>Change Password</title>\n";
print "\t<meta http-equiv='Content-Type' content='text/html;charset=utf-8'>\n";
print "\t<link href='" . $config['url_path'] . "include/themes/" . read_config_option('selected_theme') . "/main.css' type='text/css' rel='stylesheet'>\n";
print "\t<link href='" . $config['url_path'] . "include/themes/" . read_config_option('selected_theme') . "/jquery-ui.css' type='text/css' rel='stylesheet'>\n";
print "\t<link href='" . $config['url_path'] . "images/favicon.ico' rel='shortcut icon'>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/js/jquery.js' language='javascript'></script>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/js/jquery-ui.js' language='javascript'></script>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/js/jquery.cookie.js' language='javascript'></script>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/js/jquery.hotkeys.js'></script>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/layout.js'></script>\n";
print "\t<script type='text/javascript' src='" . $config['url_path'] . "include/themes/" . read_config_option('selected_theme') . "/main.js'></script>\n";
print "<script type='text/javascript'>var theme='" . read_config_option('selected_theme') . "';</script>\n";
print "</head>\n";
print "<body class='loginBody'>\n\t<div class='loginLeft'></div>\n\t<div class='loginCenter'>\n\t\t<div class='loginArea'>\n\t\t\t<div class='cactiLogoutLogo'></div>\n\t\t\t<legend>Change Password</legend>\n\t\t\t<form name='login' method='post' action='" . basename($_SERVER['PHP_SELF']) . "'>\n\t\t\t\t<input type='hidden' name='action' value='changepassword'>\n\t\t\t\t<input type='hidden' name='ref' value='" . (isset($_REQUEST['ref']) ? sanitize_uri($_REQUEST['ref']) : '') . "'>\n\t\t\t\t<input type='hidden' name='name' value='" . (isset($user['username']) ? $user['username'] : '') . "'>\n\t\t\t\t<div class='loginTitle'>\n\t\t\t\t\t<p>Please enter your current password and your new<br>Cacti password.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class='cactiLogin'>\n\t\t\t\t\t<table class='cactiLoginTable' cellpadding='0' cellspacing='0' border='0'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Current password</td>\n\t\t\t\t\t\t\t<td><input type='password' id='current' name='current_password' autocomplete='off' size='20' placeholder='********'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>New password</td>\n\t\t\t\t\t\t\t<td><input type='password' name='password' autocomplete='off' size='20' placeholder='********'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Confirm new password</td>\n\t\t\t\t\t\t\t<td><input type='password' name='confirm' autocomplete='off' size='20' placeholder='********'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><input type='submit' value='Save'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t\t<div class='loginErrors'>" . $errorMessage . "</div>\n\t\t</div>\n\t\t<div class='versionInfo'>Version " . $version . " | " . COPYRIGHT_YEARS_SHORT . "</div>\n\t</div>\n\t<div class='loginRight'></div>\n\t<script type='text/javascript'>\n\t\$(function() {\n\t\t\$('#current').focus();\n\t\t\$('.loginLeft').css('width',parseInt(\$(window).width()*0.33)+'px');\n\t\t\$('.loginRight').css('width',parseInt(\$(window).width()*0.33)+'px');\n\t});\n\t</script>\n\t</body>\n\t</html>\n";
예제 #4
0
파일: functions.php 프로젝트: MrWnn/cacti
function get_browser_query_string()
{
    if (!empty($_SERVER['REQUEST_URI'])) {
        return sanitize_uri($_SERVER['REQUEST_URI']);
    } else {
        return sanitize_uri(basename($_SERVER['PHP_SELF']) . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
    }
}
예제 #5
0
function get_browser_query_string()
{
    if (!empty($_SERVER["REQUEST_URI"])) {
        return sanitize_uri($_SERVER["REQUEST_URI"]);
    } else {
        return sanitize_uri(basename($_SERVER["PHP_SELF"]) . (empty($_SERVER["QUERY_STRING"]) ? "" : "?" . $_SERVER["QUERY_STRING"]));
    }
}