Ejemplo n.º 1
0
 public function __construct()
 {
     $this->action = null;
     $this->params = null;
     $this->request = $this->getRouter()->getCurrentRequest();
     $this->title = ucfirst(last($this->request->segments()));
     $this->theme = \Theme::theme(config('site.theme', 'semui'))->layout($this->layout);
 }
Ejemplo n.º 2
0
 /**
  * initialize theme
  * @param  string $theme forcing theme to load used in the admin
  * @return void        
  */
 public static function initialize($theme = NULL)
 {
     //we are not forcing the view of other theme
     if ($theme === NULL) {
         //first we check if it's a mobile device
         if (($mobile_theme = self::is_mobile()) !== FALSE) {
             $theme = $mobile_theme;
         } else {
             $theme = Core::config('appearance.theme');
         }
         //if we allow the user to select the theme, perfect for the demo
         if (Core::config('appearance.allow_query_theme') == '1') {
             if (Core::get('theme') !== NULL) {
                 $theme = Core::get('theme');
             } elseif (Cookie::get('theme') !== '') {
                 $theme = Cookie::get('theme');
             }
         }
         //we save the cookie for next time
         Cookie::set('theme', $theme, Core::config('auth.lifetime'));
     }
     //check the theme exists..
     if (!file_exists(self::theme_init_path($theme))) {
         $theme = Core::config('appearance.theme');
     }
     //load theme init.php like in module, to load default JS and CSS for example
     self::$theme = $theme;
     Kohana::load(self::theme_init_path(self::$theme));
     self::load();
 }
Ejemplo n.º 3
0
			<h2 class="form-signin-heading"><?php 
    echo FORGOT_PASS;
    ?>
</h2>
			<div class="form-group">
				<label><?php 
    echo FILLIN_USERNAME;
    ?>
</label>
				<input type="text" name="username" class="form-control" placeholder="<?php 
    echo USERNAME;
    ?>
" required autofocus>
			</div>
			<input type="hidden" name="token" value="<?php 
    echo TOKEN;
    ?>
">
			<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?php 
    echo REQUEST_PASS;
    ?>
</button>
		</form>
	</div>
</div>
<?php 
} else {
    echo "<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}
Theme::theme('footer');
System::Zipped();
Ejemplo n.º 4
0
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = "";
$data['max'] = Options::get('post_perpage');
if (isset($_GET['paging'])) {
    $paging = Typo::int($_GET['paging']);
    if ($paging > 0) {
        $offset = ($paging - 1) * $data['max'];
    } else {
        $offset = 0;
    }
    $pagingtitle = " - Page {$paging}";
} else {
    $offset = 0;
    $paging = 1;
    $pagingtitle = "";
}
//echo $paging;
$data['sitetitle'] = Site::$slogan . $pagingtitle;
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                            WHERE `type` = 'post' \n                            AND `status` = '1'\n                            ORDER BY `date` \n                            DESC LIMIT %d, %d", $offset, $data['max']));
$data['num'] = Db::$num_rows;
$url = SMART_URL ? Site::$url : Site::$url . '/index.php?';
$paging = array('paging' => $paging, 'table' => 'posts', 'where' => '`type` = \'post\'', 'max' => $data['max'], 'url' => $url, 'type' => Options::get('pagination'));
$data['paging'] = Paging::create($paging, SMART_URL);
Theme::theme('header', $data);
Theme::theme('index', $data);
Theme::footer();
/* End of file default.control.php */
/* Location: ./inc/lib/Control/Frontend/default.control.php */
Ejemplo n.º 5
0
 /** 
  * Sets the theme
  *
  * @access	public
  * @param	string	The theme folder
  */
 public static function set_theme($t)
 {
     self::$theme = $t;
     // Add current theme path to Finder searching path
     Finder::add_path(self::get_theme_path());
 }
Ejemplo n.º 6
0
<div class="col-sm-8 blog-main">
<?php 
foreach ($data['posts'] as $p) {
    # code...
    echo "\n        <div class=\"blog-post\">\n            <h2 class=\"blog-post-title\">{$p->title}</h2>\n           \n           " . Typo::Xclean($p->content) . "\n        </div>\n            ";
}
?>
</div>
<?php 
Theme::theme('rightside', $data);
Ejemplo n.º 7
0
<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150219
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
header("HTTP/1.0 403 Forbidden");
if (Theme::exist('403')) {
    Theme::theme('403');
} else {
    echo "<center>\n        <h1>Ooops!!</h1>\n        <h2 style=\"font-size: 20em\">403</h2>\n        <h3>Forbidden</h3>\n        Back to <a href=\"" . Options::get('siteurl') . "\">" . Options::get('sitename') . "</a>\n        </center>\n        ";
    Site::footer();
}
Ejemplo n.º 8
0
<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150219
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
header("HTTP/1.0 400 Bad Request");
if (Theme::exist('400')) {
    Theme::theme('400');
} else {
    echo "<center>\n        <h1>Ooops!!</h1>\n        <h2 style=\"font-size: 20em\">400</h2>\n        <h3>Bad Request</h3>\n        Back to <a href=\"" . Options::get('siteurl') . "\">" . Options::get('sitename') . "</a>\n        </center>\n        ";
    Site::footer();
}
Ejemplo n.º 9
0
<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150219
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
header("HTTP/1.0 404 Not Found");
if (Theme::exist('404')) {
    Theme::theme('404');
} else {
    echo "<center>\n        <h1>Ooops!!</h1>\n        <h2 style=\"font-size: 20em\">404</h2>\n        <h3>Page Not Found</h3>\n        Back to <a href=\"" . Options::get('siteurl') . "\">" . Options::get('sitename') . "</a>\n        </center>\n        ";
    Site::footer();
}
Ejemplo n.º 10
0
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20141006
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = $_GET[$vars];
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                            WHERE `id` = '%d' \n                            AND `type` = 'post'\n                            AND `status` = '1' \n                            LIMIT 1", $post));
if (Db::$num_rows > 0) {
    Theme::theme('header', $data);
    Theme::theme('single', $data);
    Theme::footer();
    Stats::addViews($post);
    exit;
} else {
    Control::error('404');
    exit;
}
/* End of file post.control.php */
/* Location: ./inc/lib/Control/Frontend/post.control.php */
Ejemplo n.º 11
0
<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150219
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
header("HTTP/1.0 500 Internal Server Error");
if (Theme::exist('500')) {
    Theme::theme('500');
} else {
    echo "<center>\n        <h1>Ooops!!</h1>\n        <h2 style=\"font-size: 20em\">500</h2>\n        <h3>Internal Server Error</h3>\n        Back to <a href=\"" . Options::get('siteurl') . "\">" . Options::get('sitename') . "</a>\n        </center>\n        ";
    Site::footer();
}
Ejemplo n.º 12
0
 /** 
  * Sets the theme
  *
  * @access	public
  * @param	string	The theme folder
  */
 public static function set_theme($t)
 {
     self::$theme = $t;
 }
Ejemplo n.º 13
0
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
switch ($_GET['page']) {
    case 'sitemap':
        # code...
        Sitemap::create();
        exit;
        break;
    default:
        # code...
        $page = Typo::cleanX(Typo::strip($_GET['page']));
        $data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                                    WHERE (`id` = '%d' OR `slug` = '%s')\n                                    AND `type` = 'page'\n                                    AND `status` = '1'\n                                    LIMIT 1", $page, $page));
        if (Db::$num_rows > 0) {
            Theme::theme('header', $data);
            Theme::theme('page', $data);
            Theme::footer();
            Stats::addViews($page);
            exit;
        } else {
            Control::error('404');
            exit;
        }
        break;
}
/* End of file page.control.php */
/* Location: ./inc/lib/Control/Frontend/page.control.php */
Ejemplo n.º 14
0
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = "";
$cat = Db::escape(Typo::Xclean($_GET['cat']));
$data['max'] = Options::get('post_perpage');
if (isset($_GET['paging'])) {
    $paging = Typo::int($_GET['paging']);
    if ($paging > 0) {
        $offset = ($paging - 1) * $data['max'];
    } else {
        $offset = 0;
    }
    $pagingtitle = " - Page {$paging}";
} else {
    $offset = 0;
    $paging = 1;
    $pagingtitle = "";
}
$data['sitetitle'] = "Category: " . Categories::name($cat) . $pagingtitle;
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                    WHERE `type` = 'post' \n                    AND `cat` = '%d'\n                    AND `status` = '1'\n                    ORDER BY `date` \n                    DESC LIMIT %d, %d", $cat, $offset, $data['max']));
$data['num'] = Db::$num_rows;
$url = Url::cat($_GET['cat']);
$paging = array('paging' => $paging, 'table' => 'posts', 'where' => '`type` = \'post\' AND `cat` = \'' . $cat . '\'', 'max' => $data['max'], 'url' => $url, 'type' => Options::get('pagination'));
$data['paging'] = Paging::create($paging, SMART_URL);
Theme::theme('header', $data);
Theme::theme('cat', $data);
Theme::footer();
exit;
/* End of file cat.control.php */
/* Location: ./inc/lib/Control/Frontend/cat.control.php */