dbsource_list.tpl.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. <div class="table-list">
  7. <table width="100%" cellspacing="0">
  8. <thead>
  9. <tr>
  10. <th width="80">Siteid</th>
  11. <th><?php echo L('dbsource_name')?></th>
  12. <th><?php echo L('server_address')?></th>
  13. <th width="150"><?php echo L('operations_manage')?></th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <?php
  18. if(is_array($list)):
  19. foreach($list as $v):
  20. ?>
  21. <tr>
  22. <td width="80" align="center"><?php echo $v['id']?></td>
  23. <td align="center"><?php echo $v['name']?></td>
  24. <td align="center"><?php echo $v['host']?></td>
  25. <td align="center"><a href="javascript:edit(<?php echo $v['id']?>, '<?php echo new_html_special_chars(new_addslashes($v['name']))?>')"><?php echo L('edit')?></a> | <a href="?m=dbsource&c=dbsource_admin&a=del&id=<?php echo $v['id']?>" onclick="return confirm('<?php echo new_html_special_chars(new_addslashes(L('confirm', array('message'=>$v['name']))))?>')"><?php echo L('delete')?></a></td>
  26. </tr>
  27. <?php
  28. endforeach;
  29. endif;
  30. ?>
  31. </tbody>
  32. </table>
  33. </div>
  34. </div>
  35. <div id="pages"><?php echo $pages?></div>
  36. <script type="text/javascript">
  37. <!--
  38. function edit(id, name) {
  39. window.top.art.dialog({id:'edit'}).close();
  40. window.top.art.dialog({title:'<?php echo L('edit_dbsource')?>《'+name+'》',id:'edit',iframe:'?m=dbsource&c=dbsource_admin&a=edit&id='+id,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
  41. }
  42. //-->
  43. </script>
  44. </body>
  45. </html>