Pro PHP and jQuery by Jason Lengstorf & Keith Wald
Author:Jason Lengstorf & Keith Wald
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
Start Time: 2016-01-22 17:00:00
End Time: 2016-01-22 19:00:00
Description: Five-course meal with wine pairings at John’s house
After clicking the “Create new event” button, the calendar is updated with the new event, as shown in Figure 5-3.
Figure 5-3.The new event as it appears when hovered over
Adding a Button to the Main View to Create New Events
To make it easier for your authorized users to create new events, add a button to the calendar that takes the user to the form in admin.php. Do this by creating a new private method called _adminGeneralOptions() in the Calendar class:
<?php
declare(strict_types=1);
class Calendar extends DB_Connect
{
private $_useDate;
private $_m;
private $_y;
private $_daysInMonth;
private $_startDay;
public function __construct($dbo=NULL, $useDate=NULL) {...}
public function buildCalendar() {...}
public function displayEvent($id) {...}
public function displayForm() {...}
public function processForm() {...}
private function _loadEventData($id=NULL) {...}
private function _createEventObj() {...}
private function _loadEventById($id) {...}
/**
* Generates markup to display administrative links
*
* @return string markup to display the administrative links
*/
private function _adminGeneralOptions()
{
/*
* Display admin controls
*/
return <<<ADMIN_OPTIONS
<a href="admin.php" class="admin">+ Add a New Event</a>
ADMIN_OPTIONS;
}
}
?>
Note
Checks to ensure that this button is only displayed to authorized users will be added Chapter 6.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8299)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7780)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6847)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6582)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6453)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6416)
Kotlin in Action by Dmitry Jemerov(5065)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4317)
Functional Programming in JavaScript by Mantyla Dan(4038)
Solidity Programming Essentials by Ritesh Modi(4009)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3801)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3745)
The Ultimate iOS Interview Playbook by Avi Tsadok(3719)
