Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 1.1.3.0
- * @ Author : DeZender
- * @ Release on : 17.05.2011
- * @ Official site : http://DeZender.Net
- *
- */
- session_name( 'bowlsession' );
- session_start( );
- if (!isset( $sess_project_inc )) {
- header( 'Location: index.php' );
- exit( );
- }
- require( $sess_project_inc );
- if (( $sess_access_level < 1 || 9 < $sess_access_level )) {
- header( 'Location: index.php' );
- exit( );
- }
- ( $conn_id = db_connect( ) || header( 'Location: index.php' ) );
- $msg = $rs_booking;
- $error = 0;
- if (( $mode == 'back' && !$error )) {
- list( $year, $month, $day ) = split( '([^0-9])', $sess_datestr, 3 );
- $place_no = $sess_place_no;
- $details = $sess_details;
- $mode = 'change';
- }
- if (( $mode == 'change' && !$error )) {
- if (!checkdate( $month, $day, $year )) {
- $error = 2;
- $errormsg = $rs_incorrect_date;
- }
- if (!$error) {
- $current_date_int = mktime( '0', '0', '0', date( 'm' ), date( 'd' ), date( 'Y' ) );
- $selected_date_int = mktime( '0', '0', '0', $month, $day + 1, $year );
- if ($selected_date_int < $current_date_int) {
- if ($sess_access_level == 1) {
- $in_the_past = 1;
- } else {
- $error = 2;
- $errormsg = $rs_date_in_the_past;
- }
- }
- }
- }
- if (( $mode == 'save' && !$error )) {
- for ($c = 1; $c <= $colcount; ++$c) {
- $started = 0;
- for ($r = 1; $r <= $rowcount; ++$r) {
- $checkboxname = $c . '-' . $r;
- if ($$checkboxname) {
- if (!$started) {
- $started = 1;
- $course = $c;
- list( $hour, $min, $dummy1, $dummy2 ) = split( '([^0-9])', $$checkboxname, 4 );
- $starttime = $hour . ':' . $min . ':00';
- $starttime_in_minutes = $hour * 60 + $min;
- if ($starttime_in_minutes < $place_open_in_minutes) {
- $starttime_in_minutes = $starttime_in_minutes + 1440;
- }
- }
- } else {
- if ($started) {
- $started = 0;
- if ($endtime_in_minutes < $starttime_in_minutes) {
- $endtime_in_minutes = $endtime_in_minutes + 1440;
- }
- $booking_array[] = array( $course, $starttime, $starttime_in_minutes, $endtime, $endtime_in_minutes );
- }
- }
- list( $dummy1, $dummy2, $hour, $min ) = split( '([^0-9])', $$checkboxname, 4 );
- $endtime = $hour . ':' . $min . ':00';
- $endtime_in_minutes = $hour * 60 + $min;
- if (( $r == $rowcount && $started )) {
- if ($endtime_in_minutes < $starttime_in_minutes) {
- $endtime_in_minutes = $endtime_in_minutes + 1440;
- }
- $booking_array[] = array( $course, $starttime, $starttime_in_minutes, $endtime, $endtime_in_minutes );
- continue;
- }
- }
- }
- .........................................................
- ...................................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement