Пример #1
0
$continue = TRUE;

$_POST['command'] = Trim($_POST['command']);
IF(($command = SubStr($_POST['command'], 0, StrPos($_POST['command'], " "))) == FALSE)
	$command = $_POST['command'];
$param = LTrim(StrStr($_POST['command'], " "));

//Print "'".$command."' - '".$param."' - '".$_POST['command']."'";

SWITCH(StrToLower($command)) {
//---------------------------------------------------------------------
//	+passwd
	CASE "+passwd" :
		$password = $param;

		IF(!PasswordChange($password, $password, $nick, 1)) {
			VA_Alert($err_msg_pwd_ch_not_allowed, "error", "index.php?".Change_URL_Query("q", $_GET['return'], "return", ""));
			$continue = FALSE;
			}

		BREAK;

//---------------------------------------------------------------------
//	!help
	CASE "!?" :
	CASE "!h" :
	CASE "!help" :
		Header("Location: index.php?q=commands");
		Die();

		BREAK;
Пример #2
0
IF($debug[0])
	{Error_Reporting(E_ALL ^ E_NOTICE);}
ELSEIF($debug[1])
	{Error_Reporting(E_ALL);}
ELSE
	{Error_Reporting(0);}


IF($VA_setup['version'] < VA_COUNT) {
	$update_OK = FALSE;
	Include "update.php";
	}

$pw_ch_suc = TRUE;
IF(IsSet($_POST['pwd_change']))
	{$pw_ch_suc = PasswordChange($_POST['password'], $_POST['password2'], $_POST['nick'], $_POST['crypted']);}

IF(!$pw_ch_suc)
	{
	IF($_POST['password'] != $_POST['password2'] || $_POST['password2'] == "" || $_POST['password'] == "")
		{$_GET['warn'] = "pwd_match";}
	ELSE
		{$_GET['err'] = "pwd_ch_not_allowed";}
	}

IF(IsSet($_POST['ch_pwd_only']))
	{$pw_ch_suc = FALSE;}

IF(($_COOKIE['login'] || (IsSet($_POST['nick']) && IsSet($_POST['password']))) && $pw_ch_suc) {
	//If users is logged in verify username and password
	Include "verify.php";