import_content.tpl.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. $show_header = $show_validator = $show_scroll = 1;
  4. include $this->admin_tpl('header','admin');
  5. ?>
  6. <br />
  7. <div class="pad-lr-10">
  8. <div id="searchid" style="display:">
  9. <form name="searchform" action="" method="get" >
  10. <input type="hidden" value="special" name="m">
  11. <input type="hidden" value="special" name="c">
  12. <input type="hidden" value="import" name="a">
  13. <input type="hidden" value="<?php echo $_GET['specialid']?>" name="specialid">
  14. <table width="100%" cellspacing="0" class="search-form">
  15. <tbody>
  16. <tr>
  17. <td>
  18. <div class="explain-col">
  19. <?php echo $model_form?>&nbsp;&nbsp; <?php echo L('keyword')?>:<input type='text' name="key" id="key" value="<?php echo $_GET['key'];?>" size="25"> <div class="bk10"></div>
  20. <span id="catids"></span>&nbsp;&nbsp;
  21. <?php echo L('input_time')?>:
  22. <?php $start_f = $_GET['start_time'] ? $_GET['start_time'] : format::date(SYS_TIME-2592000);$end_f = $_GET['end_time'] ? $_GET['end_time'] : format::date(SYS_TIME+86400);?>
  23. <?php echo form::date('start_time')?> - <?php echo form::date('end_time')?>
  24. <input type="submit" name="search" class="button" value="<?php echo L('search')?>" />
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </form>
  31. </div>
  32. <div class="table-list">
  33. <form name="myform" id="myform" action="?m=special&c=special&a=import&specialid=<?php echo $_GET['specialid']?>&modelid=<?php echo $_GET['modelid']?>" method="post">
  34. <table width="100%">
  35. <thead>
  36. <tr>
  37. <th width="40"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
  38. <th width="43"><?php echo L('listorder')?></th>
  39. <th><?php echo L('content_title')?></th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <?php if(is_array($data)) { foreach ($data as $r) {?>
  44. <tr>
  45. <td align="center" width="40"><input type="checkbox" class="inputcheckbox " name='ids[]' value="<?php echo $r['id'];?>"></td>
  46. <td align='center' width='43'><input name='listorders[<?php echo $r['id'];?>]' type='text' size='3' value='<?php echo $r['listorder'];?>' class='input-text-c'></td>
  47. <td><?php echo $r['title'];?></td>
  48. </tr>
  49. <?php } }?>
  50. </tbody>
  51. </table>
  52. <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label> <?php echo form::select($types, '', 'name="typeid" id="typeid"', L('please_choose_type'))?><span id="msg_id"></span> <input type="submit" name="dosubmit" id="dosubmit" class="button" value="<?php echo L('import')?>" /> </div>
  53. <div id="pages"><?php echo $pages;?></div>
  54. </form>
  55. </div>
  56. </div>
  57. </body>
  58. </html>
  59. <script type="text/javascript">
  60. function select_categorys(modelid, id) {
  61. if(modelid) {
  62. $.get('', {m: 'special', c: 'special', a: 'public_categorys_list', modelid: modelid, catid: id, pc_hash: pc_hash }, function(data){
  63. if(data) {
  64. $('#catids').html(data);
  65. } else $('#catids').html('');
  66. });
  67. }
  68. }
  69. select_categorys(<?php echo $_GET['modelid']?>, <?php echo $_GET['catid']?>);
  70. $(document).ready(function(){
  71. $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'220',height:'70'}, function(){this.close();$(obj).focus();})}});
  72. $("#typeid").formValidator({tipid:"msg_id",onshow:"<?php echo L('please_choose_type')?>",oncorrect:"<?php echo L('true')?>"}).inputValidator({min:1,onerror:"<?php echo L('please_choose_type')?>"});
  73. });
  74. $("#myform").submit(function (){
  75. var str = 0;
  76. $("input[name='ids[]']").each(function() {
  77. if($(this).attr('checked')=='checked') str = 1;
  78. });
  79. if(str==0) {
  80. alert('<?php echo L('choose_news')?>');
  81. return false;
  82. }
  83. return true;
  84. });
  85. </script>