{{ form_start(registrationForm) }}
<div class="uk-margin">
{{ form_label(registrationForm.email, 'Эл. почта', {'label_attr': {'class': 'uk-form-label'}}) }}
{{ form_widget(registrationForm.email, {'attr': {'class': 'uk-input'}}) }}
</div>
<div class="uk-margin">
{{ form_label(registrationForm.password, 'Пароль', {'label_attr': {'class': 'uk-form-label'}}) }}
{{ form_widget(registrationForm.password, {'attr': {'class': 'uk-input'}}) }}
</div>
<div class="uk-margin" style="display:flex;justify-content:center">
<button class="uk-button uk-button-primary" type="submit">
Зарегистрироваться
</button>
</div>
{{ form_end(registrationForm) }}
$jsonOrders = file_get_contents('templates/api/index.html.twig');
$orders = json_decode($jsonOrders); //,TRUE
foreach($orders as $order)
{
if($order->id == 1002)
{
$order->status = 'cancelled';
}
}
file_put_contents('templates/api/index.html.twig', json_encode($orders));
<style>
.display-automessage {display:none;}
</style>
<script>
if(localStorage.getItem('fistVisit'))
{
if (localStorage.getItem('fistVisit') < Date())
{
setTimeout(() => {
document.querySelector(".display-automessage").style.display="inline"
}, 10);
}
}
else
{
var date = new Date();
date.setSeconds(date.getSeconds() + 5);
localStorage.setItem('fistVisit', date);
setTimeout(() => {
document.querySelector(".display-automessage").style.display="inline"
}, 5000);
}
</script>
<div class="display-automessage">
hello
</div>
$sql = R::getAll( 'SELECT * FROM users, locations ORDER BY rand() LIMIT 3' );
foreach ($sql as $sq) {
echo $sq['names']." ".$sq['locations']."<br/>";
}