<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 400 Bad Request');
	ob_end_clean();
	exit;
}
if($action=='edit'){
	if(!empty($se_list)){
		if(is_array($se_list)){
			foreach($se_list as $se_val){
				if($se_val['islogo']=='1'){
					$ylogo='checked';
				}
				else{
					$ylogo='';
				}
				if($se_val['islogo']=='0'){
					$nlogo='checked';
				}
				else{
					$nlogo='';
				}
?>
<br>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <tr>
    <td colspan="4" class="tit1"><?=$lang['link_title1']?></td>
  </tr>
  <tr>
    <td  class="td1" style="text-align:center;">
	<input type="submit" name="Submit" value="<?=$lang['link.advert']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;"></td>
    <td colspan="3" class="td1"><?=$lang['link.str1']?><?=$lang['link.str2']?><?=$lang['link.str3']?></td>
  </tr>
  <tr>
<td align="center" height="25" <?if($action=='add'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action=add"><font color="<?if($action=='add'){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str28']?></font></a></td>
    <td align="center" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action="><font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str27']?></font></td>
    <td align="center" height="25" <?if($action=='edit'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><font color="<?if($action=='edit'){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str30']?></font></td>
    <td bgcolor="#F1F3F5"></td>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tableborder">
<form name="form1" method="post" action="?action=editok&id=<?=$se_val['id']?>">
  <tr>
       <td colspan="2" class="tdtit"><?=$lang['edit.info1']?></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow1"><?=$lang['link.str4']?></td>
    <td width="60%" align="left" class="forumrow1"><input name="forum_name" type="text" class="input1" id="forum_name" size="40" value="<?=$se_val['boardname']?>"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow1"><?=$lang['link.str5']?></td>
    <td width="60%" align="left" class="forumrow1"><input name="link_url" value="<?=$se_val['url']?>" class="input1" type="text" id="link_url" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow1"><?=$lang['link.str6']?></td>
    <td width="60%" align="left" class="forumrow1"><input name="link_logo" value="<?=$se_val['logo']?>" class="input1" type="text" id="link_logo" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow1"><?=$lang['link.str7']?></td>
    <td width="60%" align="left" class="forumrow1"><input name="forum_stu" class="input1" value="<?=$se_val['readme']?>" type="text" id="forum_stu" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow1"><?=$lang['link.str8']?></td>
    <td width="60%" align="left" class="forumrow1"><?=$lang['link.str9']?>
      <input type="radio" class="button" name="islogo" value="0" <?=$nlogo?>>&nbsp;<?=$lang['link.str10']?>
      <input type="radio" class="button" name="islogo" value="1" <?=$ylogo?>>&nbsp;
      <input type="submit" class="button" name="Submit" value="<?=$lang['link.str12']?>" class="input1"></td>
  </tr>
 </form>
</table>
<?
				}
			}
		}
	}
	elseif($action=='taxis'){
		if(!empty($se_list)){
			if(is_array($se_list)){
				foreach($se_list as $taxis_val){

?>
<br>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <tr>
    <td colspan="4" class="tit1"><?=$lang['link_title1']?></td>
  </tr>
  <tr>
    <td  class="td1" style="text-align:center;">
	<input type="submit" name="Submit" value="<?=$lang['link.advert']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;"></td>
    <td colspan="3" class="td1"><?=$lang['taxis.info1']?><br><?=$lang['taxis.info4']?></td>
  </tr>
  <tr>
<td align="center" height="25" <?if($action=='add'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action=add"><font color="<?if($action=='add'){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str28']?></font></a></td>
    <td align="center" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action="><font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str27']?></font></td>
    <td align="center" height="25" <?if($action=='taxis'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><font color="<?if($action=='taxis'){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str29']?></font></td>
    <td bgcolor="#F1F3F5"></td>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <form name="taxis_form" method="post" action="?action=taxisok&id=<?=$taxis_val['id']?>">
  <tr>
    <td class="tdtit" align="center" valign="center"><?=$lang['taxis.info2']?></td>
  </tr>
  <tr>
    <td height="40" align="left" style="padding-left:10px;" class="forumrow"><?=$lang['forum.name']?> <input name="taxis_id" type="text" class="input1" value="<?=$taxis_val['id']?>" id="taxis_id" size="6">  <input type="submit" class="button" class="input1" name="Submit" value="<?=$lang['link.str16']?>"></td>
  </tr>
  </form>
</table>
<?
				}
			}
		}
?>
<table cellpadding=0 cellspacing=0 border=0 class="tableborder">
<tr><td  class="tit1" align="center" height="22" valign="center"><?=$lang['taxis.info3']?></td></tr>
<tr>
<td>
<table width="100%">
<tr>
<?
	$j=1;
	if(!empty($link_list)){
		if(is_array($link_list)){
			foreach($link_list as $link_val){
?>
<td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
		<tr>	
			<tr><td Width="100%" height="20" align="center" class="forumrow" valign="top"><?=$link_val['id']?><?=$lang['link.str25']?>&nbsp;&nbsp;<?=$link_val['boardname']?></td></tr>
			<tr><td bgcolor="#0066CC" height="1"></td></tr></td>
	   </tr>
   </table> 
</td>
<?
				if($j%6==0){
					echo $lang['page.tr'];
				}
				$j+=1;
			}
		}
	}
?>
</table>
</td>		
</tr></table>
<?
	}
	elseif($action=='add'){
?>
<br>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
  <tr>
    <td colspan="4" class="tit1"><?=$lang['link_title1']?></td>
  </tr>
  <tr>
    <td  class="td1" style="text-align:center;">
	<input type="submit" name="Submit" value="<?=$lang['link.advert']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;"></td>
    <td colspan="3" class="td1"><?=$lang['link.str1']?><?=$lang['link.str2']?><?=$lang['link.str3']?></td>
  </tr>
  <tr>
<td align="center" height="25" <?if($action=='add'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action=add"><font color="<?if($action=='add'){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str28']?></font></a></td>
    <td align="center" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="15%"><a href="?action="><font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>"><?=$lang['link.str27']?></td>
    <td bgcolor="#F1F3F5"></td>
    <td bgcolor="#F1F3F5"></td>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tableborder">
<form name="form1" method="post" action="?action=addok">
  <tr>
       <td colspan="2" class="tdtit"><?=$lang['link_title1']?></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow"><?=$lang['link.str4']?></td>
    <td width="60%" align="left" class="forumrow"><input name="forum_name" type="text" class="input1" id="forum_name" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow"><?=$lang['link.str5']?></td>
    <td width="60%" align="left" class="forumrow"><input name="link_url" class="input1" type="text" id="link_url" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow"><?=$lang['link.str6']?></td>
    <td width="60%" align="left" class="forumrow"><input name="link_logo"  class="input1" type="text" id="link_logo" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow"><?=$lang['link.str7']?></td>
    <td width="60%" align="left" class="forumrow"><input name="forum_stu" class="input1" type="text" id="forum_stu" size="40"></td>
  </tr>
  <tr>
    <td width="40%" align="left" class="forumrow"><?=$lang['link.str8']?></td>
    <td width="60%" align="left" class="forumrow"><?=$lang['link.str9']?>
      <input type="radio" name="islogo" value="0" checked>&nbsp;<?=$lang['link.str10']?>
      <input type="radio" name="islogo" value="1">&nbsp;
      <input type="submit" class="button" name="Submit" value="<?=$lang['link.str11']?>" class="input1"></td>
  </tr>
 </form>
</table>
<?
	}else{
?>
<br>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableborder">
    <form name="form1" method="post" action="?action=allok">
  <tr>
    <td colspan="4" class="tit1"><?=$lang['link_title2']?></td>
  </tr>
  <tr>
    <td  class="td1" style="text-align:center;">
	<input type="submit" name="Submit" value="<?=$lang['link.advert']?>" style="color: #FF0000;width:80px;height:50px;border:1px outset;"></td>
    <td colspan="3" class="td1"><?=$lang['link.str1']?><?=$lang['link.str2']?><?=$lang['link.str3']?></td>
  </tr>
  <tr>
<td align="center" height="25" <?if($action=='add'){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="10%"><a href="?action=add"><font color="<?if($action=='add'){echo 'red';}else{echo '#000000';}?>"><?=$lang['tpl.str181']?>添加联盟论坛</font></a></td>
    <td align="center" <?if($action==''){echo 'bgcolor="#C9DEFA"';}else{echo 'bgcolor="#F1F3F5"';}?>  width="10%"><a href="?action="><font color="<?if($action==''){echo 'red';}else{echo '#000000';}?>">联盟论坛列表</td>
    <td bgcolor="#F1F3F5"></td>
    <td bgcolor="#F1F3F5"></td>
  </tr>
    <td colspan="4" class="tdtit">联盟论坛列表批量修改</td>
  </tr>
<?
global $i;
$i=0;
	if(!empty($link_list)){
		if(is_array($link_list)){
			foreach($link_list as $link_val){
				if($link_val['islogo']=='1'){
					$ylogo='checked';
				}
				else{
					$ylogo='';
				}
				if($link_val['islogo']=='0'){
					$nlogo='checked';
				}
				else{
					$nlogo='';
				}

?>
<tr>
    <td height="25" class="forumrow"><b><?=$lang['link.str13']?></b>      
        <input name="id[]" type="text" class="input1" id="id" size="4"  value="<?=$link_val['id']?>">
    </td>
    <td height="25" class="forumrow"><b><?=$lang['link.str14']?></b>
      <input name="forumname[]" type="text" class="input1" id="forumname" size="40"  value="<?=$link_val['boardname']?>"></td>
    <td height="25" class="forumrow"><b><?=$lang['link.str15']?></b>
      <input name="link_url[]" type="text" class="input1" id="link_url" size="30" value="<?=$link_val['url']?>"></td>
    <td height="25" class="forumrow"><span class="forumrow"><b><a href="link.php?action=taxis&id=<?=$link_val['id']?>"><?=$lang['link.str16']?></a> <a href="link.php?action=edit&id=<?=$link_val['id']?>"><?=$lang['link.str17']?></a> <a href="link.php?action=del&id=<?=$link_val['id']?>"><?=$lang['link.str18']?></a></b></span></td>
  </tr>
  <tr>
    <td height="25" class="forumrow"><b><?=$lang['link.str19']?></b><br>
      <b><?=$lang['link.str20']?></b>
        <input type="radio" name="islogo[<?=$i?>]" value="<?=$link_val['islogo']?>" <?=$ylogo?>>
        <b><?=$lang['link.str26']?></b>
        <input type="radio" name="islogo[<?=$i?>]" value="<?=$link_val['islogo']?>" <?=$nlogo?>>
		</td>
    <td height="25" class="forumrow"><b><?=$lang['link.str24']?></b>
      <input name="logo[]" type="text" class="input1" id="logo" size="40" value="<?=$link_val['logo']?>"></td>
    <td height="25" colspan="2" class="forumrow"><b><?=$lang['link.str22']?></b>
      <input type="text" class="input1" name="stu[]" size="50"  value="<?=$link_val['readme']?>"></td>
    </tr> 
  <tr><td bgcolor="#0066CC" height="1" colspan="4"></td></tr>
<?
$i++;
			}
		}
	}
?>
<tr>
    <td height="25" colspan="4"><input type="submit" class="button" class="input1" name="Submit" value="<?=$lang['link.str23']?>"></td>
  </tr>
  </form>
</table>
<?
}
?>
