⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goods.php

📁 Download you own three BR
💻 PHP
字号:
<?php
require_once("functions/class_mysql.php");
require_once("functions/login_flag.php");
require_once("functions/func_common.php");
include_once("configs/Configs.php");//加载配置文件;
include_once("all_processing.php");//加载所有进程;
 //根据不同的action_type值显示不同的物品;1:武器,2:凯甲,3:道具,4:兵符,5:坐骑,6:书藉,7:宝物;
   switch ($_GET['action_type'])
   {
   	case 1:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='1' and `i_state`='2' and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 2:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='2' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 3:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='8' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 4:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='6' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 5:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='3' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 6:
   		{
   			$query=$db->query("select * from interior_goods where (i_style_num='4' or i_style_num='5') and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   	case 7:
   		{
   			$query=$db->query("select * from interior_goods where `i_state`='2' and s_type='3' and i_uid='".$_COOKIE['UserId']."' ;");
   			$all_num_sum=$db->num_rows($query);
   			break;
   		}
   }
//我的物品项翻页;
if( isset($_GET['page_mygoods']) ){ 
	$page_mygoods = intval($_GET['page_mygoods']); 
}else{ 
	$page_mygoods = 1; 
} 
$page_size_mygoods = 10; 
$amount_mygoods=$all_num_sum;
if( $amount_mygoods ){ 
	if( $amount_mygoods < $page_size_mygoods ){ 
		$page_count_mygoods = 1;		
	} 
	if( $amount_mygoods % $page_size_mygoods ){
		$page_count_mygoods = (int)($amount_mygoods/$page_size_mygoods) + 1;		
	}else{ 
		$page_count_mygoods = $amount_mygoods/$page_size_mygoods;
	} 
}else{ 
	$page_count_mygoods = 0; 
} 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>内政研究</title>

<link href="css/id.css" rel="stylesheet" type="text/css">
<link href="css/css.css" rel="stylesheet" type="text/css">
<link type="text/css" href="css/build.css" rel="stylesheet">
<link href="css/rsx.css" rel="stylesheet" type="text/css">

<style>
body{
margin-top:0px;
}
</style>
<script>
function get()
{
	if (window.confirm("您将把此商品以折价的形式出售给商店,如不想出售,请点取消!"))
	{
		return true;
	}
	    return false;
}

function dele()
{
	if (window.confirm("您将把此商品抛弃,如不想抛弃,请点取消!"))
	{
		return true;
	}
	    return false;
}

function keycode() { 
 	  if(event.keyCode==13) { 
 	  	event.returnValue=false;
 	  }
 } 
 
 function GoUrl(str){
 	location=str;
 }
 
</script>
</head>

<body>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>

<!--导航-->
<?php require_once("study_daohang.htm");?>

<div id="mb_01">
<table width="90%" height="30"  border="0" cellpadding="0" cellspacing="0" style="margin-top:6px ">
  <tr>
    <td><a href="?action_type=1"><img src="images/images/006.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=2"><img src="images/images/007.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=3"><img src="images/images/008.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=4"><img src="images/images/009.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=5"><img src="images/images/011.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=6"><img src="images/images/010.gif" width="81" height="23" /></a></td>
    <td><a href="?action_type=7"><img src="images/images/012.gif" width="81" height="23" /></a></td>
  </tr>
</table>
</div>
<div id="mb_04">
<?php
if ($nei_goods_if) {
	echo '<br/>暂时关闭!';
}else{
?>
<!--替换区域开始-->
     <table width="84%" height="30"  border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td width="8%">&nbsp;</td>
         <td width="12%"><div align="left"><strong>商&nbsp;品</strong></div></td>
         <td width="16%"><div style="text-align:left;"><strong>类&nbsp;别</strong></div></td>
         <td width="38%"><div align="left"><strong>物品效果</strong></div></td>
         <td width="13%"><div align="left"><strong>价&nbsp;格</strong></div></td>
         <td width="13%"><div align="left"><strong>操&nbsp;作</strong></div></td>
       </tr>
     </table>
     <div class="d1f_09">-------------------------------------------------------------------------------------------</div>
     <?php 
   //根据不同的action_type值显示不同的物品;1:武器,2:凯甲,3:道具,4:兵符,5:坐骑,6:书藉,7:宝物;
   switch ($_GET['action_type'])
   {
   	case 1:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='1' and `i_state`='2' and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 2:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='2' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 3:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='8' and `i_state`='2' and num!=0 and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 4:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='6' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 5:
   		{
   			$query=$db->query("select * from interior_goods where i_style_num='3' and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 6:
   		{
   			$query=$db->query("select * from interior_goods where (i_style_num='4' or i_style_num='5') and `i_state`='2'  and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   	case 7:
   		{
   			$query=$db->query("select * from interior_goods where `i_state`='2' and s_type='3' and num!=0 and i_uid='".$_COOKIE['UserId']."' limit ".($page_mygoods-1)*$page_size_mygoods.",".$page_size_mygoods.";");
   			break;
   		}
   }
   $i=1;
   while ($goods_list=$db->fetch_array($query)) {
   ?>
     <!--------循环----------->
   <div class="d1f_08"><img src="images/yw_bao/all38x38/<?php echo $goods_list['s_id'];?>.jpg" width="40" height="40"/></div>
   <div class="fxg_04"><?php echo $goods_list['i_goodsname'];
   if ($_GET['action_type']=='3' || $_GET['action_type']=='7')
   echo '(x'.$goods_list['num'].')';?></div>
   <div class="fxg_04" style="text-align:left;"><?php 
   //对照物品基础表,输出类别;
   $query_sort=$db->query("select b.id,b.s_sort,b.s_price from interior_goods a left join m_goods b on (a.s_id=b.id) where a.`i_uid`='".$_COOKIE['UserId']."' and a.id='".$goods_list['id']."' and a.`i_state`='2';");
   $sort_list=$db->fetch_array($query_sort);
//   echo $sort_list['s_sort'];
   echo $goods_list['i_style'];
   ?></div>
   <div class="fxg_052 style1" align="left"><?php echo $goods_list['i_effect'];?></div>
   <div class="fxg_04 veb"><?php if ($_GET['action_type']=='7'||$goods_list['i_level']>1) {
                                    	echo '不可出售';
                                    }elseif ($goods_list['i_goodsname']=='金锭') { 
                                    	echo '1000金';
                                    }elseif ($goods_list['i_goodsname']=='金砖') {
                                    	echo '10000金';
                                    }else {
                                    	$golds=(int)($sort_list['s_price']/2);
                                    	echo $golds; echo '金';
                                    }?></div>
   <div class="fxg_022 veb"><?php if ($_GET['action_type']=='7'||$goods_list['i_level']>1) {
   	if ($_GET['action_type']=='7')
   	 if (!in_array($goods_list['s_id'],$good_use_must))
   		echo '<a style="cursor:hand;" onclick="GoUrl(\'goods_mod.php?good_act=good_bao&id='.$goods_list['id'].'&type_num='.$_GET['action_type'].'\')"><img alt="使用" src="images/images/sy.gif" border="0"></a>';
   	 else echo '相关操作使用';
   } else
   { ?><a href="goods_mod.php?id=<?php echo $goods_list['id'];?>&&action=sale&type_num=<?php echo $_GET['action_type'];?>" onclick="return get()" onkeydown="return keycode()" title="折价出售给商店"><img alt="出售" src="images/images/016.gif"/></a> <?php if ($_GET['action_type']==3 && $sort_list['id']==80) {?><a href="goods_mod.php?id=<?php echo $goods_list['id'];?>&&action=use&type_num=<?php echo $_GET['action_type'];?>" title="将使用这件商品"><img alt="使用" src="images/images/sy.gif"/></a><?php }}?></div>
   <div class="d1f_09">-------------------------------------------------------------------------------------------</div>
   <!--------循环----------->
   <?php
   }
   ?>
   <div style="width:100%;line-height:25px;"><?php
   //我的物品项翻页;
			 $page_string_mygoods = ''; 
		     if( $page_mygoods == 1 ){
		    	$page_string_mygoods= '上一页';
		    	echo $page_string_mygoods;
		     }else{ 
		     	$page_string_mygoods= '<a href="?page_mygoods='.($page_mygoods-1).'&action_type='.$_GET['action_type'].'">上一页</a>'; 
		     	echo $page_string_mygoods;
		     }
		     if( ($page_mygoods == $page_count_mygoods) || ($page_count_mygoods == 0) ){ 
		     		$page_string_mygoods= ' | 下一页';
		     		echo $page_string_mygoods;
		     }else{ 
		     		$page_string_mygoods= ' | <a href="?page_mygoods='.($page_mygoods+1).'&action_type='.$_GET['action_type'].'">下一页</a>';
		     		echo $page_string_mygoods;
		     }
		     echo '&nbsp;&nbsp;页码:'.$page_mygoods.'/';
			if ($page_count_mygoods) {
			    echo $page_count_mygoods;
			}else echo '1';
		     ?>
  </div>
   <div style="padding-bottom:15px;"></div>
   <?php
	}
	include_once("function_area_re.php");
	$db->close();
   ?>
</div>
<div id="mb_05"></div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -