Exemple #1
0
$tblEventAttendee->setTextareaHeight("fldComments", 70);
//comment field should be a bit wider height
#set the number of rows to display (per page)
$tblEventAttendee->setLimit(25);
//after 25 people, the resultset will paginate
$tblEventAttendee->setAddPlaceholderText("fldTimeArriving", $fldTime);
$tblEventAttendee->setAddFieldNote("fldTimeArriving", "Leave blank if you'll be on time.");
$tblEventAttendee->setAddFieldNote("fldWillBeLate", "If you will be arriving late, please enter the time in the next box.");
$tblEventAttendee->modifyFieldWithClass("fldTimeArriving", "time");
$tblEventAttendee->modifyFieldWithClass("fldLastName", "required");
$tblEventAttendee->modifyFieldWithClass("fldFirstName", "required");
$tblEventAttendee->formatFieldWithFunction("fldWillBeLate", "displayWillBeLate");
$tblEventAttendee->formatFieldWithFunctionAdvanced("fldTimeArriving", "displayArrivalTime");
$tblEventAttendee->emptyTableMessage = "No one has signed up yet! Press the '<b>Add Person</b>' button below to sign up for this event.";
$tblEventAttendee->addMessage = "You have been added to this event.";
$tblEventAttendee->setCSSFile("cuscosky.css");
//i liked this table feel; but any css can be used from http://icant.co.uk/csstablegallery
#implement a callback function on signing up to create cookie
$tblEventAttendee->onAddExecuteCallBackFunction("onAddCallBackFunction");
//if event expired, do not allow people to sign up for it or change who had attended
if ($eventExpired) {
    $tblEventAttendee->disallowAdd();
    $tblEventAttendee->disallowDelete();
    $tblEventAttendee->turnOffAjaxEditing();
    $tblEventAttendee->omitFieldCompletely("fldWillBeLate");
    $tblEventAttendee->omitFieldCompletely("fldTimeArriving");
}
//this needs to be very low in the excution path to ensure the obj is loaded correctly with every other piece of logic
//typically doAction is called within the showTable() method, but i do not want to do that because i modify headers with my onAdd callback function
if (isset($_REQUEST['action']) && $_REQUEST['action'] != '') {
    $tblEventAttendee->doAction($_REQUEST['action']);
Exemple #2
0
<?php

require_once '../../preheader.php';
$page_title = "Create an Event";
#the code for the class
include '../../ajaxCRUD.class.php';
#Create an instance of the class
$tblEvent = new ajaxCRUD("Event", "tblEvent", "pkEventID", "../");
$tblEvent->setCSSFile("cuscosky.css");
$viewPastEvents = FALSE;
if ($_REQUEST['eventFilter'] == 'pastEvents') {
    $viewPastEvents = TRUE;
}
?>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<?php 
$tblEvent->insertHeader();
?>

		<!-- these js/css includes are ONLY to make the calendar widget work
			 these includes are not necessary for the class to work!! -->
		<link rel="stylesheet" href="../includes/jquery.ui.all.css">
		<script src="../includes/jquery.ui.core.js"></script>
		<script src="../includes/jquery.ui.datepicker.js"></script>
	</head>

<?php