ARV187
-
Posts
260 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by ARV187
-
-
Hi Vangelis,
1.- the initial code is made with macromedia dreamweaver.
mysql_select_db($database_byethost, $byethost);
$query_Ruta1 = "SELECT `phpvms_pireps`.`pilotid` , `phpvms_pireps`.`accepted` FROM phpvms_pireps WHERE ( ( `phpvms_pireps`.`flightnum` ='HAW1' ) AND ( `phpvms_pireps`.`accepted` =1 ) ) ORDER BY `phpvms_pireps`.`pilotid` ASC LIMIT 0 , 300";
$Ruta1 = mysql_query($query_Ruta1, $byethost) or die(mysql_error());
$row_Ruta1 = mysql_fetch_assoc($Ruta1);
$totalRows_Ruta1 = mysql_num_rows($Ruta1);
the rest I am trying to do it by myself But not is finished because $ruta2 not work, (pilot 307).
2- That part is because im very novice in php & mysql. Only know make request to show the data.
-
Nobody? Really? its a joke?
-
Is Best that you post it here, anyway where are the images?
-
Hi all, im trying make a progress tour table. My actual table is showing the results in vertical with this scheme:
pilotid-nºflight-accepted
arv187-f1-1
arv187-f2-1
arv187-f3-1
arv220-f1-1
arv220-f2-1
arv220-f3-1
You can see a example here: http://argavirtual.b...la de tours.php
This is a bad table then i want show results in horizontal mode, as seen in the example image:
But not work well, you can see in the first table (vertical table) that pilot id "307" only have complete the first flight "Ruta1"(HAW1), but in the image attachet he have put a "accepted=1" in "Ruta2"(HAW2). This point exceeds my knowledge and im blocked.
This is the code:
if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_byethost, $byethost); $query_Ruta1 = "SELECT `phpvms_pireps`.`pilotid` , `phpvms_pireps`.`accepted` FROM phpvms_pireps WHERE ( ( `phpvms_pireps`.`flightnum` ='HAW1' ) AND ( `phpvms_pireps`.`accepted` =1 ) ) ORDER BY `phpvms_pireps`.`pilotid` ASC LIMIT 0 , 300"; $Ruta1 = mysql_query($query_Ruta1, $byethost) or die(mysql_error()); $row_Ruta1 = mysql_fetch_assoc($Ruta1); $totalRows_Ruta1 = mysql_num_rows($Ruta1); mysql_select_db($database_byethost, $byethost); $query_Ruta2 = "SELECT `phpvms_pireps`.`pilotid` , `phpvms_pireps`.`accepted` FROM phpvms_pireps WHERE ( ( `phpvms_pireps`.`flightnum` ='HAW2' ) AND ( `phpvms_pireps`.`accepted` =1 ) ) ORDER BY `phpvms_pireps`.`pilotid` ASC LIMIT 0 , 300"; $Ruta2 = mysql_query($query_Ruta2, $byethost) or die(mysql_error()); $row_Ruta2 = mysql_fetch_assoc($Ruta2); $totalRows_Ruta2 = mysql_num_rows($Ruta2); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table border="5" cellpadding="2" cellspacing="2"> <tr> <td>pilotid</td> <td>Ruta1</td> <td>Ruta2</td> <td>Ruta3</td> <td>Ruta4</td> <td>Ruta5</td> <td>Ruta6</td> <td>Ruta7</td> <td>Ruta8</td> <td>Ruta9</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Ruta1['pilotid']; ?></td> <td><?php echo $row_Ruta1['accepted']; ?></td> <td><?php echo $row_Ruta2['accepted']; ?></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <?php } while ($row_Ruta1 = mysql_fetch_assoc($Ruta1)); ?> </table> </body> </html> <?php mysql_free_result($Ruta1); mysql_free_result($Ruta2); ?>
- 1
-
<?php
error_reporting(E_ALL & ~E_NOTICE);
$db = mysql_connect('localhost', 'db username goes here', 'db password goes here');
mysql_select_db('db server name goes here');
define('NAV_NDB', 2);
define('NAV_VOR', 3);
define('NAV_DME', 4);
define('NAV_FIX', 5);
Only db server name? not db name?
Not work to me, in putty I enter the webpage of VA or name server... but i get error network no work time out.
I find this option:
-
Is there another way without putty? i dont know how work that program
-
After i will try it. thanks by the aportation
-
Can I change the type to "imagelink" & "downloadlink" from text to varchar? I read that varchar is best to show much url in same table
-
Ok, was easy, im a ignorant jeje. Never get up without learn anything new.
All extra ceros was erased, and data sorted correctly.
Thanks!
- 1
-
Hi itrobb
weight is how:
weight varchar(15)
by default in aircraft table
I dont know how change it, and if is dangerous make a change in DB.
Anyway I changed all airplanes weigth to six digits and work.
Thanks.
-
See the attached image in first post, in mysql is sorted wrong, because makes a comparison number by number, not by the total amount.For example, with tu154 & extra300, the heavy aircraft is tu154, but he compare digit by digit:
122000
1342
1 & 1 (same number), 2 & 3 (three is greater than two) then sql sort the extra-300 (1342lbs) in second place because in their opinion is greater.
Only work if i put the same number of digits, For example six digits: Tu-154 (122000) and extra-300 (001342)
-
Yes, with ASC included. The problem is how sql orders the data, digit to digit, from left to right, not the full cuantity.
-
Thanks, a moderator must move topic then.
-
Hi itrobb, then to a homemade table what is the correct place in forum?
About my question, yes, that is my code, but not work because compare digit by digit, not the full number.
Only i find one solution, set all weight aircraft with same digit numbers. But is a long work.
-
Hi all,
Im trying make a aircraft table, the only part that fault me is order by weight.
The data not is been order correctly (see image):
............ FROM phpvms_aircraft ORDER BY phpvms_aircraft.weight";
Seems that fail is in order number by number and not full cuantity. Ex, order by weight ASC:
12005324 (the fourth digit is smaller than 3)
1203 (the fourth digit is bigger than 0)
The heavier aircraft is ordained as the lightest
How i can resolve this?
Thanks, regards...
-
Download the old version under releases, it has the files with the tpl extensions. - https://github.com/D...ooking/releases
Sim pilot, with v2.0, in /admin/templates/events folder, now i have .php & .tlp files, is rigth or i must delete anything?
In /core/templates/events too.
-
Hi,
I have a issue with events, This week i created a event for today at 18h (+1 UTC), and now the event is in past events, actually here are 11:28h (UTC +1).
How I fix that?
OH, i see in github a 2.0 version is right?, i have the v1.3
-
Hi Nabeel, what is this? a update to phpvms?
-
I read this in Va central tips & tricks:
-
Enter proper flight times in your schedules
How work this?
we must set the departure & arrive time in admin panel (edit schedule), or is enough with flight time?
If a pilot takes more time than specified or less remove points in va central?
How win points?
Regards!
-
Enter proper flight times in your schedules
-
thanks for the clarification simpilot.
-
So, what is a 2.1.938 version? is a future version?
-
Yes, i know, but in the file "changelog.htm" I can see differents versions...
-
The page was hacked, i deleted all files with data from 09/30/2013, after restore a backup from 09/13/2013, and patch it with nabeel updated file. I think that is all. Thanks guys by support.
-
Hi Nabeel,
I'm a little confused, the latest changelog.htm file says Version 2.1.938:
Build 938 (Version 2.1.938)
Patched the php-ofc-library to remove an exploit
Build 937 (Version 2.1.937)
Navigation data included for routes, more accurate maps for schedules, ACARS and PIREPS
Financial backend overhauled, all data is in real-time, and more accurate
Expenses are saved, so your expenses will stick and stay different, month-to-month
Aircraft can now be tied to a minimum rank to fly them
All charts/graphs replaced with new OFC (Open Flash Charts)
Google Maps replaced with v3 API (no more key needed!
Added reCaptcha support into the registration.
New format for skinning - whole page layout
Ability to change a pilot's ID
Send mass-email to specific groups
Maintenance cron-script, for faster/more efficient background processing
Added 'profile badge' page with links to your signature in various formats
And numerous bug fixes
Templates Changed:
core_htmlhead.tpl - Javascript all cleaned up, path to Google Maps API changed for v3
acarsmap.tpl - Completely changed with map customizations (I would just start from scratch)
route_map.tpl - Rewritten to accomodate v3 API (I would just start from scratch)
profile_myroutesmap.tpl - Removed, replaced with flown_routes_map.tpl, used for RouteMap
pirep_new.tpl - Added field for route, and aircraft restriction for rank
schedule_results.tpl - Aircraft restriction for rank
registration_mainform.tpl - Replaced old captcha with reCaptcha
registration_customfields.tpl - Bug fixed with textarea field type
finance_summarysheet.tpl - Updated for new finances
finance_header.tpl - Updated for new finances
finances_balancesheet.tpl - Updates for new finances
contact_form.tpl - Implemented reCaptcha
In my admin page i can see this:
"'S'mofo butter layin' me to da' BONE! Jackin' me up... tight me!"
Copyright © 2007 - 2013 phpVMS, nsslive.net
License & About | Version 2.1.936
What is the last version?
Tours table
in Code Snippets
Posted
Hi, i updated this topic here: http://forum.phpvms.net/topic/20195-help-to-developer-a-free-progress-tour-table/