Помощь по скриптам | Проблема
Тема закрыта by
Wap[Crafter]
Причина: РЕШЕНО
Причина: РЕШЕНО
БЕДА вот короче сделал на локале недо браузерку, но загрузил на хостинг и она не корректно работает.
а именно "Лес" и "Персонаж"
Код страницы user (Персонаж)
кто поможет + обеспечен
а именно "Лес" и "Персонаж"
Код страницы user (Персонаж)
<?php
require_once '../sys/system.php';
require_once '../sys/skils.php';
require_once '../sys/db.php';
$head = $user[login];
require_once '../sys/head.php';
if($user) {
// выводим информацию для пользователя
echo "<div class='link'>";
echo "<img src='/img/ava/$user[pol]/$user[ava].png'>";
echo "<div class='name'><img src='/img/46.png'> Хворост: $user[levelbrich]<br>";
echo "<div class='stat_bar' style='margin:2px 0px 2px'>";
echo "<div class='progress' style='width:".$brich_progress."%'></div></div><br>";
echo "</div></div>";
} else {
}
echo "</div>";
require_once '../sys/foot.php';
?>
require_once '../sys/system.php';
require_once '../sys/skils.php';
require_once '../sys/db.php';
$head = $user[login];
require_once '../sys/head.php';
if($user) {
// выводим информацию для пользователя
echo "<div class='link'>";
echo "<img src='/img/ava/$user[pol]/$user[ava].png'>";
echo "<div class='name'><img src='/img/46.png'> Хворост: $user[levelbrich]<br>";
echo "<div class='stat_bar' style='margin:2px 0px 2px'>";
echo "<div class='progress' style='width:".$brich_progress."%'></div></div><br>";
echo "</div></div>";
} else {
}
echo "</div>";
require_once '../sys/foot.php';
?>
кто поможет + обеспечен
Код forest (Лес)
<?
include '/sys/system.php';
include '/sys/functions.php';
if(!$user) {
header('location: /');
exit;
}
$head = 'Поход';
//echo "<div class='link'>";
include '/sys/head.php';
$forest = mysql_query('SELECT * FROM `forest` WHERE `user` = "'.$user['id'].'"');
$forest = mysql_fetch_array($forest);
if(!$forest) {
mysql_query('INSERT INTO `forest` (`user`) VALUES ("'.$user['id'].'")');
}
?>
<div class='link'>
<div align='center'><img src='/img/forest2.png' alt='*'/></div>
<div class='no_b' align='center'>
<?
if($forest['h'] == 0 && $forest['time'] == 0) {
$h = _string(_num($_POST['h']));
if($h && $user['levelbrich'] >= $h * 1) {
$hs = ($h * (60 * 60));
mysql_query('UPDATE `forest` SET `h` = "'.$h.'", `time` = "'.(time() + $hs).'" WHERE `user` = "'.$user['id'].'"');
header('location: /forest');
}
?>
В в лесу можной найти <img src='/img/46.png' alt='*'/> хворост<br/>
<form action='/forest.php' method='post'>
<select name='h'>
<?
for($h = 1; $h < 6; $h++) {
if($user['levelbrich'] >= $h * 1) {
?>
<option value='<?=$h?>'><?=$h?> час<?=($h == 1 ? '':($h == 5 ? 'ов':'а'))?></option>
<?
}
}
?>
</select><br/>
<input type='submit' value='Отправиться'/>
</form>
<?
}
else
{
if($forest['time'] > time()) {
if($_GET['end'] == true) {
mysql_query('UPDATE `forest` SET `h` = "0",
`time` = "0" WHERE `user` = "'.$user['id'].'"');
header('location: /forest');
}
?>
Вы отправились в лес<br/>
<font color='#dd4b39'>Осталось: <?=_time($forest['time'] - time())?></font><br/><br/>
<a href='/forest?end=true' class='newtable'>Отменить</a>
<?
}
else
{
mysql_query('UPDATE `user` SET `brich` = `brich` + '.($forest['h'] * $user['levelbrich']).' WHERE `id` = "'.$user['id'].'"');
mysql_query('UPDATE `forest` SET `h` = "0",
`time` = "0" WHERE `user` = "'.$user['id'].'"');
?>
<font color='#81C12C'>Вы вернулись из леса!</font><br/>
Вы нашли: <img src='/img/46.png' alt='*'/> <?=n_f($forest['h'] * $user['levelbrich'])?> Хвороста<br/><br/>
<a href='/forest' class='button'>Обновить</a>
<?
}
}
?>
</div>
</div>
<?
include '/sys/foot.php';
?>
include '/sys/system.php';
include '/sys/functions.php';
if(!$user) {
header('location: /');
exit;
}
$head = 'Поход';
//echo "<div class='link'>";
include '/sys/head.php';
$forest = mysql_query('SELECT * FROM `forest` WHERE `user` = "'.$user['id'].'"');
$forest = mysql_fetch_array($forest);
if(!$forest) {
mysql_query('INSERT INTO `forest` (`user`) VALUES ("'.$user['id'].'")');
}
?>
<div class='link'>
<div align='center'><img src='/img/forest2.png' alt='*'/></div>
<div class='no_b' align='center'>
<?
if($forest['h'] == 0 && $forest['time'] == 0) {
$h = _string(_num($_POST['h']));
if($h && $user['levelbrich'] >= $h * 1) {
$hs = ($h * (60 * 60));
mysql_query('UPDATE `forest` SET `h` = "'.$h.'", `time` = "'.(time() + $hs).'" WHERE `user` = "'.$user['id'].'"');
header('location: /forest');
}
?>
В в лесу можной найти <img src='/img/46.png' alt='*'/> хворост<br/>
<form action='/forest.php' method='post'>
<select name='h'>
<?
for($h = 1; $h < 6; $h++) {
if($user['levelbrich'] >= $h * 1) {
?>
<option value='<?=$h?>'><?=$h?> час<?=($h == 1 ? '':($h == 5 ? 'ов':'а'))?></option>
<?
}
}
?>
</select><br/>
<input type='submit' value='Отправиться'/>
</form>
<?
}
else
{
if($forest['time'] > time()) {
if($_GET['end'] == true) {
mysql_query('UPDATE `forest` SET `h` = "0",
`time` = "0" WHERE `user` = "'.$user['id'].'"');
header('location: /forest');
}
?>
Вы отправились в лес<br/>
<font color='#dd4b39'>Осталось: <?=_time($forest['time'] - time())?></font><br/><br/>
<a href='/forest?end=true' class='newtable'>Отменить</a>
<?
}
else
{
mysql_query('UPDATE `user` SET `brich` = `brich` + '.($forest['h'] * $user['levelbrich']).' WHERE `id` = "'.$user['id'].'"');
mysql_query('UPDATE `forest` SET `h` = "0",
`time` = "0" WHERE `user` = "'.$user['id'].'"');
?>
<font color='#81C12C'>Вы вернулись из леса!</font><br/>
Вы нашли: <img src='/img/46.png' alt='*'/> <?=n_f($forest['h'] * $user['levelbrich'])?> Хвороста<br/><br/>
<a href='/forest' class='button'>Обновить</a>
<?
}
}
?>
</div>
</div>
<?
include '/sys/foot.php';
?>
DELETED
27 февраля 2016, в 13:49
Delete
Onmen , ничего
на локале пашет, а на сервере нет
DELETED
27 февраля 2016, в 13:56
Delete
Limbos (27.02.2016 в 13:50)
Onmen , ничего
Onmen , ничего
Сделай показ ошибок и глянь в какой строке ошибка
Onmen , что там нужно в .htacces прописать?
DELETED
27 февраля 2016, в 14:00
Delete
Limbos (27.02.2016 в 13:58)
Onmen , что там нужно в .htacces прописать?
Onmen , что там нужно в .htacces прописать?
Вроде так
php_flag display_errors on
php_flag display_startup_errors on не забудь.
Стр.: 1, 2