This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.

36 lines
1.1 KiB
PHP
Raw Normal View History

2010-11-30 09:41:08 +11:00
<?php defined('SYSPATH') or die('No direct access allowed.');
2010-08-21 14:43:03 +10:00
2010-11-30 09:41:08 +11:00
/**
2011-07-14 08:59:32 +10:00
* lnApp Main home page
2010-11-30 09:41:08 +11:00
*
2011-07-14 08:59:32 +10:00
* @package lnApp
2010-11-30 09:41:08 +11:00
* @subpackage Page/Home
* @category Controllers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Controller_Welcome extends Controller_TemplateDefault {
2011-07-14 08:59:32 +10:00
protected $auth_required = FALSE;
2010-11-30 09:41:08 +11:00
public function action_index() {
2011-05-02 22:20:56 +10:00
Block::add(array(
2010-11-30 09:41:08 +11:00
'title'=>'Welcome to lnApp (public)!',
'subtitle'=>'Using lnApp',
'body'=>'Sample lnApp application',
'footer'=>'lnApp makes building websites easy! '.time(),
));
2010-08-21 14:43:03 +10:00
2011-05-14 17:35:33 +10:00
// @todo Show a login/logout on the breadcrumb
if (! Auth::instance()->logged_in()) {
2010-11-30 09:41:08 +11:00
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;});
});'
));
}
}
}
?>