⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tpl_settings.php

📁 一款文件上传程序
💻 PHP
📖 第 1 页 / 共 3 页
字号:
<!-- tpl_settings.php -->
<?php /* WARNING: DO NOT EDIT ANY FORM FIELD NAMES */ ?>
<h1>Uploader Settings</h1>

<p class="p1">
    <strong class="s2">Settings for:</strong> &nbsp;
    <?=$action=='settings' ? 'Uploader' : '<a href="admin.php?action=settings" class="special">Uploader</a>'?> -
    <?=$action=='user_settings' ? 'New Users' : '<a href="admin.php?action=user_settings" class="special">New Users</a>'?> -
    <?=$action=='emails' ? 'Emails' : '<a href="admin.php?action=emails" class="special">Emails</a>'?> -
	<?=$action=='public' ? 'Public Uploader' : '<a href="admin.php?action=public" class="special">Public Uploader</a>'?>
</p>

<?php /* Uploader settings */ if ( $action == 'settings' ) : ?>
<?php /* If settings have been saved, display this little notification */ if ( isset ( $_GET['saved'] ) ) : ?>
<p class="note1" style="text-align:center;">All settings have been saved!</p>
<?php endif; ?>

<form action="admin.php" method="post">
    <input type="hidden" name="action" value="settings" />
    <input type="hidden" name="task" value="save" />

    <fieldset>
        <legend>Uploader Settings</legend>
        <table id="tbl1" style="width:100%;" cellpadding="5" cellspacing="1" border="0">
            <tr>
                <td colspan="2" style="line-height:1.5em;">
                    Use <a href="http://www.google.com/search?hl=en&lr=&safe=off&q=absolute+path+vs+relative+path&btnG=Search">absolute path</a> if you are specifying a directory or a URL that is <strong>outside</strong> of the Uploader directory.
                    For all paths and URLs, add a trailing slash at the end. Instead of <span style="color:#707070">/some/path</span> enter
                    <span style="color:#707070">/some/path/</span>
                </td>
            </tr>
	    <tr>
		<td colspan="2" style="line-height:1.5em;">Absolute path to the uploader directory appears to be: <?=$uploader_absolute_path?></td>
	    </tr>
            <tr>
                <td style="width:120px;">Uploader URL</td>
                <td>
                    <input type="text" name="settings[uploader_url]" value="<?=$settings['uploader_url']?>" size="75" />
                    <span class="help" onclick="help('URL to the uploader directory. This URL will be used to generate urls to different parts of the uploader. Example: http://celerondude.com/uploader/');">Explain</span>
                </td>
            </tr>
            <tr>
                <td>Userfiles Directory</td>
                <td>
                    <input type="text" name="settings[userfiles_dir]" value="<?=$settings['userfiles_dir']?>" size="75" />
                    <span class="help" onclick="help('Path to the directory where user folders will be created. If folder is outside of the uploader directory, enter the absolute path. Example: /home/public_html/uploader/userfiles/.');">Explain</span>
                </td>
            </tr>
            <tr>
                <td>Userfiles URL</td>
                <td>
                    <input type="text" name="settings[userfiles_url]" value="<?=$settings['userfiles_url']?>" size="75" />
                    <span class="help" onclick="help('The full URL to the directory above. Example: http://celerondude.com/uploader/userfiles/');">Explain</span>
                </td>
            </tr>
            <tr>
                <td style="width:120px;">Admin Emails</td>
                <td><input type="text" name="settings[email]" value="<?=$settings['email']?>" size="75" /> <span class="help" onclick="help('Email address(es) of the admin. All notifications will be sent to this email address. You can enter more than one email address by seperating them with a comma: one@celerondude.com, two@celerondude.com, three@celerondude.com.... Emails will be sent to all addresses entered.');">Explain</span></td>
            </tr>
            <tr>
                <td>Uploader Template</td>
                <td><input type="text" name="settings[tpl]" value="<?=$settings['tpl']?>" size="75" /> <span class="help" onclick="help('The directory name of the template folder located in the \'templates\' directory. If the template is not found, the default template (default) will be used so that you can fix any errors.');">Explain</span></td>
            </tr>
            <tr>
                <td>Watermark file</td>
                <td>
                    <input type="text" name="settings[wm_path]" value="<?=$settings['wm_path']?>" size="75" />
                    <span class="help" onclick="help('The path to the watermark image that is used to watermark user uploaded images. Watermarking can be disabled in the section below.');">Explain</span>
                </td>
            </tr>
            <tr>
                <td>Illegal Filetypes</td>
                <td>
                    <input type="text" name="settings[filetypes]" value="<?=$settings['filetypes']?>" size="75" />
                    <span class="help" onclick="help('File types that the users cannot upload. This setting overrides the setting for individual users. Warning: You should not leave this field blank. Enter all known file extensions that your server might parse and execute (such as ASP, PHP, Perl, or HTACCESS files). Seperate them with a comma but do not put a space in between. Example: php,pl,cgi,asp');">Explain</span>
                </td>
            </tr>

            <tr>
                <td>Maintenance mode</td>
                <td style="line-height:1.5em;">
                    <input type="checkbox" name="settings[m]" id="settings[m]" value="1" <?=$settings['m']==1?'checked="checked"':''?> class="chkbox" onclick="showIt('m_msg',this.checked);" />
                    <label for="settings[m]">Turn on maintenance mode.</label> <span class="help" onclick="help('This will block user access to the uploader and display a message. This mode should be enabled when you are upgrading the uploader or doing anything that you need the users to not access the uploader.');">Explain</span><br />
                    <span id="m_msg" <?=!$settings['m']?'style="display:none;"':''?>>
                        <textarea name="settings[m_msg]" cols="85" rows="3" style="padding:3px;"><?=htmlentities($settings['m_msg'])?></textarea>
                        <br /><small>Enter the reason for maintenance here, if you wish.</small>
                    </span>
                </td>
            </tr>

            <tr>
                <td>Upload record</td>
                <td colspan="2" style="line-height:1.5em;">
                    <input type="radio" name="settings[log]" value="2" id="log2" <?=$settings['log']==2?'checked="checked"':''?> class="radio" /><label for="log2">Log all uploads and deletions by users</label><br />
                    <input type="radio" name="settings[log]" value="1" id="log1" <?=$settings['log']==1?'checked="checked"':''?> class="radio" /><label for="log1">Log uploads only</label><br />
                    <input type="radio" name="settings[log]" value="0" id="log0" <?=$settings['log']==0?'checked="checked"':''?> class="radio" /><label for="log0">Neither (disabled)</label>
                </td>
            </tr>
            <tr>
                <td style="width:120px;">Registration</td>
                <td style="line-height:1.5em;">
                    <input type="checkbox"  name="settings[reg]" value="1" <?=$settings['reg']==1?'checked="checked"':''?> id="registration" class="chkbox" onclick="showIt('regDisabled',!this.checked);"/>
                    <label for="registration">Enable new user registration.</label>

                    <span id="regDisabled" <?=$settings['reg']?'style="display:none;"':''?>>
                        <textarea name="settings[regmsg]" cols="85" rows="3" style="padding:3px;"><?=htmlentities($settings['regmsg'])?></textarea>
                        <br /><small>You can enter the reason here if you wish.</small>
                    </span>

                    <br />
                    <input type="checkbox"  name="settings[approval]" value="1" <?=$settings['approval'] ?'checked="checked"':''?> id="approval" class="chkbox" />
                    <label for="approval">Automatically approve new accounts.</label> <span class="help" onclick="help('The uploader cannot be accessed if the user has not been approved. This allows you to manually approve new users or automatically approve all new users.');">Explain</span>
                    <br />
                    <input type="checkbox"  name="settings[activation_req]" value="1" <?=$settings['activation_req'] ?'checked="checked"':''?> id="activation"  class="chkbox"/>
                    <label for="activation">Accounts must be activated.</label> <span class="help" onclick="help('Activation requirement requires that the user account be activated through email. This is to verify that the user has entered a valid email address. Enable this if you wish to do so.');">Explain</span>
                    <br />
                    <input type="checkbox" name="settings[notify_reg]" id="notify_reg" value="1" <?=$settings['notify_reg'] ?'checked="checked"':''?> class="chkbox" />
                    <label for="notify_reg">Notify admin(s) of new users through email.</label>
                </td>
            </tr>
            <tr>
                <td>User/file browsing</td>
                <td colspan="2" style="line-height:1.5em;">
                    <input type="radio" name="settings[browsing]" value="any" class="radio" id="browsing1" <?=$settings['browsing']=='any'?'checked="checked"':''?>/>
                    <label for="browsing1">Anyone (public) can browse for users and browse users' files.</label>
                    <br />
                    <input type="radio" name="settings[browsing]" value="reg" class="radio" id="browsing2" <?=$settings['browsing']=='reg'?'checked="checked"':''?>/>
                    <label for="browsing2">Only registered users can use this feature.</label>
                    <br />
                    <input type="radio" name="settings[browsing]" value="none" class="radio" id="browsing3" <?=$settings['browsing']=='none'?'checked="checked"':''?>/>
                    <label for="browsing3">No one, this feature is disabled.</label>
                </td>
            </tr>
            <tr>
                <td>Watermarking</td>
                <td style="line-height:1.5em;">
                    <input type="radio" name="settings[wm]" value="always" id="wm2" <?=$settings['wm']=='always'?'checked="checked"':''?> class="radio"/><label for="wm2">Always watermark uploaded images.</label>
                    <br />
                    <input type="radio" name="settings[wm]" value="user" id="wm1" <?=$settings['wm']=='user'?'checked="checked"':''?> class="radio"/><label for="wm1">Watermark all images but allow per user setting to disable it.</label>
                    <span class="help" onclick="help('Per user setting is an individual setting for each user stating whether images uploaded by the particular user should be watermarked. Watermarking only works with JPEG and PNG formats.');">Explain</span>
                    <br />
                    <input type="radio" name="settings[wm]" value="never" id="wm0" <?=$settings['wm']=='never'?'checked="checked"':''?> class="radio"/><label for="wm0">Never watermark uploaded images.</label>
                </td>
            </tr>
            <tr>
                <td>Uploader view</td>
                <td>
                    <input type="checkbox" name="settings[uploader_view]" id="uploader_view" value="1" <?=$settings['uploader_view']?'checked="checked"':''?> class="chkbox" />
                    <label for="uploader_view">User the uploader to view images.</label>
                </td>
            </tr>
        </table>
    </fieldset>

    <p style="text-align:center;">
        <input type="submit" value="Save" class="blue_button" /> <input type="reset" class="blue_button"  value="Undo changes" onclick="return confirm('Reset form?');" />
    </p>
</form>
<?php
// ######################################################################################
// THIS IS A SEPERATOR
// ######################################################################################
/* New user settings */ elseif ( $action == 'user_settings' ) : ?>
<p>
    These settings are given to new users when they register. Changing these settings will not affect currently registered users.
    To globally change settings of registered users, visit the <a href="admin.php?action=users" class="special">Users</a> section.
</p>
<br />
<?php /* If settings have been saved, display this little notification */ if ( $saved ) : ?>
<p class="note1" style="text-align:center;">All settings have been saved!</p>
<?php endif; ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -