├── README ├── application ├── config │ └── Instagram_api.php └── libraries │ ├── Instagram_api.php │ └── MY_Input.php └── demonstration ├── .htaccess ├── application ├── config │ ├── Instagram_api.php │ ├── autoload.php │ ├── carabiner.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── hooks.php │ ├── index.html │ ├── mimes.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ ├── authorize.php │ ├── index.html │ ├── instagram.php │ ├── locations.php │ ├── media.php │ ├── popular.php │ ├── popular_media.php │ ├── tags.php │ ├── user.php │ └── welcome.php ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html ├── helpers │ └── index.html ├── hooks │ └── index.html ├── index.html ├── language │ └── english │ │ └── index.html ├── libraries │ ├── Instagram_api.php │ ├── MY_Input.php │ ├── carabiner.php │ ├── cssmin.php │ ├── index.html │ └── jsmin.php ├── models │ └── index.html └── views │ ├── followed_by.php │ ├── follows.php │ ├── index.html │ ├── media_popular.php │ ├── media_search.php │ ├── tags_recent.php │ ├── template.php │ ├── user_feed.php │ ├── user_profile.php │ ├── user_recent.php │ ├── user_search.php │ └── welcome_message.php ├── assets ├── css │ ├── jquery.fancybox-1.3.4.css │ └── stylesheet.css ├── images │ └── fancybox │ │ ├── blank.gif │ │ ├── fancy_close.png │ │ ├── fancy_loading.png │ │ ├── fancy_nav_left.png │ │ ├── fancy_nav_right.png │ │ ├── fancy_shadow_e.png │ │ ├── fancy_shadow_n.png │ │ ├── fancy_shadow_ne.png │ │ ├── fancy_shadow_nw.png │ │ ├── fancy_shadow_s.png │ │ ├── fancy_shadow_se.png │ │ ├── fancy_shadow_sw.png │ │ ├── fancy_shadow_w.png │ │ ├── fancy_title_left.png │ │ ├── fancy_title_main.png │ │ ├── fancy_title_over.png │ │ ├── fancy_title_right.png │ │ ├── fancybox-x.png │ │ ├── fancybox-y.png │ │ └── fancybox.png └── javascript │ ├── jquery-ui-1.8.5.custom.min.js │ ├── jquery.easing-1.3.pack.js │ ├── jquery.fancybox-1.3.4.pack.js │ ├── jquery.mousewheel-3.0.4.pack.js │ └── pages │ └── search_media.js ├── index.php └── system ├── cache └── index.html ├── codeigniter ├── Base4.php ├── Base5.php ├── CodeIgniter.php ├── Common.php ├── Compat.php └── index.html ├── database ├── DB.php ├── DB_active_rec.php ├── DB_cache.php ├── DB_driver.php ├── DB_forge.php ├── DB_result.php ├── DB_utility.php ├── drivers │ ├── index.html │ ├── mssql │ │ ├── index.html │ │ ├── mssql_driver.php │ │ ├── mssql_forge.php │ │ ├── mssql_result.php │ │ └── mssql_utility.php │ ├── mysql │ │ ├── index.html │ │ ├── mysql_driver.php │ │ ├── mysql_forge.php │ │ ├── mysql_result.php │ │ └── mysql_utility.php │ ├── mysqli │ │ ├── index.html │ │ ├── mysqli_driver.php │ │ ├── mysqli_forge.php │ │ ├── mysqli_result.php │ │ └── mysqli_utility.php │ ├── oci8 │ │ ├── index.html │ │ ├── oci8_driver.php │ │ ├── oci8_forge.php │ │ ├── oci8_result.php │ │ └── oci8_utility.php │ ├── odbc │ │ ├── index.html │ │ ├── odbc_driver.php │ │ ├── odbc_forge.php │ │ ├── odbc_result.php │ │ └── odbc_utility.php │ ├── postgre │ │ ├── index.html │ │ ├── postgre_driver.php │ │ ├── postgre_forge.php │ │ ├── postgre_result.php │ │ └── postgre_utility.php │ └── sqlite │ │ ├── index.html │ │ ├── sqlite_driver.php │ │ ├── sqlite_forge.php │ │ ├── sqlite_result.php │ │ └── sqlite_utility.php └── index.html ├── fonts ├── index.html └── texb.ttf ├── helpers ├── array_helper.php ├── compatibility_helper.php ├── cookie_helper.php ├── date_helper.php ├── directory_helper.php ├── download_helper.php ├── email_helper.php ├── file_helper.php ├── form_helper.php ├── html_helper.php ├── index.html ├── inflector_helper.php ├── language_helper.php ├── number_helper.php ├── path_helper.php ├── security_helper.php ├── smiley_helper.php ├── string_helper.php ├── text_helper.php ├── typography_helper.php ├── url_helper.php └── xml_helper.php ├── index.html ├── language ├── english │ ├── calendar_lang.php │ ├── date_lang.php │ ├── db_lang.php │ ├── email_lang.php │ ├── form_validation_lang.php │ ├── ftp_lang.php │ ├── imglib_lang.php │ ├── index.html │ ├── instagram_api_lang.php │ ├── number_lang.php │ ├── profiler_lang.php │ ├── scaffolding_lang.php │ ├── unit_test_lang.php │ ├── upload_lang.php │ └── validation_lang.php └── index.html ├── libraries ├── Benchmark.php ├── Calendar.php ├── Cart.php ├── Config.php ├── Controller.php ├── Email.php ├── Encrypt.php ├── Exceptions.php ├── Form_validation.php ├── Ftp.php ├── Hooks.php ├── Image_lib.php ├── Input.php ├── Language.php ├── Loader.php ├── Log.php ├── Model.php ├── Output.php ├── Pagination.php ├── Parser.php ├── Profiler.php ├── Router.php ├── Session.php ├── Sha1.php ├── Table.php ├── Trackback.php ├── Typography.php ├── URI.php ├── Unit_test.php ├── Upload.php ├── User_agent.php ├── Validation.php ├── Xmlrpc.php ├── Xmlrpcs.php ├── Zip.php └── index.html ├── logs └── index.html ├── plugins ├── captcha_pi.php ├── index.html └── js_calendar_pi.php └── scaffolding ├── Scaffolding.php ├── images ├── background.jpg ├── index.html └── logo.jpg ├── index.html └── views ├── add.php ├── delete.php ├── edit.php ├── footer.php ├── header.php ├── index.html ├── no_data.php ├── stylesheet.css └── view.php /application/config/Instagram_api.php: -------------------------------------------------------------------------------- 1 | 13 | * @license GPLv3 14 | * @version 1.0.0 15 | */ 16 | class MY_Input extends CI_Input { 17 | 18 | function _sanitize_globals() 19 | { 20 | $this->allow_get_array = TRUE; 21 | parent::_sanitize_globals(); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /demonstration/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteCond %{REQUEST_FILENAME} !-d 5 | RewriteRule ^(.*)$ /index.php/$1 [L] 6 | 7 | 8 | -------------------------------------------------------------------------------- /demonstration/application/config/Instagram_api.php: -------------------------------------------------------------------------------- 1 | '', 5 | 'xhtml1-strict' => '', 6 | 'xhtml1-trans' => '', 7 | 'xhtml1-frame' => '', 8 | 'html5' => '', 9 | 'html4-strict' => '', 10 | 'html4-trans' => '', 11 | 'html4-frame' => '' 12 | ); 13 | 14 | /* End of file doctypes.php */ 15 | /* Location: application/config/doctypes.php */ -------------------------------------------------------------------------------- /demonstration/application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/config/mimes.php: -------------------------------------------------------------------------------- 1 | 'application/mac-binhex40', 12 | 'cpt' => 'application/mac-compactpro', 13 | 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'), 14 | 'bin' => 'application/macbinary', 15 | 'dms' => 'application/octet-stream', 16 | 'lha' => 'application/octet-stream', 17 | 'lzh' => 'application/octet-stream', 18 | 'exe' => 'application/octet-stream', 19 | 'class' => 'application/octet-stream', 20 | 'psd' => 'application/x-photoshop', 21 | 'so' => 'application/octet-stream', 22 | 'sea' => 'application/octet-stream', 23 | 'dll' => 'application/octet-stream', 24 | 'oda' => 'application/oda', 25 | 'pdf' => array('application/pdf', 'application/x-download'), 26 | 'ai' => 'application/postscript', 27 | 'eps' => 'application/postscript', 28 | 'ps' => 'application/postscript', 29 | 'smi' => 'application/smil', 30 | 'smil' => 'application/smil', 31 | 'mif' => 'application/vnd.mif', 32 | 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'), 33 | 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'), 34 | 'wbxml' => 'application/wbxml', 35 | 'wmlc' => 'application/wmlc', 36 | 'dcr' => 'application/x-director', 37 | 'dir' => 'application/x-director', 38 | 'dxr' => 'application/x-director', 39 | 'dvi' => 'application/x-dvi', 40 | 'gtar' => 'application/x-gtar', 41 | 'gz' => 'application/x-gzip', 42 | 'php' => 'application/x-httpd-php', 43 | 'php4' => 'application/x-httpd-php', 44 | 'php3' => 'application/x-httpd-php', 45 | 'phtml' => 'application/x-httpd-php', 46 | 'phps' => 'application/x-httpd-php-source', 47 | 'js' => 'application/x-javascript', 48 | 'swf' => 'application/x-shockwave-flash', 49 | 'sit' => 'application/x-stuffit', 50 | 'tar' => 'application/x-tar', 51 | 'tgz' => 'application/x-tar', 52 | 'xhtml' => 'application/xhtml+xml', 53 | 'xht' => 'application/xhtml+xml', 54 | 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'), 55 | 'mid' => 'audio/midi', 56 | 'midi' => 'audio/midi', 57 | 'mpga' => 'audio/mpeg', 58 | 'mp2' => 'audio/mpeg', 59 | 'mp3' => array('audio/mpeg', 'audio/mpg'), 60 | 'aif' => 'audio/x-aiff', 61 | 'aiff' => 'audio/x-aiff', 62 | 'aifc' => 'audio/x-aiff', 63 | 'ram' => 'audio/x-pn-realaudio', 64 | 'rm' => 'audio/x-pn-realaudio', 65 | 'rpm' => 'audio/x-pn-realaudio-plugin', 66 | 'ra' => 'audio/x-realaudio', 67 | 'rv' => 'video/vnd.rn-realvideo', 68 | 'wav' => 'audio/x-wav', 69 | 'bmp' => 'image/bmp', 70 | 'gif' => 'image/gif', 71 | 'jpeg' => array('image/jpeg', 'image/pjpeg'), 72 | 'jpg' => array('image/jpeg', 'image/pjpeg'), 73 | 'jpe' => array('image/jpeg', 'image/pjpeg'), 74 | 'png' => array('image/png', 'image/x-png'), 75 | 'tiff' => 'image/tiff', 76 | 'tif' => 'image/tiff', 77 | 'css' => 'text/css', 78 | 'html' => 'text/html', 79 | 'htm' => 'text/html', 80 | 'shtml' => 'text/html', 81 | 'txt' => 'text/plain', 82 | 'text' => 'text/plain', 83 | 'log' => array('text/plain', 'text/x-log'), 84 | 'rtx' => 'text/richtext', 85 | 'rtf' => 'text/rtf', 86 | 'xml' => 'text/xml', 87 | 'xsl' => 'text/xml', 88 | 'mpeg' => 'video/mpeg', 89 | 'mpg' => 'video/mpeg', 90 | 'mpe' => 'video/mpeg', 91 | 'qt' => 'video/quicktime', 92 | 'mov' => 'video/quicktime', 93 | 'avi' => 'video/x-msvideo', 94 | 'movie' => 'video/x-sgi-movie', 95 | 'doc' => 'application/msword', 96 | 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 97 | 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 98 | 'word' => array('application/msword', 'application/octet-stream'), 99 | 'xl' => 'application/excel', 100 | 'eml' => 'message/rfc822' 101 | ); 102 | 103 | 104 | /* End of file mimes.php */ 105 | /* Location: ./system/application/config/mimes.php */ -------------------------------------------------------------------------------- /demonstration/application/config/routes.php: -------------------------------------------------------------------------------- 1 | array('grin.gif', '19', '19', 'grin'), 20 | ':lol:' => array('lol.gif', '19', '19', 'LOL'), 21 | ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), 22 | ':)' => array('smile.gif', '19', '19', 'smile'), 23 | ';-)' => array('wink.gif', '19', '19', 'wink'), 24 | ';)' => array('wink.gif', '19', '19', 'wink'), 25 | ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), 26 | ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), 27 | ':-S' => array('confused.gif', '19', '19', 'confused'), 28 | ':wow:' => array('surprise.gif', '19', '19', 'surprised'), 29 | ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), 30 | ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), 31 | '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), 32 | ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), 33 | ':P' => array('raspberry.gif', '19', '19', 'raspberry'), 34 | ':blank:' => array('blank.gif', '19', '19', 'blank stare'), 35 | ':long:' => array('longface.gif', '19', '19', 'long face'), 36 | ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), 37 | ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), 38 | ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), 39 | '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), 40 | ':down:' => array('downer.gif', '19', '19', 'downer'), 41 | ':red:' => array('embarrassed.gif', '19', '19', 'red face'), 42 | ':sick:' => array('sick.gif', '19', '19', 'sick'), 43 | ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), 44 | ':-/' => array('hmm.gif', '19', '19', 'hmmm'), 45 | '>:(' => array('mad.gif', '19', '19', 'mad'), 46 | ':mad:' => array('mad.gif', '19', '19', 'mad'), 47 | '>:-(' => array('angry.gif', '19', '19', 'angry'), 48 | ':angry:' => array('angry.gif', '19', '19', 'angry'), 49 | ':zip:' => array('zip.gif', '19', '19', 'zipper'), 50 | ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), 51 | ':ahhh:' => array('shock.gif', '19', '19', 'shock'), 52 | ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), 53 | ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), 54 | ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), 55 | ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), 56 | ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), 57 | ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), 58 | ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), 59 | ':snake:' => array('snake.gif', '19', '19', 'snake'), 60 | ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), 61 | ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item 62 | 63 | ); 64 | 65 | /* End of file smileys.php */ 66 | /* Location: ./system/application/config/smileys.php */ -------------------------------------------------------------------------------- /demonstration/application/controllers/authorize.php: -------------------------------------------------------------------------------- 1 | Authorize'; 14 | 15 | } 16 | 17 | /* 18 | * Function for the Instagram callback url 19 | */ 20 | function get_code() { 21 | 22 | // Make sure that there is a GET variable of code 23 | if(isset($_GET['code']) && $_GET['code'] != '') { 24 | 25 | $auth_response = $this->instagram_api->authorize($_GET['code']); 26 | 27 | // Set up session variables containing some useful Instagram data 28 | $this->session->set_userdata('instagram-token', $auth_response->access_token); 29 | $this->session->set_userdata('instagram-username', $auth_response->user->username); 30 | $this->session->set_userdata('instagram-profile-picture', $auth_response->user->profile_picture); 31 | $this->session->set_userdata('instagram-user-id', $auth_response->user->id); 32 | $this->session->set_userdata('instagram-full-name', $auth_response->user->full_name); 33 | 34 | redirect('/welcome'); 35 | 36 | } else { 37 | 38 | // There was no GET variable so redirect back to the homepage 39 | redirect('/welcome'); 40 | 41 | } 42 | 43 | } 44 | 45 | } 46 | 47 | /* End of file welcome.php */ 48 | /* Location: ./application/controllers/welcome.php */ -------------------------------------------------------------------------------- /demonstration/application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/controllers/instagram.php: -------------------------------------------------------------------------------- 1 | Instagram'; 12 | 13 | // Load the Instagram api library 14 | $this->load->library('instagram_api'); 15 | 16 | // Get popular media 17 | $popular_media = $this->instagram_api->getPopularMedia(); 18 | 19 | // Loop through the popular media and display the images 20 | foreach($popular_media->data as $data) { 21 | 22 | // Display the thumbnail image 23 | echo ''; 24 | 25 | } 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /demonstration/application/controllers/locations.php: -------------------------------------------------------------------------------- 1 | List location functions

'; 13 | } 14 | 15 | function details() 16 | { 17 | 18 | $location_data = $this->instagram_api->getLocation('1', $this->session->userdata('instagram-token')); 19 | 20 | echo '
';
21 | 		print_r($location_data);
22 | 		echo '
'; 23 | 24 | } 25 | 26 | function recent() 27 | { 28 | 29 | $location_recent_data = $this->instagram_api->locationRecent('1', $this->session->userdata('instagram-token')); 30 | 31 | echo '
';
32 | 		print_r($location_recent_data);
33 | 		echo '
'; 34 | 35 | } 36 | 37 | function search() 38 | { 39 | 40 | $location_search_data = $this->instagram_api->locationSearch($this->session->userdata('instagram-token'), '37.782654745657', '-122.38786697388'); 41 | 42 | echo '
';
43 | 		print_r($location_search_data);
44 | 		echo '
'; 45 | 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /demonstration/application/controllers/media.php: -------------------------------------------------------------------------------- 1 | instagram_api->access_token = $this->session->userdata('instagram-token'); 11 | } 12 | 13 | function index() 14 | { 15 | echo '

List media items

'; 16 | } 17 | 18 | function item($media_id = FALSE) 19 | { 20 | 21 | $media_data = $this->instagram_api->getMedia($media_id, $this->session->userdata('instagram-token')); 22 | 23 | echo '
';
 24 | 		print_r($media_data);
 25 | 		echo '
'; 26 | 27 | } 28 | 29 | function search() 30 | { 31 | 32 | // Load the javascript 33 | $this->carabiner->js('jquery-ui-1.8.5.custom.min.js'); 34 | $this->carabiner->js('pages/search_media.js'); 35 | 36 | if($this->input->post('submit')) { 37 | 38 | if($this->input->post('latitude')) { 39 | $latitude = $this->input->post('latitude'); 40 | } else { 41 | $latitude = null; 42 | } 43 | 44 | if($this->input->post('longitude')) { 45 | $longitude = $this->input->post('longitude'); 46 | } else { 47 | $longitude = null; 48 | } 49 | 50 | if($this->input->post('max_timestamp')) { 51 | $max_timestamp = strtotime($this->input->post('max_timestamp')); 52 | } else { 53 | $max_timestamp = null; 54 | } 55 | 56 | if($this->input->post('min_timestamp')) { 57 | $min_timestamp = strtotime($this->input->post('min_timestamp')); 58 | } else { 59 | $min_timestamp = null; 60 | } 61 | 62 | if($this->input->post('distance')) { 63 | $distance = $this->input->post('distance'); 64 | } else { 65 | $distance = null; 66 | } 67 | 68 | $data['media_search_data'] = $this->instagram_api->mediaSearch($latitude, $longitude, $max_timestamp, $min_timestamp, $distance); 69 | 70 | } 71 | 72 | $data['latitude_input'] = array( 73 | 'name' => 'latitude', 74 | 'id' => 'latitude' 75 | ); 76 | 77 | $data['longitude_input'] = array( 78 | 'name' => 'longitude', 79 | 'id' => 'longitude' 80 | ); 81 | 82 | $data['max_timestamp_input'] = array( 83 | 'name' => 'max_timestamp', 84 | 'id' => 'max_timestamp', 85 | 'class' => 'date' 86 | ); 87 | 88 | $data['min_timestamp_input'] = array( 89 | 'name' => 'min_timestamp', 90 | 'id' => 'min_timestamp', 91 | 'class' => 'date' 92 | ); 93 | 94 | $data['distance_select'] = array( 95 | 'name' => 'distance', 96 | 'id' => 'distance', 97 | 'options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5') 98 | ); 99 | 100 | $data['submit_input'] = array( 101 | 'name' => 'submit', 102 | 'id' => 'submit', 103 | 'value' => 'Search' 104 | ); 105 | 106 | $data['main_view'] = 'media_search'; 107 | 108 | $this->load->vars($data); 109 | 110 | $this->load->view('template'); 111 | 112 | } 113 | 114 | function popular() { 115 | 116 | $data['popular_media_data'] = $this->instagram_api->popularMedia(); 117 | 118 | $data['main_view'] = 'media_popular'; 119 | 120 | $this->load->vars($data); 121 | 122 | $this->load->view('template'); 123 | 124 | } 125 | 126 | function comments() { 127 | 128 | $media_comments_data = $this->instagram_api->mediaComments('3', $this->session->userdata('instagram-token')); 129 | 130 | echo '
';
131 | 		print_r($media_comments_data);
132 | 		echo '
'; 133 | 134 | } 135 | 136 | function likes() { 137 | 138 | $media_likes_data = $this->instagram_api->mediaLikes('3', $this->session->userdata('instagram-token')); 139 | 140 | echo '
';
141 | 		print_r($media_likes_data);
142 | 		echo '
'; 143 | 144 | } 145 | 146 | } -------------------------------------------------------------------------------- /demonstration/application/controllers/popular.php: -------------------------------------------------------------------------------- 1 | load->library('instagram_api'); 15 | 16 | // Get the popular media 17 | $popular_media = $this->instagram_api->getPopularMedia(); 18 | 19 | // Loop through the data returned by Instagram 20 | foreach($popular_media->data as $data) { 21 | 22 | // To see all the data that each media item contains uncomment the following 23 | /*echo '
';
24 | 			print_r($data);
25 | 			echo '
';*/ 26 | 27 | // Display the thumbnail image 28 | echo '

'; 29 | 30 | // Display the user name 31 | echo '

Taken by ' . $data->user->username . '

'; 32 | 33 | echo '
'; 34 | 35 | } 36 | 37 | 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /demonstration/application/controllers/popular_media.php: -------------------------------------------------------------------------------- 1 | Popular media'; 14 | 15 | $popular_media_request_url = 'https://api.instagram.com/v1/media/popular?client_id=' . INSTAGRAM_CLIENT_ID; 16 | 17 | $popular_media = $this->instagram_api->getPopularMedia(); 18 | 19 | foreach($popular_media->data as $media) { 20 | 21 | $thumbnail_url = $media->images->thumbnail->url; 22 | 23 | if(isset($media->caption->text)) { 24 | $image_caption = $media->caption->text; 25 | } else { 26 | $image_caption = 'Instagram CodeIgniter library by Ian Luckraft'; 27 | } 28 | $image_width = $media->images->thumbnail->width; 29 | $image_height = $media->images->thumbnail->height; 30 | 31 | echo '' . $image_caption . ''; 32 | 33 | } 34 | 35 | } 36 | } 37 | 38 | /* End of file popular_media.php */ 39 | /* Location: ./application/controllers/popular_media.php */ -------------------------------------------------------------------------------- /demonstration/application/controllers/tags.php: -------------------------------------------------------------------------------- 1 | instagram_api->access_token = $this->session->userdata('instagram-token'); 11 | 12 | } 13 | 14 | function index() 15 | { 16 | echo '

List tag functions

'; 17 | } 18 | 19 | function details($tag = FALSE) 20 | { 21 | 22 | $tags_data = $this->instagram_api->getTags($tag); 23 | 24 | echo '
';
25 | 		print_r($tags_data);
26 | 		echo '
'; 27 | 28 | } 29 | 30 | function recent($tag = FALSE) 31 | { 32 | 33 | $data['tags_recent_data'] = $this->instagram_api->tagsRecent($tag); 34 | 35 | $data['main_view'] = 'tags_recent'; 36 | 37 | $this->load->vars($data); 38 | 39 | $this->load->view('template'); 40 | 41 | } 42 | 43 | function search() 44 | { 45 | 46 | $tags_search_data = $this->instagram_api->tagsSearch('skateboard', $this->session->userdata('instagram-token')); 47 | 48 | echo '
';
49 | 		print_r($tags_search_data);
50 | 		echo '
'; 51 | 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /demonstration/application/controllers/user.php: -------------------------------------------------------------------------------- 1 | instagram_api->access_token = $this->session->userdata('instagram-token'); 11 | 12 | } 13 | 14 | function index() 15 | { 16 | echo '

List user functions

'; 17 | } 18 | 19 | function profile($user_id = FALSE) 20 | { 21 | 22 | if($user_id === FALSE) { 23 | $user_id = $this->session->userdata('instagram-user-id'); 24 | } 25 | 26 | // Get the user data 27 | $data['user_data'] = $this->instagram_api->getUser($user_id); 28 | 29 | $data['main_view'] = 'user_profile'; 30 | 31 | $this->load->vars($data); 32 | 33 | $this->load->view('template'); 34 | 35 | } 36 | 37 | function feed() 38 | { 39 | 40 | // Get the user data 41 | $data['user_data'] = $this->instagram_api->getUser($this->session->userdata('instagram-user-id')); 42 | 43 | // Get the user feed 44 | $data['user_feed'] = $this->instagram_api->getUserFeed(); 45 | 46 | $data['main_view'] = 'user_feed'; 47 | 48 | $this->load->vars($data); 49 | 50 | $this->load->view('template'); 51 | 52 | } 53 | 54 | function recent($user_id = FALSE) 55 | { 56 | 57 | if($user_id === FALSE) { 58 | $user_id = $this->session->userdata('instagram-user-id'); 59 | } 60 | 61 | // Get the user data 62 | $data['user_data'] = $this->instagram_api->getUser($user_id); 63 | 64 | $data['user_recent_data'] = $this->instagram_api->getUserRecent($user_id); 65 | 66 | $data['main_view'] = 'user_recent'; 67 | 68 | $this->load->vars($data); 69 | 70 | $this->load->view('template'); 71 | 72 | } 73 | 74 | function search($username = FALSE) 75 | { 76 | 77 | if($this->input->post('username')) { 78 | 79 | redirect('/user/search/' . $this->input->post('username')); 80 | 81 | } 82 | 83 | if($username !== FALSE) { 84 | 85 | // Search for the user 86 | $data['user_search_data'] = $this->instagram_api->userSearch($username); 87 | 88 | } 89 | 90 | $data['username_input'] = array( 91 | 'name' => 'username', 92 | 'id' => 'username' 93 | ); 94 | 95 | $data['submit_input'] = array( 96 | 'name' => 'submit', 97 | 'id' => 'submit', 98 | 'value' => 'Search' 99 | ); 100 | 101 | $data['main_view'] = 'user_search'; 102 | 103 | $this->load->vars($data); 104 | 105 | $this->load->view('template'); 106 | 107 | } 108 | 109 | function follows($user_id = FALSE) 110 | { 111 | 112 | if($user_id === FALSE) { 113 | $user_id = $this->session->userdata('instagram-user-id'); 114 | } 115 | 116 | // Get the user data 117 | $data['user_data'] = $this->instagram_api->getUser($this->session->userdata('instagram-user-id')); 118 | 119 | // Get the user feed 120 | $data['follows'] = $this->instagram_api->userFollows($user_id); 121 | 122 | $data['main_view'] = 'follows'; 123 | 124 | $this->load->vars($data); 125 | 126 | $this->load->view('template'); 127 | 128 | } 129 | 130 | function followed_by($user_id = FALSE) 131 | { 132 | 133 | if($user_id === FALSE) { 134 | $user_id = $this->session->userdata('instagram-user-id'); 135 | } 136 | 137 | // Get the user data 138 | $data['user_data'] = $this->instagram_api->getUser($this->session->userdata('instagram-user-id')); 139 | 140 | // Get the user feed 141 | $data['followed_by'] = $this->instagram_api->userFollowedBy($user_id); 142 | 143 | $data['main_view'] = 'followed_by'; 144 | 145 | $this->load->vars($data); 146 | 147 | $this->load->view('template'); 148 | 149 | } 150 | 151 | function requested_by() { 152 | 153 | $user_requested_by_data = $this->instagram_api->userRequestedBy($this->session->userdata('instagram-token')); 154 | 155 | echo '
';
156 | 		print_r($user_requested_by_data);
157 | 		echo '
'; 158 | 159 | } 160 | 161 | function relationship() { 162 | 163 | $user_relationship_data = $this->instagram_api->userRelationship($this->session->userdata('instagram-token')); 164 | 165 | echo '
';
166 | 		print_r($user_relationship_data);
167 | 		echo '
'; 168 | 169 | } 170 | 171 | } 172 | 173 | /* End of file user.php */ 174 | /* Location: ./application/controllers/user.php */ -------------------------------------------------------------------------------- /demonstration/application/controllers/welcome.php: -------------------------------------------------------------------------------- 1 | instagram_api->getPopularMedia(); 15 | 16 | $data['main_view'] = 'welcome_message'; 17 | 18 | $this->load->vars($data); 19 | 20 | $this->load->view('template'); 21 | } 22 | } 23 | 24 | /* End of file welcome.php */ 25 | /* Location: ./system/application/controllers/welcome.php */ -------------------------------------------------------------------------------- /demonstration/application/errors/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 404 Page Not Found 4 | 27 | 28 | 29 |
30 |

31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /demonstration/application/errors/error_db.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Database Error 4 | 27 | 28 | 29 |
30 |

31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /demonstration/application/errors/error_general.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Error 4 | 27 | 28 | 29 |
30 |

31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /demonstration/application/errors/error_php.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |

A PHP Error was encountered

4 | 5 |

Severity:

6 |

Message:

7 |

Filename:

8 |

Line Number:

9 | 10 |
-------------------------------------------------------------------------------- /demonstration/application/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/libraries/MY_Input.php: -------------------------------------------------------------------------------- 1 | 13 | * @license GPLv3 14 | * @version 1.0.0 15 | */ 16 | class MY_Input extends CI_Input { 17 | 18 | function _sanitize_globals() 19 | { 20 | $this->allow_get_array = TRUE; 21 | parent::_sanitize_globals(); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /demonstration/application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/views/followed_by.php: -------------------------------------------------------------------------------- 1 | 2 |

data->username); ?>'s followers

3 | 4 | data)) { ?> 5 | 6 | data as $follower) { ?> 7 | 8 |

id, $follower->username); ?>

9 | 10 |

$follower->profile_picture)); ?>

11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demonstration/application/views/follows.php: -------------------------------------------------------------------------------- 1 | 2 |

data->username); ?> follows

3 | 4 | data)) { ?> 5 | 6 | data as $follower) { ?> 7 | 8 |

id, $follower->username); ?>

9 | 10 |

$follower->profile_picture)); ?>

11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demonstration/application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/application/views/media_popular.php: -------------------------------------------------------------------------------- 1 | 2 |

Popular media

3 | 4 | data as $data) { ?> 5 | 6 |

$data->images->thumbnail->url)); ?>

7 | 8 |

Taken by user->id, $data->user->username); ?>

9 | 10 | location->name)) { ?> 11 | 12 |

Taken at location->name; ?>

13 | 14 | 15 | 16 | comments->count)) { ?> 17 | 18 |

comments->count; ?> comments

19 | 20 | 21 | 22 | likes->count)) { ?> 23 | 24 |

likes->count; ?> likes

25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demonstration/application/views/media_search.php: -------------------------------------------------------------------------------- 1 | 2 |

Search for media

3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |

35 | 36 | -------------------------------------------------------------------------------- /demonstration/application/views/tags_recent.php: -------------------------------------------------------------------------------- 1 | 2 |

Recent tags

3 | 4 | data)) { ?> 5 | 6 |

Media for the tag uri->segment(3); ?>

7 | 8 | data as $tag_data) { ?> 9 | 10 |

11 | 12 |

$tag_data->images->thumbnail->url)); ?>

13 | 14 |

Taken by user->id, $tag_data->user->username); ?>

15 | 16 | 17 | 18 | 19 | 20 |

There is no media for the tag uri->segment(3); ?>

21 | 22 | -------------------------------------------------------------------------------- /demonstration/application/views/template.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Codeigniter Instagram API Library 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | carabiner->display(); ?> 31 | 32 | 47 | 48 | 49 | 50 |
51 | 52 |
53 | 54 |
55 | 56 | load->view($main_view); ?> 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /demonstration/application/views/user_feed.php: -------------------------------------------------------------------------------- 1 | 2 |

data->username); ?>'s Instagram feed

3 | 4 | 5 | 6 | data as $feed_item) { ?> 7 | 8 | type == 'image') { ?> 9 | 10 |

images->standard_resolution->url, img(array('src' => $feed_item->images->thumbnail->url))); ?>

11 | 12 |

Posted by user->username); ?> using the filter; ?> filter

13 | 14 | location->name) && $feed_item->location->name != '') { ?> 15 | 16 |

Taken at location->name); ?>

17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /demonstration/application/views/user_profile.php: -------------------------------------------------------------------------------- 1 | 2 |

data->username); ?>'s Instagram profile

3 | 4 | $user_data->data->profile_picture)); ?> 5 | 6 |

data->username); ?> has

7 | 8 | 13 | -------------------------------------------------------------------------------- /demonstration/application/views/user_recent.php: -------------------------------------------------------------------------------- 1 | 2 |

data->username); ?>'s Instagram feed

3 | 4 | data)) { ?> 5 | 6 | data as $feed_data) { ?> 7 | 8 | 9 | 10 |

$feed_data->images->thumbnail->url)); ?>

11 | 12 | location->name)) { ?> 13 | 14 |

Taken at location->name; ?>

15 | 16 | 17 | 18 | comments->count)) { ?> 19 | 20 |

comments->count; ?> comments

21 | 22 | 23 | 24 | likes->count)) { ?> 25 | 26 |

likes->count; ?> likes

27 | 28 | 29 | 30 | tags) > 0) { ?> 31 | 32 |

Tags

33 | 34 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |

There is nothing in the feed

49 | 50 | -------------------------------------------------------------------------------- /demonstration/application/views/user_search.php: -------------------------------------------------------------------------------- 1 | 2 |

User search

3 | 4 | data)) { ?> 5 | 6 | data) != 0) { ?> 7 | 8 |

We found a match for uri->segment(3); ?>

9 | 10 |

data[0]->id, img(array('src' => $user_search_data->data[0]->profile_picture))); ?>

11 | 12 |

View data[0]->id, $this->uri->segment(3) . "'s profile"); ?>

13 | 14 | 15 | 16 |

No users found

17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /demonstration/application/views/welcome_message.php: -------------------------------------------------------------------------------- 1 | 2 |

CodeIgniter Instagram API Library

3 | 4 |

This CodeIgniter library provides all the functionality to interact with the Instagram API. .

5 | 6 | session->userdata('instagram-token')) { ?> 7 | 8 | 50 | 51 | 52 | 53 |

To see all of the functions please instagram_api->instagramLogin(), 'login through Instagram'); ?>

54 | 55 | 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 | -------------------------------------------------------------------------------- /demonstration/assets/css/stylesheet.css: -------------------------------------------------------------------------------- 1 | img, ul, li { 2 | margin:0; 3 | padding:0; 4 | border:none; 5 | list-style-type:none; 6 | } 7 | 8 | .image-list li { 9 | float:left; 10 | margin-right:10px; 11 | } 12 | 13 | footer { 14 | display:block; 15 | clear:left; 16 | } 17 | 18 | #map { 19 | width:400px; 20 | height:400px; 21 | } 22 | -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/blank.gif -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_close.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_loading.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_nav_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_nav_left.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_nav_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_nav_right.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_e.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_n.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_ne.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_nw.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_s.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_se.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_sw.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_shadow_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_shadow_w.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_title_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_title_left.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_title_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_title_main.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_title_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_title_over.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancy_title_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancy_title_right.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancybox-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancybox-x.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancybox-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancybox-y.png -------------------------------------------------------------------------------- /demonstration/assets/images/fancybox/fancybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/assets/images/fancybox/fancybox.png -------------------------------------------------------------------------------- /demonstration/assets/javascript/jquery.mousewheel-3.0.4.pack.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.0.4 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | 13 | (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= 14 | f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); -------------------------------------------------------------------------------- /demonstration/assets/javascript/pages/search_media.js: -------------------------------------------------------------------------------- 1 | // Load the map scripts 2 | google.load('maps', '3', {other_params:'sensor=true'}); 3 | // Create a map variable 4 | var map; 5 | // Create a variable for the users lat long 6 | var user_lat_long; 7 | // Create a variable for the zoom level 8 | var zoom_level; 9 | // Create an array to hold all of the markers 10 | var markersArray = []; 11 | 12 | function clearOverlays() { 13 | 14 | if (markersArray) { 15 | 16 | for (i in markersArray) { 17 | 18 | markersArray[i].setMap(null); 19 | 20 | } 21 | 22 | } 23 | 24 | } 25 | 26 | function mapInit() { 27 | 28 | if(navigator.geolocation) { 29 | 30 | navigator.geolocation.getCurrentPosition(currentPositionSuccessfulCallback); 31 | 32 | } else { 33 | 34 | alert('Denied geolocation'); 35 | 36 | } 37 | 38 | // Create a basic map with the following options 39 | var myOptions = { 40 | zoom: 0, 41 | center: new google.maps.LatLng(0, 0), 42 | mapTypeId: google.maps.MapTypeId.ROADMAP 43 | }; 44 | 45 | // Create the new 46 | map = new google.maps.Map(document.getElementById("map"), myOptions); 47 | 48 | // Add an event listener for a click event 49 | google.maps.event.addListener(map, 'click', function(event) { 50 | 51 | // Clear all the markers 52 | clearOverlays(); 53 | 54 | var lat_long = String(event.latLng); 55 | var lat_long_array = lat_long.replace('(', '').replace(')', '').replace(' ', '').split(","); 56 | 57 | $('#latitude').val(lat_long_array['0']); 58 | $('#longitude').val(lat_long_array['1']); 59 | 60 | // Add a new marker 61 | marker = new google.maps.Marker({ 62 | position: event.latLng, 63 | map: map 64 | }); 65 | 66 | markersArray.push(marker); 67 | 68 | }); 69 | 70 | } 71 | 72 | function currentPositionSuccessfulCallback(position) 73 | { 74 | 75 | user_lat_long = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); 76 | 77 | map.setCenter(user_lat_long); 78 | map.setZoom(15); 79 | 80 | marker = new google.maps.Marker({ 81 | position: user_lat_long, 82 | map: map 83 | }); 84 | 85 | markersArray.push(marker); 86 | 87 | $('#latitude').val(position.coords.latitude); 88 | $('#longitude').val(position.coords.longitude); 89 | 90 | } 91 | 92 | $(document).ready(function(){ 93 | 94 | // Create a map 95 | mapInit(); 96 | 97 | // Calculate the current year 98 | var currentDate = new Date(); 99 | var currentYear = currentDate.getFullYear(); 100 | 101 | var yearRangeBegin = '1900'; 102 | var yearRangeEnd = currentYear + 10; 103 | 104 | $('.date').datepicker({ 105 | dateFormat: 'yy-mm-dd', 106 | changeMonth: true, 107 | changeYear: true, 108 | //showOn: 'button', 109 | //buttonImage: base_url + 'assets/images/calendar.png', 110 | //buttonImageOnly: true, 111 | //showButtonPanel: true, 112 | yearRange: yearRangeBegin + ':' + yearRangeEnd 113 | }); 114 | 115 | }); 116 | -------------------------------------------------------------------------------- /demonstration/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/codeigniter/Base4.php: -------------------------------------------------------------------------------- 1 | load->library('email') to instantiate 26 | * classes that can then be used within controllers as $this->email->send() 27 | * 28 | * PHP 4 also has trouble referencing the CI super object within application 29 | * constructors since objects do not exist until the class is fully 30 | * instantiated. Basically PHP 4 sucks... 31 | * 32 | * Since PHP 5 doesn't suffer from this problem so we load one of 33 | * two files based on the version of PHP being run. 34 | * 35 | * @package CodeIgniter 36 | * @subpackage codeigniter 37 | * @category front-controller 38 | * @author ExpressionEngine Dev Team 39 | * @link http://codeigniter.com/user_guide/ 40 | */ 41 | class CI_Base extends CI_Loader { 42 | 43 | function CI_Base() 44 | { 45 | // This allows syntax like $this->load->foo() to work 46 | parent::CI_Loader(); 47 | $this->load =& $this; 48 | 49 | // This allows resources used within controller constructors to work 50 | global $OBJ; 51 | $OBJ = $this->load; // Do NOT use a reference. 52 | } 53 | } 54 | 55 | function &get_instance() 56 | { 57 | global $CI, $OBJ; 58 | 59 | if (is_object($CI)) 60 | { 61 | return $CI; 62 | } 63 | 64 | return $OBJ->load; 65 | } 66 | 67 | 68 | /* End of file Base4.php */ 69 | /* Location: ./system/codeigniter/Base4.php */ -------------------------------------------------------------------------------- /demonstration/system/codeigniter/Base5.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/DB.php: -------------------------------------------------------------------------------- 1 | $dns['scheme'], 66 | 'hostname' => (isset($dns['host'])) ? rawurldecode($dns['host']) : '', 67 | 'username' => (isset($dns['user'])) ? rawurldecode($dns['user']) : '', 68 | 'password' => (isset($dns['pass'])) ? rawurldecode($dns['pass']) : '', 69 | 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : '' 70 | ); 71 | 72 | // were additional config items set? 73 | if (isset($dns['query'])) 74 | { 75 | parse_str($dns['query'], $extra); 76 | 77 | foreach($extra as $key => $val) 78 | { 79 | // booleans please 80 | if (strtoupper($val) == "TRUE") 81 | { 82 | $val = TRUE; 83 | } 84 | elseif (strtoupper($val) == "FALSE") 85 | { 86 | $val = FALSE; 87 | } 88 | 89 | $params[$key] = $val; 90 | } 91 | } 92 | } 93 | 94 | // No DB specified yet? Beat them senseless... 95 | if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '') 96 | { 97 | show_error('You have not selected a database type to connect to.'); 98 | } 99 | 100 | // Load the DB classes. Note: Since the active record class is optional 101 | // we need to dynamically create a class that extends proper parent class 102 | // based on whether we're using the active record class or not. 103 | // Kudos to Paul for discovering this clever use of eval() 104 | 105 | if ($active_record_override == TRUE) 106 | { 107 | $active_record = TRUE; 108 | } 109 | 110 | require_once(BASEPATH.'database/DB_driver'.EXT); 111 | 112 | if ( ! isset($active_record) OR $active_record == TRUE) 113 | { 114 | require_once(BASEPATH.'database/DB_active_rec'.EXT); 115 | 116 | if ( ! class_exists('CI_DB')) 117 | { 118 | eval('class CI_DB extends CI_DB_active_record { }'); 119 | } 120 | } 121 | else 122 | { 123 | if ( ! class_exists('CI_DB')) 124 | { 125 | eval('class CI_DB extends CI_DB_driver { }'); 126 | } 127 | } 128 | 129 | require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver'.EXT); 130 | 131 | // Instantiate the DB adapter 132 | $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; 133 | $DB =& instantiate_class(new $driver($params)); 134 | 135 | if ($DB->autoinit == TRUE) 136 | { 137 | $DB->initialize(); 138 | } 139 | 140 | return $DB; 141 | } 142 | 143 | 144 | 145 | /* End of file DB.php */ 146 | /* Location: ./system/database/DB.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mssql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mssql/mssql_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @mssql_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | while ($field = mssql_fetch_field($this->result_id)) 67 | { 68 | $field_names[] = $field->name; 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | while ($field = mssql_fetch_field($this->result_id)) 88 | { 89 | $F = new stdClass(); 90 | $F->name = $field->name; 91 | $F->type = $field->type; 92 | $F->max_length = $field->max_length; 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | mssql_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return mssql_data_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return mssql_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return mssql_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file mssql_result.php */ 169 | /* Location: ./system/database/drivers/mssql/mssql_result.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mssql/mssql_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | /** 86 | * 87 | * The functions below have been deprecated as of 1.6, and are only here for backwards 88 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 89 | * is STRONGLY discouraged in favour if using dbforge. 90 | * 91 | */ 92 | 93 | /** 94 | * Create database 95 | * 96 | * @access private 97 | * @param string the database name 98 | * @return bool 99 | */ 100 | function _create_database($name) 101 | { 102 | return "CREATE DATABASE ".$name; 103 | } 104 | 105 | // -------------------------------------------------------------------- 106 | 107 | /** 108 | * Drop database 109 | * 110 | * @access private 111 | * @param string the database name 112 | * @return bool 113 | */ 114 | function _drop_database($name) 115 | { 116 | return "DROP DATABASE ".$name; 117 | } 118 | 119 | } 120 | 121 | 122 | /* End of file mssql_utility.php */ 123 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mysql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mysql/mysql_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @mysql_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | while ($field = mysql_fetch_field($this->result_id)) 67 | { 68 | $field_names[] = $field->name; 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | while ($field = mysql_fetch_field($this->result_id)) 88 | { 89 | $F = new stdClass(); 90 | $F->name = $field->name; 91 | $F->type = $field->type; 92 | $F->default = $field->def; 93 | $F->max_length = $field->max_length; 94 | $F->primary_key = $field->primary_key; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | mysql_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return mysql_data_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return mysql_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return mysql_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file mysql_result.php */ 169 | /* Location: ./system/database/drivers/mysql/mysql_result.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mysqli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mysqli/mysqli_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @mysqli_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | while ($field = mysqli_fetch_field($this->result_id)) 67 | { 68 | $field_names[] = $field->name; 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | while ($field = mysqli_fetch_field($this->result_id)) 88 | { 89 | $F = new stdClass(); 90 | $F->name = $field->name; 91 | $F->type = $field->type; 92 | $F->default = $field->def; 93 | $F->max_length = $field->max_length; 94 | $F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_object($this->result_id)) 112 | { 113 | mysqli_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return mysqli_data_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return mysqli_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return mysqli_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file mysqli_result.php */ 169 | /* Location: ./system/database/drivers/mysqli/mysqli_result.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/mysqli/mysqli_utility.php: -------------------------------------------------------------------------------- 1 | db->_escape_identifiers($table); 52 | } 53 | 54 | // -------------------------------------------------------------------- 55 | 56 | /** 57 | * Repair table query 58 | * 59 | * Generates a platform-specific query so that a table can be repaired 60 | * 61 | * @access private 62 | * @param string the table name 63 | * @return object 64 | */ 65 | function _repair_table($table) 66 | { 67 | return "REPAIR TABLE ".$this->db->_escape_identifiers($table); 68 | } 69 | 70 | // -------------------------------------------------------------------- 71 | 72 | /** 73 | * MySQLi Export 74 | * 75 | * @access private 76 | * @param array Preferences 77 | * @return mixed 78 | */ 79 | function _backup($params = array()) 80 | { 81 | // Currently unsupported 82 | return $this->db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | 86 | /** 87 | * 88 | * The functions below have been deprecated as of 1.6, and are only here for backwards 89 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 90 | * is STRONGLY discouraged in favour if using dbforge. 91 | * 92 | */ 93 | 94 | /** 95 | * Create database 96 | * 97 | * @access private 98 | * @param string the database name 99 | * @return bool 100 | */ 101 | function _create_database($name) 102 | { 103 | return "CREATE DATABASE ".$name; 104 | } 105 | 106 | // -------------------------------------------------------------------- 107 | 108 | /** 109 | * Drop database 110 | * 111 | * @access private 112 | * @param string the database name 113 | * @return bool 114 | */ 115 | function _drop_database($name) 116 | { 117 | return "DROP DATABASE ".$name; 118 | } 119 | 120 | } 121 | 122 | /* End of file mysqli_utility.php */ 123 | /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/oci8/oci8_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | /** 86 | * 87 | * The functions below have been deprecated as of 1.6, and are only here for backwards 88 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 89 | * is STRONGLY discouraged in favour if using dbforge. 90 | * 91 | */ 92 | 93 | /** 94 | * Create database 95 | * 96 | * @access public 97 | * @param string the database name 98 | * @return bool 99 | */ 100 | function _create_database($name) 101 | { 102 | return FALSE; 103 | } 104 | 105 | // -------------------------------------------------------------------- 106 | 107 | /** 108 | * Drop database 109 | * 110 | * @access private 111 | * @param string the database name 112 | * @return bool 113 | */ 114 | function _drop_database($name) 115 | { 116 | return FALSE; 117 | } 118 | 119 | } 120 | 121 | /* End of file oci8_utility.php */ 122 | /* Location: ./system/database/drivers/oci8/oci8_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/odbc/odbc_utility.php: -------------------------------------------------------------------------------- 1 | db->db_debug) 37 | { 38 | return $this->db->display_error('db_unsuported_feature'); 39 | } 40 | return FALSE; 41 | } 42 | 43 | // -------------------------------------------------------------------- 44 | 45 | /** 46 | * Optimize table query 47 | * 48 | * Generates a platform-specific query so that a table can be optimized 49 | * 50 | * @access private 51 | * @param string the table name 52 | * @return object 53 | */ 54 | function _optimize_table($table) 55 | { 56 | // Not a supported ODBC feature 57 | if ($this->db->db_debug) 58 | { 59 | return $this->db->display_error('db_unsuported_feature'); 60 | } 61 | return FALSE; 62 | } 63 | 64 | // -------------------------------------------------------------------- 65 | 66 | /** 67 | * Repair table query 68 | * 69 | * Generates a platform-specific query so that a table can be repaired 70 | * 71 | * @access private 72 | * @param string the table name 73 | * @return object 74 | */ 75 | function _repair_table($table) 76 | { 77 | // Not a supported ODBC feature 78 | if ($this->db->db_debug) 79 | { 80 | return $this->db->display_error('db_unsuported_feature'); 81 | } 82 | return FALSE; 83 | } 84 | 85 | // -------------------------------------------------------------------- 86 | 87 | /** 88 | * ODBC Export 89 | * 90 | * @access private 91 | * @param array Preferences 92 | * @return mixed 93 | */ 94 | function _backup($params = array()) 95 | { 96 | // Currently unsupported 97 | return $this->db->display_error('db_unsuported_feature'); 98 | } 99 | 100 | /** 101 | * 102 | * The functions below have been deprecated as of 1.6, and are only here for backwards 103 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 104 | * is STRONGLY discouraged in favour if using dbforge. 105 | * 106 | */ 107 | 108 | /** 109 | * Create database 110 | * 111 | * @access private 112 | * @param string the database name 113 | * @return bool 114 | */ 115 | function _create_database() 116 | { 117 | // ODBC has no "create database" command since it's 118 | // designed to connect to an existing database 119 | if ($this->db->db_debug) 120 | { 121 | return $this->db->display_error('db_unsuported_feature'); 122 | } 123 | return FALSE; 124 | } 125 | 126 | // -------------------------------------------------------------------- 127 | 128 | /** 129 | * Drop database 130 | * 131 | * @access private 132 | * @param string the database name 133 | * @return bool 134 | */ 135 | function _drop_database($name) 136 | { 137 | // ODBC has no "drop database" command since it's 138 | // designed to connect to an existing database 139 | if ($this->db->db_debug) 140 | { 141 | return $this->db->display_error('db_unsuported_feature'); 142 | } 143 | return FALSE; 144 | } 145 | } 146 | 147 | /* End of file odbc_utility.php */ 148 | /* Location: ./system/database/drivers/odbc/odbc_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/postgre/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/postgre/postgre_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @pg_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | for ($i = 0; $i < $this->num_fields(); $i++) 67 | { 68 | $field_names[] = pg_field_name($this->result_id, $i); 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | for ($i = 0; $i < $this->num_fields(); $i++) 88 | { 89 | $F = new stdClass(); 90 | $F->name = pg_field_name($this->result_id, $i); 91 | $F->type = pg_field_type($this->result_id, $i); 92 | $F->max_length = pg_field_size($this->result_id, $i); 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | if (is_resource($this->result_id)) 112 | { 113 | pg_free_result($this->result_id); 114 | $this->result_id = FALSE; 115 | } 116 | } 117 | 118 | // -------------------------------------------------------------------- 119 | 120 | /** 121 | * Data Seek 122 | * 123 | * Moves the internal pointer to the desired offset. We call 124 | * this internally before fetching results to make sure the 125 | * result set starts at zero 126 | * 127 | * @access private 128 | * @return array 129 | */ 130 | function _data_seek($n = 0) 131 | { 132 | return pg_result_seek($this->result_id, $n); 133 | } 134 | 135 | // -------------------------------------------------------------------- 136 | 137 | /** 138 | * Result - associative array 139 | * 140 | * Returns the result set as an array 141 | * 142 | * @access private 143 | * @return array 144 | */ 145 | function _fetch_assoc() 146 | { 147 | return pg_fetch_assoc($this->result_id); 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Result - object 154 | * 155 | * Returns the result set as an object 156 | * 157 | * @access private 158 | * @return object 159 | */ 160 | function _fetch_object() 161 | { 162 | return pg_fetch_object($this->result_id); 163 | } 164 | 165 | } 166 | 167 | 168 | /* End of file postgre_result.php */ 169 | /* Location: ./system/database/drivers/postgre/postgre_result.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/postgre/postgre_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 83 | } 84 | 85 | /** 86 | * 87 | * The functions below have been deprecated as of 1.6, and are only here for backwards 88 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 89 | * is STRONGLY discouraged in favour if using dbforge. 90 | * 91 | */ 92 | 93 | /** 94 | * Create database 95 | * 96 | * @access private 97 | * @param string the database name 98 | * @return bool 99 | */ 100 | function _create_database($name) 101 | { 102 | return "CREATE DATABASE ".$name; 103 | } 104 | 105 | // -------------------------------------------------------------------- 106 | 107 | /** 108 | * Drop database 109 | * 110 | * @access private 111 | * @param string the database name 112 | * @return bool 113 | */ 114 | function _drop_database($name) 115 | { 116 | return "DROP DATABASE ".$name; 117 | } 118 | 119 | 120 | } 121 | 122 | 123 | /* End of file postgre_utility.php */ 124 | /* Location: ./system/database/drivers/postgre/postgre_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/database/drivers/sqlite/sqlite_result.php: -------------------------------------------------------------------------------- 1 | result_id); 38 | } 39 | 40 | // -------------------------------------------------------------------- 41 | 42 | /** 43 | * Number of fields in the result set 44 | * 45 | * @access public 46 | * @return integer 47 | */ 48 | function num_fields() 49 | { 50 | return @sqlite_num_fields($this->result_id); 51 | } 52 | 53 | // -------------------------------------------------------------------- 54 | 55 | /** 56 | * Fetch Field Names 57 | * 58 | * Generates an array of column names 59 | * 60 | * @access public 61 | * @return array 62 | */ 63 | function list_fields() 64 | { 65 | $field_names = array(); 66 | for ($i = 0; $i < $this->num_fields(); $i++) 67 | { 68 | $field_names[] = sqlite_field_name($this->result_id, $i); 69 | } 70 | 71 | return $field_names; 72 | } 73 | 74 | // -------------------------------------------------------------------- 75 | 76 | /** 77 | * Field data 78 | * 79 | * Generates an array of objects containing field meta-data 80 | * 81 | * @access public 82 | * @return array 83 | */ 84 | function field_data() 85 | { 86 | $retval = array(); 87 | for ($i = 0; $i < $this->num_fields(); $i++) 88 | { 89 | $F = new stdClass(); 90 | $F->name = sqlite_field_name($this->result_id, $i); 91 | $F->type = 'varchar'; 92 | $F->max_length = 0; 93 | $F->primary_key = 0; 94 | $F->default = ''; 95 | 96 | $retval[] = $F; 97 | } 98 | 99 | return $retval; 100 | } 101 | 102 | // -------------------------------------------------------------------- 103 | 104 | /** 105 | * Free the result 106 | * 107 | * @return null 108 | */ 109 | function free_result() 110 | { 111 | // Not implemented in SQLite 112 | } 113 | 114 | // -------------------------------------------------------------------- 115 | 116 | /** 117 | * Data Seek 118 | * 119 | * Moves the internal pointer to the desired offset. We call 120 | * this internally before fetching results to make sure the 121 | * result set starts at zero 122 | * 123 | * @access private 124 | * @return array 125 | */ 126 | function _data_seek($n = 0) 127 | { 128 | return sqlite_seek($this->result_id, $n); 129 | } 130 | 131 | // -------------------------------------------------------------------- 132 | 133 | /** 134 | * Result - associative array 135 | * 136 | * Returns the result set as an array 137 | * 138 | * @access private 139 | * @return array 140 | */ 141 | function _fetch_assoc() 142 | { 143 | return sqlite_fetch_array($this->result_id); 144 | } 145 | 146 | // -------------------------------------------------------------------- 147 | 148 | /** 149 | * Result - object 150 | * 151 | * Returns the result set as an object 152 | * 153 | * @access private 154 | * @return object 155 | */ 156 | function _fetch_object() 157 | { 158 | if (function_exists('sqlite_fetch_object')) 159 | { 160 | return sqlite_fetch_object($this->result_id); 161 | } 162 | else 163 | { 164 | $arr = sqlite_fetch_array($this->result_id, SQLITE_ASSOC); 165 | if (is_array($arr)) 166 | { 167 | $obj = (object) $arr; 168 | return $obj; 169 | } else { 170 | return NULL; 171 | } 172 | } 173 | } 174 | 175 | } 176 | 177 | 178 | /* End of file sqlite_result.php */ 179 | /* Location: ./system/database/drivers/sqlite/sqlite_result.php */ -------------------------------------------------------------------------------- /demonstration/system/database/drivers/sqlite/sqlite_utility.php: -------------------------------------------------------------------------------- 1 | db_debug) 41 | { 42 | return $this->display_error('db_unsuported_feature'); 43 | } 44 | return array(); 45 | } 46 | 47 | // -------------------------------------------------------------------- 48 | 49 | /** 50 | * Optimize table query 51 | * 52 | * Is optimization even supported in SQLite? 53 | * 54 | * @access private 55 | * @param string the table name 56 | * @return object 57 | */ 58 | function _optimize_table($table) 59 | { 60 | return FALSE; 61 | } 62 | 63 | // -------------------------------------------------------------------- 64 | 65 | /** 66 | * Repair table query 67 | * 68 | * Are table repairs even supported in SQLite? 69 | * 70 | * @access private 71 | * @param string the table name 72 | * @return object 73 | */ 74 | function _repair_table($table) 75 | { 76 | return FALSE; 77 | } 78 | 79 | // -------------------------------------------------------------------- 80 | 81 | /** 82 | * SQLite Export 83 | * 84 | * @access private 85 | * @param array Preferences 86 | * @return mixed 87 | */ 88 | function _backup($params = array()) 89 | { 90 | // Currently unsupported 91 | return $this->db->display_error('db_unsuported_feature'); 92 | } 93 | 94 | /** 95 | * 96 | * The functions below have been deprecated as of 1.6, and are only here for backwards 97 | * compatibility. They now reside in dbforge(). The use of dbutils for database manipulation 98 | * is STRONGLY discouraged in favour if using dbforge. 99 | * 100 | */ 101 | 102 | /** 103 | * Create database 104 | * 105 | * @access public 106 | * @param string the database name 107 | * @return bool 108 | */ 109 | function _create_database() 110 | { 111 | // In SQLite, a database is created when you connect to the database. 112 | // We'll return TRUE so that an error isn't generated 113 | return TRUE; 114 | } 115 | 116 | // -------------------------------------------------------------------- 117 | 118 | /** 119 | * Drop database 120 | * 121 | * @access private 122 | * @param string the database name 123 | * @return bool 124 | */ 125 | function _drop_database($name) 126 | { 127 | if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database)) 128 | { 129 | if ($this->db->db_debug) 130 | { 131 | return $this->db->display_error('db_unable_to_drop'); 132 | } 133 | return FALSE; 134 | } 135 | return TRUE; 136 | } 137 | 138 | } 139 | 140 | /* End of file sqlite_utility.php */ 141 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ -------------------------------------------------------------------------------- /demonstration/system/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/fonts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/system/fonts/texb.ttf -------------------------------------------------------------------------------- /demonstration/system/helpers/array_helper.php: -------------------------------------------------------------------------------- 1 | config->item('cookie_prefix') != '') 64 | { 65 | $prefix = $CI->config->item('cookie_prefix'); 66 | } 67 | if ($domain == '' AND $CI->config->item('cookie_domain') != '') 68 | { 69 | $domain = $CI->config->item('cookie_domain'); 70 | } 71 | if ($path == '/' AND $CI->config->item('cookie_path') != '/') 72 | { 73 | $path = $CI->config->item('cookie_path'); 74 | } 75 | 76 | if ( ! is_numeric($expire)) 77 | { 78 | $expire = time() - 86500; 79 | } 80 | else 81 | { 82 | if ($expire > 0) 83 | { 84 | $expire = time() + $expire; 85 | } 86 | else 87 | { 88 | $expire = 0; 89 | } 90 | } 91 | 92 | setcookie($prefix.$name, $value, $expire, $path, $domain, 0); 93 | } 94 | } 95 | 96 | // -------------------------------------------------------------------- 97 | 98 | /** 99 | * Fetch an item from the COOKIE array 100 | * 101 | * @access public 102 | * @param string 103 | * @param bool 104 | * @return mixed 105 | */ 106 | if ( ! function_exists('get_cookie')) 107 | { 108 | function get_cookie($index = '', $xss_clean = FALSE) 109 | { 110 | $CI =& get_instance(); 111 | 112 | $prefix = ''; 113 | 114 | if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '') 115 | { 116 | $prefix = config_item('cookie_prefix'); 117 | } 118 | 119 | return $CI->input->cookie($prefix.$index, $xss_clean); 120 | } 121 | } 122 | 123 | // -------------------------------------------------------------------- 124 | 125 | /** 126 | * Delete a COOKIE 127 | * 128 | * @param mixed 129 | * @param string the cookie domain. Usually: .yourdomain.com 130 | * @param string the cookie path 131 | * @param string the cookie prefix 132 | * @return void 133 | */ 134 | if ( ! function_exists('delete_cookie')) 135 | { 136 | function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') 137 | { 138 | set_cookie($name, '', '', $domain, $path, $prefix); 139 | } 140 | } 141 | 142 | 143 | /* End of file cookie_helper.php */ 144 | /* Location: ./system/helpers/cookie_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/directory_helper.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/helpers/inflector_helper.php: -------------------------------------------------------------------------------- 1 | regular plural 91 | $vowels = array('a', 'e', 'i', 'o', 'u'); 92 | $str = in_array(substr($str, -2, 1), $vowels) ? $str.'s' : substr($str, 0, -1).'ies'; 93 | } 94 | elseif ($end == 's') 95 | { 96 | if ($force == TRUE) 97 | { 98 | $str .= 'es'; 99 | } 100 | } 101 | else 102 | { 103 | $str .= 's'; 104 | } 105 | 106 | return $str; 107 | } 108 | } 109 | 110 | // -------------------------------------------------------------------- 111 | 112 | /** 113 | * Camelize 114 | * 115 | * Takes multiple words separated by spaces or underscores and camelizes them 116 | * 117 | * @access public 118 | * @param string 119 | * @return str 120 | */ 121 | if ( ! function_exists('camelize')) 122 | { 123 | function camelize($str) 124 | { 125 | $str = 'x'.strtolower(trim($str)); 126 | $str = ucwords(preg_replace('/[\s_]+/', ' ', $str)); 127 | return substr(str_replace(' ', '', $str), 1); 128 | } 129 | } 130 | 131 | // -------------------------------------------------------------------- 132 | 133 | /** 134 | * Underscore 135 | * 136 | * Takes multiple words separated by spaces and underscores them 137 | * 138 | * @access public 139 | * @param string 140 | * @return str 141 | */ 142 | if ( ! function_exists('underscore')) 143 | { 144 | function underscore($str) 145 | { 146 | return preg_replace('/[\s]+/', '_', strtolower(trim($str))); 147 | } 148 | } 149 | 150 | // -------------------------------------------------------------------- 151 | 152 | /** 153 | * Humanize 154 | * 155 | * Takes multiple words separated by underscores and changes them to spaces 156 | * 157 | * @access public 158 | * @param string 159 | * @return str 160 | */ 161 | if ( ! function_exists('humanize')) 162 | { 163 | function humanize($str) 164 | { 165 | return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str)))); 166 | } 167 | } 168 | 169 | 170 | /* End of file inflector_helper.php */ 171 | /* Location: ./system/helpers/inflector_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/language_helper.php: -------------------------------------------------------------------------------- 1 | lang->line($line); 46 | 47 | if ($id != '') 48 | { 49 | $line = '"; 50 | } 51 | 52 | return $line; 53 | } 54 | } 55 | 56 | // ------------------------------------------------------------------------ 57 | /* End of file language_helper.php */ 58 | /* Location: ./system/helpers/language_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/number_helper.php: -------------------------------------------------------------------------------- 1 | lang->load('number'); 43 | 44 | if ($num >= 1000000000000) 45 | { 46 | $num = round($num / 1099511627776, 1); 47 | $unit = $CI->lang->line('terabyte_abbr'); 48 | } 49 | elseif ($num >= 1000000000) 50 | { 51 | $num = round($num / 1073741824, 1); 52 | $unit = $CI->lang->line('gigabyte_abbr'); 53 | } 54 | elseif ($num >= 1000000) 55 | { 56 | $num = round($num / 1048576, 1); 57 | $unit = $CI->lang->line('megabyte_abbr'); 58 | } 59 | elseif ($num >= 1000) 60 | { 61 | $num = round($num / 1024, 1); 62 | $unit = $CI->lang->line('kilobyte_abbr'); 63 | } 64 | else 65 | { 66 | $unit = $CI->lang->line('bytes'); 67 | return number_format($num).' '.$unit; 68 | } 69 | 70 | return number_format($num, 1).' '.$unit; 71 | } 72 | } 73 | 74 | /* End of file number_helper.php */ 75 | /* Location: ./system/helpers/number_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/path_helper.php: -------------------------------------------------------------------------------- 1 | input->xss_clean($str, $is_image); 44 | } 45 | } 46 | 47 | // -------------------------------------------------------------------- 48 | 49 | /** 50 | * Hash encode a string 51 | * 52 | * @access public 53 | * @param string 54 | * @return string 55 | */ 56 | if ( ! function_exists('dohash')) 57 | { 58 | function dohash($str, $type = 'sha1') 59 | { 60 | if ($type == 'sha1') 61 | { 62 | if ( ! function_exists('sha1')) 63 | { 64 | if ( ! function_exists('mhash')) 65 | { 66 | require_once(BASEPATH.'libraries/Sha1'.EXT); 67 | $SH = new CI_SHA; 68 | return $SH->generate($str); 69 | } 70 | else 71 | { 72 | return bin2hex(mhash(MHASH_SHA1, $str)); 73 | } 74 | } 75 | else 76 | { 77 | return sha1($str); 78 | } 79 | } 80 | else 81 | { 82 | return md5($str); 83 | } 84 | } 85 | } 86 | 87 | // ------------------------------------------------------------------------ 88 | 89 | /** 90 | * Strip Image Tags 91 | * 92 | * @access public 93 | * @param string 94 | * @return string 95 | */ 96 | if ( ! function_exists('strip_image_tags')) 97 | { 98 | function strip_image_tags($str) 99 | { 100 | $str = preg_replace("##", "\\1", $str); 101 | $str = preg_replace("##", "\\1", $str); 102 | 103 | return $str; 104 | } 105 | } 106 | 107 | // ------------------------------------------------------------------------ 108 | 109 | /** 110 | * Convert PHP tags to entities 111 | * 112 | * @access public 113 | * @param string 114 | * @return string 115 | */ 116 | if ( ! function_exists('encode_php_tags')) 117 | { 118 | function encode_php_tags($str) 119 | { 120 | return str_replace(array(''), array('<?php', '<?PHP', '<?', '?>'), $str); 121 | } 122 | } 123 | 124 | 125 | /* End of file security_helper.php */ 126 | /* Location: ./system/helpers/security_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/typography_helper.php: -------------------------------------------------------------------------------- 1 | load->library('typography'); 44 | 45 | return $CI->typography->nl2br_except_pre($str); 46 | } 47 | } 48 | 49 | // ------------------------------------------------------------------------ 50 | 51 | /** 52 | * Auto Typography Wrapper Function 53 | * 54 | * 55 | * @access public 56 | * @param string 57 | * @param bool whether to reduce multiple instances of double newlines to two 58 | * @return string 59 | */ 60 | if ( ! function_exists('auto_typography')) 61 | { 62 | function auto_typography($str, $reduce_linebreaks = FALSE) 63 | { 64 | $CI =& get_instance(); 65 | $CI->load->library('typography'); 66 | return $CI->typography->auto_typography($str, $reduce_linebreaks); 67 | } 68 | } 69 | 70 | /* End of file typography_helper.php */ 71 | /* Location: ./system/helpers/typography_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/helpers/xml_helper.php: -------------------------------------------------------------------------------- 1 | ","\"", "'", "-"), 49 | array("&", "<", ">", """, "'", "-"), 50 | $str); 51 | 52 | // Decode the temp markers back to entities 53 | $str = preg_replace("/$temp(\d+);/","&#\\1;",$str); 54 | $str = preg_replace("/$temp(\w+);/","&\\1;", $str); 55 | 56 | return $str; 57 | } 58 | } 59 | 60 | 61 | /* End of file xml_helper.php */ 62 | /* Location: ./system/helpers/xml_helper.php */ -------------------------------------------------------------------------------- /demonstration/system/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/language/english/calendar_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/language/english/instagram_api_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/libraries/Benchmark.php: -------------------------------------------------------------------------------- 1 | marker[$name] = microtime(); 49 | } 50 | 51 | // -------------------------------------------------------------------- 52 | 53 | /** 54 | * Calculates the time difference between two marked points. 55 | * 56 | * If the first parameter is empty this function instead returns the 57 | * {elapsed_time} pseudo-variable. This permits the full system 58 | * execution time to be shown in a template. The output class will 59 | * swap the real value for this variable. 60 | * 61 | * @access public 62 | * @param string a particular marked point 63 | * @param string a particular marked point 64 | * @param integer the number of decimal places 65 | * @return mixed 66 | */ 67 | function elapsed_time($point1 = '', $point2 = '', $decimals = 4) 68 | { 69 | if ($point1 == '') 70 | { 71 | return '{elapsed_time}'; 72 | } 73 | 74 | if ( ! isset($this->marker[$point1])) 75 | { 76 | return ''; 77 | } 78 | 79 | if ( ! isset($this->marker[$point2])) 80 | { 81 | $this->marker[$point2] = microtime(); 82 | } 83 | 84 | list($sm, $ss) = explode(' ', $this->marker[$point1]); 85 | list($em, $es) = explode(' ', $this->marker[$point2]); 86 | 87 | return number_format(($em + $es) - ($sm + $ss), $decimals); 88 | } 89 | 90 | // -------------------------------------------------------------------- 91 | 92 | /** 93 | * Memory Usage 94 | * 95 | * This function returns the {memory_usage} pseudo-variable. 96 | * This permits it to be put it anywhere in a template 97 | * without the memory being calculated until the end. 98 | * The output class will swap the real value for this variable. 99 | * 100 | * @access public 101 | * @return string 102 | */ 103 | function memory_usage() 104 | { 105 | return '{memory_usage}'; 106 | } 107 | 108 | } 109 | 110 | // END CI_Benchmark class 111 | 112 | /* End of file Benchmark.php */ 113 | /* Location: ./system/libraries/Benchmark.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Controller.php: -------------------------------------------------------------------------------- 1 | _ci_initialize(); 44 | log_message('debug', "Controller Class Initialized"); 45 | } 46 | 47 | // -------------------------------------------------------------------- 48 | 49 | /** 50 | * Initialize 51 | * 52 | * Assigns all the bases classes loaded by the front controller to 53 | * variables in this class. Also calls the autoload routine. 54 | * 55 | * @access private 56 | * @return void 57 | */ 58 | function _ci_initialize() 59 | { 60 | // Assign all the class objects that were instantiated by the 61 | // front controller to local class variables so that CI can be 62 | // run as one big super object. 63 | $classes = array( 64 | 'config' => 'Config', 65 | 'input' => 'Input', 66 | 'benchmark' => 'Benchmark', 67 | 'uri' => 'URI', 68 | 'output' => 'Output', 69 | 'lang' => 'Language', 70 | 'router' => 'Router' 71 | ); 72 | 73 | foreach ($classes as $var => $class) 74 | { 75 | $this->$var =& load_class($class); 76 | } 77 | 78 | // In PHP 5 the Loader class is run as a discreet 79 | // class. In PHP 4 it extends the Controller 80 | if (floor(phpversion()) >= 5) 81 | { 82 | $this->load =& load_class('Loader'); 83 | $this->load->_ci_autoloader(); 84 | } 85 | else 86 | { 87 | $this->_ci_autoloader(); 88 | 89 | // sync up the objects since PHP4 was working from a copy 90 | foreach (array_keys(get_object_vars($this)) as $attribute) 91 | { 92 | if (is_object($this->$attribute)) 93 | { 94 | $this->load->$attribute =& $this->$attribute; 95 | } 96 | } 97 | } 98 | } 99 | 100 | // -------------------------------------------------------------------- 101 | 102 | /** 103 | * Run Scaffolding 104 | * 105 | * @access private 106 | * @return void 107 | */ 108 | function _ci_scaffolding() 109 | { 110 | if ($this->_ci_scaffolding === FALSE OR $this->_ci_scaff_table === FALSE) 111 | { 112 | show_404('Scaffolding unavailable'); 113 | } 114 | 115 | $method = ( ! in_array($this->uri->segment(3), array('add', 'insert', 'edit', 'update', 'view', 'delete', 'do_delete'), TRUE)) ? 'view' : $this->uri->segment(3); 116 | 117 | require_once(BASEPATH.'scaffolding/Scaffolding'.EXT); 118 | $scaff = new Scaffolding($this->_ci_scaff_table); 119 | $scaff->$method(); 120 | } 121 | 122 | 123 | } 124 | // END _Controller class 125 | 126 | /* End of file Controller.php */ 127 | /* Location: ./system/libraries/Controller.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Exceptions.php: -------------------------------------------------------------------------------- 1 | 'Error', 37 | E_WARNING => 'Warning', 38 | E_PARSE => 'Parsing Error', 39 | E_NOTICE => 'Notice', 40 | E_CORE_ERROR => 'Core Error', 41 | E_CORE_WARNING => 'Core Warning', 42 | E_COMPILE_ERROR => 'Compile Error', 43 | E_COMPILE_WARNING => 'Compile Warning', 44 | E_USER_ERROR => 'User Error', 45 | E_USER_WARNING => 'User Warning', 46 | E_USER_NOTICE => 'User Notice', 47 | E_STRICT => 'Runtime Notice' 48 | ); 49 | 50 | 51 | /** 52 | * Constructor 53 | * 54 | */ 55 | function CI_Exceptions() 56 | { 57 | $this->ob_level = ob_get_level(); 58 | // Note: Do not log messages from this constructor. 59 | } 60 | 61 | // -------------------------------------------------------------------- 62 | 63 | /** 64 | * Exception Logger 65 | * 66 | * This function logs PHP generated error messages 67 | * 68 | * @access private 69 | * @param string the error severity 70 | * @param string the error string 71 | * @param string the error filepath 72 | * @param string the error line number 73 | * @return string 74 | */ 75 | function log_exception($severity, $message, $filepath, $line) 76 | { 77 | $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; 78 | 79 | log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE); 80 | } 81 | 82 | // -------------------------------------------------------------------- 83 | 84 | /** 85 | * 404 Page Not Found Handler 86 | * 87 | * @access private 88 | * @param string 89 | * @return string 90 | */ 91 | function show_404($page = '') 92 | { 93 | $heading = "404 Page Not Found"; 94 | $message = "The page you requested was not found."; 95 | 96 | log_message('error', '404 Page Not Found --> '.$page); 97 | echo $this->show_error($heading, $message, 'error_404', 404); 98 | exit; 99 | } 100 | 101 | // -------------------------------------------------------------------- 102 | 103 | /** 104 | * General Error Page 105 | * 106 | * This function takes an error message as input 107 | * (either as a string or an array) and displays 108 | * it using the specified template. 109 | * 110 | * @access private 111 | * @param string the heading 112 | * @param string the message 113 | * @param string the template name 114 | * @return string 115 | */ 116 | function show_error($heading, $message, $template = 'error_general', $status_code = 500) 117 | { 118 | set_status_header($status_code); 119 | 120 | $message = '

'.implode('

', ( ! is_array($message)) ? array($message) : $message).'

'; 121 | 122 | if (ob_get_level() > $this->ob_level + 1) 123 | { 124 | ob_end_flush(); 125 | } 126 | ob_start(); 127 | include(APPPATH.'errors/'.$template.EXT); 128 | $buffer = ob_get_contents(); 129 | ob_end_clean(); 130 | return $buffer; 131 | } 132 | 133 | // -------------------------------------------------------------------- 134 | 135 | /** 136 | * Native PHP error handler 137 | * 138 | * @access private 139 | * @param string the error severity 140 | * @param string the error string 141 | * @param string the error filepath 142 | * @param string the error line number 143 | * @return string 144 | */ 145 | function show_php_error($severity, $message, $filepath, $line) 146 | { 147 | $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; 148 | 149 | $filepath = str_replace("\\", "/", $filepath); 150 | 151 | // For safety reasons we do not show the full file path 152 | if (FALSE !== strpos($filepath, '/')) 153 | { 154 | $x = explode('/', $filepath); 155 | $filepath = $x[count($x)-2].'/'.end($x); 156 | } 157 | 158 | if (ob_get_level() > $this->ob_level + 1) 159 | { 160 | ob_end_flush(); 161 | } 162 | ob_start(); 163 | include(APPPATH.'errors/error_php'.EXT); 164 | $buffer = ob_get_contents(); 165 | ob_end_clean(); 166 | echo $buffer; 167 | } 168 | 169 | 170 | } 171 | // END Exceptions Class 172 | 173 | /* End of file Exceptions.php */ 174 | /* Location: ./system/libraries/Exceptions.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Language.php: -------------------------------------------------------------------------------- 1 | is_loaded, TRUE)) 57 | { 58 | return; 59 | } 60 | 61 | if ($idiom == '') 62 | { 63 | $CI =& get_instance(); 64 | $deft_lang = $CI->config->item('language'); 65 | $idiom = ($deft_lang == '') ? 'english' : $deft_lang; 66 | } 67 | 68 | // Determine where the language file is and load it 69 | if (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile)) 70 | { 71 | include(APPPATH.'language/'.$idiom.'/'.$langfile); 72 | } 73 | else 74 | { 75 | if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile)) 76 | { 77 | include(BASEPATH.'language/'.$idiom.'/'.$langfile); 78 | } 79 | else 80 | { 81 | show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile); 82 | } 83 | } 84 | 85 | if ( ! isset($lang)) 86 | { 87 | log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile); 88 | return; 89 | } 90 | 91 | if ($return == TRUE) 92 | { 93 | return $lang; 94 | } 95 | 96 | $this->is_loaded[] = $langfile; 97 | $this->language = array_merge($this->language, $lang); 98 | unset($lang); 99 | 100 | log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile); 101 | return TRUE; 102 | } 103 | 104 | // -------------------------------------------------------------------- 105 | 106 | /** 107 | * Fetch a single line of text from the language array 108 | * 109 | * @access public 110 | * @param string $line the language line 111 | * @return string 112 | */ 113 | function line($line = '') 114 | { 115 | $line = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; 116 | return $line; 117 | } 118 | 119 | } 120 | // END Language Class 121 | 122 | /* End of file Language.php */ 123 | /* Location: ./system/libraries/Language.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Log.php: -------------------------------------------------------------------------------- 1 | '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4'); 34 | 35 | /** 36 | * Constructor 37 | * 38 | * @access public 39 | */ 40 | function CI_Log() 41 | { 42 | $config =& get_config(); 43 | 44 | $this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/'; 45 | 46 | if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path)) 47 | { 48 | $this->_enabled = FALSE; 49 | } 50 | 51 | if (is_numeric($config['log_threshold'])) 52 | { 53 | $this->_threshold = $config['log_threshold']; 54 | } 55 | 56 | if ($config['log_date_format'] != '') 57 | { 58 | $this->_date_fmt = $config['log_date_format']; 59 | } 60 | } 61 | 62 | // -------------------------------------------------------------------- 63 | 64 | /** 65 | * Write Log File 66 | * 67 | * Generally this function will be called using the global log_message() function 68 | * 69 | * @access public 70 | * @param string the error level 71 | * @param string the error message 72 | * @param bool whether the error is a native PHP error 73 | * @return bool 74 | */ 75 | function write_log($level = 'error', $msg, $php_error = FALSE) 76 | { 77 | if ($this->_enabled === FALSE) 78 | { 79 | return FALSE; 80 | } 81 | 82 | $level = strtoupper($level); 83 | 84 | if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold)) 85 | { 86 | return FALSE; 87 | } 88 | 89 | $filepath = $this->log_path.'log-'.date('Y-m-d').EXT; 90 | $message = ''; 91 | 92 | if ( ! file_exists($filepath)) 93 | { 94 | $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n"; 95 | } 96 | 97 | if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE)) 98 | { 99 | return FALSE; 100 | } 101 | 102 | $message .= $level.' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n"; 103 | 104 | flock($fp, LOCK_EX); 105 | fwrite($fp, $message); 106 | flock($fp, LOCK_UN); 107 | fclose($fp); 108 | 109 | @chmod($filepath, FILE_WRITE_MODE); 110 | return TRUE; 111 | } 112 | 113 | } 114 | // END Log Class 115 | 116 | /* End of file Log.php */ 117 | /* Location: ./system/libraries/Log.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Model.php: -------------------------------------------------------------------------------- 1 | _assign_libraries( (method_exists($this, '__get') OR method_exists($this, '__set')) ? FALSE : TRUE ); 40 | 41 | // We don't want to assign the model object to itself when using the 42 | // assign_libraries function below so we'll grab the name of the model parent 43 | $this->_parent_name = ucfirst(get_class($this)); 44 | 45 | log_message('debug', "Model Class Initialized"); 46 | } 47 | 48 | /** 49 | * Assign Libraries 50 | * 51 | * Creates local references to all currently instantiated objects 52 | * so that any syntax that can be legally used in a controller 53 | * can be used within models. 54 | * 55 | * @access private 56 | */ 57 | function _assign_libraries($use_reference = TRUE) 58 | { 59 | $CI =& get_instance(); 60 | foreach (array_keys(get_object_vars($CI)) as $key) 61 | { 62 | if ( ! isset($this->$key) AND $key != $this->_parent_name) 63 | { 64 | // In some cases using references can cause 65 | // problems so we'll conditionally use them 66 | if ($use_reference == TRUE) 67 | { 68 | $this->$key = NULL; // Needed to prevent reference errors with some configurations 69 | $this->$key =& $CI->$key; 70 | } 71 | else 72 | { 73 | $this->$key = $CI->$key; 74 | } 75 | } 76 | } 77 | } 78 | 79 | } 80 | // END Model Class 81 | 82 | /* End of file Model.php */ 83 | /* Location: ./system/libraries/Model.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/Parser.php: -------------------------------------------------------------------------------- 1 | load->view($template, $data, TRUE); 49 | 50 | if ($template == '') 51 | { 52 | return FALSE; 53 | } 54 | 55 | foreach ($data as $key => $val) 56 | { 57 | if (is_array($val)) 58 | { 59 | $template = $this->_parse_pair($key, $val, $template); 60 | } 61 | else 62 | { 63 | $template = $this->_parse_single($key, (string)$val, $template); 64 | } 65 | } 66 | 67 | if ($return == FALSE) 68 | { 69 | $CI->output->append_output($template); 70 | } 71 | 72 | return $template; 73 | } 74 | 75 | // -------------------------------------------------------------------- 76 | 77 | /** 78 | * Set the left/right variable delimiters 79 | * 80 | * @access public 81 | * @param string 82 | * @param string 83 | * @return void 84 | */ 85 | function set_delimiters($l = '{', $r = '}') 86 | { 87 | $this->l_delim = $l; 88 | $this->r_delim = $r; 89 | } 90 | 91 | // -------------------------------------------------------------------- 92 | 93 | /** 94 | * Parse a single key/value 95 | * 96 | * @access private 97 | * @param string 98 | * @param string 99 | * @param string 100 | * @return string 101 | */ 102 | function _parse_single($key, $val, $string) 103 | { 104 | return str_replace($this->l_delim.$key.$this->r_delim, $val, $string); 105 | } 106 | 107 | // -------------------------------------------------------------------- 108 | 109 | /** 110 | * Parse a tag pair 111 | * 112 | * Parses tag pairs: {some_tag} string... {/some_tag} 113 | * 114 | * @access private 115 | * @param string 116 | * @param array 117 | * @param string 118 | * @return string 119 | */ 120 | function _parse_pair($variable, $data, $string) 121 | { 122 | if (FALSE === ($match = $this->_match_pair($string, $variable))) 123 | { 124 | return $string; 125 | } 126 | 127 | $str = ''; 128 | foreach ($data as $row) 129 | { 130 | $temp = $match['1']; 131 | foreach ($row as $key => $val) 132 | { 133 | if ( ! is_array($val)) 134 | { 135 | $temp = $this->_parse_single($key, $val, $temp); 136 | } 137 | else 138 | { 139 | $temp = $this->_parse_pair($key, $val, $temp); 140 | } 141 | } 142 | 143 | $str .= $temp; 144 | } 145 | 146 | return str_replace($match['0'], $str, $string); 147 | } 148 | 149 | // -------------------------------------------------------------------- 150 | 151 | /** 152 | * Matches a variable pair 153 | * 154 | * @access private 155 | * @param string 156 | * @param string 157 | * @return mixed 158 | */ 159 | function _match_pair($string, $variable) 160 | { 161 | if ( ! preg_match("|".$this->l_delim . $variable . $this->r_delim."(.+?)".$this->l_delim . '/' . $variable . $this->r_delim."|s", $string, $match)) 162 | { 163 | return FALSE; 164 | } 165 | 166 | return $match; 167 | } 168 | 169 | } 170 | // END Parser Class 171 | 172 | /* End of file Parser.php */ 173 | /* Location: ./system/libraries/Parser.php */ -------------------------------------------------------------------------------- /demonstration/system/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/plugins/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/system/scaffolding/images/background.jpg -------------------------------------------------------------------------------- /demonstration/system/scaffolding/images/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianckc/CodeIgniter-Instagram-Library/09df7c6239bf047a89153bcda82b2aad08c429d2/demonstration/system/scaffolding/images/logo.jpg -------------------------------------------------------------------------------- /demonstration/system/scaffolding/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/add.php: -------------------------------------------------------------------------------- 1 | load->view('header'); ?> 2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | primary_key == 1) continue; ?> 12 | 13 | 14 | 15 | 16 | type == 'blob'): ?> 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
name; echo ' '.$field->default; ?>
25 | 26 | 27 | 28 | 29 | 30 | load->view('footer'); 31 | /* End of file add.php */ 32 | /* Location: ./system/scaffolding/views/add.php */ 33 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/delete.php: -------------------------------------------------------------------------------- 1 | load->view('header'); ?> 2 | 3 |

4 | 5 |

  |   6 | 7 | load->view('footer'); 8 | /* End of file delete.php */ 9 | /* Location: ./system/scaffolding/views/delete.php */ 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/edit.php: -------------------------------------------------------------------------------- 1 | load->view('header'); ?> 2 | 3 | 4 |

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | primary_key == 1) continue; ?> 13 | 14 | 15 | 16 | 17 | type == 'blob'): ?> 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
name; ?>
26 | 27 | 28 | 29 | 30 | 31 | load->view('footer'); 32 | /* End of file edit.php */ 33 | /* Location: ./system/scaffolding/views/edit.php */ -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <?php echo $title; ?> 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/no_data.php: -------------------------------------------------------------------------------- 1 | load->view('header'); ?> 2 | 3 |

4 |

5 | 6 | load->view('footer'); 7 | /* End of file no_data.php */ 8 | /* Location: ./system/scaffolding/views/no_data.php */ -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/stylesheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: Lucida Grande, Verdana, Geneva, Sans-serif; 5 | font-size: 11px; 6 | color: #4F5155; 7 | background: #fff url(background.jpg) repeat-x left top; 8 | } 9 | 10 | a { 11 | color: #8B0D00; 12 | background-color: transparent; 13 | text-decoration: none; 14 | font-weight: bold; 15 | } 16 | 17 | a:visited { 18 | color: #8B0D00; 19 | background-color: transparent; 20 | text-decoration: none; 21 | } 22 | 23 | a:hover { 24 | color: #000; 25 | text-decoration: none; 26 | background-color: transparent; 27 | } 28 | 29 | 30 | #header { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | 35 | #header_left { 36 | background-color: transparent; 37 | float: left; 38 | padding: 21px 0 0 32px; 39 | margin: 0 40 | } 41 | 42 | #header_right { 43 | background-color: transparent; 44 | float: right; 45 | text-align: right; 46 | padding: 35px 50px 20px 0; 47 | margin: 0 48 | } 49 | 50 | #footer { 51 | margin: 20px 0 15px 0; 52 | padding: 0; 53 | } 54 | 55 | #footer p { 56 | font-size: 10px; 57 | color: #999; 58 | text-align: center; 59 | } 60 | 61 | #outer { 62 | margin: 30px 40px 0 40px; 63 | } 64 | 65 | img { 66 | padding:0; 67 | border: 0; 68 | margin: 0; 69 | } 70 | 71 | .nopad { 72 | padding:0; 73 | border: 0; 74 | margin: 0; 75 | } 76 | 77 | table { 78 | background-color: #efefef; 79 | } 80 | 81 | th { 82 | background-color: #eee; 83 | font-weight: bold; 84 | padding: 6px; 85 | text-align: left; 86 | } 87 | 88 | td { 89 | background-color: #fff; 90 | padding: 6px; 91 | } 92 | 93 | 94 | form { 95 | margin: 0; 96 | padding: 0; 97 | } 98 | 99 | .input { 100 | font-family: Lucida Grande, Verdana, Geneva, Sans-serif; 101 | font-size: 11px; 102 | width: 600px; 103 | color: #333; 104 | border: 1px solid #B3B4BD; 105 | font-size: 11px; 106 | height: 2em; 107 | padding: 0; 108 | margin: 0; 109 | } 110 | 111 | .textarea { 112 | font-family: Lucida Grande, Verdana, Geneva, Sans-serif; 113 | font-size: 12px; 114 | width: 600px; 115 | color: #333; 116 | border: 1px solid #B3B4BD; 117 | padding: 0; 118 | margin: 0; 119 | } 120 | 121 | .select { 122 | background-color: #fff; 123 | font-size: 11px; 124 | font-weight: normal; 125 | color: #333; 126 | padding: 0; 127 | margin: 0 0 3px 0; 128 | } 129 | 130 | .checkbox { 131 | background-color: transparent; 132 | padding: 0; 133 | border: 0; 134 | } 135 | 136 | .submit { 137 | background-color: #8B0D00; 138 | color: #FFF; 139 | font-weight: normal; 140 | border: 1px solid #000; 141 | margin: 6px 0 0 0; 142 | padding: 1px 5px 1px 5px; 143 | } 144 | -------------------------------------------------------------------------------- /demonstration/system/scaffolding/views/view.php: -------------------------------------------------------------------------------- 1 | load->view('header'); ?> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | result() as $row): ?> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
EditDelete
 $primary), $scaff_edit); ?> $primary), $scaff_delete); ?>$field);?>
22 | 23 | 24 | 25 | load->view('footer'); 26 | /* End of file view.php */ 27 | /* Location: ./system/scaffolding/views/view.php */ --------------------------------------------------------------------------------