code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php defined('SYSPATH') or die('No direct access allowed.'); /** * File Auth driver. * [!!] this Auth driver does not support roles nor autologin. * * @package Kohana/Auth * @author Kohana Team * @copyright (c) 2007-2010 Kohana Team * @license http://kohanaframework.org/license */ class Kohana_Auth_...
PHP
<?php defined('SYSPATH') or die('No direct access allowed.'); /** * User authorization library. Handles user login and logout, as well as secure * password hashing. * * @package Kohana/Auth * @author Kohana Team * @copyright (c) 2007-2010 Kohana Team * @license http://kohanaframework.org/license */ a...
PHP
<?php defined('SYSPATH') or die('No direct access allowed.'); class Auth_File extends Kohana_Auth_File { }
PHP
<?php defined('SYSPATH') or die('No direct access allowed.'); abstract class Auth extends Kohana_Auth { }
PHP
<div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Cập nhật menu</h3> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <?php echo $form->render(); ?> </div> </div>
PHP
<?php echo FlashMessage::getInstance()->display(); ?> <h3 id="page-intro">Danh sách menu</h3> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <?php if(!$menu->getNode()->isRoot()): ?> <h3><a href="<?php echo Route::url('menu-list',array('id' => $menu->ge...
PHP
<?php $parent = $menu->getNode()->getParent(); $action = ""; if($parent){ if($parent->getNode()->isRoot()){ $action = Route::Url('menu-list'); }else{ $action = Route::Url('menu-list',array('id' => $parent->id)); } } ?> <form method="post" action="<?php echo $action; ?>"> <fieldset> <p> <!-- ...
PHP
<?php if (isset($root) && $root): ?> <?php $children_menu = $root->getNode()->getChildren(); ?> <?php if($children_menu):?> <?php foreach ($children_menu as $item): ?> <tr> <td><input name="menu_ids[]" type="checkbox" /></td> <td><a href="<?php echo Route::url('menu-list',array...
PHP
<select name="<?php echo $name; ?>"> <?php foreach ($nodes as $node):?> <?php if(isset($sLevel)){ if($node['level'] > $sLevel){ continue; }else{ unset($sLevel); } } ?> <?php if($node['id'] == $explode):?> <?php $sLevel = $node['level']; continue; ?> <?php endif;?> <option <...
PHP
<h3 id="page-intro">Chỉnh sửa danh mục</h3> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Cập nhật danh mục</h3> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <?php echo $form->render(); ?> </...
PHP
<?php echo FlashMessage::getInstance()->display(); ?> <h3 id="page-intro">Danh sách danh mục</h3> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <!-- Set My Category Breadcrumb here --> <h3><?php echo $breadcrumb; ?></h3> <ul class="content-box-tabs">...
PHP
<a href="<?php echo Route::url('category-tree') ?>">../</a> <?php if ($paths && is_array($paths)):?> <?php $last = ''?> <?php foreach ($paths as $p):?> <?php $last .= '/'.$p; ?> <a href="<?php echo Route::url('category-tree',array('path' => $last)) ?>"><?php echo $p?>/</a> <?php endforeach;?> <?php en...
PHP
<form method="post" action="<?php if(isset($path)){ echo Route::url('category-tree',array('path' => $path->getPath())); } ?>"> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input type="hidden" name="parent_id" value="<?php echo $parent->id; ?>" ...
PHP
<?php if (isset($category) && $category): ?> <?php $children_category = $category->getNode()->getChildren(); ?> <?php if($children_category):?> <?php foreach ($children_category as $item): ?> <tr> <td><input type="checkbox" /></td> <td><a href="<?php echo Route::Url('category-t...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * @author thanh.dang */ //Set new Route for display list category Route::set('category-tree','admin/category/tree(/<path>)',array( 'path' => '[0-9a-zA-Z//-]+' ))->defaults(array( 'directory' => 'admin', 'controller' => 'category', 'action' => 'inde...
PHP
<?php class Category_Path { protected $category; protected $ancestors; /** * @param expected instance of Category type $category */ public function __construct($category){ if(!$category instanceof Category){ throw new Exception("An instance of Category type is expected."); } $this->category = $category...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Controller_Admin_Menu extends Controller_Admin_Layout { public function __construct($request, $response){ parent::__construct($request, $response); } public function action_index($id = null){ if(Request::current()->method() === 'POST'){ ...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * @author thanh.dang * @todo Category Controller */ class Controller_Admin_Category extends Controller_Admin_Layout { function __construct(Request $request, Response $response) { parent::__construct($request, $response); } ...
PHP
<?php /** * @author thanh.dang */ class Libs_Menu { private static $instance; private $default_root_name = 'root'; private static $cache; private function __construct(){ } public static function getInstance(){ if(!isset(self::$instance)){ self::$instance = new Libs_Menu(); } return self::$ins...
PHP
<?php /** * @author thanh.dang * @version 1.0 */ class Libs_Category { private static $instance; private static $cache; private function __construct() { } public static function getInstance() { if(!isset(self::$instance)){ return new Libs_Category(); ...
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#">Kết quả tìm kiếm bất động sản</a></div> </div> </div> <?php echo $list->render(); ?> </div>
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#">Danh sách bất động sản đang giao dịch</a></div> </div> </div> <?php echo $list->render(); ?> </div>
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#">Các tin rao bán đuợc đăng bởi <?php echo $user->username; ?></a></div> </div> </div> <?php echo $list_land->render(); ?> </div>
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#">Thông tin rao bán</a></div> </div> </div> <?php if($land): ?> <div id="bg_products"> <p><strong>Thông tin liên hệ: <?php echo $land->contact_name .' - '. $land->contact_phone; ?></strong>...
PHP
<div class="search"><!--start search--> <div class="search_1"><img src="<?php echo Url::client_assets() ?>/images/tim.jpg" width="30" height="30" border="0"></div> <div class="search_2" align="left">Tìm kiếm năng cao</div> <div class="search_3"><!--start search_3--> <form method="post" action="<?php...
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a>Đăng tin rao bán bất động sản</a></div> </div> </div> <div id="bg_products" style="width: 97%"> <div> <h4>Nhập thông tin bất động sản cho bán hoặc cho thuê</h4> <?php echo ...
PHP
<div id="bg_products"> <ul> <?php foreach($lands as $land):?> <li> <span class="img_products"><a href="<?php echo Route::url('default',array('controller' => 'land','action' => 'detail', 'id' => $land->id))?>"><img width="110px" height="90px" src="<?php echo Tools::get_land_image(...
PHP
<?php echo FlashMessage::getInstance()->display(); ?> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Sửa thông tin dự án</h3> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <?php echo $form->rend...
PHP
<?php echo FlashMessage::getInstance()->display(); ?> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Quản lý dự án</h3> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">Danh sách dự án</a></li> <!-- href must be unique and match the id ...
PHP
<form action="<?php echo Route::url('admin',array('controller' => 'land', 'action' => 'manage')); ?>" method="post"> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <?php if($land->state() == Doctrine_Record::STATE_CLEAN):?> <input type...
PHP
<table> <thead> <tr> <th><input class="check-all" type="checkbox" /></th> <th style="width:50%">Tiêu đề</th> <th>Địa điểm</th> <th>Loại giao dịch</th> <th>Liên hệ</th> <th>&nbsp;</th> </tr> </thead> <tfoot> <tr> <td colspan="6"> <?php echo $pagination; ?> <di...
PHP
<?php Route::set('admin-land-list','admin/land(/<action>(/<page>(?<query>)))',array( 'action' => '(manage|search)', 'page' => '[0-9]+' ))->defaults(array( 'directory' => 'admin', 'controller' => 'land', 'action' => 'manage', 'page' => 1 )); Route::set('client-land-list','land(/<action>(/<page>(?<query>)))',a...
PHP
<?php class Controller_Land extends Controller_Client_Layout { public function __construct(Request $request, Response $response) { parent::__construct($request, $response); if(Request::current()->action() === 'post') { // required login if(!Api::loa...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * @author thanh.dang * @todo Land Controller */ class Controller_Admin_Land extends Controller_Admin_Layout { function action_manage() { if(Request::current()->method() === 'POST'){ $valid = Validation::factory($_POST) ->rule('titl...
PHP
<?php class Libs_Land { /** * Land status for active */ const STATUS_APPROVAL = 1; /** * Land status for pending */ const STATUS_PENDING = 2; private static $instance; private function __construct(){ } /** * * @return Libs_Land */ public sta...
PHP
<?php class Direction { const N = 'Bắc'; const E = 'Đông'; const W = 'Tây'; const S = 'Nam'; const ES = 'Đông nam'; const EN = 'Đông bắc'; const WN = 'Tây bắc'; const WS = 'Tây nam'; public static function get_direction() { return array( 'N' => self::N, ...
PHP
<?php /* Doctrine integration */ require Kohana::find_file('classes', 'vendor/doctrine/Doctrine'); spl_autoload_register(array('Doctrine', 'autoload')); // Getting kohana configurations for doctrine $db = Kohana::config('database'); // initializing manager $Manager = Doctrine_Manager::getInstance(); // we lo...
PHP
<?php defined('SYSPATH') or die('No direct access allowed.'); /** * ORM Doctrine driver. * * @package Auth * @author Flynsarmy * @copyright (c) 2009 Flynsarmy * @license Teh FREEZ!! //http://kohanaphp.com/license.html */ class Auth_Doctrine extends Auth { /** * Checks if a session is active. * ...
PHP
<?php /* * $Id$ * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CO...
PHP
<?php /** * Fetchs a flat array of values from the first column of the result set. */ class DoctrineHydrator_SingleColumn extends Doctrine_Hydrator_Abstract { public function hydrateResultSet($stmt) { return $stmt->fetchAll(PDO::FETCH_COLUMN); } } Doctrine_Manager::getInstance()->registerHydrator...
PHP
<?php class UnixTimestampable extends Doctrine_Template_Timestampable { protected $_options = array( 'created' => array('name' => 'created_at', 'alias' => null, 'type' => 'int(10) unsigned', 'di...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Controller_Doctrine extends Controller { public function before() { parent::before(); //Restrict controller to localhost if ( !in_array($_SERVER['REMOTE_ADDR'], array('::1', '127.0.0.1')) ) { echo "DENIED!"; exit; } } ...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * Doctrine Session Driver * * Sample schema: * * CREATE TABLE `sessions` ( * `session_id` VARCHAR( 24 ) NOT NULL, * `last_active` INT UNSIGNED NOT NULL, * `contents` TEXT NOT NULL, * PRIMARY KEY ( `session_id...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Security extends Purifier_Security { }
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * Modifies Kohana to use [HTML Purifier](http://htmlpurifier.org/) for the * [Security::xss_clean] method. * * @package Purifier * @category Security * @author Kohana Team * @copyright (c) 2010 Woody Gilk * @license BSD */ class Puri...
PHP
<?php if(isset($message) == TRUE) : ?> <div class="notification <?php echo $message['type'] ?> png_bg"> <a class="close" href="#"><img alt="close" title="Đóng" src="<?php echo Url::site('assets/admin/images/icons/cross_grey_small.png') ?>"></a> <div><?php echo $message['content'] ?></div> </div> <?php endif; ?>...
PHP
<?php class Controller_Admin_Setting extends Controller_Admin_Layout { /** * Show the main page */ public function action_index() { // Get all settings if($this->request->method() === 'POST') { $post = Arr::extract($_POST, array('setting')); foreach(...
PHP
<?php class Lib_Setting { private static $instance; private static $setting = NULL; private function __construct() { $this->load_data(); } public static function getInstance() { if(!isset(self::$instance)) { self::$instance = new Lib_Setting(); }...
PHP
<div id="products"><!--start products--> <?php if(isset ($articles) == TRUE && count($articles) > 0) : ?> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#" title="">Tin tức</a></div> </div> </div> <div class="article"> <div> ...
PHP
<?php if($page): ?> <div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#" title=""><?php echo $title; ?></a></div> </div> </div> <div class="article"> <?php echo $page->content ?> <p class="date">Đăng ...
PHP
<?php if($page): ?> <div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#" title=""><?php echo $title; ?></a></div> </div> </div> <div class="article"> <h1><?php echo $page->title ?></h1> <?php ...
PHP
<div id="products"><!--start products--> <?php if(isset ($articles) == TRUE && count($articles) > 0) : ?> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#" title=""><?php echo $title ?></a></div> </div> </div> <div class="article"> <div> ...
PHP
<div class="box"> <div class="box_left"> <div class="box_right"><span>Tin tức nổi bật</span></div> </div> </div> <div class="box_1"> <ul id="news_detail"> <?php if(isset ($articles) == TRUE && count($articles) > 0) : foreach($articles as $obj) : preg_match('/<\s*img [^\>]*src\s*=\s*(["\...
PHP
<div id="products"><!--start products--> <?php if(isset ($articles) == TRUE && count($articles) > 0) : ?> <div class="box"> <div class="box_left"> <div class="box_right"><span><?php echo $category->name ?></span></div> </div> </div> <div class="article"> <ul class="others...
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><span>Tin Tức</span></div> </div> </div> <div class="article"> <h1><?php echo $article->title ?></h1> <p class="summary"><?php echo $article->summary ?></p> ...
PHP
<h2>Quản lý tin tức</h2> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <h3>Các bài viết</h3> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">Tin đã đăng</a></li> <!-- href must be unique and match the id of target div --> <li...
PHP
<?php if(isset($message) == TRUE) : ?> <div class="notification <?php echo $message['type'] ?> png_bg"> <a class="close" href="#"><img alt="close" title="Đóng" src="<?php echo Url::site('assets/admin/images/icons/cross_grey_small.png') ?>"></a> <div><?php echo $message['content'] ?></div> </div> <?php endif; ?>...
PHP
<?php if(isset($message) == TRUE) : ?> <div class="notification <?php echo $message['type'] ?> png_bg"> <a class="close" href="#"><img alt="close" title="Đóng" src="<?php echo Url::site('assets/admin/images/icons/cross_grey_small.png') ?>"></a> <div><?php echo $message['content'] ?></div> </div> <?php endif; ?>...
PHP
<?php Route::set('admin-article-category','admin/article/category(/<id>)(/page-<page>)')->defaults(array( 'directory' => 'admin', 'controller' => 'article', 'action' => 'category', 'id' => null, 'page' => 1 )); Route::set('client-article-category','article/category(/<id>)(/page-<...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Controller_Page extends Controller_Client_Layout { const NEWS_CATEGORY_ID = 2; const PROJECT_CATEGORY_ID = 4; const FUNNY_CATEGORY_ID = 6; const FENG_SHUI_CATEGORY_ID = 7; const SHAREHOLDER_CATEGORY_ID = 11; const ABOUT_CATEG...
PHP
<?php class Controller_Article extends Controller_Client_Layout { /** * View an article * * @access public * @param <int> $id */ public function action_detail($id) { $id = (int) $id; if($id === 0) { throw new Exception('Không tìm thấy bài viết yêu...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * Article controller (Admin) * * @author an.cao <a@clgt.vn> * @since May 2011 */ class Controller_Admin_Article extends Controller_Admin_Layout { /** * Show all articles in database * * @access public */ public function...
PHP
<h3><?php echo Lib_Setting::get('site_name'); ?></h3> <p>Bạn đã nhận đuợc 1 emai liên hệ từ <?php echo $email; ?> </p> <p>Thông tin liên hệ:</p> <p>Người gởi:<?php echo $name ?></p> <p>Địa chỉ:<?php echo $address ?></p> <p>Điện thoại: <?php echo $phone; ?></p> <p>Nội dung: <?php echo $content; ?></p>
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><a href="#">Liên hệ</a></div> </div> </div> <div id="bg_products"> <?php echo FlashMessage::getInstance()->display('flashmessage/warning'); ?> <form id="contact_form" m...
PHP
<?php $i=0; foreach($messages as $type => $msg) : $i++ ?> <!-- loi --> <?php if ($type == 'error') : ?> <?php if ($i===1) : ?> <div id="errorMsg"> <h3>Có lổi xảy ra</h3> <ol> <?php endif; ?> <?php foreach ($msg as $s) { echo '<li>' . $s . '</li>'; } ?> <?php if ($i===1) : ?> </ol> </d...
PHP
<!-- Start Notifications --> <?php if(count($messages) > 0):?> <?php foreach($messages as $type => $msgs): ?> <?php foreach ($msgs as $msg) :?> <div class="notification <?php echo $type ?> png_bg"> <a href="#" class="close"><img src="<?php echo Url::admin_assets() . '/images/icons/cross_grey_small.png'; ?>" title="...
PHP
<!-- Start Notifications --> <?php if(count($messages) > 0):?> <?php foreach($messages as $type => $msgs): ?> <div class="notification <?php echo $type; ?> png_bg"> <?php foreach ($msgs as $msg) :?> <p><?php echo $msg; ?></p> <?php endforeach;?> </div> <?php endforeach;?> <?php endif;?> <!-- End ...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Mailer { public static function SendMail($sender,$receiver,$message, $bcc = '') { $email = Email::connect(); $message = new Swift_Message($message['subject'],$message['message'],'text/html',"utf-8"); $message->s...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class FlashMessage { /** * Type of message */ const ERROR = 'error'; const WARNING = 'warning'; const NOTICE = 'notice'; const ATTENTION = 'attention'; const INFORMATION = 'information'; const SUCCESS = 'success'; protected $messag...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Tools { public static function get_admin_item_page() { /** * we will return this value from db * Change it later */ return 5; } public static function get_client_item_page() { return 5; } public static function get_contac...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); /** * @author : thanh.dang * @version: 1.0 */ class CustomPagerLayout extends Doctrine_Pager_Layout { public function display($options = array(), $return = false) { $pager = $this->getPager(); $str = '<div clas...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Controller_Contact extends Controller_Client_Layout { public function action_index() { if(Request::current()->method() === 'POST') { //send contact request $keys = array('name','email','title','content',...
PHP
<?php defined('SYSPATH') or die('No direct access allowed.'); return array ( 'default' => array ( 'type' => 'mysql', 'connection' => array( 'hostname' => '127.0.0.1', 'database' => 'wl', 'username' => 'root', 'password' => '123', 'persistent' => FALSE, ), 'table_prefix' => '', ...
PHP
<?php defined('SYSPATH') OR die('No direct access allowed.'); return array( /** * SwiftMailer driver, used with the email module. * * Valid drivers are: native, sendmail, smtp */ 'driver' => 'smtp', /** * To use secure connections with SMTP, set "port" to 465 instead of 25. * To enable TLS, set "encryp...
PHP
<div id="navigator"> <?php echo $navigator; ?> <?php if ( ! Api::load('user')->is_logged()) : ?> <div class="login"> <span><a href="<?php echo URL::site('user/login') ?>">Đăng nhập</a></span> <span><a href="<?php echo URL::site('user/create') ?>">Đăng ký</a></span> </div> <?php else: ?> ...
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><span>Sản phẩm đang giao dịch</span></div> </div> </div> <div id="bg_products"> <ul> <li> <span class="img_products"><a href="details.html"><img src="<?php echo Url::client_assets();?>images/sanph...
PHP
<div id="footer" class="grid_12"> <div class="footer_left"> <div class="footer_right"> <div class="nav_footer"> <?php echo $navigator; ?> <div class="clear"></div> <div id="address" align="center"> <p>Địa chỉ : Lô K1 Ô 34, đường NE8, Khu TĐC Mỹ Phước 3, xã Thới Hoà, Bến Cát, Bình...
PHP
<div id="products"><!--start products--> <div class="box"> <div class="box_left"> <div class="box_right"><span>Danh sách bất động sản đang giao dịch</span></div> </div> </div> <?php echo $list_land->render(); ?> </div> <?php // /application/views/client/home.php ?>
PHP
<!DOCTYPE html> <html> <head> <title><?php echo "404 page not found"; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta> <style> body{ } .text-center{ text-align: center; } ...
PHP
<!DOCTYPE html> <html> <head> <title><?php echo $title; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="keywords" content="<?php echo $keywords; ?>" > <?php foreach ($styles as $style) : ?> <link rel="styleshee...
PHP
<!-- Page Head --> <h2>Welcome John</h2> <p id="page-intro">What would you like to do?</p> <ul class="shortcut-buttons-set"> <li><a class="shortcut-button" href="#"><span> <img src="<?php echo $assets_image . '/icons/pencil_48.png'; ?>" alt="icon" /><br /> Write an Article ...
PHP
<ul id="main-nav"> <!-- Accordion Menu --> <li id="dashboard_nav"> <a href="<?php echo Url::site('admin') ?>" class="nav-top-item no-submenu"> <!-- Add the class "no-submenu" to menu items with no sub menu --> Trang Quản Lý </a> </li> <li id="article_nav"> <a ...
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title><?php echo $title ?></title> <?php...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); return array( 'alpha' => ':field must contain only letters', 'alpha_dash' => ':field must contain only numbers, letters and dashes', 'alpha_numeric' => ':field must contain only letters and numbers', 'color' => ':field must be a ...
PHP
<?php return array( 'unique' => ':field must be unique', ); ?>
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class View extends Kohana_View { public static function admin($file = null,array $data = null) { return new View('admin/'.$file, $data); } public static function client($file = null,array $data = null) { return new View('client/'.$file, $data); } }...
PHP
<?php class Error { public static function error_404() { $error_page = Route::get('error')->uri(array('action' => '404')); $new_request = Request::factory($error_page); $new_request = $new_request->execute(); $new_request->status(404); if ( $new_request->send_he...
PHP
<?php class Controller_Client_Layout extends Controller_Template { public $template = 'client'; public $layout = 'client'; public function action_index(){} public function before(){ parent::before(); if (Request::current() === Request::initial()) { $this->template->title = Lib_Setting::get('site_name...
PHP
<?php class Controller_Client_Home extends Controller_Client_Layout { public function action_index() { /* * hide main_right column */ //$this->set_main_right(); $this->set_contents(View::client('home')->set(array( 'list_land' => Libs_Land::getInstance()->get_list('client/land/list') ...
PHP
<?php class Controller_Error extends Controller { public function action_404() { // Set the Request's Status to 404 (Page Not Found) $this->response->status(404); $this->response->body(View::factory('404')); } }
PHP
<?php defined('SYSPATH') or die('No direct script access.'); class Controller_Client extends Controller_Client_Home { }
PHP
<?php class Controller_Admin_Dashboard extends Controller_Admin_Layout { public function action_index() { } public function action_setting() { } }
PHP
<?php class Controller_Admin_Layout extends Controller_Template { public $template = "admin"; protected $layout = 'admin'; protected $assets_css = 'assets/admin/css'; protected $assets_js = 'assets/admin/js'; protected $assets_image = 'assets/admin/images'; public function before() { p...
PHP
<?php class Controller_Admin_Home extends Controller_Admin_Layout { public function action_index() { //View::factory($this->admin_layout . '/home/index'); } }
PHP
<?php class Controller_Admin extends Controller_Admin_Home { }
PHP
<?php class Url extends Kohana_URL { /** * Urlize title to sluggable with unicode characters support * @param type $title */ public static function slug($title) { return URL::title($title,'-',true); } public static function admin_assets() { return Url::site('ass...
PHP
<?php class Api { public function __construct() { // do nothing } private static $instance = null; private $apis = array(); public static function load($api_name) { if(is_null(self::$instance)) self::$instance = new self; if(isset(self::...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); // -- Environment setup -------------------------------------------------------- // Load the core Kohana class require SYSPATH.'classes/kohana/core'.EXT; if (is_file(APPPATH.'classes/kohana'.EXT)) { // Application extends the core require APPPATH.'classe...
PHP
<?php defined('SYSPATH') or die('No direct script access.'); return array( 'N' => 'Bắc', 'E' => 'Đông', 'W' => 'Tây', 'S' => 'Nam', 'ES' => 'Đông nam', 'EN' => 'Đông bắc', 'WS' => 'Tây nam', 'WN' => 'Tây bắc', 'UD' => 'Bất kỳ', 'rent' => 'Cho thuê', 'lease' => 'Cần mua', 'titl...
PHP
<?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. * * ...
PHP