├── .gitignore ├── .htaccess ├── .travis.yml ├── Dockerfile ├── README.md ├── application ├── .htaccess ├── cache │ ├── .htaccess │ └── index.html ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── dx_auth.php │ ├── foreign_chars.php │ ├── hooks.php │ ├── hybridauthlib.php │ ├── index.html │ ├── mimes.php │ ├── pagination.php │ ├── pd_admin.php │ ├── pd_forms.php │ ├── pd_seo.php │ ├── pd_user.php │ ├── profiler.php │ ├── routes.php │ ├── smileys.php │ └── user_agents.php ├── controllers │ ├── hauth.php │ ├── home.php │ └── index.html ├── core │ ├── Admin_Controller.php │ ├── MY_Controller.php │ ├── MY_Loader.php │ ├── MY_Router.php │ ├── My_DModel.php │ ├── User_Controller.php │ └── index.html ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html ├── helpers │ ├── MY_url_helper.php │ ├── index.html │ └── recaptcha_helper.php ├── hooks │ └── index.html ├── index.html ├── language │ └── english │ │ ├── dx_auth_lang.php │ │ ├── index.html │ │ └── message_lang.php ├── libraries │ ├── DX_Auth.php │ ├── DX_Auth_Event.php │ ├── HybridAuthLib.php │ ├── MY_Composer.php │ ├── MY_Form_validation.php │ ├── app │ │ ├── Formvalidator.php │ │ ├── mapper.php │ │ ├── paginationlib.php │ │ └── userlib.php │ ├── doctrine.php │ ├── index.html │ └── mysmarty.php ├── logs │ ├── hybridauth.log │ └── index.html ├── migrations │ └── 001_Create_accounts.php ├── models │ ├── Entities │ │ ├── CiSessions.php │ │ ├── DxLoginAttempts.php │ │ ├── DxPermissions.php │ │ ├── DxRoles.php │ │ ├── DxUserAutologin.php │ │ ├── DxUserProfile.php │ │ ├── DxUserTemp.php │ │ ├── DxUsers.php │ │ └── PdMessage.php │ ├── index.html │ ├── messagemodel.php │ ├── proxies │ │ └── __CG__DxRoles.php │ └── usermodel.php ├── modules │ ├── admin │ │ └── controllers │ │ │ ├── home.php │ │ │ ├── message.php │ │ │ └── users.php │ ├── api │ │ └── controllers │ │ │ └── member.php │ ├── dx_auth │ │ ├── controllers │ │ │ ├── auth.php │ │ │ ├── backend.php │ │ │ └── index.html │ │ ├── models │ │ │ ├── index.html │ │ │ ├── login_attempts.php │ │ │ ├── permissions.php │ │ │ ├── roles.php │ │ │ ├── user_autologin.php │ │ │ ├── user_profile.php │ │ │ ├── user_temp.php │ │ │ └── usersmodel.php │ │ └── views │ │ │ ├── auth │ │ │ ├── cancel_account_form.php │ │ │ ├── change_password_form.php │ │ │ ├── forgot_password_form.php │ │ │ ├── general_message.php │ │ │ ├── login_form.php │ │ │ ├── register_form.php │ │ │ └── register_recaptcha_form.php │ │ │ └── backend │ │ │ ├── custom_permissions.php │ │ │ ├── roles.php │ │ │ ├── unactivated_users.php │ │ │ ├── uri_permissions.php │ │ │ └── users.php │ └── myaccount │ │ └── controllers │ │ ├── logout.php │ │ └── user.php ├── third_party │ ├── MX │ │ ├── Base.php │ │ ├── Ci.php │ │ ├── Config.php │ │ ├── Controller.php │ │ ├── Lang.php │ │ ├── Loader.php │ │ ├── Modules.php │ │ └── Router.php │ └── index.html └── views │ ├── admin │ ├── common │ │ ├── footer.tpl │ │ ├── header.tpl │ │ ├── inc_meta.tpl │ │ ├── inc_scripts.tpl │ │ ├── inc_styles.tpl │ │ ├── includes.tpl │ │ └── status.tpl │ └── modules │ │ ├── home │ │ └── index.tpl │ │ ├── message │ │ ├── add.tpl │ │ ├── details.tpl │ │ ├── edit.tpl │ │ └── index.tpl │ │ └── users │ │ └── index.tpl │ ├── common │ ├── footer.tpl │ ├── header.tpl │ ├── inc_meta.tpl │ ├── inc_scripts.tpl │ ├── inc_styles.tpl │ └── status.tpl │ ├── index.html │ ├── index.tpl │ ├── member │ ├── common │ │ ├── footer.tpl │ │ ├── header.tpl │ │ ├── inc_meta.tpl │ │ ├── inc_scripts.tpl │ │ ├── inc_styles.tpl │ │ └── status.tpl │ └── modules │ │ └── user │ │ └── index.tpl │ └── modules │ ├── auth │ ├── forgot_password.tpl │ ├── hauth.tpl │ ├── login.tpl │ └── register.tpl │ └── home │ ├── contact.tpl │ ├── error.tpl │ └── index.tpl ├── bower.json ├── cli-config.php ├── composer.json ├── composer.lock ├── docker-files ├── .htaccess ├── create_mysql_admin_user.sh ├── database.php ├── makefile └── run.sh ├── fig.yml ├── images ├── desktop_mobile.png ├── favicon.ico ├── logo.png ├── sign_in_fb.png ├── sign_in_tw.png ├── sign_up_fb.png ├── sign_up_tw.png └── view-demo.jpg ├── index.php ├── license.txt ├── nbproject ├── project.properties └── project.xml ├── phpunit.xml ├── scripts ├── index.js ├── libraries │ ├── javascriptmvc │ │ └── steal.production.js │ └── jquery │ │ └── plugins │ │ └── jquery.form.js └── modules │ ├── auth │ ├── hauth.js │ └── register.js │ └── home │ ├── contact.js │ └── index.js ├── styles ├── main │ ├── images │ │ └── msg_arrow.gif │ ├── layout.css │ └── styles.css └── modules │ └── home │ └── index.css ├── system ├── .htaccess ├── core │ ├── Benchmark.php │ ├── CodeIgniter.php │ ├── Common.php │ ├── Config.php │ ├── Controller.php │ ├── Exceptions.php │ ├── Hooks.php │ ├── Input.php │ ├── Lang.php │ ├── Loader.php │ ├── Model.php │ ├── Output.php │ ├── Router.php │ ├── Security.php │ ├── URI.php │ ├── Utf8.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 │ │ ├── cubrid │ │ │ ├── cubrid_driver.php │ │ │ ├── cubrid_forge.php │ │ │ ├── cubrid_result.php │ │ │ ├── cubrid_utility.php │ │ │ └── index.html │ │ ├── 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 │ │ ├── pdo │ │ │ ├── index.html │ │ │ ├── pdo_driver.php │ │ │ ├── pdo_forge.php │ │ │ ├── pdo_result.php │ │ │ └── pdo_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 │ │ └── sqlsrv │ │ │ ├── index.html │ │ │ ├── sqlsrv_driver.php │ │ │ ├── sqlsrv_forge.php │ │ │ ├── sqlsrv_result.php │ │ │ └── sqlsrv_utility.php │ └── index.html ├── fonts │ ├── index.html │ └── texb.ttf ├── helpers │ ├── array_helper.php │ ├── captcha_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 │ │ ├── migration_lang.php │ │ ├── number_lang.php │ │ ├── profiler_lang.php │ │ ├── unit_test_lang.php │ │ └── upload_lang.php │ └── index.html └── libraries │ ├── Cache │ ├── Cache.php │ ├── drivers │ │ ├── Cache_apc.php │ │ ├── Cache_dummy.php │ │ ├── Cache_file.php │ │ ├── Cache_memcached.php │ │ └── index.html │ └── index.html │ ├── Calendar.php │ ├── Cart.php │ ├── Driver.php │ ├── Email.php │ ├── Encrypt.php │ ├── Form_validation.php │ ├── Ftp.php │ ├── Image_lib.php │ ├── Javascript.php │ ├── Log.php │ ├── Migration.php │ ├── Pagination.php │ ├── Parser.php │ ├── Profiler.php │ ├── Session.php │ ├── Sha1.php │ ├── Table.php │ ├── Trackback.php │ ├── Typography.php │ ├── Unit_test.php │ ├── Upload.php │ ├── User_agent.php │ ├── Xmlrpc.php │ ├── Xmlrpcs.php │ ├── Zip.php │ ├── index.html │ └── javascript │ ├── Jquery.php │ └── index.html └── tests └── Test.php /.gitignore: -------------------------------------------------------------------------------- 1 | /application/cache/ 2 | /application/logs/ 3 | /application/models/proxies/ 4 | /nbproject/ 5 | /vendor/ 6 | /bower_components/ 7 | /deploy.php 8 | /makefile -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteBase /codeigniterplus/ 4 | 5 | #Removes access to the system folder by users. 6 | #Additionally this will allow you to create a System.php controller, 7 | #previously this would not have been possible. 8 | #'system' can be replaced if you have renamed your system folder. 9 | RewriteCond %{REQUEST_URI} ^system.* 10 | RewriteRule ^(.*)$ /index.php?/$1 [L] 11 | 12 | #When your application folder isn't in the system folder 13 | #This snippet prevents user access to the application folder 14 | #Submitted by: Fabdrol 15 | #Rename 'application' to your applications folder name. 16 | RewriteCond %{REQUEST_URI} ^application.* 17 | RewriteRule ^(.*)$ /index.php?/$1 [L] 18 | 19 | #Checks to see if the user is attempting to access a valid file, 20 | #such as an image or css document, if this isn't true it sends the 21 | #request to index.php 22 | RewriteCond %{REQUEST_FILENAME} !-f 23 | RewriteCond %{REQUEST_FILENAME} !-d 24 | RewriteRule ^(.*)$ index.php?/$1 [L] 25 | 26 | 27 | 28 | # If we don't have mod_rewrite installed, all 404's 29 | # can be sent to index.php, and everything works as normal. 30 | # Submitted by: ElliotHaughin 31 | 32 | ErrorDocument 404 /index.php 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | ## YAML Template. 2 | --- 3 | language: php 4 | php: 5 | - 5.5 6 | 7 | before_script: 8 | - composer self-update 9 | - composer update 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tutum/lamp:latest 2 | 3 | RUN a2enmod rewrite 4 | 5 | #PHP dependencies 6 | RUN apt-get update && apt-get install -y build-essential curl php5-curl 7 | RUN curl -sS https://getcomposer.org/installer | php 8 | RUN mv composer.phar /usr/local/bin/composer 9 | 10 | #NodeJS dependencies 11 | RUN curl -sL https://deb.nodesource.com/setup | bash - 12 | RUN apt-get update && apt-get install -y nodejs 13 | RUN npm config set prefix /usr/local 14 | RUN npm install -g bower 15 | 16 | #App setup 17 | RUN rm -fr /app && git clone https://github.com/ranacseruet/codeigniterplus.git /app 18 | ADD docker-files/makefile /app/makefile 19 | RUN cd /app && make 20 | ADD docker-files/database.php /app/application/config/database.php 21 | ADD docker-files/run.sh /run.sh 22 | ADD docker-files/.htaccess /app/.htaccess 23 | ADD docker-files/create_mysql_admin_user.sh /create_mysql_admin_user.sh 24 | RUN chmod 755 /*.sh 25 | 26 | EXPOSE 80 3306 27 | CMD ["/run.sh"] 28 | -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /application/cache/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/constants.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 */ -------------------------------------------------------------------------------- /application/config/foreign_chars.php: -------------------------------------------------------------------------------- 1 | 'ae', 12 | '/ö|œ/' => 'oe', 13 | '/ü/' => 'ue', 14 | '/Ä/' => 'Ae', 15 | '/Ü/' => 'Ue', 16 | '/Ö/' => 'Oe', 17 | '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', 18 | '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', 19 | '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', 20 | '/ç|ć|ĉ|ċ|č/' => 'c', 21 | '/Ð|Ď|Đ/' => 'D', 22 | '/ð|ď|đ/' => 'd', 23 | '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E', 24 | '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e', 25 | '/Ĝ|Ğ|Ġ|Ģ/' => 'G', 26 | '/ĝ|ğ|ġ|ģ/' => 'g', 27 | '/Ĥ|Ħ/' => 'H', 28 | '/ĥ|ħ/' => 'h', 29 | '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I', 30 | '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i', 31 | '/Ĵ/' => 'J', 32 | '/ĵ/' => 'j', 33 | '/Ķ/' => 'K', 34 | '/ķ/' => 'k', 35 | '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L', 36 | '/ĺ|ļ|ľ|ŀ|ł/' => 'l', 37 | '/Ñ|Ń|Ņ|Ň/' => 'N', 38 | '/ñ|ń|ņ|ň|ʼn/' => 'n', 39 | '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O', 40 | '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o', 41 | '/Ŕ|Ŗ|Ř/' => 'R', 42 | '/ŕ|ŗ|ř/' => 'r', 43 | '/Ś|Ŝ|Ş|Š/' => 'S', 44 | '/ś|ŝ|ş|š|ſ/' => 's', 45 | '/Ţ|Ť|Ŧ/' => 'T', 46 | '/ţ|ť|ŧ/' => 't', 47 | '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U', 48 | '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u', 49 | '/Ý|Ÿ|Ŷ/' => 'Y', 50 | '/ý|ÿ|ŷ/' => 'y', 51 | '/Ŵ/' => 'W', 52 | '/ŵ/' => 'w', 53 | '/Ź|Ż|Ž/' => 'Z', 54 | '/ź|ż|ž/' => 'z', 55 | '/Æ|Ǽ/' => 'AE', 56 | '/ß/'=> 'ss', 57 | '/IJ/' => 'IJ', 58 | '/ij/' => 'ij', 59 | '/Œ/' => 'OE', 60 | '/ƒ/' => 'f' 61 | ); 62 | 63 | /* End of file foreign_chars.php */ 64 | /* Location: ./application/config/foreign_chars.php */ -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | '/dx_auth/auth/endpoint', 16 | 17 | "providers" => array ( 18 | // openid providers 19 | "OpenID" => array ( 20 | "enabled" => true 21 | ), 22 | 23 | "Yahoo" => array ( 24 | "enabled" => true, 25 | "keys" => array ( "id" => "", "secret" => "" ), 26 | ), 27 | 28 | "AOL" => array ( 29 | "enabled" => true 30 | ), 31 | 32 | "Google" => array ( 33 | "enabled" => true, 34 | "keys" => array ( "id" => "", "secret" => "" ), 35 | ), 36 | 37 | "Facebook" => array ( 38 | "enabled" => true, 39 | "keys" => array ( "id" => "my_id", "secret" => "my_secret" ), 40 | ), 41 | 42 | "Twitter" => array ( 43 | "enabled" => true, 44 | "keys" => array ( "key" => "my_key", "secret" => "my_secret" ) 45 | ), 46 | 47 | // windows live 48 | "Live" => array ( 49 | "enabled" => true, 50 | "keys" => array ( "id" => "", "secret" => "" ) 51 | ), 52 | 53 | "MySpace" => array ( 54 | "enabled" => true, 55 | "keys" => array ( "key" => "", "secret" => "" ) 56 | ), 57 | 58 | "LinkedIn" => array ( 59 | "enabled" => true, 60 | "keys" => array ( "key" => "", "secret" => "" ) 61 | ), 62 | 63 | "Foursquare" => array ( 64 | "enabled" => true, 65 | "keys" => array ( "id" => "", "secret" => "" ) 66 | ), 67 | ), 68 | 69 | // if you want to enable logging, set 'debug_mode' to true then provide a writable file by the web server on "debug_file" 70 | "debug_mode" => (ENVIRONMENT == 'development'), 71 | 72 | "debug_file" => APPPATH.'/logs/hybridauth.log', 73 | ); 74 | 75 | 76 | /* End of file hybridauthlib.php */ 77 | /* Location: ./application/config/hybridauthlib.php */ -------------------------------------------------------------------------------- /application/config/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/pagination.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /application/config/pd_admin.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'field' => 'name', 6 | 'label' => 'Name', 7 | 'rules' => 'required' 8 | ), 9 | 'email' => array( 10 | 'field' => 'email', 11 | 'label' => 'Email', 12 | 'rules' => 'required|valid_email' 13 | ), 14 | 'subject' => array( 15 | 'field' => 'subject', 16 | 'label' => 'Subject', 17 | 'rules' => 'required' 18 | ), 19 | 'message' => array( 20 | 'field' => 'message', 21 | 'label' => 'Message', 22 | 'rules' => 'required' 23 | ) 24 | ); 25 | ?> -------------------------------------------------------------------------------- /application/config/pd_seo.php: -------------------------------------------------------------------------------- 1 | load->model("messagemodel"); 10 | $this->load->language("message"); 11 | } 12 | 13 | /** 14 | * Default function that will be executed unless another method secified 15 | * @return type View 16 | */ 17 | public function index() 18 | { 19 | return $this->view(); 20 | } 21 | 22 | /** 23 | * Is called when a 404 server error occurs 24 | * @return type View 25 | */ 26 | public function error() 27 | { 28 | return $this->view(); 29 | } 30 | 31 | /** 32 | * Controller For 'Contact Page' 33 | * @return type View 34 | */ 35 | public function contact() 36 | { 37 | try { 38 | $forms = $this->config->item("rules"); 39 | $this->data["contact_form"] = $forms["contact"]; 40 | 41 | if ($this->input->post('submit')) { 42 | 43 | $this->load->library("app/formvalidator"); 44 | $this->load->library("app/mapper"); 45 | 46 | if ($this->formvalidator->isValid("contact")) { 47 | 48 | $message = $this->mapper->formToMessage($this->input, $this->data["contact_form"], null); 49 | $this->messagemodel->save($message); 50 | 51 | $this->data["status"]->message = $this->lang->line("message_sent"); 52 | $this->data["status"]->success = TRUE; 53 | } else { 54 | $this->data["status"]->message = validation_errors(); 55 | $this->data["status"]->success = FALSE; 56 | } 57 | } 58 | 59 | return $this->view(); 60 | } catch (Exception $err) { 61 | log_message("error", $err->getMessage()); 62 | return show_error($err->getMessage()); 63 | } 64 | } 65 | 66 | /** 67 | * Secret function, to create/update database schema from doctrine entities 68 | * @param type $mode 69 | * @return type 70 | */ 71 | function db_schema($mode = "update") 72 | { 73 | try { 74 | $this->em = $this->doctrine->em; 75 | 76 | $tool = new \Doctrine\ORM\Tools\SchemaTool($this->em); 77 | 78 | $cmf = new \Doctrine\ORM\Tools\DisconnectedClassMetadataFactory(); 79 | $cmf->setEntityManager($this->em); 80 | $metadata = $cmf->getAllMetadata(); 81 | 82 | if ($mode == "create") { 83 | $queries = $tool->getCreateSchemaSql($metadata); 84 | } else { 85 | $queries = $tool->getUpdateSchemaSql($metadata); 86 | } 87 | echo "Total queries: " . count($queries) . "

"; 88 | for ($i = 0; $i < count($queries); $i++) { 89 | $this->db->query($queries[$i]); 90 | echo $queries[$i] . "

Execution Successfull: " . ($i + 1) . "

"; 91 | } 92 | } catch (Exception $err) { 93 | log_message("error", $err->getMessage()); 94 | return show_error($err->getMessage()); 95 | } 96 | } 97 | } -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/core/Admin_Controller.php: -------------------------------------------------------------------------------- 1 | init_admin(); 16 | 17 | $this->load->config("pd_admin"); 18 | 19 | $this->load->library('pagination'); 20 | $this->load->library('app/paginationlib'); 21 | 22 | $this->page->noindex = true; 23 | } 24 | 25 | /** 26 | * Initialization for logged in admin. 27 | * Redirect if logged in user is not an admin 28 | */ 29 | function init_admin() 30 | { 31 | $this->init_user("admin/"); 32 | if (!$this->dx_auth->is_admin()) { 33 | redirect(base_url() . "myaccount/logout"); 34 | exit; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /application/core/MY_Loader.php: -------------------------------------------------------------------------------- 1 | init_user("member/"); 19 | $this->init_profile(); 20 | 21 | $this->load->config("pd_user"); 22 | 23 | $this->page->noindex = true; 24 | } 25 | 26 | function init_profile() 27 | { 28 | //Redirect user to basic profile page if profile doesn't exist 29 | 30 | $this->user = $this->usermodel->get($this->dx_auth->get_user_id()); 31 | 32 | if (empty($this->user)) { 33 | //If user info no found 34 | return redirect(base_url() . "myaccount/logout"); 35 | } 36 | 37 | $this->profile = $this->user->getUserProfile(); 38 | 39 | //Info of currently logged in user is succefully retrieved 40 | $this->data["user"] = $this->user; 41 | $this->data["profile"] = $this->profile; 42 | } 43 | } -------------------------------------------------------------------------------- /application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/errors/error_404.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 404 Page Not Found 8 | 31 | 32 | 33 |
34 |

35 | 36 |
37 | 38 | -------------------------------------------------------------------------------- /application/errors/error_db.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Database Error 4 | 27 | 28 | 29 |
30 |

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

31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /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 |
-------------------------------------------------------------------------------- /application/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/language/english/message_lang.php: -------------------------------------------------------------------------------- 1 | load->helper('url_helper'); 10 | 11 | $config['base_url'] = site_url((config_item('index_page') == '' ? SELF : '') . $config['base_url']); 12 | 13 | parent::__construct($config); 14 | 15 | log_message('debug', 'HybridAuthLib Class Initalized'); 16 | } 17 | 18 | /** 19 | * @deprecated 20 | */ 21 | public static function serviceEnabled($service) 22 | { 23 | return self::providerEnabled($service); 24 | } 25 | 26 | public static function providerEnabled($provider) 27 | { 28 | return isset(parent::$config['providers'][$provider]) && parent::$config['providers'][$provider]['enabled']; 29 | } 30 | } -------------------------------------------------------------------------------- /application/libraries/MY_Composer.php: -------------------------------------------------------------------------------- 1 | ci = & get_instance(); 14 | } 15 | 16 | /** 17 | * Determin whether a submitted form is valid or not according to given rule on config file 18 | * @param String $form_name 19 | * @return boolean 20 | */ 21 | function isValid($form_name) 22 | { 23 | $this->ci->load->library('Form_validation'); 24 | $this->ci->load->helper('form'); 25 | $forms = $this->ci->config->item("rules"); 26 | $form = $forms[$form_name]; 27 | $this->ci->form_validation->set_rules($form); 28 | 29 | if ($this->ci->form_validation->run()) { 30 | return true; 31 | } else { 32 | return false; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /application/libraries/app/mapper.php: -------------------------------------------------------------------------------- 1 | ci = & get_instance(); 16 | } 17 | 18 | function formToMessage($input, $contact_form, $contact = NULL) 19 | { 20 | /** 21 | * @var PdContact $contact 22 | */ 23 | if (empty($contact)) { 24 | $contact = new PdMessage(); 25 | } 26 | 27 | $contact->setName($input->post($contact_form["name"]["field"])); 28 | $contact->setEmail($input->post($contact_form["email"]["field"])); 29 | $contact->setSubject($input->post($contact_form["subject"]["field"])); 30 | $contact->setMessage($input->post($contact_form["message"]["field"])); 31 | $contact->setTime(new DateTime()); 32 | return $contact; 33 | } 34 | } -------------------------------------------------------------------------------- /application/libraries/app/paginationlib.php: -------------------------------------------------------------------------------- 1 | ci = & get_instance(); 13 | } 14 | 15 | public function initPagination($base_url, $total_rows) 16 | { 17 | //*****adjust it to your application url settings********/ 18 | $config['per_page'] = 10; 19 | $config['uri_segment'] = 4; 20 | 21 | $config['base_url'] = base_url() . $base_url; 22 | $config['total_rows'] = $total_rows; 23 | $config['use_page_numbers'] = TRUE; 24 | 25 | $config['first_tag_open'] = $config['last_tag_open'] = $config['next_tag_open'] = $config['prev_tag_open'] = $config['num_tag_open'] = '
  • '; 26 | $config['first_tag_close'] = $config['last_tag_close'] = $config['next_tag_close'] = $config['prev_tag_close'] = $config['num_tag_close'] = '
  • '; 27 | 28 | $config['cur_tag_open'] = "
  • "; 29 | $config['cur_tag_close'] = "
  • "; 30 | 31 | $this->ci->pagination->initialize($config); 32 | return $config; 33 | } 34 | } -------------------------------------------------------------------------------- /application/libraries/app/userlib.php: -------------------------------------------------------------------------------- 1 | ci = & get_instance(); 14 | } 15 | 16 | /** 17 | * Mapp user submitted inputs to entity object of User's basic profile 18 | * @param type $form 19 | * @param type $user 20 | * @return type 21 | */ 22 | public function mappFormToUserProfile($user_profile_form, $input, $user_profile = NULL) 23 | { 24 | if (empty($user_profile)) { 25 | $user_profile = new DxUserProfile(); 26 | } 27 | $user_profile->setFirstName($input->post($user_profile_form["first_name"]["field"])); 28 | $user_profile->setLastName($input->post($user_profile_form["last_name"]["field"])); 29 | $user_profile->setAbout($input->post($user_profile_form["about"]["field"])); 30 | $user_profile->setAddress1($input->post($user_profile_form["address1"]["field"])); 31 | $user_profile->setAddress2($input->post($user_profile_form["address2"]["field"])); 32 | $user_profile->setZipCode($input->post($user_profile_form["zip_code"]["field"])); 33 | $user_profile->setWebsite($input->post($user_profile_form["website"]["field"])); 34 | $user_profile->setPhoneNumber($input->post($user_profile_form["phone"]["field"])); 35 | 36 | $city = $this->ci->citymodel->get_city_by_name($input->post($user_profile_form["city"]["field"])); 37 | 38 | if (empty($city)) { 39 | $country = $this->ci->countrymodel->get_by_code($input->post($user_profile_form["country"]["field"])); 40 | $city = new GdCities(); 41 | $city->setCountry($country); 42 | $city->setName($input->post($user_profile_form["city"]["field"])); 43 | $this->ci->citymodel->save($city); 44 | } 45 | $user_profile->setUser($this->ci->usermodel->get($input->post("user_id"))); 46 | $user_profile->setCityId($city->getId()); 47 | 48 | return $user_profile; 49 | } 50 | 51 | /** 52 | * Initialize the pagination rules for members page 53 | * @return Pagination 54 | */ 55 | public function initPagination($city, $start_record) 56 | { 57 | $config['per_page'] = 1; 58 | $config['uri_segment'] = 3; 59 | $config['base_url'] = base_url() . "/browse/members/" . $city; 60 | $config['total_rows'] = $this->ci->usermodel->get_count_by_city_id($city); 61 | $this->ci->pagination->initialize($config); 62 | return $config; 63 | } 64 | } -------------------------------------------------------------------------------- /application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/libraries/mysmarty.php: -------------------------------------------------------------------------------- 1 | template_dir = realpath(APPPATH . "/views/"); 28 | $this->config_dir = realpath(APPPATH . "/conf/"); 29 | $this->compile_dir = realpath(APPPATH . "/cache/"); 30 | //$this->clearAllCache(); 31 | $this->caching = 0; 32 | } 33 | 34 | /** 35 | * Replace the traditional codeigniter's view method 36 | * @param string $content Template to display 37 | * @return none 38 | */ 39 | function view($content) 40 | { 41 | $this->assign('page', $this->page); 42 | $this->assign('content', $this->prefix . "{$content}"); 43 | $this->display('index.tpl'); 44 | } 45 | } -------------------------------------------------------------------------------- /application/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/migrations/001_Create_accounts.php: -------------------------------------------------------------------------------- 1 | db->table_exists('accounts')) { 9 | // Setup Keys 10 | $this->dbforge->add_key('id', TRUE); 11 | 12 | $this->dbforge->add_field(array( 13 | 'id' => array('type' => 'INT', 'constraint' => 5, 'unsigned' => TRUE, 'auto_increment' => TRUE), 14 | 'company_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE), 15 | 'first_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE), 16 | 'last_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE), 17 | 'phone' => array('type' => 'TEXT', 'null' => FALSE), 18 | 'email' => array('type' => 'TEXT', 'null' => FALSE), 19 | 'address' => array('type' => 'TEXT', 'null' => FALSE), 20 | 'Last_Update' => array('type' => 'DATETIME', 'null' => FALSE) 21 | )); 22 | 23 | $this->dbforge->add_field("Created_At TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP"); 24 | $this->dbforge->create_table('accounts', TRUE); 25 | } 26 | } 27 | 28 | function down() 29 | { 30 | $this->dbforge->drop_table('accounts'); 31 | } 32 | } -------------------------------------------------------------------------------- /application/models/Entities/DxLoginAttempts.php: -------------------------------------------------------------------------------- 1 | id; 47 | } 48 | 49 | /** 50 | * Set ipAddress 51 | * 52 | * @param string $ipAddress 53 | * @return DxLoginAttempts 54 | */ 55 | public function setIpAddress($ipAddress) 56 | { 57 | $this->ipAddress = $ipAddress; 58 | return $this; 59 | } 60 | 61 | /** 62 | * Get ipAddress 63 | * 64 | * @return string 65 | */ 66 | public function getIpAddress() 67 | { 68 | return $this->ipAddress; 69 | } 70 | 71 | /** 72 | * Set time 73 | * 74 | * @param datetime $time 75 | * @return DxLoginAttempts 76 | */ 77 | public function setTime($time) 78 | { 79 | $this->time = $time; 80 | return $this; 81 | } 82 | 83 | /** 84 | * Get time 85 | * 86 | * @return datetime 87 | */ 88 | public function getTime() 89 | { 90 | return $this->time; 91 | } 92 | } -------------------------------------------------------------------------------- /application/models/Entities/DxPermissions.php: -------------------------------------------------------------------------------- 1 | id; 47 | } 48 | 49 | /** 50 | * Set roleId 51 | * 52 | * @param integer $roleId 53 | * @return DxPermissions 54 | */ 55 | public function setRoleId($roleId) 56 | { 57 | $this->roleId = $roleId; 58 | return $this; 59 | } 60 | 61 | /** 62 | * Get roleId 63 | * 64 | * @return integer 65 | */ 66 | public function getRoleId() 67 | { 68 | return $this->roleId; 69 | } 70 | 71 | /** 72 | * Set data 73 | * 74 | * @param text $data 75 | * @return DxPermissions 76 | */ 77 | public function setData($data) 78 | { 79 | $this->data = $data; 80 | return $this; 81 | } 82 | 83 | /** 84 | * Get data 85 | * 86 | * @return text 87 | */ 88 | public function getData() 89 | { 90 | return $this->data; 91 | } 92 | } -------------------------------------------------------------------------------- /application/models/Entities/DxRoles.php: -------------------------------------------------------------------------------- 1 | id; 47 | } 48 | 49 | /** 50 | * Set parentId 51 | * 52 | * @param integer $parentId 53 | * @return DxRoles 54 | */ 55 | public function setParentId($parentId) 56 | { 57 | $this->parentId = $parentId; 58 | return $this; 59 | } 60 | 61 | /** 62 | * Get parentId 63 | * 64 | * @return integer 65 | */ 66 | public function getParentId() 67 | { 68 | return $this->parentId; 69 | } 70 | 71 | /** 72 | * Set name 73 | * 74 | * @param string $name 75 | * @return DxRoles 76 | */ 77 | public function setName($name) 78 | { 79 | $this->name = $name; 80 | return $this; 81 | } 82 | 83 | /** 84 | * Get name 85 | * 86 | * @return string 87 | */ 88 | public function getName() 89 | { 90 | return $this->name; 91 | } 92 | } -------------------------------------------------------------------------------- /application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/models/messagemodel.php: -------------------------------------------------------------------------------- 1 | init("PdMessage", $this->doctrine->em); 19 | } 20 | } -------------------------------------------------------------------------------- /application/models/usermodel.php: -------------------------------------------------------------------------------- 1 | init("DxUsers", $this->doctrine->em); 26 | } 27 | 28 | function hasProfile($id) 29 | { 30 | try { 31 | $user = $this->em->getReference($this->entity, $id); 32 | $criteria = array("user" => $user); 33 | $user = $this->em->getRepository($this->entity_profile)->findOneBy($criteria); 34 | return !empty($user); 35 | } catch (Exception $err) { 36 | log_message("error", $err->getMessage(), false); 37 | return FALSE; 38 | } 39 | } 40 | 41 | /** 42 | * @param int $id 43 | * @return DxUserProfile 44 | */ 45 | function get_profile($id) 46 | { 47 | try { 48 | $user = $this->em->getReference($this->entity, $id); 49 | $criteria = array("user" => $user); 50 | return $this->em->getRepository($this->entity_profile)->findOneBy($criteria); 51 | } catch (Exception $err) { 52 | log_message("error", $err->getMessage(), false); 53 | return NULL; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /application/modules/admin/controllers/home.php: -------------------------------------------------------------------------------- 1 | load->model("usermodel"); 13 | } 14 | 15 | /** 16 | * Default function that will be executed unless another method secified 17 | * @return type View 18 | */ 19 | public function index() 20 | { 21 | return $this->view(); 22 | } 23 | } -------------------------------------------------------------------------------- /application/modules/admin/controllers/users.php: -------------------------------------------------------------------------------- 1 | load->model("usermodel"); 13 | $this->load->library('pagination'); 14 | $this->load->library('app/paginationlib'); 15 | } 16 | 17 | /** 18 | * Show users list with pagination 19 | * @return type View 20 | */ 21 | public function index($start_record = 0) 22 | { 23 | try { 24 | $pagingConfig = $this->paginationlib->initPagination("/admin/users/index", $this->usermodel->get_count()); 25 | $this->data["pagination_helper"] = $this->pagination; 26 | 27 | $this->data["users"] = $this->usermodel->get_by_range($start_record, $pagingConfig['per_page']); 28 | 29 | return $this->view(); 30 | } catch (Exception $err) { 31 | log_message("error", $err->getMessage()); 32 | return show_error($err->getMessage()); 33 | } 34 | } 35 | 36 | /** 37 | * Delete a record and redirect to users list page 38 | * @return view 39 | */ 40 | public function delete() 41 | { 42 | try { 43 | if ($this->input->post("delete")) { 44 | $this->usermodel->delete($this->input->post("id")); 45 | } 46 | 47 | redirect(base_url() . "admin/users"); 48 | } catch (Exception $err) { 49 | log_message("error", $err->getMessage()); 50 | return show_error($err->getMessage()); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /application/modules/api/controllers/member.php: -------------------------------------------------------------------------------- 1 | load->model("usermodel"); 14 | } 15 | 16 | /** 17 | * Search database with username and returns json data about existing username 18 | * @return json message which is shown if username available or not 19 | */ 20 | function check_username_availability() 21 | { 22 | $username = $this->input->post('username'); 23 | $user = $this->usermodel->get_by_criteria(array("username" => $username)); 24 | 25 | if ($user && count($user) > 0) { 26 | echo json_encode("That name is already taken, please try another one"); 27 | } else { 28 | echo json_encode(TRUE); 29 | } 30 | } 31 | 32 | /** 33 | * Search database with username and returns json data about existing username 34 | * @return json message which is shown if username available or not 35 | */ 36 | function check_email_availability() 37 | { 38 | $email = $this->input->post('email'); 39 | $user = $this->usermodel->get_by_criteria(array("email" => $email)); 40 | 41 | if ($user && count($user) > 0) { 42 | echo json_encode("That email is already taken, please try another one"); 43 | } else { 44 | echo json_encode(TRUE); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /application/modules/dx_auth/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

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

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/modules/dx_auth/models/login_attempts.php: -------------------------------------------------------------------------------- 1 | init("DxLoginAttempts", $this->doctrine->em); 14 | } 15 | 16 | function check_attempts($ip_address) 17 | { 18 | $criteria = array('ipAddress' => $ip_address); 19 | return $this->em->getRepository($this->entity)->findBy($criteria); 20 | } 21 | 22 | // Increase attempts count 23 | function increase_attempt($ip_address) 24 | { 25 | $login_attemp = new DxLoginAttempts(); 26 | 27 | $login_attemp->setIpAddress($ip_address); 28 | $login_attemp->setTime(new DateTime()); 29 | 30 | $this->em->persist($login_attemp); 31 | $this->em->flush(); 32 | return TRUE; 33 | } 34 | 35 | function clear_attempts($ip_address) 36 | { 37 | $criteria = array('ipAddress' => $ip_address); 38 | $entity = $this->em->getRepository($this->entity)->findOneBy($criteria); 39 | 40 | if ($entity) { 41 | $this->em->remove($entity); 42 | $this->em->flush(); 43 | } 44 | 45 | return TRUE; 46 | } 47 | } -------------------------------------------------------------------------------- /application/modules/dx_auth/models/roles.php: -------------------------------------------------------------------------------- 1 | init("DxRoles", $this->doctrine->em); 10 | } 11 | 12 | function get_all() 13 | { 14 | $query = $this->em->getRepository($this->entity)->findAll(); 15 | return $query; 16 | } 17 | 18 | function get_role_by_id($role_id) 19 | { 20 | return $this->get($role_id); 21 | } 22 | 23 | function get_role_by_name($role_name) 24 | { 25 | return $this->em->getRepository($this->entity)->findOneBy(array("name" => $role_name)); 26 | } 27 | 28 | function create_role($name, $parent_id = 0) 29 | { 30 | $roles = New DxRoles; 31 | $roles->setName($name); 32 | $roles->setParentId($parent_id); 33 | $this->em->persist($roles); 34 | $this->em->flush(); 35 | 36 | return $roles->getId(); 37 | } 38 | 39 | function delete_role($role_id) 40 | { 41 | $entity = $this->em->getPartialReference($this->entity, $role_id); 42 | $this->em->remove($entity); 43 | $this->em->flush(); 44 | } 45 | } -------------------------------------------------------------------------------- /application/modules/dx_auth/models/user_autologin.php: -------------------------------------------------------------------------------- 1 | init("DxUserAutologin", $this->doctrine->em); 14 | } 15 | 16 | function store_key($key, $user_id) 17 | { 18 | $user = new DxUserAutologin(); 19 | 20 | $user->setKeyId(md5($key)); 21 | $dxuser = $this->users->get($user_id); 22 | $user->setUser($dxuser); 23 | $user->setUserAgent(substr($this->input->user_agent(), 0, 149)); 24 | $user->setLastIp($this->input->ip_address()); 25 | $user->setLastLogin(new DateTime()); 26 | $this->em->persist($user); 27 | $this->em->flush(); 28 | 29 | return TRUE; 30 | } 31 | 32 | function get_key($key, $user_id) 33 | { 34 | $user = $this->users->get($user_id); 35 | $data = array( 36 | 'keyId' => md5($key), 37 | 'user' => $user 38 | ); 39 | 40 | $autologin_user = $this->em->getRepository($this->entity)->findOneBy($data); 41 | if ($autologin_user) { 42 | return $autologin_user->getUser(); 43 | } else { 44 | return NULL; 45 | } 46 | } 47 | 48 | function delete_key($key, $user_id) 49 | { 50 | $user = $this->users->get($user_id); 51 | $data = array( 52 | 'keyId' => md5($key), 53 | 'user' => $user 54 | ); 55 | 56 | $entity = $this->em->getRepository($this->entity)->findOneBy($data); 57 | 58 | if ($entity) { 59 | $this->em->remove($entity); 60 | $this->em->flush(); 61 | } 62 | 63 | return TRUE; 64 | } 65 | 66 | function clear_keys($user_id) 67 | { 68 | $user = $this->users->get($user_id); 69 | $criteria = array('user' => $user); 70 | $entity = $this->em->getRepository($this->entity)->findOneBy($criteria); 71 | 72 | if ($entity) { 73 | $this->em->remove($entity); 74 | $this->em->flush(); 75 | } 76 | 77 | return TRUE; 78 | } 79 | 80 | function prune_keys($user_id) 81 | { 82 | $user = $this->users->get($user_id); 83 | $data = array( 84 | 'user' => $user, 85 | 'userAgent' => substr($this->input->user_agent(), 0, 149), 86 | 'lastIp' => $this->input->ip_address() 87 | ); 88 | 89 | $entity = $this->em->getRepository($this->entity)->findOneBy($data); 90 | 91 | if ($entity) { 92 | $this->em->remove($entity); 93 | $this->em->flush(); 94 | } 95 | 96 | return TRUE; 97 | } 98 | } -------------------------------------------------------------------------------- /application/modules/dx_auth/models/user_profile.php: -------------------------------------------------------------------------------- 1 | init("DxUserProfile", $this->doctrine->em); 14 | } 15 | 16 | function delete_profile($user_id) 17 | { 18 | $entity = $this->em->getPartialReference($this->entity, $user_id); 19 | $this->em->remove($entity); 20 | $this->em->flush(); 21 | 22 | return TRUE; 23 | } 24 | } 25 | 26 | /* .........From here no function called......May be in future it would used..................... */ 27 | /* 28 | function create_profile($user_id) 29 | { 30 | $this->db->set('user_id', $user_id); 31 | //$this->db->set('city_id', "1");//Rana: Default For test purpose 32 | return $this->db->insert($this->_table); 33 | } 34 | 35 | function get_profile_field($user_id, $fields) 36 | { 37 | $this->db->select($fields); 38 | $this->db->where('user_id', $user_id); 39 | return $this->db->get($this->_table); 40 | } 41 | 42 | function get_profile($user_id) 43 | { 44 | $this->db->where('user_id', $user_id); 45 | return $this->db->get($this->_table); 46 | } 47 | 48 | function set_profile($user_id, $data) 49 | { 50 | $this->db->where('user_id', $user_id); 51 | return $this->db->update($this->_table, $data); 52 | } 53 | */ -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/cancel_account_form.php: -------------------------------------------------------------------------------- 1 | 'password', 4 | 'id' => 'password', 5 | 'size' => 30 6 | ); 7 | 8 | ?> 9 | 10 |
    11 | Cancel Account 12 | uri->uri_string()); ?> 13 | 14 | dx_auth->get_auth_error(); ?> 15 | 16 |
    17 |
    18 |
    19 | 20 | 21 |
    22 |
    23 |
    24 |
    25 | 26 | 27 |
    -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/change_password_form.php: -------------------------------------------------------------------------------- 1 | 'old_password', 4 | 'id' => 'old_password', 5 | 'size' => 30, 6 | 'value' => set_value('old_password') 7 | ); 8 | 9 | $new_password = array( 10 | 'name' => 'new_password', 11 | 'id' => 'new_password', 12 | 'size' => 30 13 | ); 14 | 15 | $confirm_new_password = array( 16 | 'name' => 'confirm_new_password', 17 | 'id' => 'confirm_new_password', 18 | 'size' => 30 19 | ); 20 | 21 | ?> 22 | 23 |
    24 | Change Password 25 | uri->uri_string()); ?> 26 | 27 | dx_auth->get_auth_error(); ?> 28 | 29 |
    30 |
    31 |
    32 | 33 | 34 |
    35 | 36 |
    37 |
    38 | 39 | 40 |
    41 | 42 |
    43 |
    44 | 45 | 46 |
    47 | 48 |
    49 |
    50 |
    51 | 52 | 53 |
    -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/forgot_password_form.php: -------------------------------------------------------------------------------- 1 | 'login', 5 | 'id' => 'login', 6 | 'maxlength' => 80, 7 | 'size' => 30, 8 | 'value' => set_value('login') 9 | ); 10 | 11 | ?> 12 | 13 |
    Forgotten Password 14 | uri->uri_string()); ?> 15 | 16 | dx_auth->get_auth_error(); ?> 17 | 18 |
    19 |
    20 |
    21 | 22 | 23 | 24 |
    25 |
    26 | 27 | 28 |
    -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/general_message.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/login_form.php: -------------------------------------------------------------------------------- 1 | 'username', 4 | 'id' => 'username', 5 | 'size' => 30, 6 | 'value' => set_value('username') 7 | ); 8 | 9 | $password = array( 10 | 'name' => 'password', 11 | 'id' => 'password', 12 | 'size' => 30 13 | ); 14 | 15 | $remember = array( 16 | 'name' => 'remember', 17 | 'id' => 'remember', 18 | 'value' => 1, 19 | 'checked' => set_value('remember'), 20 | 'style' => 'margin:0;padding:0' 21 | ); 22 | 23 | $confirmation_code = array( 24 | 'name' => 'captcha', 25 | 'id' => 'captcha', 26 | 'maxlength' => 8 27 | ); 28 | 29 | ?> 30 | 31 |
    Login 32 | uri->uri_string())?> 33 | 34 | dx_auth->get_auth_error(); ?> 35 | 36 | 37 |
    38 |
    vcfdvdfv 39 |
    40 | 41 | 42 |
    43 | 44 |
    45 |
    46 | 47 | 48 |
    49 | 50 | 51 | 52 |
    Enter the code exactly as it appears. There is no zero.
    53 |
    dx_auth->get_captcha_image(); ?>
    54 | 55 |
    56 |
    57 | 58 | 59 |
    60 | 61 | 62 | 63 |
    64 |
    65 | 66 | dx_auth->forgot_password_uri, 'Forgot password');?> 67 | dx_auth->allow_registration) { 69 | echo anchor($this->dx_auth->register_uri, 'Register'); 70 | }; 71 | ?> 72 |
    73 | 74 |
    75 |
    76 |
    77 | 78 | 79 |
    80 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/register_form.php: -------------------------------------------------------------------------------- 1 | 'username', 4 | 'id' => 'username', 5 | 'size' => 30, 6 | 'value' => set_value('username') 7 | ); 8 | 9 | $password = array( 10 | 'name' => 'password', 11 | 'id' => 'password', 12 | 'size' => 30, 13 | 'value' => set_value('password') 14 | ); 15 | 16 | $confirm_password = array( 17 | 'name' => 'confirm_password', 18 | 'id' => 'confirm_password', 19 | 'size' => 30, 20 | 'value' => set_value('confirm_password') 21 | ); 22 | 23 | $email = array( 24 | 'name' => 'email', 25 | 'id' => 'email', 26 | 'maxlength' => 80, 27 | 'size' => 30, 28 | 'value' => set_value('email') 29 | ); 30 | 31 | $captcha = array( 32 | 'name' => 'captcha', 33 | 'id' => 'captcha' 34 | ); 35 | ?> 36 | 37 | 38 | 39 |
    Register 40 | uri->uri_string())?> 41 | 42 |
    43 |
    44 |
    45 | 46 | 47 |
    48 | 49 |
    50 |
    51 | 52 | 53 |
    54 | 55 |
    56 |
    57 | 58 | 59 |
    60 | 61 |
    62 |
    63 | 64 | 65 |
    66 | 67 | dx_auth->captcha_registration): ?> 68 | 69 |
    Enter the code exactly as it appears. There is no zero.
    70 |
    dx_auth->get_captcha_image(); ?>
    71 | 72 |
    73 |
    74 | 75 | 76 |
    77 | 78 | 79 | 80 |
    81 |
    82 |
    83 | 84 | 85 |
    86 | 87 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/auth/register_recaptcha_form.php: -------------------------------------------------------------------------------- 1 | 'username', 4 | 'id' => 'username', 5 | 'size' => 30, 6 | 'value' => set_value('username') 7 | ); 8 | 9 | $password = array( 10 | 'name' => 'password', 11 | 'id' => 'password', 12 | 'size' => 30, 13 | 'value' => set_value('password') 14 | ); 15 | 16 | $confirm_password = array( 17 | 'name' => 'confirm_password', 18 | 'id' => 'confirm_password', 19 | 'size' => 30, 20 | 'value' => set_value('confirm_password') 21 | ); 22 | 23 | $email = array( 24 | 'name' => 'email', 25 | 'id' => 'email', 26 | 'maxlength' => 80, 27 | 'size' => 30, 28 | 'value' => set_value('email') 29 | ); 30 | ?> 31 | 32 | 33 | 34 | 35 |
    Register 36 | uri->uri_string())?> 37 | 38 |
    39 |
    40 |
    41 | 42 | 43 |
    44 | 45 |
    46 |
    47 | 48 | 49 |
    50 | 51 |
    52 |
    53 | 54 | 55 |
    56 | 57 |
    58 |
    59 | 60 | 61 |
    62 | 63 | dx_auth->captcha_registration): ?> 64 | 65 |
    66 |
    67 | dx_auth->get_recaptcha_image(); 70 | // Show reload captcha link 71 | echo $this->dx_auth->get_recaptcha_reload_link(); 72 | // Show switch to image captcha or audio link 73 | echo $this->dx_auth->get_recaptcha_switch_image_audio_link(); 74 | ?> 75 |
    76 | 77 |
    dx_auth->get_recaptcha_label(); ?>
    78 |
    79 | dx_auth->get_recaptcha_input(); ?> 80 | 81 |
    82 | 83 | dx_auth->get_recaptcha_html(); 86 | ?> 87 | 88 | 89 |
    90 |
    91 |
    92 | 93 | 94 |
    95 | 96 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/backend/custom_permissions.php: -------------------------------------------------------------------------------- 1 | 2 | Manage Custom Permissions 3 | 4 | Here is an example how to use custom permissions

    '; 6 | 7 | // Build drop down menu 8 | foreach ($roles as $role) 9 | { 10 | $options[$role->id] = $role->name; 11 | } 12 | 13 | // Change allowed uri to string to be inserted in text area 14 | if ( ! empty($allowed_uri)) 15 | { 16 | $allowed_uri = implode("\n", $allowed_uri); 17 | } 18 | 19 | if (empty($edit)) 20 | { 21 | $edit = FALSE; 22 | } 23 | 24 | if (empty($delete)) 25 | { 26 | $delete = FALSE; 27 | } 28 | 29 | // Build form 30 | echo form_open($this->uri->uri_string()); 31 | 32 | echo form_label('Role', 'role_name_label'); 33 | echo form_dropdown('role', $options); 34 | echo form_submit('show', 'Show permissions'); 35 | 36 | echo form_label('', 'uri_label'); 37 | 38 | echo '
    '; 39 | 40 | echo form_checkbox('edit', '1', $edit); 41 | echo form_label('Allow edit', 'edit_label'); 42 | echo '
    '; 43 | 44 | echo form_checkbox('delete', '1', $delete); 45 | echo form_label('Allow delete', 'delete_label'); 46 | echo '
    '; 47 | 48 | echo '
    '; 49 | echo form_submit('save', 'Save Permissions'); 50 | 51 | echo '
    '; 52 | 53 | echo 'Open '.anchor('auth/custom_permissions/').' to see the result, try to login using user that you have changed.
    '; 54 | echo 'If you change your own role, you need to relogin to see the result changes.'; 55 | 56 | echo form_close(); 57 | 58 | ?> 59 | 60 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/backend/roles.php: -------------------------------------------------------------------------------- 1 | 2 | Manage roles 3 | 4 | id] = $role->name; 13 | } 14 | 15 | // Build table 16 | $this->table->set_heading('', 'ID', 'Name', 'Parent ID'); 17 | 18 | foreach ($roles as $role) 19 | { 20 | $this->table->add_row(form_checkbox('checkbox_'.$role->id, $role->id), $role->id, $role->name, $role->parent_id); 21 | } 22 | 23 | // Build form 24 | echo form_open($this->uri->uri_string()); 25 | 26 | echo form_label('Role parent', 'role_parent_label'); 27 | echo form_dropdown('role_parent', $options); 28 | 29 | echo form_label('Role name', 'role_name_label'); 30 | echo form_input('role_name', ''); 31 | 32 | echo form_submit('add', 'Add role'); 33 | echo form_submit('delete', 'Delete selected role'); 34 | 35 | echo '
    '; 36 | 37 | // Show table 38 | echo $this->table->generate(); 39 | 40 | echo form_close(); 41 | 42 | ?> 43 | 44 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/backend/unactivated_users.php: -------------------------------------------------------------------------------- 1 | 2 | Manage unactivated users 3 | 4 | table->set_heading('', 'Username', 'Email', 'Register IP', 'Activation Key', 'Created'); 9 | 10 | foreach ($users as $user) 11 | { 12 | $this->table->add_row( 13 | form_checkbox('checkbox_'.$user->id, $user->username).form_hidden('key_'.$user->id, $user->activation_key), 14 | $user->username, 15 | $user->email, 16 | $user->last_ip, 17 | $user->activation_key, 18 | date('Y-m-d', strtotime($user->created))); 19 | } 20 | 21 | echo form_open($this->uri->uri_string()); 22 | 23 | echo form_submit('activate', 'Activate User'); 24 | 25 | echo '
    '; 26 | 27 | echo $this->table->generate(); 28 | 29 | echo form_close(); 30 | 31 | echo $pagination; 32 | 33 | ?> 34 | 35 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/backend/uri_permissions.php: -------------------------------------------------------------------------------- 1 | 2 | Manage URI Permissions 3 | 4 | id] = $role->name; 9 | } 10 | 11 | // Change allowed uri to string to be inserted in text area 12 | if ( ! empty($allowed_uris)) 13 | { 14 | $allowed_uris = implode("\n", $allowed_uris); 15 | } 16 | 17 | // Build form 18 | echo form_open($this->uri->uri_string()); 19 | 20 | echo form_label('Role', 'role_name_label'); 21 | echo form_dropdown('role', $options); 22 | echo form_submit('show', 'Show URI permissions'); 23 | 24 | echo form_label('', 'uri_label'); 25 | 26 | echo '
    '; 27 | 28 | echo 'Allowed URI (One URI per line) :

    '; 29 | 30 | echo "Input '/' to allow role access all URI.
    "; 31 | echo "Input '/controller/' to allow role access controller and it's function.
    "; 32 | echo "Input '/controller/function/' to allow role access controller/function only.

    "; 33 | echo 'These rules only have effect if you use check_uri_permissions() in your controller

    .'; 34 | 35 | echo form_textarea('allowed_uris', $allowed_uris); 36 | 37 | echo '
    '; 38 | echo form_submit('save', 'Save URI Permissions'); 39 | 40 | echo form_close(); 41 | ?> 42 | 43 | -------------------------------------------------------------------------------- /application/modules/dx_auth/views/backend/users.php: -------------------------------------------------------------------------------- 1 | 2 | Manage users 3 | 4 | table->set_heading('', 'Username', 'Email', 'Role', 'Banned', 'Last IP', 'Last login', 'Created'); 13 | 14 | foreach ($users as $user) 15 | { 16 | $banned = ($user->banned == 1) ? 'Yes' : 'No'; 17 | 18 | $this->table->add_row( 19 | form_checkbox('checkbox_'.$user->id, $user->id), 20 | $user->username, 21 | $user->email, 22 | $user->role_name, 23 | $banned, 24 | $user->last_ip, 25 | date('Y-m-d', strtotime($user->last_login)), 26 | date('Y-m-d', strtotime($user->created))); 27 | } 28 | 29 | echo form_open($this->uri->uri_string()); 30 | 31 | echo form_submit('ban', 'Ban user'); 32 | echo form_submit('unban', 'Unban user'); 33 | echo form_submit('reset_pass', 'Reset password'); 34 | 35 | echo '
    '; 36 | 37 | echo $this->table->generate(); 38 | 39 | echo form_close(); 40 | 41 | echo $pagination; 42 | 43 | ?> 44 | 45 | -------------------------------------------------------------------------------- /application/modules/myaccount/controllers/logout.php: -------------------------------------------------------------------------------- 1 | dx_auth->logout(); 24 | 25 | //redirect to home page 26 | redirect(); 27 | } catch (Exception $err) { 28 | log_message("error", $err->getMessage()); 29 | return show_error($err->getMessage()); 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /application/modules/myaccount/controllers/user.php: -------------------------------------------------------------------------------- 1 | load->model("usermodel"); 18 | $this->user_id = $this->dx_auth->get_user_id(); 19 | } 20 | 21 | /** 22 | * Default function that will be executed unless another method secified 23 | */ 24 | public function index() 25 | { 26 | try { 27 | //Info of currently logged in user is succefully retrieved 28 | $this->meta["user"] = $this->data["user"] = $this->dx_auth->get_username(); 29 | 30 | return $this->view(); 31 | } catch (Exception $err) { 32 | log_message("error", $err->getMessage()); 33 | return show_error($err->getMessage()); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /application/third_party/MX/Base.php: -------------------------------------------------------------------------------- 1 | lang, 'MX_Lang')) $this->lang = new MX_Lang; 53 | if ( ! is_a($this->config, 'MX_Config')) $this->config = new MX_Config; 54 | } 55 | } 56 | 57 | /* create the application object */ 58 | new CI; -------------------------------------------------------------------------------- /application/third_party/MX/Ci.php: -------------------------------------------------------------------------------- 1 | load = new MX_Loader; 50 | 51 | /* re-assign language and config for modules */ 52 | if ( ! is_a(self::$APP->lang, 'MX_Lang')) self::$APP->lang = new MX_Lang; 53 | if ( ! is_a(self::$APP->config, 'MX_Config')) self::$APP->config = new MX_Config; 54 | 55 | /* autoload module items */ 56 | self::$APP->load->_autoloader(array()); 57 | } 58 | } 59 | 60 | /* create the application object */ 61 | new CI; -------------------------------------------------------------------------------- /application/third_party/MX/Config.php: -------------------------------------------------------------------------------- 1 | is_loaded, TRUE)) return $this->item($file); 41 | 42 | $_module = CI::$APP->router->fetch_module(); 43 | list($path, $file) = Modules::find($file, $_module, 'config/'); 44 | 45 | if ($path === FALSE) { 46 | parent::load($file, $use_sections, $fail_gracefully); 47 | return $this->item($file); 48 | } 49 | 50 | if ($config = Modules::load_file($file, $path, 'config')) { 51 | 52 | /* reference to the config array */ 53 | $current_config =& $this->config; 54 | 55 | if ($use_sections === TRUE) { 56 | if (isset($current_config[$file])) { 57 | $current_config[$file] = array_merge($current_config[$file], $config); 58 | } else { 59 | $current_config[$file] = $config; 60 | } 61 | } else { 62 | $current_config = array_merge($current_config, $config); 63 | } 64 | $this->is_loaded[] = $file; 65 | unset($config); 66 | return $this->item($file); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /application/third_party/MX/Controller.php: -------------------------------------------------------------------------------- 1 | config->item('controller_suffix'), '', get_class($this)); 46 | log_message('debug', $class." MX_Controller Initialized"); 47 | 48 | /* copy a loader instance and initialize */ 49 | $this->load = clone load_class('Loader'); 50 | $this->load->_init($this); 51 | 52 | /* autoload module items */ 53 | $this->load->_autoloader($this->autoload); 54 | } 55 | 56 | public function __get($class) { 57 | return CI::$APP->$class; 58 | } 59 | } -------------------------------------------------------------------------------- /application/third_party/MX/Lang.php: -------------------------------------------------------------------------------- 1 | load($_lang); 42 | return $this->language; 43 | } 44 | 45 | $deft_lang = CI::$APP->config->item('language'); 46 | $idiom = ($lang == '') ? $deft_lang : $lang; 47 | 48 | if (in_array($langfile.'_lang'.EXT, $this->is_loaded, TRUE)) 49 | return $this->language; 50 | 51 | $_module = CI::$APP->router->fetch_module(); 52 | list($path, $_langfile) = Modules::find($langfile.'_lang', $_module, 'language/'.$idiom.'/'); 53 | 54 | if ($path === FALSE) { 55 | if ($lang = parent::load($langfile, $lang, $return, $add_suffix, $alt_path)) return $lang; 56 | } else { 57 | if($lang = Modules::load_file($_langfile, $path, 'lang')) { 58 | if ($return) return $lang; 59 | $this->language = array_merge($this->language, $lang); 60 | $this->is_loaded[] = $langfile.'_lang'.EXT; 61 | unset($lang); 62 | } 63 | } 64 | 65 | return $this->language; 66 | } 67 | } -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/admin/common/footer.tpl: -------------------------------------------------------------------------------- 1 | {include "common/footer.tpl"} -------------------------------------------------------------------------------- /application/views/admin/common/header.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 13 | 21 |
    -------------------------------------------------------------------------------- /application/views/admin/common/inc_meta.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /application/views/admin/common/inc_scripts.tpl: -------------------------------------------------------------------------------- 1 | {include "common/inc_scripts.tpl"} -------------------------------------------------------------------------------- /application/views/admin/common/inc_styles.tpl: -------------------------------------------------------------------------------- 1 | {include "common/inc_styles.tpl"} 2 | -------------------------------------------------------------------------------- /application/views/admin/common/includes.tpl: -------------------------------------------------------------------------------- 1 | {include "members/common/includes.tpl"} 2 | -------------------------------------------------------------------------------- /application/views/admin/common/status.tpl: -------------------------------------------------------------------------------- 1 | {include "common/status.tpl"} -------------------------------------------------------------------------------- /application/views/admin/modules/home/index.tpl: -------------------------------------------------------------------------------- 1 | Welcome admin -------------------------------------------------------------------------------- /application/views/admin/modules/message/add.tpl: -------------------------------------------------------------------------------- 1 | {include "admin/modules/message/details.tpl"} -------------------------------------------------------------------------------- /application/views/admin/modules/message/details.tpl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 | 5 |
    6 |
    7 | 8 | 9 |
    10 |
    11 | 12 | 13 |
    14 |
    15 | 16 | 19 |
    20 |
    21 |  Back to message list 22 |
    23 |
    -------------------------------------------------------------------------------- /application/views/admin/modules/message/edit.tpl: -------------------------------------------------------------------------------- 1 | {include "admin/modules/message/details.tpl"} -------------------------------------------------------------------------------- /application/views/admin/modules/message/index.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {foreach from=$messages item=message name="outer"} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {/foreach} 29 | 30 | 31 |
    Id Name Email Subject Message Sent Option
    {$message->getId()} {$message->getName()} {$message->getEmail()} {$message->getSubject()} {$message->getMessage()|truncate:80} {$message->getTime()|date_format} View/Edit
    32 |
    33 |
    34 | 37 |   38 | 39 | Ad New 40 |
    41 |
    -------------------------------------------------------------------------------- /application/views/admin/modules/users/index.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {foreach from=$users item=user name="outer"} 14 | 15 | 16 | 17 | 18 | 19 | 20 | {/foreach} 21 | 22 | 23 |
    Id Username Email
    {$user->getId()} {$user->getUserName()} {$user->getEmail()}
    24 |
    25 |
    26 | 29 |   30 | 31 |
    32 |
    -------------------------------------------------------------------------------- /application/views/common/footer.tpl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | CodeigniterPlus 4 |
    5 | 6 | 12 |
    13 | {if $is_logged_in AND $is_admin} 14 | Administration 15 | {/if} 16 |
    17 | -------------------------------------------------------------------------------- /application/views/common/header.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 13 | 26 |
    27 | 28 | 29 | -------------------------------------------------------------------------------- /application/views/common/inc_meta.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {if $page->noindex || $smarty.const.ENVIRONMENT == "development"} 6 | 7 | {/if} 8 | {if $pagination_helper AND isset($page_no)} 9 | {if $page_no==1 && $page_no!=$last_page} 10 | 11 | {elseif $page_no==$last_page && $page_no!=1} 12 | 13 | {else} 14 | 15 | 16 | {/if} 17 | {/if} -------------------------------------------------------------------------------- /application/views/common/inc_scripts.tpl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {assign var="script_file" value="scripts/"|cat:$content|cat:".js"} 14 | 15 | {if file_exists($script_file)} 16 | 17 | {/if} -------------------------------------------------------------------------------- /application/views/common/inc_styles.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {assign var="style_file" value="styles/"|cat:$content|cat:".css"} 14 | {if file_exists($style_file)} 15 | 16 | {/if} -------------------------------------------------------------------------------- /application/views/common/status.tpl: -------------------------------------------------------------------------------- 1 | {if $status AND isset($status->success) AND isset($status->message)} 2 |
    3 | {$status->message} 4 |
    5 | {else} 6 |
     
    7 | {/if} 8 |
    9 | -------------------------------------------------------------------------------- /application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /application/views/index.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {$page->title} 5 | 6 | 7 | {include $common_dir|cat:"inc_meta.tpl"} 8 | {include $common_dir|cat:"inc_styles.tpl"} 9 | 10 | 11 | 12 | 16 |
    17 |
    18 | {include $common_dir|cat:"status.tpl"} 19 |
    20 |
    21 | {include $content|cat:".tpl"} 22 |
    23 |
    24 |
    25 | 28 |
    29 |
    30 | 31 | {include $common_dir|cat:"inc_scripts.tpl"} 32 | 33 | 34 | -------------------------------------------------------------------------------- /application/views/member/common/footer.tpl: -------------------------------------------------------------------------------- 1 | {include "common/footer.tpl"} -------------------------------------------------------------------------------- /application/views/member/common/header.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 13 | 20 |
    -------------------------------------------------------------------------------- /application/views/member/common/inc_meta.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /application/views/member/common/inc_scripts.tpl: -------------------------------------------------------------------------------- 1 | {include "common/inc_scripts.tpl"} -------------------------------------------------------------------------------- /application/views/member/common/inc_styles.tpl: -------------------------------------------------------------------------------- 1 | {include "common/inc_styles.tpl"} 2 | -------------------------------------------------------------------------------- /application/views/member/common/status.tpl: -------------------------------------------------------------------------------- 1 | {include "common/status.tpl"} -------------------------------------------------------------------------------- /application/views/member/modules/user/index.tpl: -------------------------------------------------------------------------------- 1 | Welcome back, {$user} 2 | 3 | {if $is_logged_in AND $is_admin} 4 |
    5 | To Manage, Please Go To Administration Area 6 | {/if} -------------------------------------------------------------------------------- /application/views/modules/auth/forgot_password.tpl: -------------------------------------------------------------------------------- 1 |
    2 | Forgotten Password 3 |
    4 |
    5 | 6 | 7 |
    8 |
    9 | 10 |
    11 |
    12 |
    -------------------------------------------------------------------------------- /application/views/modules/auth/hauth.tpl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | We are almost done! 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 | 13 |
    14 |
    -------------------------------------------------------------------------------- /application/views/modules/auth/login.tpl: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 |
    5 | Login 6 | 7 |
    8 | 9 | 10 |
    11 |
    12 | 13 | 14 |
    15 | 16 | 24 |
    25 | 26 |
    27 |
    28 |
    29 |
    30 |





    31 | 32 | Facebook Login 33 | 34 |

    35 | 36 | Twitter Login 37 | 38 |
    39 |
    40 | 41 | -------------------------------------------------------------------------------- /application/views/modules/auth/register.tpl: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    5 | Register 6 |
    7 | 8 | 9 |
    10 |
    11 | 12 | 13 |
    14 |
    15 | 16 | 17 |
    18 |
    19 | 20 |
    21 |
    22 | 23 |
    24 |
    25 |
    26 |
    27 |





    28 | 29 | Facebook Login 30 | 31 |

    32 | 33 | Twitter Login 34 | 35 |
    36 | 37 | -------------------------------------------------------------------------------- /application/views/modules/home/contact.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |
    5 |
    6 | Contact 7 |
    8 | 9 | 10 |
    11 |
    12 | 13 | 14 |
    15 |
    16 | 17 | 18 |
    19 |
    20 | 21 | 22 |
    23 | 24 |
    25 |
    26 |
    27 | 28 | -------------------------------------------------------------------------------- /application/views/modules/home/error.tpl: -------------------------------------------------------------------------------- 1 | The requested page wasn't found. -------------------------------------------------------------------------------- /application/views/modules/home/index.tpl: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |

    Welcome To CodeIgniterPlus!

    5 |
    6 |
    7 |
    8 |

    The Ultimate CodeIgniter Enhance

    9 |

    10 | Want to have a kickass start in your next web application project?
    11 | Get CodeIgniterPlus, make your wep app development easier than ever! 12 |

    13 |

    14 | 15 | Fork Me At GitHub 16 | 17 |

    18 | 20 |

    21 | Also 22 | 23 | Read The Introduction To CodeIgniterPlus 24 | 25 |
    26 |
    27 | Desktop & Mobile Template 28 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codeigniterplus", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "bower_components", 9 | "test", 10 | "tests" 11 | ], 12 | "homepage": "https://github.com/nilacseruet/codeigniterplus", 13 | "authors": [ 14 | "mahfuja nilufar " 15 | ], 16 | "dependencies": { 17 | 18 | "bootstrap": null, 19 | "gmaps":null, 20 | "jquery-ui":null, 21 | "jquery.validation":null 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cli-config.php: -------------------------------------------------------------------------------- 1 | em; 12 | $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array( 13 | 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), 14 | 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) 15 | )); 16 | 17 | return $helperSet; 18 | 19 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "doctrine/orm": "dev-master", 4 | "ranacseruet/smarty":"dev-master", 5 | "hybridauth/hybridauth": "dev-master" 6 | }, 7 | "require-dev": { 8 | "phpunit/phpunit": "dev-master" 9 | }, 10 | "minimum-stability": "dev" 11 | } 12 | -------------------------------------------------------------------------------- /docker-files/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteBase / 4 | 5 | #Removes access to the system folder by users. 6 | #Additionally this will allow you to create a System.php controller, 7 | #previously this would not have been possible. 8 | #'system' can be replaced if you have renamed your system folder. 9 | RewriteCond %{REQUEST_URI} ^system.* 10 | RewriteRule ^(.*)$ /index.php?/$1 [L] 11 | 12 | #When your application folder isn't in the system folder 13 | #This snippet prevents user access to the application folder 14 | #Submitted by: Fabdrol 15 | #Rename 'application' to your applications folder name. 16 | RewriteCond %{REQUEST_URI} ^application.* 17 | RewriteRule ^(.*)$ /index.php?/$1 [L] 18 | 19 | #Checks to see if the user is attempting to access a valid file, 20 | #such as an image or css document, if this isn't true it sends the 21 | #request to index.php 22 | RewriteCond %{REQUEST_FILENAME} !-f 23 | RewriteCond %{REQUEST_FILENAME} !-d 24 | RewriteRule ^(.*)$ index.php?/$1 [L] 25 | 26 | 27 | 28 | # If we don't have mod_rewrite installed, all 404's 29 | # can be sent to index.php, and everything works as normal. 30 | # Submitted by: ElliotHaughin 31 | 32 | ErrorDocument 404 /index.php 33 | -------------------------------------------------------------------------------- /docker-files/create_mysql_admin_user.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/bin/mysqld_safe > /dev/null 2>&1 & 4 | 5 | RET=1 6 | while [[ RET -ne 0 ]]; do 7 | echo "=> Waiting for confirmation of MySQL service startup" 8 | sleep 5 9 | mysql -uroot -e "status" > /dev/null 2>&1 10 | RET=$? 11 | done 12 | 13 | PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} 14 | _word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) 15 | echo "=> Creating MySQL admin user with ${_word} password" 16 | 17 | mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY '$PASS'" 18 | mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" 19 | 20 | 21 | echo "=> Done!" 22 | 23 | echo "========================================================================" 24 | echo "You can now connect to this MySQL Server using:" 25 | echo "" 26 | echo " mysql -uadmin -p$PASS -h -P" 27 | echo "" 28 | echo "Please remember to change the above password as soon as possible!" 29 | echo "MySQL user 'root' has no password but only allows local connections" 30 | echo "========================================================================" 31 | 32 | #mysqladmin -uroot shutdown 33 | -------------------------------------------------------------------------------- /docker-files/database.php: -------------------------------------------------------------------------------- 1 | An empty or uninitialized MySQL volume is detected in $VOLUME_HOME" 9 | echo "=> Installing MySQL ..." 10 | mysql_install_db > /dev/null 2>&1 11 | echo "=> Done!" 12 | /create_mysql_admin_user.sh 13 | else 14 | echo "=> Using an existing volume of MySQL" 15 | fi 16 | 17 | mysql -uroot -h localhost -P 3306 -e "CREATE DATABASE codeigniterplus;" 18 | 19 | exec supervisord -n 20 | -------------------------------------------------------------------------------- /fig.yml: -------------------------------------------------------------------------------- 1 | ## YAML Template. 2 | web: 3 | build: . 4 | ports: 5 | - "80:80" 6 | - "3306:3306" -------------------------------------------------------------------------------- /images/desktop_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/desktop_mobile.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/favicon.ico -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/logo.png -------------------------------------------------------------------------------- /images/sign_in_fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/sign_in_fb.png -------------------------------------------------------------------------------- /images/sign_in_tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/sign_in_tw.png -------------------------------------------------------------------------------- /images/sign_up_fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/sign_up_fb.png -------------------------------------------------------------------------------- /images/sign_up_tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/sign_up_tw.png -------------------------------------------------------------------------------- /images/view-demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/images/view-demo.jpg -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008 - 2011, EllisLab, Inc. 2 | All rights reserved. 3 | 4 | This license is a legal agreement between you and EllisLab Inc. for the use 5 | of CodeIgniter Software (the "Software"). By obtaining the Software you 6 | agree to comply with the terms and conditions of this license. 7 | 8 | PERMITTED USE 9 | You are permitted to use, copy, modify, and distribute the Software and its 10 | documentation, with or without modification, for any purpose, provided that 11 | the following conditions are met: 12 | 13 | 1. A copy of this license agreement must be included with the distribution. 14 | 15 | 2. Redistributions of source code must retain the above copyright notice in 16 | all source code files. 17 | 18 | 3. Redistributions in binary form must reproduce the above copyright notice 19 | in the documentation and/or other materials provided with the distribution. 20 | 21 | 4. Any files that have been modified must carry notices stating the nature 22 | of the change and the names of those who changed them. 23 | 24 | 5. Products derived from the Software must include an acknowledgment that 25 | they are derived from CodeIgniter in their documentation and/or other 26 | materials provided with the distribution. 27 | 28 | 6. Products derived from the Software may not be called "CodeIgniter", 29 | nor may "CodeIgniter" appear in their name, without prior written 30 | permission from EllisLab, Inc. 31 | 32 | INDEMNITY 33 | You agree to indemnify and hold harmless the authors of the Software and 34 | any contributors for any direct, indirect, incidental, or consequential 35 | third-party claims, actions or suits, as well as any related expenses, 36 | liabilities, damages, settlements or fees arising from your use or misuse 37 | of the Software, or a violation of any terms of this license. 38 | 39 | DISCLAIMER OF WARRANTY 40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR 41 | IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, 42 | NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 43 | 44 | LIMITATIONS OF LIABILITY 45 | YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. 46 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE 47 | FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION 48 | WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE 49 | APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING 50 | BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF 51 | DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. 52 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | include.path=${php.global.include.path} 2 | php.version=PHP_53 3 | source.encoding=UTF-8 4 | src.dir=. 5 | tags.asp=false 6 | tags.short=true 7 | web.root=. 8 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.php.project 4 | 5 | 6 | codeigniterplus 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | ./tests/ 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /scripts/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | window.onload = function(){ 7 | steal(base_url+"bower_components/jquery/dist/jquery.min.js",loadJqueryPlugins); 8 | google.load("maps","3.8", {"other_params":"sensor=true",callback:loadGoogleMapPlugin}); 9 | } 10 | 11 | function loadJqueryPlugins(){ 12 | steal(base_url+"bower_components/jquery-ui/jquery-ui.min.js", 13 | script_base_url+"libraries/jquery/plugins/jquery.form.js", 14 | base_url+"bower_components/bootstrap/dist/js/bootstrap.min.js", 15 | base_url+"bower_components/jquery.validation/dist/jquery.validate.js",jqueryPluginsLoaded); 16 | } 17 | 18 | function loadGoogleMapPlugin(){ 19 | steal(base_url+"bower_components/gmaps/gmaps.js",googleMapPluginsLoaded); 20 | } 21 | 22 | function jqueryPluginsLoaded(){ 23 | 24 | $("form").each(function(){ 25 | $(this).validate(validateOptions); 26 | }); 27 | if(window.jInit){ 28 | jInit(); 29 | } 30 | } 31 | 32 | function googleMapPluginsLoaded(){ 33 | if(window.gInit){ 34 | gInit(); 35 | } 36 | } 37 | 38 | /****** Custom validation error ********/ 39 | function myErrorPlacement(error, element) { 40 | offset = element.position(); 41 | error.insertAfter(element); 42 | error.addClass('message'); // add a class to the wrapper 43 | error.css('position', 'absolute'); 44 | error.css('left',offset.left + element.outerWidth()); 45 | error.css('width','100%'); 46 | error.css('top', offset.top + 60); 47 | } 48 | var validateOptions = { 49 | /*errorElement: "span", 50 | wrapper: "span", 51 | errorPlacement:myErrorPlacement*/ 52 | 53 | }; 54 | /******* XXX ********/ -------------------------------------------------------------------------------- /scripts/modules/auth/hauth.js: -------------------------------------------------------------------------------- 1 | function jInit() 2 | { 3 | $('.loaderDiv').hide(); 4 | var email = $("input:text#email").val(); 5 | 6 | if(email){ 7 | $("#email").attr('disabled','disabled'); 8 | } 9 | $('#email').on('change', function() { 10 | $("#user_email").val($("#email").val()); 11 | }); 12 | 13 | $("#email").rules("add",{ 14 | remote: { 15 | url: base_url+"api/member/check_email_availability", 16 | type: "post", 17 | data: { 18 | onStart: function(){ 19 | $("#email").addClass('loading'); 20 | }, 21 | onStop: function(){ 22 | $("#email").removeClass('loading'); 23 | }, 24 | email: function() { 25 | return $("#email").val(); 26 | } 27 | } 28 | } 29 | }); 30 | 31 | $.validator.addMethod("usernameRegex", function(value, element) { 32 | return this.optional(element) || /^[a-z0-9\-]+$/i.test(value); 33 | }, "Username must contain only letters, numbers, or dashes."); 34 | 35 | $("#username").rules("add",{ 36 | minlength: 4, 37 | maxlength: 20, 38 | usernameRegex:true, 39 | remote: { 40 | url: base_url+"api/member/check_username_availability", 41 | type: "post", 42 | data: { 43 | onStart: function(){ 44 | $("#username").addClass('loading'); 45 | }, 46 | onStop: function(){ 47 | $("#username").removeClass('loading'); 48 | }, 49 | username: function() { 50 | return $("#username").val(); 51 | } 52 | } 53 | } 54 | }); 55 | 56 | $("#password").rules("add",{ 57 | minlength: 6, 58 | maxlength: 20 59 | }) 60 | } -------------------------------------------------------------------------------- /scripts/modules/auth/register.js: -------------------------------------------------------------------------------- 1 | function jInit() 2 | { 3 | $('.loaderDiv').hide(); 4 | $("#email").rules("add",{ 5 | remote: { 6 | url: base_url+"api/member/check_email_availability", 7 | type: "post", 8 | data: { 9 | onStart: function(){ 10 | $("#email").addClass('loading'); 11 | }, 12 | onStop: function(){ 13 | $("#email").removeClass('loading'); 14 | }, 15 | email: function() { 16 | return $("#email").val(); 17 | } 18 | } 19 | } 20 | }); 21 | 22 | $.validator.addMethod("usernameRegex", function(value, element) { 23 | return this.optional(element) || /^[a-z0-9\-]+$/i.test(value); 24 | }, "Username must contain only letters, numbers, or dashes."); 25 | 26 | $("#username").rules("add",{ 27 | minlength: 4, 28 | maxlength: 20, 29 | usernameRegex:true, 30 | remote: { 31 | url: base_url+"api/member/check_username_availability", 32 | type: "post", 33 | data: { 34 | onStart: function(){ 35 | $("#username").addClass('loading'); 36 | }, 37 | onStop: function(){ 38 | $("#username").removeClass('loading'); 39 | }, 40 | username: function() { 41 | return $("#username").val(); 42 | } 43 | } 44 | } 45 | }); 46 | 47 | $("#password").rules("add",{ 48 | minlength: 6, 49 | maxlength: 20 50 | }) 51 | } -------------------------------------------------------------------------------- /scripts/modules/home/contact.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripts/modules/home/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | // Note that using Google Gears requires loading the Javascript 6 | // at http://code.google.com/apis/gears/gears_init.js 7 | 8 | function gInit() { 9 | //initialization after google map loaded 10 | } 11 | function jInit(){ 12 | //initialization after jquery loaded 13 | } -------------------------------------------------------------------------------- /styles/main/images/msg_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/styles/main/images/msg_arrow.gif -------------------------------------------------------------------------------- /styles/main/layout.css: -------------------------------------------------------------------------------- 1 | /* 2 | Document : layout 3 | Created on : Apr 9, 2011, 3:06:03 AM 4 | Author : Rana 5 | Description: 6 | Purpose of the stylesheet follows. 7 | */ 8 | 9 | /* 10 | TODO customize this sample style 11 | Syntax recommendation http://www.w3.org/TR/REC-CSS2/ 12 | */ 13 | *{ 14 | padding: 0px ; 15 | margin: 0px; 16 | } 17 | 18 | body { 19 | padding-top: 60px; 20 | padding-bottom: 40px; 21 | } 22 | .nav li { 23 | padding-top: 5px; 24 | } 25 | 26 | .footer{ 27 | padding-top: 5px; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /styles/main/styles.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | TODO customize this sample style 4 | Syntax recommendation http://www.w3.org/TR/REC-CSS2/ 5 | */ 6 | 7 | .header{ 8 | background: #999; 9 | } 10 | 11 | /*in case default validate is used without custom option*/ 12 | label.error{ 13 | border: none; 14 | background: none; 15 | font-weight: normal; 16 | } 17 | 18 | span.message{ 19 | background: transparent url("./images/msg_arrow.gif") no-repeat scroll left center; 20 | padding-left: 7px; 21 | } 22 | 23 | span.error{ 24 | background-color:#F3E6E6; 25 | border-color: #924949; 26 | border-style: solid solid solid none; 27 | border-width: 2px; 28 | padding: 5px; 29 | margin: 0px; 30 | } 31 | 32 | input.error,select.error,textarea.error{ 33 | padding: 0px !important; 34 | } 35 | 36 | .error{ 37 | color: red; 38 | } 39 | 40 | .navbar-toggle { 41 | width: 100%; 42 | float: none; 43 | margin: 0 auto; 44 | border-width:0; 45 | border-radius:0; 46 | } -------------------------------------------------------------------------------- /styles/modules/home/index.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | TODO customize this sample style 4 | Syntax recommendation http://www.w3.org/TR/REC-CSS2/ 5 | */ 6 | 7 | .jumbotron h1{ 8 | color:#FF6600; 9 | } -------------------------------------------------------------------------------- /system/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /system/core/Controller.php: -------------------------------------------------------------------------------- 1 | $class) 46 | { 47 | $this->$var =& load_class($class); 48 | } 49 | 50 | $this->load =& load_class('Loader', 'core'); 51 | 52 | $this->load->initialize(); 53 | 54 | log_message('debug', "Controller Class Initialized"); 55 | } 56 | 57 | public static function &get_instance() 58 | { 59 | return self::$instance; 60 | } 61 | } 62 | // END Controller class 63 | 64 | /* End of file Controller.php */ 65 | /* Location: ./system/core/Controller.php */ -------------------------------------------------------------------------------- /system/core/Model.php: -------------------------------------------------------------------------------- 1 | $key; 53 | } 54 | } 55 | // END Model Class 56 | 57 | /* End of file Model.php */ 58 | /* Location: ./system/core/Model.php */ -------------------------------------------------------------------------------- /system/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/mssql/mssql_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 84 | } 85 | 86 | } 87 | 88 | /* End of file mssql_utility.php */ 89 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/mysql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

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

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/mysqli/mysqli_utility.php: -------------------------------------------------------------------------------- 1 | db->_escape_identifiers($table); 53 | } 54 | 55 | // -------------------------------------------------------------------- 56 | 57 | /** 58 | * Repair table query 59 | * 60 | * Generates a platform-specific query so that a table can be repaired 61 | * 62 | * @access private 63 | * @param string the table name 64 | * @return object 65 | */ 66 | function _repair_table($table) 67 | { 68 | return "REPAIR TABLE ".$this->db->_escape_identifiers($table); 69 | } 70 | 71 | // -------------------------------------------------------------------- 72 | 73 | /** 74 | * MySQLi Export 75 | * 76 | * @access private 77 | * @param array Preferences 78 | * @return mixed 79 | */ 80 | function _backup($params = array()) 81 | { 82 | // Currently unsupported 83 | return $this->db->display_error('db_unsuported_feature'); 84 | } 85 | } 86 | 87 | /* End of file mysqli_utility.php */ 88 | /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/oci8/oci8_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 84 | } 85 | } 86 | 87 | /* End of file oci8_utility.php */ 88 | /* Location: ./system/database/drivers/oci8/oci8_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/odbc/odbc_utility.php: -------------------------------------------------------------------------------- 1 | db->db_debug) 38 | { 39 | return $this->db->display_error('db_unsuported_feature'); 40 | } 41 | return FALSE; 42 | } 43 | 44 | // -------------------------------------------------------------------- 45 | 46 | /** 47 | * Optimize table query 48 | * 49 | * Generates a platform-specific query so that a table can be optimized 50 | * 51 | * @access private 52 | * @param string the table name 53 | * @return object 54 | */ 55 | function _optimize_table($table) 56 | { 57 | // Not a supported ODBC feature 58 | if ($this->db->db_debug) 59 | { 60 | return $this->db->display_error('db_unsuported_feature'); 61 | } 62 | return FALSE; 63 | } 64 | 65 | // -------------------------------------------------------------------- 66 | 67 | /** 68 | * Repair table query 69 | * 70 | * Generates a platform-specific query so that a table can be repaired 71 | * 72 | * @access private 73 | * @param string the table name 74 | * @return object 75 | */ 76 | function _repair_table($table) 77 | { 78 | // Not a supported ODBC feature 79 | if ($this->db->db_debug) 80 | { 81 | return $this->db->display_error('db_unsuported_feature'); 82 | } 83 | return FALSE; 84 | } 85 | 86 | // -------------------------------------------------------------------- 87 | 88 | /** 89 | * ODBC Export 90 | * 91 | * @access private 92 | * @param array Preferences 93 | * @return mixed 94 | */ 95 | function _backup($params = array()) 96 | { 97 | // Currently unsupported 98 | return $this->db->display_error('db_unsuported_feature'); 99 | } 100 | 101 | } 102 | 103 | /* End of file odbc_utility.php */ 104 | /* Location: ./system/database/drivers/odbc/odbc_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/pdo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/pdo/pdo_utility.php: -------------------------------------------------------------------------------- 1 | db->db_debug) 38 | { 39 | return $this->db->display_error('db_unsuported_feature'); 40 | } 41 | return FALSE; 42 | } 43 | 44 | // -------------------------------------------------------------------- 45 | 46 | /** 47 | * Optimize table query 48 | * 49 | * Generates a platform-specific query so that a table can be optimized 50 | * 51 | * @access private 52 | * @param string the table name 53 | * @return object 54 | */ 55 | function _optimize_table($table) 56 | { 57 | // Not a supported PDO feature 58 | if ($this->db->db_debug) 59 | { 60 | return $this->db->display_error('db_unsuported_feature'); 61 | } 62 | return FALSE; 63 | } 64 | 65 | // -------------------------------------------------------------------- 66 | 67 | /** 68 | * Repair table query 69 | * 70 | * Generates a platform-specific query so that a table can be repaired 71 | * 72 | * @access private 73 | * @param string the table name 74 | * @return object 75 | */ 76 | function _repair_table($table) 77 | { 78 | // Not a supported PDO feature 79 | if ($this->db->db_debug) 80 | { 81 | return $this->db->display_error('db_unsuported_feature'); 82 | } 83 | return FALSE; 84 | } 85 | 86 | // -------------------------------------------------------------------- 87 | 88 | /** 89 | * PDO Export 90 | * 91 | * @access private 92 | * @param array Preferences 93 | * @return mixed 94 | */ 95 | function _backup($params = array()) 96 | { 97 | // Currently unsupported 98 | return $this->db->display_error('db_unsuported_feature'); 99 | } 100 | 101 | } 102 | 103 | /* End of file pdo_utility.php */ 104 | /* Location: ./system/database/drivers/pdo/pdo_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/postgre/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/postgre/postgre_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 84 | } 85 | } 86 | 87 | 88 | /* End of file postgre_utility.php */ 89 | /* Location: ./system/database/drivers/postgre/postgre_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite/sqlite_utility.php: -------------------------------------------------------------------------------- 1 | db_debug) 42 | { 43 | return $this->db->display_error('db_unsuported_feature'); 44 | } 45 | return array(); 46 | } 47 | 48 | // -------------------------------------------------------------------- 49 | 50 | /** 51 | * Optimize table query 52 | * 53 | * Is optimization even supported in SQLite? 54 | * 55 | * @access private 56 | * @param string the table name 57 | * @return object 58 | */ 59 | function _optimize_table($table) 60 | { 61 | return FALSE; 62 | } 63 | 64 | // -------------------------------------------------------------------- 65 | 66 | /** 67 | * Repair table query 68 | * 69 | * Are table repairs even supported in SQLite? 70 | * 71 | * @access private 72 | * @param string the table name 73 | * @return object 74 | */ 75 | function _repair_table($table) 76 | { 77 | return FALSE; 78 | } 79 | 80 | // -------------------------------------------------------------------- 81 | 82 | /** 83 | * SQLite Export 84 | * 85 | * @access private 86 | * @param array Preferences 87 | * @return mixed 88 | */ 89 | function _backup($params = array()) 90 | { 91 | // Currently unsupported 92 | return $this->db->display_error('db_unsuported_feature'); 93 | } 94 | } 95 | 96 | /* End of file sqlite_utility.php */ 97 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlsrv/sqlsrv_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 84 | } 85 | 86 | } 87 | 88 | /* End of file mssql_utility.php */ 89 | /* Location: ./system/database/drivers/mssql/mssql_utility.php */ -------------------------------------------------------------------------------- /system/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

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

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranacseruet/codeigniterplus/4848183462dceba5cd6ea04d3539c4d3f6cc6ba1/system/fonts/texb.ttf -------------------------------------------------------------------------------- /system/helpers/array_helper.php: -------------------------------------------------------------------------------- 1 | input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); 53 | } 54 | } 55 | 56 | // -------------------------------------------------------------------- 57 | 58 | /** 59 | * Fetch an item from the COOKIE array 60 | * 61 | * @access public 62 | * @param string 63 | * @param bool 64 | * @return mixed 65 | */ 66 | if ( ! function_exists('get_cookie')) 67 | { 68 | function get_cookie($index = '', $xss_clean = FALSE) 69 | { 70 | $CI =& get_instance(); 71 | 72 | $prefix = ''; 73 | 74 | if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '') 75 | { 76 | $prefix = config_item('cookie_prefix'); 77 | } 78 | 79 | return $CI->input->cookie($prefix.$index, $xss_clean); 80 | } 81 | } 82 | 83 | // -------------------------------------------------------------------- 84 | 85 | /** 86 | * Delete a COOKIE 87 | * 88 | * @param mixed 89 | * @param string the cookie domain. Usually: .yourdomain.com 90 | * @param string the cookie path 91 | * @param string the cookie prefix 92 | * @return void 93 | */ 94 | if ( ! function_exists('delete_cookie')) 95 | { 96 | function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') 97 | { 98 | set_cookie($name, '', '', $domain, $path, $prefix); 99 | } 100 | } 101 | 102 | 103 | /* End of file cookie_helper.php */ 104 | /* Location: ./system/helpers/cookie_helper.php */ -------------------------------------------------------------------------------- /system/helpers/directory_helper.php: -------------------------------------------------------------------------------- 1 | 0) && @is_dir($source_dir.$file)) 62 | { 63 | $filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden); 64 | } 65 | else 66 | { 67 | $filedata[] = $file; 68 | } 69 | } 70 | 71 | closedir($fp); 72 | return $filedata; 73 | } 74 | 75 | return FALSE; 76 | } 77 | } 78 | 79 | 80 | /* End of file directory_helper.php */ 81 | /* Location: ./system/helpers/directory_helper.php */ -------------------------------------------------------------------------------- /system/helpers/email_helper.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /system/helpers/language_helper.php: -------------------------------------------------------------------------------- 1 | lang->line($line); 47 | 48 | if ($id != '') 49 | { 50 | $line = '"; 51 | } 52 | 53 | return $line; 54 | } 55 | } 56 | 57 | // ------------------------------------------------------------------------ 58 | /* End of file language_helper.php */ 59 | /* Location: ./system/helpers/language_helper.php */ -------------------------------------------------------------------------------- /system/helpers/number_helper.php: -------------------------------------------------------------------------------- 1 | lang->load('number'); 44 | 45 | if ($num >= 1000000000000) 46 | { 47 | $num = round($num / 1099511627776, $precision); 48 | $unit = $CI->lang->line('terabyte_abbr'); 49 | } 50 | elseif ($num >= 1000000000) 51 | { 52 | $num = round($num / 1073741824, $precision); 53 | $unit = $CI->lang->line('gigabyte_abbr'); 54 | } 55 | elseif ($num >= 1000000) 56 | { 57 | $num = round($num / 1048576, $precision); 58 | $unit = $CI->lang->line('megabyte_abbr'); 59 | } 60 | elseif ($num >= 1000) 61 | { 62 | $num = round($num / 1024, $precision); 63 | $unit = $CI->lang->line('kilobyte_abbr'); 64 | } 65 | else 66 | { 67 | $unit = $CI->lang->line('bytes'); 68 | return number_format($num).' '.$unit; 69 | } 70 | 71 | return number_format($num, $precision).' '.$unit; 72 | } 73 | } 74 | 75 | 76 | /* End of file number_helper.php */ 77 | /* Location: ./system/helpers/number_helper.php */ -------------------------------------------------------------------------------- /system/helpers/path_helper.php: -------------------------------------------------------------------------------- 1 | load->library('typography'); 45 | 46 | return $CI->typography->nl2br_except_pre($str); 47 | } 48 | } 49 | 50 | // ------------------------------------------------------------------------ 51 | 52 | /** 53 | * Auto Typography Wrapper Function 54 | * 55 | * 56 | * @access public 57 | * @param string 58 | * @param bool whether to allow javascript event handlers 59 | * @param bool whether to reduce multiple instances of double newlines to two 60 | * @return string 61 | */ 62 | if ( ! function_exists('auto_typography')) 63 | { 64 | function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE) 65 | { 66 | $CI =& get_instance(); 67 | $CI->load->library('typography'); 68 | return $CI->typography->auto_typography($str, $strip_js_event_handlers, $reduce_linebreaks); 69 | } 70 | } 71 | 72 | 73 | // -------------------------------------------------------------------- 74 | 75 | /** 76 | * HTML Entities Decode 77 | * 78 | * This function is a replacement for html_entity_decode() 79 | * 80 | * @access public 81 | * @param string 82 | * @return string 83 | */ 84 | if ( ! function_exists('entity_decode')) 85 | { 86 | function entity_decode($str, $charset='UTF-8') 87 | { 88 | global $SEC; 89 | return $SEC->entity_decode($str, $charset); 90 | } 91 | } 92 | 93 | /* End of file typography_helper.php */ 94 | /* Location: ./system/helpers/typography_helper.php */ -------------------------------------------------------------------------------- /system/helpers/xml_helper.php: -------------------------------------------------------------------------------- 1 | ","\"", "'", "-"), 54 | array("&", "<", ">", """, "'", "-"), 55 | $str); 56 | 57 | // Decode the temp markers back to entities 58 | $str = preg_replace("/$temp(\d+);/","&#\\1;",$str); 59 | 60 | if ($protect_all === TRUE) 61 | { 62 | $str = preg_replace("/$temp(\w+);/","&\\1;", $str); 63 | } 64 | 65 | return $str; 66 | } 67 | } 68 | 69 | // ------------------------------------------------------------------------ 70 | 71 | /* End of file xml_helper.php */ 72 | /* Location: ./system/helpers/xml_helper.php */ -------------------------------------------------------------------------------- /system/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

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

    Directory access is forbidden.

    8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/Test.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 8 | } 9 | } 10 | 11 | --------------------------------------------------------------------------------