<?php include mayi_tpl("owenjq");?>
<style>
input.text{ width:130px;}
input.txt{ width:40px!important;}
</style>
<div id="<?=MPS_SOFTNAME?>">
<table border="0" cellspacing="0" cellpadding="0" class="vbm">
<tr class="firstr">
	<td>便民电话</td>
    
  </tr>
</table>
</div>
<form action="?" method="post">
<input name="forward_url" value="<?=GetUrl()?>" type="hidden"/>
<div id="<?=MPS_SOFTNAME?>">
<table border="0" cellspacing="0" cellpadding="0" class="vbm vbm3">
    <tr class="firstr">
      <td><input class="checkbox" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> 删?</td>
      <td>电话所属商家或行业(<font color="red">*</font>)</td>
      <td>电话号码(<font color="red">*</font>)</td>
      <td>颜色</td>
      <td>是否加粗</td>
      <td>显示顺序</td>
      <td>启用状态</td>
    </tr>
    <?php foreach($telephone as $k =>$value){?>
        <tr class="listtr">
          <td><input class="checkbox" type='checkbox' name='delids[]' value='<?=$value[id]?>' id="<?=$value[id]?>"></td>
          <td><input class="text" name="edit[<?=$value[id]?>][telname]" value="<?=$value[telname]?>" />
          </td>
          <td><input class="text" value="<?=$value[telnumber]?>" name="edit[<?=$value[id]?>][telnumber]"/></td>
          <td><select name="edit[<?=$value[id]?>][color]">
                <option value="">默认颜色</option>
                <?php echo get_color_options($value['color']); ?>
      		  </select>
          </td>
          <td><select name="edit[<?=$value[id]?>][if_bold]">
              <option value="0" <?php if($value['if_bold'] != 1){echo 'selected="selected"; style="background-color:#6EB00C;color:white"';}?>>不加粗</option>
              <option value="1" <?php if($value['if_bold'] == 1){echo 'selected="selected"; style="background-color:#6EB00C;color:white"';}?>>加粗</option>
      		  </select>
          </td>
          <td><input name="edit[<?=$value[id]?>][displayorder]" value="<?=$value[displayorder]?>" type="text" class="txt"/></td>
          <td><select name="edit[<?=$value[id]?>][if_view]"><?=get_ifview_options($value[if_view])?></select></td>
        </tr>
    <?php }?>
    <script type="text/javascript">
	$(function () {
		$("#addnewpart").click(function () {
			$("#secqaabodyhidden").clone().appendTo($(".vbm3"));
			$("#secqaabodyhidden").show();
		});
	});
    </script>
  <tbody id="secqaabody">
   <tr align="center" class="listtr">
   	 	<td>新增:<a id="addnewpart" href="javascript:void(0);">[+]</a></td>
        <td><input name="newtelname[]" value="" type="text" class="text"/>
       </td>
        <td><input name="newtelnumber[]" value="" type="text" class="text"/></td>
        <td><select name="newcolor[]" style="float:left">
              <option value="">默认颜色</option>
               <?php echo get_color_options(); ?>
              </select></td>
        <td><select name="newif_bold[]">
              <option value="0">不加粗</option>
              <option value="1">加粗</option>
              </select></td>
        <td><input name="newdisplayorder[]" value="0" type="text" class="txt"/></td>
        <td><select name="newif_view[]">
        <?=get_ifview_options(2)?>
        </select>
        </td>
   </tr>
   </tbody>
   
   <tbody id="secqaabodyhidden" style="display:none">
		<tr align="center" class="listtr">
       		<td>&nbsp;</td>
            <td><input name="newtelname[]" value="" type="text" class="text"/>
            </td>
            <td><input name="newtelnumber[]" value="" type="text" class="text"/></td>
            <td><select name="newcolor[]" style="float:left">
                  <option value="">默认颜色</option>
                   <?php echo get_color_options(); ?>
                  </select></td>
            <td><select name="newif_bold[]">
                  <option value="0">不加粗</option>
                  <option value="1">加粗</option>
                  </select></td>
            <td><input name="newdisplayorder[]" value="0" type="text" class="txt"/></td>
            <td><select name="newif_view[]">
            <?=get_ifview_options(2)?>
            </select>
            </td>
       </tr>
   </tbody>
</table>
</div>
<center>
<input class="mymps large" value="提 交" name="<?=CURSCRIPT?>_submit" type="submit"> &nbsp;
</center>
</form>
<div class="pagination"><?php echo page2()?></div>  
<?php include mayi_tpl('owenbt');?>