Jump to content

Felipe

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Felipe

  1. Yes, I have! Please, check file attached. Untitled-1.zip
  2. How did you get your actual route working on the Flight Report map? I just get a straight line...
  3. Hello, Nabeel! Thank you so much for this information. Anyway, is there anything like this for the Contact form as well? Regards!
  4. MrDonutButter, do you paint the A319 CFM by Aerosoft?
  5. I tried Kyle's suggestion above and still was getting an error. So I made some changes on it and now it's working fine. Finally I don't need an extra script on my server just to remove expired bids... Thanks Kyle for the great help! public static function deleteExpiredBids(){ $cache_time = Config::Get('BID_EXPIRE_TIME'); if($cache_time == ''){ return; } $selectbids = 'SELECT * FROM ' . TABLE_PREFIX . "bids WHERE `dateadded` + INTERVAL {$cache_time} HOUR < NOW()"; $results = DB::get_results($selectbids); $deletebids = 'DELETE FROM '.TABLE_PREFIX."bids WHERE `dateadded` + INTERVAL {$cache_time} HOUR < NOW()"; if(count($results) > 0){ foreach ($results as $row){ DB::query($deletebids); $updateschedules = 'UPDATE ' . TABLE_PREFIX . "schedules SET `bidid`=0 WHERE `id`={$row->routeid}"; DB::query($updateschedules); } } }
  6. Hi, everybody! I'm trying to translate those messages in the Activity Feed, on phpVMS 5.5.x, such as "PILOT_NAME has just joined, welcome aboard!" or "PILOT_NAME has been promoted to NEW_RANK". Those kind of messages are inserted on phpvms_activiityfeed table in the database. I've searched the class, the module and the template files to try to find where those messages are coming from, so I can translate them into portuguese, but I just can't find it. Could anybody help me with that path? Thank you!
  7. Run a cron job on server
  8. I was about to ask it. But... how about all available ones? If possible, of course...
  9. I also have kACARS custom and in my case the map isn't even shown on the page. Example: http://vai.aero/index.php/pireps/view/5715 (it should be below that "Mapa da Rota" [portuguese for Route Map] title.)
  10. servetas, in fact, my "problem" is not if the user is logged in or not. Actually, it doesn't really matter. The point in here is whheter the request is the frontpage_main.tpl or any other one.
  11. Hello, servetas! This was my first try, but, actually, I realized the are some "" that should be shown to both logged in and not. I guesse the best solution would be working on the layout.tpl, since this part... <ul class="nav"> <?php Template::Show('core_navigation.tpl'); ?> </ul> ... fits for what I want. I just have to have an if() statement in here to check if the request is for the frontpage_main.tpl or any other .tpl.
  12. I wonder if anybody in here would help me, please, solve the following... I'm coding my web site template to have two menus, in accordance to the requested ".tpl" file. Actually, in case the user is requesting the frontpage_main.tpl, it should use one block of html tags, and in case it is any other .tpl file, it should be another block of html tags. So my question is: is there any phpVMS native class + method I can put in the if() statement to check which .tpl file the user is requesting? Id it does not, how could I solve it by simply using php?
  13. I couldn't. Too far advanced for my skills...
  14. Right now, I'm trying to set this altnicao on my schedule module. Since I'm just a newbie in PHP and MySQL, I ask you guys for some help, that might be usefull to our friend Jacubovsky too. These are the steps I took up to now: 1. Added a new column on phpvms_schedules ALTER TABLE `phpvms_schedules` ADD column `altnicao` VARCHAR( 4 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; 2. Set the view inside a table with the other ready data on schedule_briefing.tpl. It is already working, since I tested it manually, filling the altnicao column on the DB. But I'll tell you what my "problem" is in the end.. Keep reading, please. <th class="col-lg-3">Aeroporto de Origem</th> <td> <?="{$schedule->depname} ($schedule->depicao). ";?><em>Baixar as <a href="https://charts.aero/airport/<?=$schedule->depicao; ?>" target="_blank">cartas aéreas</a>.</em> </td> </tr> <tr> <th class="col-lg-3">Aeroporto de Destino</th> <td> <?="{$schedule->arrname} ($schedule->arricao). ";?><em>Baixar as <a href="https://charts.aero/airport/<?=$schedule->arricao; ?>" target="_blank">cartas aéreas</a>.</em> </td> </tr> <tr> <th class="col-lg-3">Aeroporto de Alternativa</th> <td> <?="{$schedule->altnname} ($schedule->altnicao). ";?><em>Baixar as <a href="https://charts.aero/airport/<?=$schedule->altnicao; ?>" target="_blank">cartas aéreas</a>.</em> </td> </tr> 3. Then, I began to search in the core/modules/Schedules/Schedules.php which method I should modify. I found it at: public function brief($routeid = ''){ if($routeid == '') { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $schedule = SchedulesData::getScheduleDetailed($routeid); $this->set('schedule', $schedule); $this->render('schedule_briefing.tpl'); } 4. So I headed to the "public static function getScheduleDetailed($id)" at core/common/SchedulesData.class.php. Actually, It took me some lines up to this: public static function findSchedules($params, $count = '', $start = '') { $sql = 'SELECT s.*, a.id as aircraftid, a.name as aircraft, a.registration, a.minrank as aircraft_minrank, a.ranklevel as aircraftlevel, dep.name as depname, dep.lat AS deplat, dep.lng AS deplng, arr.name as arrname, arr.lat AS arrlat, arr.lng AS arrlng FROM '.TABLE_PREFIX.'schedules AS s LEFT JOIN '.TABLE_PREFIX.'airports AS dep ON dep.icao = s.depicao LEFT JOIN '.TABLE_PREFIX.'airports AS arr ON arr.icao = s.arricao LEFT JOIN '.TABLE_PREFIX.'aircraft AS a ON a.id = s.aircraft '; /* Build the select "WHERE" based on the columns passed, this is a generic function */ $sql .= DB::build_where($params); // Order matters if(Config::Get('SCHEDULES_ORDER_BY') != '') { $sql .= ' ORDER BY '.Config::Get('SCHEDULES_ORDER_BY'); } if(strlen($count) != 0) { $sql .= ' LIMIT '.$count; } if(strlen($start) != 0) { $sql .= ' OFFSET '. $start; } $ret = DB::get_results($sql); return $ret; } So I guess it is in there where my problem is... Since I know the "$schedule->altnicao" is already woking fine on schedule_briefing.tpl, I guess that first query on that $sql variable needs some extra instructions, so I can have the "$schedule->altnname" also working on my schedule_briefing.tpl. I guess this altnicao name would come from the phpvms_airports table... Since I know almost nothing on inner, left or right join, I ask you guys for the solution for that, please. Later I'll try to modified the admin schedules module to add the altnicao through the admin center, instead of directly on the DB. If I get it working, I'll post it in here. Otherwise, I'll come back for help once again. Thanks!
  15. I was having that too. I fixed it by using the CondonRewrite.class.php of David Clark's extended version on Nabeel's full version downloadable here in phpvms.net and this .htaccess. It works 100% for me now. # main page of the site DirectoryIndex index.php # prevent viewing of a specific file <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$"> Order Allow,Deny Deny from all </FilesMatch> # prevent viewing of index Options +FollowSymLinks Options All -Indexes #Can give without index.php for the modules RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L]
  16. Felipe

    VAForum 2

    Hello, Tom! I don't know if anyone suggested before, but is there any possibility of updating it to have some BBCode to post Youtube videos?
  17. Yes, try this one: https://github.com/DavidJClark/phpVMS_extended
  18. I'm facing this same problem, since I changed to a new hosting service on last March 9th. I have this on line 171: $key_month = date('MY', $start); Then, it makes me think it might be the date() function, since I've googled "A non well formed numeric value encountered" and it returned me... http://stackoverflow.com/questions/6136430/a-non-well-formed-numeric-value-encountered http://forums.phpfreaks.com/topic/160271-solved-a-non-well-formed-numeric-value-encountered/ So, I've changed line 171 to... $key_month = date('i', $start); ... and I'm now expecting the cron to run to see if it works. On this new hosting, I'm using PHP 5.3.x. If I get it working again, I'll post here.
  19. Felipe

    VAForum 2

    Use Notepadd++ to edit all the add-on files. On the menu "Format" switch all of the to "UTF-8 without BOM". That's it.
  20. Hello, Dimitris! I'm interested i this script, but it is no longer available in midiafire and clicking on your "Online Status", I get a messed file. It there any other way you can share it with us?
  21. Hello, Fernando! VAI VA is mine. This registration system I developed with the precisious help of two guys: Icaro Souza and Filipe Leandro. We made a hard php programming inside the registraion tpl. It has three steps. The first one is this that checks online, real time, if the pilot's profile on IVAO or on Vatsim matches our requirements. If so, it lets de pilot go to the second one, which is a theorical exam with 20 questions from a random query on our DB. If the pilot get 75%, then it allows him to field the registration for that comes natively in phpVMS but with some more modifications to match our needs. And more.. In case the pilot fails the exam or does not have the requirements it blocks him for 7 days (in case of failing the exam) and for the time needed until he/she gets the requierements on IVAO/Vatsim. That's it, basically. All I have to do then is to accept or reject the registration. There is no need to worry if the pilot matches or not the requierements because the system has already done it for me.
×
×
  • Create New...