
<!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>
<?php include(DEDEMEMBER."/templets/head_inc.htm"); ?>
<title>短消息中心 - <?php echo $cfg_webname; ?></title>
<link href="/templets/skin/cm.css" rel="stylesheet" type="text/css" />
<link href="/templets/skin/default.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script>

<script language="javascript" type="text/javascript">
<!--
	function CheckLogin(){
	  var taget_obj = document.getElementById('_userlogin');
	  myajax = new DedeAjax(taget_obj,false,false,'','','');
	  myajax.SendGet2("/member/ajax_loginsta.php");
	  DedeXHTTP = null;
	}
-->
</script>

<script type="text/javascript" language="javascript">
function folderSelAll()
{
	for(i=0;i<document.form1.deleteid.length;i++)
	{
		if(!document.form1.deleteid[i].checked)
		{
			document.form1.deleteid[i].checked=true;
		}
	}
}

//获得选中文件的文件名
function GetCheckfolderItem()
{
	var allSel='';
	if(document.form1.deleteid.value) return document.form1.deleteid.value;
	for(i=0;i<document.form1.deleteid.length;i++)
	{
		if(document.form1.deleteid[i].checked)
		{
			if(allSel=='')
			allSel=document.form1.deleteid[i].value;
			else
			allSel=allSel+","+document.form1.deleteid[i].value;
		}
	}
	return allSel;
}

function DoSubmit(myfolder)
{
	var selid = GetCheckfolderItem();
	if(selid=='') {
		alert("你没选中任何信息！");
		return false;
	}
	if(window.confirm("你确定要删除这些消息么？"))
	{
		location = "pm.php?dopost=del&ids="+selid+"&folder="+myfolder;
	}
}
</script>
</head>
<body>
<?php include(DEDEMEMBER."/templets/head.htm"); ?>


<div class="bgcolor_w con_2">
    <div class="fL_">
        <div class="bordercolor_g3 con_2L4">
            <div class="con_2L4t">
                <div class="cont_">
                    <h4>短消息管理</h4>
                </div>
			
            </div>
            <div class="con_2L14b">
                <div class="con_2L14bL con_2L14bL1">
                    <a href="pm.php?folder=inbox"><h4 class="black_">收件箱</h4></a>
                </div>
                <div class="bordercolor_g con_2L14bL">
                    <a href="pm.php?dopost=send"><h4 class="black_">发短消息</h4></a>
                </div>
          </div>
            <div class="con_2L14c1">
    <div class="fR_">
      <input name="button2" type="button" class="bgcolor_w xx drop" onclick="DoSubmit('<?php echo $folder; ?>')" value="删除选中">
    </div>
  </div>
   <form class="mTB10 mL10 mR10" action="pm.php" method="post" name="form1">
          <input type='hidden' name='dopost' value='del' />
  <div class="con_2L14ct">
    <div class="con_2L14ct_L1">
      <input name="checkedClick" type="checkbox" value="" id="checkedClick">
      <label> 全选</label>
    </div>
    <div class="con_2L14ct_L5"> <span>标题</span> </div>
    <div class="con_2L14ct_L3 con_2L14ct_L6"> <span>时间</span> </div>
  </div>
  <div class="con_2L14c2line"></div>
  {dede:datalist}
  <div class="con_2L14c2">
    <div class="con_2L14c2_L2 con_2L14c2_L3">
      <input type="checkbox" name="deleteid" value="{dede:field.id/}" />
      <?php
           if($fields['hasview']==0) echo "<a class='cc' href='pm.php?dopost=read&id={$fields['id']}'>{$fields['subject']}</a>";
           else echo "<a class='cc' href='pm.php?dopost=read&id={$fields['id']}'>{$fields['subject']}</a>";
           ?>  <?php
          $readmsg = ($fields['hasview']==0 ? "<img src='/templets/skin/new.gif' />" : '<span>已阅读</span>');
          echo $readmsg;
          ?></div>
    <div class="con_2L14ct_L3 con_2L14ct_L6"> <span class="gray_"><?php
          echo MyDate('y-m-d',$fields['sendtime']);
          ?></span> </div>
  </div>
  <div class="con_2L14c2line"></div>
 {/dede:datalist}

  <div class="page_">{dede:pagelist listsize=5 /}</div>

</form>
        </div>
    </div>
    
    <?php include(DEDEMEMBER."/templets/right.htm"); ?>
</div>

<div id="foot_"></div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
<div class="foot_bottom"></div> 
</body>
</html>
