Jump to content

Schedules page error


RyanJSmyth

Recommended Posts

hello there guys and gals i'm using the lance skin and i'm having an issue where the schedules page when you search is duplicating the header and footer i have inclueded a picture of what is happening 

https://va.atlasgaming.group

thats the link to the website i have scoured throw tpl and php files and i just cant pick out whats gone wrong also one quick question i would like the ability for my pilots to add routes to the airline like admins can through the admin center i was thinking maybe i could just create a page and have it render the object used by the admin center to add a schedule but i'm not entirely sure how this would work any help is greatly appreciated 

thanks in advance 

ryan

schedules.png

Link to comment
Share on other sites

I think its because on your schedule search form it says

<form id="form" action="https://va.atlasgaming.group/index.php/schedules/view" method="post">

While it should be

<form id="form" action="https://va.atlasgaming.group/action.php/schedules/view" method="post">

When using index it will render the whole template and action will ony render the results part

In your php file it will probably look like 

action="<?php echo url('/schedules/view')" OR action="<?php echo SITE_URL."/schedules/view" ?>"

If so it should be.

action="<?php echo actionurl('/schedules/view')"

But again I think Im saying this from memory since im at work :P 

Edited by tim260
  • Like 1
Link to comment
Share on other sites

  • Moderators
1 hour ago, RyanJSmyth said:

hello there guys and gals i'm using the lance skin and i'm having an issue where the schedules page when you search is duplicating the header and footer i have inclueded a picture of what is happening 

https://va.atlasgaming.group

thats the link to the website i have scoured throw tpl and php files and i just cant pick out whats gone wrong also one quick question i would like the ability for my pilots to add routes to the airline like admins can through the admin center i was thinking maybe i could just create a page and have it render the object used by the admin center to add a schedule but i'm not entirely sure how this would work any help is greatly appreciated 

thanks in advance 

ryan

schedules.png

There is a file in your "templates" or "skin" folder called "layout.php". That's where the header and footer of your entire website is set. If you have installed the skin yourself then I would suggest you check your skin installation. Your problem doesn't have anything to do with your HTML coding nor it does with PHP coding, so don't change any of those codes as you will experience some more issues.

Link to comment
Share on other sites

  • Moderators
4 minutes ago, RyanJSmyth said:

thanks i have checked the installation i have even re downloaded the skin from the lance designes website 

open the layout.php and copy and paste the entire code here, so I can check it for u.

Link to comment
Share on other sites

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><?php echo $page_title; ?></title>
    <!-- Sets initial viewport load and disables zooming  -->
      <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- SmartAddon.com Verification -->
      <meta name="smartaddon-verification" content="936e8d43184bc47ef34e25e426c508fe" />
      <meta name="keywords" content="Lance Designs Demo lance website design">
      <meta name="description" content="A Brand new free phpVMS template by Lance Designs">
    <!-- site css -->
    <link href="<?php echo SITE_URL?>/lib/skins/lance/css/site.min.css" rel="stylesheet" media="all" />
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" media="all" />
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,800,700,400italic,600italic,700italic,800italic,300italic" rel="stylesheet" type="text/css">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/lance/js/site.min.js"></script>
    <style>
    html{
        background-color: #d8d8d8;
        background-image: url(http://www.designbolts.com/wp-content/uploads/2012/12/simple-pattern-white-seamless-website-background.jpg);
    }
    body{
    }
    a{
    color: #000;
    }
    .cont{
    }
    .top{
        background-color: #adabab;
        text-align: right;
    }
    .banner{
        background-color: #cecece;
        height: 220px;
        align-content: center;
    }
    #top .right{
        height:
    }
    a{
        color: white;
    }
    .head{
        background-color: #ffffff;
        vertical-align: middle;
        min-height: 100px;
    }
    .logo{

    }
    #logo img{
    margin-top: 20px;
    width:100%;
    max-width:300px;
    max-height: 90px;
    margin-left: 10px;
    }
    div{
    margin: 0px;
    padding: 0px;
    }
    .info{
    width: 100%;
    padding: 6px 20px 6px 25px;
	margin: 5px 10px 10px 1px;
	color: #FFF;
	background-color: #1F4788;
	/* text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.17); */
	-webkit-box-shadow: 0px 2px 4px #888;
	-moz-box-shadow: 0px 2px 4px #888;
	box-shadow: 0px 2px 4px #888;
    }
    h9{
	font-size: 1.5em;
    }
    .bg{
        background-color: #ffffff;
        margin-left: 200px;
        margin-right: 200px;
        border-bottom-color: aqua;
    }
    </style>
      <?php echo $page_htmlreq; ?>
    <?php echo $page_htmlhead; ?>
  </head>
<body>

    <div class="head"> 
        <div class="row">
            <div class="col-md-4">
                <div id="logo">
                    <img src="<?php echo SITE_URL?>/lib/skins/lance/images/atlas_standalone.png" style="width:100%;">
                </div>
            </div>
            <div class="col-md-4">

            </div>
            <div class="col-md-4">

            </div>
        </div>
    </div>
    <div id="top">
        <p class="right">

        </p>
    </div>
<nav class="navbar navbar-default">
 <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul style="margin-left:150px;" class="nav navbar-nav">
        <li><a href="<?php echo SITE_URL?>/index.php"><i class="fa fa-home fa-lg" style="margin-right:2px;"></i>Home</a></li>
        <li><a href="<?php echo SITE_URL?>/index.php/About"><i class="fa fa-check fa-lg" style="margin-right:2px;"></i>About</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-gear fa-lg" style="margin-right:2px;"></i>Operations<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="<?php echo SITE_URL?>/index.php/acars">Live ACARS</a></li>
            <li><a href="<?php echo SITE_URL?>/index.php/pilots">Pilots</a></li>
            <li><a href="<?php echo SITE_URL?>/index.php/schedules">Schedules</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="<?php echo SITE_URL?>/index.php/charter">Schedules Scratchbook</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="http://www.atlasgaming.group/ ">Our Comunity Website</a></li>
            <li><a href="http://invite.teamspeak.com/ts.atlasgaming.group">Our Comunity Teamspeak</a></li>
	    <li><a href="https://discord.gg/JbrRpBp">Our Comunity Discord</a></li>
          </ul>
        </li>
        <?php
if(!Auth::LoggedIn())
{
	// Show these if they haven't logged in yet
?>
	<li><a href="<?php echo url('/login'); ?>">Login</a></li>
	<li><a href="<?php echo url('/registration'); ?>">Register</a></li>
<?php
}
else
{
	// Show these items only if they are logged in
?>
	<li><a href="<?php echo url('/profile'); ?>">Pilot Center</a></li>

<?php
}
?>
<li><a href="<?php echo url('/pilots'); ?>">Pilots</a></li>
<li><a href="<?php echo url('/acars') ?>">Live Map</a></li>
<?php echo $MODULE_NAV_INC;?>
<?php
if(Auth::LoggedIn())
{
	if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
	{
		echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>';
	}
?>


<li><a href="<?php echo url('/logout'); ?>">Log Out</a></li>
<?php
}
?>
      </ul>

     </div>
</nav>
    <br><br>


 <?php echo $page_content;?>

            <div class="footer">
              <div class="container">
                <div class="clearfix">
                  <div class="footer-logo"><a href="#"><img src="https://placeholdit.imgix.net/~text?txtsize=20&txt=160%C3%9760&w=160&h=60" />Atlas Airways</a></div>
                  <dl class="footer-nav">
                    <dt class="nav-title">Activity Feed</dt>
                   <?php
    MainController::Run('Activity', 'Frontpage', 3);
?>


                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">ABOUT</dt>
                    <dd class="nav-item"><a href="<?php echo SITE_URL?>/index.php/About">Atlas Air est. July 2017 is the next generation in Virtual Air. We are constantly looking for new pilots! So join today! It’s quick and simple.</a></dd>

                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">Social Media</dt>
                    <dd class="nav-item"><a href="https://www.instagram.com/atlascgg/">Instagram</a></dd>
                    <dd class="nav-item"><a href="https://www.facebook.com/Atlas-Gaming-Group-163610147513380/">Facebook</a></dd>
                    <dd class="nav-item"><a href="https://www.twitch.tv/atlascgg">Twitter</a></dd>
		    <dd class="nav-item"><a href="https://www.twitch.tv/atlascgg ">Twitch</a></dd>
		    <dd class="nav-item"><a href="https://www.youtube.com/channel/UCmAlNXlB1OFzuBCtAGxYK9g ">Youtube</a></dd>

                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">CONTACT</dt>
                    <dd class="nav-item"><a href="#">Email: inbox@atlasgaming.group</a></dd>

                  </dl>
                </div>
                <div class="footer-copyright text-center">Copyright 2015 <a href="http://lancedesign.org">Lance Designs</a></div>
              </div>
            </div>
</body>







  </html>

layout.php file ^

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title><?php echo $page_title; ?></title>
    <!-- Sets initial viewport load and disables zooming  -->
      <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- SmartAddon.com Verification -->
      <meta name="smartaddon-verification" content="936e8d43184bc47ef34e25e426c508fe" />
      <meta name="keywords" content="Lance Designs Demo lance website design">
      <meta name="description" content="A Brand new free phpVMS template by Lance Designs">
    <!-- site css -->
    <link href="<?php echo SITE_URL?>/lib/skins/lance/css/site.min.css" rel="stylesheet" media="all" />
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" media="all" />
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,800,700,400italic,600italic,700italic,800italic,300italic" rel="stylesheet" type="text/css">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/lance/js/site.min.js"></script>
    <style>
    html{
        background-color: #d8d8d8;
        background-image: url(https://www.designbolts.com/wp-content/uploads/2012/12/simple-pattern-white-seamless-website-background.jpg);
    }
    body{
    }
    a{
    color: #000;
    }
    .cont{
    }
    .top{
        background-color: #adabab;
        text-align: right;
    }
    .banner{
        background-color: #cecece;
        height: 220px;
        align-content: center;
    }
    #top .right{
        height:
    }
    a{
        color: white;
    }
    .head{
        background-color: #ffffff;
        vertical-align: middle;
        min-height: 100px;
    }
    .logo{

    }
    #logo img{
    margin-top: 20px;
    width:100%;
    max-width:300px;
    max-height: 90px;
    margin-left: 10px;
    }
    div{
    margin: 0px;
    padding: 0px;
    }
    .info{
    width: 100%;
    padding: 6px 20px 6px 25px;
	margin: 5px 10px 10px 1px;
	color: #FFF;
	background-color: #1F4788;
	/* text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.17); */
	-webkit-box-shadow: 0px 2px 4px #888;
	-moz-box-shadow: 0px 2px 4px #888;
	box-shadow: 0px 2px 4px #888;
    }
    h9{
	font-size: 1.5em;
    }
    .bg{
        background-color: #ffffff;
        margin-left: 200px;
        margin-right: 200px;
        border-bottom-color: aqua;
    }
    </style>
      <?php echo $page_htmlreq; ?>
    <?php echo $page_htmlhead; ?>
  </head>
<body>

    <div class="head">
        <div class="row">
            <div class="col-md-4">
                <div id="logo">
                    <img style="margin-left:200px;" src="/lib/skins/lance/images/atlas_standalone.png">
                </div>
            </div>
            <div class="col-md-4">

            </div>
            <div class="col-md-4">

            </div>
        </div>
    </div>
    <div id="top">
        <p class="right">

        </p>
    </div>
<nav class="navbar navbar-default">
 <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul style="margin-left:150px;" class="nav navbar-nav">
        <li><a href="<?php echo SITE_URL?>/index.php"><i class="fa fa-home fa-lg" style="margin-right:2px;"></i>Home</a></li>
        <li><a href="<?php echo SITE_URL?>/index.php/About"><i class="fa fa-check fa-lg" style="margin-right:2px;"></i>About</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-gear fa-lg" style="margin-right:2px;"></i>Operations<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="<?php echo SITE_URL?>/index.php/acars">Live ACARS</a></li>
            <li><a href="<?php echo SITE_URL?>/index.php/pilots">Pilots</a></li>
            <li><a href="<?php echo SITE_URL?>/index.php/schedules">Schedules</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="<?php echo SITE_URL?>/index.php/charter">Schedules Scratchbook</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="http://www.atlasgaming.group/ ">Our Comunity Website</a></li>
            <li><a href="http://invite.teamspeak.com/ts.atlasgaming.group">Our Comunity Teamspeak</a></li>
	    <li><a href="https://discord.gg/JbrRpBp">Our Comunity Discord</a></li>
          </ul>
        </li>
        <?php
if(!Auth::LoggedIn())
{
	// Show these if they haven't logged in yet
?>
	<li><a href="<?php echo url('/login'); ?>">Login</a></li>
	<li><a href="<?php echo url('/registration'); ?>">Register</a></li>
<?php
}
else
{
	// Show these items only if they are logged in
?>
	<li><a href="<?php echo url('/profile'); ?>">Pilot Center</a></li>

<?php
}
?>
<li><a href="<?php echo url('/pilots'); ?>">Pilots</a></li>
<li><a href="<?php echo url('/acars') ?>">Live Map</a></li>
<?php echo $MODULE_NAV_INC;?>
<?php
if(Auth::LoggedIn())
{
	if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
	{
		echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>';
	}
?>


<li><a href="<?php echo url('/logout'); ?>">Log Out</a></li>
<?php
}
?>
      </ul>

     </div>
</nav>
    <br><br>


 <?php echo $page_content;?>

            <div class="footer">
              <div class="container">
                <div class="clearfix">
                  <div class="footer-logo"><a href="#"><img style="width:100%;" src="<?php echo SITE_URL?>/lib/skins/lance/images/atlas_travel.png" />Atlas Airways</a></div>
                  <dl class="footer-nav">
                    <dt class="nav-title">Activity Feed</dt>
                   <?php
    MainController::Run('Activity', 'Frontpage', 3);
?>


                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">ABOUT</dt>
                    <dd class="nav-item"><a href="<?php echo SITE_URL?>/index.php/About">Atlas Air est. July 2017 is the next generation in Virtual Air. We are constantly looking for new pilots! So join today! It’s quick and simple.</a></dd>

                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">Social Media</dt>
                    <dd class="nav-item"><a href="https://www.instagram.com/atlascgg/">Instagram</a></dd>
                    <dd class="nav-item"><a href="https://www.facebook.com/Atlas-Gaming-Group-163610147513380/">Facebook</a></dd>
                    <dd class="nav-item"><a href="https://www.twitch.tv/atlascgg">Twitter</a></dd>
		    <dd class="nav-item"><a href="https://www.twitch.tv/atlascgg ">Twitch</a></dd>
		    <dd class="nav-item"><a href="https://www.youtube.com/channel/UCmAlNXlB1OFzuBCtAGxYK9g ">Youtube</a></dd>
                  </dl>
                  <dl class="footer-nav">
                    <dt class="nav-title">CONTACT</dt>
                    <dd class="nav-item"><a href="#">Email: inbox@atlasgaming.group</a></dd>

                  </dl>
                </div>
                <div class="footer-copyright text-center">Copyright 2015 <a href="https://lancedesign.org">Lance Designs</a></div>
              </div>
            </div>
</body>







  </html>

layout.tpl^

Link to comment
Share on other sites

7 minutes ago, RyanJSmyth said:

the page is fine until you hit fine flights if you  register i will accept you 

 

1 hour ago, RyanJSmyth said:

here is the code that is there currently 

<form id="form" action="<?php echo url('/schedules/view');?>" method="post">

Change url( to actionurl(

Link to comment
Share on other sites

  • Moderators

Okay!. Now I see the problem. go to your skin folder and open "schedule_results.php" and copy and paste the entire code here.

Please change back the <form> tag to what it was.

Edited by Parkho
Link to comment
Share on other sites

5 minutes ago, Parkho said:

Okay!. Now I see the problem. go to your skin folder and open "schedule_results.php" and copy and paste the entire code here.

Please change back the <form> tag to what it was.

Im one hundred percent sure what I said is the fix he needs to trigger action instead of index

Link to comment
Share on other sites

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<style>
    .bg{
        background-color: #ffffff;
        margin-left: 200px;
        margin-right: 200px;  
        border-bottom-color: aqua;
    }
    a{
    color:#212121;
    }
</style>
<div class="bg">
<?php
if(!$allroutes)
{
    echo '<p align="center">No routes have been found!</p>';
    return;
}
?>
<table id="tabledlist" class="table">
<thead>
<tr>
    <th>Flight Info</th>
    <th>Options</th>
</tr>
</thead>
<tbody>
<?php 
foreach($allroutes as $schedule) 
{ 
?>
<tr>
    <td>
        <a href="<?php echo url('/schedules/details/'.$schedule->id);?>"><?php echo $schedule->code . $schedule->flightnum?>
            <?php echo '('.$schedule->depicao.' - '.$schedule->arricao.')'?>
        </a>
        <br />
        
        <strong>Departure: </strong><?php echo $schedule->deptime;?> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>Arrival: </strong><?php echo $schedule->arrtime;?><br />
        <strong>Equipment: </strong><?php echo $schedule->aircraft; ?> (<?php echo $schedule->registration;?>)  <strong>Distance: </strong><?php echo $schedule->distance . Config::Get('UNITS');?>
        <br />
        <strong>Days Flown: </strong><?php echo Util::GetDaysCompact($schedule->daysofweek); ?><br />
        <?php echo ($schedule->route=='') ? '' : '<strong>Route: </strong>'.$schedule->route.'<br />' ?>
        <?php echo ($schedule->notes=='') ? '' : '<strong>Notes: </strong>'.html_entity_decode($schedule->notes).'<br />' ?>
        <?php
        # Note: this will only show if the above code to
        #    skip the schedule is commented out
        if($schedule->bidid != 0) 
        {
            echo 'This route has been bid on';
        }
        ?>
    </td>
    <td nowrap>
        <a href="<?php echo url('/schedules/details/'.$schedule->id);?>">View Details</a><br />
        <a href="<?php echo url('/schedules/brief/'.$schedule->id);?>">Pilot Brief</a><br />
        
        <?php 
        # Don't allow overlapping bids and a bid exists
        if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0) 
        {
        ?>
            <a id="<?php echo $schedule->id; ?>" class="addbid" 
                href="<?php echo actionurl('/schedules/addbid/?id='.$schedule->id);?>">Add to Bid</a>
        <?php
        } 
        else 
        {
            if(Auth::LoggedIn()) 
            {
             ?>
                <a id="<?php echo $schedule->id; ?>" class="addbid" 
                    href="<?php echo url('/schedules/addbid');?>">Add to Bid</a>
            <?php             
            }
        }        
        ?>
    </td>
</tr>
<?php
 /* END OF ONE TABLE ROW */
}
?>
</tbody>
</table>
<hr>
</div>

 

Link to comment
Share on other sites

  • Moderators
Just now, tim260 said:

You like saying okay lmao!

I would very much like to agree with u on this issue but I'm not and when u say you're 100% sure of what u say resolves the issue then I just say Okay. After all the only thing that matters here, is finding a way to fix the error and nothing more. :)

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Parkho said:

I would very much like to agree with u on this issue but I'm not and when u say you're 100% sure of what u say resolves the issue then I just say Okay. After all the only thing that matters here, is finding a way to fix the error and nothing more. :)

I agree but staying professional is also important sorry if I seemed a bit cocky. Your reply was immature though

Link to comment
Share on other sites

  • Moderators
1 minute ago, tim260 said:

I agree but staying professional is also important sorry if I seemed a bit cocky. Your reply was immature though

I'm sorry if I offended u with my reply as I had no intention to do so.

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...