<!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">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link rel="stylesheet" type="text/css" href="{$vd['sc']}css/main.css"/>
<style type="text/css">
td{white-space:normal;overflow:auto;text-overflow:none;}
td p{display:none}
td P.show {
  DISPLAY: block
}
td STRONG {
CURSOR:pointer;
COLOR:#0197c9;
PADDING:0 3px;
}
</style> 
</head>
<body>
<form method="post" action="index.php?m=mod_b2b&c=card&a=Remove" name="cform" id="cform"> 
<div id="titleDiv">
<div style="float:left"><a href="index.php?a=home"><img src="{$vd['sc']}images/home.png" style="vertical-align:middle" border="0"/></a></div><div style="float:left;padding-top:8px;padding-left:3px;"><a href="index.php?a=home" title="回到后台首页"><font color="#000">桌面</font></a> <span style="font-size:7px;">>></span> <span style="font-size:12px;">批量删卡</span></div>
<div style="float:right;"><a href="index.php" onFocus="this.blur()" title="查看订单相关帮助"><img src="{$vd['sc']}images/help.gif" style="vertical-align:middle" border="0"/></a></div>
</div>
<div id="contentTip" style="display:none;"></div>
<div id="content" class="cwarpper">
<div class="cbodyHead"></div>


<div class="cwarpper1">
<div class="ctitle">批量删除卡密</div>
<div>
  <table border="0" id="ctable2" class="ctable" bordercolor="#ededed">
    <tr>
      <td class="tablelt2">删除方案</td>
      <td class="tablert2">
        <select name="delway" style="width:500px;">
          <option value="3">根据卡号密码删除</option>
          <option value="1" selected>根据卡号删除</option>
          <option value="2">根据密码删除</option>
        </select>
        <font color="#FF0000">*</font>
      </td>
    </tr>
    <tr> 
      <td class="tablelt2">
        <strong onmouseover="showhide(this);" onmouseout="showhide(this);">[?]</strong><p>
          <font color="#ff0000">录入须知！</font>
          <font color="#ff0000">1、</font>请在表单中输入点卡的卡号和密码，点卡和密码之间用空格隔开，最多20个空格； 类似如下：<br/>
          111111 222222<br/>
          333333 444444<br/>
          其中左边为卡号,右边的为密码，回车后表示另外一组<br/>
          
          <font color="#ff0000">2、</font>如果是卡密组合，格式如：卡号+空格(一个或者多个都可以)+密码<br/>
          
          <font color="#ff0000">3、</font>不能输入任何除字母、数字或“-”之外的任何字符。<br/>
          
          <font color="#ff0000">4、</font>卡号和密码的长度建议都不超过30位，输入完成后请仔细核对，以免重复或输错。<br/>
          
          <font color="#ff0000">5、</font>可从文本文档或Excel中复制卡号和密码。<br/>
          
          <font color="#ff0000">6、</font>每次最好不要超过200张点卡，以免因为web表单传递限制导致出错。<br/></p>
        录入需要删除的卡密
      </td>
      <td class="tablert2" style="height:300px">
         <div style="display:none">
         <textarea id="txt_ln" name="content" rows="19" cols="4" style="overflow:hidden;border-right:0px;text-align:right;background-color:#f0f0f0;color:#5c5c5c;cursor:default;" readonly UNSELECTABLE="on"></textarea><textarea id="txt_main" name="content" rows="19" cols="70 " onkeyup="TextCounter()" onkeydown="editTab()"  onscroll="Show_Ln()" wrap="virtual" style="overflow:auto;padding-left:5px;border-left:0px"></textarea>
         <script language="JavaScript">document.getElementById("txt_ln").value += 1 +"\n";</script>
         </div>
         <textarea name="ubzcards" rows="19" cols="75" style="width:492px"></textarea>
      </td>
    </tr>
    <tr>
      <td class="tablelt2"></td>
      <td class="tablert2" style="height:80px">
        <input type="submit" value="批量删除 &gt;&gt" class="bigbtn"/>
        <input type="reset" value="&lt; &lt; 重新填写" class="bigbtn"/>
      </td>
    </tr>
  </table>
</div>
</div>

<div class="cbodyFoot"></div>
</div>

<div id="opcontent" style="display:none">
  <div class="optxt">
  </div>
</div>
</form>
<script type="text/javascript">
  var ctablenum = 2;
</script>
<script src="{$vd['sc']}js/content.js" type="text/javascript"></script>
<script type="text/javascript">
var EmptyLine = 0;
var j = 0;
function Show_Ln(){
  var txt_ln  = document.getElementById("txt_ln");
  var txt_main  = document.getElementById("txt_main");
  txt_ln.scrollTop = txt_main.scrollTop;
  while(txt_ln.scrollTop != txt_main.scrollTop)
  {
    txt_ln.value += (j++) + "\n";
    txt_ln.scrollTop = txt_main.scrollTop;
  }
  
  return;
}
function EditTab()
{
  var code, sel, tmp, r;
  var tabs="";
  event.returnValue = false;
  sel =event.srcElement.document.selection.createRange();
  r = event.srcElement.createTextRange();

  switch (event.keyCode)
  {
    case (8):
      if (!(sel.getClientRects().length > 1))
      {
        event.returnValue = true;
        return;
      }
      code = sel.text;
      tmp = sel.duplicate();
      tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
      sel.setEndPoint("startToStart", tmp);
      sel.text = sel.text.replace(/^\t/gm, "");
      code = code.replace(/^\t/gm, "").replace(/\r\n/g, "\r");
      r.findText(code);
      r.select();
      break;
    case (9):
      if (sel.getClientRects().length > 1)
      {
        code = sel.text;
        tmp = sel.duplicate();
        tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
        sel.setEndPoint("startToStart", tmp);
        sel.text = "\t"+sel.text.replace(/\r\n/g, "\r\t");
        code = code.replace(/\r\n/g, "\r\t");
        r.findText(code);
        r.select();
      }
      else
      {
        sel.text = "\t";
        sel.select();
      }
      break;
    case (13)  :
      tmp = sel.duplicate();
      tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top);
      tmp.setEndPoint("endToEnd", sel);

      for (var i=0; tmp.text.match(/^[\t]+/g) && i<tmp.text.match(/^[\t]+/g)[0].length; i++)  tabs += "\t";
      sel.text = "\r\n"+tabs;
      sel.select();
      break
    default:
      event.returnValue = true;
      break;
  }
}
function TextCounter()
{
  return;
  var strLineCounter = 0;
  var strCharCounter = 0;  
  document.getElementById("txt_ln").value = "1\n";
  EmptyLine = 0;

  for (var i = 0; i < document.getElementById("txt_main").value.length; i++)
  {
    var strChar = document.getElementById("txt_main").value.substring(i, i + 1);  
    if (strChar == '\n')
    {
      strCharCounter = 1;
      strLineCounter += 1;
      document.getElementById("txt_ln").value += (strLineCounter + 1 - EmptyLine) +"\n";
    }
    else if (strCharCounter == document.getElementById("txt_main").cols)
    {
      strCharCounter = 1;
      strLineCounter += 1;
      var s = document.getElementById("txt_ln").value.match(/\n/g);
      if (s)
      {
        if (s.length <= strLineCounter)
        {
          document.getElementById("txt_ln").value += "\n";
          EmptyLine++;
        }
      }
    }
    else
    {
      strCharCounter ++;
    }
  }
}
</script>

</body>
</html>
