示例#1
0
 function launch()
 {
     global $interface;
     global $configArray;
     $id = strip_tags($_REQUEST['id']);
     $interface->assign('id', $id);
     // Check if user is logged in
     if (!$this->user) {
         $interface->assign('recordId', $id);
         $interface->assign('followupModule', 'EcontentRecord');
         $interface->assign('followupAction', 'AddToWishList');
         $interface->assign('followup', 'AddToWishList');
         if (isset($_GET['lightbox'])) {
             $interface->assign('title', $_GET['message']);
             $interface->assign('message', 'You must be logged in first');
             return $interface->fetch('AJAX/login.tpl');
         } else {
             $interface->setPageTitle('You must be logged in first');
             $interface->assign('subTemplate', '../MyResearch/login.tpl');
             $interface->setTemplate('view-alt.tpl');
             $interface->display('layout.tpl', 'AddToWishList' . $id);
         }
         exit;
     }
     //Add to the wishlist
     //Add to wishlist if not already on the wishlist
     require_once ROOT_DIR . '/Drivers/EContentDriver.php';
     $eContentDriver = new EContentDriver();
     $ret = $eContentDriver->addToWishList($id, $this->user);
     header('Location: ' . $configArray['Site']['path'] . '/EcontentRecord/' . $id . '/Home');
 }