Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Не трябва да има!!!session_start();
<?php
session_start();
if(isset($_SESSION['name'])) {
echo "Bravo";
} else {
header("Location: nf.php");
}
?>
if($_SESSION['name']) {
echo "Bravo";
} else {
echo '<meta http-equiv="refresh" url=http://адрес"> ';
}
<script type="text/javascript" src="overlib.js"></script>
<?php
if($_SESSION['name']) {
$name = $_SESSION['name'];
if(isset($_GET['id'])) {
$id = htmlspecialchars($_GET['id']);
if($id == 1){$enrg = '10'; $cost = '3';}
if($id == 2){$enrg = '20'; $cost = '5';}
if($id == 3){$enrg = '30'; $cost = '7';}
if($id == 4){$enrg = '40'; $cost = '9';}
if($id == 5){$enrg = '50'; $cost = '1';}
if($id == 6){$enrg = '65'; $cost = '13';}
if($id == 7){$enrg = '80'; $cost = '17';}
if($id == 8){$enrg = '100'; $cost = '21';}
if($id == 9){$enrg = '200'; $cost = '50';}
$sql = "SELECT * FROM users WHERE name = '$name'";
$do = mysql_query($sql);
$my = mysql_fetch_array($do);
if($my['money'] < $cost) { echo 'Нямаш достатъчно пари'; } else {
$money = ($my['money'] - $cost);
$nrgy = ($my['nrg'] + $enrg);
if($nrgy > $my['maxnrg']) { $nrgy = $my['maxnrg']; }
$sql = "UPDATE users SET money = '$money', nrg = '$nrgy' WHERE name = '$name'";
if(mysql_query($sql)) { echo "Успешно зареди $enrg енергия"; }}} else { ?>
Меню<hr color='black' width='300' align='center' />
Тук пиша текст, който се показва в сайта.
<? }} else { да ме препраща } ?>
<script type="text/javascript" src="overlib.js"></script>
<?php
if($_SESSION['name']) {
$name = $_SESSION['name'];
if(isset($_GET['id'])) {
$id = htmlspecialchars($_GET['id']);
if($id == 1){$enrg = '10'; $cost = '3';}
if($id == 2){$enrg = '20'; $cost = '5';}
if($id == 3){$enrg = '30'; $cost = '7';}
if($id == 4){$enrg = '40'; $cost = '9';}
if($id == 5){$enrg = '50'; $cost = '1';}
if($id == 6){$enrg = '65'; $cost = '13';}
if($id == 7){$enrg = '80'; $cost = '17';}
if($id == 8){$enrg = '100'; $cost = '21';}
if($id == 9){$enrg = '200'; $cost = '50';}
$sql = "SELECT * FROM users WHERE name = '$name'";
$do = mysql_query($sql);
$my = mysql_fetch_array($do);
if($my['money'] < $cost) { echo 'Нямаш достатъчно пари'; } else {
$money = ($my['money'] - $cost);
$nrgy = ($my['nrg'] + $enrg);
if($nrgy > $my['maxnrg']) { $nrgy = $my['maxnrg']; }
$sql = "UPDATE users SET money = '$money', nrg = '$nrgy' WHERE name = '$name'";
if(mysql_query($sql)) { echo "Успешно зареди $enrg енергия"; }}} else { ?>
Меню<hr color='black' width='300' align='center' />
Тук пиша текст, който се показва в сайта.
<? }} else {
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://localhost/file.php/\"/>");
} ?>
<script type="text/javascript" src="overlib.js"></script>
<?php
if($_SESSION['name']) {
$name = $_SESSION['name'];
if(isset($_GET['id'])) {
$id = htmlspecialchars($_GET['id']);
if($id == 1){$enrg = '10'; $cost = '3';}
if($id == 2){$enrg = '20'; $cost = '5';}
if($id == 3){$enrg = '30'; $cost = '7';}
if($id == 4){$enrg = '40'; $cost = '9';}
if($id == 5){$enrg = '50'; $cost = '1';}
if($id == 6){$enrg = '65'; $cost = '13';}
if($id == 7){$enrg = '80'; $cost = '17';}
if($id == Cool{$enrg = '100'; $cost = '21';}
if($id == 9){$enrg = '200'; $cost = '50';}
$sql = "SELECT * FROM users WHERE name = '$name'";
$do = mysql_query($sql);
$my = mysql_fetch_array($do);
if($my['money'] < $cost) { echo 'Нямаш достатъчно пари'; } else {
$money = ($my['money'] - $cost);
$nrgy = ($my['nrg'] + $enrg);
if($nrgy > $my['maxnrg']) { $nrgy = $my['maxnrg']; }
$sql = "UPDATE users SET money = '$money', nrg = '$nrgy' WHERE name = '$name'";
if(mysql_query($sql)) { echo "Успешно зареди $enrg енергия"; }}} else { ?>
Меню<hr color='black' width='300' align='center' />
Тук пиша текст, който се показва в сайта.
<? }} else {
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://localhost/file.php/\"/>");
} ?>