public function index() { echo '<h3>Template Diff Viewer</h3> <p>This lists any templates which are found to have changes (based on the current selected skin)</p> <ul>'; $dir_iterator = new RecursiveDirectoryIterator(Config::Get('BASE_TEMPLATE_PATH') . DS . $file); $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); $custom_found = false; foreach ($iterator as $file) { if ($file->getType() != 'file') { continue; } $filename = $file->getBaseName(); $custom_path = SKINS_PATH . DS . $filename; if (file_exists($custom_path)) { $custom_found = true; echo '<li><strong>' . $filename . ':</strong> <a href="' . adminurl('/templatediffs/showdiff/' . $filename) . '">View changes</a></li>'; } else { //echo 'No changes<br>'; } } if ($custom_found === false) { echo '<li>No customized templates found in this skin\'s folder</li>'; } echo '</ul>'; }
echo $param->datesent; ?> " align="center"><b><font size="3" color="red"><?php echo $param->welcome; ?> </font></b></td> <td title="Warning Email Sent On <?php echo $param->datesent; ?> " align="center"><b><font size="3" color="red"><?php echo $param->blank; ?> </font></b></td> <td align="center"> <form name="warning" method="post" action="<?php echo adminurl('/pilotmanager/emails'); ?> "> <select name="send"> <option value="blank">Blank Email</option> <option value="warning">Warning Email</option> <option value="welcome">Welcome Email</option> </select> <input name="email" type="hidden" Value="<?php echo $pilot->email; ?> "> <button type="submit" value="submit">Send</button> </form> </td> </tr>
?> " /> <button type="submit" name="submit" value="Delete" onclick="return doublecheck()" ;?>Delete</button> </form> <?php } ?> </td> </tr> <tr id="pilot_<?php echo $pilot->pilotid; ?> " style="display:none"> <td colspan="13" align="center" style="width:100%"> <form method="post" action="<?php echo adminurl('/pilotmanager/savepro'); ?> "> <table> <tr> <td align="right"><b>First Name:</b></td> <td><input type="text" name="firstname" value="<?php echo $pilot->firstname; ?> " /></td> </tr> <tr> <td align="right"><b>Last Name:</b></td> <td><input type="text" name="lastname" value="<?php echo $pilot->lastname; ?>
public function bumpnews() { $id = $this->get->id; SiteData::bumpNewsItem($id); $this->redirect(adminurl('sitecms/viewnews')); }
</tr> <td>Recipient Email Address: <b><?php echo $email; ?> </td> <tr> </tr> <td>Email Subject: <b><?php echo $subject; ?> </td> <tr> </tr> <td>Email Message: <b><?php echo $message; ?> </td> </tr> <tr> <td>Confirmation email was sent on <b><?php echo date("d/m/y - H:i:s", time()); ?> </b>.</td> </tr> <tr> <td align="center"><a href="<?php echo adminurl('/pilotmanager'); ?> "><input type="button" value="Back to Pilot Manager"></a></td> </tr> </table>
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h3>Aircraft Import</h3> <form enctype="multipart/form-data" action="<?php echo adminurl('/import/importaircraft'); ?> " method="post"> Choose your import file (*.csv): <br /> <input name="uploadedfile" type="file" /><br /> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <br /> <input type="checkbox" name="header" checked /> First line of CSV is the header <br /><br /> <input type="submit" value="Upload File" /> </form>
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <div id="wrapper"> <h3><?php echo $title; ?> </h3> <form action="<?php echo adminurl('/operations/schedules'); ?> " method="post"> <table width="100%" class="tablesorter"> <tr> <td valign="top"><strong>Code: </strong></td> <td> <select name="code"> <?php foreach ($allairlines as $airline) { $sel = $airline->code == $schedule->code ? 'selected' : ''; echo '<option value="' . $airline->code . '" ' . $sel . '>' . $airline->code . ' - ' . $airline->name . '</option>'; } ?> </select> </td> </tr> <tr> <td><strong>Flight Number:</strong></td>
echo $news->postedby; ?> </td> <td align="center"><?php echo date(DATE_FORMAT, $news->postdate); ?> </td> <td align="center" width="1%" nowrap> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<?php echo adminaction('/sitecms/bumpnews?id=' . $news->id); ?> ';"> Bump </button> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<?php echo adminurl('/sitecms/editnews?id=' . $news->id); ?> ';"> Edit </button> <button class="deleteitem {button:{icons:{primary:'ui-icon-trash'}}}" href="<?php echo adminaction('/sitecms/viewnews'); ?> " action="deleteitem" id="<?php echo $news->id; ?> ">Delete</button> </td> </tr> <?php
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h2>PIREP Approved</h2> PIREP #<?php echo $pirep->pirepid; ?> has been approved<br /> Flight #<?php echo $pirep->code . $pirep->flightnum; ?> (<?php echo $pirep->depicao . ' to ' . $pirep->arricao; ?> ) <br /><br /> <a href="<?php echo adminurl('/pirepadmin/viewpending'); ?> ">Click to go to the pending PIREPS page</a>
?> ">Profile Fields</a></li> <?php } if (PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN)) { ?> <?php if (Config::Get('PHPVMS_CENTRAL_ENABLED') == true || Config::Get('VACENTRAL_ENABLED') == true) { echo '<li><a href="' . adminurl('/vacentral') . '">vaCentral Settings</a></li>'; } ?> <?php } ?> <li><a href="<?php echo adminurl('/dashboard/about'); ?> ">About phpVMS</a></li> <li></li> </ul> </li> <?php } if (strlen($MODULE_NAV_INC) > 0) { ?> <li style="padding: 0; margin: 0;"><a class="menu" href="#"> <img src="<?php echo SITE_URL; ?> /admin/lib/layout/images/settings_icon.gif" />Addons</a> <ul style="padding: 0; margin: 0;">
public function getpilotsjson() { $page = $this->get->page; // get the requested page $limit = $this->get->rows; // get how many rows we want to have into the grid $sidx = $this->get->sidx; // get index row - i.e. user click to sort $sord = $this->get->sord; // get the direction if (!$sidx) { $sidx = 1; } /* Do the search using jqGrid */ $where = array(); if ($this->get->_search == 'true') { $searchstr = jqgrid::strip($this->get->filters); $where_string = jqgrid::constructWhere($searchstr); # Append to our search, add 1=1 since it comes with AND # from above $where[] = "1=1 {$where_string}"; } Config::Set('PILOT_ORDER_BY', "{$sidx} {$sord}"); # Do a search without the limits so we can find how many records $count = count(PilotData::findPilots($where)); if ($count > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; } if ($page > $total_pages) { $page = $total_pages; } $start = $limit * $page - $limit; // do not put $limit*($page - 1) if ($start < 0) { $start = 0; } # And finally do a search with the limits $allpilots = PilotData::findPilots($where, $limit, $start); if (!$allpilots) { $allpilots = array(); } # Form the json header $json = array('page' => $page, 'total' => $total_pages, 'records' => $count, 'rows' => array()); # Add each row to the above array foreach ($allpilots as $row) { $pilotid = PilotData::getPilotCode($row->code, $row->pilotid); $status = $row->retired == 0 ? 'Active' : 'Retired'; $location = '<img src="' . Countries::getCountryImage($row->location) . '" alt="' . $row->location . '" />'; $edit = '<a href="' . adminurl('/pilotadmin/viewpilots?action=viewoptions&pilotid=' . $row->pilotid) . '">Edit</a>'; $tmp = array('id' => $row->id, 'cell' => array($row->id, $pilotid, $row->firstname, $row->lastname, $row->email, $location, $status, $row->rank, $row->totalflights, $row->totalhours, $row->lastip, $edit)); $json['rows'][] = $tmp; } header("Content-type: text/x-json"); echo json_encode($json); }
<tr> <td align="center"><?php echo $group->name; ?> </td> <td align="center"><?php echo $group->groupid; ?> </td> <td align="center" width="1%" nowrap> <?php if ($group->core == 0) { ?> <a class="button {button:{icons:{primary:'ui-icon-wrench'}}}" href="<?php echo adminurl('/pilotadmin/editgroup/?groupid=' . $group->groupid); ?> "> Edit</a> <?php } else { echo 'This group cannot be renamed or deleted'; } ?> </td> </tr> <?php } ?> </tbody> </table>
<h3>CSV Airport Import</h3> <p><strong>Instructions</strong> - You can import your airports from CSV. You can download a template CSV from <a href="<?php echo SITE_URL; ?> /admin/lib/airport_template.csv">here</a>. The following must be done:</p> <ol> <li>The airport icao must be added, or import will fail</li> <li>You can leave out the header, but if it is there, <strong>check off the box tht the first line is a header.</strong></li> <li>Hub column - 1 for hub, 0 for no hub. Blank defaults to enabled</li> </ol> <form enctype="multipart/form-data" action="<?php echo adminurl('/import/importairports'); ?> " method="post"> Choose your import file (*.csv): <br /> <input name="uploadedfile" type="file" /><br /> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <br /> <input type="checkbox" name="header" checked /> First line of CSV is the header <br /> <input type="checkbox" name="erase_airports" /> Delete all old airports - NOTE: This completely deletes every single of your airports, although, if you need to clear your airpots list, then check this. <br /><br /> <input type="submit" value="Upload File" /> </form>
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h3>Mass Mailer</h3> <form method="post" action="<?php echo adminurl('/massmailer/sendmail'); ?> "> <p> <strong>Subject: </strong> <input type="text" name="subject" value="" /> </p> <p> <strong>Message:</strong> </p> <p> <textarea name="message" id="editor" style="width: 600px; height: 250px;">To: {PILOT_FNAME} {PILOT_LNAME}, </textarea> </p> <p>Select groups to send to:<br /> <?php $total = StatsData::PilotCount(); ?> <input type="checkbox" name="groups[]" value="all" />All Pilots (<?php echo $total; ?> pilots)<br /> <?php foreach ($allgroups as $group) { $total = count(PilotGroups::getUsersInGroup($group->groupid));
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h3><?php echo $title; ?> </h3> <form action="<?php echo adminurl('/sitecms/viewnews'); ?> " method="post"> <p><strong>Subject: </strong><input type="text" name="subject" value="<?php if (isset($newsitem)) { echo $newsitem->subject; } ?> " /></p> <p> <p><strong>News Text: </strong></p> <p> <textarea id="editor" name="body" width="100%" style="width: 100%; height: 250px;"><?php if (isset($newsitem->body)) { echo $newsitem->body; } ?> </textarea>
public function bumpnews() { $this->checkPermission(EDIT_NEWS); $id = $this->get->id; SiteData::bumpNewsItem($id); $this->redirect(adminurl('sitecms/viewnews')); }
/** * PIREPData::fileReport() * * @param mixed $pirepdata * @return */ public static function fileReport($pirepdata) { /*$pirepdata = array('pilotid'=>'', 'code'=>'', 'flightnum'=>'', 'depicao'=>'', 'arricao'=>'', 'aircraft'=>'', 'flighttime'=>'', 'submitdate'=>'', 'comment'=>'', 'fuelused'=>'', 'source'=>'' 'log'=>'' );*/ if (!is_array($pirepdata)) { return false; } $pirepdata['code'] = strtoupper($pirepdata['code']); $pirepdata['flightnum'] = strtoupper($pirepdata['flightnum']); $pirepdata['depicao'] = strtoupper($pirepdata['depicao']); $pirepdata['arricao'] = strtoupper($pirepdata['arricao']); /* Check if this PIREP was just submitted, check the last 10 minutes */ if (Config::Get('PIREP_CHECK_DUPLICATE') == true) { $time_limit = Config::Get('PIREP_TIME_CHECK'); if (empty($time_limit)) { $time_limit = 1; } $sql = "SELECT `pirepid` FROM " . TABLE_PREFIX . "pireps\n\t\t\t\t\tWHERE `pilotid` = {$pirepdata['pilotid']} \n\t\t\t\t\t\tAND `code` = '{$pirepdata['code']}'\n\t\t\t\t\t\tAND `flightnum` = '{$pirepdata['flightnum']}' \n\t\t\t\t\t\tAND DATE_SUB(NOW(), INTERVAL {$time_limit} MINUTE) <= `submitdate`"; $res = DB::get_row($sql); if ($res) { self::$lasterror = 'This PIREP was just submitted!'; return $res->pirepid; } } if ($pirepdata['depicao'] == '' || $pirepdata['arricao'] == '') { self::$lasterror = 'The departure or arrival airports are blank'; return false; } # Check the aircraft if (!is_numeric($pirepdata['aircraft'])) { // Check by registration $ac = OperationsData::getAircraftByReg($pirepdata['aircraft']); if ($ac) { $pirepdata['aircraft'] = $ac->id; } else { // Check by name $ac = OperationsData::getAircraftByName($pirepdata['aircraft']); if ($ac) { $pirepdata['aircraft'] = $ac->id; } else { $pirepdata['aircraft'] = '0'; } } } # Check the airports, add to database if they don't exist $depapt = OperationsData::getAirportInfo($pirepdata['depicao']); if (!$depapt) { $depapt = OperationsData::RetrieveAirportInfo($pirepdata['depicao']); } $arrapt = OperationsData::getAirportInfo($pirepdata['arricao']); if (!$arrapt) { $arrapt = OperationsData::RetrieveAirportInfo($pirepdata['arricao']); } # Look up the schedule $sched = SchedulesData::getScheduleByFlight($pirepdata['code'], $pirepdata['flightnum']); /* Get route information, and also the detailed layout of the route Store it cached, in case the schedule changes later, then the route information remains intact. Also, if the nav data changes, then the route is saved as it was */ if (!empty($pirepdata['route'])) { /* They supplied some route information, so build up the data based on that. It needs a certain structure passed, so build that */ $pirepdata['route'] = str_replace('SID', '', $pirepdata['route']); $pirepdata['route'] = str_replace('STAR', '', $pirepdata['route']); $pirepdata['route'] = str_replace('DCT', '', $pirepdata['route']); $pirepdata['route'] = trim($pirepdata['route']); $tmp = new stdClass(); $tmp->deplat = $depapt->lat; $tmp->deplng = $depapt->lng; $tmp->route = $pirepdata['route']; $pirepdata['route_details'] = NavData::parseRoute($tmp); $pirepdata['route_details'] = serialize($pirepdata['route_details']); unset($tmp); } if (empty($pirepdata['route']) && !empty($sched->route)) { $pirepdata['route'] = $sched->route; $pirepdata['route'] = str_replace('SID', '', $pirepdata['route']); $pirepdata['route'] = str_replace('STAR', '', $pirepdata['route']); $pirepdata['route'] = str_replace('DCT', '', $pirepdata['route']); $pirepdata['route'] = trim($pirepdata['route']); /* The schedule doesn't have any route_details, so let's populate the schedule while we're here. Then we'll use that same info to populate our details information */ if (empty($sched->route_details)) { $pirepdata['route_details'] = serialize(SchedulesData::getRouteDetails($sched->id)); } else { /* The schedule does have route information, and it's already been cached */ $pirepdata['route_details'] = $sched->route_details; } } /* This setting forces the next code to automatically calculate a load value for this current PIREP */ if (Config::Get('PIREP_OVERRIDE_LOAD') == true) { $pirepdata['load'] == ''; } # Check the load, if it's blank then look it up # Based on the aircraft that was flown if (!isset($pirepdata['load']) || empty($pirepdata['load'])) { $pirepdata['load'] = FinanceData::getLoadCount($pirepdata['aircraft'], $sched->flighttype); } /* If the distance isn't supplied, then calculate it */ if (!isset($pirepdata['distance']) || empty($pirepdata['distance'])) { $pirepdata['distance'] = OperationsData::getAirportDistance($depapt, $arrapt); } /* See if there's a landing rate */ if (!isset($pirepdata['landingrate']) || empty($pirepdata['landingrate'])) { $pirepdata['landingrate'] = 0; } /* Any "raw" parameterized data which needs to be added */ if (isset($pirepdata['rawdata'])) { $pirepdata['rawdata'] = serialize($pirepdata['rawdata']); } else { $pirepdata['rawdata'] = ''; } /* Escape the comment field */ //$pirepdata['log'] = DB::escape($pirepdata['log']); if (isset($pirepdata['comment'])) { $comment = DB::escape($pirepdata['comment']); unset($pirepdata['comment']); } /* Proper timestamp */ $pirepdata['flighttime'] = str_replace(':', '.', $pirepdata['flighttime']); $pirepdata['flighttime_stamp'] = str_replace('.', ':', $pirepdata['flighttime']) . ':00'; /* Export status as 0 */ $pirepdata['exported'] = 0; $pirepdata['submitdate'] = 'NOW()'; $pirepdata['modifieddate'] = 'NOW()'; $pirepdata['accepted'] = PIREP_PENDING; $pirepdata['expenselist'] = '0'; $pirepdata['flighttype'] = $sched->flighttype; # Do the insert based on the columns here $cols = array(); $col_values = array(); foreach ($pirepdata as $key => $value) { if ($key == 'submitdate') { $value = 'NOW()'; } elseif ($key == 'comment') { continue; } else { $value = "'" . DB::escape($value) . "'"; } $cols[] = "`{$key}`"; $col_values[] = $value; } $cols = implode(', ', $cols); $col_values = implode(', ', $col_values); $sql = 'INSERT INTO ' . TABLE_PREFIX . "pireps ({$cols}) VALUES ({$col_values});"; DB::query($sql); $pirepid = DB::$insert_id; // Add the comment if its not blank if ($comment != '') { self::addComment($pirepid, $pirepdata['pilotid'], $comment); } # Update the financial information for the PIREP, true to refresh fuel self::PopulatePIREPFinance($pirepid, true); # Do other assorted tasks that are along with a PIREP filing # Update the flown count for that route self::UpdatePIREPFeed(); # Update any pilot's information $pilotinfo = PilotData::getPilotData($pirepdata['pilotid']); $pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); PilotData::UpdateLastPIREPDate($pilotinfo->pilotid); if (Config::Get('EMAIL_SEND_PIREP') === true) { # Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message = "A PIREP has been submitted by {$pilotcode} " . "({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n" . "{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" . "Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n" . "Landing Rate: {$pirepdata['landingrate']}\n" . "Filed using: {$pirepdata['source']}\n\n" . "Comment: {$comment}\n\n" . "Click to approve this pirep (admin must be signed in):\n" . adminurl('/pirepadmin/approvepirep/' . $pirepid); $email = Config::Get('EMAIL_NEW_PIREP'); if (empty($email)) { $email = ADMIN_EMAIL; } Util::SendEmail($email, $sub, $message); } /* Add this into the activity feed */ $message = Lang::get('activity.new.pirep'); foreach ($pirepdata as $key => $value) { $message = str_replace('$' . $key, $value, $message); } # Add it to the activity feed ActivityData::addActivity(array('pilotid' => $pirepdata['pilotid'], 'type' => ACTIVITY_NEW_PIREP, 'refid' => $pirepid, 'message' => htmlentities($message))); /* Now send data to vaCentral */ CentralData::send_pirep($pirepid); // Reset this ID back DB::$insert_id = $pirepid; self::$pirepid = $pirepid; return $pirepid; }
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h3>Edit Page</h3> <form action="<?php echo adminurl('/sitecms/viewpages'); ?> " method="post"> <p><strong>Page name: </strong> <?php if (isset($action) && $action == 'addpage') { echo '<input name="pagename" type="text">'; } else { echo $pagedata->pagename; } ?> </p> <?php if (isset($pagedata) && $pagedata->public == 1) { $public = 'checked'; } else { $public = ''; } if (isset($pagedata) && $pagedata->enabled == 1 || !isset($pagedata)) { $enabled = 'checked'; } else {
</td> <td align="center"><?php echo $page->postdate; ?> </td> <td align="center"><a href="<?php echo url('/pages/' . $page->filename); ?> "><?php echo $page->filename; ?> </a></td> <td align="center" width="1%" nowrap> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<?php echo adminurl('/sitecms/editpage?pageid=' . $page->pageid); ?> ';">Edit</button> <button class="deleteitem {button:{icons:{primary:'ui-icon-trash'}}}" id="<?php echo $page->pageid; ?> " href="<?php echo adminaction('/sitecms/viewpages?action=deletepage&pageid=' . $page->pageid); ?> ">Delete</button> </td> </tr> <?php
echo fileurl('/lib/images/loading.gif'); ?> " /><br /><br /> Loading... </div> </div> <?php if (Config::Get('VACENTRAL_ENABLED') == true && $unexported_count > 0) { ?> <h3>vaCentral Status: </h3> <p>You have <strong><?php echo $unexported_count; ?> </strong> PIREPS waiting for export to vaCentral. <a href="<?php echo adminurl('/vacentral/sendqueuedpireps'); ?> ">Click here to send them</a> </p> <?php } ?> <h3 style="margin-bottom: 0px;">Latest News</h3> <div style="overflow: auto; height: 400px; border: 1px solid #f5f5f5; margin-bottom: 20px; padding: 7px; padding-top: 0px; padding-bottom: 20px;"> <?php echo $phpvms_news; ?> <p><a href="http://www.phpvms.net" target="_new">View All News</a></p> </div> </td> <?php /*if(Config::Get('VACENTRAL_ENABLED') == true)
/admin/lib/template.csv">here</a>. The following must be done:</p> <ol> <li>The airline code must be added, or import will fail</li> <li>You can leave out the header, but if it is there, <strong>check off the box</strong></li> <li>All of the columns can be there, but only the route, leg, distance, and flighttime can be blank</li> <li>Routes which already exist (based on the code and flight number) will not be re-added</li> <li>Aircraft must be added by registration</li> <li>Flight Type can be "P" (Passenger), "C" (Cargo) or "H" (Charter). Enter it without quotes</li> <li>Days of week - last column - enter 0-6 for Sunday (0) to Saturday (6): ie: Monday, Wed, Fri, Sat flights will be: 1356 as the value</li> <li>Enabled column - 1 for enabled, 0 for disabled. Blank defaults to enabled</li> <li><strong>Remove the leg column</strong> - legs are no longer counted, so please remove that column</li> </ol> <form enctype="multipart/form-data" action="<?php echo adminurl('/import/processimport'); ?> " method="post"> Choose your import file (*.csv): <br /> <input name="uploadedfile" type="file" /><br /> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <br /> <input type="checkbox" name="header" checked /> First line of CSV is the header <br /> <input type="checkbox" name="erase_routes" /> Delete all previous routes - NOTE: this could potentially mess up any PIREPS from ACARS flights which are currently in progress, whose routes have changed. <br /><br /> <input type="submit" value="Upload File" /> </form>
?> </td> <td align="center"><?php echo $aircraft->fullname; ?> </td> <td align="center"><?php echo $aircraft->registration; ?> </td> <td align="center"><?php echo $aircraft->maxpax; ?> </td> <td align="center"><?php echo $aircraft->maxcargo; ?> </td> <td align="center" width="1%" nowrap> <button class="{button:{icons:{primary:'ui-icon-wrench'}}}" onclick="window.location='<?php echo adminurl('/operations/editaircraft?id=' . $aircraft->id); ?> ';">Edit</button> </td> </tr> <?php } ?> </tbody> </table>
<?php if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die; } ?> <h3><?php echo $title; ?> </h3> <p>* Denotes required fields</p> <form action="<?php echo adminurl('/operations/aircraft'); ?> " method="post"> <dl> <dt>* Aircraft ICAO Code</dt> <dd><input name="icao" type="text" value="<?php echo $aircraft->icao; ?> " /></dd> <dt>* Aircraft Name/Type (i.e B747-400)</dt> <dd><input name="name" type="text" value="<?php echo $aircraft->name; ?> " /></dd> <dt>* Full Name (Boeing 747-400 Combi)</dt> <dd><input name="fullname" type="text" value="<?php echo $aircraft->fullname;
<tr> <td> <strong> <a href="<?php echo adminurl('/maintenance/clearcache'); ?> ">Clear Cache</a> </strong> </td> <td>This deletes all cached data</td> </tr> <tr> <td><strong> <a href="<?php echo adminurl('/maintenance/optimizetables'); ?> ">Optimize Tables</a> </strong> </td> <td>Optimize and reindex all of your tables. Good to do often.<br /></td> </tr> </tbody> </table> <h3>Cron</h3> <p>If you have the ability, it's best to setup a cron-job to run the maintenance script. The command to add is:</p> <p> <input type="text" name="cron" style="padding: 5px; width: 400px; " value="php -f <?php echo SITE_ROOT; ?>
public function schedulegrid() { $page = $this->get->page; // get the requested page $limit = $this->get->rows; // get how many rows we want to have into the grid $sidx = $this->get->sidx; // get index row - i.e. user click to sort $sord = $this->get->sord; // get the direction if (!$sidx) { $sidx = 1; } # http://dev.phpvms.net/admin/action.php/operations/ # ?_search=true&nd=1270940867171&rows=20&page=1&sidx=flightnum&sord=asc&searchField=code&searchString=TAY&searchOper=eq /* Do the search using jqGrid */ $where = array(); if ($this->get->_search == 'true') { $searchstr = jqgrid::strip($this->get->filters); $where_string = jqgrid::constructWhere($searchstr); # Append to our search, add 1=1 since it comes with AND # from above $where[] = "1=1 {$where_string}"; } Config::Set('SCHEDULES_ORDER_BY', "{$sidx} {$sord}"); # Do a search without the limits so we can find how many records $count = SchedulesData::countSchedules($where); if ($count > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; } if ($page > $total_pages) { $page = $total_pages; } $start = $limit * $page - $limit; // do not put $limit*($page - 1) if ($start < 0) { $start = 0; } # And finally do a search with the limits $schedules = SchedulesData::findSchedules($where, $limit, $start); if (!$schedules) { $schedules = array(); } # Form the json header $json = array('page' => $page, 'total' => $total_pages, 'records' => $count, 'rows' => array()); # Add each row to the above array foreach ($schedules as $row) { if ($row->route != '') { $route = '<a href="#" onclick="showroute(\'' . $row->id . '\'); return false;">View</a>'; } else { $route = '-'; } $edit = '<a href="' . adminurl('/operations/editschedule?id=' . $row->id) . '">Edit</a>'; $delete = '<a href="#" onclick="deleteschedule(' . $row->id . '); return false;">Delete</a>'; $tmp = array('id' => $row->id, 'cell' => array($row->code, $row->flightnum, $row->depicao, $row->arricao, $row->aircraft, $row->registration, $route, Util::GetDaysCompact($row->daysofweek), $row->distance, $row->timesflown, $edit, $delete)); $json['rows'][] = $tmp; } header("Content-type: text/x-json"); echo json_encode($json); }
echo $selected; ?> >Monthly: <?php echo $monthname; ?> </option> <?php } ?> </select> <input type="submit" name="submit" value="View Report" /> </form> </td> <td align="right"> <form action="<?php echo adminurl('finance/viewreport' . $_SERVER['QUERY_STRING']); ?> " method="get"> <strong>Filter Financials: </strong> <input type="text" name="query" value="<?php if ($_GET['query']) { echo $_GET['query']; } else { echo '(Use % for wildcard)'; } ?> " onClick="this.value='';" /> <select name="type"> <option value="code">code</option> <option value="flightnum">flight number</option>