Пример #1
0
                    cookie("fm_accountid", $_SESSION['accountid']);
                    cookie("fm_username", escape($_POST['username']));
                    cookie("fm_password", password($_POST['password']));
                    successNotice("You have successfully created an account.");
                    redirect("index", 2);
                } else {
                    errorNotice("You have entered an invalid email address.");
                }
            } else {
                errorNotice("Your passwords do not match.");
            }
        } else {
            errorNotice("Your password must be at least 3 characters long.");
        }
    } else {
        errorNotice("Your username must be at least 3 characters long.");
    }
}
?>

<div align='center'>
	<div class='signUpContainer left'>
		<div class='loginHeading'>
			Sign Up
		</div>

		<form action='' method='POST' autocomplete='off'>
			<input type='text' name='username' placeholder='Username' value='<?php 
echo $_POST['username'];
?>
' maxlength='32' class='loginInput' autofocus>
Пример #2
0
require_once "configuration/main.php";
if ($_SESSION['accountid']) {
    //redirect("index");
}
if ($_POST['login']) {
    $mQuery = $mysql->query("SELECT `id` FROM `accounts` WHERE `username` = '" . escape($_POST['username']) . "' AND `password` = '" . password($_POST['password']) . "'");
    if ($mQuery->num_rows) {
        $mData = $mQuery->fetch_assoc();
        $_SESSION['accountid'] = $mData['id'];
        cookie("fm_accountid", $_SESSION['accountid']);
        cookie("fm_username", escape($_POST['username']));
        cookie("fm_password", password($_POST['password']));
        successNotice("You have successfully logged in.");
        redirect("index", 2);
    } else {
        errorNotice("The account information you have entered is invalid.");
    }
}
?>

<style>
	body
	{
		background: url(images/login-background.png) #525252 no-repeat;
		background-size: cover;
	}
</style>

<div align='center'>
	<div class='loginContainer left'>
		<table width='100%'>
Пример #3
0
<?php

require_once "configuration/main.php";
if (!$_SESSION['accountid']) {
    redirect("login");
}
if ($_GET['remove']) {
    $mQuery = $mysql->query("SELECT `path` FROM `files` WHERE `user` = '" . $_SESSION['accountid'] . "' AND `fileid` = '" . escape($_GET['remove']) . "'");
    if ($mQuery->num_rows) {
        $mData = $mQuery->fetch_assoc();
        $mysql->query("DELETE FROM `files` WHERE `user` = '" . $_SESSION['accountid'] . "' AND `fileid` = '" . escape($_GET['remove']) . "'");
        unlink($mData['path']);
        errorNotice("The file has been removed.");
        redirect("index", 2);
    } else {
        redirect("index");
    }
}
?>

<h1 class='pageHeading'>
	<table cellpadding='0' cellspacing='0' width='95%'>
		<tr>
			<td>
				My Files
			</td>

			<td align='right'>
				<button id='uploadFiles' class='basicButton'>
					Upload
				</button>