summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3dparty/Archive/Tar.php (renamed from inc/Archive/Tar.php)0
-rw-r--r--3dparty/COPYING-PHP (renamed from inc/COPYING-PHP)0
-rw-r--r--3dparty/COPYING-README (renamed from inc/COPYING-README)0
-rw-r--r--3dparty/Console/Getopt.php (renamed from inc/Console/Getopt.php)0
-rw-r--r--3dparty/HTTP/WebDAV/Server.php (renamed from inc/HTTP/WebDAV/Server.php)0
-rw-r--r--3dparty/HTTP/WebDAV/Tools/_parse_lockinfo.php (renamed from inc/HTTP/WebDAV/Tools/_parse_lockinfo.php)0
-rw-r--r--3dparty/HTTP/WebDAV/Tools/_parse_propfind.php (renamed from inc/HTTP/WebDAV/Tools/_parse_propfind.php)0
-rw-r--r--3dparty/HTTP/WebDAV/Tools/_parse_proppatch.php (renamed from inc/HTTP/WebDAV/Tools/_parse_proppatch.php)0
-rw-r--r--3dparty/Log.php (renamed from inc/Log.php)0
-rw-r--r--3dparty/Log/composite.php (renamed from inc/Log/composite.php)0
-rw-r--r--3dparty/Log/console.php (renamed from inc/Log/console.php)0
-rw-r--r--3dparty/Log/daemon.php (renamed from inc/Log/daemon.php)0
-rw-r--r--3dparty/Log/display.php (renamed from inc/Log/display.php)0
-rw-r--r--3dparty/Log/error_log.php (renamed from inc/Log/error_log.php)0
-rw-r--r--3dparty/Log/file.php (renamed from inc/Log/file.php)0
-rw-r--r--3dparty/Log/mail.php (renamed from inc/Log/mail.php)0
-rw-r--r--3dparty/Log/mcal.php (renamed from inc/Log/mcal.php)0
-rw-r--r--3dparty/Log/null.php (renamed from inc/Log/null.php)0
-rw-r--r--3dparty/Log/observer.php (renamed from inc/Log/observer.php)0
-rw-r--r--3dparty/Log/sql.php (renamed from inc/Log/sql.php)0
-rw-r--r--3dparty/Log/sqlite.php (renamed from inc/Log/sqlite.php)0
-rw-r--r--3dparty/Log/syslog.php (renamed from inc/Log/syslog.php)0
-rw-r--r--3dparty/Log/win.php (renamed from inc/Log/win.php)0
-rw-r--r--3dparty/MDB2.php (renamed from inc/MDB2.php)0
-rw-r--r--3dparty/MDB2/Date.php (renamed from inc/MDB2/Date.php)0
-rw-r--r--3dparty/MDB2/Driver/Datatype/Common.php (renamed from inc/MDB2/Driver/Datatype/Common.php)0
-rw-r--r--3dparty/MDB2/Driver/Datatype/mysql.php (renamed from inc/MDB2/Driver/Datatype/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/Datatype/pgsql.php (renamed from inc/MDB2/Driver/Datatype/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/Datatype/sqlite.php (renamed from inc/MDB2/Driver/Datatype/sqlite.php)0
-rw-r--r--3dparty/MDB2/Driver/Function/Common.php (renamed from inc/MDB2/Driver/Function/Common.php)0
-rw-r--r--3dparty/MDB2/Driver/Function/mysql.php (renamed from inc/MDB2/Driver/Function/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/Function/pgsql.php (renamed from inc/MDB2/Driver/Function/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/Function/sqlite.php (renamed from inc/MDB2/Driver/Function/sqlite.php)0
-rw-r--r--3dparty/MDB2/Driver/Manager/Common.php (renamed from inc/MDB2/Driver/Manager/Common.php)0
-rw-r--r--3dparty/MDB2/Driver/Manager/mysql.php (renamed from inc/MDB2/Driver/Manager/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/Manager/pgsql.php (renamed from inc/MDB2/Driver/Manager/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/Manager/sqlite.php (renamed from inc/MDB2/Driver/Manager/sqlite.php)0
-rw-r--r--3dparty/MDB2/Driver/Native/Common.php (renamed from inc/MDB2/Driver/Native/Common.php)0
-rw-r--r--3dparty/MDB2/Driver/Native/mysql.php (renamed from inc/MDB2/Driver/Native/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/Native/pgsql.php (renamed from inc/MDB2/Driver/Native/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/Native/sqlite.php (renamed from inc/MDB2/Driver/Native/sqlite.php)0
-rw-r--r--3dparty/MDB2/Driver/Reverse/Common.php (renamed from inc/MDB2/Driver/Reverse/Common.php)0
-rw-r--r--3dparty/MDB2/Driver/Reverse/mysql.php (renamed from inc/MDB2/Driver/Reverse/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/Reverse/pgsql.php (renamed from inc/MDB2/Driver/Reverse/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/Reverse/sqlite.php (renamed from inc/MDB2/Driver/Reverse/sqlite.php)0
-rw-r--r--3dparty/MDB2/Driver/mysql.php (renamed from inc/MDB2/Driver/mysql.php)0
-rw-r--r--3dparty/MDB2/Driver/pgsql.php (renamed from inc/MDB2/Driver/pgsql.php)0
-rw-r--r--3dparty/MDB2/Driver/sqlite.php (renamed from inc/MDB2/Driver/sqlite.php)0
-rw-r--r--3dparty/MDB2/Extended.php (renamed from inc/MDB2/Extended.php)0
-rw-r--r--3dparty/MDB2/Iterator.php (renamed from inc/MDB2/Iterator.php)0
-rw-r--r--3dparty/MDB2/LOB.php (renamed from inc/MDB2/LOB.php)0
-rw-r--r--3dparty/MDB2/Schema.php (renamed from inc/MDB2/Schema.php)0
-rw-r--r--3dparty/MDB2/Schema/Parser.php (renamed from inc/MDB2/Schema/Parser.php)0
-rw-r--r--3dparty/MDB2/Schema/Parser2.php (renamed from inc/MDB2/Schema/Parser2.php)0
-rw-r--r--3dparty/MDB2/Schema/Reserved/ibase.php (renamed from inc/MDB2/Schema/Reserved/ibase.php)0
-rw-r--r--3dparty/MDB2/Schema/Reserved/mssql.php (renamed from inc/MDB2/Schema/Reserved/mssql.php)0
-rw-r--r--3dparty/MDB2/Schema/Reserved/mysql.php (renamed from inc/MDB2/Schema/Reserved/mysql.php)0
-rw-r--r--3dparty/MDB2/Schema/Reserved/oci8.php (renamed from inc/MDB2/Schema/Reserved/oci8.php)0
-rw-r--r--3dparty/MDB2/Schema/Reserved/pgsql.php (renamed from inc/MDB2/Schema/Reserved/pgsql.php)0
-rw-r--r--3dparty/MDB2/Schema/Tool.php (renamed from inc/MDB2/Schema/Tool.php)0
-rw-r--r--3dparty/MDB2/Schema/Tool/ParameterException.php (renamed from inc/MDB2/Schema/Tool/ParameterException.php)0
-rw-r--r--3dparty/MDB2/Schema/Validate.php (renamed from inc/MDB2/Schema/Validate.php)0
-rw-r--r--3dparty/MDB2/Schema/Writer.php (renamed from inc/MDB2/Schema/Writer.php)0
-rw-r--r--3dparty/Mail.php (renamed from inc/Mail.php)0
-rw-r--r--3dparty/Mail/RFC822.php (renamed from inc/Mail/RFC822.php)0
-rw-r--r--3dparty/Mail/mail.php (renamed from inc/Mail/mail.php)0
-rw-r--r--3dparty/Mail/mime.php (renamed from inc/Mail/mime.php)0
-rw-r--r--3dparty/Mail/mimeDecode.php (renamed from inc/Mail/mimeDecode.php)0
-rw-r--r--3dparty/Mail/mimePart.php (renamed from inc/Mail/mimePart.php)0
-rw-r--r--3dparty/Mail/null.php (renamed from inc/Mail/null.php)0
-rw-r--r--3dparty/Mail/sendmail.php (renamed from inc/Mail/sendmail.php)0
-rw-r--r--3dparty/Mail/smtp.php (renamed from inc/Mail/smtp.php)0
-rw-r--r--3dparty/Mail/xmail.dtd (renamed from inc/Mail/xmail.dtd)0
-rw-r--r--3dparty/Mail/xmail.xsl (renamed from inc/Mail/xmail.xsl)0
-rw-r--r--3dparty/Net/SMTP.php (renamed from inc/Net/SMTP.php)0
-rw-r--r--3dparty/Net/Socket.php (renamed from inc/Net/Socket.php)0
-rw-r--r--3dparty/OS/Guess.php (renamed from inc/OS/Guess.php)0
-rw-r--r--3dparty/PEAR.php (renamed from inc/PEAR.php)0
-rw-r--r--3dparty/PEAR/Autoloader.php (renamed from inc/PEAR/Autoloader.php)0
-rw-r--r--3dparty/PEAR/Builder.php (renamed from inc/PEAR/Builder.php)0
-rw-r--r--3dparty/PEAR/Command.php (renamed from inc/PEAR/Command.php)0
-rw-r--r--3dparty/PEAR/Command/Auth.php (renamed from inc/PEAR/Command/Auth.php)0
-rw-r--r--3dparty/PEAR/Command/Build.php (renamed from inc/PEAR/Command/Build.php)0
-rw-r--r--3dparty/PEAR/Command/Common.php (renamed from inc/PEAR/Command/Common.php)0
-rw-r--r--3dparty/PEAR/Command/Config.php (renamed from inc/PEAR/Command/Config.php)0
-rw-r--r--3dparty/PEAR/Command/Install.php (renamed from inc/PEAR/Command/Install.php)0
-rw-r--r--3dparty/PEAR/Command/Mirror.php (renamed from inc/PEAR/Command/Mirror.php)0
-rw-r--r--3dparty/PEAR/Command/Package.php (renamed from inc/PEAR/Command/Package.php)0
-rw-r--r--3dparty/PEAR/Command/Registry.php (renamed from inc/PEAR/Command/Registry.php)0
-rw-r--r--3dparty/PEAR/Command/Remote.php (renamed from inc/PEAR/Command/Remote.php)0
-rw-r--r--3dparty/PEAR/Common.php (renamed from inc/PEAR/Common.php)0
-rw-r--r--3dparty/PEAR/Config.php (renamed from inc/PEAR/Config.php)0
-rw-r--r--3dparty/PEAR/Dependency.php (renamed from inc/PEAR/Dependency.php)0
-rw-r--r--3dparty/PEAR/Downloader.php (renamed from inc/PEAR/Downloader.php)0
-rw-r--r--3dparty/PEAR/ErrorStack.php (renamed from inc/PEAR/ErrorStack.php)0
-rw-r--r--3dparty/PEAR/Exception.php (renamed from inc/PEAR/Exception.php)0
-rw-r--r--3dparty/PEAR/Frontend/CLI.php (renamed from inc/PEAR/Frontend/CLI.php)0
-rw-r--r--3dparty/PEAR/Installer.php (renamed from inc/PEAR/Installer.php)0
-rw-r--r--3dparty/PEAR/Packager.php (renamed from inc/PEAR/Packager.php)0
-rw-r--r--3dparty/PEAR/Registry.php (renamed from inc/PEAR/Registry.php)0
-rw-r--r--3dparty/PEAR/Remote.php (renamed from inc/PEAR/Remote.php)0
-rw-r--r--3dparty/PEAR/RunTest.php (renamed from inc/PEAR/RunTest.php)0
-rw-r--r--3dparty/PHPUnit.php (renamed from inc/PHPUnit.php)0
-rw-r--r--3dparty/PHPUnit/Assert.php (renamed from inc/PHPUnit/Assert.php)0
-rw-r--r--3dparty/PHPUnit/GUI/Gtk.php (renamed from inc/PHPUnit/GUI/Gtk.php)0
-rw-r--r--3dparty/PHPUnit/GUI/HTML.php (renamed from inc/PHPUnit/GUI/HTML.php)0
-rw-r--r--3dparty/PHPUnit/GUI/SetupDecorator.php (renamed from inc/PHPUnit/GUI/SetupDecorator.php)0
-rw-r--r--3dparty/PHPUnit/RepeatedTest.php (renamed from inc/PHPUnit/RepeatedTest.php)0
-rw-r--r--3dparty/PHPUnit/Skeleton.php (renamed from inc/PHPUnit/Skeleton.php)0
-rw-r--r--3dparty/PHPUnit/TestCase.php (renamed from inc/PHPUnit/TestCase.php)0
-rw-r--r--3dparty/PHPUnit/TestDecorator.php (renamed from inc/PHPUnit/TestDecorator.php)0
-rw-r--r--3dparty/PHPUnit/TestFailure.php (renamed from inc/PHPUnit/TestFailure.php)0
-rw-r--r--3dparty/PHPUnit/TestListener.php (renamed from inc/PHPUnit/TestListener.php)0
-rw-r--r--3dparty/PHPUnit/TestResult.php (renamed from inc/PHPUnit/TestResult.php)0
-rw-r--r--3dparty/PHPUnit/TestSuite.php (renamed from inc/PHPUnit/TestSuite.php)0
-rw-r--r--3dparty/Smarty/Smarty.class.php815
-rw-r--r--3dparty/Smarty/debug.tpl133
-rw-r--r--3dparty/Smarty/plugins/block.php.php27
-rw-r--r--3dparty/Smarty/plugins/block.textformat.php102
-rw-r--r--3dparty/Smarty/plugins/function.counter.php78
-rw-r--r--3dparty/Smarty/plugins/function.cycle.php106
-rw-r--r--3dparty/Smarty/plugins/function.fetch.php216
-rw-r--r--3dparty/Smarty/plugins/function.html_checkboxes.php143
-rw-r--r--3dparty/Smarty/plugins/function.html_image.php137
-rw-r--r--3dparty/Smarty/plugins/function.html_options.php133
-rw-r--r--3dparty/Smarty/plugins/function.html_radios.php154
-rw-r--r--3dparty/Smarty/plugins/function.html_select_date.php330
-rw-r--r--3dparty/Smarty/plugins/function.html_select_time.php194
-rw-r--r--3dparty/Smarty/plugins/function.html_table.php177
-rw-r--r--3dparty/Smarty/plugins/function.mailto.php156
-rw-r--r--3dparty/Smarty/plugins/function.math.php83
-rw-r--r--3dparty/Smarty/plugins/modifier.capitalize.php37
-rw-r--r--3dparty/Smarty/plugins/modifier.date_format.php61
-rw-r--r--3dparty/Smarty/plugins/modifier.debug_print_var.php87
-rw-r--r--3dparty/Smarty/plugins/modifier.escape.php91
-rw-r--r--3dparty/Smarty/plugins/modifier.regex_replace.php46
-rw-r--r--3dparty/Smarty/plugins/modifier.replace.php29
-rw-r--r--3dparty/Smarty/plugins/modifier.spacify.php37
-rw-r--r--3dparty/Smarty/plugins/modifier.truncate.php67
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.cat.php29
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.count_characters.php39
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.count_paragraphs.php27
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.count_sentences.php27
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.count_words.php31
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.default.php33
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.indent.php32
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.lower.php31
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.noprint.php24
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.string_format.php26
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.strip.php33
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.strip_tags.php34
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.upper.php30
-rw-r--r--3dparty/Smarty/plugins/modifiercompiler.wordwrap.php35
-rw-r--r--3dparty/Smarty/plugins/outputfilter.trimwhitespace.php77
-rw-r--r--3dparty/Smarty/plugins/shared.escape_special_chars.php29
-rw-r--r--3dparty/Smarty/plugins/shared.make_timestamp.php43
-rw-r--r--3dparty/Smarty/plugins/shared.mb_str_replace.php38
-rw-r--r--3dparty/Smarty/plugins/variablefilter.htmlspecialchars.php22
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_cacheresource_file.php205
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_append.php50
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_assign.php64
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_block.php187
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_break.php65
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_call.php108
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_capture.php81
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_config_load.php64
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_continue.php64
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_debug.php38
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_eval.php51
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_extends.php90
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_for.php147
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_foreach.php219
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_function.php134
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_if.php179
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_include.php176
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_include_php.php90
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_insert.php123
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_ldelim.php37
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_nocache.php63
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_block_plugin.php78
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php58
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_modifier.php69
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_block_function.php80
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_function.php71
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php77
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_block.php95
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_function.php67
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_private_special_variable.php99
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_rdelim.php37
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_section.php173
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compile_while.php82
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_compilebase.php150
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_config.php288
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php106
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_configfilelexer.php526
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_configfileparser.php870
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_data.php479
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_debug.php170
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_filter.php89
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_filter_handler.php67
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_function_call_handler.php40
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_get_include_path.php44
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_nocache_insert.php49
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_parsetree.php236
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_register.php156
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_eval.php89
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_extends.php176
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_file.php128
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_php.php127
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_registered.php143
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_stream.php99
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_resource_string.php133
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php72
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_template.php998
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_templatecompilerbase.php435
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_templatelexer.php1182
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_templateparser.php2966
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_utility.php300
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_wrapper.php131
-rw-r--r--3dparty/Smarty/sysplugins/smarty_internal_write_file.php56
-rw-r--r--3dparty/Smarty/sysplugins/smarty_security.php229
-rw-r--r--3dparty/System.php (renamed from inc/System.php)0
-rw-r--r--3dparty/XML/Parser.php (renamed from inc/XML/Parser.php)0
-rw-r--r--3dparty/XML/RPC.php (renamed from inc/XML/RPC.php)0
-rw-r--r--3dparty/XML/RPC/Server.php (renamed from inc/XML/RPC/Server.php)0
-rw-r--r--3dparty/docs/HTTP_WebDAV_Server/README (renamed from inc/docs/HTTP_WebDAV_Server/README)0
-rw-r--r--3dparty/docs/HTTP_WebDAV_Server/dav.txt (renamed from inc/docs/HTTP_WebDAV_Server/dav.txt)0
-rw-r--r--3dparty/docs/HTTP_WebDAV_Server/db/Fileserver.sql (renamed from inc/docs/HTTP_WebDAV_Server/db/Fileserver.sql)0
-rw-r--r--3dparty/package.dtd (renamed from inc/package.dtd)0
-rw-r--r--3dparty/packages/Archive_Tar.xml (renamed from inc/packages/Archive_Tar.xml)0
-rw-r--r--3dparty/packages/Console_Getopt.xml (renamed from inc/packages/Console_Getopt.xml)0
-rw-r--r--3dparty/packages/DB.xml (renamed from inc/packages/DB.xml)0
-rw-r--r--3dparty/packages/Log.xml (renamed from inc/packages/Log.xml)0
-rw-r--r--3dparty/packages/Mail.xml (renamed from inc/packages/Mail.xml)0
-rw-r--r--3dparty/packages/Mail_Mime.xml (renamed from inc/packages/Mail_Mime.xml)0
-rw-r--r--3dparty/packages/Net_SMTP.xml (renamed from inc/packages/Net_SMTP.xml)0
-rw-r--r--3dparty/packages/Net_Socket.xml (renamed from inc/packages/Net_Socket.xml)0
-rw-r--r--3dparty/packages/PEAR.xml (renamed from inc/packages/PEAR.xml)0
-rw-r--r--3dparty/packages/PHPUnit.xml (renamed from inc/packages/PHPUnit.xml)0
-rw-r--r--3dparty/packages/XML_Parser.xml (renamed from inc/packages/XML_Parser.xml)0
-rw-r--r--3dparty/packages/XML_RPC.xml (renamed from inc/packages/XML_RPC.xml)0
-rw-r--r--3dparty/pearcmd.php (renamed from inc/pearcmd.php)0
-rw-r--r--admin/appinfo.php12
-rw-r--r--admin/index.php44
-rw-r--r--admin/plugins.php51
-rw-r--r--admin/system.php (renamed from files/upload.php)50
-rw-r--r--admin/templates/_c/.gitkeep0
-rw-r--r--admin/templates/index.tmpl7
-rw-r--r--admin/templates/plugins.tmpl23
-rw-r--r--admin/templates/system.tmpl3
-rw-r--r--admin/templates/users.tmpl39
-rw-r--r--admin/users.php54
-rw-r--r--bin/Smarty-3.0.7.tar.gzbin0 -> 135613 bytes
-rw-r--r--bin/jquery-1.5.min.js16
-rw-r--r--bin/jquery-ui-1.8.10.custom.zipbin0 -> 1059316 bytes
-rw-r--r--css/default.php521
-rw-r--r--css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.pngbin0 -> 251 bytes
-rw-r--r--css/images/ui-bg_flat_15_cd0a0a_40x100.pngbin0 -> 181 bytes
-rw-r--r--css/images/ui-bg_glass_100_e4f1fb_1x400.pngbin0 -> 119 bytes
-rw-r--r--css/images/ui-bg_glass_50_3baae3_1x400.pngbin0 -> 131 bytes
-rw-r--r--css/images/ui-bg_glass_80_d7ebf9_1x400.pngbin0 -> 124 bytes
-rw-r--r--css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.pngbin0 -> 103 bytes
-rw-r--r--css/images/ui-bg_highlight-hard_70_000000_1x100.pngbin0 -> 118 bytes
-rw-r--r--css/images/ui-bg_highlight-soft_100_deedf7_1x100.pngbin0 -> 104 bytes
-rw-r--r--css/images/ui-bg_highlight-soft_25_ffef8f_1x100.pngbin0 -> 153 bytes
-rw-r--r--css/images/ui-icons_2694e8_256x240.pngbin0 -> 5355 bytes
-rw-r--r--css/images/ui-icons_2e83ff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--css/images/ui-icons_3d80b3_256x240.pngbin0 -> 5355 bytes
-rw-r--r--css/images/ui-icons_72a7cf_256x240.pngbin0 -> 4369 bytes
-rw-r--r--css/images/ui-icons_ffffff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--css/jquery-ui-1.8.10.custom.css573
-rw-r--r--css/small.php440
-rw-r--r--css/styles.css656
-rw-r--r--docs/FAQs8
-rw-r--r--docs/INSTALL30
-rw-r--r--docs/TODO16
-rw-r--r--docs/owncloud.sql61
-rw-r--r--files/api.php101
-rw-r--r--files/appinfo.php6
-rw-r--r--files/get_files.php109
-rw-r--r--files/index.php29
-rw-r--r--files/open_file.php47
-rw-r--r--files/pull.php11
-rw-r--r--files/templates/_c/.gitkeep0
-rw-r--r--files/templates/index.tmpl3
-rw-r--r--img/arrow.pngbin214 -> 0 bytes
-rw-r--r--img/arrow_down.pngbin116 -> 0 bytes
-rw-r--r--img/arrow_up.pngbin112 -> 0 bytes
-rw-r--r--img/body_background.jpgbin0 -> 305 bytes
-rw-r--r--img/dots.pngbin204 -> 0 bytes
-rw-r--r--img/drop-arrow.pngbin0 -> 2899 bytes
-rw-r--r--img/header_background.pngbin0 -> 2953 bytes
-rw-r--r--img/header_background2.pngbin0 -> 2402 bytes
-rw-r--r--img/help_about.pngbin0 -> 1538 bytes
-rw-r--r--img/icons/COPYING215
-rw-r--r--img/icons/delete.pngbin641 -> 0 bytes
-rw-r--r--img/icons/folder.pngbin386 -> 0 bytes
-rw-r--r--img/icons/loading.gifbin1844 -> 0 bytes
-rw-r--r--img/icons/other.pngbin431 -> 0 bytes
-rw-r--r--img/icons/rename.pngbin245 -> 0 bytes
-rw-r--r--img/owncloud-icon.pngbin2098 -> 0 bytes
-rw-r--r--img/owncloud-logo-medium-white.pngbin0 -> 15478 bytes
-rw-r--r--img/owncloud-logo-small-white.pngbin0 -> 5444 bytes
-rw-r--r--img/owncloud-logo-small.pngbin12825 -> 0 bytes
-rw-r--r--img/owncloud-logo.pngbin47374 -> 0 bytes
-rw-r--r--inc/lib_log.php86
-rw-r--r--inc/templates/adminform.php193
-rw-r--r--inc/templates/configform.php36
-rw-r--r--inc/templates/footer.php26
-rw-r--r--inc/templates/header.php90
-rw-r--r--inc/templates/loginform.php9
-rw-r--r--inc/templates/pluginform.php77
-rw-r--r--inc/templates/settings.php50
-rw-r--r--inc/templates/userform.php126
-rw-r--r--index.php58
-rw-r--r--js/ajax.js23
-rw-r--r--js/filebrowser.js596
-rw-r--r--js/jquery-1.5.min.js16
-rw-r--r--js/jquery-ui-1.8.10.custom.min.js782
-rw-r--r--js/js.js50
-rw-r--r--js/lib_ajax.js237
-rw-r--r--js/lib_api.js34
-rw-r--r--js/lib_drag.js348
-rw-r--r--js/lib_event.js48
-rw-r--r--js/lib_files.js414
-rw-r--r--js/lib_notification.js48
-rw-r--r--js/lib_timer.js52
-rw-r--r--js/lib_xmlloader.js154
-rw-r--r--lib/HTTP/WebDAV/Server/Filesystem.php (renamed from inc/HTTP/WebDAV/Server/Filesystem.php)148
-rw-r--r--lib/User/backend.php (renamed from inc/User/backend.php)20
-rw-r--r--lib/User/database.php (renamed from inc/User/database.php)55
-rw-r--r--lib/appconfig.php45
-rw-r--r--lib/base.php (renamed from inc/lib_base.php)522
-rw-r--r--lib/config.php (renamed from inc/lib_config.php)0
-rw-r--r--lib/connect.php (renamed from inc/lib_connect.php)0
-rw-r--r--lib/fileobserver.php (renamed from inc/lib_fileobserver.php)0
-rw-r--r--lib/files.php (renamed from inc/lib_files.php)28
-rw-r--r--lib/filestorage.php (renamed from inc/lib_filestorage.php)0
-rw-r--r--lib/filesystem.php (renamed from inc/lib_filesystem.php)0
-rw-r--r--lib/log.php78
-rw-r--r--lib/ocs.php (renamed from inc/lib_ocs.php)0
-rw-r--r--lib/plugin.php (renamed from inc/lib_plugin.php)42
-rw-r--r--lib/remotestorage.php (renamed from inc/lib_remotestorage.php)0
-rw-r--r--lib/template.php197
-rw-r--r--lib/user.php (renamed from inc/lib_user.php)28
-rw-r--r--log/appinfo.php6
-rw-r--r--log/index.php39
-rw-r--r--log/templates/_c/.gitkeep0
-rw-r--r--log/templates/index.tmpl46
-rw-r--r--settings/appinfo.php6
-rw-r--r--settings/index.php66
-rw-r--r--settings/templates/_c/.gitkeep0
-rw-r--r--settings/templates/index.tmpl19
-rw-r--r--templates/_c/.gitkeep0
-rw-r--r--templates/layout.admin.tmpl43
-rw-r--r--templates/layout.guest.tmpl20
-rw-r--r--templates/layout.user.tmpl43
-rw-r--r--templates/login.tmpl15
-rw-r--r--templates/logout.tmpl1
-rw-r--r--webdav.php (renamed from webdav/owncloud.php)20
360 files changed, 21274 insertions, 4725 deletions
diff --git a/inc/Archive/Tar.php b/3dparty/Archive/Tar.php
index d6e6e29350e..d6e6e29350e 100644
--- a/inc/Archive/Tar.php
+++ b/3dparty/Archive/Tar.php
diff --git a/inc/COPYING-PHP b/3dparty/COPYING-PHP
index 3cc8b777b77..3cc8b777b77 100644
--- a/inc/COPYING-PHP
+++ b/3dparty/COPYING-PHP
diff --git a/inc/COPYING-README b/3dparty/COPYING-README
index 2450ef15813..2450ef15813 100644
--- a/inc/COPYING-README
+++ b/3dparty/COPYING-README
diff --git a/inc/Console/Getopt.php b/3dparty/Console/Getopt.php
index 6f2f9c73079..6f2f9c73079 100644
--- a/inc/Console/Getopt.php
+++ b/3dparty/Console/Getopt.php
diff --git a/inc/HTTP/WebDAV/Server.php b/3dparty/HTTP/WebDAV/Server.php
index c407d74c89f..c407d74c89f 100644
--- a/inc/HTTP/WebDAV/Server.php
+++ b/3dparty/HTTP/WebDAV/Server.php
diff --git a/inc/HTTP/WebDAV/Tools/_parse_lockinfo.php b/3dparty/HTTP/WebDAV/Tools/_parse_lockinfo.php
index 6319f0d5200..6319f0d5200 100644
--- a/inc/HTTP/WebDAV/Tools/_parse_lockinfo.php
+++ b/3dparty/HTTP/WebDAV/Tools/_parse_lockinfo.php
diff --git a/inc/HTTP/WebDAV/Tools/_parse_propfind.php b/3dparty/HTTP/WebDAV/Tools/_parse_propfind.php
index cf72b529d97..cf72b529d97 100644
--- a/inc/HTTP/WebDAV/Tools/_parse_propfind.php
+++ b/3dparty/HTTP/WebDAV/Tools/_parse_propfind.php
diff --git a/inc/HTTP/WebDAV/Tools/_parse_proppatch.php b/3dparty/HTTP/WebDAV/Tools/_parse_proppatch.php
index fb0e595ddf7..fb0e595ddf7 100644
--- a/inc/HTTP/WebDAV/Tools/_parse_proppatch.php
+++ b/3dparty/HTTP/WebDAV/Tools/_parse_proppatch.php
diff --git a/inc/Log.php b/3dparty/Log.php
index 8f084640bc9..8f084640bc9 100644
--- a/inc/Log.php
+++ b/3dparty/Log.php
diff --git a/inc/Log/composite.php b/3dparty/Log/composite.php
index 104c8966c42..104c8966c42 100644
--- a/inc/Log/composite.php
+++ b/3dparty/Log/composite.php
diff --git a/inc/Log/console.php b/3dparty/Log/console.php
index 62032e79644..62032e79644 100644
--- a/inc/Log/console.php
+++ b/3dparty/Log/console.php
diff --git a/inc/Log/daemon.php b/3dparty/Log/daemon.php
index 739270c9a32..739270c9a32 100644
--- a/inc/Log/daemon.php
+++ b/3dparty/Log/daemon.php
diff --git a/inc/Log/display.php b/3dparty/Log/display.php
index 0d5a93d79da..0d5a93d79da 100644
--- a/inc/Log/display.php
+++ b/3dparty/Log/display.php
diff --git a/inc/Log/error_log.php b/3dparty/Log/error_log.php
index 04c0952cd7a..04c0952cd7a 100644
--- a/inc/Log/error_log.php
+++ b/3dparty/Log/error_log.php
diff --git a/inc/Log/file.php b/3dparty/Log/file.php
index 36f30b42978..36f30b42978 100644
--- a/inc/Log/file.php
+++ b/3dparty/Log/file.php
diff --git a/inc/Log/mail.php b/3dparty/Log/mail.php
index 064f13c0ed5..064f13c0ed5 100644
--- a/inc/Log/mail.php
+++ b/3dparty/Log/mail.php
diff --git a/inc/Log/mcal.php b/3dparty/Log/mcal.php
index a5c46f3dfc6..a5c46f3dfc6 100644
--- a/inc/Log/mcal.php
+++ b/3dparty/Log/mcal.php
diff --git a/inc/Log/null.php b/3dparty/Log/null.php
index 23de3f1a9e5..23de3f1a9e5 100644
--- a/inc/Log/null.php
+++ b/3dparty/Log/null.php
diff --git a/inc/Log/observer.php b/3dparty/Log/observer.php
index 187d5070f74..187d5070f74 100644
--- a/inc/Log/observer.php
+++ b/3dparty/Log/observer.php
diff --git a/inc/Log/sql.php b/3dparty/Log/sql.php
index 3a20a0e2faf..3a20a0e2faf 100644
--- a/inc/Log/sql.php
+++ b/3dparty/Log/sql.php
diff --git a/inc/Log/sqlite.php b/3dparty/Log/sqlite.php
index 83b908a9396..83b908a9396 100644
--- a/inc/Log/sqlite.php
+++ b/3dparty/Log/sqlite.php
diff --git a/inc/Log/syslog.php b/3dparty/Log/syslog.php
index 4bafbaa2d9a..4bafbaa2d9a 100644
--- a/inc/Log/syslog.php
+++ b/3dparty/Log/syslog.php
diff --git a/inc/Log/win.php b/3dparty/Log/win.php
index e8a09d16e81..e8a09d16e81 100644
--- a/inc/Log/win.php
+++ b/3dparty/Log/win.php
diff --git a/inc/MDB2.php b/3dparty/MDB2.php
index faf405b4112..faf405b4112 100644
--- a/inc/MDB2.php
+++ b/3dparty/MDB2.php
diff --git a/inc/MDB2/Date.php b/3dparty/MDB2/Date.php
index ce846543a50..ce846543a50 100644
--- a/inc/MDB2/Date.php
+++ b/3dparty/MDB2/Date.php
diff --git a/inc/MDB2/Driver/Datatype/Common.php b/3dparty/MDB2/Driver/Datatype/Common.php
index 750dbb24772..750dbb24772 100644
--- a/inc/MDB2/Driver/Datatype/Common.php
+++ b/3dparty/MDB2/Driver/Datatype/Common.php
diff --git a/inc/MDB2/Driver/Datatype/mysql.php b/3dparty/MDB2/Driver/Datatype/mysql.php
index 944248f57c3..944248f57c3 100644
--- a/inc/MDB2/Driver/Datatype/mysql.php
+++ b/3dparty/MDB2/Driver/Datatype/mysql.php
diff --git a/inc/MDB2/Driver/Datatype/pgsql.php b/3dparty/MDB2/Driver/Datatype/pgsql.php
index fe18729c84f..fe18729c84f 100644
--- a/inc/MDB2/Driver/Datatype/pgsql.php
+++ b/3dparty/MDB2/Driver/Datatype/pgsql.php
diff --git a/inc/MDB2/Driver/Datatype/sqlite.php b/3dparty/MDB2/Driver/Datatype/sqlite.php
index 533d0e9510b..533d0e9510b 100644
--- a/inc/MDB2/Driver/Datatype/sqlite.php
+++ b/3dparty/MDB2/Driver/Datatype/sqlite.php
diff --git a/inc/MDB2/Driver/Function/Common.php b/3dparty/MDB2/Driver/Function/Common.php
index 731f06882ce..731f06882ce 100644
--- a/inc/MDB2/Driver/Function/Common.php
+++ b/3dparty/MDB2/Driver/Function/Common.php
diff --git a/inc/MDB2/Driver/Function/mysql.php b/3dparty/MDB2/Driver/Function/mysql.php
index aff531c9f3a..aff531c9f3a 100644
--- a/inc/MDB2/Driver/Function/mysql.php
+++ b/3dparty/MDB2/Driver/Function/mysql.php
diff --git a/inc/MDB2/Driver/Function/pgsql.php b/3dparty/MDB2/Driver/Function/pgsql.php
index cb47ea57d9f..cb47ea57d9f 100644
--- a/inc/MDB2/Driver/Function/pgsql.php
+++ b/3dparty/MDB2/Driver/Function/pgsql.php
diff --git a/inc/MDB2/Driver/Function/sqlite.php b/3dparty/MDB2/Driver/Function/sqlite.php
index f5499599dd5..f5499599dd5 100644
--- a/inc/MDB2/Driver/Function/sqlite.php
+++ b/3dparty/MDB2/Driver/Function/sqlite.php
diff --git a/inc/MDB2/Driver/Manager/Common.php b/3dparty/MDB2/Driver/Manager/Common.php
index d7154d4eac0..d7154d4eac0 100644
--- a/inc/MDB2/Driver/Manager/Common.php
+++ b/3dparty/MDB2/Driver/Manager/Common.php
diff --git a/inc/MDB2/Driver/Manager/mysql.php b/3dparty/MDB2/Driver/Manager/mysql.php
index 7bd6a3623a3..7bd6a3623a3 100644
--- a/inc/MDB2/Driver/Manager/mysql.php
+++ b/3dparty/MDB2/Driver/Manager/mysql.php
diff --git a/inc/MDB2/Driver/Manager/pgsql.php b/3dparty/MDB2/Driver/Manager/pgsql.php
index 1a7e851897c..1a7e851897c 100644
--- a/inc/MDB2/Driver/Manager/pgsql.php
+++ b/3dparty/MDB2/Driver/Manager/pgsql.php
diff --git a/inc/MDB2/Driver/Manager/sqlite.php b/3dparty/MDB2/Driver/Manager/sqlite.php
index 85751d39a3f..85751d39a3f 100644
--- a/inc/MDB2/Driver/Manager/sqlite.php
+++ b/3dparty/MDB2/Driver/Manager/sqlite.php
diff --git a/inc/MDB2/Driver/Native/Common.php b/3dparty/MDB2/Driver/Native/Common.php
index c01caa35b71..c01caa35b71 100644
--- a/inc/MDB2/Driver/Native/Common.php
+++ b/3dparty/MDB2/Driver/Native/Common.php
diff --git a/inc/MDB2/Driver/Native/mysql.php b/3dparty/MDB2/Driver/Native/mysql.php
index 90ff068e6ff..90ff068e6ff 100644
--- a/inc/MDB2/Driver/Native/mysql.php
+++ b/3dparty/MDB2/Driver/Native/mysql.php
diff --git a/inc/MDB2/Driver/Native/pgsql.php b/3dparty/MDB2/Driver/Native/pgsql.php
index acab8389c89..acab8389c89 100644
--- a/inc/MDB2/Driver/Native/pgsql.php
+++ b/3dparty/MDB2/Driver/Native/pgsql.php
diff --git a/inc/MDB2/Driver/Native/sqlite.php b/3dparty/MDB2/Driver/Native/sqlite.php
index 0213293a50a..0213293a50a 100644
--- a/inc/MDB2/Driver/Native/sqlite.php
+++ b/3dparty/MDB2/Driver/Native/sqlite.php
diff --git a/inc/MDB2/Driver/Reverse/Common.php b/3dparty/MDB2/Driver/Reverse/Common.php
index 4a411fea6d2..4a411fea6d2 100644
--- a/inc/MDB2/Driver/Reverse/Common.php
+++ b/3dparty/MDB2/Driver/Reverse/Common.php
diff --git a/inc/MDB2/Driver/Reverse/mysql.php b/3dparty/MDB2/Driver/Reverse/mysql.php
index 40c62da3baa..40c62da3baa 100644
--- a/inc/MDB2/Driver/Reverse/mysql.php
+++ b/3dparty/MDB2/Driver/Reverse/mysql.php
diff --git a/inc/MDB2/Driver/Reverse/pgsql.php b/3dparty/MDB2/Driver/Reverse/pgsql.php
index d010292cd8c..d010292cd8c 100644
--- a/inc/MDB2/Driver/Reverse/pgsql.php
+++ b/3dparty/MDB2/Driver/Reverse/pgsql.php
diff --git a/inc/MDB2/Driver/Reverse/sqlite.php b/3dparty/MDB2/Driver/Reverse/sqlite.php
index 1b85aa71f9a..1b85aa71f9a 100644
--- a/inc/MDB2/Driver/Reverse/sqlite.php
+++ b/3dparty/MDB2/Driver/Reverse/sqlite.php
diff --git a/inc/MDB2/Driver/mysql.php b/3dparty/MDB2/Driver/mysql.php
index 091c479d194..091c479d194 100644
--- a/inc/MDB2/Driver/mysql.php
+++ b/3dparty/MDB2/Driver/mysql.php
diff --git a/inc/MDB2/Driver/pgsql.php b/3dparty/MDB2/Driver/pgsql.php
index 00a64865a72..00a64865a72 100644
--- a/inc/MDB2/Driver/pgsql.php
+++ b/3dparty/MDB2/Driver/pgsql.php
diff --git a/inc/MDB2/Driver/sqlite.php b/3dparty/MDB2/Driver/sqlite.php
index abde86d596b..abde86d596b 100644
--- a/inc/MDB2/Driver/sqlite.php
+++ b/3dparty/MDB2/Driver/sqlite.php
diff --git a/inc/MDB2/Extended.php b/3dparty/MDB2/Extended.php
index 864ab923543..864ab923543 100644
--- a/inc/MDB2/Extended.php
+++ b/3dparty/MDB2/Extended.php
diff --git a/inc/MDB2/Iterator.php b/3dparty/MDB2/Iterator.php
index ca5e7b69c27..ca5e7b69c27 100644
--- a/inc/MDB2/Iterator.php
+++ b/3dparty/MDB2/Iterator.php
diff --git a/inc/MDB2/LOB.php b/3dparty/MDB2/LOB.php
index 2cdf67afa92..2cdf67afa92 100644
--- a/inc/MDB2/LOB.php
+++ b/3dparty/MDB2/LOB.php
diff --git a/inc/MDB2/Schema.php b/3dparty/MDB2/Schema.php
index 44518b32658..44518b32658 100644
--- a/inc/MDB2/Schema.php
+++ b/3dparty/MDB2/Schema.php
diff --git a/inc/MDB2/Schema/Parser.php b/3dparty/MDB2/Schema/Parser.php
index ed31ba03bdf..ed31ba03bdf 100644
--- a/inc/MDB2/Schema/Parser.php
+++ b/3dparty/MDB2/Schema/Parser.php
diff --git a/inc/MDB2/Schema/Parser2.php b/3dparty/MDB2/Schema/Parser2.php
index 01318473fdd..01318473fdd 100644
--- a/inc/MDB2/Schema/Parser2.php
+++ b/3dparty/MDB2/Schema/Parser2.php
diff --git a/inc/MDB2/Schema/Reserved/ibase.php b/3dparty/MDB2/Schema/Reserved/ibase.php
index b208abc83a3..b208abc83a3 100644
--- a/inc/MDB2/Schema/Reserved/ibase.php
+++ b/3dparty/MDB2/Schema/Reserved/ibase.php
diff --git a/inc/MDB2/Schema/Reserved/mssql.php b/3dparty/MDB2/Schema/Reserved/mssql.php
index 74ac6885780..74ac6885780 100644
--- a/inc/MDB2/Schema/Reserved/mssql.php
+++ b/3dparty/MDB2/Schema/Reserved/mssql.php
diff --git a/inc/MDB2/Schema/Reserved/mysql.php b/3dparty/MDB2/Schema/Reserved/mysql.php
index 4f0575e0bb1..4f0575e0bb1 100644
--- a/inc/MDB2/Schema/Reserved/mysql.php
+++ b/3dparty/MDB2/Schema/Reserved/mysql.php
diff --git a/inc/MDB2/Schema/Reserved/oci8.php b/3dparty/MDB2/Schema/Reserved/oci8.php
index 57fe12ddcab..57fe12ddcab 100644
--- a/inc/MDB2/Schema/Reserved/oci8.php
+++ b/3dparty/MDB2/Schema/Reserved/oci8.php
diff --git a/inc/MDB2/Schema/Reserved/pgsql.php b/3dparty/MDB2/Schema/Reserved/pgsql.php
index d358e9c12f0..d358e9c12f0 100644
--- a/inc/MDB2/Schema/Reserved/pgsql.php
+++ b/3dparty/MDB2/Schema/Reserved/pgsql.php
diff --git a/inc/MDB2/Schema/Tool.php b/3dparty/MDB2/Schema/Tool.php
index 9689a0f6d73..9689a0f6d73 100644
--- a/inc/MDB2/Schema/Tool.php
+++ b/3dparty/MDB2/Schema/Tool.php
diff --git a/inc/MDB2/Schema/Tool/ParameterException.php b/3dparty/MDB2/Schema/Tool/ParameterException.php
index fab1e03e250..fab1e03e250 100644
--- a/inc/MDB2/Schema/Tool/ParameterException.php
+++ b/3dparty/MDB2/Schema/Tool/ParameterException.php
diff --git a/inc/MDB2/Schema/Validate.php b/3dparty/MDB2/Schema/Validate.php
index 21be024ce9f..21be024ce9f 100644
--- a/inc/MDB2/Schema/Validate.php
+++ b/3dparty/MDB2/Schema/Validate.php
diff --git a/inc/MDB2/Schema/Writer.php b/3dparty/MDB2/Schema/Writer.php
index 5ae4918dc1d..5ae4918dc1d 100644
--- a/inc/MDB2/Schema/Writer.php
+++ b/3dparty/MDB2/Schema/Writer.php
diff --git a/inc/Mail.php b/3dparty/Mail.php
index c9f480fd488..c9f480fd488 100644
--- a/inc/Mail.php
+++ b/3dparty/Mail.php
diff --git a/inc/Mail/RFC822.php b/3dparty/Mail/RFC822.php
index 47e84f83b26..47e84f83b26 100644
--- a/inc/Mail/RFC822.php
+++ b/3dparty/Mail/RFC822.php
diff --git a/inc/Mail/mail.php b/3dparty/Mail/mail.php
index 9135fa2363b..9135fa2363b 100644
--- a/inc/Mail/mail.php
+++ b/3dparty/Mail/mail.php
diff --git a/inc/Mail/mime.php b/3dparty/Mail/mime.php
index 302a2120d78..302a2120d78 100644
--- a/inc/Mail/mime.php
+++ b/3dparty/Mail/mime.php
diff --git a/inc/Mail/mimeDecode.php b/3dparty/Mail/mimeDecode.php
index d5187d9b7aa..d5187d9b7aa 100644
--- a/inc/Mail/mimeDecode.php
+++ b/3dparty/Mail/mimeDecode.php
diff --git a/inc/Mail/mimePart.php b/3dparty/Mail/mimePart.php
index c0050d41127..c0050d41127 100644
--- a/inc/Mail/mimePart.php
+++ b/3dparty/Mail/mimePart.php
diff --git a/inc/Mail/null.php b/3dparty/Mail/null.php
index 982bfa45b6d..982bfa45b6d 100644
--- a/inc/Mail/null.php
+++ b/3dparty/Mail/null.php
diff --git a/inc/Mail/sendmail.php b/3dparty/Mail/sendmail.php
index 39a43c25062..39a43c25062 100644
--- a/inc/Mail/sendmail.php
+++ b/3dparty/Mail/sendmail.php
diff --git a/inc/Mail/smtp.php b/3dparty/Mail/smtp.php
index 40686a61689..40686a61689 100644
--- a/inc/Mail/smtp.php
+++ b/3dparty/Mail/smtp.php
diff --git a/inc/Mail/xmail.dtd b/3dparty/Mail/xmail.dtd
index 9f42ca8b331..9f42ca8b331 100644
--- a/inc/Mail/xmail.dtd
+++ b/3dparty/Mail/xmail.dtd
diff --git a/inc/Mail/xmail.xsl b/3dparty/Mail/xmail.xsl
index 0b948913f84..0b948913f84 100644
--- a/inc/Mail/xmail.xsl
+++ b/3dparty/Mail/xmail.xsl
diff --git a/inc/Net/SMTP.php b/3dparty/Net/SMTP.php
index 71dcb5e9bef..71dcb5e9bef 100644
--- a/inc/Net/SMTP.php
+++ b/3dparty/Net/SMTP.php
diff --git a/inc/Net/Socket.php b/3dparty/Net/Socket.php
index 7c4ff1d4e21..7c4ff1d4e21 100644
--- a/inc/Net/Socket.php
+++ b/3dparty/Net/Socket.php
diff --git a/inc/OS/Guess.php b/3dparty/OS/Guess.php
index a85bf360ebc..a85bf360ebc 100644
--- a/inc/OS/Guess.php
+++ b/3dparty/OS/Guess.php
diff --git a/inc/PEAR.php b/3dparty/PEAR.php
index d5c9635a501..d5c9635a501 100644
--- a/inc/PEAR.php
+++ b/3dparty/PEAR.php
diff --git a/inc/PEAR/Autoloader.php b/3dparty/PEAR/Autoloader.php
index de0278d6191..de0278d6191 100644
--- a/inc/PEAR/Autoloader.php
+++ b/3dparty/PEAR/Autoloader.php
diff --git a/inc/PEAR/Builder.php b/3dparty/PEAR/Builder.php
index 4f6cc135d1e..4f6cc135d1e 100644
--- a/inc/PEAR/Builder.php
+++ b/3dparty/PEAR/Builder.php
diff --git a/inc/PEAR/Command.php b/3dparty/PEAR/Command.php
index 2ea68743d20..2ea68743d20 100644
--- a/inc/PEAR/Command.php
+++ b/3dparty/PEAR/Command.php
diff --git a/inc/PEAR/Command/Auth.php b/3dparty/PEAR/Command/Auth.php
index 0b9d3d3965d..0b9d3d3965d 100644
--- a/inc/PEAR/Command/Auth.php
+++ b/3dparty/PEAR/Command/Auth.php
diff --git a/inc/PEAR/Command/Build.php b/3dparty/PEAR/Command/Build.php
index 2ecbbc92f5f..2ecbbc92f5f 100644
--- a/inc/PEAR/Command/Build.php
+++ b/3dparty/PEAR/Command/Build.php
diff --git a/inc/PEAR/Command/Common.php b/3dparty/PEAR/Command/Common.php
index c6ace694caf..c6ace694caf 100644
--- a/inc/PEAR/Command/Common.php
+++ b/3dparty/PEAR/Command/Common.php
diff --git a/inc/PEAR/Command/Config.php b/3dparty/PEAR/Command/Config.php
index 474a2345170..474a2345170 100644
--- a/inc/PEAR/Command/Config.php
+++ b/3dparty/PEAR/Command/Config.php
diff --git a/inc/PEAR/Command/Install.php b/3dparty/PEAR/Command/Install.php
index dce52f017e2..dce52f017e2 100644
--- a/inc/PEAR/Command/Install.php
+++ b/3dparty/PEAR/Command/Install.php
diff --git a/inc/PEAR/Command/Mirror.php b/3dparty/PEAR/Command/Mirror.php
index bf56c3db640..bf56c3db640 100644
--- a/inc/PEAR/Command/Mirror.php
+++ b/3dparty/PEAR/Command/Mirror.php
diff --git a/inc/PEAR/Command/Package.php b/3dparty/PEAR/Command/Package.php
index aca87111118..aca87111118 100644
--- a/inc/PEAR/Command/Package.php
+++ b/3dparty/PEAR/Command/Package.php
diff --git a/inc/PEAR/Command/Registry.php b/3dparty/PEAR/Command/Registry.php
index 62cb4b00e28..62cb4b00e28 100644
--- a/inc/PEAR/Command/Registry.php
+++ b/3dparty/PEAR/Command/Registry.php
diff --git a/inc/PEAR/Command/Remote.php b/3dparty/PEAR/Command/Remote.php
index bbd16093f5d..bbd16093f5d 100644
--- a/inc/PEAR/Command/Remote.php
+++ b/3dparty/PEAR/Command/Remote.php
diff --git a/inc/PEAR/Common.php b/3dparty/PEAR/Common.php
index fba53a37799..fba53a37799 100644
--- a/inc/PEAR/Common.php
+++ b/3dparty/PEAR/Common.php
diff --git a/inc/PEAR/Config.php b/3dparty/PEAR/Config.php
index ba641735250..ba641735250 100644
--- a/inc/PEAR/Config.php
+++ b/3dparty/PEAR/Config.php
diff --git a/inc/PEAR/Dependency.php b/3dparty/PEAR/Dependency.php
index 705167aa70f..705167aa70f 100644
--- a/inc/PEAR/Dependency.php
+++ b/3dparty/PEAR/Dependency.php
diff --git a/inc/PEAR/Downloader.php b/3dparty/PEAR/Downloader.php
index 5e16dc5ffb1..5e16dc5ffb1 100644
--- a/inc/PEAR/Downloader.php
+++ b/3dparty/PEAR/Downloader.php
diff --git a/inc/PEAR/ErrorStack.php b/3dparty/PEAR/ErrorStack.php
index da52f08d345..da52f08d345 100644
--- a/inc/PEAR/ErrorStack.php
+++ b/3dparty/PEAR/ErrorStack.php
diff --git a/inc/PEAR/Exception.php b/3dparty/PEAR/Exception.php
index c735c16b398..c735c16b398 100644
--- a/inc/PEAR/Exception.php
+++ b/3dparty/PEAR/Exception.php
diff --git a/inc/PEAR/Frontend/CLI.php b/3dparty/PEAR/Frontend/CLI.php
index 832ddf09b3f..832ddf09b3f 100644
--- a/inc/PEAR/Frontend/CLI.php
+++ b/3dparty/PEAR/Frontend/CLI.php
diff --git a/inc/PEAR/Installer.php b/3dparty/PEAR/Installer.php
index 31e2cff81ee..31e2cff81ee 100644
--- a/inc/PEAR/Installer.php
+++ b/3dparty/PEAR/Installer.php
diff --git a/inc/PEAR/Packager.php b/3dparty/PEAR/Packager.php
index 3ed209be8b2..3ed209be8b2 100644
--- a/inc/PEAR/Packager.php
+++ b/3dparty/PEAR/Packager.php
diff --git a/inc/PEAR/Registry.php b/3dparty/PEAR/Registry.php
index f2510a38f15..f2510a38f15 100644
--- a/inc/PEAR/Registry.php
+++ b/3dparty/PEAR/Registry.php
diff --git a/inc/PEAR/Remote.php b/3dparty/PEAR/Remote.php
index 7b1e314f903..7b1e314f903 100644
--- a/inc/PEAR/Remote.php
+++ b/3dparty/PEAR/Remote.php
diff --git a/inc/PEAR/RunTest.php b/3dparty/PEAR/RunTest.php
index 1aa02aab9df..1aa02aab9df 100644
--- a/inc/PEAR/RunTest.php
+++ b/3dparty/PEAR/RunTest.php
diff --git a/inc/PHPUnit.php b/3dparty/PHPUnit.php
index de4da858eb9..de4da858eb9 100644
--- a/inc/PHPUnit.php
+++ b/3dparty/PHPUnit.php
diff --git a/inc/PHPUnit/Assert.php b/3dparty/PHPUnit/Assert.php
index 74806458bd3..74806458bd3 100644
--- a/inc/PHPUnit/Assert.php
+++ b/3dparty/PHPUnit/Assert.php
diff --git a/inc/PHPUnit/GUI/Gtk.php b/3dparty/PHPUnit/GUI/Gtk.php
index fdd3a9931e5..fdd3a9931e5 100644
--- a/inc/PHPUnit/GUI/Gtk.php
+++ b/3dparty/PHPUnit/GUI/Gtk.php
diff --git a/inc/PHPUnit/GUI/HTML.php b/3dparty/PHPUnit/GUI/HTML.php
index 773ab9af9f3..773ab9af9f3 100644
--- a/inc/PHPUnit/GUI/HTML.php
+++ b/3dparty/PHPUnit/GUI/HTML.php
diff --git a/inc/PHPUnit/GUI/SetupDecorator.php b/3dparty/PHPUnit/GUI/SetupDecorator.php
index 73c3d8298e2..73c3d8298e2 100644
--- a/inc/PHPUnit/GUI/SetupDecorator.php
+++ b/3dparty/PHPUnit/GUI/SetupDecorator.php
diff --git a/inc/PHPUnit/RepeatedTest.php b/3dparty/PHPUnit/RepeatedTest.php
index f8cbbc640f6..f8cbbc640f6 100644
--- a/inc/PHPUnit/RepeatedTest.php
+++ b/3dparty/PHPUnit/RepeatedTest.php
diff --git a/inc/PHPUnit/Skeleton.php b/3dparty/PHPUnit/Skeleton.php
index 81fe3149066..81fe3149066 100644
--- a/inc/PHPUnit/Skeleton.php
+++ b/3dparty/PHPUnit/Skeleton.php
diff --git a/inc/PHPUnit/TestCase.php b/3dparty/PHPUnit/TestCase.php
index 69594ed2f8e..69594ed2f8e 100644
--- a/inc/PHPUnit/TestCase.php
+++ b/3dparty/PHPUnit/TestCase.php
diff --git a/inc/PHPUnit/TestDecorator.php b/3dparty/PHPUnit/TestDecorator.php
index 6486309a70b..6486309a70b 100644
--- a/inc/PHPUnit/TestDecorator.php
+++ b/3dparty/PHPUnit/TestDecorator.php
diff --git a/inc/PHPUnit/TestFailure.php b/3dparty/PHPUnit/TestFailure.php
index 69c8b80bcbb..69c8b80bcbb 100644
--- a/inc/PHPUnit/TestFailure.php
+++ b/3dparty/PHPUnit/TestFailure.php
diff --git a/inc/PHPUnit/TestListener.php b/3dparty/PHPUnit/TestListener.php
index 7685df46792..7685df46792 100644
--- a/inc/PHPUnit/TestListener.php
+++ b/3dparty/PHPUnit/TestListener.php
diff --git a/inc/PHPUnit/TestResult.php b/3dparty/PHPUnit/TestResult.php
index ee60b2c5b50..ee60b2c5b50 100644
--- a/inc/PHPUnit/TestResult.php
+++ b/3dparty/PHPUnit/TestResult.php
diff --git a/inc/PHPUnit/TestSuite.php b/3dparty/PHPUnit/TestSuite.php
index f2396748ba3..f2396748ba3 100644
--- a/inc/PHPUnit/TestSuite.php
+++ b/3dparty/PHPUnit/TestSuite.php
diff --git a/3dparty/Smarty/Smarty.class.php b/3dparty/Smarty/Smarty.class.php
new file mode 100644
index 00000000000..274c9138d45
--- /dev/null
+++ b/3dparty/Smarty/Smarty.class.php
@@ -0,0 +1,815 @@
+<?php
+
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: Smarty.class.php
+ * SVN: $Id: Smarty.class.php 3895 2010-12-31 13:47:12Z uwe.tews@googlemail.com $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @package Smarty
+ * @version 3.0.7
+ */
+
+/**
+ * define shorthand directory separator constant
+ */
+if (!defined('DS')) {
+ define('DS', DIRECTORY_SEPARATOR);
+}
+
+/**
+ * set SMARTY_DIR to absolute path to Smarty library files.
+ * Sets SMARTY_DIR only if user application has not already defined it.
+ */
+if (!defined('SMARTY_DIR')) {
+ define('SMARTY_DIR', dirname(__FILE__) . DS);
+}
+
+/**
+ * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.
+ * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it.
+ */
+if (!defined('SMARTY_SYSPLUGINS_DIR')) {
+ define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS);
+}
+if (!defined('SMARTY_PLUGINS_DIR')) {
+ define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS);
+}
+if (!defined('SMARTY_RESOURCE_CHAR_SET')) {
+ define('SMARTY_RESOURCE_CHAR_SET', 'UTF-8');
+}
+if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) {
+ define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y');
+}
+
+/**
+ * register the class autoloader
+ */
+if (!defined('SMARTY_SPL_AUTOLOAD')) {
+ define('SMARTY_SPL_AUTOLOAD', 0);
+}
+
+if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {
+ $registeredAutoLoadFunctions = spl_autoload_functions();
+ if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
+ spl_autoload_register();
+ }
+} else {
+ spl_autoload_register('smartyAutoload');
+}
+
+/**
+ * This is the main Smarty class
+ */
+class Smarty extends Smarty_Internal_Data {
+ /**
+ * constant definitions
+ */
+ // smarty version
+ const SMARTY_VERSION = 'Smarty-3.0.7';
+ //define variable scopes
+ const SCOPE_LOCAL = 0;
+ const SCOPE_PARENT = 1;
+ const SCOPE_ROOT = 2;
+ const SCOPE_GLOBAL = 3;
+ // define caching modes
+ const CACHING_OFF = 0;
+ const CACHING_LIFETIME_CURRENT = 1;
+ const CACHING_LIFETIME_SAVED = 2;
+ /** modes for handling of "<?php ... ?>" tags in templates. **/
+ const PHP_PASSTHRU = 0; //-> print tags as plain text
+ const PHP_QUOTE = 1; //-> escape tags as entities
+ const PHP_REMOVE = 2; //-> escape tags as entities
+ const PHP_ALLOW = 3; //-> escape tags as entities
+ // filter types
+ const FILTER_POST = 'post';
+ const FILTER_PRE = 'pre';
+ const FILTER_OUTPUT = 'output';
+ const FILTER_VARIABLE = 'variable';
+ // plugin types
+ const PLUGIN_FUNCTION = 'function';
+ const PLUGIN_BLOCK = 'block';
+ const PLUGIN_COMPILER = 'compiler';
+ const PLUGIN_MODIFIER = 'modifier';
+
+ /**
+ * static variables
+ */
+ // assigned global tpl vars
+ static $global_tpl_vars = array();
+
+ /**
+ * variables
+ */
+ // auto literal on delimiters with whitspace
+ public $auto_literal = true;
+ // display error on not assigned variables
+ public $error_unassigned = false;
+ // template directory
+ public $template_dir = null;
+ // default template handler
+ public $default_template_handler_func = null;
+ // compile directory
+ public $compile_dir = null;
+ // plugins directory
+ public $plugins_dir = null;
+ // cache directory
+ public $cache_dir = null;
+ // config directory
+ public $config_dir = null;
+ // force template compiling?
+ public $force_compile = false;
+ // check template for modifications?
+ public $compile_check = true;
+ // locking concurrent compiles
+ public $compile_locking = true;
+ // use sub dirs for compiled/cached files?
+ public $use_sub_dirs = false;
+ // compile_error?
+ public $compile_error = false;
+ // caching enabled
+ public $caching = false;
+ // merge compiled includes
+ public $merge_compiled_includes = false;
+ // cache lifetime
+ public $cache_lifetime = 3600;
+ // force cache file creation
+ public $force_cache = false;
+ // cache_id
+ public $cache_id = null;
+ // compile_id
+ public $compile_id = null;
+ // template delimiters
+ public $left_delimiter = "{";
+ public $right_delimiter = "}";
+ // security
+ public $security_class = 'Smarty_Security';
+ public $security_policy = null;
+ public $php_handling = self::PHP_PASSTHRU;
+ public $allow_php_tag = false;
+ public $allow_php_templates = false;
+ public $direct_access_security = true;
+ public $trusted_dir = array();
+ // debug mode
+ public $debugging = false;
+ public $debugging_ctrl = 'NONE';
+ public $smarty_debug_id = 'SMARTY_DEBUG';
+ public $debug_tpl = null;
+ // When set, smarty does uses this value as error_reporting-level.
+ public $error_reporting = null;
+ // config var settings
+ public $config_overwrite = true; //Controls whether variables with the same name overwrite each other.
+ public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean
+ public $config_read_hidden = false; //Controls whether hidden config sections/vars are read from the file.
+ // config vars
+ public $config_vars = array();
+ // assigned tpl vars
+ public $tpl_vars = array();
+ // dummy parent object
+ public $parent = null;
+ // global template functions
+ public $template_functions = array();
+ // resource type used if none given
+ public $default_resource_type = 'file';
+ // caching type
+ public $caching_type = 'file';
+ // internal cache resource types
+ public $cache_resource_types = array('file');
+ // internal config properties
+ public $properties = array();
+ // config type
+ public $default_config_type = 'file';
+ // cached template objects
+ public $template_objects = null;
+ // check If-Modified-Since headers
+ public $cache_modified_check = false;
+ // registered plugins
+ public $registered_plugins = array();
+ // plugin search order
+ public $plugin_search_order = array('function', 'block', 'compiler', 'class');
+ // registered objects
+ public $registered_objects = array();
+ // registered classes
+ public $registered_classes = array();
+ // registered filters
+ public $registered_filters = array();
+ // registered resources
+ public $registered_resources = array();
+ // autoload filter
+ public $autoload_filters = array();
+ // status of filter on variable output
+ public $variable_filter = true;
+ // default modifier
+ public $default_modifiers = array();
+ // global internal smarty vars
+ static $_smarty_vars = array();
+ // start time for execution time calculation
+ public $start_time = 0;
+ // default file permissions
+ public $_file_perms = 0644;
+ // default dir permissions
+ public $_dir_perms = 0771;
+ // block tag hierarchy
+ public $_tag_stack = array();
+ // flag if {block} tag is compiled for template inheritance
+ public $inheritance = false;
+ // generate deprecated function call notices?
+ public $deprecation_notices = true;
+ // Smarty 2 BC
+ public $_version = self::SMARTY_VERSION;
+ // self pointer to Smarty object
+ public $smarty;
+
+ /**
+ * Class constructor, initializes basic smarty properties
+ */
+ public function __construct()
+ {
+ // selfpointer need by some other class methods
+ $this->smarty = $this;
+ if (is_callable('mb_internal_encoding')) {
+ mb_internal_encoding(SMARTY_RESOURCE_CHAR_SET);
+ }
+ $this->start_time = microtime(true);
+ // set default dirs
+ $this->template_dir = array('.' . DS . 'templates' . DS);
+ $this->compile_dir = '.' . DS . 'templates_c' . DS;
+ $this->plugins_dir = array(SMARTY_PLUGINS_DIR);
+ $this->cache_dir = '.' . DS . 'cache' . DS;
+ $this->config_dir = '.' . DS . 'configs' . DS;
+ $this->debug_tpl = SMARTY_DIR . 'debug.tpl';
+ if (isset($_SERVER['SCRIPT_NAME'])) {
+ $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']);
+ }
+ }
+
+ /**
+ * Class destructor
+ */
+ public function __destruct()
+ {
+ }
+
+ /**
+ * fetches a rendered Smarty template
+ *
+ * @param string $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $ |null $parent next higher level of Smarty variables
+ * @return string rendered template output
+ */
+ public function fetch($template, $cache_id = null, $compile_id = null, $parent = null, $display = false)
+ {
+ if (!empty($cache_id) && is_object($cache_id)) {
+ $parent = $cache_id;
+ $cache_id = null;
+ }
+ if ($parent === null) {
+ // get default Smarty data object
+ $parent = $this;
+ }
+ // create template object if necessary
+ ($template instanceof $this->template_class)? $_template = $template :
+ $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false);
+ if (isset($this->error_reporting)) {
+ $_smarty_old_error_level = error_reporting($this->error_reporting);
+ }
+ // check URL debugging control
+ if (!$this->debugging && $this->debugging_ctrl == 'URL') {
+ if (isset($_SERVER['QUERY_STRING'])) {
+ $_query_string = $_SERVER['QUERY_STRING'];
+ } else {
+ $_query_string = '';
+ }
+ if (false !== strpos($_query_string, $this->smarty_debug_id)) {
+ if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) {
+ // enable debugging for this browser session
+ setcookie('SMARTY_DEBUG', true);
+ $this->debugging = true;
+ } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) {
+ // disable debugging for this browser session
+ setcookie('SMARTY_DEBUG', false);
+ $this->debugging = false;
+ } else {
+ // enable debugging for this page
+ $this->debugging = true;
+ }
+ } else {
+ if (isset($_COOKIE['SMARTY_DEBUG'])) {
+ $this->debugging = true;
+ }
+ }
+ }
+ // obtain data for cache modified check
+ if ($this->cache_modified_check && $this->caching && $display) {
+ $_isCached = $_template->isCached() && !$_template->has_nocache_code;
+ if ($_isCached) {
+ $_gmt_mtime = gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT';
+ } else {
+ $_gmt_mtime = '';
+ }
+ }
+ // return rendered template
+ if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) {
+ $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template);
+ } else {
+ $_output = $_template->getRenderedTemplate();
+ }
+ $_template->rendered_content = null;
+ if (isset($this->error_reporting)) {
+ error_reporting($_smarty_old_error_level);
+ }
+ // display or fetch
+ if ($display) {
+ if ($this->caching && $this->cache_modified_check) {
+ $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
+ if ($_isCached && $_gmt_mtime == $_last_modified_date) {
+ if (php_sapi_name() == 'cgi')
+ header('Status: 304 Not Modified');
+ else
+ header('HTTP/1.1 304 Not Modified');
+ } else {
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT');
+ echo $_output;
+ }
+ } else {
+ echo $_output;
+ }
+ // debug output
+ if ($this->debugging) {
+ Smarty_Internal_Debug::display_debug($this);
+ }
+ return;
+ } else {
+ // return fetched content
+ return $_output;
+ }
+ }
+
+ /**
+ * displays a Smarty template
+ *
+ * @param string $ |object $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ */
+ public function display($template, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ // display template
+ $this->fetch ($template, $cache_id, $compile_id, $parent, true);
+ }
+
+ /**
+ * test if cache i valid
+ *
+ * @param string $ |object $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @return boolean cache status
+ */
+ public function isCached($template, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ if ($parent === null) {
+ $parent = $this;
+ }
+ if (!($template instanceof $this->template_class)) {
+ $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false);
+ }
+ // return cache status of template
+ return $template->isCached();
+ }
+
+ /**
+ * creates a data object
+ *
+ * @param object $parent next higher level of Smarty variables
+ * @returns object data object
+ */
+ public function createData($parent = null)
+ {
+ return new Smarty_Data($parent, $this);
+ }
+
+ /**
+ * creates a template object
+ *
+ * @param string $template the resource handle of the template file
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @param boolean $do_clone flag is Smarty object shall be cloned
+ * @returns object template object
+ */
+ public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
+ {
+ if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
+ $parent = $cache_id;
+ $cache_id = null;
+ }
+ if (!empty($parent) && is_array($parent)) {
+ $data = $parent;
+ $parent = null;
+ } else {
+ $data = null;
+ }
+ if (!is_object($template)) {
+ // we got a template resource
+ // already in template cache?
+ $_templateId = sha1($template . $cache_id . $compile_id);
+ if (isset($this->template_objects[$_templateId]) && $this->caching) {
+ // return cached template object
+ $tpl = $this->template_objects[$_templateId];
+ } else {
+ // create new template object
+ if ($do_clone) {
+ $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
+ } else {
+ $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
+ }
+ }
+ } else {
+ // just return a copy of template class
+ $tpl = $template;
+ }
+ // fill data if present
+ if (!empty($data) && is_array($data)) {
+ // set up variable values
+ foreach ($data as $_key => $_val) {
+ $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ }
+ return $tpl;
+ }
+
+
+
+ /**
+ * Check if a template resource exists
+ *
+ * @param string $resource_name template name
+ * @return boolean status
+ */
+ function templateExists($resource_name)
+ {
+ // create template object
+ $save = $this->template_objects;
+ $tpl = new $this->template_class($resource_name, $this);
+ // check if it does exists
+ $result = $tpl->isExisting();
+ $this->template_objects = $save;
+ return $result;
+ }
+
+ /**
+ * Returns a single or all global variables
+ *
+ * @param object $smarty
+ * @param string $varname variable name or null
+ * @return string variable value or or array of variables
+ */
+ function getGlobal($varname = null)
+ {
+ if (isset($varname)) {
+ if (isset(self::$global_tpl_vars[$varname])) {
+ return self::$global_tpl_vars[$varname]->value;
+ } else {
+ return '';
+ }
+ } else {
+ $_result = array();
+ foreach (self::$global_tpl_vars AS $key => $var) {
+ $_result[$key] = $var->value;
+ }
+ return $_result;
+ }
+ }
+
+ /**
+ * Empty cache folder
+ *
+ * @param integer $exp_time expiration time
+ * @param string $type resource type
+ * @return integer number of cache files deleted
+ */
+ function clearAllCache($exp_time = null, $type = null)
+ {
+ // load cache resource and call clearAll
+ return $this->loadCacheResource($type)->clearAll($exp_time);
+ }
+
+ /**
+ * Empty cache for a specific template
+ *
+ * @param string $template_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @param string $type resource type
+ * @return integer number of cache files deleted
+ */
+ function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)
+ {
+ // load cache resource and call clear
+ return $this->loadCacheResource($type)->clear($template_name, $cache_id, $compile_id, $exp_time);
+ }
+
+ /**
+ * Loads security class and enables security
+ */
+ public function enableSecurity($security_class = null)
+ {
+ if ($security_class instanceof Smarty_Security) {
+ $this->security_policy = $security_class;
+ return;
+ }
+ if ($security_class == null) {
+ $security_class = $this->security_class;
+ }
+ if (class_exists($security_class)) {
+ $this->security_policy = new $security_class($this);
+ } else {
+ throw new SmartyException("Security class '$security_class' is not defined");
+ }
+ }
+
+ /**
+ * Disable security
+ */
+ public function disableSecurity()
+ {
+ $this->security_policy = null;
+ }
+
+ /**
+ * Loads cache resource.
+ *
+ * @param string $type cache resource type
+ * @return object of cache resource
+ */
+ public function loadCacheResource($type = null) {
+ if (!isset($type)) {
+ $type = $this->caching_type;
+ }
+ if (in_array($type, $this->cache_resource_types)) {
+ $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type);
+ return new $cache_resource_class($this);
+ }
+ else {
+ // try plugins dir
+ $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type);
+ if ($this->loadPlugin($cache_resource_class)) {
+ return new $cache_resource_class($this);
+ }
+ else {
+ throw new SmartyException("Unable to load cache resource '{$type}'");
+ }
+ }
+ }
+
+
+ /**
+ * Set template directory
+ *
+ * @param string $ |array $template_dir folder(s) of template sorces
+ */
+ public function setTemplateDir($template_dir)
+ {
+ $this->template_dir = (array)$template_dir;
+ return;
+ }
+
+ /**
+ * Adds template directory(s) to existing ones
+ *
+ * @param string $ |array $template_dir folder(s) of template sources
+ */
+ public function addTemplateDir($template_dir)
+ {
+ $this->template_dir = array_unique(array_merge((array)$this->template_dir, (array)$template_dir));
+ return;
+ }
+
+ /**
+ * Adds directory of plugin files
+ *
+ * @param object $smarty
+ * @param string $ |array $ plugins folder
+ * @return
+ */
+ function addPluginsDir($plugins_dir)
+ {
+ $this->plugins_dir = array_unique(array_merge((array)$this->plugins_dir, (array)$plugins_dir));
+ return;
+ }
+
+
+ /**
+ * return a reference to a registered object
+ *
+ * @param string $name object name
+ * @return object
+ */
+ function getRegisteredObject($name)
+ {
+ if (!isset($this->registered_objects[$name]))
+ throw new SmartyException("'$name' is not a registered object");
+
+ if (!is_object($this->registered_objects[$name][0]))
+ throw new SmartyException("registered '$name' is not an object");
+
+ return $this->registered_objects[$name][0];
+ }
+
+
+ /**
+ * return name of debugging template
+ *
+ * @return string
+ */
+ function getDebugTemplate()
+ {
+ return $this->debug_tpl;
+ }
+
+ /**
+ * set the debug template
+ *
+ * @param string $tpl_name
+ * @return bool
+ */
+ function setDebugTemplate($tpl_name)
+ {
+ return $this->debug_tpl = $tpl_name;
+ }
+
+ /**
+ * Takes unknown classes and loads plugin files for them
+ * class name format: Smarty_PluginType_PluginName
+ * plugin filename format: plugintype.pluginname.php
+ *
+ * @param string $plugin_name class plugin name to load
+ * @return string |boolean filepath of loaded file or false
+ */
+ public function loadPlugin($plugin_name, $check = true)
+ {
+ // if function or class exists, exit silently (already loaded)
+ if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false)))
+ return true;
+ // Plugin name is expected to be: Smarty_[Type]_[Name]
+ $_plugin_name = strtolower($plugin_name);
+ $_name_parts = explode('_', $_plugin_name, 3);
+ // class name must have three parts to be valid plugin
+ if (count($_name_parts) < 3 || $_name_parts[0] !== 'smarty') {
+ throw new SmartyException("plugin {$plugin_name} is not a valid name format");
+ return false;
+ }
+ // if type is "internal", get plugin from sysplugins
+ if ($_name_parts[1] == 'internal') {
+ $file = SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php';
+ if (file_exists($file)) {
+ require_once($file);
+ return $file;
+ } else {
+ return false;
+ }
+ }
+ // plugin filename is expected to be: [type].[name].php
+ $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php";
+ // loop through plugin dirs and find the plugin
+ foreach((array)$this->plugins_dir as $_plugin_dir) {
+ if (strpos('/\\', substr($_plugin_dir, -1)) === false) {
+ $_plugin_dir .= DS;
+ }
+ $file = $_plugin_dir . $_plugin_filename;
+ if (file_exists($file)) {
+ require_once($file);
+ return $file;
+ }
+ }
+ // no plugin loaded
+ return false;
+ }
+
+ /**
+ * clean up properties on cloned object
+ */
+ public function __clone()
+ {
+ // clear config vars
+ $this->config_vars = array();
+ // clear assigned tpl vars
+ $this->tpl_vars = array();
+ // clear objects for external methods
+ unset($this->register);
+ unset($this->filter);
+ }
+
+
+ /**
+ * Handle unknown class methods
+ *
+ * @param string $name unknown methode name
+ * @param array $args aurgument array
+ */
+ public function __call($name, $args)
+ {
+ static $camel_func;
+ if (!isset($camel_func))
+ $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);');
+ // see if this is a set/get for a property
+ $first3 = strtolower(substr($name, 0, 3));
+ if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') {
+ // try to keep case correct for future PHP 6.0 case-sensitive class methods
+ // lcfirst() not available < PHP 5.3.0, so improvise
+ $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4);
+ // convert camel case to underscored name
+ $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name);
+ if (!property_exists($this, $property_name)) {
+ throw new SmartyException("property '$property_name' does not exist.");
+ return false;
+ }
+ if ($first3 == 'get')
+ return $this->$property_name;
+ else
+ return $this->$property_name = $args[0];
+ }
+ // Smarty Backward Compatible wrapper
+ if (strpos($name,'_') !== false) {
+ if (!isset($this->wrapper)) {
+ $this->wrapper = new Smarty_Internal_Wrapper($this);
+ }
+ return $this->wrapper->convert($name, $args);
+ }
+ // external Smarty methods ?
+ foreach(array('filter','register') as $external) {
+ if (method_exists("Smarty_Internal_{$external}",$name)) {
+ if (!isset($this->$external)) {
+ $class = "Smarty_Internal_{$external}";
+ $this->$external = new $class($this);
+ }
+ return call_user_func_array(array($this->$external,$name), $args);
+ }
+ }
+ if (in_array($name,array('clearCompiledTemplate','compileAllTemplates','compileAllConfig','testInstall','getTags'))) {
+ if (!isset($this->utility)) {
+ $this->utility = new Smarty_Internal_Utility($this);
+ }
+ return call_user_func_array(array($this->utility,$name), $args);
+ }
+ // PHP4 call to constructor?
+ if (strtolower($name) == 'smarty') {
+ throw new SmartyException('Please use parent::__construct() to call parent constuctor');
+ return false;
+ }
+ throw new SmartyException("Call of unknown function '$name'.");
+ }
+}
+
+/**
+ * Autoloader
+ */
+function smartyAutoload($class)
+{
+ $_class = strtolower($class);
+ if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') {
+ include SMARTY_SYSPLUGINS_DIR . $_class . '.php';
+ }
+}
+
+/**
+ * Smarty exception class
+ */
+Class SmartyException extends Exception {
+}
+
+/**
+ * Smarty compiler exception class
+ */
+Class SmartyCompilerException extends SmartyException {
+}
+
+?>
diff --git a/3dparty/Smarty/debug.tpl b/3dparty/Smarty/debug.tpl
new file mode 100644
index 00000000000..7c318a4fcc4
--- /dev/null
+++ b/3dparty/Smarty/debug.tpl
@@ -0,0 +1,133 @@
+{capture name='_smarty_debug' assign=debug_output}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>Smarty Debug Console</title>
+<style type="text/css">
+{literal}
+body, h1, h2, td, th, p {
+ font-family: sans-serif;
+ font-weight: normal;
+ font-size: 0.9em;
+ margin: 1px;
+ padding: 0;
+}
+
+h1 {
+ margin: 0;
+ text-align: left;
+ padding: 2px;
+ background-color: #f0c040;
+ color: black;
+ font-weight: bold;
+ font-size: 1.2em;
+ }
+
+h2 {
+ background-color: #9B410E;
+ color: white;
+ text-align: left;
+ font-weight: bold;
+ padding: 2px;
+ border-top: 1px solid black;
+}
+
+body {
+ background: black;
+}
+
+p, table, div {
+ background: #f0ead8;
+}
+
+p {
+ margin: 0;
+ font-style: italic;
+ text-align: center;
+}
+
+table {
+ width: 100%;
+}
+
+th, td {
+ font-family: monospace;
+ vertical-align: top;
+ text-align: left;
+ width: 50%;
+}
+
+td {
+ color: green;
+}
+
+.odd {
+ background-color: #eeeeee;
+}
+
+.even {
+ background-color: #fafafa;
+}
+
+.exectime {
+ font-size: 0.8em;
+ font-style: italic;
+}
+
+#table_assigned_vars th {
+ color: blue;
+}
+
+#table_config_vars th {
+ color: maroon;
+}
+{/literal}
+</style>
+</head>
+<body>
+
+<h1>Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
+
+{if !empty($template_data)}
+<h2>included templates &amp; config files (load time in seconds)</h2>
+
+<div>
+{foreach $template_data as $template}
+ <font color=brown>{$template.name}</font>
+ <span class="exectime">
+ (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
+ </span>
+ <br>
+{/foreach}
+</div>
+{/if}
+
+<h2>assigned template variables</h2>
+
+<table id="table_assigned_vars">
+ {foreach $assigned_vars as $vars}
+ <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
+ <th>${$vars@key|escape:'html'}</th>
+ <td>{$vars|debug_print_var}</td></tr>
+ {/foreach}
+</table>
+
+<h2>assigned config file variables (outer template scope)</h2>
+
+<table id="table_config_vars">
+ {foreach $config_vars as $vars}
+ <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
+ <th>{$vars@key|escape:'html'}</th>
+ <td>{$vars|debug_print_var}</td></tr>
+ {/foreach}
+
+</table>
+</body>
+</html>
+{/capture}
+<script type="text/javascript">
+{$id = $template_name|default:''|md5}
+ _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes");
+ _smarty_console.document.write("{$debug_output|escape:'javascript'}");
+ _smarty_console.document.close();
+</script>
diff --git a/3dparty/Smarty/plugins/block.php.php b/3dparty/Smarty/plugins/block.php.php
new file mode 100644
index 00000000000..8fedd8b4352
--- /dev/null
+++ b/3dparty/Smarty/plugins/block.php.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin to execute PHP code
+ *
+ * @package Smarty
+ * @subpackage PluginsBlock
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty {php}{/php} block plugin
+ *
+ * @param string $content contents of the block
+ * @param object $template template object
+ * @param boolean $ &$repeat repeat flag
+ * @return string content re-formatted
+ */
+function smarty_block_php($params, $content, $template, &$repeat)
+{
+ if (!$template->allow_php_tag) {
+ throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable");
+ }
+ eval($content);
+ return '';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/block.textformat.php b/3dparty/Smarty/plugins/block.textformat.php
new file mode 100644
index 00000000000..517fd62dd52
--- /dev/null
+++ b/3dparty/Smarty/plugins/block.textformat.php
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Smarty plugin to format text blocks
+ *
+ * @package Smarty
+ * @subpackage PluginsBlock
+ */
+
+/**
+ * Smarty {textformat}{/textformat} block plugin
+ *
+ * Type: block function<br>
+ * Name: textformat<br>
+ * Purpose: format text a certain way with preset styles
+ * or custom wrap/indent settings<br>
+ *
+ * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
+ * (Smarty online manual)
+ * @param array $params parameters
+ * <pre>
+ * Params: style: string (email)
+ * indent: integer (0)
+ * wrap: integer (80)
+ * wrap_char string ("\n")
+ * indent_char: string (" ")
+ * wrap_boundary: boolean (true)
+ * </pre>
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $content contents of the block
+ * @param object $template template object
+ * @param boolean &$repeat repeat flag
+ * @return string content re-formatted
+ */
+function smarty_block_textformat($params, $content, $template, &$repeat)
+{
+ if (is_null($content)) {
+ return;
+ }
+
+ $style = null;
+ $indent = 0;
+ $indent_first = 0;
+ $indent_char = ' ';
+ $wrap = 80;
+ $wrap_char = "\n";
+ $wrap_cut = false;
+ $assign = null;
+
+ foreach ($params as $_key => $_val) {
+ switch ($_key) {
+ case 'style':
+ case 'indent_char':
+ case 'wrap_char':
+ case 'assign':
+ $$_key = (string)$_val;
+ break;
+
+ case 'indent':
+ case 'indent_first':
+ case 'wrap':
+ $$_key = (int)$_val;
+ break;
+
+ case 'wrap_cut':
+ $$_key = (bool)$_val;
+ break;
+
+ default:
+ trigger_error("textformat: unknown attribute '$_key'");
+ }
+ }
+
+ if ($style == 'email') {
+ $wrap = 72;
+ }
+ // split into paragraphs
+ $_paragraphs = preg_split('![\r\n][\r\n]!', $content);
+ $_output = '';
+
+ for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
+ if ($_paragraphs[$_x] == '') {
+ continue;
+ }
+ // convert mult. spaces & special chars to single space
+ $_paragraphs[$_x] = preg_replace(array('!\s+!', '!(^\s+)|(\s+$)!'), array(' ', ''), $_paragraphs[$_x]);
+ // indent first line
+ if ($indent_first > 0) {
+ $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x];
+ }
+ // wordwrap sentences
+ $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut);
+ // indent lines
+ if ($indent > 0) {
+ $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]);
+ }
+ }
+ $_output = implode($wrap_char . $wrap_char, $_paragraphs);
+
+ return $assign ? $template->assign($assign, $_output) : $_output;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.counter.php b/3dparty/Smarty/plugins/function.counter.php
new file mode 100644
index 00000000000..7c50bd44b7e
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.counter.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {counter} function plugin
+ *
+ * Type: function<br>
+ * Name: counter<br>
+ * Purpose: print out a counter value
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
+ * (Smarty online manual)
+ * @param array parameters
+ * @param Smarty
+ * @param object $template template object
+ * @return string|null
+ */
+function smarty_function_counter($params, $template)
+{
+ static $counters = array();
+
+ $name = (isset($params['name'])) ? $params['name'] : 'default';
+ if (!isset($counters[$name])) {
+ $counters[$name] = array(
+ 'start'=>1,
+ 'skip'=>1,
+ 'direction'=>'up',
+ 'count'=>1
+ );
+ }
+ $counter =& $counters[$name];
+
+ if (isset($params['start'])) {
+ $counter['start'] = $counter['count'] = (int)$params['start'];
+ }
+
+ if (!empty($params['assign'])) {
+ $counter['assign'] = $params['assign'];
+ }
+
+ if (isset($counter['assign'])) {
+ $template->assign($counter['assign'], $counter['count']);
+ }
+
+ if (isset($params['print'])) {
+ $print = (bool)$params['print'];
+ } else {
+ $print = empty($counter['assign']);
+ }
+
+ if ($print) {
+ $retval = $counter['count'];
+ } else {
+ $retval = null;
+ }
+
+ if (isset($params['skip'])) {
+ $counter['skip'] = $params['skip'];
+ }
+
+ if (isset($params['direction'])) {
+ $counter['direction'] = $params['direction'];
+ }
+
+ if ($counter['direction'] == "down")
+ $counter['count'] -= $counter['skip'];
+ else
+ $counter['count'] += $counter['skip'];
+
+ return $retval;
+
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.cycle.php b/3dparty/Smarty/plugins/function.cycle.php
new file mode 100644
index 00000000000..98e3e28781a
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.cycle.php
@@ -0,0 +1,106 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {cycle} function plugin
+ *
+ * Type: function<br>
+ * Name: cycle<br>
+ * Date: May 3, 2002<br>
+ * Purpose: cycle through given values<br>
+ * Input:
+ * - name = name of cycle (optional)
+ * - values = comma separated list of values to cycle,
+ * or an array of values to cycle
+ * (this can be left out for subsequent calls)
+ * - reset = boolean - resets given var to true
+ * - print = boolean - print var or not. default is true
+ * - advance = boolean - whether or not to advance the cycle
+ * - delimiter = the value delimiter, default is ","
+ * - assign = boolean, assigns to template var instead of
+ * printed.
+ *
+ * Examples:<br>
+ * <pre>
+ * {cycle values="#eeeeee,#d0d0d0d"}
+ * {cycle name=row values="one,two,three" reset=true}
+ * {cycle name=row}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credit to Mark Priatel <mpriatel@rogers.com>
+ * @author credit to Gerard <gerard@interfold.com>
+ * @author credit to Jason Sweat <jsweat_php@yahoo.com>
+ * @version 1.3
+ * @param array
+ * @param object $template template object
+ * @return string|null
+ */
+
+function smarty_function_cycle($params, $template)
+{
+ static $cycle_vars;
+
+ $name = (empty($params['name'])) ? 'default' : $params['name'];
+ $print = (isset($params['print'])) ? (bool)$params['print'] : true;
+ $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
+ $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
+
+ if (!in_array('values', array_keys($params))) {
+ if(!isset($cycle_vars[$name]['values'])) {
+ trigger_error("cycle: missing 'values' parameter");
+ return;
+ }
+ } else {
+ if(isset($cycle_vars[$name]['values'])
+ && $cycle_vars[$name]['values'] != $params['values'] ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+ $cycle_vars[$name]['values'] = $params['values'];
+ }
+
+ if (isset($params['delimiter'])) {
+ $cycle_vars[$name]['delimiter'] = $params['delimiter'];
+ } elseif (!isset($cycle_vars[$name]['delimiter'])) {
+ $cycle_vars[$name]['delimiter'] = ',';
+ }
+
+ if(is_array($cycle_vars[$name]['values'])) {
+ $cycle_array = $cycle_vars[$name]['values'];
+ } else {
+ $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
+ }
+
+ if(!isset($cycle_vars[$name]['index']) || $reset ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+
+ if (isset($params['assign'])) {
+ $print = false;
+ $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
+ }
+
+ if($print) {
+ $retval = $cycle_array[$cycle_vars[$name]['index']];
+ } else {
+ $retval = null;
+ }
+
+ if($advance) {
+ if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
+ $cycle_vars[$name]['index'] = 0;
+ } else {
+ $cycle_vars[$name]['index']++;
+ }
+ }
+
+ return $retval;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.fetch.php b/3dparty/Smarty/plugins/function.fetch.php
new file mode 100644
index 00000000000..2b09fb94752
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.fetch.php
@@ -0,0 +1,216 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {fetch} plugin
+ *
+ * Type: function<br>
+ * Name: fetch<br>
+ * Purpose: fetch file, web or ftp data and display results
+ * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * @param object $template template object
+ * @return string|null if the assign parameter is passed, Smarty assigns the
+ * result to a template variable
+ */
+function smarty_function_fetch($params, $template)
+{
+ if (empty($params['file'])) {
+ trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE);
+ return;
+ }
+
+ $content = '';
+ if (isset($template->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) {
+ if(!$template->security_policy->isTrustedResourceDir($params['file'])) {
+ return;
+ }
+
+ // fetch the file
+ if($fp = @fopen($params['file'],'r')) {
+ while(!feof($fp)) {
+ $content .= fgets ($fp,4096);
+ }
+ fclose($fp);
+ } else {
+ trigger_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'',E_USER_NOTICE);
+ return;
+ }
+ } else {
+ // not a local file
+ if(preg_match('!^http://!i',$params['file'])) {
+ // http fetch
+ if($uri_parts = parse_url($params['file'])) {
+ // set defaults
+ $host = $server_name = $uri_parts['host'];
+ $timeout = 30;
+ $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+ $agent = "Smarty Template Engine ".$template->_version;
+ $referer = "";
+ $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
+ $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
+ $_is_proxy = false;
+ if(empty($uri_parts['port'])) {
+ $port = 80;
+ } else {
+ $port = $uri_parts['port'];
+ }
+ if(!empty($uri_parts['user'])) {
+ $user = $uri_parts['user'];
+ }
+ if(!empty($uri_parts['pass'])) {
+ $pass = $uri_parts['pass'];
+ }
+ // loop through parameters, setup headers
+ foreach($params as $param_key => $param_value) {
+ switch($param_key) {
+ case "file":
+ case "assign":
+ case "assign_headers":
+ break;
+ case "user":
+ if(!empty($param_value)) {
+ $user = $param_value;
+ }
+ break;
+ case "pass":
+ if(!empty($param_value)) {
+ $pass = $param_value;
+ }
+ break;
+ case "accept":
+ if(!empty($param_value)) {
+ $accept = $param_value;
+ }
+ break;
+ case "header":
+ if(!empty($param_value)) {
+ if(!preg_match('![\w\d-]+: .+!',$param_value)) {
+ trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE);
+ return;
+ } else {
+ $extra_headers[] = $param_value;
+ }
+ }
+ break;
+ case "proxy_host":
+ if(!empty($param_value)) {
+ $proxy_host = $param_value;
+ }
+ break;
+ case "proxy_port":
+ if(!preg_match('!\D!', $param_value)) {
+ $proxy_port = (int) $param_value;
+ } else {
+ trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ break;
+ case "agent":
+ if(!empty($param_value)) {
+ $agent = $param_value;
+ }
+ break;
+ case "referer":
+ if(!empty($param_value)) {
+ $referer = $param_value;
+ }
+ break;
+ case "timeout":
+ if(!preg_match('!\D!', $param_value)) {
+ $timeout = (int) $param_value;
+ } else {
+ trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ break;
+ default:
+ trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ }
+ if(!empty($proxy_host) && !empty($proxy_port)) {
+ $_is_proxy = true;
+ $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
+ } else {
+ $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
+ }
+
+ if(!$fp) {
+ trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE);
+ return;
+ } else {
+ if($_is_proxy) {
+ fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
+ } else {
+ fputs($fp, "GET $uri HTTP/1.0\r\n");
+ }
+ if(!empty($host)) {
+ fputs($fp, "Host: $host\r\n");
+ }
+ if(!empty($accept)) {
+ fputs($fp, "Accept: $accept\r\n");
+ }
+ if(!empty($agent)) {
+ fputs($fp, "User-Agent: $agent\r\n");
+ }
+ if(!empty($referer)) {
+ fputs($fp, "Referer: $referer\r\n");
+ }
+ if(isset($extra_headers) && is_array($extra_headers)) {
+ foreach($extra_headers as $curr_header) {
+ fputs($fp, $curr_header."\r\n");
+ }
+ }
+ if(!empty($user) && !empty($pass)) {
+ fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
+ }
+
+ fputs($fp, "\r\n");
+ while(!feof($fp)) {
+ $content .= fgets($fp,4096);
+ }
+ fclose($fp);
+ $csplit = preg_split("!\r\n\r\n!",$content,2);
+
+ $content = $csplit[1];
+
+ if(!empty($params['assign_headers'])) {
+ $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0]));
+ }
+ }
+ } else {
+ trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE);
+ return;
+ }
+ } else {
+ // ftp fetch
+ if($fp = @fopen($params['file'],'r')) {
+ while(!feof($fp)) {
+ $content .= fgets ($fp,4096);
+ }
+ fclose($fp);
+ } else {
+ trigger_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'',E_USER_NOTICE);
+ return;
+ }
+ }
+
+ }
+
+
+ if (!empty($params['assign'])) {
+ $template->assign($params['assign'],$content);
+ } else {
+ return $content;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_checkboxes.php b/3dparty/Smarty/plugins/function.html_checkboxes.php
new file mode 100644
index 00000000000..6a1a3ffdc71
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_checkboxes.php
@@ -0,0 +1,143 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_checkboxes} function plugin
+ *
+ * File: function.html_checkboxes.php<br>
+ * Type: function<br>
+ * Name: html_checkboxes<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of checkbox input types<br>
+ * Examples:
+ * <pre>
+ * {html_checkboxes values=$ids output=$names}
+ * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
+ * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
+ * @author credits to Monte Ohrt <monte at ohrt dot com>
+ * @version 1.0
+ * @param array $params parameters
+ * Input:<br>
+ * - name (optional) - string default "checkbox"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or &nbsp;
+ * - output (optional) - the output next to each checkbox
+ * - assign (optional) - assign the output as an array to this variable
+ * @param object $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_checkboxes($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = 'checkbox';
+ $values = null;
+ $options = null;
+ $selected = null;
+ $separator = '';
+ $labels = true;
+ $output = null;
+
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = $_val;
+ break;
+
+ case 'labels':
+ $$_key = (bool)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'checked':
+ case 'selected':
+ $selected = array_map('strval', array_values((array)$_val));
+ break;
+
+ case 'checkboxes':
+ trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array)$_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return ''; /* raise error here? */
+
+ settype($selected, 'array');
+ $_html_result = array();
+
+ if (isset($options)) {
+
+ foreach ($options as $_key=>$_val)
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+
+
+ } else {
+ foreach ($values as $_i=>$_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
+ }
+
+ }
+
+ if(!empty($params['assign'])) {
+ $template->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n",$_html_result);
+ }
+
+}
+
+function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) {
+ $_output = '';
+ if ($labels) $_output .= '<label>';
+ $_output .= '<input type="checkbox" name="'
+ . smarty_function_escape_special_chars($name) . '[]" value="'
+ . smarty_function_escape_special_chars($value) . '"';
+
+ if (in_array((string)$value, $selected)) {
+ $_output .= ' checked="checked"';
+ }
+ $_output .= $extra . ' />' . $output;
+ if ($labels) $_output .= '</label>';
+ $_output .= $separator;
+
+ return $_output;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_image.php b/3dparty/Smarty/plugins/function.html_image.php
new file mode 100644
index 00000000000..6ff4f5707c9
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_image.php
@@ -0,0 +1,137 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_image} function plugin
+ *
+ * Type: function<br>
+ * Name: html_image<br>
+ * Date: Feb 24, 2003<br>
+ * Purpose: format HTML tags for the image<br>
+ * Examples: {html_image file="/images/masthead.gif"}
+ * Output: <img src="/images/masthead.gif" width=400 height=23>
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credits to Duda <duda@big.hu>
+ * @version 1.0
+ * @param array $params parameters
+ * Input:<br>
+ * - file = file (and path) of image (required)
+ * - height = image height (optional, default actual height)
+ * - width = image width (optional, default actual width)
+ * - basedir = base directory for absolute paths, default
+ * is environment variable DOCUMENT_ROOT
+ * - path_prefix = prefix for path output (optional, default empty)
+ * @param object $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_image($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $alt = '';
+ $file = '';
+ $height = '';
+ $width = '';
+ $extra = '';
+ $prefix = '';
+ $suffix = '';
+ $path_prefix = '';
+ $server_vars = $_SERVER;
+ $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
+ foreach($params as $_key => $_val) {
+ switch ($_key) {
+ case 'file':
+ case 'height':
+ case 'width':
+ case 'dpi':
+ case 'path_prefix':
+ case 'basedir':
+ $$_key = $_val;
+ break;
+
+ case 'alt':
+ if (!is_array($_val)) {
+ $$_key = smarty_function_escape_special_chars($_val);
+ } else {
+ throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+
+ case 'link':
+ case 'href':
+ $prefix = '<a href="' . $_val . '">';
+ $suffix = '</a>';
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (empty($file)) {
+ trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE);
+ return;
+ }
+
+ if (substr($file, 0, 1) == '/') {
+ $_image_path = $basedir . $file;
+ } else {
+ $_image_path = $file;
+ }
+
+ if (!isset($params['width']) || !isset($params['height'])) {
+ if (!$_image_data = @getimagesize($_image_path)) {
+ if (!file_exists($_image_path)) {
+ trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
+ return;
+ } else if (!is_readable($_image_path)) {
+ trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
+ return;
+ } else {
+ trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);
+ return;
+ }
+ }
+ if (isset($template->security_policy)) {
+ if (!$template->security_policy->isTrustedResourceDir($_image_path)) {
+ return;
+ }
+ }
+
+ if (!isset($params['width'])) {
+ $width = $_image_data[0];
+ }
+ if (!isset($params['height'])) {
+ $height = $_image_data[1];
+ }
+ }
+
+ if (isset($params['dpi'])) {
+ if (strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
+ $dpi_default = 72;
+ } else {
+ $dpi_default = 96;
+ }
+ $_resize = $dpi_default / $params['dpi'];
+ $width = round($width * $_resize);
+ $height = round($height * $_resize);
+ }
+
+ return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' . $height . '"' . $extra . ' />' . $suffix;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_options.php b/3dparty/Smarty/plugins/function.html_options.php
new file mode 100644
index 00000000000..3570a62064a
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_options.php
@@ -0,0 +1,133 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_options} function plugin
+ *
+ * Type: function<br>
+ * Name: html_options<br>
+ * Purpose: Prints the list of <option> tags generated from
+ * the passed parameters
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * Input:<br>
+ * - name (optional) - string default "select"
+ * - values (required if no options supplied) - array
+ * - options (required if no values supplied) - associative array
+ * - selected (optional) - string default not set
+ * - output (required if not options supplied) - array
+ * @param object $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_options($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = null;
+ $values = null;
+ $options = null;
+ $selected = array();
+ $output = null;
+ $id = null;
+ $class = null;
+
+ $extra = '';
+ $options_extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch ($_key) {
+ case 'name':
+ case 'class':
+ case 'id':
+ $$_key = (string)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'selected':
+ $$_key = array_map('strval', array_values((array)$_val));
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ trigger_error("html_options: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return '';
+ /* raise error here? */
+
+ $_html_result = '';
+ $_idx = 0;
+
+ if (isset($options)) {
+ foreach ($options as $_key => $_val) {
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
+ }
+ } else {
+ foreach ($values as $_i => $_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
+ }
+ }
+
+ if (!empty($name)) {
+ $_html_class = !empty($class) ? ' class="'.$class.'"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'"' : '';
+ $_html_result = '<select name="' . $name . '"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
+ }
+
+ return $_html_result;
+}
+
+function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
+{
+ if (!is_array($value)) {
+ $_html_result = '<option value="' .
+ smarty_function_escape_special_chars($key) . '"';
+ if (in_array((string)$key, $selected))
+ $_html_result .= ' selected="selected"';
+ $_html_class = !empty($class) ? ' class="'.$class.' option"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'-'.$idx.'"' : '';
+ $_html_result .= $_html_class . $_html_id . '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
+ $idx++;
+ } else {
+ $_idx = 0;
+ $_html_result = smarty_function_html_options_optgroup($key, $value, $selected, $id.'-'.$idx, $class, $_idx);
+ $idx++;
+ }
+ return $_html_result;
+}
+
+function smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)
+{
+ $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
+ foreach ($values as $key => $value) {
+ $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, $idx);
+ }
+ $optgroup_html .= "</optgroup>\n";
+ return $optgroup_html;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_radios.php b/3dparty/Smarty/plugins/function.html_radios.php
new file mode 100644
index 00000000000..90bd5a164d3
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_radios.php
@@ -0,0 +1,154 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_radios} function plugin
+ *
+ * File: function.html_radios.php<br>
+ * Type: function<br>
+ * Name: html_radios<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of radio input types<br>
+ * Examples:
+ * <pre>
+ * {html_radios values=$ids output=$names}
+ * {html_radios values=$ids name='box' separator='<br>' output=$names}
+ * {html_radios values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
+ * @author credits to Monte Ohrt <monte at ohrt dot com>
+ * @version 1.0
+ * @param array $params parameters
+ * Input:<br>
+ * - name (optional) - string default "radio"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or &nbsp;
+ * - output (optional) - the output next to each radio button
+ * - assign (optional) - assign the output as an array to this variable
+ * @param object $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_radios($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = 'radio';
+ $values = null;
+ $options = null;
+ $selected = null;
+ $separator = '';
+ $labels = true;
+ $label_ids = false;
+ $output = null;
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch ($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = (string)$_val;
+ break;
+
+ case 'checked':
+ case 'selected':
+ if (is_array($_val)) {
+ trigger_error('html_radios: the "' . $_key . '" attribute cannot be an array', E_USER_WARNING);
+ } else {
+ $selected = (string)$_val;
+ }
+ break;
+
+ case 'labels':
+ case 'label_ids':
+ $$_key = (bool)$_val;
+ break;
+
+ case 'options':
+ $$_key = (array)$_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array)$_val);
+ break;
+
+ case 'radios':
+ trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array)$_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ trigger_error("html_radios: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return '';
+ /* raise error here? */
+
+ $_html_result = array();
+
+ if (isset($options)) {
+ foreach ($options as $_key => $_val)
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
+ } else {
+ foreach ($values as $_i => $_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
+ }
+ }
+
+ if (!empty($params['assign'])) {
+ $template->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n", $_html_result);
+ }
+}
+
+function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids)
+{
+ $_output = '';
+ if ($labels) {
+ if ($label_ids) {
+ $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
+ $_output .= '<label for="' . $_id . '">';
+ } else {
+ $_output .= '<label>';
+ }
+ }
+ $_output .= '<input type="radio" name="'
+ . smarty_function_escape_special_chars($name) . '" value="'
+ . smarty_function_escape_special_chars($value) . '"';
+
+ if ($labels && $label_ids) $_output .= ' id="' . $_id . '"';
+
+ if ((string)$value == $selected) {
+ $_output .= ' checked="checked"';
+ }
+ $_output .= $extra . ' />' . $output;
+ if ($labels) $_output .= '</label>';
+ $_output .= $separator;
+
+ return $_output;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_select_date.php b/3dparty/Smarty/plugins/function.html_select_date.php
new file mode 100644
index 00000000000..265fbee748c
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_select_date.php
@@ -0,0 +1,330 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_select_date} plugin
+ *
+ * Type: function<br>
+ * Name: html_select_date<br>
+ * Purpose: Prints the dropdowns for date selection.
+ *
+ * ChangeLog:<br>
+ * - 1.0 initial release
+ * - 1.1 added support for +/- N syntax for begin
+ * and end year values. (Monte)
+ * - 1.2 added support for yyyy-mm-dd syntax for
+ * time value. (Jan Rosier)
+ * - 1.3 added support for choosing format for
+ * month values (Gary Loescher)
+ * - 1.3.1 added support for choosing format for
+ * day values (Marcus Bointon)
+ * - 1.3.2 support negative timestamps, force year
+ * dropdown to include given date unless explicitly set (Monte)
+ * - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
+ * of 0000-00-00 dates (cybot, boots)
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
+ * (Smarty online manual)
+ * @version 1.3.4
+ * @author Andrei Zmievski
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * @param object $template template object
+ * @return string
+ */
+function smarty_function_html_select_date($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ require_once(SMARTY_PLUGINS_DIR . 'function.html_options.php');
+
+ /* Default values. */
+ $prefix = "Date_";
+ $start_year = strftime("%Y");
+ $end_year = $start_year;
+ $display_days = true;
+ $display_months = true;
+ $display_years = true;
+ $month_format = "%B";
+ /* Write months as numbers by default GL */
+ $month_value_format = "%m";
+ $day_format = "%02d";
+ /* Write day values using this format MB */
+ $day_value_format = "%d";
+ $year_as_text = false;
+ /* Display years in reverse order? Ie. 2000,1999,.... */
+ $reverse_years = false;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Day]",
+ "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
+ $field_array = null;
+ /* <select size>'s of the different <select> tags.
+ If not set, uses default dropdown. */
+ $day_size = null;
+ $month_size = null;
+ $year_size = null;
+ /* Unparsed attributes common to *ALL* the <select>/<input> tags.
+ An example might be in the template: all_extra ='class ="foo"'. */
+ $all_extra = null;
+ /* Separate attributes for the tags. */
+ $day_extra = null;
+ $month_extra = null;
+ $year_extra = null;
+ /* Order in which to display the fields.
+ "D" -> day, "M" -> month, "Y" -> year. */
+ $field_order = 'MDY';
+ /* String printed between the different fields. */
+ $field_separator = "\n";
+ $time = time();
+ $all_empty = null;
+ $day_empty = null;
+ $month_empty = null;
+ $year_empty = null;
+ $extra_attrs = '';
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'prefix':
+ case 'time':
+ case 'start_year':
+ case 'end_year':
+ case 'month_format':
+ case 'day_format':
+ case 'day_value_format':
+ case 'field_array':
+ case 'day_size':
+ case 'month_size':
+ case 'year_size':
+ case 'all_extra':
+ case 'day_extra':
+ case 'month_extra':
+ case 'year_extra':
+ case 'field_order':
+ case 'field_separator':
+ case 'month_value_format':
+ case 'month_empty':
+ case 'day_empty':
+ case 'year_empty':
+ $$_key = (string)$_value;
+ break;
+
+ case 'all_empty':
+ $$_key = (string)$_value;
+ $day_empty = $month_empty = $year_empty = $all_empty;
+ break;
+
+ case 'display_days':
+ case 'display_months':
+ case 'display_years':
+ case 'year_as_text':
+ case 'reverse_years':
+ $$_key = (bool)$_value;
+ break;
+
+ default:
+ if (!is_array($_value)) {
+ $extra_attrs .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_value) . '"';
+ } else {
+ trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (preg_match('!^-\d+$!', $time)) {
+ // negative timestamp, use date()
+ $time = date('Y-m-d', $time);
+ }
+ // If $time is not in format yyyy-mm-dd
+ if (preg_match('/^(\d{0,4}-\d{0,2}-\d{0,2})/', $time, $found)) {
+ $time = $found[1];
+ } else {
+ // use smarty_make_timestamp to get an unix timestamp and
+ // strftime to make yyyy-mm-dd
+ $time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
+ }
+ // Now split this in pieces, which later can be used to set the select
+ $time = explode("-", $time);
+ // make syntax "+N" or "-N" work with start_year and end_year
+ if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {
+ if ($match[1] == '+') {
+ $end_year = strftime('%Y') + $match[2];
+ } else {
+ $end_year = strftime('%Y') - $match[2];
+ }
+ }
+ if (preg_match('!^(\+|\-)\s*(\d+)$!', $start_year, $match)) {
+ if ($match[1] == '+') {
+ $start_year = strftime('%Y') + $match[2];
+ } else {
+ $start_year = strftime('%Y') - $match[2];
+ }
+ }
+ if (strlen($time[0]) > 0) {
+ if ($start_year > $time[0] && !isset($params['start_year'])) {
+ // force start year to include given date if not explicitly set
+ $start_year = $time[0];
+ }
+ if ($end_year < $time[0] && !isset($params['end_year'])) {
+ // force end year to include given date if not explicitly set
+ $end_year = $time[0];
+ }
+ }
+
+ $field_order = strtoupper($field_order);
+
+ $html_result = $month_result = $day_result = $year_result = "";
+
+ $field_separator_count = -1;
+ if ($display_months) {
+ $field_separator_count++;
+ $month_names = array();
+ $month_values = array();
+ if (isset($month_empty)) {
+ $month_names[''] = $month_empty;
+ $month_values[''] = '';
+ }
+ for ($i = 1; $i <= 12; $i++) {
+ $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
+ $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
+ }
+
+ $month_result .= '<select name=';
+ if (null !== $field_array) {
+ $month_result .= '"' . $field_array . '[' . $prefix . 'Month]"';
+ } else {
+ $month_result .= '"' . $prefix . 'Month"';
+ }
+ if (null !== $month_size) {
+ $month_result .= ' size="' . $month_size . '"';
+ }
+ if (null !== $month_extra) {
+ $month_result .= ' ' . $month_extra;
+ }
+ if (null !== $all_extra) {
+ $month_result .= ' ' . $all_extra;
+ }
+ $month_result .= $extra_attrs . '>' . "\n";
+
+ $month_result .= smarty_function_html_options(array('output' => $month_names,
+ 'values' => $month_values,
+ 'selected' => (int)$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '',
+ 'print_result' => false),
+ $template);
+ $month_result .= '</select>';
+ }
+
+ if ($display_days) {
+ $field_separator_count++;
+ $days = array();
+ if (isset($day_empty)) {
+ $days[''] = $day_empty;
+ $day_values[''] = '';
+ }
+ for ($i = 1; $i <= 31; $i++) {
+ $days[] = sprintf($day_format, $i);
+ $day_values[] = sprintf($day_value_format, $i);
+ }
+
+ $day_result .= '<select name=';
+ if (null !== $field_array) {
+ $day_result .= '"' . $field_array . '[' . $prefix . 'Day]"';
+ } else {
+ $day_result .= '"' . $prefix . 'Day"';
+ }
+ if (null !== $day_size) {
+ $day_result .= ' size="' . $day_size . '"';
+ }
+ if (null !== $all_extra) {
+ $day_result .= ' ' . $all_extra;
+ }
+ if (null !== $day_extra) {
+ $day_result .= ' ' . $day_extra;
+ }
+ $day_result .= $extra_attrs . '>' . "\n";
+ $day_result .= smarty_function_html_options(array('output' => $days,
+ 'values' => $day_values,
+ 'selected' => $time[2],
+ 'print_result' => false),
+ $template);
+ $day_result .= '</select>';
+ }
+
+ if ($display_years) {
+ $field_separator_count++;
+ if (null !== $field_array) {
+ $year_name = $field_array . '[' . $prefix . 'Year]';
+ } else {
+ $year_name = $prefix . 'Year';
+ }
+ if ($year_as_text) {
+ $year_result .= '<input type="text" name="' . $year_name . '" value="' . $time[0] . '" size="4" maxlength="4"';
+ if (null !== $all_extra) {
+ $year_result .= ' ' . $all_extra;
+ }
+ if (null !== $year_extra) {
+ $year_result .= ' ' . $year_extra;
+ }
+ $year_result .= ' />';
+ } else {
+ $years = range((int)$start_year, (int)$end_year);
+ if ($reverse_years) {
+ rsort($years, SORT_NUMERIC);
+ } else {
+ sort($years, SORT_NUMERIC);
+ }
+ $yearvals = $years;
+ if (isset($year_empty)) {
+ array_unshift($years, $year_empty);
+ array_unshift($yearvals, '');
+ }
+ $year_result .= '<select name="' . $year_name . '"';
+ if (null !== $year_size) {
+ $year_result .= ' size="' . $year_size . '"';
+ }
+ if (null !== $all_extra) {
+ $year_result .= ' ' . $all_extra;
+ }
+ if (null !== $year_extra) {
+ $year_result .= ' ' . $year_extra;
+ }
+ $year_result .= $extra_attrs . '>' . "\n";
+ $year_result .= smarty_function_html_options(array('output' => $years,
+ 'values' => $yearvals,
+ 'selected' => $time[0],
+ 'print_result' => false),
+ $template);
+ $year_result .= '</select>';
+ }
+ }
+ // Loop thru the field_order field
+ for ($i = 0; $i <= 2; $i++) {
+ $c = substr($field_order, $i, 1);
+ switch ($c) {
+ case 'D':
+ $html_result .= $day_result;
+ break;
+
+ case 'M':
+ $html_result .= $month_result;
+ break;
+
+ case 'Y':
+ $html_result .= $year_result;
+ break;
+ }
+ // Add the field seperator
+ if ($i < $field_separator_count) {
+ $html_result .= $field_separator;
+ }
+ }
+
+ return $html_result;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_select_time.php b/3dparty/Smarty/plugins/function.html_select_time.php
new file mode 100644
index 00000000000..1655e3de3ec
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_select_time.php
@@ -0,0 +1,194 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_select_time} function plugin
+ *
+ * Type: function<br>
+ * Name: html_select_time<br>
+ * Purpose: Prints the dropdowns for time selection
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
+ * (Smarty online manual)
+ * @author Roberto Berto <roberto@berto.net>
+ * @credits Monte Ohrt <monte AT ohrt DOT com>
+ * @param array $params parameters
+ * @param object $template template object
+ * @return string
+ * @uses smarty_make_timestamp()
+ */
+function smarty_function_html_select_time($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ require_once(SMARTY_PLUGINS_DIR . 'function.html_options.php');
+
+ /* Default values. */
+ $prefix = "Time_";
+ $time = time();
+ $display_hours = true;
+ $display_minutes = true;
+ $display_seconds = true;
+ $display_meridian = true;
+ $use_24_hours = true;
+ $minute_interval = 1;
+ $second_interval = 1;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Hour]",
+ "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
+ Can be combined with prefix. */
+ $field_array = null;
+ $all_extra = null;
+ $hour_extra = null;
+ $minute_extra = null;
+ $second_extra = null;
+ $meridian_extra = null;
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'prefix':
+ case 'time':
+ case 'field_array':
+ case 'all_extra':
+ case 'hour_extra':
+ case 'minute_extra':
+ case 'second_extra':
+ case 'meridian_extra':
+ $$_key = (string)$_value;
+ break;
+
+ case 'display_hours':
+ case 'display_minutes':
+ case 'display_seconds':
+ case 'display_meridian':
+ case 'use_24_hours':
+ $$_key = (bool)$_value;
+ break;
+
+ case 'minute_interval':
+ case 'second_interval':
+ $$_key = (int)$_value;
+ break;
+
+ default:
+ trigger_error("[html_select_time] unknown parameter $_key", E_USER_WARNING);
+ }
+ }
+
+ $time = smarty_make_timestamp($time);
+
+ $html_result = '';
+
+ if ($display_hours) {
+ $hours = $use_24_hours ? range(0, 23) : range(1, 12);
+ $hour_fmt = $use_24_hours ? '%H' : '%I';
+ for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
+ $hours[$i] = sprintf('%02d', $hours[$i]);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Hour]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Hour"';
+ }
+ if (null !== $hour_extra) {
+ $html_result .= ' ' . $hour_extra;
+ }
+ if (null !== $all_extra) {
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>' . "\n";
+ $html_result .= smarty_function_html_options(array('output' => $hours,
+ 'values' => $hours,
+ 'selected' => strftime($hour_fmt, $time),
+ 'print_result' => false),
+ $template);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_minutes) {
+ $all_minutes = range(0, 59);
+ for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i += $minute_interval)
+ $minutes[] = sprintf('%02d', $all_minutes[$i]);
+ $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Minute]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Minute"';
+ }
+ if (null !== $minute_extra) {
+ $html_result .= ' ' . $minute_extra;
+ }
+ if (null !== $all_extra) {
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>' . "\n";
+
+ $html_result .= smarty_function_html_options(array('output' => $minutes,
+ 'values' => $minutes,
+ 'selected' => $selected,
+ 'print_result' => false),
+ $template);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_seconds) {
+ $all_seconds = range(0, 59);
+ for ($i = 0, $for_max = count($all_seconds); $i < $for_max; $i += $second_interval)
+ $seconds[] = sprintf('%02d', $all_seconds[$i]);
+ $selected = intval(floor(strftime('%S', $time) / $second_interval) * $second_interval);
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Second]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Second"';
+ }
+
+ if (null !== $second_extra) {
+ $html_result .= ' ' . $second_extra;
+ }
+ if (null !== $all_extra) {
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>' . "\n";
+
+ $html_result .= smarty_function_html_options(array('output' => $seconds,
+ 'values' => $seconds,
+ 'selected' => $selected,
+ 'print_result' => false),
+ $template);
+ $html_result .= "</select>\n";
+ }
+
+ if ($display_meridian && !$use_24_hours) {
+ $html_result .= '<select name=';
+ if (null !== $field_array) {
+ $html_result .= '"' . $field_array . '[' . $prefix . 'Meridian]"';
+ } else {
+ $html_result .= '"' . $prefix . 'Meridian"';
+ }
+
+ if (null !== $meridian_extra) {
+ $html_result .= ' ' . $meridian_extra;
+ }
+ if (null !== $all_extra) {
+ $html_result .= ' ' . $all_extra;
+ }
+ $html_result .= '>' . "\n";
+
+ $html_result .= smarty_function_html_options(array('output' => array('AM', 'PM'),
+ 'values' => array('am', 'pm'),
+ 'selected' => strtolower(strftime('%p', $time)),
+ 'print_result' => false),
+ $template);
+ $html_result .= "</select>\n";
+ }
+
+ return $html_result;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.html_table.php b/3dparty/Smarty/plugins/function.html_table.php
new file mode 100644
index 00000000000..68c9a900f6d
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.html_table.php
@@ -0,0 +1,177 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_table} function plugin
+ *
+ * Type: function<br>
+ * Name: html_table<br>
+ * Date: Feb 17, 2003<br>
+ * Purpose: make an html table from an array of data<br>
+ *
+ *
+ * Examples:
+ * <pre>
+ * {table loop=$data}
+ * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
+ * {table loop=$data cols="first,second,third" tr_attr=$colors}
+ * </pre>
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credit to Messju Mohr <messju at lammfellpuschen dot de>
+ * @author credit to boots <boots dot smarty at yahoo dot com>
+ * @version 1.1
+ * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
+ * (Smarty online manual)
+ * @param array $params parameters
+ * Input:<br>
+ * - loop = array to loop through
+ * - cols = number of columns, comma separated list of column names
+ * or array of column names
+ * - rows = number of rows
+ * - table_attr = table attributes
+ * - th_attr = table heading attributes (arrays are cycled)
+ * - tr_attr = table row attributes (arrays are cycled)
+ * - td_attr = table cell attributes (arrays are cycled)
+ * - trailpad = value to pad trailing cells with
+ * - caption = text for caption element
+ * - vdir = vertical direction (default: "down", means top-to-bottom)
+ * - hdir = horizontal direction (default: "right", means left-to-right)
+ * - inner = inner loop (default "cols": print $loop line by line,
+ * $loop will be printed column by column otherwise)
+ * @param object $template template object
+ * @return string
+ */
+function smarty_function_html_table($params, $template)
+{
+ $table_attr = 'border="1"';
+ $tr_attr = '';
+ $th_attr = '';
+ $td_attr = '';
+ $cols = $cols_count = 3;
+ $rows = 3;
+ $trailpad = '&nbsp;';
+ $vdir = 'down';
+ $hdir = 'right';
+ $inner = 'cols';
+ $caption = '';
+ $loop = null;
+
+ if (!isset($params['loop'])) {
+ trigger_error("html_table: missing 'loop' parameter",E_USER_WARNING);
+ return;
+ }
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'loop':
+ $$_key = (array)$_value;
+ break;
+
+ case 'cols':
+ if (is_array($_value) && !empty($_value)) {
+ $cols = $_value;
+ $cols_count = count($_value);
+ } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
+ $cols = explode(',', $_value);
+ $cols_count = count($cols);
+ } elseif (!empty($_value)) {
+ $cols_count = (int)$_value;
+ } else {
+ $cols_count = $cols;
+ }
+ break;
+
+ case 'rows':
+ $$_key = (int)$_value;
+ break;
+
+ case 'table_attr':
+ case 'trailpad':
+ case 'hdir':
+ case 'vdir':
+ case 'inner':
+ case 'caption':
+ $$_key = (string)$_value;
+ break;
+
+ case 'tr_attr':
+ case 'td_attr':
+ case 'th_attr':
+ $$_key = $_value;
+ break;
+ }
+ }
+
+ $loop_count = count($loop);
+ if (empty($params['rows'])) {
+ /* no rows specified */
+ $rows = ceil($loop_count / $cols_count);
+ } elseif (empty($params['cols'])) {
+ if (!empty($params['rows'])) {
+ /* no cols specified, but rows */
+ $cols_count = ceil($loop_count / $rows);
+ }
+ }
+
+ $output = "<table $table_attr>\n";
+
+ if (!empty($caption)) {
+ $output .= '<caption>' . $caption . "</caption>\n";
+ }
+
+ if (is_array($cols)) {
+ $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
+ $output .= "<thead><tr>\n";
+
+ for ($r = 0; $r < $cols_count; $r++) {
+ $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
+ $output .= $cols[$r];
+ $output .= "</th>\n";
+ }
+ $output .= "</tr></thead>\n";
+ }
+
+ $output .= "<tbody>\n";
+ for ($r = 0; $r < $rows; $r++) {
+ $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
+ $rx = ($vdir == 'down') ? $r * $cols_count : ($rows-1 - $r) * $cols_count;
+
+ for ($c = 0; $c < $cols_count; $c++) {
+ $x = ($hdir == 'right') ? $rx + $c : $rx + $cols_count-1 - $c;
+ if ($inner != 'cols') {
+ /* shuffle x to loop over rows*/
+ $x = floor($x / $cols_count) + ($x % $cols_count) * $rows;
+ }
+
+ if ($x < $loop_count) {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
+ } else {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
+ }
+ }
+ $output .= "</tr>\n";
+ }
+ $output .= "</tbody>\n";
+ $output .= "</table>\n";
+
+ return $output;
+}
+
+function smarty_function_html_table_cycle($name, $var, $no)
+{
+ if (!is_array($var)) {
+ $ret = $var;
+ } else {
+ $ret = $var[$no % count($var)];
+ }
+
+ return ($ret) ? ' ' . $ret : '';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.mailto.php b/3dparty/Smarty/plugins/function.mailto.php
new file mode 100644
index 00000000000..fe8c2188cce
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.mailto.php
@@ -0,0 +1,156 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {mailto} function plugin
+ *
+ * Type: function<br>
+ * Name: mailto<br>
+ * Date: May 21, 2002
+ * Purpose: automate mailto address link creation, and optionally
+ * encode them.<br>
+ *
+ * Examples:
+ * <pre>
+ * {mailto address="me@domain.com"}
+ * {mailto address="me@domain.com" encode="javascript"}
+ * {mailto address="me@domain.com" encode="hex"}
+ * {mailto address="me@domain.com" subject="Hello to you!"}
+ * {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
+ * {mailto address="me@domain.com" extra='class="mailto"'}
+ * </pre>
+ *
+ * @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
+ * (Smarty online manual)
+ * @version 1.2
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credits to Jason Sweat (added cc, bcc and subject functionality)
+ * @param array $params parameters
+ * Input:<br>
+ * - address = e-mail address
+ * - text = (optional) text to display, default is address
+ * - encode = (optional) can be one of:
+ * * none : no encoding (default)
+ * * javascript : encode with javascript
+ * * javascript_charcode : encode with javascript charcode
+ * * hex : encode with hexidecimal (no javascript)
+ * - cc = (optional) address(es) to carbon copy
+ * - bcc = (optional) address(es) to blind carbon copy
+ * - subject = (optional) e-mail subject
+ * - newsgroups = (optional) newsgroup(s) to post to
+ * - followupto = (optional) address(es) to follow up to
+ * - extra = (optional) extra tags for the href link
+ * @param object $template template object
+ * @return string
+ */
+function smarty_function_mailto($params, $template)
+{
+ $extra = '';
+
+ if (empty($params['address'])) {
+ trigger_error("mailto: missing 'address' parameter",E_USER_WARNING);
+ return;
+ } else {
+ $address = $params['address'];
+ }
+
+ $text = $address;
+ // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
+ // so, don't encode it.
+ $search = array('%40', '%2C');
+ $replace = array('@', ',');
+ $mail_parms = array();
+ foreach ($params as $var => $value) {
+ switch ($var) {
+ case 'cc':
+ case 'bcc':
+ case 'followupto':
+ if (!empty($value))
+ $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value));
+ break;
+
+ case 'subject':
+ case 'newsgroups':
+ $mail_parms[] = $var . '=' . rawurlencode($value);
+ break;
+
+ case 'extra':
+ case 'text':
+ $$var = $value;
+
+ default:
+ }
+ }
+
+ $mail_parm_vals = '';
+ for ($i = 0; $i < count($mail_parms); $i++) {
+ $mail_parm_vals .= (0 == $i) ? '?' : '&';
+ $mail_parm_vals .= $mail_parms[$i];
+ }
+ $address .= $mail_parm_vals;
+
+ $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
+ if (!in_array($encode, array('javascript', 'javascript_charcode', 'hex', 'none'))) {
+ trigger_error("mailto: 'encode' parameter must be none, javascript or hex",E_USER_WARNING);
+ return;
+ }
+
+ if ($encode == 'javascript') {
+ $string = 'document.write(\'<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>\');';
+
+ $js_encode = '';
+ for ($x = 0; $x < strlen($string); $x++) {
+ $js_encode .= '%' . bin2hex($string[$x]);
+ }
+
+ return '<script type="text/javascript">eval(unescape(\'' . $js_encode . '\'))</script>';
+ } elseif ($encode == 'javascript_charcode') {
+ $string = '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>';
+
+ for($x = 0, $y = strlen($string); $x < $y; $x++) {
+ $ord[] = ord($string[$x]);
+ }
+
+ $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n";
+ $_ret .= "<!--\n";
+ $_ret .= "{document.write(String.fromCharCode(";
+ $_ret .= implode(',', $ord);
+ $_ret .= "))";
+ $_ret .= "}\n";
+ $_ret .= "//-->\n";
+ $_ret .= "</script>\n";
+
+ return $_ret;
+ } elseif ($encode == 'hex') {
+ preg_match('!^(.*)(\?.*)$!', $address, $match);
+ if (!empty($match[2])) {
+ trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.",E_USER_WARNING);
+ return;
+ }
+ $address_encode = '';
+ for ($x = 0; $x < strlen($address); $x++) {
+ if (preg_match('!\w!', $address[$x])) {
+ $address_encode .= '%' . bin2hex($address[$x]);
+ } else {
+ $address_encode .= $address[$x];
+ }
+ }
+ $text_encode = '';
+ for ($x = 0; $x < strlen($text); $x++) {
+ $text_encode .= '&#x' . bin2hex($text[$x]) . ';';
+ }
+
+ $mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
+ return '<a href="' . $mailto . $address_encode . '" ' . $extra . '>' . $text_encode . '</a>';
+ } else {
+ // no encoding
+ return '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/function.math.php b/3dparty/Smarty/plugins/function.math.php
new file mode 100644
index 00000000000..552c297c70e
--- /dev/null
+++ b/3dparty/Smarty/plugins/function.math.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * This plugin is only for Smarty2 BC
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {math} function plugin
+ *
+ * Type: function<br>
+ * Name: math<br>
+ * Purpose: handle math computations in template<br>
+ * @link http://smarty.php.net/manual/en/language.function.math.php {math}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * @param object $template template object
+ * @return string|null
+ */
+function smarty_function_math($params, $template)
+{
+ // be sure equation parameter is present
+ if (empty($params['equation'])) {
+ trigger_error("math: missing equation parameter",E_USER_WARNING);
+ return;
+ }
+
+ $equation = $params['equation'];
+
+ // make sure parenthesis are balanced
+ if (substr_count($equation,"(") != substr_count($equation,")")) {
+ trigger_error("math: unbalanced parenthesis",E_USER_WARNING);
+ return;
+ }
+
+ // match all vars in equation, make sure all are passed
+ preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match);
+ $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
+ 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
+
+ foreach($match[1] as $curr_var) {
+ if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) {
+ trigger_error("math: function call $curr_var not allowed",E_USER_WARNING);
+ return;
+ }
+ }
+
+ foreach($params as $key => $val) {
+ if ($key != "equation" && $key != "format" && $key != "assign") {
+ // make sure value is not empty
+ if (strlen($val)==0) {
+ trigger_error("math: parameter $key is empty",E_USER_WARNING);
+ return;
+ }
+ if (!is_numeric($val)) {
+ trigger_error("math: parameter $key: is not numeric",E_USER_WARNING);
+ return;
+ }
+ $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
+ }
+ }
+ $smarty_math_result = null;
+ eval("\$smarty_math_result = ".$equation.";");
+
+ if (empty($params['format'])) {
+ if (empty($params['assign'])) {
+ return $smarty_math_result;
+ } else {
+ $template->assign($params['assign'],$smarty_math_result);
+ }
+ } else {
+ if (empty($params['assign'])){
+ printf($params['format'],$smarty_math_result);
+ } else {
+ $template->assign($params['assign'],sprintf($params['format'],$smarty_math_result));
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.capitalize.php b/3dparty/Smarty/plugins/modifier.capitalize.php
new file mode 100644
index 00000000000..7a0f4f1e09d
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.capitalize.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty capitalize modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: capitalize<br>
+ * Purpose: capitalize words in the string
+ *
+ * @link
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $
+ * @return string
+ */
+function smarty_modifier_capitalize($string, $uc_digits = false)
+{
+ // uppercase with php function ucwords
+ $upper_string = ucwords($string);
+ // check for any missed hyphenated words
+ $upper_string = preg_replace("!(^|[^\p{L}'])([\p{Ll}])!ue", "'\\1'.ucfirst('\\2')", $upper_string);
+ // check uc_digits case
+ if (!$uc_digits) {
+ if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!u", $string, $matches, PREG_OFFSET_CAPTURE)) {
+ foreach($matches[1] as $match)
+ $upper_string = substr_replace($upper_string, $match[0], $match[1], strlen($match[0]));
+ }
+ }
+ return $upper_string;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.date_format.php b/3dparty/Smarty/plugins/modifier.date_format.php
new file mode 100644
index 00000000000..4d3dbd8e161
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.date_format.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty date_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: date_format<br>
+ * Purpose: format datestamps via strftime<br>
+ * Input:<br>
+ * - string: input date string
+ * - format: strftime format for output
+ * - default_date: default date if $string is empty
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $
+ * @param string $
+ * @param string $
+ * @return string |void
+ * @uses smarty_make_timestamp()
+ */
+function smarty_modifier_date_format($string, $format = SMARTY_RESOURCE_DATE_FORMAT, $default_date = '',$formatter='auto')
+{
+ /**
+ * Include the {@link shared.make_timestamp.php} plugin
+ */
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ if ($string != '') {
+ $timestamp = smarty_make_timestamp($string);
+ } elseif ($default_date != '') {
+ $timestamp = smarty_make_timestamp($default_date);
+ } else {
+ return;
+ }
+ if($formatter=='strftime'||($formatter=='auto'&&strpos($format,'%')!==false)) {
+ if (DS == '\\') {
+ $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');
+ $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
+ if (strpos($format, '%e') !== false) {
+ $_win_from[] = '%e';
+ $_win_to[] = sprintf('%\' 2d', date('j', $timestamp));
+ }
+ if (strpos($format, '%l') !== false) {
+ $_win_from[] = '%l';
+ $_win_to[] = sprintf('%\' 2d', date('h', $timestamp));
+ }
+ $format = str_replace($_win_from, $_win_to, $format);
+ }
+ return strftime($format, $timestamp);
+ } else {
+ return date($format, $timestamp);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.debug_print_var.php b/3dparty/Smarty/plugins/modifier.debug_print_var.php
new file mode 100644
index 00000000000..026ff6aa1f4
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.debug_print_var.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage Debug
+ */
+
+/**
+ * Smarty debug_print_var modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: debug_print_var<br>
+ * Purpose: formats variable contents for display in the console
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php debug_print_var (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $ |object
+ * @param integer $
+ * @param integer $
+ * @return string
+ */
+function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40)
+{
+ $_replace = array("\n" => '<i>\n</i>',
+ "\r" => '<i>\r</i>',
+ "\t" => '<i>\t</i>'
+ );
+
+ switch (gettype($var)) {
+ case 'array' :
+ $results = '<b>Array (' . count($var) . ')</b>';
+ foreach ($var as $curr_key => $curr_val) {
+ $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+ . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '
+ . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+ $depth--;
+ }
+ break;
+ case 'object' :
+ $object_vars = get_object_vars($var);
+ $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
+ foreach ($object_vars as $curr_key => $curr_val) {
+ $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+ . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '
+ . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+ $depth--;
+ }
+ break;
+ case 'boolean' :
+ case 'NULL' :
+ case 'resource' :
+ if (true === $var) {
+ $results = 'true';
+ } elseif (false === $var) {
+ $results = 'false';
+ } elseif (null === $var) {
+ $results = 'null';
+ } else {
+ $results = htmlspecialchars((string) $var);
+ }
+ $results = '<i>' . $results . '</i>';
+ break;
+ case 'integer' :
+ case 'float' :
+ $results = htmlspecialchars((string) $var);
+ break;
+ case 'string' :
+ $results = strtr($var, $_replace);
+ if (strlen($var) > $length) {
+ $results = substr($var, 0, $length - 3) . '...';
+ }
+ $results = htmlspecialchars('"' . $results . '"');
+ break;
+ case 'unknown type' :
+ default :
+ $results = strtr((string) $var, $_replace);
+ if (strlen($results) > $length) {
+ $results = substr($results, 0, $length - 3) . '...';
+ }
+ $results = htmlspecialchars($results);
+ }
+
+ return $results;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.escape.php b/3dparty/Smarty/plugins/modifier.escape.php
new file mode 100644
index 00000000000..a0c15beec56
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.escape.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty escape modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: escape<br>
+ * Purpose: escape string for output
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param string $esc_type escape type
+ * @param string $char_set character set
+ * @return string escaped input string
+ */
+function smarty_modifier_escape($string, $esc_type = 'html', $char_set = SMARTY_RESOURCE_CHAR_SET)
+{
+ switch ($esc_type) {
+ case 'html':
+ return htmlspecialchars($string, ENT_QUOTES, $char_set);
+
+ case 'htmlall':
+ return htmlentities($string, ENT_QUOTES, $char_set);
+
+ case 'url':
+ return rawurlencode($string);
+
+ case 'urlpathinfo':
+ return str_replace('%2F', '/', rawurlencode($string));
+
+ case 'quotes':
+ // escape unescaped single quotes
+ return preg_replace("%(?<!\\\\)'%", "\\'", $string);
+
+ case 'hex':
+ // escape every character into hex
+ $return = '';
+ for ($x = 0; $x < strlen($string); $x++) {
+ $return .= '%' . bin2hex($string[$x]);
+ }
+ return $return;
+
+ case 'hexentity':
+ $return = '';
+ for ($x = 0; $x < strlen($string); $x++) {
+ $return .= '&#x' . bin2hex($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'decentity':
+ $return = '';
+ for ($x = 0; $x < strlen($string); $x++) {
+ $return .= '&#' . ord($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'javascript':
+ // escape quotes and backslashes, newlines, etc.
+ return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
+
+ case 'mail':
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
+
+ case 'nonstd':
+ // escape non-standard chars, such as ms document quotes
+ $_res = '';
+ for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
+ $_ord = ord(substr($string, $_i, 1));
+ // non-standard char, escape it
+ if ($_ord >= 126) {
+ $_res .= '&#' . $_ord . ';';
+ } else {
+ $_res .= substr($string, $_i, 1);
+ }
+ }
+ return $_res;
+
+ default:
+ return $string;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.regex_replace.php b/3dparty/Smarty/plugins/modifier.regex_replace.php
new file mode 100644
index 00000000000..d495594752a
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.regex_replace.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty regex_replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: regex_replace<br>
+ * Purpose: regular expression search/replace
+ * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
+ * regex_replace (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string
+ * @param string|array
+ * @param string|array
+ * @return string
+ */
+function smarty_modifier_regex_replace($string, $search, $replace)
+{
+ if(is_array($search)) {
+ foreach($search as $idx => $s)
+ $search[$idx] = _smarty_regex_replace_check($s);
+ } else {
+ $search = _smarty_regex_replace_check($search);
+ }
+
+ return preg_replace($search, $replace, $string);
+}
+
+function _smarty_regex_replace_check($search)
+{
+ if (($pos = strpos($search,"\0")) !== false)
+ $search = substr($search,0,$pos);
+ if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+ /* remove eval-modifier from $search */
+ $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
+ }
+ return $search;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.replace.php b/3dparty/Smarty/plugins/modifier.replace.php
new file mode 100644
index 00000000000..f922889250c
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.replace.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: replace<br>
+ * Purpose: simple search/replace
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @param string $
+ * @param string $
+ * @param string $
+ * @return string
+ */
+function smarty_modifier_replace($string, $search, $replace)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace($search, $replace, $string);
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.spacify.php b/3dparty/Smarty/plugins/modifier.spacify.php
new file mode 100644
index 00000000000..2b4685b2acb
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.spacify.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty spacify modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: spacify<br>
+ * Purpose: add spaces between characters in a string
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $
+ * @param string $
+ * @return string
+ */
+function smarty_modifier_spacify($string, $spacify_char = ' ')
+{
+ // mb_ functions available?
+ if (function_exists('mb_strlen') && mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') {
+ $strlen = mb_strlen($string);
+ while ($strlen) {
+ $array[] = mb_substr($string, 0, 1, "UTF-8");
+ $string = mb_substr($string, 1, $strlen, "UTF-8");
+ $strlen = mb_strlen($string);
+ }
+ return implode($spacify_char, $array);
+ } else {
+ return implode($spacify_char, preg_split('//', $string, -1));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifier.truncate.php b/3dparty/Smarty/plugins/modifier.truncate.php
new file mode 100644
index 00000000000..112cc19de0e
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifier.truncate.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty truncate modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: truncate<br>
+ * Purpose: Truncate a string to a certain length if necessary,
+ * optionally splitting in the middle of a word, and
+ * appending the $etc string or inserting $etc into the middle.
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param integer $length lenght of truncated text
+ * @param string $etc end string
+ * @param boolean $break_words truncate at word boundary
+ * @param boolean $middle truncate in the middle of text
+ * @return string truncated string
+ */
+function smarty_modifier_truncate($string, $length = 80, $etc = '...',
+ $break_words = false, $middle = false)
+{
+ if ($length == 0)
+ return '';
+
+ if (is_callable('mb_strlen')) {
+ if (mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') {
+ // $string has utf-8 encoding
+ if (mb_strlen($string) > $length) {
+ $length -= min($length, mb_strlen($etc));
+ if (!$break_words && !$middle) {
+ $string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1));
+ }
+ if (!$middle) {
+ return mb_substr($string, 0, $length) . $etc;
+ } else {
+ return mb_substr($string, 0, $length / 2) . $etc . mb_substr($string, - $length / 2);
+ }
+ } else {
+ return $string;
+ }
+ }
+ }
+ // $string has no utf-8 encoding
+ if (strlen($string) > $length) {
+ $length -= min($length, strlen($etc));
+ if (!$break_words && !$middle) {
+ $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length + 1));
+ }
+ if (!$middle) {
+ return substr($string, 0, $length) . $etc;
+ } else {
+ return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2);
+ }
+ } else {
+ return $string;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.cat.php b/3dparty/Smarty/plugins/modifiercompiler.cat.php
new file mode 100644
index 00000000000..6937222676d
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.cat.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty cat modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: cat<br>
+ * Date: Feb 24, 2003
+ * Purpose: catenate a value to a variable
+ * Input: string to catenate
+ * Example: {$var|cat:"foo"}
+ * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
+ * (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_cat($params, $compiler)
+{
+ return '('.implode(').(', $params).')';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.count_characters.php b/3dparty/Smarty/plugins/modifiercompiler.count_characters.php
new file mode 100644
index 00000000000..da2b6d22213
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.count_characters.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_characters modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_characteres<br>
+ * Purpose: count the number of characters in a text
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_characters($params, $compiler)
+{
+ // mb_ functions available?
+ if (function_exists('mb_strlen')) {
+ // count also spaces?
+ if (isset($params[1]) && $params[1] == 'true') {
+ return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strlen(' . $params[0] . ', SMARTY_RESOURCE_CHAR_SET) : strlen(' . $params[0] . '))';
+ }
+ return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? preg_match_all(\'#[^\s\pZ]#u\', ' . $params[0] . ', $tmp) : preg_match_all(\'/[^\s]/\',' . $params[0] . ', $tmp))';
+ } else {
+ // count also spaces?
+ if (isset($params[1]) && $params[1] == 'true') {
+ return 'strlen(' . $params[0] . ')';
+ }
+ return 'preg_match_all(\'/[^\s]/\',' . $params[0] . ', $tmp)';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.count_paragraphs.php b/3dparty/Smarty/plugins/modifiercompiler.count_paragraphs.php
new file mode 100644
index 00000000000..6af74236feb
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.count_paragraphs.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_paragraphs modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_paragraphs<br>
+ * Purpose: count the number of paragraphs in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
+ * count_paragraphs (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_paragraphs($params, $compiler)
+{
+ // count \r or \n characters
+ return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.count_sentences.php b/3dparty/Smarty/plugins/modifiercompiler.count_sentences.php
new file mode 100644
index 00000000000..2767d9fb3a4
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.count_sentences.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_sentences modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_sentences
+ * Purpose: count the number of sentences in a text
+ * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
+ * count_sentences (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_sentences($params, $compiler)
+{
+ // find periods with a word before but not after.
+ return 'preg_match_all(\'/[^\s]\.(?!\w)/\', ' . $params[0] . ', $tmp)';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.count_words.php b/3dparty/Smarty/plugins/modifiercompiler.count_words.php
new file mode 100644
index 00000000000..f9e54107123
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.count_words.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_words modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_words<br>
+ * Purpose: count the number of words in a text
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+*/
+function smarty_modifiercompiler_count_words($params, $compiler)
+{
+ // mb_ functions available?
+ if (function_exists('mb_strlen')) {
+ return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? preg_match_all(\'#[\w\pL]+#u\', ' . $params[0] . ', $tmp) : preg_match_all(\'#\w+#\',' . $params[0] . ', $tmp))';
+ } else {
+ return 'str_word_count(' . $params[0] . ')';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.default.php b/3dparty/Smarty/plugins/modifiercompiler.default.php
new file mode 100644
index 00000000000..736bf458cd9
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.default.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty default modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: default<br>
+ * Purpose: designate default value for empty variables
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.default.php default (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_default ($params, $compiler)
+{
+ $output = $params[0];
+ if (!isset($params[1])) {
+ $params[1] = "''";
+ }
+ for ($i = 1, $cnt = count($params); $i < $cnt; $i++) {
+ $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $params[$i] . ' : $tmp)';
+ }
+ return $output;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.indent.php b/3dparty/Smarty/plugins/modifiercompiler.indent.php
new file mode 100644
index 00000000000..bfea4c6fba2
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.indent.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty indent modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: indent<br>
+ * Purpose: indent lines of text
+ * @link http://smarty.php.net/manual/en/language.modifier.indent.php
+ * indent (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_indent($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = 4;
+ }
+ if (!isset($params[2])) {
+ $params[2] = "' '";
+ }
+ return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.lower.php b/3dparty/Smarty/plugins/modifiercompiler.lower.php
new file mode 100644
index 00000000000..8a893b68f89
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.lower.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty lower modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: lower<br>
+ * Purpose: convert string to lowercase
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_lower($params, $compiler)
+{
+ if (function_exists('mb_strtolower')) {
+ return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strtolower(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET) : strtolower(' . $params[0] . '))' ;
+ } else {
+ return 'strtolower(' . $params[0] . ')';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.noprint.php b/3dparty/Smarty/plugins/modifiercompiler.noprint.php
new file mode 100644
index 00000000000..5fac7b6ccaf
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.noprint.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty noprint modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: noprint<br>
+ * Purpose: return an empty string
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_noprint($params, $compiler)
+{
+ return "''";
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.string_format.php b/3dparty/Smarty/plugins/modifiercompiler.string_format.php
new file mode 100644
index 00000000000..e74bcce5542
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.string_format.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty string_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: string_format<br>
+ * Purpose: format strings via sprintf
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_string_format($params, $compiler)
+{
+ return 'sprintf(' . $params[1] . ',' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.strip.php b/3dparty/Smarty/plugins/modifiercompiler.strip.php
new file mode 100644
index 00000000000..52d2bec085b
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.strip.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty strip modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip<br>
+ * Purpose: Replace all repeated spaces, newlines, tabs
+ * with a single space or supplied replacement string.<br>
+ * Example: {$var|strip} {$var|strip:"&nbsp;"}
+ * Date: September 25th, 2002
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_strip($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = "' '";
+ }
+ return "preg_replace('!\s+!', {$params[1]},{$params[0]})";
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.strip_tags.php b/3dparty/Smarty/plugins/modifiercompiler.strip_tags.php
new file mode 100644
index 00000000000..1b3d889dafe
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.strip_tags.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty strip_tags modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip_tags<br>
+ * Purpose: strip html tags from text
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_strip_tags($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = true;
+ }
+ if ($params[1] === true) {
+ return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
+ } else {
+ return 'strip_tags(' . $params[0] . ')';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.upper.php b/3dparty/Smarty/plugins/modifiercompiler.upper.php
new file mode 100644
index 00000000000..1669d4a8fba
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.upper.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty upper modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: lower<br>
+ * Purpose: convert string to uppercase
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_upper($params, $compiler)
+{
+ if (function_exists('mb_strtoupper')) {
+ return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET) : strtoupper(' . $params[0] . '))' ;
+ } else {
+ return 'strtoupper(' . $params[0] . ')';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/modifiercompiler.wordwrap.php b/3dparty/Smarty/plugins/modifiercompiler.wordwrap.php
new file mode 100644
index 00000000000..6581d3d3183
--- /dev/null
+++ b/3dparty/Smarty/plugins/modifiercompiler.wordwrap.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty wordwrap modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: wordwrap<br>
+ * Purpose: wrap a string of text at a given length
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_wordwrap($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = 80;
+ }
+ if (!isset($params[2])) {
+ $params[2] = '"\n"';
+ }
+ if (!isset($params[3])) {
+ $params[3] = 'false';
+ }
+ return 'wordwrap(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/outputfilter.trimwhitespace.php b/3dparty/Smarty/plugins/outputfilter.trimwhitespace.php
new file mode 100644
index 00000000000..b9ec6cec752
--- /dev/null
+++ b/3dparty/Smarty/plugins/outputfilter.trimwhitespace.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty trimwhitespace outputfilter plugin
+ *
+ * File: outputfilter.trimwhitespace.php<br>
+ * Type: outputfilter<br>
+ * Name: trimwhitespace<br>
+ * Date: Jan 25, 2003<br>
+ * Purpose: trim leading white space and blank lines from
+ * template source after it gets interpreted, cleaning
+ * up code and saving bandwidth. Does not affect
+ * <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
+ * Install: Drop into the plugin directory, call
+ * <code>$smarty->load_filter('output','trimwhitespace');</code>
+ * from application.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Contributions from Lars Noschinski <lars@usenet.noschinski.de>
+ * @version 1.3
+ * @param string $source input string
+ * @param object &$smarty Smarty object
+ * @return string filtered output
+ */
+function smarty_outputfilter_trimwhitespace($source, $smarty)
+{
+ // Pull out the script blocks
+ preg_match_all("!<script[^>]*?>.*?</script>!is", $source, $match);
+ $_script_blocks = $match[0];
+ $source = preg_replace("!<script[^>]*?>.*?</script>!is",
+ '@@@SMARTY:TRIM:SCRIPT@@@', $source);
+
+ // Pull out the pre blocks
+ preg_match_all("!<pre[^>]*?>.*?</pre>!is", $source, $match);
+ $_pre_blocks = $match[0];
+ $source = preg_replace("!<pre[^>]*?>.*?</pre>!is",
+ '@@@SMARTY:TRIM:PRE@@@', $source);
+
+ // Pull out the textarea blocks
+ preg_match_all("!<textarea[^>]*?>.*?</textarea>!is", $source, $match);
+ $_textarea_blocks = $match[0];
+ $source = preg_replace("!<textarea[^>]*?>.*?</textarea>!is",
+ '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
+
+ // remove all leading spaces, tabs and carriage returns NOT
+ // preceeded by a php close tag.
+ $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
+
+ // replace textarea blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
+
+ // replace pre blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
+
+ // replace script blocks
+ smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
+
+ return $source;
+}
+
+function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
+ $_len = strlen($search_str);
+ $_pos = 0;
+ for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
+ if (($_pos=strpos($subject, $search_str, $_pos))!==false)
+ $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
+ else
+ break;
+
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/shared.escape_special_chars.php b/3dparty/Smarty/plugins/shared.escape_special_chars.php
new file mode 100644
index 00000000000..e36b2c897c1
--- /dev/null
+++ b/3dparty/Smarty/plugins/shared.escape_special_chars.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+/**
+ * escape_special_chars common function
+ *
+ * Function: smarty_function_escape_special_chars<br>
+ * Purpose: used by other smarty functions to escape
+ * special chars except for already escaped ones
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string
+ * @return string
+ */
+function smarty_function_escape_special_chars($string)
+{
+ if(!is_array($string)) {
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlspecialchars($string);
+ $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
+ }
+ return $string;
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/shared.make_timestamp.php b/3dparty/Smarty/plugins/shared.make_timestamp.php
new file mode 100644
index 00000000000..28638ca01ff
--- /dev/null
+++ b/3dparty/Smarty/plugins/shared.make_timestamp.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+/**
+ * Function: smarty_make_timestamp<br>
+ * Purpose: used by other smarty functions to make a timestamp
+ * from a string.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string
+ * @return string
+ */
+
+function smarty_make_timestamp($string)
+{
+ if(empty($string)) {
+ // use "now":
+ return time();
+ } elseif ($string instanceof DateTime) {
+ return $string->getTimestamp();
+ } elseif (strlen($string)==14 && ctype_digit($string)) {
+ // it is mysql timestamp format of YYYYMMDDHHMMSS?
+ return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
+ substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
+ } elseif (is_numeric($string)) {
+ // it is a numeric string, we handle it as timestamp
+ return (int)$string;
+ } else {
+ // strtotime should handle it
+ $time = strtotime($string);
+ if ($time == -1 || $time === false) {
+ // strtotime() was not able to parse $string, use "now":
+ return time();
+ }
+ return $time;
+ }
+}
+
+?>
diff --git a/3dparty/Smarty/plugins/shared.mb_str_replace.php b/3dparty/Smarty/plugins/shared.mb_str_replace.php
new file mode 100644
index 00000000000..8e9482731e9
--- /dev/null
+++ b/3dparty/Smarty/plugins/shared.mb_str_replace.php
@@ -0,0 +1,38 @@
+<?php
+
+if(!function_exists('smarty_mb_str_replace')) {
+ function smarty_mb_str_replace($search, $replace, $subject, &$count=0) {
+ if (!is_array($search) && is_array($replace)) {
+ return false;
+ }
+ if (is_array($subject)) {
+ // call mb_replace for each single string in $subject
+ foreach ($subject as &$string) {
+ $string = &smarty_mb_str_replace($search, $replace, $string, $c);
+ $count += $c;
+ }
+ } elseif (is_array($search)) {
+ if (!is_array($replace)) {
+ foreach ($search as &$string) {
+ $subject = smarty_mb_str_replace($string, $replace, $subject, $c);
+ $count += $c;
+ }
+ } else {
+ $n = max(count($search), count($replace));
+ while ($n--) {
+ $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
+ $count += $c;
+ next($search);
+ next($replace);
+ }
+ }
+ } else {
+ $parts = mb_split(preg_quote($search), $subject);
+ $count = count($parts)-1;
+ $subject = implode($replace, $parts);
+ }
+ return $subject;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/plugins/variablefilter.htmlspecialchars.php b/3dparty/Smarty/plugins/variablefilter.htmlspecialchars.php
new file mode 100644
index 00000000000..66f8267775d
--- /dev/null
+++ b/3dparty/Smarty/plugins/variablefilter.htmlspecialchars.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty htmlspecialchars variablefilter plugin
+ *
+ * @param string $source input string
+ * @param object $ &$smarty Smarty object
+ * @return string filtered output
+ */
+
+function smarty_variablefilter_htmlspecialchars($source, $smarty)
+{
+ return htmlspecialchars($source, ENT_QUOTES);
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_cacheresource_file.php b/3dparty/Smarty/sysplugins/smarty_internal_cacheresource_file.php
new file mode 100644
index 00000000000..2cb8a72af68
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_cacheresource_file.php
@@ -0,0 +1,205 @@
+<?php
+
+/**
+ * Smarty Internal Plugin CacheResource File
+ *
+ * Implements the file system as resource for the HTML cache
+ * Version ussing nocache inserts
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does contain all necessary methods for the HTML cache on file system
+ */
+class Smarty_Internal_CacheResource_File {
+ function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ /**
+ * Returns the filepath of the cached template output
+ *
+ * @param object $_template current template
+ * @return string the cache filepath
+ */
+ public function getCachedFilepath($_template)
+ {
+ $_source_file_path = str_replace(':', '.', $_template->getTemplateFilepath());
+ $_cache_id = isset($_template->cache_id) ? preg_replace('![^\w\|]+!', '_', $_template->cache_id) : null;
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ $_filepath = $_template->templateUid;
+ // if use_sub_dirs, break file into directories
+ if ($this->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_cache_id)) {
+ $_cache_id = str_replace('|', $_compile_dir_sep, $_cache_id) . $_compile_dir_sep;
+ } else {
+ $_cache_id = '';
+ }
+ if (isset($_compile_id)) {
+ $_compile_id = $_compile_id . $_compile_dir_sep;
+ } else {
+ $_compile_id = '';
+ }
+ $_cache_dir = $this->smarty->cache_dir;
+ if (strpos('/\\', substr($_cache_dir, -1)) === false) {
+ $_cache_dir .= DS;
+ }
+ return $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
+ }
+
+ /**
+ * Returns the timpestamp of the cached template output
+ *
+ * @param object $_template current template
+ * @return integer |booelan the template timestamp or false if the file does not exist
+ */
+ public function getCachedTimestamp($_template)
+ {
+ // return @filemtime ($_template->getCachedFilepath());
+ return ($_template->getCachedFilepath() && file_exists($_template->getCachedFilepath())) ? filemtime($_template->getCachedFilepath()) : false ;
+ }
+
+ /**
+ * Returns the cached template output
+ *
+ * @param object $_template current template
+ * @return string |booelan the template content or false if the file does not exist
+ */
+ public function getCachedContents($_template, $no_render = false)
+ {
+ if (!$no_render) {
+ ob_start();
+ }
+ $_smarty_tpl = $_template;
+ include $_template->getCachedFilepath();
+ if ($no_render) {
+ return null;
+ } else {
+ return ob_get_clean();
+ }
+ }
+
+ /**
+ * Writes the rendered template output to cache file
+ *
+ * @param object $_template current template
+ * @return boolean status
+ */
+ public function writeCachedContent($_template, $content)
+ {
+ if (!$_template->resource_object->isEvaluated) {
+ if (Smarty_Internal_Write_File::writeFile($_template->getCachedFilepath(), $content, $this->smarty) === true) {
+ $_template->cached_timestamp = filemtime($_template->getCachedFilepath());
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Empty cache folder
+ *
+ * @param integer $exp_time expiration time
+ * @return integer number of cache files deleted
+ */
+ public function clearAll($exp_time = null)
+ {
+ return $this->clear(null, null, null, $exp_time);
+ }
+ /**
+ * Empty cache for a specific template
+ *
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @return integer number of cache files deleted
+ */
+ public function clear($resource_name, $cache_id, $compile_id, $exp_time)
+ {
+ $_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null;
+ $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
+ $_dir_sep = $this->smarty->use_sub_dirs ? '/' : '^';
+ $_compile_id_offset = $this->smarty->use_sub_dirs ? 3 : 0;
+ $_dir = rtrim($this->smarty->cache_dir, '/\\') . DS;
+ $_dir_length = strlen($_dir);
+ if (isset($_cache_id)) {
+ $_cache_id_parts = explode('|', $_cache_id);
+ $_cache_id_parts_count = count($_cache_id_parts);
+ if ($this->smarty->use_sub_dirs) {
+ foreach ($_cache_id_parts as $id_part) {
+ $_dir .= $id_part . DS;
+ }
+ }
+ }
+ if (isset($resource_name)) {
+ $_save_stat = $this->smarty->caching;
+ $this->smarty->caching = true;
+ $tpl = new $this->smarty->template_class($resource_name, $this->smarty);
+ // remove from template cache
+ unset($this->smarty->template_objects[crc32($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
+ $this->smarty->caching = $_save_stat;
+ if ($tpl->isExisting()) {
+ $_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath()));
+ } else {
+ return 0;
+ }
+ }
+ $_count = 0;
+ if (file_exists($_dir)) {
+ $_cacheDirs = new RecursiveDirectoryIterator($_dir);
+ $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ($_cache as $_file) {
+ if (strpos($_file, '.svn') !== false) continue;
+ // directory ?
+ if ($_file->isDir()) {
+ if (!$_cache->isDot()) {
+ // delete folder if empty
+ @rmdir($_file->getPathname());
+ }
+ } else {
+ $_parts = explode($_dir_sep, str_replace('\\', '/', substr((string)$_file, $_dir_length)));
+ $_parts_count = count($_parts);
+ // check name
+ if (isset($resource_name)) {
+ if ($_parts[$_parts_count-1] != $_resourcename_parts) {
+ continue;
+ }
+ }
+ // check compile id
+ if (isset($_compile_id) && (!isset($_parts[$_parts_count-2 - $_compile_id_offset]) || $_parts[$_parts_count-2 - $_compile_id_offset] != $_compile_id)) {
+ continue;
+ }
+ // check cache id
+ if (isset($_cache_id)) {
+ // count of cache id parts
+ $_parts_count = (isset($_compile_id)) ? $_parts_count - 2 - $_compile_id_offset : $_parts_count - 1 - $_compile_id_offset;
+ if ($_parts_count < $_cache_id_parts_count) {
+ continue;
+ }
+ for ($i = 0; $i < $_cache_id_parts_count; $i++) {
+ if ($_parts[$i] != $_cache_id_parts[$i]) continue 2;
+ }
+ }
+ // expired ?
+ if (isset($exp_time) && time() - @filemtime($_file) < $exp_time) {
+ continue;
+ }
+ $_count += @unlink((string) $_file) ? 1 : 0;
+ }
+ }
+ }
+ return $_count;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_append.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_append.php
new file mode 100644
index 00000000000..2f8d463eb4b
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_append.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Append
+ *
+ * Compiles the {append} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+/**
+ * Smarty Internal Plugin Compile Append Class
+ */
+class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign {
+
+ /**
+ * Compiles code for the {append} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // the following must be assigned at runtime because it will be overwritten in parent class
+ $this->required_attributes = array('var', 'value');
+ $this->shorttag_order = array('var', 'value');
+ $this->optional_attributes = array('scope','index');
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // map to compile assign attributes
+ if (isset($_attr['index'])) {
+ $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']';
+ unset($_attr['index']);
+ } else {
+ $_params['smarty_internal_index'] = '[]';
+ }
+ $_new_attr = array();
+ foreach ($_attr as $key => $value) {
+ $_new_attr[] = array($key => $value);
+ }
+ // call compile assign
+ return parent::compile($_new_attr, $compiler, $_params);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_assign.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_assign.php
new file mode 100644
index 00000000000..36bbc701c68
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_assign.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Assign
+ *
+ * Compiles the {assign} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Assign Class
+ */
+class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {assign} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
+ $this->required_attributes = array('var', 'value');
+ $this->shorttag_order = array('var', 'value');
+ $this->optional_attributes = array('scope');
+ $_nocache = 'null';
+ $_scope = 'null';
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // nocache ?
+ if ($this->compiler->tag_nocache || $this->compiler->nocache) {
+ $_nocache = 'true';
+ // create nocache var to make it know for further compiling
+ $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
+ }
+ // scope setup
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if ($_attr['scope'] == 'parent') {
+ $_scope = Smarty::SCOPE_PARENT;
+ } elseif ($_attr['scope'] == 'root') {
+ $_scope = Smarty::SCOPE_ROOT;
+ } elseif ($_attr['scope'] == 'global') {
+ $_scope = Smarty::SCOPE_GLOBAL;
+ } else {
+ $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno);
+ }
+ }
+ // compiled output
+ if (isset($parameter['smarty_internal_index'])) {
+ return "<?php if (!isset(\$_smarty_tpl->tpl_vars[$_attr[var]]) || !is_array(\$_smarty_tpl->tpl_vars[$_attr[var]]->value)) \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];?>";
+ } else {
+ return "<?php \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);?>";
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_block.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_block.php
new file mode 100644
index 00000000000..c0766267a3d
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_block.php
@@ -0,0 +1,187 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Block
+ *
+ * Compiles the {block}{/block} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Block Class
+ */
+class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('name');
+ public $shorttag_order = array('name');
+ /**
+ * Compiles code for the {block} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return boolean true
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ $save = array($_attr, $compiler->parser->current_buffer, $this->compiler->nocache, $this->compiler->smarty->merge_compiled_includes, $compiler->smarty->inheritance);
+ $this->_open_tag('block', $save);
+ if ($_attr['nocache'] == true) {
+ $compiler->nocache = true;
+ }
+ // set flag for {block} tag
+ $compiler->smarty->inheritance = true;
+ // must merge includes
+ $this->compiler->smarty->merge_compiled_includes = true;
+
+ $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);
+ $compiler->has_code = false;
+ return true;
+ }
+
+
+ static function saveBlockData($block_content, $block_tag, $template, $filepath)
+ {
+ $_rdl = preg_quote($template->smarty->right_delimiter);
+ $_ldl = preg_quote($template->smarty->left_delimiter);
+
+ if (0 == preg_match("!({$_ldl}block\s+)(name=)?(\w+|'.*'|\".*\")(\s*?)?((append|prepend|nocache)(=true)?)?(\s*{$_rdl})!", $block_tag, $_match)) {
+ $error_text = 'Syntax Error in template "' . $template->getTemplateFilepath() . '" "' . htmlspecialchars($block_tag) . '" illegal options';
+ throw new SmartyCompilerException($error_text);
+ } else {
+ $_name = trim($_match[3], '\'"');
+ // replace {$smarty.block.child}
+ if (strpos($block_content, $template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter) !== false) {
+ if (isset($template->block_data[$_name])) {
+ $block_content = str_replace($template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter,
+ $template->block_data[$_name]['source'], $block_content);
+ unset($template->block_data[$_name]);
+ } else {
+ $block_content = str_replace($template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter,
+ '', $block_content);
+ }
+ }
+ if (isset($template->block_data[$_name])) {
+ if (strpos($template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
+ $template->block_data[$_name]['source'] =
+ str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $template->block_data[$_name]['source']);
+ } elseif ($template->block_data[$_name]['mode'] == 'prepend') {
+ $template->block_data[$_name]['source'] .= $block_content;
+ } elseif ($template->block_data[$_name]['mode'] == 'append') {
+ $template->block_data[$_name]['source'] = $block_content . $template->block_data[$_name]['source'];
+ }
+ } else {
+ $template->block_data[$_name]['source'] = $block_content;
+ }
+ if ($_match[6] == 'append') {
+ $template->block_data[$_name]['mode'] = 'append';
+ } elseif ($_match[6] == 'prepend') {
+ $template->block_data[$_name]['mode'] = 'prepend';
+ } else {
+ $template->block_data[$_name]['mode'] = 'replace';
+ }
+ $template->block_data[$_name]['file'] = $filepath;
+ }
+ }
+
+ static function compileChildBlock ($compiler, $_name = null)
+ {
+ $_output = '';
+ // if called by {$smarty.block.child} we must search the name of enclosing {block}
+ if ($_name == null) {
+ $stack_count = count($compiler->_tag_stack);
+ while (--$stack_count >= 0) {
+ if ($compiler->_tag_stack[$stack_count][0] == 'block') {
+ $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'] ,"'\"");
+ break;
+ }
+ }
+ // flag that child is already compile by {$smarty.block.child} inclusion
+ $compiler->template->block_data[$_name]['compiled'] = true;
+ }
+ if ($_name == null) {
+ $compiler->trigger_template_error('{$smarty.block.child} used out of context', $this->compiler->lex->taglineno);
+ }
+ // undefined child?
+ if (!isset($compiler->template->block_data[$_name])) {
+ return '';
+ }
+ $_tpl = new Smarty_Internal_template ('eval:' . $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id,
+ $compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime);
+ $_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];
+ $_tpl->template_filepath = $compiler->template->block_data[$_name]['file'];
+ if ($compiler->nocache) {
+ $_tpl->forceNocache = 2;
+ } else {
+ $_tpl->forceNocache = 1;
+ }
+ $_tpl->suppressHeader = true;
+ $_tpl->suppressFileDependency = true;
+ if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
+ $_output = str_replace('%%%%SMARTY_PARENT%%%%', $compiler->parser->current_buffer->to_smarty_php(), $_tpl->getCompiledTemplate());
+ } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') {
+ $_output = $_tpl->getCompiledTemplate() . $compiler->parser->current_buffer->to_smarty_php();
+ } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') {
+ $_output = $compiler->parser->current_buffer->to_smarty_php() . $_tpl->getCompiledTemplate();
+ } elseif (!empty($compiler->template->block_data[$_name])) {
+ $_output = $_tpl->getCompiledTemplate();
+ }
+ $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']);
+ $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']);
+ if ($_tpl->has_nocache_code) {
+ $compiler->template->has_nocache_code = true;
+ }
+ foreach($_tpl->required_plugins as $code => $tmp1) {
+ foreach($tmp1 as $name => $tmp) {
+ foreach($tmp as $type => $data) {
+ $compiler->template->required_plugins[$code][$name][$type] = $data;
+ }
+ }
+ }
+ unset($_tpl);
+ return $_output;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile BlockClose Class
+ */
+class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/block} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $compiler->smarty;
+ $this->compiler->has_code = true;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ $saved_data = $this->_close_tag(array('block'));
+ $_name = trim($saved_data[0]['name'], "\"'");
+ if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) {
+ $_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name);
+ } else {
+ $_output = $compiler->parser->current_buffer->to_smarty_php();
+ unset ($compiler->template->block_data[$_name]['compiled']);
+ }
+ // reset flags
+ $compiler->parser->current_buffer = $saved_data[1];
+ $compiler->nocache = $saved_data[2];
+ $compiler->smarty->merge_compiled_includes = $saved_data[3];
+ $compiler->smarty->inheritance = $saved_data[4];
+ // $_output content has already nocache code processed
+ $compiler->suppressNocacheProcessing = true;
+ return $_output;
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_break.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_break.php
new file mode 100644
index 00000000000..ee39f7ef29d
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_break.php
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Break
+ *
+ * Compiles the {break} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+/**
+ * Smarty Internal Plugin Compile Break Class
+ */
+class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('levels');
+ public $shorttag_order = array('levels');
+
+
+ /**
+ * Compiles code for the {break} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $compiler->smarty;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['levels'])) {
+ if (!is_numeric($_attr['levels'])) {
+ $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno);
+ }
+ $_levels = $_attr['levels'];
+ } else {
+ $_levels = 1;
+ }
+ $level_count = $_levels;
+ $stack_count = count($compiler->_tag_stack) - 1;
+ while ($level_count > 0 && $stack_count >= 0) {
+ if (in_array($compiler->_tag_stack[$stack_count][0], array('for', 'foreach', 'while', 'section'))) {
+ $level_count--;
+ }
+ $stack_count--;
+ }
+ if ($level_count != 0) {
+ $this->compiler->trigger_template_error("cannot break {$_levels} level(s)", $this->compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $this->compiler->has_code = true;
+ return "<?php break {$_levels}?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_call.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_call.php
new file mode 100644
index 00000000000..fbd4d0c63ea
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_call.php
@@ -0,0 +1,108 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Function_Call
+ *
+ * Compiles the calls of user defined tags defined by {function}
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function_Call Class
+ */
+class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('name');
+ public $shorttag_order = array('name');
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles the calls of user defined tags defined by {function}
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $compiler->smarty;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // save possible attributes
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+ $_name = $_attr['name'];
+ unset($_attr['name'], $_attr['assign'], $_attr['nocache']);
+ // set flag (compiled code of {function} must be included in cache file
+ if ($compiler->nocache || $compiler->tag_nocache) {
+ $_nocache = 'true';
+ } else {
+ $_nocache = 'false';
+ }
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ if (isset($compiler->template->properties['function'][$_name]['parameter'])) {
+ foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) {
+ if (!isset($_attr[$_key])) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ }
+ } elseif (isset($this->smarty->template_functions[$_name]['parameter'])) {
+ foreach ($this->smarty->template_functions[$_name]['parameter'] as $_key => $_value) {
+ if (!isset($_attr[$_key])) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ }
+ }
+ //varibale name?
+ if (!(strpos($_name,'$')===false)) {
+ $call_cache = $_name;
+ $call_function = '$tmp = "smarty_template_function_".'.$_name.'; $tmp';
+ } else {
+ $_name = trim($_name, "'\"");
+ $call_cache = "'{$_name}'";
+ $call_function = 'smarty_template_function_'.$_name;
+ }
+
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_hash = str_replace('-','_',$compiler->template->properties['nocache_hash']);
+ // was there an assign attribute
+ if (isset($_assign)) {
+ if ($compiler->template->caching) {
+ $_output = "<?php ob_start(); Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
+ } else {
+ $_output = "<?php ob_start(); {$call_function}(\$_smarty_tpl,{$_params}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
+ }
+ } else {
+ if ($compiler->template->caching) {
+ $_output = "<?php Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache});?>\n";
+ } else {
+ $_output = "<?php {$call_function}(\$_smarty_tpl,{$_params});?>\n";
+ }
+ }
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_capture.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_capture.php
new file mode 100644
index 00000000000..f76589a84ab
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_capture.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Capture
+ *
+ * Compiles the {capture} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Capture Class
+ */
+class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $shorttag_order = array('name');
+ public $optional_attributes = array('name', 'assign', 'append');
+
+ /**
+ * Compiles code for the {capture} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ $buffer = isset($_attr['name']) ? $_attr['name'] : "'default'";
+ $assign = isset($_attr['assign']) ? $_attr['assign'] : null;
+ $append = isset($_attr['append']) ? $_attr['append'] : null;
+
+ $this->compiler->_capture_stack[] = array($buffer, $assign, $append, $this->compiler->nocache);
+ // maybe nocache because of nocache variables
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ $_output = "<?php ob_start(); ?>";
+
+ return $_output;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Captureclose Class
+ */
+class Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/capture} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+
+ list($buffer, $assign, $append, $this->compiler->nocache) = array_pop($this->compiler->_capture_stack);
+
+ $_output = "<?php ";
+ if (isset($assign)) {
+ $_output .= " \$_smarty_tpl->assign($assign, ob_get_contents());";
+ }
+ if (isset($append)) {
+ $_output .= " \$_smarty_tpl->append($append, ob_get_contents());";
+ }
+ $_output .= " Smarty::\$_smarty_vars['capture'][$buffer]=ob_get_clean();?>";
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_config_load.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_config_load.php
new file mode 100644
index 00000000000..c0d2baa7952
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_config_load.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Config Load
+ *
+ * Compiles the {config load} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Config Load Class
+ */
+class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('file');
+ public $shorttag_order = array('file','section');
+ public $optional_attributes = array('section', 'scope');
+
+ /**
+ * Compiles code for the {config_load} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+
+
+ // save posible attributes
+ $conf_file = $_attr['file'];
+ if (isset($_attr['section'])) {
+ $section = $_attr['section'];
+ } else {
+ $section = 'null';
+ }
+ $scope = 'local';
+ // scope setup
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if (in_array($_attr['scope'],array('local','parent','root','global'))) {
+ $scope = $_attr['scope'];
+ } else {
+ $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno);
+ }
+ }
+ // create config object
+ $_output = "<?php \$_config = new Smarty_Internal_Config($conf_file, \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ $_output .= "\$_config->loadConfigVars($section, '$scope'); ?>";
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_continue.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_continue.php
new file mode 100644
index 00000000000..32af76a19a3
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_continue.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Continue
+ *
+ * Compiles the {continue} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+/**
+ * Smarty Internal Plugin Compile Continue Class
+ */
+class Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('levels');
+ public $shorttag_order = array('levels');
+
+ /**
+ * Compiles code for the {continue} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $compiler->smarty;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['levels'])) {
+ if (!is_numeric($_attr['levels'])) {
+ $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno);
+ }
+ $_levels = $_attr['levels'];
+ } else {
+ $_levels = 1;
+ }
+ $level_count = $_levels;
+ $stack_count = count($compiler->_tag_stack) - 1;
+ while ($level_count > 0 && $stack_count >= 0) {
+ if (in_array($compiler->_tag_stack[$stack_count][0], array('for', 'foreach', 'while', 'section'))) {
+ $level_count--;
+ }
+ $stack_count--;
+ }
+ if ($level_count != 0) {
+ $this->compiler->trigger_template_error("cannot continue {$_levels} level(s)", $this->compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $this->compiler->has_code = true;
+ return "<?php continue {$_levels}?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_debug.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_debug.php
new file mode 100644
index 00000000000..3d5d18538b8
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_debug.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Debug
+ *
+ * Compiles the {debug} tag
+ * It opens a window the the Smarty Debugging Console
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Debug Class
+ */
+class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {debug} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ // compile always as nocache
+ $this->compiler->tag_nocache = true;
+
+ // display debug template
+ $_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_eval.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_eval.php
new file mode 100644
index 00000000000..0167e93d90b
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_eval.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Eval
+ *
+ * Compiles the {eval} tag
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Eval Class
+ */
+class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase {
+ public $required_attributes = array('var');
+ public $optional_attributes = array('assign');
+ public $shorttag_order = array('var','assign');
+
+ /**
+ * Compiles code for the {eval} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $this->required_attributes = array('var');
+ $this->optional_attributes = array('assign');
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+
+ // create template object
+ $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ //was there an assign attribute?
+ if (isset($_assign)) {
+ $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate());";
+ } else {
+ $_output .= "echo \$_template->getRenderedTemplate();";
+ }
+ return "<?php $_output ?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_extends.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_extends.php
new file mode 100644
index 00000000000..919ea3ab8c8
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_extends.php
@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile extend
+ *
+ * Compiles the {extends} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile extend Class
+ */
+class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('file');
+ public $shorttag_order = array('file');
+
+ /**
+ * Compiles code for the {extends} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $compiler->smarty;
+ $this->_rdl = preg_quote($this->smarty->right_delimiter);
+ $this->_ldl = preg_quote($this->smarty->left_delimiter);
+ $filepath = $compiler->template->getTemplateFilepath();
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+
+ $_smarty_tpl = $compiler->template;
+ $include_file = null;
+ if (strpos($_attr['file'],'$_tmp') !== false) {
+ $this->compiler->trigger_template_error('illegal value for file attribute', $this->compiler->lex->taglineno);
+ }
+ eval('$include_file = ' . $_attr['file'] . ';');
+ // create template object
+ $_template = new $compiler->smarty->template_class($include_file, $this->smarty, $compiler->template);
+ // save file dependency
+ if (in_array($_template->resource_type,array('eval','string'))) {
+ $template_sha1 = sha1($include_file);
+ } else {
+ $template_sha1 = sha1($_template->getTemplateFilepath());
+ }
+ if (isset($compiler->template->properties['file_dependency'][$template_sha1])) {
+ $this->compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"",$compiler->lex->line-1);
+ }
+ $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp(),$_template->resource_type);
+ $_content = substr($compiler->template->template_source,$compiler->lex->counter-1);
+ if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $s) !=
+ preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $c)) {
+ $this->compiler->trigger_template_error('unmatched {block} {/block} pairs');
+ }
+ preg_match_all("!{$this->_ldl}block\s(.+?){$this->_rdl}|{$this->_ldl}/block{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE);
+ $_result_count = count($_result[0]);
+ $_start = 0;
+ while ($_start < $_result_count) {
+ $_end = 0;
+ $_level = 1;
+ while ($_level != 0) {
+ $_end++;
+ if (!strpos($_result[0][$_start + $_end][0], '/')) {
+ $_level++;
+ } else {
+ $_level--;
+ }
+ }
+ $_block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.parent' . $this->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',
+ substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0])));
+ Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template, $filepath);
+ $_start = $_start + $_end + 1;
+ }
+ $compiler->template->template_source = $_template->getTemplateSource();
+ $compiler->template->template_filepath = $_template->getTemplateFilepath();
+ $compiler->abort_and_recompile = true;
+ return '';
+ }
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_for.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_for.php
new file mode 100644
index 00000000000..2b5408b84cb
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_for.php
@@ -0,0 +1,147 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile For
+ *
+ * Compiles the {for} {forelse} {/for} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile For Class
+ */
+class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {for} tag
+ *
+ * Smarty 3 does implement two different sytaxes:
+ *
+ * - {for $var in $array}
+ * For looping over arrays or iterators
+ *
+ * - {for $x=0; $x<$y; $x++}
+ * For general loops
+ *
+ * The parser is gereration different sets of attribute by which this compiler can
+ * determin which syntax is used.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ if ($parameter == 0) {
+ $this->required_attributes = array('start','to');
+ $this->optional_attributes = array('max','step');
+ } else {
+ $this->required_attributes = array('start','ifexp','var','step');
+ $this->optional_attributes = array();
+ }
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ $local_vars = array();
+
+ $output = "<?php ";
+ if ($parameter == 1) {
+ foreach ($_attr['start'] as $_statement) {
+ $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;";
+ $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value];\n";
+ $compiler->local_var[$_statement['var']] = true;
+ $local_vars[] = $_statement['var'];
+ }
+ $output .= " if ($_attr[ifexp]){ for (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$_attr[var]]->value$_attr[step]){\n";
+ } else {
+ $_statement = $_attr['start'];
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;";
+ $compiler->local_var[$_statement['var']] = true;
+ $local_vars[] = $_statement['var'];
+ if (isset($_attr['step'])) {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = $_attr[step];";
+ } else {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = 1;";
+ }
+ if (isset($_attr['max'])) {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)min(ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step)),$_attr[max]);\n";
+ } else {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step));\n";
+ }
+ $output .= "if (\$_smarty_tpl->tpl_vars[$_statement[var]]->total > 0){\n";
+ $output .= "for (\$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value], \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration = 1;\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration <= \$_smarty_tpl->tpl_vars[$_statement[var]]->total;\$_smarty_tpl->tpl_vars[$_statement[var]]->value += \$_smarty_tpl->tpl_vars[$_statement[var]]->step, \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration++){\n";
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->first = \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == 1;";
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->last = \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == \$_smarty_tpl->tpl_vars[$_statement[var]]->total;";
+ }
+ $output .= "?>";
+
+ $this->_open_tag('for', array('for', $this->compiler->nocache, $local_vars));
+ // maybe nocache because of nocache variables
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ // return compiled code
+ return $output;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Forelse Class
+ */
+class Smarty_Internal_Compile_Forelse extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {forelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ list($_open_tag, $nocache, $local_vars) = $this->_close_tag(array('for'));
+ $this->_open_tag('forelse', array('forelse', $nocache, $local_vars));
+ return "<?php }} else { ?>";
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Forclose Class
+ */
+class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/for} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+
+ list($_open_tag, $this->compiler->nocache, $local_vars) = $this->_close_tag(array('for', 'forelse'));
+
+ foreach ($local_vars as $var) {
+ unset($compiler->local_var[$var]);
+ }
+ if ($_open_tag == 'forelse')
+ return "<?php } ?>";
+ else
+ return "<?php }} ?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_foreach.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_foreach.php
new file mode 100644
index 00000000000..c54428accb9
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_foreach.php
@@ -0,0 +1,219 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Foreach
+ *
+ * Compiles the {foreach} {foreachelse} {/foreach} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Foreach Class
+ */
+class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('from', 'item');
+ public $optional_attributes = array('name', 'key');
+ public $shorttag_order = array('from','item','key','name');
+
+ /**
+ * Compiles code for the {foreach} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ $tpl = $compiler->template;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ $from = $_attr['from'];
+ $item = $_attr['item'];
+
+ if (substr_compare("\$_smarty_tpl->getVariable($item)", $from,0, strlen("\$_smarty_tpl->getVariable($item)")) == 0) {
+ $this->compiler->trigger_template_error("item variable {$item} may not be the same variable as at 'from'", $this->compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['key'])) {
+ $key = $_attr['key'];
+ } else {
+ $key = null;
+ }
+
+ $this->_open_tag('foreach', array('foreach', $this->compiler->nocache, $item, $key));
+ // maybe nocache because of nocache variables
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+
+ if (isset($_attr['name'])) {
+ $name = $_attr['name'];
+ $has_name = true;
+ $SmartyVarName = '$smarty.foreach.' . trim($name, '\'"') . '.';
+ } else {
+ $name = null;
+ $has_name = false;
+ }
+ $ItemVarName = '$' . trim($item, '\'"') . '@';
+ // evaluates which Smarty variables and properties have to be computed
+ if ($has_name) {
+ $usesSmartyFirst = strpos($tpl->template_source, $SmartyVarName . 'first') !== false;
+ $usesSmartyLast = strpos($tpl->template_source, $SmartyVarName . 'last') !== false;
+ $usesSmartyIndex = strpos($tpl->template_source, $SmartyVarName . 'index') !== false;
+ $usesSmartyIteration = strpos($tpl->template_source, $SmartyVarName . 'iteration') !== false;
+ $usesSmartyShow = strpos($tpl->template_source, $SmartyVarName . 'show') !== false;
+ $usesSmartyTotal = strpos($tpl->template_source, $SmartyVarName . 'total') !== false;
+ } else {
+ $usesSmartyFirst = false;
+ $usesSmartyLast = false;
+ $usesSmartyTotal = false;
+ $usesSmartyShow = false;
+ }
+
+ $usesPropFirst = $usesSmartyFirst || strpos($tpl->template_source, $ItemVarName . 'first') !== false;
+ $usesPropLast = $usesSmartyLast || strpos($tpl->template_source, $ItemVarName . 'last') !== false;
+ $usesPropIndex = $usesPropFirst || strpos($tpl->template_source, $ItemVarName . 'index') !== false;
+ $usesPropIteration = $usesPropLast || strpos($tpl->template_source, $ItemVarName . 'iteration') !== false;
+ $usesPropShow = strpos($tpl->template_source, $ItemVarName . 'show') !== false;
+ $usesPropTotal = $usesSmartyTotal || $usesSmartyShow || $usesPropShow || $usesPropLast || strpos($tpl->template_source, $ItemVarName . 'total') !== false;
+ // generate output code
+ $output = "<?php ";
+ $output .= " \$_smarty_tpl->tpl_vars[$item] = new Smarty_Variable;\n";
+ $compiler->local_var[$item] = true;
+ if ($key != null) {
+ $output .= " \$_smarty_tpl->tpl_vars[$key] = new Smarty_Variable;\n";
+ $compiler->local_var[$key] = true;
+ }
+ $output .= " \$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array');}\n";
+ if ($usesPropTotal) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->total= \$_smarty_tpl->_count(\$_from);\n";
+ }
+ if ($usesPropIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->iteration=0;\n";
+ }
+ if ($usesPropIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->index=-1;\n";
+ }
+ if ($usesPropShow) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->show = (\$_smarty_tpl->tpl_vars[$item]->total > 0);\n";
+ }
+ if ($has_name) {
+ if ($usesSmartyTotal) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['total'] = \$_smarty_tpl->tpl_vars[$item]->total;\n";
+ }
+ if ($usesSmartyIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']=0;\n";
+ }
+ if ($usesSmartyIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']=-1;\n";
+ }
+ if ($usesSmartyShow) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['show']=(\$_smarty_tpl->tpl_vars[$item]->total > 0);\n";
+ }
+ }
+ if ($usesPropTotal) {
+ $output .= "if (\$_smarty_tpl->tpl_vars[$item]->total > 0){\n";
+ } else {
+ $output .= "if (\$_smarty_tpl->_count(\$_from) > 0){\n";
+ }
+ $output .= " foreach (\$_from as \$_smarty_tpl->tpl_vars[$item]->key => \$_smarty_tpl->tpl_vars[$item]->value){\n";
+ if ($key != null) {
+ $output .= " \$_smarty_tpl->tpl_vars[$key]->value = \$_smarty_tpl->tpl_vars[$item]->key;\n";
+ }
+ if ($usesPropIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->iteration++;\n";
+ }
+ if ($usesPropIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->index++;\n";
+ }
+ if ($usesPropFirst) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->first = \$_smarty_tpl->tpl_vars[$item]->index === 0;\n";
+ }
+ if ($usesPropLast) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->last = \$_smarty_tpl->tpl_vars[$item]->iteration === \$_smarty_tpl->tpl_vars[$item]->total;\n";
+ }
+ if ($has_name) {
+ if ($usesSmartyFirst) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['first'] = \$_smarty_tpl->tpl_vars[$item]->first;\n";
+ }
+ if ($usesSmartyIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']++;\n";
+ }
+ if ($usesSmartyIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']++;\n";
+ }
+ if ($usesSmartyLast) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['last'] = \$_smarty_tpl->tpl_vars[$item]->last;\n";
+ }
+ }
+ $output .= "?>";
+
+ return $output;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Foreachelse Class
+ */
+class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {foreachelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ list($_open_tag, $nocache, $item, $key) = $this->_close_tag(array('foreach'));
+ $this->_open_tag('foreachelse', array('foreachelse', $nocache, $item, $key));
+
+ return "<?php }} else { ?>";
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Foreachclose Class
+ */
+class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/foreach} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+
+ list($_open_tag, $this->compiler->nocache, $item, $key) = $this->_close_tag(array('foreach', 'foreachelse'));
+ unset($compiler->local_var[$item]);
+ if ($key != null) {
+ unset($compiler->local_var[$key]);
+ }
+
+ if ($_open_tag == 'foreachelse')
+ return "<?php } ?>";
+ else
+ return "<?php }} ?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_function.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_function.php
new file mode 100644
index 00000000000..586e35e1446
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_function.php
@@ -0,0 +1,134 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Function
+ *
+ * Compiles the {function} {/function} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function Class
+ */
+class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('name');
+ public $shorttag_order = array('name');
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {function} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return boolean true
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+ unset($_attr['nocache']);
+ $save = array($_attr, $compiler->parser->current_buffer,
+ $compiler->template->has_nocache_code, $compiler->template->required_plugins);
+ $this->_open_tag('function', $save);
+ $_name = trim($_attr['name'], "'\"");
+ unset($_attr['name']);
+ $compiler->template->properties['function'][$_name]['parameter'] = array();
+ $_smarty_tpl = $compiler->template;
+ foreach ($_attr as $_key => $_data) {
+ eval ('$tmp='.$_data.';');
+ $compiler->template->properties['function'][$_name]['parameter'][$_key] = $tmp;
+ }
+ $compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter'];
+ if ($compiler->template->caching) {
+ $output = '';
+ } else {
+ $output = "<?php if (!function_exists('smarty_template_function_{$_name}')) {
+ function smarty_template_function_{$_name}(\$_smarty_tpl,\$params) {
+ \$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
+ foreach (\$_smarty_tpl->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);};
+ foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
+ }
+ // Init temporay context
+ $compiler->template->required_plugins = array('compiled' => array(), 'nocache' => array());
+ $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);
+ $compiler->parser->current_buffer->append_subtree(new _smarty_tag($compiler->parser, $output));
+ $compiler->template->has_nocache_code = false;
+ $compiler->has_code = false;
+ $compiler->template->properties['function'][$_name]['compiled'] = '';
+ return true;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Functionclose Class
+ */
+class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/function} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return boolean true
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ $_attr = $this->_get_attributes($args);
+ $saved_data = $this->_close_tag(array('function'));
+ $_name = trim($saved_data[0]['name'], "'\"");
+ // build plugin include code
+ $plugins_string = '';
+ if (!empty($compiler->template->required_plugins['compiled'])) {
+ $plugins_string = '<?php ';
+ foreach($compiler->template->required_plugins['compiled'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable('{$data['function']}')) include '{$data['file']}';\n";
+ }
+ }
+ $plugins_string .= '?>';
+ }
+ if (!empty($compiler->template->required_plugins['nocache'])) {
+ $plugins_string .= "<?php echo '/*%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/<?php ";
+ foreach($compiler->template->required_plugins['nocache'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable(\'{$data['function']}\')) include \'{$data['file']}\';\n";
+ }
+ }
+ $plugins_string .= "?>/*/%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/';?>\n";
+ }
+ // remove last line break from function definition
+ $last = count($compiler->parser->current_buffer->subtrees) - 1;
+ if ($compiler->parser->current_buffer->subtrees[$last] instanceof _smarty_linebreak) {
+ unset($compiler->parser->current_buffer->subtrees[$last]);
+ }
+ // if caching save template function for possible nocache call
+ if ($compiler->template->caching) {
+ $compiler->template->properties['function'][$_name]['compiled'] .= $plugins_string
+ . $compiler->parser->current_buffer->to_smarty_php();
+ $compiler->template->properties['function'][$_name]['nocache_hash'] = $compiler->template->properties['nocache_hash'];
+ $compiler->template->properties['function'][$_name]['has_nocache_code'] = $compiler->template->has_nocache_code;
+ $compiler->smarty->template_functions[$_name] = $compiler->template->properties['function'][$_name];
+ $compiler->has_code = false;
+ $output = true;
+ } else {
+ $output = $plugins_string . $compiler->parser->current_buffer->to_smarty_php() . "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}}?>\n";
+ }
+ // restore old compiler status
+ $compiler->parser->current_buffer = $saved_data[1];
+ $compiler->template->has_nocache_code = $compiler->template->has_nocache_code | $saved_data[2];
+ $compiler->template->required_plugins = $saved_data[3];
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_if.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_if.php
new file mode 100644
index 00000000000..949de86af58
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_if.php
@@ -0,0 +1,179 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile If
+ *
+ * Compiles the {if} {else} {elseif} {/if} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile If Class
+ */
+class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {if} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ $this->_open_tag('if',array(1,$this->compiler->nocache));
+ // must whole block be nocache ?
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ if (is_array($parameter['if condition'])) {
+ if ($this->compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
+ } else {
+ $_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php if ({$parameter['if condition']}){?>";
+ }
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Else Class
+ */
+class Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {else} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ list($nesting, $compiler->tag_nocache) = $this->_close_tag(array('if', 'elseif'));
+ $this->_open_tag('else',array($nesting,$compiler->tag_nocache));
+
+ return "<?php }else{ ?>";
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile ElseIf Class
+ */
+class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {elseif} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ list($nesting, $compiler->tag_nocache) = $this->_close_tag(array('if', 'elseif'));
+
+ if (is_array($parameter['if condition'])) {
+ $condition_by_assign = true;
+ if ($this->compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ } else {
+ $condition_by_assign = false;
+ }
+
+ if (empty($this->compiler->prefix_code)) {
+ if ($condition_by_assign) {
+ $this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache));
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php }else{ if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
+ } else {
+ $_output = "<?php }else{ \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
+ }
+ return $_output;
+ } else {
+ $this->_open_tag('elseif', array($nesting, $compiler->tag_nocache));
+ return "<?php }elseif({$parameter['if condition']}){?>";
+ }
+ } else {
+ $tmp = '';
+ foreach ($this->compiler->prefix_code as $code) $tmp .= $code;
+ $this->compiler->prefix_code = array();
+ $this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache));
+ if ($condition_by_assign) {
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php }else{?>{$tmp}<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
+ } else {
+ $_output = "<?php }else{?>{$tmp}<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php }else{?>{$tmp}<?php if ({$parameter['if condition']}){?>";
+ }
+ }
+ }
+}
+
+/**
+* Smarty Internal Plugin Compile Ifclose Class
+*/
+class Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/if} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+ list($nesting, $this->compiler->nocache) = $this->_close_tag(array('if', 'else', 'elseif'));
+ $tmp = '';
+ for ($i = 0; $i < $nesting ; $i++) $tmp .= '}';
+ return "<?php {$tmp}?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_include.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_include.php
new file mode 100644
index 00000000000..a69ff07d3f4
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_include.php
@@ -0,0 +1,176 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Include
+ *
+ * Compiles the {include} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Include Class
+ */
+class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
+ // caching mode to create nocache code but no cache file
+ const CACHING_NOCACHE_CODE = 9999;
+ // attribute definitions
+ public $required_attributes = array('file');
+ public $shorttag_order = array('file');
+ public $option_flags = array('nocache','inline','caching');
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {include} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // save posible attributes
+ $include_file = $_attr['file'];
+ $has_compiled_template = false;
+ if ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) {
+ // check if compiled code can be merged (contains no variable part)
+ if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) {
+ $tmp = null;
+ eval("\$tmp = $include_file;");
+ if ($this->compiler->template->template_resource != $tmp) {
+ $tpl = new $compiler->smarty->template_class ($tmp, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id);
+ // suppress writing of compiled file
+ $tpl->write_compiled_code = false;
+ if ($this->compiler->template->caching) {
+ // needs code for cached page but no cache file
+ $tpl->caching = self::CACHING_NOCACHE_CODE;
+ }
+// if ($this->compiler->template->mustCompile) {
+ // make sure whole chain gest compiled
+ $tpl->mustCompile = true;
+// }
+ if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) {
+ // get compiled code
+ $compiled_tpl = $tpl->getCompiledTemplate();
+ // merge compiled code for {function} tags
+ $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
+ // merge filedependency by evaluating header code
+ preg_match_all("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", $compiled_tpl, $result);
+ $saved_has_nocache_code = $compiler->template->has_nocache_code;
+ $saved_nocache_hash = $compiler->template->properties['nocache_hash'];
+ $_smarty_tpl = $compiler->template;
+ eval($result[2][0]);
+ $compiler->template->properties['nocache_hash'] = $saved_nocache_hash;
+ $compiler->template->has_nocache_code = $saved_has_nocache_code;
+ // remove header code
+ $compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl);
+ if ($tpl->has_nocache_code) {
+ // replace nocache_hash
+ $compiled_tpl = preg_replace("/{$tpl->properties['nocache_hash']}/", $compiler->template->properties['nocache_hash'], $compiled_tpl);
+ $compiler->template->has_nocache_code = true;
+ }
+ $has_compiled_template = true;
+ }
+ }
+ }
+ }
+
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+
+ $_parent_scope = Smarty::SCOPE_LOCAL;
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if ($_attr['scope'] == 'parent') {
+ $_parent_scope = Smarty::SCOPE_PARENT;
+ } elseif ($_attr['scope'] == 'root') {
+ $_parent_scope = Smarty::SCOPE_ROOT;
+ } elseif ($_attr['scope'] == 'global') {
+ $_parent_scope = Smarty::SCOPE_GLOBAL;
+ }
+ }
+ $_caching = 'null';
+ if ($this->compiler->nocache || $this->compiler->tag_nocache) {
+ $_caching = Smarty::CACHING_OFF;
+ }
+ // default for included templates
+ if ($this->compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) {
+ $_caching = self::CACHING_NOCACHE_CODE;
+ }
+ /*
+ * if the {include} tag provides individual parameter for caching
+ * it will not be included into the common cache file and treated like
+ * a nocache section
+ */
+ if (isset($_attr['cache_lifetime'])) {
+ $_cache_lifetime = $_attr['cache_lifetime'];
+ $this->compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ } else {
+ $_cache_lifetime = 'null';
+ }
+ if (isset($_attr['cache_id'])) {
+ $_cache_id = $_attr['cache_id'];
+ $this->compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ } else {
+ $_cache_id = '$_smarty_tpl->cache_id';
+ }
+ if (isset($_attr['compile_id'])) {
+ $_compile_id = $_attr['compile_id'];
+ } else {
+ $_compile_id = '$_smarty_tpl->compile_id';
+ }
+ if ($_attr['caching'] === true) {
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ }
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_OFF;
+ }
+ // create template object
+ $_output = "<?php \$_template = new {$compiler->smarty->template_class}($include_file, \$_smarty_tpl->smarty, \$_smarty_tpl, $_cache_id, $_compile_id, $_caching, $_cache_lifetime);\n";
+ // delete {include} standard attributes
+ unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']);
+ // remaining attributes must be assigned as smarty variable
+ if (!empty($_attr)) {
+ if ($_parent_scope == Smarty::SCOPE_LOCAL) {
+ // create variables
+ foreach ($_attr as $_key => $_value) {
+ $_output .= "\$_template->assign('$_key',$_value);";
+ }
+ } else {
+ $this->compiler->trigger_template_error('variable passing not allowed in parent/global scope', $this->compiler->lex->taglineno);
+ }
+ }
+ // was there an assign attribute
+ if (isset($_assign)) {
+ $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate());?>";
+ } else {
+ if ($has_compiled_template && !($compiler->template->caching && ($this->compiler->tag_nocache || $this->compiler->nocache))) {
+ $_output .= "\$_template->properties['nocache_hash'] = '{$compiler->template->properties['nocache_hash']}';\n";
+ $_output .= "\$_tpl_stack[] = \$_smarty_tpl; \$_smarty_tpl = \$_template;?>\n";
+ $_output .= $compiled_tpl;
+ $_output .= "<?php \$_smarty_tpl->updateParentVariables($_parent_scope);?>\n";
+ $_output .= "<?php /* End of included template \"" . $tpl->getTemplateFilepath() . "\" */ ?>\n";
+ $_output .= "<?php \$_smarty_tpl = array_pop(\$_tpl_stack);?>";
+ } else {
+ $_output .= " echo \$_template->getRenderedTemplate();?>";
+ if ($_parent_scope != Smarty::SCOPE_LOCAL) {
+ $_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>";
+ }
+ }
+ }
+ $_output .= "<?php unset(\$_template);?>";
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_include_php.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_include_php.php
new file mode 100644
index 00000000000..878ceb5d975
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_include_php.php
@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Include PHP
+ *
+ * Compiles the {include_php} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ */
+class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('file');
+ public $shorttag_order = array('file');
+ public $optional_attributes = array('once', 'assign');
+
+ /**
+ * Compiles code for the {include_php} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ if (!$compiler->smarty->allow_php_tag) {
+ throw new SmartyException("{include_php} is deprecated, set allow_php_tag = true to enable");
+ }
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ $_output = '<?php ';
+
+ $_smarty_tpl = $compiler->template;
+ $_filepath = false;
+ eval('$_file = ' . $_attr['file'] . ';');
+ if (!isset($this->compiler->smarty->security_policy) && file_exists($_file)) {
+ $_filepath = $_file;
+ } else {
+ if (isset($this->compiler->smarty->security_policy)) {
+ $_dir = $this->compiler->smarty->security_policy->trusted_dir;
+ } else {
+ $_dir = $this->compiler->smarty->trusted_dir;
+ }
+ if (!empty($_dir)) {
+ foreach((array)$_dir as $_script_dir) {
+ if (strpos('/\\', substr($_script_dir, -1)) === false) {
+ $_script_dir .= DS;
+ }
+ if (file_exists($_script_dir . $_file)) {
+ $_filepath = $_script_dir . $_file;
+ break;
+ }
+ }
+ }
+ }
+ if ($_filepath == false) {
+ $this->compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", $this->compiler->lex->taglineno);
+ }
+
+ if (isset($this->compiler->smarty->security_policy)) {
+ $this->compiler->smarty->security_policy->isTrustedPHPDir($_filepath);
+ }
+
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of being displayed
+ $_assign = $_attr['assign'];
+ }
+ $_once = '_once';
+ if (isset($_attr['once'])) {
+ if ($_attr['once'] == 'false') {
+ $_once = '';
+ }
+ }
+
+ if (isset($_assign)) {
+ return "<?php ob_start(); include{$_once} ('{$_filepath}'); \$_smarty_tpl->assign({$_assign},ob_get_contents()); ob_end_clean();?>";
+ } else {
+ return "<?php include{$_once} ('{$_filepath}');?>\n";
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_insert.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_insert.php
new file mode 100644
index 00000000000..83afdba36d7
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_insert.php
@@ -0,0 +1,123 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Insert
+ *
+ * Compiles the {insert} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ */
+class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('name');
+ public $shorttag_order = array('name');
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {insert} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // never compile as nocache code
+ $this->compiler->suppressNocacheProcessing = true;
+ $this->compiler->tag_nocache = true;
+ $_smarty_tpl = $compiler->template;
+ $_name = null;
+ $_script = null;
+
+ $_output = '<?php ';
+ // save posible attributes
+ eval('$_name = ' . $_attr['name'] . ';');
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of being displayed
+ $_assign = $_attr['assign'];
+ // create variable to make shure that the compiler knows about its nocache status
+ $this->compiler->template->tpl_vars[trim($_attr['assign'], "'")] = new Smarty_Variable(null, true);
+ }
+ if (isset($_attr['script'])) {
+ // script which must be included
+ $_function = "smarty_insert_{$_name}";
+ $_smarty_tpl = $compiler->template;
+ $_filepath = false;
+ eval('$_script = ' . $_attr['script'] . ';');
+ if (!isset($this->compiler->smarty->security_policy) && file_exists($_script)) {
+ $_filepath = $_script;
+ } else {
+ if (isset($this->compiler->smarty->security_policy)) {
+ $_dir = $this->compiler->smarty->security_policy->trusted_dir;
+ } else {
+ $_dir = $this->compiler->smarty->trusted_dir;
+ }
+ if (!empty($_dir)) {
+ foreach((array)$_dir as $_script_dir) {
+ if (strpos('/\\', substr($_script_dir, -1)) === false) {
+ $_script_dir .= DS;
+ }
+ if (file_exists($_script_dir . $_script)) {
+ $_filepath = $_script_dir . $_script;
+ break;
+ }
+ }
+ }
+ }
+ if ($_filepath == false) {
+ $this->compiler->trigger_template_error("{insert} missing script file '{$_script}'", $this->compiler->lex->taglineno);
+ }
+ // code for script file loading
+ $_output .= "require_once '{$_filepath}' ;";
+ require_once $_filepath;
+ if (!is_callable($_function)) {
+ $this->compiler->trigger_template_error(" {insert} function '{$_function}' is not callable in script file '{$_script}'", $this->compiler->lex->taglineno);
+ }
+ } else {
+ $_filepath = 'null';
+ $_function = "insert_{$_name}";
+ // function in PHP script ?
+ if (!is_callable($_function)) {
+ // try plugin
+ if (!$_function = $this->compiler->getPlugin($_name, 'insert')) {
+ $this->compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'", $this->compiler->lex->taglineno);
+ }
+ }
+ }
+ // delete {insert} standard attributes
+ unset($_attr['name'], $_attr['assign'], $_attr['script'], $_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ $_paramsArray[] = "'$_key' => $_value";
+ }
+ $_params = 'array(' . implode(", ", $_paramsArray) . ')';
+ // call insert
+ if (isset($_assign)) {
+ if ($_smarty_tpl->caching) {
+ $_output .= "echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}',{$_assign});?>";
+ } else {
+ $_output .= "\$_smarty_tpl->assign({$_assign} , {$_function} ({$_params},\$_smarty_tpl), true);?>";
+ }
+ } else {
+ $this->compiler->has_output = true;
+ if ($_smarty_tpl->caching) {
+ $_output .= "echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}');?>";
+ } else {
+ $_output .= "echo {$_function}({$_params},\$_smarty_tpl);?>";
+ }
+ }
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_ldelim.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_ldelim.php
new file mode 100644
index 00000000000..1c069d34672
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_ldelim.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Ldelim
+ *
+ * Compiles the {ldelim} tag
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Ldelim Class
+ */
+class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {ldelim} tag
+ *
+ * This tag does output the left delimiter
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $this->compiler->has_code = true;
+ return $this->compiler->smarty->left_delimiter;
+ }
+}
+
+?>
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_nocache.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_nocache.php
new file mode 100644
index 00000000000..c200562743c
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_nocache.php
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Nocache
+ *
+ * Compiles the {nocache} {/nocache} tags
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Nocache Class
+ */
+class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {nocache} tag
+ *
+ * This tag does not generate compiled output. It only sets a compiler flag
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+ // enter nocache mode
+ $this->compiler->nocache = true;
+ // this tag does not return compiled code
+ $this->compiler->has_code = false;
+ return true;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Nocacheclose Class
+ */
+class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/nocache} tag
+ *
+ * This tag does not generate compiled output. It only sets a compiler flag
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $_attr = $this->_get_attributes($args);
+ // leave nocache mode
+ $this->compiler->nocache = false;
+ // this tag does not return compiled code
+ $this->compiler->has_code = false;
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_block_plugin.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_block_plugin.php
new file mode 100644
index 00000000000..636b73a807c
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_block_plugin.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Block Plugin
+ *
+ * Compiles code for the execution of block plugin
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Block Plugin Class
+ */
+class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of block plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block plugin
+ * @param string $function PHP function name
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $function)
+ {
+ $this->compiler = $compiler;
+ if (strlen($tag) < 6 || substr($tag, -5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->_open_tag($tag, array($_params, $this->compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ // compile code
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+ // closing tag of block plugin, restore nocache
+ list($_params, $this->compiler->nocache) = $this->_close_tag(substr($tag, 0, -5));
+ // This tag does create output
+ $this->compiler->has_output = true;
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post ='';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
+ }
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ return $output . "\n";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php
new file mode 100644
index 00000000000..ad5a603f268
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Function Plugin
+ *
+ * Compiles code for the execution of function plugin
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function Plugin Class
+ */
+class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array();
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of function plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function plugin
+ * @param string $function PHP function name
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $function)
+ {
+ $this->compiler = $compiler;
+ // This tag does create output
+ $this->compiler->has_output = true;
+
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ // compile code
+ $output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_modifier.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_modifier.php
new file mode 100644
index 00000000000..50c5ceafd03
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_modifier.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Modifier
+ *
+ * Compiles code for modifier execution
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Modifier Class
+ */
+class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for modifier execution
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ $this->smarty = $this->compiler->smarty;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ $output = $parameter['value'];
+ // loop over list of modifiers
+ foreach ($parameter['modifierlist'] as $single_modifier) {
+ $modifier = $single_modifier[0];
+ $single_modifier[0] = $output;
+ $params = implode(',', $single_modifier);
+ // check for registered modifier
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) {
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
+ if (!is_array($function)) {
+ $output = "{$function}({$params})";
+ } else {
+ if (is_object($function[0])) {
+ $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
+ } else {
+ $output = $function[0] . '::' . $function[1] . '(' . $params . ')';
+ }
+ }
+ // check for plugin modifiercompiler
+ } else if ($compiler->smarty->loadPlugin('smarty_modifiercompiler_' . $modifier)) {
+ $plugin = 'smarty_modifiercompiler_' . $modifier;
+ $output = $plugin($single_modifier, $compiler);
+ // check for plugin modifier
+ } else if ($function = $this->compiler->getPlugin($modifier, Smarty::PLUGIN_MODIFIER)) {
+ $output = "{$function}({$params})";
+ // check if trusted PHP function
+ } else if (is_callable($modifier)) {
+ // check if modifier allowed
+ if (!is_object($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedModifier($modifier, $this->compiler)) {
+ $output = "{$modifier}({$params})";
+ }
+ } else {
+ $this->compiler->trigger_template_error ("unknown modifier \"" . $modifier . "\"", $this->compiler->lex->taglineno);
+ }
+ }
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_block_function.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_block_function.php
new file mode 100644
index 00000000000..96d098f0933
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_block_function.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Object Block Function
+ *
+ * Compiles code for registered objects as block function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Object Block Function Class
+ */
+class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array();
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of block plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block object
+ * @param string $methode name of methode to call
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $methode)
+ {
+ $this->compiler = $compiler;
+ if (strlen($tag) < 5 || substr($tag, -5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->_open_tag($tag . '->' . $methode, array($_params, $this->compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ // compile code
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}->{$methode}', {$_params}); \$_block_repeat=true; \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ $base_tag = substr($tag, 0, -5);
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+ // closing tag of block plugin, restore nocache
+ list($_params, $this->compiler->nocache) = $this->_close_tag($base_tag . '->' . $methode);
+ // This tag does create output
+ $this->compiler->has_output = true;
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post ='';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
+ }
+ $output = "<?php \$_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;".$mod_pre." echo \$_smarty_tpl->smarty->registered_objects['{$base_tag}'][0]->{$methode}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ return $output."\n";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_function.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_function.php
new file mode 100644
index 00000000000..4ae2848558f
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_object_function.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Object Funtion
+ *
+ * Compiles code for registered objects as function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Object Function Class
+ */
+class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array();
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of function plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
+ * @param string $methode name of methode to call
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $methode)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ $_assign = null;
+ if (isset($_attr['assign'])) {
+ $_assign = $_attr['assign'];
+ unset($_attr['assign']);
+ }
+ // convert attributes into parameter array string
+ if ($this->compiler->smarty->registered_objects[$tag][2]) {
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params},\$_smarty_tpl)";
+ } else {
+ $_params = implode(",", $_attr);
+ $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params})";
+ }
+ if (empty($_assign)) {
+ // This tag does create output
+ $this->compiler->has_output = true;
+ $output = "<?php echo {$return};?>\n";
+ } else {
+ $output = "<?php \$_smarty_tpl->assign({$_assign},{$return});?>\n";
+ }
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php
new file mode 100644
index 00000000000..e858202c91f
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Print Expression
+ *
+ * Compiles any tag which will output an expression or variable
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Print Expression Class
+ */
+class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('assign');
+ public $option_flags = array('nocache', 'nofilter');
+
+ /**
+ * Compiles code for gererting output from any expression
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ // nocache option
+ if ($_attr['nocache'] === true) {
+ $this->compiler->tag_nocache = true;
+ }
+ // filter handling
+ if ($_attr['nofilter'] === true) {
+ $_filter = 'false';
+ } else {
+ $_filter = 'true';
+ }
+ // compiled output
+ // compiled output
+ if (isset($_attr['assign'])) {
+ // assign output to variable
+ $output = "<?php \$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>";
+ } else {
+ // display value
+ if (!$_attr['nofilter'] && isset($this->compiler->smarty->registered_filters['variable'])) {
+ $output = "Smarty_Internal_Filter_Handler::runFilter('variable', {$parameter['value']}, \$_smarty_tpl, {$_filter})";
+ } else {
+ $output = $parameter['value'];
+ }
+ if (!$_attr['nofilter'] && !empty($this->compiler->smarty->default_modifiers)) {
+ $modifierlist = array();
+ foreach ($this->compiler->smarty->default_modifiers as $key => $single_default_modifier) {
+ preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array);
+ for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) {
+ if ($mod_array[0][$i] != ':') {
+ $modifierlist[$key][] = $mod_array[0][$i];
+ }
+ }
+ }
+ $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $modifierlist, 'value' => $output));
+ }
+ if (!empty($parameter['modifierlist'])) {
+ $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'], 'value' => $output));
+ }
+ $this->compiler->has_output = true;
+ $output = "<?php echo {$output};?>";
+ }
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_block.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_block.php
new file mode 100644
index 00000000000..1aab9aa1541
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_block.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Registered Block
+ *
+ * Compiles code for the execution of a registered block function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Registered Block Class
+ */
+class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of a block function
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block function
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag)
+ {
+ $this->compiler = $compiler;
+ if (strlen($tag) < 6 || substr($tag,-5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache']) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } elseif ($this->compiler->template->caching && in_array($_key,$compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][2])) {
+ $_value = str_replace("'","^#^",$_value);
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->_open_tag($tag, array($_params, $this->compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $this->compiler->nocache = !$compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][1] | $this->compiler->nocache | $this->compiler->tag_nocache;
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][0];
+ // compile code
+ if (!is_array($function)) {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else if (is_object($function[0])) {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; \$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]->{$function[1]}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function[0]}::{$function[1]}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ }
+ } else {
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+ $base_tag = substr($tag, 0, -5);
+ // closing tag of block plugin, restore nocache
+ list($_params, $this->compiler->nocache) = $this->_close_tag($base_tag);
+ // This tag does create output
+ $this->compiler->has_output = true;
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0];
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post ='';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
+ }
+ if (!is_array($function)) {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat);".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ } else if (is_object($function[0])) {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo \$_smarty_tpl->smarty->registered_plugins['block']['{$base_tag}'][0][0]->{$function[1]}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post."} array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ } else {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function[0]}::{$function[1]}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post."} array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ }
+ return $output."\n";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_function.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_function.php
new file mode 100644
index 00000000000..e12a0770ad3
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_registered_function.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Registered Function
+ *
+ * Compiles code for the execution of a registered function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Registered Function Class
+ */
+class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of a registered function
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag)
+ {
+ $this->compiler = $compiler;
+ // This tag does create output
+ $this->compiler->has_output = true;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache']) {
+ $this->compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // not cachable?
+ $this->compiler->tag_nocache = $this->compiler->tag_nocache || !$compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][1];
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } elseif ($this->compiler->template->caching && in_array($_key,$compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][2])) {
+ $_value = str_replace("'","^#^",$_value);
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][0];
+ // compile code
+ if (!is_array($function)) {
+ $output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
+ } else if (is_object($function[0])) {
+ $output = "<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
+ } else {
+ $output = "<?php echo {$function[0]}::{$function[1]}({$_params},\$_smarty_tpl);?>\n";
+ }
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_private_special_variable.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_special_variable.php
new file mode 100644
index 00000000000..f03246abf37
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Special Smarty Variable
+ *
+ * Compiles the special $smarty variables
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile special Smarty Variable Class
+ */
+class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the speical $smarty variables
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $_index = preg_split("/\]\[/",substr($parameter, 1, strlen($parameter)-2));
+ $compiled_ref = ' ';
+ $variable = trim($_index[0], "'");
+ switch ($variable) {
+ case 'foreach':
+ return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
+ case 'section':
+ return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
+ case 'capture':
+ return "Smarty::\$_smarty_vars$parameter";
+ case 'now':
+ return 'time()';
+ case 'cookies':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
+ $compiler->trigger_template_error("(secure mode) super globals not permitted");
+ break;
+ }
+ $compiled_ref = '$_COOKIE';
+ break;
+
+ case 'get':
+ case 'post':
+ case 'env':
+ case 'server':
+ case 'session':
+ case 'request':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
+ $compiler->trigger_template_error("(secure mode) super globals not permitted");
+ break;
+ }
+ $compiled_ref = '$_'.strtoupper($variable);
+ break;
+
+ case 'template':
+ return 'basename($_smarty_tpl->getTemplateFilepath())';
+
+ case 'current_dir':
+ return 'dirname($_smarty_tpl->getTemplateFilepath())';
+
+ case 'version':
+ $_version = Smarty::SMARTY_VERSION;
+ return "'$_version'";
+
+ case 'const':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_constants) {
+ $compiler->trigger_template_error("(secure mode) constants not permitted");
+ break;
+ }
+ return '@' . trim($_index[1], "'");
+
+ case 'config':
+ return "\$_smarty_tpl->getConfigVariable($_index[1])";
+ case 'ldelim':
+ $_ldelim = $compiler->smarty->left_delimiter;
+ return "'$_ldelim'";
+
+ case 'rdelim':
+ $_rdelim = $compiler->smarty->right_delimiter;
+ return "'$_rdelim'";
+
+ default:
+ $compiler->trigger_template_error('$smarty.' . trim($_index[0], "'") . ' is invalid');
+ break;
+ }
+ if (isset($_index[1])) {
+ array_shift($_index);
+ foreach ($_index as $_ind) {
+ $compiled_ref = $compiled_ref . "[$_ind]";
+ }
+ }
+ return $compiled_ref;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_rdelim.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_rdelim.php
new file mode 100644
index 00000000000..07c2a986f00
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_rdelim.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Rdelim
+ *
+ * Compiles the {rdelim} tag
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Rdelim Class
+ */
+class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {rdelim} tag
+ *
+ * This tag does output the right delimiter
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ $_attr = $this->_get_attributes($args);
+ if ($_attr['nocache'] === true) {
+ $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $this->compiler->has_code = true;
+ return $this->compiler->smarty->right_delimiter;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_section.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_section.php
new file mode 100644
index 00000000000..3b92b641f83
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_section.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Section
+ *
+ * Compiles the {section} {sectionelse} {/section} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Section Class
+ */
+class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase {
+ // attribute definitions
+ public $required_attributes = array('name', 'loop');
+ public $shorttag_order = array('name', 'loop');
+ public $optional_attributes = array('start', 'step', 'max', 'show');
+
+ /**
+ * Compiles code for the {section} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ $this->_open_tag('section', array('section',$this->compiler->nocache));
+ // maybe nocache because of nocache variables
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+
+ $output = "<?php ";
+
+ $section_name = $_attr['name'];
+
+ $output .= "unset(\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]);\n";
+ $section_props = "\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]";
+
+ foreach ($_attr as $attr_name => $attr_value) {
+ switch ($attr_name) {
+ case 'loop':
+ $output .= "{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n";
+ break;
+
+ case 'show':
+ if (is_bool($attr_value))
+ $show_attr_value = $attr_value ? 'true' : 'false';
+ else
+ $show_attr_value = "(bool)$attr_value";
+ $output .= "{$section_props}['show'] = $show_attr_value;\n";
+ break;
+
+ case 'name':
+ $output .= "{$section_props}['$attr_name'] = $attr_value;\n";
+ break;
+
+ case 'max':
+ case 'start':
+ $output .= "{$section_props}['$attr_name'] = (int)$attr_value;\n";
+ break;
+
+ case 'step':
+ $output .= "{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n";
+ break;
+ }
+ }
+
+ if (!isset($_attr['show']))
+ $output .= "{$section_props}['show'] = true;\n";
+
+ if (!isset($_attr['loop']))
+ $output .= "{$section_props}['loop'] = 1;\n";
+
+ if (!isset($_attr['max']))
+ $output .= "{$section_props}['max'] = {$section_props}['loop'];\n";
+ else
+ $output .= "if ({$section_props}['max'] < 0)\n" . " {$section_props}['max'] = {$section_props}['loop'];\n";
+
+ if (!isset($_attr['step']))
+ $output .= "{$section_props}['step'] = 1;\n";
+
+ if (!isset($_attr['start']))
+ $output .= "{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\n";
+ else {
+ $output .= "if ({$section_props}['start'] < 0)\n" . " {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n" . "else\n" . " {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n";
+ }
+
+ $output .= "if ({$section_props}['show']) {\n";
+ if (!isset($_attr['start']) && !isset($_attr['step']) && !isset($_attr['max'])) {
+ $output .= " {$section_props}['total'] = {$section_props}['loop'];\n";
+ } else {
+ $output .= " {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";
+ }
+ $output .= " if ({$section_props}['total'] == 0)\n" . " {$section_props}['show'] = false;\n" . "} else\n" . " {$section_props}['total'] = 0;\n";
+
+ $output .= "if ({$section_props}['show']):\n";
+ $output .= "
+ for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;
+ {$section_props}['iteration'] <= {$section_props}['total'];
+ {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n";
+ $output .= "{$section_props}['rownum'] = {$section_props}['iteration'];\n";
+ $output .= "{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n";
+ $output .= "{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n";
+ $output .= "{$section_props}['first'] = ({$section_props}['iteration'] == 1);\n";
+ $output .= "{$section_props}['last'] = ({$section_props}['iteration'] == {$section_props}['total']);\n";
+
+ $output .= "?>";
+ return $output;
+ }
+}
+
+/**
+* Smarty Internal Plugin Compile Sectionelse Class
+*/
+class Smarty_Internal_Compile_Sectionelse extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {sectionelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ list($_open_tag, $nocache) = $this->_close_tag(array('section'));
+ $this->_open_tag('sectionelse',array('sectionelse', $nocache));
+
+ return "<?php endfor; else: ?>";
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Sectionclose Class
+ */
+class Smarty_Internal_Compile_Sectionclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/section} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+
+ list($_open_tag, $this->compiler->nocache) = $this->_close_tag(array('section', 'sectionelse'));
+
+ if ($_open_tag == 'sectionelse')
+ return "<?php endif; ?>";
+ else
+ return "<?php endfor; endif; ?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compile_while.php b/3dparty/Smarty/sysplugins/smarty_internal_compile_while.php
new file mode 100644
index 00000000000..e0ba4fc0c63
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compile_while.php
@@ -0,0 +1,82 @@
+<?php
+/**
+* Smarty Internal Plugin Compile While
+*
+* Compiles the {while} tag
+*
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Compile While Class
+*/
+class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {while} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $this->compiler = $compiler;
+ // check and get attributes
+ $_attr = $this->_get_attributes($args);
+ $this->_open_tag('while', $this->compiler->nocache);
+
+ // maybe nocache because of nocache variables
+ $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache;
+ if (is_array($parameter['if condition'])) {
+ if ($this->compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
+ } else {
+ $_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php while ({$parameter['if condition']}){?>";
+ }
+ }
+}
+
+/**
+* Smarty Internal Plugin Compile Whileclose Class
+*/
+class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase {
+ /**
+ * Compiles code for the {/while} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->compiler = $compiler;
+ // must endblock be nocache?
+ if ($this->compiler->nocache) {
+ $this->compiler->tag_nocache = true;
+ }
+ $this->compiler->nocache = $this->_close_tag(array('while'));
+ return "<?php }?>";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_compilebase.php b/3dparty/Smarty/sysplugins/smarty_internal_compilebase.php
new file mode 100644
index 00000000000..ef9456741b7
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_compilebase.php
@@ -0,0 +1,150 @@
+<?php
+
+/**
+ * Smarty Internal Plugin CompileBase
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does extend all internal compile plugins
+ */
+// abstract class Smarty_Internal_CompileBase implements TagCompilerInterface
+class Smarty_Internal_CompileBase {
+ public $required_attributes = array();
+ public $optional_attributes = array();
+ public $shorttag_order = array();
+ public $option_flags = array('nocache');
+
+
+ /**
+ * This function checks if the attributes passed are valid
+ *
+ * The attributes passed for the tag to compile are checked against the list of required and
+ * optional attributes. Required attributes must be present. Optional attributes are check against
+ * against the corresponding list. The keyword '_any' specifies that any attribute will be accepted
+ * as valid
+ *
+ * @param array $attributes attributes applied to the tag
+ * @return array of mapped attributes for further processing
+ */
+ function _get_attributes ($attributes)
+ {
+ $_indexed_attr = array();
+ // loop over attributes
+ foreach ($attributes as $key => $mixed) {
+ // shorthand ?
+ if (!is_array($mixed)) {
+ // option flag ?
+ if (in_array(trim($mixed, '\'"'), $this->option_flags)) {
+ $_indexed_attr[trim($mixed, '\'"')] = true;
+ // shorthand attribute ?
+ } else if (isset($this->shorttag_order[$key])) {
+ $_indexed_attr[$this->shorttag_order[$key]] = $mixed;
+ } else {
+ // too many shorthands
+ $this->compiler->trigger_template_error('too many shorthand attributes', $this->compiler->lex->taglineno);
+ }
+ // named attribute
+ } else {
+ $kv = each($mixed);
+ // option flag?
+ if (in_array($kv['key'], $this->option_flags)) {
+ if (is_bool($kv['value'])) {
+ $_indexed_attr[$kv['key']] = $kv['value'];
+ } else if (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
+ if (trim($kv['value']) == 'true') {
+ $_indexed_attr[$kv['key']] = true;
+ } else {
+ $_indexed_attr[$kv['key']] = false;
+ }
+ } else if (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
+ if ($kv['value'] == 1) {
+ $_indexed_attr[$kv['key']] = true;
+ } else {
+ $_indexed_attr[$kv['key']] = false;
+ }
+ } else {
+ $this->compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $this->compiler->lex->taglineno);
+ }
+ // must be named attribute
+ } else {
+ reset($mixed);
+ $_indexed_attr[key($mixed)] = $mixed[key($mixed)];
+ }
+ }
+ }
+ // check if all required attributes present
+ foreach ($this->required_attributes as $attr) {
+ if (!array_key_exists($attr, $_indexed_attr)) {
+ $this->compiler->trigger_template_error("missing \"" . $attr . "\" attribute", $this->compiler->lex->taglineno);
+ }
+ }
+ // check for unallowed attributes
+ if ($this->optional_attributes != array('_any')) {
+ $tmp_array = array_merge($this->required_attributes, $this->optional_attributes, $this->option_flags);
+ foreach ($_indexed_attr as $key => $dummy) {
+ if (!in_array($key, $tmp_array) && $key !== 0) {
+ $this->compiler->trigger_template_error("unexpected \"" . $key . "\" attribute", $this->compiler->lex->taglineno);
+ }
+ }
+ }
+ // default 'false' for all option flags not set
+ foreach ($this->option_flags as $flag) {
+ if (!isset($_indexed_attr[$flag])) {
+ $_indexed_attr[$flag] = false;
+ }
+ }
+
+ return $_indexed_attr;
+ }
+
+ /**
+ * Push opening tag name on stack
+ *
+ * Optionally additional data can be saved on stack
+ *
+ * @param string $open_tag the opening tag's name
+ * @param anytype $data optional data which shall be saved on stack
+ */
+ function _open_tag($open_tag, $data = null)
+ {
+ array_push($this->compiler->_tag_stack, array($open_tag, $data));
+ }
+
+ /**
+ * Pop closing tag
+ *
+ * Raise an error if this stack-top doesn't match with expected opening tags
+ *
+ * @param array $ |string $expected_tag the expected opening tag names
+ * @return anytype the opening tag's name or saved data
+ */
+ function _close_tag($expected_tag)
+ {
+ if (count($this->compiler->_tag_stack) > 0) {
+ // get stacked info
+ list($_open_tag, $_data) = array_pop($this->compiler->_tag_stack);
+ // open tag must match with the expected ones
+ if (in_array($_open_tag, (array)$expected_tag)) {
+ if (is_null($_data)) {
+ // return opening tag
+ return $_open_tag;
+ } else {
+ // return restored data
+ return $_data;
+ }
+ }
+ // wrong nesting of tags
+ $this->compiler->trigger_template_error("unclosed {" . $_open_tag . "} tag");
+ return;
+ }
+ // wrong nesting of tags
+ $this->compiler->trigger_template_error("unexpected closing tag", $this->compiler->lex->taglineno);
+ return;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_config.php b/3dparty/Smarty/sysplugins/smarty_internal_config.php
new file mode 100644
index 00000000000..e3bb12b8a38
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_config.php
@@ -0,0 +1,288 @@
+<?php
+/**
+ * Smarty Internal Plugin Config
+ *
+ * Main class for config variables
+ *
+ * @ignore
+ * @package Smarty
+ * @subpackage Config
+ * @author Uwe Tews
+ */
+class Smarty_Internal_Config {
+ static $config_objects = array();
+
+ public function __construct($config_resource, $smarty, $data = null)
+ {
+ $this->data = $data;
+ $this->smarty = $smarty;
+ $this->config_resource = $config_resource;
+ $this->config_resource_type = null;
+ $this->config_resource_name = null;
+ $this->config_filepath = null;
+ $this->config_timestamp = null;
+ $this->config_source = null;
+ $this->compiled_config = null;
+ $this->compiled_filepath = null;
+ $this->compiled_timestamp = null;
+ $this->mustCompile = null;
+ $this->compiler_object = null;
+ // parse config resource name
+ if (!$this->parseConfigResourceName ($config_resource)) {
+ throw new SmartyException ("Unable to parse config resource '{$config_resource}'");
+ }
+ }
+
+ public function getConfigFilepath ()
+ {
+ return $this->config_filepath === null ?
+ $this->config_filepath = $this->buildConfigFilepath() :
+ $this->config_filepath;
+ }
+
+ public function getTimestamp ()
+ {
+ return $this->config_timestamp === null ?
+ $this->config_timestamp = filemtime($this->getConfigFilepath()) :
+ $this->config_timestamp;
+ }
+
+ private function parseConfigResourceName($config_resource)
+ {
+ if (empty($config_resource))
+ return false;
+ if (strpos($config_resource, ':') === false) {
+ // no resource given, use default
+ $this->config_resource_type = $this->smarty->default_config_type;
+ $this->config_resource_name = $config_resource;
+ } else {
+ // get type and name from path
+ list($this->config_resource_type, $this->config_resource_name) = explode(':', $config_resource, 2);
+ if (strlen($this->config_resource_type) == 1) {
+ // 1 char is not resource type, but part of filepath
+ $this->config_resource_type = $this->smarty->default_config_type;
+ $this->config_resource_name = $config_resource;
+ } else {
+ $this->config_resource_type = strtolower($this->config_resource_type);
+ }
+ }
+ return true;
+ }
+
+ /*
+ * get system filepath to config
+ */
+ public function buildConfigFilepath ()
+ {
+ foreach((array)$this->smarty->config_dir as $_config_dir) {
+ if (strpos('/\\', substr($_config_dir, -1)) === false) {
+ $_config_dir .= DS;
+ }
+
+ $_filepath = $_config_dir . $this->config_resource_name;
+ if (file_exists($_filepath))
+ return $_filepath;
+ }
+ // check for absolute path
+ if (file_exists($this->config_resource_name))
+ return $this->config_resource_name;
+ // no tpl file found
+ throw new SmartyException("Unable to load config file \"{$this->config_resource_name}\"");
+ return false;
+ }
+ /**
+ * Read config file source
+ *
+ * @return string content of source file
+ */
+ /**
+ * Returns the template source code
+ *
+ * The template source is being read by the actual resource handler
+ *
+ * @return string the template source
+ */
+ public function getConfigSource ()
+ {
+ if ($this->config_source === null) {
+ if ($this->readConfigSource($this) === false) {
+ throw new SmartyException("Unable to load config file \"{$this->config_resource_name}\"");
+ }
+ }
+ return $this->config_source;
+ }
+ public function readConfigSource()
+ {
+ // read source file
+ if (file_exists($this->getConfigFilepath())) {
+ $this->config_source = file_get_contents($this->getConfigFilepath());
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the compiled filepath
+ *
+ * @return string the compiled filepath
+ */
+ public function getCompiledFilepath ()
+ {
+ return $this->compiled_filepath === null ?
+ ($this->compiled_filepath = $this->buildCompiledFilepath()) :
+ $this->compiled_filepath;
+ }
+ public function buildCompiledFilepath()
+ {
+ $_compile_id = isset($this->smarty->compile_id) ? preg_replace('![^\w\|]+!', '_', $this->smarty->compile_id) : null;
+ $_flag = (int)$this->smarty->config_read_hidden + (int)$this->smarty->config_booleanize * 2 +
+ (int)$this->smarty->config_overwrite * 4;
+ $_filepath = sha1($this->config_resource_name . $_flag);
+ // if use_sub_dirs, break file into directories
+ if ($this->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ $_compile_dir = $this->smarty->compile_dir;
+ if (substr($_compile_dir, -1) != DS) {
+ $_compile_dir .= DS;
+ }
+ return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php';
+ }
+ /**
+ * Returns the timpestamp of the compiled file
+ *
+ * @return integer the file timestamp
+ */
+ public function getCompiledTimestamp ()
+ {
+ return $this->compiled_timestamp === null ?
+ ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false) :
+ $this->compiled_timestamp;
+ }
+ /**
+ * Returns if the current config file must be compiled
+ *
+ * It does compare the timestamps of config source and the compiled config and checks the force compile configuration
+ *
+ * @return boolean true if the file must be compiled
+ */
+ public function mustCompile ()
+ {
+ return $this->mustCompile === null ?
+ $this->mustCompile = ($this->smarty->force_compile || $this->getCompiledTimestamp () === false || $this->smarty->compile_check && $this->getCompiledTimestamp () < $this->getTimestamp ()):
+ $this->mustCompile;
+ }
+ /**
+ * Returns the compiled config file
+ *
+ * It checks if the config file must be compiled or just read the compiled version
+ *
+ * @return string the compiled config file
+ */
+ public function getCompiledConfig ()
+ {
+ if ($this->compiled_config === null) {
+ // see if template needs compiling.
+ if ($this->mustCompile()) {
+ $this->compileConfigSource();
+ } else {
+ $this->compiled_config = file_get_contents($this->getCompiledFilepath());
+ }
+ }
+ return $this->compiled_config;
+ }
+
+ /**
+ * Compiles the config files
+ */
+ public function compileConfigSource ()
+ {
+ // compile template
+ if (!is_object($this->compiler_object)) {
+ // load compiler
+ $this->compiler_object = new Smarty_Internal_Config_File_Compiler($this->smarty);
+ }
+ // compile locking
+ if ($this->smarty->compile_locking) {
+ if ($saved_timestamp = $this->getCompiledTimestamp()) {
+ touch($this->getCompiledFilepath());
+ }
+ }
+ // call compiler
+ try {
+ $this->compiler_object->compileSource($this);
+ }
+ catch (Exception $e) {
+ // restore old timestamp in case of error
+ if ($this->smarty->compile_locking && $saved_timestamp) {
+ touch($this->getCompiledFilepath(), $saved_timestamp);
+ }
+ throw $e;
+ }
+ // compiling succeded
+ // write compiled template
+ Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->getCompiledConfig(), $this->smarty);
+ }
+
+ /*
+ * load config variables
+ *
+ * @param mixed $sections array of section names, single section or null
+ * @param object $scope global,parent or local
+ */
+ public function loadConfigVars ($sections = null, $scope = 'local')
+ {
+ if ($this->data instanceof Smarty_Internal_Template) {
+ $this->data->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp(),'file');
+ }
+ if ($this->mustCompile()) {
+ $this->compileConfigSource();
+ }
+ // pointer to scope
+ if ($scope == 'local') {
+ $scope_ptr = $this->data;
+ } elseif ($scope == 'parent') {
+ if (isset($this->data->parent)) {
+ $scope_ptr = $this->data->parent;
+ } else {
+ $scope_ptr = $this->data;
+ }
+ } elseif ($scope == 'root' || $scope == 'global') {
+ $scope_ptr = $this->data;
+ while (isset($scope_ptr->parent)) {
+ $scope_ptr = $scope_ptr->parent;
+ }
+ }
+ $_config_vars = array();
+ include($this->getCompiledFilepath ());
+ // copy global config vars
+ foreach ($_config_vars['vars'] as $variable => $value) {
+ if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
+ $scope_ptr->config_vars[$variable] = $value;
+ } else {
+ $scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value);
+ }
+ }
+ // scan sections
+ foreach ($_config_vars['sections'] as $this_section => $dummy) {
+ if ($sections == null || in_array($this_section, (array)$sections)) {
+ foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
+ if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
+ $scope_ptr->config_vars[$variable] = $value;
+ } else {
+ $scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value);
+ }
+ }
+ }
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php b/3dparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php
new file mode 100644
index 00000000000..3ad53993218
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php
@@ -0,0 +1,106 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Config File Compiler
+ *
+ * This is the config file compiler class. It calls the lexer and parser to
+ * perform the compiling.
+ *
+ * @package Smarty
+ * @subpackage Config
+ * @author Uwe Tews
+ */
+
+/**
+ * Main config file compiler class
+ */
+class Smarty_Internal_Config_File_Compiler {
+ /**
+ * Initialize compiler
+ */
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ // get required plugins
+ $this->smarty->loadPlugin('Smarty_Internal_Configfilelexer');
+ $this->smarty->loadPlugin('Smarty_Internal_Configfileparser');
+ $this->config_data['sections'] = array();
+ $this->config_data['vars'] = array();
+ }
+
+ /**
+ * Methode to compile a Smarty template
+ *
+ * @param $template template object to compile
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ public function compileSource($config)
+ {
+ /* here is where the compiling takes place. Smarty
+ tags in the templates are replaces with PHP code,
+ then written to compiled files. */
+ $this->config = $config;
+ // get config file source
+ $_content = $config->getConfigSource() . "\n";
+ // on empty template just return
+ if ($_content == '') {
+ return true;
+ }
+ // init the lexer/parser to compile the config file
+ $lex = new Smarty_Internal_Configfilelexer($_content, $this->smarty);
+ $parser = new Smarty_Internal_Configfileparser($lex, $this);
+ if (isset($this->smarty->_parserdebug)) $parser->PrintTrace();
+ // get tokens from lexer and parse them
+ while ($lex->yylex()) {
+ if (isset($this->smarty->_parserdebug)) echo "<br>Parsing {$parser->yyTokenName[$lex->token]} Token {$lex->value} Line {$lex->line} \n";
+ $parser->doParse($lex->token, $lex->value);
+ }
+ // finish parsing process
+ $parser->doParse(0, 0);
+ $config->compiled_config = '<?php $_config_vars = ' . var_export($this->config_data, true) . '; ?>';
+ }
+ /**
+ * display compiler error messages without dying
+ *
+ * If parameter $args is empty it is a parser detected syntax error.
+ * In this case the parser is called to obtain information about exspected tokens.
+ *
+ * If parameter $args contains a string this is used as error message
+ *
+ * @todo output exact position of parse error in source line
+ * @param $args string individual error message or null
+ */
+ public function trigger_config_file_error($args = null)
+ {
+ $this->lex = Smarty_Internal_Configfilelexer::instance();
+ $this->parser = Smarty_Internal_Configfileparser::instance();
+ // get template source line which has error
+ $line = $this->lex->line;
+ if (isset($args)) {
+ // $line--;
+ }
+ $match = preg_split("/\n/", $this->lex->data);
+ $error_text = "Syntax error in config file '{$this->config->getConfigFilepath()}' on line {$line} '{$match[$line-1]}' ";
+ if (isset($args)) {
+ // individual error message
+ $error_text .= $args;
+ } else {
+ // exspected token from parser
+ foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
+ $exp_token = $this->parser->yyTokenName[$token];
+ if (isset($this->lex->smarty_token_names[$exp_token])) {
+ // token type from lexer
+ $expect[] = '"' . $this->lex->smarty_token_names[$exp_token] . '"';
+ } else {
+ // otherwise internal token name
+ $expect[] = $this->parser->yyTokenName[$token];
+ }
+ }
+ // output parser error message
+ $error_text .= ' - Unexpected "' . $this->lex->value . '", expected one of: ' . implode(' , ', $expect);
+ }
+ throw new SmartyCompilerException($error_text);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_configfilelexer.php b/3dparty/Smarty/sysplugins/smarty_internal_configfilelexer.php
new file mode 100644
index 00000000000..d5be09e217b
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_configfilelexer.php
@@ -0,0 +1,526 @@
+<?php
+/**
+* Smarty Internal Plugin Configfilelexer
+*
+* This is the lexer to break the config file source into tokens
+* @package Smarty
+* @subpackage Config
+* @author Uwe Tews
+*/
+/**
+* Smarty Internal Plugin Configfilelexer
+*/
+class Smarty_Internal_Configfilelexer
+{
+
+ public $data;
+ public $counter;
+ public $token;
+ public $value;
+ public $node;
+ public $line;
+ private $state = 1;
+ public $smarty_token_names = array ( // Text for parser error messages
+ );
+
+
+ function __construct($data, $smarty)
+ {
+ // set instance object
+ self::instance($this);
+ $this->data = $data . "\n"; //now all lines are \n-terminated
+ $this->counter = 0;
+ $this->line = 1;
+ $this->smarty = $smarty;
+ }
+ public static function &instance($new_instance = null)
+ {
+ static $instance = null;
+ if (isset($new_instance) && is_object($new_instance))
+ $instance = $new_instance;
+ return $instance;
+ }
+
+
+
+ private $_yy_state = 1;
+ private $_yy_stack = array();
+
+ function yylex()
+ {
+ return $this->{'yylex' . $this->_yy_state}();
+ }
+
+ function yypushstate($state)
+ {
+ array_push($this->_yy_stack, $this->_yy_state);
+ $this->_yy_state = $state;
+ }
+
+ function yypopstate()
+ {
+ $this->_yy_state = array_pop($this->_yy_stack);
+ }
+
+ function yybegin($state)
+ {
+ $this->_yy_state = $state;
+ }
+
+
+
+
+ function yylex1()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^(#)|^(\\[)|^(\\])|^(=)|^([ \t\r]+)|^(\n)|^([0-9]*[a-zA-Z_]\\w*)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state START');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const START = 1;
+ function yy_r1_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART;
+ $this->yypushstate(self::COMMENT);
+ }
+ function yy_r1_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_OPENB;
+ $this->yypushstate(self::SECTION);
+ }
+ function yy_r1_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB;
+ }
+ function yy_r1_4($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL;
+ $this->yypushstate(self::VALUE);
+ }
+ function yy_r1_5($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r1_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
+ }
+ function yy_r1_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_ID;
+ }
+
+
+
+ function yylex2()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^([ \t\r]+)|^(\\d+\\.\\d+(?=[ \t\r]*[\n#]))|^(\\d+(?=[ \t\r]*[\n#]))|^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#]))|^(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#]))|^(\"\"\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"\"\"(?=[ \t\r]*[\n#]))|^([a-zA-Z]+(?=[ \t\r]*[\n#]))|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state VALUE');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const VALUE = 2;
+ function yy_r2_1($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r2_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT;
+ $this->yypopstate();
+ }
+ function yy_r2_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_INT;
+ $this->yypopstate();
+ }
+ function yy_r2_4($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_5($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_DOUBLE_QUOTED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_7($yy_subpatterns)
+ {
+
+ if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes", "no")) ) {
+ $this->yypopstate();
+ $this->yypushstate(self::NAKED_STRING_VALUE);
+ return true; //reprocess in new state
+ } else {
+ $this->token = Smarty_Internal_Configfileparser::TPC_BOOL;
+ $this->yypopstate();
+ }
+ }
+ function yy_r2_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->value = "";
+ $this->yypopstate();
+ }
+
+
+
+ function yylex3()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^([^\n]+?(?=[ \t\r]*\n))/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state NAKED_STRING_VALUE');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const NAKED_STRING_VALUE = 3;
+ function yy_r3_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->yypopstate();
+ }
+
+
+
+ function yylex4()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^([ \t\r]+)|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state COMMENT');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const COMMENT = 4;
+ function yy_r4_1($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r4_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ }
+ function yy_r4_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
+ $this->yypopstate();
+ }
+
+
+
+ function yylex5()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^(\\.)|^(.*?(?=[\.=[\]\r\n]))/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state SECTION');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r5_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const SECTION = 5;
+ function yy_r5_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_DOT;
+ }
+ function yy_r5_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_SECTION;
+ $this->yypopstate();
+ }
+
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_configfileparser.php b/3dparty/Smarty/sysplugins/smarty_internal_configfileparser.php
new file mode 100644
index 00000000000..5e1736fc6de
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_configfileparser.php
@@ -0,0 +1,870 @@
+<?php
+/**
+* Smarty Internal Plugin Configfileparser
+*
+* This is the config file parser.
+* It is generated from the internal.configfileparser.y file
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+class TPC_yyToken implements ArrayAccess
+{
+ public $string = '';
+ public $metadata = array();
+
+ function __construct($s, $m = array())
+ {
+ if ($s instanceof TPC_yyToken) {
+ $this->string = $s->string;
+ $this->metadata = $s->metadata;
+ } else {
+ $this->string = (string) $s;
+ if ($m instanceof TPC_yyToken) {
+ $this->metadata = $m->metadata;
+ } elseif (is_array($m)) {
+ $this->metadata = $m;
+ }
+ }
+ }
+
+ function __toString()
+ {
+ return $this->_string;
+ }
+
+ function offsetExists($offset)
+ {
+ return isset($this->metadata[$offset]);
+ }
+
+ function offsetGet($offset)
+ {
+ return $this->metadata[$offset];
+ }
+
+ function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ if (isset($value[0])) {
+ $x = ($value instanceof TPC_yyToken) ?
+ $value->metadata : $value;
+ $this->metadata = array_merge($this->metadata, $x);
+ return;
+ }
+ $offset = count($this->metadata);
+ }
+ if ($value === null) {
+ return;
+ }
+ if ($value instanceof TPC_yyToken) {
+ if ($value->metadata) {
+ $this->metadata[$offset] = $value->metadata;
+ }
+ } elseif ($value) {
+ $this->metadata[$offset] = $value;
+ }
+ }
+
+ function offsetUnset($offset)
+ {
+ unset($this->metadata[$offset]);
+ }
+}
+
+class TPC_yyStackEntry
+{
+ public $stateno; /* The state-number */
+ public $major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ public $minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+
+
+#line 12 "smarty_internal_configfileparser.y"
+class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser.php"
+{
+#line 14 "smarty_internal_configfileparser.y"
+
+ // states whether the parse was successful or not
+ public $successful = true;
+ public $retvalue = 0;
+ private $lex;
+ private $internalError = false;
+
+ function __construct($lex, $compiler) {
+ // set instance object
+ self::instance($this);
+ $this->lex = $lex;
+ $this->smarty = $compiler->smarty;
+ $this->compiler = $compiler;
+ }
+ public static function &instance($new_instance = null)
+ {
+ static $instance = null;
+ if (isset($new_instance) && is_object($new_instance))
+ $instance = $new_instance;
+ return $instance;
+ }
+
+ private function parse_bool($str) {
+ if (in_array(strtolower($str) ,array('on','yes','true'))) {
+ $res = true;
+ } else {
+ $res = false;
+ }
+ return $res;
+ }
+
+ private static $escapes_single = Array('\\' => '\\',
+ '\'' => '\'');
+ private static function parse_single_quoted_string($qstr) {
+ $escaped_string = substr($qstr, 1, strlen($qstr)-2); //remove outer quotes
+
+ $ss = preg_split('/(\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE);
+
+ $str = "";
+ foreach ($ss as $s) {
+ if (strlen($s) === 2 && $s[0] === '\\') {
+ if (isset(self::$escapes_single[$s[1]])) {
+ $s = self::$escapes_single[$s[1]];
+ }
+ }
+
+ $str .= $s;
+ }
+
+ return $str;
+ }
+
+ private static function parse_double_quoted_string($qstr) {
+ $inner_str = substr($qstr, 1, strlen($qstr)-2);
+ return stripcslashes($inner_str);
+ }
+
+ private static function parse_tripple_double_quoted_string($qstr) {
+ $inner_str = substr($qstr, 3, strlen($qstr)-6);
+ return stripcslashes($inner_str);
+ }
+
+ private function set_var(Array $var, Array &$target_array) {
+ $key = $var["key"];
+ $value = $var["value"];
+
+ if ($this->smarty->config_overwrite || !isset($target_array['vars'][$key])) {
+ $target_array['vars'][$key] = $value;
+ } else {
+ settype($target_array['vars'][$key], 'array');
+ $target_array['vars'][$key][] = $value;
+ }
+ }
+
+ private function add_global_vars(Array $vars) {
+ if (!isset($this->compiler->config_data['vars'])) {
+ $this->compiler->config_data['vars'] = Array();
+ }
+ foreach ($vars as $var) {
+ $this->set_var($var, $this->compiler->config_data);
+ }
+ }
+
+ private function add_section_vars($section_name, Array $vars) {
+ if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) {
+ $this->compiler->config_data['sections'][$section_name]['vars'] = Array();
+ }
+ foreach ($vars as $var) {
+ $this->set_var($var, $this->compiler->config_data['sections'][$section_name]);
+ }
+ }
+#line 174 "smarty_internal_configfileparser.php"
+
+ const TPC_OPENB = 1;
+ const TPC_SECTION = 2;
+ const TPC_CLOSEB = 3;
+ const TPC_DOT = 4;
+ const TPC_ID = 5;
+ const TPC_EQUAL = 6;
+ const TPC_FLOAT = 7;
+ const TPC_INT = 8;
+ const TPC_BOOL = 9;
+ const TPC_SINGLE_QUOTED_STRING = 10;
+ const TPC_DOUBLE_QUOTED_STRING = 11;
+ const TPC_TRIPPLE_DOUBLE_QUOTED_STRING = 12;
+ const TPC_NAKED_STRING = 13;
+ const TPC_NEWLINE = 14;
+ const TPC_COMMENTSTART = 15;
+ const YY_NO_ACTION = 54;
+ const YY_ACCEPT_ACTION = 53;
+ const YY_ERROR_ACTION = 52;
+
+ const YY_SZ_ACTTAB = 35;
+static public $yy_action = array(
+ /* 0 */ 26, 27, 21, 30, 29, 28, 31, 16, 53, 8,
+ /* 10 */ 19, 2, 20, 11, 24, 23, 20, 11, 17, 15,
+ /* 20 */ 3, 14, 13, 18, 4, 6, 5, 1, 12, 22,
+ /* 30 */ 9, 47, 10, 25, 7,
+ );
+ static public $yy_lookahead = array(
+ /* 0 */ 7, 8, 9, 10, 11, 12, 13, 5, 17, 18,
+ /* 10 */ 14, 20, 14, 15, 22, 23, 14, 15, 2, 2,
+ /* 20 */ 20, 4, 13, 14, 6, 3, 3, 20, 1, 24,
+ /* 30 */ 22, 25, 22, 21, 19,
+);
+ const YY_SHIFT_USE_DFLT = -8;
+ const YY_SHIFT_MAX = 17;
+ static public $yy_shift_ofst = array(
+ /* 0 */ -8, 2, 2, 2, -7, -2, -2, 27, -8, -8,
+ /* 10 */ -8, 9, 17, -4, 16, 23, 18, 22,
+);
+ const YY_REDUCE_USE_DFLT = -10;
+ const YY_REDUCE_MAX = 10;
+ static public $yy_reduce_ofst = array(
+ /* 0 */ -9, -8, -8, -8, 5, 10, 8, 12, 15, 0,
+ /* 10 */ 7,
+);
+ static public $yyExpectedTokens = array(
+ /* 0 */ array(),
+ /* 1 */ array(5, 14, 15, ),
+ /* 2 */ array(5, 14, 15, ),
+ /* 3 */ array(5, 14, 15, ),
+ /* 4 */ array(7, 8, 9, 10, 11, 12, 13, ),
+ /* 5 */ array(14, 15, ),
+ /* 6 */ array(14, 15, ),
+ /* 7 */ array(1, ),
+ /* 8 */ array(),
+ /* 9 */ array(),
+ /* 10 */ array(),
+ /* 11 */ array(13, 14, ),
+ /* 12 */ array(2, 4, ),
+ /* 13 */ array(14, ),
+ /* 14 */ array(2, ),
+ /* 15 */ array(3, ),
+ /* 16 */ array(6, ),
+ /* 17 */ array(3, ),
+ /* 18 */ array(),
+ /* 19 */ array(),
+ /* 20 */ array(),
+ /* 21 */ array(),
+ /* 22 */ array(),
+ /* 23 */ array(),
+ /* 24 */ array(),
+ /* 25 */ array(),
+ /* 26 */ array(),
+ /* 27 */ array(),
+ /* 28 */ array(),
+ /* 29 */ array(),
+ /* 30 */ array(),
+ /* 31 */ array(),
+);
+ static public $yy_default = array(
+ /* 0 */ 40, 36, 33, 37, 52, 52, 52, 32, 35, 40,
+ /* 10 */ 40, 52, 52, 52, 52, 52, 52, 52, 50, 51,
+ /* 20 */ 49, 44, 41, 39, 38, 34, 42, 43, 47, 46,
+ /* 30 */ 45, 48,
+);
+ const YYNOCODE = 26;
+ const YYSTACKDEPTH = 100;
+ const YYNSTATE = 32;
+ const YYNRULE = 20;
+ const YYERRORSYMBOL = 16;
+ const YYERRSYMDT = 'yy0';
+ const YYFALLBACK = 0;
+ static public $yyFallback = array(
+ );
+ static function Trace($TraceFILE, $zTracePrompt)
+ {
+ if (!$TraceFILE) {
+ $zTracePrompt = 0;
+ } elseif (!$zTracePrompt) {
+ $TraceFILE = 0;
+ }
+ self::$yyTraceFILE = $TraceFILE;
+ self::$yyTracePrompt = $zTracePrompt;
+ }
+
+ static function PrintTrace()
+ {
+ self::$yyTraceFILE = fopen('php://output', 'w');
+ self::$yyTracePrompt = '<br>';
+ }
+
+ static public $yyTraceFILE;
+ static public $yyTracePrompt;
+ public $yyidx; /* Index of top element in stack */
+ public $yyerrcnt; /* Shifts left before out of the error */
+ public $yystack = array(); /* The parser's stack */
+
+ public $yyTokenName = array(
+ '$', 'OPENB', 'SECTION', 'CLOSEB',
+ 'DOT', 'ID', 'EQUAL', 'FLOAT',
+ 'INT', 'BOOL', 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING',
+ 'TRIPPLE_DOUBLE_QUOTED_STRING', 'NAKED_STRING', 'NEWLINE', 'COMMENTSTART',
+ 'error', 'start', 'global_vars', 'sections',
+ 'var_list', 'section', 'newline', 'var',
+ 'value',
+ );
+
+ static public $yyRuleName = array(
+ /* 0 */ "start ::= global_vars sections",
+ /* 1 */ "global_vars ::= var_list",
+ /* 2 */ "sections ::= sections section",
+ /* 3 */ "sections ::=",
+ /* 4 */ "section ::= OPENB SECTION CLOSEB newline var_list",
+ /* 5 */ "section ::= OPENB DOT SECTION CLOSEB newline var_list",
+ /* 6 */ "var_list ::= var_list newline",
+ /* 7 */ "var_list ::= var_list var",
+ /* 8 */ "var_list ::=",
+ /* 9 */ "var ::= ID EQUAL value",
+ /* 10 */ "value ::= FLOAT",
+ /* 11 */ "value ::= INT",
+ /* 12 */ "value ::= BOOL",
+ /* 13 */ "value ::= SINGLE_QUOTED_STRING",
+ /* 14 */ "value ::= DOUBLE_QUOTED_STRING",
+ /* 15 */ "value ::= TRIPPLE_DOUBLE_QUOTED_STRING",
+ /* 16 */ "value ::= NAKED_STRING",
+ /* 17 */ "newline ::= NEWLINE",
+ /* 18 */ "newline ::= COMMENTSTART NEWLINE",
+ /* 19 */ "newline ::= COMMENTSTART NAKED_STRING NEWLINE",
+ );
+
+ function tokenName($tokenType)
+ {
+ if ($tokenType === 0) {
+ return 'End of Input';
+ }
+ if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
+ return $this->yyTokenName[$tokenType];
+ } else {
+ return "Unknown";
+ }
+ }
+
+ static function yy_destructor($yymajor, $yypminor)
+ {
+ switch ($yymajor) {
+ default: break; /* If no destructor action specified: do nothing */
+ }
+ }
+
+ function yy_pop_parser_stack()
+ {
+ if (!count($this->yystack)) {
+ return;
+ }
+ $yytos = array_pop($this->yystack);
+ if (self::$yyTraceFILE && $this->yyidx >= 0) {
+ fwrite(self::$yyTraceFILE,
+ self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
+ "\n");
+ }
+ $yymajor = $yytos->major;
+ self::yy_destructor($yymajor, $yytos->minor);
+ $this->yyidx--;
+ return $yymajor;
+ }
+
+ function __destruct()
+ {
+ while ($this->yystack !== Array()) {
+ $this->yy_pop_parser_stack();
+ }
+ if (is_resource(self::$yyTraceFILE)) {
+ fclose(self::$yyTraceFILE);
+ }
+ }
+
+ function yy_get_expected_tokens($token)
+ {
+ $state = $this->yystack[$this->yyidx]->stateno;
+ $expected = self::$yyExpectedTokens[$state];
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return $expected;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return array_unique($expected);
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
+ if (in_array($token,
+ self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return array_unique($expected);
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return $expected;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+
+ function yy_is_expected_token($token)
+ {
+ if ($token === 0) {
+ return true; // 0 is not part of this
+ }
+ $state = $this->yystack[$this->yyidx]->stateno;
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return true;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return true;
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate]) &&
+ in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ if (!$token) {
+ // end of input: this is valid
+ return true;
+ }
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return false;
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return true;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+
+ function yy_find_shift_action($iLookAhead)
+ {
+ $stateno = $this->yystack[$this->yyidx]->stateno;
+
+ /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
+ if (!isset(self::$yy_shift_ofst[$stateno])) {
+ // no shift actions
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_shift_ofst[$stateno];
+ if ($i === self::YY_SHIFT_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
+ && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
+ if (self::$yyTraceFILE) {
+ fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
+ $this->yyTokenName[$iLookAhead] . " => " .
+ $this->yyTokenName[$iFallback] . "\n");
+ }
+ return $this->yy_find_shift_action($iFallback);
+ }
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_find_reduce_action($stateno, $iLookAhead)
+ {
+ /* $stateno = $this->yystack[$this->yyidx]->stateno; */
+
+ if (!isset(self::$yy_reduce_ofst[$stateno])) {
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_reduce_ofst[$stateno];
+ if ($i == self::YY_REDUCE_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_shift($yyNewState, $yyMajor, $yypMinor)
+ {
+ $this->yyidx++;
+ if ($this->yyidx >= self::YYSTACKDEPTH) {
+ $this->yyidx--;
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+#line 126 "smarty_internal_configfileparser.y"
+
+ $this->internalError = true;
+ $this->compiler->trigger_config_file_error("Stack overflow in configfile parser");
+#line 585 "smarty_internal_configfileparser.php"
+ return;
+ }
+ $yytos = new TPC_yyStackEntry;
+ $yytos->stateno = $yyNewState;
+ $yytos->major = $yyMajor;
+ $yytos->minor = $yypMinor;
+ array_push($this->yystack, $yytos);
+ if (self::$yyTraceFILE && $this->yyidx > 0) {
+ fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
+ $yyNewState);
+ fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
+ for($i = 1; $i <= $this->yyidx; $i++) {
+ fprintf(self::$yyTraceFILE, " %s",
+ $this->yyTokenName[$this->yystack[$i]->major]);
+ }
+ fwrite(self::$yyTraceFILE,"\n");
+ }
+ }
+
+ static public $yyRuleInfo = array(
+ array( 'lhs' => 17, 'rhs' => 2 ),
+ array( 'lhs' => 18, 'rhs' => 1 ),
+ array( 'lhs' => 19, 'rhs' => 2 ),
+ array( 'lhs' => 19, 'rhs' => 0 ),
+ array( 'lhs' => 21, 'rhs' => 5 ),
+ array( 'lhs' => 21, 'rhs' => 6 ),
+ array( 'lhs' => 20, 'rhs' => 2 ),
+ array( 'lhs' => 20, 'rhs' => 2 ),
+ array( 'lhs' => 20, 'rhs' => 0 ),
+ array( 'lhs' => 23, 'rhs' => 3 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 24, 'rhs' => 1 ),
+ array( 'lhs' => 22, 'rhs' => 1 ),
+ array( 'lhs' => 22, 'rhs' => 2 ),
+ array( 'lhs' => 22, 'rhs' => 3 ),
+ );
+
+ static public $yyReduceMap = array(
+ 0 => 0,
+ 2 => 0,
+ 3 => 0,
+ 17 => 0,
+ 18 => 0,
+ 19 => 0,
+ 1 => 1,
+ 4 => 4,
+ 5 => 5,
+ 6 => 6,
+ 7 => 7,
+ 8 => 8,
+ 9 => 9,
+ 10 => 10,
+ 11 => 11,
+ 12 => 12,
+ 13 => 13,
+ 14 => 14,
+ 15 => 15,
+ 16 => 16,
+ );
+#line 132 "smarty_internal_configfileparser.y"
+ function yy_r0(){ $this->_retvalue = null; }
+#line 652 "smarty_internal_configfileparser.php"
+#line 135 "smarty_internal_configfileparser.y"
+ function yy_r1(){ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
+#line 655 "smarty_internal_configfileparser.php"
+#line 141 "smarty_internal_configfileparser.y"
+ function yy_r4(){ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
+#line 658 "smarty_internal_configfileparser.php"
+#line 142 "smarty_internal_configfileparser.y"
+ function yy_r5(){ if ($this->smarty->config_read_hidden) { $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); } $this->_retvalue = null; }
+#line 661 "smarty_internal_configfileparser.php"
+#line 145 "smarty_internal_configfileparser.y"
+ function yy_r6(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
+#line 664 "smarty_internal_configfileparser.php"
+#line 146 "smarty_internal_configfileparser.y"
+ function yy_r7(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor)); }
+#line 667 "smarty_internal_configfileparser.php"
+#line 147 "smarty_internal_configfileparser.y"
+ function yy_r8(){ $this->_retvalue = Array(); }
+#line 670 "smarty_internal_configfileparser.php"
+#line 151 "smarty_internal_configfileparser.y"
+ function yy_r9(){ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor); }
+#line 673 "smarty_internal_configfileparser.php"
+#line 153 "smarty_internal_configfileparser.y"
+ function yy_r10(){ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor; }
+#line 676 "smarty_internal_configfileparser.php"
+#line 154 "smarty_internal_configfileparser.y"
+ function yy_r11(){ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor; }
+#line 679 "smarty_internal_configfileparser.php"
+#line 155 "smarty_internal_configfileparser.y"
+ function yy_r12(){ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor); }
+#line 682 "smarty_internal_configfileparser.php"
+#line 156 "smarty_internal_configfileparser.y"
+ function yy_r13(){ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
+#line 685 "smarty_internal_configfileparser.php"
+#line 157 "smarty_internal_configfileparser.y"
+ function yy_r14(){ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
+#line 688 "smarty_internal_configfileparser.php"
+#line 158 "smarty_internal_configfileparser.y"
+ function yy_r15(){ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
+#line 691 "smarty_internal_configfileparser.php"
+#line 159 "smarty_internal_configfileparser.y"
+ function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
+#line 694 "smarty_internal_configfileparser.php"
+
+ private $_retvalue;
+
+ function yy_reduce($yyruleno)
+ {
+ $yymsp = $this->yystack[$this->yyidx];
+ if (self::$yyTraceFILE && $yyruleno >= 0
+ && $yyruleno < count(self::$yyRuleName)) {
+ fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n",
+ self::$yyTracePrompt, $yyruleno,
+ self::$yyRuleName[$yyruleno]);
+ }
+
+ $this->_retvalue = $yy_lefthand_side = null;
+ if (array_key_exists($yyruleno, self::$yyReduceMap)) {
+ // call the action
+ $this->_retvalue = null;
+ $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $yy_lefthand_side = $this->_retvalue;
+ }
+ $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= $yysize;
+ for($i = $yysize; $i; $i--) {
+ // pop all of the right-hand side parameters
+ array_pop($this->yystack);
+ }
+ $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ if ($yyact < self::YYNSTATE) {
+ if (!self::$yyTraceFILE && $yysize) {
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $yyact;
+ $x->major = $yygoto;
+ $x->minor = $yy_lefthand_side;
+ $this->yystack[$this->yyidx] = $x;
+ } else {
+ $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
+ }
+ } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yy_accept();
+ }
+ }
+
+ function yy_parse_failed()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+ }
+
+ function yy_syntax_error($yymajor, $TOKEN)
+ {
+#line 119 "smarty_internal_configfileparser.y"
+
+ $this->internalError = true;
+ $this->yymajor = $yymajor;
+ $this->compiler->trigger_config_file_error();
+#line 757 "smarty_internal_configfileparser.php"
+ }
+
+ function yy_accept()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $stack = $this->yy_pop_parser_stack();
+ }
+#line 111 "smarty_internal_configfileparser.y"
+
+ $this->successful = !$this->internalError;
+ $this->internalError = false;
+ $this->retvalue = $this->_retvalue;
+ //echo $this->retvalue."\n\n";
+#line 775 "smarty_internal_configfileparser.php"
+ }
+
+ function doParse($yymajor, $yytokenvalue)
+ {
+ $yyerrorhit = 0; /* True if yymajor has invoked an error */
+
+ if ($this->yyidx === null || $this->yyidx < 0) {
+ $this->yyidx = 0;
+ $this->yyerrcnt = -1;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = 0;
+ $x->major = 0;
+ $this->yystack = array();
+ array_push($this->yystack, $x);
+ }
+ $yyendofinput = ($yymajor==0);
+
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sInput %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+
+ do {
+ $yyact = $this->yy_find_shift_action($yymajor);
+ if ($yymajor < self::YYERRORSYMBOL &&
+ !$this->yy_is_expected_token($yymajor)) {
+ // force a syntax error
+ $yyact = self::YY_ERROR_ACTION;
+ }
+ if ($yyact < self::YYNSTATE) {
+ $this->yy_shift($yyact, $yymajor, $yytokenvalue);
+ $this->yyerrcnt--;
+ if ($yyendofinput && $this->yyidx >= 0) {
+ $yymajor = 0;
+ } else {
+ $yymajor = self::YYNOCODE;
+ }
+ } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
+ $this->yy_reduce($yyact - self::YYNSTATE);
+ } elseif ($yyact == self::YY_ERROR_ACTION) {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sSyntax Error!\n",
+ self::$yyTracePrompt);
+ }
+ if (self::YYERRORSYMBOL) {
+ if ($this->yyerrcnt < 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $yymx = $this->yystack[$this->yyidx]->major;
+ if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $yymajor = self::YYNOCODE;
+ } else {
+ while ($this->yyidx >= 0 &&
+ $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
+ ){
+ $this->yy_pop_parser_stack();
+ }
+ if ($this->yyidx < 0 || $yymajor==0) {
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $this->yy_parse_failed();
+ $yymajor = self::YYNOCODE;
+ } elseif ($yymx != self::YYERRORSYMBOL) {
+ $u2 = 0;
+ $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
+ }
+ }
+ $this->yyerrcnt = 3;
+ $yyerrorhit = 1;
+ } else {
+ if ($this->yyerrcnt <= 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $this->yyerrcnt = 3;
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ if ($yyendofinput) {
+ $this->yy_parse_failed();
+ }
+ $yymajor = self::YYNOCODE;
+ }
+ } else {
+ $this->yy_accept();
+ $yymajor = self::YYNOCODE;
+ }
+ } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_data.php b/3dparty/Smarty/sysplugins/smarty_internal_data.php
new file mode 100644
index 00000000000..766f6b79afe
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_data.php
@@ -0,0 +1,479 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Data
+ *
+ * This file contains the basic classes and methodes for template and variable creation
+ *
+ * @package Smarty
+ * @subpackage Templates
+ * @author Uwe Tews
+ */
+
+/**
+ * Base class with template and variable methodes
+ */
+class Smarty_Internal_Data {
+ // class used for templates
+ public $template_class = 'Smarty_Internal_Template';
+
+ /**
+ * assigns a Smarty variable
+ *
+ * @param array $ |string $tpl_var the template variable name(s)
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @param boolean $scope the scope the variable will have (local,parent or root)
+ */
+ public function assign($tpl_var, $value = null, $nocache = false)
+ {
+ if (is_array($tpl_var)) {
+ foreach ($tpl_var as $_key => $_val) {
+ if ($_key != '') {
+ $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
+ }
+ }
+ } else {
+ if ($tpl_var != '') {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
+ }
+ }
+ }
+ /**
+ * assigns a global Smarty variable
+ *
+ * @param string $varname the global variable name
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ */
+ public function assignGlobal($varname, $value = null, $nocache = false)
+ {
+ if ($varname != '') {
+ Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache);
+ }
+ }
+ /**
+ * assigns values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $ &$value the referenced value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ */
+ public function assignByRef($tpl_var, &$value, $nocache = false)
+ {
+ if ($tpl_var != '') {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);
+ $this->tpl_vars[$tpl_var]->value = &$value;
+ }
+ }
+
+ /**
+ * wrapper function for Smarty 2 BC
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $ &$value the referenced value to assign
+ */
+ public function assign_by_ref($tpl_var, &$value)
+ {
+ if($this->smarty->deprecation_notices)
+ trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'", E_USER_NOTICE);
+ $this->assignByRef($tpl_var, $value);
+ }
+ /**
+ * appends values to template variables
+ *
+ * @param array $ |string $tpl_var the template variable name(s)
+ * @param mixed $value the value to append
+ * @param boolean $merge flag if array elements shall be merged
+ * @param boolean $nocache if true any output of this variable will be not cached
+ */
+ public function append($tpl_var, $value = null, $merge = false, $nocache = false)
+ {
+ if (is_array($tpl_var)) {
+ // $tpl_var is an array, ignore $value
+ foreach ($tpl_var as $_key => $_val) {
+ if ($_key != '') {
+ if (!isset($this->tpl_vars[$_key])) {
+ $tpl_var_inst = $this->getVariable($_key, null, true, false);
+ if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {
+ $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache);
+ } else {
+ $this->tpl_vars[$_key] = clone $tpl_var_inst;
+ }
+ }
+ if (!(is_array($this->tpl_vars[$_key]->value) || $this->tpl_vars[$_key]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$_key]->value, 'array');
+ }
+ if ($merge && is_array($_val)) {
+ foreach($_val as $_mkey => $_mval) {
+ $this->tpl_vars[$_key]->value[$_mkey] = $_mval;
+ }
+ } else {
+ $this->tpl_vars[$_key]->value[] = $_val;
+ }
+ }
+ }
+ } else {
+ if ($tpl_var != '' && isset($value)) {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $tpl_var_inst = $this->getVariable($tpl_var, null, true, false);
+ if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);
+ } else {
+ $this->tpl_vars[$tpl_var] = clone $tpl_var_inst;
+ }
+ }
+ if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ if ($merge && is_array($value)) {
+ foreach($value as $_mkey => $_mval) {
+ $this->tpl_vars[$tpl_var]->value[$_mkey] = $_mval;
+ }
+ } else {
+ $this->tpl_vars[$tpl_var]->value[] = $value;
+ }
+ }
+ }
+ }
+
+ /**
+ * appends values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $ &$value the referenced value to append
+ * @param boolean $merge flag if array elements shall be merged
+ */
+ public function appendByRef($tpl_var, &$value, $merge = false)
+ {
+ if ($tpl_var != '' && isset($value)) {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable();
+ }
+ if (!@is_array($this->tpl_vars[$tpl_var]->value)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ if ($merge && is_array($value)) {
+ foreach($value as $_key => $_val) {
+ $this->tpl_vars[$tpl_var]->value[$_key] = &$value[$_key];
+ }
+ } else {
+ $this->tpl_vars[$tpl_var]->value[] = &$value;
+ }
+ }
+ }
+
+ /**
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $ &$value the referenced value to append
+ * @param boolean $merge flag if array elements shall be merged
+ */
+ public function append_by_ref($tpl_var, &$value, $merge = false)
+ {
+ if($this->smarty->deprecation_notices)
+ trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'", E_USER_NOTICE);
+ $this->appendByRef($tpl_var, $value, $merge);
+ }
+ /**
+ * Returns a single or all template variables
+ *
+ * @param string $varname variable name or null
+ * @return string variable value or or array of variables
+ */
+ function getTemplateVars($varname = null, $_ptr = null, $search_parents = true)
+ {
+ if (isset($varname)) {
+ $_var = $this->getVariable($varname, $_ptr, $search_parents, false);
+ if (is_object($_var)) {
+ return $_var->value;
+ } else {
+ return null;
+ }
+ } else {
+ $_result = array();
+ if ($_ptr === null) {
+ $_ptr = $this;
+ } while ($_ptr !== null) {
+ foreach ($_ptr->tpl_vars AS $key => $var) {
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if ($search_parents && isset(Smarty::$global_tpl_vars)) {
+ foreach (Smarty::$global_tpl_vars AS $key => $var) {
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
+ }
+ }
+ return $_result;
+ }
+ }
+
+ /**
+ * clear the given assigned template variable.
+ *
+ * @param string $ |array $tpl_var the template variable(s) to clear
+ */
+ public function clearAssign($tpl_var)
+ {
+ if (is_array($tpl_var)) {
+ foreach ($tpl_var as $curr_var) {
+ unset($this->tpl_vars[$curr_var]);
+ }
+ } else {
+ unset($this->tpl_vars[$tpl_var]);
+ }
+ }
+
+ /**
+ * clear all the assigned template variables.
+ */
+ public function clearAllAssign()
+ {
+ $this->tpl_vars = array();
+ }
+
+ /**
+ * load a config file, optionally load just selected sections
+ *
+ * @param string $config_file filename
+ * @param mixed $sections array of section names, single section or null
+ */
+ public function configLoad($config_file, $sections = null)
+ {
+ // load Config class
+ $config = new Smarty_Internal_Config($config_file, $this->smarty, $this);
+ $config->loadConfigVars($sections);
+ }
+
+ /**
+ * gets the object of a Smarty variable
+ *
+ * @param string $variable the name of the Smarty variable
+ * @param object $_ptr optional pointer to data object
+ * @param boolean $search_parents search also in parent data
+ * @return object the object of the variable
+ */
+ public function getVariable($_variable, $_ptr = null, $search_parents = true, $error_enable = true)
+ {
+ if ($_ptr === null) {
+ $_ptr = $this;
+ } while ($_ptr !== null) {
+ if (isset($_ptr->tpl_vars[$_variable])) {
+ // found it, return it
+ return $_ptr->tpl_vars[$_variable];
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if (isset(Smarty::$global_tpl_vars[$_variable])) {
+ // found it, return it
+ return Smarty::$global_tpl_vars[$_variable];
+ }
+ if ($this->smarty->error_unassigned && $error_enable) {
+ throw new SmartyException('Undefined Smarty variable "' . $_variable . '"');
+ } else {
+ if ($error_enable) {
+ // force a notice
+ $x = $$_variable;
+ }
+ return new Undefined_Smarty_Variable;
+ }
+ }
+ /**
+ * gets a config variable
+ *
+ * @param string $variable the name of the config variable
+ * @return mixed the value of the config variable
+ */
+ public function getConfigVariable($_variable)
+ {
+ $_ptr = $this;
+ while ($_ptr !== null) {
+ if (isset($_ptr->config_vars[$_variable])) {
+ // found it, return it
+ return $_ptr->config_vars[$_variable];
+ }
+ // not found, try at parent
+ $_ptr = $_ptr->parent;
+ }
+ if ($this->smarty->error_unassigned) {
+ throw new SmartyException('Undefined config variable "' . $_variable . '"');
+ } else {
+ // force a notice
+ $x = $$_variable;
+ return null;
+ }
+ }
+
+ /**
+ * gets a stream variable
+ *
+ * @param string $variable the stream of the variable
+ * @return mixed the value of the stream variable
+ */
+ public function getStreamVariable($variable)
+ {
+ $_result = '';
+ if ($fp = fopen($variable, 'r+')) {
+ while (!feof($fp)) {
+ $_result .= fgets($fp);
+ }
+ fclose($fp);
+ return $_result;
+ }
+
+ if ($this->smarty->error_unassigned) {
+ throw new SmartyException('Undefined stream variable "' . $variable . '"');
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Returns a single or all config variables
+ *
+ * @param string $varname variable name or null
+ * @return string variable value or or array of variables
+ */
+ function getConfigVars($varname = null, $search_parents = true)
+ {
+ // var_dump($this);
+ $_ptr = $this;
+ $var_array = array();
+ while ($_ptr !== null) {
+ if (isset($varname)) {
+ if (isset($_ptr->config_vars[$varname])) {
+ return $_ptr->config_vars[$varname];
+ }
+ } else {
+ $var_array = array_merge($_ptr->config_vars, $var_array);
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if (isset($varname)) {
+ return '';
+ } else {
+ return $var_array;
+ }
+ }
+
+ /**
+ * Deassigns a single or all config variables
+ *
+ * @param string $varname variable name or null
+ */
+ function clearConfig($varname = null)
+ {
+ if (isset($varname)) {
+ unset($this->config_vars[$varname]);
+ return;
+ } else {
+ $this->config_vars = array();
+ return;
+ }
+ }
+
+}
+
+/**
+ * class for the Smarty data object
+ *
+ * The Smarty data object will hold Smarty variables in the current scope
+ *
+ * @param object $parent tpl_vars next higher level of Smarty variables
+ */
+class Smarty_Data extends Smarty_Internal_Data {
+ // array of variable objects
+ public $tpl_vars = array();
+ // back pointer to parent object
+ public $parent = null;
+ // config vars
+ public $config_vars = array();
+ // Smarty object
+ public $smarty = null;
+ /**
+ * create Smarty data object
+ */
+ public function __construct ($_parent = null, $smarty = null)
+ {
+ $this->smarty = $smarty;
+ if (is_object($_parent)) {
+ // when object set up back pointer
+ $this->parent = $_parent;
+ } elseif (is_array($_parent)) {
+ // set up variable values
+ foreach ($_parent as $_key => $_val) {
+ $this->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ } elseif ($_parent != null) {
+ throw new SmartyException("Wrong type for template variables");
+ }
+ }
+}
+/**
+ * class for the Smarty variable object
+ *
+ * This class defines the Smarty variable object
+ */
+class Smarty_Variable {
+ // template variable
+ public $value;
+ public $nocache;
+ public $scope;
+ /**
+ * create Smarty variable object
+ *
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @param boolean $scope the scope the variable will have (local,parent or root)
+ */
+ public function __construct ($value = null, $nocache = false, $scope = Smarty::SCOPE_LOCAL)
+ {
+ $this->value = $value;
+ $this->nocache = $nocache;
+ $this->scope = $scope;
+ }
+
+ public function __toString ()
+ {
+ return $this->value;
+ }
+}
+
+/**
+ * class for undefined variable object
+ *
+ * This class defines an object for undefined variable handling
+ */
+class Undefined_Smarty_Variable {
+ // return always false
+ public function __get ($name)
+ {
+ if ($name == 'nocache') {
+ return false;
+ } else {
+ return null;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_debug.php b/3dparty/Smarty/sysplugins/smarty_internal_debug.php
new file mode 100644
index 00000000000..0fd22a6a672
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_debug.php
@@ -0,0 +1,170 @@
+<?php
+
+/**
+* Smarty Internal Plugin Debug
+*
+* Class to collect data for the Smarty Debugging Consol
+*
+* @package Smarty
+* @subpackage Debug
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Debug Class
+*/
+class Smarty_Internal_Debug extends Smarty_Internal_Data {
+ // template data
+ static $template_data = array();
+
+ /**
+ * Start logging of compile time
+ */
+ public static function start_compile($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of compile time
+ */
+ public static function end_compile($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+
+ /**
+ * Start logging of render time
+ */
+ public static function start_render($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of compile time
+ */
+ public static function end_render($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+
+ /**
+ * Start logging of cache time
+ */
+ public static function start_cache($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of cache time
+ */
+ public static function end_cache($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+ /**
+ * Opens a window for the Smarty Debugging Consol and display the data
+ */
+ public static function display_debug($obj)
+ {
+ // prepare information of assigned variables
+ $ptr = self::get_debug_vars($obj);
+ if ($obj instanceof Smarty) {
+ $smarty = $obj;
+ } else {
+ $smarty = $obj->smarty;
+ }
+ $_assigned_vars = $ptr->tpl_vars;
+ ksort($_assigned_vars);
+ $_config_vars = $ptr->config_vars;
+ ksort($_config_vars);
+ $ldelim = $smarty->left_delimiter;
+ $rdelim = $smarty->right_delimiter;
+ $smarty->left_delimiter = '{';
+ $smarty->right_delimiter = '}';
+ $_template = new Smarty_Internal_Template ($smarty->debug_tpl, $smarty);
+ $_template->caching = false;
+ $_template->force_compile = false;
+ $_template->disableSecurity();
+ $_template->cache_id = null;
+ $_template->compile_id = null;
+ if ($obj instanceof Smarty_Internal_Template) {
+ $_template->assign('template_name',$obj->resource_type.':'.$obj->resource_name);
+ }
+ if ($obj instanceof Smarty) {
+ $_template->assign('template_data', self::$template_data);
+ } else {
+ $_template->assign('template_data', null);
+ }
+ $_template->assign('assigned_vars', $_assigned_vars);
+ $_template->assign('config_vars', $_config_vars);
+ $_template->assign('execution_time', microtime(true) - $smarty->start_time);
+ echo $_template->getRenderedTemplate();
+ $smarty->left_delimiter = $ldelim;
+ $smarty->right_delimiter = $rdelim;
+ }
+ /*
+ * Recursively gets variables from all template/data scopes
+ */
+ public static function get_debug_vars($obj)
+ {
+ $config_vars = $obj->config_vars;
+ $tpl_vars = array();
+ foreach ($obj->tpl_vars as $key => $var) {
+ $tpl_vars[$key] = clone $var;
+ if ($obj instanceof Smarty_Internal_Template) {
+ $tpl_vars[$key]->scope = $obj->resource_type.':'.$obj->resource_name;
+ } elseif ($obj instanceof Smarty_Data) {
+ $tpl_vars[$key]->scope = 'Data object';
+ } else {
+ $tpl_vars[$key]->scope = 'Smarty root';
+ }
+ }
+
+ if (isset($obj->parent)) {
+ $parent = self::get_debug_vars($obj->parent);
+ $tpl_vars = array_merge($parent->tpl_vars, $tpl_vars);
+ $config_vars = array_merge($parent->config_vars, $config_vars);
+ } else {
+ foreach (Smarty::$global_tpl_vars as $name => $var) {
+ if (!array_key_exists($name, $tpl_vars)) {
+ $clone = clone $var;
+ $clone->scope = 'Global';
+ $tpl_vars[$name] = $clone;
+ }
+ }
+ }
+ return (object) array('tpl_vars' => $tpl_vars, 'config_vars' => $config_vars);
+ }
+
+ /**
+ * get_key
+ */
+ static function get_key($template)
+ {
+ // calculate Uid if not already done
+ if ($template->templateUid == '') {
+ $template->getTemplateFilepath();
+ }
+ $key = $template->templateUid;
+ if (isset(self::$template_data[$key])) {
+ return $key;
+ } else {
+ self::$template_data[$key]['name'] = $template->getTemplateFilepath();
+ self::$template_data[$key]['compile_time'] = 0;
+ self::$template_data[$key]['render_time'] = 0;
+ self::$template_data[$key]['cache_time'] = 0;
+ return $key;
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_filter.php b/3dparty/Smarty/sysplugins/smarty_internal_filter.php
new file mode 100644
index 00000000000..1dba073a2ab
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_filter.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Filter
+ *
+ * External Smarty filter methods
+ *
+ * @package Smarty
+ * @author Uwe Tews
+ */
+
+/**
+ * Class for filter methods
+ */
+class Smarty_Internal_Filter {
+
+ function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ /**
+ * Registers a filter function
+ *
+ * @param string $type filter type
+ * @param callback $callback
+ */
+ public function registerFilter($type, $callback)
+ {
+ $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback;
+ }
+
+ /**
+ * Unregisters a filter function
+ *
+ * @param string $type filter type
+ * @param callback $callback
+ */
+ public function unregisterFilter($type, $callback)
+ {
+ $name = $this->_get_filter_name($callback);
+ if(isset($this->smarty->registered_filters[$type][$name])) {
+ unset($this->smarty->registered_filters[$type][$name]);
+ }
+ }
+
+
+ /**
+ * Return internal filter name
+ *
+ * @param callback $function_name
+ */
+ public function _get_filter_name($function_name)
+ {
+ if (is_array($function_name)) {
+ $_class_name = (is_object($function_name[0]) ?
+ get_class($function_name[0]) : $function_name[0]);
+ return $_class_name . '_' . $function_name[1];
+ } else {
+ return $function_name;
+ }
+ }
+
+
+ /**
+ * load a filter of specified type and name
+ *
+ * @param string $type filter type
+ * @param string $name filter name
+ * @return bool
+ */
+ function loadFilter($type, $name)
+ {
+ $_plugin = "smarty_{$type}filter_{$name}";
+ $_filter_name = $_plugin;
+ if ($this->smarty->loadPlugin($_plugin)) {
+ if (class_exists($_plugin, false)) {
+ $_plugin = array($_plugin, 'execute');
+ }
+ if (is_callable($_plugin)) {
+ return $this->smarty->registered_filters[$type][$_filter_name] = $_plugin;
+ }
+ }
+ throw new SmartyException("{$type}filter \"{$name}\" not callable");
+ return false;
+ }
+
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_filter_handler.php b/3dparty/Smarty/sysplugins/smarty_internal_filter_handler.php
new file mode 100644
index 00000000000..3445e4c47e0
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_filter_handler.php
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Filter Handler
+ *
+ * Smarty filter handler class
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Uwe Tews
+ */
+
+/**
+ * Class for filter processing
+ */
+class Smarty_Internal_Filter_Handler {
+ /**
+ * Run filters over content
+ *
+ * The filters will be lazy loaded if required
+ * class name format: Smarty_FilterType_FilterName
+ * plugin filename format: filtertype.filtername.php
+ * Smarty2 filter plugins could be used
+ *
+ * @param string $type the type of filter ('pre','post','output' or 'variable') which shall run
+ * @param string $content the content which shall be processed by the filters
+ * @return string the filtered content
+ */
+ static function runFilter($type, $content, $template, $flag = null)
+ {
+ $output = $content;
+ if ($type != 'variable' || ($template->smarty->variable_filter && $flag !== false) || $flag === true) {
+ // loop over autoload filters of specified type
+ if (!empty($template->smarty->autoload_filters[$type])) {
+ foreach ((array)$template->smarty->autoload_filters[$type] as $name) {
+ $plugin_name = "Smarty_{$type}filter_{$name}";
+ if ($template->smarty->loadPlugin($plugin_name)) {
+ if (function_exists($plugin_name)) {
+ // use loaded Smarty2 style plugin
+ $output = $plugin_name($output, $template);
+ } elseif (class_exists($plugin_name, false)) {
+ // loaded class of filter plugin
+ $output = call_user_func(array($plugin_name, 'execute'), $output, $template);
+ }
+ } else {
+ // nothing found, throw exception
+ throw new SmartyException("Unable to load filter {$plugin_name}");
+ }
+ }
+ }
+ // loop over registerd filters of specified type
+ if (!empty($template->smarty->registered_filters[$type])) {
+ foreach ($template->smarty->registered_filters[$type] as $key => $name) {
+ if (is_array($template->smarty->registered_filters[$type][$key])) {
+ $output = call_user_func($template->smarty->registered_filters[$type][$key], $output, $template);
+ } else {
+ $output = $template->smarty->registered_filters[$type][$key]($output, $template);
+ }
+ }
+ }
+ }
+ // return filtered output
+ return $output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_function_call_handler.php b/3dparty/Smarty/sysplugins/smarty_internal_function_call_handler.php
new file mode 100644
index 00000000000..b5a04b3be71
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_function_call_handler.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Smarty Internal Plugin Function Call Handler
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does call function defined with the {function} tag
+ */
+class Smarty_Internal_Function_Call_Handler extends Smarty_Internal_Template {
+ static function call ($_name, $_template, $_params, $_hash, $_nocache)
+ {
+ if ($_nocache) {
+ $_function = "smarty_template_function_{$_name}_nocache";
+ $_template->smarty->template_functions[$_name]['called_nocache'] = true;
+ } else {
+ $_function = "smarty_template_function_{$_hash}_{$_name}";
+ }
+ if (!is_callable($_function)) {
+ $_code = "function {$_function}(\$_smarty_tpl,\$params) {
+ \$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
+ foreach (\$_smarty_tpl->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(trim(\$value,'\''));};
+ foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
+ if ($_nocache) {
+ $_code .= preg_replace(array("!<\?php echo \\'/\*%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/|/\*/%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/\\';\?>!",
+ "!\\\'!"), array('', "'"), $_template->smarty->template_functions[$_name]['compiled']);
+ } else {
+ $_code .= preg_replace("/{$_template->smarty->template_functions[$_name]['nocache_hash']}/", $_template->properties['nocache_hash'], $_template->smarty->template_functions[$_name]['compiled']);
+ }
+ $_code .= "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}";
+ eval($_code);
+ }
+ $_function($_template, $_params);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_get_include_path.php b/3dparty/Smarty/sysplugins/smarty_internal_get_include_path.php
new file mode 100644
index 00000000000..86b904ce479
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_get_include_path.php
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * Smarty read include path plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Monte Ohrt
+ */
+
+/**
+ * Smarty Internal Read Include Path Class
+ */
+class Smarty_Internal_Get_Include_Path {
+ /**
+ * Return full file path from PHP include_path
+ *
+ * @param string $filepath filepath
+ * @return mixed full filepath or false
+ */
+ public static function getIncludePath($filepath)
+ {
+ static $_path_array = null;
+
+ if(!isset($_path_array)) {
+ $_ini_include_path = ini_get('include_path');
+
+ if(strstr($_ini_include_path,';')) {
+ // windows pathnames
+ $_path_array = explode(';',$_ini_include_path);
+ } else {
+ $_path_array = explode(':',$_ini_include_path);
+ }
+ }
+ foreach ($_path_array as $_include_path) {
+ if (file_exists($_include_path . DS . $filepath)) {
+ return $_include_path . DS . $filepath;
+ }
+ }
+ return false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_nocache_insert.php b/3dparty/Smarty/sysplugins/smarty_internal_nocache_insert.php
new file mode 100644
index 00000000000..701f5351f76
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_nocache_insert.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Nocache Insert
+ *
+ * Compiles the {insert} tag into the cache file
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ */
+class Smarty_Internal_Nocache_Insert {
+ /**
+ * Compiles code for the {insert} tag into cache file
+ *
+ * @param string $_function insert function name
+ * @param array $_attr array with paramter
+ * @param object $template template object
+ * @param string $_script script name to load or 'null'
+ * @param string $_assign soptinal variable name
+ * @return string compiled code
+ */
+ static function compile($_function, $_attr, $_template, $_script, $_assign = null)
+ {
+ $_output = '<?php ';
+ if ($_script != 'null') {
+ // script which must be included
+ // code for script file loading
+ $_output .= "require_once '{$_script}';";
+ }
+ // call insert
+ if (isset($_assign)) {
+ $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>";
+ } else {
+ $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>";
+ }
+ $_tpl = $_template;
+ while ($_tpl->parent instanceof Smarty_Internal_Template) {
+ $_tpl = $_tpl->parent;
+ }
+ return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_parsetree.php b/3dparty/Smarty/sysplugins/smarty_internal_parsetree.php
new file mode 100644
index 00000000000..bfaa3637a45
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_parsetree.php
@@ -0,0 +1,236 @@
+<?php
+/**
+ * Smarty Internal Plugin Templateparser Parsetrees
+ *
+ * These are classes to build parsetrees in the template parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Thue Kristensen
+ * @author Uwe Tews
+ */
+
+abstract class _smarty_parsetree {
+ abstract public function to_smarty_php();
+}
+
+/**
+ * A complete smarty tag.
+ */
+class _smarty_tag extends _smarty_parsetree
+{
+ public $parser;
+ public $data;
+ public $saved_block_nesting;
+ function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ $this->saved_block_nesting = $parser->block_nesting_level;
+ }
+
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+
+ public function assign_to_var()
+ {
+ $var = sprintf('$_tmp%d', ++$this->parser->prefix_number);
+ $this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>',
+ $this->data, $var);
+ return $var;
+ }
+}
+
+/**
+ * Code fragment inside a tag.
+ */
+class _smarty_code extends _smarty_parsetree {
+ public $parser;
+ public $data;
+ function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ public function to_smarty_php()
+ {
+ return sprintf("(%s)", $this->data);
+ }
+}
+
+/**
+ * Double quoted string inside a tag.
+ */
+class _smarty_doublequoted extends _smarty_parsetree {
+ public $parser;
+ public $subtrees = Array();
+ function __construct($parser, _smarty_parsetree $subtree)
+ {
+ $this->parser = $parser;
+ $this->subtrees[] = $subtree;
+ if ($subtree instanceof _smarty_tag) {
+ $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
+ }
+ }
+
+ function append_subtree(_smarty_parsetree $subtree)
+ {
+ $last_subtree = count($this->subtrees)-1;
+ if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {
+ if ($subtree instanceof _smarty_code) {
+ $this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
+ } elseif ($subtree instanceof _smarty_dq_content) {
+ $this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';
+ } else {
+ $this->subtrees[$last_subtree]->data .= $subtree->data;
+ }
+ } else {
+ $this->subtrees[] = $subtree;
+ }
+ if ($subtree instanceof _smarty_tag) {
+ $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
+ }
+ }
+
+ public function to_smarty_php()
+ {
+ $code = '';
+ foreach ($this->subtrees as $subtree) {
+ if ($code !== "") {
+ $code .= ".";
+ }
+ if ($subtree instanceof _smarty_tag) {
+ $more_php = $subtree->assign_to_var();
+ } else {
+ $more_php = $subtree->to_smarty_php();
+ }
+
+ $code .= $more_php;
+
+ if (!$subtree instanceof _smarty_dq_content) {
+ $this->parser->compiler->has_variable_string = true;
+ }
+ }
+ return $code;
+ }
+}
+
+/**
+ * Raw chars as part of a double quoted string.
+ */
+class _smarty_dq_content extends _smarty_parsetree {
+ public $data;
+ function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ public function to_smarty_php()
+ {
+ return '"' . $this->data . '"';
+ }
+}
+
+/**
+ * Template element
+ */
+class _smarty_template_buffer extends _smarty_parsetree {
+ public $subtrees = Array();
+ function __construct($parser)
+ {
+ $this->parser = $parser;
+ }
+
+ function append_subtree(_smarty_parsetree $subtree)
+ {
+ $this->subtrees[] = $subtree;
+ }
+
+ public function to_smarty_php()
+ {
+ $code = '';
+ for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
+ if ($key + 2 < $cnt) {
+ if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {
+ $key = $key + 1;
+ continue;
+ }
+ if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {
+ $key = $key + 2;
+ continue;
+ }
+ }
+ if (substr($code, -1) == '<') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '?') {
+ $code = substr($code, 0, strlen($code)-1) . '<<?php ?>?' . substr($subtree, 1);
+ } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {
+ $code = substr($code, 0, strlen($code)-1) . '<<?php ?>%' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ if ($this->parser->asp_tags && substr($code, -1) == '%') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '>') {
+ $code = substr($code, 0, strlen($code)-1) . '%<?php ?>>' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ if (substr($code, -1) == '?') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '>') {
+ $code = substr($code, 0, strlen($code)-1) . '?<?php ?>>' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ $code .= $this->subtrees[$key]->to_smarty_php();
+ }
+ return $code;
+ }
+}
+
+/**
+ * template text
+ */
+class _smarty_text extends _smarty_parsetree {
+ public $data;
+ function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+}
+
+/**
+ * template linebreaks
+ */
+class _smarty_linebreak extends _smarty_parsetree {
+ public $data;
+ function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_register.php b/3dparty/Smarty/sysplugins/smarty_internal_register.php
new file mode 100644
index 00000000000..8cfd4df02e6
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_register.php
@@ -0,0 +1,156 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Register
+ *
+ * External Smarty methods register/unregister
+ *
+ * @package Smarty
+ * @author Uwe Tews
+ */
+
+/**
+ * Class for register/unregister methods
+ */
+class Smarty_Internal_Register {
+
+ function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ /**
+ * Registers plugin to be used in templates
+ *
+ * @param string $type plugin type
+ * @param string $tag name of template tag
+ * @param callback $callback PHP callback to register
+ * @param boolean $cacheable if true (default) this fuction is cachable
+ * @param array $cache_attr caching attributes if any
+ */
+
+ public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null)
+ {
+ if (isset($this->smarty->registered_plugins[$type][$tag])) {
+ throw new Exception("Plugin tag \"{$tag}\" already registered");
+ } elseif (!is_callable($callback)) {
+ throw new Exception("Plugin \"{$tag}\" not callable");
+ } else {
+ $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr);
+ }
+ }
+
+ /**
+ * Unregister Plugin
+ *
+ * @param string $type of plugin
+ * @param string $tag name of plugin
+ */
+ function unregisterPlugin($type, $tag)
+ {
+ if (isset($this->smarty->registered_plugins[$type][$tag])) {
+ unset($this->smarty->registered_plugins[$type][$tag]);
+ }
+ }
+
+ /**
+ * Registers a resource to fetch a template
+ *
+ * @param string $type name of resource type
+ * @param array $callback array of callbacks to handle resource
+ */
+ public function registerResource($type, $callback)
+ {
+ $this->smarty->registered_resources[$type] = array($callback, false);
+ }
+
+ /**
+ * Unregisters a resource
+ *
+ * @param string $type name of resource type
+ */
+ function unregisterResource($type)
+ {
+ if (isset($this->smarty->registered_resources[$type])) {
+ unset($this->smarty->registered_resources[$type]);
+ }
+ }
+
+
+ /**
+ * Registers object to be used in templates
+ *
+ * @param string $object name of template object
+ * @param object $ &$object_impl the referenced PHP object to register
+ * @param mixed $ null | array $allowed list of allowed methods (empty = all)
+ * @param boolean $smarty_args smarty argument format, else traditional
+ * @param mixed $ null | array $block_functs list of methods that are block format
+ */
+ function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+ {
+ // test if allowed methodes callable
+ if (!empty($allowed)) {
+ foreach ((array)$allowed as $method) {
+ if (!is_callable(array($object_impl, $method))) {
+ throw new SmartyException("Undefined method '$method' in registered object");
+ }
+ }
+ }
+ // test if block methodes callable
+ if (!empty($block_methods)) {
+ foreach ((array)$block_methods as $method) {
+ if (!is_callable(array($object_impl, $method))) {
+ throw new SmartyException("Undefined method '$method' in registered object");
+ }
+ }
+ }
+ // register the object
+ $this->smarty->registered_objects[$object_name] =
+ array($object_impl, (array)$allowed, (boolean)$smarty_args, (array)$block_methods);
+ }
+
+ /**
+ * Registers static classes to be used in templates
+ *
+ * @param string $class name of template class
+ * @param string $class_impl the referenced PHP class to register
+ */
+ function registerClass($class_name, $class_impl)
+ {
+ // test if exists
+ if (!class_exists($class_impl)) {
+ throw new SmartyException("Undefined class '$class_impl' in register template class");
+ }
+ // register the class
+ $this->smarty->registered_classes[$class_name] = $class_impl;
+ }
+
+ /**
+ * Registers a default plugin handler
+ *
+ * @param $callback mixed string | array $plugin class/methode name
+ */
+ function registerDefaultPluginHandler($callback)
+ {
+ if (is_callable($callback)) {
+ $this->smarty->default_plugin_handler_func = $callback;
+ } else {
+ throw new SmartyException("Default plugin handler '$callback' not callable");
+ }
+ }
+
+ /**
+ * Registers a default template handler
+ *
+ * @param $callback mixed string | array class/method name
+ */
+ function registerDefaultTemplateHandler($callback)
+ {
+ if (is_callable($callback)) {
+ $this->smarty->default_template_handler_func = $callback;
+ } else {
+ throw new SmartyException("Default template handler '$callback' not callable");
+ }
+ }
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_eval.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_eval.php
new file mode 100644
index 00000000000..178b0a2219f
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_eval.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource Eval
+ *
+ * Implements the strings as resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource Eval
+ */
+class Smarty_Internal_Resource_Eval {
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = true;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($template)
+ {
+ return true;
+ }
+
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string return 'string' as template source is not a file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ // no filepath for evaluated strings
+ // return "string" for compiler error messages
+ return 'eval:';
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return boolean false as string resources have no timestamp
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ // evaluated strings must always be compiled and have no timestamp
+ return false;
+ }
+
+ /**
+ * Retuen template source from resource name
+ *
+ * @param object $_template template object
+ * @return string content of template source
+ */
+ public function getTemplateSource($_template)
+ {
+ // return template string
+ $_template->template_source = $_template->resource_name;
+ return true;
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return boolean return false as compiled template is not stored
+ */
+ public function getCompiledFilepath($_template)
+ {
+ // no filepath for strings
+ return false;
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_extends.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_extends.php
new file mode 100644
index 00000000000..03b53c4dad9
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_extends.php
@@ -0,0 +1,176 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource Extends
+ *
+ * Implements the file system as resource for Smarty which does extend a chain of template files templates
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource Extends
+ */
+class Smarty_Internal_Resource_Extends {
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ $this->_rdl = preg_quote($smarty->right_delimiter);
+ $this->_ldl = preg_quote($smarty->left_delimiter);
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = false;
+ public $allFilepaths = array();
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @param object $_template template object
+ * @return boolean result
+ */
+ public function isExisting($_template)
+ {
+ $_template->getTemplateFilepath();
+ foreach ($this->allFilepaths as $_filepath) {
+ if ($_filepath === false) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string filepath to template source file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ $sha1String = '';
+ $_files = explode('|', $_template->resource_name);
+ foreach ($_files as $_file) {
+ $_filepath = $_template->buildTemplateFilepath ($_file);
+ if ($_filepath !== false) {
+ if (is_object($_template->smarty->security_policy)) {
+ $_template->smarty->security_policy->isTrustedResourceDir($_filepath);
+ }
+ }
+ $sha1String .= $_filepath;
+ $this->allFilepaths[$_file] = $_filepath;
+ }
+ $_template->templateUid = sha1($sha1String);
+ return $_filepath;
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return integer timestamp of template source file
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ return filemtime($_template->getTemplateFilepath());
+ }
+
+ /**
+ * Read template source from file
+ *
+ * @param object $_template template object
+ * @return string content of template source file
+ */
+ public function getTemplateSource($_template)
+ {
+ $this->template = $_template;
+ $_files = array_reverse($this->allFilepaths);
+ $_first = reset($_files);
+ $_last = end($_files);
+ foreach ($_files as $_file => $_filepath) {
+ if ($_filepath === false) {
+ throw new SmartyException("Unable to load template 'file : {$_file}'");
+ }
+ // read template file
+ if ($_filepath != $_first) {
+ $_template->properties['file_dependency'][sha1($_filepath)] = array($_filepath, filemtime($_filepath),'file');
+ }
+ $_template->template_filepath = $_filepath;
+ $_content = file_get_contents($_filepath);
+ if ($_filepath != $_last) {
+ if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $_open) !=
+ preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $_close)) {
+ $this->smarty->triggerError("unmatched {block} {/block} pairs in file '$_filepath'");
+ }
+ preg_match_all("!{$this->_ldl}block\s(.+?){$this->_rdl}|{$this->_ldl}/block{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE);
+ $_result_count = count($_result[0]);
+ $_start = 0;
+ while ($_start < $_result_count) {
+ $_end = 0;
+ $_level = 1;
+ while ($_level != 0) {
+ $_end++;
+ if (!strpos($_result[0][$_start + $_end][0], '/')) {
+ $_level++;
+ } else {
+ $_level--;
+ }
+ }
+ $_block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.parent' . $this->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',
+ substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0])));
+ Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $_template, $_filepath);
+ $_start = $_start + $_end + 1;
+ }
+ } else {
+ $_template->template_source = $_content;
+ return true;
+ }
+ }
+ }
+
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return string return path to compiled template
+ */
+ public function getCompiledFilepath($_template)
+ {
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ $_files = explode('|', $_template->resource_name);
+ // calculate Uid if not already done
+ if ($_template->templateUid == '') {
+ $_template->getTemplateFilepath();
+ }
+ $_filepath = $_template->templateUid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ if ($_template->caching) {
+ $_cache = '.cache';
+ } else {
+ $_cache = '';
+ }
+ $_compile_dir = $_template->smarty->compile_dir;
+ if (substr($_compile_dir, -1) != DS) {
+ $_compile_dir .= DS;
+ }
+ return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_files[count($_files)-1]) . $_cache . '.php';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_file.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_file.php
new file mode 100644
index 00000000000..5b1a0d694c4
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_file.php
@@ -0,0 +1,128 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource File
+ *
+ * Implements the file system as resource for Smarty templates
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource File
+ */
+class Smarty_Internal_Resource_File {
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = false;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($template)
+ {
+ if ($template->getTemplateFilepath() === false) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string filepath to template source file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ $_filepath = $_template->buildTemplateFilepath ();
+
+ if ($_filepath !== false) {
+ if (is_object($_template->smarty->security_policy)) {
+ $_template->smarty->security_policy->isTrustedResourceDir($_filepath);
+ }
+ }
+ $_template->templateUid = sha1($_filepath);
+ return $_filepath;
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return integer timestamp of template source file
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ return filemtime($_template->getTemplateFilepath());
+ }
+
+ /**
+ * Read template source from file
+ *
+ * @param object $_template template object
+ * @return string content of template source file
+ */
+ public function getTemplateSource($_template)
+ {
+ // read template file
+ if (file_exists($_tfp = $_template->getTemplateFilepath())) {
+ $_template->template_source = file_get_contents($_tfp);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return string return path to compiled template
+ */
+ public function getCompiledFilepath($_template)
+ {
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ // calculate Uid if not already done
+ if ($_template->templateUid == '') {
+ $_template->getTemplateFilepath();
+ }
+ $_filepath = $_template->templateUid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ if ($_template->caching) {
+ $_cache = '.cache';
+ } else {
+ $_cache = '';
+ }
+ $_compile_dir = $_template->smarty->compile_dir;
+ if (strpos('/\\', substr($_compile_dir, -1)) === false) {
+ $_compile_dir .= DS;
+ }
+ return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name) . $_cache . '.php';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_php.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_php.php
new file mode 100644
index 00000000000..a847c62313a
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_php.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource PHP
+ *
+ * Implements the file system as resource for PHP templates
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource PHP
+ */
+class Smarty_Internal_Resource_PHP {
+ /**
+ * Class constructor, enable short open tags
+ */
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ ini_set('short_open_tag', '1');
+ }
+ // properties
+ public $usesCompiler = false;
+ public $isEvaluated = false;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($template)
+ {
+ if ($template->getTemplateFilepath() === false) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string filepath to template source file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ $_filepath = $_template->buildTemplateFilepath ();
+
+ if (is_object($_template->smarty->security_policy)) {
+ $_template->smarty->security_policy->isTrustedResourceDir($_filepath);
+ }
+ $_template->templateUid = sha1($_filepath);
+ return $_filepath;
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return integer timestamp of template source file
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ return filemtime($_template->getTemplateFilepath());
+ }
+
+ /**
+ * Read template source from file
+ *
+ * @param object $_template template object
+ * @return string content of template source file
+ */
+ public function getTemplateSource($_template)
+ {
+ if (file_exists($_tfp = $_template->getTemplateFilepath())) {
+ $_template->template_source = file_get_contents($_tfp);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return boolean return false as compiled template is not stored
+ */
+ public function getCompiledFilepath($_template)
+ {
+ // no filepath for PHP templates
+ return false;
+ }
+
+ /**
+ * renders the PHP template
+ */
+ public function renderUncompiled($_smarty_template)
+ {
+ if (!$this->smarty->allow_php_templates) {
+ throw new SmartyException("PHP templates are disabled");
+ }
+ if ($this->getTemplateFilepath($_smarty_template) === false) {
+ throw new SmartyException("Unable to load template \"{$_smarty_template->resource_type} : {$_smarty_template->resource_name}\"");
+ }
+ // prepare variables
+ $_smarty_ptr = $_smarty_template;
+ do {
+ foreach ($_smarty_ptr->tpl_vars as $_smarty_var => $_smarty_var_object) {
+ if (isset($_smarty_var_object->value)) {
+ $$_smarty_var = $_smarty_var_object->value;
+ }
+ }
+ $_smarty_ptr = $_smarty_ptr->parent;
+ } while ($_smarty_ptr != null);
+ unset ($_smarty_var, $_smarty_var_object, $_smarty_ptr);
+ // include PHP template
+ include($this->getTemplateFilepath($_smarty_template));
+ return;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_registered.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_registered.php
new file mode 100644
index 00000000000..aab929442e0
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_registered.php
@@ -0,0 +1,143 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource Registered
+ *
+ * Implements the registered resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource Registered
+ */
+class Smarty_Internal_Resource_Registered {
+ public function __construct($template, $resource_type = null)
+ {
+ $this->smarty = $template->smarty;
+ if (isset($resource_type)) {
+ $template->smarty->registerResource($resource_type,
+ array("smarty_resource_{$resource_type}_source",
+ "smarty_resource_{$resource_type}_timestamp",
+ "smarty_resource_{$resource_type}_secure",
+ "smarty_resource_{$resource_type}_trusted"));
+ }
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = false;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($_template)
+ {
+ if (is_integer($_template->getTemplateTimestamp())) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string return 'string' as template source is not a file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ $_filepath = $_template->resource_type .':'.$_template->resource_name;
+ $_template->templateUid = sha1($_filepath);
+ return $_filepath;
+ }
+
+ /**
+ * Get timestamp of template source
+ *
+ * @param object $_template template object
+ * @return int timestamp
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ // return timestamp
+ $time_stamp = false;
+ call_user_func_array($this->smarty->registered_resources[$_template->resource_type][0][1],
+ array($_template->resource_name, &$time_stamp, $this->smarty));
+ return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp;
+ }
+
+ /**
+ * Get timestamp of template source by type and name
+ *
+ * @param object $_template template object
+ * @return int timestamp
+ */
+ public function getTemplateTimestampTypeName($_resource_type, $_resource_name)
+ {
+ // return timestamp
+ $time_stamp = false;
+ call_user_func_array($this->smarty->registered_resources[$_resource_type][0][1],
+ array($_resource_name, &$time_stamp, $this->smarty));
+ return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp;
+ }
+
+ /**
+ * Retuen template source from resource name
+ *
+ * @param object $_template template object
+ * @return string content of template source
+ */
+ public function getTemplateSource($_template)
+ {
+ // return template string
+ return call_user_func_array($this->smarty->registered_resources[$_template->resource_type][0][0],
+ array($_template->resource_name, &$_template->template_source, $this->smarty));
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return boolean return false as compiled template is not stored
+ */
+ public function getCompiledFilepath($_template)
+ {
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!','_',$_template->compile_id) : null;
+ // calculate Uid if not already done
+ if ($_template->templateUid == '') {
+ $_template->getTemplateFilepath();
+ }
+ $_filepath = $_template->templateUid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ if ($_template->caching) {
+ $_cache = '.cache';
+ } else {
+ $_cache = '';
+ }
+ $_compile_dir = $_template->smarty->compile_dir;
+ if (strpos('/\\', substr($_compile_dir, -1)) === false) {
+ $_compile_dir .= DS;
+ }
+ return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name) . $_cache . '.php';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_stream.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_stream.php
new file mode 100644
index 00000000000..e0d4df6a9fc
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_stream.php
@@ -0,0 +1,99 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource Stream
+ *
+ * Implements the streams as resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource Stream
+ */
+class Smarty_Internal_Resource_Stream {
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = true;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($template)
+ {
+ if ($template->getTemplateSource() == '') {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string return 'string' as template source is not a file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ // no filepath for strings
+ // return resource name for compiler error messages
+ return str_replace(':', '://', $_template->template_resource);
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return boolean false as string resources have no timestamp
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ // strings must always be compiled and have no timestamp
+ return false;
+ }
+
+ /**
+ * Retuen template source from resource name
+ *
+ * @param object $_template template object
+ * @return string content of template source
+ */
+ public function getTemplateSource($_template)
+ {
+ // return template string
+ $_template->template_source = '';
+ $fp = fopen(str_replace(':', '://', $_template->template_resource),'r+');
+ while (!feof($fp)) {
+ $_template->template_source .= fgets($fp);
+ }
+ fclose($fp);
+
+ return true;
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return boolean return false as compiled template is not stored
+ */
+ public function getCompiledFilepath($_template)
+ {
+ // no filepath for strings
+ return false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_resource_string.php b/3dparty/Smarty/sysplugins/smarty_internal_resource_string.php
new file mode 100644
index 00000000000..b57c2f58beb
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_resource_string.php
@@ -0,0 +1,133 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource String
+ *
+ * Implements the strings as resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Resource String
+ */
+class Smarty_Internal_Resource_String {
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ // classes used for compiling Smarty templates from file resource
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+ // properties
+ public $usesCompiler = true;
+ public $isEvaluated = false;
+
+ /**
+ * Return flag if template source is existing
+ *
+ * @return boolean true
+ */
+ public function isExisting($template)
+ {
+ return true;
+ }
+
+ /**
+ * Get filepath to template source
+ *
+ * @param object $_template template object
+ * @return string return 'string' as template source is not a file
+ */
+ public function getTemplateFilepath($_template)
+ {
+ $_template->templateUid = sha1($_template->resource_name);
+ // no filepath for strings
+ // return "string" for compiler error messages
+ return 'string:';
+ }
+
+ /**
+ * Get timestamp to template source
+ *
+ * @param object $_template template object
+ * @return boolean false as string resources have no timestamp
+ */
+ public function getTemplateTimestamp($_template)
+ {
+ if ($this->isEvaluated) {
+ //must always be compiled and have no timestamp
+ return false;
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Get timestamp of template source by type and name
+ *
+ * @param object $_template template object
+ * @return int timestamp (always 0)
+ */
+ public function getTemplateTimestampTypeName($_resource_type, $_resource_name)
+ {
+ // return timestamp 0
+ return 0;
+ }
+
+
+ /**
+ * Retuen template source from resource name
+ *
+ * @param object $_template template object
+ * @return string content of template source
+ */
+ public function getTemplateSource($_template)
+ {
+ // return template string
+ $_template->template_source = $_template->resource_name;
+ return true;
+ }
+
+ /**
+ * Get filepath to compiled template
+ *
+ * @param object $_template template object
+ * @return boolean return false as compiled template is not stored
+ */
+ public function getCompiledFilepath($_template)
+ {
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ // calculate Uid if not already done
+ if ($_template->templateUid == '') {
+ $_template->getTemplateFilepath();
+ }
+ $_filepath = $_template->templateUid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ if ($_template->caching) {
+ $_cache = '.cache';
+ } else {
+ $_cache = '';
+ }
+ $_compile_dir = $_template->smarty->compile_dir;
+ if (strpos('/\\', substr($_compile_dir, -1)) === false) {
+ $_compile_dir .= DS;
+ }
+ return $_compile_dir . $_filepath . '.' . $_template->resource_type . $_cache . '.php';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php b/3dparty/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php
new file mode 100644
index 00000000000..43211b961ac
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Smarty Template Compiler Base
+ *
+ * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+require_once("smarty_internal_parsetree.php");
+
+/**
+ * Class SmartyTemplateCompiler
+ */
+class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCompilerBase {
+ // array of vars which can be compiled in local scope
+ public $local_var = array();
+ /**
+ * Initialize compiler
+ */
+ public function __construct($lexer_class, $parser_class, $smarty)
+ {
+ $this->smarty = $smarty;
+ parent::__construct();
+ // get required plugins
+ $this->lexer_class = $lexer_class;
+ $this->parser_class = $parser_class;
+ }
+
+ /**
+ * Methode to compile a Smarty template
+ *
+ * @param $_content template source
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ protected function doCompile($_content)
+ {
+ /* here is where the compiling takes place. Smarty
+ tags in the templates are replaces with PHP code,
+ then written to compiled files. */
+ // init the lexer/parser to compile the template
+ $this->lex = new $this->lexer_class($_content, $this);
+ $this->parser = new $this->parser_class($this->lex, $this);
+ if (isset($this->smarty->_parserdebug)) $this->parser->PrintTrace();
+ // get tokens from lexer and parse them
+ while ($this->lex->yylex() && !$this->abort_and_recompile) {
+ if (isset($this->smarty->_parserdebug)) echo "<pre>Line {$this->lex->line} Parsing {$this->parser->yyTokenName[$this->lex->token]} Token " . htmlentities($this->lex->value) . "</pre>";
+ $this->parser->doParse($this->lex->token, $this->lex->value);
+ }
+
+ if ($this->abort_and_recompile) {
+ // exit here on abort
+ return false;
+ }
+ // finish parsing process
+ $this->parser->doParse(0, 0);
+ // check for unclosed tags
+ if (count($this->_tag_stack) > 0) {
+ // get stacked info
+ list($_open_tag, $_data) = array_pop($this->_tag_stack);
+ $this->trigger_template_error("unclosed {" . $_open_tag . "} tag");
+ }
+ // return compiled code
+ // return str_replace(array("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue);
+ return $this->parser->retvalue;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_template.php b/3dparty/Smarty/sysplugins/smarty_internal_template.php
new file mode 100644
index 00000000000..dee4c9201f2
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_template.php
@@ -0,0 +1,998 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Template
+ *
+ * This file contains the Smarty template engine
+ *
+ * @package Smarty
+ * @subpackage Templates
+ * @author Uwe Tews
+ */
+
+/**
+ * Main class with template data structures and methods
+ */
+class Smarty_Internal_Template extends Smarty_Internal_Data {
+ // object cache
+ public $compiler_object = null;
+ public $cacher_object = null;
+ // Smarty parameter
+ public $cache_id = null;
+ public $compile_id = null;
+ public $caching = null;
+ public $cache_lifetime = null;
+ public $cacher_class = null;
+ public $caching_type = null;
+ public $forceNocache = false;
+ // Template resource
+ public $template_resource = null;
+ public $resource_type = null;
+ public $resource_name = null;
+// public $resource_object = null;
+ private $isExisting = null;
+ public $templateUid = '';
+ // Template source
+ public $template_filepath = null;
+ public $template_source = null;
+ private $template_timestamp = null;
+ // Compiled template
+ private $compiled_filepath = null;
+ public $compiled_template = null;
+ private $compiled_timestamp = null;
+ public $mustCompile = null;
+ public $suppressHeader = false;
+ public $suppressFileDependency = false;
+ public $has_nocache_code = false;
+ public $write_compiled_code = true;
+ // Rendered content
+ public $rendered_content = null;
+ // Cache file
+ private $cached_filepath = null;
+ public $cached_timestamp = null;
+ private $isCached = null;
+// private $cache_resource_object = null;
+ private $cacheFileChecked = false;
+ // template variables
+ public $tpl_vars = array();
+ public $parent = null;
+ public $config_vars = array();
+ // storage for plugin
+ public $plugin_data = array();
+ // special properties
+ public $properties = array ('file_dependency' => array(),
+ 'nocache_hash' => '',
+ 'function' => array());
+ // required plugins
+ public $required_plugins = array('compiled' => array(), 'nocache' => array());
+ public $saved_modifier = null;
+ public $smarty = null;
+ // blocks for template inheritance
+ public $block_data = array();
+ public $wrapper = null;
+ /**
+ * Create template data object
+ *
+ * Some of the global Smarty settings copied to template scope
+ * It load the required template resources and cacher plugins
+ *
+ * @param string $template_resource template resource string
+ * @param object $_parent back pointer to parent object with variables or null
+ * @param mixed $_cache_id cache id or null
+ * @param mixed $_compile_id compile id or null
+ */
+ public function __construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)
+ {
+ $this->smarty = &$smarty;
+ // Smarty parameter
+ $this->cache_id = $_cache_id === null ? $this->smarty->cache_id : $_cache_id;
+ $this->compile_id = $_compile_id === null ? $this->smarty->compile_id : $_compile_id;
+ $this->caching = $_caching === null ? $this->smarty->caching : $_caching;
+ if ($this->caching === true) $this->caching = Smarty::CACHING_LIFETIME_CURRENT;
+ $this->cache_lifetime = $_cache_lifetime === null ?$this->smarty->cache_lifetime : $_cache_lifetime;
+ $this->parent = $_parent;
+ // dummy local smarty variable
+ $this->tpl_vars['smarty'] = new Smarty_Variable;
+ // Template resource
+ $this->template_resource = $template_resource;
+ // copy block data of template inheritance
+ if ($this->parent instanceof Smarty_Internal_Template) {
+ $this->block_data = $this->parent->block_data;
+ }
+
+ }
+
+ /**
+ * Returns the template filepath
+ *
+ * The template filepath is determined by the actual resource handler
+ *
+ * @return string the template filepath
+ */
+ public function getTemplateFilepath ()
+ {
+ return $this->template_filepath === null ?
+ $this->template_filepath = $this->resource_object->getTemplateFilepath($this) :
+ $this->template_filepath;
+ }
+
+ /**
+ * Returns the timpestamp of the template source
+ *
+ * The template timestamp is determined by the actual resource handler
+ *
+ * @return integer the template timestamp
+ */
+ public function getTemplateTimestamp ()
+ {
+ return $this->template_timestamp === null ?
+ $this->template_timestamp = $this->resource_object->getTemplateTimestamp($this) :
+ $this->template_timestamp;
+ }
+
+ /**
+ * Returns the template source code
+ *
+ * The template source is being read by the actual resource handler
+ *
+ * @return string the template source
+ */
+ public function getTemplateSource ()
+ {
+ if ($this->template_source === null) {
+ if (!$this->resource_object->getTemplateSource($this)) {
+ throw new SmartyException("Unable to read template {$this->resource_type} '{$this->resource_name}'");
+ }
+ }
+ return $this->template_source;
+ }
+
+ /**
+ * Returns if the template is existing
+ *
+ * The status is determined by the actual resource handler
+ *
+ * @return boolean true if the template exists
+ */
+ public function isExisting ($error = false)
+ {
+ if ($this->isExisting === null) {
+ $this->isExisting = $this->resource_object->isExisting($this);
+ }
+ if (!$this->isExisting && $error) {
+ throw new SmartyException("Unable to load template {$this->resource_type} '{$this->resource_name}'");
+ }
+ return $this->isExisting;
+ }
+
+ /**
+ * Returns if the current template must be compiled by the Smarty compiler
+ *
+ * It does compare the timestamps of template source and the compiled templates and checks the force compile configuration
+ *
+ * @return boolean true if the template must be compiled
+ */
+ public function mustCompile ()
+ {
+ $this->isExisting(true);
+ if ($this->mustCompile === null) {
+ $this->mustCompile = ($this->resource_object->usesCompiler && ($this->smarty->force_compile || $this->resource_object->isEvaluated || $this->getCompiledTimestamp () === false ||
+ // ($this->smarty->compile_check && $this->getCompiledTimestamp () !== $this->getTemplateTimestamp ())));
+ ($this->smarty->compile_check && $this->getCompiledTimestamp () < $this->getTemplateTimestamp ())));
+ }
+ return $this->mustCompile;
+ }
+
+ /**
+ * Returns the compiled template filepath
+ *
+ * @return string the template filepath
+ */
+ public function getCompiledFilepath ()
+ {
+ return $this->compiled_filepath === null ?
+ ($this->compiled_filepath = !$this->resource_object->isEvaluated ? $this->resource_object->getCompiledFilepath($this) : false) :
+ $this->compiled_filepath;
+ }
+
+ /**
+ * Returns the timpestamp of the compiled template
+ *
+ * @return integer the template timestamp
+ */
+ public function getCompiledTimestamp ()
+ {
+ return $this->compiled_timestamp === null ?
+ ($this->compiled_timestamp = (!$this->resource_object->isEvaluated && file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false) :
+ $this->compiled_timestamp;
+ }
+
+ /**
+ * Returns the compiled template
+ *
+ * It checks if the template must be compiled or just read from the template resource
+ *
+ * @return string the compiled template
+ */
+ public function getCompiledTemplate ()
+ {
+ if ($this->compiled_template === null) {
+ // see if template needs compiling.
+ if ($this->mustCompile()) {
+ $this->compileTemplateSource();
+ } else {
+ if ($this->compiled_template === null) {
+ $this->compiled_template = !$this->resource_object->isEvaluated && $this->resource_object->usesCompiler ? file_get_contents($this->getCompiledFilepath()) : false;
+ }
+ }
+ }
+ return $this->compiled_template;
+ }
+
+ /**
+ * Compiles the template
+ *
+ * If the template is not evaluated the compiled template is saved on disk
+ */
+ public function compileTemplateSource ()
+ {
+ if (!$this->resource_object->isEvaluated) {
+ $this->properties['file_dependency'] = array();
+ $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp(),$this->resource_type);
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_compile($this);
+ }
+ // compile template
+ if (!is_object($this->compiler_object)) {
+ // load compiler
+ $this->smarty->loadPlugin($this->resource_object->compiler_class);
+ $this->compiler_object = new $this->resource_object->compiler_class($this->resource_object->template_lexer_class, $this->resource_object->template_parser_class, $this->smarty);
+ }
+ // compile locking
+ if ($this->smarty->compile_locking && !$this->resource_object->isEvaluated) {
+ if ($saved_timestamp = $this->getCompiledTimestamp()) {
+ touch($this->getCompiledFilepath());
+ }
+ }
+ // call compiler
+ try {
+ $this->compiler_object->compileTemplate($this);
+ }
+ catch (Exception $e) {
+ // restore old timestamp in case of error
+ if ($this->smarty->compile_locking && !$this->resource_object->isEvaluated && $saved_timestamp) {
+ touch($this->getCompiledFilepath(), $saved_timestamp);
+ }
+ throw $e;
+ }
+ // compiling succeded
+ if (!$this->resource_object->isEvaluated && $this->write_compiled_code) {
+ // write compiled template
+ Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->compiled_template, $this->smarty);
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_compile($this);
+ }
+ // release objects to free memory
+ Smarty_Internal_TemplateCompilerBase::$_tag_objects = array();
+ unset($this->compiler_object->parser->root_buffer,
+ $this->compiler_object->parser->current_buffer,
+ $this->compiler_object->parser,
+ $this->compiler_object->lex,
+ $this->compiler_object->template,
+ $this->compiler_object
+ );
+ }
+
+ /**
+ * Returns the filepath of the cached template output
+ *
+ * The filepath is determined by the actual cache resource
+ *
+ * @return string the cache filepath
+ */
+ public function getCachedFilepath ()
+ {
+ return $this->cached_filepath === null ?
+ $this->cached_filepath = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedFilepath($this) :
+ $this->cached_filepath;
+ }
+
+ /**
+ * Returns the timpestamp of the cached template output
+ *
+ * The timestamp is determined by the actual cache resource
+ *
+ * @return integer the template timestamp
+ */
+ public function getCachedTimestamp ()
+ {
+ return $this->cached_timestamp === null ?
+ $this->cached_timestamp = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedTimestamp($this) :
+ $this->cached_timestamp;
+ }
+
+ /**
+ * Returns the cached template output
+ *
+ * @return string |booelan the template content or false if the file does not exist
+ */
+ public function getCachedContent ()
+ {
+ return $this->rendered_content === null ?
+ $this->rendered_content = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedContents($this) :
+ $this->rendered_content;
+ }
+
+ /**
+ * Writes the cached template output
+ */
+ public function writeCachedContent ($content)
+ {
+ if ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) {
+ // don't write cache file
+ return false;
+ }
+ $this->properties['cache_lifetime'] = $this->cache_lifetime;
+ return $this->cache_resource_object->writeCachedContent($this, $this->createPropertyHeader(true) .$content);
+ }
+
+ /**
+ * Checks of a valid version redered HTML output is in the cache
+ *
+ * If the cache is valid the contents is stored in the template object
+ *
+ * @return boolean true if cache is valid
+ */
+ public function isCached ($template = null, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ if ($template === null) {
+ $no_render = true;
+ } elseif ($template === false) {
+ $no_render = false;
+ } else {
+ if ($parent === null) {
+ $parent = $this;
+ }
+ $this->smarty->isCached ($template, $cache_id, $compile_id, $parent);
+ }
+ if ($this->isCached === null) {
+ $this->isCached = false;
+ if (($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED) && !$this->resource_object->isEvaluated) {
+ $cachedTimestamp = $this->getCachedTimestamp();
+ if ($cachedTimestamp === false || $this->smarty->force_compile || $this->smarty->force_cache) {
+ return $this->isCached;
+ }
+ if ($this->caching === Smarty::CACHING_LIFETIME_SAVED || ($this->caching == Smarty::CACHING_LIFETIME_CURRENT && (time() <= ($cachedTimestamp + $this->cache_lifetime) || $this->cache_lifetime < 0))) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($this);
+ }
+ $this->rendered_content = $this->cache_resource_object->getCachedContents($this, $no_render);
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($this);
+ }
+ if ($this->cacheFileChecked) {
+ $this->isCached = true;
+ return $this->isCached;
+ }
+ $this->cacheFileChecked = true;
+ if ($this->caching === Smarty::CACHING_LIFETIME_SAVED && $this->properties['cache_lifetime'] >= 0 && (time() > ($this->getCachedTimestamp() + $this->properties['cache_lifetime']))) {
+ $this->tpl_vars = array();
+ $this->rendered_content = null;
+ return $this->isCached;
+ }
+ if (!empty($this->properties['file_dependency']) && $this->smarty->compile_check) {
+ $resource_type = null;
+ $resource_name = null;
+ foreach ($this->properties['file_dependency'] as $_file_to_check) {
+ If ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'extends' || $_file_to_check[2] == 'php') {
+ $mtime = filemtime($_file_to_check[0]);
+ } else {
+ $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name);
+ $resource_handler = $this->loadTemplateResourceHandler($resource_type);
+ $mtime = $resource_handler->getTemplateTimestampTypeName($resource_type, $resource_name);
+ }
+ // If ($mtime > $this->getCachedTimestamp()) {
+ If ($mtime > $_file_to_check[1]) {
+ $this->tpl_vars = array();
+ $this->rendered_content = null;
+ return $this->isCached;
+ }
+ }
+ }
+ $this->isCached = true;
+ }
+ }
+ }
+ return $this->isCached;
+ }
+
+ /**
+ * Render the output using the compiled template or the PHP template source
+ *
+ * The rendering process is accomplished by just including the PHP files.
+ * The only exceptions are evaluated templates (string template). Their code has
+ * to be evaluated
+ */
+ public function renderTemplate ()
+ {
+ if ($this->resource_object->usesCompiler) {
+ if ($this->mustCompile() && $this->compiled_template === null) {
+ $this->compileTemplateSource();
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_render($this);
+ }
+ $_smarty_tpl = $this;
+ ob_start();
+ if ($this->resource_object->isEvaluated) {
+ eval("?>" . $this->compiled_template);
+ } else {
+ include($this->getCompiledFilepath ());
+ // check file dependencies at compiled code
+ if ($this->smarty->compile_check) {
+ if (!empty($this->properties['file_dependency'])) {
+ $this->mustCompile = false;
+ $resource_type = null;
+ $resource_name = null;
+ foreach ($this->properties['file_dependency'] as $_file_to_check) {
+ If ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'extends' || $_file_to_check[2] == 'php') {
+ $mtime = filemtime($_file_to_check[0]);
+ } else {
+ $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name);
+ $resource_handler = $this->loadTemplateResourceHandler($resource_type);
+ $mtime = $resource_handler->getTemplateTimestampTypeName($resource_type, $resource_name);
+ }
+ // If ($mtime != $_file_to_check[1]) {
+ If ($mtime > $_file_to_check[1]) {
+ $this->mustCompile = true;
+ break;
+ }
+ }
+ if ($this->mustCompile) {
+ // recompile and render again
+ ob_get_clean();
+ $this->compileTemplateSource();
+ ob_start();
+ include($this->getCompiledFilepath ());
+ }
+ }
+ }
+ }
+ } else {
+ if (is_callable(array($this->resource_object, 'renderUncompiled'))) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_render($this);
+ }
+ ob_start();
+ $this->resource_object->renderUncompiled($this);
+ } else {
+ throw new SmartyException("Resource '$this->resource_type' must have 'renderUncompiled' methode");
+ }
+ }
+ $this->rendered_content = ob_get_clean();
+ if (!$this->resource_object->isEvaluated && empty($this->properties['file_dependency'][$this->templateUid])) {
+ $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp(),$this->resource_type);
+ }
+ if ($this->parent instanceof Smarty_Internal_Template) {
+ $this->parent->properties['file_dependency'] = array_merge($this->parent->properties['file_dependency'], $this->properties['file_dependency']);
+ foreach($this->required_plugins as $code => $tmp1) {
+ foreach($tmp1 as $name => $tmp) {
+ foreach($tmp as $type => $data) {
+ $this->parent->required_plugins[$code][$name][$type] = $data;
+ }
+ }
+ }
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_render($this);
+ }
+ // write to cache when nessecary
+ if (!$this->resource_object->isEvaluated && ($this->caching == Smarty::CACHING_LIFETIME_SAVED || $this->caching == Smarty::CACHING_LIFETIME_CURRENT)) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($this);
+ }
+ $this->properties['has_nocache_code'] = false;
+ // get text between non-cached items
+ $cache_split = preg_split("!/\*%%SmartyNocache:{$this->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$this->properties['nocache_hash']}%%\*/!s", $this->rendered_content);
+ // get non-cached items
+ preg_match_all("!/\*%%SmartyNocache:{$this->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$this->properties['nocache_hash']}%%\*/!s", $this->rendered_content, $cache_parts);
+ $output = '';
+ // loop over items, stitch back together
+ foreach($cache_split as $curr_idx => $curr_split) {
+ // escape PHP tags in template content
+ $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php echo \'$1\'; ?>', $curr_split);
+ if (isset($cache_parts[0][$curr_idx])) {
+ $this->properties['has_nocache_code'] = true;
+ // remove nocache tags from cache output
+ $output .= preg_replace("!/\*/?%%SmartyNocache:{$this->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
+ }
+ }
+ if (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output'])) {
+ $output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $this);
+ }
+ // rendering (must be done before writing cache file because of {function} nocache handling)
+ $_smarty_tpl = $this;
+ ob_start();
+ eval("?>" . $output);
+ $this->rendered_content = ob_get_clean();
+ // write cache file content
+ $this->writeCachedContent('<?php if (!$no_render) {?>'. $output. '<?php } ?>');
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($this);
+ }
+ } else {
+ // var_dump('renderTemplate', $this->has_nocache_code, $this->template_resource, $this->properties['nocache_hash'], $this->parent->properties['nocache_hash'], $this->rendered_content);
+ if ($this->has_nocache_code && !empty($this->properties['nocache_hash']) && !empty($this->parent->properties['nocache_hash'])) {
+ // replace nocache_hash
+ $this->rendered_content = preg_replace("/{$this->properties['nocache_hash']}/", $this->parent->properties['nocache_hash'], $this->rendered_content);
+ $this->parent->has_nocache_code = $this->has_nocache_code;
+ }
+ }
+ }
+
+ /**
+ * Returns the rendered HTML output
+ *
+ * If the cache is valid the cached content is used, otherwise
+ * the output is rendered from the compiled template or PHP template source
+ *
+ * @return string rendered HTML output
+ */
+ public function getRenderedTemplate ()
+ {
+ // disable caching for evaluated code
+ if ($this->resource_object->isEvaluated) {
+ $this->caching = false;
+ }
+ // checks if template exists
+ $this->isExisting(true);
+ // read from cache or render
+ if ($this->rendered_content === null) {
+ if ($this->isCached) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($this);
+ }
+ $this->rendered_content = $this->cache_resource_object->getCachedContents($this, false);
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($this);
+ }
+ }
+ if ($this->isCached === null) {
+ $this->isCached(false);
+ }
+ if (!$this->isCached) {
+ // render template (not loaded and not in cache)
+ $this->renderTemplate();
+ }
+ }
+ $this->updateParentVariables();
+ $this->isCached = null;
+ return $this->rendered_content;
+ }
+
+ /**
+ * Parse a template resource in its name and type
+ * Load required resource handler
+ *
+ * @param string $template_resource template resource specification
+ * @param string $resource_type return resource type
+ * @param string $resource_name return resource name
+ * @param object $resource_handler return resource handler object
+ */
+ public function parseResourceName($template_resource, &$resource_type, &$resource_name, &$resource_handler)
+ {
+ if (empty($template_resource))
+ return false;
+ $this->getResourceTypeName($template_resource, $resource_type, $resource_name);
+ $resource_handler = $this->loadTemplateResourceHandler($resource_type);
+ // cache template object under a unique ID
+ // do not cache eval resources
+ if ($resource_type != 'eval') {
+ $this->smarty->template_objects[sha1($this->template_resource . $this->cache_id . $this->compile_id)] = $this;
+ }
+ return true;
+ }
+
+ /**
+ * get system filepath to template
+ */
+ public function buildTemplateFilepath ($file = null)
+ {
+ if ($file == null) {
+ $file = $this->resource_name;
+ }
+ // relative file name?
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
+ foreach((array)$this->smarty->template_dir as $_template_dir) {
+ if (strpos('/\\', substr($_template_dir, -1)) === false) {
+ $_template_dir .= DS;
+ }
+ $_filepath = $_template_dir . $file;
+ if (file_exists($_filepath)) {
+ return $_filepath;
+ }
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
+ // try PHP include_path
+ if (($_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath)) !== false) {
+ return $_filepath;
+ }
+ }
+ }
+ }
+ // try absolute filepath
+ if (file_exists($file)) return $file;
+ // no tpl file found
+ if (!empty($this->smarty->default_template_handler_func)) {
+ if (!is_callable($this->smarty->default_template_handler_func)) {
+ throw new SmartyException("Default template handler not callable");
+ } else {
+ $_return = call_user_func_array($this->smarty->default_template_handler_func,
+ array($this->resource_type, $this->resource_name, &$this->template_source, &$this->template_timestamp, $this));
+ if (is_string($_return)) {
+ return $_return;
+ } elseif ($_return === true) {
+ return $file;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Update Smarty variables in other scopes
+ */
+ public function updateParentVariables ($scope = Smarty::SCOPE_LOCAL)
+ {
+ $has_root = false;
+ foreach ($this->tpl_vars as $_key => $_variable) {
+ $_variable_scope = $this->tpl_vars[$_key]->scope;
+ if ($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) {
+ continue;
+ }
+ if (isset($this->parent) && ($scope == Smarty::SCOPE_PARENT || $_variable_scope == Smarty::SCOPE_PARENT)) {
+ if (isset($this->parent->tpl_vars[$_key])) {
+ // variable is already defined in parent, copy value
+ $this->parent->tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value;
+ } else {
+ // create variable in parent
+ $this->parent->tpl_vars[$_key] = clone $_variable;
+ $this->parent->tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL;
+ }
+ }
+ if ($scope == Smarty::SCOPE_ROOT || $_variable_scope == Smarty::SCOPE_ROOT) {
+ if ($this->parent == null) {
+ continue;
+ }
+ if (!$has_root) {
+ // find root
+ $root_ptr = $this;
+ while ($root_ptr->parent != null) {
+ $root_ptr = $root_ptr->parent;
+ $has_root = true;
+ }
+ }
+ if (isset($root_ptr->tpl_vars[$_key])) {
+ // variable is already defined in root, copy value
+ $root_ptr->tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value;
+ } else {
+ // create variable in root
+ $root_ptr->tpl_vars[$_key] = clone $_variable;
+ $root_ptr->tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL;
+ }
+ }
+ if ($scope == Smarty::SCOPE_GLOBAL || $_variable_scope == Smarty::SCOPE_GLOBAL) {
+ if (isset(Smarty::$global_tpl_vars[$_key])) {
+ // variable is already defined in root, copy value
+ Smarty::$global_tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value;
+ } else {
+ // create global variable
+ Smarty::$global_tpl_vars[$_key] = clone $_variable;
+ }
+ Smarty::$global_tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL;
+ }
+ }
+ }
+
+ /**
+ * Split a template resource in its name and type
+ *
+ * @param string $template_resource template resource specification
+ * @param string $resource_type return resource type
+ * @param string $resource_name return resource name
+ */
+ protected function getResourceTypeName ($template_resource, &$resource_type, &$resource_name)
+ {
+ if (strpos($template_resource, ':') === false) {
+ // no resource given, use default
+ $resource_type = $this->smarty->default_resource_type;
+ $resource_name = $template_resource;
+ } else {
+ // get type and name from path
+ list($resource_type, $resource_name) = explode(':', $template_resource, 2);
+ if (strlen($resource_type) == 1) {
+ // 1 char is not resource type, but part of filepath
+ $resource_type = 'file';
+ $resource_name = $template_resource;
+ }
+ }
+ }
+
+ /**
+ * Load template resource handler by type
+ *
+ * @param string $resource_type template resource type
+ * @return object resource handler object
+ */
+ protected function loadTemplateResourceHandler ($resource_type)
+ {
+ // try registered resource
+ if (isset($this->smarty->registered_resources[$resource_type])) {
+ return new Smarty_Internal_Resource_Registered($this);
+ } else {
+ // try sysplugins dir
+ if (in_array($resource_type, array('file', 'string', 'extends', 'php', 'stream', 'eval'))) {
+ $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($resource_type);
+ return new $_resource_class($this->smarty);
+ } else {
+ // try plugins dir
+ $_resource_class = 'Smarty_Resource_' . ucfirst($resource_type);
+ if ($this->smarty->loadPlugin($_resource_class)) {
+ if (class_exists($_resource_class, false)) {
+ return new $_resource_class($this->smarty);
+ } else {
+ return new Smarty_Internal_Resource_Registered($this, $resource_type);
+ }
+ } else {
+ // try streams
+ $_known_stream = stream_get_wrappers();
+ if (in_array($resource_type, $_known_stream)) {
+ // is known stream
+ if (is_object($this->smarty->security_policy)) {
+ $this->smarty->security_policy->isTrustedStream($resource_type);
+ }
+ return new Smarty_Internal_Resource_Stream($this->smarty);
+ } else {
+ throw new SmartyException('Unkown resource type \'' . $resource_type . '\'');
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Create property header
+ */
+ public function createPropertyHeader ($cache = false)
+ {
+ $plugins_string = '';
+ // include code for plugins
+ if (!$cache) {
+ if (!empty($this->required_plugins['compiled'])) {
+ $plugins_string = '<?php ';
+ foreach($this->required_plugins['compiled'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable('{$data['function']}')) include '{$data['file']}';\n";
+ }
+ }
+ $plugins_string .= '?>';
+ }
+ if (!empty($this->required_plugins['nocache'])) {
+ $this->has_nocache_code = true;
+ $plugins_string .= "<?php echo '/*%%SmartyNocache:{$this->properties['nocache_hash']}%%*/<?php ";
+ foreach($this->required_plugins['nocache'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable(\'{$data['function']}\')) include \'{$data['file']}\';\n";
+ }
+ }
+ $plugins_string .= "?>/*/%%SmartyNocache:{$this->properties['nocache_hash']}%%*/';?>\n";
+ }
+ }
+ // build property code
+ $this->properties['has_nocache_code'] = $this->has_nocache_code;
+ $properties_string = "<?php /*%%SmartyHeaderCode:{$this->properties['nocache_hash']}%%*/" ;
+ if ($this->smarty->direct_access_security) {
+ $properties_string .= "if(!defined('SMARTY_DIR')) exit('no direct access allowed');\n";
+ }
+ if ($cache) {
+ // remove compiled code of{function} definition
+ unset($this->properties['function']);
+ if (!empty($this->smarty->template_functions)) {
+ // copy code of {function} tags called in nocache mode
+ foreach ($this->smarty->template_functions as $name => $function_data) {
+ if (isset($function_data['called_nocache'])) {
+ unset($function_data['called_nocache'], $this->smarty->template_functions[$name]['called_nocache']);
+ $this->properties['function'][$name] = $function_data;
+ }
+ }
+ }
+ }
+ $properties_string .= "\$_smarty_tpl->decodeProperties(" . var_export($this->properties, true) . "); /*/%%SmartyHeaderCode%%*/?>\n";
+ return $properties_string . $plugins_string;
+ }
+
+ /**
+ * Decode saved properties from compiled template and cache files
+ */
+ public function decodeProperties ($properties)
+ {
+ $this->has_nocache_code = $properties['has_nocache_code'];
+ $this->properties['nocache_hash'] = $properties['nocache_hash'];
+ if (isset($properties['cache_lifetime'])) {
+ $this->properties['cache_lifetime'] = $properties['cache_lifetime'];
+ }
+ if (isset($properties['file_dependency'])) {
+ $this->properties['file_dependency'] = array_merge($this->properties['file_dependency'], $properties['file_dependency']);
+ }
+ if (!empty($properties['function'])) {
+ $this->properties['function'] = array_merge($this->properties['function'], $properties['function']);
+ $this->smarty->template_functions = array_merge($this->smarty->template_functions, $properties['function']);
+ }
+ }
+
+ /**
+ * creates a local Smarty variable for array assignments
+ */
+ public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL)
+ {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $tpl_var_inst = $this->getVariable($tpl_var, null, true, false);
+ if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(array(), $nocache, $scope);
+ } else {
+ $this->tpl_vars[$tpl_var] = clone $tpl_var_inst;
+ if ($scope != Smarty::SCOPE_LOCAL) {
+ $this->tpl_vars[$tpl_var]->scope = $scope;
+ }
+ }
+ }
+ if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ }
+
+ /**
+ * [util function] counts an array, arrayaccess/traversable or PDOStatement object
+ * @param mixed $value
+ * @return int the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements
+ */
+ public function _count($value)
+ {
+ if (is_array($value) === true || $value instanceof Countable) {
+ return count($value);
+ } elseif ($value instanceof Iterator) {
+ $value->rewind();
+ if ($value->valid()) {
+ return iterator_count($value);
+ }
+ } elseif ($value instanceof PDOStatement) {
+ return $value->rowCount();
+ } elseif ($value instanceof Traversable) {
+ return iterator_count($value);
+ } elseif ($value instanceof ArrayAccess) {
+ if ($value->offsetExists(0)) {
+ return 1;
+ }
+ } elseif (is_object($value)) {
+ return count($value);
+ }
+ return 0;
+ }
+
+ /**
+ * wrapper for fetch
+ */
+ public function fetch ($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false)
+ {
+ if ($template == null) {
+ return $this->smarty->fetch($this);
+ } else {
+ if (!isset($parent)) {
+ $parent = $this;
+ }
+ return $this->smarty->fetch($template, $cache_id, $compile_id, $parent, $display);
+ }
+
+ }
+
+ /**
+ * wrapper for display
+ */
+ public function display ($template = null, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ if ($template == null) {
+ return $this->smarty->display($this);
+ } else {
+ if (!isset($parent)) {
+ $parent = $this;
+ }
+ return $this->smarty->display($template, $cache_id, $compile_id, $parent);
+ }
+
+ }
+
+ /**
+ * set Smarty property in template context
+ * @param string $property_name property name
+ * @param mixed $value value
+ */
+ public function __set($property_name, $value)
+ {
+ if ($property_name == 'resource_object' || $property_name == 'cache_resource_object') {
+ $this->$property_name = $value;
+ } elseif (property_exists($this->smarty, $property_name)) {
+ $this->smarty->$property_name = $value;
+ } else {
+ throw new SmartyException("invalid template property '$property_name'.");
+ }
+ }
+
+ /**
+ * get Smarty property in template context
+ * @param string $property_name property name
+ */
+ public function __get($property_name)
+ {
+ if ($property_name == 'resource_object') {
+ // load template resource
+ $this->resource_object = null;
+ if (!$this->parseResourceName ($this->template_resource, $this->resource_type, $this->resource_name, $this->resource_object)) {
+ throw new SmartyException ("Unable to parse resource name \"{$template_resource}\"");
+ }
+ return $this->resource_object;
+ }
+ if ($property_name == 'cache_resource_object') {
+ // load cache resource
+ $this->cache_resource_object = $this->loadCacheResource();
+ return $this->cache_resource_object;
+ }
+ if (property_exists($this->smarty, $property_name)) {
+ return $this->smarty->$property_name;
+ } else {
+ throw new SmartyException("template property '$property_name' does not exist.");
+ }
+ }
+
+
+ /**
+ * Takes unknown class methods and lazy loads sysplugin files for them
+ * class name format: Smarty_Method_MethodName
+ * plugin filename format: method.methodname.php
+ *
+ * @param string $name unknown methode name
+ * @param array $args aurgument array
+ */
+ public function __call($name, $args)
+ {
+ static $camel_func;
+ if (!isset($camel_func))
+ $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);');
+ // see if this is a set/get for a property
+ $first3 = strtolower(substr($name, 0, 3));
+ if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') {
+ // try to keep case correct for future PHP 6.0 case-sensitive class methods
+ // lcfirst() not available < PHP 5.3.0, so improvise
+ $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4);
+ // convert camel case to underscored name
+ $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name);
+ if (property_exists($this, $property_name)) {
+ if ($first3 == 'get')
+ return $this->$property_name;
+ else
+ return $this->$property_name = $args[0];
+ }
+ }
+ // Smarty Backward Compatible wrapper
+ if (strpos($name,'_') !== false) {
+ if (!isset($this->wrapper)) {
+ $this->wrapper = new Smarty_Internal_Wrapper($this);
+ }
+ return $this->wrapper->convert($name, $args);
+ }
+ // pass call to Smarty object
+ return call_user_func_array(array($this->smarty,$name),$args);
+ }
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_templatecompilerbase.php b/3dparty/Smarty/sysplugins/smarty_internal_templatecompilerbase.php
new file mode 100644
index 00000000000..57d022094b1
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_templatecompilerbase.php
@@ -0,0 +1,435 @@
+<?php
+/**
+ * Smarty Internal Plugin Smarty Template Compiler Base
+ *
+ * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Main compiler class
+ */
+class Smarty_Internal_TemplateCompilerBase {
+ // hash for nocache sections
+ private $nocache_hash = null;
+ // suppress generation of nocache code
+ public $suppressNocacheProcessing = false;
+ // compile tag objects
+ static $_tag_objects = array();
+ // tag stack
+ public $_tag_stack = array();
+ // current template
+ public $template = null;
+ // optional log of tag/attributes
+ public $used_tags = array();
+
+ /**
+ * Initialize compiler
+ */
+ public function __construct()
+ {
+ $this->nocache_hash = str_replace('.', '-', uniqid(rand(), true));
+ }
+
+ /**
+ * Methode to compile a Smarty template
+ *
+ * @param $template template object to compile
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ public function compileTemplate($template)
+ {
+ if (empty($template->properties['nocache_hash'])) {
+ $template->properties['nocache_hash'] = $this->nocache_hash;
+ } else {
+ $this->nocache_hash = $template->properties['nocache_hash'];
+ }
+ // flag for nochache sections
+ $this->nocache = false;
+ $this->tag_nocache = false;
+ // save template object in compiler class
+ $this->template = $template;
+ $this->smarty->_current_file = $this->template->getTemplateFilepath();
+ // template header code
+ $template_header = '';
+ if (!$template->suppressHeader) {
+ $template_header .= "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") . "\n";
+ $template_header .= " compiled from \"" . $this->template->getTemplateFilepath() . "\" */ ?>\n";
+ }
+
+ do {
+ // flag for aborting current and start recompile
+ $this->abort_and_recompile = false;
+ // get template source
+ $_content = $template->getTemplateSource();
+ // run prefilter if required
+ if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) {
+ $template->template_source = $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);
+ }
+ // on empty template just return header
+ if ($_content == '') {
+ if ($template->suppressFileDependency) {
+ $template->compiled_template = '';
+ } else {
+ $template->compiled_template = $template_header . $template->createPropertyHeader();
+ }
+ return true;
+ }
+ // call compiler
+ $_compiled_code = $this->doCompile($_content);
+ } while ($this->abort_and_recompile);
+ // return compiled code to template object
+ if ($template->suppressFileDependency) {
+ $template->compiled_template = $_compiled_code;
+ } else {
+ $template->compiled_template = $template_header . $template->createPropertyHeader() . $_compiled_code;
+ }
+ // run postfilter if required
+ if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
+ $template->compiled_template = Smarty_Internal_Filter_Handler::runFilter('post', $template->compiled_template, $template);
+ }
+ }
+
+ /**
+ * Compile Tag
+ *
+ * This is a call back from the lexer/parser
+ * It executes the required compile plugin for the Smarty tag
+ *
+ * @param string $tag tag name
+ * @param array $args array with tag attributes
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compileTag($tag, $args, $parameter = array())
+ {
+ // $args contains the attributes parsed and compiled by the lexer/parser
+ // assume that tag does compile into code, but creates no HTML output
+ $this->has_code = true;
+ $this->has_output = false;
+ // log tag/attributes
+ if (isset($this->smarty->get_used_tags) && $this->smarty->get_used_tags) {
+ $this->used_tags[] = array($tag,$args);
+ }
+ // check nocache option flag
+ if (in_array("'nocache'",$args) || in_array(array('nocache'=>'true'),$args)
+ || in_array(array('nocache'=>'"true"'),$args) || in_array(array('nocache'=>"'true'"),$args)) {
+ $this->tag_nocache = true;
+ }
+ // compile the smarty tag (required compile classes to compile the tag are autoloaded)
+ if (($_output = $this->callTagCompiler($tag, $args, $parameter)) === false) {
+ if (isset($this->smarty->template_functions[$tag])) {
+ // template defined by {template} tag
+ $args['_attr']['name'] = "'" . $tag . "'";
+ $_output = $this->callTagCompiler('call', $args, $parameter);
+ }
+ }
+ if ($_output !== false) {
+ if ($_output !== true) {
+ // did we get compiled code
+ if ($this->has_code) {
+ // Does it create output?
+ if ($this->has_output) {
+ $_output .= "\n";
+ }
+ // return compiled code
+ return $_output;
+ }
+ }
+ // tag did not produce compiled code
+ return '';
+ } else {
+ // map_named attributes
+ if (isset($args['_attr'])) {
+ foreach ($args['_attr'] as $key => $attribute) {
+ if (is_array($attribute)) {
+ $args = array_merge($args, $attribute);
+ }
+ }
+ }
+ // not an internal compiler tag
+ if (strlen($tag) < 6 || substr($tag, -5) != 'close') {
+ // check if tag is a registered object
+ if (isset($this->smarty->registered_objects[$tag]) && isset($parameter['object_methode'])) {
+ $methode = $parameter['object_methode'];
+ if (!in_array($methode, $this->smarty->registered_objects[$tag][3]) &&
+ (empty($this->smarty->registered_objects[$tag][1]) || in_array($methode, $this->smarty->registered_objects[$tag][1]))) {
+ return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $methode);
+ } elseif (in_array($methode, $this->smarty->registered_objects[$tag][3])) {
+ return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);
+ } else {
+ return $this->trigger_template_error ('unallowed methode "' . $methode . '" in registered object "' . $tag . '"', $this->lex->taglineno);
+ }
+ }
+ // check if tag is registered
+ foreach (array(Smarty::PLUGIN_COMPILER, Smarty::PLUGIN_FUNCTION, Smarty::PLUGIN_BLOCK) as $type) {
+ if (isset($this->smarty->registered_plugins[$type][$tag])) {
+ // if compiler function plugin call it now
+ if ($type == Smarty::PLUGIN_COMPILER) {
+ $new_args = array();
+ foreach ($args as $mixed) {
+ $new_args = array_merge($new_args, $mixed);
+ }
+ if (!$this->smarty->registered_plugins[$type][$tag][1]) {
+ $this->tag_nocache = true;
+ }
+ $function = $this->smarty->registered_plugins[$type][$tag][0];
+ if (!is_array($function)) {
+ return $function($new_args, $this);
+ } else if (is_object($function[0])) {
+ return $this->smarty->registered_plugins[$type][$tag][0][0]->$function[1]($new_args, $this);
+ } else {
+ return call_user_func_array($this->smarty->registered_plugins[$type][$tag][0], array($new_args, $this));
+ }
+ }
+ // compile registered function or block function
+ if ($type == Smarty::PLUGIN_FUNCTION || $type == Smarty::PLUGIN_BLOCK) {
+ return $this->callTagCompiler('private_registered_' . $type, $args, $parameter, $tag);
+ }
+ }
+ }
+ // check plugins from plugins folder
+ foreach ($this->smarty->plugin_search_order as $plugin_type) {
+ if ($plugin_type == Smarty::PLUGIN_BLOCK && $this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
+ $plugin = 'smarty_compiler_' . $tag;
+ if (is_callable($plugin)) {
+ // convert arguments format for old compiler plugins
+ $new_args = array();
+ foreach ($args as $mixed) {
+ $new_args = array_merge($new_args, $mixed);
+ }
+ return $plugin($new_args, $this->smarty);
+ }
+ if (class_exists($plugin, false)) {
+ $plugin_object = new $plugin;
+ if (method_exists($plugin_object, 'compile')) {
+ return $plugin_object->compile($args, $this);
+ }
+ }
+ throw new SmartyException("Plugin \"{$tag}\" not callable");
+ } else {
+ if ($function = $this->getPlugin($tag, $plugin_type)) {
+ return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $parameter, $tag, $function);
+ }
+ }
+ }
+ } else {
+ // compile closing tag of block function
+ $base_tag = substr($tag, 0, -5);
+ // check if closing tag is a registered object
+ if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_methode'])) {
+ $methode = $parameter['object_methode'];
+ if (in_array($methode, $this->smarty->registered_objects[$base_tag][3])) {
+ return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);
+ } else {
+ return $this->trigger_template_error ('unallowed closing tag methode "' . $methode . '" in registered object "' . $base_tag . '"', $this->lex->taglineno);
+ }
+ }
+ // registered block tag ?
+ if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {
+ return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag);
+ }
+ // block plugin?
+ if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {
+ return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function);
+ }
+ if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
+ $plugin = 'smarty_compiler_' . $tag;
+ if (is_callable($plugin)) {
+ return $plugin($args, $this->smarty);
+ }
+ if (class_exists($plugin, false)) {
+ $plugin_object = new $plugin;
+ if (method_exists($plugin_object, 'compile')) {
+ return $plugin_object->compile($args, $this);
+ }
+ }
+ throw new SmartyException("Plugin \"{$tag}\" not callable");
+ }
+ }
+ $this->trigger_template_error ("unknown tag \"" . $tag . "\"", $this->lex->taglineno);
+ }
+ }
+
+ /**
+ * lazy loads internal compile plugin for tag and calls the compile methode
+ *
+ * compile objects cached for reuse.
+ * class name format: Smarty_Internal_Compile_TagName
+ * plugin filename format: Smarty_Internal_Tagname.php
+ *
+ * @param $tag string tag name
+ * @param $args array with tag attributes
+ * @param $param1 optional parameter
+ * @param $param2 optional parameter
+ * @param $param3 optional parameter
+ * @return string compiled code
+ */
+ public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null)
+ {
+ // re-use object if already exists
+ if (isset(self::$_tag_objects[$tag])) {
+ // compile this tag
+ return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);
+ }
+ // lazy load internal compiler plugin
+ $class_name = 'Smarty_Internal_Compile_' . $tag;
+ if ($this->smarty->loadPlugin($class_name)) {
+ // use plugin if found
+ self::$_tag_objects[$tag] = new $class_name;
+ // compile this tag
+ return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);
+ }
+ // no internal compile plugin for this tag
+ return false;
+ }
+
+ /**
+ * Check for plugins and return function name
+ *
+ * @param $pugin_name string name of plugin or function
+ * @param $type string type of plugin
+ * @return string call name of function
+ */
+ public function getPlugin($plugin_name, $type)
+ {
+ $function = null;
+ if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
+ if (isset($this->template->required_plugins['nocache'][$plugin_name][$type])) {
+ $function = $this->template->required_plugins['nocache'][$plugin_name][$type]['function'];
+ } else if (isset($this->template->required_plugins['compiled'][$plugin_name][$type])) {
+ $this->template->required_plugins['nocache'][$plugin_name][$type] = $this->template->required_plugins['compiled'][$plugin_name][$type];
+ $function = $this->template->required_plugins['nocache'][$plugin_name][$type]['function'];
+ }
+ } else {
+ if (isset($this->template->required_plugins['compiled'][$plugin_name][$type])) {
+ $function = $this->template->required_plugins['compiled'][$plugin_name][$type]['function'];
+ } else if (isset($this->template->required_plugins['compiled'][$plugin_name][$type])) {
+ $this->template->required_plugins['compiled'][$plugin_name][$type] = $this->template->required_plugins['nocache'][$plugin_name][$type];
+ $function = $this->template->required_plugins['compiled'][$plugin_name][$type]['function'];
+ }
+ }
+ if (isset($function)) {
+ if ($type == 'modifier') {
+ $this->template->saved_modifier[$plugin_name] = true;
+ }
+ return $function;
+ }
+ // loop through plugin dirs and find the plugin
+ $function = 'smarty_' . $type . '_' . $plugin_name;
+ $found = false;
+ foreach((array)$this->smarty->plugins_dir as $_plugin_dir) {
+ $file = rtrim($_plugin_dir, '/\\') . DS . $type . '.' . $plugin_name . '.php';
+ if (file_exists($file)) {
+ // require_once($file);
+ $found = true;
+ break;
+ }
+ }
+ if ($found) {
+ if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
+ $this->template->required_plugins['nocache'][$plugin_name][$type]['file'] = $file;
+ $this->template->required_plugins['nocache'][$plugin_name][$type]['function'] = $function;
+ } else {
+ $this->template->required_plugins['compiled'][$plugin_name][$type]['file'] = $file;
+ $this->template->required_plugins['compiled'][$plugin_name][$type]['function'] = $function;
+ }
+ if ($type == 'modifier') {
+ $this->template->saved_modifier[$plugin_name] = true;
+ }
+ return $function;
+ }
+ if (is_callable($function)) {
+ // plugin function is defined in the script
+ return $function;
+ }
+ return false;
+ }
+ /**
+ * Inject inline code for nocache template sections
+ *
+ * This method gets the content of each template element from the parser.
+ * If the content is compiled code and it should be not cached the code is injected
+ * into the rendered output.
+ *
+ * @param string $content content of template element
+ * @param boolean $tag_nocache true if the parser detected a nocache situation
+ * @param boolean $is_code true if content is compiled code
+ * @return string content
+ */
+ public function processNocacheCode ($content, $is_code)
+ {
+ // If the template is not evaluated and we have a nocache section and or a nocache tag
+ if ($is_code && !empty($content)) {
+ // generate replacement code
+ if ((!$this->template->resource_object->isEvaluated || $this->template->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing &&
+ ($this->nocache || $this->tag_nocache || $this->template->forceNocache == 2)) {
+ $this->template->has_nocache_code = true;
+ $_output = str_replace("'", "\'", $content);
+ $_output = str_replace("^#^", "'", $_output);
+ $_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>";
+ // make sure we include modifer plugins for nocache code
+ if (isset($this->template->saved_modifier)) {
+ foreach ($this->template->saved_modifier as $plugin_name => $dummy) {
+ if (isset($this->template->required_plugins['compiled'][$plugin_name]['modifier'])) {
+ $this->template->required_plugins['nocache'][$plugin_name]['modifier'] = $this->template->required_plugins['compiled'][$plugin_name]['modifier'];
+ }
+ }
+ $this->template->saved_modifier = null;
+ }
+ } else {
+ $_output = $content;
+ }
+ } else {
+ $_output = $content;
+ }
+ $this->suppressNocacheProcessing = false;
+ $this->tag_nocache = false;
+ return $_output;
+ }
+ /**
+ * display compiler error messages without dying
+ *
+ * If parameter $args is empty it is a parser detected syntax error.
+ * In this case the parser is called to obtain information about expected tokens.
+ *
+ * If parameter $args contains a string this is used as error message
+ *
+ * @param $args string individual error message or null
+ */
+ public function trigger_template_error($args = null, $line = null)
+ {
+ // get template source line which has error
+ if (!isset($line)) {
+ $line = $this->lex->line;
+ }
+ $match = preg_split("/\n/", $this->lex->data);
+ $error_text = 'Syntax Error in template "' . $this->template->getTemplateFilepath() . '" on line ' . $line . ' "' . htmlspecialchars(trim(preg_replace('![\t\r\n]+!',' ',$match[$line-1]))) . '" ';
+ if (isset($args)) {
+ // individual error message
+ $error_text .= $args;
+ } else {
+ // expected token from parser
+ $error_text .= ' - Unexpected "' . $this->lex->value.'"';
+ if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4 ) {
+ foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
+ $exp_token = $this->parser->yyTokenName[$token];
+ if (isset($this->lex->smarty_token_names[$exp_token])) {
+ // token type from lexer
+ $expect[] = '"' . $this->lex->smarty_token_names[$exp_token] . '"';
+ } else {
+ // otherwise internal token name
+ $expect[] = $this->parser->yyTokenName[$token];
+ }
+ }
+ $error_text .= ', expected one of: ' . implode(' , ', $expect);
+ }
+ }
+ throw new SmartyCompilerException($error_text);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_templatelexer.php b/3dparty/Smarty/sysplugins/smarty_internal_templatelexer.php
new file mode 100644
index 00000000000..8c4d101e24c
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_templatelexer.php
@@ -0,0 +1,1182 @@
+<?php
+/**
+* Smarty Internal Plugin Templatelexer
+*
+* This is the lexer to break the template source into tokens
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+/**
+* Smarty Internal Plugin Templatelexer
+*/
+class Smarty_Internal_Templatelexer
+{
+ public $data;
+ public $counter;
+ public $token;
+ public $value;
+ public $node;
+ public $line;
+ public $taglineno;
+ public $state = 1;
+ public $strip = false;
+ private $heredoc_id_stack = Array();
+ public $smarty_token_names = array ( // Text for parser error messages
+ 'IDENTITY' => '===',
+ 'NONEIDENTITY' => '!==',
+ 'EQUALS' => '==',
+ 'NOTEQUALS' => '!=',
+ 'GREATEREQUAL' => '(>=,ge)',
+ 'LESSEQUAL' => '(<=,le)',
+ 'GREATERTHAN' => '(>,gt)',
+ 'LESSTHAN' => '(<,lt)',
+ 'MOD' => '(%,mod)',
+ 'NOT' => '(!,not)',
+ 'LAND' => '(&&,and)',
+ 'LOR' => '(||,or)',
+ 'LXOR' => 'xor',
+ 'OPENP' => '(',
+ 'CLOSEP' => ')',
+ 'OPENB' => '[',
+ 'CLOSEB' => ']',
+ 'PTR' => '->',
+ 'APTR' => '=>',
+ 'EQUAL' => '=',
+ 'NUMBER' => 'number',
+ 'UNIMATH' => '+" , "-',
+ 'MATH' => '*" , "/" , "%',
+ 'INCDEC' => '++" , "--',
+ 'SPACE' => ' ',
+ 'DOLLAR' => '$',
+ 'SEMICOLON' => ';',
+ 'COLON' => ':',
+ 'DOUBLECOLON' => '::',
+ 'AT' => '@',
+ 'HATCH' => '#',
+ 'QUOTE' => '"',
+ 'BACKTICK' => '`',
+ 'VERT' => '|',
+ 'DOT' => '.',
+ 'COMMA' => '","',
+ 'ANDSYM' => '"&"',
+ 'QMARK' => '"?"',
+ 'ID' => 'identifier',
+ 'OTHER' => 'text',
+ 'LINEBREAK' => 'newline',
+ 'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
+ 'PHPSTARTTAG' => 'PHP start tag',
+ 'PHPENDTAG' => 'PHP end tag',
+ 'LITERALSTART' => 'Literal start',
+ 'LITERALEND' => 'Literal end',
+ 'LDELSLASH' => 'closing tag',
+ 'COMMENT' => 'comment',
+ 'LITERALEND' => 'literal close',
+ 'AS' => 'as',
+ 'TO' => 'to',
+ );
+
+
+ function __construct($data,$compiler)
+ {
+// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
+ $this->data = $data;
+ $this->counter = 0;
+ $this->line = 1;
+ $this->smarty = $compiler->smarty;
+ $this->compiler = $compiler;
+ $this->ldel = preg_quote($this->smarty->left_delimiter,'/');
+ $this->ldel_length = strlen($this->smarty->left_delimiter);
+ $this->rdel = preg_quote($this->smarty->right_delimiter,'/');
+ $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
+ $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
+ }
+
+
+ private $_yy_state = 1;
+ private $_yy_stack = array();
+
+ function yylex()
+ {
+ return $this->{'yylex' . $this->_yy_state}();
+ }
+
+ function yypushstate($state)
+ {
+ array_push($this->_yy_stack, $this->_yy_state);
+ $this->_yy_state = $state;
+ }
+
+ function yypopstate()
+ {
+ $this->_yy_state = array_pop($this->_yy_stack);
+ }
+
+ function yybegin($state)
+ {
+ $this->_yy_state = $state;
+ }
+
+
+
+ function yylex1()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 1,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 0,
+ 12 => 1,
+ 14 => 0,
+ 15 => 0,
+ 16 => 0,
+ 17 => 0,
+ 18 => 0,
+ 19 => 0,
+ 20 => 0,
+ 21 => 0,
+ 22 => 0,
+ 23 => 2,
+ 26 => 0,
+ 27 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^(".$this->ldel."[$]smarty\\.block\\.child".$this->rdel.")|^(\\{\\})|^(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(".$this->ldel."strip".$this->rdel.")|^(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\/strip".$this->rdel.")|^(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."|<\\?|\\?>|<%|%>)))|^([\S\s]+)|^(.)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state TEXT');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const TEXT = 1;
+ function yy_r1_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;
+ }
+ function yy_r1_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r1_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COMMENT;
+ }
+ function yy_r1_5($yy_subpatterns)
+ {
+
+ if ($this->strip) {
+ return false;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LINEBREAK;
+ }
+ }
+ function yy_r1_6($yy_subpatterns)
+ {
+
+ $this->strip = true;
+ return false;
+ }
+ function yy_r1_7($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->strip = true;
+ return false;
+ }
+ }
+ function yy_r1_8($yy_subpatterns)
+ {
+
+ $this->strip = false;
+ return false;
+ }
+ function yy_r1_9($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->strip = false;
+ return false;
+ }
+ }
+ function yy_r1_10($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
+ $this->yypushstate(self::LITERAL);
+ }
+ function yy_r1_11($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_12($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_14($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_15($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_16($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_17($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r1_18($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r1_19($yy_subpatterns)
+ {
+
+ if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ } elseif ($this->value == '<?xml') {
+ $this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
+ $this->value = substr($this->value, 0, 2);
+ }
+ }
+ function yy_r1_20($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
+ }
+ function yy_r1_21($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ }
+ function yy_r1_22($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
+ }
+ function yy_r1_23($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r1_26($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r1_27($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+
+
+ function yylex2()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 1,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 0,
+ 12 => 0,
+ 13 => 0,
+ 14 => 0,
+ 15 => 0,
+ 16 => 0,
+ 17 => 0,
+ 18 => 0,
+ 19 => 0,
+ 20 => 1,
+ 22 => 1,
+ 24 => 1,
+ 26 => 0,
+ 27 => 0,
+ 28 => 0,
+ 29 => 0,
+ 30 => 0,
+ 31 => 0,
+ 32 => 0,
+ 33 => 0,
+ 34 => 0,
+ 35 => 0,
+ 36 => 0,
+ 37 => 0,
+ 38 => 0,
+ 39 => 0,
+ 40 => 0,
+ 41 => 0,
+ 42 => 0,
+ 43 => 3,
+ 47 => 0,
+ 48 => 0,
+ 49 => 0,
+ 50 => 0,
+ 51 => 0,
+ 52 => 0,
+ 53 => 0,
+ 54 => 0,
+ 55 => 1,
+ 57 => 1,
+ 59 => 0,
+ 60 => 0,
+ 61 => 0,
+ 62 => 0,
+ 63 => 0,
+ 64 => 0,
+ 65 => 0,
+ 66 => 0,
+ 67 => 0,
+ 68 => 0,
+ 69 => 0,
+ 70 => 0,
+ 71 => 0,
+ 72 => 0,
+ 73 => 0,
+ 74 => 0,
+ 75 => 0,
+ 76 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(\\s{1,}".$this->rdel.")|^(".$this->ldel."\/)|^(".$this->ldel.")|^(".$this->rdel.")|^(\\s+is\\s+in\\s+)|^(\\s+as\\s+)|^(\\s+to\\s+)|^(\\s+step\\s+)|^(\\s+instanceof\\s+)|^(\\s*===\\s*)|^(\\s*!==\\s*)|^(\\s*==\\s*|\\s+eq\\s+)|^(\\s*!=\\s*|\\s*<>\\s*|\\s+(ne|neq)\\s+)|^(\\s*>=\\s*|\\s+(ge|gte)\\s+)|^(\\s*<=\\s*|\\s+(le|lte)\\s+)|^(\\s*>\\s*|\\s+gt\\s+)|^(\\s*<\\s*|\\s+lt\\s+)|^(\\s+mod\\s+)|^(!\\s*|not\\s+)|^(\\s*&&\\s*|\\s*and\\s+)|^(\\s*\\|\\|\\s*|\\s*or\\s+)|^(\\s*xor\\s+)|^(\\s+is\\s+odd\\s+by\\s+)|^(\\s+is\\s+not\\s+odd\\s+by\\s+)|^(\\s+is\\s+odd)|^(\\s+is\\s+not\\s+odd)|^(\\s+is\\s+even\\s+by\\s+)|^(\\s+is\\s+not\\s+even\\s+by\\s+)|^(\\s+is\\s+even)|^(\\s+is\\s+not\\s+even)|^(\\s+is\\s+div\\s+by\\s+)|^(\\s+is\\s+not\\s+div\\s+by\\s+)|^(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|^(\\(\\s*)|^(\\s*\\))|^(\\[\\s*)|^(\\s*\\])|^(\\s*->\\s*)|^(\\s*=>\\s*)|^(\\s*=\\s*)|^(\\+\\+|--)|^(\\s*(\\+|-)\\s*)|^(\\s*(\\*|\/|%)\\s*)|^(\\$)|^(\\s*;)|^(::)|^(\\s*:\\s*)|^(@)|^(#)|^(\")|^(`)|^(\\|)|^(\\.)|^(\\s*,\\s*)|^(\\s*&\\s*)|^(\\s*\\?\\s*)|^(0[xX][0-9a-fA-F]+)|^([0-9]*[a-zA-Z_]\\w*)|^(\\d+)|^(\\s+)|^(.)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state SMARTY');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const SMARTY = 2;
+ function yy_r2_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
+ }
+ function yy_r2_2($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_3($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_5($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_6($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_7($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_8($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_RDEL;
+ $this->yypopstate();
+ }
+ }
+ function yy_r2_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r2_10($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r2_11($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_RDEL;
+ $this->yypopstate();
+ }
+ function yy_r2_12($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISIN;
+ }
+ function yy_r2_13($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_AS;
+ }
+ function yy_r2_14($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TO;
+ }
+ function yy_r2_15($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_STEP;
+ }
+ function yy_r2_16($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
+ }
+ function yy_r2_17($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
+ }
+ function yy_r2_18($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
+ }
+ function yy_r2_19($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_EQUALS;
+ }
+ function yy_r2_20($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
+ }
+ function yy_r2_22($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
+ }
+ function yy_r2_24($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
+ }
+ function yy_r2_26($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
+ }
+ function yy_r2_27($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
+ }
+ function yy_r2_28($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_MOD;
+ }
+ function yy_r2_29($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NOT;
+ }
+ function yy_r2_30($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LAND;
+ }
+ function yy_r2_31($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LOR;
+ }
+ function yy_r2_32($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LXOR;
+ }
+ function yy_r2_33($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
+ }
+ function yy_r2_34($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
+ }
+ function yy_r2_35($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISODD;
+ }
+ function yy_r2_36($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
+ }
+ function yy_r2_37($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
+ }
+ function yy_r2_38($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
+ }
+ function yy_r2_39($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
+ }
+ function yy_r2_40($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
+ }
+ function yy_r2_41($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
+ }
+ function yy_r2_42($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
+ }
+ function yy_r2_43($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
+ }
+ function yy_r2_47($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OPENP;
+ }
+ function yy_r2_48($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
+ }
+ function yy_r2_49($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OPENB;
+ }
+ function yy_r2_50($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
+ }
+ function yy_r2_51($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PTR;
+ }
+ function yy_r2_52($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_APTR;
+ }
+ function yy_r2_53($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_EQUAL;
+ }
+ function yy_r2_54($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INCDEC;
+ }
+ function yy_r2_55($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
+ }
+ function yy_r2_57($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_MATH;
+ }
+ function yy_r2_59($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
+ }
+ function yy_r2_60($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
+ }
+ function yy_r2_61($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
+ }
+ function yy_r2_62($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COLON;
+ }
+ function yy_r2_63($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_AT;
+ }
+ function yy_r2_64($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_HATCH;
+ }
+ function yy_r2_65($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
+ $this->yypushstate(self::DOUBLEQUOTEDSTRING);
+ }
+ function yy_r2_66($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
+ $this->yypopstate();
+ }
+ function yy_r2_67($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_VERT;
+ }
+ function yy_r2_68($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOT;
+ }
+ function yy_r2_69($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COMMA;
+ }
+ function yy_r2_70($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
+ }
+ function yy_r2_71($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QMARK;
+ }
+ function yy_r2_72($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_HEX;
+ }
+ function yy_r2_73($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ID;
+ }
+ function yy_r2_74($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INTEGER;
+ }
+ function yy_r2_75($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SPACE;
+ }
+ function yy_r2_76($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+
+
+
+ function yylex3()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 2,
+ 11 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."\/?literal".$this->rdel."|<\\?|<%)))|^(.)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state LITERAL');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const LITERAL = 3;
+ function yy_r3_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
+ $this->yypushstate(self::LITERAL);
+ }
+ function yy_r3_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
+ $this->yypopstate();
+ }
+ function yy_r3_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERAL;
+ }
+ function yy_r3_4($yy_subpatterns)
+ {
+
+ if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
+ $this->value = substr($this->value, 0, 2);
+ }
+ }
+ function yy_r3_5($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
+ }
+ function yy_r3_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ }
+ function yy_r3_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
+ }
+ function yy_r3_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERAL;
+ }
+ function yy_r3_11($yy_subpatterns)
+ {
+
+ $this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
+ }
+
+
+ function yylex4()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 1,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 0,
+ 12 => 0,
+ 13 => 3,
+ 17 => 0,
+ 18 => 0,
+ );
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$[0-9]*[a-zA-Z_]\\w*)|^(\\$)|^(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|^([\S\s]+)|^(.)/iS";
+
+ do {
+ if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ 'an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state DOUBLEQUOTEDSTRING');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += strlen($this->value);
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= strlen($this->data)) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const DOUBLEQUOTEDSTRING = 4;
+ function yy_r4_1($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_2($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_4($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_5($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_6($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
+ $this->yypopstate();
+ }
+ function yy_r4_10($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
+ $this->value = substr($this->value,0,-1);
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_11($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
+ }
+ function yy_r4_12($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r4_13($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r4_17($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r4_18($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_templateparser.php b/3dparty/Smarty/sysplugins/smarty_internal_templateparser.php
new file mode 100644
index 00000000000..ff5f6c15717
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_templateparser.php
@@ -0,0 +1,2966 @@
+<?php
+/**
+* Smarty Internal Plugin Templateparser
+*
+* This is the template parser.
+* It is generated from the internal.templateparser.y file
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+class TP_yyToken implements ArrayAccess
+{
+ public $string = '';
+ public $metadata = array();
+
+ function __construct($s, $m = array())
+ {
+ if ($s instanceof TP_yyToken) {
+ $this->string = $s->string;
+ $this->metadata = $s->metadata;
+ } else {
+ $this->string = (string) $s;
+ if ($m instanceof TP_yyToken) {
+ $this->metadata = $m->metadata;
+ } elseif (is_array($m)) {
+ $this->metadata = $m;
+ }
+ }
+ }
+
+ function __toString()
+ {
+ return $this->_string;
+ }
+
+ function offsetExists($offset)
+ {
+ return isset($this->metadata[$offset]);
+ }
+
+ function offsetGet($offset)
+ {
+ return $this->metadata[$offset];
+ }
+
+ function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ if (isset($value[0])) {
+ $x = ($value instanceof TP_yyToken) ?
+ $value->metadata : $value;
+ $this->metadata = array_merge($this->metadata, $x);
+ return;
+ }
+ $offset = count($this->metadata);
+ }
+ if ($value === null) {
+ return;
+ }
+ if ($value instanceof TP_yyToken) {
+ if ($value->metadata) {
+ $this->metadata[$offset] = $value->metadata;
+ }
+ } elseif ($value) {
+ $this->metadata[$offset] = $value;
+ }
+ }
+
+ function offsetUnset($offset)
+ {
+ unset($this->metadata[$offset]);
+ }
+}
+
+class TP_yyStackEntry
+{
+ public $stateno; /* The state-number */
+ public $major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ public $minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+
+
+#line 12 "smarty_internal_templateparser.y"
+class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php"
+{
+#line 14 "smarty_internal_templateparser.y"
+
+ const Err1 = "Security error: Call to private object member not allowed";
+ const Err2 = "Security error: Call to dynamic object member not allowed";
+ // states whether the parse was successful or not
+ public $successful = true;
+ public $retvalue = 0;
+ private $lex;
+ private $internalError = false;
+
+ function __construct($lex, $compiler) {
+ $this->lex = $lex;
+ $this->compiler = $compiler;
+ $this->smarty = $this->compiler->smarty;
+ $this->template = $this->compiler->template;
+ $this->compiler->has_variable_string = false;
+ $this->compiler->prefix_code = array();
+ $this->prefix_number = 0;
+ $this->block_nesting_level = 0;
+ if ($this->security = isset($this->smarty->security_policy)) {
+ $this->php_handling = $this->smarty->security_policy->php_handling;
+ } else {
+ $this->php_handling = $this->smarty->php_handling;
+ }
+ $this->is_xml = false;
+ $this->asp_tags = (ini_get('asp_tags') != '0');
+ $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);
+ }
+
+ public static function escape_start_tag($tag_text) {
+ $tag = preg_replace('/\A<\?(.*)\z/', '<<?php ?>?\1', $tag_text, -1 , $count); //Escape tag
+ return $tag;
+ }
+
+ public static function escape_end_tag($tag_text) {
+ return '?<?php ?>>';
+ }
+
+
+#line 121 "smarty_internal_templateparser.php"
+
+ const TP_VERT = 1;
+ const TP_COLON = 2;
+ const TP_COMMENT = 3;
+ const TP_PHPSTARTTAG = 4;
+ const TP_PHPENDTAG = 5;
+ const TP_ASPSTARTTAG = 6;
+ const TP_ASPENDTAG = 7;
+ const TP_FAKEPHPSTARTTAG = 8;
+ const TP_XMLTAG = 9;
+ const TP_OTHER = 10;
+ const TP_LINEBREAK = 11;
+ const TP_LITERALSTART = 12;
+ const TP_LITERALEND = 13;
+ const TP_LITERAL = 14;
+ const TP_LDEL = 15;
+ const TP_RDEL = 16;
+ const TP_DOLLAR = 17;
+ const TP_ID = 18;
+ const TP_EQUAL = 19;
+ const TP_PTR = 20;
+ const TP_LDELIF = 21;
+ const TP_SPACE = 22;
+ const TP_LDELFOR = 23;
+ const TP_SEMICOLON = 24;
+ const TP_INCDEC = 25;
+ const TP_TO = 26;
+ const TP_STEP = 27;
+ const TP_LDELFOREACH = 28;
+ const TP_AS = 29;
+ const TP_APTR = 30;
+ const TP_SMARTYBLOCKCHILD = 31;
+ const TP_LDELSLASH = 32;
+ const TP_INTEGER = 33;
+ const TP_COMMA = 34;
+ const TP_OPENP = 35;
+ const TP_CLOSEP = 36;
+ const TP_MATH = 37;
+ const TP_UNIMATH = 38;
+ const TP_ANDSYM = 39;
+ const TP_ISIN = 40;
+ const TP_ISDIVBY = 41;
+ const TP_ISNOTDIVBY = 42;
+ const TP_ISEVEN = 43;
+ const TP_ISNOTEVEN = 44;
+ const TP_ISEVENBY = 45;
+ const TP_ISNOTEVENBY = 46;
+ const TP_ISODD = 47;
+ const TP_ISNOTODD = 48;
+ const TP_ISODDBY = 49;
+ const TP_ISNOTODDBY = 50;
+ const TP_INSTANCEOF = 51;
+ const TP_QMARK = 52;
+ const TP_NOT = 53;
+ const TP_TYPECAST = 54;
+ const TP_HEX = 55;
+ const TP_DOT = 56;
+ const TP_SINGLEQUOTESTRING = 57;
+ const TP_DOUBLECOLON = 58;
+ const TP_AT = 59;
+ const TP_HATCH = 60;
+ const TP_OPENB = 61;
+ const TP_CLOSEB = 62;
+ const TP_EQUALS = 63;
+ const TP_NOTEQUALS = 64;
+ const TP_GREATERTHAN = 65;
+ const TP_LESSTHAN = 66;
+ const TP_GREATEREQUAL = 67;
+ const TP_LESSEQUAL = 68;
+ const TP_IDENTITY = 69;
+ const TP_NONEIDENTITY = 70;
+ const TP_MOD = 71;
+ const TP_LAND = 72;
+ const TP_LOR = 73;
+ const TP_LXOR = 74;
+ const TP_QUOTE = 75;
+ const TP_BACKTICK = 76;
+ const TP_DOLLARID = 77;
+ const YY_NO_ACTION = 584;
+ const YY_ACCEPT_ACTION = 583;
+ const YY_ERROR_ACTION = 582;
+
+ const YY_SZ_ACTTAB = 2566;
+static public $yy_action = array(
+ /* 0 */ 218, 272, 271, 275, 274, 278, 277, 276, 270, 262,
+ /* 10 */ 260, 264, 268, 196, 298, 285, 42, 22, 159, 265,
+ /* 20 */ 19, 29, 222, 374, 237, 29, 294, 29, 280, 149,
+ /* 30 */ 243, 19, 378, 225, 374, 244, 52, 47, 50, 45,
+ /* 40 */ 38, 37, 331, 332, 40, 39, 340, 337, 30, 25,
+ /* 50 */ 292, 299, 291, 290, 295, 190, 123, 342, 196, 279,
+ /* 60 */ 293, 135, 335, 322, 321, 308, 309, 310, 307, 306,
+ /* 70 */ 302, 303, 304, 305, 218, 242, 319, 175, 199, 133,
+ /* 80 */ 138, 19, 248, 72, 374, 124, 19, 288, 448, 374,
+ /* 90 */ 41, 14, 339, 311, 448, 29, 348, 329, 376, 320,
+ /* 100 */ 34, 583, 95, 273, 271, 275, 219, 3, 301, 3,
+ /* 110 */ 52, 47, 50, 45, 38, 37, 331, 332, 40, 39,
+ /* 120 */ 340, 337, 30, 25, 7, 231, 17, 108, 134, 167,
+ /* 130 */ 140, 35, 140, 143, 336, 192, 335, 322, 321, 308,
+ /* 140 */ 309, 310, 307, 306, 302, 303, 304, 305, 218, 334,
+ /* 150 */ 319, 193, 353, 10, 138, 3, 248, 55, 3, 119,
+ /* 160 */ 136, 36, 31, 371, 218, 19, 339, 311, 374, 29,
+ /* 170 */ 348, 329, 29, 320, 199, 27, 223, 258, 140, 372,
+ /* 180 */ 224, 140, 254, 220, 52, 47, 50, 45, 38, 37,
+ /* 190 */ 331, 332, 40, 39, 340, 337, 30, 25, 341, 179,
+ /* 200 */ 32, 159, 106, 323, 29, 194, 379, 342, 218, 288,
+ /* 210 */ 335, 322, 321, 308, 309, 310, 307, 306, 302, 303,
+ /* 220 */ 304, 305, 218, 366, 319, 199, 186, 218, 138, 190,
+ /* 230 */ 248, 72, 445, 124, 218, 266, 288, 364, 445, 123,
+ /* 240 */ 339, 311, 447, 29, 348, 329, 19, 320, 447, 374,
+ /* 250 */ 23, 3, 199, 16, 211, 29, 297, 170, 52, 47,
+ /* 260 */ 50, 45, 38, 37, 331, 332, 40, 39, 340, 337,
+ /* 270 */ 30, 25, 218, 172, 140, 183, 104, 46, 19, 189,
+ /* 280 */ 379, 374, 41, 288, 335, 322, 321, 308, 309, 310,
+ /* 290 */ 307, 306, 302, 303, 304, 305, 344, 188, 444, 199,
+ /* 300 */ 218, 235, 249, 216, 29, 191, 379, 342, 52, 47,
+ /* 310 */ 50, 45, 38, 37, 331, 332, 40, 39, 340, 337,
+ /* 320 */ 30, 25, 242, 19, 142, 43, 374, 130, 245, 28,
+ /* 330 */ 29, 159, 107, 346, 335, 322, 321, 308, 309, 310,
+ /* 340 */ 307, 306, 302, 303, 304, 305, 218, 347, 319, 27,
+ /* 350 */ 46, 257, 138, 198, 248, 62, 164, 119, 240, 218,
+ /* 360 */ 267, 252, 228, 126, 339, 311, 288, 205, 348, 329,
+ /* 370 */ 103, 320, 8, 261, 444, 357, 180, 376, 376, 29,
+ /* 380 */ 29, 29, 52, 47, 50, 45, 38, 37, 331, 332,
+ /* 390 */ 40, 39, 340, 337, 30, 25, 184, 349, 361, 365,
+ /* 400 */ 27, 284, 358, 29, 29, 29, 288, 29, 335, 322,
+ /* 410 */ 321, 308, 309, 310, 307, 306, 302, 303, 304, 305,
+ /* 420 */ 218, 319, 202, 221, 181, 138, 154, 248, 72, 171,
+ /* 430 */ 124, 313, 9, 162, 288, 289, 163, 339, 311, 288,
+ /* 440 */ 320, 348, 329, 288, 320, 376, 288, 281, 269, 370,
+ /* 450 */ 376, 214, 6, 29, 29, 29, 52, 47, 50, 45,
+ /* 460 */ 38, 37, 331, 332, 40, 39, 340, 337, 30, 25,
+ /* 470 */ 218, 178, 239, 283, 373, 19, 226, 238, 374, 29,
+ /* 480 */ 29, 288, 335, 322, 321, 308, 309, 310, 307, 306,
+ /* 490 */ 302, 303, 304, 305, 177, 205, 286, 202, 227, 377,
+ /* 500 */ 8, 166, 29, 376, 288, 29, 52, 47, 50, 45,
+ /* 510 */ 38, 37, 331, 332, 40, 39, 340, 337, 30, 25,
+ /* 520 */ 202, 218, 363, 375, 380, 315, 235, 296, 29, 29,
+ /* 530 */ 29, 29, 335, 322, 321, 308, 309, 310, 307, 306,
+ /* 540 */ 302, 303, 304, 305, 197, 369, 352, 19, 327, 218,
+ /* 550 */ 236, 29, 29, 165, 234, 156, 174, 52, 47, 50,
+ /* 560 */ 45, 38, 37, 331, 332, 40, 39, 340, 337, 30,
+ /* 570 */ 25, 26, 344, 5, 19, 314, 199, 212, 19, 199,
+ /* 580 */ 159, 241, 218, 335, 322, 321, 308, 309, 310, 307,
+ /* 590 */ 306, 302, 303, 304, 305, 218, 319, 300, 100, 46,
+ /* 600 */ 138, 19, 248, 76, 233, 124, 6, 218, 110, 351,
+ /* 610 */ 201, 338, 339, 311, 115, 168, 348, 329, 123, 320,
+ /* 620 */ 182, 338, 287, 234, 105, 288, 324, 338, 235, 240,
+ /* 630 */ 288, 52, 47, 50, 45, 38, 37, 331, 332, 40,
+ /* 640 */ 39, 340, 337, 30, 25, 218, 333, 144, 263, 33,
+ /* 650 */ 13, 342, 312, 156, 29, 355, 97, 335, 322, 321,
+ /* 660 */ 308, 309, 310, 307, 306, 302, 303, 304, 305, 338,
+ /* 670 */ 141, 32, 325, 121, 195, 131, 356, 229, 127, 2,
+ /* 680 */ 250, 52, 47, 50, 45, 38, 37, 331, 332, 40,
+ /* 690 */ 39, 340, 337, 30, 25, 318, 228, 11, 330, 94,
+ /* 700 */ 129, 282, 218, 253, 159, 29, 323, 335, 322, 321,
+ /* 710 */ 308, 309, 310, 307, 306, 302, 303, 304, 305, 218,
+ /* 720 */ 218, 319, 18, 101, 148, 122, 114, 248, 54, 44,
+ /* 730 */ 124, 202, 99, 158, 316, 367, 376, 339, 311, 338,
+ /* 740 */ 29, 348, 329, 376, 320, 338, 338, 354, 169, 368,
+ /* 750 */ 321, 321, 321, 321, 321, 52, 47, 50, 45, 38,
+ /* 760 */ 37, 331, 332, 40, 39, 340, 337, 30, 25, 218,
+ /* 770 */ 46, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 780 */ 113, 335, 322, 321, 308, 309, 310, 307, 306, 302,
+ /* 790 */ 303, 304, 305, 338, 321, 321, 321, 321, 321, 321,
+ /* 800 */ 321, 321, 321, 321, 256, 52, 47, 50, 45, 38,
+ /* 810 */ 37, 331, 332, 40, 39, 340, 337, 30, 25, 218,
+ /* 820 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 830 */ 321, 335, 322, 321, 308, 309, 310, 307, 306, 302,
+ /* 840 */ 303, 304, 305, 321, 321, 321, 321, 321, 321, 321,
+ /* 850 */ 321, 321, 321, 321, 321, 52, 47, 50, 45, 38,
+ /* 860 */ 37, 331, 332, 40, 39, 340, 337, 30, 25, 218,
+ /* 870 */ 12, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 880 */ 382, 335, 322, 321, 308, 309, 310, 307, 306, 302,
+ /* 890 */ 303, 304, 305, 321, 321, 321, 321, 321, 321, 321,
+ /* 900 */ 321, 321, 321, 321, 321, 52, 47, 50, 45, 38,
+ /* 910 */ 37, 331, 332, 40, 39, 340, 337, 30, 25, 321,
+ /* 920 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 930 */ 321, 335, 322, 321, 308, 309, 310, 307, 306, 302,
+ /* 940 */ 303, 304, 305, 218, 319, 321, 321, 321, 138, 321,
+ /* 950 */ 248, 61, 321, 124, 321, 98, 132, 321, 200, 321,
+ /* 960 */ 339, 311, 321, 321, 348, 329, 321, 320, 338, 338,
+ /* 970 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 52,
+ /* 980 */ 47, 50, 45, 38, 37, 331, 332, 40, 39, 340,
+ /* 990 */ 337, 30, 25, 218, 321, 321, 321, 321, 321, 321,
+ /* 1000 */ 321, 321, 321, 321, 321, 335, 322, 321, 308, 309,
+ /* 1010 */ 310, 307, 306, 302, 303, 304, 305, 321, 321, 321,
+ /* 1020 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 52,
+ /* 1030 */ 47, 50, 45, 38, 37, 331, 332, 40, 39, 340,
+ /* 1040 */ 337, 30, 25, 321, 321, 321, 321, 321, 321, 321,
+ /* 1050 */ 321, 321, 321, 321, 321, 335, 322, 321, 308, 309,
+ /* 1060 */ 310, 307, 306, 302, 303, 304, 305, 52, 47, 50,
+ /* 1070 */ 45, 38, 37, 331, 332, 40, 39, 340, 337, 30,
+ /* 1080 */ 25, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 1090 */ 321, 321, 321, 335, 322, 321, 308, 309, 310, 307,
+ /* 1100 */ 306, 302, 303, 304, 305, 321, 321, 321, 321, 42,
+ /* 1110 */ 321, 139, 207, 321, 319, 222, 321, 237, 138, 321,
+ /* 1120 */ 248, 78, 149, 124, 321, 378, 225, 232, 321, 15,
+ /* 1130 */ 339, 311, 49, 321, 348, 329, 321, 320, 321, 321,
+ /* 1140 */ 321, 321, 321, 321, 321, 321, 321, 51, 48, 317,
+ /* 1150 */ 247, 328, 321, 319, 103, 1, 255, 145, 321, 248,
+ /* 1160 */ 321, 321, 124, 321, 42, 321, 139, 209, 321, 96,
+ /* 1170 */ 222, 321, 237, 348, 329, 321, 320, 149, 345, 321,
+ /* 1180 */ 378, 225, 232, 24, 15, 321, 321, 49, 321, 222,
+ /* 1190 */ 321, 237, 321, 321, 321, 321, 149, 321, 321, 378,
+ /* 1200 */ 225, 321, 51, 48, 317, 247, 328, 321, 319, 103,
+ /* 1210 */ 1, 321, 146, 321, 248, 321, 321, 124, 321, 42,
+ /* 1220 */ 161, 130, 209, 193, 96, 222, 321, 237, 348, 329,
+ /* 1230 */ 288, 320, 149, 36, 31, 378, 225, 232, 321, 21,
+ /* 1240 */ 321, 321, 49, 350, 20, 343, 199, 319, 218, 321,
+ /* 1250 */ 321, 155, 321, 248, 321, 321, 124, 51, 48, 317,
+ /* 1260 */ 247, 328, 321, 450, 103, 1, 321, 348, 329, 450,
+ /* 1270 */ 320, 321, 321, 321, 42, 321, 125, 209, 321, 96,
+ /* 1280 */ 222, 321, 237, 321, 321, 321, 321, 149, 345, 321,
+ /* 1290 */ 378, 225, 232, 24, 4, 321, 321, 49, 46, 222,
+ /* 1300 */ 321, 237, 321, 321, 321, 321, 149, 321, 321, 378,
+ /* 1310 */ 225, 321, 51, 48, 317, 247, 328, 321, 319, 103,
+ /* 1320 */ 1, 321, 151, 321, 248, 321, 321, 124, 321, 42,
+ /* 1330 */ 176, 139, 204, 193, 96, 222, 321, 237, 348, 329,
+ /* 1340 */ 288, 320, 149, 36, 31, 378, 225, 215, 321, 15,
+ /* 1350 */ 321, 321, 49, 362, 20, 343, 199, 319, 218, 321,
+ /* 1360 */ 321, 150, 321, 248, 321, 321, 124, 51, 48, 317,
+ /* 1370 */ 247, 328, 321, 259, 103, 1, 321, 348, 329, 29,
+ /* 1380 */ 320, 321, 321, 321, 42, 173, 128, 92, 193, 96,
+ /* 1390 */ 222, 321, 237, 321, 218, 288, 321, 149, 36, 31,
+ /* 1400 */ 378, 225, 232, 321, 15, 321, 321, 49, 46, 381,
+ /* 1410 */ 321, 199, 319, 230, 321, 29, 152, 321, 248, 321,
+ /* 1420 */ 321, 124, 51, 48, 317, 247, 328, 321, 3, 103,
+ /* 1430 */ 1, 321, 348, 329, 321, 320, 321, 321, 321, 42,
+ /* 1440 */ 185, 139, 208, 102, 96, 222, 321, 237, 321, 321,
+ /* 1450 */ 288, 140, 149, 36, 31, 378, 225, 232, 321, 15,
+ /* 1460 */ 321, 321, 49, 321, 321, 321, 199, 319, 321, 321,
+ /* 1470 */ 321, 147, 321, 248, 321, 321, 124, 51, 48, 317,
+ /* 1480 */ 247, 328, 321, 321, 103, 1, 321, 348, 329, 321,
+ /* 1490 */ 320, 321, 321, 321, 42, 187, 139, 203, 193, 96,
+ /* 1500 */ 222, 321, 237, 321, 321, 288, 321, 149, 36, 31,
+ /* 1510 */ 378, 225, 232, 321, 15, 321, 160, 49, 321, 193,
+ /* 1520 */ 321, 199, 321, 321, 321, 321, 288, 321, 321, 36,
+ /* 1530 */ 31, 321, 51, 48, 317, 247, 328, 321, 321, 103,
+ /* 1540 */ 1, 321, 199, 321, 321, 321, 321, 321, 321, 42,
+ /* 1550 */ 321, 139, 206, 218, 96, 222, 321, 237, 321, 321,
+ /* 1560 */ 321, 321, 149, 321, 321, 378, 225, 232, 450, 15,
+ /* 1570 */ 321, 321, 49, 321, 450, 321, 321, 321, 321, 321,
+ /* 1580 */ 321, 246, 321, 321, 321, 321, 321, 51, 48, 317,
+ /* 1590 */ 247, 328, 321, 321, 103, 1, 321, 321, 321, 321,
+ /* 1600 */ 321, 321, 321, 46, 42, 321, 137, 209, 321, 96,
+ /* 1610 */ 222, 321, 237, 321, 321, 321, 321, 149, 321, 321,
+ /* 1620 */ 378, 225, 232, 321, 15, 321, 321, 49, 321, 321,
+ /* 1630 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 1640 */ 321, 321, 51, 48, 317, 247, 328, 321, 321, 103,
+ /* 1650 */ 1, 321, 321, 321, 321, 321, 321, 321, 321, 42,
+ /* 1660 */ 321, 130, 210, 321, 96, 222, 321, 237, 321, 321,
+ /* 1670 */ 321, 321, 149, 321, 321, 378, 225, 232, 321, 21,
+ /* 1680 */ 321, 321, 49, 321, 321, 321, 321, 321, 321, 321,
+ /* 1690 */ 321, 321, 321, 321, 321, 321, 321, 51, 48, 317,
+ /* 1700 */ 247, 328, 321, 321, 103, 321, 321, 321, 321, 321,
+ /* 1710 */ 321, 321, 321, 321, 42, 321, 130, 209, 321, 96,
+ /* 1720 */ 222, 321, 237, 321, 321, 321, 321, 149, 321, 321,
+ /* 1730 */ 378, 225, 232, 321, 21, 321, 321, 49, 321, 321,
+ /* 1740 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 1750 */ 321, 321, 51, 48, 317, 247, 328, 321, 321, 103,
+ /* 1760 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 493,
+ /* 1770 */ 321, 321, 321, 321, 96, 493, 321, 493, 321, 493,
+ /* 1780 */ 493, 321, 493, 321, 321, 321, 321, 493, 3, 493,
+ /* 1790 */ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ /* 1800 */ 321, 321, 321, 319, 493, 321, 321, 117, 321, 248,
+ /* 1810 */ 82, 140, 124, 321, 321, 493, 321, 321, 321, 339,
+ /* 1820 */ 311, 321, 321, 348, 329, 321, 320, 321, 321, 493,
+ /* 1830 */ 321, 321, 321, 321, 321, 321, 319, 217, 360, 321,
+ /* 1840 */ 117, 321, 248, 82, 321, 124, 321, 321, 321, 321,
+ /* 1850 */ 321, 321, 339, 311, 321, 321, 348, 329, 319, 320,
+ /* 1860 */ 321, 321, 138, 321, 248, 90, 321, 124, 321, 321,
+ /* 1870 */ 321, 359, 321, 321, 339, 311, 321, 321, 348, 329,
+ /* 1880 */ 321, 320, 321, 321, 321, 321, 319, 321, 321, 321,
+ /* 1890 */ 138, 321, 248, 69, 321, 124, 321, 321, 321, 321,
+ /* 1900 */ 321, 321, 339, 311, 321, 321, 348, 329, 321, 320,
+ /* 1910 */ 321, 321, 319, 321, 321, 321, 138, 321, 248, 67,
+ /* 1920 */ 321, 124, 321, 321, 321, 321, 321, 321, 339, 311,
+ /* 1930 */ 321, 321, 348, 329, 321, 320, 319, 321, 321, 321,
+ /* 1940 */ 138, 321, 248, 58, 321, 124, 321, 321, 321, 321,
+ /* 1950 */ 321, 321, 339, 311, 319, 321, 348, 329, 138, 320,
+ /* 1960 */ 248, 62, 321, 124, 321, 321, 321, 321, 321, 321,
+ /* 1970 */ 339, 311, 321, 321, 348, 329, 319, 320, 321, 321,
+ /* 1980 */ 138, 321, 248, 56, 321, 124, 321, 321, 321, 321,
+ /* 1990 */ 321, 321, 339, 311, 321, 321, 348, 329, 321, 320,
+ /* 2000 */ 321, 319, 321, 321, 321, 112, 321, 248, 71, 321,
+ /* 2010 */ 124, 321, 321, 321, 321, 321, 321, 339, 311, 319,
+ /* 2020 */ 321, 348, 329, 111, 320, 248, 81, 321, 124, 321,
+ /* 2030 */ 321, 321, 321, 321, 321, 339, 311, 319, 321, 348,
+ /* 2040 */ 329, 138, 320, 248, 74, 321, 124, 321, 321, 321,
+ /* 2050 */ 321, 321, 321, 339, 311, 321, 321, 348, 329, 319,
+ /* 2060 */ 320, 321, 321, 138, 321, 248, 91, 321, 124, 321,
+ /* 2070 */ 321, 321, 321, 321, 321, 339, 311, 321, 321, 348,
+ /* 2080 */ 329, 321, 320, 321, 319, 321, 321, 321, 138, 321,
+ /* 2090 */ 248, 64, 321, 124, 321, 321, 321, 321, 321, 321,
+ /* 2100 */ 339, 311, 319, 321, 348, 329, 138, 320, 248, 63,
+ /* 2110 */ 321, 124, 321, 321, 321, 321, 321, 321, 339, 311,
+ /* 2120 */ 319, 321, 348, 329, 138, 320, 248, 83, 321, 124,
+ /* 2130 */ 321, 321, 321, 321, 321, 321, 339, 311, 321, 321,
+ /* 2140 */ 348, 329, 319, 320, 321, 321, 138, 321, 248, 79,
+ /* 2150 */ 321, 124, 321, 321, 321, 321, 321, 321, 339, 311,
+ /* 2160 */ 321, 321, 348, 329, 321, 320, 321, 319, 321, 321,
+ /* 2170 */ 321, 138, 321, 248, 75, 321, 124, 321, 321, 321,
+ /* 2180 */ 321, 321, 321, 339, 311, 319, 321, 348, 329, 138,
+ /* 2190 */ 320, 248, 70, 321, 124, 321, 321, 321, 321, 321,
+ /* 2200 */ 321, 339, 311, 319, 321, 348, 329, 109, 320, 248,
+ /* 2210 */ 68, 321, 124, 321, 321, 321, 321, 321, 321, 339,
+ /* 2220 */ 311, 321, 321, 348, 329, 319, 320, 321, 321, 138,
+ /* 2230 */ 321, 248, 77, 321, 124, 321, 321, 321, 321, 321,
+ /* 2240 */ 321, 339, 311, 321, 321, 348, 329, 321, 320, 321,
+ /* 2250 */ 319, 321, 321, 321, 138, 321, 248, 73, 321, 124,
+ /* 2260 */ 321, 321, 321, 321, 321, 321, 339, 311, 319, 321,
+ /* 2270 */ 348, 329, 138, 320, 213, 65, 321, 124, 321, 321,
+ /* 2280 */ 321, 321, 321, 321, 339, 311, 319, 321, 348, 329,
+ /* 2290 */ 138, 320, 248, 86, 321, 124, 321, 321, 321, 321,
+ /* 2300 */ 321, 321, 339, 311, 321, 321, 348, 329, 319, 320,
+ /* 2310 */ 321, 321, 138, 321, 248, 88, 321, 124, 321, 321,
+ /* 2320 */ 321, 321, 321, 321, 339, 311, 321, 321, 348, 329,
+ /* 2330 */ 321, 320, 321, 319, 321, 321, 321, 93, 321, 120,
+ /* 2340 */ 59, 321, 116, 321, 321, 321, 321, 321, 321, 339,
+ /* 2350 */ 311, 319, 321, 348, 329, 138, 320, 248, 57, 321,
+ /* 2360 */ 124, 321, 321, 321, 321, 321, 321, 339, 311, 319,
+ /* 2370 */ 321, 348, 329, 138, 320, 248, 60, 321, 124, 321,
+ /* 2380 */ 321, 321, 321, 321, 321, 339, 311, 321, 321, 348,
+ /* 2390 */ 329, 319, 320, 321, 321, 138, 321, 248, 89, 321,
+ /* 2400 */ 124, 321, 321, 321, 321, 321, 321, 339, 311, 321,
+ /* 2410 */ 321, 348, 329, 321, 320, 321, 319, 321, 321, 321,
+ /* 2420 */ 138, 321, 248, 85, 321, 124, 321, 321, 321, 321,
+ /* 2430 */ 321, 321, 339, 311, 319, 321, 348, 329, 138, 320,
+ /* 2440 */ 248, 80, 321, 124, 321, 321, 321, 321, 321, 321,
+ /* 2450 */ 339, 311, 319, 321, 348, 329, 138, 320, 248, 84,
+ /* 2460 */ 321, 124, 321, 321, 321, 321, 321, 321, 339, 311,
+ /* 2470 */ 321, 321, 348, 329, 319, 320, 321, 321, 138, 321,
+ /* 2480 */ 248, 66, 321, 124, 321, 321, 321, 321, 321, 321,
+ /* 2490 */ 339, 311, 321, 321, 348, 329, 321, 320, 321, 319,
+ /* 2500 */ 321, 321, 321, 138, 321, 248, 87, 321, 124, 321,
+ /* 2510 */ 321, 321, 321, 321, 321, 339, 311, 319, 321, 348,
+ /* 2520 */ 329, 93, 320, 118, 53, 321, 116, 321, 321, 321,
+ /* 2530 */ 321, 321, 321, 339, 311, 319, 321, 348, 329, 153,
+ /* 2540 */ 320, 248, 319, 321, 124, 321, 157, 321, 248, 321,
+ /* 2550 */ 321, 124, 326, 321, 321, 348, 329, 321, 320, 251,
+ /* 2560 */ 321, 321, 348, 329, 321, 320,
+ );
+ static public $yy_lookahead = array(
+ /* 0 */ 1, 81, 82, 83, 3, 4, 5, 6, 7, 8,
+ /* 10 */ 9, 10, 11, 12, 22, 16, 15, 19, 20, 16,
+ /* 20 */ 15, 22, 21, 18, 23, 22, 83, 22, 85, 28,
+ /* 30 */ 94, 15, 31, 32, 18, 30, 37, 38, 39, 40,
+ /* 40 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 50 */ 4, 5, 6, 7, 8, 90, 58, 25, 12, 13,
+ /* 60 */ 14, 17, 63, 64, 65, 66, 67, 68, 69, 70,
+ /* 70 */ 71, 72, 73, 74, 1, 59, 82, 87, 113, 35,
+ /* 80 */ 86, 15, 88, 89, 18, 91, 15, 97, 16, 18,
+ /* 90 */ 19, 19, 98, 99, 22, 22, 102, 103, 108, 105,
+ /* 100 */ 27, 79, 80, 81, 82, 83, 112, 35, 76, 35,
+ /* 110 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ /* 120 */ 47, 48, 49, 50, 34, 59, 15, 84, 17, 18,
+ /* 130 */ 58, 15, 58, 17, 18, 114, 63, 64, 65, 66,
+ /* 140 */ 67, 68, 69, 70, 71, 72, 73, 74, 1, 33,
+ /* 150 */ 82, 90, 62, 30, 86, 35, 88, 89, 35, 91,
+ /* 160 */ 92, 100, 101, 16, 1, 15, 98, 99, 18, 22,
+ /* 170 */ 102, 103, 22, 105, 113, 34, 56, 36, 58, 16,
+ /* 180 */ 30, 58, 62, 20, 37, 38, 39, 40, 41, 42,
+ /* 190 */ 43, 44, 45, 46, 47, 48, 49, 50, 16, 87,
+ /* 200 */ 19, 20, 90, 107, 22, 109, 110, 25, 1, 97,
+ /* 210 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ /* 220 */ 73, 74, 1, 16, 82, 113, 87, 1, 86, 90,
+ /* 230 */ 88, 89, 16, 91, 1, 13, 97, 16, 22, 58,
+ /* 240 */ 98, 99, 16, 22, 102, 103, 15, 105, 22, 18,
+ /* 250 */ 19, 35, 113, 94, 112, 22, 25, 106, 37, 38,
+ /* 260 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ /* 270 */ 49, 50, 1, 87, 58, 106, 90, 51, 15, 109,
+ /* 280 */ 110, 18, 19, 97, 63, 64, 65, 66, 67, 68,
+ /* 290 */ 69, 70, 71, 72, 73, 74, 82, 114, 16, 113,
+ /* 300 */ 1, 91, 92, 93, 22, 109, 110, 25, 37, 38,
+ /* 310 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ /* 320 */ 49, 50, 59, 15, 17, 19, 18, 17, 18, 30,
+ /* 330 */ 22, 20, 118, 119, 63, 64, 65, 66, 67, 68,
+ /* 340 */ 69, 70, 71, 72, 73, 74, 1, 76, 82, 34,
+ /* 350 */ 51, 36, 86, 24, 88, 89, 87, 91, 92, 1,
+ /* 360 */ 36, 16, 56, 34, 98, 99, 97, 56, 102, 103,
+ /* 370 */ 60, 105, 61, 16, 16, 16, 106, 108, 108, 22,
+ /* 380 */ 22, 22, 37, 38, 39, 40, 41, 42, 43, 44,
+ /* 390 */ 45, 46, 47, 48, 49, 50, 87, 16, 16, 16,
+ /* 400 */ 34, 16, 36, 22, 22, 22, 97, 22, 63, 64,
+ /* 410 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ /* 420 */ 1, 82, 113, 88, 87, 86, 91, 88, 89, 87,
+ /* 430 */ 91, 18, 15, 87, 97, 16, 87, 98, 99, 97,
+ /* 440 */ 105, 102, 103, 97, 105, 108, 97, 16, 16, 16,
+ /* 450 */ 108, 112, 35, 22, 22, 22, 37, 38, 39, 40,
+ /* 460 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 470 */ 1, 87, 59, 16, 16, 15, 17, 18, 18, 22,
+ /* 480 */ 22, 97, 63, 64, 65, 66, 67, 68, 69, 70,
+ /* 490 */ 71, 72, 73, 74, 87, 56, 16, 113, 29, 16,
+ /* 500 */ 61, 106, 22, 108, 97, 22, 37, 38, 39, 40,
+ /* 510 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 520 */ 113, 1, 16, 16, 16, 16, 91, 92, 22, 22,
+ /* 530 */ 22, 22, 63, 64, 65, 66, 67, 68, 69, 70,
+ /* 540 */ 71, 72, 73, 74, 24, 16, 16, 15, 104, 1,
+ /* 550 */ 18, 22, 22, 90, 2, 111, 90, 37, 38, 39,
+ /* 560 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 570 */ 50, 19, 82, 35, 15, 18, 113, 18, 15, 113,
+ /* 580 */ 20, 18, 1, 63, 64, 65, 66, 67, 68, 69,
+ /* 590 */ 70, 71, 72, 73, 74, 1, 82, 16, 95, 51,
+ /* 600 */ 86, 15, 88, 89, 18, 91, 35, 1, 95, 119,
+ /* 610 */ 16, 108, 98, 99, 95, 87, 102, 103, 58, 105,
+ /* 620 */ 87, 108, 16, 2, 22, 97, 18, 108, 91, 92,
+ /* 630 */ 97, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ /* 640 */ 46, 47, 48, 49, 50, 1, 104, 17, 16, 26,
+ /* 650 */ 52, 25, 33, 111, 22, 60, 95, 63, 64, 65,
+ /* 660 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 108,
+ /* 670 */ 17, 19, 18, 18, 18, 17, 60, 18, 17, 22,
+ /* 680 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ /* 690 */ 46, 47, 48, 49, 50, 33, 56, 2, 18, 18,
+ /* 700 */ 18, 97, 1, 62, 20, 22, 107, 63, 64, 65,
+ /* 710 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 1,
+ /* 720 */ 1, 82, 22, 106, 96, 86, 95, 88, 89, 2,
+ /* 730 */ 91, 113, 95, 95, 110, 16, 108, 98, 99, 108,
+ /* 740 */ 22, 102, 103, 108, 105, 108, 108, 111, 106, 115,
+ /* 750 */ 120, 120, 120, 120, 120, 37, 38, 39, 40, 41,
+ /* 760 */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 1,
+ /* 770 */ 51, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 780 */ 95, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ /* 790 */ 72, 73, 74, 108, 120, 120, 120, 120, 120, 120,
+ /* 800 */ 120, 120, 120, 120, 36, 37, 38, 39, 40, 41,
+ /* 810 */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 1,
+ /* 820 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 830 */ 120, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ /* 840 */ 72, 73, 74, 120, 120, 120, 120, 120, 120, 120,
+ /* 850 */ 120, 120, 120, 120, 120, 37, 38, 39, 40, 41,
+ /* 860 */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 1,
+ /* 870 */ 2, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 880 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ /* 890 */ 72, 73, 74, 120, 120, 120, 120, 120, 120, 120,
+ /* 900 */ 120, 120, 120, 120, 120, 37, 38, 39, 40, 41,
+ /* 910 */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 120,
+ /* 920 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 930 */ 120, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ /* 940 */ 72, 73, 74, 1, 82, 120, 120, 120, 86, 120,
+ /* 950 */ 88, 89, 120, 91, 120, 95, 95, 120, 16, 120,
+ /* 960 */ 98, 99, 120, 120, 102, 103, 120, 105, 108, 108,
+ /* 970 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 37,
+ /* 980 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ /* 990 */ 48, 49, 50, 1, 120, 120, 120, 120, 120, 120,
+ /* 1000 */ 120, 120, 120, 120, 120, 63, 64, 65, 66, 67,
+ /* 1010 */ 68, 69, 70, 71, 72, 73, 74, 120, 120, 120,
+ /* 1020 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 37,
+ /* 1030 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ /* 1040 */ 48, 49, 50, 120, 120, 120, 120, 120, 120, 120,
+ /* 1050 */ 120, 120, 120, 120, 120, 63, 64, 65, 66, 67,
+ /* 1060 */ 68, 69, 70, 71, 72, 73, 74, 37, 38, 39,
+ /* 1070 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 1080 */ 50, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 1090 */ 120, 120, 120, 63, 64, 65, 66, 67, 68, 69,
+ /* 1100 */ 70, 71, 72, 73, 74, 120, 120, 120, 120, 15,
+ /* 1110 */ 120, 17, 18, 120, 82, 21, 120, 23, 86, 120,
+ /* 1120 */ 88, 89, 28, 91, 120, 31, 32, 33, 120, 35,
+ /* 1130 */ 98, 99, 38, 120, 102, 103, 120, 105, 120, 120,
+ /* 1140 */ 120, 120, 120, 120, 120, 120, 120, 53, 54, 55,
+ /* 1150 */ 56, 57, 120, 82, 60, 61, 62, 86, 120, 88,
+ /* 1160 */ 120, 120, 91, 120, 15, 120, 17, 18, 120, 75,
+ /* 1170 */ 21, 120, 23, 102, 103, 120, 105, 28, 10, 120,
+ /* 1180 */ 31, 32, 33, 15, 35, 120, 120, 38, 120, 21,
+ /* 1190 */ 120, 23, 120, 120, 120, 120, 28, 120, 120, 31,
+ /* 1200 */ 32, 120, 53, 54, 55, 56, 57, 120, 82, 60,
+ /* 1210 */ 61, 120, 86, 120, 88, 120, 120, 91, 120, 15,
+ /* 1220 */ 87, 17, 18, 90, 75, 21, 120, 23, 102, 103,
+ /* 1230 */ 97, 105, 28, 100, 101, 31, 32, 33, 120, 35,
+ /* 1240 */ 120, 120, 38, 75, 76, 77, 113, 82, 1, 120,
+ /* 1250 */ 120, 86, 120, 88, 120, 120, 91, 53, 54, 55,
+ /* 1260 */ 56, 57, 120, 16, 60, 61, 120, 102, 103, 22,
+ /* 1270 */ 105, 120, 120, 120, 15, 120, 17, 18, 120, 75,
+ /* 1280 */ 21, 120, 23, 120, 120, 120, 120, 28, 10, 120,
+ /* 1290 */ 31, 32, 33, 15, 35, 120, 120, 38, 51, 21,
+ /* 1300 */ 120, 23, 120, 120, 120, 120, 28, 120, 120, 31,
+ /* 1310 */ 32, 120, 53, 54, 55, 56, 57, 120, 82, 60,
+ /* 1320 */ 61, 120, 86, 120, 88, 120, 120, 91, 120, 15,
+ /* 1330 */ 87, 17, 18, 90, 75, 21, 120, 23, 102, 103,
+ /* 1340 */ 97, 105, 28, 100, 101, 31, 32, 33, 120, 35,
+ /* 1350 */ 120, 120, 38, 75, 76, 77, 113, 82, 1, 120,
+ /* 1360 */ 120, 86, 120, 88, 120, 120, 91, 53, 54, 55,
+ /* 1370 */ 56, 57, 120, 16, 60, 61, 120, 102, 103, 22,
+ /* 1380 */ 105, 120, 120, 120, 15, 87, 17, 18, 90, 75,
+ /* 1390 */ 21, 120, 23, 120, 1, 97, 120, 28, 100, 101,
+ /* 1400 */ 31, 32, 33, 120, 35, 120, 120, 38, 51, 16,
+ /* 1410 */ 120, 113, 82, 20, 120, 22, 86, 120, 88, 120,
+ /* 1420 */ 120, 91, 53, 54, 55, 56, 57, 120, 35, 60,
+ /* 1430 */ 61, 120, 102, 103, 120, 105, 120, 120, 120, 15,
+ /* 1440 */ 87, 17, 18, 90, 75, 21, 120, 23, 120, 120,
+ /* 1450 */ 97, 58, 28, 100, 101, 31, 32, 33, 120, 35,
+ /* 1460 */ 120, 120, 38, 120, 120, 120, 113, 82, 120, 120,
+ /* 1470 */ 120, 86, 120, 88, 120, 120, 91, 53, 54, 55,
+ /* 1480 */ 56, 57, 120, 120, 60, 61, 120, 102, 103, 120,
+ /* 1490 */ 105, 120, 120, 120, 15, 87, 17, 18, 90, 75,
+ /* 1500 */ 21, 120, 23, 120, 120, 97, 120, 28, 100, 101,
+ /* 1510 */ 31, 32, 33, 120, 35, 120, 87, 38, 120, 90,
+ /* 1520 */ 120, 113, 120, 120, 120, 120, 97, 120, 120, 100,
+ /* 1530 */ 101, 120, 53, 54, 55, 56, 57, 120, 120, 60,
+ /* 1540 */ 61, 120, 113, 120, 120, 120, 120, 120, 120, 15,
+ /* 1550 */ 120, 17, 18, 1, 75, 21, 120, 23, 120, 120,
+ /* 1560 */ 120, 120, 28, 120, 120, 31, 32, 33, 16, 35,
+ /* 1570 */ 120, 120, 38, 120, 22, 120, 120, 120, 120, 120,
+ /* 1580 */ 120, 29, 120, 120, 120, 120, 120, 53, 54, 55,
+ /* 1590 */ 56, 57, 120, 120, 60, 61, 120, 120, 120, 120,
+ /* 1600 */ 120, 120, 120, 51, 15, 120, 17, 18, 120, 75,
+ /* 1610 */ 21, 120, 23, 120, 120, 120, 120, 28, 120, 120,
+ /* 1620 */ 31, 32, 33, 120, 35, 120, 120, 38, 120, 120,
+ /* 1630 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 1640 */ 120, 120, 53, 54, 55, 56, 57, 120, 120, 60,
+ /* 1650 */ 61, 120, 120, 120, 120, 120, 120, 120, 120, 15,
+ /* 1660 */ 120, 17, 18, 120, 75, 21, 120, 23, 120, 120,
+ /* 1670 */ 120, 120, 28, 120, 120, 31, 32, 33, 120, 35,
+ /* 1680 */ 120, 120, 38, 120, 120, 120, 120, 120, 120, 120,
+ /* 1690 */ 120, 120, 120, 120, 120, 120, 120, 53, 54, 55,
+ /* 1700 */ 56, 57, 120, 120, 60, 120, 120, 120, 120, 120,
+ /* 1710 */ 120, 120, 120, 120, 15, 120, 17, 18, 120, 75,
+ /* 1720 */ 21, 120, 23, 120, 120, 120, 120, 28, 120, 120,
+ /* 1730 */ 31, 32, 33, 120, 35, 120, 120, 38, 120, 120,
+ /* 1740 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 1750 */ 120, 120, 53, 54, 55, 56, 57, 120, 120, 60,
+ /* 1760 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 16,
+ /* 1770 */ 120, 120, 120, 120, 75, 22, 120, 24, 120, 26,
+ /* 1780 */ 27, 120, 29, 120, 120, 120, 120, 34, 35, 36,
+ /* 1790 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ /* 1800 */ 120, 120, 120, 82, 51, 120, 120, 86, 120, 88,
+ /* 1810 */ 89, 58, 91, 120, 120, 62, 120, 120, 120, 98,
+ /* 1820 */ 99, 120, 120, 102, 103, 120, 105, 120, 120, 76,
+ /* 1830 */ 120, 120, 120, 120, 120, 120, 82, 116, 117, 120,
+ /* 1840 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 1850 */ 120, 120, 98, 99, 120, 120, 102, 103, 82, 105,
+ /* 1860 */ 120, 120, 86, 120, 88, 89, 120, 91, 120, 120,
+ /* 1870 */ 120, 117, 120, 120, 98, 99, 120, 120, 102, 103,
+ /* 1880 */ 120, 105, 120, 120, 120, 120, 82, 120, 120, 120,
+ /* 1890 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 1900 */ 120, 120, 98, 99, 120, 120, 102, 103, 120, 105,
+ /* 1910 */ 120, 120, 82, 120, 120, 120, 86, 120, 88, 89,
+ /* 1920 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99,
+ /* 1930 */ 120, 120, 102, 103, 120, 105, 82, 120, 120, 120,
+ /* 1940 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 1950 */ 120, 120, 98, 99, 82, 120, 102, 103, 86, 105,
+ /* 1960 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120,
+ /* 1970 */ 98, 99, 120, 120, 102, 103, 82, 105, 120, 120,
+ /* 1980 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 1990 */ 120, 120, 98, 99, 120, 120, 102, 103, 120, 105,
+ /* 2000 */ 120, 82, 120, 120, 120, 86, 120, 88, 89, 120,
+ /* 2010 */ 91, 120, 120, 120, 120, 120, 120, 98, 99, 82,
+ /* 2020 */ 120, 102, 103, 86, 105, 88, 89, 120, 91, 120,
+ /* 2030 */ 120, 120, 120, 120, 120, 98, 99, 82, 120, 102,
+ /* 2040 */ 103, 86, 105, 88, 89, 120, 91, 120, 120, 120,
+ /* 2050 */ 120, 120, 120, 98, 99, 120, 120, 102, 103, 82,
+ /* 2060 */ 105, 120, 120, 86, 120, 88, 89, 120, 91, 120,
+ /* 2070 */ 120, 120, 120, 120, 120, 98, 99, 120, 120, 102,
+ /* 2080 */ 103, 120, 105, 120, 82, 120, 120, 120, 86, 120,
+ /* 2090 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120,
+ /* 2100 */ 98, 99, 82, 120, 102, 103, 86, 105, 88, 89,
+ /* 2110 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99,
+ /* 2120 */ 82, 120, 102, 103, 86, 105, 88, 89, 120, 91,
+ /* 2130 */ 120, 120, 120, 120, 120, 120, 98, 99, 120, 120,
+ /* 2140 */ 102, 103, 82, 105, 120, 120, 86, 120, 88, 89,
+ /* 2150 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99,
+ /* 2160 */ 120, 120, 102, 103, 120, 105, 120, 82, 120, 120,
+ /* 2170 */ 120, 86, 120, 88, 89, 120, 91, 120, 120, 120,
+ /* 2180 */ 120, 120, 120, 98, 99, 82, 120, 102, 103, 86,
+ /* 2190 */ 105, 88, 89, 120, 91, 120, 120, 120, 120, 120,
+ /* 2200 */ 120, 98, 99, 82, 120, 102, 103, 86, 105, 88,
+ /* 2210 */ 89, 120, 91, 120, 120, 120, 120, 120, 120, 98,
+ /* 2220 */ 99, 120, 120, 102, 103, 82, 105, 120, 120, 86,
+ /* 2230 */ 120, 88, 89, 120, 91, 120, 120, 120, 120, 120,
+ /* 2240 */ 120, 98, 99, 120, 120, 102, 103, 120, 105, 120,
+ /* 2250 */ 82, 120, 120, 120, 86, 120, 88, 89, 120, 91,
+ /* 2260 */ 120, 120, 120, 120, 120, 120, 98, 99, 82, 120,
+ /* 2270 */ 102, 103, 86, 105, 88, 89, 120, 91, 120, 120,
+ /* 2280 */ 120, 120, 120, 120, 98, 99, 82, 120, 102, 103,
+ /* 2290 */ 86, 105, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 2300 */ 120, 120, 98, 99, 120, 120, 102, 103, 82, 105,
+ /* 2310 */ 120, 120, 86, 120, 88, 89, 120, 91, 120, 120,
+ /* 2320 */ 120, 120, 120, 120, 98, 99, 120, 120, 102, 103,
+ /* 2330 */ 120, 105, 120, 82, 120, 120, 120, 86, 120, 88,
+ /* 2340 */ 89, 120, 91, 120, 120, 120, 120, 120, 120, 98,
+ /* 2350 */ 99, 82, 120, 102, 103, 86, 105, 88, 89, 120,
+ /* 2360 */ 91, 120, 120, 120, 120, 120, 120, 98, 99, 82,
+ /* 2370 */ 120, 102, 103, 86, 105, 88, 89, 120, 91, 120,
+ /* 2380 */ 120, 120, 120, 120, 120, 98, 99, 120, 120, 102,
+ /* 2390 */ 103, 82, 105, 120, 120, 86, 120, 88, 89, 120,
+ /* 2400 */ 91, 120, 120, 120, 120, 120, 120, 98, 99, 120,
+ /* 2410 */ 120, 102, 103, 120, 105, 120, 82, 120, 120, 120,
+ /* 2420 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 120,
+ /* 2430 */ 120, 120, 98, 99, 82, 120, 102, 103, 86, 105,
+ /* 2440 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120,
+ /* 2450 */ 98, 99, 82, 120, 102, 103, 86, 105, 88, 89,
+ /* 2460 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99,
+ /* 2470 */ 120, 120, 102, 103, 82, 105, 120, 120, 86, 120,
+ /* 2480 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120,
+ /* 2490 */ 98, 99, 120, 120, 102, 103, 120, 105, 120, 82,
+ /* 2500 */ 120, 120, 120, 86, 120, 88, 89, 120, 91, 120,
+ /* 2510 */ 120, 120, 120, 120, 120, 98, 99, 82, 120, 102,
+ /* 2520 */ 103, 86, 105, 88, 89, 120, 91, 120, 120, 120,
+ /* 2530 */ 120, 120, 120, 98, 99, 82, 120, 102, 103, 86,
+ /* 2540 */ 105, 88, 82, 120, 91, 120, 86, 120, 88, 120,
+ /* 2550 */ 120, 91, 99, 120, 120, 102, 103, 120, 105, 99,
+ /* 2560 */ 120, 120, 102, 103, 120, 105,
+);
+ const YY_SHIFT_USE_DFLT = -9;
+ const YY_SHIFT_MAX = 250;
+ static public $yy_shift_ofst = array(
+ /* 0 */ 1, 1424, 1259, 1149, 1259, 1149, 1149, 1424, 1094, 1149,
+ /* 10 */ 1149, 1479, 1149, 1589, 1534, 1149, 1149, 1149, 1314, 1149,
+ /* 20 */ 1149, 1149, 1149, 1149, 1369, 1149, 1149, 1149, 1149, 1314,
+ /* 30 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149,
+ /* 40 */ 1149, 1149, 1369, 1149, 1204, 1204, 1644, 1699, 1699, 1699,
+ /* 50 */ 1699, 1699, 1699, 147, 221, -1, 73, 718, 718, 718,
+ /* 60 */ 768, 818, 644, 594, 345, 271, 419, 942, 469, 520,
+ /* 70 */ 868, 992, 992, 992, 992, 992, 992, 992, 992, 992,
+ /* 80 */ 992, 992, 992, 992, 992, 992, 992, 992, 992, 992,
+ /* 90 */ 1030, 1030, 1393, 1357, 233, 1, 1278, 150, 5, 308,
+ /* 100 */ 308, 311, 358, 310, 233, 44, 233, 1168, 46, 1552,
+ /* 110 */ 263, 1247, 226, 231, 71, 16, -2, 299, 182, 181,
+ /* 120 */ 282, 163, 719, 459, 560, 532, 44, 460, 559, 581,
+ /* 130 */ 460, 460, 460, 44, 563, 460, 632, 586, 548, 532,
+ /* 140 */ 459, 460, 460, 460, 460, 701, 701, 701, 683, 700,
+ /* 150 */ 701, 701, 701, 701, 684, 701, 684, -9, 66, 111,
+ /* 160 */ 3, 357, 359, 382, 381, 606, 439, 417, 509, 439,
+ /* 170 */ 439, 530, 508, 458, 207, 431, 480, 507, 506, 483,
+ /* 180 */ 439, 457, 432, 439, 529, 433, 385, 383, 727, 684,
+ /* 190 */ 701, 684, 727, 701, 684, 538, 222, -8, -8, -9,
+ /* 200 */ -9, -9, -9, 1753, 72, 116, 216, 120, 123, 74,
+ /* 210 */ 74, 141, 552, 32, 315, 306, 329, 90, 413, 366,
+ /* 220 */ 682, 616, 657, 659, 658, 655, 656, 661, 662, 641,
+ /* 230 */ 681, 680, 640, 695, 654, 652, 621, 602, 571, 557,
+ /* 240 */ 324, 538, 608, 307, 630, 595, 653, 619, 626, 623,
+ /* 250 */ 598,
+);
+ const YY_REDUCE_USE_DFLT = -81;
+ const YY_REDUCE_MAX = 202;
+ static public $yy_reduce_ofst = array(
+ /* 0 */ 22, 1721, 68, 339, 266, -6, 142, 1754, 862, 2020,
+ /* 10 */ 514, 1977, 1776, 2103, 1919, 1872, 1804, 1830, 2121, 2392,
+ /* 20 */ 2186, 2287, 2269, 2168, 2435, 2143, 639, 1955, 2085, 1937,
+ /* 30 */ 1032, 2060, 2038, 1894, 1854, 2002, 2352, 2417, 2370, 2334,
+ /* 40 */ 2204, 2226, 2251, 2309, 2460, 2453, 1071, 1126, 1275, 1385,
+ /* 50 */ 1330, 1236, 1165, 1353, 1408, 1243, 1429, 1298, 1133, 1353,
+ /* 60 */ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ /* 70 */ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ /* 80 */ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ /* 90 */ 61, 61, 186, 139, 112, -80, 214, -10, 342, 337,
+ /* 100 */ 269, 96, 309, 335, 384, 210, 407, 490, -57, -35,
+ /* 110 */ 270, -35, -35, 628, 270, 270, 170, -35, 528, 170,
+ /* 120 */ 528, 466, -35, 444, 170, 513, 435, 561, 519, 463,
+ /* 130 */ 519, 637, 395, 537, 861, 631, 533, 519, -35, 519,
+ /* 140 */ 542, 860, 685, 638, 503, -35, -35, -35, 346, 349,
+ /* 150 */ -35, -35, -35, -35, 170, -35, 196, -35, 635, 636,
+ /* 160 */ 604, 604, 604, 604, 604, 618, 599, 642, 604, 599,
+ /* 170 */ 599, 604, 604, 604, 618, 604, 604, 604, 604, 604,
+ /* 180 */ 599, 604, 604, 599, 604, 604, 604, 604, 634, 624,
+ /* 190 */ 618, 624, 634, 618, 624, 617, 43, -64, 159, 21,
+ /* 200 */ 169, 151, 183,
+);
+ static public $yyExpectedTokens = array(
+ /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, 32, ),
+ /* 1 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 2 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 3 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 4 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 5 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 6 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 7 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 8 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 62, 75, ),
+ /* 9 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 10 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 11 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 12 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 13 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 14 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 15 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 16 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 17 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 18 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 19 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 20 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 21 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 22 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 23 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 24 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 25 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 26 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 27 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 28 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 29 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 30 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 31 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 32 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 33 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 34 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 35 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 36 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 37 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 38 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 39 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 40 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 41 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 42 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 43 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 44 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 45 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 61, 75, ),
+ /* 46 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 47 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 48 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 49 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 50 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 51 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 52 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 35, 38, 53, 54, 55, 56, 57, 60, 75, ),
+ /* 53 */ array(1, 16, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 54 */ array(1, 16, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 55 */ array(1, 16, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 56 */ array(1, 22, 27, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 57 */ array(1, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 58 */ array(1, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 59 */ array(1, 22, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 60 */ array(1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 61 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 62 */ array(1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 63 */ array(1, 16, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 64 */ array(1, 16, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 65 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, ),
+ /* 66 */ array(1, 16, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 67 */ array(1, 16, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 68 */ array(1, 29, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 69 */ array(1, 24, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 70 */ array(1, 2, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 71 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 72 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 73 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 74 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 75 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 76 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 77 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 78 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 79 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 80 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 81 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 82 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 83 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 84 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 85 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 86 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 87 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 88 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 89 */ array(1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 90 */ array(37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 91 */ array(37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ),
+ /* 92 */ array(1, 16, 20, 22, 35, 58, ),
+ /* 93 */ array(1, 16, 22, 51, ),
+ /* 94 */ array(1, 22, ),
+ /* 95 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, 32, ),
+ /* 96 */ array(10, 15, 21, 23, 28, 31, 32, 75, 76, 77, ),
+ /* 97 */ array(15, 18, 22, 30, ),
+ /* 98 */ array(15, 18, 22, 30, ),
+ /* 99 */ array(15, 18, 22, ),
+ /* 100 */ array(15, 18, 22, ),
+ /* 101 */ array(20, 56, 61, ),
+ /* 102 */ array(1, 16, 22, ),
+ /* 103 */ array(17, 18, 60, ),
+ /* 104 */ array(1, 22, ),
+ /* 105 */ array(17, 35, ),
+ /* 106 */ array(1, 22, ),
+ /* 107 */ array(10, 15, 21, 23, 28, 31, 32, 75, 76, 77, ),
+ /* 108 */ array(4, 5, 6, 7, 8, 12, 13, 14, ),
+ /* 109 */ array(1, 16, 22, 29, 51, ),
+ /* 110 */ array(15, 18, 19, 59, ),
+ /* 111 */ array(1, 16, 22, 51, ),
+ /* 112 */ array(1, 16, 22, 51, ),
+ /* 113 */ array(15, 18, 19, 25, ),
+ /* 114 */ array(15, 18, 19, ),
+ /* 115 */ array(15, 18, 59, ),
+ /* 116 */ array(19, 20, 58, ),
+ /* 117 */ array(1, 30, 51, ),
+ /* 118 */ array(16, 22, 25, ),
+ /* 119 */ array(19, 20, 58, ),
+ /* 120 */ array(16, 22, 25, ),
+ /* 121 */ array(1, 16, 20, ),
+ /* 122 */ array(1, 16, 51, ),
+ /* 123 */ array(17, 18, ),
+ /* 124 */ array(20, 58, ),
+ /* 125 */ array(15, 18, ),
+ /* 126 */ array(17, 35, ),
+ /* 127 */ array(15, 18, ),
+ /* 128 */ array(15, 18, ),
+ /* 129 */ array(1, 16, ),
+ /* 130 */ array(15, 18, ),
+ /* 131 */ array(15, 18, ),
+ /* 132 */ array(15, 18, ),
+ /* 133 */ array(17, 35, ),
+ /* 134 */ array(15, 18, ),
+ /* 135 */ array(15, 18, ),
+ /* 136 */ array(16, 22, ),
+ /* 137 */ array(15, 18, ),
+ /* 138 */ array(1, 51, ),
+ /* 139 */ array(15, 18, ),
+ /* 140 */ array(17, 18, ),
+ /* 141 */ array(15, 18, ),
+ /* 142 */ array(15, 18, ),
+ /* 143 */ array(15, 18, ),
+ /* 144 */ array(15, 18, ),
+ /* 145 */ array(1, ),
+ /* 146 */ array(1, ),
+ /* 147 */ array(1, ),
+ /* 148 */ array(22, ),
+ /* 149 */ array(22, ),
+ /* 150 */ array(1, ),
+ /* 151 */ array(1, ),
+ /* 152 */ array(1, ),
+ /* 153 */ array(1, ),
+ /* 154 */ array(20, ),
+ /* 155 */ array(1, ),
+ /* 156 */ array(20, ),
+ /* 157 */ array(),
+ /* 158 */ array(15, 18, 59, ),
+ /* 159 */ array(15, 17, 18, ),
+ /* 160 */ array(16, 22, ),
+ /* 161 */ array(16, 22, ),
+ /* 162 */ array(16, 22, ),
+ /* 163 */ array(16, 22, ),
+ /* 164 */ array(16, 22, ),
+ /* 165 */ array(1, 16, ),
+ /* 166 */ array(56, 61, ),
+ /* 167 */ array(15, 35, ),
+ /* 168 */ array(16, 22, ),
+ /* 169 */ array(56, 61, ),
+ /* 170 */ array(56, 61, ),
+ /* 171 */ array(16, 22, ),
+ /* 172 */ array(16, 22, ),
+ /* 173 */ array(16, 22, ),
+ /* 174 */ array(1, 16, ),
+ /* 175 */ array(16, 22, ),
+ /* 176 */ array(16, 22, ),
+ /* 177 */ array(16, 22, ),
+ /* 178 */ array(16, 22, ),
+ /* 179 */ array(16, 22, ),
+ /* 180 */ array(56, 61, ),
+ /* 181 */ array(16, 22, ),
+ /* 182 */ array(16, 22, ),
+ /* 183 */ array(56, 61, ),
+ /* 184 */ array(16, 22, ),
+ /* 185 */ array(16, 22, ),
+ /* 186 */ array(16, 22, ),
+ /* 187 */ array(16, 22, ),
+ /* 188 */ array(2, ),
+ /* 189 */ array(20, ),
+ /* 190 */ array(1, ),
+ /* 191 */ array(20, ),
+ /* 192 */ array(2, ),
+ /* 193 */ array(1, ),
+ /* 194 */ array(20, ),
+ /* 195 */ array(35, ),
+ /* 196 */ array(13, ),
+ /* 197 */ array(22, ),
+ /* 198 */ array(22, ),
+ /* 199 */ array(),
+ /* 200 */ array(),
+ /* 201 */ array(),
+ /* 202 */ array(),
+ /* 203 */ array(16, 22, 24, 26, 27, 29, 34, 35, 36, 51, 58, 62, 76, ),
+ /* 204 */ array(16, 19, 22, 35, 58, ),
+ /* 205 */ array(15, 17, 18, 33, ),
+ /* 206 */ array(16, 22, 35, 58, ),
+ /* 207 */ array(35, 56, 58, 62, ),
+ /* 208 */ array(30, 35, 58, ),
+ /* 209 */ array(35, 58, ),
+ /* 210 */ array(35, 58, ),
+ /* 211 */ array(34, 36, ),
+ /* 212 */ array(2, 19, ),
+ /* 213 */ array(25, 76, ),
+ /* 214 */ array(34, 36, ),
+ /* 215 */ array(19, 56, ),
+ /* 216 */ array(24, 34, ),
+ /* 217 */ array(34, 62, ),
+ /* 218 */ array(18, 59, ),
+ /* 219 */ array(34, 36, ),
+ /* 220 */ array(18, ),
+ /* 221 */ array(60, ),
+ /* 222 */ array(22, ),
+ /* 223 */ array(18, ),
+ /* 224 */ array(17, ),
+ /* 225 */ array(18, ),
+ /* 226 */ array(18, ),
+ /* 227 */ array(17, ),
+ /* 228 */ array(33, ),
+ /* 229 */ array(62, ),
+ /* 230 */ array(18, ),
+ /* 231 */ array(18, ),
+ /* 232 */ array(56, ),
+ /* 233 */ array(2, ),
+ /* 234 */ array(18, ),
+ /* 235 */ array(19, ),
+ /* 236 */ array(2, ),
+ /* 237 */ array(22, ),
+ /* 238 */ array(35, ),
+ /* 239 */ array(18, ),
+ /* 240 */ array(36, ),
+ /* 241 */ array(35, ),
+ /* 242 */ array(18, ),
+ /* 243 */ array(17, ),
+ /* 244 */ array(17, ),
+ /* 245 */ array(60, ),
+ /* 246 */ array(17, ),
+ /* 247 */ array(33, ),
+ /* 248 */ array(25, ),
+ /* 249 */ array(26, ),
+ /* 250 */ array(52, ),
+ /* 251 */ array(),
+ /* 252 */ array(),
+ /* 253 */ array(),
+ /* 254 */ array(),
+ /* 255 */ array(),
+ /* 256 */ array(),
+ /* 257 */ array(),
+ /* 258 */ array(),
+ /* 259 */ array(),
+ /* 260 */ array(),
+ /* 261 */ array(),
+ /* 262 */ array(),
+ /* 263 */ array(),
+ /* 264 */ array(),
+ /* 265 */ array(),
+ /* 266 */ array(),
+ /* 267 */ array(),
+ /* 268 */ array(),
+ /* 269 */ array(),
+ /* 270 */ array(),
+ /* 271 */ array(),
+ /* 272 */ array(),
+ /* 273 */ array(),
+ /* 274 */ array(),
+ /* 275 */ array(),
+ /* 276 */ array(),
+ /* 277 */ array(),
+ /* 278 */ array(),
+ /* 279 */ array(),
+ /* 280 */ array(),
+ /* 281 */ array(),
+ /* 282 */ array(),
+ /* 283 */ array(),
+ /* 284 */ array(),
+ /* 285 */ array(),
+ /* 286 */ array(),
+ /* 287 */ array(),
+ /* 288 */ array(),
+ /* 289 */ array(),
+ /* 290 */ array(),
+ /* 291 */ array(),
+ /* 292 */ array(),
+ /* 293 */ array(),
+ /* 294 */ array(),
+ /* 295 */ array(),
+ /* 296 */ array(),
+ /* 297 */ array(),
+ /* 298 */ array(),
+ /* 299 */ array(),
+ /* 300 */ array(),
+ /* 301 */ array(),
+ /* 302 */ array(),
+ /* 303 */ array(),
+ /* 304 */ array(),
+ /* 305 */ array(),
+ /* 306 */ array(),
+ /* 307 */ array(),
+ /* 308 */ array(),
+ /* 309 */ array(),
+ /* 310 */ array(),
+ /* 311 */ array(),
+ /* 312 */ array(),
+ /* 313 */ array(),
+ /* 314 */ array(),
+ /* 315 */ array(),
+ /* 316 */ array(),
+ /* 317 */ array(),
+ /* 318 */ array(),
+ /* 319 */ array(),
+ /* 320 */ array(),
+ /* 321 */ array(),
+ /* 322 */ array(),
+ /* 323 */ array(),
+ /* 324 */ array(),
+ /* 325 */ array(),
+ /* 326 */ array(),
+ /* 327 */ array(),
+ /* 328 */ array(),
+ /* 329 */ array(),
+ /* 330 */ array(),
+ /* 331 */ array(),
+ /* 332 */ array(),
+ /* 333 */ array(),
+ /* 334 */ array(),
+ /* 335 */ array(),
+ /* 336 */ array(),
+ /* 337 */ array(),
+ /* 338 */ array(),
+ /* 339 */ array(),
+ /* 340 */ array(),
+ /* 341 */ array(),
+ /* 342 */ array(),
+ /* 343 */ array(),
+ /* 344 */ array(),
+ /* 345 */ array(),
+ /* 346 */ array(),
+ /* 347 */ array(),
+ /* 348 */ array(),
+ /* 349 */ array(),
+ /* 350 */ array(),
+ /* 351 */ array(),
+ /* 352 */ array(),
+ /* 353 */ array(),
+ /* 354 */ array(),
+ /* 355 */ array(),
+ /* 356 */ array(),
+ /* 357 */ array(),
+ /* 358 */ array(),
+ /* 359 */ array(),
+ /* 360 */ array(),
+ /* 361 */ array(),
+ /* 362 */ array(),
+ /* 363 */ array(),
+ /* 364 */ array(),
+ /* 365 */ array(),
+ /* 366 */ array(),
+ /* 367 */ array(),
+ /* 368 */ array(),
+ /* 369 */ array(),
+ /* 370 */ array(),
+ /* 371 */ array(),
+ /* 372 */ array(),
+ /* 373 */ array(),
+ /* 374 */ array(),
+ /* 375 */ array(),
+ /* 376 */ array(),
+ /* 377 */ array(),
+ /* 378 */ array(),
+ /* 379 */ array(),
+ /* 380 */ array(),
+ /* 381 */ array(),
+ /* 382 */ array(),
+);
+ static public $yy_default = array(
+ /* 0 */ 386, 565, 582, 536, 582, 536, 536, 582, 582, 582,
+ /* 10 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ /* 20 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ /* 30 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ /* 40 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ /* 50 */ 582, 582, 582, 582, 582, 582, 444, 444, 444, 444,
+ /* 60 */ 582, 582, 582, 582, 582, 582, 582, 582, 449, 582,
+ /* 70 */ 582, 446, 535, 428, 534, 566, 567, 478, 477, 468,
+ /* 80 */ 465, 449, 568, 455, 469, 474, 473, 470, 454, 451,
+ /* 90 */ 482, 481, 493, 457, 444, 383, 582, 444, 444, 444,
+ /* 100 */ 444, 548, 464, 582, 444, 582, 444, 582, 582, 457,
+ /* 110 */ 509, 457, 457, 582, 509, 509, 502, 457, 483, 502,
+ /* 120 */ 483, 582, 457, 582, 502, 582, 582, 582, 582, 582,
+ /* 130 */ 582, 582, 509, 582, 582, 582, 582, 582, 457, 582,
+ /* 140 */ 582, 582, 582, 582, 582, 480, 461, 484, 444, 444,
+ /* 150 */ 486, 485, 462, 467, 502, 460, 545, 543, 510, 582,
+ /* 160 */ 582, 582, 582, 582, 582, 582, 527, 509, 582, 526,
+ /* 170 */ 529, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ /* 180 */ 507, 582, 582, 528, 582, 582, 582, 582, 537, 523,
+ /* 190 */ 501, 546, 538, 464, 549, 509, 401, 581, 581, 542,
+ /* 200 */ 509, 509, 542, 459, 493, 582, 493, 493, 493, 493,
+ /* 210 */ 479, 582, 521, 483, 582, 489, 582, 582, 582, 582,
+ /* 220 */ 582, 582, 582, 582, 582, 582, 582, 582, 491, 582,
+ /* 230 */ 582, 582, 489, 521, 582, 582, 521, 582, 547, 582,
+ /* 240 */ 582, 521, 582, 582, 582, 582, 582, 582, 483, 452,
+ /* 250 */ 495, 544, 514, 516, 515, 518, 495, 531, 532, 409,
+ /* 260 */ 395, 431, 394, 425, 396, 430, 398, 456, 397, 426,
+ /* 270 */ 393, 387, 385, 384, 388, 389, 392, 391, 390, 399,
+ /* 280 */ 400, 435, 442, 436, 410, 423, 424, 441, 443, 522,
+ /* 290 */ 408, 407, 404, 403, 402, 405, 453, 429, 580, 406,
+ /* 300 */ 440, 573, 558, 559, 560, 561, 557, 556, 553, 554,
+ /* 310 */ 555, 463, 492, 540, 539, 411, 525, 488, 490, 500,
+ /* 320 */ 504, 552, 551, 508, 503, 459, 466, 499, 496, 497,
+ /* 330 */ 511, 471, 472, 498, 513, 550, 512, 476, 519, 458,
+ /* 340 */ 475, 576, 487, 575, 578, 579, 572, 574, 494, 434,
+ /* 350 */ 570, 571, 433, 562, 530, 505, 506, 427, 533, 564,
+ /* 360 */ 563, 432, 569, 421, 415, 416, 439, 414, 541, 412,
+ /* 370 */ 413, 577, 438, 417, 521, 422, 520, 420, 437, 524,
+ /* 380 */ 418, 419, 517,
+);
+ const YYNOCODE = 121;
+ const YYSTACKDEPTH = 100;
+ const YYNSTATE = 383;
+ const YYNRULE = 199;
+ const YYERRORSYMBOL = 78;
+ const YYERRSYMDT = 'yy0';
+ const YYFALLBACK = 0;
+ static public $yyFallback = array(
+ );
+ static function Trace($TraceFILE, $zTracePrompt)
+ {
+ if (!$TraceFILE) {
+ $zTracePrompt = 0;
+ } elseif (!$zTracePrompt) {
+ $TraceFILE = 0;
+ }
+ self::$yyTraceFILE = $TraceFILE;
+ self::$yyTracePrompt = $zTracePrompt;
+ }
+
+ static function PrintTrace()
+ {
+ self::$yyTraceFILE = fopen('php://output', 'w');
+ self::$yyTracePrompt = '<br>';
+ }
+
+ static public $yyTraceFILE;
+ static public $yyTracePrompt;
+ public $yyidx; /* Index of top element in stack */
+ public $yyerrcnt; /* Shifts left before out of the error */
+ public $yystack = array(); /* The parser's stack */
+
+ public $yyTokenName = array(
+ '$', 'VERT', 'COLON', 'COMMENT',
+ 'PHPSTARTTAG', 'PHPENDTAG', 'ASPSTARTTAG', 'ASPENDTAG',
+ 'FAKEPHPSTARTTAG', 'XMLTAG', 'OTHER', 'LINEBREAK',
+ 'LITERALSTART', 'LITERALEND', 'LITERAL', 'LDEL',
+ 'RDEL', 'DOLLAR', 'ID', 'EQUAL',
+ 'PTR', 'LDELIF', 'SPACE', 'LDELFOR',
+ 'SEMICOLON', 'INCDEC', 'TO', 'STEP',
+ 'LDELFOREACH', 'AS', 'APTR', 'SMARTYBLOCKCHILD',
+ 'LDELSLASH', 'INTEGER', 'COMMA', 'OPENP',
+ 'CLOSEP', 'MATH', 'UNIMATH', 'ANDSYM',
+ 'ISIN', 'ISDIVBY', 'ISNOTDIVBY', 'ISEVEN',
+ 'ISNOTEVEN', 'ISEVENBY', 'ISNOTEVENBY', 'ISODD',
+ 'ISNOTODD', 'ISODDBY', 'ISNOTODDBY', 'INSTANCEOF',
+ 'QMARK', 'NOT', 'TYPECAST', 'HEX',
+ 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT',
+ 'HATCH', 'OPENB', 'CLOSEB', 'EQUALS',
+ 'NOTEQUALS', 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL',
+ 'LESSEQUAL', 'IDENTITY', 'NONEIDENTITY', 'MOD',
+ 'LAND', 'LOR', 'LXOR', 'QUOTE',
+ 'BACKTICK', 'DOLLARID', 'error', 'start',
+ 'template', 'template_element', 'smartytag', 'literal',
+ 'literal_elements', 'literal_element', 'value', 'attributes',
+ 'variable', 'expr', 'modifierlist', 'varindexed',
+ 'statement', 'statements', 'optspace', 'varvar',
+ 'foraction', 'attribute', 'ternary', 'array',
+ 'ifcond', 'lop', 'function', 'doublequoted_with_quotes',
+ 'static_class_access', 'object', 'arrayindex', 'indexdef',
+ 'varvarele', 'objectchain', 'objectelement', 'method',
+ 'params', 'modifier', 'modparameters', 'modparameter',
+ 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent',
+ );
+
+ static public $yyRuleName = array(
+ /* 0 */ "start ::= template",
+ /* 1 */ "template ::= template_element",
+ /* 2 */ "template ::= template template_element",
+ /* 3 */ "template ::=",
+ /* 4 */ "template_element ::= smartytag",
+ /* 5 */ "template_element ::= COMMENT",
+ /* 6 */ "template_element ::= literal",
+ /* 7 */ "template_element ::= PHPSTARTTAG",
+ /* 8 */ "template_element ::= PHPENDTAG",
+ /* 9 */ "template_element ::= ASPSTARTTAG",
+ /* 10 */ "template_element ::= ASPENDTAG",
+ /* 11 */ "template_element ::= FAKEPHPSTARTTAG",
+ /* 12 */ "template_element ::= XMLTAG",
+ /* 13 */ "template_element ::= OTHER",
+ /* 14 */ "template_element ::= LINEBREAK",
+ /* 15 */ "literal ::= LITERALSTART LITERALEND",
+ /* 16 */ "literal ::= LITERALSTART literal_elements LITERALEND",
+ /* 17 */ "literal_elements ::= literal_elements literal_element",
+ /* 18 */ "literal_elements ::=",
+ /* 19 */ "literal_element ::= literal",
+ /* 20 */ "literal_element ::= LITERAL",
+ /* 21 */ "literal_element ::= PHPSTARTTAG",
+ /* 22 */ "literal_element ::= FAKEPHPSTARTTAG",
+ /* 23 */ "literal_element ::= PHPENDTAG",
+ /* 24 */ "literal_element ::= ASPSTARTTAG",
+ /* 25 */ "literal_element ::= ASPENDTAG",
+ /* 26 */ "smartytag ::= LDEL value RDEL",
+ /* 27 */ "smartytag ::= LDEL value attributes RDEL",
+ /* 28 */ "smartytag ::= LDEL variable attributes RDEL",
+ /* 29 */ "smartytag ::= LDEL expr modifierlist attributes RDEL",
+ /* 30 */ "smartytag ::= LDEL expr attributes RDEL",
+ /* 31 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL",
+ /* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL",
+ /* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL",
+ /* 34 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL",
+ /* 35 */ "smartytag ::= LDEL ID attributes RDEL",
+ /* 36 */ "smartytag ::= LDEL ID RDEL",
+ /* 37 */ "smartytag ::= LDEL ID PTR ID attributes RDEL",
+ /* 38 */ "smartytag ::= LDEL ID modifierlist attributes RDEL",
+ /* 39 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL",
+ /* 40 */ "smartytag ::= LDELIF SPACE expr RDEL",
+ /* 41 */ "smartytag ::= LDELIF SPACE expr attributes RDEL",
+ /* 42 */ "smartytag ::= LDELIF SPACE statement RDEL",
+ /* 43 */ "smartytag ::= LDELIF SPACE statement attributes RDEL",
+ /* 44 */ "smartytag ::= LDELFOR SPACE statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL",
+ /* 45 */ "foraction ::= EQUAL expr",
+ /* 46 */ "foraction ::= INCDEC",
+ /* 47 */ "smartytag ::= LDELFOR SPACE statement TO expr attributes RDEL",
+ /* 48 */ "smartytag ::= LDELFOR SPACE statement TO expr STEP expr attributes RDEL",
+ /* 49 */ "smartytag ::= LDELFOREACH attributes RDEL",
+ /* 50 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL",
+ /* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
+ /* 52 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL",
+ /* 53 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
+ /* 54 */ "smartytag ::= SMARTYBLOCKCHILD",
+ /* 55 */ "smartytag ::= LDELSLASH ID RDEL",
+ /* 56 */ "smartytag ::= LDELSLASH ID modifierlist RDEL",
+ /* 57 */ "smartytag ::= LDELSLASH ID PTR ID RDEL",
+ /* 58 */ "smartytag ::= LDELSLASH ID PTR ID modifierlist RDEL",
+ /* 59 */ "attributes ::= attributes attribute",
+ /* 60 */ "attributes ::= attribute",
+ /* 61 */ "attributes ::=",
+ /* 62 */ "attribute ::= SPACE ID EQUAL ID",
+ /* 63 */ "attribute ::= SPACE ID EQUAL expr",
+ /* 64 */ "attribute ::= SPACE ID EQUAL value",
+ /* 65 */ "attribute ::= SPACE ID",
+ /* 66 */ "attribute ::= SPACE expr",
+ /* 67 */ "attribute ::= SPACE value",
+ /* 68 */ "attribute ::= SPACE INTEGER EQUAL expr",
+ /* 69 */ "statements ::= statement",
+ /* 70 */ "statements ::= statements COMMA statement",
+ /* 71 */ "statement ::= DOLLAR varvar EQUAL expr",
+ /* 72 */ "statement ::= varindexed EQUAL expr",
+ /* 73 */ "statement ::= OPENP statement CLOSEP",
+ /* 74 */ "expr ::= value",
+ /* 75 */ "expr ::= ternary",
+ /* 76 */ "expr ::= DOLLAR ID COLON ID",
+ /* 77 */ "expr ::= expr MATH value",
+ /* 78 */ "expr ::= expr UNIMATH value",
+ /* 79 */ "expr ::= expr ANDSYM value",
+ /* 80 */ "expr ::= array",
+ /* 81 */ "expr ::= expr modifierlist",
+ /* 82 */ "expr ::= expr ifcond expr",
+ /* 83 */ "expr ::= expr ISIN array",
+ /* 84 */ "expr ::= expr ISIN value",
+ /* 85 */ "expr ::= expr lop expr",
+ /* 86 */ "expr ::= expr ISDIVBY expr",
+ /* 87 */ "expr ::= expr ISNOTDIVBY expr",
+ /* 88 */ "expr ::= expr ISEVEN",
+ /* 89 */ "expr ::= expr ISNOTEVEN",
+ /* 90 */ "expr ::= expr ISEVENBY expr",
+ /* 91 */ "expr ::= expr ISNOTEVENBY expr",
+ /* 92 */ "expr ::= expr ISODD",
+ /* 93 */ "expr ::= expr ISNOTODD",
+ /* 94 */ "expr ::= expr ISODDBY expr",
+ /* 95 */ "expr ::= expr ISNOTODDBY expr",
+ /* 96 */ "expr ::= value INSTANCEOF ID",
+ /* 97 */ "expr ::= value INSTANCEOF value",
+ /* 98 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr",
+ /* 99 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr",
+ /* 100 */ "value ::= variable",
+ /* 101 */ "value ::= UNIMATH value",
+ /* 102 */ "value ::= NOT value",
+ /* 103 */ "value ::= TYPECAST value",
+ /* 104 */ "value ::= variable INCDEC",
+ /* 105 */ "value ::= HEX",
+ /* 106 */ "value ::= INTEGER",
+ /* 107 */ "value ::= INTEGER DOT INTEGER",
+ /* 108 */ "value ::= INTEGER DOT",
+ /* 109 */ "value ::= DOT INTEGER",
+ /* 110 */ "value ::= ID",
+ /* 111 */ "value ::= function",
+ /* 112 */ "value ::= OPENP expr CLOSEP",
+ /* 113 */ "value ::= SINGLEQUOTESTRING",
+ /* 114 */ "value ::= doublequoted_with_quotes",
+ /* 115 */ "value ::= ID DOUBLECOLON static_class_access",
+ /* 116 */ "value ::= varindexed DOUBLECOLON static_class_access",
+ /* 117 */ "value ::= smartytag",
+ /* 118 */ "value ::= value modifierlist",
+ /* 119 */ "variable ::= varindexed",
+ /* 120 */ "variable ::= DOLLAR varvar AT ID",
+ /* 121 */ "variable ::= object",
+ /* 122 */ "variable ::= HATCH ID HATCH",
+ /* 123 */ "variable ::= HATCH variable HATCH",
+ /* 124 */ "varindexed ::= DOLLAR varvar arrayindex",
+ /* 125 */ "arrayindex ::= arrayindex indexdef",
+ /* 126 */ "arrayindex ::=",
+ /* 127 */ "indexdef ::= DOT DOLLAR varvar",
+ /* 128 */ "indexdef ::= DOT DOLLAR varvar AT ID",
+ /* 129 */ "indexdef ::= DOT ID",
+ /* 130 */ "indexdef ::= DOT INTEGER",
+ /* 131 */ "indexdef ::= DOT LDEL expr RDEL",
+ /* 132 */ "indexdef ::= OPENB ID CLOSEB",
+ /* 133 */ "indexdef ::= OPENB ID DOT ID CLOSEB",
+ /* 134 */ "indexdef ::= OPENB expr CLOSEB",
+ /* 135 */ "indexdef ::= OPENB CLOSEB",
+ /* 136 */ "varvar ::= varvarele",
+ /* 137 */ "varvar ::= varvar varvarele",
+ /* 138 */ "varvarele ::= ID",
+ /* 139 */ "varvarele ::= LDEL expr RDEL",
+ /* 140 */ "object ::= varindexed objectchain",
+ /* 141 */ "objectchain ::= objectelement",
+ /* 142 */ "objectchain ::= objectchain objectelement",
+ /* 143 */ "objectelement ::= PTR ID arrayindex",
+ /* 144 */ "objectelement ::= PTR DOLLAR varvar arrayindex",
+ /* 145 */ "objectelement ::= PTR LDEL expr RDEL arrayindex",
+ /* 146 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex",
+ /* 147 */ "objectelement ::= PTR method",
+ /* 148 */ "function ::= ID OPENP params CLOSEP",
+ /* 149 */ "method ::= ID OPENP params CLOSEP",
+ /* 150 */ "method ::= DOLLAR ID OPENP params CLOSEP",
+ /* 151 */ "params ::= params COMMA expr",
+ /* 152 */ "params ::= expr",
+ /* 153 */ "params ::=",
+ /* 154 */ "modifierlist ::= modifierlist modifier modparameters",
+ /* 155 */ "modifierlist ::= modifier modparameters",
+ /* 156 */ "modifier ::= VERT AT ID",
+ /* 157 */ "modifier ::= VERT ID",
+ /* 158 */ "modparameters ::= modparameters modparameter",
+ /* 159 */ "modparameters ::=",
+ /* 160 */ "modparameter ::= COLON value",
+ /* 161 */ "modparameter ::= COLON array",
+ /* 162 */ "static_class_access ::= method",
+ /* 163 */ "static_class_access ::= method objectchain",
+ /* 164 */ "static_class_access ::= ID",
+ /* 165 */ "static_class_access ::= DOLLAR ID arrayindex",
+ /* 166 */ "static_class_access ::= DOLLAR ID arrayindex objectchain",
+ /* 167 */ "ifcond ::= EQUALS",
+ /* 168 */ "ifcond ::= NOTEQUALS",
+ /* 169 */ "ifcond ::= GREATERTHAN",
+ /* 170 */ "ifcond ::= LESSTHAN",
+ /* 171 */ "ifcond ::= GREATEREQUAL",
+ /* 172 */ "ifcond ::= LESSEQUAL",
+ /* 173 */ "ifcond ::= IDENTITY",
+ /* 174 */ "ifcond ::= NONEIDENTITY",
+ /* 175 */ "ifcond ::= MOD",
+ /* 176 */ "lop ::= LAND",
+ /* 177 */ "lop ::= LOR",
+ /* 178 */ "lop ::= LXOR",
+ /* 179 */ "array ::= OPENB arrayelements CLOSEB",
+ /* 180 */ "arrayelements ::= arrayelement",
+ /* 181 */ "arrayelements ::= arrayelements COMMA arrayelement",
+ /* 182 */ "arrayelements ::=",
+ /* 183 */ "arrayelement ::= value APTR expr",
+ /* 184 */ "arrayelement ::= ID APTR expr",
+ /* 185 */ "arrayelement ::= expr",
+ /* 186 */ "doublequoted_with_quotes ::= QUOTE QUOTE",
+ /* 187 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE",
+ /* 188 */ "doublequoted ::= doublequoted doublequotedcontent",
+ /* 189 */ "doublequoted ::= doublequotedcontent",
+ /* 190 */ "doublequotedcontent ::= BACKTICK variable BACKTICK",
+ /* 191 */ "doublequotedcontent ::= BACKTICK expr BACKTICK",
+ /* 192 */ "doublequotedcontent ::= DOLLARID",
+ /* 193 */ "doublequotedcontent ::= LDEL variable RDEL",
+ /* 194 */ "doublequotedcontent ::= LDEL expr RDEL",
+ /* 195 */ "doublequotedcontent ::= smartytag",
+ /* 196 */ "doublequotedcontent ::= OTHER",
+ /* 197 */ "optspace ::= SPACE",
+ /* 198 */ "optspace ::=",
+ );
+
+ function tokenName($tokenType)
+ {
+ if ($tokenType === 0) {
+ return 'End of Input';
+ }
+ if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
+ return $this->yyTokenName[$tokenType];
+ } else {
+ return "Unknown";
+ }
+ }
+
+ static function yy_destructor($yymajor, $yypminor)
+ {
+ switch ($yymajor) {
+ default: break; /* If no destructor action specified: do nothing */
+ }
+ }
+
+ function yy_pop_parser_stack()
+ {
+ if (!count($this->yystack)) {
+ return;
+ }
+ $yytos = array_pop($this->yystack);
+ if (self::$yyTraceFILE && $this->yyidx >= 0) {
+ fwrite(self::$yyTraceFILE,
+ self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
+ "\n");
+ }
+ $yymajor = $yytos->major;
+ self::yy_destructor($yymajor, $yytos->minor);
+ $this->yyidx--;
+ return $yymajor;
+ }
+
+ function __destruct()
+ {
+ while ($this->yystack !== Array()) {
+ $this->yy_pop_parser_stack();
+ }
+ if (is_resource(self::$yyTraceFILE)) {
+ fclose(self::$yyTraceFILE);
+ }
+ }
+
+ function yy_get_expected_tokens($token)
+ {
+ $state = $this->yystack[$this->yyidx]->stateno;
+ $expected = self::$yyExpectedTokens[$state];
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return $expected;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return array_unique($expected);
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
+ if (in_array($token,
+ self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return array_unique($expected);
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return $expected;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+
+ function yy_is_expected_token($token)
+ {
+ if ($token === 0) {
+ return true; // 0 is not part of this
+ }
+ $state = $this->yystack[$this->yyidx]->stateno;
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return true;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return true;
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate]) &&
+ in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ if (!$token) {
+ // end of input: this is valid
+ return true;
+ }
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return false;
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return true;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+
+ function yy_find_shift_action($iLookAhead)
+ {
+ $stateno = $this->yystack[$this->yyidx]->stateno;
+
+ /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
+ if (!isset(self::$yy_shift_ofst[$stateno])) {
+ // no shift actions
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_shift_ofst[$stateno];
+ if ($i === self::YY_SHIFT_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
+ && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
+ if (self::$yyTraceFILE) {
+ fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
+ $this->yyTokenName[$iLookAhead] . " => " .
+ $this->yyTokenName[$iFallback] . "\n");
+ }
+ return $this->yy_find_shift_action($iFallback);
+ }
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_find_reduce_action($stateno, $iLookAhead)
+ {
+ /* $stateno = $this->yystack[$this->yyidx]->stateno; */
+
+ if (!isset(self::$yy_reduce_ofst[$stateno])) {
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_reduce_ofst[$stateno];
+ if ($i == self::YY_REDUCE_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_shift($yyNewState, $yyMajor, $yypMinor)
+ {
+ $this->yyidx++;
+ if ($this->yyidx >= self::YYSTACKDEPTH) {
+ $this->yyidx--;
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+#line 73 "smarty_internal_templateparser.y"
+
+ $this->internalError = true;
+ $this->compiler->trigger_template_error("Stack overflow in template parser");
+#line 1731 "smarty_internal_templateparser.php"
+ return;
+ }
+ $yytos = new TP_yyStackEntry;
+ $yytos->stateno = $yyNewState;
+ $yytos->major = $yyMajor;
+ $yytos->minor = $yypMinor;
+ array_push($this->yystack, $yytos);
+ if (self::$yyTraceFILE && $this->yyidx > 0) {
+ fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
+ $yyNewState);
+ fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
+ for($i = 1; $i <= $this->yyidx; $i++) {
+ fprintf(self::$yyTraceFILE, " %s",
+ $this->yyTokenName[$this->yystack[$i]->major]);
+ }
+ fwrite(self::$yyTraceFILE,"\n");
+ }
+ }
+
+ static public $yyRuleInfo = array(
+ array( 'lhs' => 79, 'rhs' => 1 ),
+ array( 'lhs' => 80, 'rhs' => 1 ),
+ array( 'lhs' => 80, 'rhs' => 2 ),
+ array( 'lhs' => 80, 'rhs' => 0 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 81, 'rhs' => 1 ),
+ array( 'lhs' => 83, 'rhs' => 2 ),
+ array( 'lhs' => 83, 'rhs' => 3 ),
+ array( 'lhs' => 84, 'rhs' => 2 ),
+ array( 'lhs' => 84, 'rhs' => 0 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 82, 'rhs' => 3 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 5 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 6 ),
+ array( 'lhs' => 82, 'rhs' => 6 ),
+ array( 'lhs' => 82, 'rhs' => 7 ),
+ array( 'lhs' => 82, 'rhs' => 6 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 3 ),
+ array( 'lhs' => 82, 'rhs' => 6 ),
+ array( 'lhs' => 82, 'rhs' => 5 ),
+ array( 'lhs' => 82, 'rhs' => 7 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 5 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 5 ),
+ array( 'lhs' => 82, 'rhs' => 13 ),
+ array( 'lhs' => 96, 'rhs' => 2 ),
+ array( 'lhs' => 96, 'rhs' => 1 ),
+ array( 'lhs' => 82, 'rhs' => 7 ),
+ array( 'lhs' => 82, 'rhs' => 9 ),
+ array( 'lhs' => 82, 'rhs' => 3 ),
+ array( 'lhs' => 82, 'rhs' => 8 ),
+ array( 'lhs' => 82, 'rhs' => 11 ),
+ array( 'lhs' => 82, 'rhs' => 8 ),
+ array( 'lhs' => 82, 'rhs' => 11 ),
+ array( 'lhs' => 82, 'rhs' => 1 ),
+ array( 'lhs' => 82, 'rhs' => 3 ),
+ array( 'lhs' => 82, 'rhs' => 4 ),
+ array( 'lhs' => 82, 'rhs' => 5 ),
+ array( 'lhs' => 82, 'rhs' => 6 ),
+ array( 'lhs' => 87, 'rhs' => 2 ),
+ array( 'lhs' => 87, 'rhs' => 1 ),
+ array( 'lhs' => 87, 'rhs' => 0 ),
+ array( 'lhs' => 97, 'rhs' => 4 ),
+ array( 'lhs' => 97, 'rhs' => 4 ),
+ array( 'lhs' => 97, 'rhs' => 4 ),
+ array( 'lhs' => 97, 'rhs' => 2 ),
+ array( 'lhs' => 97, 'rhs' => 2 ),
+ array( 'lhs' => 97, 'rhs' => 2 ),
+ array( 'lhs' => 97, 'rhs' => 4 ),
+ array( 'lhs' => 93, 'rhs' => 1 ),
+ array( 'lhs' => 93, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 4 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 4 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 98, 'rhs' => 8 ),
+ array( 'lhs' => 98, 'rhs' => 7 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 3 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 3 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 3 ),
+ array( 'lhs' => 86, 'rhs' => 3 ),
+ array( 'lhs' => 86, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 4 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 3 ),
+ array( 'lhs' => 88, 'rhs' => 3 ),
+ array( 'lhs' => 91, 'rhs' => 3 ),
+ array( 'lhs' => 106, 'rhs' => 2 ),
+ array( 'lhs' => 106, 'rhs' => 0 ),
+ array( 'lhs' => 107, 'rhs' => 3 ),
+ array( 'lhs' => 107, 'rhs' => 5 ),
+ array( 'lhs' => 107, 'rhs' => 2 ),
+ array( 'lhs' => 107, 'rhs' => 2 ),
+ array( 'lhs' => 107, 'rhs' => 4 ),
+ array( 'lhs' => 107, 'rhs' => 3 ),
+ array( 'lhs' => 107, 'rhs' => 5 ),
+ array( 'lhs' => 107, 'rhs' => 3 ),
+ array( 'lhs' => 107, 'rhs' => 2 ),
+ array( 'lhs' => 95, 'rhs' => 1 ),
+ array( 'lhs' => 95, 'rhs' => 2 ),
+ array( 'lhs' => 108, 'rhs' => 1 ),
+ array( 'lhs' => 108, 'rhs' => 3 ),
+ array( 'lhs' => 105, 'rhs' => 2 ),
+ array( 'lhs' => 109, 'rhs' => 1 ),
+ array( 'lhs' => 109, 'rhs' => 2 ),
+ array( 'lhs' => 110, 'rhs' => 3 ),
+ array( 'lhs' => 110, 'rhs' => 4 ),
+ array( 'lhs' => 110, 'rhs' => 5 ),
+ array( 'lhs' => 110, 'rhs' => 6 ),
+ array( 'lhs' => 110, 'rhs' => 2 ),
+ array( 'lhs' => 102, 'rhs' => 4 ),
+ array( 'lhs' => 111, 'rhs' => 4 ),
+ array( 'lhs' => 111, 'rhs' => 5 ),
+ array( 'lhs' => 112, 'rhs' => 3 ),
+ array( 'lhs' => 112, 'rhs' => 1 ),
+ array( 'lhs' => 112, 'rhs' => 0 ),
+ array( 'lhs' => 90, 'rhs' => 3 ),
+ array( 'lhs' => 90, 'rhs' => 2 ),
+ array( 'lhs' => 113, 'rhs' => 3 ),
+ array( 'lhs' => 113, 'rhs' => 2 ),
+ array( 'lhs' => 114, 'rhs' => 2 ),
+ array( 'lhs' => 114, 'rhs' => 0 ),
+ array( 'lhs' => 115, 'rhs' => 2 ),
+ array( 'lhs' => 115, 'rhs' => 2 ),
+ array( 'lhs' => 104, 'rhs' => 1 ),
+ array( 'lhs' => 104, 'rhs' => 2 ),
+ array( 'lhs' => 104, 'rhs' => 1 ),
+ array( 'lhs' => 104, 'rhs' => 3 ),
+ array( 'lhs' => 104, 'rhs' => 4 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 100, 'rhs' => 1 ),
+ array( 'lhs' => 101, 'rhs' => 1 ),
+ array( 'lhs' => 101, 'rhs' => 1 ),
+ array( 'lhs' => 101, 'rhs' => 1 ),
+ array( 'lhs' => 99, 'rhs' => 3 ),
+ array( 'lhs' => 116, 'rhs' => 1 ),
+ array( 'lhs' => 116, 'rhs' => 3 ),
+ array( 'lhs' => 116, 'rhs' => 0 ),
+ array( 'lhs' => 117, 'rhs' => 3 ),
+ array( 'lhs' => 117, 'rhs' => 3 ),
+ array( 'lhs' => 117, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 2 ),
+ array( 'lhs' => 103, 'rhs' => 3 ),
+ array( 'lhs' => 118, 'rhs' => 2 ),
+ array( 'lhs' => 118, 'rhs' => 1 ),
+ array( 'lhs' => 119, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 1 ),
+ array( 'lhs' => 119, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 1 ),
+ array( 'lhs' => 119, 'rhs' => 1 ),
+ array( 'lhs' => 94, 'rhs' => 1 ),
+ array( 'lhs' => 94, 'rhs' => 0 ),
+ );
+
+ static public $yyReduceMap = array(
+ 0 => 0,
+ 1 => 1,
+ 2 => 1,
+ 4 => 4,
+ 5 => 5,
+ 6 => 6,
+ 7 => 7,
+ 8 => 8,
+ 9 => 9,
+ 10 => 10,
+ 11 => 11,
+ 12 => 12,
+ 13 => 13,
+ 14 => 14,
+ 15 => 15,
+ 18 => 15,
+ 16 => 16,
+ 17 => 17,
+ 101 => 17,
+ 103 => 17,
+ 104 => 17,
+ 163 => 17,
+ 19 => 19,
+ 20 => 19,
+ 74 => 19,
+ 75 => 19,
+ 100 => 19,
+ 105 => 19,
+ 106 => 19,
+ 111 => 19,
+ 113 => 19,
+ 114 => 19,
+ 121 => 19,
+ 162 => 19,
+ 180 => 19,
+ 21 => 21,
+ 22 => 21,
+ 23 => 23,
+ 24 => 24,
+ 25 => 25,
+ 26 => 26,
+ 27 => 27,
+ 28 => 27,
+ 30 => 27,
+ 29 => 29,
+ 31 => 31,
+ 32 => 31,
+ 33 => 33,
+ 34 => 34,
+ 35 => 35,
+ 36 => 36,
+ 37 => 37,
+ 38 => 38,
+ 39 => 39,
+ 40 => 40,
+ 42 => 40,
+ 41 => 41,
+ 43 => 41,
+ 44 => 44,
+ 45 => 45,
+ 46 => 46,
+ 66 => 46,
+ 67 => 46,
+ 164 => 46,
+ 185 => 46,
+ 47 => 47,
+ 48 => 48,
+ 49 => 49,
+ 50 => 50,
+ 51 => 51,
+ 52 => 52,
+ 53 => 53,
+ 54 => 54,
+ 55 => 55,
+ 56 => 56,
+ 57 => 57,
+ 58 => 58,
+ 59 => 59,
+ 60 => 60,
+ 69 => 60,
+ 152 => 60,
+ 156 => 60,
+ 61 => 61,
+ 153 => 61,
+ 62 => 62,
+ 63 => 63,
+ 64 => 63,
+ 65 => 65,
+ 68 => 68,
+ 70 => 70,
+ 71 => 71,
+ 72 => 71,
+ 73 => 73,
+ 76 => 76,
+ 77 => 77,
+ 78 => 77,
+ 79 => 77,
+ 80 => 80,
+ 136 => 80,
+ 197 => 80,
+ 81 => 81,
+ 118 => 81,
+ 82 => 82,
+ 85 => 82,
+ 96 => 82,
+ 83 => 83,
+ 84 => 84,
+ 86 => 86,
+ 87 => 87,
+ 88 => 88,
+ 93 => 88,
+ 89 => 89,
+ 92 => 89,
+ 90 => 90,
+ 95 => 90,
+ 91 => 91,
+ 94 => 91,
+ 97 => 97,
+ 98 => 98,
+ 99 => 99,
+ 102 => 102,
+ 107 => 107,
+ 108 => 108,
+ 109 => 109,
+ 110 => 110,
+ 112 => 112,
+ 115 => 115,
+ 116 => 116,
+ 117 => 117,
+ 119 => 119,
+ 120 => 120,
+ 122 => 122,
+ 123 => 123,
+ 124 => 124,
+ 125 => 125,
+ 126 => 126,
+ 127 => 127,
+ 128 => 128,
+ 129 => 129,
+ 130 => 130,
+ 131 => 131,
+ 134 => 131,
+ 132 => 132,
+ 133 => 133,
+ 135 => 135,
+ 137 => 137,
+ 138 => 138,
+ 139 => 139,
+ 140 => 140,
+ 141 => 141,
+ 142 => 142,
+ 143 => 143,
+ 144 => 144,
+ 145 => 145,
+ 146 => 146,
+ 147 => 147,
+ 148 => 148,
+ 149 => 149,
+ 150 => 150,
+ 151 => 151,
+ 154 => 154,
+ 155 => 155,
+ 157 => 157,
+ 158 => 158,
+ 159 => 159,
+ 160 => 160,
+ 161 => 160,
+ 165 => 165,
+ 166 => 166,
+ 167 => 167,
+ 168 => 168,
+ 169 => 169,
+ 170 => 170,
+ 171 => 171,
+ 172 => 172,
+ 173 => 173,
+ 174 => 174,
+ 175 => 175,
+ 176 => 176,
+ 177 => 177,
+ 178 => 178,
+ 179 => 179,
+ 181 => 181,
+ 182 => 182,
+ 183 => 183,
+ 184 => 184,
+ 186 => 186,
+ 187 => 187,
+ 188 => 188,
+ 189 => 189,
+ 190 => 190,
+ 191 => 190,
+ 193 => 190,
+ 192 => 192,
+ 194 => 194,
+ 195 => 195,
+ 196 => 196,
+ 198 => 198,
+ );
+#line 84 "smarty_internal_templateparser.y"
+ function yy_r0(){ $this->_retvalue = $this->root_buffer->to_smarty_php(); }
+#line 2155 "smarty_internal_templateparser.php"
+#line 90 "smarty_internal_templateparser.y"
+ function yy_r1(){ $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor); }
+#line 2158 "smarty_internal_templateparser.php"
+#line 102 "smarty_internal_templateparser.y"
+ function yy_r4(){
+ if ($this->compiler->has_code) {
+ $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array();
+ $this->_retvalue = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor,true));
+ } else {
+ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+ $this->compiler->has_variable_string = false;
+ $this->block_nesting_level = count($this->compiler->_tag_stack);
+ }
+#line 2170 "smarty_internal_templateparser.php"
+#line 114 "smarty_internal_templateparser.y"
+ function yy_r5(){ $this->_retvalue = new _smarty_tag($this, ''); }
+#line 2173 "smarty_internal_templateparser.php"
+#line 117 "smarty_internal_templateparser.y"
+ function yy_r6(){ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); }
+#line 2176 "smarty_internal_templateparser.php"
+#line 120 "smarty_internal_templateparser.y"
+ function yy_r7(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
+ }elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<?php', true));
+ }elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+ }
+#line 2189 "smarty_internal_templateparser.php"
+#line 132 "smarty_internal_templateparser.y"
+ function yy_r8(){if ($this->is_xml) {
+ $this->compiler->tag_nocache = true;
+ $this->is_xml = true;
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("<?php echo '?>';?>", $this->compiler, true));
+ }elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '?<?php ?>>');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES));
+ }elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true));
+ }elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+ }
+#line 2205 "smarty_internal_templateparser.php"
+#line 148 "smarty_internal_templateparser.y"
+ function yy_r9(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
+ }elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true));
+ } else {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ }
+ }elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, '');
+ } else {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ }
+ }
+ }
+#line 2226 "smarty_internal_templateparser.php"
+#line 169 "smarty_internal_templateparser.y"
+ function yy_r10(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES));
+ }elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true));
+ } else {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ }
+ }elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, '');
+ } else {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ }
+ }
+ }
+#line 2247 "smarty_internal_templateparser.php"
+#line 189 "smarty_internal_templateparser.y"
+ function yy_r11(){if ($this->lex->strip) {
+ $this->_retvalue = new _smarty_text($this, preg_replace('![\$this->yystack[$this->yyidx + 0]->minor ]*[\r\n]+[\$this->yystack[$this->yyidx + 0]->minor ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)));
+ } else {
+ $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
+ }
+ }
+#line 2255 "smarty_internal_templateparser.php"
+#line 197 "smarty_internal_templateparser.y"
+ function yy_r12(){ $this->compiler->tag_nocache = true; $this->is_xml = true; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("<?php echo '<?xml';?>", $this->compiler, true)); }
+#line 2258 "smarty_internal_templateparser.php"
+#line 200 "smarty_internal_templateparser.y"
+ function yy_r13(){if ($this->lex->strip) {
+ $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor));
+ } else {
+ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+ }
+#line 2266 "smarty_internal_templateparser.php"
+#line 206 "smarty_internal_templateparser.y"
+ function yy_r14(){
+ $this->_retvalue = new _smarty_linebreak($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2271 "smarty_internal_templateparser.php"
+#line 211 "smarty_internal_templateparser.y"
+ function yy_r15(){ $this->_retvalue = ''; }
+#line 2274 "smarty_internal_templateparser.php"
+#line 212 "smarty_internal_templateparser.y"
+ function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
+#line 2277 "smarty_internal_templateparser.php"
+#line 214 "smarty_internal_templateparser.y"
+ function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2280 "smarty_internal_templateparser.php"
+#line 217 "smarty_internal_templateparser.y"
+ function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
+#line 2283 "smarty_internal_templateparser.php"
+#line 219 "smarty_internal_templateparser.y"
+ function yy_r21(){ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor); }
+#line 2286 "smarty_internal_templateparser.php"
+#line 221 "smarty_internal_templateparser.y"
+ function yy_r23(){ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor); }
+#line 2289 "smarty_internal_templateparser.php"
+#line 222 "smarty_internal_templateparser.y"
+ function yy_r24(){ $this->_retvalue = '<<?php ?>%'; }
+#line 2292 "smarty_internal_templateparser.php"
+#line 223 "smarty_internal_templateparser.y"
+ function yy_r25(){ $this->_retvalue = '%<?php ?>>'; }
+#line 2295 "smarty_internal_templateparser.php"
+#line 231 "smarty_internal_templateparser.y"
+ function yy_r26(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor)); }
+#line 2298 "smarty_internal_templateparser.php"
+#line 232 "smarty_internal_templateparser.y"
+ function yy_r27(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor)); }
+#line 2301 "smarty_internal_templateparser.php"
+#line 234 "smarty_internal_templateparser.y"
+ function yy_r29(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor)); }
+#line 2304 "smarty_internal_templateparser.php"
+#line 242 "smarty_internal_templateparser.y"
+ function yy_r31(){ $this->_retvalue = $this->compiler->compileTag('assign',array(array('value'=>$this->yystack[$this->yyidx + -1]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -3]->minor."'"))); }
+#line 2307 "smarty_internal_templateparser.php"
+#line 244 "smarty_internal_templateparser.y"
+ function yy_r33(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -4]->minor."'")),$this->yystack[$this->yyidx + -1]->minor)); }
+#line 2310 "smarty_internal_templateparser.php"
+#line 245 "smarty_internal_templateparser.y"
+ function yy_r34(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>$this->yystack[$this->yyidx + -4]->minor['var'])),$this->yystack[$this->yyidx + -1]->minor),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -4]->minor['smarty_internal_index'])); }
+#line 2313 "smarty_internal_templateparser.php"
+#line 247 "smarty_internal_templateparser.y"
+ function yy_r35(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); }
+#line 2316 "smarty_internal_templateparser.php"
+#line 248 "smarty_internal_templateparser.y"
+ function yy_r36(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); }
+#line 2319 "smarty_internal_templateparser.php"
+#line 250 "smarty_internal_templateparser.y"
+ function yy_r37(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor)); }
+#line 2322 "smarty_internal_templateparser.php"
+#line 252 "smarty_internal_templateparser.y"
+ function yy_r38(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
+ }
+#line 2327 "smarty_internal_templateparser.php"
+#line 256 "smarty_internal_templateparser.y"
+ function yy_r39(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
+ }
+#line 2332 "smarty_internal_templateparser.php"
+#line 260 "smarty_internal_templateparser.y"
+ function yy_r40(){ $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }
+#line 2335 "smarty_internal_templateparser.php"
+#line 261 "smarty_internal_templateparser.y"
+ function yy_r41(){ $tag = trim(substr($this->yystack[$this->yyidx + -4]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + -1]->minor,array('if condition'=>$this->yystack[$this->yyidx + -2]->minor)); }
+#line 2338 "smarty_internal_templateparser.php"
+#line 265 "smarty_internal_templateparser.y"
+ function yy_r44(){
+ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -10]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -7]->minor),array('var'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),1); }
+#line 2342 "smarty_internal_templateparser.php"
+#line 268 "smarty_internal_templateparser.y"
+ function yy_r45(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2345 "smarty_internal_templateparser.php"
+#line 269 "smarty_internal_templateparser.y"
+ function yy_r46(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
+#line 2348 "smarty_internal_templateparser.php"
+#line 270 "smarty_internal_templateparser.y"
+ function yy_r47(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -4]->minor),array('to'=>$this->yystack[$this->yyidx + -2]->minor))),0); }
+#line 2351 "smarty_internal_templateparser.php"
+#line 271 "smarty_internal_templateparser.y"
+ function yy_r48(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('to'=>$this->yystack[$this->yyidx + -4]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),0); }
+#line 2354 "smarty_internal_templateparser.php"
+#line 273 "smarty_internal_templateparser.y"
+ function yy_r49(){ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor); }
+#line 2357 "smarty_internal_templateparser.php"
+#line 275 "smarty_internal_templateparser.y"
+ function yy_r50(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); }
+#line 2361 "smarty_internal_templateparser.php"
+#line 277 "smarty_internal_templateparser.y"
+ function yy_r51(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); }
+#line 2365 "smarty_internal_templateparser.php"
+#line 279 "smarty_internal_templateparser.y"
+ function yy_r52(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); }
+#line 2369 "smarty_internal_templateparser.php"
+#line 281 "smarty_internal_templateparser.y"
+ function yy_r53(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); }
+#line 2373 "smarty_internal_templateparser.php"
+#line 285 "smarty_internal_templateparser.y"
+ function yy_r54(){ $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); }
+#line 2376 "smarty_internal_templateparser.php"
+#line 289 "smarty_internal_templateparser.y"
+ function yy_r55(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array()); }
+#line 2379 "smarty_internal_templateparser.php"
+#line 291 "smarty_internal_templateparser.y"
+ function yy_r56(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2383 "smarty_internal_templateparser.php"
+#line 294 "smarty_internal_templateparser.y"
+ function yy_r57(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); }
+#line 2386 "smarty_internal_templateparser.php"
+#line 295 "smarty_internal_templateparser.y"
+ function yy_r58(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + -1]->minor)); }
+#line 2389 "smarty_internal_templateparser.php"
+#line 301 "smarty_internal_templateparser.y"
+ function yy_r59(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; }
+#line 2392 "smarty_internal_templateparser.php"
+#line 303 "smarty_internal_templateparser.y"
+ function yy_r60(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
+#line 2395 "smarty_internal_templateparser.php"
+#line 305 "smarty_internal_templateparser.y"
+ function yy_r61(){ $this->_retvalue = array(); }
+#line 2398 "smarty_internal_templateparser.php"
+#line 308 "smarty_internal_templateparser.y"
+ function yy_r62(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true');
+ } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false');
+ } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null');
+ } else
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>"'".$this->yystack[$this->yyidx + 0]->minor."'"); }
+#line 2408 "smarty_internal_templateparser.php"
+#line 316 "smarty_internal_templateparser.y"
+ function yy_r63(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
+#line 2411 "smarty_internal_templateparser.php"
+#line 318 "smarty_internal_templateparser.y"
+ function yy_r65(){ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; }
+#line 2414 "smarty_internal_templateparser.php"
+#line 321 "smarty_internal_templateparser.y"
+ function yy_r68(){$this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
+#line 2417 "smarty_internal_templateparser.php"
+#line 328 "smarty_internal_templateparser.y"
+ function yy_r70(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; }
+#line 2420 "smarty_internal_templateparser.php"
+#line 330 "smarty_internal_templateparser.y"
+ function yy_r71(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); }
+#line 2423 "smarty_internal_templateparser.php"
+#line 332 "smarty_internal_templateparser.y"
+ function yy_r73(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
+#line 2426 "smarty_internal_templateparser.php"
+#line 343 "smarty_internal_templateparser.y"
+ function yy_r76(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; }
+#line 2429 "smarty_internal_templateparser.php"
+#line 345 "smarty_internal_templateparser.y"
+ function yy_r77(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; }
+#line 2432 "smarty_internal_templateparser.php"
+#line 351 "smarty_internal_templateparser.y"
+ function yy_r80(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
+#line 2435 "smarty_internal_templateparser.php"
+#line 354 "smarty_internal_templateparser.y"
+ function yy_r81(){ $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); }
+#line 2438 "smarty_internal_templateparser.php"
+#line 358 "smarty_internal_templateparser.y"
+ function yy_r82(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2441 "smarty_internal_templateparser.php"
+#line 359 "smarty_internal_templateparser.y"
+ function yy_r83(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2444 "smarty_internal_templateparser.php"
+#line 360 "smarty_internal_templateparser.y"
+ function yy_r84(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2447 "smarty_internal_templateparser.php"
+#line 362 "smarty_internal_templateparser.y"
+ function yy_r86(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2450 "smarty_internal_templateparser.php"
+#line 363 "smarty_internal_templateparser.y"
+ function yy_r87(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2453 "smarty_internal_templateparser.php"
+#line 364 "smarty_internal_templateparser.y"
+ function yy_r88(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
+#line 2456 "smarty_internal_templateparser.php"
+#line 365 "smarty_internal_templateparser.y"
+ function yy_r89(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
+#line 2459 "smarty_internal_templateparser.php"
+#line 366 "smarty_internal_templateparser.y"
+ function yy_r90(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2462 "smarty_internal_templateparser.php"
+#line 367 "smarty_internal_templateparser.y"
+ function yy_r91(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
+#line 2465 "smarty_internal_templateparser.php"
+#line 373 "smarty_internal_templateparser.y"
+ function yy_r97(){$this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>'; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number; }
+#line 2468 "smarty_internal_templateparser.php"
+#line 379 "smarty_internal_templateparser.y"
+ function yy_r98(){ $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? $_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'\')->value : '.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + -2]->minor', null, true, false)->nocache; }
+#line 2471 "smarty_internal_templateparser.php"
+#line 380 "smarty_internal_templateparser.y"
+ function yy_r99(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2474 "smarty_internal_templateparser.php"
+#line 387 "smarty_internal_templateparser.y"
+ function yy_r102(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2477 "smarty_internal_templateparser.php"
+#line 393 "smarty_internal_templateparser.y"
+ function yy_r107(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2480 "smarty_internal_templateparser.php"
+#line 394 "smarty_internal_templateparser.y"
+ function yy_r108(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; }
+#line 2483 "smarty_internal_templateparser.php"
+#line 395 "smarty_internal_templateparser.y"
+ function yy_r109(){ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2486 "smarty_internal_templateparser.php"
+#line 397 "smarty_internal_templateparser.y"
+ function yy_r110(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'true';
+ } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'false';
+ } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'null';
+ } else
+ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; }
+#line 2496 "smarty_internal_templateparser.php"
+#line 408 "smarty_internal_templateparser.y"
+ function yy_r112(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; }
+#line 2499 "smarty_internal_templateparser.php"
+#line 414 "smarty_internal_templateparser.y"
+ function yy_r115(){if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) {
+ if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) {
+ $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor;
+ } else {
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+ } else {
+ $this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting");
+ }
+ }
+#line 2511 "smarty_internal_templateparser.php"
+#line 424 "smarty_internal_templateparser.y"
+ function yy_r116(){ if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor;} else {
+ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].'::'.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor['var'],"'"), null, true, false)->nocache;} }
+#line 2515 "smarty_internal_templateparser.php"
+#line 427 "smarty_internal_templateparser.y"
+ function yy_r117(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; }
+#line 2518 "smarty_internal_templateparser.php"
+#line 437 "smarty_internal_templateparser.y"
+ function yy_r119(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
+ $smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
+ $this->_retvalue = $smarty_var;
+ } else {
+ // used for array reset,next,prev,end,current
+ $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];
+ $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ if (isset($this->compiler->local_var[$this->yystack[$this->yyidx + 0]->minor['var']])) {
+ $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + 0]->minor['var'] .']->value'.$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ } else {
+ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ }
+ $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],"'"), null, true, false)->nocache;
+ }
+ }
+#line 2535 "smarty_internal_templateparser.php"
+#line 453 "smarty_internal_templateparser.y"
+ function yy_r120(){if (isset($this->compiler->local_var[$this->yystack[$this->yyidx + -2]->minor])) {
+ $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor;
+ } else {
+ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+ $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"), null, true, false)->nocache; }
+#line 2543 "smarty_internal_templateparser.php"
+#line 462 "smarty_internal_templateparser.y"
+ function yy_r122(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; }
+#line 2546 "smarty_internal_templateparser.php"
+#line 463 "smarty_internal_templateparser.y"
+ function yy_r123(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; }
+#line 2549 "smarty_internal_templateparser.php"
+#line 466 "smarty_internal_templateparser.y"
+ function yy_r124(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); }
+#line 2552 "smarty_internal_templateparser.php"
+#line 472 "smarty_internal_templateparser.y"
+ function yy_r125(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2555 "smarty_internal_templateparser.php"
+#line 474 "smarty_internal_templateparser.y"
+ function yy_r126(){return; }
+#line 2558 "smarty_internal_templateparser.php"
+#line 478 "smarty_internal_templateparser.y"
+ function yy_r127(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor .')->value]'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + 0]->minor', null, true, false)->nocache; }
+#line 2561 "smarty_internal_templateparser.php"
+#line 479 "smarty_internal_templateparser.y"
+ function yy_r128(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor.']'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"), null, true, false)->nocache; }
+#line 2564 "smarty_internal_templateparser.php"
+#line 480 "smarty_internal_templateparser.y"
+ function yy_r129(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; }
+#line 2567 "smarty_internal_templateparser.php"
+#line 481 "smarty_internal_templateparser.y"
+ function yy_r130(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; }
+#line 2570 "smarty_internal_templateparser.php"
+#line 482 "smarty_internal_templateparser.y"
+ function yy_r131(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; }
+#line 2573 "smarty_internal_templateparser.php"
+#line 484 "smarty_internal_templateparser.y"
+ function yy_r132(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; }
+#line 2576 "smarty_internal_templateparser.php"
+#line 485 "smarty_internal_templateparser.y"
+ function yy_r133(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; }
+#line 2579 "smarty_internal_templateparser.php"
+#line 489 "smarty_internal_templateparser.y"
+ function yy_r135(){$this->_retvalue = '[]'; }
+#line 2582 "smarty_internal_templateparser.php"
+#line 497 "smarty_internal_templateparser.y"
+ function yy_r137(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2585 "smarty_internal_templateparser.php"
+#line 499 "smarty_internal_templateparser.y"
+ function yy_r138(){$this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; }
+#line 2588 "smarty_internal_templateparser.php"
+#line 501 "smarty_internal_templateparser.y"
+ function yy_r139(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; }
+#line 2591 "smarty_internal_templateparser.php"
+#line 506 "smarty_internal_templateparser.y"
+ function yy_r140(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor;} else {
+ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],"'"), null, true, false)->nocache;} }
+#line 2595 "smarty_internal_templateparser.php"
+#line 509 "smarty_internal_templateparser.y"
+ function yy_r141(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
+#line 2598 "smarty_internal_templateparser.php"
+#line 511 "smarty_internal_templateparser.y"
+ function yy_r142(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2601 "smarty_internal_templateparser.php"
+#line 513 "smarty_internal_templateparser.y"
+ function yy_r143(){if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') {
+ $this->compiler->trigger_template_error (self::Err1);
+ }
+ $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2608 "smarty_internal_templateparser.php"
+#line 518 "smarty_internal_templateparser.y"
+ function yy_r144(){if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor .')->value'.$this->yystack[$this->yyidx + 0]->minor.'}'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor,"'"), null, true, false)->nocache;
+ }
+#line 2615 "smarty_internal_templateparser.php"
+#line 523 "smarty_internal_templateparser.y"
+ function yy_r145(){if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';
+ }
+#line 2622 "smarty_internal_templateparser.php"
+#line 528 "smarty_internal_templateparser.y"
+ function yy_r146(){if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';
+ }
+#line 2629 "smarty_internal_templateparser.php"
+#line 534 "smarty_internal_templateparser.y"
+ function yy_r147(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2632 "smarty_internal_templateparser.php"
+#line 540 "smarty_internal_templateparser.y"
+ function yy_r148(){if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
+ if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
+ $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
+ if ($func_name == 'isset') {
+ if (count($this->yystack[$this->yyidx + -1]->minor) == 0) {
+ $this->compiler->trigger_template_error ('Illegal number of paramer in "isset()"');
+ }
+ $isset_par=str_replace("')->value","',null,true,false)->value",implode(',',$this->yystack[$this->yyidx + -1]->minor));
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $isset_par .")";
+ } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){
+ if (count($this->yystack[$this->yyidx + -1]->minor) != 1) {
+ $this->compiler->trigger_template_error ('Illegal number of paramer in "empty()"');
+ }
+ if ($func_name == 'empty') {
+ $this->_retvalue = $func_name.'('.str_replace("')->value","',null,true,false)->value",$this->yystack[$this->yyidx + -1]->minor[0]).')';
+ } else {
+ $this->_retvalue = $func_name.'('.$this->yystack[$this->yyidx + -1]->minor[0].')';
+ }
+ } else {
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
+ }
+ } else {
+ $this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
+ }
+ }
+ }
+#line 2660 "smarty_internal_templateparser.php"
+#line 570 "smarty_internal_templateparser.y"
+ function yy_r149(){if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') {
+ $this->compiler->trigger_template_error (self::Err1);
+ }
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
+ }
+#line 2667 "smarty_internal_templateparser.php"
+#line 575 "smarty_internal_templateparser.y"
+ function yy_r150(){if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -3]->minor .'\')->value;?>'; $this->_retvalue = '$_tmp'.$this->prefix_number.'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')';
+ }
+#line 2674 "smarty_internal_templateparser.php"
+#line 583 "smarty_internal_templateparser.y"
+ function yy_r151(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor)); }
+#line 2677 "smarty_internal_templateparser.php"
+#line 592 "smarty_internal_templateparser.y"
+ function yy_r154(){$this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); }
+#line 2680 "smarty_internal_templateparser.php"
+#line 593 "smarty_internal_templateparser.y"
+ function yy_r155(){$this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); }
+#line 2683 "smarty_internal_templateparser.php"
+#line 596 "smarty_internal_templateparser.y"
+ function yy_r157(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
+#line 2686 "smarty_internal_templateparser.php"
+#line 601 "smarty_internal_templateparser.y"
+ function yy_r158(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); }
+#line 2689 "smarty_internal_templateparser.php"
+#line 603 "smarty_internal_templateparser.y"
+ function yy_r159(){$this->_retvalue = array(); }
+#line 2692 "smarty_internal_templateparser.php"
+#line 605 "smarty_internal_templateparser.y"
+ function yy_r160(){$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
+#line 2695 "smarty_internal_templateparser.php"
+#line 615 "smarty_internal_templateparser.y"
+ function yy_r165(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2698 "smarty_internal_templateparser.php"
+#line 617 "smarty_internal_templateparser.y"
+ function yy_r166(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2701 "smarty_internal_templateparser.php"
+#line 626 "smarty_internal_templateparser.y"
+ function yy_r167(){$this->_retvalue = '=='; }
+#line 2704 "smarty_internal_templateparser.php"
+#line 627 "smarty_internal_templateparser.y"
+ function yy_r168(){$this->_retvalue = '!='; }
+#line 2707 "smarty_internal_templateparser.php"
+#line 628 "smarty_internal_templateparser.y"
+ function yy_r169(){$this->_retvalue = '>'; }
+#line 2710 "smarty_internal_templateparser.php"
+#line 629 "smarty_internal_templateparser.y"
+ function yy_r170(){$this->_retvalue = '<'; }
+#line 2713 "smarty_internal_templateparser.php"
+#line 630 "smarty_internal_templateparser.y"
+ function yy_r171(){$this->_retvalue = '>='; }
+#line 2716 "smarty_internal_templateparser.php"
+#line 631 "smarty_internal_templateparser.y"
+ function yy_r172(){$this->_retvalue = '<='; }
+#line 2719 "smarty_internal_templateparser.php"
+#line 632 "smarty_internal_templateparser.y"
+ function yy_r173(){$this->_retvalue = '==='; }
+#line 2722 "smarty_internal_templateparser.php"
+#line 633 "smarty_internal_templateparser.y"
+ function yy_r174(){$this->_retvalue = '!=='; }
+#line 2725 "smarty_internal_templateparser.php"
+#line 634 "smarty_internal_templateparser.y"
+ function yy_r175(){$this->_retvalue = '%'; }
+#line 2728 "smarty_internal_templateparser.php"
+#line 636 "smarty_internal_templateparser.y"
+ function yy_r176(){$this->_retvalue = '&&'; }
+#line 2731 "smarty_internal_templateparser.php"
+#line 637 "smarty_internal_templateparser.y"
+ function yy_r177(){$this->_retvalue = '||'; }
+#line 2734 "smarty_internal_templateparser.php"
+#line 638 "smarty_internal_templateparser.y"
+ function yy_r178(){$this->_retvalue = ' XOR '; }
+#line 2737 "smarty_internal_templateparser.php"
+#line 643 "smarty_internal_templateparser.y"
+ function yy_r179(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; }
+#line 2740 "smarty_internal_templateparser.php"
+#line 645 "smarty_internal_templateparser.y"
+ function yy_r181(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2743 "smarty_internal_templateparser.php"
+#line 646 "smarty_internal_templateparser.y"
+ function yy_r182(){ return; }
+#line 2746 "smarty_internal_templateparser.php"
+#line 647 "smarty_internal_templateparser.y"
+ function yy_r183(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2749 "smarty_internal_templateparser.php"
+#line 648 "smarty_internal_templateparser.y"
+ function yy_r184(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; }
+#line 2752 "smarty_internal_templateparser.php"
+#line 655 "smarty_internal_templateparser.y"
+ function yy_r186(){ $this->_retvalue = "''"; }
+#line 2755 "smarty_internal_templateparser.php"
+#line 656 "smarty_internal_templateparser.y"
+ function yy_r187(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php(); }
+#line 2758 "smarty_internal_templateparser.php"
+#line 658 "smarty_internal_templateparser.y"
+ function yy_r188(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
+#line 2761 "smarty_internal_templateparser.php"
+#line 659 "smarty_internal_templateparser.y"
+ function yy_r189(){ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor); }
+#line 2764 "smarty_internal_templateparser.php"
+#line 661 "smarty_internal_templateparser.y"
+ function yy_r190(){ $this->_retvalue = new _smarty_code($this, $this->yystack[$this->yyidx + -1]->minor); }
+#line 2767 "smarty_internal_templateparser.php"
+#line 663 "smarty_internal_templateparser.y"
+ function yy_r192(){if (isset($this->compiler->local_var["'".substr($this->yystack[$this->yyidx + 0]->minor,1)."'"])) {
+ $this->_retvalue = new _smarty_code($this, '$_smarty_tpl->tpl_vars[\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\']->value');
+ } else {
+ $this->_retvalue = new _smarty_code($this, '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\')->value');
+ }
+ $this->compiler->tag_nocache = $this->compiler->tag_nocache | $this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,"'"), null, true, false)->nocache;
+ }
+#line 2776 "smarty_internal_templateparser.php"
+#line 671 "smarty_internal_templateparser.y"
+ function yy_r194(){ $this->_retvalue = new _smarty_code($this, '('.$this->yystack[$this->yyidx + -1]->minor.')'); }
+#line 2779 "smarty_internal_templateparser.php"
+#line 672 "smarty_internal_templateparser.y"
+ function yy_r195(){
+ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2784 "smarty_internal_templateparser.php"
+#line 675 "smarty_internal_templateparser.y"
+ function yy_r196(){ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor); }
+#line 2787 "smarty_internal_templateparser.php"
+#line 682 "smarty_internal_templateparser.y"
+ function yy_r198(){$this->_retvalue = ''; }
+#line 2790 "smarty_internal_templateparser.php"
+
+ private $_retvalue;
+
+ function yy_reduce($yyruleno)
+ {
+ $yymsp = $this->yystack[$this->yyidx];
+ if (self::$yyTraceFILE && $yyruleno >= 0
+ && $yyruleno < count(self::$yyRuleName)) {
+ fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n",
+ self::$yyTracePrompt, $yyruleno,
+ self::$yyRuleName[$yyruleno]);
+ }
+
+ $this->_retvalue = $yy_lefthand_side = null;
+ if (array_key_exists($yyruleno, self::$yyReduceMap)) {
+ // call the action
+ $this->_retvalue = null;
+ $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $yy_lefthand_side = $this->_retvalue;
+ }
+ $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= $yysize;
+ for($i = $yysize; $i; $i--) {
+ // pop all of the right-hand side parameters
+ array_pop($this->yystack);
+ }
+ $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ if ($yyact < self::YYNSTATE) {
+ if (!self::$yyTraceFILE && $yysize) {
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $yyact;
+ $x->major = $yygoto;
+ $x->minor = $yy_lefthand_side;
+ $this->yystack[$this->yyidx] = $x;
+ } else {
+ $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
+ }
+ } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yy_accept();
+ }
+ }
+
+ function yy_parse_failed()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+ }
+
+ function yy_syntax_error($yymajor, $TOKEN)
+ {
+#line 66 "smarty_internal_templateparser.y"
+
+ $this->internalError = true;
+ $this->yymajor = $yymajor;
+ $this->compiler->trigger_template_error();
+#line 2853 "smarty_internal_templateparser.php"
+ }
+
+ function yy_accept()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $stack = $this->yy_pop_parser_stack();
+ }
+#line 58 "smarty_internal_templateparser.y"
+
+ $this->successful = !$this->internalError;
+ $this->internalError = false;
+ $this->retvalue = $this->_retvalue;
+ //echo $this->retvalue."\n\n";
+#line 2871 "smarty_internal_templateparser.php"
+ }
+
+ function doParse($yymajor, $yytokenvalue)
+ {
+ $yyerrorhit = 0; /* True if yymajor has invoked an error */
+
+ if ($this->yyidx === null || $this->yyidx < 0) {
+ $this->yyidx = 0;
+ $this->yyerrcnt = -1;
+ $x = new TP_yyStackEntry;
+ $x->stateno = 0;
+ $x->major = 0;
+ $this->yystack = array();
+ array_push($this->yystack, $x);
+ }
+ $yyendofinput = ($yymajor==0);
+
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sInput %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+
+ do {
+ $yyact = $this->yy_find_shift_action($yymajor);
+ if ($yymajor < self::YYERRORSYMBOL &&
+ !$this->yy_is_expected_token($yymajor)) {
+ // force a syntax error
+ $yyact = self::YY_ERROR_ACTION;
+ }
+ if ($yyact < self::YYNSTATE) {
+ $this->yy_shift($yyact, $yymajor, $yytokenvalue);
+ $this->yyerrcnt--;
+ if ($yyendofinput && $this->yyidx >= 0) {
+ $yymajor = 0;
+ } else {
+ $yymajor = self::YYNOCODE;
+ }
+ } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
+ $this->yy_reduce($yyact - self::YYNSTATE);
+ } elseif ($yyact == self::YY_ERROR_ACTION) {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sSyntax Error!\n",
+ self::$yyTracePrompt);
+ }
+ if (self::YYERRORSYMBOL) {
+ if ($this->yyerrcnt < 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $yymx = $this->yystack[$this->yyidx]->major;
+ if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $yymajor = self::YYNOCODE;
+ } else {
+ while ($this->yyidx >= 0 &&
+ $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
+ ){
+ $this->yy_pop_parser_stack();
+ }
+ if ($this->yyidx < 0 || $yymajor==0) {
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $this->yy_parse_failed();
+ $yymajor = self::YYNOCODE;
+ } elseif ($yymx != self::YYERRORSYMBOL) {
+ $u2 = 0;
+ $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
+ }
+ }
+ $this->yyerrcnt = 3;
+ $yyerrorhit = 1;
+ } else {
+ if ($this->yyerrcnt <= 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $this->yyerrcnt = 3;
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ if ($yyendofinput) {
+ $this->yy_parse_failed();
+ }
+ $yymajor = self::YYNOCODE;
+ }
+ } else {
+ $this->yy_accept();
+ $yymajor = self::YYNOCODE;
+ }
+ } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_utility.php b/3dparty/Smarty/sysplugins/smarty_internal_utility.php
new file mode 100644
index 00000000000..f33f992eaba
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_utility.php
@@ -0,0 +1,300 @@
+<?php
+
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: smarty_internal_utility.php
+ * SVN: $Id: $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @version 3-SVN$Rev: 3286 $
+ */
+
+class Smarty_Internal_Utility {
+ protected $smarty;
+
+ function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+
+ /**
+ * Compile all template files
+ *
+ * @param string $extension file extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit
+ * @param int $max_errors
+ * @return integer number of template files recompiled
+ */
+ function compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
+ {
+ // switch off time limit
+ if (function_exists('set_time_limit')) {
+ @set_time_limit($time_limit);
+ }
+ $this->smarty->force_compile = $force_compile;
+ $_count = 0;
+ $_error_count = 0;
+ // loop over array of template directories
+ foreach((array)$this->smarty->template_dir as $_dir) {
+ if (strpos('/\\', substr($_dir, -1)) === false) {
+ $_dir .= DS;
+ }
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ $_compile = new RecursiveIteratorIterator($_compileDirs);
+ foreach ($_compile as $_fileinfo) {
+ if (strpos($_fileinfo, '.svn') !== false) continue;
+ $_file = $_fileinfo->getFilename();
+ if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
+ if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
+ $_template_file = $_file;
+ } else {
+ $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
+ }
+ echo '<br>', $_dir, '---', $_template_file;
+ flush();
+ $_start_time = microtime(true);
+ try {
+ $_tpl = $this->smarty->createTemplate($_template_file,null,null,null,false);
+ if ($_tpl->mustCompile()) {
+ $_tpl->compileTemplateSource();
+ echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
+ flush();
+ } else {
+ echo ' is up to date';
+ flush();
+ }
+ }
+ catch (Exception $e) {
+ echo 'Error: ', $e->getMessage(), "<br><br>";
+ $_error_count++;
+ }
+ // free memory
+ $this->smarty->template_objects = array();
+ $_tpl->smarty->template_objects = array();
+ $_tpl = null;
+ if ($max_errors !== null && $_error_count == $max_errors) {
+ echo '<br><br>too many errors';
+ exit();
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Compile all config files
+ *
+ * @param string $extension file extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit
+ * @param int $max_errors
+ * @return integer number of template files recompiled
+ */
+ function compileAllConfig($extention = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null)
+ {
+ // switch off time limit
+ if (function_exists('set_time_limit')) {
+ @set_time_limit($time_limit);
+ }
+ $this->smarty->force_compile = $force_compile;
+ $_count = 0;
+ $_error_count = 0;
+ // loop over array of template directories
+ foreach((array)$this->smarty->config_dir as $_dir) {
+ if (strpos('/\\', substr($_dir, -1)) === false) {
+ $_dir .= DS;
+ }
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ $_compile = new RecursiveIteratorIterator($_compileDirs);
+ foreach ($_compile as $_fileinfo) {
+ if (strpos($_fileinfo, '.svn') !== false) continue;
+ $_file = $_fileinfo->getFilename();
+ if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
+ if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
+ $_config_file = $_file;
+ } else {
+ $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
+ }
+ echo '<br>', $_dir, '---', $_config_file;
+ flush();
+ $_start_time = microtime(true);
+ try {
+ $_config = new Smarty_Internal_Config($_config_file, $this->smarty);
+ if ($_config->mustCompile()) {
+ $_config->compileConfigSource();
+ echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
+ flush();
+ } else {
+ echo ' is up to date';
+ flush();
+ }
+ }
+ catch (Exception $e) {
+ echo 'Error: ', $e->getMessage(), "<br><br>";
+ $_error_count++;
+ }
+ if ($max_errors !== null && $_error_count == $max_errors) {
+ echo '<br><br>too many errors';
+ exit();
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Delete compiled template file
+ *
+ * @param string $resource_name template name
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @return integer number of template files deleted
+ */
+ function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
+ {
+ $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
+ $_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';
+ if (isset($resource_name)) {
+ $_resource_part_1 = $resource_name . '.php';
+ $_resource_part_2 = $resource_name . '.cache' . '.php';
+ } else {
+ $_resource_part = '';
+ }
+ $_dir = $this->smarty->compile_dir;
+ if ($this->smarty->use_sub_dirs && isset($_compile_id)) {
+ $_dir .= $_compile_id . $_dir_sep;
+ }
+ if (isset($_compile_id)) {
+ $_compile_id_part = $this->smarty->compile_dir . $_compile_id . $_dir_sep;
+ }
+ $_count = 0;
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ($_compile as $_file) {
+ if (strpos($_file, '.svn') !== false) continue;
+ if ($_file->isDir()) {
+ if (!$_compile->isDot()) {
+ // delete folder if empty
+ @rmdir($_file->getPathname());
+ }
+ } else {
+ if ((!isset($_compile_id) || (strlen((string)$_file) > strlen($_compile_id_part) && substr_compare((string)$_file, $_compile_id_part, 0, strlen($_compile_id_part)) == 0)) &&
+ (!isset($resource_name) || (strlen((string)$_file) > strlen($_resource_part_1) && substr_compare((string)$_file, $_resource_part_1, - strlen($_resource_part_1), strlen($_resource_part_1)) == 0) ||
+ (strlen((string)$_file) > strlen($_resource_part_2) && substr_compare((string)$_file, $_resource_part_2, - strlen($_resource_part_2), strlen($_resource_part_2)) == 0))) {
+ if (isset($exp_time)) {
+ if (time() - @filemtime($_file) >= $exp_time) {
+ $_count += @unlink((string) $_file) ? 1 : 0;
+ }
+ } else {
+ $_count += @unlink((string) $_file) ? 1 : 0;
+ }
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Return array of tag/attributes of all tags used by an template
+ *
+ * @param object $templae template object
+ * @return array of tag/attributes
+ */
+ function getTags(Smarty_Internal_Template $template)
+ {
+ $template->smarty->get_used_tags = true;
+ $template->compileTemplateSource();
+ return $template->compiler_object->used_tags;
+ }
+
+ function testInstall()
+ {
+ echo "<PRE>\n";
+
+ echo "Smarty Installation test...\n";
+
+ echo "Testing template directory...\n";
+
+ foreach((array)$this->smarty->template_dir as $template_dir) {
+ if (!is_dir($template_dir))
+ echo "FAILED: $template_dir is not a directory.\n";
+ elseif (!is_readable($template_dir))
+ echo "FAILED: $template_dir is not readable.\n";
+ else
+ echo "$template_dir is OK.\n";
+ }
+
+ echo "Testing compile directory...\n";
+
+ if (!is_dir($this->smarty->compile_dir))
+ echo "FAILED: {$this->smarty->compile_dir} is not a directory.\n";
+ elseif (!is_readable($this->smarty->compile_dir))
+ echo "FAILED: {$this->smarty->compile_dir} is not readable.\n";
+ elseif (!is_writable($this->smarty->compile_dir))
+ echo "FAILED: {$this->smarty->compile_dir} is not writable.\n";
+ else
+ echo "{$this->smarty->compile_dir} is OK.\n";
+
+ echo "Testing plugins directory...\n";
+
+ foreach((array)$this->smarty->plugins_dir as $plugin_dir) {
+ if (!is_dir($plugin_dir))
+ echo "FAILED: $plugin_dir is not a directory.\n";
+ elseif (!is_readable($plugin_dir))
+ echo "FAILED: $plugin_dir is not readable.\n";
+ else
+ echo "$plugin_dir is OK.\n";
+ }
+
+ echo "Testing cache directory...\n";
+
+ if (!is_dir($this->smarty->cache_dir))
+ echo "FAILED: {$this->smarty->cache_dir} is not a directory.\n";
+ elseif (!is_readable($this->smarty->cache_dir))
+ echo "FAILED: {$this->smarty->cache_dir} is not readable.\n";
+ elseif (!is_writable($this->smarty->cache_dir))
+ echo "FAILED: {$this->smarty->cache_dir} is not writable.\n";
+ else
+ echo "{$this->smarty->cache_dir} is OK.\n";
+
+ echo "Testing configs directory...\n";
+
+ if (!is_dir($this->smarty->config_dir))
+ echo "FAILED: {$this->smarty->config_dir} is not a directory.\n";
+ elseif (!is_readable($this->smarty->config_dir))
+ echo "FAILED: {$this->smarty->config_dir} is not readable.\n";
+ else
+ echo "{$this->smarty->config_dir} is OK.\n";
+
+ echo "Tests complete.\n";
+
+ echo "</PRE>\n";
+
+ return true;
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_wrapper.php b/3dparty/Smarty/sysplugins/smarty_internal_wrapper.php
new file mode 100644
index 00000000000..28fdde02bd3
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_wrapper.php
@@ -0,0 +1,131 @@
+<?php
+
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: smarty_internal_wrapper.php
+ * SVN: $Id: $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @version 3-SVN$Rev: 3286 $
+ */
+
+/*
+ * Smarty Backward Compatability Wrapper
+ */
+
+class Smarty_Internal_Wrapper {
+
+ protected $smarty;
+
+ function __construct($smarty) {
+ $this->smarty = $smarty;
+ }
+
+ /**
+ * Converts smarty2-style function call to smarty 3-style function call
+ * This is expensive, be sure to port your code to Smarty 3!
+ *
+ * @param string $name Smarty 2 function name
+ * @param array $args Smarty 2 function args
+ */
+ function convert($name, $args) {
+ // throw notice about deprecated function
+ if($this->smarty->deprecation_notices)
+ trigger_error("function call '$name' is unknown or deprecated.",E_USER_NOTICE);
+ // get first and last part of function name
+ $name_parts = explode('_',$name,2);
+ switch($name_parts[0]) {
+ case 'register':
+ case 'unregister':
+ switch($name_parts[1]) {
+ case 'object':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Object"),$args);
+ case 'compiler_function':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array('compiler'),$args));
+ case 'prefilter':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('pre'),$args));
+ case 'postfilter':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('post'),$args));
+ case 'outputfilter':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('output'),$args));
+ case 'resource':
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Resource"),$args);
+ default:
+ return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array($name_parts[1]),$args));
+ }
+ case 'get':
+ switch($name_parts[1]) {
+ case 'template_vars':
+ return call_user_func_array(array($this->smarty,'getTemplateVars'),$args);
+ case 'config_vars':
+ return call_user_func_array(array($this->smarty,'getConfigVars'),$args);
+ default:
+ return call_user_func_array(array($myobj,$name_parts[1]),$args);
+ }
+ case 'clear':
+ switch($name_parts[1]) {
+ case 'all_assign':
+ return call_user_func_array(array($this->smarty,'clearAllAssign'),$args);
+ case 'assign':
+ return call_user_func_array(array($this->smarty,'clearAssign'),$args);
+ case 'all_cache':
+ return call_user_func_array(array($this->smarty,'clearAllCache'),$args);
+ case 'cache':
+ return call_user_func_array(array($this->smarty,'clearCache'),$args);
+ case 'compiled_template':
+ return call_user_func_array(array($this->smarty,'clearCompiledTemplate'),$args);
+ }
+ case 'config':
+ switch($name_parts[1]) {
+ case 'load':
+ return call_user_func_array(array($this->smarty,'configLoad'),$args);
+ }
+ case 'trigger':
+ switch($name_parts[1]) {
+ case 'error':
+ return call_user_func_array('trigger_error',$args);
+ }
+ case 'load':
+ switch($name_parts[1]) {
+ case 'filter':
+ return call_user_func_array(array($this->smarty,'loadFilter'),$args);
+ }
+ }
+ throw new SmartyException("unknown method '$name'");
+ }
+
+ /**
+ * trigger Smarty error
+ *
+ * @param string $error_msg
+ * @param integer $error_type
+ */
+ function trigger_error($error_msg, $error_type = E_USER_WARNING)
+ {
+ trigger_error("Smarty error: $error_msg", $error_type);
+ }
+}
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_internal_write_file.php b/3dparty/Smarty/sysplugins/smarty_internal_write_file.php
new file mode 100644
index 00000000000..69b9cbc50e4
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_internal_write_file.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Smarty write file plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Monte Ohrt
+ */
+
+/**
+ * Smarty Internal Write File Class
+ */
+class Smarty_Internal_Write_File {
+ /**
+ * Writes file in a save way to disk
+ *
+ * @param string $_filepath complete filepath
+ * @param string $_contents file content
+ * @return boolean true
+ */
+ public static function writeFile($_filepath, $_contents, $smarty)
+ {
+ $old_umask = umask(0);
+ $_dirpath = dirname($_filepath);
+ // if subdirs, create dir structure
+ if ($_dirpath !== '.' && !file_exists($_dirpath)) {
+ mkdir($_dirpath, $smarty->_dir_perms, true);
+ }
+ // write to tmp file, then move to overt file lock race condition
+ $_tmp_file = tempnam($_dirpath, 'wrt');
+
+ if (!($fd = @fopen($_tmp_file, 'wb'))) {
+ $_tmp_file = $_dirpath . DS . uniqid('wrt');
+ if (!($fd = @fopen($_tmp_file, 'wb'))) {
+ throw new SmartyException("unable to write file {$_tmp_file}");
+ return false;
+ }
+ }
+
+ fwrite($fd, $_contents);
+ fclose($fd);
+
+ // remove original file
+ if (file_exists($_filepath))
+ @unlink($_filepath);
+ // rename tmp file
+ rename($_tmp_file, $_filepath);
+ // set file permissions
+ chmod($_filepath, $smarty->_file_perms);
+ umask($old_umask);
+ return true;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/3dparty/Smarty/sysplugins/smarty_security.php b/3dparty/Smarty/sysplugins/smarty_security.php
new file mode 100644
index 00000000000..581ea084528
--- /dev/null
+++ b/3dparty/Smarty/sysplugins/smarty_security.php
@@ -0,0 +1,229 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage Security
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does contain the security settings
+ */
+class Smarty_Security {
+ /**
+ * This determines how Smarty handles "<?php ... ?>" tags in templates.
+ * possible values:
+ * <ul>
+ * <li>Smarty::PHP_PASSTHRU -> echo PHP tags as they are</li>
+ * <li>Smarty::PHP_QUOTE -> escape tags as entities</li>
+ * <li>Smarty::PHP_REMOVE -> remove php tags</li>
+ * <li>Smarty::PHP_ALLOW -> execute php tags</li>
+ * </ul>
+ *
+ * @var integer
+ */
+ public $php_handling = Smarty::PHP_PASSTHRU;
+
+ /**
+ * This is the list of template directories that are considered secure.
+ * $template_dir is in this list implicitly.
+ *
+ * @var array
+ */
+ public $secure_dir = array();
+
+
+ /**
+ * This is an array of directories where trusted php scripts reside.
+ * {@link $security} is disabled during their inclusion/execution.
+ *
+ * @var array
+ */
+ public $trusted_dir = array();
+
+
+ /**
+ * This is an array of trusted static classes.
+ *
+ * If empty access to all static classes is allowed.
+ * If set to 'none' none is allowed.
+ * @var array
+ */
+ public $static_classes = array();
+
+ /**
+ * This is an array of trusted PHP functions.
+ *
+ * If empty all functions are allowed.
+ * To disable all PHP functions set $php_functions = null.
+ * @var array
+ */
+ public $php_functions = array('isset', 'empty',
+ 'count', 'sizeof','in_array', 'is_array','time','nl2br');
+
+ /**
+ * This is an array of trusted PHP modifers.
+ *
+ * If empty all modifiers are allowed.
+ * To disable all modifier set $modifiers = null.
+ * @var array
+ */
+ public $php_modifiers = array('escape','count');
+
+ /**
+ * This is an array of trusted streams.
+ *
+ * If empty all streams are allowed.
+ * To disable all streams set $streams = null.
+ * @var array
+ */
+ public $streams = array('file');
+ /**
+ * + flag if constants can be accessed from template
+ */
+ public $allow_constants = true;
+ /**
+ * + flag if super globals can be accessed from template
+ */
+ public $allow_super_globals = true;
+ /**
+ * + flag if the {php} and {include_php} tag can be executed
+ */
+ public $allow_php_tag = false;
+
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+ /**
+ * Check if PHP function is trusted.
+ *
+ * @param string $function_name
+ * @param object $compiler compiler object
+ * @return boolean true if function is trusted
+ */
+ function isTrustedPhpFunction($function_name, $compiler)
+ {
+ if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) {
+ return true;
+ } else {
+ $compiler->trigger_template_error ("PHP function '{$function_name}' not allowed by security setting");
+ return false;
+ }
+ }
+
+ /**
+ * Check if static class is trusted.
+ *
+ * @param string $class_name
+ * @param object $compiler compiler object
+ * @return boolean true if class is trusted
+ */
+ function isTrustedStaticClass($class_name, $compiler)
+ {
+ if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) {
+ return true;
+ } else {
+ $compiler->trigger_template_error ("access to static class '{$class_name}' not allowed by security setting");
+ return false;
+ }
+ }
+ /**
+ * Check if modifier is trusted.
+ *
+ * @param string $modifier_name
+ * @param object $compiler compiler object
+ * @return boolean true if modifier is trusted
+ */
+ function isTrustedModifier($modifier_name, $compiler)
+ {
+ if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) {
+ return true;
+ } else {
+ $compiler->trigger_template_error ("modifier '{$modifier_name}' not allowed by security setting");
+ return false;
+ }
+ }
+ /**
+ * Check if stream is trusted.
+ *
+ * @param string $stream_name
+ * @param object $compiler compiler object
+ * @return boolean true if stream is trusted
+ */
+ function isTrustedStream($stream_name)
+ {
+ if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) {
+ return true;
+ } else {
+ throw new SmartyException ("stream '{$stream_name}' not allowed by security setting");
+ return false;
+ }
+ }
+
+ /**
+ * Check if directory of file resource is trusted.
+ *
+ * @param string $filepath
+ * @param object $compiler compiler object
+ * @return boolean true if directory is trusted
+ */
+ function isTrustedResourceDir($filepath)
+ {
+ $_rp = realpath($filepath);
+ if (isset($this->smarty->template_dir)) {
+ foreach ((array)$this->smarty->template_dir as $curr_dir) {
+ if (($_cd = realpath($curr_dir)) !== false &&
+ strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+ (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) {
+ return true;
+ }
+ }
+ }
+ if (!empty($this->smarty->security_policy->secure_dir)) {
+ foreach ((array)$this->smarty->security_policy->secure_dir as $curr_dir) {
+ if (($_cd = realpath($curr_dir)) !== false) {
+ if ($_cd == $_rp) {
+ return true;
+ } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+ (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ throw new SmartyException ("directory '{$_rp}' not allowed by security setting");
+ return false;
+ }
+
+ /**
+ * Check if directory of file resource is trusted.
+ *
+ * @param string $filepath
+ * @param object $compiler compiler object
+ * @return boolean true if directory is trusted
+ */
+ function isTrustedPHPDir($filepath)
+ {
+ $_rp = realpath($filepath);
+ if (!empty($this->trusted_dir)) {
+ foreach ((array)$this->trusted_dir as $curr_dir) {
+ if (($_cd = realpath($curr_dir)) !== false) {
+ if ($_cd == $_rp) {
+ return true;
+ } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+ substr($_rp, strlen($_cd), 1) == DS) {
+ return true;
+ }
+ }
+ }
+ }
+
+ throw new SmartyException ("directory '{$_rp}' not allowed by security setting");
+ return false;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/inc/System.php b/3dparty/System.php
index a9279ff687d..a9279ff687d 100644
--- a/inc/System.php
+++ b/3dparty/System.php
diff --git a/inc/XML/Parser.php b/3dparty/XML/Parser.php
index 6f77b5c66da..6f77b5c66da 100644
--- a/inc/XML/Parser.php
+++ b/3dparty/XML/Parser.php
diff --git a/inc/XML/RPC.php b/3dparty/XML/RPC.php
index 2cdb44f4aea..2cdb44f4aea 100644
--- a/inc/XML/RPC.php
+++ b/3dparty/XML/RPC.php
diff --git a/inc/XML/RPC/Server.php b/3dparty/XML/RPC/Server.php
index 5c5c04b1f7a..5c5c04b1f7a 100644
--- a/inc/XML/RPC/Server.php
+++ b/3dparty/XML/RPC/Server.php
diff --git a/inc/docs/HTTP_WebDAV_Server/README b/3dparty/docs/HTTP_WebDAV_Server/README
index 9847b261684..9847b261684 100644
--- a/inc/docs/HTTP_WebDAV_Server/README
+++ b/3dparty/docs/HTTP_WebDAV_Server/README
diff --git a/inc/docs/HTTP_WebDAV_Server/dav.txt b/3dparty/docs/HTTP_WebDAV_Server/dav.txt
index 9e0b8299229..9e0b8299229 100644
--- a/inc/docs/HTTP_WebDAV_Server/dav.txt
+++ b/3dparty/docs/HTTP_WebDAV_Server/dav.txt
diff --git a/inc/docs/HTTP_WebDAV_Server/db/Fileserver.sql b/3dparty/docs/HTTP_WebDAV_Server/db/Fileserver.sql
index 8047d12f5e4..8047d12f5e4 100644
--- a/inc/docs/HTTP_WebDAV_Server/db/Fileserver.sql
+++ b/3dparty/docs/HTTP_WebDAV_Server/db/Fileserver.sql
diff --git a/inc/package.dtd b/3dparty/package.dtd
index 6092e8f4ce3..6092e8f4ce3 100644
--- a/inc/package.dtd
+++ b/3dparty/package.dtd
diff --git a/inc/packages/Archive_Tar.xml b/3dparty/packages/Archive_Tar.xml
index ba748a18afd..ba748a18afd 100644
--- a/inc/packages/Archive_Tar.xml
+++ b/3dparty/packages/Archive_Tar.xml
diff --git a/inc/packages/Console_Getopt.xml b/3dparty/packages/Console_Getopt.xml
index 221919d9767..221919d9767 100644
--- a/inc/packages/Console_Getopt.xml
+++ b/3dparty/packages/Console_Getopt.xml
diff --git a/inc/packages/DB.xml b/3dparty/packages/DB.xml
index d8aaec82c27..d8aaec82c27 100644
--- a/inc/packages/DB.xml
+++ b/3dparty/packages/DB.xml
diff --git a/inc/packages/Log.xml b/3dparty/packages/Log.xml
index de16370c8bf..de16370c8bf 100644
--- a/inc/packages/Log.xml
+++ b/3dparty/packages/Log.xml
diff --git a/inc/packages/Mail.xml b/3dparty/packages/Mail.xml
index 0fbd10ac951..0fbd10ac951 100644
--- a/inc/packages/Mail.xml
+++ b/3dparty/packages/Mail.xml
diff --git a/inc/packages/Mail_Mime.xml b/3dparty/packages/Mail_Mime.xml
index ddf734f0c28..ddf734f0c28 100644
--- a/inc/packages/Mail_Mime.xml
+++ b/3dparty/packages/Mail_Mime.xml
diff --git a/inc/packages/Net_SMTP.xml b/3dparty/packages/Net_SMTP.xml
index d1e8c56332e..d1e8c56332e 100644
--- a/inc/packages/Net_SMTP.xml
+++ b/3dparty/packages/Net_SMTP.xml
diff --git a/inc/packages/Net_Socket.xml b/3dparty/packages/Net_Socket.xml
index 9c7eae00940..9c7eae00940 100644
--- a/inc/packages/Net_Socket.xml
+++ b/3dparty/packages/Net_Socket.xml
diff --git a/inc/packages/PEAR.xml b/3dparty/packages/PEAR.xml
index 83800a16a0d..83800a16a0d 100644
--- a/inc/packages/PEAR.xml
+++ b/3dparty/packages/PEAR.xml
diff --git a/inc/packages/PHPUnit.xml b/3dparty/packages/PHPUnit.xml
index 71e736764db..71e736764db 100644
--- a/inc/packages/PHPUnit.xml
+++ b/3dparty/packages/PHPUnit.xml
diff --git a/inc/packages/XML_Parser.xml b/3dparty/packages/XML_Parser.xml
index 9b4b0269faf..9b4b0269faf 100644
--- a/inc/packages/XML_Parser.xml
+++ b/3dparty/packages/XML_Parser.xml
diff --git a/inc/packages/XML_RPC.xml b/3dparty/packages/XML_RPC.xml
index 44e94882647..44e94882647 100644
--- a/inc/packages/XML_RPC.xml
+++ b/3dparty/packages/XML_RPC.xml
diff --git a/inc/pearcmd.php b/3dparty/pearcmd.php
index 28a81dcf67f..28a81dcf67f 100644
--- a/inc/pearcmd.php
+++ b/3dparty/pearcmd.php
diff --git a/admin/appinfo.php b/admin/appinfo.php
new file mode 100644
index 00000000000..0b2e4dbf85d
--- /dev/null
+++ b/admin/appinfo.php
@@ -0,0 +1,12 @@
+<?php
+
+OC_UTIL::addApplication( array( "id" => "admin", "name" => "Administration" ));
+if( OC_USER::ingroup( $_SESSION['username'], 'admin' ))
+{
+ OC_UTIL::addNavigationEntry( array( "app" => "admin", "file" => "index.php", "name" => "Administration" ));
+}
+OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "system.php", "name" => "System Settings" ));
+OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "users.php", "name" => "Users" ));
+OC_UTIL::addAdminPage( array( "app" => "admin", "file" => "plugins.php", "name" => "Plugins" ));
+
+?>
diff --git a/admin/index.php b/admin/index.php
index 92c465e8d61..a9cc079c875 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -3,39 +3,41 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-$CONFIG_ERROR='';
-
-require_once('../inc/lib_base.php');
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+$adminpages = array();
-OC_UTIL::showheader();
+foreach( OC_UTIL::$adminpages as $i ){
+ // Do some more work here soon
+ $adminpages[] = $i;
+}
-$FIRSTRUN=false;
-
-echo('<div class="center">');
-OC_CONFIG::showadminform();
-echo('</div>');
-
-
-OC_UTIL::showfooter();
+$tmpl = new OC_TEMPLATE( "admin", "index", "admin" );
+$tmpl->assign( "adminpages", $adminpages );
+$tmpl->printPage();
?>
-
+
diff --git a/admin/plugins.php b/admin/plugins.php
new file mode 100644
index 00000000000..36139edab04
--- /dev/null
+++ b/admin/plugins.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+* ownCloud
+*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+
+$plugins=array();
+$blacklist=OC_PLUGIN::loadBlackList();
+
+foreach( OC_PLUGIN::listPlugins() as $i ){
+ // Gather data about plugin
+ $data = OC_PLUGIN::getPluginData($plugin);
+
+ // Is it enabled?
+ $data["enabled"] = ( array_search( $plugin, $blacklist ) === false );
+
+ // Add the data
+ $plugins[] = $data;
+}
+
+
+$tmpl = new OC_TEMPLATE( "admin", "plugins", "admin" );
+$tmpl->assign( "plugins", $plugins );
+$tmpl->printPage();
+
+?>
+
diff --git a/files/upload.php b/admin/system.php
index 08c89e76024..a9cc079c875 100644
--- a/files/upload.php
+++ b/admin/system.php
@@ -1,37 +1,43 @@
<?php
/**
-* ownCloud - ajax frontend
+* ownCloud
+*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-require_once('../inc/lib_base.php');
-$fileName=$_FILES['file']['name'];
-$source=$_FILES['file']['tmp_name'];
-$target=stripslashes($_GET['dir']).'/'.$fileName;
-if(isset($_SESSION['username']) and $_SESSION['username'] and strpos($_GET['dir'],'..')===false){
- if(OC_FILESYSTEM::fromTmpFile($source,$target)){
- echo 'true';
- }else{
- echo 'false';
- }
-}else{
- echo 'false';
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+
+$adminpages = array();
+
+foreach( OC_UTIL::$adminpages as $i ){
+ // Do some more work here soon
+ $adminpages[] = $i;
}
-?> \ No newline at end of file
+
+$tmpl = new OC_TEMPLATE( "admin", "index", "admin" );
+$tmpl->assign( "adminpages", $adminpages );
+$tmpl->printPage();
+
+?>
+
diff --git a/admin/templates/_c/.gitkeep b/admin/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/admin/templates/_c/.gitkeep
diff --git a/admin/templates/index.tmpl b/admin/templates/index.tmpl
new file mode 100644
index 00000000000..d6db07f7194
--- /dev/null
+++ b/admin/templates/index.tmpl
@@ -0,0 +1,7 @@
+<h1>Administration</h1>
+
+<ul>
+ [%foreach $adminpages as $i%]
+ <li><a href="[%linkto app=$i.app file=$i.file%]">[%$i.name%]</a></li>
+ [%/foreach%]
+</ul>
diff --git a/admin/templates/plugins.tmpl b/admin/templates/plugins.tmpl
new file mode 100644
index 00000000000..ca32a877256
--- /dev/null
+++ b/admin/templates/plugins.tmpl
@@ -0,0 +1,23 @@
+<h1>Administration</h1>
+<h2>Plugins</h2>
+
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Version</th>
+ <th>Author</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ [%foreach $plugins as $plugin%]
+ <td>[%$plugin.info.id%]</td>
+ <td>[%$plugin.info.version%]</td>
+ <td>[%$plugin.info.name%]</td>
+ <td>[%$plugin.info.author%]</td>
+ <td>enable</td>
+ [%/foreach%]
+ </tbody>
+</table>
diff --git a/admin/templates/system.tmpl b/admin/templates/system.tmpl
new file mode 100644
index 00000000000..bab436de8dc
--- /dev/null
+++ b/admin/templates/system.tmpl
@@ -0,0 +1,3 @@
+<h1>Administration</h1>
+<h2>System Settings</h2>
+#TBD \ No newline at end of file
diff --git a/admin/templates/users.tmpl b/admin/templates/users.tmpl
new file mode 100644
index 00000000000..796b55de4e0
--- /dev/null
+++ b/admin/templates/users.tmpl
@@ -0,0 +1,39 @@
+<h1>Administration</h1>
+<h2>Users</h2>
+
+<table>
+ <thead>
+ <tr>
+ <th></th>
+ <th>Name</th>
+ <th>Groups</th>
+ </tr>
+ <thead>
+ <tbody>
+ [%foreach $users as $user%]
+ <tr>
+ <td><input type="checkbox"></td>
+ <td>[%$user.name%]</td>
+ <td>[%$user.groups%]</td>
+ </tr>
+ [%/foreach%]
+ </tbody>
+</table>
+
+<h2>Groups</h2>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th></th>
+ </tr>
+ <thead>
+ <tbody>
+ [%foreach $groups as $group%]
+ <tr>
+ <td>[%$group.name%]</td>
+ <td>remove</td>
+ </tr>
+ [%/foreach%]
+ </tbody>
+</table>
diff --git a/admin/users.php b/admin/users.php
new file mode 100644
index 00000000000..77be508914b
--- /dev/null
+++ b/admin/users.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+* ownCloud
+*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+
+$users = array();
+$groups = array();
+
+foreach( OC_USER::getUsers() as $i ){
+ // Do some more work here soon
+ $ingroups = array();
+ foreach( OC_USER::getUserGroups( $i ) as $userGroup){
+ $ingroup[] = OC_USER::getGroupName( $userGroup );
+ }
+ $users[] = array( "name" => $i, "groups" => join( ",", $ingroups ));
+}
+
+foreach( OC_USER::getGroups() as $i ){
+ // Do some more work here soon
+ $groups[] = array( "name" => $i );
+}
+
+$tmpl = new OC_TEMPLATE( "admin", "users", "admin" );
+$tmpl->assign( "users", $users );
+$tmpl->assign( "groups", $groups );
+$tmpl->printPage();
+
+?>
+
diff --git a/bin/Smarty-3.0.7.tar.gz b/bin/Smarty-3.0.7.tar.gz
new file mode 100644
index 00000000000..17dd67d41bb
--- /dev/null
+++ b/bin/Smarty-3.0.7.tar.gz
Binary files differ
diff --git a/bin/jquery-1.5.min.js b/bin/jquery-1.5.min.js
new file mode 100644
index 00000000000..9144b8ae98c
--- /dev/null
+++ b/bin/jquery-1.5.min.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.5
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jan 31 08:31:29 2011 -0500
+ */
+(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g<h;g++){k=j,j=e[g];if(j==="*")j=k;else if(k!=="*"&&k!==j){l=k+" "+j,m=f[l]||f["* "+j];if(!m){o=b;for(n in f){i=n.split(" ");if(i[0]===k||i[0]==="*"){o=f[i[1]+" "+j];if(o){n=f[n],n===!0?m=o:o===!0&&(m=n);break}}}}!m&&!o&&d.error("No conversion from "+l.replace(" "," to ")),m!==!0&&(c=m?m(c):o(n(c)))}}return c}function bI(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bH(a,b,c,e){d.isArray(b)&&b.length?d.each(b,function(b,f){c||bp.test(a)?e(a,f):bH(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)}):c||b==null||typeof b!=="object"?e(a,b):d.isArray(b)||d.isEmptyObject(b)?e(a,""):d.each(b,function(b,d){bH(a+"["+b+"]",d,c,e)})}function bG(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bD,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(g[l]?l=b:(c.dataTypes.unshift(l),l=bG(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bG(a,c,d,e,"*",g));return l}function bF(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bz),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bn(a,b,c){var e=b==="width"?bh:bi,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function _(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function $(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function Z(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h,g[h][i],g[h][i].data)}}}}function Y(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function O(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(J.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(o,"")===a.type?r.push(g.selector):t.splice(i--,1);f=d(a.target).closest(r,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&q.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=q.length;j<k;j++){f=q[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?D.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(d.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),e;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a,c){if(a==null){if(e)return e;e=a={}}c=z.length;while(c--)a[z[c]]=b[z[c]];return a}}),b.then(c.cancel,b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){var b=arguments,c=b.length,e=c<=1&&a&&d.isFunction(a.promise)?a:d.Deferred(),f=e.promise(),g;c>1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i<j;i++)h=g[i].name,h.indexOf("data-")===0&&(h=h.substr(5),f(this[0],h,e[h]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=f(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var g=/[\n\t\r]/g,h=/\s+/,i=/\r/g,j=/^(?:href|src|style)$/,k=/^(?:button|input)$/i,l=/^(?:button|input|object|select|textarea)$/i,m=/^a(?:rea)?$/i,n=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(h);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",i=f.className;for(var j=0,k=b.length;j<k;j++)g.indexOf(" "+b[j]+" ")<0&&(i+=" "+b[j]);f.className=d.trim(i)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(h);for(var e=0,f=this.length;e<f;e++){var i=this[e];if(i.nodeType===1&&i.className)if(a){var j=(" "+i.className+" ").replace(g," ");for(var k=0,l=c.length;k<l;k++)j=j.replace(" "+c[k]+" "," ");i.className=d.trim(j)}else i.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,i=d(this),j=b,k=a.split(h);while(f=k[g++])j=e?j:!i.hasClass(f),i[j?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(g," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k<l;k++){var m=h[k];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(j)return a;g.push(a)}}return g}if(n.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(i,"")}return b}var o=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){o&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&n.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete w[h]}if(d.isEmptyObject(w)){var x=s.handle;x&&(x.elem=null),delete s.events,delete s.handle,typeof s==="function"?d.removeData(a,u,!0):d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,F(a.origType,a.selector),d.extend({},a,{handler:E,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,F(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?w:v):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=w;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=w;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=w,this.stopPropagation()},isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v};var x=function(a){var b=a.relatedTarget;try{while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(c){}},y=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?y:x,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?y:x)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,c){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var c=a.target,e=c.type;if((e==="submit"||e==="image")&&d(c).closest("form").length){a.liveFired=b;return C("submit",this,arguments)}}),d.event.add(this,"keypress.specialSubmit",function(a){var c=a.target,e=c.type;if((e==="text"||e==="password")&&d(c).closest("form").length&&a.keyCode===13){a.liveFired=b;return C("submit",this,arguments)}});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var z,A=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var D={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var p in a)n[c](p,e,a[p],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=o.exec(h),k="",j&&(k=j[0],h=h.replace(o,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(D[h]+k),h=h+k):h=(D[h]||h)+k;if(c==="live")for(var q=0,r=n.length;q<r;q++)d.event.add(n[q],"live."+F(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+F(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var j=d[g];if(j){var k=!1;j=j[a];while(j){if(j.sizcache===c){k=d[j.sizset];break}if(j.nodeType===1){f||(j.sizcache=c,j.sizset=g);if(typeof b!=="string"){if(j===b){k=!0;break}}else if(i.filter(b,[j]).length>0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},i.matches=function(a,b){return i(a,null,null,b)},i.matchesSelector=function(a,b){return i(b,null,null,[a]).length>0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e<f;e++){var g,h=j.order[e];if(g=j.leftMatch[h].exec(a)){var i=g[1];g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(/\\/g,""),d=j.find[h](g,b,c);if(d!=null){a=a.replace(j.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},i.filter=function(a,c,d,e){var f,g,h=a,k=[],l=c,m=c&&c[0]&&i.isXML(c[0]);while(a&&c.length){for(var n in j.filter)if((f=j.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=j.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;l===k&&(k=[]);if(j.preFilter[n]){f=j.preFilter[n](f,l,d,k,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=l[s])!=null;s++)if(p){o=q(p,f,s,l);var t=e^!!o;d&&o!=null?t?g=!0:l[s]=!1:t&&(k.push(p),g=!0)}if(o!==b){d||(l=k),a=a.replace(j.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)i.error(a);else break;h=a}return l},i.error=function(a){throw"Syntax error, unrecognized expression: "+a};var j=i.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!/\W/.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&i.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&i.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=s;typeof b==="string"&&!/\W/.test(b)&&(b=b.toLowerCase(),d=b,g=r),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=s;typeof b==="string"&&!/\W/.test(b)&&(b=b.toLowerCase(),d=b,g=r),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h<k;h++)if(g[h]===a)return!1;return!0}i.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var p,q;c.documentElement.compareDocumentPosition?p=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(p=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return q(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return q(e[k],f[k]);return k===c?q(a,f[k],-1):q(e[k],b,1)},q=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),i.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=i.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)i(a,f[g],d);return i.filter(e,d)};d.find=i,d.expr=i.selectors,d.expr[":"]=d.expr.filters,d.unique=i.uniqueSort,d.text=i.getText,d.isXMLDoc=i.isXML,d.contains=i.contains}();var G=/Until$/,H=/^(?:parents|prevUntil|prevAll)/,I=/,/,J=/^.[^:#\[\.,]*$/,K=Array.prototype.slice,L=d.expr.match.POS,M={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(O(this,a,!1),"not",a)},filter:function(a){return this.pushStack(O(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/<tbody/i,U=/<|&#?\w+;/,V=/<(?:script|object|embed|option|style)/i,W=/checked\s*(?:[^=]|=\s*.checked.)/i,X={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&W.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?Y(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,_)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!V.test(a[0])&&(d.support.checkClone||!W.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1></$2>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("<div>").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",bX(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(bW("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(bW("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=bX(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(bS.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=bT.exec(e),j=f.cur()||0;if(i){var k=parseFloat(i[2]),l=i[3]||"px";l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(bU),bU=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var bY=/^t(?:able|d|h)$/i,bZ=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=b$(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!bY.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window);
diff --git a/bin/jquery-ui-1.8.10.custom.zip b/bin/jquery-ui-1.8.10.custom.zip
new file mode 100644
index 00000000000..0f8efa7466a
--- /dev/null
+++ b/bin/jquery-ui-1.8.10.custom.zip
Binary files differ
diff --git a/css/default.php b/css/default.php
deleted file mode 100644
index 1c7e6e7beeb..00000000000
--- a/css/default.php
+++ /dev/null
@@ -1,521 +0,0 @@
-<?php
-header('Content-Type: text/css');
-// calculate the documentroot
-$SERVERROOT=substr(__FILE__,0,-16);
-$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
-$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
-$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
-$WEBROOT=substr($_SERVER["SCRIPT_NAME"],0,strlen($_SERVER["SCRIPT_NAME"])-strlen($SUBURI));
-?>
-html, body {
- background-color: #F9F9F9;
- margin: 0px;
- height: 100%;
- width: 100%;
- position: absolute;
- font-size: 100%;
-}
-#mainlayout{
- width:100%;
- height:100%;
-}
-
-#mainlayout>div{
- position:absolute;
- width:100%;
- left:0px;
-}
-
-#mainlayout>.head{
- height:175px;
- top:0px;
-}
-
-#mainlayout>.body{
- vertical-align:top;
- top:175px;
- bottom:75px;
- overflow:auto;
-}
-
-#mainlayout>.foot{
- height:75px;
- bottom:0px;
-}
-
-#mainlayout>.foot>.bar{
- background-color:#EEE;
- position:absolute;
- top:0px;
- height:24px;
- width:100%;
-}
-
-body.error {background-color: #F0F0F0;}
-td.error{color:#FF0000; text-align:center}
-body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size: 0.95em;}
-
-a img {
- border:none;
-}
-
-h1 {
- margin-bottom:1.5em;
-}
-
-.center {
- text-align:center;
-}
-
-.body>.center {
- height:100%;
- width:100%;
-}
-
-.center * {
- margin-left:auto;
- margin-right:auto;
-}
-
-td {
- text-align:left;
-}
-
-div#nav {
- width:100%;
- background-color: #EEEEEE;
- padding:0px;
- margin:0px;
- position:absolute;
- bottom:0px;
-}
-
-a#owncloud-logo {
- margin-left:auto;
- margin-right:auto;
- display:block;
- width:200px;
- height:99px;
- background: transparent url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/owncloud-logo-small.png) no-repeat scroll 0 0;
-}
-
-a#owncloud-logo span {
- display:none;
-}
-
-td.nametext{
- position:relative;
- display:block;
-}
-
-.nametext a, .breadcrumb a{color:#333333; font-size: 0.8em; font-weight:bold; text-decoration:none;}
-.errortext {color:#CC3333; font-size: 0.95em; font-weight:bold; text-decoration:none;}
-.highlighttext {color:#333333; font-size: 0.95em; font-weight:bold; text-decoration:none;}
-.datetext {color:#333333; font-size: 0.7em;}
-.sizetext{
- color:#333333;
- font-size: 0.7em;
-}
-.footer {color:#999999; text-align:center; font-size: 0.95em; margin-top:4em;}
-.footer a {color:#999999; text-decoration:none;}
-.hint {color:#AAAAAA; text-align:center; font-size: 0.8em; margin-top:10px;}
-.hint a{color:#AAAAAA; text-align:center; font-size: 0.8em;}
-
-.formstyle {
- font-weight:normal;
- font-size: 0.8em;
- color: #555555;
- background-color: #FFFFFF;
- border: 1px solid #DDDDDD;
- padding:0px;
- margin:0px;
-}
-
-.loginform {
- background-color: #EEEEEE;
-}
-
-.browser {
- background-color: #EEEEEE;
-}
-
-.browserline {
- background-color: #EEEEEE;
-}
-
-.browserline:hover {
- background-color: #DDDDDD;
-}
-
-
-.navigationitem1 {
- background-color: #EEEEEE;
- color:#555555;
- font-size: 0.95em;
- font-weight:bold;
-}
-
-.navigationitem1 a{
- text-decoration:none;
- padding-right:15px;
- background: transparent url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/dots.png) no-repeat scroll center right;
-}
-
-.navigationitem1 img {
- border:none;
-}
-
-.navigationitem1:hover {
- background-color: #EEEEEE;
-}
-
-.navigationitem {
- background-color: #EEEEEE;
-}
-
-.navigationitem:hover {
- background-color: #DDDDDD;
-}
-
-.navigationselected td {
- background-color: #DDDDDD;
-}
-
-.navigationitem a {
- text-decoration:none;
- color: #333333;
- font-size: 0.8em;
-}
-
-.navigationitemselected a {
- text-decoration:none;
- color: #333333;
- font-size: 0.8em;
- font-weight:bold;
-}
-
-.hidden{
- height:0px;
- width:0px;
- margin:0px;
- padding:0px;
- border:0px;
- position:absolute;
- top:0px;
- left:0px;
- overflow:hidden;
- /*do not use display:none here, it breaks iframes in some browsers*/
-}
-
-div.OCNotification{
- background:#0c285a;
- color:white;
- border:white solid 1px;
- padding:1px;
- margin:4px;
- min-width:200px;
-}
-div.OCNotificationHolder{
- right:20px;
- bottom:0px;
- position:fixed;
- color:white;
-}
-
-td img.file_actions{
- cursor:pointer;
- height:0px;
- width:9px;
-}
-
-td.nametext:hover img.file_actions{
- height:auto;
-}
-
-div.breadcrumb{
- background-color: #F0F0F0;
-}
-
-div.fileactionlist{
- z-index:50;
- position:absolute;
- top:20px;
- background-color: #DDDDDD;
- margin-top:5px;
- border:1px black solid;
-}
-
-div.fileactionlist td{
- cursor:pointer;
-}
-
-div.fileactionlist td:hover{
- background-color: #CCCCCC;
-}
-
-tr.breadcrumb{
- background-color: #CCCCCC;
-}
-
-#content, div.browser{
- vertical-align:top;
- /*min-height:200px;*/
- height:100%;
-}
-
-table.browser{
- border: solid 3px #CCC;
- height:100%;
- border-spacing:0px;
-}
-
-table.browser thead, table.browser tfoot{
- background-color:#CCC;
- width:100%;
-}
-
-td.sizetext{
- width:110px;
- text-align:right;
-}
-
-
-input.fileSelector{
- margin-right:17px;
- float:left;
-}
-
-td.fileSelector, td.fileicon{
- width:16px;
-}
-
-span.upload{
- float:right;
- text-align:right;
- margin:0px;
- padding:0px;
-}
-
-table.browser>tbody{
- vertical-align:top;
-}
-
-table.browser>tbody>tr>td, table.browser>tbody>tr{
- padding:0px;
- /*height:100%;*/
-}
-
-div.fileList{
- width:800px;
- overflow:auto;
- vertical-align:top;
- height:100%;
- min-height:200px;
- top:0px;
-<!-- border-bottom: 3px solid #CCC; -->
-}
-
-div.fileList table{
- width:100%;
- vertical-align:top;
-}
-
-table.browser thead td,table.browser tfoot td{
- padding-left:6px;
- padding-top:0px;
- padding-bottom:0px;
-}
-
-#imageframe{
- position:absolute;
- top:0px;
- left:0px;
- height:100%;
- width:100%;
- background:rgb(20,20,20);
- background:rgba(20,20,20,0.9);
- text-align:center;
-}
-
-#imageframe img{
- vertical-align:middle;
- max-height:90%;
- max-width:90%;
- margin:10px;
- border: black solid 3px;
-}
-
-tr.hint, tr.hint td{
- background:transparent;
-}
-
-#debug{
- position:fixed;
- bottom:20px;
- left:20px;
- border:solid 1px black;
-}
-
-.dragClone{
- position:absolute;
-}
-
-div.breadcrumb{
- float:left;
- background:transparent;
-}
-
-div.moreActionsButton>p{
- padding:0px;
- margin:0px;
- width:100%;
- height:100%;
-}
-
-div.moreActionsButton{
- background-color:white;
- display:inline;
- border:1px solid black;
- cursor:pointer;
- padding-right:10px;
- text-align:right;
- width:90px;
- height:19px;
- float:right;
- margin-top:2px !important;
- right:2px;
- position:absolute;
- background:#DDD url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/arrow_up.png) no-repeat scroll center right;
-}
-
-td.moreActionsButtonClicked{
- background:#DDD url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/arrow_down.png) no-repeat scroll center right !important
-}
-
-tr.utilityline{
- height:24px;
-}
-
-td.actionsSelected{
- position:absolute;
- width:790px;
-}
-
-div.moreActionsList{
- background:#EEE;
- position:absolute;
- bottom:19px;
- right:-2px;
- border:1px solid black;
- min-width:330px;
- text-align:right;
- float:right;
-}
-
-div.moreActionsList input{
-<!-- float:right; -->
-}
-
-div.moreActionsList>table{
- width:100%;
-}
-
-div.moreActionsList td{
- width:300px;
- text-align:right;
- padding-top:3px !important;
- padding-bottom:3px !important;
-}
-
-div.moreActionsList tr:hover{
- background-color:#DDD;
-}
-
-#settingsNav{
- background-color:#EEEEEE;
- left:0px;
- top:0px;
- height:100%;
- width:150px;
- overflow:auto;
- position:absolute;
- text-align:left;
-}
-
-#settingsNav ul{
- padding-left:20px;
- padding-right:20px;
-}
-
-#settingsHolder{
- left:150px;
- margin:0px;
- right:0px;
- position:absolute;
- overflow:auto;
- height:100%;
-}
-
-table.userlist, table.pluginlist{
- margin:0px;
- padding:0px;
- width:100%;
- border-spacing:0px;
-}
-
-table.userlist>thead, table.pluginlist>thead{
- background-color:#DDD;
- font-weight:bold;
-}
-
-table.userlist td.sellect{
- width:18px;
-}
-
-table.userlist td.name{
- width:200px;
-}
-
-p.description{
- background-color:#DDD;
- margin:0px;
- padding-top:3px;
- padding-bottom:3px;
- width:100%;
- font-weight:bold;
-}
-
-#newUserForm, #newGroupForm{
- width:100%;
- padding-top:3px;
- padding-bottom:3px;
-}
-
-div.settingsContent{
- background-color:#F2F2F2;
- min-height:100%;
-}
-
-#sellectedUsersActions>form{
- display:inline;
-}
-
-#sellectedUsersActions{
- margin:0px;
- text-align:left;
- background-color:#DDD;
- width:100%;
-}
-
-table.pluginlist td.name{
- width:150px;
-}
-
-table.pluginlist td.disable{
- width:50px;
-}
-
-table.pluginlist td.version{
- width:60px;
- text-align:center
-} \ No newline at end of file
diff --git a/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
new file mode 100644
index 00000000000..6348115e6be
--- /dev/null
+++ b/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
Binary files differ
diff --git a/css/images/ui-bg_flat_15_cd0a0a_40x100.png b/css/images/ui-bg_flat_15_cd0a0a_40x100.png
new file mode 100644
index 00000000000..7680b5437cf
--- /dev/null
+++ b/css/images/ui-bg_flat_15_cd0a0a_40x100.png
Binary files differ
diff --git a/css/images/ui-bg_glass_100_e4f1fb_1x400.png b/css/images/ui-bg_glass_100_e4f1fb_1x400.png
new file mode 100644
index 00000000000..705a32ea35d
--- /dev/null
+++ b/css/images/ui-bg_glass_100_e4f1fb_1x400.png
Binary files differ
diff --git a/css/images/ui-bg_glass_50_3baae3_1x400.png b/css/images/ui-bg_glass_50_3baae3_1x400.png
new file mode 100644
index 00000000000..baabca6baaf
--- /dev/null
+++ b/css/images/ui-bg_glass_50_3baae3_1x400.png
Binary files differ
diff --git a/css/images/ui-bg_glass_80_d7ebf9_1x400.png b/css/images/ui-bg_glass_80_d7ebf9_1x400.png
new file mode 100644
index 00000000000..d9387e9507e
--- /dev/null
+++ b/css/images/ui-bg_glass_80_d7ebf9_1x400.png
Binary files differ
diff --git a/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
new file mode 100644
index 00000000000..28b566c2c29
--- /dev/null
+++ b/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
Binary files differ
diff --git a/css/images/ui-bg_highlight-hard_70_000000_1x100.png b/css/images/ui-bg_highlight-hard_70_000000_1x100.png
new file mode 100644
index 00000000000..d5882978043
--- /dev/null
+++ b/css/images/ui-bg_highlight-hard_70_000000_1x100.png
Binary files differ
diff --git a/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png b/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png
new file mode 100644
index 00000000000..2289d3c7d7b
--- /dev/null
+++ b/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png
Binary files differ
diff --git a/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
new file mode 100644
index 00000000000..54aff0cb974
--- /dev/null
+++ b/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
Binary files differ
diff --git a/css/images/ui-icons_2694e8_256x240.png b/css/images/ui-icons_2694e8_256x240.png
new file mode 100644
index 00000000000..9d192c2f659
--- /dev/null
+++ b/css/images/ui-icons_2694e8_256x240.png
Binary files differ
diff --git a/css/images/ui-icons_2e83ff_256x240.png b/css/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 00000000000..09d1cdc856c
--- /dev/null
+++ b/css/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/css/images/ui-icons_3d80b3_256x240.png b/css/images/ui-icons_3d80b3_256x240.png
new file mode 100644
index 00000000000..f13b206645b
--- /dev/null
+++ b/css/images/ui-icons_3d80b3_256x240.png
Binary files differ
diff --git a/css/images/ui-icons_72a7cf_256x240.png b/css/images/ui-icons_72a7cf_256x240.png
new file mode 100644
index 00000000000..0d20b730833
--- /dev/null
+++ b/css/images/ui-icons_72a7cf_256x240.png
Binary files differ
diff --git a/css/images/ui-icons_ffffff_256x240.png b/css/images/ui-icons_ffffff_256x240.png
new file mode 100644
index 00000000000..42f8f992c72
--- /dev/null
+++ b/css/images/ui-icons_ffffff_256x240.png
Binary files differ
diff --git a/css/jquery-ui-1.8.10.custom.css b/css/jquery-ui-1.8.10.custom.css
new file mode 100644
index 00000000000..1f376ca99d3
--- /dev/null
+++ b/css/jquery-ui-1.8.10.custom.css
@@ -0,0 +1,573 @@
+/*
+ * jQuery UI CSS Framework 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; }
+.ui-widget-content a { color: #362b36; }
+.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
+.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
+.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
+.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); }
+.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.10
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file
diff --git a/css/small.php b/css/small.php
deleted file mode 100644
index 60f79f51be1..00000000000
--- a/css/small.php
+++ /dev/null
@@ -1,440 +0,0 @@
-<?php
-header('Content-Type: text/css');
-require_once('../inc/lib_base.php');
-?>
-
-/* css used for devices with small screen such as smartphones */
-html,body {
- background-color: #F9F9F9;
- margin:0px;
- height:100%;
- width:100%;
- position:absolute;
-}
-#mainlayout{
- width:100%;
- height:100%;
-}
-
-#mainlayout>div{
- position:absolute;
- width:100%;
- left:0px;
-}
-
-#mainlayout>.head{
- height:24px;
- top:0px;
-}
-
-#mainlayout>.body{
- vertical-align:top;
- top:24px;
- bottom:24px;
- overflow:auto;
-}
-
-#mainlayout>.foot{
- height:24px;
- bottom:0px;
-}
-
-#mainlayout>.foot>.bar{
- background-color:#EEE;
- position:absolute;
- top:0px;
- height:24px;
- width:100%;
-}
-
-body.error {background-color: #F0F0F0;}
-td.error{color:#FF0000; text-align:center}
-body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size:9.0pt;}
-
-a img {
- border:none;
-}
-
-h1 {
- margin-bottom:1.5em;
-}
-
-.center {
- text-align:center;
-}
-
-.center * {
- margin-left:auto;
- margin-right:auto;
-}
-
-td {
- text-align:left;
-}
-
-div#nav {
- width:100%;
- background-color: #EEEEEE;
- padding:0px;
- margin:0px;
- position:absolute;
- bottom:0px;
-}
-
-a#owncloud-logo {
- margin-left:auto;
- margin-right:auto;
- display:block;
- width:200px;
- height:99px;
- background: transparent url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/owncloud-logo-small.png) no-repeat scroll 0 0;
-}
-
-a#owncloud-logo span {
- display:none;
-}
-
-td.nametext{
- white-space:nowrap;
- display:block;
- position:relative;
- /*overflow:hidden;*/
- text-overflow: ellipsis;
-}
-td.nametext>img{
- float:left;
- display:box;
-}
-td.nametext>a{
- display:block;
- max-width:95%;
- float:left;
- overflow:hidden;
- text-overflow: ellipsis;
-}
-.nametext a, .breadcrumb a{color:#333333; font-size:8pt; font-weight:bold; text-decoration:none;}
-.errortext {color:#CC3333; font-size:9pt; font-weight:bold; text-decoration:none;}
-.highlighttext {color:#333333; font-size:9pt; font-weight:bold; text-decoration:none;}
-.datetext {color:#333333; font-size:7pt;}
-.sizetext{
- color:#333333;
- font-size:7pt;
-}
-.footer {color:#999999; text-align:center; font-size:9pt; margin-top:4px;}
-.footer a {color:#999999; text-decoration:none;}
-.hint {color:#AAAAAA; text-align:center; font-size:8pt; margin-top:10px;}
-.hint a{color:#AAAAAA; text-align:center; font-size:8pt;}
-
-.formstyle {
- font-weight:normal;
- font-size: 8.0pt;
- color: #555555;
- background-color: #FFFFFF;
- border: 1px solid #DDDDDD;
- padding:0px;
- margin:0px;
-}
-
-.loginform {
- background-color: #EEEEEE;
-}
-
-.browser {
- width:100%;
- table-layout:fixed;
- background-color: #EEEEEE;
-}
-
-.browserline {
- background-color: #EEEEEE;
-}
-
-.browserline:hover {
- background-color: #DDDDDD;
-}
-
-
-.navigationitem1 {
- background-color: #EEEEEE;
- color:#555555;
- font-size:9pt;
- font-weight:bold;
-}
-
-.navigationitem1 a{
- text-decoration:none;
-}
-
-.navigationitem1 img {
- border:none;
-}
-
-.navigationitem1:hover {
- background-color: #EEEEEE;
-}
-
-.navigationitem {
- background-color: #EEEEEE;
-}
-
-.navigationitem:hover {
- background-color: #DDDDDD;
-}
-
-.navigationselected td {
- background-color: #DDDDDD;
-}
-
-.navigationitem a {
- text-decoration:none;
- color: #333333;
- font-size: 8.0pt;
-}
-
-.navigationitemselected a {
- text-decoration:none;
- color: #333333;
- font-size: 8.0pt;
- font-weight:bold;
-}
-
-.hidden{
- height:0px;
- width:0px;
- margin:0px;
- padding:0px;
- border:0px;
- position:absolute;
- top:0px;
- left:0px;
- overflow:hidden;
- /*do not use display:none here, it breaks iframes in some browsers*/
-}
-
-div.OCNotification{
- background:#0c285a;
- color:white;
- border:white solid 1px;
- padding:1px;
- margin:4px;
- min-width:200px;
-}
-div.OCNotificationHolder{
- right:20px;
- bottom:0px;
- position:fixed;
- color:white;
-}
-
-td img.file_actions{
- cursor:pointer;
- height:0px;
- width:9px;
-}
-
-td.nametext:hover img.file_actions{
- height:auto;
-}
-
-div.breadcrumb{
- background-color: #F0F0F0;
-}
-
-div.fileactionlist{
- z-index:100;
- position:absolute;
- background-color: #DDDDDD;
- margin-top:5px;
- border:1px black solid;
-}
-
-div.fileactionlist td{
- cursor:pointer;
-}
-
-div.fileactionlist td:hover{
- background-color: #CCCCCC;
-}
-
-tr.breadcrumb{
- background-color: #CCCCCC;
-}
-
-#content, div.browser{
- vertical-align:top;
- /*min-height:200px;*/
- height:100%;
-}
-
-table.browser{
- border: solid 3px #CCC;
- height:100%;
- border-spacing:0px;
-}
-
-table.browser thead, table.browser tfoot{
- background-color:#CCC;
- width:100%;
-}
-
-td.sizetext{
- width:70px;
- float:right;
- text-align:right;
-}
-
-
-input.fileSelector{
- margin-right:17px;
- float:left;
-}
-
-td.fileSelector, td.fileicon{
- width:20px;
-}
-
-span.upload{
- float:right;
- text-align:right;
- margin:0px;
- padding:0px;
-}
-
-table.browser>tbody{
- vertical-align:top;
-}
-
-table.browser>tbody>tr>td, table.browser>tbody>tr{
- padding:0px;
- /*height:100%;*/
-}
-
-div.fileList{
- width:100%;
- position:relative;
- overflow:hidden;
- vertical-align:top;
- height:100%;
- min-height:150px;
- top:0px;
-}
-
-div.fileactionlist table{
- table-layout:auto !important;
-}
-
-div.fileList table{
- width:100%;
- table-layout:fixed;
- vertical-align:top;
-}
-
-table.browser thead td,table.browser tfoot td{
- padding-left:6px;
- padding-top:0px;
- padding-bottom:0px;
-}
-
-#imageframe{
- position:absolute;
- top:0px;
- left:0px;
- height:100%;
- width:100%;
- background:rgb(20,20,20);
- background:rgba(20,20,20,0.9);
- text-align:center;
-}
-
-#imageframe img{
- vertical-align:middle;
- max-height:90%;
- max-width:90%;
- margin:10px;
- border: black solid 3px;
-}
-
-tr.hint, tr.hint td{
- background:transparent;
-}
-
-#debug{
- position:fixed;
- bottom:20px;
- left:20px;
- border:solid 1px black;
-}
-
-.dragClone{
- position:absolute;
-}
-
-div.breadcrumb{
- float:left;
- background:transparent;
-}
-
-div.moreActionsButton>p{
- padding:0px;
- margin:0px;
- width:100%;
- height:100%;
-}
-
-div.moreActionsButton{
- background-color:white;
- display:inline;
- border:1px solid black;
- cursor:pointer;
- padding-right:10px;
- text-align:right;
- width:90px;
- height:19px;
- float:right;
- margin-top:2px !important;
- right:2px;
- position:absolute;
- background:#DDD url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/arrow_up.png) no-repeat scroll center right;
-}
-
-td.moreActionsButtonClicked{
- background:#DDD url(<?php if(isset($WEBROOT)) echo($WEBROOT); ?>/img/arrow_down.png) no-repeat scroll center right !important
-}
-
-tr.utilityline{
- height:24px;
-}
-
-td.actionsSelected{
-<!-- position:absolute; -->
-<!-- width:790px; -->
-}
-
-div.moreActionsList{
- background:#EEE;
- position:absolute;
- bottom:19px;
- right:-2px;
- border:1px solid black;
- text-align:right;
- float:right;
-}
-
-div.moreActionsList input{
-<!-- float:right; -->
-}
-
-div.moreActionsList>table{
- width:100%;
-}
-
-div.moreActionsList td{
- width:300px;
- text-align:right;
- padding-top:3px !important;
- padding-bottom:3px !important;
-}
-
-div.moreActionsList tr:hover{
- background-color:#DDD;
-} \ No newline at end of file
diff --git a/css/styles.css b/css/styles.css
new file mode 100644
index 00000000000..771c430c723
--- /dev/null
+++ b/css/styles.css
@@ -0,0 +1,656 @@
+*
+{
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+body
+{
+ background-color: #FEFEFE;
+ background-image: url(../img/body_background.jpg);
+ background-repeat: repeat-y;
+ background-position: left top;
+ line-height: 1.6em;
+ font: normal 80% "Lucida Grande", Arial, Verdana, sans-serif;
+ color: #000;
+}
+
+#header
+{
+ height: 70px;
+ padding: 0.5em 1.5em;
+ background-image: url(../img/header_background.png);
+ background-repeat: repeat-x;
+ background-position: left top;
+}
+
+#owncloud
+{
+ float: left;
+ margin: 0 0 0 2em;
+}
+
+h1
+{
+ margin: 1em 3em 1em 0;
+ border-bottom: 1px solid #666;
+ text-transform: uppercase;
+ font-weight: normal;
+ font-style: italic;
+ color: #666;
+}
+
+p.center
+{
+ text-align: center;
+}
+
+
+form
+{
+ margin: 2em 2em 2em 3em;
+}
+
+form#quota
+{
+ max-width: 600px;
+}
+
+form#user_settings
+{
+ max-width: 600px;
+}
+
+form#user_settings p label
+{
+ display: block;
+ float: left;
+ width: 35%;
+ padding: 0.4em 0.5em 0 0;
+ text-align: right;
+}
+
+form p
+{
+ padding: 0.5em 4em 0.5em 0.5em;
+ text-align: left;
+}
+
+form p.form_footer
+{
+ margin: 1em 0 0 0;
+ text-align: right;
+}
+
+form label
+{
+ cursor: pointer;
+}
+
+form input
+{
+ padding: 0.2em;
+ border: 1px solid #DDD;
+ font-size: 1.2em;
+}
+
+/*
+form input[type="submit"]
+{
+ padding: 0.1em 1em;
+ border: 1px solid #999;
+ font-weight: bold;
+ font-size: 0.9em;
+ cursor: pointer;
+}
+*/
+
+form input[type="submit"]:hover
+{
+ border: 1px solid #999;
+ background-color: #CCC;
+}
+
+fieldset
+{
+ padding: 1em;
+ background-color: #F7F7F7;
+ border: 1px solid #DDD;
+}
+
+legend
+{
+ padding: 0 0.5em;
+ font-size: 1.2em;
+}
+
+
+div.controls
+{
+ width: 91%;
+ margin: 1em 1em 1em 2em;
+ padding: 0.5em 0;
+ background-color: #F7F7F7;
+ border: 1px solid #EEE;
+}
+
+
+
+/* LOG IN SCREEN ------------------------------------------------------------ */
+
+body.login
+{
+ background-image: none;
+ background-color: #DDD;
+}
+
+body.login p.info
+{
+ width: 640px;
+ margin: 4em auto;
+ padding: 1em 1em 1em 4em;
+ background-color: #EEE;
+ background-image: url(../img/help_about.png);
+ background-position: 0.8em 0.8em;
+ background-repeat: no-repeat;
+ border: 1px solid #CCC;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+}
+
+#login
+{
+ margin: 0 auto 0 auto;
+ padding: 2em 0 0 0;
+ background-image: url(../img/header_background2.png);
+ background-position: left 0;
+ background-repeat: repeat-x;
+ background-color: #EEE;
+ text-align: center;
+}
+
+#login form
+{
+ margin: 2.5em auto 0 auto;
+ padding: 0 0 1.5em 0;
+ text-align: center;
+ border-bottom: 1px solid #FFF;
+}
+
+#login h1
+{
+ margin: 0;
+ padding: 2.5em 0 0 0;
+ border: 0;
+ text-align: center;
+ text-transform: lowercase;
+ font-size: 1.5em;
+}
+
+#login fieldset
+{
+ background-color: transparent;
+ border: 0;
+}
+
+#login fieldset p
+{
+ margin: 1em 0 0 0;
+ padding: 0;
+ text-align: center;
+}
+
+#login label
+{
+ font-size: 1.2em;
+ color: #FFF;
+}
+
+#login input
+{
+ width: 8em;
+ margin: 0.1em;
+ padding: 0.2em 0.5em;
+ border: 1px solid #DDD;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ border-radius: 15px;
+ font-size: 2em;
+ color: #666;
+}
+
+#login input[type=submit]
+{
+ width: 5em;
+ border: 1px solid #DDD;
+ background-color: #FFF;
+ font-size: 2em;
+}
+
+
+
+/* USER MENU ---------------------------------------------------------------- */
+
+#user
+{
+ float: right;
+ margin: 1em 5em 1em 0;
+ background-image: url(../img/drop-arrow.png);
+ background-repeat: no-repeat;
+ background-position: right center;
+ color: #FFF;
+}
+
+#user.userLinkOn
+{
+ background-color: #39577C;
+}
+
+#user_menu_link
+{
+ display: block;
+ padding: 0.5em 2em 0.5em 1em;
+ font-weight: bold;
+}
+
+#user_menu_link, #user_menu a
+{
+ text-decoration: none;
+ color: #FFF;
+}
+
+#user_menu
+{
+ position: absolute;
+ z-index: 500;
+ right: 6.5em;
+ top: 45px;
+ list-style-type: none;
+ background-color: #39577C;
+}
+
+#user_menu a
+{
+ display: block;
+ padding: 0.5em 5em 0.5em 1em;
+ background-color: transparent;
+}
+
+#user_menu a:hover
+{
+ background-color: #1D2D42;
+}
+
+
+
+/* PLUGINS MENU ------------------------------------------------------------- */
+
+#plugins
+{
+ float: left;
+ width: 200px;
+ padding: 0;
+}
+
+#plugins ul
+{
+ list-style-type: none;
+ border-top: 1px solid #CCC;
+}
+
+#plugins a
+{
+ display: block;
+ padding: 0.5em 0.5em 0.5em 3em;
+ background-position: 1.5em center;
+ background-repeat: no-repeat;
+ border-bottom: 1px solid #DDD;
+ border-top: 1px solid #FFF;
+ text-decoration: none;
+ font-size: 1.2em;
+ color: #666;
+}
+
+#plugins a:hover, #plugins a.selected
+{
+ background-color: #CCC;
+ border-top: 1px solid #CCC;
+ border-bottom: 1px solid #CCC;
+ color: #000;
+}
+
+#plugins .files
+{
+ background-image: url(../img/files.png);
+}
+
+#plugins .sharing
+{
+ background-image: url(../img/sharing.png);
+}
+
+#plugins .galleries
+{
+ background-image: url(../img/galleries.png);
+}
+
+#plugins .music
+{
+ background-image: url(../img/music.png);
+}
+
+
+
+/* CONTENT ------------------------------------------------------------------ */
+
+#content
+{
+ margin: 0 0 0 230px;
+}
+
+table
+{
+ width: 90%;
+ margin: 1em 5em 2em 3em;
+}
+
+table tr.mouseOver td
+{
+ background-color: #EEE;
+}
+
+table th, table td
+{
+ padding: 0;
+ border-bottom: 1px solid #DDD;
+ text-align: left;
+ font-style: italic;
+}
+
+table th
+{
+ padding: 0.5em;
+}
+
+table td
+{
+ border-bottom: 1px solid #EEE;
+ font-style: normal;
+}
+
+table td.filesize, table td.date
+{
+ width: 5em;
+ padding: 0.5em 1em;
+ text-align: right;
+}
+
+table td.date
+{
+ width: 11em;
+}
+
+table td.selection, table th.selection, table td.fileaction
+{
+ width: 2em;
+ text-align: center;
+}
+
+table td.filename a
+{
+ display: block;
+ background-image: url(../img/file.png);
+ text-decoration: none;
+}
+
+table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete
+{
+ padding: 0.5em 0.5em 0.5em 3em;
+ background-position: 1em center;
+ background-repeat: no-repeat;
+}
+
+table td.filename a:hover
+{
+ text-decoration: underline;
+}
+
+table em
+{
+ font-weight: bold;
+}
+
+table td.filename a.folder-up
+{
+ background-image: url(../img/back.png);
+ font-style: italic;
+}
+
+table td.filename a.folder
+{
+ background-image: url(../img/folder.png);
+}
+
+table td.filename a.folder-home
+{
+ background-image: url(../img/home.png);
+}
+
+table td.filename a.folder-music
+{
+ background-image: url(../img/folder-music.png);
+}
+
+table td.filename a.folder-videos
+{
+ background-image: url(../img/folder-video.png);
+}
+
+table td.filename a.folder-shared
+{
+ background-image: url(../img/folder-shared.png);
+}
+
+table td.filename a.folder-images
+{
+ background-image: url(../img/folder-image.png);
+}
+
+table td.filename a.file-txt
+{
+ background-image: url(../img/file-txt.png);
+}
+
+table td.filename a.file-python
+{
+ background-image: url(../img/file-python.png);
+}
+
+table td.filename a.file-php
+{
+ background-image: url(../img/file.png);
+}
+
+table td.login
+{
+ background-image: url(../img/login.png);
+}
+
+table td.logout
+{
+ background-image: url(../img/logout.png);
+}
+
+table td.download
+{
+ background-image: url(../img/download.png);
+}
+
+table td.upload
+{
+ background-image: url(../img/upload.png);
+}
+
+table td.create
+{
+ background-image: url(../img/folder-new.png);
+}
+
+table td.delete
+{
+ background-image: url(../img/delete.png);
+}
+
+
+/* NAVIGATION BAR */
+
+p.nav
+{
+ margin: 1em 0 0 2em;
+ padding: 0.8em;
+ line-height: 16px;
+ font-weight: bold;
+}
+
+p.nav a
+{
+ padding: 0.5em 1.5em 0.5em 0.5em;
+ background-position: right center;
+ background-repeat: no-repeat;
+ background-image: url(../img/arrow.png);
+ text-decoration: none;
+}
+
+p.nav a img
+{
+ height: 16px;
+ vertical-align: text-top;
+}
+
+
+/* ACTIONS BAR */
+
+p.actions
+{
+ padding: 0;
+}
+
+p.actions a
+{
+ padding: 0.5em 0.5em 0.5em 3em;
+ background-position: 1em center;
+ background-repeat: no-repeat;
+ background-image: url(../img/action.png);
+ border-right: 1px solid #EEE;
+ text-decoration: none;
+ color: #333;
+}
+
+p.actions a:hover
+{
+ background-color: #EEE;
+ color: #000;
+}
+
+p.actions a.new-dir
+{
+ background-image: url(../img/folder-new.png);
+}
+
+p.actions a.download
+{
+ background-image: url(../img/download.png);
+}
+
+p.actions a.delete
+{
+ background-image: url(../img/delete.png);
+}
+
+
+
+/* FILE MENU */
+
+#file_menu
+{
+ display: none;
+ position: absolute;
+ background-color: #EEE;
+}
+
+#file_menu ul
+{
+ list-style-type: none;
+}
+
+#file_menu li a
+{
+ display: block;
+ padding: 0.5em 5em 0.5em 2em;
+ text-decoration: none;
+}
+
+
+
+/* USER SETTINGS ------------------------------------------------------------ */
+
+#quota_indicator
+{
+ margin: 0 4em 1em 0;
+ padding: 0;
+ border: 1px solid #DDD;
+ border-radius: 10px;
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+}
+
+#quota_indicator div
+{
+ background-color: #76A9EA;
+ border-radius: 10px;
+ -webkit-border-radius: 10px;
+ -moz-border-radius: 10px;
+}
+
+
+
+/* LOGS --------------------------------------------------------------------- */
+
+#logs_options
+{
+ width: auto;
+ margin: 0;
+}
+
+#logs_options p
+{
+ padding: 0.5em;
+ text-align: left;
+}
+
+#logs_options span
+{
+ margin: 0 2em 0 0.5em;
+ font-weight: bold;
+}
+
+#logs_options label
+{
+ margin: 0 1em 0 0;
+}
+
+#logs_options input[type="submit"]
+{
+ float: right;
+ margin: 0 2em 0 0;
+}
+
+#logs_options input[type="text"]
+{
+ margin: 0;
+ padding: 0;
+ border: 1px solid #CCC;
+ text-align: right;
+}
diff --git a/docs/FAQs b/docs/FAQs
deleted file mode 100644
index f1e6149c48c..00000000000
--- a/docs/FAQs
+++ /dev/null
@@ -1,8 +0,0 @@
-1. I am not able to upload large files. Is that not supported by ownCloud?
- Ofcourse it is supported. The problem lies with the PHP configuration. If you have access to php.ini file (which resides in /etc/php5/apache2 folder) then you can fix this issue by changing the following lines :
- ; Maximum allowed size for uploaded files.
- upload_max_filesize = 2M
-
- Also look for the following line:
- post_max_size= 2M
- In place of 2M write the maximum size you want to be allowed. \ No newline at end of file
diff --git a/docs/INSTALL b/docs/INSTALL
deleted file mode 100644
index 970af77574c..00000000000
--- a/docs/INSTALL
+++ /dev/null
@@ -1,30 +0,0 @@
-also see http://owncloud.org/index.php/Installation
-
-== PREREQUISITS ==
-php5
-sqlite or mysql
-
-== SETUP ==
-Place owncloud in a subdirectory of your web server. Go to that directory with
-a web browser and the first run wizard should take it from there.
-Check out config/config.sample.php for details if you want to set config.php manually.
-
-== Database ==
---SQLite--
-When sqlite is chosen. If you are having trouble make sure that the line
-
-extension=sqlite.so
-
-appears in your php.ini
-
---MySQL--
-when mysql is chosen, you can let ownCloud create the database and user when you have administrator credentials for mysql.
-
-
-Please help improving this documentation!
-Create merge requests at gitorious.org/owncloud .
-
-Read the FAQs for some common problems.
-For support check out our IRC at Freenode : Channel #owncloud
-Mailing list at https://mail.kde.org/mailman/listinfo/owncloud
-
diff --git a/docs/TODO b/docs/TODO
deleted file mode 100644
index 0bbca7c2dab..00000000000
--- a/docs/TODO
+++ /dev/null
@@ -1,16 +0,0 @@
-- internationalizing of the web gui
-
-- themed webgui to match plasma theme
-
-- plugin system
- - store kde settings
- - store my music collection
- - integration with kolab server
-
-- create a versioning backend
-
-- create a usermanagement to share data
-
-
-
-
diff --git a/docs/owncloud.sql b/docs/owncloud.sql
deleted file mode 100644
index 94e500bf004..00000000000
--- a/docs/owncloud.sql
+++ /dev/null
@@ -1,61 +0,0 @@
-CREATE TABLE IF NOT EXISTS `locks` (
- `token` varchar(255) NOT NULL DEFAULT '',
- `path` varchar(200) NOT NULL DEFAULT '',
- `created` int(11) NOT NULL DEFAULT '0',
- `modified` int(11) NOT NULL DEFAULT '0',
- `expires` int(11) NOT NULL DEFAULT '0',
- `owner` varchar(200) DEFAULT NULL,
- `recursive` int(11) DEFAULT '0',
- `writelock` int(11) DEFAULT '0',
- `exclusivelock` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`token`),
- UNIQUE KEY `token` (`token`),
- KEY `path` (`path`),
- KEY `path_2` (`path`),
- KEY `path_3` (`path`,`token`),
- KEY `expires` (`expires`)
-);
-
-CREATE TABLE IF NOT EXISTS `log` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `timestamp` int(11) NOT NULL,
- `user` varchar(250) NOT NULL,
- `type` int(11) NOT NULL,
- `message` varchar(250) NOT NULL,
- PRIMARY KEY (`id`)
-);
-
-
-CREATE TABLE IF NOT EXISTS `properties` (
- `path` varchar(255) NOT NULL DEFAULT '',
- `name` varchar(120) NOT NULL DEFAULT '',
- `ns` varchar(120) NOT NULL DEFAULT 'DAV:',
- `value` text,
- PRIMARY KEY (`path`,`name`,`ns`),
- KEY `path` (`path`)
-);
-
-CREATE TABLE IF NOT EXISTS `users` (
-`user_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-`user_name` VARCHAR( 64 ) NOT NULL ,
-`user_name_clean` VARCHAR( 64 ) NOT NULL ,
-`user_password` VARCHAR( 340) NOT NULL ,
-UNIQUE (
-`user_name` ,
-`user_name_clean`
-)
-);
-
-CREATE TABLE IF NOT EXISTS `groups` (
-`group_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-`group_name` VARCHAR( 64 ) NOT NULL ,
-UNIQUE (
-`group_name`
-)
-);
-
-CREATE TABLE IF NOT EXISTS `user_group` (
-`user_group_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
-`user_id` VARCHAR( 64 ) NOT NULL ,
-`group_id` VARCHAR( 64 ) NOT NULL
-) \ No newline at end of file
diff --git a/files/api.php b/files/api.php
deleted file mode 100644
index 08e1021af09..00000000000
--- a/files/api.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-require_once('../inc/lib_base.php');
-
-$arguments=$_POST;
-if(!isset($_POST['action']) and isset($_GET['action'])){
- $arguments=$_GET;
-}
-
-foreach($arguments as &$argument){
- $argument=stripslashes($argument);
-}
-global $CONFIG_DATADIRECTORY;
-ob_clean();
-if($arguments['action']){
- switch($arguments['action']){
- case 'delete':
- echo (OC_FILES::delete($arguments['dir'],$arguments['file']))?'true':'false';
- break;
- case 'rename':
- echo (OC_FILES::move($arguments['dir'],$arguments['file'],$arguments['dir'],$arguments['newname']))?'true':'false';
- break;
- case 'new':
- echo (OC_FILES::newfile($arguments['dir'],$arguments['name'],$arguments['type']))?'true':'false';
- break;
- case 'move':
- echo (OC_FILES::move($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']))?'true':'false';
- break;
- case 'copy':
- echo (OC_FILES::copy($arguments['sourcedir'],$arguments['source'],$arguments['targetdir'],$arguments['target']))?'true':'false';
- break;
- case 'get':
- OC_FILES::get($arguments['dir'],$arguments['file']);
- break;
- case 'getfiles':
- $max_upload=min(return_bytes(ini_get('post_max_size')),return_bytes(ini_get('upload_max_filesize')));
- $files=OC_FILES::getDirectoryContent($arguments['dir']);
- $files['__max_upload']=$max_upload;
- echo json_encode($files);
- break;
- case 'gettree':
- echo json_encode(OC_FILES::getTree($arguments['dir']));
- break;
- case 'find':
- echo json_encode(OC_FILESYSTEM::find($arguments['path']));
- break;
- case 'login':
- if(OC_USER::login($arguments['username'],$arguments['password'])){
- echo 'true';
- }else{
- echo 'false';
- }
- break;
- case 'checklogin':
- if(OC_USER::isLoggedIn()){
- echo 'true';
- }else{
- echo 'false';
- }
- break;
- case 'pull':
- return OC_FILES::pull($arguments['source'],$arguments['token'],$arguments['dir'],$arguments['file']);
- }
-}
-
-function return_bytes($val) {
- $val = trim($val);
- $last = strtolower($val[strlen($val)-1]);
- switch($last) {
- // The 'G' modifier is available since PHP 5.1.0
- case 'g':
- $val *= 1024;
- case 'm':
- $val *= 1024;
- case 'k':
- $val *= 1024;
- }
-
- return $val;
-}
-?>
diff --git a/files/appinfo.php b/files/appinfo.php
new file mode 100644
index 00000000000..44a533cf4a0
--- /dev/null
+++ b/files/appinfo.php
@@ -0,0 +1,6 @@
+<?php
+
+OC_UTIL::addApplication( array( "id" => "files", "name" => "Files" ));
+OC_UTIL::addNavigationEntry( array( "app" => "files", "file" => "index.php", "name" => "Files" ));
+
+?>
diff --git a/files/get_files.php b/files/get_files.php
deleted file mode 100644
index 45d2b626e65..00000000000
--- a/files/get_files.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-require_once('../inc/lib_base.php');
-
-function return_bytes($val) {
- $val = trim($val);
- $last = strtolower($val[strlen($val)-1]);
- switch($last) {
- // The 'G' modifier is available since PHP 5.1.0
- case 'g':
- $val *= 1024;
- case 'm':
- $val *= 1024;
- case 'k':
- $val *= 1024;
- }
-
- return $val;
-}
-
-// header('Content-type: text/plain');
-header('Content-type: application/xml');
-
-$dir=isset($_GET['dir'])?$_GET['dir']:'';
-$files=OC_FILES::getdirectorycontent($dir);
-$dirname=(isset($files[0]))?$files[0]['directory']:'';
-$dirname=substr($dirname,strrpos($dirname,'/'));
-$max_upload=min(return_bytes(ini_get('post_max_size')),return_bytes(ini_get('upload_max_filesize')));
-ob_clean();
-echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n";
-echo "<dir name='$dirname' max_upload='$max_upload'>\n";
-if(is_array($files)){
- foreach($files as $file){
- $attributes='';
- foreach($file as $name=>$data){
- $data=utf8_encode($data);
- $data=utf8tohtml($data);
- $data=str_replace("'",'&#39;',$data);
- if (is_string($name)) $attributes.=" $name='$data'";
- }
- $attributes.=' date=\''.date($CONFIG_DATEFORMAT,$file['mtime']).'\'';
- echo "<file$attributes/>\n";
- }
-}
-echo "</dir>";
-
-// converts a UTF8-string into HTML entities
-// - $utf8: the UTF8-string to convert
-// - $encodeTags: booloean. TRUE will convert "<" to "&lt;"
-// - return: returns the converted HTML-string
-function utf8tohtml($utf8, $encodeTags=true) {
- $result = '';
- for ($i = 0; $i < strlen($utf8); $i++) {
- $char = $utf8[$i];
- $ascii = ord($char);
- if ($ascii < 128) {
- // one-byte character
- $result .= ($encodeTags) ? htmlentities($char) : $char;
- } else if ($ascii < 192) {
- // non-utf8 character or not a start byte
- } else if ($ascii < 224) {
- // two-byte character
- $result .= htmlentities(substr($utf8, $i, 2), ENT_QUOTES, 'UTF-8');
- $i++;
- } else if ($ascii < 240) {
- // three-byte character
- $ascii1 = ord($utf8[$i+1]);
- $ascii2 = ord($utf8[$i+2]);
- $unicode = (15 & $ascii) * 4096 +
- (63 & $ascii1) * 64 +
- (63 & $ascii2);
- $result .= "&#$unicode;";
- $i += 2;
- } else if ($ascii < 248) {
- // four-byte character
- $ascii1 = ord($utf8[$i+1]);
- $ascii2 = ord($utf8[$i+2]);
- $ascii3 = ord($utf8[$i+3]);
- $unicode = (15 & $ascii) * 262144 +
- (63 & $ascii1) * 4096 +
- (63 & $ascii2) * 64 +
- (63 & $ascii3);
- $result .= "&#$unicode;";
- $i += 3;
- }
- }
- return $result;
-}
-?> \ No newline at end of file
diff --git a/files/index.php b/files/index.php
index f2f7a48713a..538bd87971d 100644
--- a/files/index.php
+++ b/files/index.php
@@ -5,31 +5,36 @@
*
* @author Robin Appelman
* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-//require_once('../../config/config.php');
-require_once('../inc/lib_base.php');
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
-OC_UTIL::addscript('/plugins/ajax/ajax.js');
+$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
-OC_UTIL::showheader();
+$files=OC_FILES::getdirectorycontent( $dir );
-echo "<div id='content'></div>";
+$tmpl = new OC_TEMPLATE( "files", "index", "user" );
+$tmpl->assign( "files", $files );
+$tmpl->printPage();
-OC_UTIL::showfooter();
?>
diff --git a/files/open_file.php b/files/open_file.php
deleted file mode 100644
index ad91e3dad5c..00000000000
--- a/files/open_file.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-//not this file is for getting files themselves, get_files.php is for getting a list of files.
-
-require_once('../inc/lib_base.php');
-
-if(isset($_GET['path'])){
- $filename=$_GET['path'];
-}else{
- $file=$_GET['file'];
- $dir=(isset($_GET['dir']))?$_GET['dir']:'';
- $filename=$dir.'/'.$file;
-}
-if(strstr($filename,'..')){
- die();
-}
-$filename=stripslashes($filename);
-$ftype=OC_FILESYSTEM::getMimeType($filename);
-ob_end_clean();
-header('Content-Type: '.$ftype);
-header('Expires: 0');
-header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-header('Pragma: public');
-header('Content-Length: ' . OC_FILESYSTEM::filesize($filename));
-
-OC_FILESYSTEM::readfile($filename);
-?> \ No newline at end of file
diff --git a/files/pull.php b/files/pull.php
deleted file mode 100644
index 1cc82425845..00000000000
--- a/files/pull.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-$token=$_GET['token'];
-
-$file=sys_get_temp_dir().'/'.'remoteCloudFile'.$token;
-if(file_exists($file) and is_readable($file) and is_writable($file)){
- readfile($file);
- unlink($file);
-}else{
- header("HTTP/1.0 404 Not Found");
-}
-?> \ No newline at end of file
diff --git a/files/templates/_c/.gitkeep b/files/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/files/templates/_c/.gitkeep
diff --git a/files/templates/index.tmpl b/files/templates/index.tmpl
new file mode 100644
index 00000000000..7ea1df8644f
--- /dev/null
+++ b/files/templates/index.tmpl
@@ -0,0 +1,3 @@
+<h1>Files</h1>
+
+# TBD (again) \ No newline at end of file
diff --git a/img/arrow.png b/img/arrow.png
deleted file mode 100644
index 2d64bbdb7e6..00000000000
--- a/img/arrow.png
+++ /dev/null
Binary files differ
diff --git a/img/arrow_down.png b/img/arrow_down.png
deleted file mode 100644
index ecbca6ef606..00000000000
--- a/img/arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/img/arrow_up.png b/img/arrow_up.png
deleted file mode 100644
index e2457c88838..00000000000
--- a/img/arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/img/body_background.jpg b/img/body_background.jpg
new file mode 100644
index 00000000000..c3d0102f711
--- /dev/null
+++ b/img/body_background.jpg
Binary files differ
diff --git a/img/dots.png b/img/dots.png
deleted file mode 100644
index 5a98627cf5f..00000000000
--- a/img/dots.png
+++ /dev/null
Binary files differ
diff --git a/img/drop-arrow.png b/img/drop-arrow.png
new file mode 100644
index 00000000000..315395d5d42
--- /dev/null
+++ b/img/drop-arrow.png
Binary files differ
diff --git a/img/header_background.png b/img/header_background.png
new file mode 100644
index 00000000000..d377f65186d
--- /dev/null
+++ b/img/header_background.png
Binary files differ
diff --git a/img/header_background2.png b/img/header_background2.png
new file mode 100644
index 00000000000..b0160e02d1f
--- /dev/null
+++ b/img/header_background2.png
Binary files differ
diff --git a/img/help_about.png b/img/help_about.png
new file mode 100644
index 00000000000..792d18b1a53
--- /dev/null
+++ b/img/help_about.png
Binary files differ
diff --git a/img/icons/COPYING b/img/icons/COPYING
deleted file mode 100644
index e6d31d3e917..00000000000
--- a/img/icons/COPYING
+++ /dev/null
@@ -1,215 +0,0 @@
-The Oxygen Icon Theme
- Copyright (C) 2007 David Vignoni <david@icon-king.com>
- Copyright (C) 2007 Johann Ollivier Lapeyre <johann@oxygen-icons.org>
- Copyright (C) 2007 Kenneth Wimer <kwwii@bootsplash.org>
- Copyright (C) 2007 Nuno Pinheiro <nuno@oxygen-icons.org>
- Copyright (C) 2007 Riccardo Iaconelli <riccardo@oxygen-icons.org>
- Copyright (C) 2007 David Miller <miller@oxygen-icons.org>
-
-and others
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see <http://www.gnu.org/licenses/>.
-
-Clarification:
-
- The GNU Lesser General Public License or LGPL is written for
- software libraries in the first place. We expressly want the LGPL to
- be valid for this artwork library too.
-
- KDE Oxygen theme icons is a special kind of software library, it is an
- artwork library, it's elements can be used in a Graphical User Interface, or
- GUI.
-
- Source code, for this library means:
- - where they exist, SVG;
- - otherwise, if applicable, the multi-layered formats xcf or psd, or
- otherwise png.
-
- The LGPL in some sections obliges you to make the files carry
- notices. With images this is in some cases impossible or hardly useful.
-
- With this library a notice is placed at a prominent place in the directory
- containing the elements. You may follow this practice.
-
- The exception in section 5 of the GNU Lesser General Public License covers
- the use of elements of this art library in a GUI.
-
- kde-artists [at] kde.org
-
------
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/img/icons/delete.png b/img/icons/delete.png
deleted file mode 100644
index d04a554ee17..00000000000
--- a/img/icons/delete.png
+++ /dev/null
Binary files differ
diff --git a/img/icons/folder.png b/img/icons/folder.png
deleted file mode 100644
index 536da3d1c39..00000000000
--- a/img/icons/folder.png
+++ /dev/null
Binary files differ
diff --git a/img/icons/loading.gif b/img/icons/loading.gif
deleted file mode 100644
index 40efb9be594..00000000000
--- a/img/icons/loading.gif
+++ /dev/null
Binary files differ
diff --git a/img/icons/other.png b/img/icons/other.png
deleted file mode 100644
index 98a0a42dc1e..00000000000
--- a/img/icons/other.png
+++ /dev/null
Binary files differ
diff --git a/img/icons/rename.png b/img/icons/rename.png
deleted file mode 100644
index 2323757e0e9..00000000000
--- a/img/icons/rename.png
+++ /dev/null
Binary files differ
diff --git a/img/owncloud-icon.png b/img/owncloud-icon.png
deleted file mode 100644
index af123f0cd52..00000000000
--- a/img/owncloud-icon.png
+++ /dev/null
Binary files differ
diff --git a/img/owncloud-logo-medium-white.png b/img/owncloud-logo-medium-white.png
new file mode 100644
index 00000000000..d4d06fdd62d
--- /dev/null
+++ b/img/owncloud-logo-medium-white.png
Binary files differ
diff --git a/img/owncloud-logo-small-white.png b/img/owncloud-logo-small-white.png
new file mode 100644
index 00000000000..397ddf91341
--- /dev/null
+++ b/img/owncloud-logo-small-white.png
Binary files differ
diff --git a/img/owncloud-logo-small.png b/img/owncloud-logo-small.png
deleted file mode 100644
index 62dff2559bb..00000000000
--- a/img/owncloud-logo-small.png
+++ /dev/null
Binary files differ
diff --git a/img/owncloud-logo.png b/img/owncloud-logo.png
deleted file mode 100644
index 4f42e4b8fb9..00000000000
--- a/img/owncloud-logo.png
+++ /dev/null
Binary files differ
diff --git a/inc/lib_log.php b/inc/lib_log.php
deleted file mode 100644
index 9b6736d25a1..00000000000
--- a/inc/lib_log.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/**
-* ownCloud
-*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-/**
- * Class for logging features
- *
- */
-class OC_LOG {
-
- /**
- * array to define different log types
- *
- */
- public static $TYPE = array (
- 1=>'login',
- 2=>'logout',
- 3=>'read',
- 4=>'write',
- );
-
-
- /**
- * log an event
- *
- * @param username $user
- * @param type $type
- * @param message $message
- */
- public static function event($user,$type,$message){
- global $CONFIG_DBTABLEPREFIX;
- $result = OC_DB::query('INSERT INTO `' . $CONFIG_DBTABLEPREFIX . 'log` (`timestamp`,`user`,`type`,`message`) VALUES ('.time().',\''.addslashes($user).'\','.addslashes($type).',\''.addslashes($message).'\');');
- }
-
-
- /**
- * show the log entries in a web GUI
- *
- */
- public static function show(){
- global $CONFIG_DATEFORMAT;
- global $CONFIG_DBTABLEPREFIX;
- echo('<div class="center"><table cellpadding="6" cellspacing="0" border="0" class="log">');
-
- if(OC_USER::ingroup($_SESSION['username_clean'],'admin')){
- $result = OC_DB::select('select `timestamp`,`user`,`type`,`message` from '.$CONFIG_DBTABLEPREFIX.'log order by timestamp desc limit 20');
- }else{
- $user=$_SESSION['username_clean'];
- $result = OC_DB::select('select `timestamp`,`user`,`type`,`message` from '.$CONFIG_DBTABLEPREFIX.'log where user=\''.$user.'\' order by timestamp desc limit 20');
- }
- foreach($result as $entry){
- echo('<tr class="browserline">');
- echo('<td class="sizetext">'.date($CONFIG_DATEFORMAT,$entry['timestamp']).'</td>');
- echo('<td class="highlighttext">'.OC_LOG::$TYPE[$entry['type']].'</td>');
- echo('<td class="nametext">'.$entry['user'].'</td>');
- echo('<td class="nametext">'.$entry['message'].'</td>');
- echo('</tr>');
- }
- echo('</table></div>');
- }
-
-}
-
-
-
-?>
diff --git a/inc/templates/adminform.php b/inc/templates/adminform.php
deleted file mode 100644
index 5a04c4902ac..00000000000
--- a/inc/templates/adminform.php
+++ /dev/null
@@ -1,193 +0,0 @@
-<?php
-global $WEBROOT;
-global $FIRSTRUN;
-global $CONFIG_ENABLEBACKUP;
-global $CONFIG_DATADIRECTORY_ROOT;
-global $CONFIG_BACKUPDIRECTORY;
-global $CONFIG_ERROR;
-$f=@fopen($SERVERROOT.'/config/config.php','a+');
-if(!$f) die('Error: Config file (config/config.php) is not writable for the webserver.<br/>');
-@fclose($f);
-if(!isset($fillDB)) $fillDB=true;
-if(!isset($CONFIG_DBHOST)) $CONFIG_DBHOST='localhost';
-if(!isset($CONFIG_DBUSER)) $CONFIG_DBUSER='owncloud';
-if(!isset($CONFIG_DBTABLEPREFIX)) $CONFIG_DBTABLEPREFIX='oc_';
-?>
-<script type="text/javascript">
-function showDBAdmin(){
- var show=document.getElementById('dbcreate').checked;
- document.getElementById('dbAdminUser').style.display=(show)?'table-row':'none';
- document.getElementById('dbAdminPwd').style.display=(show)?'table-row':'none';
-}
-
-function showBackupPath(){
- var show=document.getElementById('enablebackup').checked;
- document.getElementById('backupdir').style.display=(show)?'table-row':'none';
-}
-
-function dbtypechange(){
- var dropdown=action=document.getElementById('dbtype');
- if (dropdown){
- var type=dropdown.options[dropdown.selectedIndex].value;
- var inputs=Array('dbhost','dbuser','dbpass','dbpass_retype','dbcreaterow','dbAdminPwd','dbAdminUser','dbname','dbfill','dbtableprefix');
- var id,element;
- if(type=='sqlite'){
- for(i in inputs){
- id=inputs[i];
- element=document.getElementById(id);
- if(element){
- element.style.display='none';
- }
- }
- }else if(type=='mysql' || type=='pgsql'){
- for(i in inputs){
- id=inputs[i];
- element=document.getElementById(id);
- if(element){
- element.style.display='table-row';
- }
- }
- showDBAdmin();
- }
- }
-}
-
-function datetypechange(){
- var dropdown=action=document.getElementById('datetype');
- var type=dropdown.options[dropdown.selectedIndex].value;
-
- var id,element;
- if(type=='custom'){
- element=document.getElementById('trdateformat');
- if(element){
- element.style.display='table-row';
- }
- }else{
- element=document.getElementById('trdateformat');
- if(element){
- element.style.display='none';
- }
- element=document.getElementById('inputdateformat');
- if(element){
- element.value = type;
- }
- }
-}
-</script>
-<?php
-if(!$FIRSTRUN){
- $action=$WEBROOT.'/settings/#system_settings';
-}else{
- $action='#';
-}
-echo('<form method="post" action="'.$action.'">')
-?>
-<table cellpadding="5" cellspacing="5" border="0" class="loginform">
-<?php
- if(!empty($CONFIG_ERROR) and !$FIRSTRUN){
- echo "<tr><td colspan='3' class='error'>$CONFIG_ERROR</td></tr>";
- }
-if($FIRSTRUN){?>
-<tr><th colspan="2">Administrator User</th></tr>
-<tr title="Name used to log in."><td>user name:</td><td><input type="text" name="adminlogin" size="30" class="formstyle" value=""></input></td></tr>
-<tr title="Make a secure password, use at least 9 characters. Use letters and numbers."><td>password:</td><td><input type="password" name="adminpassword" size="30" class="formstyle"></input></td></tr>
-<tr title="Retype password to avoid typing errors."><td>retype password:</td><td><input type="password" name="adminpassword2" size="30" class="formstyle"></input></td></tr>
-<?php
-}
-?>
-<tr><th colspan="2">Advanced Configuration</th></tr>
-<?php if($FIRSTRUN){?>
-<tr title="This directory is used to store files."><td>data directory:</td><td><input type="text" name="datadirectory" size="30" class="formstyle" value="<?php echo($CONFIG_DATADIRECTORY_ROOT);?>"></input></td></tr>
-<?php } ?>
-<tr title="Using SSL is more secure but requires specific configurations. Click the link to test SSL on your server."><td>force ssl: (<a href="https://<?php echo($_SERVER["HTTP_HOST"].$WEBROOT);?>" target="_blank">test SLL</a>)</td><td><input type="checkbox" name="forcessl" size="30" class="formstyle" value='1' <?php if($CONFIG_HTTPFORCESSL) echo 'checked="checked"'?>></input></td></tr>
-<tr title="If something goes wrong, it is often possible to protect your data using a back-up."><td>automatic backup:</td><td><input type="checkbox" name="enablebackup" id="enablebackup" onchange='showBackupPath()' size="30" class="formstyle" value='1' <?php if($CONFIG_ENABLEBACKUP) echo 'checked'?>></input></td></tr>
-<tr title="This directory is used to store backups." id='backupdir'><td>&nbsp; - backup directory:</td><td><input type="text" name="backupdirectory" size="30" class="formstyle" value="<?php echo($CONFIG_BACKUPDIRECTORY);?>"></input></td></tr>
-<tr><td>date format:</td><td><select id='datetype' name="datetype" onchange='datetypechange()'>
- <option value='<?php echo($CONFIG_DATEFORMAT);?>'><?php echo(date($CONFIG_DATEFORMAT));?></option>
- <!-- dd-mm-yyyy yyyy-mm-dd mm-dd-yyyy -->
- <optgroup label="DD-MM-YYYY">
- <option value='j M Y G:i'><?php echo(date('j M Y G:i'));?></option>
- <option value='j M Y'><?php echo(date('j M Y'));?></option>
- <option value='D j M Y G:i:s'><?php echo(date('D j M Y G:i:s'));?></option>
- <option value='l j F'><?php echo(date('l j F'));?></option>
- <option value='d-m-Y G:i'><?php echo(date('d-m-Y H:i'));?></option>
- </optgroup>
- <optgroup label="MM-DD-YYYY">
- <option value='M j Y G:i'><?php echo(date('M j Y G:i'));?></option>
- <option value='M j Y'><?php echo(date('M j Y'));?></option>
- </optgroup>
- <optgroup label="YYYY-MM-DD">
- <option value='Y M j G:i'><?php echo(date('Y M j G:i'));?></option>
- <option value='Y M j'><?php echo(date('Y M j'));?></option>
- </optgroup>
- <option value='custom'>Custom Date</option>
-</select></td></tr>
-<tr id='trdateformat'><td>&nbsp; - custom date:</td><td><input type="text" id="inputdateformat" name="dateformat" size="30" class="formstyle" value='<?php echo($CONFIG_DATEFORMAT);?>'></input></td></tr>
-<?php if($FIRSTRUN){
- if(!is_callable('sqlite_open')){
- echo '<tr><td colspan="2">No SQLite support detected, make sure you have both sqlite and the sqlite php module installed (sqlite and php5-sqlite for Debian/Ubuntu)</td></tr>';
- }
-?>
-<tr title="SQLite is usually the easiest database to work with."><td>database type:</td><td>
-<select id='dbtype' name="dbtype" onchange='dbtypechange()'>
-<?php
-global $CONFIG_DBTYPE;
-if($CONFIG_DBTYPE=='sqlite'){
- if(is_callable('sqlite_open')){
- echo "<option value='sqlite'>SQLite</option>";
- }
- if(is_callable('mysql_connect')){
- echo "<option value='mysql'>MySQL</option>";
- }
- if(is_callable('pg_connect')){
- echo "<option value='pgsql'>PostgreSQL</option>";
- }
-}elseif($CONFIG_DBTYPE=='mysql'){
- if(is_callable('mysql_connect')){
- echo "<option value='mysql'>MySQL</option>";
- }
- if(is_callable('sqlite_open')){
- echo "<option value='sqlite'>SQLite</option>";
- }
- if(is_callable('pg_connect')){
- echo "<option value='pgsql'>PostgreSQL</option>";
- }
-}elseif($CONFIG_DBTYPE=='pgsql'){
- if(is_callable('pg_connect')){
- echo "<option value='pgsql'>PostgreSQL</option>";
- }
- if(is_callable('mysql_connect')){
- echo "<option value='mysql'>MySQL</option>";
- }
- if(is_callable('sqlite_open')){
- echo "<option value='sqlite'>SQLite</option>";
- }
-}
-?>
-</select>
-</td></tr>
-<tr title="The database server. In most cases, localhost works fine." id='dbhost'><td>&nbsp; - database host:</td><td><input type="text" name="dbhost" size="30" class="formstyle" value='<?php echo($CONFIG_DBHOST);?>'></input></td></tr>
-<tr title="The name of the database." id='dbname'><td>&nbsp; - database name:</td><td><input type="text" name="dbname" size="30" class="formstyle" value='<?php echo($CONFIG_DBNAME);?>'></input></td></tr>
-<tr title="Used to avoid conflict between web-applications. Don't use the same prefix for two web-applications." id='dbtableprefix'><td>&nbsp; - table prefix:</td><td><input type="text" name="dbtableprefix" size="30" class="formstyle" value='<?php echo($CONFIG_DBTABLEPREFIX);?>'></input></td></tr>
-<tr title="The user of the database. If possible avoid the root user." id='dbuser'><td>&nbsp; - database user:</td><td><input type="text" name="dbuser" size="30" class="formstyle" value='<?php echo($CONFIG_DBUSER);?>'></input></td></tr>
-<tr title="The password of the database." id='dbpass'><td>&nbsp; &nbsp; &nbsp; - password:</td><td><input type="password" name="dbpassword" size="30" class="formstyle" value=''></input></td></tr>
-<tr title="Retype password to avoid typing errors." id='dbpass_retype'><td>&nbsp; &nbsp; &nbsp; - retype password:</td><td><input type="password" name="dbpassword2" size="30" class="formstyle" value=''></input></td></tr>
-<tr title="Automatically create a database and user for ownCloud." id='dbcreaterow'><td>&nbsp; - create database and user:</td><td><input id='dbcreate' type="checkbox" name="createdatabase" size="30" class="formstyle" value='1' checked="checked" onchange='showDBAdmin()'></input></td></tr>
-<tr title="The administrative database user. This is often 'root'. If in doubt, contact your web-host" id='dbAdminUser'><td>&nbsp; &nbsp; &nbsp; - administrative user:</td><td><input type="text" name="dbadminuser" size="30" class="formstyle" value='root'></input></td></tr>
-<tr title="The password of the administrative database user. If in doubt, contact your web-host." id='dbAdminPwd'><td>&nbsp; &nbsp; &nbsp; - administrative password:</td><td><input type="password" name="dbadminpwd" size="30" class="formstyle" value=''></input></td></tr>
-<tr title="Fill database with default data so you can start right away." id='dbfill'><td>&nbsp; - fill initial database:</td><td><input type="checkbox" name="filldb" size="30" class="formstyle" value='1' checked="checked"></input></td></tr>
-<?php }?>
-<tr><th colspan="2">Confirmation</th></tr>
-<?php
- if(!$FIRSTRUN){?>
- <tr title="This is to avoid abuse while you are away and have not logged out decently."><td>your password:</td><td><input type="password" name="currentpassword" size="30" class="formstyle"></input></td></tr>
- <?php
- }
-?>
-<tr><td></td><td><input type="submit" name="set_config" alt="save" value="save" class="formstyle" /></td></tr>
-</table></form><br/>
-<script type="text/javascript">
- dbtypechange();
- datetypechange();
- showBackupPath();
-</script>
diff --git a/inc/templates/configform.php b/inc/templates/configform.php
deleted file mode 100644
index 76c73cb8887..00000000000
--- a/inc/templates/configform.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-global $FIRSTRUN;
-global $WEBROOT;
-global $CONFIG_ERROR;
-if(!isset($fillDB)) $fillDB=true;
-if(!isset($CONFIG_DBHOST)) $CONFIG_DBHOST='localhost';
-if(!isset($CONFIG_DBUSER)) $CONFIG_DBUSER='owncloud';
-$newuserpassword=OC_USER::generatepassword();
-?>
-<script type="text/javascript">
-changepassset=function(){
- var change=document.getElementById('changepass').checked;
- if(!change){
- document.getElementById('new_password').style.display='none';
- document.getElementById('new_password_retype').style.display='none';
- }else{
- document.getElementById('new_password').style.display='table-row';
- document.getElementById('new_password_retype').style.display='table-row';
- }
-}
-</script>
-<form method="post" enctype="multipart/form-data" action="<?php echo($WEBROOT);?>/settings/#">
-<div><input type='hidden' name='config' value='1' /></div>
-<table cellpadding="5" cellspacing="5" border="0" class="loginform">
-<?php
- if(!empty($CONFIG_ERROR) and !$FIRSTRUN){
- echo "<tr><td colspan='3' class='error'>$CONFIG_ERROR</td></tr>";
- }
-?>
-<tr><td>enter password</td><td><input type="password" name="currentpassword" size="30" class="formstyle"></input></td></tr>
-<tr><td>change password:</td><td><input onchange='changepassset()' id='changepass' type="checkbox" name="changepass" size="30" class="formstyle" value='1'></input></td></tr>
-<tr style='display:none' id='new_password'><td>new password:</td><td><input type="password" name="password" size="30" class="formstyle"></input></td></tr>
-<tr style='display:none' id='new_password_retype'><td>retype admin password:</td><td><input type="password" name="password2" size="30" class="formstyle"></input></td></tr>
-<tr><td></td><td><input type='submit' value='save' class='formstyle'/></td></tr>
-</table>
-</form>
diff --git a/inc/templates/footer.php b/inc/templates/footer.php
deleted file mode 100644
index 56f4fce1952..00000000000
--- a/inc/templates/footer.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-global $WEBROOT;
-?>
-</div>
-<div class='foot'>
-<?php
-if(!OC_UTIL::hasSmallScreen()){
- if (isset($_SERVER['HTTPS'])) {
- $PROTO="webdavs://";
- } else {
- $PROTO="webdav://";
- }
-?>
-<div class='bar'><p class="hint">
-Hint: Mount it via webdav like this: <a href="<?php echo($PROTO.$_SERVER["HTTP_HOST"].$WEBROOT.'/webdav/owncloud.php');?>"><?php echo($PROTO.$_SERVER["HTTP_HOST"].$WEBROOT);?>/webdav/owncloud.php</a>
-</p></div>
-<?php }?>
-<p class="footer">
-<?php
- $version=implode('.',OC_UTIL::getVersion());
- echo('<a href="http://ownCloud.org">ownCloud</a> - '.$version);
-?>
-</p>
-</div>
-</div>
-</body></html>
diff --git a/inc/templates/header.php b/inc/templates/header.php
deleted file mode 100644
index 4593af59518..00000000000
--- a/inc/templates/header.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <title>ownCloud</title>
- <base href="<?php echo($WEBROOT); ?>/"/>
- <link rel="stylesheet" type="text/css" href="<?php
- if(!OC_UTIL::hasSmallScreen()){
- echo($WEBROOT.'/css/default.php');
- }else{
- echo($WEBROOT.'/css/small.php');
- }
- ?>"/>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_ajax.js'></script>
- <?php
- global $CONFIG_INSTALLED;
- if($CONFIG_INSTALLED){//the javascripts somehow breaks the first run wizzard in konqueror?>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_timer.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_notification.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_xmlloader.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_files.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_event.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_drag.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/lib_api.js'></script>
- <script type='text/ecmascript' src='<?php echo($WEBROOT)?>/js/filebrowser.js'></script>
- <?php
- }
- ?>
-<?php
-foreach(OC_UTIL::$scripts as $script){
- echo("<script type='text/ecmascript' src='$WEBROOT/$script'></script>\n");
-}
-foreach(OC_UTIL::$styles as $style){
- echo("<link rel='stylesheet' type='text/css' href='$WEBROOT/$style'/>\n");
-}
-?>
- <script type='text/ecmascript'>
- var WEBROOT='<?php echo($WEBROOT)?>';
- var SMALLSCREEN='<?php echo((OC_UTIL::hasSmallScreen())?'true':'false')?>';
- </script>
- </head>
- <body onload='OC_onload.run()'>
-<div id='mainlayout'>
-<div class='head'>
-<?php
-global $CONFIG_ERROR;
-if(!OC_UTIL::hasSmallScreen()){
- echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'"><span>ownCloud</span></a></h1>');
-}
-
-
- // check if already configured. otherwise start configuration wizard
- $error=OC_CONFIG::writeadminlistener();
- if($e=OC_CONFIG::configlistener()){
- $error.=$e;
- }
- if($e=OC_CONFIG::createuserlistener()){
- $error.=$e;
- }
- if($e=OC_CONFIG::creategrouplistener()){
- $error.=$e;
- }
- $CONFIG_ERROR=$error;
- global $CONFIG_INSTALLED;
- if(!$CONFIG_INSTALLED) {
- global $FIRSTRUN;
- $FIRSTRUN=true;
- echo('</div><div class="body">');
- echo('<div class="center">');
- echo('<p class="errortext">'.$error.'</p>');
- echo('<p class="highlighttext">First Run Wizard</p>');
- OC_CONFIG::showadminform();
- echo('</div>');
- OC_UTIL::showfooter();
- exit();
- }elseif(!isset($_SESSION['username']) or $_SESSION['username']=='') { // show the loginform if not loggedin
- echo('<div class="center">');
- OC_UTIL::showloginform();
- echo('</div>');
- OC_UTIL::showfooter();
- exit();
- }else{
- echo('<div id="nav" class="center">');
- OC_UTIL::shownavigation();
- echo('</div>');
- echo('</div><div class="body">');
- }
-
-?>
diff --git a/inc/templates/loginform.php b/inc/templates/loginform.php
deleted file mode 100644
index 41c86eef013..00000000000
--- a/inc/templates/loginform.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-if(isset($loginresult) and $loginresult=='error') echo('<p class="errortext">login failed</p>');
-?>
-<form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
-<table cellpadding="5" cellspacing="5" border="0" class="loginform">
-<tr><td>login:</td><td><input type="text" name="login" size="30" class="formstyle"></input></td></tr>
-<tr><td>password:</td><td><input type="password" name="password" size="30" class="formstyle"></input></td></tr>
-<tr><td></td><td><input type="submit" name="loginbutton" alt="login" value="login" class="formstyle" /></td></tr>
-</table></form>
diff --git a/inc/templates/pluginform.php b/inc/templates/pluginform.php
deleted file mode 100644
index 01410f9c829..00000000000
--- a/inc/templates/pluginform.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-$action=$WEBROOT.'/settings/#plugin_management';
-if(isset($_POST['plugin_disable_id'])){
- $id=$_POST['plugin_disable_id'];
- $disable=$_POST['plugin_disable'];
- if($disable=='true'){
- OC_PLUGIN::addToBlacklist($id);
- }else{
- OC_PLUGIN::removeFromBlacklist($id);
- }
- header('location: '.$action);
- die();
-}
-
-if(isset($_POST['install_plugin']) and $_POST['install_plugin']=='true'){
- $file=$_FILES['plugin_file']['tmp_name'];
- OC_PLUGIN::installPlugin($file);
- header('location: '.$action);
- die();
-}
-$plugins=OC_PLUGIN::listPlugins();
-$blacklist=OC_PLUGIN::loadBlackList();
-?>
-<script type="text/javascript">
-<?php
- echo('var plugins='.json_encode($plugins).";\n");
- echo('var blacklist='.json_encode($blacklist).";\n");
-?>
-
-disablePlugin=function(id,disable){
- var form=document.getElementById('disableForm');
- var input=document.getElementById('plugin_disable_name');
- input.value=id;
- var input=document.getElementById('plugin_disable');
- input.value=disable;
- form.submit();
-}
-</script>
-<p class='description'>Plugin List</p>
-<form id='disableForm' action='<?php echo($action);?>' method="post" enctype="multipart/form-data">
-<input id='plugin_disable_name' type='hidden' name='plugin_disable_id' value=''/>
-<input id='plugin_disable' type='hidden' name='plugin_disable' value=''/>
-</form>
-<table class='pluginlist'>
- <thead>
- <tr>
- <td colspan='2'>Id</td>
- <td>Version</td>
- <td>Description</td>
- <td>Author</td>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($plugins as $plugin){
- $pluginData=OC_PLUGIN::getPluginData($plugin);
- $enabled=(array_search($plugin,$blacklist)===false);
- $enabledString=($enabled)?'enabled':'disabled';
- $enabledStringOther=(!$enabled)?'enable':'disable';
- $enabled=($enabled)?'true':'false';
- echo("<tr class='$enabledString'>\n");
- echo("<td class='name'>$plugin</td>");
- echo("<td class='disable'>(<a href='$action' onclick='disablePlugin(\"$plugin\",$enabled)'>$enabledStringOther</a>)</td>");
- echo("<td class='version'>{$pluginData['info']['version']}</td>");
- echo("<td>{$pluginData['info']['name']}</td>");
- echo("<td>{$pluginData['info']['author']}</td>");
- echo("</tr>\n");
- }
- ?>
- </tbody>
-</table>
-<p class='description'>Install Plugin</p>
-<form action='<?php echo($action);?>' method="post" enctype="multipart/form-data">
- <input class='formstyle' type='file' name='plugin_file'/>
- <input type='hidden' name='install_plugin' value='true'/>
- <input class='formstyle' type='submit'/>
-</form> \ No newline at end of file
diff --git a/inc/templates/settings.php b/inc/templates/settings.php
deleted file mode 100644
index 5df6b70f5af..00000000000
--- a/inc/templates/settings.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<script type="text/javascript">
-function showForm(id){
- hideAllForms();
- form=document.getElementById('settingsContent_'+id);
- form.setAttribute('class','settingsContent');
-}
-
-function showFormInit(){
- var loc=document.location.toString();
- if(loc.indexOf('#')!=-1){
- var id=loc.substring(loc.indexOf('#')+1);
- showForm(id);
- }
-}
-
-function hideAllForms(){
- forms=document.getElementById('settingsHolder').childNodes;
- for(var i=0;i<forms.length;i++){
- form=forms.item(i);
- if(form.nodeType==1 && (form.tagName=='div' || form.tagName=='DIV')){
- form.setAttribute('class','settingsContent hidden');
- }
- }
-}
-</script>
-<div id='settingsNav'>
-<ul>
-<?php
-global $WEBROOT;
-foreach(OC_CONFIG::$forms as $name=>$url){
- $clean=strtolower(str_replace(' ','_',$name));
- echo("<li><a onclick='showForm(\"$clean\")' href='{$WEBROOT}/settings/#$clean'>$name</a></li>\n");
-}
-?>
-</ul>
-</div>
-<div id='settingsHolder'>
-<div class='settingsContent'>Settings</div>
-<?php
-foreach(OC_CONFIG::$forms as $name=>$url){
- $clean=strtolower(str_replace(' ','_',$name));
- echo("<div id='settingsContent_$clean' class='settingsContent hidden'>\n");
- oc_include($url);
- echo("</div>\n");
-}
-?>
-</div>
-<script type="text/javascript">
-OC_onload.add(showFormInit());
-</script> \ No newline at end of file
diff --git a/inc/templates/userform.php b/inc/templates/userform.php
deleted file mode 100644
index dea419159e3..00000000000
--- a/inc/templates/userform.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-//handle addTo and removeFrom group
-if(isset($_POST['groupAddRemove'])){
- $groupName=$_POST['groupname'];
- $users=explode(';',$_POST['users']);
- if($_POST['groupAddRemove']=='add'){
- foreach($users as $user){
- OC_USER::addToGroup($user,$groupName);
- }
- }elseif($_POST['groupAddRemove']=='remove'){
- foreach($users as $user){
- OC_USER::removeFromGroup($user,$groupName);
- }
- }
-}
-$action=$WEBROOT.'/settings/#user_management';
-if(!empty($CONFIG_ERROR)){
- echo "<p class='error'>$CONFIG_ERROR</p>";
-}
-?>
-<script type="text/javascript">
-<?php
- $users=OC_USER::getUsers();
- $groups=OC_USER::getGroups();
- echo('var users='.json_encode($users).";\n");
- echo('var groups='.json_encode($groups).";\n");
-?>
-sellectAllUsers=function(){
- var check=document.getElementById('user_selectall');
- for(i in users){
- if(users[i]){
- document.getElementById('user_select_'+users[i]).checked=check.checked;
- }
- }
- getSellectedUsers();
-}
-
-getSellectedUsers=function(){
- sellectedUsers=new Array();
- for(i in users){
- if(users[i]){
- if(document.getElementById('user_select_'+users[i]).checked){
- sellectedUsers.push(users[i]);
- }
- }
- }
- document.getElementById('removeFromGroupUsers').value=sellectedUsers.join(';');
- document.getElementById('addToGroupUsers').value=sellectedUsers.join(';');
-}
-
-var sellectedUsers=new Array();
-
-setGroup=function(){
- var select=document.getElementById('groupselect');
- var group=select.options[select.selectedIndex].value;
- document.getElementById('addToGroupName').value=group;
- document.getElementById('removeFromGroupName').value=group;
-}
-
-</script>
-<p class='description'>All Users</p>
-<table class='userlist'>
- <thead>
- <tr>
- <td class='sellect'><input type='checkbox' id='user_selectall' onchange='sellectAllUsers()' class='formstyle'/></td>
- <td class='name'>Name</td>
- <td class='groups'>Groups</td>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($users as $user){
- if($user){
- echo("<tr>\n");
- echo("<td class='sellect'><input type='checkbox' onchange='getSellectedUsers()' id='user_select_$user' class='formstyle'/></td>\n");
- echo("<td class='name'>$user</td>\n");
- $userGroups=OC_USER::getUserGroups($user);
- foreach($userGroups as &$userGroup){
- $userGroup=OC_USER::getGroupName($userGroup);
- }
- $userGroups=join(', ',$userGroups);
- echo("<td class='groups'>$userGroups</td>\n");
- echo("</tr>\n");
- }
- }
- ?>
- </tbody>
-</table>
-<div id='sellectedUsersActions'>
-Groups <select id='groupselect' onchange='setGroup()'>
-<?php
-foreach($groups as $group){
- echo("<option value='$group'>$group</option>");
-}
-?>
-</select>
-<form id='addToGroupForm' method="post" enctype="multipart/form-data" action="<?php echo($action);?>">
-<input type='hidden' name='groupAddRemove' value='add'></input>
-<input id='addToGroupName' type='hidden' name='groupname' value='<?php echo($groups[0]);?>'></input>
-<input id='addToGroupUsers' type='hidden' name='users' value=''></input>
-<input type='submit' value='Add'></input>
-</form>
-<form id='removeFromGroupForm' method="post" enctype="multipart/form-data" action="<?php echo($action);?>">
-<input type='hidden' name='groupAddRemove' value='remove'></input>
-<input id='removeFromGroupName' type='hidden' name='groupname' value='<?php echo($groups[0]);?>'></input>
-<input id='removeFromGroupUsers' type='hidden' name='users' value=''></input>
-<input type='submit' value='Remove'></input>
-</form>
-</div>
-<p class='description'>Add User</p>
-<?php
-$newuserpassword=OC_USER::generatepassword();
-?>
-<form id='newUserForm' method="post" enctype="multipart/form-data" action="<?php echo($action);?>">
-user name: <input type='text' name='new_username' class="formstyle"></input>
-password <input type='text' name='new_password' class="formstyle" autocomplete="off" value='<?php echo($newuserpassword);?>'></input>
-&nbsp;&nbsp;<input type='submit' value='create' class="formstyle"></input>
-</form>
-<p class='description'>Add Group</p>
-<form id='newGroupForm' method="post" enctype="multipart/form-data" action="<?php echo($action);?>">
-<input type='hidden' name='creategroup' value='1' />
-<input type='text' name='groupname' class="formstyle"></input>
-<input type='submit' value='create' class="formstyle"></input>
-</form>
-
-
diff --git a/index.php b/index.php
index 67e0b549302..23aa30dcb4e 100644
--- a/index.php
+++ b/index.php
@@ -3,40 +3,50 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-require_once('inc/lib_base.php');
-
-if(isset($_GET['dir'])) $dir=$_GET['dir']; else $dir='';
-
-if(isset($_GET['file'])) {
-
- OC_FILES::get($dir,$_GET['file']);
-}else{
-
- OC_UTIL::addscript('js/ajax.js');
- OC_UTIL::showheader();
-
- OC_FILES::showbrowser($CONFIG_DATADIRECTORY,$dir);
-
- OC_UTIL::showfooter();
-
+require_once( 'lib/base.php' );
+oc_require_once( 'appconfig.php' );
+oc_require_once( 'template.php' );
+if( OC_USER::isLoggedIn()){
+ if( $_GET["logout"] ){
+ OC_USER::logout();
+ OC_TEMPLATE::printGuestPage( "", "logout" );
+ }
+ else{
+ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
+ exit();
+ }
+}
+else{
+ if( OC_USER::login( $_POST["user"], $_POST["password"] )){
+ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" ));
+ exit();
+ }
+ else{
+ $error = false;
+ // Say "bad login" in case the user wanted to login
+ if( $_POST["user"] && $_POST["password"] ){
+ $error = true;
+ }
+ OC_TEMPLATE::printGuestPage( "", "login", array( "error" => $error ));
+ }
}
?>
diff --git a/js/ajax.js b/js/ajax.js
deleted file mode 100644
index c25f16fd385..00000000000
--- a/js/ajax.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-
-OC_onload.add(OC_FILES.browser.showInitial); \ No newline at end of file
diff --git a/js/filebrowser.js b/js/filebrowser.js
deleted file mode 100644
index 1aa0e138970..00000000000
--- a/js/filebrowser.js
+++ /dev/null
@@ -1,596 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-OC_FILES.browser=new Object();
-
-OC_FILES.browser.showInitial=function(){
- if(document.getElementById('content')){
- var dir=''
- var loc=document.location.toString();
- if(loc.indexOf('#')!=-1){
- dir=loc.substring(loc.indexOf('#')+1);
- }
- OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,true);
- }
-}
-
-OC_FILES.browser.show=function(dir,forceReload){
- if(!dir || !dir.split){
- dir='';
- }
- OC_FILES.getdirectorycontent(dir,OC_FILES.browser.show_callback,forceReload);
-}
-
-OC_FILES.browser.breadcrumb=new Object();
-OC_FILES.browser.breadcrumb.node=null;
-OC_FILES.browser.breadcrumb.crumbs=Array();
-OC_FILES.browser.breadcrumb.show=function(parent,path){
- if((!OC_FILES.browser.breadcrumb.node==parent && parent) || OC_FILES.browser.breadcrumb.node==null){
- OC_FILES.browser.breadcrumb.clear();
- OC_FILES.browser.breadcrumb.node=parent;
- OC_FILES.browser.breadcrumb.add('Home','/');
- }
- var dirs=path.split('/');
- var currentPath='/';
- var paths=Array();
- var currentPath;
- if(dirs.length>0){
- for(var i=0;i<dirs.length;i++){
- dir=dirs[i];
- if(dir){
- currentPath+=dir+'/';
- paths[currentPath]=true;
- if(!OC_FILES.browser.breadcrumb.crumbs[currentPath]){
- OC_FILES.browser.breadcrumb.add(dir,currentPath);
- }
- }
- }
- }
- //remove all crumbs that are not part of our current path
- for(currentPath in OC_FILES.browser.breadcrumb.crumbs){
- if(!paths[currentPath] && currentPath!='/'){
- OC_FILES.browser.breadcrumb.remove(currentPath);
- }
- }
-
-}
-OC_FILES.browser.breadcrumb.add=function(name,path){
- var a=document.createElement('a');
- var div=document.createElement('div');
- OC_FILES.browser.breadcrumb.crumbs[path]=div;
- div.className='breadcrumb';
- a.setAttribute('href','#'+path);
- a.addEvent('onclick',OC_FILES.browser.show,path);
- img=document.createElement('img');
- img.src=WEBROOT+'/img/arrow.png';
- a.appendChild(document.createTextNode(' ' +name));
- a.appendChild(img);
- OC_FILES.files[path]=new OC_FILES.file('',path,'dir');
- div.makeDropTarget();
- div.file=OC_FILES.files[path];
- div.addEvent('ondropon',OC_FILES.browser.handleDropOn);
- div.appendChild(a);
-
- OC_FILES.browser.breadcrumb.node.appendChild(div);
-}
-OC_FILES.browser.breadcrumb.remove=function(path){
- if(OC_FILES.browser.breadcrumb.crumbs[path]){
- var div=OC_FILES.browser.breadcrumb.crumbs[path];
- if(div.parentNode){
- div.parentNode.removeChild(div);
- }
- delete OC_FILES.browser.breadcrumb.crumbs[path];
- }
-}
-OC_FILES.browser.breadcrumb.clear=function(){
- for(path in OC_FILES.browser.breadcrumb.crumbs){
- OC_FILES.browser.breadcrumb.remove(path);
- }
-}
-
-OC_FILES.browser.files=new Object();
-OC_FILES.browser.files.fileNodes=Array();
-OC_FILES.browser.files.node=null;
-OC_FILES.browser.files.tbody=null;
-OC_FILES.browser.files.show=function(parent,fileList){
- if(parent){
- OC_FILES.browser.files.node=parent;
- }
- var table=document.createElement('table');
- OC_FILES.browser.files.node.appendChild(table);
- var tbody=document.createElement('tbody');
- OC_FILES.browser.files.tbody=tbody;
- table.appendChild(tbody);
- table.setAttribute('cellpadding',6);
- table.setAttribute('cellspacing',0);
- if(fileList){
- var name;
- //remove files that no longer are in the folder
- for(name in OC_FILES.browser.files.fileNodes){
- if(!fileList[name]){
- OC_FILES.browser.files.remove(name);
- }
- }
- //add the files that arent in the list yet
- var unreadableFiles=[];
- for(name in fileList){
- file=fileList[name];
- if(file.readable){
- if(!OC_FILES.browser.files.fileNodes[file.name]){
- OC_FILES.browser.files.add(file.name,file.type,file.size,file.date,file.mime);
- }
- }else if(file.name){
- unreadableFiles.push(file);
- }
- }
- if(unreadableFiles.length>0){
- var message=unreadableFiles.length+" unreadable files detected:\n";
- var first=true;
- unreadableFiles.foreach(function(item){
- if(!first){
- message+=', ';
- }
- first=false;
- message+=item.name;
- });
- message+="\nPlease check the file premissions";
- alert(message);
- }
- }
-}
-OC_FILES.browser.files.add=function(name,type,size,date,mime){
- if(name){
- if(!size) size=0;
- if(!date) date=getTimeString();
- OC_FILES.files[name]=new OC_FILES.file(OC_FILES.dir,name,type,mime);
- tr=document.createElement('tr');
- OC_FILES.browser.files.fileNodes[name]=tr;
- OC_FILES.browser.files.tbody.appendChild(tr);
- tr.className='browserline';
- td=document.createElement('td');
- tr.appendChild(td);
- td.className='fileSelector';
- input=document.createElement('input');
- input.setAttribute('type','checkbox');
- input.setAttribute('name','fileSelector');
- input.setAttribute('value',name);
- td.appendChild(input);
- tr.appendChild(OC_FILES.browser.showicon(type));
- td=document.createElement('td');
- tr.appendChild(td);
- td.makeDropTarget();
- td.addEvent('ondropon',OC_FILES.browser.handleDropOn);
- td.className='nametext';
- td.setAttribute('name',name);
- td.setAttribute('id',name);
- var fileObject=OC_FILES.files[name];
- td.file=fileObject;
- a=document.createElement('a');
- td.appendChild(a);
- a.appendChild(document.createTextNode(name));
- a.addEvent('onclick',fileObject.actions['default'].bindScope(fileObject));
- a.makeDraggable();
- a.addEvent('ondrop',OC_FILES.browser.handleDrop);
- if(type=='dir'){
- td.setAttribute('colspan',2);
- var dirname=name;
- if(OC_FILES.dir[OC_FILES.dir.length-1]!='/'){
- dirname='/'+name;
- }
- a.setAttribute('href','#'+OC_FILES.dir+dirname);
- }else{
- a.setAttribute('href','#'+OC_FILES.dir);
- if(!SMALLSCREEN){
- sizeTd=document.createElement('td');
- tr.appendChild(sizeTd);
- sizeTd.className='sizetext';
- sizeTd.appendChild(document.createTextNode(sizeFormat(size)));
- }else{
- td.setAttribute('colspan',2);
- }
- }
- a=document.createElement('a');
- var img=document.createElement('img');
- td.appendChild(img);
- img.className='file_actions';
- img.alt=''
- img.title='actions';
- img.src=WEBROOT+'/img/arrow_down.png';
- img.addEvent('onclick',OC_FILES.browser.showactions.bind(name));
- if(!SMALLSCREEN){
- td=document.createElement('td');
- tr.appendChild(td);
- td.className='sizetext';
- td.appendChild(document.createTextNode(date));
- }
- }
-}
-
-OC_FILES.browser.files.remove=function(name){
- if(OC_FILES.browser.files.fileNodes[name]){
- tr=OC_FILES.browser.files.fileNodes[name];
- tr.parentNode.removeChild(tr);
- delete OC_FILES.browser.files.fileNodes[name];
- }
-
-}
-OC_FILES.browser.files.clear=function(){
- for(name in OC_FILES.browser.files.fileNodes){
- OC_FILES.browser.files.remove(name);
- }
-}
-
-OC_FILES.browser.table=null;
-OC_FILES.browser.show_callback=function(content){
- var dir=OC_FILES.dir
- var tr=null;
- var td=null;
- var img=null;
- if(!OC_FILES.browser.table){
- body=document.getElementsByTagName('body').item(0);
- body.addEvent('onclick',OC_FILES.browser.hideallactions);
-
- //remove current content;
- var contentNode=document.getElementById('content');
- contentNode.className='center';
- if(contentNode.hasChildNodes()){
- while(contentNode.childNodes.length >=1){
- contentNode.removeChild(contentNode.firstChild);
- }
- }
- var table=document.createElement('table');
- OC_FILES.browser.table=table;
- table.className='browser';
- var tbody=document.createElement('tbody');
- var thead=document.createElement('thead');
- var tfoot=document.createElement('tfoot');
- table.appendChild(thead);
- table.appendChild(tbody);
- table.appendChild(tfoot);
- OC_FILES.files=Array();
- table.setAttribute('cellpadding',6);
-
- tr=document.createElement('tr');
- thead.appendChild(tr);
- tr.className='breadcrumb';
- td=document.createElement('td');
- tr.appendChild(td);
- input=document.createElement('input');
- input.className='fileSelector'
- input.setAttribute('type','checkbox');
- input.setAttribute('name','fileSelector');
- input.setAttribute('value','select_all');
- input.setAttribute('id','select_all');
- input.addEvent('onclick',OC_FILES.selectAll);
- td.appendChild(input);
- td.className='breadcrumb';
- OC_FILES.browser.breadcrumb.show(td,dir);
- // files and directories
- tr=document.createElement('tr');
- tbody.appendChild(tr);
- td=document.createElement('td');
- tr.appendChild(td);
- div=document.createElement('div');
- div.className='fileList';
- td.appendChild(div);
- OC_FILES.browser.files.show(div,content);
- tr=document.createElement('tr');
- tfoot.appendChild(tr);
- tr.className='utilityline';
- td=document.createElement('td');
- tr.appendChild(td);
- td.className='actionsSelected';
- dropdown=document.createElement('select');
- td.appendChild(dropdown);
- dropdown.setAttribute('id','selected_action');
- for(index in OC_FILES.actions_selected){
- if(OC_FILES.actions_selected[index].call){
- option=document.createElement('option');
- dropdown.appendChild(option);
- option.setAttribute('value',index);
- option.appendChild(document.createTextNode(capitaliseFirstLetter(index)));
- }
- }
- td.appendChild(document.createTextNode(' Selected '));
- button=document.createElement('button');
- td.appendChild(button);
- button.appendChild(document.createTextNode('Go'));
- button.addEvent('onclick',OC_FILES.action_selected);
- div=document.createElement('div');
- td.appendChild(div);
- div.className='moreActionsButton';
- OC_FILES.maxUpload=content['max_upload'];
- var p=document.createElement('p');
- div.appendChild(p);
- p.appendChild(document.createTextNode('More Actions'));
- div.setAttribute('id','moreActionsButton');
- OC_FILES.browser.moreActionsShown=false;
- p.addEvent('onclick',OC_FILES.browser.showMoreActions);
- contentNode.appendChild(table);
- }else{
- OC_FILES.browser.breadcrumb.show(null,dir);
- OC_FILES.browser.files.show(null,content);
- }
- if(OC_FILES.uploadForm){
- OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+encodeURIComponent(dir));
- }
-}
-
-OC_FILES.browser.handleDropOn=function(event,node){
- var dropTargetFile=this.file;
- var dropFile=node.parentNode.file;
- if(dropTargetFile!=dropFile){
- if(dropTargetFile.actions.dropOn && dropTargetFile.actions.dropOn.call){
- dropTargetFile.actions.dropOn.call(dropTargetFile,dropFile);
- }
- return false;
- }
-}
-
-OC_FILES.browser.handleDrop=function(event,node){
- var dropTargetFile=node.file;
- var dropFile=this.parentNode.file;
- if(dropFile.actions.drop && dropFile.actions.drop.call){
- dropFile.actions.drop.call(dropFile,dropTargetFile);
- }
- return false;
-}
-
-OC_FILES.browser.showMoreActions=function(){
- if(!OC_FILES.browser.moreActionsList){
- var div=document.createElement('div');
- div.className='moreActionsList';
- var table=document.createElement('table');
- div.appendChild(table);
- var tbody=document.createElement('tbody');
- table.appendChild(tbody);
- var tr=document.createElement('tr');
- tbody.appendChild(tr);
- var td=document.createElement('td');
- tr.appendChild(td);
- OC_FILES.browser.showuploader(OC_FILES.dir,td,OC_FILES.maxUpload);
- tr=document.createElement('tr');
- tbody.appendChild(tr);
- td=document.createElement('td');
- tr.appendChild(td);
- var form=document.createElement('form');
- td.appendChild(form);
- form.appendChild(document.createTextNode('New '));
- var dropdown=document.createElement('select');
- form.appendChild(dropdown);
- dropdown.setAttribute('id','newFileType');
- var option=document.createElement('option');
- dropdown.appendChild(option);
- option.setAttribute('value','dir');
- option.appendChild(document.createTextNode('Folder'));
- option=document.createElement('option');
- dropdown.appendChild(option);
- option.setAttribute('value','file');
- option.appendChild(document.createTextNode('File'));
- form.appendChild(document.createTextNode(' '));
- var input=document.createElement('input');
- form.appendChild(input);
- input.setAttribute('id','newFileName');
- form.addEvent('onsubmit',OC_FILES.browser.newFile);
- var submit=document.createElement('input');
- submit.type='submit';
- form.appendChild(submit);
- submit.value='Create';
- OC_FILES.browser.moreActionsList=div;
- }else{
- var div=OC_FILES.browser.moreActionsList;
- }
- var button=document.getElementById('moreActionsButton');
- if(!OC_FILES.browser.moreActionsShown){
- button.appendChild(div);
- OC_FILES.browser.moreActionsShown=true;
- button.className='moreActionsButton moreActionsButtonClicked';
- }else{
- OC_FILES.browser.moreActionsShown=false;
- button.removeChild(div);
- button.className='moreActionsButton';
- }
-}
-
-OC_FILES.browser.newFile=function(event){
- if(event.preventDefault){
- event.preventDefault();
- };
- var typeSelect=document.getElementById('newFileType');
- var type=typeSelect.options[typeSelect.selectedIndex].value;
- var name=document.getElementById('newFileName').value;
- OC_FILES.newFile(type,name,OC_FILES.dir);
- return false;
-}
-
-OC_FILES.browser.showicon=function(filetype){
- var td=document.createElement('td');
- td.className='fileicon';
- var img=document.createElement('img');
- td.appendChild(img);
- img.setAttribute('width',16);
- img.setAttribute('height',16);
- if(filetype=='dir'){
- img.src=WEBROOT+'/img/icons/folder.png';
- }else if(filetype=='incomplete'){
- img.src=WEBROOT+'/img/icons/loading.gif';
- }else{
- img.src=WEBROOT+'/img/icons/other.png';
- }
- return td;
-}
-
-OC_FILES.uploadIFrames=Array();
-OC_FILES.browser.showuploader=function(dir,parent,max_upload){
- var iframeId=OC_FILES.uploadIFrames.length
- OC_FILES.uploadForm=document.createElement('form');
- OC_FILES.uploadForm.setAttribute('target','uploadIFrame'+iframeId);
- OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+encodeURIComponent(dir));
- OC_FILES.uploadForm.method='post';
- OC_FILES.uploadForm.setAttribute('enctype','multipart/form-data');
- OC_FILES.uploadIFrames[iframeId]=document.createElement('iframe');
- OC_FILES.uploadIFrames[iframeId].uploadParent=parent;
- OC_FILES.uploadIFrames[iframeId].className='hidden';
- OC_FILES.uploadIFrames[iframeId].name='uploadIFrame'+iframeId;
- var input=document.createElement('input');
- input.setAttribute('type','hidden');
- input.setAttribute('name','MAX_FILE_SIZE');
- input.setAttribute('value',max_upload);
- input.setAttribute('id','max_upload');
- OC_FILES.uploadForm.appendChild(input);
- var file=document.createElement('input');
- file.name='file';
- file.setAttribute('id','fileSelector');
- file.setAttribute('type','file');
- file.addEvent('onchange',OC_FILES.upload.bind(iframeId));
- OC_FILES.uploadForm.appendChild(document.createTextNode('Upload file: '));
- OC_FILES.uploadForm.appendChild(file);
- parent.appendChild(OC_FILES.uploadForm);
- var body=document.getElementsByTagName('body').item(0);
- body.appendChild(OC_FILES.uploadIFrames[iframeId]);
-}
-
-OC_FILES.browser.show_rename=function(dir,file){
- var item=document.getElementById(file);
- item.oldContent=Array();
- if(item.hasChildNodes()){
- while(item.childNodes.length >=1){
- item.oldContent[item.oldContent.length]=item.firstChild;
- item.removeChild(item.firstChild);
- }
- }
- var form=document.createElement('form');
- form.addEvent('onsubmit',OC_FILES.rename.bind(dir).bind(file));
- var input=document.createElement('input');
- input.setAttribute('type','text');
- input.setAttribute('name','newname');
- input.setAttribute('value',file);
- input.setAttribute('id',file+'_newname')
- input.addEvent('onblur',OC_FILES.browser.rename_cancel.bind(file));
- form.appendChild(input);
- item.appendChild(form);
- input.focus();
-}
-
-OC_FILES.browser.rename_cancel=function(file){
- var item=document.getElementsByName(file).item(0);
- if(item.hasChildNodes()){
- while(item.childNodes.length >=1){
- item.removeChild(item.firstChild);
- }
- }
- for(index in item.oldContent){
- if(item.oldContent[index].nodeType){
- item.appendChild(item.oldContent[index]);
- }
- }
-}
-
-OC_FILES.browser.showactions=function(file,hide){
- var node=document.getElementById(file);
- if(node &&(node.actionsshown || hide===true)){
- if(node.actionsshown){
- node.actionsdiv.parentNode.removeChild(node.actionsdiv);
- }
- node.actionsdiv=null;
- node.actionsshown=false
- }else if(node){
- node.actionsshown=true
- div=document.createElement('div');
- node.actionsdiv=div;
- div.className='fileactionlist';
- table=document.createElement('table');
- div.appendChild(table);
- tbody=document.createElement('tbody');
- table.appendChild(tbody);
- var file=OC_FILES.files[file]
- var actions=file.actions;
- var name;
- for(name in actions){
- if(actions[name].call && name!='default' && name!='dropOn' && name!='drop'){
- tr=document.createElement('tr');
- tbody.appendChild(tr);
- td=document.createElement('td');
- tr.appendChild(td);
- a=document.createElement('a');
- td.appendChild(a);
- a.appendChild(document.createTextNode(capitaliseFirstLetter(name)));
- var action=actions[name];
- td.addEvent('onclick',action.bindScope(file));
- }
- }
- node.appendChild(div);
- OC_FILES.hideallenabled=false;
- setTimeout('OC_FILES.hideallenabled=true',50);
- }
-}
-
-OC_FILES.browser.hideallactions=function(){
- if(OC_FILES.hideallenabled){
- for(name in OC_FILES.files){
- if(OC_FILES.files[name]){
- if(OC_FILES.files[name].hideactions){
- OC_FILES.files[name].hideactions.call(OC_FILES.files[name]);
- }
- }
- }
- }
-}
-
-OC_FILES.hideallenabled=true; //used to prevent browsers from hiding actionslists right after they are displayed;
-
-sizeFormat=function(size){
- if(isNaN(size)){
- return false;
- }
- var orig=size;
- var steps=Array('B','KiB','MiB','GiB','TiB');
- var step=0;
- while(size>(1024*2)){
- step++;
- size=size/1024;
- }
- if(size.toFixed){
- size=size.toFixed(2);
- }
- return ''+size+' '+steps[step];
-}
-
-OC_FILES.browser.showImage=function(dir,file){
- var path=WEBROOT+'/files/open_file.php?dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
- var div=document.createElement('div');
- div.setAttribute('id','imageframe');
- div.addEvent('onclick',OC_FILES.browser.hideImage)
- var img=document.createElement('img');
- img.setAttribute('src',path);
- div.appendChild(img);
- body=document.getElementsByTagName('body').item(0);
- body.appendChild(div);
-}
-
-OC_FILES.browser.hideImage=function(){
- var div=document.getElementById('imageframe');
- div.parentNode.removeChild(div);
-}
-
-function capitaliseFirstLetter(string){
- return string.charAt(0).toUpperCase() + string.slice(1);
-} \ No newline at end of file
diff --git a/js/jquery-1.5.min.js b/js/jquery-1.5.min.js
new file mode 100644
index 00000000000..9144b8ae98c
--- /dev/null
+++ b/js/jquery-1.5.min.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.5
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jan 31 08:31:29 2011 -0500
+ */
+(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g<h;g++){k=j,j=e[g];if(j==="*")j=k;else if(k!=="*"&&k!==j){l=k+" "+j,m=f[l]||f["* "+j];if(!m){o=b;for(n in f){i=n.split(" ");if(i[0]===k||i[0]==="*"){o=f[i[1]+" "+j];if(o){n=f[n],n===!0?m=o:o===!0&&(m=n);break}}}}!m&&!o&&d.error("No conversion from "+l.replace(" "," to ")),m!==!0&&(c=m?m(c):o(n(c)))}}return c}function bI(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bH(a,b,c,e){d.isArray(b)&&b.length?d.each(b,function(b,f){c||bp.test(a)?e(a,f):bH(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)}):c||b==null||typeof b!=="object"?e(a,b):d.isArray(b)||d.isEmptyObject(b)?e(a,""):d.each(b,function(b,d){bH(a+"["+b+"]",d,c,e)})}function bG(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bD,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(g[l]?l=b:(c.dataTypes.unshift(l),l=bG(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bG(a,c,d,e,"*",g));return l}function bF(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bz),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bn(a,b,c){var e=b==="width"?bh:bi,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function _(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function $(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function Z(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h,g[h][i],g[h][i].data)}}}}function Y(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function O(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(J.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(o,"")===a.type?r.push(g.selector):t.splice(i--,1);f=d(a.target).closest(r,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&q.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=q.length;j<k;j++){f=q[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:F?function(a){return a==null?"":F.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?D.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(d.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),e;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a,c){if(a==null){if(e)return e;e=a={}}c=z.length;while(c--)a[z[c]]=b[z[c]];return a}}),b.then(c.cancel,b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){var b=arguments,c=b.length,e=c<=1&&a&&d.isFunction(a.promise)?a:d.Deferred(),f=e.promise(),g;c>1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i<j;i++)h=g[i].name,h.indexOf("data-")===0&&(h=h.substr(5),f(this[0],h,e[h]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=f(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var g=/[\n\t\r]/g,h=/\s+/,i=/\r/g,j=/^(?:href|src|style)$/,k=/^(?:button|input)$/i,l=/^(?:button|input|object|select|textarea)$/i,m=/^a(?:rea)?$/i,n=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(h);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",i=f.className;for(var j=0,k=b.length;j<k;j++)g.indexOf(" "+b[j]+" ")<0&&(i+=" "+b[j]);f.className=d.trim(i)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(h);for(var e=0,f=this.length;e<f;e++){var i=this[e];if(i.nodeType===1&&i.className)if(a){var j=(" "+i.className+" ").replace(g," ");for(var k=0,l=c.length;k<l;k++)j=j.replace(" "+c[k]+" "," ");i.className=d.trim(j)}else i.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,i=d(this),j=b,k=a.split(h);while(f=k[g++])j=e?j:!i.hasClass(f),i[j?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(g," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k<l;k++){var m=h[k];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(j)return a;g.push(a)}}return g}if(n.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(i,"")}return b}var o=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){o&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&n.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete w[h]}if(d.isEmptyObject(w)){var x=s.handle;x&&(x.elem=null),delete s.events,delete s.handle,typeof s==="function"?d.removeData(a,u,!0):d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,F(a.origType,a.selector),d.extend({},a,{handler:E,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,F(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?w:v):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=w;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=w;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=w,this.stopPropagation()},isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v};var x=function(a){var b=a.relatedTarget;try{while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(c){}},y=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?y:x,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?y:x)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,c){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var c=a.target,e=c.type;if((e==="submit"||e==="image")&&d(c).closest("form").length){a.liveFired=b;return C("submit",this,arguments)}}),d.event.add(this,"keypress.specialSubmit",function(a){var c=a.target,e=c.type;if((e==="text"||e==="password")&&d(c).closest("form").length&&a.keyCode===13){a.liveFired=b;return C("submit",this,arguments)}});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var z,A=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var D={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var p in a)n[c](p,e,a[p],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=o.exec(h),k="",j&&(k=j[0],h=h.replace(o,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(D[h]+k),h=h+k):h=(D[h]||h)+k;if(c==="live")for(var q=0,r=n.length;q<r;q++)d.event.add(n[q],"live."+F(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+F(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var j=d[g];if(j){var k=!1;j=j[a];while(j){if(j.sizcache===c){k=d[j.sizset];break}if(j.nodeType===1){f||(j.sizcache=c,j.sizset=g);if(typeof b!=="string"){if(j===b){k=!0;break}}else if(i.filter(b,[j]).length>0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},i.matches=function(a,b){return i(a,null,null,b)},i.matchesSelector=function(a,b){return i(b,null,null,[a]).length>0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e<f;e++){var g,h=j.order[e];if(g=j.leftMatch[h].exec(a)){var i=g[1];g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(/\\/g,""),d=j.find[h](g,b,c);if(d!=null){a=a.replace(j.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},i.filter=function(a,c,d,e){var f,g,h=a,k=[],l=c,m=c&&c[0]&&i.isXML(c[0]);while(a&&c.length){for(var n in j.filter)if((f=j.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=j.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;l===k&&(k=[]);if(j.preFilter[n]){f=j.preFilter[n](f,l,d,k,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=l[s])!=null;s++)if(p){o=q(p,f,s,l);var t=e^!!o;d&&o!=null?t?g=!0:l[s]=!1:t&&(k.push(p),g=!0)}if(o!==b){d||(l=k),a=a.replace(j.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)i.error(a);else break;h=a}return l},i.error=function(a){throw"Syntax error, unrecognized expression: "+a};var j=i.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!/\W/.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&i.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&i.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=s;typeof b==="string"&&!/\W/.test(b)&&(b=b.toLowerCase(),d=b,g=r),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=s;typeof b==="string"&&!/\W/.test(b)&&(b=b.toLowerCase(),d=b,g=r),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h<k;h++)if(g[h]===a)return!1;return!0}i.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var p,q;c.documentElement.compareDocumentPosition?p=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(p=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return q(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return q(e[k],f[k]);return k===c?q(a,f[k],-1):q(e[k],b,1)},q=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),i.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=i.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)i(a,f[g],d);return i.filter(e,d)};d.find=i,d.expr=i.selectors,d.expr[":"]=d.expr.filters,d.unique=i.uniqueSort,d.text=i.getText,d.isXMLDoc=i.isXML,d.contains=i.contains}();var G=/Until$/,H=/^(?:parents|prevUntil|prevAll)/,I=/,/,J=/^.[^:#\[\.,]*$/,K=Array.prototype.slice,L=d.expr.match.POS,M={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(O(this,a,!1),"not",a)},filter:function(a){return this.pushStack(O(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/<tbody/i,U=/<|&#?\w+;/,V=/<(?:script|object|embed|option|style)/i,W=/checked\s*(?:[^=]|=\s*.checked.)/i,X={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&W.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?Y(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,_)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!V.test(a[0])&&(d.support.checkClone||!W.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1></$2>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("<div>").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",bX(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(bW("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(bW("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=bX(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(bS.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=bT.exec(e),j=f.cur()||0;if(i){var k=parseFloat(i[2]),l=i[3]||"px";l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(bU),bU=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var bY=/^t(?:able|d|h)$/i,bZ=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=b$(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!bY.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window);
diff --git a/js/jquery-ui-1.8.10.custom.min.js b/js/jquery-ui-1.8.10.custom.min.js
new file mode 100644
index 00000000000..7d4ff1cec10
--- /dev/null
+++ b/js/jquery-ui-1.8.10.custom.min.js
@@ -0,0 +1,782 @@
+/*!
+ * jQuery UI 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
+NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
+"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
+if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
+"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
+d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
+c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
+b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
+;/*!
+ * jQuery UI Widget 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
+a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
+e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
+this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
+widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
+enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(true===c.data(b.target,a.widgetName+".preventClickEvent")){c.removeData(b.target,a.widgetName+".preventClickEvent");b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
+a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
+this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);
+return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",
+true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Position 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
+left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
+k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
+m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
+d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
+a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
+g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
+;/*
+ * jQuery UI Draggable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
+"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
+this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
+this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
+d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
+this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
+this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
+a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
+0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
+this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
+(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment==
+"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?
+0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),
+10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==
+Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
+f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;
+if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/
+b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-
+this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
+this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.10"});
+d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=
+0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=
+c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,
+true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=
+0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=
+a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},
+stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=
+document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-
+c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-
+(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable",
+"snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=
+c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",
+{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,
+left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,
+a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,
+b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
+;/*
+ * jQuery UI Droppable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ * jquery.ui.draggable.js
+ */
+(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
+a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
+this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
+this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
+d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
+a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.10"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
+switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
+i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
+"none";if(c[f].visible){c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight};e=="mousedown"&&c[f]._activate.call(c[f],b)}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
+a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
+d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
+;/*
+ * jQuery UI Resizable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
+_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
+top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
+this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
+nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
+String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
+this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
+if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
+d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
+this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
+this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
+b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
+f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
+this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=
+null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+
+this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=
+[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=
+this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,
+a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,
+c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
+originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.10"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=
+b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width",
+"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};
+if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-
+g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,
+height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=
+e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,
+d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?
+d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=
+a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&
+/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");
+b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/
+(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
+;/*
+ * jQuery UI Selectable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
+selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
+c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
+c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
+this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
+a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
+!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
+e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.10"})})(jQuery);
+;/*
+ * jQuery UI Sortable 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
+this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,
+arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
+c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,
+{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
+if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
+a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
+if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
+b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,
+c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==
+document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-
+1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});
+this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&
+a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?
+"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?
+c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;
+return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=
+d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});
+return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=
+d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=
+this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=
+e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
+if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);
+c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===
+1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=
+this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):
+b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==
+""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
+this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
+10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions=
+{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||
+document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,
+b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=
+document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
+e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-
+this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<
+this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&
+this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=
+this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();
+this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],
+this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",
+g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||
+this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,
+originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.10"})})(jQuery);
+;/*
+ * jQuery UI Accordion 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
+a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
+function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+
+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
+this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
+b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
+a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
+c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
+if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
+if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
+e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
+e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
+tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.10",animations:{slide:function(a,b){a=
+c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);f[i]={value:j[1],
+unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide",
+paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
+;/*
+ * jQuery UI Autocomplete 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.position.js
+ */
+(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=false;var f=d.ui.keyCode;
+switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem=
+null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||
+"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),
+i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
+this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source===
+"string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},
+_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==
+this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position))},
+_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this;d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);
+else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
+(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
+-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},
+deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);
+e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,
+g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
+this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
+;/*
+ * jQuery UI Button 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,f=a([]);if(c)f=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return f};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
+i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
+function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(f)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");
+b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var e=b.element[0];h(e).not(e).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");
+g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(c.disabled)return false;if(e.keyCode==a.ui.keyCode.SPACE||e.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",
+c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var b=this.element.is(":checked");b&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=
+this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||
+this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
+true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
+c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.push(f?"ui-button-icons-only":"ui-button-icon-only");
+b.removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,
+arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
+a.Widget.prototype.destroy.call(this)}})})(jQuery);
+;/*
+ * jQuery UI Dialog 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.button.js
+ * jquery.ui.draggable.js
+ * jquery.ui.mouse.js
+ * jquery.ui.position.js
+ * jquery.ui.resizable.js
+ */
+(function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&
+c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",
+-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
+"button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=
+b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&
+a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index");
+isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);
+d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}});
+c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f,
+h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('<button type="button"></button>').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=
+d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize,
+position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f,
+h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===
+1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in
+l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");
+break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||"&#160;"));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e=
+this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&&
+this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.10",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===
+0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
+height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
+b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
+function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
+;/*
+ * jQuery UI Slider 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
+this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
+if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();
+else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
+false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
+b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
+this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b,
+g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},
+_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;
+if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=
+this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],
+value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
+this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):this.value();
+else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
+this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
+return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
+_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);
+if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,
+1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.10"})})(jQuery);
+;/*
+ * jQuery UI Tabs 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
+e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
+d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
+(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
+this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
+this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
+if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
+this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
+g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
+function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
+this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
+-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
+d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
+d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
+e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
+j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
+if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
+this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
+load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
+"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
+url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.10"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
+a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
+;/*
+ * jQuery UI Datepicker 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * jquery.ui.core.js
+ */
+(function(d,G){function K(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
+"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
+"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
+minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function E(a,b){d.extend(a,b);for(var c in b)if(b[c]==
+null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.10"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();
+f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
+_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&
+b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==
+""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,
+c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),
+true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{});
+b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
+this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
+this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,
+function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:
+f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},
+e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true);E(e.settings,f);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);
+this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?
+d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||
+a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,
+e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,
+"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==G?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},
+_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=
+d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,
+c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&
+d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",
+function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=
+-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,
+"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),
+parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,
+b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);
+this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
+_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):
+0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=
+false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=
+d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);
+else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=
+a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,
+g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){var v=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&v?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,v,H){p=o(p)?H:v;for(v=0;v<p.length;v++)if(b.substr(s,p[v].length).toLowerCase()==p[v].toLowerCase()){s+=p[v].length;return v+1}throw"Unknown name at position "+
+s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(k)if(a.charAt(z)=="'"&&!o("'"))k=false;else r();else switch(a.charAt(z)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var w=new Date(m("@"));c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case "!":w=new Date((m("!")-this._ticksTo1970)/1E4);c=w.getFullYear();j=w.getMonth()+
+1;l=w.getDate();break;case "'":if(o("'"))r();else k=true;break;default:r()}if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",
+RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&
+a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",
+b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+=
+"0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==G?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=
+f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=
+(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,
+l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=
+a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),
+b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=
+this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+
+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,
+"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=
+this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",C=0;C<i[0];C++){for(var M="",D=0;D<i[1];D++){var N=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-
+1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,C>0||D>0,z,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var A=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=
+(t+h)%7;A+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=A+"</tr></thead><tbody>";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<A;O++){x+="<tr>";var P=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var F=
+p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,J=B&&!H||!F[0]||k&&q<k||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(B?" ui-datepicker-other-month":"")+(q.getTime()==N.getTime()&&g==a.selectedMonth&&a._keyEvent||L.getTime()==q.getTime()&&L.getTime()==N.getTime()?" "+this._dayOverClass:"")+(J?" "+this._unselectableClass+" ui-state-disabled":"")+(B&&!v?"":" "+F[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":
+""))+'"'+((!B||v)&&F[2]?' title="'+F[2]+'"':"")+(J?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(B&&!v?"&#xa0;":J?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(B?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=
+P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&D==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',
+o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&
+l)?"&#xa0;":""));a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+
+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";if(d.browser.mozilla)k+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=
+a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,
+"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
+c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
+"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
+function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,
+[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery);
+;/*
+ * jQuery UI Progressbar 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
+this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
+this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery);
+;/*
+ * jQuery UI Effects 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
+16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
+a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
+a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
+"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
+0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
+211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
+d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0];
+h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,
+a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,
+a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
+border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);
+return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);
+else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),
+b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,
+a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,
+a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==
+e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=
+g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
+h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,
+a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
+;/*
+ * jQuery UI Effects Blind 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
+g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
+;/*
+ * jQuery UI Effects Bounce 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
+3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
+b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
+;/*
+ * jQuery UI Effects Clip 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
+c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Drop 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
+"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Explode 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
+0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
+e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
+;/*
+ * jQuery UI Effects Fade 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fade
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Fold 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
+10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
+;/*
+ * jQuery UI Effects Highlight 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
+this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Pulsate 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
+a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
+;/*
+ * jQuery UI Effects Scale 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
+b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
+1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
+p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
+if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
+a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
+child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
+n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Shake 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
+(h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
+;/*
+ * jQuery UI Effects Slide 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
+var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
+;/*
+ * jQuery UI Effects Transfer 1.8.10
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
+b.dequeue()})})}})(jQuery);
+; \ No newline at end of file
diff --git a/js/js.js b/js/js.js
new file mode 100644
index 00000000000..c9ab2222e78
--- /dev/null
+++ b/js/js.js
@@ -0,0 +1,50 @@
+$(document).ready(function() {
+
+ // Hides the user_menu div :
+ $('#user_menu').hide();
+
+ // Sets user_menu link behaviour :
+ $('#user_menu_link').click(function() {
+ $('#user').toggleClass('userLinkOn');
+ $('#user_menu').slideToggle(250);
+ return false;
+ });
+
+ // Sets browser table behaviour :
+ $('.browser tr').hover(
+ function() {
+ $(this).addClass('mouseOver');
+ },
+ function() {
+ $(this).removeClass('mouseOver');
+ }
+ );
+
+ // Sets logs table behaviour :
+ $('.logs tr').hover(
+ function() {
+ $(this).addClass('mouseOver');
+ },
+ function() {
+ $(this).removeClass('mouseOver');
+ }
+ );
+
+ // Sets the file-action buttons behaviour :
+ $('td.fileaction a').click(function() {
+ $(this).parent().append($('#file_menu'));
+ $('#file_menu').slideToggle(250);
+ return false;
+ });
+
+ // Sets the select_all checkbox behaviour :
+ $('#select_all').click(function() {
+
+ if($(this).attr('checked'))
+ // Check all
+ $('.browser input:checkbox').attr('checked', true);
+ else
+ // Uncheck all
+ $('.browser input:checkbox').attr('checked', false);
+ });
+});
diff --git a/js/lib_ajax.js b/js/lib_ajax.js
deleted file mode 100644
index 9d282e741b2..00000000000
--- a/js/lib_ajax.js
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-//The callBack object provides an easy way to pass a member of an object as callback parameter and makes sure that the 'this' is always set correctly when called.
-//bindScope provides a much cleaner sollution but we keep this one for compatibility and instead implement is with bindScope
-callBack=function(func,obj){
- var newFunction=func.bindScope(obj);
- callBack.callBacks[this.id]=newFunction;
-}
-
-callBack.callBacks=Array();
-
-callBack.call=function(id){
- callback=callBack.callBacks[id];
- var args=[];
- for (var m = 1; m < arguments.length; m++){
- args.push(arguments[m]);
- }
- if(callback){
- return callback.apply(null,args);
- }
-}
-
-//provide a simple way to add things to the onload
-OC_onload=new Object();
-
-OC_onload.items=new Array();
-OC_onload.itemsPriority=new Array();
-OC_onload.add=function(callback,priority){
- if(priority){
- OC_onload.itemsPriority[OC_onload.items.length]=callback;
- }else{
- OC_onload.items[OC_onload.items.length]=callback;
- }
-}
-OC_onload.run=function(){
- for(index in OC_onload.itemsPriority){
- if(OC_onload.itemsPriority[index].call){
- OC_onload.itemsPriority[index].call();
- }
- }
- for(index in OC_onload.items){
- if(OC_onload.items[index]&&OC_onload.items[index].call){
- OC_onload.items[index].call();
- }
- }
-}
-
-//implement Node.prototype under IE
-if(typeof Node=='undefined'){
- Node=function(){};
- Node.prototype=new Object();
-
- tmpObj=new Object();
- tmpObj.prototype=document.createElement;
- document.createElementNative=document.createElement;
- tmpObj=null;
-
- document.createElement=function(tagName){
-// alert(tagName);
- node=document.createElementNative(tagName);
- var proto=new Node()
- var name;
- for(name in proto){
- node[name]=proto[name];
- }
- return node;
- }
-
- addNodePrototype=function(node){
- if(!node){
- node=document.getElementsByTagName('body');
- node=node.item(0)
- }
- if(node.nodeType==1){
- var proto=new Node()
- for(name in proto){
- node[name]=proto[name];
- }
- if(node.hasChildNodes){
- var childs=node.childNodes;
- for(var i=0;i<childs.length;i++){
- addNodePrototype(childs[i]);
- }
- }
- }
- }
- OC_onload.add(new function(){addNodePrototype(document.documentElement);});
- OC_onload.add(addNodePrototype,true);
-}
-
-function getStyle(x,styleProp)
-{
- if (x.currentStyle){
- var y = x.currentStyle[styleProp];
- }else if (window.getComputedStyle){
- var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
- }
- return y;
-}
-
-Node.prototype.getStyle=function(styleProp){
- return getStyle(this,styleProp)
-}
-
-Node.prototype.clearNode=function(){
- if (this.hasChildNodes() ){
- while(this.childNodes.length>= 1){
- this.removeChild(this.firstChild);
- }
- }
-}
-
-setDebug=function(text){
- node=document.getElementById('debug');
- if(node){
- node.clearNode();
- node.appendChild(document.createTextNode(text));
- }
-}
-
-arrayMerge=function(array1,array2){
- var array=Array();
- for(i in array1){
- array[i]=array1[i];
- }
- for(i in array2){
- array[i]=array2[i];
- }
- return array;
-}
-
-if(!Math.sign){
- Math.sign=function(x){
- return x/Math.abs(x);
- }
-}
-
-if(!Node.prototype.clearNode){
- Node.prototype.clearNode=function(){
- if(this.hasChildNodes()){
- while(this.childNodes.length >=1){
- this.removeChild(this.firstChild);
- }
- }
- }
-}
-
-getTimeString=function(){
- var date=new Date();
- var months=new Array(12);
- months[0]="Jan";
- months[1]="Feb";
- months[2]="Mar";
- months[3]="Apr";
- months[4]="May";
- months[5]="Jun";
- months[6]="Jul";
- months[7]="Aug";
- months[8]="Sep";
- months[9]="Oct";
- months[10]="Nov";
- months[11]="Dec";
- return date.getDate()+' '+months[date.getMonth()]+' '+date.getFullYear()+' '+date.getHours()+':'+date.getMinutes();
-}
-
-loadScript=function(url){//dynamicly load javascript files
- url=WEBROOT+'/'+url;
- var script=document.createElement('script');
- script.setAttribute('type','text/javascript');
- script.setAttribute('src',url);
- body=document.getElementsByTagName('body').item(0);
- body.appendChild(script);
-}
-
-Function.prototype.bindScope=function(obj){
- var o=obj;
- var fn=this;
- return function(){
- return fn.apply(o,arguments);
- }
-}
-
-Function.prototype.bind=function(){
- var args = [];
- var fn=this;
- for (var n = 0; n < arguments.length; n++){
- args.push(arguments[n]);
- }
- return function (){
- var myargs = [];
- for (var m = 0; m < arguments.length; m++){
- myargs.push(arguments[m]);
- }
- return fn.apply(this, args.concat(myargs));
- };
-}
-
-Array.prototype.foreach=function(func,that){
- if (!func) return;
- that=that||this;
- var returns=[];
- for(var i=0;i<this.length;i++){
- returns.push(func.call(that,this[i]));
- }
- return returns;
-}
-
-Array.prototype.where = function(func,that) {
- var found = [];
- that=that||this;
- for(var i = 0, l = this.length; i < l; ++i) {
- var item = this[i];
- if(func.call(that,item)){
- found.push(item);
- }
- }
- return found;
-}; \ No newline at end of file
diff --git a/js/lib_api.js b/js/lib_api.js
deleted file mode 100644
index d1779291cab..00000000000
--- a/js/lib_api.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-OC_API=new Object();
-
-OC_API.run=function(action,params,callback,callbackparams){
- var xmlloader=new OCXMLLoader();
- xmlloader.setCallBack(callback);
- xmlloader.method="POST";
- var paramString='action='+action;
- for(name in params){
- paramString+='&'+name+'='+encodeURIComponent(params[name]);
- }
- xmlloader.arg=callbackparams;
- xmlloader.load('files/api.php',paramString);
-} \ No newline at end of file
diff --git a/js/lib_drag.js b/js/lib_drag.js
deleted file mode 100644
index 600b5b3882b..00000000000
--- a/js/lib_drag.js
+++ /dev/null
@@ -1,348 +0,0 @@
-/**
-* Javascript Drag&Drop - Modified for ownCloud
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-position=function(x,y){
- if(x)this.x=x;
- if(y)this.y=y;
- return this;
-}
-position.prototype={
- x:0,
- y:0,
- add:function(pos2){
- return new position(this.x+pos2.x,this.y+pos2.y);
- },
- substract:function(pos2){
- return new position(this.x-pos2.x,this.y-pos2.y);
- },toString:function(){
- return 'x:'+this.x+',y:'+this.y;
- },inside:function(pos2){
- return Math.abs(this.x)<Math.abs(pos2.x) && Math.abs(this.y)<Math.abs(pos2.y) && Math.sign(this.x)==Math.sign(pos2.x) && Math.sign(this.y)==Math.sign(pos2.y);
- },outside:function(pos2){
- return !this.inside(pos2);
- }
-}
-
-Node.prototype.drag=new Object
-/**
- * is the node dragable
- */
-Node.prototype.drag.dragable=false;
-/**
- * Are we currently dragging the node
- */
-Node.prototype.drag.active=false;
-/**
- * Create a clone to drag around
- */
-Node.prototype.drag.clone=true;
-/**
- * The node we (visually drag around)
- */
-Node.prototype.drag.node=false;
-/**
- * can we drop nodes on this
- */
-Node.prototype.drag.isDropTarget=false;
-/**
- * our current drop target
- */
-Node.prototype.drag.dropTarget=null;
-/**
- * can we drop this node now
- */
-Node.prototype.drag.dropable=false;
-/**
- * function called when we are being dropped on a node
- * @return bool
- */
-Node.prototype.drag.onDrop=function(node){};
-/**
- * function called when an node is dropped on us
- * @param Node node
- * @return bool
- */
-Node.prototype.drag.onDropOn=function(node){};
-/**
- * where did we start the drag
- */
-Node.prototype.drag.startPosition=new position();
-/**
- * where are we now
- */
-Node.prototype.drag.position=new position();
-/**
- * how big are we
- */
-Node.prototype.drag.size=new position();
-/**
- * where is the mouse
- */
-Node.prototype.drag.mousePosition=new position();
-/**
- * where is the mouse relative to our node
- */
-Node.prototype.drag.mouseOffset=new position();
-
-document.drag=new Object();
-/**
- * is there currently something dragged
- */
-document.drag.active=false;
-/**
- * what is currently being dragged
- */
-document.drag.node=null;
-document.drag.dropTargets=Array();
-/**
- * start the dragging. (onmousedown)
- * @param Event event
- */
-Node.prototype.drag.start=function(event){
- if(!event)var event=window.event;
- if(!this.drag.active && this.drag.dragable){
- document.drag.active=true;
- document.drag.node=this;
- this.drag.active=true;
- this.drag.position=this.getPosition();
- this.drag.startPosition=this.getPosition();
- this.drag.mousePosition=getMousePosition(event);
- this.drag.mouseOffset=this.drag.mousePosition.substract(this.drag.position);
- }
-}
-
-/**
- * update the dragging. (onmousemove)
- * @param Event event
- */
-Node.prototype.drag.update=function(event){
- if(!event)var event=window.event;
- if(this.drag.active && this.drag.dragable){
- this.drag.mousePosition=getMousePosition(event);
- this.drag.position=this.drag.mousePosition.substract(this.drag.mouseOffset);
- if(this.drag.clone && !this.drag.node){
- this.drag.node=this.cloneNode(true);
- this.drag.node.className='dragClone';
- if(this.drag.node.hasAttribute('id')){
- this.drag.node.setAttribute('id',this.drag.node.getAttribute('id')+'_dragClone');
- }
- document.getElementsByTagName('body').item(0).appendChild(this.drag.node);
- }else if(!this.drag.node){
- this.drag.node=this;
- this.drag.node.style.position='absolute';
- }
- this.drag.node.style.left=this.drag.position.x+'px';
- this.drag.node.style.top=this.drag.position.y+'px';
- }
- return true;
-}
-
-/**
- * stop the dragging/drop. (onmouseup)
- * @param Event event
- * @return bool
- */
-Node.prototype.drag.stop=function(event){
- if(!event)var event=window.event;
- if(this.drag.active && this.drag.dragable){
- this.drag.active=false;
- this.drag.mousePosition=getMousePosition(event);
- this.drag.position=this.drag.mousePosition.substract(this.drag.mouseOffset);
- if(this.drag.node){
- this.drag.node.style.left=this.drag.position.x;
- this.drag.node.style.top=this.drag.position.y;
- }
- var target;
- this.drag.dropTarget=null;
- this.drag.dropable=false;
- for(var i=0;i<document.drag.dropTargets.length;i++){
- target=document.drag.dropTargets[i];
- target.drag.checkDropTarget.call(target,event);
- }
- if(this.drag.dropable && this.drag.dropTarget){
- if(this.drag.onDrop){
- this.drag.onDrop.call(this,event,this.drag.dropTarget);
- this.triggerEvent.call(this,'ondrop',event,this.drag.dropTarget);
- }
- if(this.drag.dropTarget.drag.onDropOn){
- this.drag.dropTarget.drag.onDropOn.call(this.drag.dropTarget,event,this);
- this.drag.dropTarget.triggerEvent.call(this.drag.dropTarget,'ondropon',event,this);
- }
- }
- if(this.drag.clone && this.drag.node){
- this.drag.node.parentNode.removeChild(this.drag.node);
- this.drag.node=null;
- }
- document.drag.active=false;
- document.drag.node=null;
- }
-}
-
-/**
- * is there currently something being dragged over us
- * @param Event event
- */
-Node.prototype.drag.checkDropTarget=function(event){
- if(this.drag.isDropTarget & document.drag.active){
- mousePos=getMousePosition(event);
- this.drag.position=this.getPosition();
- this.drag.size=this.getSize(true);
- var offSet=mousePos.substract(this.drag.position);
- if(offSet.inside(this.drag.size)){
- document.drag.node.drag.dropTarget=this;
- document.drag.node.drag.dropable=true;
- setDebug('ontarget');
- }
- }
-}
-
-/**
- * called when the mouse is leaving a drop target
- * @param Event event
- */
-Node.prototype.drag.leaveDropTarget=function(event){
- if(this.drag.isDropTarget & document.drag.active){
- document.drag.node.drag.dropTarget=null;
- document.drag.node.drag.dropable=false;
- setDebug('offtarget');
- }
-}
-/**
- * initiate the node as drop target
- */
-Node.prototype.drag.initDropTarget=function(){
- this.drag.isDropTarget=true;
- document.drag.dropTargets.push(this);
-}
-Node.prototype.makeDropTarget=function(){
- this.drag.initDropTarget.call(this);
-}
-
-/**
- * initiate the node as draggable
- */
-Node.prototype.drag.init=function(){
- this.drag.dragable=true;
- this.drag.size.x=this.getStyle('width');
- this.drag.size.y=this.getStyle('height');
- this.addEvent('onmousedown',new callBack(this.drag.start,this));
-}
-Node.prototype.makeDraggable=function(){
- this.drag.init.call(this);
-}
-
-/**
- * update the dragging. (onmousemove)
- * @param Event event
- */
-document.drag.update=function(event){
- var target;
- if(document.drag.active && document.drag.node){
- document.drag.node.drag.update.call(document.drag.node,event);
- }
-}
-
-/**
- * update the dragging. (onmousemove)
- * @param Event event
- */
-document.drag.stop=function(event){
- if(document.drag.active && document.drag.node){
- document.drag.node.drag.stop.call(document.drag.node,event);
- }
-}
-document.events.add(document,'onmousemove',document.drag.update);
-document.events.add(document,'onmouseup',document.drag.stop);
-
-function getMousePosition(event){
- var pos=new position();
- if(!event)var event = window.event;
- if(event.pageX||event.pageY){
- pos.x=event.pageX;
- pos.y=event.pageY;
- }
- else if(event.clientX||event.clientY){
- pos.x=event.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
- pos.y=event.clientY+document.body.scrollTop+document.documentElement.scrollTop;
- }
- return pos;
-}
-
-/**
- * get our position
- **/
-Node.prototype.getPosition=function(){
- var pos=new position();
- element=this;
- do{
- pos.y+=element.offsetTop;
- pos.x+=element.offsetLeft;
- }while(element=element.offsetParent);
- return pos;
-}
-
-/**
- * get our size
-* @param bool full (also include padding and border)
- **/
-Node.prototype.getSize=function(full){
- var pos=new position();
- pos.y= parseInt(this.getStyle('height'));
- pos.x= parseInt(this.getStyle('width'));
- if(full){
- var extraY=['border-size','padding-top','padding-bottom','border-size'];
- var extraX=['border-size','padding-left','padding-right','border-size'];
- var tmp;
- for(var i=0;i<extraY.length;i++){
- tmp=parseInt(this.getStyle(extraY[i]));
- if(tmp){
- pos.y+=tmp;
- }
- }
- for(var i=0;i<extraX.length;i++){
- tmp=parseInt(this.getStyle(extraX[i]));
- if(tmp){
- pos.x+=tmp;
- }
- }
- }
- return pos;
-}
-
-function mouseTest(event){
- var pos=getMousePosition(event);
- setDebug(pos.toString());
-}
-
-function testDrag(){
- var node=document.getElementById('debug');
-// document.addEvent('onclick',getOffSet,[node]);
- node.makeDropTarget();
-}
-
-function getOffSet(node,event){
- var nodePos=node.getPosition();
- var mousePos=getMousePosition(event);
- return mousePos.substract(nodePos);
-}
-
-
-// OC_onload.add(testDrag); \ No newline at end of file
diff --git a/js/lib_event.js b/js/lib_event.js
deleted file mode 100644
index fe48f6dbc8b..00000000000
--- a/js/lib_event.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*event handling
-usage: document.events.add(node,type,function,arguments);
- or: node.addEvent(type,function,arguments);
-*/
-
-document.events=new Object;
-document.events.functions=Array();
-document.events.args=Array();
-
-document.events.add=function(element,type,func,args){
- if(args){
- if(!args.push){
- args=[args];
- }
- }
- args=args||[];
- if (type && element){
- args.foreach(function(argument){
- func.bind(argument);
- })
- if(element.addEventListener){
- if(type.substr(0,2)=='on'){
- type=type.substr(2);
- }
- element.addEventListener(type,func,false);
- }else if(element.attachEvent){
- element.attachEvent(type,func);
- }
- return func;
- }
-}
-document.events.remove=function(element,type,func){
- if(element.removeEventListener){
- if(type.substr(0,2)=='on'){
- type=type.substr(2);
- }
- element.removeEventListener(type,func,false);
- }else if(element.detachEvent){
- element.detachEvent(type,func)
- }
-}
-
-Node.prototype.addEvent=function(type,func,args){
- return document.events.add(this,type,func,args);
-}
-Node.prototype.removeEvent=function(type,func){
- document.events.remove(this,type,func);
-} \ No newline at end of file
diff --git a/js/lib_files.js b/js/lib_files.js
deleted file mode 100644
index a1cf1b6c027..00000000000
--- a/js/lib_files.js
+++ /dev/null
@@ -1,414 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-OC_FILES=new Object();
-
-OC_FILES.cache=new Object();
-
-OC_FILES.cache.files=Array();
-OC_FILES.cache.incomplete=Array();
-OC_FILES.cache.actions=new Object();
-
-OC_FILES.cache.actions.move=Array();
-OC_FILES.cache.actions.rename=Array();
-OC_FILES.cache.actions['new']=Array();
-OC_FILES.cache.actions['delete']=Array();
-OC_FILES.cache.actions.upload=Array();
-
-OC_FILES.cache.refresh=function(){
- OC_FILES.getdirectorycontent(OC_FILES.dir,false,true);
-}
-
-OC_FILES.xmlloader=new OCXMLLoader();
-
-OC_FILES.getdirectorycontent_parse=function(req){
- var files=new Array();
- var json=eval('('+req.responseText+')');
- OC_FILES.cache.files=Array();
- if(json){
- for(var name in json){
- if(name!='__max_upload'){
- var file=new Array();
- var attributes=Array('size','name','type','directory','date','mime','writable','readable');
- for(var i in attributes){
- var attributeName=attributes[i];
- file[attributeName]=json[name][attributeName];
- }
- files[file.name]=file;
- }
- }
- OC_FILES.cache.files=files;
- if(OC_FILES.cache.incomplete[OC_FILES.dir]){
- files=arrayMerge(files,OC_FILES.cache.incomplete[OC_FILES.dir]);
- }
- files['max_upload']=json['__max_upload'];
- if(OC_FILES.getdirectorycontent_callback){
- OC_FILES.getdirectorycontent_callback(files);
- }
- }
-}
-
-OC_FILES.getdirectorycontent=function(dir,callback,refresh){
- if(refresh || OC_FILES.dir!=dir){
- OC_FILES.dir=dir;
- if(callback){
- OC_FILES.getdirectorycontent_callback=callback;
- }
- OC_FILES.xmlloader.setCallBack(OC_FILES.getdirectorycontent_parse);
-// OC_FILES.xmlloader.load('files/get_files.php?dir='+encodeURIComponent(dir));
- OC_FILES.xmlloader.load('files/api.php?action=getfiles&dir='+encodeURIComponent(dir));
- }else{
- var files=OC_FILES.cache.files
- if(OC_FILES.cache.incomplete[OC_FILES.dir]){
- files=arrayMerge(files,OC_FILES.cache.incomplete[OC_FILES.dir]);
- }
- callback(files);
- }
-}
-
-OC_FILES.dir='';
-
-OC_FILES.get=function(dir,file){
- window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
-}
-
-OC_FILES.upload=function(iframeId){
- var dir=OC_FILES.dir;
- var file=new Object;
- var fileSelector=document.getElementById('fileSelector');
- var max_upload=document.getElementById('max_upload').value;
- var name=false;
- if(fileSelector.files && fileSelector.files[0].fileName){
- name=fileSelector.files[0].fileName;
- }
- if(fileSelector.files && fileSelector.files[0].fileSize){
- var size=fileSelector.files[0].fileSize;
- if(size>max_upload){
- new OCNotification('File too large',10000)
- return false;
- }
- }
- var mime='';
- if(fileSelector.files && fileSelector.files[0].type){
- var mime=fileSelector.files[0].type;
- }
- file.dir=OC_FILES.dir;
- file.name=name;
- file.type='file';
- file.size=size;
- file.iframeId=iframeId;
- if(!OC_FILES.cache.incomplete[dir]){
- OC_FILES.cache.incomplete[dir]=Array();
- }
- OC_FILES.cache.incomplete[dir][name]=Array();
- OC_FILES.cache.incomplete[dir][name]['name']=name;
- OC_FILES.cache.incomplete[dir][name]['type']='incomplete';
- OC_FILES.cache.incomplete[dir][name]['size']=size;
- OC_FILES.cache.incomplete[dir][name]['mime']=mime;
- OC_FILES.uploadIFrames[iframeId].file=file;
- OC_FILES.uploadIFrames[iframeId].addEvent('onload',OC_FILES.upload_callback.bindScope(OC_FILES.uploadIFrames[iframeId]));
- OC_FILES.browser.files.add(name,'incomplete',size,null,mime);
- OC_FILES.uploadForm.submit();
- if(OC_FILES.uploadForm.parentElement){
- OC_FILES.uploadForm.className='hidden';
- OC_FILES.uploadForm.parentNode.removeChild(OC_FILES.uploadForm);
- var body=document.getElementsByTagName('body').item(0);
- body.appendChild(OC_FILES.uploadForm);
- OC_FILES.uploadIFrames[iframeId].uploadForm=OC_FILES.uploadForm;
- OC_FILES.browser.showuploader(OC_FILES.dir,OC_FILES.uploadIFrames[iframeId].uploadParent,OC_FILES.maxUpload)
- }
-}
-
-OC_FILES.upload_callback=function(iframeId){
- var file=this.file;
- if(OC_FILES.cache.incomplete[file.dir][file.name]){
- OC_FILES.browser.files.remove(file.name);
- OC_FILES.cache.files[file.name]=OC_FILES.cache.incomplete[file.dir][file.name]
- delete OC_FILES.cache.incomplete[file.dir][file.name];
- OC_FILES.cache.files[file.name]['type']=file.type;
- OC_FILES.cache.files[file.name]['writable']=true;
- OC_FILES.cache.files[file.name]['readable']=true;
- this.uploadForm.parentNode.removeChild(this.uploadForm);
- this.parentNode.removeChild(this);
- OC_FILES.uploadIFrames[file.iframeId]=null;
- if(file.name){
- OC_FILES.browser.show(file.dir);
- }else{
- OC_FILES.browser.show(file.dir,true);//if the data from the file isn't correct, force a reload of the cache
- }
- }else{
- OC_FILES.browser.show(OC_FILES.dir);
- }
-}
-
-OC_FILES.rename=function(dir,file,event){
- if(event && event.preventDefault){
- event.preventDefault();
- }
- var item=document.getElementById(file+'_newname');
- var newname=item.value;
- if(newname==''){
- return false;
- }else if(file==newname){
- OC_FILES.browser.show(OC_FILES.dir);
- return false;
- }
- arg=new Object;
- arg.oldname=file;
- arg.newname=newname;
- arg.dir=dir;
- arg.type=OC_FILES.cache.files[file]['type'];
- OC_API.run('rename',{dir:dir,file:file,newname:newname},OC_FILES.rename_callback,arg)
- if(!OC_FILES.cache.incomplete[dir]){
- OC_FILES.cache.incomplete[dir]=Array();
- }
- OC_FILES.cache.files[file]['type']='incomplete';
- OC_FILES.cache.incomplete[dir][newname]=OC_FILES.cache.files[file];
- OC_FILES.cache.incomplete[dir][newname]['name']=newname;
- OC_FILES.browser.files.remove(file);
- OC_FILES.browser.files.add(newname,'incomplete');
- return false;
-}
-
-
-OC_FILES.rename_callback=function(req,file){
- delete OC_FILES.cache.files[file.oldname]
- OC_FILES.cache.files[file.newname]=OC_FILES.cache.incomplete[file.dir][file.newname];
- delete OC_FILES.cache.incomplete[file.dir][file.newname];
- OC_FILES.browser.files.remove(file.newname);
- OC_FILES.cache.files[file.newname]['type']=file.type;
- OC_FILES.browser.show(OC_FILES.dir);
-}
-
-OC_FILES.remove=function(dir,file,force){
- remove=force||confirm('Delete file \''+file+'\'?');
- if(remove){
- OC_API.run('delete',{dir:dir,file:file},OC_FILES.remove_callback,file)
- OC_FILES.browser.files.remove(file);
- delete OC_FILES.cache.files[file];
- }
-}
-
-OC_FILES.remove_callback=function(req,name){
-// OC_FILES.browser.files.remove(name);
-// OC_FILES.browser.show(OC_FILES.dir);
-}
-
-OC_FILES.getSelected=function(){
- var nodes=document.getElementsByName('fileSelector');
- var files=Array();
- for(var index=0;index<nodes.length;index++){
- if(nodes[index].checked){
- files[files.length]=nodes[index].value;
- }
- }
- return files;
-}
-
-OC_FILES.newFile=function(type,name,dir){
- arg=new Object;
- arg.name=name;
- arg.dir=dir;
- if(OC_FILES.cache.files[name]){//check if the file already exists
- alert(((type=='dir')?'folder ':'file ')+name+' already exists.');
- return;
- }
- arg.type=type;
- OC_API.run('new',{dir:dir,name:name,type:type},OC_FILES.new_callback,arg)
- if(!OC_FILES.cache.incomplete[dir]){
- OC_FILES.cache.incomplete[dir]=Array();
- }
- OC_FILES.cache.incomplete[dir][name]=Array();
- OC_FILES.cache.incomplete[dir][name]['name']=name;
- OC_FILES.cache.incomplete[dir][name]['type']='incomplete';
- OC_FILES.cache.incomplete[dir][name]['size']=0;
- OC_FILES.browser.files.add(name,'incomplete');
-}
-
-OC_FILES.new_callback=function(req,file){
- OC_FILES.cache.files[file.name]=OC_FILES.cache.incomplete[file.dir][file.name];
- delete OC_FILES.cache.incomplete[file.dir][file.name];
- OC_FILES.cache.files[file.name]['type']=file.type;
- OC_FILES.browser.files.remove(file.name);
-// OC_FILES.browser.files.add(name);
- OC_FILES.browser.show(OC_FILES.dir,true);
-}
-
-OC_FILES.move=function(source,target,sourceDir,targetDir){
- if(sourceDir!=targetDir || source!=target){
- if(!OC_FILES.cache.incomplete[sourceDir]){
- OC_FILES.cache.incomplete[sourceDir]=Array();
- }
- if(!OC_FILES.cache.incomplete[targetDir]){
- OC_FILES.cache.incomplete[targetDir]=Array();
- }
- if(!OC_FILES.cache.incomplete[targetDir+'/'+target]){
- OC_FILES.cache.incomplete[targetDir+'/'+target]=Array();
- }
- arg=new Object;
- arg.source=source;
- arg.target=target;
- arg.sourceDir=sourceDir;
- arg.targetDir=targetDir;
- arg.type=OC_FILES.cache.files[source]['type'];
- OC_FILES.cache.files[source]['type']='incomplete';
- OC_FILES.cache.incomplete[targetDir+'/'+target][source]=OC_FILES.cache.files[source];
- OC_API.run('move',{sourcedir:sourceDir,source:source,targetdir:targetDir,target:target},OC_FILES.move_callback,arg);
- }
-}
-
-OC_FILES.move_callback=function(req,file){
- OC_FILES.cache.incomplete[file.targetDir+'/'+file.target][file.source]['type']=file.type;
- delete OC_FILES.cache.files[file.source];
- OC_FILES.browser.show(OC_FILES.dir);
-}
-
-OC_FILES.selectAll=function(){
- var value=document.getElementById('select_all').checked;
- var nodes=document.getElementsByName('fileSelector');
- for(var index=0;index<nodes.length;index++){
- if(nodes[index].value){
- nodes[index].checked=value;
- }
- }
-}
-
-OC_FILES.action_selected=function(){
- var dropdown=action=document.getElementById('selected_action');
- var action=dropdown.options[dropdown.selectedIndex].value;
- if(OC_FILES.actions_selected[action] && OC_FILES.actions_selected[action].call){
- OC_FILES.actions_selected[action].call(OC_FILES);
- }
-}
-
-OC_FILES.actions_selected=new Object();
-
-OC_FILES.actions_selected.download=function(){
- files=OC_FILES.getSelected();
- if(files.length==0){
- return false;
- }else if(files.length>1){
- files=files.join(';');
- }else{
- files=files[0];
- }
- OC_FILES.get(this.dir,files);
-}
-
-OC_FILES.actions_selected['delete']=function(){
- files=OC_FILES.getSelected();
- remove=confirm('Delete files \''+files.join('\', \'')+'\'?');
- if(remove){
- for(index in files){
- OC_FILES.remove(OC_FILES.dir,files[index],true);
- }
- }
-}
-
-OC_FILES.files=Array();
-
-OC_FILES.file=function(dir,file,type,mime){
- if(file){
- this.type=type;
- this.file=file;
- this.dir=dir;
- this.mime=mime;
- if(mime){
- var mimeParts=mime.split('/');
- this.mime1=mimeParts[0];
- this.mime2=mimeParts[1];
- }
- this.actions=new Object();
- if(file.lastIndexOf('.')){
- this.extention=file.substr(file.lastIndexOf('.')+1);
- }else{
- this.extention;
- }
- for(index in OC_FILES.fileActions.all){
- if(OC_FILES.fileActions.all[index].call){
- this.actions[index]=OC_FILES.fileActions.all[index];
- }
- }
- if(OC_FILES.fileActions[this.type]){
- for(index in OC_FILES.fileActions[this.type]){
- if(OC_FILES.fileActions[this.type][index].call){
- this.actions[index]=OC_FILES.fileActions[this.type][index];
- }
- }
- }
- if(OC_FILES.fileActions[this.mime1]){
- for(index in OC_FILES.fileActions[this.mime1]){
- if(OC_FILES.fileActions[this.mime1][index].call){
- this.actions[index]=OC_FILES.fileActions[this.mime1][index];
- }
- }
- }
- if(OC_FILES.fileActions[this.mime]){
- for(index in OC_FILES.fileActions[this.mime]){
- if(OC_FILES.fileActions[this.mime][index].call){
- this.actions[index]=OC_FILES.fileActions[this.mime][index];
- }
- }
- }
- }
-}
-
-OC_FILES.file.prototype.showactions=function(){
- OC_FILES.browser.showactions(this.file);
-}
-
-OC_FILES.file.prototype.hideactions=function(){
- OC_FILES.browser.showactions(this.file,true);
-}
-
-OC_FILES.fileActions=new Object();
-
-OC_FILES.fileActions.all=new Object();
-
-OC_FILES.fileActions.all.remove=function(){
- OC_FILES.remove(this.dir,this.file);
-}
-OC_FILES.fileActions.all.rename=function(){
- OC_FILES.browser.show_rename(this.dir,this.file);
-}
-OC_FILES.fileActions.all.download=function(){
- OC_FILES.get(this.dir,this.file);
-}
-OC_FILES.fileActions.all['default']=OC_FILES.fileActions.all.download;
-
-OC_FILES.fileActions.dir=new Object()
-
-OC_FILES.fileActions.dir.open=function(){
- OC_FILES.browser.show(this.dir+'/'+this.file);
-}
-OC_FILES.fileActions.dir['default']=OC_FILES.fileActions.dir.open;
-
-OC_FILES.fileActions.dir.dropOn=function(file){
- OC_FILES.move(file.file,file.file,file.dir,this.dir+'/'+this.file);
-}
-
-OC_FILES.fileActions.image=new Object()
-
-OC_FILES.fileActions.image.show=function(){
- OC_FILES.browser.showImage(this.dir,this.file);
-}
-
-OC_FILES.fileActions.image['default']=OC_FILES.fileActions.image.show;
diff --git a/js/lib_notification.js b/js/lib_notification.js
deleted file mode 100644
index 7c19a04b58e..00000000000
--- a/js/lib_notification.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * StarLight - A client side webpage framework
- *
- * @package StarLight
- * @author Icewind <icewind (at) derideal (dot) com>
- * @copyright 2009
- * @license http://www.gnu.org/licenses/gpl.html GNU Public License
- * @url http://blacklight.metalwarp.com/starlight
- * @version 0.1
- */
-
-OCNotification=function(text,time){
- this.text=text;
- this.time=(time)?time:0;
- this.notify();
-}
-
-OCNotification.prototype={
- notify:function(){
- this.holder=document.getElementById('OCNotificationHolder');
- if (!this.holder){
- this.holder=document.createElement('div');
- this.holder.className='OCNotificationHolder';
- this.holder.setAttribute('class','OCNotificationHolder');
- this.holder.setAttribute('id','OCNotificationHolder');
- document.getElementsByTagName('body').item(0).appendChild(this.holder);
- }
- this.notification=document.createElement('div');
- this.notification.className='OCNotification';
- this.notification.setAttribute('class','OCNotification');
- if (document.documentElement.innerHTML){
- this.notification.innerHTML=this.text;
- }else{
- var text=document.createTextNode(this.text);
- this.notification.appendChild(text);
- }
- this.holder.insertBefore(this.notification,this.holder.firstChild);
- this.notification.addEvent('onclick',new callBack(this.removeNotification,this));
- if (this.time>0){
- this.timer = new OCTimer(this.removeNotification, this.time,false,this);
- }
- },
- removeNotification:function(){
- if(this.notification){
- this.holder.removeChild(this.notification);
- }
- }
-} \ No newline at end of file
diff --git a/js/lib_timer.js b/js/lib_timer.js
deleted file mode 100644
index aadea90ba27..00000000000
--- a/js/lib_timer.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * StarLight - A client side webpage framework
- *
- * @package StarLight
- * @author Icewind <icewind (at) derideal (dot) com>
- * @copyright 2009
- * @license http://www.gnu.org/licenses/gpl.html GNU Public License
- * @url http://blacklight.metalwarp.com/starlight
- * @version 0.1
- */
-OCTimer=function(callback,time,repeat,object){
- this.object=(object)?object:false;
- this.repeat=(!(repeat===undefined))?repeat:true;
- this.callback=callback;
- this.time=time;
- this.timer=0;
- this.number=OCTimer.count;
- OCTimer.count++;
- OCTimer.timers[this.number]=this;
- if(this.time){
- this.start();
- }
-}
-
-OCTimer.count=0;
-OCTimer.timers=Array();
-
-OCTimer.prototype={
- start:function(){
- this.running=true;
- eval('var func=function(){OCTimer.timers['+this.number+'].run();};');
- if(this.repeat){
- this.timer = setInterval(func, this.time);
- }else{
- this.timer = setTimeout(func, this.time);
- }
- },
- run:function(){
- if (!this.repeat){
- this.stop();
- }
- if (this.object){
- this.callback.call(this.object);
- }else{
- this.callback.call();
- }
- },
- stop:function(){
- clearInterval(this.timer);
- this.running=false;
- }
-} \ No newline at end of file
diff --git a/js/lib_xmlloader.js b/js/lib_xmlloader.js
deleted file mode 100644
index 819dfb6b024..00000000000
--- a/js/lib_xmlloader.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
-* ownCloud - ajax frontend
-*
-* @author Robin Appelman
-* @copyright 2010 Robin Appelman icewind1991@gmail.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-var READY_STATE_UNINITIALIZED=0;
-var READY_STATE_LOADING=1;
-var READY_STATE_LOADED=2;
-var READY_STATE_INTERACTIVE=3;
-var READY_STATE_COMPLETE=4;
-
-/**
-* Class for loaded browser independant xml loading
-*/
-OCXMLLoader=function(){
- this.errorCallBack=this.defaultError;
-}
-
-OCXMLLoader.prototype={
- contentType:'',
- method:'GET',
- request:'',
- callBack:null,
- async:true,
- arg:null,
-
- /**
- * Loads an XML document
- * @param string url
- * @param string request
- * @none
- */
- load:function(url,request){
- request=(request)?request:"";
- method=this.method;
- contentType=(!this.contentType && method=="POST")?"application/x-www-form-urlencoded":this.contentType;
- if(window.XMLHttpRequest){
- req=new XMLHttpRequest();
- }else if(window.XDomainRequest){
- req=new XDomainRequest();
- }else if(window.ActiveXObject){
- req=new ActiveXObject('Microsoft.XMLHTTP')
- }
- if (req){
- this.req=req;
- try{
-// var loader=this;
-// req.onreadystatechange=function(){
-// loader.onReadyState.call(loader,req)
-// }
- var callback=new callBack(this.onReadyState,this);
- req.onreadystatechange=function(){eval('callBack.call('+callback.id+')');};
- req.open(method,url,this.async);
- if (contentType){
- req.setRequestHeader("Content-Type",contentType);
- }
- if(method=="POST"){
- req.setRequestHeader("Content-length", request.length);
- req.setRequestHeader("Connection", "close");
- }
- req.send(request);
- }catch (err){
- this.errorCallBack(req);
- }
- }
- },
- onReadyState:function(){
- var ready=this.req.readyState;
- if (ready==READY_STATE_COMPLETE){
- var HttpStatus=req.status;
- if (HttpStatus==200 || HttpStatus==0){
- //alert("response: "+this.req.responseText);
- this.callBack(this.req,this.arg);
- }else{
- this.errorCallBack(this.req,this.arg);
- }
- }
- },
- defaultError:function(req){
- alert("Error fetching data!"
- +"\n\n<br/><br/>ReadyState: "+req.readyState
- +"\n<br/>Status: "+req.status
- +"\n<br/>Headers: "+req.getAllResponseHeaders()
- +"\n<br/>File: "+req.url
- +"\n<br/>Response: "+req.responseText);
- },
- /**
- * Sets the request method
- * @param string method
- * @none
- */
- setMethod:function(method){
- this.method=method;
- },
- /**
- * Sets the content type
- * @param string type
- * @none
- */
- setType:function(type){
- this.type=type;
- },
- /**
- * Sets the callback function
- * @param function callBack
- * @none
- */
- setCallBack:function(callBack){
- this.callBack=callBack;
- },
- /**
- * Sets the error callback function
- * @param function errorCallBack
- * @none
- */
- setErrorCallBack:function(errorCallBack){
- this.errorCallBack=errorCallBack;
- }
-}
-
-testClass=function(){
-}
-
-testClass.prototype={
- testFunc:function(){
- this.test="test";
- test=new OCXMLLoader(this);
- test.setCallBack(this.callBack);
- test.load(parseUri('%root%/data/sites/index.xml'));
- },
- callBack:function(req){
- alert(this.test);
- alert(req.responseText);
- }
-}
-test=new testClass()
-test.testFunc
-// mainLoadStack.append(test.testFunc,test);
diff --git a/inc/HTTP/WebDAV/Server/Filesystem.php b/lib/HTTP/WebDAV/Server/Filesystem.php
index 30c19fd29a6..0615c600e07 100644
--- a/inc/HTTP/WebDAV/Server/Filesystem.php
+++ b/lib/HTTP/WebDAV/Server/Filesystem.php
@@ -32,11 +32,11 @@
| POSSIBILITY OF SUCH DAMAGE. |
+----------------------------------------------------------------------+
--- modified for ownCloud ---
-*/
- require_once("../inc/lib_base.php");
+*/
+ require_once("lib/base.php");
oc_require_once("HTTP/WebDAV/Server.php");
oc_require_once("System.php");
-
+
/**
* Filesystem access using WebDAV
*
@@ -44,7 +44,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @version @package-version@
*/
- class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
+ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
{
/**
* Root directory for WebDAV access
@@ -60,9 +60,9 @@
* Serve a webdav request
*
* @access public
- * @param string
+ * @param string
*/
- function ServeRequest($base = false)
+ function ServeRequest($base = false)
{
// special treatment for litmus compliance test
// reply on its identifier header
@@ -78,7 +78,7 @@
} else if (!$this->base) {
$this->base = $this->_SERVER['DOCUMENT_ROOT'];
}
-
+
// let the base class do all the work
parent::ServeRequest();
}
@@ -92,7 +92,7 @@
* @param string Password
* @return bool true on successful authentication
*/
- function check_auth($type, $user, $pass)
+ function check_auth($type, $user, $pass)
{
return true;
}
@@ -105,11 +105,11 @@
* @param array return array for file properties
* @return bool true on success
*/
- function PROPFIND(&$options, &$files)
+ function PROPFIND(&$options, &$files)
{
// get absolute fs path to requested resource
$fspath = $options["path"];
-
+
// sanity check
if (!OC_FILESYSTEM::file_exists($fspath)) {
return false;
@@ -120,13 +120,13 @@
// store information for the requested path itself
$files["files"][] = $this->fileinfo($options["path"]);
// information for contained resources requested?
- if (!empty($options["depth"]) && OC_FILESYSTEM::is_dir($fspath) && OC_FILESYSTEM::is_readable($fspath)) {
+ if (!empty($options["depth"]) && OC_FILESYSTEM::is_dir($fspath) && OC_FILESYSTEM::is_readable($fspath)) {
// make sure path ends with '/'
$options["path"] = $this->_slashify($options["path"]);
// try to open directory
$handle = @OC_FILESYSTEM::opendir($fspath);
-
+
if ($handle) {
// ok, now get all its contents
while ($filename = readdir($handle)) {
@@ -140,15 +140,15 @@
// ok, all done
return true;
- }
-
+ }
+
/**
* Get properties for a single file/resource
*
* @param string resource path
* @return array resource properties
*/
- function fileinfo($path)
+ function fileinfo($path)
{
global $CONFIG_DBTABLEPREFIX;
@@ -158,11 +158,11 @@
// create result array
$info = array();
// TODO remove slash append code when base clase is able to do it itself
- $info["path"] = OC_FILESYSTEM::is_dir($fspath) ? $this->_slashify($path) : $path;
- $info["props"] = array();
+ $info["path"] = OC_FILESYSTEM::is_dir($fspath) ? $this->_slashify($path) : $path;
+ $info["props"] = array();
// no special beautified displayname here ...
$info["props"][] = $this->mkprop("displayname", strtoupper($path));
-
+
// creation and modification time
$info["props"][] = $this->mkprop("creationdate", OC_FILESYSTEM::filectime($fspath));
$info["props"][] = $this->mkprop("getlastmodified", OC_FILESYSTEM::filemtime($fspath));
@@ -173,7 +173,7 @@
if ( OC_FILESYSTEM::is_dir($fspath)) {
// directory (WebDAV collection)
$info["props"][] = $this->mkprop("resourcetype", "collection");
- $info["props"][] = $this->mkprop("getcontenttype", "httpd/unix-directory");
+ $info["props"][] = $this->mkprop("getcontenttype", "httpd/unix-directory");
} else {
// plain file (WebDAV resource)
$info["props"][] = $this->mkprop("resourcetype", "");
@@ -181,7 +181,7 @@
$info["props"][] = $this->mkprop("getcontenttype", $this->_mimetype($fspath));
} else {
$info["props"][] = $this->mkprop("getcontenttype", "application/x-non-readable");
- }
+ }
$info["props"][] = $this->mkprop("getcontentlength", OC_FILESYSTEM::filesize($fspath));
}
// get additional properties from database
@@ -192,54 +192,54 @@
}
return $info;
}
-
+
/**
* try to detect the mime type of a file
*
* @param string file path
* @return string guessed mime type
*/
- function _mimetype($fspath)
+ function _mimetype($fspath)
{
return OC_FILESYSTEM::getMimeType($fspath);
}
/**
* HEAD method handler
- *
+ *
* @param array parameter passing array
* @return bool true on success
*/
- function HEAD(&$options)
+ function HEAD(&$options)
{
// get absolute fs path to requested resource
$fspath = $options["path"];
// sanity check
if (! OC_FILESYSTEM::file_exists($fspath)) return false;
-
+
// detect resource type
- $options['mimetype'] = $this->_mimetype($fspath);
-
+ $options['mimetype'] = $this->_mimetype($fspath);
+
// detect modification time
// see rfc2518, section 13.7
// some clients seem to treat this as a reverse rule
// requiering a Last-Modified header if the getlastmodified header was set
$options['mtime'] = OC_FILESYSTEM::filemtime($fspath);
-
+
// detect resource size
$options['size'] = OC_FILESYSTEM::filesize($fspath);
-
+
return true;
}
/**
* GET method handler
- *
+ *
* @param array parameter passing array
* @return bool true on success
*/
- function GET(&$options)
+ function GET(&$options)
{
// get absolute fs path to requested resource)
$fspath = $options["path"];
@@ -255,7 +255,7 @@
// no need to check result here, it is handled by the base class
$options['stream'] = OC_FILESYSTEM::fopen($fspath, "r");
-
+
return true;
}
@@ -268,7 +268,7 @@
* @param string directory path
* @return void function has to handle HTTP response itself
*/
- function GetDir($fspath, &$options)
+ function GetDir($fspath, &$options)
{
$path = $this->_slashify($options["path"]);
if ($path != $options["path"]) {
@@ -289,9 +289,9 @@
}
echo "<html><head><title>Index of ".htmlspecialchars($options['path'])."</title></head>\n";
-
+
echo "<h1>Index of ".htmlspecialchars($options['path'])."</h1>\n";
-
+
echo "<pre>";
printf($format, "Size", "Last modified", "Filename");
echo "<hr>";
@@ -300,9 +300,9 @@
if ($filename != "." && $filename != "..") {
$fullpath = $fspath."/".$filename;
$name = htmlspecialchars($filename);
- printf($format,
+ printf($format,
number_format(filesize($fullpath)),
- strftime("%Y-%m-%d %H:%M:%S", filemtime($fullpath)),
+ strftime("%Y-%m-%d %H:%M:%S", filemtime($fullpath)),
"<a href='$name'>$name</a>");
}
}
@@ -318,11 +318,11 @@
/**
* PUT method handler
- *
+ *
* @param array parameter passing array
* @return bool true on success
*/
- function PUT(&$options)
+ function PUT(&$options)
{
$fspath = $options["path"];
$dir = dirname($fspath);
@@ -353,8 +353,8 @@
* @param array general parameter passing array
* @return bool true on success
*/
- function MKCOL($options)
- {
+ function MKCOL($options)
+ {
$path = $options["path"];
$parent = dirname($path);
$name = basename($path);
@@ -373,23 +373,23 @@
if (!empty($this->_SERVER["CONTENT_LENGTH"])) { // no body parsing yet
return "415 Unsupported media type";
}
-
+
$stat = OC_FILESYSTEM::mkdir($parent."/".$name, 0777);
if (!$stat) {
- return "403 Forbidden";
+ return "403 Forbidden";
}
return ("201 Created");
}
-
-
+
+
/**
* DELETE method handler
*
* @param array general parameter passing array
* @return bool true on success
*/
- function DELETE($options)
+ function DELETE($options)
{
global $CONFIG_DBTABLEPREFIX;
$path =$options["path"];
@@ -424,7 +424,7 @@
* @param array general parameter passing array
* @return bool true on success
*/
- function MOVE($options)
+ function MOVE($options)
{
return $this->COPY($options, true);
}
@@ -435,7 +435,7 @@
* @param array general parameter passing array
* @return bool true on success
*/
- function COPY($options, $del=false)
+ function COPY($options, $del=false)
{
// TODO Property updates still broken (Litmus should detect this?)
global $CONFIG_DBTABLEPREFIX;
@@ -456,7 +456,7 @@
if (OC_FILESYSTEM::is_dir($source)) { // resource is a collection
switch ($options["depth"]) {
- case "infinity": // valid
+ case "infinity": // valid
break;
case "0": // valid for COPY only
if ($del) { // MOVE?
@@ -464,14 +464,14 @@
}
break;
case "1": // invalid for both COPY and MOVE
- default:
+ default:
return "400 Bad request";
}
}
$dest = $options["dest"];
$destdir = dirname($dest);
-
+
if (!OC_FILESYSTEM::file_exists($destdir) || !OC_FILESYSTEM::is_dir($destdir)) {
return "409 Conflict";
}
@@ -499,7 +499,7 @@
if ($options["overwrite"]) {
$stat = $this->DELETE(array("path" => $options["dest"]));
if (($stat{0} != "2") && (substr($stat, 0, 3) != "404")) {
- return $stat;
+ return $stat;
}
} else {
return "412 precondition failed";
@@ -514,13 +514,13 @@
if (is_dir($source)) {
$dpath=OC_DB::escape($destpath);
$path=OC_DB::escape($options["path"]);
- $query = "UPDATE {$CONFIG_DBTABLEPREFIX}properties
- SET path = REPLACE(path, '$path', '$dpath')
+ $query = "UPDATE {$CONFIG_DBTABLEPREFIX}properties
+ SET path = REPLACE(path, '$path', '$dpath')
WHERE path LIKE '$path%'";
OC_DB::query($query);
}
- $query = "UPDATE {$CONFIG_DBTABLEPREFIX}properties
+ $query = "UPDATE {$CONFIG_DBTABLEPREFIX}properties
SET path = '$dpath'
WHERE path = '$path'";
OC_DB::query($query);
@@ -534,14 +534,14 @@
if (!is_array($files) || empty($files)) {
return "500 Internal server error";
}
-
-
+
+
foreach ($files as $file) {
if (OC_FILESYSTEM::is_dir($file)) {
$file = $this->_slashify($file);
}
$destfile = str_replace($source, $dest, $file);
-
+
if (OC_FILESYSTEM::is_dir($file)) {
if (!OC_FILESYSTEM::file_exists($destfile)) {
if (!OC_FILESYSTEM::is_writeable(dirname($destfile))) {
@@ -560,7 +560,7 @@
}
}
}
- return ($new && !$existing_col) ? "201 Created" : "204 No Content";
+ return ($new && !$existing_col) ? "201 Created" : "204 No Content";
}
/**
@@ -569,7 +569,7 @@
* @param array general parameter passing array
* @return bool true on success
*/
- function PROPPATCH(&$options)
+ function PROPPATCH(&$options)
{
global $prefs, $tab;
global $CONFIG_DBTABLEPREFIX;
@@ -578,7 +578,7 @@
$path = $options["path"];
$dir = dirname($path)."/";
$base = basename($path);
-
+
foreach ($options["props"] as $key => $prop) {
if ($prop["ns"] == "DAV:") {
$options["props"][$key]['status'] = "403 Forbidden";
@@ -591,11 +591,11 @@
$query = "REPLACE INTO {$CONFIG_DBTABLEPREFIX}properties (path,name,ns,value) VALUES('$path','$name','$ns','$val')";
} else {
$query = "DELETE FROM {$CONFIG_DBTABLEPREFIX}properties WHERE path = '$path' AND name = '$name' AND ns = '$ns'";
- }
+ }
OC_DB::query($query);
}
}
-
+
return "";
}
@@ -606,7 +606,7 @@
* @param array general parameter passing array
* @return bool true on success
*/
- function LOCK(&$options)
+ function LOCK(&$options)
{
global $CONFIG_DBTABLEPREFIX;
@@ -639,7 +639,7 @@
$row=$res[0];
$query = "UPDATE `{$CONFIG_DBTABLEPREFIX}locks` SET `expires` = '$options[timeout]', `modified` = ".time()." $where";
OC_DB::query($query);
-
+
$options['owner'] = $row['owner'];
$options['scope'] = $row["exclusivelock"] ? "exclusive" : "shared";
$options['type'] = $row["exclusivelock"] ? "write" : "read";
@@ -664,15 +664,15 @@
}
}
}
-
+
$locktoken=OC_DB::escape($options['locktoken']);
$path=OC_DB::escape($options['path']);
$time=time();
$owner=OC_DB::escape($options['owner']);
$timeout=OC_DB::escape($options['timeout']);
$exclusive=($options['scope'] === "exclusive" ? "1" : "0");
- $query = "INSERT INTO `{$CONFIG_DBTABLEPREFIX}locks`
-(`token`,`path`,`created`,`modified`,`owner`,`expires`,`exclusivelock`,`recursive`)
+ $query = "INSERT INTO `{$CONFIG_DBTABLEPREFIX}locks`
+(`token`,`path`,`created`,`modified`,`owner`,`expires`,`exclusivelock`,`recursive`)
VALUES ('$locktoken','$path',$time,$time,'$owner','timeout',$exclusive,$recursion)";
OC_DB::query($query);
$rows=OC_DB::affected_rows();
@@ -688,7 +688,7 @@ VALUES ('$locktoken','$path',$time,$time,'$owner','timeout',$exclusive,$recursio
* @param array general parameter passing array
* @return bool true on success
*/
- function UNLOCK(&$options)
+ function UNLOCK(&$options)
{
global $CONFIG_DBTABLEPREFIX;
$query = "DELETE FROM {$CONFIG_DBTABLEPREFIX}locks
@@ -705,7 +705,7 @@ VALUES ('$locktoken','$path',$time,$time,'$owner','timeout',$exclusive,$recursio
* @param string resource path to check for locks
* @return bool true on success
*/
- function checkLock($path)
+ function checkLock($path)
{
global $CONFIG_DBTABLEPREFIX;
@@ -724,8 +724,8 @@ VALUES ('$locktoken','$path',$time,$time,'$owner','timeout',$exclusive,$recursio
"depth" => 0,
"owner" => $row['owner'],
"token" => $row['token'],
- "created" => $row['created'],
- "modified" => $row['modified'],
+ "created" => $row['created'],
+ "modified" => $row['modified'],
"expires" => $row['expires'],
"recursive" => $row['recursive']
);
@@ -744,8 +744,8 @@ VALUES ('$locktoken','$path',$time,$time,'$owner','timeout',$exclusive,$recursio
"depth" => 0,
"owner" => $row['owner'],
"token" => $row['token'],
- "created" => $row['created'],
- "modified" => $row['modified'],
+ "created" => $row['created'],
+ "modified" => $row['modified'],
"expires" => $row['expires'],
"recursive" => $row['recursive']
);
diff --git a/inc/User/backend.php b/lib/User/backend.php
index f4c12f6a88f..a486ea1cbcc 100644
--- a/inc/User/backend.php
+++ b/lib/User/backend.php
@@ -3,22 +3,22 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
@@ -117,7 +117,7 @@ abstract class OC_USER_BACKEND {
* @param string $groupName Name of the group from which remove the user
*/
abstract public static function removeFromGroup($username,$groupName);
-
+
/**
* Generate a random password
*/
@@ -152,7 +152,7 @@ abstract class OC_USER_BACKEND {
*
*/
abstract public static function getUsers();
-
+
/**
* get a list of all groups
*
diff --git a/inc/User/database.php b/lib/User/database.php
index df49e8d364a..defaf7f8f40 100644
--- a/inc/User/database.php
+++ b/lib/User/database.php
@@ -3,25 +3,25 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-oc_require_once('inc/User/backend.php');
+oc_require_once('User/backend.php');
@@ -31,7 +31,7 @@ oc_require_once('inc/User/backend.php');
*/
class OC_USER_DATABASE extends OC_USER_BACKEND {
static private $userGroupCache=array();
-
+
/**
* Check if the login button is pressed and log the user in
*
@@ -42,8 +42,8 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
echo 1;
OC_LOG::event($_SESSION['username'], 1, '');
echo 2;
- if ( (isset($CONFIG_HTTPFORCESSL) AND $CONFIG_HTTPFORCESSL)
- OR (isset($_SERVER['HTTPS']) AND ('on' == $_SERVER['HTTPS'])) ) {
+ if ( (isset($CONFIG_HTTPFORCESSL) AND $CONFIG_HTTPFORCESSL)
+ OR (isset($_SERVER['HTTPS']) AND ('on' == $_SERVER['HTTPS'])) ) {
$url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
} else {
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
@@ -75,7 +75,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
$username = OC_DB::escape($username);
$usernameClean = OC_DB::escape($usernameClean);
$query = "INSERT INTO `{$CONFIG_DBTABLEPREFIX}users` (`user_name` ,`user_name_clean` ,`user_password`) "
- . "VALUES ('$username', '$usernameClean', '$password')";
+ . "VALUES ('$username', '$usernameClean', '$password')";
$result = OC_DB::query($query);
return $result ? true : false;
}
@@ -95,7 +95,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
$username = OC_DB::escape($username);
$usernameClean = OC_DB::escape($usernameClean);
$query = "SELECT user_id FROM {$CONFIG_DBTABLEPREFIX}users "
- . "WHERE user_name_clean = '$usernameClean' AND user_password = '$password' LIMIT 1";
+ . "WHERE user_name_clean = '$usernameClean' AND user_password = '$password' LIMIT 1";
$result = OC_DB::select($query);
if ( isset($result[0]) AND isset($result[0]['user_id']) ) {
$_SESSION['user_id'] = $result[0]['user_id'];
@@ -118,12 +118,23 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
$_SESSION['user_id'] = false;
$_SESSION['username'] = '';
$_SESSION['username_clean'] = '';
-
+
header("location: $WEBROOT");
}
}
/**
+ * Kick the user
+ *
+ */
+ public static function logout() {
+ OC_LOG::event($_SESSION['username'], 2, '');
+ $_SESSION['user_id'] = false;
+ $_SESSION['username'] = '';
+ $_SESSION['username_clean'] = '';
+ }
+
+ /**
* Check if the user is logged in
*
*/
@@ -274,7 +285,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
return true;
}
}
-
+
/**
* Remove a user from a group
*
@@ -315,7 +326,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
*/
public static function getUserGroups($username) {
global $CONFIG_DBTABLEPREFIX;
-
+
$userId = OC_USER::getUserId($username);
if(!isset(self::$userGroupCache[$userId])){
$query = "SELECT group_id FROM {$CONFIG_DBTABLEPREFIX}user_group WHERE user_id = '$userId'";
@@ -368,7 +379,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
$usernameClean = OC_DB::escape($usernameClean);
$username = OC_DB::escape($username);
$query = "SELECT user_id FROM `{$CONFIG_DBTABLEPREFIX}users` "
- . "WHERE user_name_clean = '$usernameClean' AND user_password = '$password' LIMIT 1";
+ . "WHERE user_name_clean = '$usernameClean' AND user_password = '$password' LIMIT 1";
$result = OC_DB::select($query);
if ( isset($result[0]) AND isset($result[0]['user_id']) AND ($result[0]['user_id'] > 0) ) {
return true;
@@ -383,7 +394,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
*/
public static function getUsers() {
global $CONFIG_DBTABLEPREFIX;
-
+
$query = "SELECT user_name FROM `{$CONFIG_DBTABLEPREFIX}users`";
$result = OC_DB::select($query);
$users=array();
@@ -392,14 +403,14 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
}
return $users;
}
-
+
/**
* get a list of all groups
*
*/
public static function getGroups() {
global $CONFIG_DBTABLEPREFIX;
-
+
$query = "SELECT group_name FROM `{$CONFIG_DBTABLEPREFIX}groups`";
$result = OC_DB::select($query);
$groups=array();
@@ -408,7 +419,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
}
return $groups;
}
-
+
private static function clearCache(){
self::$userGroupCache=array();
$_SESSION['user_id_cache']=array();
diff --git a/lib/appconfig.php b/lib/appconfig.php
new file mode 100644
index 00000000000..f1bccc0a250
--- /dev/null
+++ b/lib/appconfig.php
@@ -0,0 +1,45 @@
+<?php
+class OC_APPCONFIG{
+ static public $forms=array();
+
+ /**
+ * add a form to the settings page
+ * @param string name
+ * @param string url
+ */
+ public static function addForm($name,$url){
+ self::$forms[$name]=$url;
+ }
+
+ /**
+ * Get the available keys for an application
+ * @param string application
+ */
+ public static function getKeys( $application ){
+ // OC_DB::query( $query);
+ return array();
+ }
+
+ /**
+ * Get the config value
+ * @param string application
+ * @param string key
+ * @param string default
+ */
+ public static function getValue( $application, $key, $default ){
+ // OC_DB::query( $query);
+ return $default;
+ }
+
+ /**
+ * Set the config value
+ * @param string application
+ * @param string key
+ * @param string value
+ */
+ public static function setValue( $application, $name, $url ){
+ // OC_DB::query( $query);
+ return true;
+ }
+}
+?>
diff --git a/inc/lib_base.php b/lib/base.php
index 9fafa4df17f..4694f826a52 100644
--- a/inc/lib_base.php
+++ b/lib/base.php
@@ -2,36 +2,36 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
// set some stuff
ob_start();
// error_reporting(E_ALL | E_STRICT);
-error_reporting(E_ALL); // MDB2 gives loads of strict error, disabling for now
+error_reporting( E_ERROR | E_PARSE | E_WARNING ); // MDB2 gives loads of strict error, disabling for now
date_default_timezone_set('Europe/Berlin');
ini_set('arg_separator.output','&amp;');
ini_set('session.cookie_httponly','1;');
session_start();
// calculate the documentroot
-$SERVERROOT=substr(__FILE__,0,-17);
+$SERVERROOT=substr(__FILE__,0,-13);
$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
$SERVERROOT=str_replace("\\",'/',$SERVERROOT);
$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
@@ -64,25 +64,25 @@ $CONFIG_FILESYSTEM=array();
$CONFIG_DATADIRECTORY_ROOT=$CONFIG_DATADIRECTORY;// store this in a seperate variable so we can change the data directory to jail users.
// redirect to https site if configured
if(isset($CONFIG_HTTPFORCESSL) and $CONFIG_HTTPFORCESSL){
- if(!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != 'on') {
- $url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
- header("Location: $url");
- exit;
- }
+ if(!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != 'on') {
+ $url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
+ header("Location: $url");
+ exit;
+ }
}
// load core libs
-oc_require_once('lib_files.php');
-oc_require_once('lib_filesystem.php');
-oc_require_once('lib_filestorage.php');
-oc_require_once('lib_fileobserver.php');
-oc_require_once('lib_log.php');
-oc_require_once('lib_config.php');
-oc_require_once('lib_user.php');
-oc_require_once('lib_ocs.php');
-oc_require_once('lib_connect.php');
-oc_require_once('lib_remotestorage.php');
-oc_require_once('lib_plugin.php');
+oc_require_once('files.php');
+oc_require_once('filesystem.php');
+oc_require_once('filestorage.php');
+oc_require_once('fileobserver.php');
+oc_require_once('log.php');
+oc_require_once('config.php');
+oc_require_once('user.php');
+oc_require_once('ocs.php');
+oc_require_once('connect.php');
+oc_require_once('remotestorage.php');
+oc_require_once('plugin.php');
OC_PLUGIN::loadPlugins();
@@ -93,6 +93,8 @@ OC_USER::setBackend($CONFIG_BACKEND);
OC_UTIL::setupFS();
+oc_startup();
+
// check if the server is correctly configured for ownCloud
@@ -109,8 +111,12 @@ $loginresult=OC_USER::loginlistener();
class OC_UTIL {
public static $scripts=array();
public static $styles=array();
+ public static $adminpages = array();
+ public static $applications = array();
+ public static $navigation = array();
+ public static $personalmenu = array();
private static $fsSetup=false;
-
+
public static function setupFS(){// configure the initial filesystem based on the configuration
if(self::$fsSetup){//setting up the filesystem twice can only lead to trouble
return false;
@@ -139,12 +145,12 @@ class OC_UTIL {
$rootStorage->addObserver($backup);
}
OC_FILESYSTEM::mount($rootStorage,'/');
-
+
$CONFIG_DATADIRECTORY=$CONFIG_DATADIRECTORY_ROOT.'/'.$_SESSION['username_clean'];
if(!is_dir($CONFIG_DATADIRECTORY)){
mkdir($CONFIG_DATADIRECTORY);
}
-
+
//set up the other storages according to the system settings
foreach($CONFIG_FILESYSTEM as $storageConfig){
if(OC_FILESYSTEM::hasStorageType($storageConfig['type'])){
@@ -157,115 +163,173 @@ class OC_UTIL {
}
}
}
-
+
//jail the user into his "home" directory
OC_FILESYSTEM::chroot('/'.$_SESSION['username_clean']);
self::$fsSetup=true;
}
}
-
+
/**
- * get the current installed version of ownCloud
- * @return array
- */
+ * get the current installed version of ownCloud
+ * @return array
+ */
public static function getVersion(){
- return array(1,1,0);
+ return array(1,2,0);
}
-
- /**
- * add a javascript file
- *
- * @param url $url
- */
- public static function addScript($url){
- self::$scripts[]=$url;
- }
- /**
- * add a css file
- *
- * @param url $url
- */
- public static function addStyle($url){
- self::$styles[]=$url;
- }
- /**
- * array to store all the optional navigation buttons of the plugins
- *
- */
- static private $NAVIGATION = array();
+ /**
+ * Create an url
+ *
+ * @param string $application
+ * @param string $file
+ */
+ public static function linkTo( $application, $file = null ){
+ global $WEBROOT;
+ if( is_null( $file )){
+ $file = $application;
+ $application = "";
+ }
+ return "$WEBROOT/$application/$file";
+ }
+ /**
+ * Create an image link
+ *
+ * @param string $application
+ * @param string $file
+ */
+ public static function imagePath( $application, $file = null ){
+ global $WEBROOT;
+ if( is_null( $file )){
+ $file = $application;
+ $application = "";
+ }
+ return "$WEBROOT/$application/img/$file";
+ }
- /**
- * check if the current server configuration is suitable for ownCloud
- *
- */
- public static function checkServer(){
- global $SERVERROOT;
- global $CONFIG_DATADIRECTORY_ROOT;
- global $CONFIG_BACKUPDIRECTORY;
- global $CONFIG_ENABLEBACKUP;
- global $CONFIG_INSTALLED;
- $error='';
- if(!is_callable('sqlite_open') and !is_callable('mysql_connect')){
- $error.='No database drivers (sqlite or mysql) installed.<br/>';
+ /**
+ * add a javascript file
+ *
+ * @param url $url
+ */
+ public static function addScript( $application, $file = null ){
+ if( is_null( $file )){
+ $file = $application;
+ $application = "";
+ }
+ self::$scripts[] = "$application/js/$file";
}
- global $CONFIG_DBTYPE;
- global $CONFIG_DBNAME;
- if(!stristr(PHP_OS, 'WIN')){
- if($CONFIG_DBTYPE=='sqlite'){
- $file=$SERVERROOT.'/'.$CONFIG_DBNAME;
- if(file_exists($file)){
- $prems=substr(decoct(fileperms($file)),-3);
- if(substr($prems,2,1)!='0'){
- @chmod($file,0660);
- clearstatcache();
+
+ /**
+ * add a css file
+ *
+ * @param url $url
+ */
+ public static function addStyle( $application, $file = null ){
+ if( is_null( $file )){
+ $file = $application;
+ $application = "";
+ }
+ self::$styles[] = "$application/css/$file";
+ }
+
+ /**
+ * add an entry to the main navigation
+ *
+ * @param array $entry
+ */
+ public static function addNavigationEntry( $entry){
+ OC_UTIL::$navigation[] = $entry;
+ }
+
+ /**
+ * add administration pages
+ *
+ * @param array $entry
+ */
+ public static function addAdminPage( $entry){
+ OC_UTIL::$adminpages[] = $entry;
+ }
+
+ /**
+ * add application
+ *
+ * @param array $entry
+ */
+ public static function addApplication( $entry){
+ OC_UTIL::$applications[] = $entry;
+ }
+
+ /**
+ * add an entry to the personal menu
+ *
+ * @param array $entry
+ */
+ public static function addPersonalMenuEntry( $entry){
+ OC_UTIL::$personalmenu[] = $entry;
+ }
+
+ /**
+ * check if the current server configuration is suitable for ownCloud
+ *
+ */
+ public static function checkServer(){
+ global $SERVERROOT;
+ global $CONFIG_DATADIRECTORY_ROOT;
+ global $CONFIG_BACKUPDIRECTORY;
+ global $CONFIG_ENABLEBACKUP;
+ global $CONFIG_INSTALLED;
+ $error='';
+ if(!is_callable('sqlite_open') and !is_callable('mysql_connect')){
+ $error.='No database drivers (sqlite or mysql) installed.<br/>';
+ }
+ global $CONFIG_DBTYPE;
+ global $CONFIG_DBNAME;
+ if(!stristr(PHP_OS, 'WIN')){
+ if($CONFIG_DBTYPE=='sqlite'){
+ $file=$SERVERROOT.'/'.$CONFIG_DBNAME;
+ if(file_exists($file)){
$prems=substr(decoct(fileperms($file)),-3);
if(substr($prems,2,1)!='0'){
- $error.='SQLite database file ('.$file.') is readable from the web<br/>';
+ @chmod($file,0660);
+ clearstatcache();
+ $prems=substr(decoct(fileperms($file)),-3);
+ if(substr($prems,2,1)!='0'){
+ $error.='SQLite database file ('.$file.') is readable from the web<br/>';
+ }
}
}
}
- }
- $prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
- if(substr($prems,-1)!='0'){
- chmodr($CONFIG_DATADIRECTORY_ROOT,0770);
- clearstatcache();
$prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
- if(substr($prems,2,1)!='0'){
- $error.='Data directory ('.$CONFIG_DATADIRECTORY_ROOT.') is readable from the web<br/>';
- }
- }
- if($CONFIG_ENABLEBACKUP){
- $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
if(substr($prems,-1)!='0'){
- chmodr($CONFIG_BACKUPDIRECTORY,0770);
+ chmodr($CONFIG_DATADIRECTORY_ROOT,0770);
clearstatcache();
- $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
+ $prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
if(substr($prems,2,1)!='0'){
- $error.='Data directory ('.$CONFIG_BACKUPDIRECTORY.') is readable from the web<br/>';
+ $error.='Data directory ('.$CONFIG_DATADIRECTORY_ROOT.') is readable from the web<br/>';
}
}
+ if($CONFIG_ENABLEBACKUP){
+ $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
+ if(substr($prems,-1)!='0'){
+ chmodr($CONFIG_BACKUPDIRECTORY,0770);
+ clearstatcache();
+ $prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
+ if(substr($prems,2,1)!='0'){
+ $error.='Data directory ('.$CONFIG_BACKUPDIRECTORY.') is readable from the web<br/>';
+ }
+ }
+ }
+ }else{
+ //TODO: premisions checks for windows hosts
+ }
+ if($error){
+ die($error);
}
- }else{
- //TODO: premisions checks for windows hosts
- }
- if($error){
- die($error);
}
-}
/**
- * show the header of the web GUI
- *
- */
- public static function showHeader(){
- global $CONFIG_ADMINLOGIN;
- global $WEBROOT;
- oc_require('templates/header.php');;
- }
-
- /**
* check if we need to use the layout optimized for smaller screen, currently only checks for iPhone/Android
* @return bool
*/
@@ -278,70 +342,15 @@ class OC_UTIL {
}
/**
- * show the footer of the web GUI
- *
- */
- public static function showFooter(){
- global $CONFIG_FOOTEROWNERNAME;
- global $CONFIG_FOOTEROWNEREMAIL;
- oc_require('templates/footer.php');;
- }
-
- /**
- * add an navigationentry to the main navigation
- *
- * @param name $name
- * @param url $url
- */
- public static function addNavigationEntry($name,$url) {
- $entry=array();
- $entry['name']=$name;
- $entry['url']=$url;
- OC_UTIL::$NAVIGATION[]=$entry;
- }
-
- /**
- * show the main navigation
- *
- */
- public static function showNavigation(){
- global $WEBROOT;
- global $SERVERROOT;
- echo('<table class="center" cellpadding="5" cellspacing="0" border="0"><tr>');
- echo('<td class="navigationitem1"><a href="'.$WEBROOT.'/">'.$_SESSION['username'].'</a></td>');
- if($_SERVER['SCRIPT_NAME']==$WEBROOT.'/index.php') echo('<td class="navigationitemselected"><a href="'.$WEBROOT.'/">Files</a></td>'); else echo('<td class="navigationitem"><a href="'.$WEBROOT.'/">Files</a></td>');
-
- foreach(OC_UTIL::$NAVIGATION as $NAVI) {
- if(dirname($_SERVER['SCRIPT_NAME'])==$WEBROOT.$NAVI['url']) echo('<td class="navigationitemselected"><a href="'.$WEBROOT.$NAVI['url'].'">'.$NAVI['name'].'</a></td>'); else echo('<td class="navigationitem"><a href="'.$WEBROOT.$NAVI['url'].'">'.$NAVI['name'].'</a></td>');
- }
-
- if($_SERVER['SCRIPT_NAME']==$WEBROOT.'/log/index.php') echo('<td class="navigationitemselected"><a href="'.$WEBROOT.'/log">Log</a></td>'); else echo('<td class="navigationitem"><a href="'.$WEBROOT.'/log">Log</a></td>');
- if($_SERVER['SCRIPT_NAME']==$WEBROOT.'/settings/index.php') echo('<td class="navigationitemselected"><a href="'.$WEBROOT.'/settings">Settings</a></td>'); else echo('<td class="navigationitem"><a href="'.$WEBROOT.'/settings">Settings</a></td>');
- echo('<td class="navigationitem"><a href="?logoutbutton=1">Logout</a></td>');
- echo('</tr></table>');
- }
-
-
- /**
- * show the loginform
- *
- */
- public static function showLoginForm(){
- global $loginresult;
- oc_require('templates/loginform.php');
- }
-
-
- /**
* show an icon for a filetype
*
*/
public static function showIcon($filetype){
- global $WEBROOT;
- if($filetype=='dir'){ echo('<td><img src="'.$WEBROOT.'/img/icons/folder.png" width="16" height="16"></td>');
- }elseif($filetype=='foo'){ echo('<td>foo</td>');
- }else{ echo('<td><img src="'.$WEBROOT.'/img/icons/other.png" width="16" height="16"></td>');
- }
+ global $WEBROOT;
+ if($filetype=='dir'){ echo('<td><img src="'.$WEBROOT.'/img/icons/folder.png" width="16" height="16"></td>');
+ }elseif($filetype=='foo'){ echo('<td>foo</td>');
+ }else{ echo('<td><img src="'.$WEBROOT.'/img/icons/other.png" width="16" height="16"></td>');
+ }
}
}
@@ -379,7 +388,7 @@ class OC_DB {
$dsn = array(
'phptype' => 'sqlite',
'database' => $SERVERROOT.'/'.$CONFIG_DBNAME,
- 'mode' => '0644',
+ 'mode' => '0644',
);
}elseif($CONFIG_DBTYPE=='mysql'){
$dsn = array(
@@ -399,7 +408,7 @@ class OC_DB {
);
}
self::$DBConnection=MDB2::factory($dsn,$options);
-
+
if (PEAR::isError(self::$DBConnection)) {
echo('<b>can not connect to database, using '.$CONFIG_DBTYPE.'. ('.self::$DBConnection->getUserInfo().')</center>');
$error=self::$DBConnection->getMessage();
@@ -410,7 +419,7 @@ class OC_DB {
self::$DBConnection->setFetchMode(MDB2_FETCHMODE_ASSOC);
}
}
-
+
public static function connectScheme(){
self::connect();
@oc_require_once('MDB2/Schema.php');
@@ -418,13 +427,13 @@ class OC_DB {
self::$schema=&MDB2_Schema::factory(self::$DBConnection);
}
}
-
+
/**
- * executes a query on the database
- *
- * @param string $cmd
- * @return result-set
- */
+ * executes a query on the database
+ *
+ * @param string $cmd
+ * @return result-set
+ */
static function query($cmd){
global $CONFIG_DBTYPE;
if(!trim($cmd)){
@@ -443,15 +452,15 @@ class OC_DB {
if (PEAR::isError($result)) {
$entry='DB Error: "'.$result->getMessage().'"<br />';
$entry.='Offending command was: '.$cmd.'<br />';
- error_log($entry);
+ error_log($entry);
die($entry);
}else{
self::$affected=$result;
}
self::$result=$result;
return $result;
- }
-
+ }
+
/**
* executes a query on the database and returns the result in an array
*
@@ -476,8 +485,8 @@ class OC_DB {
die($entry);
}
return $result;
- }
-
+ }
+
/**
* executes multiply queries on the database
*
@@ -531,7 +540,7 @@ class OC_DB {
static function affected_rows() {
return self::$affected;
}
-
+
/**
* get a field from the resultset
*
@@ -555,7 +564,7 @@ class OC_DB {
static function fetch_assoc($result){
return $result->fetchRow(MDB2_FETCHMODE_ASSOC);
}
-
+
/**
* Freeing resultset (performance)
*
@@ -568,14 +577,14 @@ class OC_DB {
self::$result=false;
}
}
-
+
static public function disconnect(){
if(self::$DBConnection){
self::$DBConnection->disconnect();
self::$DBConnection=false;
}
}
-
+
/**
* escape strings so they can be used in queries
*
@@ -586,7 +595,7 @@ class OC_DB {
OC_DB::connect();
return self::$DBConnection->escape($string);
}
-
+
static function getDbStructure($file){
OC_DB::connectScheme();
$definition = self::$schema->getDefinitionFromDatabase();
@@ -597,7 +606,7 @@ class OC_DB {
);
self::$schema->dumpDatabase($definition, $dump_options, MDB2_SCHEMA_DUMP_STRUCTURE);
}
-
+
static function createDbFromStructure($file){
OC_DB::connectScheme();
global $CONFIG_DBNAME;
@@ -636,12 +645,18 @@ function oc_require($file){
global $CONFIG_HTTPFORCESSL;
global $CONFIG_DATEFORMAT;
global $CONFIG_INSTALLED;
+
if(is_file($file)){
return require($file);
- }elseif(is_file($SERVERROOT.'/'.$file)){
+ }
+ elseif(is_file($SERVERROOT.'/'.$file)){
return require($SERVERROOT.'/'.$file);
- }elseif(is_file($SERVERROOT.'/inc/'.$file)){
- return require($SERVERROOT.'/inc/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/lib/'.$file)){
+ return require($SERVERROOT.'/lib/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/3dparty/'.$file)){
+ return require($SERVERROOT.'/3dparty/'.$file);
}
}
@@ -658,12 +673,18 @@ function oc_require_once($file){
global $CONFIG_HTTPFORCESSL;
global $CONFIG_DATEFORMAT;
global $CONFIG_INSTALLED;
+
if(is_file($file)){
return require_once($file);
- }elseif(is_file($SERVERROOT.'/'.$file)){
+ }
+ elseif(is_file($SERVERROOT.'/'.$file)){
return require_once($SERVERROOT.'/'.$file);
- }elseif(is_file($SERVERROOT.'/inc/'.$file)){
- return require_once($SERVERROOT.'/inc/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/lib/'.$file)){
+ return require_once($SERVERROOT.'/lib/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/3dparty/'.$file)){
+ return require_once($SERVERROOT.'/3dparty/'.$file);
}
}
@@ -680,12 +701,18 @@ function oc_include($file){
global $CONFIG_HTTPFORCESSL;
global $CONFIG_DATEFORMAT;
global $CONFIG_INSTALLED;
+
if(is_file($file)){
return include($file);
- }elseif(is_file($SERVERROOT.'/'.$file)){
+ }
+ elseif(is_file($SERVERROOT.'/'.$file)){
return include($SERVERROOT.'/'.$file);
- }elseif(is_file($SERVERROOT.'/inc/'.$file)){
- return include($SERVERROOT.'/inc/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/lib/'.$file)){
+ return include($SERVERROOT.'/lib/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/3dparty/'.$file)){
+ return include($SERVERROOT.'/3dparty/'.$file);
}
}
@@ -702,36 +729,79 @@ function oc_include_once($file){
global $CONFIG_HTTPFORCESSL;
global $CONFIG_DATEFORMAT;
global $CONFIG_INSTALLED;
- if(is_file($SERVERROOT.'/'.$file)){
- return include_once($SERVERROOT.'/'.$file);
- }elseif(is_file($SERVERROOT.'/inc/'.$file)){
- return include_once($SERVERROOT.'/inc/'.$file);
- }elseif(is_file($file)){
+
+ if(is_file($file)){
return include_once($file);
}
+ elseif(is_file($SERVERROOT.'/'.$file)){
+ return include_once($SERVERROOT.'/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/lib/'.$file)){
+ return include_once($SERVERROOT.'/lib/'.$file);
+ }
+ elseif(is_file($SERVERROOT.'/3dparty/'.$file)){
+ return include_once($SERVERROOT.'/3dparty/'.$file);
+ }
}
-function chmodr($path, $filemode) {
-// echo "$path<br/>";
- if (!is_dir($path))
- return chmod($path, $filemode);
- $dh = opendir($path);
- while (($file = readdir($dh)) !== false) {
- if($file != '.' && $file != '..') {
- $fullpath = $path.'/'.$file;
- if(is_link($fullpath))
- return FALSE;
- elseif(!is_dir($fullpath) && !chmod($fullpath, $filemode))
- return FALSE;
- elseif(!chmodr($fullpath, $filemode))
- return FALSE;
- }
- }
- closedir($dh);
- if(chmod($path, $filemode))
- return TRUE;
- else
- return FALSE;
+function chmodr($path, $filemode) {
+// echo "$path<br/>";
+ if (!is_dir($path))
+ return chmod($path, $filemode);
+ $dh = opendir($path);
+ while (($file = readdir($dh)) !== false) {
+ if($file != '.' && $file != '..') {
+ $fullpath = $path.'/'.$file;
+ if(is_link($fullpath))
+ return FALSE;
+ elseif(!is_dir($fullpath) && !chmod($fullpath, $filemode))
+ return FALSE;
+ elseif(!chmodr($fullpath, $filemode))
+ return FALSE;
+ }
+ }
+ closedir($dh);
+ if(chmod($path, $filemode))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+function oc_startup(){
+ global $SERVERROOT;
+ global $DOCUMENTROOT;
+ global $WEBROOT;
+ global $CONFIG_DBNAME;
+ global $CONFIG_DBHOST;
+ global $CONFIG_DBUSER;
+ global $CONFIG_DBPASSWORD;
+ global $CONFIG_DBTYPE;
+ global $CONFIG_DATADIRECTORY;
+ global $CONFIG_HTTPFORCESSL;
+ global $CONFIG_DATEFORMAT;
+ global $CONFIG_INSTALLED;
+
+ // Add the stuff we need always
+ OC_UTIL::addPersonalMenuEntry( array( "file" => "index.php?logout=1", "name" => "Logout" ));
+ OC_UTIL::addScript( "jquery-1.5.min" );
+ OC_UTIL::addScript( "jquery-ui-1.8.10.custom.min" );
+ OC_UTIL::addScript( "js" );
+ OC_UTIL::addStyle( "jquery-ui-1.8.10.custom" );
+ OC_UTIL::addStyle( "styles" );
+
+ // Require all appinfo.php
+ $dir = opendir( $SERVERROOT );
+ while( false !== ( $filename = readdir( $dir ))){
+ if( substr( $filename, 0, 1 ) != '.' ){
+ if( file_exists( "$SERVERROOT/$filename/appinfo.php" )){
+ oc_require( "$filename/appinfo.php" );
+ }
+ }
+ }
+ closedir( $dir );
+
+ // Everything done
+ return true;
}
?>
diff --git a/inc/lib_config.php b/lib/config.php
index 75ddaafc316..75ddaafc316 100644
--- a/inc/lib_config.php
+++ b/lib/config.php
diff --git a/inc/lib_connect.php b/lib/connect.php
index 695ae482451..695ae482451 100644
--- a/inc/lib_connect.php
+++ b/lib/connect.php
diff --git a/inc/lib_fileobserver.php b/lib/fileobserver.php
index 08a67521f03..08a67521f03 100644
--- a/inc/lib_fileobserver.php
+++ b/lib/fileobserver.php
diff --git a/inc/lib_files.php b/lib/files.php
index 5ec934a47a2..bf629a59d44 100644
--- a/inc/lib_files.php
+++ b/lib/files.php
@@ -21,7 +21,7 @@
*
*/
-oc_require_once("lib_log.php");
+oc_require_once("log.php");
/**
@@ -248,7 +248,7 @@ class OC_FILES {
static function getMimeType($path){
return OC_FILESYSTEM::getMimeType($path);
}
-
+
/**
* get a file tree
*
@@ -258,7 +258,7 @@ class OC_FILES {
static function getTree($path){
return OC_FILESYSTEM::getTree($path);
}
-
+
/**
* pull a file from a remote server
* @param string source
@@ -308,15 +308,15 @@ function zipAddDir($dir,$zip,$internalDir=''){
//remove a dir and it's content
function delTree($dir) {
- if (!file_exists($dir)) return true;
- if (!is_dir($dir) || is_link($dir)) return unlink($dir);
- foreach (scandir($dir) as $item) {
- if ($item == '.' || $item == '..') continue;
+ if (!file_exists($dir)) return true;
+ if (!is_dir($dir) || is_link($dir)) return unlink($dir);
+ foreach (scandir($dir) as $item) {
+ if ($item == '.' || $item == '..') continue;
if(is_file($dir.'/'.$item)){
unlink($dir.'/'.$item);
}elseif(is_dir($dir.'/'.$item)){
- if (!delTree($dir. "/" . $item)){
- return false;
+ if (!delTree($dir. "/" . $item)){
+ return false;
};
}
}
@@ -338,7 +338,7 @@ if(!function_exists('sys_get_temp_dir')) {
}
}
-function recursive_copy($src,$dst) {
+function recursive_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
@@ -351,7 +351,7 @@ function recursive_copy($src,$dst) {
}
}
}
- closedir($dir);
+ closedir($dir);
}
global $FAKEDIRS;
@@ -361,7 +361,7 @@ class fakeDirStream{
private $name;
private $data;
private $index;
-
+
public function dir_opendir($path,$options){
global $FAKEDIRS;
$url=parse_url($path);
@@ -374,7 +374,7 @@ class fakeDirStream{
}
return true;
}
-
+
public function dir_readdir(){
if($this->index>=count($this->data)){
return false;
@@ -383,7 +383,7 @@ class fakeDirStream{
$this->index++;
return $filename;
}
-
+
public function dir_closedir() {
$this->data=false;
$this->name='';
diff --git a/inc/lib_filestorage.php b/lib/filestorage.php
index 06ce26f0d23..06ce26f0d23 100644
--- a/inc/lib_filestorage.php
+++ b/lib/filestorage.php
diff --git a/inc/lib_filesystem.php b/lib/filesystem.php
index 26a0066aa74..26a0066aa74 100644
--- a/inc/lib_filesystem.php
+++ b/lib/filesystem.php
diff --git a/lib/log.php b/lib/log.php
new file mode 100644
index 00000000000..f2f935b466b
--- /dev/null
+++ b/lib/log.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+* ownCloud
+*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+
+/**
+ * Class for logging features
+ *
+ */
+class OC_LOG {
+
+ /**
+ * array to define different log types
+ *
+ */
+ public static $TYPE = array (
+ 1=>'login',
+ 2=>'logout',
+ 3=>'read',
+ 4=>'write' );
+
+
+ /**
+ * log an event
+ *
+ * @param username $user
+ * @param type $type
+ * @param message $message
+ */
+ public static function event($user,$type,$message){
+ global $CONFIG_DBTABLEPREFIX;
+ $result = OC_DB::query('INSERT INTO `' . $CONFIG_DBTABLEPREFIX . 'log` (`timestamp`,`user`,`type`,`message`) VALUES ('.time().',\''.addslashes($user).'\','.addslashes($type).',\''.addslashes($message).'\');');
+ }
+
+
+ /**
+ * get log entries
+ */
+ public static function get(){
+ global $CONFIG_DATEFORMAT;
+ global $CONFIG_DBTABLEPREFIX;
+
+ $result;
+
+ if(OC_USER::ingroup($_SESSION['username_clean'],'admin')){
+ $result = OC_DB::select('select `timestamp`,`user`,`type`,`message` from '.$CONFIG_DBTABLEPREFIX.'log order by timestamp desc limit 20');
+ }
+ else{
+ $user=$_SESSION['username_clean'];
+ $result = OC_DB::select('select `timestamp`,`user`,`type`,`message` from '.$CONFIG_DBTABLEPREFIX.'log where user=\''.$user.'\' order by timestamp desc limit 20');
+ }
+
+ return $result;
+ }
+}
+
+
+
+?>
diff --git a/inc/lib_ocs.php b/lib/ocs.php
index 08b4b79ae91..08b4b79ae91 100644
--- a/inc/lib_ocs.php
+++ b/lib/ocs.php
diff --git a/inc/lib_plugin.php b/lib/plugin.php
index 04c21307726..0cec329ea35 100644
--- a/inc/lib_plugin.php
+++ b/lib/plugin.php
@@ -3,27 +3,27 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
class OC_PLUGIN{
static private $blacklist=array();
-
+
/**
* load the plugin with the given id
* @param string id
@@ -49,7 +49,7 @@ class OC_PLUGIN{
}
}
}
- //check for uninstalled db's
+ //check for uninstalled db's
if(isset($data['install']) and isset($data['install']['database'])){
foreach($data['install']['database'] as $db){
if(!$data['install']['database_installed'][$db]){
@@ -58,7 +58,7 @@ class OC_PLUGIN{
}
}
}
-
+
if(isset($data['runtime'])){
foreach($data['runtime'] as $include){
include($SERVERROOT.'/plugins/'.$id.'/'.$include);
@@ -67,7 +67,7 @@ class OC_PLUGIN{
}
return false;
}
-
+
/**
* Get a list of all installed plugins
*/
@@ -85,7 +85,7 @@ class OC_PLUGIN{
closedir($fd);
return $plugins;
}
-
+
/**
* Load all plugins that aren't blacklisted
*/
@@ -102,7 +102,7 @@ class OC_PLUGIN{
}
}
}
-
+
/**
* load the blacklist from blacklist.txt
* @return array
@@ -126,7 +126,7 @@ class OC_PLUGIN{
self::$blacklist=$blacklist;
return $blacklist;
}
-
+
/**
* save a blacklist to blacklist.txt
* @param array blacklist
@@ -140,7 +140,7 @@ class OC_PLUGIN{
self::$blacklist=$blacklist;
file_put_contents($SERVERROOT.'/plugins/blacklist.txt',$file);
}
-
+
/**
* add a plugin to the blacklist
* @param string id
@@ -153,7 +153,7 @@ class OC_PLUGIN{
self::saveBlacklist($blacklist);
}
}
-
+
/**
* remove a plugin to the blacklist
* @param string id
@@ -167,7 +167,7 @@ class OC_PLUGIN{
self::saveBlacklist($blacklist);
}
}
-
+
/**
* Load data from the plugin.xml of a plugin, either identified by the plugin or the path of the plugin.xml file
* @param string id
@@ -253,8 +253,8 @@ class OC_PLUGIN{
}
return $data;
}
-
-
+
+
/**
* Save data to the plugin.xml of a plugin, either identified by the plugin or the path of the plugin.xml file
* @param string id
@@ -329,7 +329,7 @@ class OC_PLUGIN{
}
$plugin->save($file);
}
-
+
/**
* install the databases of a plugin
* @param string id
@@ -348,7 +348,7 @@ class OC_PLUGIN{
self::savePluginData($id,$data);
return true;
}
-
+
public static function installPlugin($path){
global $SERVERROOT;
if(is_file($path)){
diff --git a/inc/lib_remotestorage.php b/lib/remotestorage.php
index ed90cf1fdaf..ed90cf1fdaf 100644
--- a/inc/lib_remotestorage.php
+++ b/lib/remotestorage.php
diff --git a/lib/template.php b/lib/template.php
new file mode 100644
index 00000000000..0541d55b124
--- /dev/null
+++ b/lib/template.php
@@ -0,0 +1,197 @@
+<?php
+
+/**
+* ownCloud
+*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+oc_require_once( "Smarty/Smarty.class.php" );
+
+/**
+ *
+ */
+function oc_template_helper_link_to( $params, $smarty ){
+ $app = "";
+ if( isset( $params["app"] ))
+ {
+ $app = $params["app"];
+ }
+ $file = $params["file"];
+ return OC_UTIL::linkTo( $app, $file );
+}
+
+/**
+ *
+ */
+function oc_template_helper_image_path( $params, $smarty ){
+ $app = "";
+ if( isset( $params["app"] ))
+ {
+ $app = $params["app"];
+ }
+ $file = $params["file"];
+ return OC_UTIL::imagePath( $app, $file );
+}
+
+class OC_TEMPLATE{
+ private $renderas; // Create a full page?
+ private $name; // name of the template
+ private $application; // template Application
+ private $smarty; // The smarty object
+
+ public function __construct( $application, $name, $renderas = "" ){
+ // Global vars we need
+ global $SERVERROOT;
+
+ $template_dir = "$SERVERROOT/templates/";
+ // Get the right template folder
+ if( $application != "core" ){
+ $template_dir = "$SERVERROOT/$application/templates/";
+ }
+
+ // Set the OC-defaults for Smarty
+ $smarty = new Smarty();
+ $smarty->left_delimiter = "[%";
+ $smarty->right_delimiter = "%]";
+ $smarty->template_dir = $template_dir;
+ $smarty->compile_dir = "$template_dir/_c";
+ $smarty->registerPlugin( "function", "linkto", "oc_template_helper_link_to");
+ $smarty->registerPlugin( "function", "imagepath", "oc_template_helper_image_path");
+
+ // Templates have the ending .tmpl
+ $name = "$name.tmpl";
+ // Set the private data
+ $this->renderas = $renderas;
+ $this->application = $application;
+ $this->name = $name;
+ $this->smarty = $smarty;
+ }
+
+ public function assign( $a, $b = null ){
+ $this->smarty->assign( $a, $b );
+ }
+
+ public function append( $a, $b = null ){
+ $this->smarty->append( $a, $b );
+ }
+
+ public function printPage()
+ {
+ $data = $this->fetchPage();
+ if( $data === false )
+ {
+ return false;
+ }
+ else
+ {
+ print $data;
+ return true;
+ }
+ }
+
+ public function fetchPage()
+ {
+ // global Data we need
+ global $WEBROOT;
+ $data = $this->smarty->fetch( $this->name );
+
+ if( $this->renderas )
+ {
+ // Decide which page we show
+ if( $this->renderas == "user" )
+ {
+ $page = new OC_TEMPLATE( "core", "layout.user" );
+ // Add menu data
+ }
+ elseif( $this->renderas == "admin" )
+ {
+ $page = new OC_TEMPLATE( "core", "layout.admin" );
+ // Add menu data
+ }
+ else
+ {
+ $page = new OC_TEMPLATE( "core", "layout.guest" );
+ // Add data if required
+ }
+
+ // Add the css and js files
+ foreach(OC_UTIL::$scripts as $script){
+ $page->append( "jsfiles", "$WEBROOT/$script.js" );
+ }
+ foreach(OC_UTIL::$styles as $style){
+ $page->append( "cssfiles", "$WEBROOT/$style.css" );
+ }
+
+ // Add navigation entry and personal menu
+ $page->assign( "navigation", OC_UTIL::$navigation );
+ $page->assign( "personalmenu", OC_UTIL::$personalmenu );
+
+ // Add css files and js files
+ $page->assign( "content", $data );
+ return $page->fetchPage();
+ }
+ else
+ {
+ return $data;
+ }
+ }
+ public function __destruct(){
+ }
+
+ /**
+ * @brief Shortcut to print a simple page for users
+ * @param $application The application we render the template for
+ * @param $name Name of the template
+ * @param $parameters Parameters for the template
+ * @returns true/false
+ */
+ public static function printUserPage( $application, $name, $parameters = array() ){
+ $content = new OC_TEMPLATE( $application, $name, "user" );
+ $content->assign( $parameters );
+ return $content->printPage();
+ }
+
+ /**
+ * @brief Shortcut to print a simple page for admins
+ * @param $application The application we render the template for
+ * @param $name Name of the template
+ * @param $parameters Parameters for the template
+ * @returns true/false
+ */
+ public static function printAdminPage( $application, $name, $parameters = array() ){
+ $content = new OC_TEMPLATE( $application, $name, "admin" );
+ $content->assign( $parameters );
+ return $content->printPage();
+ }
+
+ /**
+ * @brief Shortcut to print a simple page for guests
+ * @param $application The application we render the template for
+ * @param $name Name of the template
+ * @param $parameters Parameters for the template
+ * @returns true/false
+ */
+ public static function printGuestPage( $application, $name, $parameters = array() ){
+ $content = new OC_TEMPLATE( $application, $name, "guest" );
+ $content->assign( $parameters );
+ return $content->printPage();
+ }
+}
+
+?>
diff --git a/inc/lib_user.php b/lib/user.php
index f4bc913d46a..431d0bfc359 100644
--- a/inc/lib_user.php
+++ b/lib/user.php
@@ -3,22 +3,22 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
@@ -64,7 +64,7 @@ class OC_USER {
case 'database':
case 'mysql':
case 'sqlite':
- oc_require_once('inc/User/database.php');
+ oc_require_once('User/database.php');
self::$_backend = new OC_USER_DATABASE();
break;
default:
@@ -111,6 +111,14 @@ class OC_USER {
}
/**
+ * Kick the user
+ *
+ */
+ public static function logout() {
+ return self::$_backend->logout();
+ }
+
+ /**
* Check if the user is logged in
*
*/
@@ -230,7 +238,7 @@ class OC_USER {
public static function getUsers() {
return self::$_backend->getUsers();
}
-
+
/**
* get a list of all groups
*
diff --git a/log/appinfo.php b/log/appinfo.php
new file mode 100644
index 00000000000..e4ffa79efe1
--- /dev/null
+++ b/log/appinfo.php
@@ -0,0 +1,6 @@
+<?php
+
+OC_UTIL::addApplication( array( "id" => "log", "name" => "Log" ));
+OC_UTIL::addNavigationEntry( array( "app" => "log", "file" => "index.php", "name" => "Log" ));
+
+?>
diff --git a/log/index.php b/log/index.php
index da76d2e0e5b..58cc1f54021 100644
--- a/log/index.php
+++ b/log/index.php
@@ -1,31 +1,44 @@
<?php
/**
-* ownCloud
+* ownCloud - ajax frontend
+*
+* @author Robin Appelman
+* @copyright 2010 Robin Appelman icewind1991@gmail.com
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-require_once('../inc/lib_base.php');
+//require_once('../../config/config.php');
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
+}
+
+$logs=OC_LOG::get( $dir );
+
+foreach( $logs as &$i ){
+ $i["date"] = date( $CONFIG_DATEFORMAT, $i['timestamp'] );
+ $i["action"] = OC_LOG::$TYPE[$i['type']];
+}
-OC_UTIL::showheader();
-OC_LOG::show();
-OC_UTIL::showfooter();
+$tmpl = new OC_TEMPLATE( "log", "index", "user" );
+$tmpl->assign( "log", $logs );
+$tmpl->printPage();
?>
diff --git a/log/templates/_c/.gitkeep b/log/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/log/templates/_c/.gitkeep
diff --git a/log/templates/index.tmpl b/log/templates/index.tmpl
new file mode 100644
index 00000000000..64152ff20d8
--- /dev/null
+++ b/log/templates/index.tmpl
@@ -0,0 +1,46 @@
+<h1>Logs</h1>
+
+<div class="controls">
+ <form id="logs_options">
+ <p>
+ <span>Filter :</span>
+
+ <input type="checkbox" checked="checked" name="all" id="all" /> <label for="all">All</label>
+ <input type="checkbox" checked="checked" name="logins" id="logins" /> <label for="logins">Logins</label>
+ <input type="checkbox" checked="checked" name="logouts" id="logouts" /> <label for="logouts">Logouts</label>
+ <input type="checkbox" checked="checked" name="downloads" id="downloads" /> <label for="downloads">Downloads</label>
+ <input type="checkbox" checked="checked" name="uploads" id="uploads" /> <label for="uploads">Uploads</label>
+
+ <input type="checkbox" checked="checked" name="creations" id="creations" /> <label for="creations">Creations</label>
+ <input type="checkbox" checked="checked" name="deletions" id="deletions" /> <label for="deletions">Deletions</label>
+ </p>
+ <p>
+ <span>Show :</span>
+ <input type="text" maxlength="3" size="3" value="10" />&nbsp;entries per page.
+ <input type="submit" value="Save" />
+
+ </p>
+ </form>
+</div>
+
+<table cellspacing="0">
+ <thead>
+ <tr>
+ <th>What</th>
+ <th>When</th>
+
+ </tr>
+ </thead>
+ <tbody>
+ [%foreach $logs as $entry%]
+ <tr>
+ <td class="login"><em>[%$entry.user%]</em> [% $entry.message %]</td>
+ <td class="date">[%$entry.date%]</td>
+ </tr>
+ [%/foreach%]
+ </tbody>
+</table>
+
+<div class="controls">
+ <p class="center"><a href="" title="Previous page">&larr;</a>&nbsp;3/5&nbsp;<a href="" title="Next page">&rarr;</a></p>
+</div>
diff --git a/settings/appinfo.php b/settings/appinfo.php
new file mode 100644
index 00000000000..232aaa0f0e7
--- /dev/null
+++ b/settings/appinfo.php
@@ -0,0 +1,6 @@
+<?php
+
+OC_UTIL::addApplication( array( "id" => "settings", "name" => "Settings" ));
+OC_UTIL::addNavigationEntry( array( "app" => "settings", "file" => "index.php", "name" => "Settings" ));
+
+?>
diff --git a/settings/index.php b/settings/index.php
index 66fc20565a4..6d37180fcd1 100644
--- a/settings/index.php
+++ b/settings/index.php
@@ -1,47 +1,33 @@
<?php
-/**
-* ownCloud
-*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-
-$CONFIG_ERROR='';
-
-require_once('../inc/lib_base.php');
-
-
-OC_UTIL::showheader();
-
-$FIRSTRUN=false;
-
-OC_CONFIG::addForm('User Settings','/inc/templates/configform.php');
-if(OC_USER::ingroup($_SESSION['username'],'admin')){
- OC_CONFIG::addForm('System Settings','/inc/templates/adminform.php');
- OC_CONFIG::addForm('User Management','/inc/templates/userform.php');
- OC_CONFIG::addForm('Plugin Management','/inc/templates/pluginform.php');
+require_once('../lib/base.php');
+oc_require( 'template.php' );
+if( !OC_USER::isLoggedIn()){
+ header( "Location: ".OC_UTIL::linkto( "index.php" ));
+ exit();
}
-echo('<div class="center">');
-OC_CONFIG::showSettings();
-echo('</div>');
-
+$settings = array();
+
+// Do the work ...
+if( $_POST["submit"] )
+{
+ if( $_POST["newpassword"] != $_POST["newpasswordconfirm"] ){
+ // Say "Passwords not equal"
+ }
+ else{
+ if( OC_USER::checkPassword( $_SESSION["username"], $_POST["password"] )){
+ // Set password
+ OC_USER::setPassord( $_SESSION["username"], $_POST["newpassword"] );
+ }
+ else{
+ // Say "old password bad"
+ }
+ }
+}
-OC_UTIL::showfooter();
+$tmpl = new OC_TEMPLATE( "settings", "index", "user" );
+$tmpl->assign( "settings", $settings );
+$tmpl->printPage();
?>
diff --git a/settings/templates/_c/.gitkeep b/settings/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/settings/templates/_c/.gitkeep
diff --git a/settings/templates/index.tmpl b/settings/templates/index.tmpl
new file mode 100644
index 00000000000..b700ced4e3a
--- /dev/null
+++ b/settings/templates/index.tmpl
@@ -0,0 +1,19 @@
+<h1>Settings</h1>
+
+<form action="" type="">
+ <p>
+ <span>New password:</span>
+ <input type="password" name="newpassword" value="">
+ </p>
+ <p>
+ <span>Confirm new password:</span>
+ <input type="password" name="newpasswordconfirm" value="">
+ </p>
+ <p>
+ <span>Old password:</span>
+ <input type="password" name="password" value="">
+ </p>
+ <p>
+ <input type="submit" name="submit" value="Send">
+ </p>
+</form>
diff --git a/templates/_c/.gitkeep b/templates/_c/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/templates/_c/.gitkeep
diff --git a/templates/layout.admin.tmpl b/templates/layout.admin.tmpl
new file mode 100644
index 00000000000..5a31c6af0a3
--- /dev/null
+++ b/templates/layout.admin.tmpl
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="favicon.ico" />
+ [%foreach $cssfiles as $cssfile%]
+ <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" />
+ [%/foreach%]
+ [%foreach $jsfiles as $jsfile%]
+ <script type="text/javascript" src="[%$jsfile%]"></script>
+ [%/foreach%]
+ </head>
+
+ <body>
+ <div id="header">
+ <a href="/" title="" id="owncloud"><img src="[%imagepath file='owncloud-logo-small-white.png'%]" alt="ownCloud" /></a>
+
+ <div id="user">
+ <a id="user_menu_link" href="" title="">Username</a>
+ <ul id="user_menu">
+ [%foreach $personalmenu as $entry%]
+ <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li>
+ [%/foreach%]
+ </ul>
+ </div>
+ </div>
+
+ <div id="main">
+ <div id="plugins">
+ <ul>
+ [%foreach $navigation as $entry%]
+ <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li>
+ [%/foreach%]
+ </ul>
+ </div>
+
+ <div id="content">
+ [%$content%]
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/templates/layout.guest.tmpl b/templates/layout.guest.tmpl
new file mode 100644
index 00000000000..518ba9e771e
--- /dev/null
+++ b/templates/layout.guest.tmpl
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="favicon.ico" />
+ [%foreach $cssfiles as $cssfile%]
+ <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" />
+ [%/foreach%]
+ [%foreach $jsfiles as $jsfile%]
+ <script type="text/javascript" src="[%$jsfile%]"></script>
+ [%/foreach%]
+ </head>
+
+ <body class="login">
+ [%$content%]
+ <p class="info">ownCloud is an open personal cloud which runs on your personal server.<br />
+ To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>.</p>
+ </body>
+</html>
diff --git a/templates/layout.user.tmpl b/templates/layout.user.tmpl
new file mode 100644
index 00000000000..5a31c6af0a3
--- /dev/null
+++ b/templates/layout.user.tmpl
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>ownCloud</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="favicon.ico" />
+ [%foreach $cssfiles as $cssfile%]
+ <link rel="stylesheet" href="[%$cssfile%]" type="text/css" media="screen" />
+ [%/foreach%]
+ [%foreach $jsfiles as $jsfile%]
+ <script type="text/javascript" src="[%$jsfile%]"></script>
+ [%/foreach%]
+ </head>
+
+ <body>
+ <div id="header">
+ <a href="/" title="" id="owncloud"><img src="[%imagepath file='owncloud-logo-small-white.png'%]" alt="ownCloud" /></a>
+
+ <div id="user">
+ <a id="user_menu_link" href="" title="">Username</a>
+ <ul id="user_menu">
+ [%foreach $personalmenu as $entry%]
+ <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li>
+ [%/foreach%]
+ </ul>
+ </div>
+ </div>
+
+ <div id="main">
+ <div id="plugins">
+ <ul>
+ [%foreach $navigation as $entry%]
+ <li><a href="[%linkto app=$entry.app file=$entry.file%]" title="">[%$entry.name%]</a></li>
+ [%/foreach%]
+ </ul>
+ </div>
+
+ <div id="content">
+ [%$content%]
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/templates/login.tmpl b/templates/login.tmpl
new file mode 100644
index 00000000000..bfa975f630e
--- /dev/null
+++ b/templates/login.tmpl
@@ -0,0 +1,15 @@
+<div id="login">
+ <img src="[%imagepath file='owncloud-logo-medium-white.png'%]" alt="ownCloud" />
+ <form action="index.php" method="post">
+ <!-- <h1>Sign in :</h1> -->
+ <fieldset>
+ [%if $error%]
+ Login failed!
+ [%/if%]
+ <p><input type="text" name="user" value="" /></p>
+ <p><input type="password" name="password" /></p>
+ <p><input type="submit" value="Sign in" /></p>
+ </fieldset>
+ </form>
+</div>
+
diff --git a/templates/logout.tmpl b/templates/logout.tmpl
new file mode 100644
index 00000000000..4a15998a5c0
--- /dev/null
+++ b/templates/logout.tmpl
@@ -0,0 +1 @@
+You are logged out.
diff --git a/webdav/owncloud.php b/webdav.php
index fc9efa66498..6b2b0013d4e 100644
--- a/webdav/owncloud.php
+++ b/webdav.php
@@ -3,26 +3,26 @@
/**
* ownCloud
*
-* @author Frank Karlitschek
-* @copyright 2010 Frank Karlitschek karlitschek@kde.org
-*
+* @author Frank Karlitschek
+* @copyright 2010 Frank Karlitschek karlitschek@kde.org
+*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
+* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
-*
+*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
+*
+* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*
+*
*/
-require_once('../inc/lib_base.php');
+require_once('lib/base.php');
oc_require_once('HTTP/WebDAV/Server/Filesystem.php');
@@ -43,7 +43,7 @@ if(OC_USER::login($user,$passwd)){
$server = new HTTP_WebDAV_Server_Filesystem();
$server->db_name = $CONFIG_DBNAME;
$server->ServeRequest($CONFIG_DATADIRECTORY);
-
+
}else{
header('WWW-Authenticate: Basic realm="ownCloud"');
header('HTTP/1.0 401 Unauthorized');