📄 union_sou.php
字号:
<?php
include("functions/login_flag.php");//是否已经登录
include("functions/class_mysql.php");//加载数据库类文件
include("configs/Configs.php");
include("union_mod.php");//加载程式过程;
include("union_mod_friend_message_demise.php");//加载程式过程;
include_once("all_processing.php");//加载所有进程;
////////////////搜索联盟/////////////////////////////////////////////////////////////////////////////////////////////////////
if ($_POST['select']=='select') {
if ($_POST['sou']<'1') echomsg("搜索内容不能为空!","union.php");
}
////////////////////////
//翻页
////////////////////////
if( isset($_GET['page_safe_mygoods']) ){
$page_safe_mygoods = intval($_GET['page_safe_mygoods']);
}else{
$page_safe_mygoods = 1;
}
$page_size_safe_mygoods = 10;
$query_num=$db->query("select * from unions where uname like '%".$_POST['sou']."%' order by uintegral desc;");
$all_num=$db->num_rows($query_num);
$amount_safe_mygoods=$all_num;
if( $amount_safe_mygoods ){
if( $amount_safe_mygoods < $page_size_safe_mygoods ){
$page_count_safe_mygoods = 1;
}
if( $amount_safe_mygoods % $page_size_safe_mygoods ){
$page_count_safe_mygoods = (int)($amount_safe_mygoods/$page_size_safe_mygoods) + 1;
}else{
$page_count_safe_mygoods = $amount_safe_mygoods/$page_size_safe_mygoods;
}
}else{
$page_count_safe_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 href="css/lm.css" rel="stylesheet" type="text/css">
<style>
body{
margin-top:0px;
}
</style>
<script type="text/javascript">
<!-- // 说明:Javascript 控制 CheckBox 的全选与取消全选 // -->
function checkAll(name)
{
var el = document.getElementsByTagName('input');
var len = el.length;
for(var i=0; i<len; i++)
{
if((el[i].type=="checkbox") && (el[i].name==name))
{
el[i].checked = true;
}
}
}
function clearAll(name)
{
var el = document.getElementsByTagName('input');
var len = el.length;
for(var i=0; i<len; i++)
{
if((el[i].type=="checkbox") && (el[i].name==name))
{
el[i].checked = false;
}
}
}
function isdemise()
{
if(window.confirm("请确认您是否要进行此操作!如不想进行,请点取消."))
{
return true;
}
return false;
}
function isdemisee()
{
if(window.confirm("是否要退出联盟!如不想退出,请点取消."))
{
return true;
}
return false;
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
</head>
<body>
<!--导航-->
<?php require_once("diplomatism_daohang.htm");?>
<div id="mb_01">
<form id="form1" name="form1" method="POST" action="?action=sou">
<input type="hidden" name="select" value="select"/>
<table width="92%" height="30" border="0" cellpadding="0" cellspacing="0" style="margin-top:6px ">
<tr>
<td width="9%">联盟查询</td>
<td width="14%"><span class="wx_03">
<input type="text" name="sou" size="10" maxlength="10" value="" />
</span></td>
<td width="12%" align="left"><input type="image" src="images/wx_01.gif" width="46" height="18" border="0" /></td>
<?php
///////////////////查询是否己建立联盟////////////////////////////////
$query=$db->query("select * from player_info where u_id='".$_COOKIE['UserId']."';");
$uni_num=$db->fetch_array($query);
if ($uni_num['union_id']<'1') {
?>
<td width="13%"><div class="lm_02"><a href="?action=crea" class="lm_03">创建联盟</a></div></td>
<td width="13%"> </td>
<td width="13%"> </td>
<td width="14%"> </td>
<td width="12%"> </td>
<?php
} else {
?>
<td width="13%"><div class="lm_02"><a href="?action=myunion" class="lm_03">我的联盟</a></div></td>
<td width="13%"><div class="lm_02"><a href="?action=unionapply&id=<?php echo $uni_num['union_id'];?>" class="lm_03">新申请者</a></div></td>
<td width="13%"><div class="lm_02"><a href="?action=unionper&id=<?php echo $uni_num['union_id'];?>" class="lm_03">成员管理</a></div></td>
<td width="14%"><div class="lm_02"><a href="?action=myunionsetting&id=<?php echo $uni_num['union_id'];?>" class="lm_03">联盟设置</a></div></td>
<td width="12%"><div class="lm_02"><?php if ($uni_num['union_power']=='1') echo '<a href="?act=disband&id='.$uni_num['union_id'].'" class="lm_03" onclick="return isdemise()">解散联盟</a>'; else echo '<a href="?action=cancer_unions&id='.$uni_num['union_id'].'" class="lm_03" onclick="return isdemisee()">退出联盟</a>'?></div></td>
<?php
}
?>
</tr>
</table>
</form>
</div>
<div id="mb_04">
<!--替换区域开始-->
<div id="un_all">
<table width="85%" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="61" align="left"><strong>排 名</strong></td>
<td width="43" align="left"> </td>
<td width="134" align="left"><strong>名 称</strong></td>
<td width="120" align="left"><strong>积 分</strong></td>
<td width="86" align="left"><strong>人 数</strong></td>
<td width="102" align="left"><strong>创建日期</strong></td>
<td width="65" align="left"><strong>开放申请</strong></td>
</tr>
</table>
<div class="lmf">------------------------------------------------------------------------------</div>
<?php
///联盟首页////////////////////////////////////////////////////////
$query_num=$db->query("select * from unions where uname like '%".$_POST['sou']."%' order by uintegral desc; ");
$i=1;
while ($list_s=$db->fetch_array($query_num)) {
$id[$i]=$list_s['id'];
$uimg[$i]=$list_s['u_ico'];
$uc[$i]=$list_s['country'];
$uname[$i]=$list_s['uname'];
$uintegral[$i]=$list_s['uintegral'];
$umember[$i]=$list_s['umember'];
$umaxmember[$i]=$list_s['umaxmember'];
$udate[$i]=$list_s['udate'];
$ustate[$i]=$list_s['ustate'];
$uintro[$i]=$list_s['uintro'];
$i++;
}
if ($all_num>$page_safe_mygoods*$page_size_safe_mygoods) {
$ma=$page_safe_mygoods*$page_size_safe_mygoods;
}else $ma=$all_num;
for ($i=($page_safe_mygoods-1)*$page_size_safe_mygoods+1;$i<=$ma;$i++)
{
?>
<table width="85%" border="0" cellspacing="0" cellpadding="0" style="padding-top:5px ">
<tr>
<td width="61" align="left"><strong><?php echo $i;?></strong></td>
<td width="43" align="left"><img src="images/country<?php echo $uc[$i];?>/<?php echo $uimg[$i];?>.gif" width="30" height="22" /></td>
<td width="134" class="sx" align="left"><?php echo '<a href="?action=listunion&id='.$id[$i].'">'.$uname[$i].'</a>';?></td>
<td width="120" align="left"><?php echo $uintegral[$i]?></td>
<td width="86" align="left"><?php echo $umember[$i].'/'.$umaxmember[$i]?></td>
<td width="114" align="left"><?php echo date('Y-m-d',$udate[$i]);?></td>
<td width="53" align="left" class="<?php
if ($ustate[$i]==1) {
echo 'rw_04';
}elseif ($ustate[$i]==2){
echo 'rw_05';
}?>"><?php
if ($ustate[$i]==1) {
echo '开放';
}elseif ($ustate[$i]==2){
echo '关闭';
}?></td>
</tr>
<tr>
<td colspan="3"> </td>
<td colspan="4" align="left" class="lm_01"><div style="width:370px;text-overflow:ellipsis; white-space:nowrap; overflow:hidden;">简介:<?php echo $uintro[$i];?></div></td>
</tr>
</table>
<?php
if ($i<>$num_ls) echo '<div class="lmf">------------------------------------------------------------------------------</div>';
}
?>
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="69%" height="40" align="right" valign="bottom"><a href="?page_safe_mygoods=1">第一页</a> | <?php
//翻页;
$page_string_safe_mygoods = '';
if( $page_safe_mygoods == 1 ){
$page_string_safe_mygoods= '上一页';
echo $page_string_safe_mygoods;
}else{
$page_string_safe_mygoods= '<a href="?page_safe_mygoods='.($page_safe_mygoods-1);
$page_string_safe_mygoods.= '">上一页</a>';
echo $page_string_safe_mygoods;
}
?> | <?php
$page_string_safe_mygoods = '';
if( ($page_safe_mygoods == $page_count_safe_mygoods) || ($page_count_safe_mygoods == 0) ){
$page_string_safe_mygoods= '下一页';
echo $page_string_safe_mygoods;
}else{
$page_string_safe_mygoods= '<a href="?page_safe_mygoods='.($page_safe_mygoods+1);
$page_string_safe_mygoods.='">下一页</a>';
echo $page_string_safe_mygoods;
}
?> | <a href="?page_safe_mygoods=<?php echo $page_count_safe_mygoods; ?>">尾页</a></td>
<td width="9%" align="right" valign="bottom"> </td>
<td width="22%" align="left" valign="bottom" class="d">页码:<?php
echo ' '.$page_safe_mygoods.'/';
if ($page_count_safe_mygoods) {
echo $page_count_safe_mygoods;
}else echo '1';
?></td>
</tr>
</table>
<!--替换区域结束-->
</div>
<div id="mb_03"></div>
<?php $db->close();?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -