Вот такая проблема захожу на склад везде в БД всё прописал но показывает просто белый экран и всё не как не могу понять в чём проблема!
Вот файл inc/locations/sklad.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?
if (isset($_REQUEST["store_act"]) && !empty($_REQUEST["store_act"]) && isset($_REQUEST["res_kolvo"]) && !empty($_REQUEST["res_kolvo"]) && isset($_REQUEST["what_res"])):
if ($_REQUEST["store_act"]=='sell'):
$cur_now = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".$_REQUEST["what_res"]."' and uidp=".$pers["uid"].""));
$resources3 = mysql_query("SELECT * FROM store_gos WHERE resource_id='".$_REQUEST["what_res"]."'");
if ($_REQUEST["res_kolvo"]>$cur_now): $_REQUEST["res_kolvo"] = $cur_now; endif;
$b_price = mysql_result ($resources3, $a, 'resource_price');
$price_total1 = 0;
if ($fility2<0.125): $to_price = (round(((1.125-$fillity2)*$b_price)*100))/100;
else: $to_price = (round(((1-($fillity2-0.125))*$b_price)*100))/100;
endif;
$is++;
$price_total1 = $price_total1 + $to_price;
endfor;
mysql_query ("UPDATE users SET money=money+".$price_total1." WHERE uid=".$pers["uid"]."");
mysql_query("UPDATE capital SET money=money-".$price_total1." WHERE organization='store'");
endif;
endif;
?>
<script type="text/javascript">
document.body.bgColor = '#d6cab2';
</script>
<script type="text/javascript" src="API/store.php"></script>
<div id="back" style="position: absolute; display: none; left: 0; top: 0; width: 100%; z-index: 50; background-color:#000; filter:alpha(opacity=75); -moz-opacity: 0.75; opacity: 0.75;"></div>
<div style="width:332px; height:154px; background-image:url(/design/pop_up.png); background-repeat:no-repeat; background-position:center; left:0px; top:0px; display:none; position:absolute; z-index:100;" id="popup"></div>
<center>
<table width="950" border="1" style="border-width:1px; border-color:#666666;" cellspacing="0">
<tr><td colspan="6" align="center"><input type="button" value=" государственный склад " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;"><input type="button" value=" обменный пункт " disabled="disabled" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;"><input type="button" value=" касса " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;" disabled="disabled"></td></tr>
<tr><td colspan="6" align="center"><input type="button" value=" охота " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;" onclick="location.href='?room=hunt'"><input type="button" value=" рыбалка " onclick="location.href='?room=fish'" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;"><input type="button" value=" собирательство " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;" disabled="disabled"><input type="button" value=" шахтерство " onclick="location.href='?room=resources'" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;"></td></tr>
<tr><td colspan="6" align="center">Казна Склада: <? echo mysql_result(mysql_query("SELECT money FROM capital WHERE organization='store'"),0,'money');?> LN[/b]</font></td></tr>
<? if (isset($price_total1) && $price_total1>0): ?>
<tr><td colspan="6" align="center"><font face="arial" color="#990000">На Ваш счет зачислено <?=$price_total1?> LN</font></td></tr>
<? endif; ?>
<? if (isset($_REQUEST["room"]) && !empty($_REQUEST["room"])): ?>
<tr><td colspan="2" align="center"><font face="arial">Ресурс</font></td><td rowspan="2" width="160" align="center"><font face="arial">Склад</font></td><td rowspan="2" width="160" align="center"><font face="arial">Цена за 1 ед.</font></td><td rowspan="2" width="150" align="center"><font face="arial">В наличии</font></td><td rowspan="2" width="150" align="center"><font face="arial">Действия</font></td></tr>
<tr><td width="100" align="center"><font face="arial">изображение</font></td><td width="180" align="center"><font face="arial">наименование</font></td></tr>
<?
$resources = mysql_query ("SELECT * FROM store_gos WHERE resource_type='".$_REQUEST["room"]."'");
for ($a=0, $b=mysql_num_rows($resources); $a<$b; $a++):
$current_is = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".mysql_result ($resources, $a, 'resource_id')."' and uidp=".$pers["uid"].""));
$fillity = (mysql_result ($resources, $a, 'resource_is')/mysql_result ($resources, $a, 'resource_max'))/2;
$price = mysql_result ($resources, $a, 'resource_price');
if ($fility<0.125):
$price_total = (round(((1.125-$fillity)*$price)*100))/100;
else:
$price_total = (round(((1-($fillity-0.125))*$price)*100))/100;
endif;
?>
<tr>
<td align="center" valign="middle">/images/weapons/<? echo mysql_result ($resources, $a, 'resource_image'); ?>.gif</td>
<td align="center" valign="middle">«<? echo mysql_result ($resources, $a, 'resource_name'); ?>»</td>
<td align="center" valign="middle"><? echo mysql_result ($resources, $a, 'resource_is'); ?>/<? echo mysql_result ($resources, $a, 'resource_max'); ?></td>
<td align="center" valign="middle"><?=$price_total?> LN</td>
<td align="center" valign="middle"><?=$current_is?> шт.</td>
<td align="center" valign="middle"><input type="button" value=" сдать " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:100px;" <? if ($current_is==0 || mysql_result ($resources, $a, 'resource_is')>=mysql_result ($resources, $a, 'resource_max')): ?> disabled="disabled" <? endif; ?> onclick="sell_res(<?=mysql_result ($resources, $a, 'resource_number')?>);" /></td>
</tr>
<? endfor; ?>
<? endif; ?>
</table>
</center></div>
А вот это файл API/store.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>window.room = '';
<?
require ("../configs/config.php");
$res = mysql_connect ($mysqlhost,$mysqluser,$mysqlpass,$mysqlbase);
mysql_select_db($mysqlbase, $res);
?>
resources = new Array();
<? $resources2 = mysql_query ("SELECT * FROM store_gos");
for ($a=0, $b=mysql_num_rows($resources2); $a<$b; $a++):
$current_is = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".mysql_result ($resources2, $a, 'resource_id')."' and uidp=".$_COOKIE["forum_uid"].""));
$fillity = (mysql_result ($resources2, $a, 'resource_is')/mysql_result ($resources2, $a, 'resource_max'))/2;
$price = mysql_result ($resources2, $a, 'resource_price');
if ($fility<0.125):
$price_total = (round(((1.125-$fillity)*$price)*100))/100;
else:
$price_total = (round(((1-($fillity-0.125))*$price)*100))/100;
endif;
?>
resources[<?=mysql_result ($resources2, $a, 'resource_number')?>] = new Array ('<?=mysql_result ($resources2, $a, 'resource_id')?>','<?=mysql_result ($resources2, $a, 'resource_name')?>', '<?=mysql_result ($resources2, $a, 'resource_image')?>.gif', <?=$price_total?>, <?=$current_is?>);
<? endfor; ?>
function check_popup (){
if (document.getElementById('res_kolvo').value=='') {document.getElementById('res_kolvo').value=0;};
return true;
}
function check_input (evt) {
evt = (evt) ? evt : event;
var code = (evt.charCode) ? evt.charCode : evt.keyCode;
if (code>31 && (code<48 || code>57) </div>
Если можете помогите пожалуйста!
Вот файл inc/locations/sklad.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?
if (isset($_REQUEST["store_act"]) && !empty($_REQUEST["store_act"]) && isset($_REQUEST["res_kolvo"]) && !empty($_REQUEST["res_kolvo"]) && isset($_REQUEST["what_res"])):
if ($_REQUEST["store_act"]=='sell'):
$cur_now = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".$_REQUEST["what_res"]."' and uidp=".$pers["uid"].""));
$resources3 = mysql_query("SELECT * FROM store_gos WHERE resource_id='".$_REQUEST["what_res"]."'");
if ($_REQUEST["res_kolvo"]>$cur_now): $_REQUEST["res_kolvo"] = $cur_now; endif;
$b_price = mysql_result ($resources3, $a, 'resource_price');
$price_total1 = 0;
if ($fility2<0.125): $to_price = (round(((1.125-$fillity2)*$b_price)*100))/100;
else: $to_price = (round(((1-($fillity2-0.125))*$b_price)*100))/100;
endif;
$is++;
$price_total1 = $price_total1 + $to_price;
endfor;
mysql_query ("UPDATE users SET money=money+".$price_total1." WHERE uid=".$pers["uid"]."");
mysql_query("UPDATE capital SET money=money-".$price_total1." WHERE organization='store'");
endif;
endif;
?>
<script type="text/javascript">
document.body.bgColor = '#d6cab2';
</script>
<script type="text/javascript" src="API/store.php"></script>
<div id="back" style="position: absolute; display: none; left: 0; top: 0; width: 100%; z-index: 50; background-color:#000; filter:alpha(opacity=75); -moz-opacity: 0.75; opacity: 0.75;"></div>
<div style="width:332px; height:154px; background-image:url(/design/pop_up.png); background-repeat:no-repeat; background-position:center; left:0px; top:0px; display:none; position:absolute; z-index:100;" id="popup"></div>
<center>
<table width="950" border="1" style="border-width:1px; border-color:#666666;" cellspacing="0">
<tr><td colspan="6" align="center"><input type="button" value=" государственный склад " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;"><input type="button" value=" обменный пункт " disabled="disabled" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;"><input type="button" value=" касса " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:250px;" disabled="disabled"></td></tr>
<tr><td colspan="6" align="center"><input type="button" value=" охота " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;" onclick="location.href='?room=hunt'"><input type="button" value=" рыбалка " onclick="location.href='?room=fish'" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;"><input type="button" value=" собирательство " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;" disabled="disabled"><input type="button" value=" шахтерство " onclick="location.href='?room=resources'" style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:200px;"></td></tr>
<tr><td colspan="6" align="center">Казна Склада: <? echo mysql_result(mysql_query("SELECT money FROM capital WHERE organization='store'"),0,'money');?> LN[/b]</font></td></tr>
<? if (isset($price_total1) && $price_total1>0): ?>
<tr><td colspan="6" align="center"><font face="arial" color="#990000">На Ваш счет зачислено <?=$price_total1?> LN</font></td></tr>
<? endif; ?>
<? if (isset($_REQUEST["room"]) && !empty($_REQUEST["room"])): ?>
<tr><td colspan="2" align="center"><font face="arial">Ресурс</font></td><td rowspan="2" width="160" align="center"><font face="arial">Склад</font></td><td rowspan="2" width="160" align="center"><font face="arial">Цена за 1 ед.</font></td><td rowspan="2" width="150" align="center"><font face="arial">В наличии</font></td><td rowspan="2" width="150" align="center"><font face="arial">Действия</font></td></tr>
<tr><td width="100" align="center"><font face="arial">изображение</font></td><td width="180" align="center"><font face="arial">наименование</font></td></tr>
<?
$resources = mysql_query ("SELECT * FROM store_gos WHERE resource_type='".$_REQUEST["room"]."'");
for ($a=0, $b=mysql_num_rows($resources); $a<$b; $a++):
$current_is = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".mysql_result ($resources, $a, 'resource_id')."' and uidp=".$pers["uid"].""));
$fillity = (mysql_result ($resources, $a, 'resource_is')/mysql_result ($resources, $a, 'resource_max'))/2;
$price = mysql_result ($resources, $a, 'resource_price');
if ($fility<0.125):
$price_total = (round(((1.125-$fillity)*$price)*100))/100;
else:
$price_total = (round(((1-($fillity-0.125))*$price)*100))/100;
endif;
?>
<tr>
<td align="center" valign="middle">/images/weapons/<? echo mysql_result ($resources, $a, 'resource_image'); ?>.gif</td>
<td align="center" valign="middle">«<? echo mysql_result ($resources, $a, 'resource_name'); ?>»</td>
<td align="center" valign="middle"><? echo mysql_result ($resources, $a, 'resource_is'); ?>/<? echo mysql_result ($resources, $a, 'resource_max'); ?></td>
<td align="center" valign="middle"><?=$price_total?> LN</td>
<td align="center" valign="middle"><?=$current_is?> шт.</td>
<td align="center" valign="middle"><input type="button" value=" сдать " style="background-color:#d6cab2;border:1px solid #000000; font-weight:bold; width:100px;" <? if ($current_is==0 || mysql_result ($resources, $a, 'resource_is')>=mysql_result ($resources, $a, 'resource_max')): ?> disabled="disabled" <? endif; ?> onclick="sell_res(<?=mysql_result ($resources, $a, 'resource_number')?>);" /></td>
</tr>
<? endfor; ?>
<? endif; ?>
</table>
</center></div>
А вот это файл API/store.php
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>window.room = '';
<?
require ("../configs/config.php");
$res = mysql_connect ($mysqlhost,$mysqluser,$mysqlpass,$mysqlbase);
mysql_select_db($mysqlbase, $res);
?>
resources = new Array();
<? $resources2 = mysql_query ("SELECT * FROM store_gos");
for ($a=0, $b=mysql_num_rows($resources2); $a<$b; $a++):
$current_is = mysql_num_rows(mysql_query("SELECT name FROM `wp` WHERE id_in_w='".mysql_result ($resources2, $a, 'resource_id')."' and uidp=".$_COOKIE["forum_uid"].""));
$fillity = (mysql_result ($resources2, $a, 'resource_is')/mysql_result ($resources2, $a, 'resource_max'))/2;
$price = mysql_result ($resources2, $a, 'resource_price');
if ($fility<0.125):
$price_total = (round(((1.125-$fillity)*$price)*100))/100;
else:
$price_total = (round(((1-($fillity-0.125))*$price)*100))/100;
endif;
?>
resources[<?=mysql_result ($resources2, $a, 'resource_number')?>] = new Array ('<?=mysql_result ($resources2, $a, 'resource_id')?>','<?=mysql_result ($resources2, $a, 'resource_name')?>', '<?=mysql_result ($resources2, $a, 'resource_image')?>.gif', <?=$price_total?>, <?=$current_is?>);
<? endfor; ?>
function check_popup (){
if (document.getElementById('res_kolvo').value=='') {document.getElementById('res_kolvo').value=0;};
return true;
}
function check_input (evt) {
evt = (evt) ? evt : event;
var code = (evt.charCode) ? evt.charCode : evt.keyCode;
if (code>31 && (code<48 || code>57) </div>
Если можете помогите пожалуйста!