<div class="toolbar clear">
    <h3 class="header">Setup</h3>
    <input type="submit" name="bsave" value="Save Changes" class="submit"  />
    <a href="<%cfg.cgi_url%>?<%hidden_query%>;page=help_setup.html" rel="<%cfg.cgi_url%>?<%hidden_query%>;page=help_setup.html" title="Setup" class="help"><img src="<%GT::FileMan::image_url('question-mark.gif')%>" alt="Question" /></a>
</div>
<div class="contentframe">
    <div class="row spacer clear">
        <div class="description group">Paths and URLs</div>
        <label for="setup_input" class="name">CGI URL</label>
        <div class="value">
            <input type="text" id="setup_input" name="cgi_url" value="<%if in.cgi_url%><%in.cgi_url%><%else%><%cfg.cgi_url%><%endif%>" class="text longtext" />
        </div>
    </div>
    <div class="row spacer clear">
        <label for="static_url" class="name">Static URL</label>
        <div class="value">
            <input type="text" id="static_url" name="static_url" value="<%if in.static_url%><%in.static_url%><%else%><%cfg.static_url%><%endif%>" class="text longtext" />
        </div>
    </div>
    <div class="row spacer clear">
        <label for="root_path" class="name">Root Directory</label>
        <div class="value">
            <input type="text" id="root_path" name="root_path" value="<%if in.root_path%><%in.root_path%><%else%><%cfg.root_path%><%endif%>" class="text longtext" />
        </div>
    </div>
    <%if session.user.type%>
    <div class="row spacer clear">
        <div class="description group">E-mail Setup</div>
        <label for="email_admin" class="name">Admin E-mail</label>
        <div class="value">
            <input type="text" id="email_admin" name="email_admin" value="<%if in.email_admin%><%in.email_admin%><%else%><%cfg.email.admin%><%endif%>" class="text longtext" />
        </div>
    </div>
    <div class="row spacer clear">
        <label for="email_smtp_server" class="name">SMTP Server</label>
        <div class="value">
            <input type="text" id="email_smtp_server" name="email_smtp_server" value="<%if in.email_smtp_server%><%in.email_smtp_server%><%else%><%cfg.email.smtp_server%><%endif%>" class="text longtext" />
        </div>
    </div>
    <div class="row spacer clear">
        <label for="email_mail_path" class="name">sendmail Path</label>
        <div class="value">
            <input type="text" id="email_mail_path" name="email_mail_path" value="<%if in.email_mail_path%><%in.email_mail_path%><%else%><%cfg.email.mail_path%><%endif%>" class="text longtext" />
        </div>
    </div>
    <%endif%>
    <div class="row spacer clear">
        <div class="description group">Other Options</div>
        <label for="date_display" class="name">Date Output Format</label>
        <div class="value">
            <input type="text" id="date_display" name="date_display" value="<%if in.date_display%><%in.date_display%><%else%><%cfg.date.display%><%endif%>" class="text longtext" />
        </div>
    </div>
    <div class="row spacer clear">
        <label for="date_display" class="name">Date Input Format</label>
        <div class="value">
            <input type="text" id="date_input" name="date_input" value="<%if in.date_input%><%in.date_input%><%else%><%cfg.date.input%><%endif%>" class="text longtext" />
        </div>
    </div>
    <%if session.user.type%>
    <div class="row spacer clear">
        <label for="history_exp" class="name">Keep Log</label>
        <div class="value">
            <input type="text" id="history_exp" name="history_exp" maxlength="3" value="<%if in.history_exp%><%in.history_exp%><%else%><%cfg.history_exp%><%endif%>" class="text tinytext" /> days
        </div>
    </div>
    <%endif%>
    <%ifnot in.sid%>
    <div class="row spacer clear">
        <label for="session_cookie" class="name">Cookie Name</label>
        <div class="value">
            <input type="text" id="session_cookie" name="session_cookie" value="<%if in.session_cookie%><%in.session_cookie%><%else%><%cfg.session.cookie%><%endif%>" class="text shorttext" />
            <label for="session_expiry" class="sessionexpiry">Expiry</label>
            <input type="text" id="session_expiry" name="session_expiry" value="<%if in.session_expiry%><%in.session_expiry%><%else%><%cfg.session.expiry%><%endif%>" class="text tinytext" /><label> hours</label>
        </div>
    </div>
    <%endif%>
    <%~ifnot mswin%>
    <div class="row spacer clear">
        <label for="filename_check" class="name">File Name Check</label>
        <div class="value">
            <select id="filename_check" name="filename_check">
                <option value="0"<%ifnot cfg.filename_check%> selected="selected"<%endif%>>No</option>
                <option value="1"<%if cfg.filename_check%> selected="selected"<%endif%>>Yes</option>
            </select>
        </div>
    </div>
    <%endif~%>
    <div class="row spacer clear">
        <label for="debug" class="name">Debug</label>
        <div class="value">
            <select id="debug" name="debug">
                <option value="0"<%ifnot cfg.debug%> selected="selected"<%endif%>>No</option>
                <option value="1"<%if cfg.debug%> selected="selected"<%endif%>>Yes</option>
            </select>
        </div>
    </div>
    <div class="row spacer clear">
        <%if session.user.type%><div class="description group">Default Values</div><%endif~%>
        <label for="default_upload_mode" class="name">Upload Mode</label>
        <div class="value">
            <input type="text" id="default_upload_mode" name="default_upload_mode" maxlength="3" value="<%if in.default_upload_mode%><%in.default_upload_mode%><%elsif cfg.default.upload_mode%><%cfg.default.upload_mode%><%endif%>" class="text tinytext" />
        </div>
    </div>
    <%if session.user.type%>
    <div class="row spacer clear">
        <label for="default_allowed_space" class="name">Allowed Space</label>
        <div class="value">
            <input type="text" id="default_allowed_space" name="default_allowed_space" maxlength="10" value="<%if in.default_allowed_space%><%in.default_allowed_space%><%else%><%cfg.default.allowed_space%><%endif%>" class="text shorttext" /> <label>KB</label>
        </div>
    </div>
    <div class="row clear">
        <label class="name">Permissions</label>
        <div class="value">
            <table>
                <tr>
                    <td>
                        <input type="checkbox" id="search" name="default_permission_search" value="1"<%if cfg.default.permission.search%> checked="checked"<%endif%> class="checkbox"  /><label for="search">Search</label><br />
                        <input type="checkbox" id="replace" name="default_permission_replace" value="1"<%if cfg.default.permission.replace%> checked="checked"<%endif%> class="checkbox" /><label for="replace">Replace</label><br />
                        <input type="checkbox" id="command" name="default_permission_command" value="1"<%if cfg.default.permission.command%> checked="checked"<%endif%> class="checkbox" /><label for="command">Command</label><br />
                        <input type="checkbox" id="upload" name="default_permission_upload" value="1"<%if cfg.default.permission.upload%> checked="checked"<%endif%> class="checkbox" /><label for="upload">Upload</label>
                    </td>
                    <td>
                        <input type="checkbox" id="newfile" name="default_permission_newfile" value="1"<%if cfg.default.permission.newfile%> checked="checked"<%endif%> class="checkbox"  /><label for="newfile">New File</label><br />
                        <input type="checkbox" id="makedir" name="default_permission_makedir" value="1"<%if cfg.default.permission.makedir%> checked="checked"<%endif%> class="checkbox" /><label for="makedir">New Folder</label><br />
                        <input type="checkbox" id="protect" name="default_permission_protect" value="1"<%if cfg.default.permission.protect%> checked="checked"<%endif%> class="checkbox" /><label for="protect">Protect</label><br />
                        <input type="checkbox" id="preferences" name="default_permission_preferences" value="1"<%if cfg.default.permission.preferences%> checked="checked"<%endif%> class="checkbox" /><label for="preferences">Preferences</label>
                    </td>
                    <td>
                        <input type="checkbox" id="edit" name="default_permission_edit" value="1"<%if cfg.default.permission.edit%> checked="checked"<%endif%> class="checkbox"  /><label for="edit">Edit File</label><br />
                        <input type="checkbox" id="download" name="default_permission_download" value="1"<%if cfg.default.permission.download%> checked="checked"<%endif%> class="checkbox" /><label for="download">Download</label><br />
                        <input type="checkbox" id="symlink" name="default_permission_symlink" value="1"<%if cfg.default.permission.symlink%> checked="checked"<%endif%> class="checkbox" /><label for="symlink">Symlink</label><br />
                        <input type="checkbox" id="copy" name="default_permission_copy" value="1"<%if cfg.default.permission.copy%> checked="checked"<%endif%> class="checkbox" /><label for="copy">Copy</label>
                    </td>
                    <td>
                        <input type="checkbox" id="move" name="default_permission_move" value="1"<%if cfg.default.permission.move%> checked="checked"<%endif%> class="checkbox"  /><label for="move">Move</label><br />
                        <input type="checkbox" id="rename" name="default_permission_rename" value="1"<%if cfg.default.permission.rename%> checked="checked"<%endif%> class="checkbox" /><label for="rename">Rename</label><br />
                        <input type="checkbox" id="delete" name="default_permission_delete" value="1"<%if cfg.default.permission.delete%> checked="checked"<%endif%> class="checkbox" /><label for="delete">Delete</label><br />
                        <input type="checkbox" id="compress" name="default_permission_compress" value="1"<%if cfg.default.permission.compress%> checked="checked"<%endif%> class="checkbox" /><label for="compress">Compress</label><br />
                    </td>
                    <td>
                        <input type="checkbox" id="chmod" name="default_permission_chmod" value="1"<%if cfg.default.permission.chmod%> checked="checked"<%endif%> class="checkbox" /><label for="chmod">Chmod</label><br />
                        <input type="checkbox" id="tail" name="default_permission_tail" value="1"<%if cfg.default.permission.tail%> checked="checked"<%endif%> class="checkbox"  /><label for="tail">Tail</label><br />
                        <input type="checkbox" id="perl" name="default_permission_perl" value="1"<%if cfg.default.permission.perl%> checked="checked"<%endif%> class="checkbox" /><label for="perl">Perl</label><br />
                        <input type="checkbox" id="diff" name="default_permission_diff" value="1"<%if cfg.default.permission.diff%> checked="checked"<%endif%> class="checkbox" /><label for="diff">Diff</label><br />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <%endif%>
</div>
