php7 only

This commit is contained in:
flash 2016-03-28 00:15:51 +02:00
parent 6da8eb931d
commit c29f352bdd
37 changed files with 75 additions and 79 deletions

View file

@ -5,10 +5,10 @@
## Requirements
- PHP 5.5.0 or newer
- A database engine compatible with your PHP install and Laravel/Illuminate's database abstraction layer.
- PHP 7.0.0 or newer
- A database engine compatible with your PHP install and Laravel/Illuminate's database abstraction layer, MySQL 5.7 recommended.
_these will likely update in the future because i'm planning to go php 7 only_
I will include a full list of required extensions later.
## Contributing

View file

@ -8,7 +8,7 @@
"issues": "https://github.com/flashwave/sakura/issues"
},
"require": {
"php": ">=5.5.0",
"php": ">=7.0.0",
"ext-curl": "*",
"ext-json": "*",
"twig/twig": "*",

View file

@ -104,6 +104,8 @@ class Template
self::$template->addFunction(new Twig_SimpleFunction('route', function ($name, $args = null) {
return Router::route($name, $args);
}));
self::$template->addFunction(new Twig_SimpleFunction('session_id', 'session_id'));
}
/**

View file

@ -9,6 +9,9 @@ namespace Sakura;
use Sakura\Perms\Site;
use Sakura\Router;
// Legacy support!!!!!!!!!
$renderData = [];
// If this we're requesting notifications this page won't require templating
if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notifications']) {
define('SAKURA_NO_TPL', true);

View file

@ -23,9 +23,9 @@ set_time_limit(0);
// Set internal encoding method
mb_internal_encoding('utf-8');
// Stop the execution if the PHP Version is older than 5.5.0
if (version_compare(phpversion(), '5.5.0', '<')) {
throw new \Exception('Sakura requires at least PHP 5.5.0, please upgrade to a newer PHP version.');
// Stop the execution if the PHP Version is older than 7.0.0
if (version_compare(phpversion(), '7.0.0', '<')) {
throw new \Exception('Sakura requires at least PHP 7.0.0, please upgrade to a newer PHP version.');
}
// Check if the composer autoloader exists
@ -162,16 +162,10 @@ if (!defined('SAKURA_NO_TPL')) {
'forumTextMaxLength' => Config::get('forum_text_max'),
'forumTextMinLength' => Config::get('forum_text_min'),
],
'php' => [
'sessionid' => \session_id(),
'time' => \time(),
'self' => $_SERVER['PHP_SELF'],
],
'session' => array_merge([
'checkLogin' => $authCheck,
'sessionId' => $authCheck[1],
'userId' => $authCheck[0],
], $_SESSION),
'user' => $currentUser,
@ -183,9 +177,6 @@ if (!defined('SAKURA_NO_TPL')) {
'server' => $_SERVER,
]);
// Add the default render data
$renderData = [];
// Site closing
if (Config::get('site_closed')) {
// Set parse variables

View file

@ -108,7 +108,7 @@
<li><a href="{{ urls.format('SETTING_CAT', ['messages']) }}">Private Messages</a></li>
<li><a href="{{ urls.format('SETTINGS_INDEX') }}">User Settings</a></li>
<li><a href="{{ urls.format('MANAGE_INDEX') }}">Site Management</a></li>
<li><a href="{{ urls.format('USER_LOGOUT', [php.time, php.sessionid, sakura.currentPage]) }}">Logout</a></li>
<li><a href="{{ urls.format('USER_LOGOUT', [date().timestamp, session_id(), sakura.currentPage]) }}">Logout</a></li>
</ul>
{% endif %}
</li>

View file

@ -95,7 +95,7 @@
<li class="edit"><a title="Edit your profile" href="{{ urls.format('SETTING_MODE', ['general', 'profile']) }}">Edit</a></li>
<li class="settings"><a title="Change your settings" href="{{ urls.format('SETTINGS_INDEX') }}">Settings</a></li>
{% else %}
<li class="{% if user.checkFriends(profile.id) == 2 %}mutualFriend{% elseif user.checkFriends(profile.id) == 1 %}pendingFriend{% else %}addFriend{% endif %}"><a href="{% if user.checkFriends(profile.id) == 0 %}{{ urls.format('FRIEND_ADD', [profile.id, php.sessionid, php.time, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [profile.id, php.sessionid, php.time, sakura.currentPage]) }}{% endif %}">{% if user.checkFriends(profile.id) == 0 %}Add friend{% else %}Friends{% endif %}</a></li>
<li class="{% if user.checkFriends(profile.id) == 2 %}mutualFriend{% elseif user.checkFriends(profile.id) == 1 %}pendingFriend{% else %}addFriend{% endif %}"><a href="{% if user.checkFriends(profile.id) == 0 %}{{ urls.format('FRIEND_ADD', [profile.id, session_id(), date().timestamp, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [profile.id, session_id(), date().timestamp, sakura.currentPage]) }}{% endif %}">{% if user.checkFriends(profile.id) == 0 %}Add friend{% else %}Friends{% endif %}</a></li>
<li class="report"><a href="{{ urls.format('USER_REPORT', [profile.id]) }}">Report</a></li>
{% endif %}
</ul>

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" class="box">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="options" />
{% for field in options.fields %}
<div>

View file

@ -13,7 +13,7 @@
</div>
<form method="post" action="{{ route('auth.login') }}" id="loginForm">
<input type="hidden" name="redirect" value="{{ sakura.referrer ? sakura.referrer : route('main.index') }}" />
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<div class="leftAlign">
<label for="loginUserName">Username:</label>
</div>

View file

@ -12,7 +12,7 @@
Reactivate account
</div>
<form method="post" action="{{ route('auth.reactivate') }}" id="resendForm">
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<div class="leftAlign">
<label for="activeUserName">Username:</label>
</div>

View file

@ -20,7 +20,7 @@
Register
</div>
<form id="registerForm" method="post" action="{{ route('auth.register') }}" style="display:{% if haltRegistration %}none{% else %}block{% endif %};">
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<div class="leftAlign">
<label for="registerUserName">Username:</label>
</div>

View file

@ -12,7 +12,7 @@
Reset Password
</div>
<form method="post" action="{{ route('auth.resetpassword') }}" id="passwordForm">
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
{% if get.u is defined and get.k is defined %}
<input type="hidden" name="user" value="{{ get.u }}" />
<input type="hidden" name="key" value="{{ get.k }}" />

View file

@ -6,13 +6,13 @@
<div class="comment-controls">
<ul>
{% if comment.comment_poster.id == user.id %}
<li><a href="{{ urls.format('COMMENT_DELETE', [comment.comment_id, comment.comment_category, php.sessionid])}}" class="clean fa fa-trash-o comment-deletion-link" title="Delete" id="comment-action-delete-{{ comment.comment_id }}"></a></li>
<li><a href="{{ urls.format('COMMENT_DELETE', [comment.comment_id, comment.comment_category, session_id()])}}" class="clean fa fa-trash-o comment-deletion-link" title="Delete" id="comment-action-delete-{{ comment.comment_id }}"></a></li>
{% else %}
<li><a href="{{ urls.format('USER_REPORT', [comment.comment_poster.id]) }}" class="clean fa fa-exclamation-circle" title="Report" id="comment-action-report-{{ comment.comment_id }}"></a></li>
{% endif %}
<li><a href="javascript:void(0);" onclick="commentReply({{ comment.comment_id }}, '{{ php.sessionid }}', '{{ comment.comment_category }}', '{{ urls.format('COMMENT_POST') }}', '{{ route('file.avatar', user.id) }}');" class="clean fa fa-reply" title="Reply" id="comment-action-reply-{{ comment.comment_id }}"></a></li>
<li class="shown voting like"><a href="{{ urls.format('COMMENT_VOTE', [comment.comment_id, 1, comment.comment_category, php.sessionid])}}" class="clean comment-like-link" id="comment-action-like-{{ comment.comment_id }}"><span class="fa fa-thumbs-up"></span> <span id="comment-{{ comment.comment_id }}-likes">{{ comment.comment_likes }}</span></a></li>
<li class="shown voting dislike"><a id="comment-action-dislike-{{ comment.comment_id }}" href="{{ urls.format('COMMENT_VOTE', [comment.comment_id, 0, comment.comment_category, php.sessionid])}}" class="clean comment-dislike-link"><span class="fa fa-thumbs-down"></span> <span id="comment-{{ comment.comment_id }}-dislikes">{{ comment.comment_dislikes }}</span></a></li>
<li><a href="javascript:void(0);" onclick="commentReply({{ comment.comment_id }}, '{{ session_id() }}', '{{ comment.comment_category }}', '{{ urls.format('COMMENT_POST') }}', '{{ route('file.avatar', user.id) }}');" class="clean fa fa-reply" title="Reply" id="comment-action-reply-{{ comment.comment_id }}"></a></li>
<li class="shown voting like"><a href="{{ urls.format('COMMENT_VOTE', [comment.comment_id, 1, comment.comment_category, session_id()])}}" class="clean comment-like-link" id="comment-action-like-{{ comment.comment_id }}"><span class="fa fa-thumbs-up"></span> <span id="comment-{{ comment.comment_id }}-likes">{{ comment.comment_likes }}</span></a></li>
<li class="shown voting dislike"><a id="comment-action-dislike-{{ comment.comment_id }}" href="{{ urls.format('COMMENT_VOTE', [comment.comment_id, 0, comment.comment_category, session_id()])}}" class="clean comment-dislike-link"><span class="fa fa-thumbs-down"></span> <span id="comment-{{ comment.comment_id }}-dislikes">{{ comment.comment_dislikes }}</span></a></li>
</ul>
<div class="clear"></div>
</div>

View file

@ -2,7 +2,7 @@
<div class="comment-input-section">
{% if session.checkLogin %}
<form action="{{ urls.format('COMMENT_POST') }}" method="post" id="commentsForm">
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<input type="hidden" name="category" value="{{ commentsCategory }}" />
<input type="hidden" name="replyto" value="0" />
<input type="hidden" name="mode" value="comment" />

View file

@ -1,5 +1,5 @@
<form method="post" action="{{ route('forums.thread.mod', thread.id) }}" style="display: inline-block;">
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
{% if forumSticky is defined %}
<button class="forumbtn" title="{{ forumSticky ? 'Unsticky' : 'Sticky' }}" name="action" value="sticky"><span class="fa fa-{{ forumSticky ? 'remove' : 'thumb-tack' }}"></span></button>
{% endif %}

View file

@ -4,7 +4,7 @@
{% set forumBackLink %}{{ route('forums.index') }}{% endset %}
{% set forumNewLink %}{{ route('forums.new', forum.id) }}{% endset %}
{% set forumMarkRead %}{{ route('forums.mark', forum.id) }}?s={{ php.sessionid }}{% endset %}
{% set forumMarkRead %}{{ route('forums.mark', forum.id) }}?s={{ session_id() }}{% endset %}
{% block title %}{{ title }}{% endblock %}

View file

@ -99,7 +99,7 @@
{% if user.isFriends(post.poster.id) != 0 %}
<a class="fa fa-{% if user.isFriends(post.poster.id) == 2 %}heart{% else %}star{% endif %}" title="You are friends"></a>
{% endif %}
<a class="fa fa-user-{% if user.isFriends(post.poster.id) == 0 %}plus{% else %}times{% endif %} forum-friend-toggle" title="{% if user.isFriends(post.poster.id) == 0 %}Add {{ post.poster.username }} as a friend{% else %}Remove friend{% endif %}" href="{% if user.isFriends(post.poster.id) == 0 %}{{ urls.format('FRIEND_ADD', [post.poster.id, php.sessionid, php.time, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [post.poster.id, php.sessionid, php.time, sakura.currentPage]) }}{% endif %}"></a>
<a class="fa fa-user-{% if user.isFriends(post.poster.id) == 0 %}plus{% else %}times{% endif %} forum-friend-toggle" title="{% if user.isFriends(post.poster.id) == 0 %}Add {{ post.poster.username }} as a friend{% else %}Remove friend{% endif %}" href="{% if user.isFriends(post.poster.id) == 0 %}{{ urls.format('FRIEND_ADD', [post.poster.id, session_id(), date().timestamp, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [post.poster.id, session_id(), date().timestamp, sakura.currentPage]) }}{% endif %}"></a>
<a class="fa fa-flag" title="Report {{ post.poster.username }}" href="{{ urls.format('USER_REPORT', [post.poster.id]) }}"></a>
{% endif %}
<a class="fa fa-reply" title="Quote this post" href="javascript:void(0);" onclick="quotePost({{ post.id }});"></a>

View file

@ -9,8 +9,8 @@
<hr class="default" />
{{ message }}
<form method="post" action="{{ sakura.currentPage }}" id="confirmationForm">
<input type="hidden" name="sessionid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessionid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
{% for key,value in conditions %}
<input type="hidden" name="{{ key }}" value="{{ value }}" />
{% endfor %}

View file

@ -102,7 +102,7 @@
<a class="menu-item fa-gavel" href="{{ urls.format('MANAGE_INDEX') }}" title="Manage"></a>
{% endif %}
<a class="menu-item fa-cogs" href="{{ urls.format('SETTINGS_INDEX') }}" title="Settings"></a>
<a class="menu-item fa-sign-out" href="{{ route('auth.logout') }}?s={{ php.sessionid }}" title="Logout" id="headerLogoutLink"></a>
<a class="menu-item fa-sign-out" href="{{ route('auth.logout') }}?s={{ session_id() }}" title="Logout" id="headerLogoutLink"></a>
{% else %}
{% if sakura.lockAuth %}
<div class="menu-item fa-lock" style="padding-left: 10px; padding-right: 10px;" title="Authentication is locked"></div>
@ -123,8 +123,8 @@
<div class="headerLoginContainer">
<form method="post" action="{{ route('auth.login') }}" id="headerLoginForm">
<input type="hidden" name="redirect" value="{{ sakura.currentPage }}" />
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="time" value="{{ php.time }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<input type="hidden" name="time" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="login" />
<div>
<label for="headerLoginUserName">Username:</label>
@ -170,7 +170,7 @@
{% endif %}
{% block content %}
<h1 class="stylised" style="text-align: center; margin: 2em auto;">{{ php.self }} is now printing!</h1>
<h1 class="stylised" style="text-align: center; margin: 2em auto;">There is nothing here!</h1>
{% endblock %}
</div>
<div class="footer">
@ -219,10 +219,10 @@
}
}
notifyRequest('{{ php.sessionid }}');
notifyRequest('{{ session_id() }}');
setInterval(function() {
notifyRequest('{{ php.sessionid }}');
notifyRequest('{{ session_id() }}');
}, 60000);
</script>
{% if sakura.dev.showChangelog and stats %}

View file

@ -114,11 +114,11 @@
<a class="fa fa-pencil-square-o" title="Edit your profile" href="{{ urls.format('SETTING_MODE', ['general', 'profile']) }}"></a>
{% else %}
{% if user.isFriends(profile.id) != 0 %}<a class="fa fa-{% if user.isFriends(profile.id) == 2 %}heart{% else %}star{% endif %}" title="You are friends"></a>{% endif %}
<a class="fa fa-user-{% if user.isFriends(profile.id) == 0 %}plus{% else %}times{% endif %}" title="{% if user.isFriends(profile.id) == 0 %}Add {{ profile.username }} as a friend{% else %}Remove friend{% endif %}" href="{% if user.isFriends(profile.id) == 0 %}{{ urls.format('FRIEND_ADD', [profile.id, php.sessionid, php.time, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [profile.id, php.sessionid, php.time, sakura.currentPage]) }}{% endif %}" id="profileFriendToggle"></a>
<a class="fa fa-user-{% if user.isFriends(profile.id) == 0 %}plus{% else %}times{% endif %}" title="{% if user.isFriends(profile.id) == 0 %}Add {{ profile.username }} as a friend{% else %}Remove friend{% endif %}" href="{% if user.isFriends(profile.id) == 0 %}{{ urls.format('FRIEND_ADD', [profile.id, session_id(), date().timestamp, sakura.currentPage]) }}{% else %}{{ urls.format('FRIEND_REMOVE', [profile.id, session_id(), date().timestamp, sakura.currentPage]) }}{% endif %}" id="profileFriendToggle"></a>
{#<a class="fa fa-exclamation-circle" title="Report {{ profile.username }}" href="{{ urls.format('USER_REPORT', [profile.id]) }}"></a>#}
{% endif %}
{% if user.permission(constant('Sakura\\Perms\\Manage::CAN_RESTRICT_USERS'), constant('Sakura\\Perms::MANAGE')) %}
<a class="fa fa-trash" title="Restrict {{ profile.username }}" href="?restrict={{ php.sessionid }}"></a>
<a class="fa fa-trash" title="Restrict {{ profile.username }}" href="?restrict={{ session_id() }}"></a>
{% endif %}
</div>
{% endif %}

View file

@ -22,7 +22,7 @@
</div>
<div style="margin-bottom: 10px;">
<h3>{% if persistentPremium %}Your rank has persistent Tenshi.{% else %}Your Tenshi tag is valid till {{ user.premiumInfo.expire|date(sakura.dateFormat) }}.{% endif %}</h3>
<progress value="{{ persistentPremium ? 100 : (100 - (((php.time - user.premiumInfo.start) / (user.premiumInfo.expire - user.premiumInfo.start)) * 100)) }}" max="100" style="width: 100%"></progress>
<progress value="{{ persistentPremium ? 100 : (100 - (((date().timestamp - user.premiumInfo.start) / (user.premiumInfo.expire - user.premiumInfo.start)) * 100)) }}" max="100" style="width: 100%"></progress>
</div>
{% endif %}
<div class="sectionHeader">
@ -112,8 +112,8 @@
{% if session.checkLogin and user.permission(constant('Sakura\\Perms\\Site::OBTAIN_PREMIUM')) %}
<form action="{{ route('premium.purchase') }}" method="post" id="purchaseForm" class="hidden">
<input type="hidden" name="mode" value="purchase" />
<input type="hidden" name="time" value="{{ php.time }}" />
<input type="hidden" name="session" value="{{ php.sessionid }}" />
<input type="hidden" name="time" value="{{ date().timestamp }}" />
<input type="hidden" name="session" value="{{ session_id() }}" />
<input type="hidden" name="months" id="monthsNo" value="1" />
</form>
<script type="text/javascript">

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="emailAddressChangeForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="email" />
<h3 style="text-align: center;">Your e-mail address is currently set to <span style="font-weight: 700;">{{ user.email }}</span>.</h3>
<div class="profile-field">

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="changePasswordForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="password" />
<div class="profile-field">
<div><h2>Current Password</h2></div>

View file

@ -7,8 +7,8 @@
</td>
<td style="width: 90px;">
<form method="post" action="{{ sakura.currentPage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="rank" value="{{ rank.id }}" />
<input type="hidden" name="mode" value="ranks" />
<input type="hidden" name="submit" value="hello" />

View file

@ -1,8 +1,8 @@
{% set eligible = user.getUsernameHistory ? (php.time - user.getUsernameHistory()[0].change_time) > 2592000 : true %}
{% set eligible = user.getUsernameHistory ? (date().timestamp - user.getUsernameHistory()[0].change_time) > 2592000 : true %}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="changeUsernameForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="username" />
<h1 class="stylised" style="text-align: center; margin-top: 10px;{% if not eligible %} color: #c44;{% endif %}">You are {% if not eligible %}not {% endif %}eligible for a name change.</h1>
<h3 style="text-align: center;">{% if user.getUsernameHistory %}Your last name change was <time>{{ user.getUsernameHistory[0]['change_time']|date(sakura.dateFormat) }}</time>.{% else %}This is your first username change.{% endif %}</h3>

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="changeUserTitleForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="usertitle" />
<h3 style="text-align: center;">Your current user title is:<br /><span style="font-weight: 700;">{{ user.title }}</span></h3>
<div class="profile-field">

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="changePasswordForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="deactivate" />
<div class="profile-field">
<div><h2>Username</h2></div>

View file

@ -19,8 +19,8 @@
</td>
<td style="width: 90px;">
<form method="post" action="{{ sakura.currentPage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="sessionid" value="{{ s.session_id }}" />
<input type="hidden" name="mode" value="sessions" />
<button class="inputStyling small" name="submit">Kill</button>
@ -32,8 +32,8 @@
</table>
<div class="profile-save">
<form method="post" action="{{ sakura.currentPage }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="sessionid" value="all" />
<input type="hidden" name="mode" value="sessions" />
<button class="inputStyling" name="submit">Kill all active sessions</button>

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="avatar" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ avatar.max_size }}" />
<div style="text-align: center;">

View file

@ -1,7 +1,7 @@
{% if user.permission(constant('Sakura\\Perms\\Site::CHANGE_BACKGROUND')) %}
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="background" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}" />
<div style="text-align: center;">

View file

@ -1,7 +1,7 @@
{% if user.permission(constant('Sakura\\Perms\\Site::CHANGE_HEADER')) %}
<form enctype="multipart/form-data" method="post" action="{{ setting.action }}">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="header" />
<input type="hidden" name="MAX_FILE_SIZE" value="{{ background.max_size }}" />
<div style="text-align: center;">

View file

@ -1,6 +1,6 @@
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="signatureEditorForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="signature" />
<div><textarea name="signature" id="signatureEditor" class="inputStyling" style="width: calc(100% - 12px); height: 400px;">{{ user.signature }}</textarea></div>
<div class="profile-save">

View file

@ -5,8 +5,8 @@
</div-->
<hr class="default" />
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="userPageEditorForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="userpage" />
<div><textarea name="userpage" id="userPageEditor" placeholder="[header]Welcome to my userpage![/header]" class="inputStyling" style="width: calc(100% - 12px); height: 400px;">{% if user.page %}{{ user.page }}{% else %}[header]Welcome to my userpage![/header]{% endif %}</textarea></div>
<div class="profile-save">

View file

@ -32,7 +32,7 @@ window.addEventListener("load", function() {
<div class="friends-list-name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
</a>
<div class="friends-list-actions"><!-- urls -->
<a class="remove fill fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}" id="friendslist-friend-action-remove-{{ friend.id }}"></a>
<a class="remove fill fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.id }}&amp;session={{ session_id() }}&amp;time={{ date().timestamp }}" id="friendslist-friend-action-remove-{{ friend.id }}"></a>
<div class="clear"></div>
</div>
</div>

View file

@ -32,8 +32,8 @@ window.addEventListener("load", function() {
<div class="friends-list-name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
</a>
<div class="friends-list-actions"><!-- urls -->
<a class="add fa fa-check" title="Add friend" href="/friends?add={{ friend.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}" id="friendslist-friend-action-add-{{ friend.id }}"></a>
<a class="remove fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.id }}&amp;session={{ php.sessionid }}&amp;time={{ php.time }}" id="friendslist-friend-action-remove-{{ friend.id }}"></a>
<a class="add fa fa-check" title="Add friend" href="/friends?add={{ friend.id }}&amp;session={{ session_id() }}&amp;time={{ date().timestamp }}" id="friendslist-friend-action-add-{{ friend.id }}"></a>
<a class="remove fa fa-remove" title="Remove friend" href="/friends?remove={{ friend.id }}&amp;session={{ session_id() }}&amp;time={{ date().timestamp }}" id="friendslist-friend-action-remove-{{ friend.id }}"></a>
<div class="clear"></div>
</div>
</div>

View file

@ -1,7 +1,7 @@
{% if options.fields %}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="optionsForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="options" />
{% for field in options.fields %}
<div class="profile-field">

View file

@ -1,8 +1,8 @@
{% set birthday = user.birthday|split('-') %}
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentPage }}" id="editProfileForm">
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
<input type="hidden" name="timestamp" value="{{ php.time }}" />
<input type="hidden" name="sessid" value="{{ session_id() }}" />
<input type="hidden" name="timestamp" value="{{ date().timestamp }}" />
<input type="hidden" name="mode" value="profile" />
{% for field in profile.fields %}
<div class="profile-field">