Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
VMS-283 VMS-284 VMS-285 VMS-286 VMS-287 VMS-288 #closed fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabeel Shahzad committed Apr 26, 2010
1 parent 503cbb8 commit 1b958a2
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 46 deletions.
2 changes: 1 addition & 1 deletion admin/templates/finance_expenselist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ foreach($allexpenses as $expense)
<td align="center"><?php echo $expense_list[$expense->type]; ?></td>
<td align="center" width="1%" nowrap>
<button id="dialog" class="jqModal button"
href="<?php echo adminaction('/finance/editexpense'.$expense->id);?>">
href="<?php echo adminaction('/finance/editexpense/'.$expense->id);?>">
Edit</button>
<button href="<?php echo adminaction('/finance/viewexpenses');?>" action="deleteexpense"
Expand Down
20 changes: 10 additions & 10 deletions core/common/OperationsData.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public static function getAllAirlines($onlyenabled=false)
{
if($onlyenabled == true)
{
$key = 'all_airline_active';
$key = 'all_airlines_active';
$where = 'WHERE `enabled`=1';
}
else
{
$key = 'all_airline';
$key = 'all_airlines';
$where = '';
}

Expand Down Expand Up @@ -288,17 +288,17 @@ public static function getAircraftInfo($id)
public static function getAirlineByCode($code)
{
$code = strtoupper($code);
$key = 'airline_'.$code;
/*$key = 'airline_'.$code;
$airline = CodonCache::read($key);
if($airline === false)
{
{*/
$airline = DB::get_row('SELECT * FROM '.TABLE_PREFIX.'airlines
WHERE `code`=\''.$code.'\'');

CodonCache::write($key, $airline, 'long');
}
/*CodonCache::write($key, $airline, 'long');
}*/

return $airline;
}
Expand Down Expand Up @@ -327,8 +327,7 @@ public static function addAirline($code, $name)
return false;

CodonCache::delete('all_airlines');
CodonCache::delete('all_airports_json');
CodonCache::delete('all_airline_active');
CodonCache::delete('all_airlines_active');

return true;
}
Expand All @@ -349,9 +348,10 @@ public static function editAirline($id, $code, $name, $enabled=true)

if(DB::errno() != 0)
return false;

CodonCache::delete('airline_'.$code);
CodonCache::delete('all_airports_json');
CodonCache::delete('all_airlines');
CodonCache::delete('all_airlines_active');

return true;
}
Expand Down
19 changes: 6 additions & 13 deletions core/common/PIREPData.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,21 @@ public static function getIntervalDataByDays($where_params, $interval='7')
*/
public static function getIntervalData($where_params, $grouping='M')
{
if(strtolower($grouping) == 'y')
$grouping = strtolower($grouping);

if($grouping == 'y')
{
$format = '%Y';
}
elseif(strtolower($grouping) == 'm')
elseif($grouping == 'm')
{
$format = '%Y-%m';
}
elseif(strtolower($grouping) == 'd') /* go by day */
elseif($grouping == 'd') /* go by day */
{
$format = '%Y-%m-%d';
}

/*if(is_array($where_params))
{
$where_params['p.price'] = '> 0';
}
else
{
$where_params = array('p.price' => '> 0');
}*/

$sql = "SELECT DATE_FORMAT(p.submitdate, '{$format}') AS ym,
UNIX_TIMESTAMP(p.submitdate) AS timestamp,
COUNT(p.pirepid) AS total,
Expand All @@ -187,7 +180,7 @@ public static function getIntervalData($where_params, $grouping='M')
SUM(p.fuelprice) as fuelprice,
SUM(p.price) as price,
SUM(p.expenses) as expenses,
(SUM(p.pilotpay) * SUM(p.flighttime)) as pilotpay
SUM(p.pilotpay * p.flighttime) as pilotpay
FROM ".TABLE_PREFIX."pireps p";

$sql .= DB::build_where($where_params);
Expand Down
4 changes: 4 additions & 0 deletions core/templates/schedule_results.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ foreach($allroutes as $route)
Comment out these two lines if you don't want to.
*/
/* Check if a 7 is being used for Sunday, since PHP
thinks 0 is Sunday */
$route->daysofweek = str_replace('7', '0', $route->daysofweek);
if(strpos($route->daysofweek, date('w')) === false)
continue;
Expand Down
2 changes: 1 addition & 1 deletion core/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
930
931
14 changes: 14 additions & 0 deletions install/checkinstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,21 @@ function success($title, $txt)
{
success('OK', "PHP version is {$version}.x");
}
echo '<br />';

echo '<strong>ASP Tags</strong><br />';
$version = phpversion();
$version = substr($version, 0, 3);

$val = ini_get('asp_tags');
if(!empty($val))
{
error('Error!', 'The setting "asp_tags" in php.ini must be off!');
}
else
{
success('OK', 'ASP-style tags are disabled');
}



Expand Down
14 changes: 7 additions & 7 deletions install/hashlist
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ fac7c09a2f7b3c46a3c4d20ccb0eb2fb *./install/templates/s2_site_setup.tpl
07f3cdbc917e3438e893995298471387 *./install/templates/footer.tpl
2eb3981ca63cc0b739372502bcdbdac8 *./install/templates/success.tpl
98159de4e2de83127db1931eb35f818c *./install/update_437.sql
fb61f59a4e1eb0f51ca5c9201b571ba5 *./install/checkinstall.php
685ffe63c3a02fc1e4761db6603eb5df *./install/checkinstall.php
c6384626328e54dd77c534d04ff65a44 *./install/update_700.sql
dba6000718fa86a775d0c3b5b1d3b77e *./install/update.sql
59e0a341d050b8ec19d8f423371c243e *./install/update.sql
d41d8cd98f00b204e9800998ecf8427e *./install/index.php
55c3722f079209f61fcfce707f077548 *./install/update_400.sql
56522f3521444add8835afbba7375a11 *./install/update_854.sql
0e366f4d9910ffc37ecb4051a93cf7df *./install/dbtest.php
1f9b378702e30ecf337e62eaddf6703c *./install/install.sql
57d1540938c2d737956ada10375bd73f *./install/install.sql
1ee77934d1a602e9c74861c9391a55d9 *./install/update_628.sql
c272ba4d5e3656768e851f448face751 *./install/loader.inc.php
20aed0ce417ba947f254459309b4ac1f *./install/Installer.class.php
Expand All @@ -27,7 +27,7 @@ d4d204c3560c283fa4d7a3a367473740 *./install/navdata.sql
654a8ef74503b880f8526873986da3af *./install/install.php
0ce9f88088bd78d869525b8b202fb1bd *./core/lang/en.lang.php
02813e8f573062b56012fea15bccde90 *./core/common/MaintenanceData.class.php
a7f3dcafa34f2484a5be9cac106d5f6a *./core/common/PIREPData.class.php
f53e180a3683b6fc8f7aacf3dcaada2d *./core/common/PIREPData.class.php
38c88cbada3413d09adc5255428fa579 *./core/common/Auth.class.php
26e225d004bd0b758c49f994453aaac7 *./core/common/jqgrid.class.php
d8cc600bc66b4e2afb1cca5b433fdeb7 *./core/common/RegistrationData.class.php
Expand All @@ -51,13 +51,13 @@ aaeea0a1746813611fd2258bcdb6f494 *./core/common/FuelData.class.php
8cf715ca3f9710c6fa9cedb383fbab37 *./core/common/ChartGraph.class.php
c811db29accce3ea2beff8804a012daa *./core/common/DownloadData.class.php
8511673219501abab65952bdc1cb7033 *./core/common/ACARSData.class.php
bd1bf3ac2ef48b9a675baea9d5233baa *./core/common/OperationsData.class.php
feff42124dde394cd1a4c946dab95aea *./core/common/OperationsData.class.php
54d08de34e14adf506930c9433320756 *./core/common/CronData.class.php
e1634f73751a74d4d411612fd3a9f307 *./core/common/OFCharts.class.php
a3311e897e99e5d9f331fabc56ddbc2b *./core/common/CentralData.class.php
ad22d5c59925bc27a300dd27675a2ff8 *./core/templates/profile_badge.tpl
0600b921789561619e2a4a83385ff5ec *./core/templates/email_registrationdenied.tpl
b195f3a46b86daad7fb6f99a6d080594 *./core/templates/schedule_results.tpl
4765d3d07b673cf8a400e25c16ca6788 *./core/templates/schedule_results.tpl
c931d63eba29c5891bc3d8738b330631 *./core/templates/pireps_viewall.tpl
22c17523e1759462fdf5ef978b8acd40 *./core/templates/fsfk_log_flightimages.tpl
6d692049399ca6ac1665b2e81ba3c1a0 *./core/templates/reqlogin.tpl
Expand Down Expand Up @@ -270,7 +270,7 @@ d003a142bf7c4bc1d7a9bb798ffbb13c *./admin/templates/awards_awardform.tpl
1aa8e3acd547055ee81767664da9361e *./admin/templates/pages_editpage.tpl
80a3a493203654f42d1d3abba5084916 *./admin/templates/sidebar_ranks.tpl
d70b94341a9608d8684060cb91164cdb *./admin/templates/sidebar_customfields.tpl
08cab3f2a425b1f2994a8a1b4a792088 *./admin/templates/finance_expenselist.tpl
d6075792c84954948feb3bf423d7344c *./admin/templates/finance_expenselist.tpl
0cf57246059a8c42b1e3a6e9eb5db504 *./admin/templates/sidebar_financial.tpl
fe4396a5e7460f8f0eafe53595f2ddab *./admin/templates/settings_mainform.tpl
64bd90ac0877b44a5a121eef0001a6c6 *./admin/templates/sidebar_downloads.tpl
Expand Down
2 changes: 1 addition & 1 deletion install/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -415,4 +415,4 @@ INSERT INTO `phpvms_settings` VALUES(NULL, 'Webmaster Email Address', 'ADMIN_EMA
INSERT INTO `phpvms_settings` VALUES(NULL, 'Date Format', 'DATE_FORMAT', 'm/d/Y', 'This is the date format to be used around the site.', 1);
INSERT INTO `phpvms_settings` VALUES(NULL, 'Current Skin', 'CURRENT_SKIN', 'crystal', 'Available skins', 1);
INSERT INTO `phpvms_settings` VALUES(NULL, 'Default User Group', 'DEFAULT_GROUP', 'Active Pilots', 'This is the default group if they are not explicitly denied', 1);
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your VA''s Total Hours', 0);
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your total hours', 0);
26 changes: 13 additions & 13 deletions install/structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
<field Field="hub" Type="smallint(6)" Null="NO" Key="" Default="0" Extra="" />
<field Field="fuelprice" Type="float" Null="NO" Key="" Default="0" Extra="" />
<field Field="chartlink" Type="text" Null="NO" Key="" Extra="" />
<key Table="phpvms_airports" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="553" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_airports" Non_unique="0" Key_name="icao" Seq_in_index="1" Column_name="icao" Collation="A" Cardinality="553" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_airports" Engine="InnoDB" Version="10" Row_format="Compact" Rows="389" Avg_row_length="168" Data_length="65536" Max_data_length="0" Index_length="16384" Data_free="6291456" Auto_increment="1469" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
<key Table="phpvms_airports" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="213" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_airports" Non_unique="0" Key_name="icao" Seq_in_index="1" Column_name="icao" Collation="A" Cardinality="213" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_airports" Engine="InnoDB" Version="10" Row_format="Compact" Rows="82" Avg_row_length="799" Data_length="65536" Max_data_length="0" Index_length="16384" Data_free="6291456" Auto_increment="1469" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
</table_structure>
<table_structure name="phpvms_awards">
<field Field="awardid" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
Expand Down Expand Up @@ -350,21 +350,21 @@
<field Field="notes" Type="text" Null="NO" Key="" Extra="" />
<field Field="enabled" Type="int(11)" Null="NO" Key="" Default="1" Extra="" />
<field Field="bidid" Type="int(11)" Null="NO" Key="" Default="0" Extra="" />
<key Table="phpvms_schedules" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="flightnum" Seq_in_index="1" Column_name="flightnum" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="2" Column_name="arricao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="code" Seq_in_index="1" Column_name="code" Collation="A" Cardinality="1" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_schedules" Engine="InnoDB" Version="10" Row_format="Compact" Rows="217" Avg_row_length="302" Data_length="65536" Max_data_length="0" Index_length="65536" Data_free="6291456" Auto_increment="116" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
<key Table="phpvms_schedules" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="flightnum" Seq_in_index="1" Column_name="flightnum" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="2" Column_name="arricao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_schedules" Non_unique="1" Key_name="code" Seq_in_index="1" Column_name="code" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_schedules" Engine="InnoDB" Version="10" Row_format="Compact" Rows="25" Avg_row_length="2621" Data_length="65536" Max_data_length="0" Index_length="65536" Data_free="6291456" Auto_increment="116" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
</table_structure>
<table_structure name="phpvms_sessions">
<field Field="id" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
<field Field="pilotid" Type="int(11)" Null="NO" Key="" Extra="" />
<field Field="ipaddress" Type="varchar(25)" Null="NO" Key="" Extra="" />
<field Field="logintime" Type="datetime" Null="NO" Key="" Extra="" />
<key Table="phpvms_sessions" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="61" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_sessions" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="61" Avg_row_length="32" Data_length="1992" Max_data_length="281474976710655" Index_length="2048" Data_free="0" Auto_increment="1796" Create_time="2009-10-31 20:05:09" Update_time="2010-04-22 23:53:55" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
<key Table="phpvms_sessions" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="191" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_sessions" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="191" Avg_row_length="32" Data_length="6152" Max_data_length="281474976710655" Index_length="4096" Data_free="0" Auto_increment="1926" Create_time="2009-10-31 20:05:09" Update_time="2010-04-26 13:53:37" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
</table_structure>
<table_structure name="phpvms_settings">
<field Field="id" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
Expand All @@ -383,7 +383,7 @@
<field Field="lastupdate" Type="datetime" Null="NO" Key="" Extra="" />
<key Table="phpvms_updates" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
<key Table="phpvms_updates" Non_unique="1" Key_name="name" Seq_in_index="1" Column_name="name" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
<options Name="phpvms_updates" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="9" Avg_row_length="33" Data_length="300" Max_data_length="281474976710655" Index_length="3072" Data_free="0" Auto_increment="10" Create_time="2009-12-20 17:51:29" Update_time="2010-04-22 14:14:01" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
<options Name="phpvms_updates" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="9" Avg_row_length="33" Data_length="300" Max_data_length="281474976710655" Index_length="3072" Data_free="0" Auto_increment="10" Create_time="2009-12-20 17:51:29" Update_time="2010-04-26 13:52:51" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
</table_structure>
</database>
</mysqldump>
3 changes: 3 additions & 0 deletions install/update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ ALTER TABLE `phpvms_schedules` ADD `route_details` TEXT NOT NULL AFTER `route`;
ALTER TABLE `phpvms_aircraft` ADD `minrank` INT NOT NULL DEFAULT '0' AFTER `maxcargo`;
ALTER TABLE `phpvms_aircraft` ADD `ranklevel` INT NOT NULL DEFAULT '0' AFTER `minrank` ;

-- It's sometimes missing
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your total hours', 0);

-- Remove deprecated settings;
DELETE FROM `phpvms_settings` WHERE `name`='PHPVMS_VERSION';
DELETE FROM `phpvms_settings` WHERE `name`='NOTIFY_UPDATE';
Expand Down

0 comments on commit 1b958a2

Please sign in to comment.