Exemplo n.º 1
0
 /**
   Route: get<id>
   Show suspension history for member <id>
   
   Route: get<id><edit>
   Show current suspension status for member <id>
   as editable form
 
   Route: post<id>
   Update suspension status for member <id> then
   redirect to PIMemberPage.php
 
   Route get<id><fixaddress>
   Special case clear suspension for bad address only
 */
 function preprocess()
 {
     global $FANNIE_OP_DB;
     $rc = new ReasoncodesModel(FannieDB::get($FANNIE_OP_DB));
     $this->__models['codes'] = $rc->find('mask');
     if (FormLib::get_form_value('id', False) !== False) {
         $this->card_no = FormLib::get_form_value('id');
         $susp = $this->get_model(FannieDB::get($FANNIE_OP_DB), 'SuspensionsModel', array('cardno' => $this->card_no));
         if ($susp->load()) {
             $this->__models['suspended'] = $susp;
         }
     }
     $this->__routes[] = 'get<id><edit>';
     $this->__routes[] = 'get<id><fixaddress>';
     return parent::preprocess();
 }
Exemplo n.º 2
0
 function preprocess()
 {
     if (FannieAuth::validateUserQuiet('editmembers')) {
         $this->auth_mode = 'Full';
     } elseif (FannieAuth::validateUserQuiet('editmembers_csc')) {
         $this->auth_mode = 'Limited';
     }
     if ($this->auth_mode == 'None') {
         if (isset($_REQUEST['edit'])) {
             unset($_REQUEST['edit']);
         }
         if (isset($_POST['edit'])) {
             unset($_POST['edit']);
         }
         if (isset($_GET['edit'])) {
             unset($_GET['edit']);
         }
     }
     $this->__routes[] = 'get<id><login>';
     return parent::preprocess();
 }
Exemplo n.º 3
0
 function preprocess()
 {
     $this->__routes[] = 'get<id><first><last>';
     return parent::preprocess();
 }