/** * Process parameters and display the page. * * @return void * @access public */ public function launch() { global $interface; global $configArray; // Delete List Confirmation if (isset($_POST['deleteList']) && isset($_POST['listID'])) { if ($_POST['confirm']) { include_once 'services/MyResearch/MyList.php'; $myList = new MyList(); $myList->launch(); } else { if ($_POST['cancel']) { $followupUrl = $configArray['Site']['path'] . "/MyResearch/MyList/" . urlencode($_POST['listID']); header("Location: " . $followupUrl . "?infoMsg=fav_list_delete_cancel"); exit; } else { $interface->assign('confirmAction', 'deleteList'); $interface->assign('listID', $_POST['listID']); $interface->assign('listName', $_POST['listName']); $interface->setpageTitle('delete_list'); $this->infoMsg = 'confirm_delete_list_text'; return $this->_display(); } } } // If we get this far, we're missing some vital information }
/** * Process parameters and display the page. * * @return void * @access public */ public function launch() { global $interface; global $configArray; // Delete List Confirmation if (isset($_REQUEST['deleteList']) && isset($_REQUEST['listID'])) { if ($_REQUEST['confirmAction']) { include_once 'services/MyResearch/MyList.php'; $myList = new MyList(); $myList->launch(); } else { if ($_REQUEST['cancelAction']) { $followupUrl = $configArray['Site']['url'] . "/MyResearch/MyList/" . urlencode($_REQUEST['listID']); header("Location: " . $followupUrl . "?infoMsg=fav_list_delete_cancel"); exit; } else { $interface->assign('confirmAction', 'deleteList'); $interface->assign('listID', $_REQUEST['listID']); $interface->assign('listName', $_REQUEST['listName']); $interface->setpageTitle('delete_list'); $this->infoMsg = 'confirm_delete_list_text'; // Set Messages $interface->assign('infoMsg', $this->infoMsg); $interface->assign('errorMsg', $this->errorMsg); $interface->assign('origin', $this->origin); // Display Page if (isset($_GET['lightbox'])) { return $this->_displayLightBox(); } else { $this->_displayNonLightBox(); } } } } // If we get this far, we're missing some vital information }
function launch() { global $interface; global $configArray; if (isset($_POST['submit'])) { $result = $this->sendEmail($_POST['to'], $_POST['from'], $_POST['message']); if (!PEAR_Singleton::isError($result)) { require_once 'MyList.php'; $_GET['id'] = $_REQUEST['listId']; MyList::launch(); exit; } else { $interface->assign('message', $result->getMessage()); } } // Display Page $interface->assign('listId', strip_tags($_REQUEST['id'])); $interface->assign('popupTitle', 'Email a list'); $pageContent = $interface->fetch('MyResearch/emailListPopup.tpl'); $interface->assign('popupContent', $pageContent); echo $interface->fetch('popup-wrapper.tpl'); }
<?php require_once "include.php"; $select = new MySelect('MySelect', null, null, 'data/element.data'); $list = new MyList("MyList", null, Cons::YES, 'data/element.data'); //print_r($select); $str = str_replace("{MySelect}", $select->toString(), $main); $str = str_replace("{MyList}", $list->toString(), $str); echo $str;