code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php defined('SYSPATH') or die('No direct script access.'); return array();
PHP
<?php // function test project function trit($o='tritigi', $num=0) { echo "<pre>" ; print_r($o) ; if($num==0) die(); } /*================= HOST ========================*/ define('DOMAIN','print.dev'); define('SITE',DOMAIN); define('URL',DOMAIN); define('HOST_FRONTEND','http://'.DOMAIN); define('HOST_BACK...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> ERROR - 2014-10-11 00:22:09 --> Severity: Warning --> mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: MySQL server has gone away D:\mythuatweb\news\system\database\drivers\mysql\mysql_driver.php 91 ERROR -...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Blog extends CI_Controller { public $_templates = array(); function __construct() { parent::__construct(); //$this->_templates['page'] = 'blog_view'; } function index() { $data = array(); trit(2); ...
PHP
<div class="quancao_area2"> <div class="bannercenter"> <img src="<?=url?>templates/images/bannercenter/banner_center1.jpg" width="300" /> <img src="<?=url?>templates/images/bannercenter/banner_center2.jpg" width="300" /> <img src="<?=url?>templates/images/bannercenter/banner_center3.jpg"...
PHP
<div class="quancao_area1"><img src="<?=url?>uploads/temp/qc-yamaha.jpg" width="980" /></div>
PHP
<div class="area1-news-qc"><!--<img src="<?=url()?>uploads/temp/area1-news-qc.jpg" width="300" height="519" />--> <img src="<?=url()?>templates/images/banner-rec-1.jpg" width="300" height="250" /> <img src="<?=url()?>templates/images/banner-rec-2.jpg" width="300" height="250" style="margin:8px 0;" /> ...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Banner_model extends CI_Model { function __construct(){ parent::__construct(); } function get_all($tbl, $num=20, $start=0) { $this->db->where('bl_active', 1) ; $query = $this->db->get($tbl, $num, $start); ret...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Banner extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('banner_model', 'banner') ; } function index() { $data['title'] = "Đăng nhập website" ; $data['page']...
PHP
<?php echo modules::run('danhmuc');?> <!---------------- cus-temp -----------------------> <div class="cus-temp"> <div class="cus-templeft"> <div class="templates"> <div class="templates-title"> <a href=""> <img src="<?php echo site().'templates/images/icon-temp.gif'?>" width="47" height="47"> ...
PHP
<!-------------- quitrinh -----------------------> <div class="quitrinh"> <div class="text">Quy Trình In</div> <div class="search"> <div class="txt-search">Tìm kiếm nhanh </div> <div class="drop-search"> <select name="drop_search" id="drop_search"> <option value="">Roll c...
PHP
<div class="sp-banner"> <div class="namecard"><a href=""><img src="<?php echo site.'templates/images/namecard.gif'?>" width="400"></a></div> <div class="imgcard"> <ul> <li><a href=""><img src="<?php echo site.'templates/images/sanpham.jpg'?>"></a></li> <li><a href=""><img src="<?p...
PHP
<? function datemysql($day=''){ return strftime("%Y-%m-%d", strtotime($day)); } function datevn2mysql($day=''){ $data = explode("/", $day) ; return $data[2]."-".$data[1]."-".$data[0]; } function dateus2mysql($day=''){ $data = explode("/", $day) ; return $data[2]."-".$data[0]."-".$data[1]; } function d...
PHP
<?php function fn_resize_image($src, $dest, $new_width = 0, $new_height = 0, $make_box = true, $bg_color = '#ffffff', $save_original = false) { static $notification_set = false; static $gd_settings = array(); if (file_exists($src) && !empty($dest) && (!empty($new_width) || !empty($new_height)...
PHP
<? if (! defined('BASEPATH')) exit('No direct script access allowed'); function site() { $CI =& get_instance(); $index = $CI->config->item('index_page') ; if($index) return $CI->config->base_url().'/'.$index.'/'; else return $CI->config->base_url(); } function url($uri = '') { $CI =& get_instan...
PHP
<?php function getcaptcha() { $md5_hash = md5(rand(0,999)); $security_code = substr($md5_hash, 15, 5); $_SESSION["security_code"] = $security_code; //$this->session->set_userdata(array('security_code'=>$security_code)) ; $width = 100; $height = 28; $image = imagecreate($width, $height); ...
PHP
<?php function str_limit($str, $n = 300) { if (strlen($str) <= $n) { return $str; } $limit = strpos($str,' ', $n) ; while($limit==false&&$n>1) { $n--; $limit = strpos($str,' ', $n) ; } $limit = $limit ? $limit : $n ; $out = substr($str, 0, $limit) ...
PHP
<?php function send_mail($name,$from,$to,$subject,$message) { $mess =$message; $headers = "From: ".$name." <".$from.">\n"; $headers .= "Reply-To: ".$name." <".$from.">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/html; charset=\"utf-8\"\n"; return @mail( $to, $sub...
PHP
<!DOCTYPE html> <html lang="en"> <head> <title>Database Error</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: 40px...
PHP
<!DOCTYPE html> <html lang="en"> <head> <title>404 Page Not Found</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: ...
PHP
<!DOCTYPE html> <html lang="en"> <head> <title>Error</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: 40px; font: ...
PHP
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"> <h4>A PHP Error was encountered</h4> <p>Severity: <?php echo $severity; ?></p> <p>Message: <?php echo $message; ?></p> <p>Filename: <?php echo $filepath; ?></p> <p>Line Number: <?php echo $line; ?></p> </div>
PHP
<?php class CI_Upload { // thu muc upload goc private $_root_upload_dir; // thu muc upload theo Nam/Thang/Ngay private $_current_upload_dir; // duong dan upload private $_upload_path; // loai file cho phep private $_allow_type = array('video/mp4','audio/mp4','audio/ogg', 'video/ogg','audio/webm', 'v...
PHP
<?php /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | | Version: 5.1 | | Contact: via sourceforge.net support pages (als...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license htt...
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Google { private $google_client_id; private $google_client_secret; private $google_redirect_url; private $google_developer_key; private $google_app_name; public function __construct() { /*if (!isset($this-...
PHP
<?php /*~ class.smtp.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | | Version: 5.1 | | Contact: via sourceforge.net support pages (also www...
PHP
<?php /** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
PHP
<?php /* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
PHP
<?php /** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
PHP
<?php /* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /** * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
PHP
<?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class site { public $settings = array(); public function __construct() { if (!isset($this->CI)) { $this->CI =& get_instance(); } //$this->CI->load->library('user_agent')...
PHP
<?php class Facebook { private $CI; public function __construct() { if (!isset($this->CI)) { $this->CI =& get_instance(); } } public static function config(){ ########## app ID and app SECRET (Replace with yours) ############# $config['appId'] = '21589714526...
PHP
<?php $cache_expire = 60*60*24*365; header("Pragma: public"); header("Cache-Control: max-age=".$cache_expire); header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT'); ?><script src="//connect.facebook.net/en_US/all.js"></script>
PHP
<?php session_start(); include_once("config.php"); //Include configuration file. require_once('inc/facebook.php' ); //include fb sdk /* Detect HTTP_X_REQUESTED_WITH header sent by all recent browsers that support AJAX requests. */ if ( !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_RE...
PHP
<?php /** * Copyright 2011 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
PHP
<?php /** * Copyright 2011 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
PHP
<?php ########## app ID and app SECRET (Replace with yours) ############# $appId = '215897145260007'; //Facebook App ID $appSecret = '58add3fb7f9b1b226119de7ba4cec1a9'; // Facebook App Secret $return_url = 'http://localhost/facebookconnect/'; //path to script folder $fbPermissions = 'user_friends,email,public_pro...
PHP
<?php session_start(); include_once("config.php"); if(isset($_GET["logout"]) && $_GET["logout"]==1) { //User clicked logout button, distroy all session variables. session_destroy(); header('Location: '.$return_url); } ?> <!DOCTYPE html> <html xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en-g...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class welcome_model extends CI_Model { function __construct() { parent::__construct(); } function get_all($num=20, $start=0) { $this->db->where('bl_active',1) ; $query = $this->db->get('welcome', $num, $start) ; retur...
PHP
<?php if (! defined('BASEPATH')) exit('No direct script access allowed'); class home_model extends CI_Model { function __construct() { parent::__construct(); } public function hotnews() { $this->db->where('bl_active', 1); $this->db->where('is_home', 1); $this->db->where('is_hot', 1); $th...
PHP
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); /* load the MX_Router class */ require APPPATH."third_party/MX/Router.php"; class MY_Router extends MX_Router {}
PHP
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); /* load the MX_Loader class */ require APPPATH."third_party/MX/Loader.php"; class MY_Loader extends MX_Loader {}
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class home extends CI_Controller { protected $_templates; function __construct() { parent::__construct(); //$this->load->model('home_model','home'); //$this->load->model('news_model','news'); } public function index(...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class sanpham extends CI_Controller { protected $_templates; function __construct() { parent::__construct(); //$this->load->model('home_model','home'); //$this->load->model('news_model','news'); } public function ind...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class quitrinh extends CI_Controller { protected $_templates; function __construct() { parent::__construct(); //$this->load->model('home_model','home'); //$this->load->model('news_model','news'); } public function in...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends CI_Controller { protected $_templates; function __construct() { parent::__construct(); //$this->load->model('welcome_model','welcome'); } public function index() { $this->load->view('welcome...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | Foreign Characters | ------------------------------------------------------------------- | This file contains an array of foreign characters for transliteration | conver...
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $route['default_controller'] = "home"; $route['404_override'] = ''; ?>
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | USER AGENT TYPES | ------------------------------------------------------------------- | This file contains four arrays of user agent data. It is used by the | User Age...
PHP