예제 #1
0
    if ($_SESSION['msg']['login-err']) {
        echo '<p class="err">' . $_SESSION['msg']['login-err'] . '<br /></p>';
        unset($_SESSION['msg']['login-err']);
    }
    echo '<form action="" method="post" enctype="multipart/form-data">
								<p><br />Логин:<br /><input type="text" name="username" id="username" class="field" /><br /></p>
								<p><br />Пароль:<br /><input type="password" name="password" id="password" class="field" /><br /></p>
								<p><br /><input name="rememberMe" id="rememberMe" type="checkbox"  value="1" /> &nbsp;Запомнить меня&nbsp;&nbsp;<br /></p>
								<p><input type="submit" name="submit" value="Войти" class="button" /><input type="button" onclick="location.href=\'download.php\'" value="Загрузки" class="regbutton2"/><br /></p>';
} else {
    $username = $_SESSION['playername'];
    if ($_SESSION['id']) {
        echo '<h1>Здравствуйте, ' . $username . '!</h1><h2> Добро пожаловать на страницу смены скинов!</h2>';
        echo '<input type="button" onclick="location.href=\'download.php\'" value="Загрузки" class="dlbutton" />';
        if (!empty($_POST['upload_submit'])) {
            $message = uploadHandle(5, $upload_dir);
            if (!empty($message['error'])) {
                echo '<p class="err">' . $message['error'] . '<br /></p>';
            }
            if (!empty($message['info'])) {
                echo '<p class="ok">' . $message['info'] . '<br /></p>';
            }
        }
        echo '<form action="" method="post" enctype="multipart/form-data">
										<br /><input type="file" name="userfile" />
										<p><br /><select name="Mod" class="field">
										<option value=1>Скин</option>
										<option value=2>Плащ</option>	
										<br /></p></select>
										<p><input type="submit" value="Загрузить" name="upload_submit" class="button" /><br /><br /></p></form>';
        echo '<h1> Скин:</h1><br />';
예제 #2
0
                } else {
                    $skinpath = $dir_skins . $username . '.png';
                }
                echo '<img src="skin2d.php?skinpath=' . $skinpath . '" />';
            }
            echo '<p><input type="button" onclick="location.href=\'?logoff\'" value="Выход" class="button"/></p>';
        }
    }
}
if ($login == 'off') {
    if (empty($_POST['username'])) {
        $_POST['username'] = false;
    }
    $username = $_POST['username'];
    if (!empty($_POST['upload_submit'])) {
        $message = uploadHandle();
        if (!empty($message['error'])) {
            echo '<p class="err">' . $message['error'] . '<br /></p>';
        }
        if (!empty($message['info'])) {
            echo '<p class="ok">' . $message['info'] . '<br /></p>';
        }
    }
    echo '<form action="" method="post" enctype="multipart/form-data">
								<p><br />Логин:<br /><input type="text" name="username" id="username" class="field" value="Имя в игре" onFocus="this.value=\'\'" /><br /></p>
								<br /><input type="file" name="userfile" />
								<p><br /><select name="Mod" class="field">
								<option value=1>Скин</option>
								<option value=2>Плащ</option>	
								<br /></p></select>
								<p><input type="submit" value="Закачать" name="upload_submit" class="button" /><br /><br /></p></form>';