Jump to content

[SOLVED] Background Picture


OmerAslan

Recommended Posts

Hello,

Ok i add background picture and seems nice. But some long pages i have. Like pilots page. I want Fixed BG's Do Not Move. Only the text (and images) will scroll by. How can i do that? And you know like pilots page is public. What can i do make that page only available for sign-in pilots?

Thanks.

Edited by OmerAslan
Link to comment
Share on other sites

my friend explained to me and i want to share for the future,

body {
   background: url(images/aal1.jpg) repeat fixed 0 0 #ffffff;
   background-size: 100% auto;
   color: #000000;
}

and for pilots page

open module core/modules/Pilots copy and paste

<?php
/**
* phpVMS - Virtual Airline Administration Software
* Copyright © 2008 Nabeel Shahzad
* For more information, visit www.phpvms.net
* Forums: http://www.phpvms.net/forum
* Documentation: http://www.phpvms.net/docs
*
* phpVMS is licenced under the following license:
* Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
* View license.txt in the root, or visit http://creativecommo...s/by-nc-sa/3.0/
*
* @author Nabeel Shahzad
* @copyright Copyright © 2008, Nabeel Shahzad
* @link http://www.phpvms.net
* @license http://creativecommo...s/by-nc-sa/3.0/
*/[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]class Pilots extends CodonModule
{[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]public function index()
{
if(!Auth::LoggedIn()) {
$this->set('message', 'CAUTION!!! You must be logged in to access this page!');
$this->render('core_error.tpl');
return;
};
// Get all of our hubs, and list pilots by hub
$allhubs = OperationsData::GetAllHubs();[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]if(!$allhubs) $allhubs = array();[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]foreach($allhubs as $hub)
{
$this->set('title', $hub->name);
$this->set('icao', $hub->icao);[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$this->set('allpilots', PilotData::findPilots(array('p.hub'=>$hub->icao)));[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$this->render('pilots_list.tpl');
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$nohub = PilotData::findPilots(array('p.hub'=>''));
if(!$nohub)
{
return;
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$this->set('title', 'No Hub');
$this->set('icao', '');
$this->set('allpilots', $nohub);
$this->render('pilots_list.tpl');
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]public function reports($pilotid='')
{
if($pilotid == '')
{
$this->set('message', 'No pilot specified!');
$this->render('core_error.tpl');
return;
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$this->set('pireps', PIREPData::GetAllReportsForPilot($pilotid));
$this->render('pireps_viewall.tpl');
}[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]/* Stats stuff for charts */[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]public function statsdaysdata($pilotid)
{
$data = PIREPData::getIntervalDataByDays(array('p.pilotid'=>$pilotid), 30);
$this->create_line_graph('Past 30 days PIREPs', $data);
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]public function statsmonthsdata($pilotid)
{
$data = PIREPData::getIntervalDataByMonth(array('p.pilotid'=>$pilotid), 3);
$this->create_line_graph('Monthly Flight Stats', $data);
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]public function statsaircraftdata($pilotid)
{
$data = StatsData::PilotAircraftFlownCounts($pilotid);
if(!$data) $data = array();[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]include CORE_LIB_PATH.'/php-ofc-library/open-flash-chart.php';[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$d = array();
foreach($data as $ac)
{
OFCharts::add_data_set($ac->aircraft, floatval($ac->hours));
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]echo OFCharts::create_pie_graph('Aircraft Flown');
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]protected function create_line_graph($title, $data)
{
if(!$data)
{
$data = array();
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$bar_values = array();
$bar_titles = array();
foreach($data as $val)
{[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]$bar_titles[] = $val->ym;
$bar_values[] = floatval($val->total);
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]OFCharts::add_data_set($bar_titles, $bar_values);
echo OFCharts::create_area_graph($title);
}[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]public function RecentFrontPage($count = 5)
{
$this->set('pilots', PilotData::GetLatestPilots($count));
$this->render('frontpage_recentpilots.tpl');
}
}

thanks again.

Edited by OmerAslan
Link to comment
Share on other sites

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...