Jump to content

gio1961

Members
  • Posts

    252
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gio1961

  1. On 2/25/2019 at 8:25 PM, Taran22 said:

    I'm attempting to use this module with Deep Blue. It works and all, but the template just looks like this? unknown.png

     

    Hi everyone. I have a problem with the module. I installed it, unfortunately when I try to add a staff member it doesn't work. Only the reload of the page. I use the php version
    Thanks for a possible reply

     

     

    11.jpg

    Screen after clicking on Add staff

    2.jpg

     

  2. On recent flights on the first page, it should show the name of the plane in which the Pirep was archived, instead it shows the number 1
    Here is the code I'm using:

    <?php
    $pilotid = Auth::$userinfo->pilotid;
    $reports = PIREPData::getLastReports($pilotid, 5,'');
    ?>

    <table class="table table-striped mt30" cellspacing="0" width="100%" height="30" border="1" bordercolor="#FFFFFF">
    <tr>
    <th bgcolor="#dd4b39"><font color="#ffffff">Flight Number</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Aircraft</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Departure</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Arrival</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Flight Time</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Landing rate</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Date</font></th>
    <th bgcolor="#dd4b39"><font color="#ffffff">Status</font></th>

    </tr>
    <?php

    if($reports)
    foreach($reports as $report)
    {
    ?>
    <tr>
    <td><a href="<?php echo url('/pireps/view/'.$report->pirepid);?>"><?php echo $report->code . $report->flightnum; ?></a></td>
    <td><?php echo $report->aircraft;?></td>
    <td><?php echo $report->depicao; ?></td>
    <td><?php echo $report->arricao; ?></td>
    <td><?php echo $report->flighttime; ?></td>
    <td><?php echo $report->landingrate; ?>&nbsp;ft/min</td>
    <td><?php echo date(DATE_FORMAT, strtotime($report->submitdate)); ?></td>
    <td><?php


    if($report->accepted == PIREP_ACCEPTED)
    echo '<div id="success">Accepted</div>';
    elseif($report->accepted == PIREP_REJECTED)
    echo '<div id="error">Rejected</div>';
    elseif($report->accepted == PIREP_PENDING)
    echo '<div id="error">Approval Pending</div>';
    elseif($report->accepted == PIREP_INPROGRESS)
    echo '<div id="error">Flight in Progress</div>';

    }
    ?>

    </td>
    </tr>
    </table>

    Other problem. if a pilot did not fly, how to insert "no report"?

    Thanks for a possible reply

    01.jpg

     

     

  3. 19 hours ago, BlackSwan said:

    Thanks, there is no error message anymore. But the avatar still doesn't display. Inside /lib/avatars there is no avatar after changing avatar.

    Hi, try it
    file: app_top.php
                         <div class = "pull-left image">
                        <? php $ pilotcode = PilotData :: getPilotCode (Auth :: $ userinfo-> code, Auth :: $ userinfo-> pilotid); ?>
    <img src = "<? php echo PilotData :: getPilotAvatar ($ pilotcode);?>" class = "img-circle" alt = "User Image">
                         </ Div>
    file: pilot_public_profile.php

    <? Php

    if (! file_exists (SITE_ROOT.AVATAR_PATH. '/'. $ pilotcode. '. png'))

    {

    echo '<img src = "****** / en / lib / skins / crewcenter / images / pilot_profile_pic.jpg" alt = "avatar" class = "img-circle">';

    }

    else

    {

    echo '<img src = "'. SITE_URL.AVATAR_PATH. '/'. $ pilotcode. '. png'. '" alt = "No Avatar" class = "img-circle" height = "150" />';

    }

    ?>

     

    this is an example and as you can see it works. The image must have the extension * .png max 150X150 PX

    http://italianichevolano.altervista.org/avatar.jpg

    Filezilla FTP

    http://italianichevolano.altervista.org/01.jpg

     

  4. 12 hours ago, BlackSwan said:

    Hey everyone,

    As I have the same issue, I would like to ask if anyone has figured out why anything like this happens. I use phpvms versions simpilot 5.5.2 and my skin is Crewcenter from swan58. Please help.

    Open the lib/skins/CrewCenter/profile_edit.tpl or .php file and replace line from:

    <input type="text" class="form-control" value="<?php echo $userinfo->email;?>">

    to:

    <input type="text" class="form-control" name="email" value="<?php echo $userinfo->email;?>">

  5. 11 hours ago, DesComm said:

    Very specific question - where in the code is this message is located "Your account was marked inactive".   We need to change this message.

    The text is located in the core folder. Open the app.config.php file

    Sincerely

  6. 14 hours ago, drury211 said:

    Hi all,

    ive just started to mess around with PHPVMS again and updated my API with google etc... the thing is that when I go to my test site Http://www.flysx.org/test the map doesn’t load on start up but when I refresh the page it does...

    its throwing up the error of “initmap is not a function” does anyone have any experience if this and/or a work around?

    Thanks in advance

     

    Scott

    Hello, try changing this line and see if it works.

    <script a sync defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDULRUmBg6SusuQGJe35DNuNGlMNzdwYdo"></script>


    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDULRUmBg6SusuQGJe35DNuNGlMNzdwYdo&callback=initMap"
      type="text/javascript"></script>

     

     

  7. 5 hours ago, topher2880 said:

    This is half and half a code snippet post and also skinning however putting it here.

    Im using SimPilot's screen shot module, and was just wondering if there was a way of using the screen shot as a random image on the main page? I have an image that is 819 X 311 on the main page, and while I have the random image call working, I cant seem to make the image any larger.

    <?php Screenshots::show_random_screenshot(); ?>

    The actual code im using is :

    <center><?php $allpics = new Screenshots ();
    $allpics->show_random_screenshot();?></center>

    Adding any height= or width= seems to throw an error. Of course, in the past, ive made stupid mistakes, but I figure I will throw this out and surely get a reply pretty quick... as I usually do :D

    Thanks PHPVMS family 

     

     

    Hi, open the core / templates / screenshots_random.tpl file and edit the height and width values and see if it works (<img src = "'. SITE_URL.' / Pics /'.$ screenshot-> file_name. '" Height = "350px" width = "672px" alt = "Random Screenshot" />)

    frontpage_main.tpl file

    <center> <? php Screenshots :: show_random_screenshot (); ?> </ Center>

  8. 2 hours ago, vbegin7 said:

    what will be the php code to hide something if a pilot doesnt have enough hours say you dont want something seen by any member or pilot unless they have a minimum of 30 hours ? I have seen this before somewhere but dont remember

     

    Hi, see if it works.

    if(Auth::$userinfo->totalhours < 30){
    echo 'You do not have permission to access this page. You must have at least 30 hours of flight';

    return;
                    }

  9. Hi everyone, someone has a pop-up form or modal window to share to view incoming emails. I found this on the net but I could not change it

     

    <div class="container">

      <div class="modal fade" id="myModal" role="dialog">
        <div class="modal-dialog modal-sm">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title">EMAIL</h4>
            </div>
            <div class="modal-body">
              <p><?php MainController::Run('Mail', 'checkmail'); ?></p>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php
        $show_modal=false;
        $id = $_SESSION["id"];
        $sql = "select count(*) as ct from messages where `readdate`='0000-00-00 00:00:00' and user_to=$id and status!=3";
        if (!$result = $db->query($sql)) {
            die('There was an error running the query  [' . $db->error . ']');
        }
        while ($row = $result->fetch_assoc()) {
            if ($row['ct']>0)
                $show_modal=true;
        }
    if($show_modal):?>
          <script> $('#myModal').modal('show');</script>
    <?php endif;?>

  10. 2 hours ago, Nascoli said:

    Hello guys! I am not a PHP expert, and am facing a difficulty. When I change SKIN I get the message below. I'm doing tests direct on my domain server. Somehow, PHPVMS is using my DRIVE E: local.

     

    PHP Notice: The template file "E:\home\nascoli\fly2.com.br\Web\phpvms\\lib\skins\deepBlue\header.tpl" doesn't exist in E:\home\nascoli\fly2.com.br\Web\phpvms\core\classes\TemplateSet.class.php on line 248 PHP Notice: The template file "E:\home\nascoli\fly2.com.br\Web\phpvms\\lib\skins\deepBlue\footer.tpl" doesn't exist in E:\home\nascoli\fly2.com.br\Web\phpvms\core\classes\TemplateSet.class.php on line 248

     

  11. 1 hour ago, nfinger said:

    i get the same error:

    Fatal error: Uncaught <blockquote><font face=arial size=2 color=000099><b>Last Error --</b> [<font color=000000><b>No such file or directory (2002)</b></font>]<br />[<font color=000000><b></b></font>]</font><p>

                                                                                    </blockquote><hr noshade color=dddddd size=1>

    ..core/classes/ezdb/ezdb_mysql.class.php on line 103

     

    any help would be welcome, obviously directory exists.

    Hi, see here if it can help you..

     

  12. Good morning guys. When you receive an email (contact form) this is not "formatted" correctly, but all fields are displayed confusingly. Is there a way to solve this problem? thank you in advance

    02.jpg

  13. 15 hours ago, youngbuckscrew said:

    Okay this is one way of upgrading to v2 of recaptcha.

    Go here https://github.com/google/recaptcha and scroll down to Direct Download (assuming you don't use composer) and download the package. Once downloaded insert it into:  core/lib/recaptcha-master

    Once you have done this go to core/modules/registration/registration.php

    
    # Replace or comment out
    require_once CORE_LIB_PATH.'/recaptcha/recaptchalib.php';
    
    # With
    require_once CORE_LIB_PATH.'/recaptcha-master/src/autoload.php';

    In that same file, scroll down to VerifyData

    
    # Replace all code relating to captcha check with
    
      // start the error array as false, we dont have any errors yet.
      $error = false;
    
      // set the configurations for the service to work.
      $secret = Config::Get('RECAPTCHA_PRIVATE_KEY');
      $remoteIp = $_SERVER["REMOTE_ADDR"];
      $gRecaptchaResponse = $_POST['g-recaptcha-response'];
      $recaptcha = new \ReCaptcha\ReCaptcha($secret); 
    
      // Call the google service and verify the answer provided.
      $resp = $recaptcha->verify($gRecaptchaResponse, $remoteIp);
    
      // If Response was a success
      if ($resp->isSuccess())
      {
          // No errors; continue
          $this->set('captcha_error', '');
      } 
      else 
      {
          // Set error as true and show error on front-end
          $error = true;
          $this->set('captcha_error', true);
      }

    And finally on your registration_mainform.tpl 

    
    <div class="g-recaptcha" data-sitekey="<?php echo Config::Get('RECAPTCHA_PUBLIC_KEY'); ?>"></div>
    <script type="text/javascript"
            src="https://www.google.com/recaptcha/api.js?hl=en">
    </script>
    
    <!-- Recaptcha V2 -->
    <?php if($captcha_error == true)
        echo '<p class="error">Please verify you are human!</p>';
    ?>

    you can make a function for that like v1 but that's up to you. Let me know if this helps you! 

    Resolved, thanks. Best regards

  14. 9 hours ago, youngbuckscrew said:

    Gotcha! I'll have the older version installed sometime tonight or tomorrow and see how i can help others with the same issue. 

    Thank you for your interest. Best regards

×
×
  • Create New...