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

📄 timedelete.php

📁 网页打卡钟系统,源码提供给大家学习一下啦!希望给大家带来帮助
💻 PHP
📖 第 1 页 / 共 3 页
字号:
exit;}elseif ((!isset($_POST['delete_time_checkbox'])) && (isset($_POST['tmp_var']))) {// begin post validation //if ($_POST['tmp_var'] != '1') {echo "Something is fishy here.\n"; exit;}$tmp_calc = intval($calc);$tmp_timestamp = intval($timestamp);if ((strlen($tmp_calc) != "10") || (!is_integer($tmp_calc))) {echo "Something is fishy here.\n"; exit;}if ((strlen($tmp_timestamp) != "10") || (!is_integer($tmp_timestamp))) {echo "Something is fishy here.\n"; exit;}// end post validation //if (get_magic_quotes_gpc()) {$post_username = stripslashes($post_username);}$post_username = addslashes($post_username);$query = "select * from ".$db_prefix."info where (fullname = '".$post_username."') and ((timestamp < '".$calc."') and (timestamp >= '".$timestamp."'))           order by timestamp asc";$result = mysql_query($query);$username = array();$inout = array();$notes = array();$mysql_timestamp = array();while ($row=mysql_fetch_array($result)) {$time_set = '1';$username[] = "".$row['fullname']."";$inout[] = "".$row['inout']."";$notes[] = "".$row['notes']."";$mysql_timestamp[] = "".$row['timestamp']."";}$num_rows = mysql_num_rows($result);$post_username = stripslashes($post_username);echo "            <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr>\n";echo "                <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red>                    Please choose a time or times to delete.</td></tr>\n";echo "            </table>\n";echo "            <br />\n";echo "            <form name='form' action='$self' method='post'>\n";echo "            <table align=center class=table_border width=60% border=0 cellpadding=3 cellspacing=0>\n";echo "              <tr>\n";echo "                <th class=rightside_heading nowrap halign=left colspan=4><img src='../images/icons/clock_delete.png' />&nbsp;&nbsp;&nbsp;Delete                   Time for $post_username on $post_date</th></tr>\n";echo "              <tr><td height=15></td></tr>\n";echo "                <tr><td nowrap width=1% style='padding-right:5px;padding-left:5px;' class=column_headings>Delete ?</td>\n";echo "                  <td nowrap width=7% align=left class=column_headings>In/Out</td>\n";echo "                  <td nowrap style='padding-left:20px;' width=4% align=right class=column_headings>Time</td>\n";echo "                  <td style='padding-left:25px;' class=column_headings><u>Notes</u></td></tr>\n";for ($x=0;$x<$num_rows;$x++) {$row_color = ($row_count % 2) ? $color1 : $color2;$time[$x] = date("$timefmt", $mysql_timestamp[$x] + $tzo);$username[$x] = stripslashes($username[$x]);echo "              <tr class=display_row>\n";echo "                <td nowrap width=1% style='padding-right:5px;padding-left:0px;' align=center><input type='checkbox' name='delete_time_checkbox[$x]'                       value='1'></td>\n";echo "                <td nowrap align=left style='width:7%;padding-left:5px;background-color:$row_color;color:".$row["color"]."'>$inout[$x]</td>\n";echo "                <td nowrap align=right style='padding-left:20px;' width=4% bgcolor='$row_color'>$time[$x]</td>\n";echo "                <td style='padding-left:25px;' bgcolor='$row_color'>$notes[$x]</td>\n";echo "              </tr>\n";echo "              <input type='hidden' name='final_username[$x]' value=\"$username[$x]\">\n";echo "              <input type='hidden' name='final_inout[$x]' value=\"$inout[$x]\">\n";echo "              <input type='hidden' name='final_notes[$x]' value=\"$notes[$x]\">\n";echo "              <input type='hidden' name='final_mysql_timestamp[$x]' value=\"$mysql_timestamp[$x]\">\n";echo "              <input type='hidden' name='final_time[$x]' value=\"$time[$x]\">\n";$row_count++;}echo "              <tr><td height=15></td></tr>\n";$tmp_var = '1';echo "            <input type='hidden' name='tmp_var' value=\"$tmp_var\">\n";echo "            <input type='hidden' name='post_username' value=\"$post_username\">\n";echo "            <input type='hidden' name='post_displayname' value=\"$post_displayname\">\n";echo "            <input type='hidden' name='post_date' value=\"$post_date\">\n";echo "            <input type='hidden' name='num_rows' value=\"$num_rows\">\n";echo "            <input type='hidden' name='calc' value=\"$calc\">\n";echo "            <input type='hidden' name='timestamp' value=\"$timestamp\">\n";echo "            <input type='hidden' name='get_user' value=\"$get_user\">\n";echo "            <input type='hidden' name='tmp_var' value=\"$tmp_var\">\n";echo "            <input type='hidden' name='final_num_rows' value=\"$num_rows\">\n";echo "            <table align=center width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr><td height=40>&nbsp;</td></tr>\n";echo "              <tr><td width=30><input type='image' name='submit' value='Delete Time' align='middle'                      src='../images/buttons/next_button.png'></td><td><a href='timeadmin.php'><img src='../images/buttons/cancel_button.png'                      border='0'></td></tr></table></form></td></tr>\n";include '../footer.php';exit;} else {// configure timestamp to insert/update //if ($calendar_style == "euro") {//  $post_date = "$day/$month/$year";  @$post_date = "$month/$day/$year";}elseif ($calendar_style == "amer") {  @$post_date = "$month/$day/$year";}$row_count = '0';$timestamp = strtotime($post_date) - @$tzo;//$calc = $timestamp + 86400 - @$tzo;$calc = $timestamp + 86400;$post_username = stripslashes($post_username);$post_displayname = stripslashes($post_displayname);$post_username = addslashes($post_username);$post_displayname = addslashes($post_displayname);$query = "select * from ".$db_prefix."info where (fullname = '".$post_username."') and ((timestamp < '".$calc."') and (timestamp >= '".$timestamp."'))           order by timestamp asc";$result = mysql_query($query);$username = array();$inout = array();$notes = array();$mysql_timestamp = array();while ($row=mysql_fetch_array($result)) {$time_set = '1';$username[] = "".$row['fullname']."";$inout[] = "".$row['inout']."";$notes[] = "".$row['notes']."";$mysql_timestamp[] = "".$row['timestamp']."";}$num_rows = mysql_num_rows($result);}$post_username = stripslashes($post_username);$post_displayname = stripslashes($post_displayname);if (!isset($time_set)) { echo "            <form name='form' action='$self' method='post' onsubmit=\"return isDate()\">\n";echo "            <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr>\n";echo "                <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red>                    No time for was found in the system for $post_username on $post_date.</td></tr>\n";echo "            </table>\n";echo "            <br />\n";echo "            <table align=center class=table_border width=60% border=0 cellpadding=3 cellspacing=0>\n";echo "              <tr>\n";echo "                <th class=rightside_heading nowrap halign=left colspan=4><img src='../images/icons/clock_delete.png' />&nbsp;&nbsp;&nbsp;Delete Time                </th></tr>\n";echo "              <tr><td height=15></td></tr>\n";echo "                <input type='hidden' name='date_format' value='$js_datefmt'>\n";echo "              <tr><td class=table_rows height=25 style='padding-left:32px;' width=20% nowrap>Username:</td><td align=left class=table_rows                       colspan=2 width=80% style='padding-left:20px;'>                      <input type='hidden' name='post_username' value=\"$post_username\">$post_username</td></tr>\n";echo "              <tr><td class=table_rows height=25 style='padding-left:32px;' width=20% nowrap>Display Name:</td><td align=left class=table_rows                       colspan=2 width=80% style='padding-left:20px;'>                      <input type='hidden' name='post_displayname' value=\"$post_displayname\">$post_displayname</td></tr>\n";echo "              <tr><td class=table_rows height=25 style='padding-left:32px;' width=20% nowrap>Date: ($tmp_datefmt)</td><td colspan=2 width=80%                       style='color:red;font-family:Tahoma;font-size:10px;padding-left:20px;'><input type='text'                      size='10' maxlength='10' name='post_date' value='$post_date'>&nbsp;*&nbsp;&nbsp;&nbsp;<a href=\"#\"                      onclick=\"cal.select(document.forms['form'].post_date,'post_date_anchor','$js_datefmt');                      return false;\" name=\"post_date_anchor\" id=\"post_date_anchor\" style='font-size:11px;color:#27408b;'>Pick Date</a></td><tr>\n";echo "                <input type='hidden' name='get_user' value=\"$get_user\">\n";echo "              <tr><td class=table_rows align=right colspan=3 style='color:red;font-family:Tahoma;font-size:10px;'>*&nbsp;required&nbsp;</td></tr>\n";echo "            </table>\n";echo "            <div style=\"position:absolute;visibility:hidden;background-color:#ffffff;layer-background-color:#ffffff;\" id=\"mydiv\"                 height=200>&nbsp;</div>\n";echo "            <table align=center width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr><td height=40>&nbsp;</td></tr>\n";echo "              <tr><td width=30><input type='image' name='submit' value='Delete Time' align='middle'                      src='../images/buttons/next_button.png'></td><td><a href='timeadmin.php'><img src='../images/buttons/cancel_button.png'                      border='0'></td></tr></table></form></td></tr>\n";include '../footer.php';exit;}echo "            <form name='form' action='$self' method='post'>\n";echo "            <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr>\n";echo "                <td class=table_rows width=20 align=center><img src='../images/icons/time.png' /></td><td class=table_rows style='color:#3366CC;'>                    Please choose a time or times to delete.</td></tr>\n";echo "            </table>\n";echo "            <br />\n";echo "            <table align=center class=table_border width=60% border=0 cellpadding=3 cellspacing=0>\n";echo "              <tr>\n";// configure date to display correctly //if ($calendar_style == "euro") {  $post_date = "$day/$month/$year";}echo "                <th class=rightside_heading nowrap halign=left colspan=4><img src='../images/icons/clock_delete.png' />&nbsp;&nbsp;&nbsp;Delete                   Time for $post_username on $post_date</th></tr>\n";echo "              <tr><td height=15></td></tr>\n";if (isset($time_set)) {echo "                <tr><td nowrap width=1% style='padding-right:5px;padding-left:5px;' class=column_headings>Delete ?</td>\n";echo "                  <td nowrap width=7% align=left class=column_headings>In/Out</td>\n";echo "                  <td nowrap style='padding-left:20px;' width=4% align=right class=column_headings>Time</td>\n";echo "                  <td style='padding-left:25px;' class=column_headings><u>Notes</u></td></tr>\n";for ($x=0;$x<$num_rows;$x++) {$row_color = ($row_count % 2) ? $color1 : $color2;$time[$x] = date("$timefmt", $mysql_timestamp[$x] + $tzo);$username[$x] = stripslashes($username[$x]);echo "              <tr class=display_row>\n";echo "                <td nowrap width=1% style='padding-right:5px;padding-left:0px;' align=center><input type='checkbox' name='delete_time_checkbox[$x]'                       value='1'></td>\n";echo "                <td nowrap align=left style='width:7%;padding-left:5px;background-color:$row_color;color:".$row["color"]."'>$inout[$x]</td>\n";echo "                <td nowrap align=right style='padding-left:20px;' width=4% bgcolor='$row_color'>$time[$x]</td>\n";echo "                <td style='padding-left:25px;' bgcolor='$row_color'>$notes[$x]</td>\n";echo "              </tr>\n";echo "              <input type='hidden' name='final_username[$x]' value=\"$username[$x]\">\n";echo "              <input type='hidden' name='final_inout[$x]' value=\"$inout[$x]\">\n";echo "              <input type='hidden' name='final_notes[$x]' value=\"$notes[$x]\">\n";echo "              <input type='hidden' name='final_mysql_timestamp[$x]' value=\"$mysql_timestamp[$x]\">\n";echo "              <input type='hidden' name='final_time[$x]' value=\"$time[$x]\">\n";$row_count++;}echo "              <tr><td height=15></td></tr>\n";$tmp_var = '1';echo "            <input type='hidden' name='tmp_var' value=\"$tmp_var\">\n";echo "            <input type='hidden' name='post_username' value=\"$post_username\">\n";echo "            <input type='hidden' name='post_displayname' value=\"$post_displayname\">\n";echo "            <input type='hidden' name='post_date' value=\"$post_date\">\n";echo "            <input type='hidden' name='num_rows' value=\"$num_rows\">\n";echo "            <input type='hidden' name='calc' value=\"$calc\">\n";echo "            <input type='hidden' name='timestamp' value=\"$timestamp\">\n";echo "            <input type='hidden' name='get_user' value=\"$get_user\">\n";echo "            <input type='hidden' name='final_num_rows' value=\"$num_rows\">\n";echo "            <table align=center width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr><td height=40>&nbsp;</td></tr>\n";echo "              <tr><td width=30><input type='image' name='submit' value='Delete Time' align='middle'                      src='../images/buttons/next_button.png'></td><td><a href='timeadmin.php'><img src='../images/buttons/cancel_button.png'                      border='0'></td></tr></table></form></td></tr>\n";include '../footer.php'; exit;}}}?>

⌨️ 快捷键说明

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