Exemplo n.º 1
0
 public function AjaxInspector()
 {
     if (!$this->_plugin->settings->CurrentUserCan('view')) {
         die('Access Denied.');
     }
     if (!isset($_REQUEST['occurrence'])) {
         die('Occurrence parameter expected.');
     }
     $occ = new WSAL_DB_Occurrence();
     $occ->Load('id = %d', array((int) $_REQUEST['occurrence']));
     echo '<!DOCTYPE html><html><head>';
     echo '<link rel="stylesheet" id="open-sans-css" href="' . $this->_plugin->GetBaseUrl() . '/css/nice_r.css" type="text/css" media="all">';
     echo '<script type="text/javascript" src="' . $this->_plugin->GetBaseUrl() . '/js/nice_r.js"></script>';
     echo '<style type="text/css">';
     echo 'html, body { margin: 0; padding: 0; }';
     echo '.nice_r { position: absolute; padding: 8px; }';
     echo '.nice_r a { overflow: visible; }';
     echo '</style>';
     echo '</head><body>';
     $nicer = new WSAL_Nicer($occ->GetMetaArray());
     $nicer->render();
     echo '</body></html>';
     die;
 }