This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); | |
function test($x,$exit=0) | |
{ | |
echo $res = "<pre>"; | |
if(is_array($x) || is_object($x)){ | |
echo print_r($x); | |
}else{ | |
echo var_dump($x); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function update_user($goto = '') | |
{ | |
$this->load->model('app_m'); | |
try { | |
$user = $this->facebook->api('me'); | |
$this->apps_m->update_userdata($user); | |
$this->session->set_userdata('me', $user); | |
$this->session->set_userdata('fb_access_token', $this->facebook->getAccessToken()); | |
} catch (FacebookApiException $e) { | |
$code = @$_GET['code']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Model extends CI_Model { | |
public $error_string, $new_id; | |
function __construct() | |
{ | |
parent::__construct(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MY_Encrypt { | |
private $skey = "SuPerEncKey2013"; // you can change it | |
public function safe_b64encode($string) { | |
$data = base64_encode($string); | |
$data = str_replace(array('+','/','='),array('-','_',''),$data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns:fb="http://ogp.me/ns/fb#"> | |
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# oghowto: http://ogp.me/ns/fb/oghowto#"> | |
<title>OG Tutorial App</title> | |
<meta property="fb:app_id" content="256521937796214" /> | |
<meta property="og:type" content="oghowto:demo" /> | |
<meta property="og:title" content="Open Graph HowTo" /> | |
<meta property="og:image" content="http://placehold.it/200x200" /> | |
<meta property="og:description" content="Minimum requirements to get Open Graph objects and actions working" /> | |
<meta property="og:url" content="http://oghowto.herokuapp.com/test.html"> | |
<style type="text/css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* sample code on ajax csrf | |
$.ajax({ | |
type: 'POST', | |
url: '/action/fetch_more_blog_posts', | |
data: { | |
type: 'news', limit: limit, offset: offset, | |
<?php echo $this->security->get_csrf_token_name(); ?>: '<?php echo $this->security->get_csrf_hash(); ?>' }, | |
success: function(data) { | |
$(data).appendTo('#more-entries'); | |
$('#older-posts').slideDown(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html itemscope itemtype="http://schema.org/Movie"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Brad Pitt in WORLD WAR Z | Trailer & Official Movie Site | June 21 2013</title> | |
<link rel="image_src" type="image/jpeg" href="img/thumb.jpg"/> | |
<link rel="canonical" href="http://www.worldwarzmovie.com/" /> | |
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.WorldWarZMovie.com/mobile/" > | |
<meta property="og:title" content="Brad Pitt in WORLD WAR Z | Trailer & Official Movie Site | June 21 2013" /> | |
<meta property="og:type" content="movie" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _merge_photo($original_image) | |
{ | |
//test(FCPATH.'assets/loop/img/frame.png',1); | |
# If you don't know the type of image you are using as your originals. | |
$image = imagecreatefromstring(file_get_contents(FCPATH.'loop_upload/'.$original_image['file_name'])); | |
$frame = imagecreatefrompng(FCPATH.'assets/loop/img/frame.png'); | |
# If you know your originals are of type PNG. | |
//$image = imagecreatefrompng($original_image); | |
//$frame = imagecreatefrompng($frame_image); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bali | |
Bangka Belitung | |
Banten | |
Bengkulu | |
DI Yogyakarta | |
DKI Jakarta | |
Gorontalo | |
Jambi | |
Jawa Barat | |
Jawa Tengah |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 { | |
function __construct(){ | |
parent::__construct(); | |
} |