Subversion Repositories php_users

Rev

Rev 18 | Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 19
Line 516... Line 516...
516
       *    update
516
       *    update
517
       */
517
       */
518
      
518
      
519
      $nextScript = $this->getNextScript( $nextScript );
519
      $nextScript = $this->getNextScript( $nextScript );
520
      $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
520
      $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
-
 
521
      $return = array();
521
      if ( ! $this->workingOn || $this->workingOn['id'] !== $id ) {
522
      if ( ! $this->workingOn || $this->workingOn['id'] != $id ) {
-
 
523
         // display screen for data entry
-
 
524
         //$return[] = 'Initializing $workingOn';
522
         $this->initWorkingOn( $connection, $id );
525
         $this->initWorkingOn( $connection, $id );
-
 
526
         //$return[] = "<pre>WorkingOn\n" . print_r( $this->workingOn, true) . '</pre>';
523
         $return = $this->editScreen( $connection );
527
         $screen = $this->editScreen( $connection );
524
         if ( $this->data['admin'] ) {
528
         if ( $this->data['admin'] ) {
525
            $return .= $this->allUsersHTML( $connection );
529
            $screen .= $this->allUsersHTML( $connection );
526
         }
530
         }
527
         return sprintf( $this->configuration['screens']['edit form'],
531
         $return[] = sprintf( $this->configuration['screens']['edit form'],
528
            $nextScript,
532
            $nextScript,
529
            $return
533
            $screen
530
            );
534
            );
531
      } elseif ( $_SERVER['REQUEST_METHOD'] === 'POST' ) { // they submitted the form
535
      } elseif ( $_SERVER['REQUEST_METHOD'] === 'POST' ) { // they submitted the form
-
 
536
         //$return[] = 'Posting';
532
         $return = $this->addEdit( $connection );
537
         $return[] = $this->addEdit( $connection );
533
         /*
538
         /*
534
          * if ( $this->workingOn['id'] == $this->data['id'] ) // we just updated us, reload record
539
          * if ( $this->workingOn['id'] == $this->data['id'] ) // we just updated us, reload record
535
            $this->data = $connection->getARecord( array( 'id' => $this->data['id'] ) );
540
            $this->data = $connection->getARecord( array( 'id' => $this->data['id'] ) );
536
         */
541
         */
537
         unset( $this->workingOn );
542
         unset( $this->workingOn );
538
         return $return;
543
      } else {
-
 
544
         print "<h3>We're in the damned 'else' in admin</h3>";
539
      }
545
      }
-
 
546
      return implode( "<br />\n", $return );
540
   } // admin
547
   } // admin
541
   
548
   
542
} // class Users
549
} // class Users
543
 
550
 
544
?>
551
?>