예제 #1
0
//$tblEvent->addAjaxFilterBox("fldFirstName");
//$tblEvent->addAjaxFilterBox("fldLastName");
//$tblEvent->addAjaxFilterBox("fldAttending");
$today = date("Y-m-d");
if (!$viewPastEvents) {
    #Add Where clause - only show future events
    $tblEvent->addWhereClause("WHERE (fldDate >= \"{$today}\") OR fldDate = \"0000-00-00\"");
    $signupText = "Sign up for Event";
    $tblEvent->setFileUpload("fldImage", "uploads/", "uploads/");
} else {
    #Add Where clause - only show past events
    $tblEvent->addWhereClause("WHERE (fldDate < \"{$today}\") AND fldDate != \"0000-00-00\"");
    $signupText = "View Who Signed Up";
    $tblEvent->turnOffAjaxEditing();
}
$tblEvent->addButtonToRow($signupText, "index.php");
$tblEvent->setTextareaHeight("fldAdditionalInformation", 70);
#set the number of rows to display (per page)
//$tblEvent->setLimit(25);
$tblEvent->setAddPlaceholderText("fldDate", "YYYY-mm-dd");
$tblEvent->setAddPlaceholderText("fldTime", "7:00pm");
$tblEvent->setAddFieldNote("fldDate", "Make sure to enter in format <b>YYYY-mm-dd</b>.");
$tblEvent->setAddFieldNote("fldImage", "If you want to add an image to the event (optional).");
$tblEvent->setAddFieldNote("fldType", "Public means anyone can come; Private means you want this event to be exclusive.");
//$tblEvent->addButtonToRowWindowOpen = "same"; //this is default behavior so i have it commented out
$tblEvent->formatFieldWithFunction("fldDate", "highlightDate");
$tblEvent->formatFieldWithFunction("fldImage", "showImage");
$tblEvent->modifyFieldWithClass("fldDate", "datepicker");
$tblEvent->showTable();
include 'footer.php';
function highlightDate($date)