Jump to content

ahughes3

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by ahughes3

  1. Anyone who runs their own small business and manages their own website, this is for you. Some great tips to help your website perform better in Google rankings.https://www.facebook.com/permalink.php?story_fbid=1072924189419469&id=146178945427336

  2. Ok, for those that are interested, I have created a form on my website so that you can adjust various options before generating the SimBrief OFP. I have written a post about it. Below is the link to the post. http://forum.phpvms.net/topic/23385-simbrief-form-to-tailor-ofp-result/ I use it in conjunction with Vangelis' module and it works perfectly. In essence it utilises the hidden form elements to allow tailoring of the resulting OFP. I have put the files on Github. I've not used Github before so I'm not sure if I've uploaded them correctly. Any problems, message me. Thanks Vangelis, keep up the great work
  3. Firstly, thank you to Vangelis for all the great work and support he gives to the community. I only wish I were half as capable! I have been using the community for a long time now and I am not often in the position to offer much back other than comments on posts. Hopefully, this will make up for it. Like many, I am using Vangelis' SimBrief addon, which creates a button that allows you to generate a SimBrief OFP. This worked great for a while on my airline site, but having used SimBrief itself, I wanted more control over the information used in my flight planning. I wanted something a little more like the Dispatch System used on SimBrief's website. I set about creating a form that I could use to specify some settings, before generating the OFP itself. After much playing around with ideas and combinations, I came up with something that works really well for me and creates a very accurate OFP. I wanted to share it on here and give a little something back. What this addon does. It provides a form that allows you to configure the following aspects of your flight plan: Aircraft type Weight unit preference (lbs or kgs) The departure and destination airports Contingency fuel amount Reserve fuel amount (time based) Detailed or simple Navlog ETOPS planning Stepclimb detail Runway analysis NOTAMS inclusion Flight Map detail Plan layout (LIDO, BAW etc) Route preference Any of these options can be switched on or off, or adjusted before clicking the "Generate OFP" button. You can also configure the form by deleting or hiding elements you don't want pilots to change or control. Readme from Github A form to allow options to be altered before generating the SimBrief OFP. NOTE: This addon is designed to work with the SimBrief Addon by Vangelis on PHPVMS Forums. You must have this installed for this functionality to work. http://forum.phpvms....ief-for-phpvms/ I am also using David Clark's version of PHPVMS where the templates are in .php format rather than .tpl. If you have an older version and your template files are .tpl, simply alter the file extension as required and the file should work. You must also have a SimBrief API key which is expained in Vangelis' module and you also need to register for a free SimBrief account for the form to work as it needs to make a connection to SimBrief itself. INSTALLATION Download the "schedules_briefing.php" file from here. It is optional if you want to download the "style.css" file. It gives you the custom styles I have used for my form and page. You may want to use your own sites styling for the form and tables. If you are using a custom skin for phpvms then you will need to place the "schedules_briefing.php" file in /lib/skins/(your skin name). If you are not using a custom skin, then you should place the file in /core/templates/. If you wish to use my styling, you can just copy and paste the styles from my "style.css" to your style file. For a custom skin this is likely to be /lib/skins/(your skin name)/css/style.css. For a vanilla phpvms install, your style file should be located in /lib/css/phpvms.css. If you want to use your own styling, then you need to change the following html tag references in the "schedules_briefing.php" file you downloaded. Change "classic-title5" to one of your own header styles The "call-action" is a Boostrap3 box. The styling of the box is controlled by "call-action-style1. <div class="call-action call-action-boxed call-action-style1 no-descripton clearfix"> This controls the general styling of the container and it's elements that house the tables. <div class="schedule-briefing"> This controls the specific table style. You can simply overwrite "briefing-table" with your own style classname. <table class="briefing-table"> The "dispinput" styles the input and select form elements on the page. <select class="dispinput" name="date" id="date"> <p>Once you've uploaded the schedule_briefing.php file, you need to also edit the following line at the bottom of the file. Replace the url from my form (highlighted bit below) . <button type="button" style="width:100%" class="btn btn-success btn-lg" onclick="simbriefsubmit('http://www.globalairalliance.com/index.php/SimBrief');" style="font-size:30px" value="Generate">Click to Generate OFP> with yours as shown below. <button type="button" style="width:100%" class="btn btn-success btn-lg" onclick="simbriefsubmit('http://Your website URL here/index.php/SimBrief');" style="font-size:30px" value="Generate">Click to Generate OFP</button> To add the "dynamically called fleet" from your database, you also need to download and install the "OperationsData.class.php file and copy it to your "core/common" directory. Rename your existing file to "OperationsData.class.phpOLD" so you have a backup, just incase anything breaks. That's it, you should be good to go. To test it, bid on a flight, go to "view my bids" and click on "pilot brief". You should now see your form. Adjust the settings as you need and press on the "Click to Generate OFP". You should now see your OFP complete with accurate timings and fuel predictions. Enjoy! Link to Github files Credits: Vangelis, Web541, Strider, Keith
  4. Ah see, I knew if I picked your brains you'd spot my error! Indeed, I didn't realise I had a copy of it in the skins folder. I spent ages going back and forth between my two url files. Now edited it and it's working perfectly. Thanks for your help as always
  5. Honest answer, I don't know but I assume it is. I emailed Derek from Simbrief originally and he gave me the API key. I then entered the API into the simbrief.apiv1.php file. My schedule_briefing.php doesn't contain any reference to our site url at all. In Baggelis' original post he talks about amending line 195 in schedule_briefing but my file doesn't go up to that.
  6. Hi all, I have recently transferred my VA to a new URL and have managed to kind of get the simbrief module working. I have an API key from simbrief and have changed the reference url in the simbrief.js file, however, when the simbrief ofp is returned the output page is the old Virgin Atlantic url. I can't see where this redirect can be happening from. Any ideas? Could it be to do with simbrief itself and the API key settings at their end? Thanks
  7. Hi all, I am trying to implement a new admin skin and so far, I have the skin kind of looking ok with help from Vangelis and Web541. However, the more I get into it, the more I encounter errors and conflicts with what seems to be the version of jQuery that the default phpvms uses and the latest jQuery that is available, and used by the skin I have. What seems to break is the use of buttons that I am assuming process ajax to retrieve info from the database and then return it into the page. When I switch skins, it breaks the buttons to do everything from accept a pirep to accepting/rejecting pilots. I am only assuming this is a jQuery/Ajax issue as that seems to be the most common explanation when I research it. So my question is; what can I do to be able to use the latest versions of jQuery without breaking the older functionality of the site? Can I attempt to update whatever the old code is that doesn't seem to work in the latest jQuery? I don't know coding that well but willing to try and do it with a bit of support. Or would using something like Modernizr and Migrate fix issues so I don't have to worry about it? I already have Migrate installed which seems to bring some functionality back but not perfectly. When I try to use Modernizr, the whole site breaks and I just get a blank screen. I have spent a huge amount of time already on trying to complete this admin skin and I am loathed to just throw it all away because it's too difficult so I appreciate any knowledge, support that people can offer and share to help me work out how to fix this. Thanks
  8. I've noticed that since I've applied my new skin template, the ajax calls don't seem to be working from phpvms. Things like buttons to accept pireps or pilots don't do anything. I know this obviously means that the buttons in question are not able to find the scripts and therefore do nothing. The scripts I am talking about are the ones inside the "module" folders in the admin section eg. the PirepAdmin.php file inside the PirepAdmin folder. My question is why? I have both the phpvms files and my template files located in the head and foot of the main page. Could it be something as silly as the order in which the files are stacked in the list? I have tried moving one or two but it makes no difference.
  9. Well bizzarely, I refreshed the page and it seemed to work. Well kind of! The modal box pops up but it keeps showing the same info for all pireps i.e. if I click on the log for one pirep and then go to another pirep, the content from the first still appears in the modal like it's not refreshing the data. Any thoughts?
  10. Ok next challenge. The built in modal popup is not working now with my new skin. I suspect it is probably jquery conflict with files from the new skin. In the existing "pireps_list" admin page the code for the pirep log is as follows: <button class="jqModal {button:{icons:{primary:'ui-icon-script'}}}" id="dialog_details" href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/viewlog?pirepid=<?php echo $pirep->pirepid;?>">Log</button> My question is, how would I convert the above code to work with Bootstrap Modal? The code for the BS one is as follows: <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Log</button> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> <div class="modal-body"> <?php echo SITE_URL?>/admin/action.php/pirepadmin/viewlog?pirepid=<?php echo $pirep->pirepid;?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> As you can see, I have pasted the code from phpvms into the Bootstrap code, and it pops up perfectly, except the content is just the URL for the pirep. So, clearly the phpvms system is taking that link and applying a look up of some sort in order to return the right content and not just a url. Any ideas on how the code would need to look to achieve the same with the Bootstrap code? Thanks
  11. Web541, thank you for taking the time and effort to help. Indeed it is because I placed most of the dashboard code in the header file. I didn't really see how it would make any difference (and still don't), but clearly it does as it's now working perfectly! Note to self: don't mess with the basic phpvms architecture Now I am off to try and work on getting the tables for pilots, fleet etc to show up properly. God give me strength!
  12. Of course. As I don't know what is causing the issue, I might as well past the entire page content. The section in question is enclosed within comment tags like so <!-- ********************** -->. I'll also include the head and footer references to css/js files, just in case you spot something there I am missing. Thanks guys. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>phpVMS Admin Panel</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::Get('PAGE_ENCODING');?>"> <link rel="alternate" href="<?php echo SITE_URL?>/lib/rss/latestpireps.rss" title="latest pilot reports" type="application/rss+xml" /> <link rel="alternate" href="<?php echo SITE_URL?>/lib/rss/latestpilots.rss" title="latest pilot registrations" type="application/rss+xml" /> <?php Template::Show('core_htmlhead.php'); ?> <!--[if IE]> <style type="text/css"> #sidebar1 { padding-top: 30px; } #mainContent { zoom: 1; padding-top: 15px; } </style> <![endif]--> </head> <body class="skin-blue sidebar-mini wysihtml5-supported"> <?php Template::Show('core_htmlreq.php'); ?> <div class="wrapper"> <header class="main-header"> <!-- Logo --> <a href="index2.html" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels --> <span class="logo-mini"><b>A</b>LT</span> <!-- logo for regular state and mobile devices --> <span class="logo-lg"><b>Global Air</b>Alliance</span> </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle navigation</span> </a> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" aria-expanded="false"> <span class="hidden-xs">ADMINISTRATION CENTRE</span> </a> </li> </ul> </div> </nav> </header> <!-- Left side column. contains the logo and sidebar --> <?php Template::Show('core_navigation.php'); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Dashboard <small>Control panel</small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Dashboard</li> </ol> </section> <!-- Main content --> <section class="content"> <!-- Small boxes (Stat box) --> <div class="row"> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-aqua"> <div class="inner"> <h3><?php echo StatsData::TotalFlightsToday();?></h3> <p>Flights Today</p> </div> <div class="icon"> <i class="ion ion-bag"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-green"> <div class="inner"> <h3><?php echo StatsData::TotalFlights(); ?></h3> <p>Total Flights</p> </div> <div class="icon"> <i class="ion ion-stats-bars"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-yellow"> <div class="inner"> <h3><?php echo StatsData::TotalHours(); ?></h3> <p>Total Hours Flown</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-red"> <div class="inner"> <h3><?php echo StatsData::TotalMilesFlown(); ?></h3> <p>Total Miles Flown</p> </div> <div class="icon"> <i class="ion ion-pie-graph"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-blue"> <div class="inner"> <h3><?php echo StatsData::TotalSchedules(); ?></h3> <p>Number of Routes</p> </div> <div class="icon"> <i class="ion ion-pie-graph"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-green"> <div class="inner"> <h3><?php echo StatsData::PilotCount(); ?></h3> <p>Number of Pilots</p> </div> <div class="icon"> <i class="ion ion-pie-graph"></i> </div> </div> </div><!-- ./col --> </div><!-- /.row --> <!-- Main row --> <div class="row"> <!-- Left col --> <section class="col-lg-7 connectedSortable"> <div class="box box-default"> <div class="box-header with-border"> <i class="fa fa-bullhorn"></i> <h3 class="box-title">Last 30 days pireps</h3> </div> <!-- /.box-header --> <div id="myfirstchart" style="height: 250px;"></div> <!-- /.box-body --> </div> <div class="row"> <!-- Users & Guests box --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-yellow"> <div class="inner"> <h3><?php echo count(StatsData::UsersOnline()); ?></h3> <p>Users Online:</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> </div> </div><!-- ./col --> <div class="col-lg-2 col-xs-3"> <!-- small box --> <div class="small-box bg-green"> <div class="inner"> <h3><?php echo count(StatsData::GuestsOnline()); ?></h3> <p>Guests Online:</p> </div> <div class="icon"> <i class="ion ion-stats-bars"></i> </div> </div> </div><!-- ./col --> </div> <!-- ********************* This is the relevant php error section *************************** --> <!-- TO DO List --> <div class="box box-primary"> <div class="box-header"> <i class="ion ion-clipboard"></i> <h3 class="box-title">VA Central Status</h3> </div><!-- /.box-header --> <div class="box-body"> <p class="lead"> This is tester text <?php echo $updateinfo; ?> <?php if(Config::Get('VACENTRAL_ENABLED') == true && $unexported_count > 0) { ?> 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> <?php } ?></p> </div> </div><!-- /.box --> <!-- ************************************************************************************************** --> <!-- quick email widget --> <div class="box box-info"> <div class="box-header"> <i class="fa fa-envelope"></i> <h3 class="box-title">Quick Email</h3> <!-- tools box --> <div class="pull-right box-tools"> <button class="btn btn-info btn-sm" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button> </div><!-- /. tools --> </div> <div class="box-body"> <form action="#" method="post"> <div class="form-group"> <input type="email" class="form-control" name="emailto" placeholder="Email to:"> </div> <div class="form-group"> <input type="text" class="form-control" name="subject" placeholder="Subject"> </div> <div> <textarea class="textarea" placeholder="Message" style="width: 100%; height: 125px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea> </div> </form> </div> <div class="box-footer clearfix"> <button class="pull-right btn btn-default" id="sendEmail">Send <i class="fa fa-arrow-circle-right"></i></button> </div> </div> </section><!-- /.Left col --> <!-- right col (We are only adding the ID to make the widgets sortable)--> <section class="col-lg-5 connectedSortable"> <!-- Map box --> <div class="box box-solid bg-light-blue-gradient"> <div class="box-header"> <!-- tools box --> <div class="pull-right box-tools"> <button class="btn btn-primary btn-sm daterange pull-right" data-toggle="tooltip" title="Date range"><i class="fa fa-calendar"></i></button> <button class="btn btn-primary btn-sm pull-right" data-widget="collapse" data-toggle="tooltip" title="Collapse" style="margin-right: 5px;"><i class="fa fa-minus"></i></button> </div><!-- /. tools --> <i class="fa fa-map-marker"></i> <h3 class="box-title"> Latest News </h3> </div> <div class="box-body"> </div><!-- /.box-body--> <div class="box-footer no-border"> <div class="row"> <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4"> <div id="sparkline-1"></div> <div class="knob-label">Visitors</div> </div><!-- ./col --> <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4"> <div id="sparkline-2"></div> <div class="knob-label">Online</div> </div><!-- ./col --> <div class="col-xs-4 text-center"> <div id="sparkline-3"></div> <div class="knob-label">Exists</div> </div><!-- ./col --> </div><!-- /.row --> </div> </div> <!-- /.box --> <!-- solid sales graph --> <div class="box box-solid bg-teal-gradient"> <div class="box-header"> <i class="fa fa-th"></i> <h3 class="box-title">Sales Graph</h3> <div class="box-tools pull-right"> <button class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button> <button class="btn bg-teal btn-sm" data-widget="remove"><i class="fa fa-times"></i></button> </div> </div> <div class="box-body border-radius-none"> <div class="chart" id="line-chart" style="height: 250px;"></div> </div><!-- /.box-body --> <div class="box-footer no-border"> <div class="row"> <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4"> <input type="text" class="knob" data-readonly="true" value="20" data-width="60" data-height="60" data-fgColor="#39CCCC"> <div class="knob-label">Mail-Orders</div> </div><!-- ./col --> <div class="col-xs-4 text-center" style="border-right: 1px solid #f4f4f4"> <input type="text" class="knob" data-readonly="true" value="50" data-width="60" data-height="60" data-fgColor="#39CCCC"> <div class="knob-label">Online</div> </div><!-- ./col --> <div class="col-xs-4 text-center"> <input type="text" class="knob" data-readonly="true" value="30" data-width="60" data-height="60" data-fgColor="#39CCCC"> <div class="knob-label">In-Store</div> </div><!-- ./col --> </div><!-- /.row --> </div><!-- /.box-footer --> </div><!-- /.box --> <!-- Calendar --> <div class="box box-solid bg-green-gradient"> <div class="box-header"> <i class="fa fa-calendar"></i> <h3 class="box-title">Calendar</h3> <!-- tools box --> <div class="pull-right box-tools"> <!-- button with a dropdown --> <div class="btn-group"> <button class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bars"></i></button> <ul class="dropdown-menu pull-right" role="menu"> <li><a href="#">Add new event</a></li> <li><a href="#">Clear events</a></li> <li class="divider"></li> <li><a href="#">View calendar</a></li> </ul> </div> <button class="btn btn-success btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button> <button class="btn btn-success btn-sm" data-widget="remove"><i class="fa fa-times"></i></button> </div><!-- /. tools --> </div><!-- /.box-header --> <div class="box-body no-padding"> <!--The calendar --> <div id="calendar" style="width: 100%"></div> </div><!-- /.box-body --> <div class="box-footer text-black"> <div class="row"> <div class="col-sm-6"> <!-- Progress bars --> <div class="clearfix"> <span class="pull-left">Task #1</span> <small class="pull-right">90%</small> </div> <div class="progress xs"> <div class="progress-bar progress-bar-green" style="width: 90%;"></div> </div> <div class="clearfix"> <span class="pull-left">Task #2</span> <small class="pull-right">70%</small> </div> <div class="progress xs"> <div class="progress-bar progress-bar-green" style="width: 70%;"></div> </div> </div><!-- /.col --> <div class="col-sm-6"> <div class="clearfix"> <span class="pull-left">Task #3</span> <small class="pull-right">60%</small> </div> <div class="progress xs"> <div class="progress-bar progress-bar-green" style="width: 60%;"></div> </div> <div class="clearfix"> <span class="pull-left">Task #4</span> <small class="pull-right">40%</small> </div> <div class="progress xs"> <div class="progress-bar progress-bar-green" style="width: 40%;"></div> </div> </div><!-- /.col --> </div><!-- /.row --> </div> </div><!-- /.box --> </section><!-- right col --> </div><!-- /.row (main row) --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Create the tabs --> <ul class="nav nav-tabs nav-justified control-sidebar-tabs"> <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li> <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li> </ul> <!-- Tab panes --> <div class="tab-content"> <!-- Home tab content --> <div class="tab-pane" id="control-sidebar-home-tab"> <h3 class="control-sidebar-heading">Recent Activity</h3> <ul class="control-sidebar-menu"> <li> <a href="javascript::;"> <i class="menu-icon fa fa-birthday-cake bg-red"></i> <div class="menu-info"> <h4 class="control-sidebar-subheading">Langdon's Birthday</h4> <p>Will be 23 on April 24th</p> </div> </a> </li> <li> <a href="javascript::;"> <i class="menu-icon fa fa-user bg-yellow"></i> <div class="menu-info"> <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4> <p>New phone +1(800)555-1234</p> </div> </a> </li> <li> <a href="javascript::;"> <i class="menu-icon fa fa-envelope-o bg-light-blue"></i> <div class="menu-info"> <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4> <p>nora@example.com</p> </div> </a> </li> <li> <a href="javascript::;"> <i class="menu-icon fa fa-file-code-o bg-green"></i> <div class="menu-info"> <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4> <p>Execution time 5 seconds</p> </div> </a> </li> </ul><!-- /.control-sidebar-menu --> <h3 class="control-sidebar-heading">Tasks Progress</h3> <ul class="control-sidebar-menu"> <li> <a href="javascript::;"> <h4 class="control-sidebar-subheading"> Custom Template Design <span class="label label-danger pull-right">70%</span> </h4> <div class="progress progress-xxs"> <div class="progress-bar progress-bar-danger" style="width: 70%"></div> </div> </a> </li> <li> <a href="javascript::;"> <h4 class="control-sidebar-subheading"> Update Resume <span class="label label-success pull-right">95%</span> </h4> <div class="progress progress-xxs"> <div class="progress-bar progress-bar-success" style="width: 95%"></div> </div> </a> </li> <li> <a href="javascript::;"> <h4 class="control-sidebar-subheading"> Laravel Integration <span class="label label-warning pull-right">50%</span> </h4> <div class="progress progress-xxs"> <div class="progress-bar progress-bar-warning" style="width: 50%"></div> </div> </a> </li> <li> <a href="javascript::;"> <h4 class="control-sidebar-subheading"> Back End Framework <span class="label label-primary pull-right">68%</span> </h4> <div class="progress progress-xxs"> <div class="progress-bar progress-bar-primary" style="width: 68%"></div> </div> </a> </li> </ul><!-- /.control-sidebar-menu --> </div><!-- /.tab-pane --> <!-- Stats tab content --> <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div><!-- /.tab-pane --> <!-- Settings tab content --> <div class="tab-pane" id="control-sidebar-settings-tab"> <form method="post"> <h3 class="control-sidebar-heading">General Settings</h3> <div class="form-group"> <label class="control-sidebar-subheading"> Report panel usage <input type="checkbox" class="pull-right" checked> </label> <p> Some information about this general settings option </p> </div><!-- /.form-group --> <div class="form-group"> <label class="control-sidebar-subheading"> Allow mail redirect <input type="checkbox" class="pull-right" checked> </label> <p> Other sets of options are available </p> </div><!-- /.form-group --> <div class="form-group"> <label class="control-sidebar-subheading"> Expose author name in posts <input type="checkbox" class="pull-right" checked> </label> <p> Allow the user to show his name in blog posts </p> </div><!-- /.form-group --> <h3 class="control-sidebar-heading">Chat Settings</h3> <div class="form-group"> <label class="control-sidebar-subheading"> Show me as online <input type="checkbox" class="pull-right" checked> </label> </div><!-- /.form-group --> <div class="form-group"> <label class="control-sidebar-subheading"> Turn off notifications <input type="checkbox" class="pull-right"> </label> </div><!-- /.form-group --> <div class="form-group"> <label class="control-sidebar-subheading"> Delete chat history <a href="javascript::;" class="text-red pull-right"><i class="fa fa-trash-o"></i></a> </label> </div><!-- /.form-group --> </form> </div><!-- /.tab-pane --> </div> </aside><!-- /.control-sidebar --> <!-- Add the sidebar's background. This div must be placed immediately after the control sidebar --> <div class="control-sidebar-bg"></div> </div><!-- ./wrapper --> </body> </html> This is core_htmlhead <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <script type="text/javascript"> var baseurl="<?php echo SITE_URL;?>"; var geourl="<?php echo Config::Get('GEONAME_API_SERVER'); ?>"; var airport_lookup = "<?php echo Config::Get('AIRPORT_LOOKUP_SERVER'); ?>"; var phpvms_api_server = "<?php echo Config::Get('PHPVMS_API_SERVER'); ?>"; </script> <!-- Global Air Admin SKin Files --> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <!-- Latest compiled and minified bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous"> <!-- Font Awesome --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <!-- Theme style --> <link href="<?php echo SITE_URL?>/admin/lib/layout/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" /> <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. --> <link href="<?php echo SITE_URL?>/admin/lib/layout/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" > <!-- iCheck --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/iCheck/flat/blue.css"> <!-- Morris chart --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/morris/morris.css"> <!-- jvectormap --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/jvectormap/jquery-jvectormap-1.2.2.css"> <!-- Date Picker --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/datepicker/datepicker3.css"> <!-- Daterange picker --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/daterangepicker/daterangepicker-bs3.css"> <!-- bootstrap wysihtml5 - text editor --> <link rel="stylesheet" href="<?php echo SITE_URL?>/admin/lib/layout/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <!-- End of global admin files --> <script type="text/javascript" src="<?php echo fileurl('lib/js/jqModal.js'); ?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.form.js'); ?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.bigiframe.js'); ?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/jquery.metadata.js'); ?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/js/ckeditor/ckeditor.js'); ?>"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" src="<?php echo SITE_URL?>/admin/lib/phpvmsadmin.js"></script> <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo SITE_URL?>/lib/rss/latestpireps.rss"> <?php if(isset($MODULE_HEAD_INC)) echo $MODULE_HEAD_INC; ?> This is the footer js references </div> </div> <div style="clear:both"></div> <footer class="main-footer"> <div class="pull-right hidden-xs"> <p> "<?php echo randquote(); ?>" <br /> Copyright © 2007 - <?php echo date('Y')?> <a href="http://www.phpvms.net/" target="_new">phpVMS</a>, <a href="http://www.nsslive.net" target="_new">nsslive.net</a> <br /> <a href="<?php echo SITE_URL?>/admin/index.php/dashboard/about">License & About</a> | Version <?php echo PHPVMS_VERSION; ?> </p> </div> <strong>Template by <a href="http://almsaeedstudio.com">Almsaeed Studio</a> © 2014-2015, All rights reserved. </footer> </div> <?php Template::Show('core_footer.php'); ?> <!-- Global Air Script Files --> <!-- jQuery 2.1.4 --> <script src="<?php echo fileurl('admin/lib/layout/plugins/jQuery/jQuery-2.1.4.min.js'); ?>"></script> <!-- jQuery UI 1.11.4 --> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script> <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> <script> $.widget.bridge('uibutton', $.ui.button); </script> <!-- Latest compiled and minified Javascript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script> <!-- Morris.js charts --> <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> <script src="<?php echo fileurl('admin/lib/layout/plugins/morris/morris.min.js'); ?>"></script> <!-- Sparkline --> <script src="<?php echo fileurl('admin/lib/layout/plugins/sparkline/jquery.sparkline.min.js'); ?>"></script> <!-- jvectormap --> <script src="<?php echo fileurl('admin/lib/layout/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js'); ?>"></script> <script src="<?php echo fileurl('admin/lib/layout/plugins/jvectormap/jquery-jvectormap-world-mill-en.js'); ?>"></script> <!-- jQuery Knob Chart --> <script src="<?php echo fileurl('admin/lib/layout/plugins/knob/jquery.knob.js'); ?>"></script> <!-- daterangepicker --> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script> <script src="<?php echo fileurl('admin/lib/layout/plugins/daterangepicker/daterangepicker.js'); ?>"></script> <!-- datepicker --> <script src="<?php echo fileurl('admin/lib/layout/plugins/datepicker/bootstrap-datepicker.js'); ?>"></script> <!-- Bootstrap WYSIHTML5 --> <script src="<?php echo fileurl('admin/lib/layout/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js'); ?>"></script> <!-- Slimscroll --> <script src="<?php echo fileurl('admin/lib/layout/plugins/slimScroll/jquery.slimscroll.min.js'); ?>"></script> <!-- FastClick --> <script src="<?php echo fileurl('admin/lib/layout/plugins/fastclick/fastclick.min.js'); ?>"></script> <!-- AdminLTE App --> <script src="<?php echo fileurl('admin/lib/layout/dist/js/app.min.js'); ?>"></script> <script type="text/javascript"> var json = (function () { var json = null; $.ajax({ 'async': false, 'global': false, 'url': "<?php echo adminaction('/dashboard/getpireps');?>", 'dataType': "json", 'success': function (data) { json = data; } }); return json; }) (); new Morris.Area({ // ID of the element in which to draw the chart. element: 'myfirstchart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: json, // The name of the data record attribute that contains x-values. xkey: 'ym', // A list of names of data record attributes that contain y-values. ykeys: ['total'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Flights'] }); </script> </body> </html>
  13. Haha, gimme some credit. Yes there is one pirep to be submitted. The original dashboard is still loading at the bottom of my edited page so i can see all the normal items i.e. users online/guests online/1 pirep to be submitted. It's just that the php tags don't seem to be processed on page elements. When I use "inspect element" in chrome, where the php code and resulting output should be, it's just a blank space with the html coding around it.
  14. Could it be something to do with using the phpvms js files and those from the skin I'm using?
  15. Not as far as I can see, no. It's wierd because it seems like it is just refusing to show the anything inside the php tags like something is stopping it from processing the html within the php tags. I have tried entering some basic text inside <p> tags and it shows up just fine. It's definitely something to do with the element in question not liking php content. Just not sure how to solve it at the moment.
  16. So, new problem. I am part way through skinning a new admin dashboard and I am now trying to move some of the original dashboard content into separate divs for better displaying of data. So far it's not been too bad (with help from Vangelis and Web541!), but my new problem relates to the VACentral link regarding pireps to submit. In the original dashboard, the code seems to be as follows: <?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 } ?> I have moved that code into a div in my template which now looks like this: <div class="box box-primary"> <div class="box-header"> <i class="ion ion-clipboard"></i> <h3 class="box-title">VA Central Status</h3> </div><!-- /.box-header --> <div class="box-body"> <span class="text"> <?php if(Config::Get('VACENTRAL_ENABLED') == true && $unexported_count > 0) { ?> 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> <?php } ?></span> </div> </div> When I upload the file and refresh it, the text and link to submit the pireps to VACentral never appears. I have tried it inside and outside of divs. I've tried it wrapped in <p> tags <span> tags and with no tags. I have the original dashboard file also loaded into the same page at the bottom and the text is appearing fine there. Does anyone know if there is code I am missing that is needed to run this or is it dependent on some jquery or something that might not be present? I don't think it is missing code or js but I don't know what else it can be. Thanks in advance.
  17. Ignore me, I'm an idiot and was putting it into the wrong dashboard. Just tried it now and it works perfectly, I'm just annoyed at myself for not being able to work it out on my own . Still it's always a step further along the learning path . Thanks again Vangelis and Web541.
  18. As always Vangelis, your support is much appreciated. The first lot of code throws up a syntax error for me, but I have compared it to other functions and it looks ok. Any ideas as to why it might be causing an error? If I upload it, it does actually throw up a parsing error.
  19. You mean replace my php script for the above? That won't work without the calls to the database will it? Plus, this will return all pirep data whereas I just want the last 30 days as per the main dashboard chart.
  20. I have pulled together this script from the net. It is essentially just a script that will fetch the table row content of the phpvms_pireps table and display it in a web browser in json format. It's just so I can test out how it works and looks. The only problem is, the resulting page is blank apart from the message "connected successfully" which is obviously my check that db connection is established. Can you spot anything I'm doing wrong? Or am I again making a whole lot of unnecessary work for myself. <?php //open connection to mysql db $connection = mysqli_connect("localhost","********","********","********") or die("Error " . mysqli_error($connection)); //Check the connection worked if (!$connection) { die("Connection failed: " . mysqli_connect_error()); } else { echo "Connected successfully"; } //fetch table rows from mysql db $sql = "SELECT * FROM phpvms_pireps"; $result = mysqli_query($connection, $sql) or die("Error in Selecting " . mysqli_error($connection)); //create an array $emparray = array(); while($row =mysqli_fetch_assoc($result)) { $emparray[] = $row; } echo json_encode($emparray); //close the db connection mysqli_close($connection); ?>
  21. Thanks Vangelis and I think I get it, but to achieve what you are suggesting I would presumably need to extract data from the database using php, then convert it to json format for use with morris charts yes? I mean in order to create; var Flightsdata = [{Date:"2014-02-05",Flights:810}, {Date:"2014-02-09",Flights:2}, {Date:"2014-02-10",Flights:6}, {Date:"2014-02-10",Flights:210}, {Date:"2014-02-12",Flights:9}, {Date:"2014-02-13",Flights: 543}]; that would require me to create a php script to query the database and then turn it into the json format. Or is there a function in phpvms which already calls this data?
  22. Right, I think I get what you are saying. Sincerest thanks to both of you, but I suspect I'm not done with you yet! So the chart I want to create is using Morris Charts (morris.js) and the script for creating the chart using static data is below. This is just where you would physically enter the values if the chart is unlikely to change often. new Morris.Line({ // ID of the element in which to draw the chart. element: 'myfirstchart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: [ { year: '2008', value: 20 }, { year: '2009', value: 10 }, { year: '2010', value: 5 }, { year: '2011', value: 5 }, { year: '2012', value: 20 } ], // The name of the data record attribute that contains x-values. xkey: 'year', // A list of names of data record attributes that contain y-values. ykeys: ['value'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Value'] }); In my case I want it to show the "past 30 day pireps" as per the chart on the frontpage of the dashboard. I think the "function" that compiles the data produces the right content for my needs, I just don't know how to utilise the "function" for my needs or whether I need to work out a modified one. Would it be as simple as adding the "variables" to the script as follows: new Morris.Line({ // ID of the element in which to draw the chart. element: 'myfirstchart', // Chart data records -- each entry in this array corresponds to a point on // the chart. data: [ { year: '$bar_titles', value: $bar_values } ], // The name of the data record attribute that contains x-values. xkey: 'Date', // A list of names of data record attributes that contain y-values. ykeys: ['# of Pireps'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Pireps'] }); I suspect this won't work because the above won't know how to handle translating the variable output into multiple lines as in the first example. Any pointers? I will attempt to test it, but I'm sure it will not work.
  23. Thanks web541, I have looked at both of those files. The OFCharts.class.php looks to just contain code that process the raw data from a data variable or dump somewhere so I don't think it extracts data itself. The dashboard.php does have something in it which looks like it might be the right sort of thing. {"data-file":"<?php echo adminaction('/dashboard/pirepcounts');?>"}); The above code looks like it's creating a data file with the contents of the "pirepcounts" but I can't tell where this data file is, or if it contains raw data. Or in fact whether I'm barking up totally the wrong tree lol. If I understood php coding better, or the phpvms structure, I'd probably be able to do it quicker and easier. I'll keep plodding on though, don't like being beaten .
  24. Hi all, I am skinning a new admin skin and I would like to change the look of the initial dashboard chart showing last 30 day's pireps. I can see that the chart is a swf object compiled from data and processed into the chart. My question is, does anyone know how to extract the same data in a raw format so I can use it in a custom chart script? I want to take the raw data myself using php and then pass it to the chart script that I'm using in order to then populate it. Grateful to anyone who can point me in the right direction to either a php script that would extract the data, or where I can find a dataclass that will give me the data. Thanks
  25. Ok I am now making slow and painful progress but it's progress nonetheless . I've now managed to get the bones of my admin skin showing up and the js is now triggering which means I can now see everything on the page, albeit not quite in the right place yet. What I have noticed, just testing links to the default content in the admin panel, is that everything seems to work largely fine, except for the tables i.e. the pilot table (view all pilots) and the flight schedules & routes table. Does anyone know if they are delivered via the "tablesorter" scripting built into phpvms or are they an iframe or something. I'll keep looking into it but if anyone knows in the meantime I'd greatly appreciate it.
×
×
  • Create New...