Such is the trouble, riveting mmo toy. And there was such a question. The game has locations, for example:
/game.php?page=map_1 /game.php?page=map_2 /game.php?page=map_3
And I wanted that users could not just enter their address and transfer, and I wrote such a thing:
if ($_SESSION['username']) { include 'conect_db.php'; $block = $_SERVER['HTTP_REFERER']; if (strlen($block) > 0) { /* Выводим локацию */ } else { echo "<script>alert('Ай-ай-ай Не моно так делать');</script>"; } } else { echo "<script>alert('Пройдите авторизацию');</script>"; }
And, voila, when he simply enters the address, the user displays the message: Ah-ah-ah Not mono do that . But suddenly, I opened the Opera, a hotbed of lags, open the source code and enter:
<script>location.href='/game.php?page=map_3';</script>
I poke to apply and transfers me. Tell me, please, how to seal this hole?