<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- 系統管理: 
<!-- TMPL_IF NAME=add_form --><!-- TMPL_IF NAME="searchfield" -->修改印表機 '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->新增一台印表機<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_validate" -->印表機被新增<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->確認刪除印表機'<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirmed" -->印表機刪除<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->

<div id="main"><!-- TMPL_IF NAME=add_form -->
        <script language="JavaScript" type="text/javascript">
        //
        function isNotNull(f,noalert) {
                if (f.value.length ==0) {
   return false;
                }
                return true;
        }
        //
        function toUC(f) {
                var x=f.value.toUpperCase();
                f.value=x;
                return true;
        }
        //
        function isNum(v,maybenull) {
        var n = new Number(v.value);
        if (isNaN(n)) {
                return false;
                }
        if (maybenull==0 && v.value=="") {
                return false;
        }
        return true;
        }
        //
        function isDate(f) {
                var t = Date.parse(f.value);
                if (isNaN(t)) {
                        return false;
                }
        }
        //
        function Check(f) {
                var ok=1;
                var _alertString="";
                var alertString2;
                if (f.printername.value.length==0) {
                        _alertString += "- 印表機名稱遺失\n";
                }
                if (f.printqueue.value.length==0) {
                        _alertString += "- 佇列遺失\n";
                }
                if (_alertString.length==0) {
                        document.Aform.submit();
                } else {
                        alertString2 = "表格無法寄送，因為接下來的問題\n";
                        alertString2 += "------------------------------------------------------------------------------------\n\n";
                        alertString2 += _alertString;
                        alert(alertString2);
                }
        }
        </script>


        
<!-- TMPL_IF NAME="searchfield" -->
		<h1>修改印表機</h1>
	<!-- TMPL_ELSE -->
		<h1>新增一台印表機</h1>
	<!-- /TMPL_IF -->
        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
        <input type="hidden" name="op" value="add_validate" />
	<table>
	<!-- TMPL_IF NAME="searchfield" -->
		<tr>
			<td>印表機名稱</td>
			<td>
				<input type="hidden" name="printername" value="<!-- TMPL_VAR NAME=searchfield -->" /><!-- TMPL_VAR NAME="searchfield" -->
			</td>
		</tr>
	<!-- TMPL_ELSE -->
		<tr>
			<td>印表機名稱</td>
			<td>
				<input type="text" name="printername" size="50" maxlength="50" />
			</td>
		</tr>
	<!-- /TMPL_IF -->

        	<tr>
			<td>佇列</td>
			<td><input type="text" name="printqueue" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printqueue" -->" /> </td>
		</tr>
        	<tr>
			<td>型式</td>
			<td><input type="text" name="printtype" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printtype" -->" /> </td>
		</tr>
        </table><p><input type="button" value="完成" onclick="Check(this.form);" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" /></p>
        </form>

<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="add_validate" -->
<h3>印表機被新增</h3>
<div id="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
        <input type="submit" value="完成" class="submit" />
</form></div>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="delete_confirm" -->
<h3>確認刪除印表機 <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>
<table>
		<tr>
			<td>印表機</td>
			<td><!-- TMPL_VAR NAME="searchfield" --></td>
		</tr>
		<tr>
			<td>佇列</td>
			<td><!-- TMPL_VAR NAME="printqueue" --></td>
		</tr>
        	<tr>
			<td>型式</td>
			<td><!-- TMPL_VAR NAME="printtype" --></td>
		</tr>
        	<tr>
			<td>

			</td>
			<td>

			</td>
		</tr>
	</table>
<div class="tabitem">    	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
			<input type="hidden" name="op" value="delete_confirmed" />
			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
			<input type="submit" value="刪除這個印表機" class="cancel" />
			</form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
				<input type="submit" value="無法刪除" class="submit" />
			</form></div>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="delete_confirmed" -->
<h3>印表機刪除</h3>
<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
		<input type="submit" value="完成" class="submit" />
</form></div>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="else" -->
<h2>印表機管理</h2>
	<!-- TMPL_IF NAME=searchfield -->
		<div id="results">你可以查詢為了<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span></div>
	<!-- /TMPL_IF -->
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
                <input type="submit" name="submit" value="查詢" class="submit" />
        </form>
<table>
		<tr>
			<th>名稱</th>
			<th>佇列</th>
			<th>型式</th>
			<th>&nbsp;</th>
		</tr>
		<!-- TMPL_LOOP NAME=loop -->
		<tr>
			<td><!-- TMPL_VAR NAME="printername" --></td>
			<td><!-- TMPL_VAR NAME="printqueue" --></td>
			<td><!-- TMPL_VAR NAME="printtype" --></td>
			<td><form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" value="編輯" class="submit" /></form> <form class="inline" action="" method="get"><input type="hidden" name=
"op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" class="delete" value="刪除" /></form></td>
		</tr>
		<!-- /TMPL_LOOP -->
	</table>
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
       <p> <input type="hidden" name="op" value="add_form" /><input type="submit" value="新增印表機" class="submit" /></p></form>
	<!-- TMPL_IF NAME="offsetgtzero" -->
		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; 前一頁</a>
	<!-- /TMPL_IF -->

	<!-- TMPL_IF NAME="ltcount" -->
		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">下一頁 &gt;&gt;</a>	
	<!-- /TMPL_iF -->
<!-- /TMPL_IF -->
</div>

<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
