Esempio n. 1
0
 /**
  * @throws SampleIDMissingException
  * @throws SampleSecurityAccessDeniedException
  */
 public static function detail()
 {
     global $sample_security, $user;
     if ($_GET['sample_id']) {
         if ($sample_security->is_access(1, false)) {
             $sample = new Sample($_GET['sample_id']);
             $template = new HTMLTemplate("sample/detail.html");
             $paper_size_array = PaperSize::list_entries();
             $template->set_var("title", $sample->get_formatted_id() . " : " . $sample->get_name());
             $template->set_var("paper_size_array", $paper_size_array);
             $template->set_var("get_array", serialize($_GET));
             $template->set_var("id", $sample->get_formatted_id());
             $template->output();
         } else {
             throw new SampleSecurityAccessDeniedException();
         }
     } else {
         throw new SampleIDMissingException();
     }
 }