preferences.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 106 行
PHP
106 行
<?
require './inc/inc.php';
if (isset ($f_real_name))
{
$myprefs['real-name'] = $f_real_name;
$myprefs['reply-to'] = $f_reply_to;
$myprefs['save-to-trash'] = $f_save_trash;
$myprefs['st-only-read'] = $f_st_only_read;
$myprefs['empty-trash'] = $f_empty_on_exit;
$myprefs['save-to-sent'] = $f_save_sent;
$myprefs['rpp'] = $f_rpp;
$myprefs['add-sig'] = $f_add_sig;
$myprefs['signature'] = $f_sig;
$myprefs['timezone'] = $f_timezone;
$myprefs['display-images'] = $f_display_images;
$myprefs['editor-mode'] = $f_editor_mode;
$myprefs['refresh-time'] = $f_refresh_time;
$myprefs['first-login'] = 1;
save_prefs ($myprefs);
unset ($myprefs);
}
$prefs = load_prefs ();
$jssource = (((((((((''.'
<script language="JavaScript">
disbl = false;
function newmsg() { location = \'newmsg.php?pag=').$pag).'&folder=').urlencode ($folder)).(((((((''.'&sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'; }
function folderlist() { location = \'folders.php?folder=')).urlencode ($folder)).(((((((((((((((((((((((((''.'&sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'}
function goend() { location = \'logout.php?sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'; }
function goinbox() { location = \'msglist.php?folder=inbox&sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'; }
function search() { location = \'search.php?sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'; }
function emptytrash() { location = \'folders.php?empty=trash&folder=')).urlencode ($folder)).(((((((((((((''.'&goback=true&sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\';}
function addresses() { location = \'addressbook.php?sid=').$sid).'&tid=').$tid).'&lid=').$lid).'\'; }
function dis() {
with(document.forms[0]) {
f_st_only_read.disabled = !f_save_trash.checked;
if(f_st_only_read.checked) f_st_only_read.checked = f_save_trash.checked;
disbl = !f_save_trash.checked
}
}
function checkDis() { if (disbl) return false; }
</script>
'));
$smarty->assign ('umJS', $jssource);
$smarty->assign ('umSid', $sid);
$smarty->assign ('umLid', $lid);
$aval_rpp = array (10, 20, 30, 40, 50, 100, 200);
$sel_rpp = '<select name=f_rpp>
';
for ($i = 0; ($i < count ($aval_rpp)); ++$i)
{
$selected = (($prefs['rpp'] == $aval_rpp[$i]) ? ' selected' : '');
($sel_rpp .= ((((('<option value='.$aval_rpp[$i]).$selected).'>').$aval_rpp[$i]).'
'));
}
($sel_rpp .= '</select>');
$sel_refreshtime = '<select name=f_refresh_time>
';
for ($i = 5; ($i < 30); $i = ($i + 5))
{
$selected = (($prefs['refresh-time'] == $i) ? ' selected' : '');
($sel_refreshtime .= ((((('<option value='.$i).$selected).'>').$i).'
'));
}
($sel_refreshtime .= '</select>');
$txtsignature = (('<textarea cols="40" rows="3" name="f_sig" class="textarea">'.htmlspecialchars ($prefs['signature'])).'</textarea>');
$stzoper = $server_time_zone[0];
$stzhours = (intval (($stzoper.substr ($server_time_zone, 1, 2))) * 3600);
$stzmins = (intval (($stzoper.substr ($server_time_zone, 3, 2))) * 60);
$stzdiff = ($stzhours + $stzmins);
$gmttime = (time () - $stzdiff);
$tzselect = '<select name=f_timezone>
';
for ($i = -12; ($i <= 12); ++$i)
{
$is = ((0 < $i) ? ((''.'+').$i) : $i);
$nowgmt = ($gmttime + ($i * 3600));
$tzstr = (($i < 0) ? '-' : '+');
($tzstr .= (sprintf ('%02d', abs ($i)).'00'));
$selected = (($prefs['timezone'] == $tzstr) ? ' selected' : '');
($tzselect .= (((((((((''.'<option value="').$tzstr).'"').$selected).'>GMT ').$is).' (').date ('h:i A', $nowgmt)).')
'));
}
($tzselect .= '</select>
');
$smarty->assign ('umRealName', $prefs['real-name']);
$smarty->assign ('umReplyTo', $prefs['reply-to']);
$status = ($prefs['save-to-trash'] ? ' checked' : '');
$smarty->assign ('umSaveTrash', $status);
$status = ($prefs['st-only-read'] ? ' checked' : '');
$smarty->assign ('umSaveTrashOnlyRead', $status);
$status = ($prefs['empty-trash'] ? ' checked' : '');
$smarty->assign ('umEmptyTrashOnExit', $status);
$status = ($prefs['save-to-sent'] ? ' checked' : '');
$smarty->assign ('umSaveSent', $status);
$status = ($prefs['add-sig'] ? ' checked' : '');
$smarty->assign ('umAddSignature', $status);
$status = ($prefs['display-images'] ? ' checked' : '');
$smarty->assign ('umDisplayImages', $status);
$smarty->assign ('umEditorMode', $prefs['editor-mode']);
$smarty->assign ('umRecordsPerPage', $sel_rpp);
$smarty->assign ('umTimeToRefresh', $sel_refreshtime);
$smarty->assign ('umSignature', $txtsignature);
$smarty->assign ('umTimezoneSelect', $tzselect);
$smarty->display ('neotech.net/preferences.htm');
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?