remove static locations
This commit is contained in:
parent
90a36eab15
commit
8f8694f18a
10 changed files with 63 additions and 63 deletions
|
@ -8,10 +8,10 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20150405');
|
||||
define('SAKURA_VERSION', '20150406');
|
||||
|
||||
// Define Sakura Path
|
||||
define('ROOT', str_replace('_sakura', '', dirname(__FILE__)));
|
||||
define('ROOT', str_replace(basename(__DIR__), '', dirname(__FILE__)));
|
||||
|
||||
// Error Reporting: 0 for production and -1 for testing
|
||||
error_reporting(-1);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Print page contents
|
||||
print Main::tplRender('errors/http404.tpl', $renderData);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Amu Style Tests</title>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input type="submit" />
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Amu Style Tests</title>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input type="submit" />
|
||||
</body>
|
||||
</html>
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Add page specific things
|
||||
$renderData['page'] = [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h1>Development Tools</h1>
|
||||
<ul>
|
||||
<li><a href="sql.php">SQL</a>
|
||||
<li><a href="registerData.php">Registration Data</a>
|
||||
<h1>Development Tools</h1>
|
||||
<ul>
|
||||
<li><a href="sql.php">SQL</a>
|
||||
<li><a href="registerData.php">Registration Data</a>
|
||||
</ul>
|
|
@ -1,39 +1,39 @@
|
|||
<?php
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
|
||||
if(isset($_POST['submit'])) {
|
||||
|
||||
header('Content-Type: text/plain;charset=utf-8');
|
||||
|
||||
$pass = Sakura\Hashing::create_hash($_POST['password']);
|
||||
|
||||
$regData = [
|
||||
'username' => $_POST['username'],
|
||||
'username_clean' => Sakura\Main::cleanString($_POST['username'], true),
|
||||
'password_hash' => $pass[3],
|
||||
'password_salt' => $pass[2],
|
||||
'password_algo' => $pass[0],
|
||||
'password_iter' => $pass[1],
|
||||
'password_chan' => time(),
|
||||
'email' => Sakura\Main::cleanString($_POST['email'], true),
|
||||
'group_main' => '1',
|
||||
'groups' => json_encode([1]),
|
||||
'register_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'last_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'regdate' => time(),
|
||||
'lastdate' => time(),
|
||||
'lastunamechange' => time(),
|
||||
'profile_data' => json_encode([])
|
||||
];
|
||||
|
||||
print_r($regData);
|
||||
exit;
|
||||
|
||||
}
|
||||
?>
|
||||
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>">
|
||||
username: <input type="text" name="username" /><br />
|
||||
password: <input type="password" name="password" /><br />
|
||||
email: <input type="text" name="email" /><br />
|
||||
<input type="submit" name="submit" value="Submit" />
|
||||
</form>
|
||||
<?php
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
|
||||
if(isset($_POST['submit'])) {
|
||||
|
||||
header('Content-Type: text/plain;charset=utf-8');
|
||||
|
||||
$pass = Sakura\Hashing::create_hash($_POST['password']);
|
||||
|
||||
$regData = [
|
||||
'username' => $_POST['username'],
|
||||
'username_clean' => Sakura\Main::cleanString($_POST['username'], true),
|
||||
'password_hash' => $pass[3],
|
||||
'password_salt' => $pass[2],
|
||||
'password_algo' => $pass[0],
|
||||
'password_iter' => $pass[1],
|
||||
'password_chan' => time(),
|
||||
'email' => Sakura\Main::cleanString($_POST['email'], true),
|
||||
'group_main' => '1',
|
||||
'groups' => json_encode([1]),
|
||||
'register_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'last_ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'regdate' => time(),
|
||||
'lastdate' => time(),
|
||||
'lastunamechange' => time(),
|
||||
'profile_data' => json_encode([])
|
||||
];
|
||||
|
||||
print_r($regData);
|
||||
exit;
|
||||
|
||||
}
|
||||
?>
|
||||
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>">
|
||||
username: <input type="text" name="username" /><br />
|
||||
password: <input type="password" name="password" /><br />
|
||||
email: <input type="text" name="email" /><br />
|
||||
<input type="submit" name="submit" value="Submit" />
|
||||
</form>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Set Content type
|
||||
header('Content-Type: application/octet-stream');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Add page specific things
|
||||
$renderData['page'] = [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Set default variables
|
||||
$renderData['page'] = [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Include components
|
||||
require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
|
||||
// Add page specific things
|
||||
$renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])) ? $_GET['id'] : null, (isset($_GET['id']) && !isset($_GET['xml']) && is_numeric($_GET['id'])));
|
||||
|
|
Reference in a new issue