Exemple #1
0
                if (strlen($mailVars['options']) < 1) {
                    $mailVars['options'] = 'none';
                }
                //send buddy email
                $mailSubject = str_replace($mailTags, $mailVars, $_SESSION['BUDDY_LIST_EMAILS_SUBJECT']);
                $mailBody = str_replace($mailTags, $mailVars, $_SESSION['BUDDY_LIST_EMAILS_BODY']);
                // Added by BenH 03/12/06 - we only want to send if we have users
                if ($my_users) {
                    foreach ($my_users as $d => $buddy_details) {
                        send_mail($_SESSION['BUDDY_LIST_EMAILS_FROM_NAME'], $_SESSION['BUDDY_LIST_EMAILS_FROM'], $buddy_details['firstname'] . ' ' . $buddy_details['lastname'], $buddy_details['email'], $mailSubject, $mailBody);
                    }
                }
            }
            // end if user has no buddies
            // Redirect to display page for user options (edit/delete).
            header('Location: ' . href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $add_event_id . '&origin=' . FILENAME_ADD_EVENT . '&' . 'date=' . $starting_date . '&' . make_hidden_fields_workstring() . '&page_info_message=' . urlencode($page_info_message), 'NONSSL'));
            wrap_exit();
        } else {
            $page_error_message = "We could not add your event. Please check your information and try again.";
        }
    }
    // end of if ($page_error_message == '')
    //add a BACK link for non admin users if there has been any kind of error.
    if ($page_error_message != '' && !$is_admin) {
        $page_error_message .= '<br><br><a href="javascript:history.go(-2);">Go back</a>';
    }
}
// end of if ($_POST['add_want'] != "" || $_POST['check_event'] != "")
$page_title = "Booking Calendar - Add Booking Event";
$page_title_bar = "Add Booking Event:";
include_once "header.php";
		class="BgcolorDull2" nowrap="nowrap"><b>Time Slot</b></td>
	<td class="BgcolorBright" align="center" valign="middle">
		<a href="<?php 
echo href_link(FILENAME_DAY_VIEW, 'date=' . PREVIOUS_DAY_DATE . '&print_view=1&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><img
		src="<?php 
echo DIR_WS_IMAGES;
?>
/prev.gif"
		alt="Previous Day" /></a><b><?php 
echo SELECTED_DATE_LONGSTR;
?>
</b><a
		href="<?php 
echo href_link(FILENAME_DAY_VIEW, 'date=' . NEXT_DAY_DATE . '&print_view=1&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
"><img
		src="<?php 
echo DIR_WS_IMAGES;
?>
/next.gif" alt="Next Day" /></a></td>
  </tr>


<?php 
$count = 0;
$width_length = 5;
$data_display_times = array();
$data_display_times = get_times_in_range(MIN_BOOKING_HOUR, MAX_BOOKING_HOUR, BOOKING_TIME_INTERVAL);
array_pop($data_display_times);
<?php

// set a variable that will be picked up by the user widget to say that it is the buy credits page, therefore
// the number of credits bought by the user may have changed
$buyCreditsPage = true;
include_once "./includes/application_top.php";
if (REQUIRE_AUTH_FOR_ADDING_FLAG) {
    if (!@wrap_session_is_registered('valid_user')) {
        header('Location: ' . href_link(FILENAME_LOGIN, 'origin=' . FILENAME_BUY_CREDITS . '&' . make_hidden_fields_workstring(), 'NONSSL'));
        wrap_exit();
    }
}
$page_title = 'Buy Credits';
$page_title_bar = "Buy Credits";
include_once "header.php";
// Show the number of credits the user has
echo "<p><strong>Booking credits remaining:</strong>&nbsp;" . $user_info['booking_credits'] . "&nbsp;credit";
if ($user_info['booking_credits'] != 1) {
    echo "s";
}
echo "</p>";
?>
<table width="550" border="0" cellpadding="2" cellspacing="4">
    <tr>
      <td width="530">NOTE: Once payment has been made via Paypal, your account will be updated automatically with the additional credits once you have received a confirmation email. <font color="red">Please note this can take up to 20 minutes.</font></td>
    </tr>
  </table>
<?php 
//Load the user info
$user_info = get_user(get_user_id($_SESSION['valid_user']));
// Check we have permissions to buy credits
Exemple #4
0
<a href="<?php 
    echo href_link(FILENAME_FORGOT_USERNAME, '', 'NONSSL');
    ?>
">Forgot Username?</a><br />
<a href="<?php 
    echo href_link(FILENAME_FORGOT_PASSWD, '', 'NONSSL');
    ?>
">Forgot Password?</a><br />
<a href="<?php 
    echo href_link(FILENAME_CHANGE_PASSWD, '', 'NONSSL');
    ?>
">Change Password</a><br />
<a href="<?php 
    echo href_link(FILENAME_UPDATE, '', 'NONSSL');
    ?>
">Update User Info</a><br />
-->
<a href="<?php 
    echo href_link(FILENAME_HELP, '', 'NONSSL');
    ?>
">User Help</a>
	</span></td>
  </tr>
</table>

<?php 
}
// end allow additions
?>

Exemple #5
0
        ?>
-<?php 
        echo $end_time;
        ?>
</a>&nbsp; - 
		Subject: <?php 
        echo $this_event['subject'];
        ?>
</span></td>
<?php 
    } elseif ($event_row_data[$display_time] == '0') {
        // This is where the cell is already taken from the prev row.
    } else {
        ?>
		<td align="right" rowspan="1" class="BgcolorNormal"><span 
		class="FontSoftSmall"><a href="<?php 
        echo href_link(FILENAME_ADD_EVENT, 'start_time=' . $std_time_str . '&' . make_hidden_fields_workstring(array('date', 'view', 'loc')), 'NONSSL');
        ?>
">(+)</a></span></td>
<?php 
    }
    // end of if/elseif/else
    ?>
  </tr>
<?php 
}
// end of foreach
?>
</table>

Exemple #6
0
		<tr>
<?php 
    }
    if (SELECTED_DATE_MONTH == $i) {
        ?>
		<td align="center" valign="middle" class="BgcolorDull"><span class="FontSoftSmall"><b><?php 
        echo $mon_str;
        ?>
</b></span></td>
<?php 
    } else {
        $date = SELECTED_DATE_YEAR . '-' . sprintf("%02d", $i) . '-' . SELECTED_DATE_DAY;
        ?>
		<td align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall"><a 
			href="<?php 
        echo href_link(NAV_SCRIPT_NAME, 'date=' . $date . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
        ?>
"><?php 
        echo $mon_str;
        ?>
</a></span></td>
<?php 
    }
    if ($i % $cols == 0) {
        ?>
		</tr>
<?php 
    }
}
// end of for loop
if (12 % $cols != 0) {
/**
 * Create a sort heading with appropriate sort link
 *
 * @param string $key The key used for sorting
 * @param string $heading The heading to use the link on
 * @access public
 */
function create_sort_heading($key, $heading)
{
    global $Language;
    $current = false;
    $direction = false;
    if (!isset($_GET['sort'])) {
        $current = 'name';
    } elseif ($_GET['sort'] == $key || $_GET['sort'] == $key . '|d') {
        $current = $key;
    }
    if ($key == $current) {
        if (isset($_GET['sort'])) {
            $direction = $_GET['sort'] == $key ? '+' : '-';
        } else {
            $direction = '+';
        }
    }
    return link_object(href_link(basename($_SERVER['SCRIPT_FILENAME']), get_all_get_params(array('page', 'sort')) . '&sort=' . $key . ($direction == '+' ? '|d' : '')), $heading . ($key == $current ? $direction : ''), 'title="' . (isset($_GET['sort']) && $_GET['sort'] == $key ? sprintf($Language->get('listing_sort_ascendingly'), $heading) : sprintf($Language->get('listing_sort_descendingly'), $heading)) . '" class="productListing-heading"');
}
Exemple #8
0
<a href="<?php 
echo href_link(FILENAME_LOGIN, '', 'NONSSL');
?>
">User Login</a><br />
<a href="<?php 
echo href_link(FILENAME_LOGOUT, '', 'NONSSL');
?>
">User Logout</a><br />
<br />
<a href="<?php 
echo href_link(FILENAME_FORGOT_USERNAME, '', 'NONSSL');
?>
">Forgot Username?</a><br />
<a href="<?php 
echo href_link(FILENAME_FORGOT_PASSWD, '', 'NONSSL');
?>
">Forgot Password?</a><br />
<a href="<?php 
echo href_link(FILENAME_CHANGE_PASSWD, '', 'NONSSL');
?>
">Change Password</a><br />
<a href="<?php 
echo href_link(FILENAME_UPDATE, '', 'NONSSL');
?>
">Update User Info</a><br />

</p>

<?php 
include_once "footer.php";
include_once "application_bottom.php";
		<tr>
<?php 
    }
    if (SELECTED_DATE_MONTH == $i) {
        ?>
		<td align="center" valign="middle" class="BgcolorDull"><span class="FontSoftSmall"><b><?php 
        echo $mon_str;
        ?>
</b></span></td>
<?php 
    } else {
        $date = SELECTED_DATE_YEAR . '-' . sprintf("%02d", $i) . '-' . SELECTED_DATE_DAY;
        ?>
		<td align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall"><a 
			href="<?php 
        echo href_link(FILENAME_MONTH_VIEW, 'date=' . $date . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
        ?>
"><?php 
        echo $mon_str;
        ?>
</a></span></td>
<?php 
    }
    if ($i % $cols == 0) {
        ?>
		</tr>
<?php 
    }
}
// end of for loop
if (12 % $cols != 0) {
<?php 
} else {
    ?>
<table cellspacing="1" cellpadding="1" width="100%" border="0">
  <tr>
	<td nowrap="nowrap" align="center" valign="middle" class="BgcolorDull2">
	<img src="<?php 
    echo DIR_WS_IMAGES;
    ?>
/spacer.gif" width="15" height="15" />
	Add New Event: 
	<img src="<?php 
    echo DIR_WS_IMAGES;
    ?>
/spacer.gif" width="15" height="15" />
	</td>
  </tr>
</table>

<table cellspacing="1" cellpadding="1" width="100%" border="0">
  <tr>
	<td nowrap="nowrap" align="center" valign="middle" class="BgcolorNormal"><a href="<?php 
    echo href_link(FILENAME_WEEK_VIEW, 'view=week&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
    ?>
">Select date from calendar</a></td>
  </tr>
</table>
</form>
<?php 
}
Exemple #11
0
<?php

include_once "./includes/application_top.php";
if (!@wrap_session_is_registered('valid_user')) {
    header('Location: ' . href_link(FILENAME_LOGIN, 'origin=' . FILENAME_UPDATE, 'NONSSL'));
    wrap_exit();
}
$page_title = "Update User Information";
$page_error_message = '';
$update_result = false;
// default
if ($_POST['update'] == "") {
    $user_info_fields = get_user_information($_SESSION['valid_user']);
    if (!(count($user_info_fields) > 0)) {
        $page_error_message = "Your user information could not be found! Please try again. " . $_SESSION['valid_user'] . "";
        $update_result = false;
    } else {
        // Set the $_POST variable for the Form fields below.
        foreach (array_keys($user_info_fields) as $key) {
            $_POST[$key] = addslashes($user_info_fields[$key]);
        }
    }
} else {
    if ($_POST['update'] != "") {
        // Update Form Submit
        if ($_POST['username'] == "" || $_POST['email'] == "") {
            // check forms filled in - required fields
            $page_title = "Problem Updating User Information!";
            $page_error_message = "You have not filled the form out correctly. " . "Please make sure to fill out all required fields.";
        } elseif (!validate_email($_POST['email'])) {
            // email address not valid
Exemple #12
0
			onmouseout="nd();"><?php 
            echo $start_time;
            ?>
-<?php 
            echo $end_time;
            ?>
</a>&nbsp;</span></td>
<?php 
        } elseif ($event_row_data[$display_time][$week_date] == '0') {
            // This is where the cell is already taken from the prev row.
        } else {
            //generate the link to be used for making/preventing bookings. Store for possible re-use later in this table row:
            $make_booking_link = '';
            list($year, $month, $day) = explode("-", $week_date);
            if (wrap_session_is_registered("admin_user") || mktime($hour, $min, $sec, $month, $day, $year) < $booking_limited_time) {
                $make_booking_link = href_link(FILENAME_ADD_EVENT, 'date=' . $week_date . '&start_time=' . $std_time_str . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
            } else {
                $make_booking_link = '#" onclick="return outsideBookingLimit();"';
            }
            ?>
			<td align="right" rowspan="1" class="BgcolorNormal" width="14%"><span
			class="FontSoftSmall"><a href="<?php 
            echo $make_booking_link;
            ?>
">(+)</a></span></td>
<?php 
        }
        // end of if/elseif/else
    }
    // end of foreach $week_date
    ?>
echo DIR_WS_IMAGES;
?>
/spacer.gif" width="15" height="15" />
      </td>
  </tr>
</table>

<table cellspacing="1" cellpadding="1" width="100%" border="0">
  <tr>
	<td nowrap="nowrap" align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall">
<?php 
reset($location_display);
while (list($location_id, $location_display_name) = each($location_display)) {
    ?>
		<a href="<?php 
    echo href_link(NAV_SCRIPT_NAME, 'loc=' . $location_id . '&' . make_hidden_fields_workstring(array('date', 'view')), 'NONSSL');
    ?>
" 
		<?php 
    echo $_REQUEST['loc'] == $location_id ? $highlight_style : '';
    ?>
><b><?php 
    echo $location_display[$location_id];
    ?>
</b></a><br />
<?php 
}
?>
	</span></td>
  </tr>
</table>
		<a href="<?php 
echo href_link(FILENAME_DAY_VIEW, 'view=day&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
" 
		<?php 
echo NAV_SCRIPT_NAME == FILENAME_DAY_VIEW ? $highlight_style : '';
?>
><b>Day</b></a>
&nbsp;
		<a href="<?php 
echo href_link(FILENAME_WEEK_VIEW, 'view=week&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
" 
		<?php 
echo NAV_SCRIPT_NAME == FILENAME_WEEK_VIEW ? $highlight_style : '';
?>
><b>Week</b></a>
&nbsp;
		<a href="<?php 
echo href_link(FILENAME_MONTH_VIEW, 'view=month&' . make_hidden_fields_workstring(array('date', 'loc')), 'NONSSL');
?>
" 
		<?php 
echo NAV_SCRIPT_NAME == FILENAME_MONTH_VIEW ? $highlight_style : '';
?>
><b>Month</b></a>
	</span></td>
  </tr>
</table>

Exemple #15
0
                    if (DEFINE_AM_PM) {
                        $start_time = format_time_to_ampm($start_time);
                        $end_time = format_time_to_ampm($end_time);
                    }
                    // Use the $db_row_id to data seek to the data for this event.
                    $rv = wrap_db_data_seek($event_data, $db_row_id);
                    $this_event = wrap_db_fetch_array($event_data);
                    //is this user allowed to see the booking details?
                    if (!$_SESSION['SHOW_USER_DETAILS'] && $this_event['user_id'] != $currentUsersID) {
                        //user not allowed to see these details, overwrite the subject string
                        $this_event['subject'] = 'Booking Confirmed';
                    } else {
                        //add the booking option data into the event array
                        $this_event['booking_options'] = get_booking_options($this_event['event_id']);
                    }
                    $event_url = href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $this_event['event_id'] . '&' . make_hidden_fields_workstring(array('date', 'view', 'loc')), 'NONSSL');
                    $over_text = 'Event ID#: ' . $this_event['event_id'] . '<br />Subject: ' . $this_event['subject'];
                    $numBookingOptions = count($this_event['booking_options']);
                    if ($numBookingOptions > 0) {
                        $over_text .= '<br />Options: ';
                        for ($o = 0; $o < $numBookingOptions; $o++) {
                            //handle commas to separate the list
                            if ($o != 0) {
                                $over_text .= ', ';
                            }
                            $over_text .= htmlspecialchars(stripslashes($this_event['booking_options'][$o]['desc']));
                        }
                    }
                    ?>
					<span class="FontSoftSmall">&nbsp;<a href="<?php 
                    echo $event_url;
Exemple #16
0
<?php

include_once "./includes/application_top.php";
if (!@wrap_session_is_registered('valid_user')) {
    header('Location: ' . href_link(FILENAME_LOGIN, 'origin=' . FILENAME_CHANGE_PASSWD, 'NONSSL'));
    wrap_exit();
}
$page_title = "Booking Calendar - Change Password";
$page_title_bar = "Change Password?";
$page_error_message = '';
$password_changed = false;
if ($_POST['change_password'] != "") {
    // Change Passwd Form Submit
    if ($_POST['old_passwd'] == "" || $_POST['new_passwd'] == "" || $_POST['new_passwd2'] == "" || $_POST['email'] == "") {
        $page_title = "Password Change Problem";
        $page_error_message = "You have not filled out the form completely. Please try again.";
    } elseif (!wrap_validate_email($_POST['email'])) {
        // email address not valid
        $page_title = "Password Change Problem";
        $page_error_message = "Your email address is not valid. Please try again.";
    } elseif ($_POST['new_passwd'] != $_POST['new_passwd2']) {
        // passwords not the same
        $page_title = "Password Change Problem";
        $page_error_message = "The passwords you entered do not match. Please try again.";
        $_POST['passwd2'] = '';
    } elseif (strlen($_POST['new_passwd']) < 6 || strlen($_POST['new_passwd']) > 16) {
        // check new password length
        $page_title = "Password Change Problem";
        $page_error_message = "New password must be between 6 and 16 characters. Please try again.";
    }
    if ($page_error_message == '') {
Exemple #17
0
$old_user = isset($_SESSION['valid_user']) ? $_SESSION['valid_user'] : '';
// store to test if they *were* logged in
$result_unreg = wrap_session_unregister("valid_user");
$result_dest = wrap_session_destroy();
if (!empty($old_user)) {
    if ($result_unreg && $result_dest) {
        // if they were logged in and are now logged out
        $page_info_message = "You are now logged out.";
        $logged_out = true;
    } else {
        // they were logged in and could not be logged out
        $page_info_message = "Error: Sorry, you could not log you out! Please try again.";
        $logged_out = false;
    }
} else {
    // if they weren't logged in but came to this page somehow
    $page_info_message = "You were not logged in, so you have not been logged out.";
    $logged_out = true;
}
$page_title = "Booking Calendar - User Logout";
$page_title_bar = "User Logout:";
include_once "header.php";
echo '<p align="center">';
if ($logged_out) {
    echo '<a href="' . href_link(FILENAME_LOGIN, '', 'NONSSL') . '">User Login</a>';
} else {
    echo '<a href="' . href_link(FILENAME_LOGOUT, '', 'NONSSL') . '">User Logout</a>';
}
echo '</p>';
include_once "footer.php";
include_once "application_bottom.php";
Exemple #18
0
        }
        if ($display_delete_trigger) {
            ?>
| <a href="<?php 
            echo href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $event['event_id'] . '&action=delete_event&' . make_hidden_fields_workstring(), 'NONSSL');
            ?>
" onClick="return confirm('Are you sure you want to delete this entire event?');"><strong>Delete Event</strong></a>
<?php 
            if (wrap_session_is_registered("admin_user")) {
                ?>
| <a href="<?php 
                echo href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $event['event_id'] . '&action=delete&' . make_hidden_fields_workstring(), 'NONSSL');
                ?>
"><strong>Delete Time Slots</strong></a>
| <a href="<?php 
                echo href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $event['event_id'] . '&print_view=1&action=view&' . make_hidden_fields_workstring(), 'NONSSL');
                ?>
" target="_blank"><strong>Print Ticket</strong></a>

<?php 
            }
        }
        ?>
</span></td></tr>
<?php 
    }
    ?>
</table>

<?php 
    if ($_REQUEST['action'] == 'modify') {
Exemple #19
0
        ?>
<a href="<?php 
        echo FILENAME_REGISTER;
        ?>
">Not a user? Register Today!</a><?php 
    }
    ?>
</p>
</td></tr>
</table>
</form>
</p>
<?php 
} else {
    ?>
<p align="center">
<table border="0" align="center" cellpadding="2" cellspacing="0">
<tr><td align="right">
You are curently logged in.
<a href="<?php 
    echo href_link(FILENAME_LOGOUT, '', 'NONSSL');
    ?>
">User Logout</a>
</td></tr>
</table>
</p>

<?php 
}
include_once "footer.php";
include_once "application_bottom.php";
Exemple #20
0
            }
        } else {
            $available_date_time_data = $scheduled_date_time_data;
        }
    }
    // IF ALL IS WELL WITH THE SCHEDULE DATA AVAILABILITY - ADD EVENT DATA
    echo "valid user: "******"<br />user_id: " . get_user_id($_SESSION['valid_user']) . "<br />";
    if ($page_error_message == '' && !empty($_POST['add_event'])) {
        // Attempt to Add the Event to the Database
        $add_event_id = add_event($_SESSION['valid_user'], $scheduled_date_time_data, $_REQUEST['subject'], $_REQUEST['location'], $starting_date . ' ' . $_REQUEST['start_time'], $ending_date . ' ' . $_REQUEST['end_time'], $_REQUEST['recur_interval'], $_REQUEST['recur_freq'], $recur_date, $_REQUEST['desc']);
        echo "<pre>";
        var_dump($_SESSION['valid_user'], $scheduled_date_time_data, $_REQUEST['subject'], $_REQUEST['location'], $starting_date . ' ' . $_REQUEST['start_time'], $ending_date . ' ' . $_REQUEST['end_time'], $_REQUEST['recur_interval'], $_REQUEST['recur_freq'], $recur_date, $_REQUEST['desc']);
        echo "</pre>";
        if (!empty($add_event_id)) {
            // Redirect to display page for user options (edit/delete).
            header('Location: ' . href_link(FILENAME_DETAILS_VIEW, 'event_id=' . $add_event_id . '&origin=' . FILENAME_ADD_EVENT . '&' . make_hidden_fields_workstring() . '&page_info_message=' . urlencode("Event added successfully!"), 'NONSSL'));
            wrap_exit();
        } else {
            $page_error_message = "We could not add your event. Please check your information and try again.";
        }
    }
    // end of if ($page_error_message == '')
}
// end of if ($_POST['add_want'] != "" || $_POST['check_event'] != "")
$page_title = "Booking Calendar - Add Booking Event";
$page_title_bar = "Add Booking Event:";
include_once "header.php";
// Define some arrays for the Input Form below.
// Valid booking times in 24 hour format; includes max and min hours.
$valid_booking_times = get_times_in_range(MIN_BOOKING_HOUR, MAX_BOOKING_HOUR, BOOKING_TIME_INTERVAL, true);
// display the form, new want or problem