public function act_new_document()
 {
     global $conf;
     $document_form = document_form('new');
     $this->document_form = $document_form;
     if (isset($_POST['save'])) {
         $status = shn_form_validate($this->document_form);
         if (!$status) {
             return;
         }
         unset($document_form['doc_id']);
         $supporting_docs = new SupportingDocs();
         $supporting_docs_meta = new SupportingDocsMeta();
         $type = null;
         $uri = shn_files_store('choose_file_upload', null, $type);
         //"http://test";
         if ($uri == null) {
             $uri = '';
         }
         $doc_uuid = shn_create_uuid('doc');
         $supporting_docs->doc_id = $doc_uuid;
         $supporting_docs_meta->doc_id = $doc_uuid;
         $supporting_docs->uri = $uri;
         form_objects($document_form, $supporting_docs);
         form_objects($document_form, $supporting_docs_meta);
         $supporting_docs_meta->format = $type;
         $supporting_docs->Save();
         $supporting_docs_meta->SaveAll();
         $this->supporting_docs = $supporting_docs;
         $this->supporting_docs_meta = $supporting_docs_meta;
         set_url_args('doc_id', $this->supporting_docs_meta->doc_id);
         change_tpl('add_document_finish');
         set_redirect_header('docu', 'view_document');
         exit;
     }
 }
 /**
  * act_new_event will generate ui to add an new event 
  * 
  * @access public
  * @return void
  */
 public function act_new_event()
 {
     $this->event_form = event_form('new');
     //if a save is request save the event
     if (isset($_POST['save'])) {
         $status = shn_form_validate($this->event_form);
         if ($status) {
             $event = new Event();
             $event->event_record_number = shn_create_uuid('event');
             form_objects($this->event_form, $event);
             $event->SaveAll();
             $this->event = $event;
             set_url_args('eid', $this->event->event_record_number);
             change_tpl('new_event_finish');
         }
     }
 }
Exemple #3
0
<?php 
include_once 'event_title.php';
set_url_args('act_id', $act->act_record_number);
?>
<div class="panel">
    <div class="fuelux">
        <div id="myWizard" class="wizard">
            <ul class="steps">
                <li class="complete">
                    <span class="badge badge-success">1</span><?php 
echo _t('ADD_VICTIM');
?>
<span class="chevron"></span>
                </li>


                <li class="active"><span class="badge badge-info">2</span><?php 
echo _t('ADD_ACT');
?>
<span class="chevron"></span></li>
                <li><span class="badge ">3</span><?php 
echo _t('ADD_PERPETRATOR');
?>
<span class="chevron"></span></li>
                <li><span class="badge">4</span><?php 
echo _t('ADD_INVOLVEMENT');
?>
<span class="chevron"></span></li>
                <li><span class="badge">5</span><?php 
echo _t('FINISH');
 function act_edit_biography()
 {
     include_once APPROOT . 'inc/lib_form_util.inc';
     include_once APPROOT . 'inc/lib_uuid.inc';
     $biography_form = biographic_form('edit');
     $this->pid = isset($_GET['pid']) && $_GET['pid'] != null ? $_GET['pid'] : $_SESSION['pid'];
     if ($this->pid != null) {
         $person_form = person_form('new');
         $this->person_form = $person_form;
         $this->person = $this->person_information($this->pid, $this->person_form);
         $_SESSION['ppid'] = $this->pid;
     }
     if (isset($_GET['biography_id'])) {
         set_url_args('biography_id', $this->biographic_details->biographic_details_record_number);
         popuate_formArray($biography_form, $this->biographic_details);
         $this->biography_form = $biography_form;
     }
     if (isset($_POST['save'])) {
         $this->pid = $_SESSION['ppid'];
         $status = shn_form_validate($biography_form);
         if ($status) {
             if ($_POST['biographic_details_record_number'] == '') {
                 $_POST['biographic_details_record_number'] = shn_create_uuid('biography');
             }
             $_GET['pid'] = $_SESSION['ppid'];
             $biography = new BiographicDetail();
             $biography->LoadfromRecordNumber($_POST['biographic_details_record_number']);
             $biography->biographic_details_record_number = $_POST['biographic_details_record_number'];
             form_objects($biography_form, $biography);
             $biography->person = $_SESSION['ppid'];
             if ($biography->related_person == '') {
                 $biography->related_person = null;
             }
             $biography->SaveAll();
             $_GET['pid'] = null;
             $_GET['bid'] = $_POST['biographic_details_record_number'];
             $this->biography_list($_SESSION['ppid']);
             $_SESSION['pid'] = $_SESSION['ppid'];
             set_redirect_header('person', 'biography_list', null, array('biography_id' => $biography->biographic_details_record_number, 'type' => 'bd'));
         }
     }
 }