Major theme rework

This commit is contained in:
Deon George 2012-01-29 17:23:24 +11:00
parent 3d1c43687c
commit 89bb9004ed
49 changed files with 663 additions and 1320 deletions

View File

@ -11,11 +11,11 @@ RewriteBase /osb/
</Files> </Files>
# Protect application and system files from being viewed # Protect application and system files from being viewed
RewriteRule ^(?:application|modules|includes/kohana)\b.* kh.php/$0 [L] RewriteRule ^(?:application|modules|includes/kohana)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly # Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to kh.php/URL # Rewrite all other URLs to index.php/URL
RewriteRule .* kh.php/$0 [PT] RewriteRule .* index.php/$0 [PT]

View File

@ -135,8 +135,8 @@ Route::set('sections', '<directory>/<controller>(/<action>(/<id>(/<sid>)))',
// Static file serving (CSS, JS, images) // Static file serving (CSS, JS, images)
Route::set('default/media', 'media(/<file>)', array('file' => '.+')) Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
->defaults(array( ->defaults(array(
'controller' => 'welcome', 'controller' => 'media',
'action' => 'media', 'action' => 'get',
)); ));
/** /**

View File

@ -66,5 +66,9 @@ class Config extends lnApp_Config {
public static function sitemode() { public static function sitemode() {
return Config::instance()->loadsite()->so->status; return Config::instance()->loadsite()->so->status;
} }
public static function copywrite() {
return '(c) Open Source Billing Development Team';
}
} }
?> ?>

View File

@ -0,0 +1,63 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides access to rendering media items (javascript, images and css).
*
* @package lnApp
* @subpackage Page/Media
* @category Controllers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class Controller_lnApp_Media extends Controller {
/**
* This action will render all the media related files for a page
*
* @return void
*/
final public function action_get() {
// Get the file path from the request
$file = $this->request->param('file');
// Find the file extension
$ext = pathinfo($file,PATHINFO_EXTENSION);
// Remove the extension from the filename
$file = substr($file,0,-(strlen($ext)+1));
$f = '';
// If our file is pathed with session, our file is in our session.
if ($fd = Session::instance()->get_once($this->request->param('file'))) {
$this->response->body($fd);
// First try and find media files for the theme-site_id
} elseif ($f = Kohana::find_file($x=sprintf('media/site/%s/theme/%s',Config::siteid(),Config::theme()),$file,$ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
// Try and find media files for the site_id
} elseif ($f = Kohana::find_file(sprintf('media/site/%s',Config::siteid()),$file,$ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
// If not found try a default media file
} elseif ($f = Kohana::find_file('media',$file,$ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
} else {
// Return a 404 status
$this->response->status(404);
}
// Generate and check the ETag for this file
$this->response->check_cache(NULL,$this->request);
// Set the proper headers to allow caching
$this->response->headers('Content-Type',File::mime_by_ext($ext));
$this->response->headers('Content-Length',(string)$this->response->content_length());
$this->response->headers('Last-Modified',date('r',$f ? filemtime($f) : time()));
}
}
?>

View File

@ -41,7 +41,7 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
protected $secure_actions = array( protected $secure_actions = array(
); );
public function __construct(Request $request, Response $response) { public function __construct(Request $request,Response $response) {
// Our Menu's can run without method authentication by default. // Our Menu's can run without method authentication by default.
if (! isset($this->secure_actions['menu'])) if (! isset($this->secure_actions['menu']))
$this->secure_actions['menu'] = FALSE; $this->secure_actions['menu'] = FALSE;
@ -122,18 +122,11 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
$this->meta = new meta; $this->meta = new meta;
View::bind_global('meta',$this->meta); View::bind_global('meta',$this->meta);
// Our default style sheet(s) // Add our logo
foreach (array('file'=>array_reverse(array( Style::add(array(
'css/default.css', 'type'=>'stdin',
))) as $type => $datas) { 'data'=>'h1 span{background:url('.Config::logo_uri().') no-repeat;}',
));
foreach ($datas as $data) {
Style::add(array(
'type'=>$type,
'data'=>$data,
),TRUE);
}
}
// Our default script(s) // Our default script(s)
foreach (array('file'=>array_reverse(array( foreach (array('file'=>array_reverse(array(
@ -168,27 +161,12 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
// Language // Language
$this->meta->language = Config::instance()->so->language_id; $this->meta->language = Config::instance()->so->language_id;
// Copyright // Description
$this->meta->copywrite = Config::sitename();
// Copyright
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action()); $this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
// Style Sheets Properties
$this->meta->styles = Style::factory();
// Script Properties
$this->meta->scripts = Script::factory();
// Application logo
$this->template->logo = Config::logo();
// Link images on the header line // Link images on the header line
$this->template->headimages = $this->_headimages(); $this->template->headimages = $this->_headimages();
// Control Line
$this->template->control = $this->_control();
// System Messages line // System Messages line
$this->template->sysmsg = $this->_sysmsg(); $this->template->sysmsg = $this->_sysmsg();
@ -245,13 +223,6 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
return HeadImages::factory(); return HeadImages::factory();
} }
/**
* Render our control menu bar
*/
protected function _control() {
return Breadcrumb::factory();
}
protected function _sysmsg() { protected function _sysmsg() {
return SystemMessage::factory(); return SystemMessage::factory();
} }
@ -290,48 +261,5 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
return $path; return $path;
} }
/**
* This action will render all the media related files for a page
* @return void
*/
final public function action_media() {
// Get the file path from the request
$file = $this->request->param('file');
// Find the file extension
$ext = pathinfo($file, PATHINFO_EXTENSION);
// Remove the extension from the filename
$file = substr($file, 0, -(strlen($ext) + 1));
$f = '';
// If our file is pathed with session, our file is in our session.
if ($fd = Session::instance()->get_once($this->request->param('file'))) {
$this->response->body($fd);
// First try and find media files for the site_id
} elseif ($f = Kohana::find_file(sprintf('media/%s',Config::siteid()), $file, $ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
// If not found try a default media file
} elseif ($f = Kohana::find_file('media', $file, $ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
} else {
// Return a 404 status
$this->response->status(404);
}
// Generate and check the ETag for this file
$this->response->check_cache(NULL,$this->request);
// Set the proper headers to allow caching
$this->response->headers('Content-Type',File::mime_by_ext($ext));
$this->response->headers('Content-Length',(string)$this->response->content_length());
$this->response->headers('Last-Modified',date('r', $f ? filemtime($f) : time()));
}
} }
?> ?>

View File

@ -31,6 +31,8 @@ class Controller_lnApp_Tree extends Controller_Default {
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
$(function () { $(function () {
var use_ajax = false;
$("#tree").jstree({ $("#tree").jstree({
themes : { themes : {
"theme" : "classic", "theme" : "classic",
@ -62,6 +64,12 @@ $(function () {
id = data.rslt.obj.attr(\'id\').substr(a+1); id = data.rslt.obj.attr(\'id\').substr(a+1);
if (href = $("#N_"+id).attr("href")) { if (href = $("#N_"+id).attr("href")) {
if (! use_ajax) {
window.location = href;
return;
}
$("#ajBODY").empty().html("<img src=\"'.URL::site('media/img/ajax-progress.gif').'\" alt=\"Loading...\" />"); $("#ajBODY").empty().html("<img src=\"'.URL::site('media/img/ajax-progress.gif').'\" alt=\"Loading...\" />");
$("#ajBODY").load(href, function(r,s,x) { $("#ajBODY").load(href, function(r,s,x) {
if (s == "error") { if (s == "error") {

View File

@ -0,0 +1,4 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
class Controller_Media extends Controller_lnApp_Media {}
?>

View File

@ -11,6 +11,13 @@
* @license http://dev.leenooks.net/license.html * @license http://dev.leenooks.net/license.html
*/ */
class Controller_TemplateDefault extends Controller_lnApp_TemplateDefault { class Controller_TemplateDefault extends Controller_lnApp_TemplateDefault {
public function __construct(Request $request, Response $response) {
if (Config::theme())
$this->template = Config::theme().'/page';
return parent::__construct($request,$response);
}
protected function _headimages() { protected function _headimages() {
// This is where we should be able to change our country // This is where we should be able to change our country
// @todo To implement // @todo To implement

View File

@ -17,22 +17,8 @@ class Controller_Welcome extends Controller_TemplateDefault {
if (! Kohana::config('config.appname')) if (! Kohana::config('config.appname'))
Request::current()->redirect('guide/app'); Request::current()->redirect('guide/app');
Block::add(array( // @todo This should be in the DB or something.
'title'=>'Welcome to lnApp (public)!', Request::current()->redirect('product/categorys');
'subtitle'=>'Using lnApp',
'body'=>'Sample lnApp application',
'footer'=>'lnApp makes building websites easy! '.time(),
));
// @todo Show a login/logout on the breadcrumb
if (! Auth::instance()->logged_in()) {
Script::add(array('type'=>'stdin','data'=>'
$(document).ready(function() {
$("#ajxbody").click(function() {$("#ajBODY").load("'.URL::site('login').'",null,function(x,s,r) {}); return false;});
$("#ajBODY").ajaxSend(function() {$(this).html(\''.sprintf('%s <span class="ajaxmsg">%s<\/span>...',HTML::image('media/img/ajax-progress.gif',array('alt'=>_('Loading Login').'...')),_('Loading Login')).'\');return true;});
});'
));
}
} }
public function action_breadcrumb() { public function action_breadcrumb() {

View File

@ -62,24 +62,26 @@ class lnApp_Breadcrumb extends HTMLRender {
* Render this Breadcrumb * Render this Breadcrumb
*/ */
protected function render() { protected function render() {
// @todo Make this into a view $output = '<ul id="breadcrumb">';
$output = '<table class="pagecontrol"><tr><td class="none">'; $output .= '<li>'.HTML::anchor('/',_('Home')).'</li>';
$output .= HTML::anchor('/',_('Home'));
$data = empty(static::$_data['path']) ? explode('/',preg_replace('/^\//','',Request::detect_uri())) : static::$_data['path']; $data = empty(static::$_data['path']) ? explode('/',preg_replace('/^\//','',Request::detect_uri())) : static::$_data['path'];
$c = count($data);
$i=0;
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$output .= static::$_spacer; $i++;
$p = join('/',array_slice($data,0,$k+1)); $p = join('/',array_slice($data,0,$k+1));
$output .= $i==$c ? '<li id="active">' : '<li>';
$output .= HTML::anchor( $output .= HTML::anchor(
(empty(static::$_data['url'][$p]) ? $p : static::$_data['url'][$p]), (empty(static::$_data['url'][$p]) ? $p : static::$_data['url'][$p]),
(empty(static::$_data['name'][$p]) ? ucfirst($v) : static::$_data['name'][$p]) (empty(static::$_data['name'][$p]) ? ucfirst($v) : static::$_data['name'][$p])
); );
$output .= '</li>';
} }
$output .= '</td></tr></table>'; $output .= '</ul>';
return $output; return $output;
} }
} }

View File

@ -75,7 +75,7 @@ abstract class lnApp_Config extends Kohana_Config {
// Called in Invoice/Emailing to embed the file. // Called in Invoice/Emailing to embed the file.
public static function logo_file() { public static function logo_file() {
list ($path,$suffix) = explode('.',static::$logo); list ($path,$suffix) = explode('.',static::$logo);
return Kohana::find_file(sprintf('media/%s',Config::siteid()),$path,$suffix); return ($a=Kohana::find_file(sprintf('media/site/%s',Config::siteid()),$path,$suffix)) ? $a : Kohana::find_file('media',$path,$suffix);
} }
public static function logo_uri() { public static function logo_uri() {
@ -87,6 +87,10 @@ abstract class lnApp_Config extends Kohana_Config {
return HTML::image(static::logo_uri(),array('class'=>'headlogo','alt'=>_('Logo'))); return HTML::image(static::logo_uri(),array('class'=>'headlogo','alt'=>_('Logo')));
} }
public static function login_uri() {
return ($ao = Auth::instance()->get_user()) ? HTML::anchor('user/account/edit',$ao->name()) : HTML::anchor('login',_('Login'));
}
/** /**
* Return our caching mechanism * Return our caching mechanism
*/ */
@ -129,5 +133,9 @@ abstract class lnApp_Config extends Kohana_Config {
else else
return $config[$template]; return $config[$template];
} }
public static function theme() {
return Kohana::config('config.theme');
}
} }
?> ?>

View File

@ -15,6 +15,8 @@ return array(
'currency_format' => '2', 'currency_format' => '2',
'date_format' => 'd-M-Y', 'date_format' => 'd-M-Y',
'time_format' => 'H:i:s', 'time_format' => 'H:i:s',
'theme' => '', // @todo This should be in the DB
'email_from' => array('noreply@graytech.net.au'=>'Graytech Hosting'),
'email_admin_only'=> array( 'email_admin_only'=> array(
'adsl_traffic_notice'=>array('deon@c5t61p.leenooks.vpn'=>'Deon George'), 'adsl_traffic_notice'=>array('deon@c5t61p.leenooks.vpn'=>'Deon George'),
), ),

View File

@ -1,322 +0,0 @@
/* Default Template CSS */
.form_button {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
padding: 1px;
}
.highlight {
background-color: #AABBCC;
}
table.box-left { border: 1px solid #AAAACC; margin-right: auto; }
table.box-center { border: 1px solid #AAAACC; margin-left: auto; margin-right: auto; }
table.box-full { border: 1px solid #AAAACC; margin-right: auto; width: 100%; }
tr.head { font-weight: bold; }
tr.subhead { background-color: #BBBBDD; }
td.head { font-weight: bold; }
td.bold { font-weight: bold; }
td.bold-right { font-weight: bold; text-align: right; }
td.data { font-weight: bold; }
span.data { font-weight: bold; }
td.data-right { font-weight: bold; text-align: right; }
td.right { text-align: right; }
tr.odd { background-color: #FCFCFE; }
tr.even { background-color: #F6F6F8; }
tr.odd.selected { background-color: #ECECEE; }
tr.even.selected { background-color: #E6E6E8; }
/* Global Page */
table.page {
width: 100%;
border: 0px solid #000000;
font-weight: normal;
color: #000000;
font-family: "bitstream vera sans","luxi sans",verdana,geneva,arial,helvetica,sans-serif;
background-color: #FFFFFF;
font-size: 13px;
empty-cells: hide;
}
/* Page Header - Logo & Title */
table.page tr.pagehead td table.pagehead {
width: 100%;
}
table.page tr.pagehead td table.pagehead td.headlogo {
width: 100px;
height: 50px;
vertical-align: bottom;
text-align: center;
}
table.page tr.pagehead td table.pagehead img.headlogo {
border: 0px;
max-width: 100px;
max-height: 50px;
}
table.page tr.pagehead td table.pagehead td.headtitle {
vertical-align: bottom;
text-align: left;
padding-left: 5px;
font-weight: bold;
}
table.page tr.pagehead td table.pagehead td.headimages {
vertical-align: bottom;
text-align: right;
}
table.page tr.pagehead td table.pagehead td.headimages img {
border: 0px;
}
/* Page Control */
table.page tr.pagecontrol td {
border-top: 1px solid #AAAACC;
border-bottom: 1px solid #AAAACC;
}
table.page tr.pagecontrol td table.pagecontrol {
width: 100%;
}
table.page tr.pagecontrol td table.pagecontrol td.none {
border-top: 0px;
border-bottom: 0px;
font-size: 11px;
text-align: left;
vertical-align: top;
font-weight: bold;
color: #000000;
padding: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
table.page tr.pagecontrol td table.pagecontrol a {
text-decoration: none;
color: #000000;
}
table.page tr.pagecontrol td table.pagecontrol a:hover {
text-decoration: none;
background-color: #FFFFFF;
color: #0000AA;
}
/* Main Page */
/** LEFT **/
table.page tr.pagemain td.pageleft {
background-color: #FCFCFE;
/* display: show; */
vertical-align: top;
border-right: 1px solid #88AACC;
}
table.page tr.pagemain td.pageleft table.pageleft table {
width: 100%;
}
table.page tr.pagemain td.pageleft table.pageleft tr.title {
text-align: center;
margin: 0px;
padding: 10px;
border: 1px solid #000000;
font-weight: bold;
font-size: 110%;
}
table.page tr.pagemain td.pageleft table.pageleft tr.footer {
font-size: 75%;
}
table.page tr.pagemain td.pageleft table.pageleft tr.footer td {
border-top: 1px solid #AAAACC;
border-bottom: 1px solid #AAAACC;
}
table.page tr.pagemain td.pageleft table.pageleft tr.spacer {
font-size: 5px;
}
table.page tr.pagemain td.pageleft table.pageleft tr.spacer td {
border-top: 2px solid #AAAACC;
}
/** BODY **/
table.page tr.pagemain td.pagebody {
background-color: #FCFCFE;
width: 85%;
vertical-align: top;
font-size: 8pt;
}
/*** Body System Message ***/
table.page tr.pagemain td.pagebody table.sysmsg {
border-bottom: 1px solid #88AACC;
width: 100%;
}
table.page tr.pagemain td.pagebody table.sysmsg table {
width: 100%;
}
table.page tr.pagemain td.pagebody table.sysmsg td.icon {
text-align: center;
vertical-align: top;
width: 25px;
height: 50px;
}
table.page tr.pagemain td.pagebody table.sysmsg td.icon img.sysicon {
border: 5px;
max-width: 25px;
max-height: 50px;
}
table.page tr.pagemain td.pagebody table.sysmsg td.head {
font-size: small;
text-align: left;
font-weight: bold;
}
table.page tr.pagemain td.pagebody table.sysmsg td.body {
font-weight: normal;
}
table.page tr.pagemain td.pagebody table.sysmsg tr.spacer {
font-size: 5px;
}
table.page tr.pagemain td.pagebody table.sysmsg tr.spacer td {
border-top: 1px solid #AAAACC;
}
/*** Body Content ***/
table.page tr.pagemain td.pagebody table.content {
font-weight: normal;
background-color: #FCFCFE;
width: 100%;
color: #000000;
}
table.page tr.pagemain td.pagebody table.content table.block {
width: 100%;
}
table.page tr.pagemain td.pagebody table.content table.block td {
vertical-align: top;
}
table.page tr.pagemain td.pagebody table.content table.subblockhead {
width: 100%;
}
table.page tr.pagemain td.pagebody table.content table.subblock {
width: 100%;
border: 1px solid #AAAACC;
}
table.page tr.pagemain td.pagebody table.content tr.title {
text-align: left;
margin: 0px;
color: #000000;
background-color: #F8F8FA;
border: 1px solid #000000;
font-weight: bold;
font-size: 150%;
}
table.page tr.pagemain td.pagebody table.content tr.title td {
padding: 5px;
border-bottom: 1px solid #AAAACC;
color: #000000;
}
table.page tr.pagemain td.pagebody table.content tr.subtitle {
text-align: left;
margin: 0px;
margin-bottom: 15px;
font-size: 75%;
color: #000000;
border-bottom: 1px solid #000000;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
background: #FFFFFF;
font-weight: normal;
}
table.page tr.pagemain td.pagebody table.content tr.subtitle td {
padding: 5px;
}
table.page tr.pagemain td.pagebody table.content tr.footer {
font-size: 75%;
}
table.page tr.pagemain td.pagebody table.content tr.footer td {
border-top: 1px solid #AAAACC;
border-bottom: 1px solid #AAAACC;
padding: 5px;
}
table.page tr.pagemain td.pagebody table.content tr.spacer {
font-size: 5px;
}
table.page tr.pagemain td.pagebody table.content tr.spacer td {
border: 0px solid #AAAACC;
}
/** RIGHT **/
table.page tr.pagemain td.pageright {
background-color: #FCFCFE;
/* display: none; */
vertical-align: top;
border-left: 1px solid #88AACC;
}
table.page tr.pagemain td.pageright table.pageright table {
width: 100%;
}
table.page tr.pagemain td.pageright table.pageright tr.title {
text-align: center;
margin: 0px;
padding: 10px;
border: 1px solid #000000;
font-weight: bold;
font-size: 110%;
}
table.page tr.pagemain td.pageright table.pageright tr.footer {
font-size: 75%;
}
table.page tr.pagemain td.pageright table.pageright tr.footer td {
border-top: 1px solid #AAAACC;
border-bottom: 1px solid #AAAACC;
}
table.page tr.pagemain td.pageright table.pageright tr.spacer {
font-size: 5px;
}
table.page tr.pagemain td.pageright table.pageright tr.spacer td {
border-top: 2px solid #AAAACC;
}
/* Footer */
table.page tr.pagefoot td {
border-top: 1px solid #AAAACC;
font-weight: bold;
font-size: 10px;
text-align: right;
color: #000000;
}

View File

@ -0,0 +1,102 @@
/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
/* change colours to suit your needs */
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}
/* change colours to suit your needs */
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del {
text-decoration: line-through;
}
abbr[title], dfn[title] {
border-bottom:1px dotted;
cursor:help;
}
table {
border-collapse:collapse;
border-spacing:0;
}
/* change border colour to suit your needs */
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em 0;
padding:0;
}
input, select {
vertical-align:middle;
}

View File

@ -1,343 +0,0 @@
/**
* "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
*
* (en) YAML core stylesheet - structure-independent bugfixes of IE/Win CSS-bugs
* (de) YAML Basis-Stylesheet - Strukturunabhängige Bugfixes von CSS-Bugs des IE/Win
*
* Don't make any changes in this file!
* Your changes should be added to a separate patch-file.
*
* @copyright Copyright 2005-2011, Dirk Jesse
* @license CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
* YAML-C (http://www.yaml.de/en/license/license-conditions.html)
* @link http://www.yaml.de
* @package yaml
* @version 3.3.1
* @revision $Revision: 501 $
* @lastmodified $Date: 2011-06-18 17:27:44 +0200 (Sa, 18 Jun 2011) $
* @appdef yaml
*/
@media all
{
/**
* (en) Debugging:When you see a green background, IE is getting this stylesheet
* (de) Fehlersuche:Hintergrund leuchtet grün, wenn das Stylesheet korrekt geladen wurde
*
* @debug
* @app-yaml-default disabled
*/
/* body { background:#0f0; background-image:none; } */
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) No need to force scrollbars in older IE's - it even makes problems in IE6 when set
* (de) Scrollbar-Fix wird in alten IE's nicht benötigt, zudem verursacht der Fix Probleme im IE6
*
* @workaround
* @affected IE6, IE7
* @css-for IE6, IE7
* @valid no
*/
body { o\verflow:visible; }
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Fixes IE5.x and IE6 overflow behavior of textarea and input elements elements
* (de) Korrigiert das fehlerhafte overflow-Verhalten von textarea und input-Elementen
*
* @workaround
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid no
*/
* html iframe,
* html frame { overflow:auto; }
* html input,
* html frameset { overflow:hidden; }
* html textarea { overflow:scroll; overflow-x:hidden; }
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Stability fixes with 'position:relative'
* (de) Stabilitätsverbesserungen durch 'position:relative'
*
* Essential for correct scaling in IE7 (body). IE5 must get static positioned body instead.
* Helpful to fix several possible problems in older IE versions (#main).
*
* @bugfix
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid yes
*/
body, #main { position:relative; }
* html body { position:static; }
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Clearfix adjustents for containing floats in IE
* (de) Clearfix-Anpassung für diverse IE-Versionen
*
* @workaround
* @see http://perishablepress.com/press/2009/12/06/new-clearfix-hack/
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid yes
*/
.clearfix { height:1%; } /* hasLayout aktivieren */
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Special class for oversized content element
* (de) Spezielle Klasse für übergroße Inhaltselemente
*
* @workaround
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
.slidebox {
position:relative;
margin-right:-1000px;
height:1%;
}
/*------------------------------------------------------------------------------------------------------*/
/**
* (en):Bugfix for partially displayed column separators
* (de):Bugfix für unvollständige Darstellung der Spalteninhalte / Spaltentrenner
*
* @bugfix
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
* html #col1,
* html #col2,
* html #col3 { position:relative; }
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Preventing several css bugs by forcing "hasLayout"
* (de) Vermeidung verschiedenster Bugs durch Erzwingen von "hasLayout"
*
* @workaround
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid no
*/
body { height:1%; }
.page_margins, .page, #header, #nav, #main, #footer { zoom:1; } /* IE6 & IE7 */
* html .page_margins, * html .page { height:1%; hei\ght:auto; } /* IE 5.x & IE6 | IE6 only */
* html #header, * html #nav, * html #main, * html #footer { width:100%; wid\th:auto; } /* IE 5.x & IE6 | IE6 only */
/* trigger hasLayout to force containing content */
.subc, .subcl, .subcr { height:1%; }
/*------------------------------------------------------------------------------------------------------*/
/**
* Disappearing List-Background Bug
* @see http://www.positioniseverything.net/explorer/ie-listbug.html
*
* @bugfix
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
* html ul, * html ol, * html dl { position:relative; }
/*------------------------------------------------------------------------------------------------------*/
/**
* List-Numbering Bug
*
* @bugfix
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid yes
*/
body ol li { display:list-item; }
/**
* Form related bugfixes
*
* @bugfix
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid no
*/
fieldset, legend { position:relative; }
/*------------------------------------------------------------------------------------------------------*/
/**
* (en) Workaround for 'collapsing margin at #col3' when using CSS-property clear
* Left margin of #col3 collapses when using clear:both in 1-3-2 (or 2-3-1) layout and right column is the
* longest and left column is the shortest one. For IE6 and IE7 a special workaround was developed
* in YAML.
*
* (de) Workaround für 'kollabierenden Margin an #col3' bei Verwendung der CSS-Eigenschaft clear
* Der linke Margin von #col3 kollabiert bei der Verwendung von clear:both im 1-3-2 (oder 2-3-1) Layout
* wenn gleichzeitig die linke Spalte die kürzeste und die rechte die längste ist. Im IE6 und IE7 lässt
* sich der Bug durch eine speziell für YAML entwickelten Workaround umgehen.
*
* @workaround
* @affected IE 5.x/Win, IE6, IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid no
*/
html #ie_clearing {
/* (en) Only a small help for debugging */
/* (de) Nur eine kleine Hilfe zur Fehlersuche */
position:static;
/* (en) Make container visible in IE */
/* (de) Container sichtbar machen im IE */
display:block;
/* (en) No fix possible in IE5.x, normal clearing used instead */
/* (de) Kein Fix im IE5.x möglich, daher normales Clearing */
\clear:both;
/* (en) forcing clearing-like behavior with a simple oversized container in IE6 & IE7*/
/* (de) IE-Clearing mit 100%-DIV für IE6 bzw. übergroßem Container im IE7 */
width:100%;
font-size:0px;
margin:-2px 0 -1em 1px;
}
* html #ie_clearing { margin:-2px 0 -1em 0; }
#col3_content { margin-bottom:-2px; }
/* (en) avoid horizontal scrollbars in IE7 in borderless layouts because of negative margins */
/* (de) Vermeidung horizontaler Scrollbalken bei randabfallenden Layouts im IE7 */
html { margin-right:1px; }
* html { margin-right:0; }
/* (en) Bugfix:Essential for IE7 */
/* (de) Bugfix:Notwendig im IE7 */
#col3 { position:relative; }
/*------------------------------------------------------------------------------------------------------*/
/**
* IE/Win Guillotine Bug
* @see http://www.positioniseverything.net/explorer/guillotine.html
*
* @workaround
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
* html body a, * html body a:hover { background-color:transparent; }
}
@media screen, projection
{
/**
* (en) IE-Adjustments for content columns and subtemplates
* (de) IE-Anpassung für Spaltencontainer und Subtemplates
*
* Doubled Float-Margin Bug
* @see http://positioniseverything.net/explorer/doubled-margin.html
*
* @bugfix
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6, IE7
* @valid yes
*/
#col1, #col2 { display:inline; }
.c20l, .c25l, .c33l, .c38l, .c40l, .c50l, .c60l, .c62l, .c66l, .c75l, .c80l,
.c20r, .c25r, .c33r, .c38r, .c40r, .c50r, .c60r, .c66r, .c62r, .c75r, .c80r { display:inline; }
/* Fix for:"Linking to anchors in elements within the containing block" Problem in IE5.x & IE 6.0 */
* html .equalize, * html .equalize .subcolumns { overflow:visible; display:block; }
.equalize, .equalize .subcolumns { overflow:hidden; display:block; }
/* transform CSS tables back into floats */
.equalize .c20l,.equalize .c40l,.equalize .c60l,.equalize .c80l,
.equalize .c25l,.equalize .c33l,.equalize .c38l,.equalize .c50l,
.equalize .c62l,.equalize .c66l,.equalize .c75l {
float:left; display:inline;
padding-bottom:32767px;
margin-bottom:-32767px;
}
.equalize .c20r,.equalize .c40r,.equalize .c60r,.equalize .c80r,
.equalize .c25r,.equalize .c33r,.equalize .c38r,.equalize .c50r,
.equalize .c62r,.equalize .c66r,.equalize .c75r {
float:right; margin-left:-5px; display:inline;
padding-bottom:32767px;
margin-bottom:-32767px;
}
.no-ie-padding .c20l,.no-ie-padding .c40l,.no-ie-padding .c60l,.no-ie-padding .c80l,
.no-ie-padding .c20r,.no-ie-padding .c40r,.no-ie-padding .c60r,.no-ie-padding .c80r,
.no-ie-padding .c25l,.no-ie-padding .c33l,.no-ie-padding .c38l,.no-ie-padding .c50l,
.no-ie-padding .c62l,.no-ie-padding .c66l,.no-ie-padding .c75l,
.no-ie-padding .c25r,.no-ie-padding .c33r,.no-ie-padding .c38r,.no-ie-padding .c50r,
.no-ie-padding .c62r,.no-ie-padding .c66r,.no-ie-padding .c75r {
padding-bottom:0;
margin-bottom:0;
}
/*------------------------------------------------------------------------------------------------------*/
/**
* Internet Explorer and the Expanding Box Problem
* @see http://www.positioniseverything.net/explorer/expandingboxbug.html
*
* @workaround
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
* html #col1_content,
* html #col2_content,
* html #col3_content { word-wrap:break-word; }
/* avoid growing widths */
* html .subc,
* html .subcl,
* html .subcr { word-wrap:break-word; o\verflow:hidden; }
}
@media print
{
/**
* (en) Avoid unneeded page breaks of #col3 content in print layout.
* (de) Vermeiden von unnötigen Seitenumbrüchen beim Ausdruck der Spalte #col3.
*
* @bugfix
* @affected IE7
* @css-for IE 5.x/Win, IE6, IE7
* @valid yes
*/
.subc,
.subcl,
.subcr,
.col3 { height:1%; }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

View File

@ -1,12 +0,0 @@
@import url(3.3.1/core/base.css);
@import url(3.3.1/core/iehacks.css);
/* screen layout */
@import url(screen/basemod.css);
@import url(screen/basemod_2col.css);
@import url(navigation/nav_buttons.css);
@import url(3.3.1/screen/content.css);
@import url(screen/content.css);
/* print layout */
@import url(3.3.1/print/print_100_draft.css);

View File

@ -1,16 +0,0 @@
@media screen, projection
{
/* #col1 is the tree menu */
#col1 { width: 25%; float:left; margin-top: 10px;}
#col1_content { padding: 10px 5px 5px 5px; }
/* #col2 is not used */
#col2 { display:none; }
/* #col3 is the main content */
#col3 { margin-left: 25%; margin-right: 0; margin-top: 10px; border-left: 1px #ddd solid;}
#col3_content { padding: 10px 5px 5px 5px; }
#info_box { padding: 5px 5px 5px 5px; margin-top: 0px }
#main {padding: 0em 0}
}

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -177,13 +177,13 @@
* |-------------------------------| * |-------------------------------|
*/ */
#col1 { float:left; width:20%; } #left { float:left; width:20%; vertical-align:top; }
#col2 { float:right; width:20%; } #right { float:right; width:20%; vertical-align:top; }
#col3 { width:auto; margin:0 20%; } #center { width:auto; margin:0 20%; vertical-align:top; }
/* (en) Preparation for absolute positioning within content columns */ /* (en) Preparation for absolute positioning within content columns */
/* (de) Vorbereitung für absolute Positionierungen innerhalb der Inhaltsspalten */ /* (de) Vorbereitung für absolute Positionierungen innerhalb der Inhaltsspalten */
#col1_content, #col2_content, #col3_content { position:relative; } #left_content, #right_content, #center_content { position:relative; }
/*------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------*/

View File

@ -177,6 +177,7 @@
* @section content-tables * @section content-tables
*/ */
/*
table { width:auto; border-collapse:collapse; margin-bottom:0.5em; border-top:2px #888 solid; border-bottom:2px #888 solid; } table { width:auto; border-collapse:collapse; margin-bottom:0.5em; border-top:2px #888 solid; border-bottom:2px #888 solid; }
table caption { font-variant:small-caps; } table caption { font-variant:small-caps; }
table.full { width:100%; } table.full { width:100%; }
@ -193,6 +194,7 @@
tbody tr:hover th[scope="row"], tbody tr:hover th[scope="row"],
tbody tr:hover tbody th.sub { background:#f0e8e8; } tbody tr:hover tbody th.sub { background:#f0e8e8; }
tbody tr:hover td { background:#fff8f8; } tbody tr:hover td { background:#fff8f8; }
*/
/** /**
* ------------------------------------------------------------------------------------------------- # * ------------------------------------------------------------------------------------------------- #

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

View File

@ -1,16 +1,16 @@
@media all { @media all {
#nav_main{width:100%;float:left;background:#000 url(images/buttons/bg_hnav1.gif) repeat-x top left;line-height:0} #nav_main{width:100%;float:left;background:#000 url(images/bg_hnav1.png) repeat-x top left;line-height:0}
#nav_main ul{float:left;display:inline;border-left:1px #000 solid;margin:0 0 0 20px;padding:0} #nav_main ul{float:left;display:inline;border-left:1px #000 solid;margin:0 0 0 20px;padding:0}
#nav_main ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-right:1px #000 solid;margin:0;padding:0} #nav_main ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-right:1px #000 solid;margin:0;padding:0}
#nav_main ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#ccc;margin:0;padding:10px 1em} #nav_main ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#ccc;margin:0;padding:10px 1em}
#nav_main ul li a:focus,#nav_main ul li a:hover,#nav_main ul li a:active{color:#eee;text-decoration:none;background:transparent url(images/buttons/bg_hnav1_hover.gif) repeat-x top right} #nav_main ul li a:focus,#nav_main ul li a:hover,#nav_main ul li a:active{color:#eee;text-decoration:none;background:transparent url(images/bg_hnav1_hover.png) repeat-x top right}
#nav_main ul li#current{background:transparent url(images/buttons/bg_hnav1_hover.gif) repeat-x top right} #nav_main ul li#current{background:transparent url(images/bg_hnav1_hover.png) repeat-x top right}
#nav_main ul li#current a,#nav_main ul li#current a:focus,#nav_main ul li#current a:hover,#nav_main ul li#current a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none} #nav_main ul li#current a,#nav_main ul li#current a:focus,#nav_main ul li#current a:hover,#nav_main ul li#current a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none}
#nav_main2{width:100%;float:left;background:#4e5155;border-top:1px #666 solid;line-height:0;font-size:90%;height:2.2em;overflow:hidden} #nav_main2{width:100%;float:left;background:#4e5155;border-top:1px #666 solid;line-height:0;font-size:90%;height:2.2em;overflow:hidden}
#nav_main2 ul{float:left;display:inline;border-left:0 #aaa solid;border-right:0 #fff solid;border-bottom:red 1px solid;margin:0 0 0 21px;padding:0} #nav_main2 ul{float:left;display:inline;border-left:0 #aaa solid;border-right:0 #fff solid;border-bottom:red 1px solid;margin:0 0 0 21px;padding:0}
#nav_main2 ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-left:0 #fff solid;border-right:0 #aaa solid;margin:0;padding:0} #nav_main2 ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-left:0 #fff solid;border-right:0 #aaa solid;margin:0;padding:0}
#nav_main2 ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#aaa;margin:0;padding:.6em .8em} #nav_main2 ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#aaa;margin:0;padding:.6em .8em}
#nav_main2 ul li a:focus,#nav_main2 ul li a:hover,#nav_main2 ul li a:active{color:#fff;text-decoration:none} #nav_main2 ul li a:focus,#nav_main2 ul li a:hover,#nav_main2 ul li a:active{color:#fff;text-decoration:none}
#nav_main2 ul li#current2{background:#4e5155 url(images/buttons/bg_hnav2_hover.gif) no-repeat bottom center} #nav_main2 ul li#active{background:#4e5155 url(images/bg_hnav2_hover.png) no-repeat bottom center}
#nav_main2 ul li#current2 a,#nav_main2 ul li#current2 a:focus,#nav_main2 ul li#current2 a:hover,#nav_main2 ul li#current2 a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none} #nav_main2 ul li#active a,#nav_main2 ul li#active a:focus,#nav_main2 ul li#active a:hover,#nav_main2 ul li#active a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none}
} }

View File

@ -0,0 +1,14 @@
/* base layout */
@import url(../../../css/html5reset-1.6.1.css);
@import url(base.css);
@import url(content.css);
/* import url(iehacks.css); */
/* screen layout */
@import url(screen/basemod.css);
@import url(screen/contentmod.css);
@import url(navigation/nav_buttons.css);
/* import url(navigation/nav_hlist.css); */
/* print layout */
@import url(print/print_100_draft.css);

View File

@ -1,11 +1,11 @@
@charset "UTF-8"; @charset "UTF-8";
@media screen, projection { @media screen, projection {
body{background:#404347 url(../images/bg_dotted.png) repeat;text-align:center;padding:0;overflow-y:scroll} body{background:#FFF url(../images/bg_dotted.png) repeat;text-align:center;padding:0;overflow-y:scroll}
#page{background:#fff} #page_margins{width:95%;text-align:left;position:relative;margin:auto;overflow:visible;background:#FFF}
#page_margins{width:95%;min-width:740px;max-width:90em;text-align:left;position:relative;margin:auto} #page{width:95%;margin:auto}
#header,#nav,#main,#footer{clear:both} #header,#nav,#main,#footer{clear:both}
#nav { overflow:hidden; } #nav {overflow:hidden}
#topnav{position:static;background:#000 url(../images/bg_head.gif) repeat-x bottom;color:#666;text-align:left;font-size:81.25%;border-bottom:1px #000 solid;overflow:hidden;padding:2px 20px} #topnav{position:static;background:#000 url(../images/bg_head.png) repeat-x bottom;color:#CCC;text-align:left;font-size:81.25%;border-bottom:1px #000 solid;overflow:hidden;padding:2px 20px;height:15px}
#topnav .langMenu{float:right} #topnav .langMenu{float:right}
#topnav .langMenu a{float:left;margin-right:.5em} #topnav .langMenu a{float:left;margin-right:.5em}
#topnav .langMenu img{float:left;border:1px solid #444;margin-right:.3em;margin-top:.1em} #topnav .langMenu img{float:left;border:1px solid #444;margin-right:.3em;margin-top:.1em}
@ -15,24 +15,25 @@ body{background:#404347 url(../images/bg_dotted.png) repeat;text-align:center;pa
#topnav .langMenu span.text{float:left;margin-right:.5em;color:#FFF} #topnav .langMenu span.text{float:left;margin-right:.5em;color:#FFF}
#topnav .langMenu span.text2{float:left;margin-right:.5em} #topnav .langMenu span.text2{float:left;margin-right:.5em}
#topnav .langMenu span.textOff{float:left;margin-right:.5em;color:#666} #topnav .langMenu span.textOff{float:left;margin-right:.5em;color:#666}
#header{height:60px;color:#fff;background:#000 url(../images/bg_logo.gif) repeat-x top;overflow:hidden} #header{height:60px;color:#FFF;background:#000 url(../images/bg_logo.png) repeat-x top;overflow:hidden}
#header img{font-size:208%;margin:10px 0 0 20px} #header img{font-size:208%;margin:10px 0 0 20px}
#nav_main2 .tx-macinasearchbox-pi1{float:right;margin:.2em 2em 2px 0} #nav_main2 .tx-macinasearchbox-pi1{float:right;margin:.2em 2em 2px 0}
#nav_main2 .tx-macinasearchbox-pi1 input.suchBox{width:12em;padding:.1em} #nav_main2 .tx-macinasearchbox-pi1 input.suchBox{width:12em;padding:.1em}
#shadow{height:10px;background:url(../images/bg_main_bottom.gif) repeat-x bottom;border-bottom:1px #888 solid} #shadow{height:10px;background:url(../images/bg_main_bottom.png) repeat-x bottom;border-bottom:1px #888 solid}
#footer{position:relative;color:#888;background:#000 url(../navigation/images/buttons/bg_hnav1.gif) repeat-x top;line-height:2em;padding:20px 20px 10px} #footer{position:relative;color:#888;background:#000 url(../navigation/images/bg_hnav1.png) repeat-x top;line-height:2em;padding:20px 20px 5px;text-align:right;font-size:81.25%}
#backlink{position:absolute;right:20px;bottom:10px;color:#666} #backlink{position:absolute;right:20px;bottom:10px;color:#666}
#backlink img{position:relative;top:5px} #backlink img{position:relative;top:5px}
#main{position:relative;border-top:1px #888 solid;background:#fff url(../images/bg_main_top.gif) repeat-x top} #main{padding:0 0;position:relative;border-top:1px #888 solid;background:#fff url(../images/bg_main_top.png) repeat-x top}
.first{overflow:hidden;width:auto;background:url(../images/bg_firstblock.gif) repeat-x bottom;border-bottom:2px #fff solid;height:1%;padding:0 20px 12px} .first{overflow:hidden;width:auto;background:url(../images/bg_firstblock.gif) repeat-x bottom;border-bottom:2px #fff solid;height:1%;padding:0 20px 12px}
.second{overflow:hidden;color:#f4f4f4;background:#404347 url(../images/bg_body.gif) repeat-x 0 -250px;height:1%;padding:0 20px} .second{overflow:hidden;color:#f4f4f4;background:#404347 url(../images/bg_body.gif) repeat-x 0 -250px;height:1%;padding:0 20px}
* html > body .first{float:left;overflow:visible} * html > body .first{float:left;overflow:visible}
* html > body .second{float:left;overflow:visible} * html > body .second{float:left;overflow:visible}
#col1{width:22.5%} #left{float:none}
#col1_content{margin-left:1em;margin-right:1em;background:inherit} #left_content{margin-left:1em;margin-right:1em;background:inherit;padding:10px 5px 5px 5px}
#col2{width:280px} #right{display:none;float:none}
#col2_content{margin-left:1em;margin-right:1em} #right_content{margin-left:1em;margin-right:1em}
#col3{margin-left:22.5%;margin-right:280px;border-left:0 dotted #ddd;border-right:0 dotted #ddd} #center{margin-right:280px;margin-top:10px;border-left:1px #ddd solid}
#col3_content{margin-left:1em;margin-right:1em} #center_content{margin-left:1em;margin-right:1em;padding:10px 5px 5px 5px}
.skip:focus,a.skip:active{position:absolute;display:block;background:#fff;color:#333} .skip:focus,a.skip:active{position:absolute;display:block;background:#fff;color:#333}
#info_box {padding:5px 5px 5px 5px;margin-top:0px}
} }

View File

@ -11,7 +11,7 @@ h6{font-size:1em;color:#889;padding-bottom:.3em;border-bottom:1px #ddd solid;mar
.second a{color:#aaa;font-weight:700} .second a{color:#aaa;font-weight:700}
.second h3{font-size:1.6em;color:#fff;padding-bottom:.3em;border-bottom:1px #800 solid} .second h3{font-size:1.6em;color:#fff;padding-bottom:.3em;border-bottom:1px #800 solid}
.second h6{border:0;margin:0} .second h6{border:0;margin:0}
h1 span{position:absolute;background:url(/osb/media/img/logo-small.png) no-repeat;height:100%;width:100%;margin-left:-7em;margin-top:-0.4em;} h1 span{position:absolute;height:100%;width:100%;margin-left:-7em;margin-top:-0.4em;}
p,ul,dd,dt{line-height:1.5em} p,ul,dd,dt{line-height:1.5em}
p{line-height:1.5em;text-align:justify;margin:0 0 1em} p{line-height:1.5em;text-align:justify;margin:0 0 1em}
th p{margin:0} th p{margin:0}
@ -35,14 +35,14 @@ a:focus{text-decoration:underline}
#topnav a:focus{color:#fff;text-decoration:underline;background-color:transparent} #topnav a:focus{color:#fff;text-decoration:underline;background-color:transparent}
#footer a{color:#ccc} #footer a{color:#ccc}
#main a.imagelink{padding-left:0;background:transparent} #main a.imagelink{padding-left:0;background:transparent}
table{border-collapse:collapse;width:100%;margin-bottom:.5em} table{border-collapse:separate;width:100%;margin-bottom:.5em;border-spacing:2px}
table.bugs{margin-bottom:1em;margin-top:.5em} table.bugs{margin-bottom:1em;margin-top:.5em}
table.bugs th{background:#444;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em} table.bugs th{background:#444;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.bugs td{background:#888;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em} table.bugs td{background:#888;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.description{margin-bottom:1em;margin-top:.5em} table.description{margin-bottom:1em;margin-top:.5em}
table.description th{background:#aaa;color:#fff;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em} table.description th{background:#aaa;color:#fff;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.description td{background:#f4f4f4;color:#444;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em} table.description td{background:#f4f4f4;color:#444;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
input[type=text],input[type=password],textarea,select{background:#fff url(../images/bg_main_top.gif) repeat-x top;border:1px #ccc solid;padding:.2em} input[type=text],input[type=password],textarea,select{background:#fff url(../images/bg_main_top.png) repeat-x top;border:1px #ccc solid;padding:.2em}
input[type=text]:focus,input[type=password]:focus,textarea:focus,select:focus{border:1px #448 solid;background:#eef;color:#333} input[type=text]:focus,input[type=password]:focus,textarea:focus,select:focus{border:1px #448 solid;background:#eef;color:#333}
input.suchbox{border:1px #666 solid;background:#333;color:#888;padding:3px} input.suchbox{border:1px #666 solid;background:#333;color:#888;padding:3px}
ul.icon{list-style-type:none;margin:0 0 1em;padding:0} ul.icon{list-style-type:none;margin:0 0 1em;padding:0}
@ -128,4 +128,10 @@ fieldset.csc-mailform .csc-mailform-field input,fieldset.csc-mailform .csc-mailf
fieldset.csc-mailform .csc-mailform-field textarea{font-size:1em} fieldset.csc-mailform .csc-mailform-field textarea{font-size:1em}
fieldset.csc-mailform label span{color:red} fieldset.csc-mailform label span{color:red}
input#mailformformtype_mail{margin-left:11.1em} input#mailformformtype_mail{margin-left:11.1em}
#category ul li {list-style:none;min-height:48px;width:30%;margin:0 10px 43px 0;float:left}
#category ul li:nth-last-child(-n+3) {margin-bottom:0} /* Last Row */
#category ul li h3 {text-transform:uppercase;letter-spacing:1px;padding-bottom:6px;font-size:105%;font-weight:bold}
#category ul li p {padding:0;margin:0;}
#category ul li a {color:#111;text-decoration:none}
#category ul li a:focus, #category ul li a:hover, #category ul li a:active {color:#811;text-decoration:none;}
} }

View File

@ -8,9 +8,9 @@
<meta http-equiv="Content-Language" content="<?php echo $meta->language; ?>" /> <meta http-equiv="Content-Language" content="<?php echo $meta->language; ?>" />
<meta name="keywords" content="<?php echo $meta->keywords; ?>" /> <meta name="keywords" content="<?php echo $meta->keywords; ?>" />
<meta name="description" content="<?php echo $meta->description; ?>" /> <meta name="description" content="<?php echo $meta->description; ?>" />
<meta name="copyright" content="<?php echo $meta->copywrite; ?>" /> <meta name="copyright" content="<?php echo Config::copywrite(); ?>" />
<?php echo $meta->styles; ?> <?php echo Style::factory(); ?>
<?php echo $meta->scripts; ?> <?php echo Script::factory(); ?>
</head> </head>
<body> <body>
<table class="page"> <table class="page">
@ -20,7 +20,7 @@
<table class="pagehead"> <table class="pagehead">
<tr> <tr>
<td class="headlogo"> <td class="headlogo">
<a href="<?php echo URL::site(); ?>" class="headlogo"><?php echo $logo;?></a> <?php echo HTML::anchor('',Config::logo(),array('class'=>'headlogo')); ?>
</td> </td>
<td class="headtitle"><?php echo $title; ?></td> <td class="headtitle"><?php echo $title; ?></td>
<td class="headimages"><?php echo $headimages; ?></td> <td class="headimages"><?php echo $headimages; ?></td>
@ -32,7 +32,7 @@
<tr class="pagecontrol"> <tr class="pagecontrol">
<td colspan="3"> <td colspan="3">
<div id="ajCONTROL"> <div id="ajCONTROL">
<?php echo $control; ?> <?php echo Breadcrumb::factory(); ?>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -8,30 +8,20 @@
<meta http-equiv="Content-Language" content="<?php echo $meta->language; ?>" /> <meta http-equiv="Content-Language" content="<?php echo $meta->language; ?>" />
<meta name="keywords" content="<?php echo $meta->keywords; ?>" /> <meta name="keywords" content="<?php echo $meta->keywords; ?>" />
<meta name="description" content="<?php echo $meta->description; ?>" /> <meta name="description" content="<?php echo $meta->description; ?>" />
<meta name="copyright" content="<?php echo $meta->copywrite; ?>" /> <meta name="copyright" content="<?php echo Config::copywrite(); ?>" />
<!-- JavaScript Detection --> <!-- JavaScript Detection -->
<script type="text/javascript">document.documentElement.className += " js";</script> <script type="text/javascript">document.documentElement.className += " js";</script>
<link href="<?php echo URL::site(); ?>media/css/yaml/page.css" rel="stylesheet" type="text/css"/> <?php echo HTML::style('media/theme/yaml/css/page.css'); ?>
<!--[if lte IE 7]> <?php echo Style::factory(); ?>
<link href="<?php #echo URL::site(); ?>media/css/patches/none.css" rel="stylesheet" type="text/css" /> <?php echo Script::factory(); ?>
<![endif]-->
<?php echo $meta->styles; ?>
<?php echo $meta->scripts; ?>
<?php if (! $left) { ?>
<style type="text/css">
#col3 { margin-left: 0; margin-right: 0; border-left: 0px;}
#col3_content{ padding-left: 0px; padding-right: 0px; }
#col1 { display: none;}
</style>
<?php } ?>
</head> </head>
<body> <body>
<!-- skip link navigation --> <!-- begin: skip link navigation -->
<ul id="skiplinks"> <ul id="skiplinks">
<li><a class="skip" href="#nav">Skip to navigation (Press Enter).</a></li> <li><a class="skip" href="#nav">Skip to navigation (Press Enter).</a></li>
<li><a class="skip" href="#col3">Skip to main content (Press Enter).</a></li> <li><a class="skip" href="#left">Skip to main content (Press Enter).</a></li>
</ul> </ul>
<!-- end: skip link navigation -->
<div id="page_margins"> <div id="page_margins">
<div id="page"> <div id="page">
<div id="topnav"> <div id="topnav">
@ -48,51 +38,42 @@
<?php echo HTML::anchor('contact','Contact Us'); ?> <?php echo HTML::anchor('contact','Contact Us'); ?>
</div> </div>
<span class="text2"> &#124; </span> <span class="text2"> &#124; </span>
<?php echo HTML::anchor('login','Login'); ?> <?php echo Config::login_uri(); ?>
</div> </div>
<span><?php echo Company::name(); ?></span> <span><?php echo Config::sitename(); ?></span>
</div> </div>
<div id="header" role="banner"> <div id="header">
<h1><span>&nbsp;</span>&nbsp;</h1> <h1><span>&nbsp;</span>&nbsp;</h1>
</div> </div>
<!-- begin: main navigation #nav --> <!-- begin: main navigation #nav -->
<div id="nav" role="navigation"> <div id="nav">
<div id="nav_main"> <div id="nav_main">
<ul> <ul>
<li id="current"><a href="../index.html">Home</a></li> <li id="current"><?php echo HTML::anchor('','Home'); ?></li>
<li><a href="3col_gfxborder.html">Information</a></li> <li><?php echo HTML::anchor('product/categorys','Products'); ?></li>
<li><a href="3col_gfxborder.html">Products</a></li> <li><?php echo HTML::anchor('staticpage_category/list','FAQ'); ?></li>
</ul> </ul>
</div> </div>
<div id="nav_main2"> <div id="nav_main2">
<?php echo $control; ?> <?php echo Breadcrumb::factory(); ?>
<ul>
<li><a href="en/community/cms-templates.html"><span>CMS Integration</span></a></li>
<li id="current2"><a href="en/community/login.html"><span>Login</span></a></li>
</ul>
</div> </div>
</div> </div>
<!-- end: main navigation --> <!-- end: main navigation -->
<!-- begin: main content area #main --> <!-- begin: main content area #main -->
<div id="main"> <table id="main">
<!-- begin: #col1 - first float column --> <tr>
<div id="col1" role="complementary"> <!-- Left Pane -->
<div id="col1_content" class="clearfix"> <td id="left" <?php echo $left ? '' : 'style="display: none;"'?>>
<?php echo $left; ?> <!-- begin: #left - first float column -->
</div> <div id="left_content" class="clearfix">
</div> <?php echo $left; ?>
<!-- end: #col1 --> </div>
<!-- begin: #col2 second float column --> <!-- end: #left -->
<div id="col2" role="complementary"> </td>
<div id="col2_content" class="clearfix"> <!-- Main Body Pane -->
<?php echo $right; ?> <td id="center">
</div> <!-- begin: #center static column -->
</div> <div id="center_content" class="clearfix">
<!-- end: #col2 -->
<!-- begin: #col3 static column -->
<div id="col3" role="main">
<div id="col3_content" class="clearfix">
<div id="ajBODY">
<!-- begin: info box --> <!-- begin: info box -->
<?php if ((string)$sysmsg) { ?> <?php if ((string)$sysmsg) { ?>
<div id="info_box" class="info" style="display:block;"> <div id="info_box" class="info" style="display:block;">
@ -101,20 +82,38 @@
<?php } ?> <?php } ?>
<!-- end: info box --> <!-- end: info box -->
<?php echo $content; ?> <?php echo $content; ?>
<!-- Begin: IE Column Clearing -->
<div id="ie_clearing">&nbsp;</div> <div id="ie_clearing">&nbsp;</div>
<!-- End: IE Column Clearing --> <!-- End: IE Column Clearing -->
</div> </div>
</div> <!-- end: #center -->
<!-- end: #col3 --> </td>
</div> <!-- Right Pane -->
<td id="right" <?php echo $right ? '' : 'style="display: none;"'?>>
<!-- begin: #right second float column -->
<div id="right_content" class="clearfix">
<?php echo $right; ?>
</div>
<!-- end: #right -->
</td>
</tr>
</table>
<!-- end: #main --> <!-- end: #main -->
<!-- begin: #footer --> <!-- begin: #footer -->
<div id="shadow"></div> <div id="shadow"></div>
<div id="footer" role="contentinfo"><?php echo $footer; ?></div> <div id="footer"><?php echo $footer; ?></div>
<!-- end: #footer --> <!-- end: #footer -->
<div id="debug">
<?php if (Kohana::$environment == Kohana::DEVELOPMENT) { ?>
<div id="kohana-profiler" style="display: none;"><?php echo View::factory('profiler/stats'); ?></div>
<script type="text/javascript">$("#footer").click(function() {$('#kohana-profiler').toggle();});</script>
<?php }?>
<?php if (Kohana::$environment >= Kohana::STAGING) { ?>
<div id="kohana-session" style="display: none; text-align: left;"><?php echo debug::vars(Session::instance()); ?></div>
<script type="text/javascript">$("#footer").click(function() {$('#kohana-session').toggle();});</script>
<?php }?>
</div>
</div> </div>
</div> </div>
<!-- full skiplink functionality in webkit browsers -->
<script src="/osb/media/js/yaml/yaml-focusfix.js" type="text/javascript"></script>
</body> </body>
</html> </html>

222
index.php
View File

@ -1,131 +1,121 @@
<?php <?php
/**
* AgileBill - Open Billing Software
*
* This body of work is free software; you can redistribute it and/or
* modify it under the terms of the Open AgileBill License
* License as published at http://www.agileco.com/agilebill/license1-4.txt
*
* Originally authored by Tony Landis, AgileBill LLC
* Recent modifications by Deon George
*
* @author Deon George <deonATleenooksDOTnet>
* @copyright 2009 Deon George
* @link http://osb.leenooks.net
*
* @link http://www.agileco.com/
* @copyright 2004-2008 Agileco, LLC.
* @license http://www.agileco.com/agilebill/license1-4.txt
* @author Tony Landis <tony@agileco.com>
* @package AgileBill
* @subpackage Core
*/
/** /**
* The main AgileBill Index Page * The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = 'application';
/**
* The directory in which your modules are located.
*
* @see http://kohanaframework.org/guide/about.install#modules
*/
$modules = 'modules';
/**
* The directory in which upstream Kohana resources (modules) are located.
*/
$sysmodules = 'includes/kohana/modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://kohanaframework.org/guide/about.install#system
*/
$system = 'includes/kohana/system';
/**
* The default extension of resource files. If you change this, all resources
* must be renamed to use the new extension.
*
* @see http://kohanaframework.org/guide/about.install#ext
*/
define('EXT', '.php');
/**
* Set the PHP error reporting level. If you set this in php.ini, you remove this.
* @see http://php.net/error_reporting
*
* When developing your application, it is highly recommended to enable notices
* and strict warnings. Enable them by using: E_ALL | E_STRICT
*
* In a production environment, it is safe to ignore notices and strict warnings.
* Disable them by using: E_ALL ^ E_NOTICE
*
* When using a legacy application with PHP >= 5.3, it is recommended to disable
* deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
*/
error_reporting(E_ALL | E_STRICT);
/**
* End of standard configuration! Changing any of the code below should only be
* attempted by those with a working knowledge of Kohana internals.
*
* @see http://kohanaframework.org/guide/using.configuration
*/ */
date_default_timezone_set('Australia/Melbourne'); // Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
ob_start(); // Make the application relative to the docroot, for symlink'd index.php
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
# Check if we are task, and if so, override our default id // Make the modules relative to the docroot, for symlink'd index.php
$runTasks = false; if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
if (isset($_SERVER['argv']) && is_array($_SERVER['argv'])) { $modules = DOCROOT.$modules;
# Pre-set our SERVER_NAME
if (! isset($_SERVER['SERVER_NAME']))
$_SERVER['SERVER_NAME'] = isset($_SERVER['HOSTNAME']) ? $_SERVER['HOSTNAME'] : trim(shell_exec('hostname'));
foreach ($_SERVER['argv'] as $key => $values) // Make the system relative to the docroot, for symlink'd index.php
if ($values == '_task=1') if ( ! is_dir($sysmodules) AND is_dir(DOCROOT.$sysmodules))
$runTasks = true; $sysmodules = DOCROOT.$sysmodules;
elseif (preg_match('/^site=/',$values))
$_SERVER['SERVER_NAME'] = preg_replace('/^site=(.*)$/',"$1",$values); // Make the system relative to the docroot, for symlink'd index.php
elseif (preg_match('/^debug=/',$values)) if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$hardcode['debug'] = preg_replace('/^debug=(.*)$/',"$1",$values); $system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SMDPATH', realpath($sysmodules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $modules, $sysmodules, $system);
if (file_exists('install'.EXT))
{
// Load the installation check
return include 'install'.EXT;
} }
require_once('config.inc.php'); /**
require_once('modules/module.inc.php'); * Define the start time of the application, used for profiling.
require_once('modules/core/vars.inc.php'); */
$C_vars = new CORE_vars; if ( ! defined('KOHANA_START_TIME'))
{
# Set our _REQUEST vars define('KOHANA_START_TIME', microtime(TRUE));
$VAR = $C_vars->f;
# Jump to install if we havent been installed.
if (! defined('PATH_AGILE')) {
if (is_file('install/install.inc'))
require_once('install/install.inc');
exit;
} }
require_once('includes/adodb/adodb.inc.php'); /**
require_once('includes/smarty/Smarty.class.php'); * Define the memory usage at the start of the application, used for profiling.
require_once(PATH_CORE.'auth.inc.php'); */
require_once(PATH_CORE.'database.inc.php'); if ( ! defined('KOHANA_START_MEMORY'))
require_once(PATH_CORE.'list.inc.php'); {
require_once(PATH_CORE.'method.inc.php'); define('KOHANA_START_MEMORY', memory_get_usage());
require_once(PATH_CORE.'session.inc.php');
require_once(PATH_CORE.'theme.inc.php');
require_once(PATH_CORE.'translate.inc.php');
require_once(PATH_CORE.'setup.inc.php');
require_once(PATH_CORE.'xml.inc.php');
$C_debug = new CORE_debugger;
$C_setup = new CORE_setup;
$C_sess = new CORE_session;
$C_sess->session_constant();
$C_method = new CORE_method;
$C_translate = new CORE_translate;
if ((isset($VAR['_login'])) && (isset($VAR['_username'])) && (isset($VAR['_password']))) {
require_once(PATH_CORE.'login.inc.php');
$C_login = new CORE_login_handler();
$C_login->login($VAR);
} elseif (isset($VAR['_logout'])) {
require_once(PATH_CORE.'login.inc.php');
$C_login = new CORE_login_handler();
$C_login->logout($VAR);
} }
$C_sess->session_constant_log(); // Bootstrap the application
$C_auth = new CORE_auth(false); require APPPATH.'bootstrap'.EXT;
$smarty = new Smarty; /**
$C_list = new CORE_list; * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
$C_block = new CORE_block; * If no source is specified, the URI will be automatically detected.
*/
# See if we are being called to do task activities echo Request::factory()
if ($runTasks) { ->execute()
require_once(PATH_MODULES.'task/task.inc.php'); ->send_headers()
$task = new task; ->body();
$task->run_all();
exit;
}
$C_method->do_all();
if (isset($C_auth2) && $C_auth2 != false && defined('FORCE_SESS_ACCOUNT')) {
$smarty->assign('SESS_LOGGED',FORCE_SESS_LOGGED);
$smarty->assign('SESS_ACCOUNT',FORCE_SESS_ACCOUNT);
} else {
$smarty->assign('SESS_LOGGED',SESS_LOGGED);
$smarty->assign('SESS_ACCOUNT',SESS_ACCOUNT);
}
$smarty->assign_by_ref('method',$C_method);
$smarty->assign_by_ref('list',$C_list);
$smarty->assign_by_ref('block',$C_block);
$smarty->assign_by_ref('alert',$C_debug->alert);
$smarty->assign('VAR',$VAR);
$smarty->assign('SESS',SESS);
$smarty->assign('SSL_URL',SSL_URL);
$smarty->assign('URL',URL);
$C_theme = new CORE_theme;
ob_end_flush();
?>

121
kh.php
View File

@ -1,121 +0,0 @@
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = 'application';
/**
* The directory in which your modules are located.
*
* @see http://kohanaframework.org/guide/about.install#modules
*/
$modules = 'modules';
/**
* The directory in which upstream Kohana resources (modules) are located.
*/
$sysmodules = 'includes/kohana/modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://kohanaframework.org/guide/about.install#system
*/
$system = 'includes/kohana/system';
/**
* The default extension of resource files. If you change this, all resources
* must be renamed to use the new extension.
*
* @see http://kohanaframework.org/guide/about.install#ext
*/
define('EXT', '.php');
/**
* Set the PHP error reporting level. If you set this in php.ini, you remove this.
* @see http://php.net/error_reporting
*
* When developing your application, it is highly recommended to enable notices
* and strict warnings. Enable them by using: E_ALL | E_STRICT
*
* In a production environment, it is safe to ignore notices and strict warnings.
* Disable them by using: E_ALL ^ E_NOTICE
*
* When using a legacy application with PHP >= 5.3, it is recommended to disable
* deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
*/
error_reporting(E_ALL | E_STRICT);
/**
* End of standard configuration! Changing any of the code below should only be
* attempted by those with a working knowledge of Kohana internals.
*
* @see http://kohanaframework.org/guide/using.configuration
*/
// Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// Make the application relative to the docroot, for symlink'd index.php
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
// Make the modules relative to the docroot, for symlink'd index.php
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
// Make the system relative to the docroot, for symlink'd index.php
if ( ! is_dir($sysmodules) AND is_dir(DOCROOT.$sysmodules))
$sysmodules = DOCROOT.$sysmodules;
// Make the system relative to the docroot, for symlink'd index.php
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SMDPATH', realpath($sysmodules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $modules, $sysmodules, $system);
if (file_exists('install'.EXT))
{
// Load the installation check
return include 'install'.EXT;
}
/**
* Define the start time of the application, used for profiling.
*/
if ( ! defined('KOHANA_START_TIME'))
{
define('KOHANA_START_TIME', microtime(TRUE));
}
/**
* Define the memory usage at the start of the application, used for profiling.
*/
if ( ! defined('KOHANA_START_MEMORY'))
{
define('KOHANA_START_MEMORY', memory_get_usage());
}
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
echo Request::factory()
->execute()
->send_headers()
->body();

View File

@ -40,7 +40,7 @@ class Model_Invoice_Item extends ORMOSB {
// Items belonging to an invoice // Items belonging to an invoice
private $subitems = array(); private $subitems = array();
private $subitems_load = FALSE; private $subitems_loaded = FALSE;
public function __construct($id = NULL) { public function __construct($id = NULL) {
// Load our model. // Load our model.
@ -51,9 +51,9 @@ class Model_Invoice_Item extends ORMOSB {
private function load_sub_items() { private function load_sub_items() {
// Load our sub items // Load our sub items
if (! $this->subitems_load AND $this->loaded()) { if (! $this->subitems_loaded AND $this->loaded()) {
$this->subitems['tax'] = $this->invoice_item_tax->find_all()->as_array(); $this->subitems['tax'] = $this->invoice_item_tax->find_all()->as_array();
$this->subitems_load = TRUE; $this->subitems_loaded = TRUE;
} }
return $this; return $this;

View File

@ -11,6 +11,25 @@
* @license http://dev.leenooks.net/license.html * @license http://dev.leenooks.net/license.html
*/ */
class Controller_Product extends Controller_TemplateDefault { class Controller_Product extends Controller_TemplateDefault {
public function action_categorys() {
$output = '<div id="category">';
$output .= '<ul>';
foreach (ORM::factory('product_category')->list_active()->find_all() as $pco) {
$a = '<h3>'.$pco->display('name').'</h3>';
$a .= '<p>'.$pco->description().'</p>';
$output .= '<li>';
$output .= HTML::anchor('product/category/'.$pco->id,$a);
$output .= '</li>';
}
$output .= '</ul>';
$output .= '</div>';
$this->template->content = $output;
}
/** /**
* Show the available topics in a category * Show the available topics in a category
* @todo Only show categories according to their validity dates * @todo Only show categories according to their validity dates

View File

@ -13,10 +13,22 @@
class Model_Product_Category extends ORMOSB { class Model_Product_Category extends ORMOSB {
protected $_table_name = 'product_cat'; protected $_table_name = 'product_cat';
protected $_has_many = array(
'product_category_translate'=>array('foreign_key'=>'product_cat_id','far_key'=>'id'),
);
protected $_sorting = array( protected $_sorting = array(
'name'=>'asc', 'name'=>'asc',
); );
public function description() {
return ($a=$this->product_category_translate->where('language_id','=','en')->find()->description) ? $a : 'No Description';
}
public function list_active() {
return $this->where('status','=',1);
}
public function list_bylistgroup($cat) { public function list_bylistgroup($cat) {
$result = array(); $result = array();