search_content.tpl.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header', 'admin');
  4. ?>
  5. <div class="pad_10">
  6. <form action="?" method="get">
  7. <input type="hidden" name="m" value="block">
  8. <input type="hidden" name="c" value="block_admin">
  9. <input type="hidden" name="a" value="public_search_content">
  10. <table width="100%" class="table_form">
  11. <tr>
  12. <td width="80"><?php echo L('category')?>:</td>
  13. <td><?php if(isset($_GET['dosubmit'])){?><div class="rt"><a href="javascript:void(0)" onclick="$('#search').toggle()"><?php echo L('folded_up_in_search_of')?></a></div><?php } echo form::select_category('category_content_'.$this->siteid, $catid, 'name="catid" id="catid"', '', '', '0', 1)?> </td>
  14. </tr>
  15. <tbody id="search" <?php if(isset($_GET['dosubmit'])) echo 'style="display:none"';?>>
  16. <tr>
  17. <td><?php echo L('posterize_time')?>:</td>
  18. <td><?php echo form::date('start_time', $start_time ? date('Y-m-d', $start_time) : '')?> - <?php echo form::date('end_time', $end_time ? date('Y-m-d',$end_time) : '')?></td>
  19. </tr>
  20. <tr>
  21. <td><?php echo L('recommend')?>:</td>
  22. <td>
  23. <?php echo form::select(array(''=>L('all'), '1'=>L('recommend'), '2'=>L('not_recommend')), $posids, 'name="posids"')?>
  24. </td>
  25. </tr>
  26. <tr>
  27. <td><?php echo L('search_mode')?>:</td>
  28. <td>
  29. <?php echo form::select(array('1'=>L('title'), '2'=>L('desc'), '3'=>L('username'), '4'=>'ID'), $searchtype, 'name="searchtype"')?>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td><?php echo L('key_word')?>:</td>
  34. <td>
  35. <input name="keyword" type="text" value="<?php echo $keyword?>" class="input-text" />
  36. </td>
  37. </tr>
  38. <tr>
  39. <td></td>
  40. <td>
  41. <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button" />
  42. </td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </form>
  47. <?php if (isset($_GET['dosubmit']) && !empty($data)) :?>
  48. <div class="table-list">
  49. <div class="btn"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"> <input type="button" value="<?php echo L('insert_a_comment_about_the_selected_text')?>" class="button" onclick="insert_form()"></div>
  50. <table width="100%">
  51. <tbody>
  52. <?php foreach ($data as $v):?>
  53. <tr>
  54. <td align="center" width="40"><input class="inputcheckbox " name="ids[]" value="{title:'<?php echo str_replace('\'', '\\\'', $v['title'])?>', thumb:'<?php echo $v['thumb']?>', desc:'<?php echo str_replace(array('\'', "\r","\n"), array('\\\'', "", ""), $v['description'])?>', url:'<?php echo $v['url']?>'}" type="checkbox"></td>
  55. <td><?php echo $v['title']?> <?php if ($v['thumb']) echo '<font color="red">['.L('pic').']</font>'?></td>
  56. </tr>
  57. <?php endforeach;?>
  58. </tbody>
  59. </table>
  60. <div class="btn"><label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="button" value="<?php echo L('insert_a_comment_about_the_selected_text')?>" class="button" onclick="insert_form()"></div>
  61. <dir id="pages"><?php echo $pages?></dir>
  62. </div>
  63. <?php endif;?>
  64. </div>
  65. <script type="text/javascript">
  66. <!--
  67. function insert_form() {
  68. $("input[type='checkbox'][name='ids[]']:checked").each(function(i,n){parent.insert_forms($(n).val());});
  69. parent.art.dialog({id:'search_content'}).close();
  70. }
  71. //-->
  72. </script>
  73. </body>
  74. </html>