Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <div id="overview">
  2. <form name="frmOverview" method="post" action="">
  3. {if ($admin_list|count > 1)}
  4. {html_options name='username' output=$admin_list values=$admin_list selected=$admin_selected onchange="this.form.submit();"}
  5. <noscript><input class="button" type="submit" name="go" value="{$PALANG.go}" /></noscript>
  6. {/if}
  7. </form>
  8. {if $msg.show_simple_search}
  9. {#form_search#}
  10. {/if}
  11. </div>
  12. {if $msg.show_simple_search}
  13. {if ($search|count > 0)}
  14. <div class='searchparams'>
  15. <p>{$PALANG.searchparams}
  16. {foreach key=key item=field from=$search}
  17. <span>{if $struct.$key.label}{$struct.$key.label}{else}{$key}{/if}
  18. {if isset($searchmode.$key)}{$searchmode.$key}{else}={/if} {$field}
  19. </span>
  20. {/foreach}
  21. <span><a href="list.php?table={$table}&reset_search=1">[x]</a></span>
  22. </div>
  23. {/if}
  24. {/if}
  25. <div id="list">
  26. <table border=0 id='admin_table'><!-- TODO: 'admin_table' needed because of CSS for table header -->
  27. {if $msg.list_header}
  28. {assign var="colcount" value=2}
  29. {foreach key=key item=field from=$struct}
  30. {if $field.display_in_list == 1 && $field.label}{* don't show fields without a label *}
  31. {assign var="colcount" value=$colcount+1}
  32. {/if}
  33. {/foreach}
  34. <tr>
  35. <th colspan="{$colcount}">{$PALANG.{$msg.list_header}}</th>
  36. </tr>
  37. {/if}
  38. <tr class="header">
  39. {foreach key=key item=field from=$struct}
  40. {if $field.display_in_list == 1 && $field.label}{* don't show fields without a label *}
  41. <td>{$field.label}</td>
  42. {/if}
  43. {/foreach}
  44. <td>&nbsp;</td>
  45. <td>&nbsp;</td>
  46. </tr>
  47. {foreach key=itemkey from=$RAW_items item=RAW_item}
  48. {assign "item" $items.{htmlentities($itemkey, $smarty.const.ENT_QUOTES, 'UTF-8', false)}} {* array keys in $items are escaped using htmlentities(), see smarty.inc.php *}
  49. {#tr_hilightoff#}
  50. {foreach key=key item=field from=$struct}
  51. {if $field.display_in_list == 1 && $field.label}
  52. {if $field.linkto != '' && ($item.$id_field != '' || $item.$id_field > 0) }
  53. {assign "linkto" "{$field.linkto|replace:'%s':{$item.$id_field|escape:url}}"} {* TODO: use label field instead *}
  54. {assign "linktext" "<a href='{$linkto}'>{$item.{$key}}</a>"}
  55. {else}
  56. {assign "linktext" $item.$key}
  57. {/if}
  58. {if $table == 'foo' && $key == 'bar'}
  59. <td>Special handling (complete table row) for {$table} / {$key}</td>
  60. {else}
  61. <td>
  62. {if $table == 'foo' && $key == 'bar'}
  63. Special handling (td content) for {$table} / {$key}
  64. {elseif $table == 'aliasdomain' && $key == 'target_domain' && $struct.target_domain.linkto == 'target'}
  65. <a href="list-virtual.php?domain={$item.target_domain|escape:"url"}">{$item.target_domain}</a>
  66. {* {elseif $table == 'domain' && $key == 'domain'}
  67. <a href="list.php?table=domain&domain={$item.domain|escape:"url"}">{$item.domain}</a>
  68. *}
  69. {elseif $key == 'active'}
  70. {if $item._can_edit}
  71. <a href="{#url_editactive#}{$table}&amp;id={$RAW_item.$id_field|escape:"url"}&amp;active={if ($item.active==0)}1{else}0{/if}&amp;token={$smarty.session.PFA_token|escape:"url"}">{$item._active}</a>
  72. {else}
  73. {$item._active}
  74. {/if}
  75. {elseif $field.type == 'bool'}
  76. {assign "tmpkey" "_{$key}"}{$item.{$tmpkey}}
  77. {elseif $field.type == 'list'}
  78. {foreach key=key2 item=field2 from=$item.$key}{$field2}<br> {/foreach}
  79. {elseif $field.type == 'pass'}
  80. (hidden)
  81. {elseif $field.type == 'quot'}
  82. {assign "tmpkey" "_{$key}_percent"}
  83. {if $item[$tmpkey]>90}
  84. {assign var="quota_level" value="high"}
  85. {elseif $item[$tmpkey]>55}
  86. {assign var="quota_level" value="mid"}
  87. {else}
  88. {assign var="quota_level" value="low"}
  89. {/if}
  90. {if $item[$tmpkey] > -1}
  91. <div class="quota quota_{$quota_level}" style="width:{$item[$tmpkey] *1.2}px;"></div>
  92. <div class="quota_bg"></div></div>
  93. <div class="quota_text quota_text_{$quota_level}">{$linktext}</div>
  94. {else}
  95. <div class="quota_bg quota_no_border"></div></div>
  96. <div class="quota_text">{$linktext}</div>
  97. {/if}
  98. {elseif $field.type == 'txtl'}
  99. {foreach key=key2 item=field2 from=$item.$key}{$field2}<br> {/foreach}
  100. {elseif $field.type == 'html'}
  101. {$RAW_item.$key}
  102. {else}
  103. {$linktext}
  104. {/if}
  105. </td>
  106. {/if}
  107. {/if}
  108. {/foreach}
  109. <td>{if $item._can_edit}<a href="edit.php?table={$table|escape:"url"}&amp;edit={$RAW_item.$id_field|escape:"url"}">{$PALANG.edit}</a>{else}&nbsp;{/if}</td>
  110. <td>{if $item._can_delete}<a href="{#url_delete#}?table={$table}&amp;delete={$RAW_item.$id_field|escape:"url"}&amp;token={$smarty.session.PFA_token|escape:"url"}"
  111. onclick="return confirm ('{$PALANG.{$msg.confirm_delete}|replace:'%s':$item.$id_field}')">{$PALANG.del}</a>{else}&nbsp;{/if}</td>
  112. </tr>
  113. {/foreach}
  114. </table>
  115. {if $msg.can_create}
  116. <br /><a href="edit.php?table={$table|escape:"url"}" class="button">{$PALANG.{$formconf.create_button}}</a><br />
  117. <br />
  118. {/if}
  119. <br /><a href="list.php?table={$table|escape:"url"}&amp;output=csv">{$PALANG.download_csv}</a>
  120. </div>