add_othors.tpl.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. <input type="hidden" value="content" name="m">
  7. <input type="hidden" value="content" name="c">
  8. <input type="hidden" value="public_relationlist" name="a">
  9. <input type="hidden" value="<?php echo $modelid;?>" name="modelid">
  10. <fieldset>
  11. <legend><?php echo L('select_sitelist');?></legend>
  12. <?php
  13. foreach($sitelist as $_k=>$_v) {
  14. $checked = $_k==$siteid ? 'checked' : '';
  15. echo "<label class='ib' style='width:128px'><input type='radio' name='select_siteid' $checked onclick='change_siteid($_k)'> " .$_v['name']."</label>";
  16. }
  17. ?>
  18. </fieldset>
  19. <div style="width:500px; padding:2px; border:1px solid #d8d8d8; float:left; margin-top:10px; margin-right:10px; overflow:hidden">
  20. <table width="100%" cellspacing="0" class="table-list" >
  21. <thead>
  22. <tr>
  23. <th width="100"><?php echo L('catid');?></th>
  24. <th ><?php echo L('catname');?></th>
  25. <th width="150" ><?php echo L('select_model_name');?></th>
  26. </tr>
  27. </thead>
  28. <tbody id="load_catgory">
  29. <?php echo $categorys;?>
  30. </tbody>
  31. </table>
  32. </div>
  33. <div style="overflow:hidden;_float:left;margin-top:10px;*margin-top:0;_margin-top:0; width:144px">
  34. <fieldset>
  35. <legend><?php echo L('category_checked');?></legend>
  36. <ul class='list-dot-othors' id='catname'></ul>
  37. </fieldset>
  38. </div>
  39. </div>
  40. <style type="text/css">
  41. .line_ff9966,.line_ff9966:hover td{background-color:#FF9966}
  42. .line_fbffe4,.line_fbffe4:hover td {background-color:#fbffe4}
  43. .list-dot-othors li{float:none; width:auto}
  44. </style>
  45. <SCRIPT LANGUAGE="JavaScript">
  46. <!--
  47. function select_list(obj,title,id) {
  48. var relation_ids = window.top.$('#relation').val();
  49. var sid = 'v'+id;
  50. $(obj).attr('class','line_fbffe4');
  51. var str = "<li id='"+sid+"'>·<input type='hidden' name='othor_catid["+id+"]'><span>"+title+"</span><a href='javascript:;' class='close' onclick=\"remove_id('"+sid+"')\"></a></li>";
  52. window.top.$('#add_othors_text').append(str);
  53. $('#catname').append(str);
  54. if(relation_ids =='' ) {
  55. window.top.$('#relation').val(id);
  56. } else {
  57. relation_ids = relation_ids+'|'+id;
  58. window.top.$('#relation').val(relation_ids);
  59. }
  60. }
  61. function change_siteid(siteid) {
  62. $("#load_catgory").load("?m=content&c=content&a=public_getsite_categorys&siteid="+siteid);
  63. }
  64. //移除ID
  65. function remove_id(id) {
  66. $('#'+id).remove();
  67. window.top.$('#'+id).remove();
  68. }
  69. change_siteid(<?php echo $this->siteid;?>);
  70. //-->
  71. </SCRIPT>
  72. </body>
  73. </html>