4 <script language="javascript" type="text/javascript">
7 if (confirm ("{/literal}{$msg_confirm_delete}{literal}")) {
8 document.operations.action.value = "del";
9 document.operations.{/literal}{$prefix}{literal}id.value = myid;
10 document.operations.submit();
14 function edit( myid ) {
15 document.operations.action.value = "edit";
16 document.operations.{/literal}{$prefix}{literal}id.value = myid;
17 document.operations.submit();
25 <form method="post" action="{$smarty.server.PHP_SELF}" name="operations">
26 <input type="hidden" name="action" value="" />
27 <input type="hidden" name="{$prefix}id" value="" />
30 <table class="{$table_class}"{if $table_style} style="{$table_style}"{/if}>
32 {if $idsum}<th>{$msg_id}</th>{/if}
33 {foreach from=$vars item=myval}
34 {if $myval.sum}<th>{$myval.desc}</th>{/if}
37 <th>{$msg_action}</th>
42 <td colspan="{$ncols}"><strong>{$msg_new_entry}</strong></td>
44 <a class="action" href="javascript:edit('');">{$msg_create}</a>
48 {counter start=1 assign=cnt print=0}
49 {foreach from=$rows item=myrow}{assign var="myarr" value=$myrow[1]}
50 <tr{if $cnt % 2} class="odd"{/if}>
51 {if $idsum} <td>{$myrow[0]}</td>{/if}
52 {foreach from=$vars key=mykey item=myval}
55 {if $myval.type=="timestamp"}
56 <small>{$myarr.$mykey|date_format:"%Y-%m-%d %H:%M:%S"}</small>
57 {elseif $myval.type=="set" and $myval.trans}
58 {$myval.trans[$myval.value]}
59 {elseif $myval.type=="ext"}
60 {extval table=$table field=$mykey value=$myarr.$mykey vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield}
70 <a class="action" href="javascript:edit('{$myrow[0]}');">{$msg_edit}</a>
71 <a class="action" href="javascript:del('{$myrow[0]}');">{$msg_delete}</a>
73 {foreach from=$myrow[2] item=myaction}
74 {a class="action" lnk=$myaction}
83 {if ($p_prev > -1) || ($p_next > -1)}
84 <p class="pagenavigation">
85 {if $p_prev > -1}<a href="?start={$p_prev}">{$msg_previous_page}</a> {/if}
86 {if $p_next > -1}<a href="?start={$p_next}">{$msg_next_page}</a>{/if}
92 <form method="post" action="{$smarty.server.PHP_SELF}">
93 <input type="hidden" name="action" value="update">
95 <input type="hidden" name="{$prefix}id" value="{$id}">
100 {if $id!=''}{$msg_existing_entry} {$id}
101 {else}{$msg_new_entry}{/if}
104 {foreach from=$vars key=mykey item=myval}
108 <strong>{$myval.desc}</strong>
109 {if $myval.type=="password"}<br /><em>{$msg_no_change}</em>{/if}
113 {if $myval.type=="textarea"}
114 <textarea name="{$prefix}{$mykey}" rows="10" cols="70">{$myval.value|escape}</textarea>
115 {elseif $myval.type=="set"}
117 {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.trans[$myval.value] trans=$myval.trans}
119 {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.value}
121 {elseif $myval.type=="ext"}
122 {extval table=$table field=$mykey name="$prefix$mykey" vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield selected=$myval.value}
123 {elseif $myval.type=="timestamp"}
124 <input type="text" name="{$prefix}{$mykey}" value="{$myval.value|date_format:"%Y-%m-%d %H:%M:%S"}" />
125 {elseif $myval.type=="password"}
126 <input type="password" name="{$prefix}{$mykey}" size="40" />
128 <input type="{$myval.type}" name="{$prefix}{$mykey}" size="40" value="{$myval.value|escape}" />
131 {$myval.value|escape}
140 <input type="submit" value="{$msg_submit}" />
146 <a href="{$smarty.server.PHP_SELF}">{$msg_back}</a>