├── .gitignore ├── .htaccess ├── README.md ├── application ├── .htaccess ├── config │ ├── autoload.php │ ├── config.php │ ├── constants.php │ ├── database.php │ ├── doctypes.php │ ├── foreign_chars.php │ ├── form_validation.php │ ├── hooks.php │ ├── index.html │ ├── memcached.php │ ├── migration.php │ ├── mimes.php │ ├── profiler.php │ ├── rest.php │ ├── routes.php │ ├── smarty.php │ ├── smileys.php │ ├── user_agents.php │ └── wolfauth.php ├── controllers │ ├── admin │ │ ├── admin.php │ │ ├── dashboard.php │ │ └── stories.php │ ├── ajax.php │ ├── api │ │ ├── example.php │ │ ├── key.php │ │ └── story.php │ ├── index.html │ └── welcome.php ├── core │ ├── MY_Controller.php │ ├── MY_Loader.php │ ├── MY_Model.php │ ├── MY_Output.php │ ├── MY_Router.php │ └── index.html ├── helpers │ ├── index.html │ ├── inflector_helper.php │ ├── parser_helper.php │ ├── session_helper.php │ ├── wolfauth_helper.php │ └── zebra_helper.php ├── hooks │ └── index.html ├── index.html ├── language │ ├── ca │ │ └── datamapper_lang.php │ ├── english │ │ ├── datamapper_lang.php │ │ ├── index.html │ │ └── zebra_lang.php │ ├── es │ │ └── datamapper_lang.php │ ├── fr │ │ └── datamapper_lang.php │ ├── it │ │ └── datamapper_lang.php │ ├── nl │ │ └── datamapper_lang.php │ └── pt_BR │ │ └── datamapper_lang.php ├── libraries │ ├── Format.php │ ├── MY_Parser.php │ ├── REST_Controller.php │ ├── Smarty.php │ ├── Wolfauth.php │ └── index.html ├── logs │ └── index.html ├── models │ ├── Wolfauth_m.php │ ├── Wolfauth_permissions_m.php │ ├── Wolfauth_roles_m.php │ └── index.html ├── modules │ ├── comment │ │ ├── controllers │ │ │ └── comment.php │ │ ├── helpers │ │ │ └── comment_helper.php │ │ ├── libraries │ │ │ └── comments_parser.php │ │ └── models │ │ │ └── comment_model.php │ ├── story │ │ ├── controllers │ │ │ └── story.php │ │ ├── helpers │ │ │ └── story_helper.php │ │ └── models │ │ │ └── story_model.php │ ├── user │ │ ├── controllers │ │ │ └── user.php │ │ ├── helpers │ │ │ └── user_helper.php │ │ └── models │ │ │ └── user_model.php │ └── vote │ │ ├── helpers │ │ └── vote_helper.php │ │ └── models │ │ └── vote_model.php ├── third_party │ ├── MX │ │ ├── Base.php │ │ ├── Ci.php │ │ ├── Config.php │ │ ├── Controller.php │ │ ├── Lang.php │ │ ├── Loader.php │ │ ├── Modules.php │ │ └── Router.php │ ├── Smarty │ │ ├── Smarty.class.php │ │ ├── SmartyBC.class.php │ │ ├── debug.tpl │ │ ├── plugins │ │ │ ├── block.textformat.php │ │ │ ├── function.counter.php │ │ │ ├── function.cycle.php │ │ │ ├── function.fetch.php │ │ │ ├── function.html_checkboxes.php │ │ │ ├── function.html_image.php │ │ │ ├── function.html_options.php │ │ │ ├── function.html_radios.php │ │ │ ├── function.html_select_date.php │ │ │ ├── function.html_select_time.php │ │ │ ├── function.html_table.php │ │ │ ├── function.mailto.php │ │ │ ├── function.math.php │ │ │ ├── modifier.capitalize.php │ │ │ ├── modifier.date_format.php │ │ │ ├── modifier.debug_print_var.php │ │ │ ├── modifier.escape.php │ │ │ ├── modifier.regex_replace.php │ │ │ ├── modifier.replace.php │ │ │ ├── modifier.spacify.php │ │ │ ├── modifier.truncate.php │ │ │ ├── modifiercompiler.cat.php │ │ │ ├── modifiercompiler.count_characters.php │ │ │ ├── modifiercompiler.count_paragraphs.php │ │ │ ├── modifiercompiler.count_sentences.php │ │ │ ├── modifiercompiler.count_words.php │ │ │ ├── modifiercompiler.default.php │ │ │ ├── modifiercompiler.escape.php │ │ │ ├── modifiercompiler.from_charset.php │ │ │ ├── modifiercompiler.indent.php │ │ │ ├── modifiercompiler.lower.php │ │ │ ├── modifiercompiler.noprint.php │ │ │ ├── modifiercompiler.string_format.php │ │ │ ├── modifiercompiler.strip.php │ │ │ ├── modifiercompiler.strip_tags.php │ │ │ ├── modifiercompiler.to_charset.php │ │ │ ├── modifiercompiler.unescape.php │ │ │ ├── modifiercompiler.upper.php │ │ │ ├── modifiercompiler.wordwrap.php │ │ │ ├── outputfilter.trimwhitespace.php │ │ │ ├── shared.escape_special_chars.php │ │ │ ├── shared.literal_compiler_param.php │ │ │ ├── shared.make_timestamp.php │ │ │ ├── shared.mb_str_replace.php │ │ │ ├── shared.mb_unicode.php │ │ │ ├── shared.mb_wordwrap.php │ │ │ └── variablefilter.htmlspecialchars.php │ │ └── sysplugins │ │ │ ├── smarty_cacheresource.php │ │ │ ├── smarty_cacheresource_custom.php │ │ │ ├── smarty_cacheresource_keyvaluestore.php │ │ │ ├── smarty_config_source.php │ │ │ ├── smarty_internal_cacheresource_file.php │ │ │ ├── smarty_internal_compile_append.php │ │ │ ├── smarty_internal_compile_assign.php │ │ │ ├── smarty_internal_compile_block.php │ │ │ ├── smarty_internal_compile_break.php │ │ │ ├── smarty_internal_compile_call.php │ │ │ ├── smarty_internal_compile_capture.php │ │ │ ├── smarty_internal_compile_config_load.php │ │ │ ├── smarty_internal_compile_continue.php │ │ │ ├── smarty_internal_compile_debug.php │ │ │ ├── smarty_internal_compile_eval.php │ │ │ ├── smarty_internal_compile_extends.php │ │ │ ├── smarty_internal_compile_for.php │ │ │ ├── smarty_internal_compile_foreach.php │ │ │ ├── smarty_internal_compile_function.php │ │ │ ├── smarty_internal_compile_if.php │ │ │ ├── smarty_internal_compile_include.php │ │ │ ├── smarty_internal_compile_include_php.php │ │ │ ├── smarty_internal_compile_insert.php │ │ │ ├── smarty_internal_compile_ldelim.php │ │ │ ├── smarty_internal_compile_nocache.php │ │ │ ├── smarty_internal_compile_private_block_plugin.php │ │ │ ├── smarty_internal_compile_private_function_plugin.php │ │ │ ├── smarty_internal_compile_private_modifier.php │ │ │ ├── smarty_internal_compile_private_object_block_function.php │ │ │ ├── smarty_internal_compile_private_object_function.php │ │ │ ├── smarty_internal_compile_private_print_expression.php │ │ │ ├── smarty_internal_compile_private_registered_block.php │ │ │ ├── smarty_internal_compile_private_registered_function.php │ │ │ ├── smarty_internal_compile_private_special_variable.php │ │ │ ├── smarty_internal_compile_rdelim.php │ │ │ ├── smarty_internal_compile_section.php │ │ │ ├── smarty_internal_compile_setfilter.php │ │ │ ├── smarty_internal_compile_while.php │ │ │ ├── smarty_internal_compilebase.php │ │ │ ├── smarty_internal_config.php │ │ │ ├── smarty_internal_config_file_compiler.php │ │ │ ├── smarty_internal_configfilelexer.php │ │ │ ├── smarty_internal_configfileparser.php │ │ │ ├── smarty_internal_data.php │ │ │ ├── smarty_internal_debug.php │ │ │ ├── smarty_internal_filter_handler.php │ │ │ ├── smarty_internal_function_call_handler.php │ │ │ ├── smarty_internal_get_include_path.php │ │ │ ├── smarty_internal_nocache_insert.php │ │ │ ├── smarty_internal_parsetree.php │ │ │ ├── smarty_internal_resource_eval.php │ │ │ ├── smarty_internal_resource_extends.php │ │ │ ├── smarty_internal_resource_file.php │ │ │ ├── smarty_internal_resource_php.php │ │ │ ├── smarty_internal_resource_registered.php │ │ │ ├── smarty_internal_resource_stream.php │ │ │ ├── smarty_internal_resource_string.php │ │ │ ├── smarty_internal_smartytemplatecompiler.php │ │ │ ├── smarty_internal_template.php │ │ │ ├── smarty_internal_templatebase.php │ │ │ ├── smarty_internal_templatecompilerbase.php │ │ │ ├── smarty_internal_templatelexer.php │ │ │ ├── smarty_internal_templateparser.php │ │ │ ├── smarty_internal_utility.php │ │ │ ├── smarty_internal_write_file.php │ │ │ ├── smarty_resource.php │ │ │ ├── smarty_resource_custom.php │ │ │ ├── smarty_resource_recompiled.php │ │ │ ├── smarty_resource_uncompiled.php │ │ │ └── smarty_security.php │ ├── datamapper │ │ ├── bootstrap.php │ │ └── system │ │ │ ├── DB.php │ │ │ ├── DB_driver.php │ │ │ ├── Lang.php │ │ │ └── Loader.php │ └── index.html └── views │ ├── errors │ ├── error_404.php │ ├── error_db.php │ ├── error_general.php │ ├── error_php.php │ └── index.html │ ├── index.html │ └── welcome_message.php ├── index.php ├── installer ├── core │ ├── cache │ │ ├── index.html │ │ └── smarty │ │ │ ├── compiled │ │ │ └── index.html │ │ │ └── index.html │ ├── config │ │ ├── autoload.php │ │ ├── config.php │ │ ├── constants.php │ │ ├── database.php │ │ ├── doctypes.php │ │ ├── foreign_chars.php │ │ ├── form_validation.php │ │ ├── hooks.php │ │ ├── index.html │ │ ├── memcached.php │ │ ├── migration.php │ │ ├── mimes.php │ │ ├── profiler.php │ │ ├── routes.php │ │ ├── smarty.php │ │ ├── smileys.php │ │ ├── user_agents.php │ │ └── wolfauth.php │ ├── controllers │ │ ├── ajax.php │ │ ├── index.html │ │ └── installer.php │ ├── helpers │ │ └── parser_helper.php │ ├── index.html │ ├── language │ │ └── english │ │ │ └── install_lang.php │ ├── libraries │ │ ├── MY_Parser.php │ │ └── Smarty.php │ ├── models │ │ └── index.html │ ├── third_party │ │ └── Smarty │ │ │ ├── Smarty.class.php │ │ │ ├── SmartyBC.class.php │ │ │ ├── debug.tpl │ │ │ ├── plugins │ │ │ ├── block.textformat.php │ │ │ ├── function.counter.php │ │ │ ├── function.cycle.php │ │ │ ├── function.fetch.php │ │ │ ├── function.html_checkboxes.php │ │ │ ├── function.html_image.php │ │ │ ├── function.html_options.php │ │ │ ├── function.html_radios.php │ │ │ ├── function.html_select_date.php │ │ │ ├── function.html_select_time.php │ │ │ ├── function.html_table.php │ │ │ ├── function.mailto.php │ │ │ ├── function.math.php │ │ │ ├── modifier.capitalize.php │ │ │ ├── modifier.date_format.php │ │ │ ├── modifier.debug_print_var.php │ │ │ ├── modifier.escape.php │ │ │ ├── modifier.regex_replace.php │ │ │ ├── modifier.replace.php │ │ │ ├── modifier.spacify.php │ │ │ ├── modifier.truncate.php │ │ │ ├── modifiercompiler.cat.php │ │ │ ├── modifiercompiler.count_characters.php │ │ │ ├── modifiercompiler.count_paragraphs.php │ │ │ ├── modifiercompiler.count_sentences.php │ │ │ ├── modifiercompiler.count_words.php │ │ │ ├── modifiercompiler.default.php │ │ │ ├── modifiercompiler.escape.php │ │ │ ├── modifiercompiler.from_charset.php │ │ │ ├── modifiercompiler.indent.php │ │ │ ├── modifiercompiler.lower.php │ │ │ ├── modifiercompiler.noprint.php │ │ │ ├── modifiercompiler.string_format.php │ │ │ ├── modifiercompiler.strip.php │ │ │ ├── modifiercompiler.strip_tags.php │ │ │ ├── modifiercompiler.to_charset.php │ │ │ ├── modifiercompiler.unescape.php │ │ │ ├── modifiercompiler.upper.php │ │ │ ├── modifiercompiler.wordwrap.php │ │ │ ├── outputfilter.trimwhitespace.php │ │ │ ├── shared.escape_special_chars.php │ │ │ ├── shared.literal_compiler_param.php │ │ │ ├── shared.make_timestamp.php │ │ │ ├── shared.mb_str_replace.php │ │ │ ├── shared.mb_unicode.php │ │ │ ├── shared.mb_wordwrap.php │ │ │ └── variablefilter.htmlspecialchars.php │ │ │ └── sysplugins │ │ │ ├── smarty_cacheresource.php │ │ │ ├── smarty_cacheresource_custom.php │ │ │ ├── smarty_cacheresource_keyvaluestore.php │ │ │ ├── smarty_config_source.php │ │ │ ├── smarty_internal_cacheresource_file.php │ │ │ ├── smarty_internal_compile_append.php │ │ │ ├── smarty_internal_compile_assign.php │ │ │ ├── smarty_internal_compile_block.php │ │ │ ├── smarty_internal_compile_break.php │ │ │ ├── smarty_internal_compile_call.php │ │ │ ├── smarty_internal_compile_capture.php │ │ │ ├── smarty_internal_compile_config_load.php │ │ │ ├── smarty_internal_compile_continue.php │ │ │ ├── smarty_internal_compile_debug.php │ │ │ ├── smarty_internal_compile_eval.php │ │ │ ├── smarty_internal_compile_extends.php │ │ │ ├── smarty_internal_compile_for.php │ │ │ ├── smarty_internal_compile_foreach.php │ │ │ ├── smarty_internal_compile_function.php │ │ │ ├── smarty_internal_compile_if.php │ │ │ ├── smarty_internal_compile_include.php │ │ │ ├── smarty_internal_compile_include_php.php │ │ │ ├── smarty_internal_compile_insert.php │ │ │ ├── smarty_internal_compile_ldelim.php │ │ │ ├── smarty_internal_compile_nocache.php │ │ │ ├── smarty_internal_compile_private_block_plugin.php │ │ │ ├── smarty_internal_compile_private_function_plugin.php │ │ │ ├── smarty_internal_compile_private_modifier.php │ │ │ ├── smarty_internal_compile_private_object_block_function.php │ │ │ ├── smarty_internal_compile_private_object_function.php │ │ │ ├── smarty_internal_compile_private_print_expression.php │ │ │ ├── smarty_internal_compile_private_registered_block.php │ │ │ ├── smarty_internal_compile_private_registered_function.php │ │ │ ├── smarty_internal_compile_private_special_variable.php │ │ │ ├── smarty_internal_compile_rdelim.php │ │ │ ├── smarty_internal_compile_section.php │ │ │ ├── smarty_internal_compile_setfilter.php │ │ │ ├── smarty_internal_compile_while.php │ │ │ ├── smarty_internal_compilebase.php │ │ │ ├── smarty_internal_config.php │ │ │ ├── smarty_internal_config_file_compiler.php │ │ │ ├── smarty_internal_configfilelexer.php │ │ │ ├── smarty_internal_configfileparser.php │ │ │ ├── smarty_internal_data.php │ │ │ ├── smarty_internal_debug.php │ │ │ ├── smarty_internal_filter_handler.php │ │ │ ├── smarty_internal_function_call_handler.php │ │ │ ├── smarty_internal_get_include_path.php │ │ │ ├── smarty_internal_nocache_insert.php │ │ │ ├── smarty_internal_parsetree.php │ │ │ ├── smarty_internal_resource_eval.php │ │ │ ├── smarty_internal_resource_extends.php │ │ │ ├── smarty_internal_resource_file.php │ │ │ ├── smarty_internal_resource_php.php │ │ │ ├── smarty_internal_resource_registered.php │ │ │ ├── smarty_internal_resource_stream.php │ │ │ ├── smarty_internal_resource_string.php │ │ │ ├── smarty_internal_smartytemplatecompiler.php │ │ │ ├── smarty_internal_template.php │ │ │ ├── smarty_internal_templatebase.php │ │ │ ├── smarty_internal_templatecompilerbase.php │ │ │ ├── smarty_internal_templatelexer.php │ │ │ ├── smarty_internal_templateparser.php │ │ │ ├── smarty_internal_utility.php │ │ │ ├── smarty_internal_write_file.php │ │ │ ├── smarty_resource.php │ │ │ ├── smarty_resource_custom.php │ │ │ ├── smarty_resource_recompiled.php │ │ │ ├── smarty_resource_uncompiled.php │ │ │ └── smarty_security.php │ └── views │ │ ├── errors │ │ ├── error_404.php │ │ ├── error_db.php │ │ ├── error_general.php │ │ ├── error_php.php │ │ └── index.html │ │ ├── index.html │ │ └── step1.tpl ├── css │ ├── install.css │ ├── install.less │ ├── media_queries.less │ ├── mixins.less │ ├── normalize.less │ └── variables.less └── index.php ├── modules └── index.html ├── 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_cache.php │ ├── DB_driver.php │ ├── DB_forge.php │ ├── DB_query_builder.php │ ├── DB_result.php │ ├── DB_utility.php │ ├── drivers │ │ ├── cubrid │ │ │ ├── cubrid_driver.php │ │ │ ├── cubrid_forge.php │ │ │ ├── cubrid_result.php │ │ │ ├── cubrid_utility.php │ │ │ └── index.html │ │ ├── ibase │ │ │ ├── ibase_driver.php │ │ │ ├── ibase_forge.php │ │ │ ├── ibase_result.php │ │ │ ├── ibase_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 │ │ │ └── subdrivers │ │ │ │ ├── index.html │ │ │ │ ├── pdo_4d_driver.php │ │ │ │ ├── pdo_cubrid_driver.php │ │ │ │ ├── pdo_dblib_driver.php │ │ │ │ ├── pdo_firebird_driver.php │ │ │ │ ├── pdo_ibm_driver.php │ │ │ │ ├── pdo_informix_driver.php │ │ │ │ ├── pdo_mysql_driver.php │ │ │ │ ├── pdo_oci_driver.php │ │ │ │ ├── pdo_odbc_driver.php │ │ │ │ ├── pdo_pgsql_driver.php │ │ │ │ ├── pdo_sqlite_driver.php │ │ │ │ └── pdo_sqlsrv_driver.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 │ │ ├── sqlite3 │ │ │ ├── index.html │ │ │ ├── sqlite3_driver.php │ │ │ ├── sqlite3_forge.php │ │ │ ├── sqlite3_result.php │ │ │ └── sqlite3_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 │ │ ├── Cache_redis.php │ │ └── Cache_wincache.php │ ├── 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 │ ├── Session.php │ └── drivers │ │ ├── Session_cookie.php │ │ └── Session_native.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 ├── tests ├── Bootstrap.php ├── README.md ├── codeigniter │ ├── Setup_test.php │ ├── core │ │ ├── Benchmark_test.php │ │ ├── Common_test.php │ │ ├── Config_test.php │ │ ├── Input_test.php │ │ ├── Lang_test.php │ │ ├── Loader_test.php │ │ ├── Security_test.php │ │ └── URI_test.php │ ├── database │ │ ├── DB_driver_test.php │ │ ├── DB_test.php │ │ └── query_builder │ │ │ ├── count_test.php │ │ │ ├── delete_test.php │ │ │ ├── distinct_test.php │ │ │ ├── empty_test.php │ │ │ ├── escape_test.php │ │ │ ├── from_test.php │ │ │ ├── get_test.php │ │ │ ├── group_test.php │ │ │ ├── insert_test.php │ │ │ ├── join_test.php │ │ │ ├── like_test.php │ │ │ ├── limit_test.php │ │ │ ├── order_test.php │ │ │ ├── select_test.php │ │ │ ├── truncate_test.php │ │ │ ├── update_test.php │ │ │ └── where_test.php │ ├── helpers │ │ ├── array_helper_test.php │ │ ├── date_helper_test.php │ │ ├── directory_helper_test.php │ │ ├── email_helper_test.php │ │ ├── file_helper_test.php │ │ ├── form_helper_test.php │ │ ├── html_helper_test.php │ │ ├── inflector_helper_test.php │ │ ├── number_helper_test.php │ │ ├── path_helper_test.php │ │ ├── string_helper_test.php │ │ ├── text_helper_test.php │ │ ├── url_helper_test.php │ │ └── xml_helper_test.php │ └── libraries │ │ ├── Encrypt_test.php │ │ ├── Parser_test.php │ │ ├── Session_test.php │ │ ├── Table_test.php │ │ ├── Typography_test.php │ │ ├── Upload_test.php │ │ └── Useragent_test.php ├── mocks │ ├── autoloader.php │ ├── ci_testcase.php │ ├── core │ │ ├── benchmark.php │ │ ├── common.php │ │ ├── input.php │ │ ├── lang.php │ │ ├── loader.php │ │ ├── security.php │ │ ├── uri.php │ │ └── utf8.php │ ├── database │ │ ├── ci_test.sqlite │ │ ├── config │ │ │ ├── mysql.php │ │ │ ├── pdo │ │ │ │ ├── mysql.php │ │ │ │ ├── pgsql.php │ │ │ │ └── sqlite.php │ │ │ ├── pgsql.php │ │ │ └── sqlite.php │ │ ├── db.php │ │ ├── db │ │ │ ├── driver.php │ │ │ └── querybuilder.php │ │ ├── drivers │ │ │ ├── mysql.php │ │ │ ├── pdo.php │ │ │ ├── postgre.php │ │ │ └── sqlite.php │ │ └── schema │ │ │ └── skeleton.php │ ├── libraries │ │ ├── encrypt.php │ │ ├── parser.php │ │ ├── session.php │ │ ├── table.php │ │ ├── typography.php │ │ ├── upload.php │ │ └── useragent.php │ └── uploads │ │ └── ci_logo.gif ├── phpunit.xml └── travis │ ├── mysql.phpunit.xml │ ├── pdo │ ├── mysql.phpunit.xml │ ├── pgsql.phpunit.xml │ └── sqlite.phpunit.xml │ ├── pgsql.phpunit.xml │ └── sqlite.phpunit.xml ├── themes └── zebra │ ├── css │ ├── admin.less │ ├── media_queries.less │ ├── mixins.less │ ├── normalize.less │ ├── variables.less │ ├── zebra.css │ └── zebra.less │ ├── js │ ├── zebra.api.js │ └── zebra.js │ └── views │ ├── add.tpl │ ├── admin │ ├── index.tpl │ ├── login.tpl │ └── stories.tpl │ ├── comment.tpl │ ├── comments.tpl │ ├── edit_comment.tpl │ ├── layouts │ ├── layout.admin.tpl │ └── layout.zebra.tpl │ ├── login.tpl │ ├── profile.tpl │ ├── register.tpl │ ├── stories.tpl │ └── story.tpl └── zebra.sql /.gitignore: -------------------------------------------------------------------------------- 1 | */config/development 2 | */logs/log-*.php 3 | */logs/!index.html 4 | */cache/* 5 | */cache/!index.html 6 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options +FollowSymLinks -Indexes 4 | RewriteEngine on 5 | 6 | RewriteBase /zebra 7 | 8 | RewriteCond %{REQUEST_FILENAME} !-f 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | 11 | RewriteRule ^(.*)$ index.php/$1 [L] 12 | 13 | 14 | 15 | ErrorDocument 404 index.php 16 | 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Zebra 2 | ===== 3 | 4 | An open source and stripped back news submission website like Hacker News so you can create your own independent site. Built on-top of Codeigniter PHP Framework. If you are sick of the current state of Hacker News, the mainstream and sometimes hard to participate in community of Reddit or the lame news website Digg (yes, even the rebrand) launch your own, style it and profit $$$ 5 | 6 | (okay, so maybe we lied about the profit part.) 7 | 8 | Zebra is a social news website application in a box only without the pretty wrapping paper. User accounts (including profiles), secure hashing and authentication of user info, anti-spam functionality including community moderation features like Stack Overflow and a simple website even your grandma could understand the inner-workings of. 9 | 10 | At present Zebra is very basic. Simple login/registration, simple profiles, simple voting and lots of missing pieces. At present it works but has no installer and is missing a lot of functionality. 11 | 12 | You can read about it here: http://ilikekillnerds.com/2012/08/introducing-zebra-an-open-source-social-news-application/ - updates will be posted as often as possible in relation to the progress of Zebra on my blog. 13 | 14 | Templating & Theming Zebra 15 | === 16 | 17 | All template files are located in the root directory themes folder. Currently there is only one theme called, 'Zebra' which contains all of the theme assets and the view files in TPL format utilising Smarty templating to make things easier to style and work with. The Smarty functionality uses another library I maintain called CI Smarty - https://github.com/Vheissu/Ci-Smarty - which allows you to add in Smarty and theme support into your Codeigniter apps. -------------------------------------------------------------------------------- /application/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/config/memcached.php: -------------------------------------------------------------------------------- 1 | array( 39 | 'hostname' => '127.0.0.1', 40 | 'port' => '11211', 41 | 'weight' => '1', 42 | ), 43 | ); 44 | 45 | /* End of file memcached.php */ 46 | /* Location: ./application/config/memcached.php */ -------------------------------------------------------------------------------- /application/config/profiler.php: -------------------------------------------------------------------------------- 1 | 'sha256', 9 | 10 | // Hash key by default uses the encryption key in the config/config.php file 11 | // You can change this to something else if you wish 12 | 'hash.key' => config_item('encryption_key'), 13 | 14 | //The database field used to log a user in 15 | 'login.field' => 'username', 16 | 17 | // The name of the site (used for emails, etc) 18 | 'site.name' => 'Wolfauth Test', 19 | 20 | // Which email address should all auth emails come from 21 | 'site.admin_email' => 'do-not-reply@localhost', 22 | 23 | // Are registered users required to confirm their account by email? 24 | 'register.require_email_confirmation' => 1, 25 | 26 | // Register status (1 is enabled and 0 is disabled) 27 | 'register.status' => 1, 28 | 29 | // The amount of failed login attempts before you're banned for a specified amount of time 30 | 'login.max_attempts' => 3, 31 | 32 | // How long to lock out someone after 3 failed attempts in seconds 33 | // Default is 10 minutes which equals 600 seconds 34 | 'login.max_attempts_lockout' => 600, 35 | 36 | // What roles are considered admin 37 | 'roles.admin' => array('admin', 'super_admin') 38 | 39 | ); -------------------------------------------------------------------------------- /application/controllers/admin/admin.php: -------------------------------------------------------------------------------- 1 | login(); 8 | } 9 | 10 | public function login() 11 | { 12 | if ($this->form_validation->run('login') !== FALSE) 13 | { 14 | $username = $this->input->post('username'); 15 | $password = $this->input->post('password'); 16 | 17 | if ($this->wolfauth->login($username, $password)) 18 | { 19 | redirect('admin/dashboard'); 20 | } 21 | else 22 | { 23 | $this->session->set_flashdata('error', $this->wolfauth->auth_errors()); 24 | $this->parser->parse('login', $this->data); 25 | } 26 | } 27 | else 28 | { 29 | if (logged_in() && !is_admin()) 30 | { 31 | set_flashdata("error", lang('no_permission')); 32 | redirect('/'); 33 | } 34 | 35 | if (!logged_in()) 36 | { 37 | $this->parser->parse('admin/login.tpl', $this->data); 38 | 39 | return; 40 | } 41 | 42 | // If we are logged in and admin, redirect 43 | if (logged_in() && is_admin()) 44 | { 45 | redirect('admin/dashboard'); 46 | } 47 | } 48 | } 49 | } 50 | 51 | /* End of file admin.php */ 52 | /* Location: ./application/controllers/admin.php */ -------------------------------------------------------------------------------- /application/controllers/admin/dashboard.php: -------------------------------------------------------------------------------- 1 | load->helper('date'); 10 | $this->load->model('story/story_model'); 11 | } 12 | 13 | public function index() 14 | { 15 | $obj = new stdClass; 16 | $obj->last_submission = $this->story_model->last_submission(); 17 | $obj->total_submissions = $this->story_model->total_stories(); 18 | 19 | $this->data['analytics'] = $obj; 20 | $this->parser->parse('admin/index.tpl', $this->data); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /application/controllers/admin/stories.php: -------------------------------------------------------------------------------- 1 | load->helper('date'); 10 | $this->load->helper('story/story'); 11 | $this->load->helper('comment/comment'); 12 | $this->load->model('story/story_model'); 13 | $this->load->model('comment/comment_model'); 14 | } 15 | 16 | public function index() 17 | { 18 | $page = $this->uri->segment(3, 0); 19 | $limit = $this->uri->segment(4, 50); 20 | 21 | $this->data['stories'] = $this->story_model->get_new_stories($limit, $page); 22 | 23 | $this->parser->parse('admin/stories.tpl', $this->data); 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/controllers/welcome.php: -------------------------------------------------------------------------------- 1 | load->model('story_model', 'story'); 8 | 9 | // Get all stories 10 | $this->data['stories'] = $this->story->get_all(); 11 | 12 | $this->parser->parse('stories', $this->data); 13 | } 14 | } 15 | 16 | /* End of file welcome.php */ 17 | /* Location: ./application/controllers/welcome.php */ -------------------------------------------------------------------------------- /application/core/MY_Controller.php: -------------------------------------------------------------------------------- 1 | data['site'] = array( 12 | 'name' => 'Zebra', 13 | 'description' => 'An open source social news application' 14 | ); 15 | 16 | $this->parser->set_theme('zebra'); 17 | } 18 | 19 | } 20 | 21 | class Admin_Controller extends MY_Controller { 22 | 23 | public function __construct() 24 | { 25 | parent::__construct(); 26 | 27 | if (!is_admin()) 28 | { 29 | set_flashdata("error", lang('no_permission')); 30 | redirect('/'); 31 | } 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /application/core/MY_Loader.php: -------------------------------------------------------------------------------- 1 | output->enable_profiler(TRUE) active Smarty debug to simplify 21 | if (class_exists('CI_Controller') && class_exists('Smarty_Internal_Debug') && (config_item('smarty_debug') || $this->enable_profiler)) 22 | { 23 | $CI =& get_instance(); 24 | Smarty_Internal_Debug::display_debug( $CI->smarty); 25 | } 26 | } 27 | } 28 | // END MY_Output Class 29 | 30 | /* End of file MY_Output.php */ 31 | /* Location: ./application/core/MY_Output.php */ -------------------------------------------------------------------------------- /application/core/MY_Router.php: -------------------------------------------------------------------------------- 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/helpers/parser_helper.php: -------------------------------------------------------------------------------- 1 | parser->theme_url($location); 30 | } 31 | 32 | /** 33 | * CSS 34 | * 35 | * A helper function for getting the current theme CSS embed code 36 | * in a web friendly format 37 | * 38 | * @param $file 39 | * @param $attributes 40 | */ 41 | function css($file, $attributes = array()) 42 | { 43 | $CI =& get_instance(); 44 | 45 | echo $CI->parser->css($file, $attributes); 46 | } 47 | 48 | /** 49 | * JS 50 | * 51 | * A helper function for getting the current theme JS embed code 52 | * in a web friendly format 53 | * 54 | * @param $file 55 | * @param $attributes 56 | */ 57 | function js($file, $attributes = array()) 58 | { 59 | $CI =& get_instance(); 60 | 61 | echo $CI->parser->js($file, $attributes); 62 | } 63 | 64 | /** 65 | * IMG 66 | * 67 | * A helper function for getting the current theme IMG embed code 68 | * in a web friendly format 69 | * 70 | * @param $file 71 | * @param $attributes 72 | */ 73 | function img($file, $attributes = array()) 74 | { 75 | $CI =& get_instance(); 76 | 77 | echo $CI->parser->img($file, $attributes); 78 | } -------------------------------------------------------------------------------- /application/helpers/zebra_helper.php: -------------------------------------------------------------------------------- 1 | 50) 32 | { 33 | $host = substr($host, 0, 47) . '...'; 34 | } 35 | 36 | return $host; 37 | } -------------------------------------------------------------------------------- /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/ca/datamapper_lang.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /application/modules/user/helpers/user_helper.php: -------------------------------------------------------------------------------- 1 | load->model('user/user_model', 'user'); 7 | 8 | if ($user_id == 0) 9 | { 10 | $user_id = current_user_id(); 11 | } 12 | 13 | return $CI->user->get_user_karma($user_id); 14 | } 15 | 16 | function calculate_average_karma($user_id = 0) 17 | { 18 | $CI =& get_instance(); 19 | $CI->load->model('user/user_model', 'user'); 20 | 21 | if ($user_id == 0) 22 | { 23 | $user_id = current_user_id(); 24 | } 25 | 26 | return $CI->user->calculate_average_karma($user_id); 27 | } 28 | 29 | function calculate_average_submissions($user_id = 0) 30 | { 31 | $CI =& get_instance(); 32 | $CI->load->model('user/user_model', 'user'); 33 | 34 | if ($user_id == 0) 35 | { 36 | $user_id = current_user_id(); 37 | } 38 | 39 | return $CI->user->calculate_average_submissions($user_id); 40 | } -------------------------------------------------------------------------------- /application/modules/vote/helpers/vote_helper.php: -------------------------------------------------------------------------------- 1 | load->model('vote/vote_model', 'vote'); 7 | 8 | return $CI->vote->get_downvote_reasons(); 9 | } -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifier.regex_replace.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: regex_replace
14 | * Purpose: regular expression search/replace 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php 17 | * regex_replace (Smarty online manual) 18 | * @author Monte Ohrt 19 | * @param string $string input string 20 | * @param string|array $search regular expression(s) to search for 21 | * @param string|array $replace string(s) that should be replaced 22 | * @return string 23 | */ 24 | function smarty_modifier_regex_replace($string, $search, $replace) 25 | { 26 | if(is_array($search)) { 27 | foreach($search as $idx => $s) { 28 | $search[$idx] = _smarty_regex_replace_check($s); 29 | } 30 | } else { 31 | $search = _smarty_regex_replace_check($search); 32 | } 33 | return preg_replace($search, $replace, $string); 34 | } 35 | 36 | /** 37 | * @param string $search string(s) that should be replaced 38 | * @return string 39 | * @ignore 40 | */ 41 | function _smarty_regex_replace_check($search) 42 | { 43 | // null-byte injection detection 44 | // anything behind the first null-byte is ignored 45 | if (($pos = strpos($search,"\0")) !== false) { 46 | $search = substr($search,0,$pos); 47 | } 48 | // remove eval-modifier from $search 49 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { 50 | $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); 51 | } 52 | return $search; 53 | } 54 | 55 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifier.replace.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: replace
13 | * Purpose: simple search/replace 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param string $string input string 19 | * @param string $search text to search for 20 | * @param string $replace replacement text 21 | * @return string 22 | */ 23 | function smarty_modifier_replace($string, $search, $replace) 24 | { 25 | if (Smarty::$_MBSTRING) { 26 | require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php'); 27 | return smarty_mb_str_replace($search, $replace, $string); 28 | } 29 | 30 | return str_replace($search, $replace, $string); 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifier.spacify.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: spacify
13 | * Purpose: add spaces between characters in a string 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @param string $string input string 18 | * @param string $spacify_char string to insert between characters. 19 | * @return string 20 | */ 21 | function smarty_modifier_spacify($string, $spacify_char = ' ') 22 | { 23 | // well… what about charsets besides latin and UTF-8? 24 | return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, -1, PREG_SPLIT_NO_EMPTY)); 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.cat.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: cat
14 | * Date: Feb 24, 2003
15 | * Purpose: catenate a value to a variable
16 | * Input: string to catenate
17 | * Example: {$var|cat:"foo"} 18 | * 19 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat 20 | * (Smarty online manual) 21 | * @author Uwe Tews 22 | * @param array $params parameters 23 | * @return string with compiled code 24 | */ 25 | function smarty_modifiercompiler_cat($params, $compiler) 26 | { 27 | return '('.implode(').(', $params).')'; 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.count_characters.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_characteres
14 | * Purpose: count the number of characters in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_characters($params, $compiler) 22 | { 23 | if (!isset($params[1]) || $params[1] != 'true') { 24 | return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)'; 25 | } 26 | if (Smarty::$_MBSTRING) { 27 | return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; 28 | } 29 | // no MBString fallback 30 | return 'strlen(' . $params[0] . ')'; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_paragraphs
14 | * Purpose: count the number of paragraphs in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 17 | * count_paragraphs (Smarty online manual) 18 | * @author Uwe Tews 19 | * @param array $params parameters 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_paragraphs($params, $compiler) 23 | { 24 | // count \r or \n characters 25 | return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)'; 26 | } 27 | 28 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.count_sentences.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_sentences 14 | * Purpose: count the number of sentences in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 17 | * count_sentences (Smarty online manual) 18 | * @author Uwe Tews 19 | * @param array $params parameters 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_sentences($params, $compiler) 23 | { 24 | // find periods, question marks, exclamation marks with a word before but not after. 25 | return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)'; 26 | } 27 | 28 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.count_words.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_words
14 | * Purpose: count the number of words in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_words($params, $compiler) 22 | { 23 | if (Smarty::$_MBSTRING) { 24 | // return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 25 | // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592 26 | return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 27 | } 28 | // no MBString fallback 29 | return 'str_word_count(' . $params[0] . ')'; 30 | } 31 | 32 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.default.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: default
14 | * Purpose: designate default value for empty variables 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_default ($params, $compiler) 22 | { 23 | $output = $params[0]; 24 | if (!isset($params[1])) { 25 | $params[1] = "''"; 26 | } 27 | 28 | array_shift($params); 29 | foreach ($params as $param) { 30 | $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; 31 | } 32 | return $output; 33 | } 34 | 35 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.from_charset.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: from_charset
14 | * Purpose: convert character encoding from $charset to internal encoding 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_from_charset($params, $compiler) 21 | { 22 | if (!Smarty::$_MBSTRING) { 23 | // FIXME: (rodneyrehm) shouldn't this throw an error? 24 | return $params[0]; 25 | } 26 | 27 | if (!isset($params[1])) { 28 | $params[1] = '"ISO-8859-1"'; 29 | } 30 | 31 | return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')'; 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.indent.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: indent
13 | * Purpose: indent lines of text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual) 16 | * @author Uwe Tews 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | 21 | function smarty_modifiercompiler_indent($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 4; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = "' '"; 28 | } 29 | return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')'; 30 | } 31 | 32 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.lower.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: lower
13 | * Purpose: convert string to lowercase 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | 22 | function smarty_modifiercompiler_lower($params, $compiler) 23 | { 24 | if (Smarty::$_MBSTRING) { 25 | return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ; 26 | } 27 | // no MBString fallback 28 | return 'strtolower(' . $params[0] . ')'; 29 | } 30 | 31 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.noprint.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: noprint
14 | * Purpose: return an empty string 15 | * 16 | * @author Uwe Tews 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_noprint($params, $compiler) 21 | { 22 | return "''"; 23 | } 24 | 25 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.string_format.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: string_format
14 | * Purpose: format strings via sprintf 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_string_format($params, $compiler) 22 | { 23 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')'; 24 | } 25 | 26 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.strip.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip
14 | * Purpose: Replace all repeated spaces, newlines, tabs 15 | * with a single space or supplied replacement string.
16 | * Example: {$var|strip} {$var|strip:" "}
17 | * Date: September 25th, 2002 18 | * 19 | * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual) 20 | * @author Uwe Tews 21 | * @param array $params parameters 22 | * @return string with compiled code 23 | */ 24 | 25 | function smarty_modifiercompiler_strip($params, $compiler) 26 | { 27 | if (!isset($params[1])) { 28 | $params[1] = "' '"; 29 | } 30 | return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})"; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.strip_tags.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip_tags
14 | * Purpose: strip html tags from text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_strip_tags($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = true; 25 | } 26 | if ($params[1] === true) { 27 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})"; 28 | } else { 29 | return 'strip_tags(' . $params[0] . ')'; 30 | } 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.to_charset.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: to_charset
14 | * Purpose: convert character encoding from internal encoding to $charset 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_to_charset($params, $compiler) 21 | { 22 | if (!Smarty::$_MBSTRING) { 23 | // FIXME: (rodneyrehm) shouldn't this throw an error? 24 | return $params[0]; 25 | } 26 | 27 | if (!isset($params[1])) { 28 | $params[1] = '"ISO-8859-1"'; 29 | } 30 | 31 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', "' . addslashes(Smarty::$_CHARSET) . '")'; 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.unescape.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: unescape
14 | * Purpose: unescape html entities 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_unescape($params, $compiler) 21 | { 22 | if (!isset($params[1])) { 23 | $params[1] = 'html'; 24 | } 25 | if (!isset($params[2])) { 26 | $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\''; 27 | } else { 28 | $params[2] = "'" . $params[2] . "'"; 29 | } 30 | 31 | switch (trim($params[1], '"\'')) { 32 | case 'entity': 33 | case 'htmlall': 34 | if (Smarty::$_MBSTRING) { 35 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')'; 36 | } 37 | 38 | return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')'; 39 | 40 | case 'html': 41 | return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)'; 42 | 43 | case 'url': 44 | return 'rawurldecode(' . $params[0] . ')'; 45 | 46 | default: 47 | return $params[0]; 48 | } 49 | } 50 | 51 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.upper.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: lower
14 | * Purpose: convert string to uppercase 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_upper($params, $compiler) 22 | { 23 | if (Smarty::$_MBSTRING) { 24 | return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ; 25 | } 26 | // no MBString fallback 27 | return 'strtoupper(' . $params[0] . ')'; 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/modifiercompiler.wordwrap.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: wordwrap
14 | * Purpose: wrap a string of text at a given length 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_wordwrap($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 80; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = '"\n"'; 28 | } 29 | if (!isset($params[3])) { 30 | $params[3] = 'false'; 31 | } 32 | $function = 'wordwrap'; 33 | if (Smarty::$_MBSTRING) { 34 | if ($compiler->tag_nocache | $compiler->nocache) { 35 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php'; 36 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 37 | } else { 38 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php'; 39 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 40 | } 41 | $function = 'smarty_mb_wordwrap'; 42 | } 43 | return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')'; 44 | } 45 | 46 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/shared.literal_compiler_param.php: -------------------------------------------------------------------------------- 1 | 11 | * Purpose: used by other smarty functions to make a timestamp from a string. 12 | * 13 | * @author Monte Ohrt 14 | * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime() 15 | * @return int 16 | */ 17 | function smarty_make_timestamp($string) 18 | { 19 | if (empty($string)) { 20 | // use "now": 21 | return time(); 22 | } elseif ($string instanceof DateTime) { 23 | return $string->getTimestamp(); 24 | } elseif (strlen($string) == 14 && ctype_digit($string)) { 25 | // it is mysql timestamp format of YYYYMMDDHHMMSS? 26 | return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2), 27 | substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4)); 28 | } elseif (is_numeric($string)) { 29 | // it is a numeric string, we handle it as timestamp 30 | return (int) $string; 31 | } else { 32 | // strtotime should handle it 33 | $time = strtotime($string); 34 | if ($time == -1 || $time === false) { 35 | // strtotime() was not able to parse $string, use "now": 36 | return time(); 37 | } 38 | return $time; 39 | } 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/shared.mb_unicode.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/third_party/Smarty/plugins/variablefilter.htmlspecialchars.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_compile_append.php: -------------------------------------------------------------------------------- 1 | required_attributes = array('var', 'value'); 32 | $this->shorttag_order = array('var', 'value'); 33 | $this->optional_attributes = array('scope', 'index'); 34 | // check and get attributes 35 | $_attr = $this->getAttributes($compiler, $args); 36 | // map to compile assign attributes 37 | if (isset($_attr['index'])) { 38 | $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; 39 | unset($_attr['index']); 40 | } else { 41 | $_params['smarty_internal_index'] = '[]'; 42 | } 43 | $_new_attr = array(); 44 | foreach ($_attr as $key => $value) { 45 | $_new_attr[] = array($key => $value); 46 | } 47 | // call compile assign 48 | return parent::compile($_new_attr, $compiler, $_params); 49 | } 50 | 51 | } 52 | 53 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_compile_block.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vheissu/Zebra/3e456f0def47c0ba3be224aee65478553c774eef/application/third_party/Smarty/sysplugins/smarty_internal_compile_block.php -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_compile_debug.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 32 | 33 | // compile always as nocache 34 | $compiler->tag_nocache = true; 35 | 36 | // display debug template 37 | $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>"; 38 | return $_output; 39 | } 40 | 41 | } 42 | 43 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_compile_ldelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | return $compiler->smarty->left_delimiter; 37 | } 38 | 39 | } 40 | 41 | ?> 42 | -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_compile_rdelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | return $compiler->smarty->right_delimiter; 37 | } 38 | 39 | } 40 | 41 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_internal_get_include_path.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_resource_recompiled.php: -------------------------------------------------------------------------------- 1 | filepath = false; 30 | $compiled->timestamp = false; 31 | $compiled->exists = false; 32 | } 33 | 34 | } 35 | 36 | ?> -------------------------------------------------------------------------------- /application/third_party/Smarty/sysplugins/smarty_resource_uncompiled.php: -------------------------------------------------------------------------------- 1 | filepath = false; 38 | $compiled->timestamp = false; 39 | $compiled->exists = false; 40 | } 41 | 42 | } 43 | 44 | ?> -------------------------------------------------------------------------------- /application/third_party/datamapper/system/Lang.php: -------------------------------------------------------------------------------- 1 | language[\$line])) ? FALSE : \$this->language[\$line]; 32 | } 33 | } 34 | CODE; 35 | 36 | // dynamically add our class extension 37 | eval($dmclass); 38 | unset($dmclass); 39 | 40 | // and update the name of the class to instantiate 41 | $name = 'DM_Lang'; 42 | 43 | /* End of file Lang.php */ 44 | /* Location: ./application/third_party/datamapper/system/Lang.php */ 45 | -------------------------------------------------------------------------------- /application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/cache/smarty/compiled/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/cache/smarty/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/config/memcached.php: -------------------------------------------------------------------------------- 1 | array( 39 | 'hostname' => '127.0.0.1', 40 | 'port' => '11211', 41 | 'weight' => '1', 42 | ), 43 | ); 44 | 45 | /* End of file memcached.php */ 46 | /* Location: ./application/config/memcached.php */ -------------------------------------------------------------------------------- /installer/core/config/profiler.php: -------------------------------------------------------------------------------- 1 | 'sha256', 9 | 10 | // Hash key by default uses the encryption key in the config/config.php file 11 | // You can change this to something else if you wish 12 | 'hash.key' => config_item('encryption_key'), 13 | 14 | //The database field used to log a user in 15 | 'login.field' => 'username', 16 | 17 | // The name of the site (used for emails, etc) 18 | 'site.name' => 'Wolfauth Test', 19 | 20 | // Which email address should all auth emails come from 21 | 'site.admin_email' => 'do-not-reply@localhost', 22 | 23 | // Are registered users required to confirm their account by email? 24 | 'register.require_email_confirmation' => 1, 25 | 26 | // Register status (1 is enabled and 0 is disabled) 27 | 'register.status' => 1, 28 | 29 | // The amount of failed login attempts before you're banned for a specified amount of time 30 | 'login.max_attempts' => 3, 31 | 32 | // How long to lock out someone after 3 failed attempts in seconds 33 | // Default is 10 minutes which equals 600 seconds 34 | 'login.max_attempts_lockout' => 600, 35 | 36 | // What roles are considered admin 37 | 'roles.admin' => array('admin', 'super_admin') 38 | 39 | ); -------------------------------------------------------------------------------- /installer/core/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/controllers/installer.php: -------------------------------------------------------------------------------- 1 | load->helper('url'); 10 | $this->load->helper('form'); 11 | } 12 | 13 | public function index($step = 1) 14 | { 15 | $this->parser->parse('step1.tpl'); 16 | } 17 | } 18 | 19 | /* End of file installer.php */ -------------------------------------------------------------------------------- /installer/core/helpers/parser_helper.php: -------------------------------------------------------------------------------- 1 | parser->theme_url($location); 30 | } 31 | 32 | /** 33 | * CSS 34 | * 35 | * A helper function for getting the current theme CSS embed code 36 | * in a web friendly format 37 | * 38 | * @param $file 39 | * @param $attributes 40 | */ 41 | function css($file, $attributes = array()) 42 | { 43 | $CI =& get_instance(); 44 | 45 | echo $CI->parser->css($file, $attributes); 46 | } 47 | 48 | /** 49 | * JS 50 | * 51 | * A helper function for getting the current theme JS embed code 52 | * in a web friendly format 53 | * 54 | * @param $file 55 | * @param $attributes 56 | */ 57 | function js($file, $attributes = array()) 58 | { 59 | $CI =& get_instance(); 60 | 61 | echo $CI->parser->js($file, $attributes); 62 | } 63 | 64 | /** 65 | * IMG 66 | * 67 | * A helper function for getting the current theme IMG embed code 68 | * in a web friendly format 69 | * 70 | * @param $file 71 | * @param $attributes 72 | */ 73 | function img($file, $attributes = array()) 74 | { 75 | $CI =& get_instance(); 76 | 77 | echo $CI->parser->img($file, $attributes); 78 | } -------------------------------------------------------------------------------- /installer/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifier.regex_replace.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: regex_replace
14 | * Purpose: regular expression search/replace 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php 17 | * regex_replace (Smarty online manual) 18 | * @author Monte Ohrt 19 | * @param string $string input string 20 | * @param string|array $search regular expression(s) to search for 21 | * @param string|array $replace string(s) that should be replaced 22 | * @return string 23 | */ 24 | function smarty_modifier_regex_replace($string, $search, $replace) 25 | { 26 | if(is_array($search)) { 27 | foreach($search as $idx => $s) { 28 | $search[$idx] = _smarty_regex_replace_check($s); 29 | } 30 | } else { 31 | $search = _smarty_regex_replace_check($search); 32 | } 33 | return preg_replace($search, $replace, $string); 34 | } 35 | 36 | /** 37 | * @param string $search string(s) that should be replaced 38 | * @return string 39 | * @ignore 40 | */ 41 | function _smarty_regex_replace_check($search) 42 | { 43 | // null-byte injection detection 44 | // anything behind the first null-byte is ignored 45 | if (($pos = strpos($search,"\0")) !== false) { 46 | $search = substr($search,0,$pos); 47 | } 48 | // remove eval-modifier from $search 49 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { 50 | $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); 51 | } 52 | return $search; 53 | } 54 | 55 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifier.replace.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: replace
13 | * Purpose: simple search/replace 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param string $string input string 19 | * @param string $search text to search for 20 | * @param string $replace replacement text 21 | * @return string 22 | */ 23 | function smarty_modifier_replace($string, $search, $replace) 24 | { 25 | if (Smarty::$_MBSTRING) { 26 | require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php'); 27 | return smarty_mb_str_replace($search, $replace, $string); 28 | } 29 | 30 | return str_replace($search, $replace, $string); 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifier.spacify.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: spacify
13 | * Purpose: add spaces between characters in a string 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @param string $string input string 18 | * @param string $spacify_char string to insert between characters. 19 | * @return string 20 | */ 21 | function smarty_modifier_spacify($string, $spacify_char = ' ') 22 | { 23 | // well… what about charsets besides latin and UTF-8? 24 | return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, -1, PREG_SPLIT_NO_EMPTY)); 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.cat.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: cat
14 | * Date: Feb 24, 2003
15 | * Purpose: catenate a value to a variable
16 | * Input: string to catenate
17 | * Example: {$var|cat:"foo"} 18 | * 19 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat 20 | * (Smarty online manual) 21 | * @author Uwe Tews 22 | * @param array $params parameters 23 | * @return string with compiled code 24 | */ 25 | function smarty_modifiercompiler_cat($params, $compiler) 26 | { 27 | return '('.implode(').(', $params).')'; 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.count_characters.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_characteres
14 | * Purpose: count the number of characters in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_characters($params, $compiler) 22 | { 23 | if (!isset($params[1]) || $params[1] != 'true') { 24 | return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)'; 25 | } 26 | if (Smarty::$_MBSTRING) { 27 | return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; 28 | } 29 | // no MBString fallback 30 | return 'strlen(' . $params[0] . ')'; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_paragraphs
14 | * Purpose: count the number of paragraphs in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 17 | * count_paragraphs (Smarty online manual) 18 | * @author Uwe Tews 19 | * @param array $params parameters 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_paragraphs($params, $compiler) 23 | { 24 | // count \r or \n characters 25 | return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)'; 26 | } 27 | 28 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.count_sentences.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_sentences 14 | * Purpose: count the number of sentences in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php 17 | * count_sentences (Smarty online manual) 18 | * @author Uwe Tews 19 | * @param array $params parameters 20 | * @return string with compiled code 21 | */ 22 | function smarty_modifiercompiler_count_sentences($params, $compiler) 23 | { 24 | // find periods, question marks, exclamation marks with a word before but not after. 25 | return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)'; 26 | } 27 | 28 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.count_words.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_words
14 | * Purpose: count the number of words in a text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_words($params, $compiler) 22 | { 23 | if (Smarty::$_MBSTRING) { 24 | // return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 25 | // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592 26 | return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)'; 27 | } 28 | // no MBString fallback 29 | return 'str_word_count(' . $params[0] . ')'; 30 | } 31 | 32 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.default.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: default
14 | * Purpose: designate default value for empty variables 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_default ($params, $compiler) 22 | { 23 | $output = $params[0]; 24 | if (!isset($params[1])) { 25 | $params[1] = "''"; 26 | } 27 | 28 | array_shift($params); 29 | foreach ($params as $param) { 30 | $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; 31 | } 32 | return $output; 33 | } 34 | 35 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.from_charset.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: from_charset
14 | * Purpose: convert character encoding from $charset to internal encoding 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_from_charset($params, $compiler) 21 | { 22 | if (!Smarty::$_MBSTRING) { 23 | // FIXME: (rodneyrehm) shouldn't this throw an error? 24 | return $params[0]; 25 | } 26 | 27 | if (!isset($params[1])) { 28 | $params[1] = '"ISO-8859-1"'; 29 | } 30 | 31 | return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')'; 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.indent.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: indent
13 | * Purpose: indent lines of text 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual) 16 | * @author Uwe Tews 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | 21 | function smarty_modifiercompiler_indent($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 4; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = "' '"; 28 | } 29 | return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')'; 30 | } 31 | 32 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.lower.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: lower
13 | * Purpose: convert string to lowercase 14 | * 15 | * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | 22 | function smarty_modifiercompiler_lower($params, $compiler) 23 | { 24 | if (Smarty::$_MBSTRING) { 25 | return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ; 26 | } 27 | // no MBString fallback 28 | return 'strtolower(' . $params[0] . ')'; 29 | } 30 | 31 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.noprint.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: noprint
14 | * Purpose: return an empty string 15 | * 16 | * @author Uwe Tews 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_noprint($params, $compiler) 21 | { 22 | return "''"; 23 | } 24 | 25 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.string_format.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: string_format
14 | * Purpose: format strings via sprintf 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_string_format($params, $compiler) 22 | { 23 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')'; 24 | } 25 | 26 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.strip.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip
14 | * Purpose: Replace all repeated spaces, newlines, tabs 15 | * with a single space or supplied replacement string.
16 | * Example: {$var|strip} {$var|strip:" "}
17 | * Date: September 25th, 2002 18 | * 19 | * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual) 20 | * @author Uwe Tews 21 | * @param array $params parameters 22 | * @return string with compiled code 23 | */ 24 | 25 | function smarty_modifiercompiler_strip($params, $compiler) 26 | { 27 | if (!isset($params[1])) { 28 | $params[1] = "' '"; 29 | } 30 | return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})"; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.strip_tags.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip_tags
14 | * Purpose: strip html tags from text 15 | * 16 | * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_strip_tags($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = true; 25 | } 26 | if ($params[1] === true) { 27 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})"; 28 | } else { 29 | return 'strip_tags(' . $params[0] . ')'; 30 | } 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.to_charset.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: to_charset
14 | * Purpose: convert character encoding from internal encoding to $charset 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_to_charset($params, $compiler) 21 | { 22 | if (!Smarty::$_MBSTRING) { 23 | // FIXME: (rodneyrehm) shouldn't this throw an error? 24 | return $params[0]; 25 | } 26 | 27 | if (!isset($params[1])) { 28 | $params[1] = '"ISO-8859-1"'; 29 | } 30 | 31 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', "' . addslashes(Smarty::$_CHARSET) . '")'; 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.unescape.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: unescape
14 | * Purpose: unescape html entities 15 | * 16 | * @author Rodney Rehm 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | function smarty_modifiercompiler_unescape($params, $compiler) 21 | { 22 | if (!isset($params[1])) { 23 | $params[1] = 'html'; 24 | } 25 | if (!isset($params[2])) { 26 | $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\''; 27 | } else { 28 | $params[2] = "'" . $params[2] . "'"; 29 | } 30 | 31 | switch (trim($params[1], '"\'')) { 32 | case 'entity': 33 | case 'htmlall': 34 | if (Smarty::$_MBSTRING) { 35 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')'; 36 | } 37 | 38 | return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')'; 39 | 40 | case 'html': 41 | return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)'; 42 | 43 | case 'url': 44 | return 'rawurldecode(' . $params[0] . ')'; 45 | 46 | default: 47 | return $params[0]; 48 | } 49 | } 50 | 51 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.upper.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: lower
14 | * Purpose: convert string to uppercase 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_upper($params, $compiler) 22 | { 23 | if (Smarty::$_MBSTRING) { 24 | return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ; 25 | } 26 | // no MBString fallback 27 | return 'strtoupper(' . $params[0] . ')'; 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/modifiercompiler.wordwrap.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: wordwrap
14 | * Purpose: wrap a string of text at a given length 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_wordwrap($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 80; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = '"\n"'; 28 | } 29 | if (!isset($params[3])) { 30 | $params[3] = 'false'; 31 | } 32 | $function = 'wordwrap'; 33 | if (Smarty::$_MBSTRING) { 34 | if ($compiler->tag_nocache | $compiler->nocache) { 35 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php'; 36 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 37 | } else { 38 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php'; 39 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap'; 40 | } 41 | $function = 'smarty_mb_wordwrap'; 42 | } 43 | return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')'; 44 | } 45 | 46 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/shared.literal_compiler_param.php: -------------------------------------------------------------------------------- 1 | 11 | * Purpose: used by other smarty functions to make a timestamp from a string. 12 | * 13 | * @author Monte Ohrt 14 | * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime() 15 | * @return int 16 | */ 17 | function smarty_make_timestamp($string) 18 | { 19 | if (empty($string)) { 20 | // use "now": 21 | return time(); 22 | } elseif ($string instanceof DateTime) { 23 | return $string->getTimestamp(); 24 | } elseif (strlen($string) == 14 && ctype_digit($string)) { 25 | // it is mysql timestamp format of YYYYMMDDHHMMSS? 26 | return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2), 27 | substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4)); 28 | } elseif (is_numeric($string)) { 29 | // it is a numeric string, we handle it as timestamp 30 | return (int) $string; 31 | } else { 32 | // strtotime should handle it 33 | $time = strtotime($string); 34 | if ($time == -1 || $time === false) { 35 | // strtotime() was not able to parse $string, use "now": 36 | return time(); 37 | } 38 | return $time; 39 | } 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/shared.mb_unicode.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/plugins/variablefilter.htmlspecialchars.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_append.php: -------------------------------------------------------------------------------- 1 | required_attributes = array('var', 'value'); 32 | $this->shorttag_order = array('var', 'value'); 33 | $this->optional_attributes = array('scope', 'index'); 34 | // check and get attributes 35 | $_attr = $this->getAttributes($compiler, $args); 36 | // map to compile assign attributes 37 | if (isset($_attr['index'])) { 38 | $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; 39 | unset($_attr['index']); 40 | } else { 41 | $_params['smarty_internal_index'] = '[]'; 42 | } 43 | $_new_attr = array(); 44 | foreach ($_attr as $key => $value) { 45 | $_new_attr[] = array($key => $value); 46 | } 47 | // call compile assign 48 | return parent::compile($_new_attr, $compiler, $_params); 49 | } 50 | 51 | } 52 | 53 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_block.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vheissu/Zebra/3e456f0def47c0ba3be224aee65478553c774eef/installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_block.php -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_debug.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 32 | 33 | // compile always as nocache 34 | $compiler->tag_nocache = true; 35 | 36 | // display debug template 37 | $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>"; 38 | return $_output; 39 | } 40 | 41 | } 42 | 43 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_ldelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | return $compiler->smarty->left_delimiter; 37 | } 38 | 39 | } 40 | 41 | ?> 42 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_compile_rdelim.php: -------------------------------------------------------------------------------- 1 | getAttributes($compiler, $args); 31 | if ($_attr['nocache'] === true) { 32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); 33 | } 34 | // this tag does not return compiled code 35 | $compiler->has_code = true; 36 | return $compiler->smarty->right_delimiter; 37 | } 38 | 39 | } 40 | 41 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_internal_get_include_path.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_resource_recompiled.php: -------------------------------------------------------------------------------- 1 | filepath = false; 30 | $compiled->timestamp = false; 31 | $compiled->exists = false; 32 | } 33 | 34 | } 35 | 36 | ?> -------------------------------------------------------------------------------- /installer/core/third_party/Smarty/sysplugins/smarty_resource_uncompiled.php: -------------------------------------------------------------------------------- 1 | filepath = false; 38 | $compiled->timestamp = false; 39 | $compiled->exists = false; 40 | } 41 | 42 | } 43 | 44 | ?> -------------------------------------------------------------------------------- /installer/core/views/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/core/views/step1.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Install Zebra 8 | 9 | 10 | 11 | 14 | 15 | 18 | 19 | 20 | 21 |
22 | 23 |

Step #1

24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /installer/css/install.less: -------------------------------------------------------------------------------- 1 | 2 | // Normalize is a CSS reset stylesheet, but only better 3 | @import "normalize"; 4 | @import "variables"; 5 | @import "mixins"; 6 | 7 | // Reset heights and widths 8 | html, 9 | body { 10 | height: 100%; 11 | width: 100%; 12 | } 13 | 14 | // Responsive imagery 15 | audio, video, img { 16 | height: auto; 17 | max-width: 100%; 18 | } 19 | 20 | * { 21 | .fixboxmodel; 22 | position: relative; 23 | } 24 | 25 | body { 26 | background: #F8F8F8; 27 | font-family: "Myriad Pro", Arial, Helvetica, sans-serif; 28 | font-size: @defaultfontsize; 29 | line-height: @defaultlineheight; 30 | } 31 | 32 | #container { 33 | background: #FFF; 34 | margin: 0 auto; 35 | max-width: @containerWidth; 36 | width: 92%; 37 | } 38 | 39 | 40 | 41 | @import "media_queries"; -------------------------------------------------------------------------------- /installer/css/media_queries.less: -------------------------------------------------------------------------------- 1 | // Media queries 2 | 3 | @media only screen and (max-width: 1024px) { 4 | 5 | } 6 | 7 | @media only screen and (max-width: 760px) { 8 | 9 | } 10 | 11 | @media only screen and (max-width: 480px) { 12 | 13 | } 14 | 15 | @media only screen and (max-width: 320px) { 16 | 17 | } -------------------------------------------------------------------------------- /installer/css/variables.less: -------------------------------------------------------------------------------- 1 | @defaultfontsize: 100%; 2 | @defaultlineheight: 1.5; 3 | 4 | @white: #FFF; 5 | @containerWidth: 960px; -------------------------------------------------------------------------------- /modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /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/ibase/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/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/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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->display_error('db_unsuported_feature'); 49 | } 50 | 51 | } 52 | 53 | /* End of file odbc_utility.php */ 54 | /* 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->display_error('db_unsuported_feature'); 49 | } 50 | 51 | } 52 | 53 | /* End of file pdo_utility.php */ 54 | /* Location: ./system/database/drivers/pdo/pdo_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/pdo/subdrivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /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/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->display_error('db_unsuported_feature'); 49 | } 50 | 51 | } 52 | 53 | /* End of file sqlite_utility.php */ 54 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ -------------------------------------------------------------------------------- /system/database/drivers/sqlite3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/database/drivers/sqlite3/sqlite3_utility.php: -------------------------------------------------------------------------------- 1 | db->display_error('db_unsuported_feature'); 49 | } 50 | 51 | } 52 | 53 | /* End of file sqlite3_utility.php */ 54 | /* Location: ./system/database/drivers/sqlite3/sqlite3_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/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/Vheissu/Zebra/3e456f0def47c0ba3be224aee65478553c774eef/system/fonts/texb.ttf -------------------------------------------------------------------------------- /system/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

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

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /system/language/english/index.html: -------------------------------------------------------------------------------- 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/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 403 Forbidden 4 | 5 | 6 | 7 |

Directory access is forbidden.

8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/Bootstrap.php: -------------------------------------------------------------------------------- 1 | assertTrue(defined('PROJECT_BASE')); 8 | $this->assertTrue(defined('BASEPATH')); 9 | $this->assertTrue(defined('APPPATH')); 10 | $this->assertTrue(defined('VIEWPATH')); 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /tests/codeigniter/core/Benchmark_test.php: -------------------------------------------------------------------------------- 1 | benchmark = new Mock_Core_Benchmark(); 8 | } 9 | 10 | // -------------------------------------------------------------------- 11 | 12 | public function test_mark() 13 | { 14 | $this->assertEmpty($this->benchmark->marker); 15 | 16 | $this->benchmark->mark('code_start'); 17 | 18 | $this->assertEquals(1, count($this->benchmark->marker)); 19 | $this->assertArrayHasKey('code_start', $this->benchmark->marker); 20 | } 21 | 22 | // -------------------------------------------------------------------- 23 | 24 | public function test_elapsed_time() 25 | { 26 | $this->assertEquals('{elapsed_time}', $this->benchmark->elapsed_time()); 27 | $this->assertEmpty($this->benchmark->elapsed_time('undefined_point')); 28 | 29 | $this->benchmark->mark('code_start'); 30 | sleep(1); 31 | $this->benchmark->mark('code_end'); 32 | 33 | $this->assertEquals('1.0', $this->benchmark->elapsed_time('code_start', 'code_end', 1)); 34 | } 35 | 36 | // -------------------------------------------------------------------- 37 | 38 | public function test_memory_usage() 39 | { 40 | $this->assertEquals('{memory_usage}', $this->benchmark->memory_usage()); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /tests/codeigniter/core/Common_test.php: -------------------------------------------------------------------------------- 1 | assertEquals(TRUE, is_php('1.2.0')); 10 | $this->assertEquals(FALSE, is_php('9999.9.9')); 11 | } 12 | 13 | // ------------------------------------------------------------------------ 14 | 15 | public function test_stringify_attributes() 16 | { 17 | $this->assertEquals(' class="foo" id="bar"', _stringify_attributes(array('class' => 'foo', 'id' => 'bar'))); 18 | 19 | $atts = new Stdclass; 20 | $atts->class = 'foo'; 21 | $atts->id = 'bar'; 22 | $this->assertEquals(' class="foo" id="bar"', _stringify_attributes($atts)); 23 | 24 | $atts = new Stdclass; 25 | $this->assertEquals('', _stringify_attributes($atts)); 26 | 27 | $this->assertEquals(' class="foo" id="bar"', _stringify_attributes('class="foo" id="bar"')); 28 | 29 | $this->assertEquals('', _stringify_attributes(array())); 30 | } 31 | 32 | // ------------------------------------------------------------------------ 33 | 34 | public function test_stringify_js_attributes() 35 | { 36 | $this->assertEquals('width=800,height=600', _stringify_attributes(array('width' => '800', 'height' => '600'), TRUE)); 37 | 38 | $atts = new Stdclass; 39 | $atts->width = 800; 40 | $atts->height = 600; 41 | $this->assertEquals('width=800,height=600', _stringify_attributes($atts, TRUE)); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /tests/codeigniter/core/Lang_test.php: -------------------------------------------------------------------------------- 1 | ci_core_class('load'); 10 | $this->ci_instance_var('load', new $loader_cls); 11 | 12 | $cls = $this->ci_core_class('lang'); 13 | $this->lang = new $cls; 14 | } 15 | 16 | // -------------------------------------------------------------------- 17 | 18 | public function test_load() 19 | { 20 | $this->assertTrue($this->lang->load('profiler', 'english')); 21 | $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); 22 | } 23 | 24 | // -------------------------------------------------------------------- 25 | 26 | public function test_load_with_unspecified_language() 27 | { 28 | $this->assertTrue($this->lang->load('profiler')); 29 | $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/DB_driver_test.php: -------------------------------------------------------------------------------- 1 | $driver_name($config[DB_DRIVER]); 10 | 11 | $this->assertTrue($driver->initialize()); 12 | } 13 | 14 | protected function pdo($config) 15 | { 16 | return new Mock_Database_Drivers_PDO($config); 17 | } 18 | 19 | protected function mysql($config) 20 | { 21 | return new Mock_Database_Drivers_Mysql($config); 22 | } 23 | 24 | protected function sqlite($config) 25 | { 26 | return new Mock_Database_Drivers_Sqlite($config); 27 | } 28 | 29 | protected function pgsql($config) 30 | { 31 | return new Mock_Database_Drivers_Postgre($config); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/DB_test.php: -------------------------------------------------------------------------------- 1 | array( 9 | 'dsn' => '', 10 | 'hostname' => 'undefined', 11 | 'username' => 'undefined', 12 | 'password' => 'undefined', 13 | 'database' => 'undefined', 14 | 'dbdriver' => 'undefined', 15 | ), 16 | )); 17 | 18 | $this->setExpectedException('InvalidArgumentException', 'CI Error: Invalid DB driver'); 19 | 20 | Mock_Database_DB::DB($connection->set_dsn('undefined'), TRUE); 21 | } 22 | 23 | // ------------------------------------------------------------------------ 24 | 25 | public function test_db_valid() 26 | { 27 | $config = Mock_Database_DB::config(DB_DRIVER); 28 | $connection = new Mock_Database_DB($config); 29 | $db = Mock_Database_DB::DB($connection->set_dsn(DB_DRIVER), TRUE); 30 | 31 | $this->assertTrue($db instanceof CI_DB); 32 | $this->assertTrue($db instanceof CI_DB_Driver); 33 | } 34 | 35 | // ------------------------------------------------------------------------ 36 | 37 | public function test_db_failover() 38 | { 39 | $config = Mock_Database_DB::config(DB_DRIVER); 40 | $connection = new Mock_Database_DB($config); 41 | $db = Mock_Database_DB::DB($connection->set_dsn(DB_DRIVER.'_failover'), TRUE); 42 | 43 | $this->assertTrue($db instanceof CI_DB); 44 | $this->assertTrue($db instanceof CI_DB_Driver); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/count_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_count_all() 24 | { 25 | $this->assertEquals(4, $this->db->count_all('job')); 26 | } 27 | 28 | // ------------------------------------------------------------------------ 29 | 30 | /** 31 | * @see ./mocks/schema/skeleton.php 32 | */ 33 | public function test_count_all_results() 34 | { 35 | $this->assertEquals(2, $this->db->like('name', 'ian')->count_all_results('job')); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/delete_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_delete() 24 | { 25 | // Check initial record 26 | $job1 = $this->db->where('id', 1)->get('job')->row(); 27 | 28 | $this->assertEquals('Developer', $job1->name); 29 | 30 | // Do the delete 31 | $this->db->delete('job', array('id' => 1)); 32 | 33 | // Check the record 34 | $job1 = $this->db->where('id', 1)->get('job'); 35 | 36 | $this->assertEmpty($job1->result_array()); 37 | } 38 | 39 | // ------------------------------------------------------------------------ 40 | 41 | /** 42 | * @see ./mocks/schema/skeleton.php 43 | */ 44 | public function test_delete_several_tables() 45 | { 46 | // Check initial record 47 | $user4 = $this->db->where('id', 4)->get('user')->row(); 48 | $job4 = $this->db->where('id', 4)->get('job')->row(); 49 | 50 | $this->assertEquals('Musician', $job4->name); 51 | $this->assertEquals('Chris Martin', $user4->name); 52 | 53 | // Do the delete 54 | $this->db->delete(array('job', 'user'), array('id' => 4)); 55 | 56 | // Check the record 57 | $job4 = $this->db->where('id', 4)->get('job'); 58 | $user4 = $this->db->where('id', 4)->get('user'); 59 | 60 | $this->assertEmpty($job4->result_array()); 61 | $this->assertEmpty($user4->result_array()); 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/distinct_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_distinct() 24 | { 25 | $users = $this->db->select('country') 26 | ->distinct() 27 | ->get('user') 28 | ->result_array(); 29 | 30 | $this->assertEquals(3, count($users)); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/empty_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_empty_table() 24 | { 25 | // Check initial record 26 | $jobs = $this->db->get('job')->result_array(); 27 | 28 | $this->assertEquals(4, count($jobs)); 29 | 30 | // Do the empty 31 | $this->db->empty_table('job'); 32 | 33 | // Check the record 34 | $jobs = $this->db->get('job'); 35 | 36 | $this->assertEmpty($jobs->result_array()); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/escape_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_escape_like_percent_sign() 24 | { 25 | // Escape the like string 26 | $string = $this->db->escape_like_str('\%foo'); 27 | 28 | if (strpos(DB_DRIVER, 'mysql') !== FALSE) 29 | { 30 | $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%' ESCAPE '';"; 31 | } 32 | else 33 | { 34 | $sql = 'SELECT "value" FROM "misc" WHERE "key" LIKE \''.$string.'%\' ESCAPE \'!\';'; 35 | } 36 | 37 | $res = $this->db->query($sql)->result_array(); 38 | 39 | // Check the result 40 | $this->assertEquals(1, count($res)); 41 | } 42 | 43 | // ------------------------------------------------------------------------ 44 | 45 | /** 46 | * @see ./mocks/schema/skeleton.php 47 | */ 48 | public function test_escape_like_backslash_sign() 49 | { 50 | // Escape the like string 51 | $string = $this->db->escape_like_str('\\'); 52 | 53 | if (strpos(DB_DRIVER, 'mysql') !== FALSE) 54 | { 55 | $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%' ESCAPE '';"; 56 | } 57 | else 58 | { 59 | $sql = 'SELECT "value" FROM "misc" WHERE "key" LIKE \''.$string.'%\' ESCAPE \'!\';'; 60 | } 61 | 62 | $res = $this->db->query($sql)->result_array(); 63 | 64 | // Check the result 65 | $this->assertEquals(2, count($res)); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/from_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_from_simple() 24 | { 25 | $jobs = $this->db->from('job') 26 | ->get() 27 | ->result_array(); 28 | 29 | $this->assertEquals(4, count($jobs)); 30 | } 31 | 32 | // ------------------------------------------------------------------------ 33 | 34 | /** 35 | * @see ./mocks/schema/skeleton.php 36 | */ 37 | public function test_from_with_where() 38 | { 39 | $job1 = $this->db->from('job') 40 | ->where('id', 1) 41 | ->get() 42 | ->row(); 43 | 44 | $this->assertEquals('1', $job1->id); 45 | $this->assertEquals('Developer', $job1->name); 46 | $this->assertEquals('Awesome job, but sometimes makes you bored', $job1->description); 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/get_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_get_simple() 24 | { 25 | $jobs = $this->db->get('job')->result_array(); 26 | 27 | // Dummy jobs contain 4 rows 28 | $this->assertCount(4, $jobs); 29 | 30 | // Check rows item 31 | $this->assertEquals('Developer', $jobs[0]['name']); 32 | $this->assertEquals('Politician', $jobs[1]['name']); 33 | $this->assertEquals('Accountant', $jobs[2]['name']); 34 | $this->assertEquals('Musician', $jobs[3]['name']); 35 | } 36 | 37 | // ------------------------------------------------------------------------ 38 | 39 | /** 40 | * @see ./mocks/schema/skeleton.php 41 | */ 42 | public function test_get_where() 43 | { 44 | $job1 = $this->db->get_where('job', array('id' => 1))->result_array(); 45 | 46 | // Dummy jobs contain 1 rows 47 | $this->assertCount(1, $job1); 48 | 49 | // Check rows item 50 | $this->assertEquals('Developer', $job1[0]['name']); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/group_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_group_by() 24 | { 25 | $jobs = $this->db->select('name') 26 | ->from('job') 27 | ->group_by('name') 28 | ->get() 29 | ->result_array(); 30 | 31 | $this->assertEquals(4, count($jobs)); 32 | } 33 | 34 | // ------------------------------------------------------------------------ 35 | 36 | /** 37 | * @see ./mocks/schema/skeleton.php 38 | */ 39 | public function test_having_by() 40 | { 41 | $jobs = $this->db->select('name') 42 | ->from('job') 43 | ->group_by('name') 44 | ->having('SUM(id) > 2') 45 | ->get() 46 | ->result_array(); 47 | 48 | $this->assertEquals(2, count($jobs)); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/limit_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_limit() 24 | { 25 | $jobs = $this->db->limit(2) 26 | ->get('job') 27 | ->result_array(); 28 | 29 | $this->assertEquals(2, count($jobs)); 30 | } 31 | 32 | // ------------------------------------------------------------------------ 33 | 34 | /** 35 | * @see ./mocks/schema/skeleton.php 36 | */ 37 | public function test_limit_and_offset() 38 | { 39 | $jobs = $this->db->limit(2, 2) 40 | ->get('job') 41 | ->result_array(); 42 | 43 | $this->assertEquals(2, count($jobs)); 44 | $this->assertEquals('Accountant', $jobs[0]['name']); 45 | $this->assertEquals('Musician', $jobs[1]['name']); 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/order_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_order_ascending() 24 | { 25 | $jobs = $this->db->order_by('name', 'asc') 26 | ->get('job') 27 | ->result_array(); 28 | 29 | // Check the result 30 | $this->assertEquals(4, count($jobs)); 31 | $this->assertEquals('Accountant', $jobs[0]['name']); 32 | $this->assertEquals('Developer', $jobs[1]['name']); 33 | $this->assertEquals('Musician', $jobs[2]['name']); 34 | $this->assertEquals('Politician', $jobs[3]['name']); 35 | } 36 | 37 | // ------------------------------------------------------------------------ 38 | 39 | /** 40 | * @see ./mocks/schema/skeleton.php 41 | */ 42 | public function test_order_descending() 43 | { 44 | $jobs = $this->db->order_by('name', 'desc') 45 | ->get('job') 46 | ->result_array(); 47 | 48 | $this->assertEquals(4, count($jobs)); 49 | $this->assertEquals('Politician', $jobs[0]['name']); 50 | $this->assertEquals('Musician', $jobs[1]['name']); 51 | $this->assertEquals('Developer', $jobs[2]['name']); 52 | $this->assertEquals('Accountant', $jobs[3]['name']); 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/truncate_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_truncate() 24 | { 25 | // Check initial record 26 | $jobs = $this->db->get('job')->result_array(); 27 | $this->assertEquals(4, count($jobs)); 28 | 29 | // Do the empty 30 | $this->db->truncate('job'); 31 | 32 | // Check the record 33 | $jobs = $this->db->get('job'); 34 | $this->assertEmpty($jobs->result_array()); 35 | } 36 | 37 | // ------------------------------------------------------------------------ 38 | 39 | /** 40 | * @see ./mocks/schema/skeleton.php 41 | */ 42 | public function test_truncate_with_from() 43 | { 44 | // Check initial record 45 | $users = $this->db->get('user')->result_array(); 46 | $this->assertEquals(4, count($users)); 47 | 48 | // Do the empty 49 | $this->db->from('user')->truncate(); 50 | 51 | // Check the record 52 | $users = $this->db->get('user'); 53 | $this->assertEmpty($users->result_array()); 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /tests/codeigniter/database/query_builder/update_test.php: -------------------------------------------------------------------------------- 1 | db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); 13 | 14 | Mock_Database_Schema_Skeleton::create_tables(); 15 | Mock_Database_Schema_Skeleton::create_data(); 16 | } 17 | 18 | // ------------------------------------------------------------------------ 19 | 20 | /** 21 | * @see ./mocks/schema/skeleton.php 22 | */ 23 | public function test_update() 24 | { 25 | // Check initial record 26 | $job1 = $this->db->where('id', 1)->get('job')->row(); 27 | $this->assertEquals('Developer', $job1->name); 28 | 29 | // Do the update 30 | $this->db->where('id', 1)->update('job', array('name' => 'Programmer')); 31 | 32 | // Check updated record 33 | $job1 = $this->db->where('id', 1)->get('job')->row(); 34 | $this->assertEquals('Programmer', $job1->name); 35 | } 36 | 37 | // ------------------------------------------------------------------------ 38 | 39 | /** 40 | * @see ./mocks/schema/skeleton.php 41 | */ 42 | public function test_update_with_set() 43 | { 44 | // Check initial record 45 | $job1 = $this->db->where('id', 4)->get('job')->row(); 46 | $this->assertEquals('Musician', $job1->name); 47 | 48 | // Do the update 49 | $this->db->set('name', 'Vocalist'); 50 | $this->db->update('job', NULL, 'id = 4'); 51 | 52 | // Check updated record 53 | $job1 = $this->db->where('id', 4)->get('job')->row(); 54 | $this->assertEquals('Vocalist', $job1->name); 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /tests/codeigniter/helpers/array_helper_test.php: -------------------------------------------------------------------------------- 1 | helper('array'); 8 | 9 | $this->my_array = array( 10 | 'foo' => 'bar', 11 | 'sally' => 'jim', 12 | 'maggie' => 'bessie', 13 | 'herb' => 'cook' 14 | ); 15 | } 16 | 17 | // ------------------------------------------------------------------------ 18 | 19 | public function test_element_with_existing_item() 20 | { 21 | $this->assertEquals(FALSE, element('testing', $this->my_array)); 22 | 23 | $this->assertEquals('not set', element('testing', $this->my_array, 'not set')); 24 | 25 | $this->assertEquals('bar', element('foo', $this->my_array)); 26 | } 27 | 28 | // ------------------------------------------------------------------------ 29 | 30 | public function test_random_element() 31 | { 32 | // Send a string, not an array to random_element 33 | $this->assertEquals('my string', random_element('my string')); 34 | 35 | // Test sending an array 36 | $this->assertEquals(TRUE, in_array(random_element($this->my_array), $this->my_array)); 37 | } 38 | 39 | // ------------------------------------------------------------------------ 40 | 41 | public function test_elements() 42 | { 43 | $this->assertEquals(TRUE, is_array(elements('test', $this->my_array))); 44 | $this->assertEquals(TRUE, is_array(elements('foo', $this->my_array))); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /tests/codeigniter/helpers/directory_helper_test.php: -------------------------------------------------------------------------------- 1 | helper('directory'); 8 | 9 | vfsStreamWrapper::register(); 10 | vfsStreamWrapper::setRoot(new vfsStreamDirectory('testDir')); 11 | 12 | $this->_test_dir = vfsStreamWrapper::getRoot(); 13 | } 14 | 15 | public function test_directory_map() 16 | { 17 | $structure = array( 18 | 'libraries' => array( 19 | 'benchmark.html' => '', 20 | 'database' => array('active_record.html' => '', 'binds.html' => ''), 21 | 'email.html' => '', 22 | '.hiddenfile.txt' => '' 23 | ) 24 | ); 25 | 26 | vfsStream::create($structure, $this->_test_dir); 27 | 28 | // test default recursive behavior 29 | $expected = array( 30 | 'libraries' => array( 31 | 'benchmark.html', 32 | 'database' => array('active_record.html', 'binds.html'), 33 | 'email.html' 34 | ) 35 | ); 36 | 37 | $this->assertEquals($expected, directory_map(vfsStream::url('testDir'))); 38 | 39 | // test detection of hidden files 40 | $expected['libraries'][] = '.hiddenfile.txt'; 41 | 42 | $this->assertEquals($expected, directory_map(vfsStream::url('testDir'), FALSE, TRUE)); 43 | 44 | // test recursion depth behavior 45 | $this->assertEquals(array('libraries'), directory_map(vfsStream::url('testDir'), 1)); 46 | } 47 | 48 | } 49 | 50 | /* End of file directory_helper_test.php */ -------------------------------------------------------------------------------- /tests/codeigniter/helpers/email_helper_test.php: -------------------------------------------------------------------------------- 1 | helper('email'); 8 | } 9 | 10 | public function test_valid_email() 11 | { 12 | $this->assertEquals(FALSE, valid_email('test')); 13 | $this->assertEquals(FALSE, valid_email('test@test@test.com')); 14 | $this->assertEquals(TRUE, valid_email('test@test.com')); 15 | $this->assertEquals(TRUE, valid_email('my.test@test.com')); 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /tests/codeigniter/helpers/path_helper_test.php: -------------------------------------------------------------------------------- 1 | helper('path'); 8 | } 9 | 10 | public function test_set_realpath() 11 | { 12 | $this->assertEquals(getcwd().DIRECTORY_SEPARATOR, set_realpath(getcwd())); 13 | } 14 | 15 | public function test_set_realpath_nonexistent_directory() 16 | { 17 | $expected = '/path/to/nowhere'; 18 | $this->assertEquals($expected, set_realpath('/path/to/nowhere', FALSE)); 19 | } 20 | 21 | public function test_set_realpath_error_trigger() 22 | { 23 | $this->setExpectedException( 24 | 'RuntimeException', 'CI Error: Not a valid path: /path/to/nowhere' 25 | ); 26 | 27 | set_realpath('/path/to/nowhere', TRUE); 28 | } 29 | } 30 | 31 | /* End of file path_helper_test.php */ -------------------------------------------------------------------------------- /tests/codeigniter/helpers/xml_helper_test.php: -------------------------------------------------------------------------------- 1 | helper('xml'); 8 | } 9 | 10 | public function test_xml_convert() 11 | { 12 | $this->assertEquals('<tag>my & test - </tag>', xml_convert('my & test - ')); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /tests/mocks/core/benchmark.php: -------------------------------------------------------------------------------- 1 | _allow_get_array = (config_item('allow_get_array') === TRUE); 15 | $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); 16 | $this->_enable_csrf = (config_item('csrf_protection') === TRUE); 17 | 18 | // Assign Security and Utf8 classes 19 | $this->security = $security; 20 | $this->uni = $utf8; 21 | 22 | // Sanitize global arrays 23 | $this->_sanitize_globals(); 24 | } 25 | 26 | public function fetch_from_array($array, $index = '', $xss_clean = FALSE) 27 | { 28 | return parent::_fetch_from_array($array, $index, $xss_clean); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /tests/mocks/core/lang.php: -------------------------------------------------------------------------------- 1 | models_dir = vfsStream::newDirectory('models')->at(vfsStreamWrapper::getRoot()); 20 | $this->libs_dir = vfsStream::newDirectory('libraries')->at(vfsStreamWrapper::getRoot()); 21 | $this->helpers_dir = vfsStream::newDirectory('helpers')->at(vfsStreamWrapper::getRoot()); 22 | $this->views_dir = vfsStream::newDirectory('views')->at(vfsStreamWrapper::getRoot()); 23 | 24 | $this->_ci_ob_level = ob_get_level(); 25 | $this->_ci_library_paths = array(vfsStream::url('application').'/', BASEPATH); 26 | $this->_ci_helper_paths = array(vfsStream::url('application').'/', BASEPATH); 27 | $this->_ci_model_paths = array(vfsStream::url('application').'/'); 28 | $this->_ci_view_paths = array(vfsStream::url('application').'/views/' => TRUE); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /tests/mocks/core/security.php: -------------------------------------------------------------------------------- 1 | {'_'.$property}) ? $this->{'_'.$property} : NULL; 17 | } 18 | 19 | // Overide inaccesible protected method 20 | public function __call($method, $params) 21 | { 22 | if (is_callable(array($this, '_'.$method))) 23 | { 24 | return call_user_func_array(array($this, '_'.$method), $params); 25 | } 26 | 27 | throw new BadMethodCallException('Method '.$method.' was not found'); 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /tests/mocks/core/uri.php: -------------------------------------------------------------------------------- 1 | ci_core_class('cfg'); 9 | 10 | // set predictable config values 11 | $test->ci_set_config(array( 12 | 'index_page' => 'index.php', 13 | 'base_url' => 'http://example.com/', 14 | 'subclass_prefix' => 'MY_' 15 | )); 16 | 17 | $this->config = new $cls; 18 | 19 | } 20 | 21 | protected function _is_cli_request() 22 | { 23 | return FALSE; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /tests/mocks/core/utf8.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => '', 8 | 'hostname' => 'localhost', 9 | 'username' => 'travis', 10 | 'password' => '', 11 | 'database' => 'ci_test', 12 | 'dbdriver' => 'mysql' 13 | ), 14 | 15 | // Database configuration with failover 16 | 'mysql_failover' => array( 17 | 'dsn' => '', 18 | 'hostname' => 'localhost', 19 | 'username' => 'not_travis', 20 | 'password' => 'wrong password', 21 | 'database' => 'not_ci_test', 22 | 'dbdriver' => 'mysql', 23 | 'failover' => array( 24 | array( 25 | 'dsn' => '', 26 | 'hostname' => 'localhost', 27 | 'username' => 'travis', 28 | 'password' => '', 29 | 'database' => 'ci_test', 30 | 'dbdriver' => 'mysql', 31 | ) 32 | ) 33 | ) 34 | ); -------------------------------------------------------------------------------- /tests/mocks/database/config/pdo/mysql.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => 'mysql:host=localhost;dbname=ci_test', 8 | 'hostname' => 'localhost', 9 | 'username' => 'travis', 10 | 'password' => '', 11 | 'database' => 'ci_test', 12 | 'dbdriver' => 'pdo', 13 | 'subdriver' => 'mysql' 14 | ), 15 | 16 | // Database configuration with failover 17 | 'pdo/mysql_failover' => array( 18 | 'dsn' => '', 19 | 'hostname' => 'localhost', 20 | 'username' => 'not_travis', 21 | 'password' => 'wrong password', 22 | 'database' => 'not_ci_test', 23 | 'dbdriver' => 'pdo', 24 | 'subdriver' => 'mysql', 25 | 'failover' => array( 26 | array( 27 | 'dsn' => 'mysql:host=localhost;dbname=ci_test', 28 | 'hostname' => 'localhost', 29 | 'username' => 'travis', 30 | 'password' => '', 31 | 'database' => 'ci_test', 32 | 'dbdriver' => 'pdo', 33 | 'subdriver' => 'mysql' 34 | ) 35 | ) 36 | ) 37 | ); -------------------------------------------------------------------------------- /tests/mocks/database/config/pdo/pgsql.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', 8 | 'hostname' => 'localhost', 9 | 'username' => 'postgres', 10 | 'password' => '', 11 | 'database' => 'ci_test', 12 | 'dbdriver' => 'pdo', 13 | 'subdriver' => 'pgsql' 14 | ), 15 | 16 | // Database configuration with failover 17 | 'pdo/pgsql_failover' => array( 18 | 'dsn' => '', 19 | 'hostname' => 'localhost', 20 | 'username' => 'not_travis', 21 | 'password' => 'wrong password', 22 | 'database' => 'not_ci_test', 23 | 'dbdriver' => 'pdo', 24 | 'subdriver' => 'pgsql', 25 | 'failover' => array( 26 | array( 27 | 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', 28 | 'hostname' => 'localhost', 29 | 'username' => 'postgres', 30 | 'password' => '', 31 | 'database' => 'ci_test', 32 | 'dbdriver' => 'pdo', 33 | 'subdriver' => 'pgsql' 34 | ) 35 | ) 36 | ) 37 | ); -------------------------------------------------------------------------------- /tests/mocks/database/config/pdo/sqlite.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => 'sqlite:/'.realpath(__DIR__.'/../..').'/ci_test.sqlite', 8 | 'hostname' => 'localhost', 9 | 'username' => 'sqlite', 10 | 'password' => 'sqlite', 11 | 'database' => 'sqlite', 12 | 'dbdriver' => 'pdo', 13 | 'subdriver' => 'sqlite' 14 | ), 15 | 16 | // Database configuration with failover 17 | 'pdo/sqlite_failover' => array( 18 | 'dsn' => 'sqlite:not_exists.sqlite', 19 | 'hostname' => 'localhost', 20 | 'username' => 'sqlite', 21 | 'password' => 'sqlite', 22 | 'database' => 'sqlite', 23 | 'dbdriver' => 'pdo', 24 | 'subdriver' => 'sqlite', 25 | 'failover' => array( 26 | array( 27 | 'dsn' => 'sqlite:/'.realpath(__DIR__.'/../..').'/ci_test.sqlite', 28 | 'hostname' => 'localhost', 29 | 'username' => 'sqlite', 30 | 'password' => 'sqlite', 31 | 'database' => 'sqlite', 32 | 'dbdriver' => 'pdo', 33 | 'subdriver' => 'sqlite' 34 | ) 35 | ) 36 | ) 37 | ); -------------------------------------------------------------------------------- /tests/mocks/database/config/pgsql.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => '', 8 | 'hostname' => 'localhost', 9 | 'username' => 'postgres', 10 | 'password' => '', 11 | 'database' => 'ci_test', 12 | 'dbdriver' => 'postgre' 13 | ), 14 | 15 | // Database configuration with failover 16 | 'pgsql_failover' => array( 17 | 'dsn' => '', 18 | 'hostname' => 'localhost', 19 | 'username' => 'not_travis', 20 | 'password' => 'wrong password', 21 | 'database' => 'not_ci_test', 22 | 'dbdriver' => 'postgre', 23 | 'failover' => array( 24 | array( 25 | 'dsn' => '', 26 | 'hostname' => 'localhost', 27 | 'username' => 'postgres', 28 | 'password' => '', 29 | 'database' => 'ci_test', 30 | 'dbdriver' => 'postgre', 31 | ) 32 | ) 33 | ) 34 | ); -------------------------------------------------------------------------------- /tests/mocks/database/config/sqlite.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'dsn' => '', 8 | 'hostname' => 'localhost', 9 | 'username' => 'sqlite', 10 | 'password' => 'sqlite', 11 | 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', 12 | 'dbdriver' => 'sqlite3' 13 | ), 14 | 15 | // Database configuration with failover 16 | 'sqlite_failover' => array( 17 | 'dsn' => '', 18 | 'hostname' => 'localhost', 19 | 'username' => 'sqlite', 20 | 'password' => 'sqlite', 21 | 'database' => '../not_exists.sqlite', 22 | 'dbdriver' => 'sqlite3', 23 | 'failover' => array( 24 | array( 25 | 'dsn' => '', 26 | 'hostname' => 'localhost', 27 | 'username' => 'sqlite', 28 | 'password' => 'sqlite', 29 | 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', 30 | 'dbdriver' => 'sqlite3' 31 | ) 32 | ) 33 | ) 34 | ); -------------------------------------------------------------------------------- /tests/mocks/database/db/driver.php: -------------------------------------------------------------------------------- 1 | ci_db_driver = new $driver_class($config); 22 | } 23 | } 24 | 25 | /** 26 | * Overloading method, emulate the actual driver method (multiple inheritance workaround) 27 | */ 28 | public function __call($method, $arguments) 29 | { 30 | if ( ! is_callable(array($this->ci_db_driver, $method))) 31 | { 32 | throw new BadMethodCallException($method. ' not exists or not implemented'); 33 | } 34 | 35 | return call_user_func_array(array($this->ci_db_driver, $method), $arguments); 36 | } 37 | } 38 | 39 | class CI_DB extends Mock_Database_DB_QueryBuilder {} -------------------------------------------------------------------------------- /tests/mocks/database/db/querybuilder.php: -------------------------------------------------------------------------------- 1 | _flashdata_sweep(); 13 | $this->_flashdata_mark(); 14 | $this->_tempdata_sweep(); 15 | } 16 | } 17 | 18 | /** 19 | * Mock cookie driver to overload cookie setting 20 | */ 21 | class Mock_Libraries_Session_cookie extends CI_Session_cookie { 22 | /** 23 | * Overload _setcookie to manage $_COOKIE values, since actual cookies can't be set in unit testing 24 | */ 25 | protected function _setcookie($name, $value = '', $expire = 0, $path = '', $domain = '', $secure = false, 26 | $httponly = false) 27 | { 28 | if (empty($value) || $expire <= time()) { 29 | // Clear cookie 30 | unset($_COOKIE[$name]); 31 | } 32 | else { 33 | // Set cookie 34 | $_COOKIE[$name] = $value; 35 | } 36 | } 37 | } 38 | 39 | /** 40 | * Mock native driver (just for consistency in loading) 41 | */ 42 | class Mock_Libraries_Session_native extends CI_Session_native { } 43 | 44 | -------------------------------------------------------------------------------- /tests/mocks/libraries/table.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | ./codeigniter/core 15 | ./codeigniter/helpers 16 | ./codeigniter/libraries 17 | 18 | 19 | 20 | 21 | PEAR_INSTALL_DIR 22 | PHP_LIBDIR 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/mysql.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../codeigniter 18 | 19 | 20 | 21 | 22 | ../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/pdo/mysql.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../../codeigniter 18 | 19 | 20 | 21 | 22 | ../../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/pdo/pgsql.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../../codeigniter 18 | 19 | 20 | 21 | 22 | ../../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/pdo/sqlite.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../../codeigniter 18 | 19 | 20 | 21 | 22 | ../../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/pgsql.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../codeigniter 18 | 19 | 20 | 21 | 22 | ../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/travis/sqlite.phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | ../codeigniter 18 | 19 | 20 | 21 | 22 | ../../system 23 | 24 | 25 | -------------------------------------------------------------------------------- /themes/zebra/css/admin.less: -------------------------------------------------------------------------------- 1 | // Admin Panel Styling 2 | 3 | #admin-body { 4 | 5 | h2 { 6 | margin: 0 0 15px 0; 7 | } 8 | 9 | #login-form { 10 | 11 | } 12 | 13 | .admin-block { 14 | .clearfix; 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /themes/zebra/css/media_queries.less: -------------------------------------------------------------------------------- 1 | // Media queries 2 | 3 | @media only screen and (max-width: 1024px) { 4 | 5 | } 6 | 7 | @media only screen and (max-width: 760px) { 8 | 9 | } 10 | 11 | @media only screen and (max-width: 480px) { 12 | 13 | } 14 | 15 | @media only screen and (max-width: 320px) { 16 | 17 | } -------------------------------------------------------------------------------- /themes/zebra/css/variables.less: -------------------------------------------------------------------------------- 1 | @defaultfontsize: 100%; 2 | @defaultlineheight: 1.5; 3 | 4 | @white: #FFF; 5 | @containerWidth: 1600px; -------------------------------------------------------------------------------- /themes/zebra/views/add.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | {validation_errors()} 5 | {if logged_in()} 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 |

If you enter a URL the text field is ignored. If you want to ask a question or make
discussion don't provide a URL.

18 |
19 |
20 | 21 |
22 |
23 | {else} 24 |
You must be logged in submit stuff.
25 | {/if} 26 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/admin/index.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.admin.tpl'} 2 | 3 | {block name=content} 4 | {get_flashdata('error')} 5 |

Administration Dashboard

6 | 7 |
8 |

Total submissions: {$analytics->total_submissions}

9 |

Last submission: {$analytics->last_submission->title} - added {timespan($analytics->last_submission->created, time(), 1)} ago

10 |
11 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/admin/login.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.admin.tpl'} 2 | 3 | {block name=content} 4 | {get_flashdata('error')} 5 | {validation_errors()} 6 |

Administration

7 |
8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/admin/stories.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.admin.tpl'} 2 | 3 | {block name=content} 4 | 5 | {get_flashdata('error')} 6 | {if $stories} 7 |
8 | {foreach $stories AS $story} 9 | {assign var="usernames" value=get_username($story->user_id)} 10 |
11 |
12 | {$story->upvotes} 13 |
14 |
15 | {if $story->external_link} 16 | {$story->title} 17 | ({get_domain($story->external_link)}) 18 | {else} 19 | {$story->title} 20 | {/if} 21 | 24 |
25 |
26 | {/foreach} 27 |
28 | {else} 29 |
30 |

Sorry, there are no stories to display. Either something broke or nobody has submitted anything yet.

31 |
32 | {/if} 33 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/comment.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | 5 | {get_flashdata('error')} 6 | {validation_errors()} 7 | {if $comment} 8 | {assign var="username" value=get_username($comment->user_id)} 9 |
10 |
11 |
12 | 13 | {$comment->upvotes} 14 | 15 |
16 |
17 | {$comment->comment} 18 |
19 |
20 |
21 | {else} 22 |
23 |

{lang('no_stories')}

24 |
25 | {/if} 26 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/comments.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | 5 | {get_flashdata('error')} 6 | {if $comments} 7 |
8 | {foreach $comments AS $comment} 9 | {assign var="usernames" value=get_username($comment->user_id)} 10 |
11 | 12 | {if logged_in()} 13 |
14 | 15 | {$story->upvotes} 16 | 17 |
18 | {/if} 19 | 20 |
21 | {$comment->comment} 22 |
23 |
24 | {/foreach} 25 |
26 | {else} 27 |
28 |

Sorry, there are no comments to display.

29 |
30 | {/if} 31 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/edit_comment.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | {validation_errors()} 5 |
6 |

7 |
8 |
9 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/layouts/layout.admin.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {$page.title|default:$site.name} 8 | 9 | {if $page.description} 10 | 11 | {/if} 12 | 13 | {css('zebra.css')} 14 | 15 | 16 | {block name=header_styles}{/block} 17 | 18 | 21 | 22 | {block name=header_scripts}{/block} 23 | 24 | 27 | 28 | 29 | 30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 | {block name=content}{/block} 38 |
39 | 40 |
41 | 42 | 43 | 44 | {js('zebra.js')} 45 | 46 | {block name=footer}{/block} 47 | 48 | 49 | -------------------------------------------------------------------------------- /themes/zebra/views/login.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | {get_flashdata('error')} 5 | {validation_errors()} 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/profile.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | {get_flashdata('error')} 5 | 6 | {if $user} 7 |
8 |
9 |

Info

10 |

User: {$user.username}

11 |

Created: {timespan($user.register_date, now(), 1)} ago

12 |

Karma: {$user.karma}

13 |

Average Karma: {$user.average_karma}

14 |

Submissions

15 |

Number of submissions: {$user.meta->submissions}

16 |

Average submissions per day: {$user.average_submissions}

17 |

View all submissions

18 |
19 |
20 | {/if} 21 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/register.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | {get_flashdata('error')} 5 | {validation_errors()} 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 | {/block} -------------------------------------------------------------------------------- /themes/zebra/views/stories.tpl: -------------------------------------------------------------------------------- 1 | {extends file='layout.zebra.tpl'} 2 | 3 | {block name=content} 4 | 5 | {get_flashdata('error')} 6 | {if $stories} 7 |
8 | {foreach $stories AS $story} 9 | {assign var="usernames" value=get_username($story->user_id)} 10 |
11 | {if logged_in()} 12 |
13 | 14 | {$story->upvotes} 15 | 16 |
17 | {/if} 18 |
19 | {if $story->external_link} 20 | {$story->title} 21 | ({get_domain($story->external_link)}) 22 | {else} 23 | {$story->title} 24 | {/if} 25 | 28 |
29 |
30 | {/foreach} 31 |
32 | {else} 33 |
34 |

Sorry, there are no stories to display. Either something broke or nobody has submitted anything yet.

35 |
36 | {/if} 37 | {/block} --------------------------------------------------------------------------------