📄 sysedit.php
字号:
<?phpsession_start();$self = $_SERVER['PHP_SELF'];$request = $_SERVER['REQUEST_METHOD'];include '../config.inc.php';if ($request == 'GET') {include 'header_get_sysedit.php'; include 'topmain.php';}echo "<title>$title - Edit System Settings</title>\n";$filename = '../config.inc.php';$row_count = '0';$row_color = ($row_count % 2) ? $color2 : $color1;if (!isset($_SESSION['valid_user'])) {echo "<table width=100% border=0 cellpadding=7 cellspacing=1>\n";echo " <tr class=right_main_text><td height=10 align=center valign=top scope=row class=title_underline>PHP Timeclock Administration</td></tr>\n";echo " <tr class=right_main_text>\n";echo " <td align=center valign=top scope=row>\n";echo " <table width=200 border=0 cellpadding=5 cellspacing=0>\n";echo " <tr class=right_main_text><td align=center>You are not presently logged in, or do not have permission to view this page.</td></tr>\n";echo " <tr class=right_main_text><td align=center>Click <a class=admin_headings href='../login.php'><u>here</u></a> to login.</td></tr>\n";echo " </table><br /></td></tr></table>\n"; exit;}if (!file_exists($filename)) {echo " <table align=center width=100% border=0 cellpadding=0 cellspacing=0>\n";echo " <tr>\n";echo " <td height=25 class=table_rows_red>config.inc.php does not exist!</td></tr>\n";echo " <td height=25 class=table_rows_red>It has either been deleted, renamed, moved, or was never installed.</td></tr>\n";echo " </table></td></tr>\n";include '../footer.php';exit;}if (!is_readable($filename)) {echo " <table align=center width=100% border=0 cellpadding=0 cellspacing=0>\n";echo " <tr>\n";echo " <td class=table_rows_red>config.inc.php is not readable by your webserver user!</td></tr>\n";echo " <tr><td height=25 class=table_rows_red>Change the permissions accordingly on config.inc.php for this user, or assign this file to another owner, preferably your webserver user.</td></tr>\n";if(PHP_OS != 'WIN32') {$user = posix_getpwuid(fileowner($filename));$group = posix_getgrgid(filegroup($filename));echo " <tr><td height=25 class=table_rows_red> Current owner of config.inc.php is ";echo $user["name"];echo ".";echo $group["name"];echo " (user.group).</td></tr>\n";}echo " </table></td></tr>\n";include '../footer.php';}if ($request == 'GET') {echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td class=left_main width=180 align=left scope=col>\n";echo " <form name='form' action='$self' method='post'>\n";echo " <table class=hide width=100% border=0 cellpadding=1 cellspacing=0>\n";echo " <tr><td class=left_rows height=11></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle>Users</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/user.png' alt='User Summary' /> <a class=admin_headings href='useradmin.php'>User Summary</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/user_add.png' alt='Create New User' /> <a class=admin_headings href='usercreate.php'>Create New User</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/magnifier.png' alt='User Search' /> <a class=admin_headings href='usersearch.php'>User Search</a></td></tr>\n";echo " <tr><td class=left_rows height=33></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle>Offices</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/brick.png' alt='Office Summary' /> <a class=admin_headings href='officeadmin.php'>Office Summary</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/brick_add.png' alt='Create New Office' /> <a class=admin_headings href='officecreate.php'>Create New Office</a></td></tr>\n";echo " <tr><td class=left_rows height=33></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle>Groups</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/group.png' alt='Group Summary' /> <a class=admin_headings href='groupadmin.php'>Group Summary</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/group_add.png' alt='Create New Group' /> <a class=admin_headings href='groupcreate.php'>Create New Group</a></td></tr>\n";echo " <tr><td class=left_rows height=33></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle colspan=2>In/Out Status</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/application.png' alt='Status Summary' /> <a class=admin_headings href='statusadmin.php'>Status Summary</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/application_add.png' alt='Create Status' /> <a class=admin_headings href='statuscreate.php'>Create Status</a></td></tr>\n";echo " <tr><td class=left_rows height=33></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle colspan=2>Miscellaneous</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/clock.png' alt='Add/Edit/Delete Time' /> <a class=admin_headings href='timeadmin.php'>Add/Edit/Delete Time</a></td></tr>\n";echo " <tr><td class=current_left_rows height=18 align=left valign=middle><img src='../images/icons/application_edit.png' alt='Edit System Settings' /> <a class=admin_headings href='sysedit.php'>Edit System Settings</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/database_go.png' alt='Upgrade Database' /> <a class=admin_headings href='dbupgrade.php'>Upgrade Database</a></td></tr>\n";echo " </table></td>\n";echo " <td align=left class=right_main scope=col>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";if ($disable_sysedit == "yes") {echo " <table width=100% border=0 cellpadding=0 cellspacing=0>\n";echo " <tr><td height=25 class=table_rows_red>This page has been <b>disabled</b> within config.inc.php.</td></tr>";echo " </table></td></tr>\n";include '../footer.php';exit;}if (!is_writable($filename)) {if(PHP_OS != 'WIN32') {$user = posix_getpwuid(fileowner($filename));$group = posix_getgrgid(filegroup($filename));$process_user = posix_getpwuid(posix_getuid());$process_group = posix_getgrgid(posix_getgid());echo " <table width=100% border=0 cellpadding=0 cellspacing=0>\n";echo " <tr><td height=25 class=table_rows_red>The PHP Timeclock config file, config.inc.php, <b><i>is not writable</i></b> by your webserver user: ";echo "<b>";echo $process_user['name'];echo "</b>.<b>";echo $process_group['name'];echo "</b> (user.group).</td></tr>\n";echo " <tr><td height=25 class=table_rows_red>To edit the System Settings within PHP Timeclock, either change the permissions on config.inc.php for this user, or assign this file to another owner, preferably your webserver user.</td></tr>\n";echo " <tr><td height=25 class=table_rows_red> Current owner of config.inc.php is <b>";echo $user["name"];echo "</b>.<b>";echo $group["name"];echo "</b> (user.group).</td></tr>\n";echo " </table></td></tr>\n";include '../footer.php';exit;} else {echo " <table width=100% border=0 cellpadding=0 cellspacing=0>\n";echo " <tr><td height=25 class=table_rows_red>The PHP Timeclock config file, config.inc.php, <b><i>is not writable</i></b> by your webserver user!</td></tr>\n";echo " <tr><td height=25 class=table_rows_red>To edit the System Settings within PHP Timeclock, either change the permissions on config.inc.php for this user, or assign this file to another owner, preferably your webserver user.</td></tr>\n";echo " </table></td></tr>\n";include '../footer.php';exit;}}// begin double-checking of some of the settings in config.inc.php //if ($refresh != "none") { $tmp_refresh = intval($refresh); if (!empty($tmp_refresh)) { $refresh = $tmp_refresh; }}if (strlen($color1) > 7) {echo " <table align=center class=table_border width=100% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr><td width=20 align=center height=25 class=table_rows><img src='../images/icons/cancel.png' /></td> <td class=table_rows_red height=25><b>color1</b> is not a valid color.</td></tr>\n";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -