/** * function getHTML * <pre> * This method returns the HTML data generated by this object. * </pre> * @return [STRING] HTML Display data. */ function getHTML() { // Uncomment the following line if you want to create a template // tailored for this page: $path = $this->pathModuleRoot . 'templates/'; // Otherwise use the standard Templates for the site: //$path = SITE_PATH_TEMPLATES; /* * Update any label tags ... */ // example: // $name = $user->getName(); // $this->labels->setLabelTag( '[Title]', '[userName]', $name); // NOTE: this parent method prepares the $this->template with the // common Display data. $this->prepareTemplate($path); // generate a ticket $ticket = uniqid(rand(), true); $sptLink = 'https://spt.campusforchrist.org/security/login?ticket=' . $ticket; $this->template->set('sptLink', $sptLink); // write the ticket to the database $ticketManager = new RowManager_TicketManager(); $ticketManager->setViewerID($this->viewer->getViewerID()); $ticketManager->setTicket($ticket); $ticketManager->setExpiry(time() + 10 * 60); $ticketManager->createNewEntry(); // uncomment this line if you are creating a template for this page $templateName = 'page_Spt_home.php'; // otherwise use the generic site template //$templateName = ''; return $this->template->fetch($templateName); }
} // check to see if the parameter 'skipTables' was provided $skipTables = isset($_REQUEST['skipTables']); // if NOT then reset the tables... if (!$skipTables) { /* * Ticket Table * * Manages tickets for authentication with the SPT. * * ticket_id [INTEGER] Unique id * viewer_id [INTEGER] viewer's id * ticket_ticket [STRING] Ticket * ticket_expiry [INTEGER] when the ticket expires */ $Ticket = new RowManager_TicketManager(); $Ticket->dropTable(); $Ticket->createTable(); /*[RAD_DAOBJ_TABLE]*/ } else { echo 'Skipping Tables ... <br>'; } // end if !skipTables // check to see if parameter 'skipLabel' was provided $skipLabel = isset($_REQUEST['skipLabel']); // if not, then add labels to DB ... if (!$skipLabel) { /* * Insert Labels in DB */ // Create Application Upload Series