Beispiel #1
0
  </div>
  <h3>Itinerary #<?php 
    echo $itinerary->getId();
    ?>
 Details:</h3>
  
    <fieldset>
      <div class="mission-dtls">
        <dl>
          <dt>Mission Type:</dt>
          <dd>
            <?php 
    if ($itinerary->getMissionTypeId()) {
        ?>
              <?php 
        $mission_type = MissionTypePeer::retrieveByPK($itinerary->getMissionTypeId());
        ?>
              <?php 
        if ($mission_type) {
            ?>
                <?php 
            echo $mission_type->getName();
            ?>
              <?php 
        }
        ?>
            <?php 
    }
    ?>
          </dd>
          <dt>Origin:</dt>
Beispiel #2
0
   foreach ($mission_list as $miss) {
       ?>
 <tr>
       <td class="cell-1">
       <?php 
       if ($miss->getApptDate()) {
           echo $miss->getApptDate('m/d/y');
       }
       ?>
       </td>
       <td class="cell-2">
       <?php 
       if ($miss->getMissionTypeId()) {
           ?>
           <?php 
           $type = MissionTypePeer::retrieveByPK($miss->getMissionTypeId());
           if ($type) {
               echo $type->getName();
           }
           ?>
       <?php 
       }
       ?>
       </td>
       <td class="cell-1">
       <?php 
       if ($miss->getRequesterId()) {
           ?>
       <?php 
           $requester = RequesterPeer::retrieveByPK($miss->getRequesterId());
           ?>
Beispiel #3
0
 /**
  * Mission type
  * CODE:mission_type_delete
  */
 public function executeDeleteMisType(sfWebRequest $request)
 {
     #security
     if (!$this->getUser()->hasCredential(array('Administrator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $request->checkCSRFProtection();
     if ($request->isMethod('post')) {
         try {
             $mtype = MissionTypePeer::retrieveByPK($request->getParameter('id'));
             $this->forward404Unless($mtype);
             $mtype->delete();
         } catch (Exception $e) {
             $this->getUser()->setFlash('warning', "There are related persons to this mission type. Please remove them first.");
         }
     }
     $this->redirect('mission/indexMisType');
 }