Beispiel #1
0
 $act = new Act();
 $inv = new Involvement();
 //travers through
 foreach ($vp_list as $key => $record) {
     echo '<br /><h3>' . _t('ACT_') . ++$key . ' : ' . get_mt_term($record['type_of_act']) . '</h3><br />';
     //print victim details
     echo '<h4>' . _t('VICTIM') . ' : ' . $record['vname'] . '</h4><br />';
     $person->LoadFromRecordNumber($record['victim_record_number']);
     $person->LoadRelationships();
     popuate_formArray($person_form, $person);
     shn_form_get_html_labels($person_form, false);
     echo "<br class='page_break' />";
     //print act details
     echo '<h4>' . _t('ACT_DETAILS') . ' : ' . get_mt_term($record['type_of_act']) . '</h4><br />';
     $act->LoadFromRecordNumber($record['act_record_number']);
     $act->LoadRelationships();
     popuate_formArray($act_form, $act);
     shn_form_get_html_labels($act_form, false);
     echo "<br class='page_break' />";
     //print perpetrator details
     if (isset($record['perpetrator_record_number'])) {
         echo '<h4>' . _t('PERPETRATOR') . ' : ' . $record['pname'] . '</h4><br />';
         $person->LoadFromRecordNumber($record['perpetrator_record_number']);
         $person->LoadRelationships();
         popuate_formArray($person_form, $person);
         shn_form_get_html_labels($person_form, false);
         echo "<br class='page_break' />";
     }
     //print involvement details
     if (isset($record['involvement_record_number'])) {
         echo '<h4>' . _t('INVOLVEMENT_DETAILS') . ' : ' . get_mt_term($record['degree_of_involvement']) . '</h4><br />';
 public function act_edit_act()
 {
     $act_form = act_form('edit');
     $this->vp_list = Browse::getVpList($this->event_id);
     if (isset($_POST['update'])) {
         $status = shn_form_validate($act_form);
         if ($status) {
             $act = new Act();
             $act->LoadFromRecordNumber($_REQUEST['act_id']);
             $act->LoadRelationships();
             $act->LoadManagementData();
             form_objects($act_form, $act);
             $act->SaveAll();
             $this->act = $act;
             $_GET['type'] = 'act';
             set_redirect_header('events', 'vp_list', null, array('act_id' => $_REQUEST['act_id'], 'type' => 'act'));
             return;
         }
     }
     $this->act_form = $act_form;
     //if an involvement is requested
     if (isset($_GET['inv_id'])) {
         $this->set_inv();
     }
     //if an act is requested
     if (isset($_GET['act_id'])) {
         $this->set_act();
     }
 }