diff --git a/README.md b/README.md index 0ad7448..71d43ae 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,6 @@ Web Console приложения использует Material Design 3 и вх Маршрут проверен на тестовой карточке, заранее добавленной в SQLite. Приложение в строке меню продолжает работать на Swift. -Обычная сборка включает оригинальный PHP из `server/original` и не требует Windows-установщика. Для проверки другой извлечённой копии укажите её каталог через `EZSERVER_RUNTIME`. +Обычная сборка включает PHP из `server/original` и не требует Windows-установщика. Комментарии удалены из PHP, лицензионные уведомления сохранены в `licenses.md` и в исходных файлах лицензий. Для проверки другой извлечённой копии укажите её каталог через `EZSERVER_RUNTIME`. Запуск PHP из готового приложения: `./EzServer.app/Contents/MacOS/EzServerMac --php`. Этот режим слушает loopback, по умолчанию порт 55005. Исполняемые файлы nginx, PHP и PHP-FPM берутся из системы. Запуск из строки меню использует Swift и порт 43112. diff --git a/licenses.md b/licenses.md new file mode 100644 index 0000000..1526a7e --- /dev/null +++ b/licenses.md @@ -0,0 +1,2998 @@ +# Лицензионные уведомления PHP-компонентов + +Уведомления из исходников EzServer 4.1.6 и его зависимостей. Пути указаны относительно `server/original`. + +~~~text +www/ezwebserver/src/application/config/autoload.php +www/ezwebserver/src/application/config/config.php +www/ezwebserver/src/application/config/config_settings.php +www/ezwebserver/src/application/config/constants.php +www/ezwebserver/src/application/config/database.php +www/ezwebserver/src/application/config/doctypes.php +www/ezwebserver/src/application/config/foreign_chars.php +www/ezwebserver/src/application/config/hooks.php +www/ezwebserver/src/application/config/memcached.php +www/ezwebserver/src/application/config/migration.php +www/ezwebserver/src/application/config/mimes.php +www/ezwebserver/src/application/config/profiler.php +www/ezwebserver/src/application/config/rest.php +www/ezwebserver/src/application/config/routes.php +www/ezwebserver/src/application/config/smileys.php +www/ezwebserver/src/application/config/testing/config.php +www/ezwebserver/src/application/config/user_agents.php +www/ezwebserver/src/application/config/vterror.php +www/ezwebserver/src/application/controllers/Rest_server.php +www/ezwebserver/src/application/controllers/Welcome.php +www/ezwebserver/src/application/controllers/v1/Analytics.php +www/ezwebserver/src/application/controllers/v1/Auth.php +www/ezwebserver/src/application/controllers/v1/Consultds.php +www/ezwebserver/src/application/controllers/v1/E2Ds.php +www/ezwebserver/src/application/controllers/v1/E3Ds.php +www/ezwebserver/src/application/controllers/v1/Fs.php +www/ezwebserver/src/application/controllers/v1/Implantds.php +www/ezwebserver/src/application/controllers/v1/Info.php +www/ezwebserver/src/application/controllers/v1/Iosensor.php +www/ezwebserver/src/application/controllers/v1/Orthods.php +www/ezwebserver/src/application/controllers/v1/Settings.php +www/ezwebserver/src/application/core/REST_Loader.php +www/ezwebserver/src/application/core/REST_Log.php +www/ezwebserver/src/application/helpers/error_helper.php +www/ezwebserver/src/application/helpers/fs_helper.php +www/ezwebserver/src/application/helpers/http_helper.php +www/ezwebserver/src/application/helpers/ini_helper.php +www/ezwebserver/src/application/helpers/model_helper.php +www/ezwebserver/src/application/helpers/type_helper.php +www/ezwebserver/src/application/helpers/vt_config_helper.php +www/ezwebserver/src/application/helpers/vt_image_file_helper.php +www/ezwebserver/src/application/helpers/vt_iosensor_helper.php +www/ezwebserver/src/application/helpers/vt_link_file_helper.php +www/ezwebserver/src/application/helpers/vt_log_helper.php +www/ezwebserver/src/application/helpers/vt_pg_json_helper.php +www/ezwebserver/src/application/helpers/vt_video_file_helper.php +www/ezwebserver/src/application/hooks/DisplayHook.php +www/ezwebserver/src/application/language/arabic/calendar_lang.php +www/ezwebserver/src/application/language/arabic/date_lang.php +www/ezwebserver/src/application/language/arabic/db_lang.php +www/ezwebserver/src/application/language/arabic/email_lang.php +www/ezwebserver/src/application/language/arabic/form_validation_lang.php +www/ezwebserver/src/application/language/arabic/ftp_lang.php +www/ezwebserver/src/application/language/arabic/imglib_lang.php +www/ezwebserver/src/application/language/arabic/migration_lang.php +www/ezwebserver/src/application/language/arabic/number_lang.php +www/ezwebserver/src/application/language/arabic/pagination_lang.php +www/ezwebserver/src/application/language/arabic/profiler_lang.php +www/ezwebserver/src/application/language/arabic/unit_test_lang.php +www/ezwebserver/src/application/language/arabic/upload_lang.php +www/ezwebserver/src/application/language/armenian/calendar_lang.php +www/ezwebserver/src/application/language/armenian/date_lang.php +www/ezwebserver/src/application/language/armenian/db_lang.php +www/ezwebserver/src/application/language/armenian/email_lang.php +www/ezwebserver/src/application/language/armenian/form_validation_lang.php +www/ezwebserver/src/application/language/armenian/ftp_lang.php +www/ezwebserver/src/application/language/armenian/imglib_lang.php +www/ezwebserver/src/application/language/armenian/migration_lang.php +www/ezwebserver/src/application/language/armenian/number_lang.php +www/ezwebserver/src/application/language/armenian/pagination_lang.php +www/ezwebserver/src/application/language/armenian/profiler_lang.php +www/ezwebserver/src/application/language/armenian/unit_test_lang.php +www/ezwebserver/src/application/language/armenian/upload_lang.php +www/ezwebserver/src/application/language/azerbaijani/calendar_lang.php +www/ezwebserver/src/application/language/azerbaijani/date_lang.php +www/ezwebserver/src/application/language/azerbaijani/db_lang.php +www/ezwebserver/src/application/language/azerbaijani/email_lang.php +www/ezwebserver/src/application/language/azerbaijani/form_validation_lang.php +www/ezwebserver/src/application/language/azerbaijani/ftp_lang.php +www/ezwebserver/src/application/language/azerbaijani/imglib_lang.php +www/ezwebserver/src/application/language/azerbaijani/migration_lang.php +www/ezwebserver/src/application/language/azerbaijani/number_lang.php +www/ezwebserver/src/application/language/azerbaijani/pagination_lang.php +www/ezwebserver/src/application/language/azerbaijani/profiler_lang.php +www/ezwebserver/src/application/language/azerbaijani/unit_test_lang.php +www/ezwebserver/src/application/language/azerbaijani/upload_lang.php +www/ezwebserver/src/application/language/bengali/calendar_lang.php +www/ezwebserver/src/application/language/bengali/date_lang.php +www/ezwebserver/src/application/language/bengali/db_lang.php +www/ezwebserver/src/application/language/bengali/email_lang.php +www/ezwebserver/src/application/language/bengali/form_validation_lang.php +www/ezwebserver/src/application/language/bengali/ftp_lang.php +www/ezwebserver/src/application/language/bengali/imglib_lang.php +www/ezwebserver/src/application/language/bengali/migration_lang.php +www/ezwebserver/src/application/language/bengali/number_lang.php +www/ezwebserver/src/application/language/bengali/pagination_lang.php +www/ezwebserver/src/application/language/bengali/profiler_lang.php +www/ezwebserver/src/application/language/bengali/unit_test_lang.php +www/ezwebserver/src/application/language/bengali/upload_lang.php +www/ezwebserver/src/application/language/bulgarian/calendar_lang.php +www/ezwebserver/src/application/language/bulgarian/date_lang.php +www/ezwebserver/src/application/language/bulgarian/db_lang.php +www/ezwebserver/src/application/language/bulgarian/email_lang.php +www/ezwebserver/src/application/language/bulgarian/form_validation_lang.php +www/ezwebserver/src/application/language/bulgarian/ftp_lang.php +www/ezwebserver/src/application/language/bulgarian/imglib_lang.php +www/ezwebserver/src/application/language/bulgarian/migration_lang.php +www/ezwebserver/src/application/language/bulgarian/number_lang.php +www/ezwebserver/src/application/language/bulgarian/pagination_lang.php +www/ezwebserver/src/application/language/bulgarian/profiler_lang.php +www/ezwebserver/src/application/language/bulgarian/rest_controller_lang.php +www/ezwebserver/src/application/language/bulgarian/unit_test_lang.php +www/ezwebserver/src/application/language/bulgarian/upload_lang.php +www/ezwebserver/src/application/language/catalan/calendar_lang.php +www/ezwebserver/src/application/language/catalan/date_lang.php +www/ezwebserver/src/application/language/catalan/db_lang.php +www/ezwebserver/src/application/language/catalan/email_lang.php +www/ezwebserver/src/application/language/catalan/form_validation_lang.php +www/ezwebserver/src/application/language/catalan/ftp_lang.php +www/ezwebserver/src/application/language/catalan/imglib_lang.php +www/ezwebserver/src/application/language/catalan/migration_lang.php +www/ezwebserver/src/application/language/catalan/number_lang.php +www/ezwebserver/src/application/language/catalan/pagination_lang.php +www/ezwebserver/src/application/language/catalan/profiler_lang.php +www/ezwebserver/src/application/language/catalan/unit_test_lang.php +www/ezwebserver/src/application/language/catalan/upload_lang.php +www/ezwebserver/src/application/language/czech/calendar_lang.php +www/ezwebserver/src/application/language/czech/date_lang.php +www/ezwebserver/src/application/language/czech/db_lang.php +www/ezwebserver/src/application/language/czech/email_lang.php +www/ezwebserver/src/application/language/czech/form_validation_lang.php +www/ezwebserver/src/application/language/czech/ftp_lang.php +www/ezwebserver/src/application/language/czech/imglib_lang.php +www/ezwebserver/src/application/language/czech/migration_lang.php +www/ezwebserver/src/application/language/czech/number_lang.php +www/ezwebserver/src/application/language/czech/pagination_lang.php +www/ezwebserver/src/application/language/czech/profiler_lang.php +www/ezwebserver/src/application/language/czech/unit_test_lang.php +www/ezwebserver/src/application/language/czech/upload_lang.php +www/ezwebserver/src/application/language/dutch/calendar_lang.php +www/ezwebserver/src/application/language/dutch/date_lang.php +www/ezwebserver/src/application/language/dutch/db_lang.php +www/ezwebserver/src/application/language/dutch/email_lang.php +www/ezwebserver/src/application/language/dutch/form_validation_lang.php +www/ezwebserver/src/application/language/dutch/ftp_lang.php +www/ezwebserver/src/application/language/dutch/imglib_lang.php +www/ezwebserver/src/application/language/dutch/migration_lang.php +www/ezwebserver/src/application/language/dutch/number_lang.php +www/ezwebserver/src/application/language/dutch/pagination_lang.php +www/ezwebserver/src/application/language/dutch/profiler_lang.php +www/ezwebserver/src/application/language/dutch/unit_test_lang.php +www/ezwebserver/src/application/language/dutch/upload_lang.php +www/ezwebserver/src/application/language/english/rest_controller_lang.php +www/ezwebserver/src/application/language/filipino/calendar_lang.php +www/ezwebserver/src/application/language/filipino/date_lang.php +www/ezwebserver/src/application/language/filipino/db_lang.php +www/ezwebserver/src/application/language/filipino/email_lang.php +www/ezwebserver/src/application/language/filipino/form_validation_lang.php +www/ezwebserver/src/application/language/filipino/ftp_lang.php +www/ezwebserver/src/application/language/filipino/imglib_lang.php +www/ezwebserver/src/application/language/filipino/migration_lang.php +www/ezwebserver/src/application/language/filipino/number_lang.php +www/ezwebserver/src/application/language/filipino/pagination_lang.php +www/ezwebserver/src/application/language/filipino/profiler_lang.php +www/ezwebserver/src/application/language/filipino/unit_test_lang.php +www/ezwebserver/src/application/language/filipino/upload_lang.php +www/ezwebserver/src/application/language/french/calendar_lang.php +www/ezwebserver/src/application/language/french/date_lang.php +www/ezwebserver/src/application/language/french/db_lang.php +www/ezwebserver/src/application/language/french/email_lang.php +www/ezwebserver/src/application/language/french/form_validation_lang.php +www/ezwebserver/src/application/language/french/ftp_lang.php +www/ezwebserver/src/application/language/french/imglib_lang.php +www/ezwebserver/src/application/language/french/migration_lang.php +www/ezwebserver/src/application/language/french/number_lang.php +www/ezwebserver/src/application/language/french/pagination_lang.php +www/ezwebserver/src/application/language/french/profiler_lang.php +www/ezwebserver/src/application/language/french/rest_controller_lang.php +www/ezwebserver/src/application/language/french/unit_test_lang.php +www/ezwebserver/src/application/language/french/upload_lang.php +www/ezwebserver/src/application/language/german/calendar_lang.php +www/ezwebserver/src/application/language/german/date_lang.php +www/ezwebserver/src/application/language/german/db_lang.php +www/ezwebserver/src/application/language/german/email_lang.php +www/ezwebserver/src/application/language/german/form_validation_lang.php +www/ezwebserver/src/application/language/german/ftp_lang.php +www/ezwebserver/src/application/language/german/imglib_lang.php +www/ezwebserver/src/application/language/german/migration_lang.php +www/ezwebserver/src/application/language/german/number_lang.php +www/ezwebserver/src/application/language/german/pagination_lang.php +www/ezwebserver/src/application/language/german/profiler_lang.php +www/ezwebserver/src/application/language/german/rest_controller_lang.php +www/ezwebserver/src/application/language/german/unit_test_lang.php +www/ezwebserver/src/application/language/german/upload_lang.php +www/ezwebserver/src/application/language/greek/calendar_lang.php +www/ezwebserver/src/application/language/greek/date_lang.php +www/ezwebserver/src/application/language/greek/db_lang.php +www/ezwebserver/src/application/language/greek/email_lang.php +www/ezwebserver/src/application/language/greek/form_validation_lang.php +www/ezwebserver/src/application/language/greek/ftp_lang.php +www/ezwebserver/src/application/language/greek/imglib_lang.php +www/ezwebserver/src/application/language/greek/migration_lang.php +www/ezwebserver/src/application/language/greek/number_lang.php +www/ezwebserver/src/application/language/greek/pagination_lang.php +www/ezwebserver/src/application/language/greek/profiler_lang.php +www/ezwebserver/src/application/language/greek/rest_controller_lang.php +www/ezwebserver/src/application/language/greek/unit_test_lang.php +www/ezwebserver/src/application/language/greek/upload_lang.php +www/ezwebserver/src/application/language/gujarati/calendar_lang.php +www/ezwebserver/src/application/language/gujarati/date_lang.php +www/ezwebserver/src/application/language/gujarati/db_lang.php +www/ezwebserver/src/application/language/gujarati/email_lang.php +www/ezwebserver/src/application/language/gujarati/form_validation_lang.php +www/ezwebserver/src/application/language/gujarati/ftp_lang.php +www/ezwebserver/src/application/language/gujarati/imglib_lang.php +www/ezwebserver/src/application/language/gujarati/migration_lang.php +www/ezwebserver/src/application/language/gujarati/number_lang.php +www/ezwebserver/src/application/language/gujarati/pagination_lang.php +www/ezwebserver/src/application/language/gujarati/profiler_lang.php +www/ezwebserver/src/application/language/gujarati/unit_test_lang.php +www/ezwebserver/src/application/language/gujarati/upload_lang.php +www/ezwebserver/src/application/language/hindi/calendar_lang.php +www/ezwebserver/src/application/language/hindi/date_lang.php +www/ezwebserver/src/application/language/hindi/db_lang.php +www/ezwebserver/src/application/language/hindi/email_lang.php +www/ezwebserver/src/application/language/hindi/form_validation_lang.php +www/ezwebserver/src/application/language/hindi/ftp_lang.php +www/ezwebserver/src/application/language/hindi/imglib_lang.php +www/ezwebserver/src/application/language/hindi/migration_lang.php +www/ezwebserver/src/application/language/hindi/number_lang.php +www/ezwebserver/src/application/language/hindi/pagination_lang.php +www/ezwebserver/src/application/language/hindi/profiler_lang.php +www/ezwebserver/src/application/language/hindi/unit_test_lang.php +www/ezwebserver/src/application/language/hindi/upload_lang.php +www/ezwebserver/src/application/language/hungarian/calendar_lang.php +www/ezwebserver/src/application/language/hungarian/date_lang.php +www/ezwebserver/src/application/language/hungarian/db_lang.php +www/ezwebserver/src/application/language/hungarian/email_lang.php +www/ezwebserver/src/application/language/hungarian/form_validation_lang.php +www/ezwebserver/src/application/language/hungarian/ftp_lang.php +www/ezwebserver/src/application/language/hungarian/imglib_lang.php +www/ezwebserver/src/application/language/hungarian/migration_lang.php +www/ezwebserver/src/application/language/hungarian/number_lang.php +www/ezwebserver/src/application/language/hungarian/pagination_lang.php +www/ezwebserver/src/application/language/hungarian/profiler_lang.php +www/ezwebserver/src/application/language/hungarian/unit_test_lang.php +www/ezwebserver/src/application/language/hungarian/upload_lang.php +www/ezwebserver/src/application/language/indonesian/calendar_lang.php +www/ezwebserver/src/application/language/indonesian/date_lang.php +www/ezwebserver/src/application/language/indonesian/db_lang.php +www/ezwebserver/src/application/language/indonesian/email_lang.php +www/ezwebserver/src/application/language/indonesian/form_validation_lang.php +www/ezwebserver/src/application/language/indonesian/ftp_lang.php +www/ezwebserver/src/application/language/indonesian/imglib_lang.php +www/ezwebserver/src/application/language/indonesian/migration_lang.php +www/ezwebserver/src/application/language/indonesian/number_lang.php +www/ezwebserver/src/application/language/indonesian/pagination_lang.php +www/ezwebserver/src/application/language/indonesian/profiler_lang.php +www/ezwebserver/src/application/language/indonesian/unit_test_lang.php +www/ezwebserver/src/application/language/indonesian/upload_lang.php +www/ezwebserver/src/application/language/italian/calendar_lang.php +www/ezwebserver/src/application/language/italian/date_lang.php +www/ezwebserver/src/application/language/italian/db_lang.php +www/ezwebserver/src/application/language/italian/email_lang.php +www/ezwebserver/src/application/language/italian/form_validation_lang.php +www/ezwebserver/src/application/language/italian/ftp_lang.php +www/ezwebserver/src/application/language/italian/imglib_lang.php +www/ezwebserver/src/application/language/italian/migration_lang.php +www/ezwebserver/src/application/language/italian/number_lang.php +www/ezwebserver/src/application/language/italian/pagination_lang.php +www/ezwebserver/src/application/language/italian/profiler_lang.php +www/ezwebserver/src/application/language/italian/unit_test_lang.php +www/ezwebserver/src/application/language/italian/upload_lang.php +www/ezwebserver/src/application/language/japanese/calendar_lang.php +www/ezwebserver/src/application/language/japanese/date_lang.php +www/ezwebserver/src/application/language/japanese/db_lang.php +www/ezwebserver/src/application/language/japanese/email_lang.php +www/ezwebserver/src/application/language/japanese/form_validation_lang.php +www/ezwebserver/src/application/language/japanese/ftp_lang.php +www/ezwebserver/src/application/language/japanese/imglib_lang.php +www/ezwebserver/src/application/language/japanese/migration_lang.php +www/ezwebserver/src/application/language/japanese/number_lang.php +www/ezwebserver/src/application/language/japanese/pagination_lang.php +www/ezwebserver/src/application/language/japanese/profiler_lang.php +www/ezwebserver/src/application/language/japanese/unit_test_lang.php +www/ezwebserver/src/application/language/japanese/upload_lang.php +www/ezwebserver/src/application/language/khmer/calendar_lang.php +www/ezwebserver/src/application/language/khmer/date_lang.php +www/ezwebserver/src/application/language/khmer/db_lang.php +www/ezwebserver/src/application/language/khmer/email_lang.php +www/ezwebserver/src/application/language/khmer/form_validation_lang.php +www/ezwebserver/src/application/language/khmer/ftp_lang.php +www/ezwebserver/src/application/language/khmer/imglib_lang.php +www/ezwebserver/src/application/language/khmer/migration_lang.php +www/ezwebserver/src/application/language/khmer/number_lang.php +www/ezwebserver/src/application/language/khmer/pagination_lang.php +www/ezwebserver/src/application/language/khmer/profiler_lang.php +www/ezwebserver/src/application/language/khmer/unit_test_lang.php +www/ezwebserver/src/application/language/khmer/upload_lang.php +www/ezwebserver/src/application/language/korean/calendar_lang.php +www/ezwebserver/src/application/language/korean/date_lang.php +www/ezwebserver/src/application/language/korean/db_lang.php +www/ezwebserver/src/application/language/korean/email_lang.php +www/ezwebserver/src/application/language/korean/form_validation_lang.php +www/ezwebserver/src/application/language/korean/ftp_lang.php +www/ezwebserver/src/application/language/korean/imglib_lang.php +www/ezwebserver/src/application/language/korean/migration_lang.php +www/ezwebserver/src/application/language/korean/number_lang.php +www/ezwebserver/src/application/language/korean/pagination_lang.php +www/ezwebserver/src/application/language/korean/profiler_lang.php +www/ezwebserver/src/application/language/korean/unit_test_lang.php +www/ezwebserver/src/application/language/korean/upload_lang.php +www/ezwebserver/src/application/language/latvian/calendar_lang.php +www/ezwebserver/src/application/language/latvian/date_lang.php +www/ezwebserver/src/application/language/latvian/db_lang.php +www/ezwebserver/src/application/language/latvian/email_lang.php +www/ezwebserver/src/application/language/latvian/form_validation_lang.php +www/ezwebserver/src/application/language/latvian/ftp_lang.php +www/ezwebserver/src/application/language/latvian/imglib_lang.php +www/ezwebserver/src/application/language/latvian/migration_lang.php +www/ezwebserver/src/application/language/latvian/number_lang.php +www/ezwebserver/src/application/language/latvian/pagination_lang.php +www/ezwebserver/src/application/language/latvian/profiler_lang.php +www/ezwebserver/src/application/language/latvian/unit_test_lang.php +www/ezwebserver/src/application/language/latvian/upload_lang.php +www/ezwebserver/src/application/language/lithuanian/calendar_lang.php +www/ezwebserver/src/application/language/lithuanian/date_lang.php +www/ezwebserver/src/application/language/lithuanian/db_lang.php +www/ezwebserver/src/application/language/lithuanian/email_lang.php +www/ezwebserver/src/application/language/lithuanian/form_validation_lang.php +www/ezwebserver/src/application/language/lithuanian/ftp_lang.php +www/ezwebserver/src/application/language/lithuanian/imglib_lang.php +www/ezwebserver/src/application/language/lithuanian/migration_lang.php +www/ezwebserver/src/application/language/lithuanian/number_lang.php +www/ezwebserver/src/application/language/lithuanian/pagination_lang.php +www/ezwebserver/src/application/language/lithuanian/profiler_lang.php +www/ezwebserver/src/application/language/lithuanian/unit_test_lang.php +www/ezwebserver/src/application/language/lithuanian/upload_lang.php +www/ezwebserver/src/application/language/norwegian/calendar_lang.php +www/ezwebserver/src/application/language/norwegian/date_lang.php +www/ezwebserver/src/application/language/norwegian/db_lang.php +www/ezwebserver/src/application/language/norwegian/email_lang.php +www/ezwebserver/src/application/language/norwegian/form_validation_lang.php +www/ezwebserver/src/application/language/norwegian/ftp_lang.php +www/ezwebserver/src/application/language/norwegian/imglib_lang.php +www/ezwebserver/src/application/language/norwegian/migration_lang.php +www/ezwebserver/src/application/language/norwegian/number_lang.php +www/ezwebserver/src/application/language/norwegian/pagination_lang.php +www/ezwebserver/src/application/language/norwegian/profiler_lang.php +www/ezwebserver/src/application/language/norwegian/unit_test_lang.php +www/ezwebserver/src/application/language/norwegian/upload_lang.php +www/ezwebserver/src/application/language/persian/calendar_lang.php +www/ezwebserver/src/application/language/persian/date_lang.php +www/ezwebserver/src/application/language/persian/db_lang.php +www/ezwebserver/src/application/language/persian/email_lang.php +www/ezwebserver/src/application/language/persian/form_validation_lang.php +www/ezwebserver/src/application/language/persian/ftp_lang.php +www/ezwebserver/src/application/language/persian/imglib_lang.php +www/ezwebserver/src/application/language/persian/migration_lang.php +www/ezwebserver/src/application/language/persian/number_lang.php +www/ezwebserver/src/application/language/persian/pagination_lang.php +www/ezwebserver/src/application/language/persian/profiler_lang.php +www/ezwebserver/src/application/language/persian/unit_test_lang.php +www/ezwebserver/src/application/language/persian/upload_lang.php +www/ezwebserver/src/application/language/polish/calendar_lang.php +www/ezwebserver/src/application/language/polish/date_lang.php +www/ezwebserver/src/application/language/polish/db_lang.php +www/ezwebserver/src/application/language/polish/email_lang.php +www/ezwebserver/src/application/language/polish/form_validation_lang.php +www/ezwebserver/src/application/language/polish/ftp_lang.php +www/ezwebserver/src/application/language/polish/imglib_lang.php +www/ezwebserver/src/application/language/polish/migration_lang.php +www/ezwebserver/src/application/language/polish/number_lang.php +www/ezwebserver/src/application/language/polish/pagination_lang.php +www/ezwebserver/src/application/language/polish/profiler_lang.php +www/ezwebserver/src/application/language/polish/unit_test_lang.php +www/ezwebserver/src/application/language/polish/upload_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/calendar_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/date_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/db_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/email_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/form_validation_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/ftp_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/imglib_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/migration_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/number_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/pagination_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/profiler_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/rest_controller_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/unit_test_lang.php +www/ezwebserver/src/application/language/portuguese-brazilian/upload_lang.php +www/ezwebserver/src/application/language/portuguese/calendar_lang.php +www/ezwebserver/src/application/language/portuguese/date_lang.php +www/ezwebserver/src/application/language/portuguese/db_lang.php +www/ezwebserver/src/application/language/portuguese/email_lang.php +www/ezwebserver/src/application/language/portuguese/form_validation_lang.php +www/ezwebserver/src/application/language/portuguese/ftp_lang.php +www/ezwebserver/src/application/language/portuguese/imglib_lang.php +www/ezwebserver/src/application/language/portuguese/migration_lang.php +www/ezwebserver/src/application/language/portuguese/number_lang.php +www/ezwebserver/src/application/language/portuguese/pagination_lang.php +www/ezwebserver/src/application/language/portuguese/profiler_lang.php +www/ezwebserver/src/application/language/portuguese/unit_test_lang.php +www/ezwebserver/src/application/language/portuguese/upload_lang.php +www/ezwebserver/src/application/language/romanian/calendar_lang.php +www/ezwebserver/src/application/language/romanian/date_lang.php +www/ezwebserver/src/application/language/romanian/db_lang.php +www/ezwebserver/src/application/language/romanian/email_lang.php +www/ezwebserver/src/application/language/romanian/form_validation_lang.php +www/ezwebserver/src/application/language/romanian/ftp_lang.php +www/ezwebserver/src/application/language/romanian/imglib_lang.php +www/ezwebserver/src/application/language/romanian/migration_lang.php +www/ezwebserver/src/application/language/romanian/number_lang.php +www/ezwebserver/src/application/language/romanian/pagination_lang.php +www/ezwebserver/src/application/language/romanian/profiler_lang.php +www/ezwebserver/src/application/language/romanian/rest_controller_lang.php +www/ezwebserver/src/application/language/romanian/unit_test_lang.php +www/ezwebserver/src/application/language/romanian/upload_lang.php +www/ezwebserver/src/application/language/russian/calendar_lang.php +www/ezwebserver/src/application/language/russian/date_lang.php +www/ezwebserver/src/application/language/russian/db_lang.php +www/ezwebserver/src/application/language/russian/email_lang.php +www/ezwebserver/src/application/language/russian/form_validation_lang.php +www/ezwebserver/src/application/language/russian/ftp_lang.php +www/ezwebserver/src/application/language/russian/imglib_lang.php +www/ezwebserver/src/application/language/russian/migration_lang.php +www/ezwebserver/src/application/language/russian/number_lang.php +www/ezwebserver/src/application/language/russian/pagination_lang.php +www/ezwebserver/src/application/language/russian/profiler_lang.php +www/ezwebserver/src/application/language/russian/unit_test_lang.php +www/ezwebserver/src/application/language/russian/upload_lang.php +www/ezwebserver/src/application/language/serbian/calendar_lang.php +www/ezwebserver/src/application/language/serbian/date_lang.php +www/ezwebserver/src/application/language/serbian/db_lang.php +www/ezwebserver/src/application/language/serbian/email_lang.php +www/ezwebserver/src/application/language/serbian/form_validation_lang.php +www/ezwebserver/src/application/language/serbian/ftp_lang.php +www/ezwebserver/src/application/language/serbian/imglib_lang.php +www/ezwebserver/src/application/language/serbian/migration_lang.php +www/ezwebserver/src/application/language/serbian/number_lang.php +www/ezwebserver/src/application/language/serbian/pagination_lang.php +www/ezwebserver/src/application/language/serbian/profiler_lang.php +www/ezwebserver/src/application/language/serbian/unit_test_lang.php +www/ezwebserver/src/application/language/serbian/upload_lang.php +www/ezwebserver/src/application/language/serbian_cyr/rest_controller_lang.php +www/ezwebserver/src/application/language/serbian_lat/rest_controller_lang.php +www/ezwebserver/src/application/language/simplified-chinese/calendar_lang.php +www/ezwebserver/src/application/language/simplified-chinese/date_lang.php +www/ezwebserver/src/application/language/simplified-chinese/db_lang.php +www/ezwebserver/src/application/language/simplified-chinese/email_lang.php +www/ezwebserver/src/application/language/simplified-chinese/form_validation_lang.php +www/ezwebserver/src/application/language/simplified-chinese/ftp_lang.php +www/ezwebserver/src/application/language/simplified-chinese/imglib_lang.php +www/ezwebserver/src/application/language/simplified-chinese/migration_lang.php +www/ezwebserver/src/application/language/simplified-chinese/number_lang.php +www/ezwebserver/src/application/language/simplified-chinese/pagination_lang.php +www/ezwebserver/src/application/language/simplified-chinese/profiler_lang.php +www/ezwebserver/src/application/language/simplified-chinese/rest_controller_lang.php +www/ezwebserver/src/application/language/simplified-chinese/unit_test_lang.php +www/ezwebserver/src/application/language/simplified-chinese/upload_lang.php +www/ezwebserver/src/application/language/slovak/calendar_lang.php +www/ezwebserver/src/application/language/slovak/date_lang.php +www/ezwebserver/src/application/language/slovak/db_lang.php +www/ezwebserver/src/application/language/slovak/email_lang.php +www/ezwebserver/src/application/language/slovak/form_validation_lang.php +www/ezwebserver/src/application/language/slovak/ftp_lang.php +www/ezwebserver/src/application/language/slovak/imglib_lang.php +www/ezwebserver/src/application/language/slovak/migration_lang.php +www/ezwebserver/src/application/language/slovak/number_lang.php +www/ezwebserver/src/application/language/slovak/pagination_lang.php +www/ezwebserver/src/application/language/slovak/profiler_lang.php +www/ezwebserver/src/application/language/slovak/unit_test_lang.php +www/ezwebserver/src/application/language/slovak/upload_lang.php +www/ezwebserver/src/application/language/slovenian/calendar_lang.php +www/ezwebserver/src/application/language/slovenian/date_lang.php +www/ezwebserver/src/application/language/slovenian/db_lang.php +www/ezwebserver/src/application/language/slovenian/email_lang.php +www/ezwebserver/src/application/language/slovenian/form_validation_lang.php +www/ezwebserver/src/application/language/slovenian/ftp_lang.php +www/ezwebserver/src/application/language/slovenian/imglib_lang.php +www/ezwebserver/src/application/language/slovenian/migration_lang.php +www/ezwebserver/src/application/language/slovenian/number_lang.php +www/ezwebserver/src/application/language/slovenian/pagination_lang.php +www/ezwebserver/src/application/language/slovenian/profiler_lang.php +www/ezwebserver/src/application/language/slovenian/unit_test_lang.php +www/ezwebserver/src/application/language/slovenian/upload_lang.php +www/ezwebserver/src/application/language/spanish/calendar_lang.php +www/ezwebserver/src/application/language/spanish/date_lang.php +www/ezwebserver/src/application/language/spanish/db_lang.php +www/ezwebserver/src/application/language/spanish/email_lang.php +www/ezwebserver/src/application/language/spanish/form_validation_lang.php +www/ezwebserver/src/application/language/spanish/ftp_lang.php +www/ezwebserver/src/application/language/spanish/imglib_lang.php +www/ezwebserver/src/application/language/spanish/migration_lang.php +www/ezwebserver/src/application/language/spanish/number_lang.php +www/ezwebserver/src/application/language/spanish/pagination_lang.php +www/ezwebserver/src/application/language/spanish/profiler_lang.php +www/ezwebserver/src/application/language/spanish/rest_controller_lang.php +www/ezwebserver/src/application/language/spanish/unit_test_lang.php +www/ezwebserver/src/application/language/spanish/upload_lang.php +www/ezwebserver/src/application/language/swedish/calendar_lang.php +www/ezwebserver/src/application/language/swedish/date_lang.php +www/ezwebserver/src/application/language/swedish/db_lang.php +www/ezwebserver/src/application/language/swedish/email_lang.php +www/ezwebserver/src/application/language/swedish/form_validation_lang.php +www/ezwebserver/src/application/language/swedish/ftp_lang.php +www/ezwebserver/src/application/language/swedish/imglib_lang.php +www/ezwebserver/src/application/language/swedish/migration_lang.php +www/ezwebserver/src/application/language/swedish/number_lang.php +www/ezwebserver/src/application/language/swedish/pagination_lang.php +www/ezwebserver/src/application/language/swedish/profiler_lang.php +www/ezwebserver/src/application/language/swedish/unit_test_lang.php +www/ezwebserver/src/application/language/swedish/upload_lang.php +www/ezwebserver/src/application/language/tamil/calendar_lang.php +www/ezwebserver/src/application/language/tamil/date_lang.php +www/ezwebserver/src/application/language/tamil/db_lang.php +www/ezwebserver/src/application/language/tamil/email_lang.php +www/ezwebserver/src/application/language/tamil/form_validation_lang.php +www/ezwebserver/src/application/language/tamil/ftp_lang.php +www/ezwebserver/src/application/language/tamil/imglib_lang.php +www/ezwebserver/src/application/language/tamil/migration_lang.php +www/ezwebserver/src/application/language/tamil/number_lang.php +www/ezwebserver/src/application/language/tamil/pagination_lang.php +www/ezwebserver/src/application/language/tamil/profiler_lang.php +www/ezwebserver/src/application/language/tamil/unit_test_lang.php +www/ezwebserver/src/application/language/tamil/upload_lang.php +www/ezwebserver/src/application/language/thai/calendar_lang.php +www/ezwebserver/src/application/language/thai/date_lang.php +www/ezwebserver/src/application/language/thai/db_lang.php +www/ezwebserver/src/application/language/thai/email_lang.php +www/ezwebserver/src/application/language/thai/form_validation_lang.php +www/ezwebserver/src/application/language/thai/ftp_lang.php +www/ezwebserver/src/application/language/thai/imglib_lang.php +www/ezwebserver/src/application/language/thai/migration_lang.php +www/ezwebserver/src/application/language/thai/number_lang.php +www/ezwebserver/src/application/language/thai/pagination_lang.php +www/ezwebserver/src/application/language/thai/profiler_lang.php +www/ezwebserver/src/application/language/thai/unit_test_lang.php +www/ezwebserver/src/application/language/thai/upload_lang.php +www/ezwebserver/src/application/language/traditional-chinese/calendar_lang.php +www/ezwebserver/src/application/language/traditional-chinese/date_lang.php +www/ezwebserver/src/application/language/traditional-chinese/db_lang.php +www/ezwebserver/src/application/language/traditional-chinese/email_lang.php +www/ezwebserver/src/application/language/traditional-chinese/form_validation_lang.php +www/ezwebserver/src/application/language/traditional-chinese/ftp_lang.php +www/ezwebserver/src/application/language/traditional-chinese/imglib_lang.php +www/ezwebserver/src/application/language/traditional-chinese/migration_lang.php +www/ezwebserver/src/application/language/traditional-chinese/number_lang.php +www/ezwebserver/src/application/language/traditional-chinese/pagination_lang.php +www/ezwebserver/src/application/language/traditional-chinese/profiler_lang.php +www/ezwebserver/src/application/language/traditional-chinese/rest_controller_lang.php +www/ezwebserver/src/application/language/traditional-chinese/unit_test_lang.php +www/ezwebserver/src/application/language/traditional-chinese/upload_lang.php +www/ezwebserver/src/application/language/turkish/calendar_lang.php +www/ezwebserver/src/application/language/turkish/date_lang.php +www/ezwebserver/src/application/language/turkish/db_lang.php +www/ezwebserver/src/application/language/turkish/email_lang.php +www/ezwebserver/src/application/language/turkish/form_validation_lang.php +www/ezwebserver/src/application/language/turkish/ftp_lang.php +www/ezwebserver/src/application/language/turkish/imglib_lang.php +www/ezwebserver/src/application/language/turkish/migration_lang.php +www/ezwebserver/src/application/language/turkish/number_lang.php +www/ezwebserver/src/application/language/turkish/pagination_lang.php +www/ezwebserver/src/application/language/turkish/profiler_lang.php +www/ezwebserver/src/application/language/turkish/rest_controller_lang.php +www/ezwebserver/src/application/language/turkish/unit_test_lang.php +www/ezwebserver/src/application/language/turkish/upload_lang.php +www/ezwebserver/src/application/language/ukrainian/calendar_lang.php +www/ezwebserver/src/application/language/ukrainian/date_lang.php +www/ezwebserver/src/application/language/ukrainian/db_lang.php +www/ezwebserver/src/application/language/ukrainian/email_lang.php +www/ezwebserver/src/application/language/ukrainian/form_validation_lang.php +www/ezwebserver/src/application/language/ukrainian/ftp_lang.php +www/ezwebserver/src/application/language/ukrainian/imglib_lang.php +www/ezwebserver/src/application/language/ukrainian/migration_lang.php +www/ezwebserver/src/application/language/ukrainian/number_lang.php +www/ezwebserver/src/application/language/ukrainian/pagination_lang.php +www/ezwebserver/src/application/language/ukrainian/profiler_lang.php +www/ezwebserver/src/application/language/ukrainian/unit_test_lang.php +www/ezwebserver/src/application/language/ukrainian/upload_lang.php +www/ezwebserver/src/application/language/urdu/calendar_lang.php +www/ezwebserver/src/application/language/urdu/date_lang.php +www/ezwebserver/src/application/language/urdu/db_lang.php +www/ezwebserver/src/application/language/urdu/email_lang.php +www/ezwebserver/src/application/language/urdu/form_validation_lang.php +www/ezwebserver/src/application/language/urdu/ftp_lang.php +www/ezwebserver/src/application/language/urdu/imglib_lang.php +www/ezwebserver/src/application/language/urdu/migration_lang.php +www/ezwebserver/src/application/language/urdu/number_lang.php +www/ezwebserver/src/application/language/urdu/pagination_lang.php +www/ezwebserver/src/application/language/urdu/profiler_lang.php +www/ezwebserver/src/application/language/urdu/unit_test_lang.php +www/ezwebserver/src/application/language/urdu/upload_lang.php +www/ezwebserver/src/application/language/vietnamese/calendar_lang.php +www/ezwebserver/src/application/language/vietnamese/date_lang.php +www/ezwebserver/src/application/language/vietnamese/db_lang.php +www/ezwebserver/src/application/language/vietnamese/email_lang.php +www/ezwebserver/src/application/language/vietnamese/form_validation_lang.php +www/ezwebserver/src/application/language/vietnamese/ftp_lang.php +www/ezwebserver/src/application/language/vietnamese/imglib_lang.php +www/ezwebserver/src/application/language/vietnamese/migration_lang.php +www/ezwebserver/src/application/language/vietnamese/number_lang.php +www/ezwebserver/src/application/language/vietnamese/pagination_lang.php +www/ezwebserver/src/application/language/vietnamese/profiler_lang.php +www/ezwebserver/src/application/language/vietnamese/unit_test_lang.php +www/ezwebserver/src/application/language/vietnamese/upload_lang.php +www/ezwebserver/src/application/libraries/CryptoUtils.php +www/ezwebserver/src/application/libraries/CurrentDateTimeFilter.php +www/ezwebserver/src/application/libraries/DCMTKWrapper.php +www/ezwebserver/src/application/libraries/DicomTagDateTimeFilter.php +www/ezwebserver/src/application/libraries/EmodalityTransfer.php +www/ezwebserver/src/application/libraries/Enum.php +www/ezwebserver/src/application/libraries/ErrorCode.php +www/ezwebserver/src/application/libraries/ErrorMessage.php +www/ezwebserver/src/application/libraries/Format.php +www/ezwebserver/src/application/libraries/HttpClient.php +www/ezwebserver/src/application/libraries/IAcquisitionDateTimeFilter.php +www/ezwebserver/src/application/libraries/IIniFile.php +www/ezwebserver/src/application/libraries/IZipFileHandler.php +www/ezwebserver/src/application/libraries/JWT_Authentication.php +www/ezwebserver/src/application/libraries/ModelLoader.php +www/ezwebserver/src/application/libraries/MyDicom.php +www/ezwebserver/src/application/libraries/PasswordExpired.php +www/ezwebserver/src/application/libraries/REST_Controller.php +www/ezwebserver/src/application/libraries/StrUtils.php +www/ezwebserver/src/application/libraries/Struct.php +www/ezwebserver/src/application/libraries/UserDateTimeFilter.php +www/ezwebserver/src/application/libraries/VTCryptoWrapper.php +www/ezwebserver/src/application/libraries/VTIniFile.php +www/ezwebserver/src/application/libraries/VTNginxPortConfFile.php +www/ezwebserver/src/application/libraries/VTPhpseclibCryptoWrapper.php +www/ezwebserver/src/application/libraries/VTServiceEnvironmentFile.php +www/ezwebserver/src/application/libraries/VTTextFile.php +www/ezwebserver/src/application/libraries/ZipArchiveHandler.php +www/ezwebserver/src/application/libraries/ZipStreamHandler.php +www/ezwebserver/src/application/libraries/ZipWrapper.php +www/ezwebserver/src/application/libraries/nanodicom/NanodicomCoreTest.php +www/ezwebserver/src/application/libraries/nanodicom/example.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/core.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0X300E.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0000.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0002.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0004.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0008.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0010.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0012.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0018.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0020.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0022.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0028.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0032.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0038.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x003A.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0040.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0042.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0044.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0046.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0050.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0054.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0060.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0062.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0064.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0066.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0070.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0072.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0074.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0088.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0100.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x0400.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x1000.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x1010.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2000.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2010.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2020.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2030.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2040.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2050.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2100.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2110.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2120.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2130.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x2200.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x3002.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x3004.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x3006.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x3008.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x300A.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x300C.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x4000.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x4008.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x4FFE.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x50xx.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x5200.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x5400.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x5600.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x60xx.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0x7FE0.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0xFFFA.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0xFFFC.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0xFFFE.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dictionary.php +www/ezwebserver/src/application/libraries/nanodicom/nanodicom/exception.php +www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer.php +www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer/clinicaltrial.php +www/ezwebserver/src/application/libraries/nanodicom/tools/dumper.php +www/ezwebserver/src/application/libraries/nanodicom/tools/getter.php +www/ezwebserver/src/application/libraries/nanodicom/tools/pixeler.php +www/ezwebserver/src/application/libraries/nanodicom/tools/simple.php +www/ezwebserver/src/application/models/AccountTestHelper.php +www/ezwebserver/src/application/models/AcqInformations_model.php +www/ezwebserver/src/application/models/Analyses_model.php +www/ezwebserver/src/application/models/AttendingDoctors_model.php +www/ezwebserver/src/application/models/AuthenticationHelper.php +www/ezwebserver/src/application/models/AuthenticationR2_model.php +www/ezwebserver/src/application/models/Authentication_model.php +www/ezwebserver/src/application/models/CTFilesR2_model.php +www/ezwebserver/src/application/models/CTFiles_model.php +www/ezwebserver/src/application/models/CalibrationFileToZipVisitor.php +www/ezwebserver/src/application/models/CalibrationFilesRepository.php +www/ezwebserver/src/application/models/CalibrationFilesToInfoVisitor.php +www/ezwebserver/src/application/models/CalibrationFiles_model.php +www/ezwebserver/src/application/models/Captures_model.php +www/ezwebserver/src/application/models/CartedCategories_model.php +www/ezwebserver/src/application/models/Categories_model.php +www/ezwebserver/src/application/models/Category.php +www/ezwebserver/src/application/models/Classifications_model.php +www/ezwebserver/src/application/models/Contents_model.php +www/ezwebserver/src/application/models/CopiedContents_model.php +www/ezwebserver/src/application/models/DataGroupImages_model.php +www/ezwebserver/src/application/models/DataGroupProjectImages_model.php +www/ezwebserver/src/application/models/DataGroupProjects_model.php +www/ezwebserver/src/application/models/DataGroups_model.php +www/ezwebserver/src/application/models/Datafile_model.php +www/ezwebserver/src/application/models/Doctors_model.php +www/ezwebserver/src/application/models/DownloadingChartThumbnailFilePathHandler.php +www/ezwebserver/src/application/models/DownloadingDefaultFilePathHandler.php +www/ezwebserver/src/application/models/DownloadingE3FilePathHandler.php +www/ezwebserver/src/application/models/DownloadingImageThumbnailFilePathHandler.php +www/ezwebserver/src/application/models/DownloadingReportThumbnailFilePathHandler.php +www/ezwebserver/src/application/models/E2DB_model.php +www/ezwebserver/src/application/models/E2DataGroupDB_model.php +www/ezwebserver/src/application/models/E2DataGroups_model.php +www/ezwebserver/src/application/models/E2acc_dummy_model.php +www/ezwebserver/src/application/models/E2acc_model.php +www/ezwebserver/src/application/models/E2img_model.php +www/ezwebserver/src/application/models/E2rpt_model.php +www/ezwebserver/src/application/models/E3PresetComments_model.php +www/ezwebserver/src/application/models/E3ReportSettings_model.php +www/ezwebserver/src/application/models/E3ReportTemplateEditStates_model.php +www/ezwebserver/src/application/models/E3ReportTemplates_model.php +www/ezwebserver/src/application/models/E3Reports_model.php +www/ezwebserver/src/application/models/EventsR2_model.php +www/ezwebserver/src/application/models/Events_model.php +www/ezwebserver/src/application/models/ExtraOralDevices_model.php +www/ezwebserver/src/application/models/FavoritedCategories_model.php +www/ezwebserver/src/application/models/FavoritedContents_model.php +www/ezwebserver/src/application/models/FilePathFinder.php +www/ezwebserver/src/application/models/FilesR2_model.php +www/ezwebserver/src/application/models/Files_model.php +www/ezwebserver/src/application/models/Formulas_model.php +www/ezwebserver/src/application/models/Guidelines_model.php +www/ezwebserver/src/application/models/ICalibrationFileVisitor.php +www/ezwebserver/src/application/models/IFilePathHandler.php +www/ezwebserver/src/application/models/IOScanner3rdPartyData_model.php +www/ezwebserver/src/application/models/IOSensors_model.php +www/ezwebserver/src/application/models/ImageFileInfos_model.php +www/ezwebserver/src/application/models/ImagesR2_model.php +www/ezwebserver/src/application/models/Images_model.php +www/ezwebserver/src/application/models/ImplantCompanies_model.php +www/ezwebserver/src/application/models/ImplantLineups_model.php +www/ezwebserver/src/application/models/ImplantModels_model.php +www/ezwebserver/src/application/models/ImplantSTLFiles_model.php +www/ezwebserver/src/application/models/ImplantTable_model.php +www/ezwebserver/src/application/models/Landmarks_model.php +www/ezwebserver/src/application/models/Measurements_model.php +www/ezwebserver/src/application/models/MultiFiles_model.php +www/ezwebserver/src/application/models/OrthoDataVersions.php +www/ezwebserver/src/application/models/OrthoDataVersions_model.php +www/ezwebserver/src/application/models/PatientCharts_model.php +www/ezwebserver/src/application/models/PatientFilesR2_model.php +www/ezwebserver/src/application/models/PatientFiles_model.php +www/ezwebserver/src/application/models/PatientsR2_model.php +www/ezwebserver/src/application/models/Patients_model.php +www/ezwebserver/src/application/models/Post_model.php +www/ezwebserver/src/application/models/PracticeChairs_model.php +www/ezwebserver/src/application/models/PracticeHours_model.php +www/ezwebserver/src/application/models/Practices_model.php +www/ezwebserver/src/application/models/ProfilogramNormalData_model.php +www/ezwebserver/src/application/models/Races_model.php +www/ezwebserver/src/application/models/RecordsetImages_model.php +www/ezwebserver/src/application/models/RecordsetModalities_model.php +www/ezwebserver/src/application/models/RecordsetStages_model.php +www/ezwebserver/src/application/models/Recordsets_model.php +www/ezwebserver/src/application/models/Reports_model.php +www/ezwebserver/src/application/models/SAccountInfoR2.php +www/ezwebserver/src/application/models/SProfilogramNormalDataItem.php +www/ezwebserver/src/application/models/Sccontent_model.php +www/ezwebserver/src/application/models/Schedules_model.php +www/ezwebserver/src/application/models/ServerPorts_model.php +www/ezwebserver/src/application/models/SettingValues_model.php +www/ezwebserver/src/application/models/Settings_model.php +www/ezwebserver/src/application/models/SmartPayAccounts_model.php +www/ezwebserver/src/application/models/SmartPayCheckSums_model.php +www/ezwebserver/src/application/models/SmartPayConfigs_model.php +www/ezwebserver/src/application/models/SmartPayImages_model.php +www/ezwebserver/src/application/models/SocialIDProtector.php +www/ezwebserver/src/application/models/StandardData_model.php +www/ezwebserver/src/application/models/Superimpositions_model.php +www/ezwebserver/src/application/models/SurgicalKits_model.php +www/ezwebserver/src/application/models/SysFiles_model.php +www/ezwebserver/src/application/models/SysInfo_model.php +www/ezwebserver/src/application/models/TeleradiologyDataService_model.php +www/ezwebserver/src/application/models/TeleradiologyFileService_model.php +www/ezwebserver/src/application/models/ThirdPartyFiles_model.php +www/ezwebserver/src/application/models/TreatmentCategories_model.php +www/ezwebserver/src/application/models/UploadingDefaultFilePathHandler.php +www/ezwebserver/src/application/models/UploadingE3FilePathHandler.php +www/ezwebserver/src/application/models/UserAccountsR2_model.php +www/ezwebserver/src/application/models/UserAccounts_model.php +www/ezwebserver/src/application/models/VTOSTOControlPoints_model.php +www/ezwebserver/src/application/models/VTOSTOData_model.php +www/ezwebserver/src/application/models/VTOSTOSettings_model.php +www/ezwebserver/src/application/models/Version.php +www/ezwebserver/src/application/models/Versions_model.php +www/ezwebserver/src/application/views/errors/cli/error_404.php +www/ezwebserver/src/application/views/errors/cli/error_db.php +www/ezwebserver/src/application/views/errors/cli/error_exception.php +www/ezwebserver/src/application/views/errors/cli/error_general.php +www/ezwebserver/src/application/views/errors/cli/error_php.php +www/ezwebserver/src/application/views/errors/html/error_404.php +www/ezwebserver/src/application/views/errors/html/error_db.php +www/ezwebserver/src/application/views/errors/html/error_exception.php +www/ezwebserver/src/application/views/errors/html/error_general.php +www/ezwebserver/src/application/views/errors/html/error_php.php +www/ezwebserver/src/application/views/welcome_message.php + +/* + * Copyright (c) Ewoosoft Co., Ltd. + * + * All rights reserved. + */ + +www/ezwebserver/src/public/api/index.php +www/ezwebserver/src/public/index.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2016, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationAwareInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExceptionInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutableNotFoundException.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutionFailureException.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/InvalidArgumentException.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/DebugListener.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/ListenerInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryAwareInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerAwareInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerInterface.php +www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/ProcessRunnerTest.php + +/* + * This file is part of Alchemy\BinaryDriver. + * + * (c) Alchemy + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/codeigniter/framework/index.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Benchmark.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/CodeIgniter.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Common.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Config.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Controller.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Exceptions.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Hooks.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Input.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Loader.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Log.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Model.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Output.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Router.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Security.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/URI.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_cache.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_query_builder.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/array_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/captcha_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/cookie_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/date_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/directory_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/download_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/file_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/form_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/html_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/inflector_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/language_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/number_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/path_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/security_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/string_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/text_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/typography_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/url_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/xml_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/calendar_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/date_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/db_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/email_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/form_validation_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/ftp_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/imglib_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/number_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/pagination_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/profiler_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/unit_test_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/upload_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Calendar.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Email.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Encrypt.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Form_validation.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Ftp.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Image_lib.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Pagination.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Parser.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Profiler.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Trackback.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Typography.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Upload.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/User_agent.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Xmlrpc.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Xmlrpcs.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Zip.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/core/Utf8.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/Cache.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_apc.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/Session.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 2.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/hash.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/mbstring.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/password.php +www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/standard.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/language/english/migration_lang.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_redis.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_wincache.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Encryption.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Migration.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/Session_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/drivers/Session_database_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/drivers/Session_memcached_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/drivers/Session_redis_driver.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 3.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_utility.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 2.1.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_utility.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_utility.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.3.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_utility.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.4.1 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_utility.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.3.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_driver.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_forge.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_result.php +www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_utility.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 2.0.3 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/email_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/smiley_helper.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cart.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Javascript.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Javascript/Jquery.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_dummy.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_file.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Cache/drivers/Cache_memcached.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 2.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Email.php + +/** + * Validate email for shell + * + * Applies stricter, shell-safe validation to email addresses. + * Introduced to prevent RCE via sendmail's -f option. + * + * @see https://github.com/bcit-ci/CodeIgniter/issues/4963 + * @see https://gist.github.com/Zenexer/40d02da5e07f151adeaeeaa11af9ab36 + * @license https://creativecommons.org/publicdomain/zero/1.0/ CC0 1.0, Public Domain + * + * Credits for the base concept go to Paul Buonopane + * + * @param string $email + * @return bool + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/SessionHandlerInterface.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 3.0.0 + * @filesource + */ + +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Session/drivers/Session_files_driver.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 3.0.0 + * @filesource +*/ + +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Table.php +www/ezwebserver/src/vendor/codeigniter/framework/system/libraries/Unit_test.php + +/** + * CodeIgniter + * + * An open source application development framework for PHP + * + * This content is released under the MIT License (MIT) + * + * Copyright (c) 2014 - 2019, British Columbia Institute of Technology + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) + * @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/) + * @license https://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + * @since Version 1.3.1 + * @filesource + */ + +www/ezwebserver/src/vendor/composer/ClassLoader.php + +/* + * This file is part of Composer. + * + * (c) Nils Adermann + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/evenement/evenement/examples/benchmark-emit-no-arguments.php +www/ezwebserver/src/vendor/evenement/evenement/examples/benchmark-emit-once.php +www/ezwebserver/src/vendor/evenement/evenement/examples/benchmark-emit-one-argument.php +www/ezwebserver/src/vendor/evenement/evenement/examples/benchmark-emit.php +www/ezwebserver/src/vendor/evenement/evenement/src/Evenement/EventEmitter.php +www/ezwebserver/src/vendor/evenement/evenement/src/Evenement/EventEmitterInterface.php +www/ezwebserver/src/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php +www/ezwebserver/src/vendor/evenement/evenement/tests/Evenement/Tests/EventEmitterTest.php +www/ezwebserver/src/vendor/evenement/evenement/tests/Evenement/Tests/Listener.php +www/ezwebserver/src/vendor/evenement/evenement/tests/Evenement/Tests/functions.php + +/* + * This file is part of Evenement. + * + * (c) Igor Wiedler + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/firebase/php-jwt/src/JWT.php + +/** + * JSON Web Token implementation, based on this spec: + * http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06 + * + * PHP version 5 + * + * @category Authentication + * @package Authentication_JWT + * @author Neuman Vong + * @author Anant Narayanan + * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD + * @link https://github.com/firebase/php-jwt + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/Exception.php + +/** + * This class is only for inheriting + * + * @author Jonatan Männchen + * @copyright Copyright (c) 2014, Jonatan Männchen + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php + +/** + * This Exception gets invoked if a file wasn't found + * + * @author Jonatan Männchen + * @copyright Copyright (c) 2014, Jonatan Männchen + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/Exception/InvalidOptionException.php + +/** + * This Exception gets invoked if an invalid parameter gets passed on as option + * + * @author Jonatan Männchen + * @copyright Copyright (c) 2014, Jonatan Männchen + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php + +/** + * This Exception gets invoked if fread() fails on a stream. + * + * @author Jonatan Männchen + * @copyright Copyright (c) 2014, Jonatan Männchen + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/src/ZipStream.php + +/** + * ZipStream + * + * Streamed, dynamically generated zip archives. + * + * @author Paul Duncan + * @copyright Copyright (C) 2007-2009 Paul Duncan + * + * @author Jonatan Männchen + * @copyright Copyright (C) 2014 Jonatan Männchen + * + * @author Jesse Donat + * @copyright Copyright (C) 2014 Jesse Donat + * + * @license https://raw.githubusercontent.com/maennchen/ZipStream-PHP/master/LICENCE + * + * + * Requirements: + * + * * PHP version 5.1.2 or newer. + * + * Usage: + * + * Streaming zip archives is a simple, three-step process: + * + * 1. Create the zip stream: + * + * $zip = new ZipStream('example.zip'); + * + * 2. Add one or more files to the archive: + * + * * add first file + * $data = file_get_contents('some_file.gif'); + * $zip->addFile('some_file.gif', $data); + * + * * add second file + * $data = file_get_contents('some_file.gif'); + * $zip->addFile('another_file.png', $data); + * + * 3. Finish the zip stream: + * + * $zip->finish(); + * + * You can also add an archive comment, add comments to individual files, + * and adjust the timestamp of files. See the API documentation for each + * method below for additional information. + * + * Example: + * + * // create a new zip stream object + * $zip = new ZipStream('some_files.zip'); + * + * // list of local files + * $files = array('foo.txt', 'bar.jpg'); + * + * // read and add each file to the archive + * foreach ($files as $path) + * $zip->addFile($path, file_get_contents($path)); + * + * // write archive footer to stream + * $zip->finish(); + */ + +www/ezwebserver/src/vendor/maennchen/zipstream-php/test/ZipStreamTest.php + +/** + * Test Class for the Main ZipStream CLass + * + * @author Jonatan Männchen + * @copyright Copyright (c) 2014, Jonatan Männchen + */ + +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Logger.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Registry.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/SignalHandler.php +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Utils.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/InsightOpsHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/RollbarHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/LoggerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/RegistryTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/SignalHandlerTest.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/TestCase.php + +/* + * This file is part of the Monolog package. + * + * (c) Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +www/ezwebserver/src/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php + +/* + * This file is part of the Monolog package. + * + * (c) Jonathan A. Schweder + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/neutron/temporary-filesystem/src/Neutron/TemporaryFilesystem/IOException.php +www/ezwebserver/src/vendor/neutron/temporary-filesystem/src/Neutron/TemporaryFilesystem/Manager.php +www/ezwebserver/src/vendor/neutron/temporary-filesystem/src/Neutron/TemporaryFilesystem/TemporaryFilesystem.php +www/ezwebserver/src/vendor/neutron/temporary-filesystem/src/Neutron/TemporaryFilesystem/TemporaryFilesystemInterface.php + +/* + * This file is part of TemporaryFilesystem. + * + * (c) Romain Neutron + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Coordinate/AspectRatio.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AudioFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AudioResamplableFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/FilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/FiltersCollection.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Frame/DisplayRatioFixerFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Frame/FrameFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Frame/FrameFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/ClipFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/CropFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/CustomFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/FrameRateFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/ResizeFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/RotateFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/SynchronizeFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/VideoFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/VideoFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/WatermarkFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/FrameInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/ProgressableInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/AbstractMediaType.php + +/* + * This file is part of PHP-FFmpeg. + * + * (c) Alchemy + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Coordinate/Dimension.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Coordinate/FrameRate.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Coordinate/Point.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Coordinate/TimeCode.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFMpegDriver.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Exception/ExceptionInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Exception/ExecutableNotFoundException.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Exception/InvalidArgumentException.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Exception/LogicException.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Exception/RuntimeException.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpegServiceProvider.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/DataMapping/AbstractData.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/DataMapping/Format.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/DataMapping/Stream.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/DataMapping/StreamCollection.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/Mapper.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/MapperInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTesterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OutputParser.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OutputParserInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AddMetadataFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AudioClipFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/AudioFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Audio/SimpleFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/Aac.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/DefaultAudio.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/Flac.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/Mp3.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/Vorbis.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Audio/Wav.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/AudioInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/FormatInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/ProgressListener/AudioProgressListener.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/ProgressListener/VideoProgressListener.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/DefaultVideo.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/Ogg.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/WMV.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/WMV3.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/WebM.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/Video/X264.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/VideoInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/AbstractStreamableMedia.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Audio.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Frame.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/MediaTypeInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Waveform.php + +/* + * This file is part of PHP-FFmpeg. + * + * (c) Alchemy + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Concat/ConcatFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Concat/ConcatFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Gif/GifFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Gif/GifFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/PadFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Waveform/WaveformDownmixFilter.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Waveform/WaveformFilterInterface.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Waveform/WaveformFilters.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Concat.php +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Gif.php + +/* + * This file is part of PHP-FFmpeg. + * + * (c) Strime + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Filters/Video/ExtractMultipleFramesFilter.php + +/* + * This file is part of PHP-FFmpeg. + * + * (c) Strime + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php + +/** + * Pure-PHP implementation of AES. + * + * Uses mcrypt, if available/possible, and an internal implementation, otherwise. + * + * PHP version 5 + * + * NOTE: Since AES.php is (for compatibility and phpseclib-historical reasons) virtually + * just a wrapper to Rijndael.php you may consider using Rijndael.php instead of + * to save one include_once(). + * + * If {@link self::setKeyLength() setKeyLength()} isn't called, it'll be calculated from + * {@link self::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits + * it'll be null-padded to 192-bits and 192 bits will be the key length until {@link self::setKey() setKey()} + * is called, again, at which point, it'll be recalculated. + * + * Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't + * make a whole lot of sense. {@link self::setBlockLength() setBlockLength()}, for instance. Calling that function, + * however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one). + * + * Here's a short example of how to use this library: + * + * setKey('abcdefghijklmnop'); + * + * $size = 10 * 1024; + * $plaintext = ''; + * for ($i = 0; $i < $size; $i++) { + * $plaintext.= 'a'; + * } + * + * echo $aes->decrypt($aes->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package AES + * @author Jim Wigginton + * @copyright 2008 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php + +/** + * Base Class for all \phpseclib\Crypt\* cipher classes + * + * PHP version 5 + * + * Internally for phpseclib developers: + * If you plan to add a new cipher class, please note following rules: + * + * - The new \phpseclib\Crypt\* cipher class should extend \phpseclib\Crypt\Base + * + * - Following methods are then required to be overridden/overloaded: + * + * - _encryptBlock() + * + * - _decryptBlock() + * + * - _setupKey() + * + * - All other methods are optional to be overridden/overloaded + * + * - Look at the source code of the current ciphers how they extend \phpseclib\Crypt\Base + * and take one of them as a start up for the new cipher class. + * + * - Please read all the other comments/notes/hints here also for each class var/method + * + * @category Crypt + * @package Base + * @author Jim Wigginton + * @author Hans-Juergen Petrich + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php + +/** + * Pure-PHP implementation of Blowfish. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. + * + * PHP version 5 + * + * Useful resources are as follows: + * + * - {@link http://en.wikipedia.org/wiki/Blowfish_(cipher) Wikipedia description of Blowfish} + * + * Here's a short example of how to use this library: + * + * setKey('12345678901234567890123456789012'); + * + * $plaintext = str_repeat('a', 1024); + * + * echo $blowfish->decrypt($blowfish->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package Blowfish + * @author Jim Wigginton + * @author Hans-Juergen Petrich + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php + +/** + * Pure-PHP implementation of DES. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. + * + * PHP version 5 + * + * Useful resources are as follows: + * + * - {@link http://en.wikipedia.org/wiki/DES_supplementary_material Wikipedia: DES supplementary material} + * - {@link http://www.itl.nist.gov/fipspubs/fip46-2.htm FIPS 46-2 - (DES), Data Encryption Standard} + * - {@link http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-DES.html JavaScript DES Example} + * + * Here's a short example of how to use this library: + * + * setKey('abcdefgh'); + * + * $size = 10 * 1024; + * $plaintext = ''; + * for ($i = 0; $i < $size; $i++) { + * $plaintext.= 'a'; + * } + * + * echo $des->decrypt($des->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package DES + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php + +/** + * Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions. + * + * Uses hash() or mhash() if available and an internal implementation, otherwise. Currently supports the following: + * + * md2, md5, md5-96, sha1, sha1-96, sha256, sha256-96, sha384, and sha512, sha512-96 + * + * If {@link self::setKey() setKey()} is called, {@link self::hash() hash()} will return the HMAC as opposed to + * the hash. If no valid algorithm is provided, sha1 will be used. + * + * PHP version 5 + * + * {@internal The variable names are the same as those in + * {@link http://tools.ietf.org/html/rfc2104#section-2 RFC2104}.}} + * + * Here's a short example of how to use this library: + * + * setKey('abcdefg'); + * + * echo base64_encode($hash->hash('abcdefg')); + * ?> + * + * + * @category Crypt + * @package Hash + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php + +/** + * Pure-PHP implementation of RC2. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. + * + * PHP version 5 + * + * Useful resources are as follows: + * + * - {@link http://tools.ietf.org/html/rfc2268} + * + * Here's a short example of how to use this library: + * + * setKey('abcdefgh'); + * + * $plaintext = str_repeat('a', 1024); + * + * echo $rc2->decrypt($rc2->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package RC2 + * @author Patrick Monnerat + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php + +/** + * Pure-PHP implementation of RC4. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. + * + * PHP version 5 + * + * Useful resources are as follows: + * + * - {@link http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt ARCFOUR Algorithm} + * - {@link http://en.wikipedia.org/wiki/RC4 - Wikipedia: RC4} + * + * RC4 is also known as ARCFOUR or ARC4. The reason is elaborated upon at Wikipedia. This class is named RC4 and not + * ARCFOUR or ARC4 because RC4 is how it is referred to in the SSH1 specification. + * + * Here's a short example of how to use this library: + * + * setKey('abcdefgh'); + * + * $size = 10 * 1024; + * $plaintext = ''; + * for ($i = 0; $i < $size; $i++) { + * $plaintext.= 'a'; + * } + * + * echo $rc4->decrypt($rc4->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package RC4 + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php + +/** + * Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA. + * + * PHP version 5 + * + * Here's an example of how to encrypt and decrypt text with this library: + * + * createKey()); + * + * $plaintext = 'terrafrost'; + * + * $rsa->loadKey($privatekey); + * $ciphertext = $rsa->encrypt($plaintext); + * + * $rsa->loadKey($publickey); + * echo $rsa->decrypt($ciphertext); + * ?> + * + * + * Here's an example of how to create signatures and verify signatures with this library: + * + * createKey()); + * + * $plaintext = 'terrafrost'; + * + * $rsa->loadKey($privatekey); + * $signature = $rsa->sign($plaintext); + * + * $rsa->loadKey($publickey); + * echo $rsa->verify($plaintext, $signature) ? 'verified' : 'unverified'; + * ?> + * + * + * @category Crypt + * @package RSA + * @author Jim Wigginton + * @copyright 2009 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php + +/** + * Random Number Generator + * + * PHP version 5 + * + * Here's a short example of how to use this library: + * + * + * + * + * @category Crypt + * @package Random + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php + +/** + * Pure-PHP implementation of Rijndael. + * + * Uses mcrypt, if available/possible, and an internal implementation, otherwise. + * + * PHP version 5 + * + * If {@link self::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If + * {@link self::setKeyLength() setKeyLength()} isn't called, it'll be calculated from + * {@link self::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's + * 136-bits it'll be null-padded to 192-bits and 192 bits will be the key length until + * {@link self::setKey() setKey()} is called, again, at which point, it'll be recalculated. + * + * Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example, + * does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256. + * {@link http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=10 Rijndael-ammended.pdf#page=10} defines the + * algorithm for block lengths of 192 and 256 but not for block lengths / key lengths of 160 and 224. Indeed, 160 and 224 + * are first defined as valid key / block lengths in + * {@link http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=44 Rijndael-ammended.pdf#page=44}: + * Extensions: Other block and Cipher Key lengths. + * Note: Use of 160/224-bit Keys must be explicitly set by setKeyLength(160) respectively setKeyLength(224). + * + * {@internal The variable names are the same as those in + * {@link http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf#page=10 fips-197.pdf#page=10}.}} + * + * Here's a short example of how to use this library: + * + * setKey('abcdefghijklmnop'); + * + * $size = 10 * 1024; + * $plaintext = ''; + * for ($i = 0; $i < $size; $i++) { + * $plaintext.= 'a'; + * } + * + * echo $rijndael->decrypt($rijndael->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package Rijndael + * @author Jim Wigginton + * @copyright 2008 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php + +/** + * Pure-PHP implementation of Triple DES. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. Operates in the EDE3 mode (encrypt-decrypt-encrypt). + * + * PHP version 5 + * + * Here's a short example of how to use this library: + * + * setKey('abcdefghijklmnopqrstuvwx'); + * + * $size = 10 * 1024; + * $plaintext = ''; + * for ($i = 0; $i < $size; $i++) { + * $plaintext.= 'a'; + * } + * + * echo $des->decrypt($des->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package TripleDES + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php + +/** + * Pure-PHP implementation of Twofish. + * + * Uses mcrypt, if available, and an internal implementation, otherwise. + * + * PHP version 5 + * + * Useful resources are as follows: + * + * - {@link http://en.wikipedia.org/wiki/Twofish Wikipedia description of Twofish} + * + * Here's a short example of how to use this library: + * + * setKey('12345678901234567890123456789012'); + * + * $plaintext = str_repeat('a', 1024); + * + * echo $twofish->decrypt($twofish->encrypt($plaintext)); + * ?> + * + * + * @category Crypt + * @package Twofish + * @author Jim Wigginton + * @author Hans-Juergen Petrich + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php + +/** + * Pure-PHP ANSI Decoder + * + * PHP version 5 + * + * If you call read() in \phpseclib\Net\SSH2 you may get {@link http://en.wikipedia.org/wiki/ANSI_escape_code ANSI escape codes} back. + * They'd look like chr(0x1B) . '[00m' or whatever (0x1B = ESC). They tell a + * {@link http://en.wikipedia.org/wiki/Terminal_emulator terminal emulator} how to format the characters, what + * color to display them in, etc. \phpseclib\File\ANSI is a {@link http://en.wikipedia.org/wiki/VT100 VT100} terminal emulator. + * + * @category File + * @package ANSI + * @author Jim Wigginton + * @copyright 2012 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php + +/** + * Pure-PHP ASN.1 Parser + * + * PHP version 5 + * + * ASN.1 provides the semantics for data encoded using various schemes. The most commonly + * utilized scheme is DER or the "Distinguished Encoding Rules". PEM's are base64 encoded + * DER blobs. + * + * \phpseclib\File\ASN1 decodes and encodes DER formatted messages and places them in a semantic context. + * + * Uses the 1988 ASN.1 syntax. + * + * @category File + * @package ASN1 + * @author Jim Wigginton + * @copyright 2012 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php + +/** + * Pure-PHP ASN.1 Parser + * + * PHP version 5 + * + * @category File + * @package ASN1 + * @author Jim Wigginton + * @copyright 2012 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/File/X509.php + +/** + * Pure-PHP X.509 Parser + * + * PHP version 5 + * + * Encode and decode X.509 certificates. + * + * The extensions are from {@link http://tools.ietf.org/html/rfc5280 RFC5280} and + * {@link http://web.archive.org/web/19961027104704/http://www3.netscape.com/eng/security/cert-exts.html Netscape Certificate Extensions}. + * + * Note that loading an X.509 certificate and resaving it may invalidate the signature. The reason being that the signature is based on a + * portion of the certificate that contains optional parameters with default values. ie. if the parameter isn't there the default value is + * used. Problem is, if the parameter is there and it just so happens to have the default value there are two ways that that parameter can + * be encoded. It can be encoded explicitly or left out all together. This would effect the signature value and thus may invalidate the + * the certificate all together unless the certificate is re-signed. + * + * @category File + * @package X509 + * @author Jim Wigginton + * @copyright 2012 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php + +/** + * Pure-PHP arbitrary precision integer arithmetic library. + * + * Supports base-2, base-10, base-16, and base-256 numbers. Uses the GMP or BCMath extensions, if available, + * and an internal implementation, otherwise. + * + * PHP version 5 + * + * {@internal (all DocBlock comments regarding implementation - such as the one that follows - refer to the + * {@link self::MODE_INTERNAL self::MODE_INTERNAL} mode) + * + * BigInteger uses base-2**26 to perform operations such as multiplication and division and + * base-2**52 (ie. two base 2**26 digits) to perform addition and subtraction. Because the largest possible + * value when multiplying two base-2**26 numbers together is a base-2**52 number, double precision floating + * point numbers - numbers that should be supported on most hardware and whose significand is 53 bits - are + * used. As a consequence, bitwise operators such as >> and << cannot be used, nor can the modulo operator %, + * which only supports integers. Although this fact will slow this library down, the fact that such a high + * base is being used should more than compensate. + * + * Numbers are stored in {@link http://en.wikipedia.org/wiki/Endianness little endian} format. ie. + * (new \phpseclib\Math\BigInteger(pow(2, 26)))->value = array(0, 1) + * + * Useful resources are as follows: + * + * - {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf Handbook of Applied Cryptography (HAC)} + * - {@link http://math.libtomcrypt.com/files/tommath.pdf Multi-Precision Math (MPM)} + * - Java's BigInteger classes. See /j2se/src/share/classes/java/math in jdk-1_5_0-src-jrl.zip + * + * Here's an example of how to use this library: + * + * add($b); + * + * echo $c->toString(); // outputs 5 + * ?> + * + * + * @category Math + * @package BigInteger + * @author Jim Wigginton + * @copyright 2006 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php + +/** + * Pure-PHP implementation of SCP. + * + * PHP version 5 + * + * The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}. + * + * Here's a short example of how to use this library: + * + * login('username', 'password')) { + * exit('bad login'); + * } + * $scp = new \phpseclib\Net\SCP($ssh); + * + * $scp->put('abcd', str_repeat('x', 1024*1024)); + * ?> + * + * + * @category Net + * @package SCP + * @author Jim Wigginton + * @copyright 2010 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php + +/** + * Pure-PHP implementation of SFTP. + * + * PHP version 5 + * + * Currently only supports SFTPv2 and v3, which, according to wikipedia.org, "is the most widely used version, + * implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access + * to an SFTPv4/5/6 server. + * + * The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}. + * + * Here's a short example of how to use this library: + * + * login('username', 'password')) { + * exit('Login Failed'); + * } + * + * echo $sftp->pwd() . "\r\n"; + * $sftp->put('filename.ext', 'hello, world!'); + * print_r($sftp->nlist()); + * ?> + * + * + * @category Net + * @package SFTP + * @author Jim Wigginton + * @copyright 2009 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php + +/** + * SFTP Stream Wrapper + * + * Creates an sftp:// protocol handler that can be used with, for example, fopen(), dir(), etc. + * + * PHP version 5 + * + * @category Net + * @package SFTP + * @author Jim Wigginton + * @copyright 2013 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php + +/** + * Pure-PHP implementation of SSHv1. + * + * PHP version 5 + * + * Here's a short example of how to use this library: + * + * login('username', 'password')) { + * exit('Login Failed'); + * } + * + * echo $ssh->exec('ls -la'); + * ?> + * + * + * Here's another short example: + * + * login('username', 'password')) { + * exit('Login Failed'); + * } + * + * echo $ssh->read('username@username:~$'); + * $ssh->write("ls -la\n"); + * echo $ssh->read('username@username:~$'); + * ?> + * + * + * More information on the SSHv1 specification can be found by reading + * {@link http://www.snailbook.com/docs/protocol-1.5.txt protocol-1.5.txt}. + * + * @category Net + * @package SSH1 + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php + +/** + * Pure-PHP implementation of SSHv2. + * + * PHP version 5 + * + * Here are some examples of how to use this library: + * + * login('username', 'password')) { + * exit('Login Failed'); + * } + * + * echo $ssh->exec('pwd'); + * echo $ssh->exec('ls -la'); + * ?> + * + * + * + * setPassword('whatever'); + * $key->loadKey(file_get_contents('privatekey')); + * + * $ssh = new \phpseclib\Net\SSH2('www.domain.tld'); + * if (!$ssh->login('username', $key)) { + * exit('Login Failed'); + * } + * + * echo $ssh->read('username@username:~$'); + * $ssh->write("ls -la\n"); + * echo $ssh->read('username@username:~$'); + * ?> + * + * + * @category Net + * @package SSH2 + * @author Jim Wigginton + * @copyright 2007 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php + +/** + * Pure-PHP ssh-agent client. + * + * PHP version 5 + * + * Here are some examples of how to use this library: + * + * login('username', $agent)) { + * exit('Login Failed'); + * } + * + * echo $ssh->exec('pwd'); + * echo $ssh->exec('ls -la'); + * ?> + * + * + * @category System + * @package SSH\Agent + * @author Jim Wigginton + * @copyright 2014 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + * @internal See http://api.libssh.org/rfc/PROTOCOL.agent + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php + +/** + * Pure-PHP ssh-agent client. + * + * PHP version 5 + * + * @category System + * @package SSH\Agent + * @author Jim Wigginton + * @copyright 2009 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + * @internal See http://api.libssh.org/rfc/PROTOCOL.agent + */ + +www/ezwebserver/src/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php + +/** + * Bootstrapping File for phpseclib + * + * @license http://www.opensource.org/licenses/mit-license.html MIT License + */ + +www/ezwebserver/src/vendor/symfony/filesystem/Exception/ExceptionInterface.php +www/ezwebserver/src/vendor/symfony/filesystem/Exception/FileNotFoundException.php +www/ezwebserver/src/vendor/symfony/filesystem/Exception/IOException.php +www/ezwebserver/src/vendor/symfony/filesystem/Exception/IOExceptionInterface.php +www/ezwebserver/src/vendor/symfony/filesystem/Exception/InvalidArgumentException.php +www/ezwebserver/src/vendor/symfony/filesystem/Filesystem.php +www/ezwebserver/src/vendor/symfony/filesystem/Tests/ExceptionTest.php +www/ezwebserver/src/vendor/symfony/filesystem/Tests/FilesystemTest.php +www/ezwebserver/src/vendor/symfony/filesystem/Tests/FilesystemTestCase.php +www/ezwebserver/src/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php +www/ezwebserver/src/vendor/symfony/polyfill-ctype/Ctype.php +www/ezwebserver/src/vendor/symfony/polyfill-ctype/bootstrap.php +www/ezwebserver/src/vendor/symfony/process/Exception/ExceptionInterface.php +www/ezwebserver/src/vendor/symfony/process/Exception/InvalidArgumentException.php +www/ezwebserver/src/vendor/symfony/process/Exception/LogicException.php +www/ezwebserver/src/vendor/symfony/process/Exception/ProcessFailedException.php +www/ezwebserver/src/vendor/symfony/process/Exception/ProcessTimedOutException.php +www/ezwebserver/src/vendor/symfony/process/Exception/RuntimeException.php +www/ezwebserver/src/vendor/symfony/process/ExecutableFinder.php +www/ezwebserver/src/vendor/symfony/process/InputStream.php +www/ezwebserver/src/vendor/symfony/process/PhpExecutableFinder.php +www/ezwebserver/src/vendor/symfony/process/PhpProcess.php +www/ezwebserver/src/vendor/symfony/process/Pipes/AbstractPipes.php +www/ezwebserver/src/vendor/symfony/process/Pipes/PipesInterface.php +www/ezwebserver/src/vendor/symfony/process/Pipes/UnixPipes.php +www/ezwebserver/src/vendor/symfony/process/Pipes/WindowsPipes.php +www/ezwebserver/src/vendor/symfony/process/Process.php +www/ezwebserver/src/vendor/symfony/process/ProcessBuilder.php +www/ezwebserver/src/vendor/symfony/process/ProcessUtils.php +www/ezwebserver/src/vendor/symfony/process/Tests/ErrorProcessInitiator.php +www/ezwebserver/src/vendor/symfony/process/Tests/ExecutableFinderTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/NonStopableProcess.php +www/ezwebserver/src/vendor/symfony/process/Tests/PhpExecutableFinderTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/PhpProcessTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +www/ezwebserver/src/vendor/symfony/process/Tests/ProcessBuilderTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/ProcessTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/ProcessUtilsTest.php +www/ezwebserver/src/vendor/symfony/process/Tests/SignalListener.php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +~~~ diff --git a/scripts/build-server.sh b/scripts/build-server.sh index b889d9e..49c075a 100755 --- a/scripts/build-server.sh +++ b/scripts/build-server.sh @@ -37,6 +37,7 @@ cp server/{run.sh,router.php,nginx.conf.in,php-fpm.conf.in,init-sqlite.php,patie mkdir "$php_resources/runtime" ditto "$runtime/www" "$php_resources/runtime/www" cp "$runtime/index.html" "$php_resources/runtime/index.html" +cp licenses.md "$app/Contents/Resources/licenses.md" application="$php_resources/runtime/www/ezwebserver/src/application" rm -rf "$application/logs" "$application/cache/sessions" mkdir -p "$application/logs" "$application/cache/sessions" diff --git a/server/original/www/ezwebserver/src/application/config/autoload.php b/server/original/www/ezwebserver/src/application/config/autoload.php index b31e063..5ed9de6 100644 --- a/server/original/www/ezwebserver/src/application/config/autoload.php +++ b/server/original/www/ezwebserver/src/application/config/autoload.php @@ -1,7 +1,7 @@ getID(); date_default_timezone_set($timeZoneId); $config["\142\141\163\145\x5f\165\x72\154"] = "\150\x74\x74\x70\x3a\x2f\57\x6c\x6f\143\141\x6c\150\157\x73\164\x3a\x38\60\60\x30"; $config["\x69\x6e\x64\x65\x78\137\160\x61\x67\x65"] = ''; $config["\x75\162\151\137\160\162\157\x74\157\x63\x6f\x6c"] = "\x52\x45\121\125\105\x53\124\x5f\x55\x52\111"; $config["\x75\162\x6c\x5f\x73\x75\x66\146\151\x78"] = ''; $config["\154\141\x6e\147\165\x61\x67\x65"] = "\145\x6e\147\154\151\163\150"; $config["\x63\150\141\162\x73\145\164"] = "\125\x54\106\55\70"; $config["\145\156\141\x62\154\x65\x5f\150\x6f\157\153\163"] = FALSE; $config["\163\x75\142\x63\x6c\141\163\x73\x5f\x70\162\x65\x66\151\x78"] = "\122\x45\123\x54\137"; $config["\143\x6f\155\x70\157\x73\x65\x72\137\x61\x75\164\157\154\157\x61\144"] = realpath(APPPATH . "\56\x2e\57\166\x65\156\x64\x6f\162\57\x61\165\164\x6f\x6c\157\141\144\x2e\160\x68\x70"); $config["\160\x65\162\155\x69\x74\x74\145\144\x5f\165\x72\151\x5f\x63\150\141\162\163"] = "\x61\x2d\x7a\40\x30\55\x39\x7e\45\56\54\x3a\137\134\55\x5c\x28\x5c\x29"; $config["\141\154\154\x6f\x77\137\x67\145\x74\x5f\x61\x72\x72\x61\x79"] = TRUE; $config["\x65\156\x61\142\x6c\x65\137\x71\165\145\x72\171\x5f\x73\x74\x72\x69\x6e\147\163"] = FALSE; $config["\143\157\156\x74\162\x6f\154\x6c\145\162\137\164\162\x69\x67\147\x65\162"] = "\143"; $config["\x66\165\156\143\164\x69\x6f\156\137\164\x72\151\147\x67\x65\162"] = "\155"; $config["\144\x69\x72\145\x63\x74\x6f\x72\171\x5f\x74\x72\151\147\x67\145\x72"] = "\x64"; if (ENVIRONMENT === "\x70\162\x6f\144\165\x63\x74\151\157\156") { $config["\154\157\x67\x5f\164\150\x72\x65\163\x68\157\x6c\x64"] = [1, 5]; } else { $config["\154\157\147\x5f\164\x68\x72\x65\x73\150\157\154\144"] = [99]; } $config["\x6c\157\x67\x5f\160\x61\164\x68"] = ''; $config["\x6c\157\147\x5f\x66\151\154\x65\137\145\x78\164\x65\x6e\163\x69\157\156"] = ''; $config["\x6c\x6f\147\x5f\x66\x69\x6c\x65\x5f\x70\145\x72\155\x69\x73\163\151\157\x6e\163"] = 0644; $config["\x6c\x6f\147\137\144\x61\x74\x65\137\x66\x6f\162\x6d\x61\x74"] = "\131\55\155\x2d\x64\40\x48\x3a\151\72\x73"; $config["\145\x72\162\157\x72\137\166\x69\145\167\x73\137\x70\x61\x74\x68"] = ''; $config["\x63\x61\143\150\x65\x5f\160\x61\x74\150"] = ''; $config["\143\141\x63\150\145\x5f\161\x75\x65\162\x79\137\163\164\x72\151\x6e\147"] = FALSE; $config["\x65\x6e\143\162\171\160\164\151\x6f\x6e\x5f\x6b\x65\171"] = ''; $config["\x73\145\163\x73\x5f\144\x72\151\166\145\x72"] = "\146\x69\154\x65\x73"; $config["\163\145\x73\163\137\143\x6f\157\153\151\x65\x5f\156\141\155\x65"] = "\x63\x69\137\x73\145\x73\x73\151\157\156"; $config["\x73\x65\163\163\137\x65\170\x70\151\162\x61\164\x69\x6f\x6e"] = 7200; $config["\163\x65\x73\x73\x5f\x73\141\x76\x65\x5f\160\x61\x74\x68"] = FCPATH . "\x2e\56\57\141\x70\160\x6c\x69\x63\141\x74\x69\x6f\156\57\143\x61\x63\150\x65\x2f\x73\145\x73\163\151\x6f\x6e\x73\57"; $config["\163\x65\163\x73\137\155\x61\164\143\150\137\x69\x70"] = FALSE; $config["\x73\x65\x73\163\x5f\164\151\155\x65\x5f\164\x6f\x5f\165\160\x64\x61\x74\145"] = 300; $config["\163\145\x73\163\137\162\x65\147\x65\156\x65\x72\x61\x74\x65\137\x64\145\163\x74\162\x6f\x79"] = FALSE; $config["\x63\x6f\157\153\x69\145\137\160\162\145\146\151\x78"] = ''; $config["\143\157\x6f\153\151\x65\x5f\x64\x6f\x6d\141\151\156"] = ''; $config["\x63\x6f\157\x6b\151\145\x5f\x70\x61\164\x68"] = "\x2f"; $config["\x63\x6f\157\153\151\145\137\x73\x65\x63\x75\x72\x65"] = FALSE; $config["\x63\157\157\153\x69\145\x5f\150\x74\164\160\x6f\x6e\154\x79"] = FALSE; $config["\163\x74\x61\x6e\x64\x61\x72\144\151\172\x65\x5f\x6e\145\167\154\151\156\145\x73"] = FALSE; $config["\x67\154\x6f\x62\x61\154\x5f\x78\x73\163\137\x66\151\154\164\145\x72\151\156\147"] = FALSE; $config["\x63\x73\162\x66\137\x70\x72\x6f\164\x65\143\x74\x69\x6f\x6e"] = FALSE; $config["\x63\163\162\146\x5f\164\x6f\x6b\145\156\137\x6e\x61\x6d\x65"] = "\143\163\x72\146\x5f\164\x65\163\x74\x5f\156\x61\155\145"; $config["\x63\x73\162\x66\x5f\143\x6f\x6f\153\151\x65\137\156\x61\155\145"] = "\143\163\x72\146\137\143\157\x6f\x6b\x69\145\137\156\141\x6d\145"; $config["\x63\163\162\x66\137\145\x78\x70\151\x72\145"] = 7200; $config["\x63\x73\162\x66\137\162\x65\147\x65\156\145\x72\x61\x74\x65"] = TRUE; $config["\143\x73\162\x66\x5f\x65\170\x63\x6c\x75\x64\x65\x5f\x75\x72\151\163"] = array(); $config["\x63\157\155\x70\x72\x65\x73\x73\137\x6f\165\164\x70\165\164"] = FALSE; $config["\x74\x69\x6d\145\137\x72\145\146\x65\x72\145\x6e\143\145"] = "\x6c\x6f\x63\141\x6c"; $config["\162\x65\167\x72\151\164\145\x5f\163\150\157\x72\x74\x5f\164\141\147\163"] = FALSE; $config["\x70\162\157\x78\171\x5f\x69\x70\x73"] = ''; $config["\x64\145\154\x65\x74\x65\137\160\x61\x74\151\x65\156\x74\137\x66\x69\x6c\x65\163"] = false; $config["\145\166\145\x6e\x74\137\x6c\157\x67\x67\151\156\147\137\x66\x6f\162\x5f\x74\145\x73\x74"] = false; diff --git a/server/original/www/ezwebserver/src/application/config/config_settings.php b/server/original/www/ezwebserver/src/application/config/config_settings.php index fafb8f2..ffad5ab 100644 --- a/server/original/www/ezwebserver/src/application/config/config_settings.php +++ b/server/original/www/ezwebserver/src/application/config/config_settings.php @@ -1,7 +1,7 @@ CONF_EZWEBSERVER, "\x6b\x65\x79" => INI_KEY_FM_TOP_DIR]); defined("\x43\x4f\116\106\x5f\x53\125\x42\x5f\104\x49\122\123") or define("\x43\x4f\x4e\106\137\123\125\102\137\104\111\x52\123", ["\x73\x65\143\164\x69\157\156" => CONF_EZWEBSERVER, "\x6b\145\x79" => INI_KEY_SUB_DIRS]); defined("\103\x4f\x4e\x46\x5f\x4c\x49\116\x4b\x5f\x42\101\x53\x45\137\104\111\x52\123") or define("\x43\117\x4e\106\137\114\111\x4e\x4b\x5f\x42\x41\123\x45\x5f\x44\111\122\x53", ["\163\x65\x63\x74\151\x6f\156" => CONF_EZWEBSERVER, "\x6b\x65\171" => INI_KEY_LINK_BASE_DIRS]); defined("\103\117\x4e\x46\x5f\x4f\x4c\104\137\x49\117\123\x45\116\123\x4f\122\x5f\x46\x49\x4c\x45\x5f\120\101\124\110") or define("\x43\117\x4e\x46\x5f\117\x4c\x44\137\111\x4f\x53\x45\116\123\117\x52\137\x46\x49\x4c\x45\x5f\120\x41\124\x48", ["\163\x65\x63\x74\x69\x6f\x6e" => CONF_EZWEBSERVER, "\x6b\145\x79" => INI_KEY_OLD_IOSENSOR_FILE_PATH]); defined("\x43\x4f\116\x46\137\x49\x4f\x53\105\116\123\117\x52\137\106\111\114\x45\137\120\x41\x54\110") or define("\x43\117\116\x46\x5f\x49\117\123\105\x4e\x53\x4f\122\137\x46\111\x4c\105\137\x50\x41\124\110", ["\163\x65\143\x74\x69\x6f\x6e" => CONF_EZWEBSERVER, "\x6b\145\171" => INI_KEY_IOSENSOR_FILE_PATH]); defined("\103\x4f\116\106\137\125\x53\x45\x5f\x46\111\x4c\105\x5f\115\x41\116\x41\107\x45\x52\137\x53\105\x54\x54\x49\116\x47\123") or define("\103\x4f\x4e\106\x5f\x55\123\x45\x5f\106\111\114\105\x5f\x4d\101\x4e\101\107\105\122\x5f\x53\x45\x54\124\111\116\x47\123", ["\163\x65\143\164\151\x6f\x6e" => CONF_EZWEBSERVER, "\153\x65\171" => INI_KEY_USE_FILE_MANAGER_SETTINGS]); defined("\x44\102\137\x4b\105\131") or define("\x44\x42\x5f\x4b\x45\131", base64_decode("\163\102\x2b\x53\x72\x71\x57\143\x4e\x47\x4a\x75\x45\143\x38\170\x43\x35\67\x71\150\x77\x3d\x3d")); defined("\x52\x45\x53\125\x4c\124\124\x59\120\105\137\x33\x44\137\117\x42\x4a\105\103\x54") or define("\x52\105\123\x55\x4c\x54\x54\x59\x50\x45\137\x33\x44\137\x4f\x42\x4a\x45\x43\124", "\x54\x68\x72\145\145\104\x4f\142\x6a\x65\143\164"); defined("\124\x45\x4d\120\137\125\x53\105\122\x4e\101\115\x45") or define("\124\x45\115\x50\x5f\125\x53\105\122\116\x41\x4d\105", "\x32\157\103\x66\x50\161\x46\x58\145\150\x79\x67\x45\67\150\x35\x61\120\141\62"); defined("\124\x45\x4d\120\x5f\x50\x41\123\123\127\x4f\x52\104") or define("\x54\105\115\x50\x5f\120\x41\x53\x53\127\117\122\104", "\x63\x56\x6a\x7a\130\x4a\x7a\114\x79\65\131\x5a\131\x77\x30\x4a\x4c\x69\67\110"); defined("\101\103\103\x4f\x55\116\x54\137\114\x4f\103\113\x4f\125\124\x5f\124\110\122\105\123\x48\x4f\114\x44") or define("\101\103\103\117\x55\116\x54\x5f\114\117\x43\113\x4f\125\x54\x5f\x54\x48\122\x45\123\x48\x4f\114\x44", 10); defined("\104\x41\124\105\106\x4f\x52\x4d\x41\124\137\103\x41\x50\124\125\122\105\x44") or define("\x44\x41\x54\105\106\x4f\x52\x4d\x41\x54\x5f\x43\101\x50\x54\x55\122\105\x44", "\103\101\x50\124\x55\x52\105\x44\x5f\x44\x41\x54\105\x54\x49\115\105\x5f\106\117\122\x4d\x41\124"); defined("\x44\101\124\x45\106\117\x52\115\x41\x54\137\x44\101\124\x41\102\x41\123\105") or define("\x44\101\x54\x45\106\x4f\122\115\101\124\x5f\104\101\124\101\102\x41\x53\x45", "\104\101\x54\101\x42\101\x53\x45\137\104\101\x54\105\x54\111\115\x45\x5f\106\x4f\x52\115\101\124"); defined("\104\101\124\x45\106\x4f\x52\115\101\x54\x5f\x44\x41\124\x41\x42\x41\x53\x45\137\x44\x45\124\101\x49\x4c") or define("\x44\101\x54\x45\x46\117\x52\115\x41\124\137\x44\101\124\x41\102\x41\x53\x45\137\x44\x45\x54\101\x49\114", "\104\101\124\x41\x42\x41\x53\105\137\104\105\124\x41\111\x4c\137\104\101\x54\x45\x54\111\x4d\x45\137\x46\117\x52\x4d\x41\124"); defined("\104\101\124\x45\106\x4f\x52\x4d\101\x54\137\x44\103\115") or define("\x44\x41\124\x45\106\x4f\122\x4d\101\x54\x5f\104\x43\x4d", "\x44\x43\115\x5f\x44\x41\x54\105\x54\111\115\x45\137\x46\117\122\x4d\101\124"); defined("\104\101\x54\x45\x46\x4f\122\x4d\101\x54\137\x44\105\106\x41\125\x4c\x54") or define("\x44\101\124\x45\106\117\122\115\x41\x54\137\x44\x45\x46\101\125\x4c\x54", "\104\105\106\x41\x55\114\124\x5f\x54\x49\115\x45\x5f\106\117\x52\115\x41\124"); defined("\104\x41\124\105\106\x4f\122\115\x41\124\x5f\123\x4d\101\122\124\x50\101\x59\x5f\x52\x45\120\x4f\x52\x54") or define("\104\x41\x54\x45\106\117\122\x4d\x41\x54\x5f\x53\115\x41\x52\124\x50\x41\x59\x5f\x52\x45\x50\x4f\122\x54", "\x53\115\x41\122\x54\x50\101\131\x5f\122\105\x50\117\122\x54\x5f\x44\101\x54\105\x54\111\115\x45\137\x46\x4f\122\x4d\101\x54"); defined("\x44\x41\x54\x45\106\x4f\x52\x4d\101\x54\x5f\123\x4d\x41\x52\124\x50\101\x59\x5f\122\105\123\x55\114\x54") or define("\x44\x41\124\105\x46\117\x52\x4d\101\124\x5f\123\115\101\122\x54\x50\x41\131\137\x52\x45\123\125\x4c\124", "\123\115\x41\122\x54\120\101\131\x5f\x52\x45\x53\x55\114\x54\137\104\x41\124\105\x54\111\x4d\105\137\106\x4f\122\x4d\x41\124"); defined("\104\x41\124\105\106\x4f\122\x4d\x41\x54\137\123\103\110\105\x44\125\114\105") or define("\x44\x41\124\105\x46\117\x52\115\x41\x54\137\x53\103\110\x45\104\125\114\105", "\x53\103\110\105\104\x55\114\105\137\124\x49\115\105\137\x46\117\x52\x4d\101\124"); defined("\x44\101\x54\105\x46\117\x52\115\x41\x54\137\x53\105\101\x52\103\110\x5f\104\102") or define("\x44\x41\x54\105\106\x4f\x52\115\x41\124\137\x53\x45\x41\122\103\110\x5f\x44\102", "\x53\105\101\x52\103\110\137\104\102\137\x44\x41\124\x45"); defined("\x44\101\124\105\x46\117\x52\115\x41\x54\x5f\x4d\101\113\105\137\107\122\117\125\x50\137\116\x41\115\105") or define("\104\x41\x54\x45\x46\x4f\x52\115\x41\x54\x5f\115\x41\x4b\x45\x5f\x47\122\117\125\x50\x5f\x4e\101\115\105", "\115\101\113\105\x5f\107\x52\117\x55\x50\x5f\x4e\101\x4d\105"); defined("\x44\101\x54\x45\106\117\122\115\101\124\x5f\111\x53\117\x38\66\x30\x31") or define("\x44\x41\x54\x45\106\117\x52\x4d\x41\124\x5f\111\123\117\x38\66\60\61", "\111\x53\x4f\70\66\60\61"); defined("\x44\101\124\101\x46\117\122\x4d\101\124") or define("\x44\x41\124\101\x46\x4f\x52\x4d\101\124", array(DATEFORMAT_CAPTURED => "\x59\x6d\x64\x48\151\163\60\60\60", DATEFORMAT_DATABASE => "\131\x2d\x6d\55\144\40\x48\72\x69\72\163", DATEFORMAT_DATABASE_DETAIL => "\x59\55\x6d\x2d\144\x20\x48\x3a\151\72\163\x2e\60\x30\60", DATEFORMAT_DCM => "\x59\x6d\x64\x20\110\x69\x73", DATEFORMAT_DEFAULT => "\110\x3a\x69\72\x73", DATEFORMAT_SMARTPAY_REPORT => "\131\155\x64\110\x69\x73", DATEFORMAT_SMARTPAY_RESULT => "\131\155\x64\40\110\72\151\72\163", DATEFORMAT_SCHEDULE => "\110\x3a\x69\x3a\163", DATEFORMAT_SEARCH_DB => "\x59\55\155\x2d\144", DATEFORMAT_MAKE_GROUP_NAME => "\131\x6d\144\137\x48\x69\163", DATEFORMAT_ISO8601 => DateTime::ATOM)); diff --git a/server/original/www/ezwebserver/src/application/config/database.php b/server/original/www/ezwebserver/src/application/config/database.php index 64f2ba5..b68bb73 100644 --- a/server/original/www/ezwebserver/src/application/config/database.php +++ b/server/original/www/ezwebserver/src/application/config/database.php @@ -1,7 +1,7 @@ '', "\x68\157\163\164\x6e\141\155\x65" => $ini_array["\x45\x32\x44\102"]["\x68\x6f\163\x74\x6e\141\155\x65"], "\x70\157\162\164" => intval($ini_array["\x45\x32\104\x42"]["\160\x6f\162\x74"]), "\x75\x73\x65\x72\156\x61\x6d\145" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\x32\104\x42"]["\x75\163\x65\x72\x6e\141\155\x65"]), $db["\144\x62\137\153\x65\171"]), "\160\141\163\x73\x77\157\x72\x64" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\x32\x44\102"]["\160\x61\x73\163\167\x6f\x72\x64"]), $db["\144\x62\x5f\153\x65\171"]), "\144\141\x74\x61\x62\141\163\x65" => $ini_array["\105\62\x44\102"]["\144\x61\164\x61\x62\141\x73\145"], "\x64\142\x64\x72\151\166\x65\x72" => $ini_array["\105\x32\x44\102"]["\x64\x62\x64\x72\x69\166\x65\x72"], "\144\142\160\162\145\x66\x69\170" => '', "\160\143\157\156\x6e\145\x63\x74" => TRUE, "\x64\142\137\144\x65\142\165\x67" => ENVIRONMENT !== "\160\x72\157\x64\165\x63\x74\x69\x6f\x6e", "\143\x61\x63\150\x65\x5f\x6f\156" => FALSE, "\x63\x61\x63\x68\145\x64\x69\x72" => APPPATH . "\x63\141\143\x68\145", "\x63\x68\141\162\x5f\163\x65\x74" => "\165\164\x66\70", "\x64\x62\x63\157\154\x6c\141\x74" => "\x75\164\146\70\137\x67\x65\156\145\x72\x61\154\x5f\143\x69", "\163\167\x61\160\137\160\x72\145" => '', "\x65\x6e\143\x72\x79\x70\164" => FALSE, "\143\157\155\160\162\145\163\x73" => FALSE, "\163\164\162\151\x63\164\x6f\156" => FALSE, "\146\x61\x69\154\x6f\x76\145\x72" => array(), "\163\141\166\145\x5f\x71\x75\x65\162\151\x65\163" => TRUE); $db["\x49\x4d\x50\114\101\x4e\124\x5f\104\102"] = array("\x64\163\x6e" => '', "\150\x6f\163\x74\x6e\141\155\x65" => $ini_array["\111\115\x50\114\x41\116\x54\137\104\x42"]["\x68\157\163\x74\x6e\141\x6d\x65"], "\x70\157\x72\x74" => intval($ini_array["\x49\115\x50\114\x41\116\x54\137\104\102"]["\160\x6f\x72\x74"]), "\x75\163\145\x72\x6e\141\x6d\145" => CryptoUtils::xor_string(base64_decode($ini_array["\111\115\120\114\x41\x4e\x54\x5f\x44\x42"]["\x75\x73\x65\162\x6e\141\155\145"]), $db["\x64\x62\x5f\x6b\145\171"]), "\160\141\x73\163\x77\x6f\162\x64" => CryptoUtils::xor_string(base64_decode($ini_array["\x49\x4d\x50\114\101\116\124\x5f\x44\102"]["\x70\x61\x73\x73\x77\157\x72\144"]), $db["\144\x62\x5f\153\x65\x79"]), "\x64\141\164\x61\x62\141\x73\145" => $ini_array["\111\115\x50\x4c\x41\x4e\124\x5f\x44\x42"]["\x64\x61\164\141\142\141\163\x65"], "\x64\x62\x64\x72\x69\166\x65\x72" => $ini_array["\x49\x4d\120\114\101\116\124\137\104\x42"]["\x64\x62\x64\162\x69\x76\145\x72"], "\144\142\160\162\145\146\151\170" => '', "\160\143\157\x6e\156\145\143\164" => TRUE, "\144\x62\x5f\x64\145\x62\165\x67" => ENVIRONMENT !== "\x70\162\x6f\x64\x75\x63\x74\x69\x6f\x6e", "\x63\141\143\150\145\x5f\157\x6e" => FALSE, "\x63\x61\143\x68\145\x64\x69\x72" => APPPATH . "\143\141\143\x68\145", "\x63\150\141\x72\137\163\x65\164" => "\x75\164\146\70", "\x64\142\143\x6f\154\154\x61\x74" => "\165\164\x66\70\x5f\147\145\156\145\162\x61\x6c\x5f\143\151", "\163\x77\141\160\x5f\x70\x72\x65" => '', "\145\x6e\x63\x72\171\x70\x74" => FALSE, "\x63\157\x6d\x70\x72\145\163\x73" => FALSE, "\163\164\162\151\143\164\x6f\x6e" => FALSE, "\x66\141\x69\x6c\157\166\x65\162" => array(), "\x73\141\166\145\137\161\x75\145\x72\151\145\163" => TRUE); $db["\105\x33\104\x42"] = array("\144\163\156" => '', "\x68\157\x73\x74\156\141\155\145" => $ini_array["\105\63\104\102"]["\150\x6f\163\x74\156\141\155\145"], "\x70\x6f\162\x74" => intval($ini_array["\x45\x33\104\102"]["\x70\157\162\164"]), "\165\x73\145\162\x6e\x61\x6d\x65" => CryptoUtils::xor_string(base64_decode($ini_array["\105\63\x44\x42"]["\165\163\145\162\156\x61\155\145"]), $db["\x64\x62\137\x6b\x65\x79"]), "\160\141\163\x73\x77\x6f\x72\144" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\63\x44\102"]["\160\x61\163\x73\x77\157\162\x64"]), $db["\144\x62\x5f\x6b\x65\x79"]), "\144\x61\x74\141\142\x61\x73\145" => $ini_array["\x45\63\x44\102"]["\x64\x61\x74\x61\142\141\163\145"], "\144\x62\144\162\151\x76\x65\x72" => $ini_array["\x45\x33\x44\x42"]["\x64\x62\x64\162\x69\x76\x65\162"], "\x64\x62\x70\162\x65\146\x69\170" => '', "\160\x63\x6f\156\156\145\x63\164" => TRUE, "\x64\x62\137\144\x65\142\x75\x67" => ENVIRONMENT !== "\160\162\157\x64\165\x63\164\x69\x6f\x6e", "\143\x61\x63\x68\145\x5f\157\x6e" => FALSE, "\x63\x61\x63\x68\x65\x64\x69\x72" => APPPATH . "\x63\141\x63\150\x65", "\143\x68\x61\x72\137\163\x65\x74" => "\x75\x74\x66\x38", "\144\x62\143\157\154\154\x61\164" => "\165\x74\146\x38\137\147\145\156\x65\162\141\154\137\143\x69", "\163\167\x61\160\137\160\162\x65" => '', "\145\x6e\143\x72\x79\160\x74" => FALSE, "\143\157\x6d\160\x72\x65\x73\163" => FALSE, "\x73\x74\x72\x69\x63\164\x6f\156" => FALSE, "\x66\x61\x69\154\x6f\x76\x65\x72" => array(), "\x73\141\x76\145\x5f\x71\x75\x65\162\151\x65\x73" => TRUE); $db["\x53\x43\x5f\x44\x42"] = array("\x64\x73\x6e" => '', "\x68\x6f\163\x74\156\141\155\145" => $ini_array["\x53\x43\x5f\x44\x42"]["\x68\x6f\163\164\156\141\x6d\x65"], "\x70\x6f\x72\164" => intval($ini_array["\123\103\137\x44\x42"]["\x70\157\x72\164"]), "\165\x73\x65\x72\x6e\141\x6d\145" => CryptoUtils::xor_string(base64_decode($ini_array["\123\x43\137\x44\x42"]["\165\163\x65\x72\156\141\x6d\x65"]), $db["\x64\x62\137\x6b\x65\171"]), "\160\x61\x73\163\x77\x6f\x72\144" => CryptoUtils::xor_string(base64_decode($ini_array["\123\103\137\x44\102"]["\x70\141\163\x73\x77\157\x72\x64"]), $db["\x64\x62\x5f\x6b\145\x79"]), "\x64\x61\x74\141\142\x61\163\145" => $ini_array["\x53\x43\137\104\x42"]["\144\141\x74\x61\142\141\163\145"], "\x64\142\144\162\151\x76\145\x72" => $ini_array["\x53\x43\x5f\x44\x42"]["\144\142\144\x72\x69\x76\x65\162"], "\144\x62\160\162\145\146\151\x78" => '', "\x70\143\157\156\x6e\145\143\164" => TRUE, "\x64\x62\137\144\x65\x62\x75\x67" => ENVIRONMENT !== "\x70\x72\x6f\x64\165\143\x74\x69\x6f\x6e", "\x63\x61\x63\x68\145\137\157\x6e" => FALSE, "\x63\x61\x63\150\x65\144\151\162" => APPPATH . "\143\141\x63\x68\145", "\143\x68\x61\162\x5f\x73\145\164" => "\165\x74\x66\x38", "\144\x62\143\157\x6c\x6c\x61\164" => "\x75\x74\x66\70\x5f\147\145\x6e\145\x72\141\x6c\x5f\143\x69", "\x73\167\141\160\137\x70\162\x65" => '', "\145\x6e\143\162\x79\x70\x74" => FALSE, "\x63\157\155\160\x72\145\x73\163" => FALSE, "\x73\164\x72\151\143\164\157\x6e" => FALSE, "\x66\x61\151\154\157\x76\x65\162" => array(), "\163\x61\166\x65\x5f\161\165\145\162\x69\145\x73" => TRUE); $db["\114\x4f\107"] = array("\x64\163\156" => '', "\x68\157\163\x74\156\141\x6d\145" => $ini_array["\105\62\x44\102"]["\150\157\163\164\x6e\x61\x6d\145"], "\160\x6f\162\x74" => intval($ini_array["\105\62\x44\x42"]["\160\157\162\x74"]), "\165\163\145\162\x6e\x61\155\145" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\x32\x44\x42"]["\165\163\x65\x72\156\x61\x6d\x65"]), $db["\144\x62\137\153\145\171"]), "\160\141\163\163\x77\157\x72\144" => CryptoUtils::xor_string(base64_decode($ini_array["\105\62\104\102"]["\x70\141\x73\163\x77\157\x72\x64"]), $db["\144\142\137\153\x65\171"]), "\x64\141\164\x61\x62\x61\163\x65" => "\114\x4f\x47", "\144\x62\144\x72\x69\166\145\x72" => $ini_array["\x45\62\x44\102"]["\x64\142\144\162\151\x76\145\162"], "\x64\142\x70\162\x65\146\151\x78" => '', "\160\x63\x6f\x6e\156\x65\143\164" => TRUE, "\x64\142\x5f\144\x65\142\165\x67" => ENVIRONMENT !== "\x70\162\157\144\165\143\164\x69\157\156", "\143\x61\143\x68\145\x5f\157\156" => FALSE, "\143\141\x63\x68\x65\x64\151\x72" => APPPATH . "\143\x61\x63\x68\145", "\x63\150\x61\x72\137\163\145\164" => "\x75\164\x66\x38", "\x64\142\x63\x6f\x6c\x6c\141\164" => "\165\164\x66\70\x5f\x67\145\x6e\145\162\x61\154\137\x63\151", "\x73\167\x61\160\x5f\160\x72\x65" => '', "\x65\x6e\x63\x72\x79\x70\164" => FALSE, "\143\x6f\155\160\162\x65\x73\x73" => FALSE, "\163\164\x72\x69\x63\164\157\156" => FALSE, "\146\141\x69\x6c\157\x76\x65\162" => array(), "\163\141\166\145\137\x71\165\145\x72\151\x65\163" => TRUE); $db["\123\105\124\124\x49\116\107"] = array("\x64\x73\156" => '', "\x68\157\x73\164\156\x61\x6d\145" => $ini_array["\x45\x32\x44\x42"]["\x68\157\x73\x74\x6e\141\x6d\145"], "\x70\157\162\164" => intval($ini_array["\x45\x32\104\102"]["\x70\157\x72\x74"]), "\165\163\x65\162\x6e\x61\x6d\145" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\x32\x44\x42"]["\x75\x73\x65\162\x6e\x61\x6d\145"]), $db["\x64\x62\137\153\x65\171"]), "\160\x61\163\163\x77\157\162\144" => CryptoUtils::xor_string(base64_decode($ini_array["\x45\62\104\102"]["\160\x61\x73\x73\167\157\162\144"]), $db["\144\142\137\153\145\x79"]), "\144\141\164\x61\142\x61\x73\145" => "\123\105\124\124\x49\x4e\x47", "\144\x62\x64\x72\x69\x76\145\x72" => $ini_array["\x45\62\x44\x42"]["\x64\x62\x64\162\151\166\x65\162"], "\x64\x62\160\162\145\146\x69\170" => '', "\160\x63\x6f\x6e\156\145\x63\164" => TRUE, "\144\142\x5f\x64\x65\x62\165\147" => ENVIRONMENT !== "\160\162\157\144\165\143\x74\x69\x6f\x6e", "\x63\141\x63\150\x65\137\x6f\156" => FALSE, "\143\141\143\x68\x65\144\x69\x72" => APPPATH . "\x63\141\x63\150\x65", "\143\150\141\x72\x5f\163\x65\x74" => "\x75\x74\146\70", "\x64\142\143\x6f\x6c\x6c\141\x74" => "\x75\x74\x66\x38\x5f\x67\145\156\145\162\141\154\137\143\x69", "\163\167\141\160\x5f\160\162\145" => '', "\145\x6e\143\x72\171\160\164" => FALSE, "\143\157\x6d\x70\162\145\x73\163" => FALSE, "\x73\164\162\x69\x63\164\157\x6e" => FALSE, "\146\141\x69\154\x6f\166\145\x72" => array(), "\163\x61\166\x65\x5f\x71\x75\145\162\x69\x65\x73" => TRUE); diff --git a/server/original/www/ezwebserver/src/application/config/doctypes.php b/server/original/www/ezwebserver/src/application/config/doctypes.php index 3e65bf6..c39416f 100644 --- a/server/original/www/ezwebserver/src/application/config/doctypes.php +++ b/server/original/www/ezwebserver/src/application/config/doctypes.php @@ -1,7 +1,7 @@ "\74\41\x44\117\x43\x54\131\120\105\40\150\164\155\x6c\40\x50\x55\102\x4c\x49\x43\x20\x22\x2d\x2f\x2f\127\63\103\57\x2f\x44\x54\x44\x20\130\110\x54\x4d\114\x20\x31\x2e\61\x2f\57\105\x4e\x22\40\x22\x68\x74\x74\160\x3a\x2f\x2f\x77\167\167\x2e\x77\x33\56\x6f\162\x67\57\x54\x52\x2f\170\x68\164\155\154\x31\61\57\104\x54\104\x2f\x78\150\x74\x6d\x6c\61\x31\x2e\144\164\144\42\x3e", "\170\150\164\x6d\x6c\x31\55\x73\x74\x72\x69\143\x74" => "\74\41\x44\x4f\x43\x54\x59\120\105\40\x68\164\155\x6c\x20\x50\x55\x42\x4c\111\103\x20\42\x2d\57\x2f\x57\63\x43\x2f\x2f\104\x54\104\x20\130\110\x54\115\x4c\40\x31\56\x30\40\123\x74\162\151\x63\164\x2f\57\x45\116\x22\x20\42\150\x74\164\160\72\57\x2f\x77\167\167\x2e\167\x33\x2e\157\162\147\x2f\x54\x52\x2f\170\x68\164\155\154\61\x2f\x44\x54\x44\57\170\150\x74\x6d\x6c\x31\55\163\x74\162\x69\x63\164\x2e\144\164\x64\42\76", "\170\150\164\155\154\61\55\x74\162\141\x6e\x73" => "\74\x21\x44\117\103\x54\x59\120\x45\40\150\x74\155\154\x20\120\125\102\x4c\x49\x43\40\x22\x2d\57\57\127\x33\103\57\57\104\x54\104\40\x58\110\x54\x4d\114\40\x31\x2e\x30\x20\x54\162\141\x6e\x73\x69\x74\x69\x6f\x6e\x61\x6c\x2f\x2f\105\x4e\42\x20\42\150\x74\x74\x70\72\x2f\x2f\167\x77\x77\56\x77\63\x2e\x6f\162\147\x2f\124\x52\57\170\150\x74\x6d\x6c\x31\57\104\x54\104\x2f\170\150\164\x6d\154\x31\x2d\x74\162\141\x6e\163\x69\x74\151\x6f\156\x61\x6c\56\144\x74\x64\42\76", "\170\150\164\x6d\154\61\55\146\162\x61\x6d\x65" => "\74\41\104\117\x43\124\x59\x50\x45\40\150\164\x6d\154\40\x50\125\102\114\x49\103\40\x22\x2d\57\x2f\x57\63\x43\x2f\x2f\x44\124\x44\40\130\110\124\115\x4c\x20\61\56\x30\40\106\x72\141\x6d\145\x73\145\x74\x2f\57\x45\x4e\x22\40\42\150\164\x74\160\x3a\57\x2f\167\x77\x77\x2e\x77\x33\56\x6f\x72\x67\57\124\x52\x2f\x78\150\164\x6d\154\61\x2f\104\124\x44\57\170\x68\164\155\154\61\x2d\x66\162\x61\x6d\x65\x73\x65\x74\56\x64\164\x64\42\76", "\170\150\164\x6d\154\x2d\x62\x61\163\x69\143\61\x31" => "\74\41\x44\117\103\x54\131\120\x45\40\x68\164\x6d\154\x20\x50\125\x42\114\111\x43\x20\x22\55\x2f\x2f\127\63\103\57\57\x44\x54\104\40\x58\110\x54\x4d\114\x20\102\141\163\x69\x63\40\x31\x2e\61\57\57\105\116\42\x20\x22\x68\x74\x74\160\x3a\57\57\x77\x77\x77\x2e\167\x33\56\x6f\x72\147\x2f\x54\122\x2f\170\150\164\x6d\154\x2d\142\141\163\x69\143\x2f\x78\x68\x74\155\x6c\55\142\x61\163\x69\x63\61\61\x2e\144\164\x64\42\x3e", "\150\164\x6d\154\x35" => "\x3c\x21\104\117\x43\124\x59\120\105\40\150\x74\155\x6c\76", "\150\164\x6d\154\64\55\163\164\162\x69\x63\x74" => "\x3c\x21\x44\117\x43\x54\131\x50\x45\x20\x48\124\115\x4c\x20\x50\125\x42\x4c\111\x43\40\42\55\x2f\x2f\127\63\103\57\x2f\x44\124\x44\40\110\x54\x4d\x4c\x20\x34\x2e\x30\x31\x2f\57\105\116\42\40\x22\150\x74\x74\160\72\57\x2f\167\167\167\56\x77\x33\56\157\162\x67\x2f\x54\122\57\x68\164\x6d\x6c\x34\57\163\164\162\x69\143\x74\x2e\144\164\144\42\x3e", "\x68\x74\155\154\x34\55\164\162\x61\156\x73" => "\x3c\x21\x44\117\103\124\131\x50\x45\x20\110\124\115\114\x20\x50\125\x42\x4c\x49\103\x20\42\x2d\x2f\57\x57\x33\103\57\57\x44\124\104\40\110\x54\115\x4c\40\64\56\60\61\40\124\x72\x61\156\163\x69\164\x69\157\156\x61\154\x2f\57\105\116\x22\x20\x22\x68\164\164\160\x3a\57\x2f\x77\167\x77\x2e\167\63\56\x6f\x72\x67\x2f\124\122\x2f\x68\164\x6d\x6c\64\x2f\154\157\x6f\163\145\56\144\x74\x64\x22\76", "\150\164\x6d\154\64\55\x66\162\141\x6d\x65" => "\74\x21\104\117\x43\x54\131\120\105\x20\x48\x54\x4d\114\x20\x50\125\102\x4c\x49\x43\40\x22\x2d\x2f\57\127\x33\x43\x2f\x2f\104\x54\104\x20\x48\x54\115\x4c\x20\64\56\60\x31\40\106\x72\141\155\x65\x73\x65\164\x2f\57\105\116\x22\40\42\x68\x74\164\x70\x3a\57\x2f\x77\167\167\x2e\x77\x33\x2e\157\x72\147\57\x54\122\57\150\x74\x6d\x6c\x34\57\146\162\x61\155\x65\163\145\x74\56\x64\164\x64\x22\76", "\x6d\141\x74\150\x6d\154\x31" => "\74\x21\104\x4f\x43\x54\x59\120\105\40\155\141\x74\x68\40\123\x59\x53\124\105\115\x20\42\x68\x74\x74\160\72\x2f\x2f\167\x77\167\56\x77\63\56\x6f\x72\x67\x2f\115\x61\164\150\57\x44\124\x44\x2f\155\141\x74\150\155\154\x31\x2f\155\141\164\150\x6d\x6c\56\144\164\144\42\76", "\155\141\x74\x68\155\x6c\62" => "\x3c\41\104\117\x43\x54\x59\x50\105\x20\155\141\164\150\40\x50\125\102\x4c\111\x43\40\x22\x2d\x2f\x2f\127\x33\x43\57\x2f\104\x54\104\40\115\x61\x74\x68\115\114\40\62\x2e\60\x2f\x2f\x45\116\x22\40\42\150\164\164\160\x3a\x2f\57\x77\167\x77\x2e\167\63\x2e\x6f\x72\x67\x2f\x4d\x61\x74\x68\x2f\104\x54\104\57\x6d\141\x74\150\x6d\x6c\x32\x2f\155\x61\x74\x68\x6d\154\62\56\x64\x74\x64\42\76", "\x73\x76\x67\x31\x30" => "\74\x21\x44\x4f\x43\124\x59\x50\x45\x20\x73\166\x67\x20\120\x55\102\114\111\103\x20\x22\x2d\x2f\57\127\x33\x43\57\57\104\124\x44\40\123\x56\x47\x20\x31\x2e\x30\x2f\57\105\116\42\40\x22\150\164\x74\160\72\57\57\x77\167\167\x2e\167\x33\56\157\x72\147\x2f\124\x52\57\62\x30\60\61\57\122\105\103\x2d\x53\x56\x47\55\62\x30\60\61\60\x39\60\x34\57\104\124\104\x2f\163\166\147\x31\x30\x2e\144\164\x64\42\x3e", "\x73\x76\x67\61\61" => "\x3c\41\104\117\x43\x54\131\x50\x45\x20\x73\166\147\40\120\125\x42\x4c\111\x43\40\x22\x2d\x2f\x2f\x57\63\103\x2f\57\x44\124\104\40\123\x56\x47\40\61\x2e\x31\x2f\57\x45\116\42\x20\x22\x68\x74\164\160\72\x2f\57\167\x77\167\56\167\63\56\157\x72\147\x2f\x47\162\141\x70\x68\151\x63\163\x2f\x53\x56\107\x2f\x31\x2e\x31\x2f\104\x54\x44\57\163\x76\147\x31\x31\x2e\144\x74\144\x22\x3e", "\163\166\x67\61\61\x2d\x62\141\163\x69\x63" => "\x3c\41\104\117\103\x54\x59\x50\x45\40\x73\166\147\x20\120\125\x42\x4c\x49\103\40\42\x2d\x2f\x2f\127\x33\103\x2f\57\x44\x54\x44\x20\x53\x56\x47\x20\x31\56\61\x20\102\x61\x73\x69\143\57\x2f\x45\x4e\x22\x20\42\x68\x74\x74\x70\72\57\x2f\x77\x77\167\x2e\x77\x33\56\x6f\162\x67\57\x47\162\141\160\150\x69\143\163\x2f\x53\x56\x47\x2f\x31\56\61\x2f\104\124\x44\57\x73\x76\147\61\61\55\142\x61\x73\x69\x63\56\x64\x74\x64\42\76", "\x73\166\147\x31\x31\55\x74\151\x6e\x79" => "\x3c\x21\x44\117\x43\124\x59\x50\x45\x20\163\166\x67\x20\x50\x55\x42\114\111\103\40\42\x2d\x2f\x2f\127\x33\103\57\57\104\124\104\x20\x53\x56\107\x20\61\56\61\40\x54\x69\x6e\x79\57\x2f\x45\116\42\x20\x22\x68\164\x74\160\x3a\57\x2f\167\167\x77\56\x77\63\56\157\162\147\x2f\x47\x72\x61\160\150\151\x63\163\57\x53\x56\107\x2f\x31\x2e\x31\57\x44\124\x44\x2f\x73\166\x67\x31\x31\x2d\x74\x69\x6e\171\x2e\x64\x74\144\x22\x3e", "\x78\150\x74\x6d\x6c\55\155\x61\164\150\x2d\163\x76\147\x2d\x78\x68" => "\x3c\41\x44\117\103\124\131\120\105\x20\x68\164\x6d\154\x20\x50\125\x42\x4c\x49\103\x20\42\x2d\57\57\127\63\103\x2f\57\x44\x54\x44\40\x58\x48\x54\115\114\x20\61\x2e\61\x20\160\x6c\x75\163\40\x4d\141\x74\x68\115\x4c\40\62\x2e\x30\x20\160\154\x75\163\40\123\x56\107\40\61\x2e\x31\x2f\x2f\105\116\42\x20\42\150\x74\x74\160\72\x2f\x2f\x77\x77\167\x2e\167\x33\56\157\x72\x67\x2f\x32\x30\x30\x32\57\x30\64\x2f\170\x68\164\x6d\x6c\55\155\x61\x74\x68\x2d\163\x76\x67\x2f\x78\x68\164\155\154\x2d\155\x61\x74\x68\55\x73\x76\x67\56\144\164\144\42\x3e", "\170\x68\164\155\154\x2d\x6d\x61\x74\x68\x2d\163\x76\147\55\163\150" => "\74\41\104\117\x43\x54\131\120\x45\x20\163\x76\x67\x3a\x73\166\x67\x20\x50\x55\102\114\111\103\x20\x22\55\x2f\57\127\63\103\x2f\57\x44\x54\104\40\130\x48\124\115\114\x20\61\x2e\61\x20\x70\x6c\x75\x73\40\x4d\x61\x74\150\115\114\x20\x32\x2e\60\40\160\154\x75\x73\40\123\x56\x47\x20\x31\56\61\x2f\57\x45\116\x22\40\42\x68\x74\x74\160\72\x2f\57\167\167\x77\56\167\x33\56\x6f\162\x67\x2f\62\60\60\62\57\60\x34\57\170\x68\x74\x6d\x6c\55\155\x61\x74\x68\x2d\x73\166\147\57\170\x68\164\x6d\x6c\x2d\x6d\141\x74\150\55\163\166\147\56\144\x74\x64\x22\x3e", "\170\x68\x74\155\154\55\x72\x64\x66\x61\55\x31" => "\74\x21\x44\117\103\124\131\x50\x45\40\150\x74\155\154\x20\x50\x55\102\x4c\x49\x43\40\42\55\x2f\57\127\63\x43\57\x2f\x44\x54\104\x20\130\110\x54\x4d\x4c\53\x52\104\x46\141\40\61\56\60\x2f\x2f\105\116\x22\40\42\150\x74\x74\x70\72\x2f\57\x77\x77\x77\56\167\x33\56\x6f\162\x67\57\x4d\141\162\x6b\125\160\x2f\104\x54\104\57\x78\150\x74\155\154\x2d\x72\x64\x66\141\55\61\x2e\144\x74\144\42\x3e", "\x78\150\164\x6d\154\x2d\x72\144\x66\x61\55\x32" => "\x3c\41\104\x4f\103\x54\131\120\x45\x20\150\x74\155\154\40\x50\x55\102\x4c\x49\x43\x20\x22\x2d\x2f\57\127\63\103\57\57\104\124\x44\x20\130\110\124\x4d\x4c\53\122\x44\106\x61\x20\x31\56\x31\x2f\57\105\116\x22\x20\x22\150\164\x74\160\x3a\57\57\167\167\x77\56\167\x33\56\157\162\x67\x2f\x4d\141\162\153\x55\x70\x2f\x44\124\x44\x2f\170\x68\164\155\x6c\55\162\144\146\141\x2d\x32\56\144\164\144\x22\x3e"); diff --git a/server/original/www/ezwebserver/src/application/config/foreign_chars.php b/server/original/www/ezwebserver/src/application/config/foreign_chars.php index 5e05264..d132c8f 100644 --- a/server/original/www/ezwebserver/src/application/config/foreign_chars.php +++ b/server/original/www/ezwebserver/src/application/config/foreign_chars.php @@ -1,7 +1,7 @@ "\141\x65", "\57\xc3\xb6\174\xc5\x93\57" => "\157\145", "\57\303\xbc\x2f" => "\x75\x65", "\57\xc3\204\x2f" => "\x41\145", "\57\xc3\x9c\57" => "\125\145", "\57\303\226\57" => "\x4f\x65", "\x2f\xc3\x80\174\303\x81\x7c\303\x82\x7c\xc3\203\174\303\204\174\303\205\174\307\xba\x7c\304\x80\x7c\304\x82\174\304\204\174\307\x8d\174\xce\221\x7c\316\x86\x7c\xe1\xba\242\174\341\272\xa0\174\341\272\246\x7c\xe1\xba\xaa\x7c\341\272\250\174\xe1\272\xac\x7c\xe1\272\xb0\x7c\341\xba\256\x7c\341\272\xb4\x7c\xe1\xba\xb2\x7c\341\xba\xb6\x7c\320\x90\x2f" => "\x41", "\57\303\240\174\303\241\x7c\xc3\xa2\x7c\xc3\xa3\x7c\303\xa5\174\xc7\273\x7c\xc4\201\174\304\203\x7c\304\x85\x7c\307\216\x7c\xc2\252\174\316\261\174\xce\254\x7c\xe1\272\xa3\174\341\xba\xa1\x7c\xe1\xba\xa7\174\xe1\xba\245\174\341\272\xab\x7c\xe1\272\xa9\174\xe1\272\xad\x7c\341\xba\xb1\174\xe1\272\257\x7c\341\272\265\x7c\xe1\272\xb3\174\xe1\xba\xb7\x7c\320\xb0\x2f" => "\141", "\x2f\320\221\57" => "\102", "\57\320\261\57" => "\142", "\x2f\xc3\x87\x7c\xc4\206\x7c\xc4\x88\x7c\xc4\212\174\304\214\x2f" => "\x43", "\x2f\303\xa7\174\xc4\207\174\304\211\x7c\xc4\x8b\x7c\304\x8d\57" => "\x63", "\57\xd0\x94\x2f" => "\104", "\57\xd0\264\x2f" => "\144", "\x2f\xc3\220\174\304\x8e\174\304\x90\x7c\xce\x94\x2f" => "\104\x6a", "\x2f\303\xb0\174\xc4\217\x7c\304\x91\174\316\xb4\57" => "\x64\152", "\x2f\303\210\x7c\xc3\x89\174\303\x8a\x7c\xc3\x8b\x7c\xc4\222\x7c\xc4\224\174\304\x96\174\304\x98\x7c\xc4\x9a\174\xce\225\174\316\210\174\341\272\xbc\174\341\xba\xba\x7c\341\272\270\174\341\xbb\x80\174\xe1\xba\276\174\341\273\x84\x7c\341\273\202\x7c\xe1\xbb\206\x7c\xd0\x95\x7c\320\xad\57" => "\x45", "\x2f\xc3\xa8\x7c\303\251\x7c\xc3\xaa\174\xc3\253\x7c\xc4\223\x7c\xc4\x95\174\304\227\x7c\xc4\231\174\xc4\x9b\x7c\xce\xad\174\316\265\x7c\341\272\xbd\174\xe1\xba\273\174\341\272\271\x7c\xe1\273\201\x7c\341\xba\xbf\x7c\341\xbb\205\174\341\xbb\x83\174\xe1\273\207\x7c\320\xb5\174\xd1\x8d\x2f" => "\x65", "\57\xd0\xa4\x2f" => "\106", "\57\321\204\57" => "\146", "\57\304\234\x7c\304\x9e\174\xc4\240\x7c\xc4\xa2\x7c\316\x93\x7c\320\223\x7c\xd2\220\x2f" => "\107", "\x2f\xc4\x9d\174\xc4\x9f\x7c\xc4\241\174\304\243\174\316\263\x7c\xd0\xb3\x7c\322\221\x2f" => "\147", "\57\xc4\xa4\x7c\xc4\246\57" => "\110", "\57\304\xa5\174\xc4\xa7\57" => "\x68", "\57\xc3\214\x7c\xc3\215\174\303\x8e\x7c\xc3\217\x7c\304\xa8\174\304\252\x7c\xc4\254\174\307\x8f\174\xc4\256\174\304\260\174\316\x97\x7c\xce\211\174\316\212\x7c\xce\231\x7c\316\252\x7c\341\273\210\x7c\xe1\xbb\x8a\x7c\xd0\x98\174\320\xab\57" => "\x49", "\57\303\254\174\303\xad\174\303\xae\174\xc3\xaf\174\304\251\174\xc4\xab\174\304\xad\x7c\xc7\220\x7c\304\257\174\304\xb1\x7c\316\xb7\x7c\xce\xae\174\xce\257\x7c\xce\xb9\174\317\x8a\x7c\341\273\211\x7c\341\xbb\213\174\xd0\270\174\xd1\x8b\174\xd1\x97\57" => "\x69", "\x2f\304\264\57" => "\x4a", "\x2f\xc4\xb5\x2f" => "\x6a", "\57\304\xb6\174\xce\232\174\320\x9a\x2f" => "\x4b", "\57\304\xb7\174\xce\xba\174\320\272\57" => "\153", "\57\304\xb9\x7c\304\xbb\x7c\xc4\xbd\174\304\xbf\174\xc5\201\x7c\316\x9b\x7c\xd0\x9b\x2f" => "\x4c", "\57\304\xba\x7c\304\xbc\174\xc4\276\174\xc5\x80\174\xc5\x82\x7c\xce\273\174\xd0\273\57" => "\154", "\x2f\320\234\57" => "\x4d", "\57\xd0\xbc\57" => "\x6d", "\x2f\xc3\x91\x7c\xc5\203\174\305\205\x7c\305\207\x7c\316\x9d\174\xd0\x9d\x2f" => "\116", "\x2f\303\xb1\x7c\305\x84\174\305\x86\x7c\305\210\174\305\211\x7c\xce\xbd\x7c\xd0\xbd\57" => "\156", "\x2f\303\x92\174\xc3\x93\x7c\303\224\x7c\xc3\x95\174\305\214\x7c\305\x8e\x7c\xc7\x91\174\305\x90\174\xc6\240\x7c\303\230\x7c\xc7\xbe\174\xce\237\174\316\x8c\174\316\xa9\x7c\316\217\x7c\341\273\216\174\341\273\x8c\x7c\341\273\222\174\xe1\xbb\x90\174\341\xbb\226\x7c\341\xbb\224\174\341\xbb\230\174\341\273\234\x7c\xe1\273\x9a\x7c\341\273\xa0\174\xe1\xbb\236\x7c\xe1\xbb\xa2\174\320\x9e\x2f" => "\117", "\57\xc3\xb2\174\303\xb3\174\303\264\174\303\xb5\174\305\215\174\305\x8f\174\307\222\x7c\305\221\x7c\xc6\xa1\x7c\xc3\xb8\174\307\277\174\302\272\174\xce\xbf\x7c\317\214\x7c\xcf\211\x7c\317\x8e\x7c\xe1\xbb\x8f\174\xe1\273\x8d\x7c\xe1\273\x93\x7c\341\273\221\174\341\xbb\227\174\341\xbb\x95\174\341\273\x99\174\341\273\x9d\x7c\341\273\233\x7c\341\xbb\xa1\x7c\xe1\273\237\x7c\xe1\xbb\243\174\xd0\xbe\x2f" => "\157", "\57\xd0\237\57" => "\120", "\57\xd0\xbf\57" => "\160", "\57\xc5\x94\174\305\x96\174\305\230\174\316\xa1\174\xd0\240\57" => "\122", "\57\305\225\174\305\227\174\305\231\174\317\x81\174\321\200\x2f" => "\x72", "\57\xc5\x9a\x7c\xc5\234\x7c\xc5\x9e\174\310\230\x7c\305\xa0\174\xce\xa3\x7c\xd0\241\57" => "\123", "\57\xc5\x9b\174\305\235\174\xc5\x9f\x7c\xc8\231\174\305\xa1\174\xc5\xbf\174\xcf\x83\174\317\202\x7c\321\201\57" => "\163", "\57\310\232\174\xc5\xa2\174\305\xa4\x7c\xc5\246\x7c\xcf\x84\x7c\xd0\242\57" => "\x54", "\x2f\xc8\x9b\174\305\xa3\174\305\245\174\xc5\xa7\x7c\xd1\x82\57" => "\x74", "\x2f\303\x9e\174\xc3\xbe\x2f" => "\x74\150", "\57\xc3\231\x7c\303\232\x7c\xc3\x9b\174\305\xa8\x7c\305\xaa\x7c\305\254\x7c\xc5\xae\x7c\305\xb0\174\xc5\262\174\xc6\xaf\174\xc7\x93\x7c\307\225\x7c\307\227\174\xc7\x99\174\307\233\174\305\xa8\x7c\xe1\xbb\xa6\x7c\341\xbb\xa4\174\xe1\xbb\xaa\x7c\xe1\xbb\250\174\341\273\xae\174\xe1\xbb\xac\x7c\xe1\273\xb0\174\320\243\x2f" => "\125", "\57\303\xb9\x7c\303\xba\174\303\xbb\174\305\251\174\305\xab\174\305\255\x7c\305\xaf\x7c\xc5\261\174\xc5\xb3\x7c\xc6\xb0\174\xc7\x94\x7c\307\226\174\xc7\230\x7c\xc7\x9a\x7c\xc7\234\174\xcf\x85\174\317\215\174\317\x8b\174\xe1\273\xa7\174\341\273\xa5\174\341\xbb\253\x7c\xe1\273\xa9\x7c\341\273\257\174\xe1\273\255\174\341\273\261\x7c\xd1\x83\57" => "\165", "\x2f\xc3\235\x7c\xc5\270\x7c\305\266\x7c\xce\245\174\xce\x8e\x7c\xce\253\174\341\xbb\262\174\341\273\xb8\174\341\273\xb6\174\341\xbb\xb4\174\320\231\x2f" => "\x59", "\x2f\xc3\275\x7c\xc3\xbf\174\305\267\x7c\341\273\263\x7c\xe1\273\271\x7c\341\273\267\x7c\341\xbb\xb5\x7c\320\xb9\x2f" => "\x79", "\57\xd0\x92\57" => "\x56", "\x2f\320\262\57" => "\166", "\x2f\305\xb4\x2f" => "\x57", "\57\xc5\265\57" => "\x77", "\57\xc5\271\x7c\xc5\xbb\x7c\305\xbd\x7c\316\226\x7c\xd0\227\x2f" => "\x5a", "\57\305\xba\174\305\xbc\x7c\xc5\xbe\x7c\xce\266\174\xd0\267\57" => "\172", "\x2f\xc3\x86\x7c\xc7\xbc\57" => "\101\105", "\57\xc3\237\x2f" => "\x73\163", "\57\304\xb2\x2f" => "\111\x4a", "\x2f\xc4\xb3\x2f" => "\x69\152", "\x2f\xc5\222\57" => "\x4f\105", "\x2f\306\x92\57" => "\146", "\57\xce\xbe\57" => "\x6b\163", "\57\xcf\200\x2f" => "\x70", "\57\xce\xb2\57" => "\x76", "\57\316\xbc\57" => "\x6d", "\x2f\xcf\210\x2f" => "\160\x73", "\x2f\xd0\x81\x2f" => "\131\157", "\57\xd1\221\x2f" => "\x79\x6f", "\x2f\320\204\x2f" => "\131\145", "\57\321\x94\x2f" => "\171\x65", "\x2f\xd0\207\57" => "\131\151", "\x2f\320\x96\57" => "\132\x68", "\57\320\266\57" => "\172\150", "\x2f\xd0\xa5\x2f" => "\x4b\x68", "\57\321\x85\57" => "\153\150", "\x2f\320\246\x2f" => "\124\x73", "\x2f\xd1\206\57" => "\164\x73", "\57\xd0\247\x2f" => "\103\150", "\57\xd1\x87\x2f" => "\x63\x68", "\57\xd0\xa8\57" => "\123\150", "\x2f\321\210\57" => "\x73\150", "\x2f\xd0\xa9\x2f" => "\x53\x68\143\150", "\57\xd1\x89\57" => "\x73\x68\x63\150", "\57\320\252\174\xd1\212\x7c\320\254\174\xd1\x8c\57" => '', "\57\xd0\256\x2f" => "\x59\165", "\x2f\xd1\216\x2f" => "\171\165", "\x2f\xd0\257\x2f" => "\x59\141", "\x2f\xd1\217\57" => "\x79\141"); diff --git a/server/original/www/ezwebserver/src/application/config/hooks.php b/server/original/www/ezwebserver/src/application/config/hooks.php index 1cfc6a0..66f5bf3 100644 --- a/server/original/www/ezwebserver/src/application/config/hooks.php +++ b/server/original/www/ezwebserver/src/application/config/hooks.php @@ -1,7 +1,7 @@ "\x44\151\163\x70\x6c\141\171\110\157\157\x6b", "\146\165\x6e\143\x74\x69\x6f\x6e" => "\143\x61\160\164\x75\x72\x65\x4f\x75\164\160\x75\164", "\x66\151\154\x65\156\x61\x6d\145" => "\104\x69\163\x70\x6c\x61\x79\x48\157\157\x6b\56\x70\x68\160", "\x66\x69\x6c\x65\x70\141\164\x68" => "\150\157\157\x6b\163"); diff --git a/server/original/www/ezwebserver/src/application/config/memcached.php b/server/original/www/ezwebserver/src/application/config/memcached.php index 6fe7d7b..9cf3598 100644 --- a/server/original/www/ezwebserver/src/application/config/memcached.php +++ b/server/original/www/ezwebserver/src/application/config/memcached.php @@ -1,7 +1,7 @@ array("\x68\x6f\163\164\156\x61\x6d\x65" => "\61\62\x37\56\60\56\60\x2e\61", "\x70\x6f\162\164" => "\61\x31\x32\x31\x31", "\x77\x65\151\147\150\164" => "\x31")); diff --git a/server/original/www/ezwebserver/src/application/config/migration.php b/server/original/www/ezwebserver/src/application/config/migration.php index 6ff626c..e540418 100644 --- a/server/original/www/ezwebserver/src/application/config/migration.php +++ b/server/original/www/ezwebserver/src/application/config/migration.php @@ -1,7 +1,7 @@ array("\141\160\160\x6c\151\143\x61\164\151\157\x6e\57\155\141\x63\55\x62\151\x6e\150\145\x78\x34\60", "\x61\x70\160\154\x69\143\x61\x74\x69\x6f\x6e\x2f\x6d\141\x63\x2d\142\151\156\x68\145\170", "\141\x70\x70\x6c\x69\143\x61\x74\151\x6f\156\x2f\170\x2d\142\151\x6e\150\x65\x78\64\x30", "\x61\160\160\154\151\143\x61\x74\151\x6f\156\57\x78\55\155\141\x63\55\x62\x69\x6e\x68\x65\170\64\x30"), "\143\x70\x74" => "\x61\160\160\154\x69\143\141\164\x69\157\156\x2f\155\141\x63\x2d\x63\157\x6d\160\x61\143\x74\160\x72\157", "\x63\163\166" => array("\164\x65\170\x74\x2f\x78\x2d\x63\x6f\x6d\155\141\x2d\163\145\160\x61\x72\141\x74\145\x64\x2d\166\141\154\165\x65\x73", "\164\145\170\164\x2f\x63\x6f\155\155\x61\x2d\x73\x65\x70\x61\162\141\164\145\x64\55\166\141\x6c\x75\x65\x73", "\x61\x70\160\x6c\x69\143\x61\164\151\157\x6e\57\157\x63\164\145\x74\x2d\163\164\x72\145\x61\155", "\141\x70\x70\x6c\151\x63\141\x74\x69\x6f\x6e\57\x76\156\144\56\x6d\163\x2d\x65\170\143\x65\x6c", "\x61\x70\160\x6c\151\143\141\x74\151\157\156\x2f\x78\x2d\143\x73\x76", "\x74\x65\170\164\57\x78\x2d\x63\x73\166", "\164\x65\x78\x74\x2f\143\163\x76", "\141\x70\160\154\x69\x63\141\164\151\x6f\x6e\57\x63\163\x76", "\141\160\160\154\x69\x63\x61\x74\x69\x6f\x6e\57\x65\170\143\x65\x6c", "\141\160\160\154\151\143\x61\x74\151\157\x6e\57\166\156\x64\x2e\155\x73\x65\170\x63\x65\154", "\164\145\x78\x74\x2f\160\x6c\141\x69\x6e"), "\x62\x69\156" => array("\141\160\160\x6c\151\x63\141\164\x69\x6f\156\57\x6d\x61\143\142\x69\156\x61\162\x79", "\141\x70\x70\x6c\151\x63\141\164\151\157\x6e\57\x6d\x61\x63\55\x62\x69\x6e\141\162\171", "\x61\x70\x70\154\151\143\x61\x74\x69\x6f\x6e\x2f\x6f\143\x74\x65\164\55\x73\x74\x72\x65\x61\155", "\x61\160\160\154\x69\143\141\x74\x69\157\156\57\x78\x2d\142\x69\x6e\x61\162\x79", "\141\x70\x70\154\x69\x63\141\x74\x69\157\x6e\57\170\55\155\141\x63\142\151\156\141\162\x79"), "\x64\x6d\163" => "\141\x70\x70\154\x69\x63\141\x74\151\157\x6e\x2f\x6f\143\164\145\164\x2d\163\164\162\x65\x61\x6d", "\154\150\x61" => "\x61\160\160\x6c\x69\x63\141\x74\151\157\x6e\57\157\x63\164\x65\x74\x2d\163\x74\x72\x65\x61\x6d", "\x6c\x7a\x68" => "\141\160\x70\x6c\x69\x63\x61\x74\151\x6f\156\x2f\x6f\143\164\x65\x74\55\x73\164\162\145\141\155", "\145\170\x65" => array("\x61\160\x70\154\151\x63\141\x74\151\157\x6e\57\157\x63\x74\145\x74\55\x73\x74\x72\145\x61\x6d", "\141\x70\x70\154\x69\143\141\164\x69\157\156\x2f\x78\x2d\x6d\163\144\x6f\167\x6e\154\x6f\141\x64"), "\143\x6c\x61\163\x73" => "\141\160\x70\x6c\x69\143\141\164\x69\x6f\x6e\57\x6f\143\164\145\164\55\x73\x74\162\145\141\155", "\x70\x73\144" => array("\x61\x70\x70\x6c\151\143\141\164\151\157\156\x2f\x78\x2d\160\150\157\164\157\163\x68\157\x70", "\x69\155\x61\147\x65\x2f\166\156\144\56\x61\144\157\x62\x65\56\160\x68\157\164\x6f\163\150\157\x70"), "\163\157" => "\141\x70\160\x6c\x69\143\x61\164\x69\x6f\x6e\57\x6f\x63\x74\145\164\55\163\x74\x72\145\141\155", "\163\x65\141" => "\x61\160\160\154\151\143\141\164\x69\x6f\x6e\57\x6f\143\164\x65\164\x2d\163\164\x72\145\141\x6d", "\144\154\x6c" => "\141\160\x70\x6c\151\143\141\164\151\x6f\x6e\57\157\x63\164\x65\164\55\163\x74\162\x65\141\x6d", "\x6f\144\141" => "\141\160\160\x6c\x69\143\141\164\x69\x6f\x6e\x2f\x6f\x64\x61", "\160\144\x66" => array("\x61\160\x70\154\x69\143\141\x74\x69\x6f\x6e\x2f\x70\144\x66", "\141\160\160\x6c\151\x63\141\164\x69\x6f\x6e\x2f\146\157\x72\x63\x65\55\x64\x6f\167\x6e\154\x6f\141\144", "\x61\160\160\154\x69\x63\x61\164\151\157\156\57\x78\x2d\144\157\167\156\154\x6f\x61\x64", "\142\x69\156\141\162\x79\x2f\x6f\x63\164\x65\x74\55\x73\164\x72\145\141\x6d"), "\x61\x69" => array("\141\x70\160\154\151\143\x61\164\151\157\x6e\57\x70\144\146", "\x61\160\x70\154\x69\143\x61\164\x69\157\156\57\x70\157\163\x74\163\143\162\x69\160\164"), "\145\x70\x73" => "\141\x70\x70\x6c\151\x63\x61\x74\x69\157\x6e\57\160\x6f\x73\164\x73\143\162\x69\x70\x74", "\x70\163" => "\x61\160\x70\x6c\x69\x63\x61\164\151\157\x6e\57\x70\157\163\x74\163\143\162\151\160\x74", "\x73\x6d\151" => "\141\x70\160\154\151\x63\141\x74\151\157\x6e\57\x73\155\151\x6c", "\x73\x6d\x69\154" => "\x61\x70\160\154\151\143\x61\x74\151\157\156\x2f\163\x6d\151\x6c", "\155\x69\x66" => "\141\x70\x70\154\x69\x63\x61\x74\151\157\156\57\x76\156\144\x2e\x6d\151\x66", "\x78\x6c\x73" => array("\141\160\160\154\151\143\x61\x74\x69\x6f\156\57\x76\x6e\x64\x2e\x6d\163\55\x65\x78\143\x65\x6c", "\141\160\160\154\x69\143\141\x74\x69\x6f\156\x2f\x6d\x73\145\x78\143\x65\x6c", "\x61\160\160\154\x69\x63\x61\164\151\157\156\x2f\170\55\x6d\163\145\x78\x63\x65\154", "\141\160\160\154\151\143\141\164\x69\157\x6e\57\x78\x2d\155\x73\x2d\145\170\143\145\x6c", "\141\160\160\x6c\151\x63\x61\x74\151\x6f\x6e\57\170\55\145\x78\x63\x65\x6c", "\141\160\160\154\x69\x63\x61\x74\x69\157\156\x2f\x78\x2d\144\157\163\x5f\155\x73\x5f\145\x78\x63\x65\154", "\141\160\160\154\x69\143\x61\x74\x69\x6f\156\57\170\154\163", "\x61\x70\160\x6c\151\143\141\164\151\157\x6e\x2f\170\x2d\170\154\163", "\141\x70\x70\x6c\151\143\141\164\x69\x6f\x6e\x2f\x65\170\143\x65\x6c", "\x61\x70\x70\x6c\151\x63\x61\x74\151\x6f\156\57\x64\x6f\167\x6e\154\x6f\x61\144", "\141\x70\x70\x6c\151\143\141\164\x69\x6f\x6e\x2f\166\x6e\x64\x2e\155\x73\x2d\x6f\146\x66\151\143\145", "\141\x70\160\x6c\x69\x63\x61\164\151\x6f\156\57\x6d\163\x77\x6f\x72\x64"), "\x70\160\164" => array("\141\x70\160\154\151\143\x61\x74\151\x6f\x6e\x2f\x70\157\167\145\x72\160\157\151\156\x74", "\x61\160\160\154\151\x63\141\x74\151\x6f\x6e\57\x76\x6e\x64\56\x6d\x73\x2d\160\x6f\167\145\162\x70\157\151\x6e\x74", "\x61\160\160\154\x69\x63\141\164\151\x6f\156\x2f\x76\156\x64\x2e\x6d\x73\55\157\x66\146\x69\x63\x65", "\141\x70\x70\x6c\151\x63\x61\x74\x69\x6f\x6e\x2f\x6d\163\x77\x6f\x72\x64"), "\160\x70\164\x78" => array("\x61\160\x70\x6c\151\x63\x61\x74\x69\157\156\57\166\156\144\56\x6f\160\145\x6e\x78\x6d\x6c\x66\157\162\x6d\141\x74\x73\x2d\157\x66\x66\151\x63\145\x64\157\x63\x75\155\x65\156\x74\x2e\x70\x72\x65\163\x65\x6e\164\141\164\151\x6f\156\x6d\x6c\56\x70\162\145\163\x65\x6e\164\141\x74\x69\x6f\156", "\141\x70\160\154\x69\x63\x61\x74\x69\x6f\x6e\x2f\x78\55\172\151\160", "\141\160\160\x6c\x69\143\x61\x74\151\x6f\156\x2f\x7a\x69\x70"), "\x77\x62\x78\x6d\x6c" => "\141\160\x70\x6c\151\x63\x61\x74\x69\x6f\x6e\57\x77\142\x78\155\x6c", "\x77\155\x6c\x63" => "\141\160\x70\154\151\143\141\x74\x69\x6f\x6e\x2f\167\155\154\143", "\144\143\x72" => "\141\x70\x70\154\151\143\x61\164\x69\157\x6e\x2f\x78\55\x64\x69\162\x65\x63\164\x6f\162", "\144\151\x72" => "\x61\x70\160\x6c\x69\143\x61\x74\x69\x6f\x6e\57\x78\55\x64\x69\x72\x65\143\164\x6f\x72", "\144\x78\162" => "\x61\x70\x70\154\151\143\x61\x74\151\x6f\x6e\x2f\x78\55\x64\x69\x72\145\x63\x74\157\x72", "\x64\166\151" => "\141\160\160\154\x69\x63\141\x74\x69\x6f\156\x2f\x78\55\144\x76\x69", "\147\x74\141\x72" => "\141\x70\x70\x6c\x69\143\141\x74\x69\157\156\57\x78\55\147\164\141\x72", "\147\172" => "\x61\160\x70\x6c\x69\x63\141\x74\151\x6f\156\x2f\x78\x2d\x67\x7a\x69\x70", "\147\x7a\x69\x70" => "\141\x70\160\154\151\143\x61\x74\151\x6f\156\57\x78\55\x67\172\151\x70", "\x70\x68\160" => array("\141\160\x70\154\151\x63\x61\164\151\157\x6e\57\x78\x2d\x68\x74\x74\x70\x64\x2d\160\x68\x70", "\x61\x70\160\x6c\x69\x63\x61\164\151\157\156\57\x70\150\x70", "\x61\x70\x70\x6c\151\143\x61\164\x69\157\x6e\x2f\170\x2d\x70\150\160", "\x74\145\170\x74\57\160\150\160", "\164\x65\x78\x74\57\170\55\160\150\160", "\141\x70\160\x6c\151\143\141\164\151\157\156\x2f\170\55\x68\x74\164\160\144\x2d\160\x68\160\x2d\x73\x6f\x75\x72\143\x65"), "\x70\150\x70\64" => "\141\160\160\154\151\x63\141\164\x69\157\156\x2f\x78\x2d\150\164\x74\x70\x64\55\160\x68\x70", "\160\x68\160\x33" => "\141\160\160\x6c\x69\x63\141\164\151\157\x6e\57\x78\x2d\x68\164\164\x70\144\x2d\x70\x68\x70", "\160\150\x74\x6d\x6c" => "\141\160\x70\x6c\x69\x63\141\x74\151\157\x6e\57\x78\x2d\x68\x74\164\160\x64\55\160\x68\x70", "\160\x68\x70\163" => "\141\160\x70\154\151\x63\141\x74\x69\x6f\156\57\170\x2d\x68\x74\x74\x70\144\55\160\150\x70\55\x73\157\x75\x72\143\x65", "\x6a\x73" => array("\141\160\160\154\151\x63\141\164\x69\157\x6e\57\x78\x2d\x6a\141\x76\x61\163\x63\x72\151\160\x74", "\x74\145\170\164\57\x70\154\141\x69\156"), "\163\x77\146" => "\141\160\x70\154\151\143\x61\x74\x69\x6f\156\x2f\170\x2d\x73\x68\157\143\153\x77\141\166\x65\55\146\x6c\x61\163\150", "\x73\x69\164" => "\x61\160\160\x6c\151\143\x61\164\151\x6f\156\57\170\x2d\163\164\165\146\146\x69\x74", "\164\x61\x72" => "\x61\160\160\x6c\x69\x63\x61\164\x69\157\156\57\x78\x2d\164\x61\x72", "\164\x67\x7a" => array("\x61\x70\x70\x6c\151\x63\x61\x74\151\157\x6e\57\170\x2d\x74\141\x72", "\141\160\160\154\x69\x63\x61\164\x69\x6f\x6e\x2f\x78\55\147\x7a\x69\160\55\x63\x6f\155\x70\x72\145\163\163\x65\x64"), "\172" => "\141\160\x70\154\151\x63\x61\x74\x69\157\156\57\x78\55\143\x6f\x6d\160\x72\x65\163\x73", "\170\x68\x74\155\x6c" => "\x61\x70\160\x6c\x69\x63\x61\x74\x69\x6f\156\57\170\150\164\x6d\x6c\53\170\x6d\x6c", "\x78\x68\x74" => "\141\x70\x70\154\151\143\x61\164\x69\x6f\156\x2f\x78\150\164\155\x6c\53\170\155\154", "\172\x69\x70" => array("\141\x70\x70\x6c\151\x63\141\x74\151\x6f\x6e\x2f\170\55\172\151\x70", "\x61\160\160\154\x69\143\x61\x74\x69\x6f\156\57\x7a\151\160", "\141\x70\x70\154\x69\143\141\164\x69\157\156\x2f\x78\55\172\151\x70\55\143\x6f\155\x70\x72\x65\163\163\145\144", "\141\x70\160\x6c\x69\x63\141\x74\x69\x6f\156\57\x73\55\143\x6f\x6d\160\x72\145\x73\163\145\144", "\x6d\165\154\164\x69\x70\141\162\x74\x2f\170\55\172\x69\160"), "\x72\141\162" => array("\141\160\x70\x6c\x69\143\x61\164\x69\x6f\156\x2f\170\55\162\x61\x72", "\x61\160\160\x6c\x69\x63\x61\164\x69\157\156\57\x72\141\x72", "\141\160\x70\x6c\151\x63\141\164\151\157\156\x2f\x78\x2d\162\141\162\55\x63\x6f\155\160\162\x65\163\x73\145\144"), "\x6d\151\144" => "\x61\x75\144\x69\x6f\x2f\x6d\x69\x64\151", "\155\151\144\x69" => "\x61\x75\x64\x69\x6f\x2f\155\x69\144\151", "\x6d\x70\x67\141" => "\x61\x75\144\x69\x6f\57\x6d\x70\x65\147", "\155\x70\62" => "\141\165\x64\151\157\x2f\x6d\160\x65\147", "\x6d\160\x33" => array("\x61\165\144\151\x6f\x2f\155\160\x65\x67", "\141\x75\144\x69\x6f\x2f\155\x70\147", "\141\x75\x64\x69\157\x2f\x6d\x70\145\x67\x33", "\x61\x75\144\151\157\x2f\155\x70\x33"), "\x61\x69\146" => array("\141\x75\x64\151\x6f\57\170\x2d\x61\x69\x66\x66", "\x61\165\144\x69\157\x2f\141\151\146\x66"), "\141\151\x66\146" => array("\x61\165\144\x69\157\x2f\170\x2d\x61\x69\146\146", "\141\x75\x64\x69\x6f\57\x61\x69\x66\146"), "\x61\x69\x66\x63" => "\141\165\x64\x69\x6f\57\170\x2d\x61\151\x66\146", "\162\x61\x6d" => "\x61\165\144\151\157\x2f\x78\55\x70\x6e\x2d\162\145\x61\154\x61\x75\x64\x69\157", "\x72\155" => "\x61\165\x64\x69\157\x2f\x78\x2d\160\156\x2d\162\x65\x61\154\x61\x75\x64\x69\x6f", "\162\x70\x6d" => "\x61\165\x64\151\157\x2f\x78\x2d\160\x6e\55\x72\145\x61\154\141\x75\x64\151\157\x2d\x70\x6c\165\147\151\156", "\162\x61" => "\x61\x75\144\x69\x6f\x2f\x78\x2d\x72\145\141\154\x61\x75\x64\151\x6f", "\x72\x76" => "\x76\x69\x64\x65\157\57\x76\x6e\144\56\x72\x6e\x2d\162\x65\x61\x6c\166\151\144\x65\157", "\167\x61\x76" => array("\141\165\x64\x69\157\x2f\170\55\167\x61\166", "\141\x75\144\x69\x6f\57\167\x61\166\145", "\x61\165\x64\x69\157\x2f\x77\x61\166"), "\142\155\160" => array("\x69\155\x61\x67\x65\57\x62\155\160", "\151\155\x61\147\145\57\x78\x2d\142\155\160", "\x69\155\x61\x67\x65\x2f\170\55\142\151\164\x6d\141\x70", "\x69\x6d\x61\147\x65\x2f\170\55\x78\x62\x69\164\155\x61\x70", "\x69\x6d\141\147\145\57\170\x2d\167\x69\x6e\55\142\151\x74\x6d\x61\160", "\x69\155\x61\147\x65\57\170\x2d\x77\151\156\144\157\167\163\x2d\x62\x6d\x70", "\x69\x6d\141\x67\145\x2f\x6d\x73\55\x62\x6d\x70", "\x69\x6d\141\147\x65\x2f\170\x2d\155\x73\x2d\142\155\160", "\141\x70\x70\x6c\x69\x63\x61\164\x69\157\156\x2f\x62\x6d\x70", "\141\160\x70\x6c\151\x63\x61\164\151\157\156\57\x78\x2d\142\x6d\160", "\x61\160\x70\154\x69\143\141\164\151\x6f\x6e\57\x78\55\167\x69\156\x2d\x62\x69\164\155\x61\x70"), "\147\151\x66" => "\151\155\x61\x67\145\x2f\x67\151\x66", "\x6a\x70\145\147" => array("\x69\155\141\x67\145\x2f\x6a\x70\145\147", "\x69\x6d\141\x67\x65\57\160\152\160\145\x67"), "\x6a\x70\147" => array("\151\155\x61\147\x65\57\152\160\x65\x67", "\x69\155\141\147\x65\x2f\x70\152\x70\145\x67"), "\x6a\160\145" => array("\x69\x6d\x61\147\145\x2f\152\x70\145\x67", "\x69\x6d\x61\x67\145\x2f\160\x6a\160\x65\147"), "\x6a\x70\x32" => array("\151\x6d\141\147\145\57\x6a\160\x32", "\166\x69\x64\x65\x6f\x2f\155\152\x32", "\151\155\x61\x67\x65\x2f\152\160\170", "\x69\155\141\x67\x65\57\152\160\x6d"), "\x6a\62\x6b" => array("\151\155\141\x67\x65\57\152\x70\62", "\x76\151\x64\145\x6f\x2f\x6d\152\62", "\151\155\141\x67\x65\57\x6a\160\x78", "\x69\155\141\x67\145\57\x6a\160\x6d"), "\152\160\146" => array("\x69\x6d\141\x67\x65\57\x6a\160\62", "\166\x69\x64\x65\x6f\x2f\155\152\62", "\x69\155\141\x67\145\57\152\x70\x78", "\x69\x6d\x61\x67\145\x2f\152\x70\155"), "\x6a\x70\147\62" => array("\151\155\x61\x67\x65\57\152\160\62", "\166\x69\144\x65\x6f\x2f\155\x6a\x32", "\151\x6d\x61\x67\x65\57\152\x70\x78", "\151\x6d\x61\x67\x65\x2f\152\x70\155"), "\x6a\x70\x78" => array("\x69\x6d\x61\x67\145\57\152\160\62", "\166\151\x64\x65\157\57\155\x6a\62", "\151\155\141\x67\x65\57\x6a\x70\170", "\x69\155\x61\x67\145\x2f\152\x70\x6d"), "\152\x70\155" => array("\151\155\141\x67\x65\57\x6a\160\62", "\x76\151\144\x65\x6f\x2f\x6d\x6a\x32", "\151\x6d\141\147\145\57\152\x70\170", "\x69\x6d\141\147\145\x2f\x6a\160\x6d"), "\155\152\x32" => array("\151\x6d\141\x67\145\57\x6a\x70\62", "\166\x69\x64\x65\157\57\155\152\62", "\x69\x6d\x61\147\145\57\152\x70\x78", "\x69\x6d\x61\x67\x65\57\152\160\155"), "\x6d\x6a\160\x32" => array("\151\x6d\x61\x67\145\x2f\152\x70\62", "\x76\x69\x64\145\157\57\x6d\152\x32", "\151\155\x61\x67\145\x2f\x6a\x70\x78", "\x69\x6d\x61\147\x65\57\x6a\x70\155"), "\x70\156\147" => array("\151\x6d\x61\x67\145\57\160\156\147", "\x69\x6d\x61\x67\145\57\170\x2d\x70\156\x67"), "\164\151\x66\x66" => "\x69\x6d\x61\x67\x65\x2f\x74\x69\146\146", "\164\151\146" => "\x69\x6d\141\x67\x65\x2f\x74\151\x66\x66", "\143\x73\163" => array("\x74\x65\170\164\x2f\143\x73\163", "\x74\145\170\164\57\x70\x6c\141\x69\156"), "\x68\x74\155\x6c" => array("\x74\x65\x78\164\x2f\150\164\x6d\x6c", "\x74\145\170\x74\x2f\160\x6c\x61\x69\156"), "\150\x74\155" => array("\164\x65\x78\164\x2f\x68\164\x6d\154", "\164\145\170\x74\57\160\154\x61\x69\x6e"), "\163\150\164\155\154" => array("\x74\x65\x78\164\57\x68\x74\155\154", "\x74\x65\170\164\57\160\154\x61\x69\156"), "\164\170\x74" => "\x74\x65\x78\164\x2f\160\x6c\x61\x69\x6e", "\x74\145\x78\164" => "\x74\145\170\164\x2f\160\x6c\x61\x69\x6e", "\154\x6f\147" => array("\x74\145\x78\x74\57\x70\154\141\151\156", "\x74\x65\170\164\57\x78\55\154\x6f\147"), "\162\164\170" => "\x74\145\x78\164\x2f\162\x69\143\x68\x74\x65\170\x74", "\x72\x74\x66" => "\164\x65\x78\164\x2f\162\164\x66", "\x78\155\x6c" => array("\141\160\160\154\151\x63\141\x74\x69\x6f\x6e\x2f\170\155\x6c", "\164\x65\x78\x74\x2f\170\x6d\154", "\164\145\x78\x74\x2f\160\154\x61\x69\156"), "\170\x73\x6c" => array("\141\160\x70\x6c\x69\143\141\x74\151\x6f\156\x2f\170\155\154", "\x74\145\170\164\57\170\163\154", "\164\x65\170\164\57\x78\x6d\154"), "\155\x70\145\147" => "\x76\151\144\145\x6f\57\x6d\x70\145\147", "\155\160\x67" => "\x76\151\x64\145\157\57\x6d\x70\145\147", "\x6d\x70\x65" => "\166\151\144\x65\157\57\155\160\x65\x67", "\161\164" => "\166\x69\144\145\157\57\161\165\x69\143\x6b\x74\151\x6d\x65", "\155\157\x76" => "\166\151\x64\x65\157\57\161\x75\151\143\153\164\151\155\x65", "\141\x76\151" => array("\166\x69\144\x65\157\x2f\x78\x2d\155\x73\166\x69\x64\145\157", "\166\151\144\x65\157\57\x6d\163\x76\151\x64\145\157", "\x76\151\144\145\x6f\x2f\x61\x76\x69", "\x61\x70\160\x6c\x69\x63\141\164\x69\157\x6e\x2f\170\x2d\x74\162\157\146\146\55\x6d\163\x76\151\x64\x65\157"), "\x6d\x6f\166\x69\x65" => "\166\151\x64\145\x6f\x2f\170\x2d\x73\147\x69\55\x6d\157\x76\x69\x65", "\144\157\x63" => array("\141\x70\160\154\x69\143\x61\x74\x69\x6f\156\x2f\155\x73\x77\157\x72\144", "\x61\160\160\x6c\x69\x63\x61\164\x69\x6f\x6e\57\166\156\x64\x2e\155\163\x2d\x6f\x66\x66\x69\x63\145"), "\144\x6f\143\170" => array("\x61\x70\x70\x6c\x69\x63\x61\164\x69\x6f\x6e\57\166\x6e\x64\56\157\160\x65\156\170\155\x6c\146\x6f\x72\x6d\141\x74\x73\55\x6f\x66\x66\151\x63\x65\x64\157\143\x75\155\x65\x6e\x74\56\167\x6f\x72\144\160\x72\x6f\x63\145\163\x73\x69\156\147\x6d\x6c\56\144\157\143\x75\155\145\x6e\164", "\x61\160\160\x6c\151\x63\x61\164\151\x6f\156\57\172\151\x70", "\141\160\x70\154\x69\143\x61\x74\x69\x6f\x6e\57\x6d\x73\x77\157\x72\144", "\x61\x70\160\x6c\151\x63\x61\x74\x69\157\x6e\57\x78\55\x7a\151\x70"), "\x64\x6f\164" => array("\x61\x70\x70\x6c\151\143\x61\x74\151\157\156\57\x6d\x73\167\x6f\x72\x64", "\x61\160\160\154\x69\143\141\164\x69\157\x6e\x2f\x76\x6e\144\x2e\155\x73\x2d\157\146\146\151\143\x65"), "\x64\157\164\x78" => array("\141\160\160\x6c\x69\143\141\164\x69\x6f\x6e\57\x76\x6e\x64\x2e\157\160\145\x6e\170\x6d\154\x66\157\x72\x6d\x61\164\x73\x2d\x6f\x66\x66\x69\143\145\x64\x6f\x63\x75\x6d\x65\x6e\164\x2e\x77\x6f\162\144\x70\x72\x6f\x63\x65\163\x73\x69\156\x67\x6d\154\56\x64\157\x63\165\x6d\x65\156\x74", "\x61\x70\x70\154\151\x63\x61\x74\x69\x6f\156\57\172\151\x70", "\141\160\160\154\x69\143\x61\164\151\x6f\156\57\155\163\167\157\x72\x64"), "\x78\154\163\x78" => array("\141\160\160\154\151\143\141\x74\151\x6f\x6e\57\166\156\x64\x2e\157\160\145\x6e\x78\155\154\x66\x6f\162\155\141\x74\163\x2d\x6f\146\x66\x69\143\x65\144\x6f\143\x75\x6d\145\x6e\164\x2e\163\160\162\145\x61\144\x73\x68\145\145\164\155\x6c\x2e\163\150\145\145\x74", "\x61\x70\x70\x6c\151\x63\x61\164\151\157\156\57\x7a\151\x70", "\141\x70\x70\x6c\x69\143\141\x74\151\x6f\156\x2f\x76\x6e\144\x2e\x6d\163\55\x65\x78\x63\x65\154", "\141\x70\160\154\151\x63\x61\164\151\x6f\156\x2f\x6d\x73\167\157\x72\x64", "\141\x70\160\154\151\143\x61\x74\x69\x6f\x6e\57\x78\x2d\x7a\x69\160"), "\x77\x6f\162\x64" => array("\x61\x70\x70\x6c\x69\x63\x61\164\x69\x6f\x6e\57\155\x73\x77\x6f\x72\144", "\141\160\x70\154\x69\x63\x61\x74\151\157\x6e\x2f\157\143\164\x65\x74\55\163\x74\x72\145\x61\155"), "\170\x6c" => "\x61\x70\160\x6c\151\143\141\x74\x69\157\x6e\57\x65\x78\x63\x65\154", "\x65\x6d\x6c" => "\x6d\x65\163\x73\x61\x67\x65\57\162\146\143\70\62\62", "\x6a\x73\x6f\156" => array("\141\x70\x70\x6c\x69\143\x61\164\x69\157\x6e\57\152\x73\x6f\156", "\164\x65\x78\x74\57\152\163\157\x6e"), "\x70\x65\x6d" => array("\x61\160\160\154\151\143\141\164\151\157\x6e\x2f\x78\x2d\x78\65\x30\71\x2d\x75\x73\x65\x72\x2d\x63\145\162\x74", "\141\160\x70\x6c\x69\x63\141\x74\151\157\x6e\x2f\170\x2d\x70\145\x6d\55\146\x69\154\x65", "\141\160\160\154\x69\143\x61\164\151\x6f\156\57\x6f\143\164\x65\x74\55\x73\x74\162\x65\x61\155"), "\x70\x31\x30" => array("\141\x70\x70\154\x69\143\x61\x74\x69\157\x6e\57\x78\x2d\160\x6b\x63\x73\x31\60", "\141\x70\x70\x6c\x69\143\x61\164\151\157\156\x2f\160\153\x63\x73\x31\x30"), "\160\x31\x32" => "\x61\x70\x70\x6c\x69\143\141\x74\151\157\156\57\x78\x2d\x70\x6b\x63\x73\61\62", "\160\67\x61" => "\x61\x70\160\x6c\151\143\x61\164\x69\157\156\x2f\x78\55\x70\x6b\x63\x73\67\x2d\x73\151\x67\156\141\x74\x75\162\145", "\160\x37\143" => array("\141\160\x70\x6c\x69\143\x61\x74\x69\157\x6e\x2f\x70\x6b\x63\163\67\x2d\155\151\155\145", "\x61\x70\x70\154\151\143\x61\x74\151\157\x6e\x2f\x78\55\160\x6b\x63\x73\x37\55\x6d\151\x6d\x65"), "\160\x37\155" => array("\141\x70\x70\x6c\151\x63\141\164\x69\x6f\x6e\57\x70\x6b\143\163\x37\55\155\x69\155\x65", "\141\160\160\x6c\151\x63\x61\x74\151\x6f\x6e\x2f\170\55\x70\x6b\x63\163\x37\x2d\155\151\x6d\145"), "\160\x37\162" => "\141\x70\x70\154\x69\143\141\164\151\157\x6e\x2f\170\x2d\x70\x6b\143\x73\x37\x2d\143\145\x72\164\x72\145\161\x72\x65\163\160", "\160\67\163" => "\141\160\x70\x6c\x69\x63\x61\164\x69\x6f\156\x2f\x70\x6b\x63\x73\67\x2d\163\151\x67\x6e\x61\164\165\x72\145", "\143\162\164" => array("\x61\x70\x70\154\x69\143\141\164\151\157\x6e\x2f\170\55\170\x35\x30\x39\x2d\143\141\55\143\145\x72\x74", "\141\160\160\x6c\151\143\x61\x74\151\157\x6e\x2f\x78\x2d\170\65\60\71\x2d\x75\x73\x65\162\x2d\143\145\x72\x74", "\x61\160\160\154\151\143\x61\x74\151\157\x6e\x2f\160\153\151\170\55\143\145\x72\164"), "\143\x72\x6c" => array("\x61\160\x70\154\151\143\x61\x74\151\157\156\57\160\153\151\170\55\x63\x72\154", "\141\x70\x70\154\151\143\141\x74\151\x6f\156\x2f\160\x6b\x63\x73\x2d\143\162\154"), "\x64\145\162" => "\x61\160\x70\x6c\x69\143\141\164\x69\157\x6e\x2f\x78\55\170\x35\60\x39\55\x63\141\55\143\x65\162\x74", "\x6b\x64\x62" => "\x61\160\x70\x6c\151\x63\x61\x74\x69\157\x6e\x2f\157\x63\164\145\x74\x2d\163\164\162\145\x61\x6d", "\x70\x67\160" => "\x61\160\x70\154\x69\x63\141\x74\x69\157\156\57\x70\x67\x70", "\147\160\147" => "\x61\x70\x70\x6c\x69\143\141\x74\151\x6f\x6e\57\147\160\x67\x2d\x6b\145\171\x73", "\163\163\x74" => "\x61\x70\x70\154\x69\x63\x61\x74\151\x6f\156\x2f\x6f\x63\x74\145\164\x2d\x73\x74\x72\145\141\155", "\x63\x73\162" => "\x61\x70\160\x6c\x69\143\x61\164\x69\157\x6e\57\x6f\143\x74\145\x74\x2d\163\x74\x72\145\141\155", "\162\x73\x61" => "\141\160\160\154\151\143\141\164\x69\x6f\156\57\170\x2d\160\x6b\143\163\x37", "\143\145\x72" => array("\x61\160\x70\154\x69\x63\141\164\151\157\x6e\x2f\160\153\x69\170\55\143\x65\x72\164", "\x61\160\160\x6c\151\143\x61\164\x69\x6f\156\x2f\170\55\x78\x35\x30\x39\55\143\141\55\143\145\162\x74"), "\63\147\62" => "\166\151\144\x65\157\57\63\x67\160\x70\x32", "\x33\x67\160" => array("\166\151\144\145\x6f\57\x33\147\x70", "\x76\151\x64\145\x6f\x2f\63\147\160\x70"), "\x6d\x70\64" => "\166\x69\x64\x65\x6f\x2f\155\160\64", "\x6d\x34\x61" => "\141\165\144\151\157\x2f\170\55\x6d\x34\141", "\x66\x34\166" => array("\166\x69\x64\145\x6f\57\155\160\x34", "\x76\151\144\145\x6f\57\170\55\146\x34\x76"), "\x66\x6c\x76" => "\x76\x69\x64\x65\157\x2f\x78\x2d\146\154\x76", "\x77\145\142\x6d" => "\x76\x69\x64\x65\x6f\57\x77\x65\x62\155", "\x61\x61\143" => "\141\x75\144\x69\157\57\x78\55\x61\x63\143", "\155\x34\x75" => "\141\x70\160\x6c\x69\x63\141\164\x69\157\x6e\x2f\x76\x6e\144\56\x6d\160\145\x67\x75\x72\154", "\155\63\x75" => "\164\x65\x78\x74\x2f\x70\x6c\x61\151\x6e", "\x78\x73\x70\x66" => "\141\x70\x70\154\151\x63\x61\164\151\157\156\x2f\x78\163\160\146\x2b\170\x6d\x6c", "\x76\154\143" => "\x61\x70\x70\154\x69\x63\x61\164\151\157\x6e\57\x76\x69\x64\x65\x6f\154\x61\x6e", "\x77\x6d\x76" => array("\166\x69\144\x65\157\x2f\x78\x2d\x6d\x73\55\x77\x6d\x76", "\x76\151\144\145\x6f\x2f\170\55\x6d\x73\x2d\x61\163\146"), "\141\x75" => "\141\165\x64\x69\x6f\57\x78\55\141\165", "\x61\143\63" => "\x61\x75\x64\x69\x6f\57\141\x63\63", "\146\154\x61\x63" => "\x61\165\x64\x69\x6f\57\170\x2d\146\154\x61\x63", "\157\147\x67" => array("\141\165\144\x69\x6f\57\157\x67\147", "\x76\151\x64\x65\x6f\x2f\157\147\x67", "\141\160\160\154\x69\x63\x61\164\x69\157\156\x2f\x6f\x67\147"), "\153\155\172" => array("\141\160\160\x6c\x69\143\x61\164\151\x6f\x6e\57\166\156\144\56\147\x6f\157\147\154\145\x2d\x65\x61\x72\x74\x68\x2e\153\x6d\x7a", "\141\160\160\154\151\143\141\x74\151\x6f\156\57\172\x69\160", "\x61\x70\x70\x6c\151\x63\x61\x74\x69\157\x6e\57\170\x2d\172\151\160"), "\153\x6d\154" => array("\141\160\160\x6c\151\143\x61\164\x69\157\156\57\166\x6e\144\56\x67\x6f\x6f\x67\x6c\145\x2d\145\x61\162\x74\x68\x2e\x6b\155\x6c\53\x78\155\x6c", "\141\x70\x70\154\x69\143\141\164\x69\157\x6e\x2f\170\155\154", "\x74\145\170\x74\x2f\x78\x6d\154"), "\151\x63\163" => "\164\145\x78\164\x2f\x63\x61\x6c\145\x6e\x64\x61\162", "\x69\143\141\154" => "\x74\x65\x78\164\x2f\x63\x61\x6c\x65\156\x64\x61\x72", "\x7a\x73\150" => "\164\145\170\164\x2f\170\55\x73\143\162\151\x70\164\x7a\x73\x68", "\x37\x7a\x69\x70" => array("\x61\160\x70\154\x69\143\141\164\x69\x6f\x6e\x2f\x78\x2d\x63\x6f\155\160\162\145\163\163\145\144", "\141\x70\160\x6c\151\x63\x61\x74\x69\x6f\156\x2f\170\x2d\x7a\151\x70\55\x63\157\x6d\160\162\145\163\163\x65\x64", "\x61\160\160\x6c\x69\143\x61\164\151\x6f\156\x2f\172\x69\160", "\155\x75\154\164\x69\160\x61\162\x74\57\x78\55\172\x69\160"), "\x63\144\162" => array("\x61\160\x70\x6c\151\143\141\164\x69\x6f\156\57\143\x64\162", "\x61\160\x70\x6c\x69\143\141\164\x69\157\156\57\x63\x6f\162\x65\x6c\144\x72\x61\167", "\x61\160\160\154\x69\143\x61\x74\151\157\156\57\x78\55\x63\144\162", "\141\160\160\x6c\x69\x63\x61\164\x69\x6f\156\x2f\x78\x2d\x63\x6f\162\145\154\144\162\x61\167", "\151\155\x61\147\x65\57\143\x64\162", "\x69\155\141\147\x65\x2f\x78\x2d\x63\144\x72", "\x7a\172\55\x61\x70\x70\154\x69\x63\x61\164\151\x6f\156\x2f\x7a\x7a\55\167\151\156\x61\x73\163\157\x63\55\x63\144\x72"), "\167\155\x61" => array("\x61\x75\144\151\157\x2f\x78\x2d\x6d\x73\55\167\x6d\x61", "\166\151\x64\145\157\57\x78\x2d\155\163\x2d\141\x73\x66"), "\152\x61\x72" => array("\x61\160\160\154\x69\143\x61\164\151\x6f\156\57\152\141\166\141\55\x61\162\143\150\151\166\x65", "\141\x70\x70\154\x69\143\x61\164\x69\157\156\x2f\x78\x2d\x6a\141\x76\141\55\141\x70\x70\x6c\x69\143\141\164\x69\157\156", "\141\x70\x70\154\x69\x63\141\164\x69\157\x6e\57\x78\55\x6a\x61\x72", "\x61\x70\x70\154\151\x63\x61\164\x69\157\x6e\x2f\170\55\x63\157\155\x70\162\145\163\x73\x65\144"), "\x73\166\x67" => array("\151\x6d\141\147\x65\57\x73\166\x67\x2b\170\155\154", "\141\160\x70\x6c\x69\143\141\x74\x69\157\x6e\x2f\x78\155\x6c", "\x74\145\x78\164\57\x78\x6d\154"), "\x76\x63\146" => "\x74\145\x78\164\x2f\170\55\x76\x63\x61\162\x64", "\x73\162\164" => array("\164\x65\x78\164\x2f\x73\162\x74", "\164\145\170\x74\x2f\160\154\141\x69\156"), "\166\164\x74" => array("\x74\x65\x78\164\x2f\166\x74\164", "\164\x65\x78\x74\x2f\160\x6c\x61\151\156"), "\151\x63\x6f" => array("\151\x6d\x61\147\145\57\x78\x2d\x69\143\x6f\x6e", "\151\155\141\x67\x65\x2f\170\55\151\x63\157", "\x69\x6d\x61\x67\145\57\166\x6e\x64\x2e\155\151\143\x72\157\x73\157\146\x74\x2e\151\x63\157\x6e"), "\157\144\143" => "\141\x70\160\154\151\143\x61\164\x69\157\x6e\x2f\x76\x6e\144\56\x6f\141\x73\151\x73\56\157\x70\x65\x6e\144\157\143\165\155\x65\156\164\x2e\143\x68\x61\162\164", "\x6f\164\x63" => "\x61\160\x70\x6c\x69\143\x61\x74\x69\157\156\x2f\x76\156\144\56\157\x61\x73\151\x73\56\x6f\x70\145\x6e\x64\x6f\x63\165\x6d\145\156\164\x2e\x63\x68\x61\x72\164\x2d\164\145\x6d\160\x6c\141\x74\145", "\157\x64\x66" => "\x61\160\x70\x6c\x69\143\141\164\x69\x6f\156\57\166\x6e\x64\x2e\x6f\141\163\151\x73\x2e\x6f\160\x65\x6e\144\x6f\143\165\155\x65\156\164\56\x66\x6f\x72\x6d\165\x6c\x61", "\157\164\146" => "\141\x70\x70\x6c\151\x63\x61\164\151\157\156\x2f\x76\x6e\x64\56\x6f\141\163\x69\x73\56\x6f\160\145\x6e\144\157\x63\x75\x6d\x65\156\x74\56\146\x6f\162\x6d\165\154\x61\x2d\164\x65\x6d\x70\154\x61\x74\145", "\x6f\144\147" => "\141\160\x70\x6c\x69\x63\x61\x74\151\x6f\x6e\x2f\166\x6e\144\x2e\157\x61\x73\151\x73\x2e\157\x70\145\x6e\x64\157\x63\x75\155\145\156\x74\56\x67\162\x61\160\150\x69\x63\x73", "\x6f\164\x67" => "\x61\x70\160\x6c\x69\x63\x61\164\151\x6f\x6e\57\166\x6e\144\x2e\x6f\141\163\151\x73\x2e\157\x70\145\156\144\157\143\165\155\145\156\164\x2e\147\162\141\160\x68\x69\143\x73\x2d\164\145\155\x70\x6c\x61\164\x65", "\x6f\x64\151" => "\141\160\160\x6c\x69\143\x61\x74\151\x6f\x6e\x2f\166\x6e\x64\56\x6f\141\x73\151\x73\56\x6f\160\145\x6e\144\x6f\143\165\x6d\x65\156\164\x2e\151\x6d\141\147\x65", "\x6f\164\x69" => "\x61\160\x70\154\151\143\x61\164\x69\x6f\x6e\57\166\156\144\x2e\x6f\x61\x73\x69\163\56\x6f\x70\x65\x6e\144\x6f\143\165\155\x65\156\x74\x2e\x69\155\141\x67\145\55\164\x65\x6d\160\x6c\141\164\145", "\x6f\x64\160" => "\x61\x70\160\154\151\143\141\x74\151\x6f\x6e\57\x76\156\x64\x2e\x6f\x61\x73\151\x73\x2e\157\x70\145\156\x64\157\x63\165\x6d\145\x6e\x74\x2e\x70\162\x65\x73\145\x6e\x74\141\164\151\157\156", "\157\164\160" => "\141\160\160\154\151\143\x61\164\151\157\156\57\166\x6e\144\56\157\141\x73\151\163\56\157\x70\145\x6e\144\x6f\143\165\x6d\x65\x6e\x74\56\x70\x72\x65\x73\145\x6e\164\141\164\151\x6f\156\x2d\164\x65\155\160\x6c\x61\164\x65", "\157\144\163" => "\x61\x70\160\154\x69\143\x61\164\151\157\x6e\57\166\156\144\56\x6f\x61\163\151\x73\56\157\160\x65\x6e\x64\x6f\x63\165\155\145\x6e\164\56\163\x70\162\x65\141\144\x73\150\145\x65\164", "\157\164\x73" => "\141\160\x70\x6c\151\x63\x61\x74\x69\157\156\57\166\156\x64\x2e\x6f\x61\x73\x69\x73\56\157\x70\x65\x6e\144\x6f\143\165\155\x65\x6e\x74\x2e\x73\160\162\x65\141\x64\163\150\145\x65\164\x2d\164\x65\155\x70\x6c\141\x74\x65", "\x6f\144\x74" => "\141\x70\160\x6c\151\x63\x61\164\x69\x6f\x6e\x2f\x76\x6e\144\x2e\x6f\141\x73\151\163\x2e\x6f\160\145\x6e\x64\157\x63\165\155\x65\156\x74\x2e\x74\x65\170\x74", "\157\144\x6d" => "\141\160\160\x6c\151\143\x61\x74\x69\x6f\156\57\166\156\x64\x2e\x6f\x61\163\x69\163\x2e\157\x70\x65\x6e\144\157\143\165\155\x65\156\x74\x2e\x74\145\170\x74\x2d\155\x61\163\x74\145\x72", "\157\x74\164" => "\x61\x70\160\154\151\x63\141\x74\151\157\x6e\x2f\x76\156\x64\56\157\x61\163\151\x73\x2e\157\160\x65\x6e\144\157\143\165\155\145\x6e\164\56\164\145\170\x74\x2d\164\x65\x6d\160\x6c\x61\x74\145", "\x6f\164\x68" => "\141\x70\x70\x6c\151\x63\141\164\x69\x6f\x6e\57\x76\x6e\144\56\157\x61\x73\x69\163\56\157\x70\x65\156\144\x6f\x63\x75\x6d\x65\156\x74\x2e\x74\145\170\164\x2d\x77\145\142"); diff --git a/server/original/www/ezwebserver/src/application/config/profiler.php b/server/original/www/ezwebserver/src/application/config/profiler.php index 3033864..203b225 100644 --- a/server/original/www/ezwebserver/src/application/config/profiler.php +++ b/server/original/www/ezwebserver/src/application/config/profiler.php @@ -1,7 +1,7 @@ "\61\x32\63\x34"]; $config["\162\x65\x73\x74\x5f\x69\x70\137\167\150\x69\164\145\x6c\x69\x73\x74\137\145\x6e\x61\142\x6c\x65\x64"] = FALSE; $config["\x72\x65\x73\x74\x5f\x69\x70\137\x77\150\151\x74\145\x6c\151\x73\x74"] = ''; $config["\x72\x65\163\164\x5f\151\x70\137\142\154\141\143\x6b\154\x69\163\164\x5f\x65\156\141\x62\154\x65\x64"] = FALSE; $config["\x72\145\163\x74\137\x69\x70\x5f\142\154\141\143\x6b\154\x69\x73\164"] = ''; $config["\x72\x65\163\x74\137\x64\141\164\141\x62\141\x73\145\x5f\147\x72\x6f\165\160"] = "\144\x65\146\141\x75\x6c\164"; $config["\x72\x65\163\164\x5f\153\x65\171\x73\137\x74\x61\x62\x6c\x65"] = "\153\145\171\x73"; $config["\x72\145\163\164\x5f\145\156\x61\x62\154\145\137\x6b\x65\171\163"] = FALSE; $config["\162\x65\x73\x74\x5f\x6b\145\171\137\143\x6f\x6c\x75\155\156"] = "\x6b\145\x79"; $config["\x72\x65\163\164\137\154\x69\x6d\151\x74\x73\137\x6d\145\164\150\x6f\x64"] = "\122\x4f\125\x54\105\x44\137\x55\x52\x4c"; $config["\162\x65\163\164\x5f\x6b\145\x79\x5f\x6c\x65\156\147\164\150"] = 40; $config["\x72\x65\x73\164\x5f\153\145\x79\137\x6e\141\155\x65"] = "\130\x2d\x41\120\111\55\x4b\x45\131"; $config["\x72\x65\x73\x74\137\145\x6e\x61\142\154\145\137\154\x6f\x67\147\x69\x6e\147"] = FALSE; $config["\162\145\x73\x74\x5f\x6c\x6f\x67\163\137\x74\x61\x62\x6c\x65"] = "\154\x6f\x67\x73"; $config["\162\145\163\164\x5f\x65\x6e\141\x62\x6c\x65\x5f\x61\143\x63\x65\163\163"] = FALSE; $config["\162\x65\x73\164\x5f\141\143\143\x65\x73\x73\137\164\x61\x62\154\145"] = "\141\x63\143\x65\x73\163"; $config["\162\x65\x73\x74\137\154\157\x67\163\x5f\x6a\x73\x6f\x6e\137\x70\x61\x72\141\x6d\x73"] = FALSE; $config["\x72\x65\x73\164\137\145\x6e\141\142\154\145\137\x6c\151\155\x69\x74\163"] = FALSE; $config["\x72\x65\163\x74\137\154\151\155\151\x74\x73\x5f\164\x61\x62\154\145"] = "\154\151\x6d\x69\x74\163"; $config["\x72\x65\x73\x74\137\x69\x67\156\x6f\x72\x65\137\x68\164\x74\160\137\141\143\143\145\x70\164"] = FALSE; $config["\x72\145\163\x74\x5f\141\x6a\x61\170\137\x6f\156\154\x79"] = FALSE; $config["\162\145\x73\x74\x5f\154\141\x6e\147\x75\141\147\x65"] = "\145\x6e\147\154\x69\163\150"; $config["\x63\150\145\x63\153\x5f\143\157\x72\163"] = FALSE; $config["\x61\x6c\154\157\x77\145\144\x5f\x63\157\x72\x73\137\x68\x65\141\144\145\162\x73"] = ["\117\x72\x69\147\151\x6e", "\x58\x2d\122\145\161\165\145\163\164\x65\144\55\127\x69\x74\150", "\x43\x6f\x6e\x74\145\x6e\164\x2d\x54\x79\x70\x65", "\x41\143\143\x65\160\164", "\x41\143\143\x65\x73\x73\55\103\x6f\x6e\x74\x72\x6f\x6c\55\122\145\161\165\x65\163\x74\55\115\x65\x74\150\157\x64"]; $config["\x61\x6c\x6c\157\167\145\144\137\143\x6f\x72\163\x5f\155\145\x74\x68\x6f\144\x73"] = ["\107\x45\x54", "\x50\x4f\123\x54", "\117\120\x54\x49\117\116\123", "\120\125\124", "\x50\x41\x54\103\x48", "\104\105\114\x45\124\105"]; $config["\x61\154\x6c\x6f\167\137\141\x6e\x79\x5f\143\x6f\x72\163\137\x64\x6f\155\141\151\x6e"] = FALSE; $config["\141\x6c\x6c\157\x77\x65\x64\x5f\x63\157\162\x73\137\157\x72\x69\147\x69\x6e\x73"] = []; diff --git a/server/original/www/ezwebserver/src/application/config/routes.php b/server/original/www/ezwebserver/src/application/config/routes.php index 1027270..5692c44 100644 --- a/server/original/www/ezwebserver/src/application/config/routes.php +++ b/server/original/www/ezwebserver/src/application/config/routes.php @@ -1,7 +1,7 @@ array("\x67\x72\x69\156\56\147\151\x66", "\61\x39", "\x31\71", "\x67\x72\x69\156"), "\x3a\154\x6f\x6c\x3a" => array("\154\x6f\x6c\x2e\x67\x69\146", "\x31\71", "\x31\x39", "\x4c\117\x4c"), "\72\143\150\145\145\163\x65\72" => array("\143\x68\145\x65\163\145\x2e\147\151\146", "\x31\x39", "\x31\71", "\x63\x68\x65\145\163\145"), "\72\x29" => array("\163\155\151\154\x65\x2e\147\x69\x66", "\x31\x39", "\x31\x39", "\163\155\151\x6c\x65"), "\x3b\x2d\51" => array("\167\151\x6e\153\x2e\147\151\146", "\61\71", "\61\71", "\x77\151\156\x6b"), "\x3b\51" => array("\167\151\156\153\x2e\147\x69\x66", "\61\x39", "\61\71", "\x77\x69\156\x6b"), "\72\163\x6d\151\162\x6b\72" => array("\x73\155\151\162\x6b\x2e\x67\x69\146", "\x31\x39", "\x31\71", "\x73\155\151\162\x6b"), "\72\162\x6f\x6c\x6c\72" => array("\162\x6f\154\x6c\145\171\145\x73\56\147\151\146", "\x31\x39", "\61\71", "\x72\x6f\154\x6c\145\x79\145\x73"), "\x3a\x2d\x53" => array("\x63\157\156\146\165\x73\145\144\56\147\151\x66", "\x31\x39", "\61\71", "\x63\x6f\x6e\x66\165\x73\145\144"), "\x3a\167\x6f\x77\72" => array("\x73\165\162\x70\162\151\x73\145\x2e\147\151\146", "\61\71", "\61\x39", "\163\165\x72\x70\162\x69\163\x65\x64"), "\x3a\x62\165\147\72" => array("\142\x69\147\x73\x75\x72\x70\x72\x69\163\x65\x2e\147\x69\146", "\x31\x39", "\x31\x39", "\142\x69\x67\x20\163\x75\x72\160\162\151\163\x65"), "\72\x2d\x50" => array("\164\157\x6e\147\x75\x65\137\x6c\x61\x75\x67\x68\x2e\147\x69\x66", "\x31\71", "\61\71", "\164\157\156\x67\x75\x65\x20\x6c\x61\x75\147\150"), "\x25\55\x50" => array("\x74\x6f\x6e\147\x75\145\137\162\157\x6c\x6c\145\171\145\x2e\147\x69\x66", "\x31\71", "\x31\x39", "\x74\157\156\x67\x75\145\x20\x72\157\154\x6c\145\x79\145"), "\x3b\55\120" => array("\164\x6f\x6e\x67\x75\x65\x5f\167\151\156\153\56\x67\151\146", "\x31\71", "\61\71", "\164\157\x6e\147\165\x65\x20\167\151\x6e\153"), "\72\x50" => array("\162\141\x73\160\x62\145\x72\162\x79\56\x67\x69\146", "\x31\x39", "\x31\x39", "\x72\x61\x73\160\x62\145\x72\162\171"), "\x3a\x62\x6c\x61\156\153\72" => array("\142\x6c\141\x6e\153\x2e\x67\151\146", "\61\71", "\61\71", "\x62\x6c\141\x6e\x6b\40\163\x74\141\x72\x65"), "\x3a\x6c\157\156\147\72" => array("\x6c\x6f\156\147\146\141\143\x65\x2e\x67\x69\146", "\61\x39", "\61\x39", "\154\157\x6e\147\40\146\x61\x63\x65"), "\x3a\157\150\x68\x3a" => array("\x6f\x68\x68\56\147\x69\146", "\61\x39", "\61\71", "\157\150\x68"), "\72\147\x72\x72\x72\x3a" => array("\147\x72\x72\162\56\147\x69\146", "\x31\x39", "\61\71", "\x67\162\x72\x72"), "\x3a\147\x75\x6c\160\72" => array("\x67\165\x6c\160\x2e\x67\151\146", "\61\x39", "\61\x39", "\x67\x75\154\160"), "\x38\x2d\57" => array("\x6f\150\x6f\x68\56\147\151\146", "\x31\71", "\61\x39", "\157\x68\x20\157\150"), "\x3a\144\x6f\167\156\x3a" => array("\x64\157\167\x6e\145\162\56\147\151\146", "\x31\71", "\x31\x39", "\144\157\167\x6e\145\x72"), "\x3a\x72\x65\x64\72" => array("\145\155\x62\x61\162\x72\141\163\x73\x65\x64\56\x67\151\146", "\61\x39", "\61\x39", "\162\145\x64\40\x66\x61\143\x65"), "\x3a\163\151\143\153\x3a" => array("\x73\x69\143\153\x2e\x67\x69\146", "\61\71", "\x31\71", "\163\x69\143\153"), "\x3a\x73\x68\165\x74\x3a" => array("\163\150\x75\x74\145\171\x65\x2e\x67\151\146", "\61\x39", "\x31\71", "\x73\x68\x75\x74\x20\x65\171\145"), "\72\55\x2f" => array("\x68\x6d\155\56\x67\151\x66", "\61\71", "\61\71", "\x68\x6d\155\155"), "\76\72\x28" => array("\x6d\141\x64\56\147\151\x66", "\x31\71", "\61\x39", "\x6d\141\144"), "\72\x6d\141\144\x3a" => array("\155\141\x64\56\x67\x69\146", "\x31\71", "\61\x39", "\155\x61\x64"), "\x3e\x3a\x2d\50" => array("\141\x6e\x67\162\171\56\147\x69\146", "\x31\71", "\61\71", "\x61\156\147\162\171"), "\72\x61\156\x67\x72\171\x3a" => array("\141\156\147\162\x79\x2e\147\151\146", "\61\x39", "\61\x39", "\141\x6e\147\162\171"), "\x3a\x7a\x69\x70\x3a" => array("\172\151\x70\x2e\x67\151\146", "\61\71", "\61\71", "\x7a\151\x70\160\x65\x72"), "\72\153\x69\163\x73\x3a" => array("\x6b\x69\x73\x73\x2e\x67\151\x66", "\61\x39", "\x31\71", "\153\151\x73\163"), "\x3a\141\150\150\150\72" => array("\163\x68\x6f\x63\x6b\x2e\147\151\146", "\61\71", "\x31\x39", "\163\150\x6f\x63\153"), "\x3a\x63\157\157\x6c\163\155\151\x6c\145\72" => array("\x73\x68\141\x64\x65\137\163\x6d\x69\154\145\x2e\x67\x69\146", "\61\x39", "\61\71", "\x63\x6f\x6f\x6c\x20\163\155\x69\154\x65"), "\x3a\143\x6f\x6f\x6c\x73\155\x69\x72\x6b\x3a" => array("\x73\150\x61\x64\x65\x5f\x73\x6d\x69\x72\x6b\56\147\151\146", "\61\71", "\x31\71", "\x63\157\157\x6c\x20\163\155\x69\162\153"), "\72\x63\157\157\154\147\x72\x69\x6e\x3a" => array("\163\150\x61\144\x65\137\x67\162\x69\x6e\56\147\x69\146", "\x31\x39", "\61\71", "\x63\157\x6f\154\40\x67\162\151\156"), "\72\143\x6f\x6f\x6c\x68\x6d\155\72" => array("\163\150\141\x64\x65\137\x68\155\x6d\x2e\147\x69\146", "\61\71", "\x31\x39", "\143\157\x6f\154\40\150\155\x6d"), "\x3a\143\x6f\x6f\x6c\x6d\x61\144\72" => array("\x73\150\141\144\145\137\x6d\x61\x64\x2e\147\x69\146", "\x31\x39", "\61\x39", "\143\157\x6f\154\40\x6d\x61\144"), "\x3a\143\x6f\157\154\x63\x68\145\145\163\145\72" => array("\163\150\141\x64\145\137\143\x68\x65\x65\163\145\56\x67\151\146", "\x31\71", "\61\71", "\x63\x6f\157\154\x20\143\x68\x65\x65\x73\145"), "\72\166\141\x6d\160\151\x72\145\72" => array("\166\141\155\x70\151\162\145\56\x67\x69\x66", "\61\71", "\61\x39", "\x76\x61\x6d\x70\151\x72\x65"), "\x3a\163\x6e\141\x6b\145\x3a" => array("\x73\156\141\x6b\145\x2e\147\x69\146", "\x31\71", "\x31\71", "\163\156\141\x6b\145"), "\x3a\145\170\143\154\141\151\x6d\72" => array("\145\x78\x63\154\x61\151\155\56\x67\151\x66", "\61\71", "\x31\71", "\145\170\x63\154\141\151\x6d"), "\x3a\161\165\x65\163\x74\151\157\x6e\x3a" => array("\161\x75\145\x73\x74\151\157\x6e\x2e\147\151\146", "\x31\x39", "\61\71", "\x71\x75\145\x73\x74\151\157\156")); diff --git a/server/original/www/ezwebserver/src/application/config/testing/config.php b/server/original/www/ezwebserver/src/application/config/testing/config.php index 515c6d5..3175e86 100644 --- a/server/original/www/ezwebserver/src/application/config/testing/config.php +++ b/server/original/www/ezwebserver/src/application/config/testing/config.php @@ -1,7 +1,7 @@ "\127\151\156\144\157\167\163\x20\61\x30", "\x77\151\x6e\144\x6f\167\x73\x20\x6e\164\40\x36\56\63" => "\127\x69\156\x64\157\167\x73\40\70\56\61", "\167\151\156\144\x6f\x77\x73\x20\156\x74\x20\x36\56\62" => "\127\x69\156\x64\157\x77\x73\x20\70", "\x77\151\156\144\157\x77\x73\40\x6e\164\40\66\x2e\61" => "\127\x69\x6e\144\x6f\167\163\40\x37", "\167\151\156\144\x6f\167\x73\x20\x6e\x74\x20\x36\x2e\x30" => "\x57\151\x6e\x64\x6f\x77\163\x20\x56\151\x73\164\x61", "\x77\x69\156\x64\157\167\163\x20\156\164\x20\x35\x2e\62" => "\127\151\156\x64\x6f\167\x73\x20\62\60\60\x33", "\167\151\156\144\x6f\167\163\x20\156\164\40\65\x2e\x31" => "\127\x69\x6e\x64\157\x77\163\x20\130\x50", "\167\151\156\x64\x6f\167\163\x20\x6e\164\x20\65\x2e\x30" => "\127\151\156\x64\157\167\x73\x20\62\60\x30\60", "\167\151\x6e\144\x6f\x77\163\40\x6e\x74\x20\64\x2e\x30" => "\x57\x69\156\144\157\x77\163\40\116\x54\x20\64\56\60", "\167\151\156\156\164\x34\56\60" => "\x57\x69\156\x64\x6f\x77\163\40\116\124\x20\64\x2e\x30", "\167\151\156\x6e\164\x20\x34\x2e\60" => "\127\151\156\x64\x6f\x77\x73\40\116\124", "\167\151\x6e\156\164" => "\127\151\x6e\x64\157\167\x73\40\116\x54", "\x77\151\156\x64\157\167\163\40\x39\x38" => "\127\x69\156\x64\157\x77\x73\40\x39\70", "\x77\151\x6e\71\x38" => "\127\x69\156\x64\x6f\x77\163\x20\71\70", "\167\x69\156\x64\x6f\167\163\40\x39\65" => "\127\151\x6e\x64\157\167\163\40\71\x35", "\167\151\x6e\x39\x35" => "\127\x69\x6e\x64\157\167\x73\40\71\x35", "\x77\151\156\x64\157\167\163\x20\160\x68\x6f\156\x65" => "\127\151\x6e\144\x6f\167\163\x20\120\x68\157\156\145", "\167\151\x6e\144\x6f\x77\x73" => "\125\156\x6b\x6e\157\167\x6e\x20\127\x69\x6e\x64\157\x77\x73\40\x4f\x53", "\141\x6e\x64\x72\157\x69\144" => "\101\x6e\x64\x72\157\x69\144", "\142\x6c\x61\143\x6b\142\145\162\162\171" => "\x42\154\141\x63\x6b\102\x65\162\162\x79", "\x69\x70\x68\x6f\x6e\145" => "\x69\x4f\123", "\151\160\x61\x64" => "\151\x4f\123", "\x69\x70\x6f\x64" => "\x69\117\x53", "\x6f\163\40\x78" => "\115\x61\x63\x20\117\123\40\x58", "\x70\x70\x63\x20\155\141\x63" => "\x50\x6f\167\x65\x72\x20\x50\x43\x20\x4d\141\143", "\x66\x72\x65\x65\142\163\144" => "\106\x72\145\x65\x42\123\x44", "\160\x70\x63" => "\115\x61\x63\x69\x6e\164\157\163\x68", "\154\151\156\165\x78" => "\114\151\x6e\x75\170", "\144\x65\142\x69\141\x6e" => "\104\x65\x62\x69\x61\156", "\x73\x75\x6e\157\x73" => "\123\165\156\x20\123\x6f\154\x61\x72\151\x73", "\x62\x65\x6f\x73" => "\x42\145\117\123", "\x61\160\x61\x63\x68\145\142\x65\156\x63\150" => "\101\x70\141\143\150\x65\x42\x65\156\x63\150", "\141\x69\170" => "\x41\x49\130", "\151\x72\x69\x78" => "\x49\x72\151\170", "\157\x73\x66" => "\104\x45\103\x20\117\x53\x46", "\x68\x70\x2d\x75\x78" => "\x48\120\x2d\x55\x58", "\156\x65\x74\142\x73\x64" => "\116\x65\164\x42\x53\x44", "\142\x73\144\x69" => "\102\123\x44\x69", "\157\160\x65\x6e\x62\163\x64" => "\x4f\160\x65\x6e\x42\123\x44", "\x67\x6e\x75" => "\107\116\x55\x2f\x4c\151\x6e\x75\x78", "\165\x6e\x69\x78" => "\125\156\153\x6e\x6f\167\x6e\40\125\x6e\x69\x78\x20\x4f\123", "\x73\x79\155\x62\x69\x61\156" => "\123\171\x6d\142\151\141\156\40\x4f\123"); $browsers = array("\117\x50\x52" => "\117\160\x65\162\x61", "\x46\x6c\157\x63\153" => "\x46\154\x6f\143\x6b", "\105\x64\147\145" => "\123\160\141\x72\x74\x61\156", "\103\150\162\x6f\x6d\x65" => "\x43\150\x72\x6f\x6d\x65", "\117\160\145\x72\141\x2e\52\77\126\145\162\163\x69\x6f\156" => "\x4f\x70\x65\162\x61", "\x4f\x70\145\x72\x61" => "\117\160\145\x72\141", "\x4d\123\111\105" => "\x49\156\164\145\162\x6e\x65\x74\40\x45\170\x70\x6c\x6f\162\x65\x72", "\111\x6e\164\x65\162\156\x65\164\x20\x45\x78\160\x6c\157\x72\x65\x72" => "\x49\x6e\x74\145\x72\156\145\164\40\105\x78\160\x6c\157\162\145\x72", "\124\162\x69\x64\x65\x6e\x74\x2e\52\x20\162\166" => "\x49\x6e\164\x65\x72\156\145\164\40\105\x78\160\x6c\157\x72\145\x72", "\x53\150\x69\x69\162\141" => "\x53\x68\151\x69\162\x61", "\x46\151\x72\x65\146\x6f\170" => "\106\151\162\x65\x66\157\x78", "\103\x68\x69\155\x65\162\x61" => "\x43\x68\x69\155\x65\162\x61", "\120\x68\157\x65\156\x69\x78" => "\x50\x68\x6f\x65\x6e\x69\x78", "\106\x69\162\x65\x62\x69\x72\x64" => "\106\x69\x72\x65\x62\x69\162\144", "\103\x61\x6d\151\156\x6f" => "\103\141\155\x69\156\x6f", "\x4e\x65\164\x73\x63\x61\160\x65" => "\x4e\145\164\163\143\x61\160\145", "\117\155\156\x69\x57\x65\142" => "\x4f\x6d\156\151\127\145\x62", "\123\x61\146\141\162\151" => "\x53\x61\146\x61\162\x69", "\115\157\x7a\x69\154\154\141" => "\x4d\x6f\x7a\151\154\x6c\x61", "\x4b\x6f\x6e\161\x75\145\162\x6f\x72" => "\x4b\x6f\x6e\161\x75\x65\x72\157\x72", "\x69\143\141\x62" => "\x69\103\141\x62", "\x4c\171\x6e\x78" => "\x4c\171\x6e\x78", "\114\x69\x6e\x6b\x73" => "\114\x69\x6e\153\x73", "\x68\157\164\x6a\141\x76\141" => "\x48\157\164\112\141\x76\141", "\x61\155\x61\x79\x61" => "\x41\x6d\x61\171\141", "\111\x42\162\x6f\x77\163\145" => "\111\x42\162\157\x77\x73\145", "\115\141\x78\164\x68\x6f\156" => "\x4d\x61\170\x74\x68\157\156", "\x55\142\165\156\164\165" => "\x55\142\165\156\164\x75\x20\127\145\142\x20\x42\162\x6f\167\x73\145\x72"); $mobiles = array("\155\157\x62\151\x6c\x65\x65\x78\160\154\157\x72\x65\x72" => "\115\157\x62\x69\x6c\145\x20\x45\170\x70\x6c\x6f\162\145\162", "\160\x61\154\x6d\163\157\165\162\x63\x65" => "\x50\141\154\x6d", "\x70\x61\154\155\163\143\x61\160\x65" => "\x50\x61\x6c\155\163\x63\141\x70\x65", "\155\x6f\164\x6f\x72\157\154\141" => "\x4d\x6f\x74\x6f\x72\x6f\x6c\x61", "\x6e\x6f\x6b\x69\141" => "\116\157\x6b\x69\141", "\160\x61\x6c\x6d" => "\120\141\154\155", "\x69\160\150\x6f\x6e\x65" => "\101\x70\160\154\145\x20\x69\x50\x68\x6f\x6e\x65", "\151\160\141\144" => "\151\x50\x61\144", "\x69\160\x6f\144" => "\101\160\160\154\145\40\x69\120\x6f\x64\40\124\157\165\x63\x68", "\x73\157\156\x79" => "\123\157\x6e\x79\40\x45\x72\x69\143\x73\x73\x6f\x6e", "\145\x72\x69\x63\163\163\157\x6e" => "\123\157\x6e\x79\x20\105\x72\151\x63\x73\163\157\x6e", "\142\154\141\x63\x6b\x62\145\x72\x72\x79" => "\102\x6c\141\143\153\102\x65\162\162\x79", "\143\x6f\x63\x6f\x6f\x6e" => "\117\62\x20\103\157\143\157\x6f\156", "\x62\x6c\x61\x7a\x65\162" => "\x54\x72\x65\x6f", "\x6c\147" => "\x4c\x47", "\x61\155\157\151" => "\x41\155\x6f\x69", "\170\144\x61" => "\x58\104\x41", "\x6d\x64\x61" => "\x4d\104\101", "\x76\x61\162\151\157" => "\x56\x61\x72\151\x6f", "\x68\x74\x63" => "\110\x54\x43", "\163\x61\155\x73\x75\156\x67" => "\123\x61\x6d\163\x75\x6e\147", "\x73\150\x61\x72\160" => "\x53\150\141\162\x70", "\163\x69\145\55" => "\123\151\x65\x6d\x65\156\163", "\x61\x6c\143\x61\x74\x65\x6c" => "\101\154\x63\141\164\x65\x6c", "\x62\145\156\161" => "\102\x65\x6e\121", "\x69\160\141\x71" => "\x48\x50\40\x69\x50\141\x71", "\x6d\x6f\x74\x2d" => "\115\157\x74\x6f\x72\x6f\154\141", "\x70\154\141\171\x73\x74\x61\164\x69\x6f\156\40\160\157\x72\164\141\x62\154\x65" => "\x50\154\141\x79\x53\164\141\x74\x69\x6f\x6e\40\x50\157\x72\164\141\142\154\x65", "\160\154\141\171\x73\164\141\164\151\157\x6e\40\63" => "\x50\154\141\x79\123\x74\x61\164\x69\157\x6e\x20\x33", "\160\x6c\x61\x79\x73\164\x61\x74\x69\157\156\40\166\151\x74\141" => "\120\x6c\x61\x79\123\x74\x61\164\151\157\156\x20\126\x69\164\x61", "\x68\x69\160\164\x6f\160" => "\104\141\156\x67\x65\x72\x20\110\151\x70\x74\157\160", "\156\145\x63\x2d" => "\x4e\x45\103", "\x70\x61\156\141\x73\157\156\151\143" => "\x50\141\x6e\141\x73\157\x6e\x69\x63", "\x70\150\151\154\151\x70\163" => "\120\150\x69\154\x69\160\x73", "\x73\x61\147\145\155" => "\x53\x61\x67\x65\155", "\163\141\x6e\x79\157" => "\123\x61\156\x79\x6f", "\x73\160\x76" => "\x53\x50\x56", "\172\x74\145" => "\x5a\124\x45", "\163\145\x6e\144\x6f" => "\x53\145\x6e\x64\157", "\156\x69\156\x74\145\156\x64\157\40\x64\x73\151" => "\116\x69\x6e\x74\x65\156\144\157\40\104\123\x69", "\156\x69\x6e\164\x65\x6e\144\157\40\x64\163" => "\x4e\x69\x6e\x74\x65\x6e\144\157\40\x44\123", "\156\151\156\164\145\x6e\144\157\x20\x33\x64\x73" => "\x4e\x69\156\x74\145\156\x64\157\40\x33\x44\123", "\167\x69\x69" => "\x4e\151\156\x74\x65\156\x64\157\x20\127\151\151", "\157\160\145\156\40\167\x65\142" => "\117\x70\145\x6e\40\x57\145\142", "\157\x70\x65\x6e\x77\145\142" => "\x4f\x70\x65\x6e\x57\145\142", "\141\156\144\162\157\151\x64" => "\x41\x6e\144\162\x6f\x69\x64", "\163\171\155\x62\x69\141\x6e" => "\x53\x79\x6d\x62\151\141\156", "\x53\171\155\142\x69\141\156\x4f\x53" => "\x53\171\155\142\151\x61\x6e\117\123", "\145\154\141\x69\156\145" => "\x50\141\x6c\x6d", "\163\145\162\151\x65\163\x36\60" => "\123\171\x6d\x62\151\x61\x6e\40\x53\x36\x30", "\167\151\156\x64\x6f\167\163\x20\143\145" => "\x57\x69\x6e\144\157\x77\x73\40\x43\x45", "\157\142\x69\x67\x6f" => "\117\x62\151\x67\x6f", "\x6e\145\164\146\x72\157\156\x74" => "\x4e\145\164\146\x72\x6f\156\164\x20\102\162\x6f\167\x73\145\162", "\x6f\160\x65\x6e\167\x61\x76\145" => "\x4f\x70\145\156\167\141\x76\x65\40\102\162\x6f\x77\163\145\x72", "\x6d\157\x62\151\x6c\145\x78\160\x6c\x6f\162\x65\x72" => "\115\x6f\x62\151\154\x65\x20\105\x78\160\154\157\162\x65\x72", "\157\160\x65\162\x61\x6d\x69\x6e\151" => "\x4f\160\x65\162\x61\x20\115\x69\156\x69", "\x6f\x70\145\x72\141\x20\x6d\151\x6e\x69" => "\117\x70\x65\x72\x61\x20\x4d\x69\x6e\151", "\x6f\160\x65\x72\x61\x20\155\157\x62\x69" => "\x4f\160\145\x72\x61\x20\115\x6f\x62\x69\154\x65", "\146\x65\156\156\145\x63" => "\x46\151\162\x65\x66\157\x78\x20\115\157\142\151\x6c\x65", "\x64\x69\x67\x69\164\141\154\x20\160\x61\x74\150\163" => "\x44\x69\147\x69\x74\x61\x6c\x20\120\x61\x74\150\163", "\x61\x76\x61\x6e\x74\x67\x6f" => "\x41\x76\x61\x6e\164\x47\x6f", "\x78\151\x69\x6e\157" => "\130\151\x69\156\157", "\156\x6f\x76\141\162\x72\141" => "\x4e\157\166\141\162\x72\x61\x20\124\x72\141\156\163\143\157\x64\145\162", "\x76\x6f\x64\x61\x66\x6f\x6e\145" => "\126\x6f\x64\141\146\157\156\145", "\144\x6f\x63\x6f\x6d\x6f" => "\116\x54\124\x20\x44\157\x43\157\115\157", "\157\x32" => "\x4f\62", "\155\157\x62\151\154\x65" => "\107\145\x6e\145\162\x69\x63\x20\115\157\x62\151\154\145", "\167\151\x72\x65\x6c\x65\x73\x73" => "\x47\145\156\145\162\x69\143\40\x4d\x6f\x62\151\x6c\145", "\152\62\155\145" => "\x47\145\x6e\x65\162\x69\143\x20\115\157\x62\x69\x6c\x65", "\x6d\x69\x64\160" => "\x47\x65\156\145\x72\151\143\40\115\157\142\x69\x6c\x65", "\x63\154\x64\x63" => "\x47\145\x6e\145\162\151\x63\x20\115\157\142\151\154\x65", "\x75\x70\x2e\x6c\x69\156\x6b" => "\x47\x65\156\x65\162\x69\143\40\115\x6f\x62\x69\154\x65", "\165\x70\x2e\x62\162\x6f\x77\163\145\162" => "\107\145\156\145\x72\151\143\x20\115\157\142\151\154\x65", "\x73\x6d\141\162\x74\160\150\157\x6e\145" => "\x47\145\x6e\145\x72\151\x63\x20\x4d\x6f\142\x69\x6c\145", "\143\x65\154\154\x70\x68\x6f\156\145" => "\107\145\156\145\162\151\x63\x20\115\x6f\x62\151\x6c\x65"); $robots = array("\147\157\x6f\147\154\145\142\157\x74" => "\107\157\157\x67\154\x65\x62\157\164", "\155\x73\x6e\142\x6f\x74" => "\x4d\x53\x4e\102\x6f\x74", "\x62\x61\151\x64\165\x73\160\151\x64\145\162" => "\x42\x61\x69\144\x75\163\160\151\x64\145\162", "\142\151\x6e\147\142\157\164" => "\x42\151\x6e\x67", "\x73\154\x75\162\x70" => "\111\156\153\x74\x6f\x6d\x69\x20\123\154\x75\x72\x70", "\x79\x61\x68\x6f\x6f" => "\x59\x61\x68\157\x6f", "\x61\163\153\x20\152\x65\145\166\x65\x73" => "\x41\x73\153\x20\112\145\x65\166\145\163", "\146\141\163\164\x63\x72\x61\167\x6c\x65\162" => "\106\141\163\164\103\162\x61\167\x6c\x65\162", "\x69\x6e\146\157\163\x65\x65\153" => "\111\x6e\146\157\x53\145\x65\x6b\40\x52\157\142\157\x74\40\x31\x2e\60", "\x6c\171\143\157\163" => "\114\171\143\157\x73", "\x79\141\156\144\x65\170" => "\131\x61\x6e\x64\145\170\102\x6f\164", "\x6d\145\x64\x69\141\160\141\x72\164\x6e\145\162\163\x2d\x67\x6f\x6f\147\154\145" => "\x4d\145\144\151\x61\x50\x61\162\x74\156\145\x72\163\40\107\157\157\x67\x6c\145", "\x43\x52\101\132\x59\127\x45\102\103\x52\101\x57\114\x45\x52" => "\103\x72\141\172\x79\x20\127\145\142\x63\162\141\167\x6c\x65\x72", "\x61\144\163\x62\x6f\x74\55\x67\x6f\x6f\147\x6c\145" => "\101\x64\x73\102\x6f\164\x20\107\x6f\157\147\x6c\145", "\x66\145\x65\144\146\x65\x74\143\x68\145\162\x2d\x67\157\x6f\x67\x6c\x65" => "\106\x65\145\x64\x66\x65\x74\x63\150\145\x72\x20\x47\x6f\157\x67\x6c\x65", "\x63\x75\x72\151\x6f\165\x73\40\147\x65\x6f\x72\x67\145" => "\103\165\x72\x69\157\165\163\40\107\145\157\x72\x67\x65", "\151\x61\137\x61\162\143\x68\151\x76\x65\162" => "\x41\x6c\145\x78\x61\x20\103\x72\x61\x77\x6c\x65\162", "\115\x4a\x31\x32\x62\x6f\x74" => "\115\141\x6a\x65\163\164\151\x63\55\61\x32", "\x55\160\x74\151\155\x65\x62\157\x74" => "\125\x70\164\x69\155\x65\142\x6f\x74"); diff --git a/server/original/www/ezwebserver/src/application/config/vterror.php b/server/original/www/ezwebserver/src/application/config/vterror.php index 01216f4..212b108 100644 --- a/server/original/www/ezwebserver/src/application/config/vterror.php +++ b/server/original/www/ezwebserver/src/application/config/vterror.php @@ -1,7 +1,7 @@ VERR_COMMON_SUCCESS, "\145\x72\162\x6f\162\x4d\x65\163\163\141\x67\x65" => "\123\x75\x63\143\145\x73\x73"); $errorMsgs[VERR_COMMON_PERMMITTED] = array("\145\162\x72\x6f\162\103\157\x64\x65" => VERR_COMMON_PERMMITTED, "\145\162\x72\x6f\162\x4d\x65\163\x73\x61\147\145" => "\x4f\x70\x65\162\x61\164\x69\x6f\x6e\40\x6e\157\x74\40\160\x65\x72\x6d\151\164\164\x65\x64"); $errorMsgs[VERR_COMMON_NOFILE] = array("\x65\x72\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_NOFILE, "\x65\162\162\157\162\x4d\x65\x73\x73\x61\x67\x65" => "\x4e\157\40\x73\165\143\150\x20\x66\x69\x6c\x65\40\157\x72\x20\x64\151\162\145\x63\164\157\162\171\40\145\x78\x69\x73\x74\163"); $errorMsgs[VERR_COMMON_PROCESS] = array("\x65\162\x72\x6f\162\x43\x6f\x64\145" => VERR_COMMON_PROCESS, "\145\162\x72\157\x72\115\145\x73\x73\x61\147\145" => "\116\x6f\x20\163\165\143\x68\40\x70\162\x6f\x63\x65\163\x73"); $errorMsgs[VERR_COMMON_INTERRUPTED] = array("\145\x72\x72\157\162\x43\157\x64\145" => VERR_COMMON_INTERRUPTED, "\x65\x72\x72\157\162\x4d\x65\x73\x73\x61\147\145" => "\111\x6e\x74\145\162\162\165\160\x74\145\144\40\163\171\163\164\x65\x6d\40\143\141\x6c\x6c"); $errorMsgs[VERR_COMMON_IO] = array("\145\x72\x72\x6f\x72\x43\x6f\x64\x65" => VERR_COMMON_IO, "\x65\162\162\157\x72\x4d\145\163\163\141\147\145" => "\111\57\117\x20\145\x72\x72\157\162"); $errorMsgs[VERR_COMMON_NODEVICE] = array("\x65\162\x72\157\x72\x43\x6f\144\x65" => VERR_COMMON_NODEVICE, "\x65\x72\x72\157\162\x4d\145\163\x73\x61\x67\145" => "\x4e\157\x20\163\x75\x63\150\40\144\145\x76\x69\x63\145\40\157\x72\x20\x61\144\144\162\x65\x73\163"); $errorMsgs[VERR_COMMON_LONG] = array("\145\162\162\157\162\103\x6f\x64\x65" => VERR_COMMON_LONG, "\145\x72\x72\157\x72\x4d\145\163\163\141\147\145" => "\x41\x72\147\x75\155\145\x6e\x74\40\x6c\151\163\164\40\164\x6f\x6f\x20\x6c\157\156\x67"); $errorMsgs[VERR_COMMON_NOEXEC] = array("\x65\162\162\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_NOEXEC, "\x65\x72\162\x6f\x72\x4d\145\163\163\141\147\x65" => "\x45\x78\145\143\x20\146\x6f\162\155\x61\164\x20\x65\x72\162\x6f\x72"); $errorMsgs[VERR_COMMON_BADFILE] = array("\145\x72\x72\x6f\x72\x43\157\x64\x65" => VERR_COMMON_BADFILE, "\145\162\x72\x6f\162\115\145\x73\x73\141\x67\145" => "\x42\141\x64\x20\x66\x69\154\x65\40\156\x75\x6d\x62\145\x72"); $errorMsgs[VERR_COMMON_CHILD] = array("\145\162\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_CHILD, "\x65\162\x72\157\162\x4d\145\163\163\141\x67\x65" => "\x4e\157\40\143\x68\x69\154\144\x20\x70\x72\157\143\x65\163\x73\145\x73"); $errorMsgs[VERR_COMMON_AGAIN] = array("\x65\x72\x72\x6f\162\103\157\144\x65" => VERR_COMMON_AGAIN, "\145\x72\162\x6f\162\x4d\145\163\x73\x61\147\x65" => "\124\162\x79\40\x61\x67\141\x69\156"); $errorMsgs[VERR_COMMON_NOMEMORY] = array("\145\x72\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_NOMEMORY, "\145\x72\162\x6f\x72\115\145\x73\163\141\x67\x65" => "\117\165\x74\40\x6f\146\x20\155\x65\x6d\x6f\162\171"); $errorMsgs[VERR_COMMON_ACCESS] = array("\145\x72\x72\157\x72\103\157\144\x65" => VERR_COMMON_ACCESS, "\145\162\x72\157\162\x4d\145\163\x73\141\147\x65" => "\120\145\162\155\x69\x73\163\151\x6f\156\x20\x64\x65\156\x69\x65\x64"); $errorMsgs[VERR_COMMON_FAULT] = array("\x65\162\x72\x6f\x72\x43\157\144\145" => VERR_COMMON_FAULT, "\x65\162\x72\x6f\x72\x4d\145\x73\x73\x61\147\x65" => "\102\141\x64\40\x61\x64\x64\x72\145\163\163"); $errorMsgs[VERR_COMMON_NOTBLOCK] = array("\x65\x72\162\x6f\x72\x43\x6f\144\x65" => VERR_COMMON_NOTBLOCK, "\145\x72\162\x6f\162\115\x65\163\x73\141\x67\x65" => "\x42\x6c\157\143\x6b\40\x64\x65\166\151\143\145\40\162\145\x71\x75\151\x72\x65\x64"); $errorMsgs[VERR_COMMON_BUSY] = array("\x65\162\x72\157\x72\x43\x6f\x64\x65" => VERR_COMMON_BUSY, "\145\x72\162\x6f\162\115\x65\x73\x73\x61\147\x65" => "\104\145\166\x69\143\x65\x20\x6f\x72\x20\162\145\163\157\x75\x72\x63\145\x20\142\165\163\x79"); $errorMsgs[VERR_COMMON_INVALID_FUNCTION] = array("\145\x72\x72\157\162\103\157\x64\x65" => VERR_COMMON_INVALID_FUNCTION, "\145\162\162\157\x72\115\145\163\x73\x61\147\145" => "\x49\x6e\143\157\162\x72\145\x63\164\x20\146\x75\156\x63\x74\151\x6f\x6e"); $errorMsgs[VERR_COMMON_XDEVICE] = array("\x65\x72\x72\157\x72\103\x6f\x64\145" => VERR_COMMON_XDEVICE, "\145\162\162\x6f\x72\115\145\163\x73\141\147\145" => "\x43\162\157\163\x73\x2d\144\x65\166\151\143\145\40\x6c\151\156\x6b"); $errorMsgs[VERR_COMMON_NOTDIR] = array("\145\x72\x72\157\162\x43\x6f\144\145" => VERR_COMMON_NOTDIR, "\x65\x72\x72\x6f\162\115\x65\x73\163\x61\147\x65" => "\116\x6f\164\x20\141\40\x64\151\x72\145\x63\x74\x6f\162\171"); $errorMsgs[VERR_COMMON_INVALID] = array("\145\162\162\157\162\x43\157\144\x65" => VERR_COMMON_INVALID, "\x65\x72\162\x6f\x72\x4d\145\163\163\x61\x67\x65" => "\x49\156\166\x61\154\151\144\40\x61\x72\x67\165\155\x65\156\164"); $errorMsgs[VERR_COMMON_FILE_OVERFLOW] = array("\x65\162\x72\157\x72\103\157\144\145" => VERR_COMMON_FILE_OVERFLOW, "\x65\x72\162\x6f\162\115\145\163\163\x61\147\145" => "\106\151\x6c\x65\40\x74\141\142\x6c\145\40\x6f\x76\x65\162\146\154\x6f\x77"); $errorMsgs[VERR_COMMON_MANY_FILE] = array("\x65\162\162\x6f\x72\103\x6f\144\145" => VERR_COMMON_MANY_FILE, "\145\x72\162\157\162\x4d\145\163\x73\x61\147\x65" => "\124\157\x6f\x20\x6d\x61\156\171\40\x6f\160\x65\156\40\x66\x69\154\x65\163"); $errorMsgs[VERR_COMMON_TYPEWRITER] = array("\145\162\x72\157\x72\103\157\x64\145" => VERR_COMMON_TYPEWRITER, "\145\162\162\x6f\x72\115\145\x73\x73\141\x67\145" => "\x4e\157\x74\40\141\x20\164\x79\160\x65\x77\162\151\164\x65\162"); $errorMsgs[VERR_COMMON_TEXT_BUSY] = array("\x65\x72\162\157\x72\x43\x6f\144\145" => VERR_COMMON_TEXT_BUSY, "\x65\162\x72\x6f\162\x4d\x65\163\163\x61\x67\145" => "\x54\145\170\164\40\x66\151\154\x65\40\x62\165\163\x79"); $errorMsgs[VERR_COMMON_FILE_BIG] = array("\145\162\162\157\x72\x43\x6f\144\145" => VERR_COMMON_FILE_BIG, "\145\x72\162\x6f\x72\115\145\163\x73\141\147\145" => "\x46\151\x6c\x65\x20\x74\x6f\157\x20\154\x61\162\147\145"); $errorMsgs[VERR_COMMON_NOSPACE] = array("\x65\x72\162\157\162\x43\157\144\145" => VERR_COMMON_NOSPACE, "\145\162\162\157\162\115\x65\163\163\141\x67\145" => "\116\157\40\163\x70\x61\x63\x65\40\x6c\x65\146\x74\40\x6f\x6e\40\144\145\x76\x69\x63\x65"); $errorMsgs[VERR_COMMON_ILLSEEK] = array("\145\x72\162\157\162\103\157\144\x65" => VERR_COMMON_ILLSEEK, "\145\162\x72\x6f\x72\115\145\163\x73\141\147\x65" => "\111\154\154\x65\147\x61\x6c\40\x73\x65\x65\153"); $errorMsgs[VERR_COMMON_READONLY] = array("\145\x72\162\157\x72\103\157\x64\x65" => VERR_COMMON_READONLY, "\x65\162\162\157\162\115\145\x73\x73\x61\147\x65" => "\122\145\141\144\x2d\157\156\x6c\x79\x20\146\x69\x6c\145\40\163\171\163\164\145\x6d"); $errorMsgs[VERR_COMMON_LINK] = array("\x65\162\x72\157\x72\103\157\144\145" => VERR_COMMON_LINK, "\x65\x72\x72\157\162\115\x65\x73\163\141\x67\145" => "\124\157\157\x20\155\x61\156\x79\x20\x6c\151\156\x6b\163"); $errorMsgs[VERR_COMMON_PIPE] = array("\x65\x72\x72\x6f\162\x43\x6f\144\x65" => VERR_COMMON_PIPE, "\x65\x72\162\157\162\x4d\x65\x73\163\x61\147\145" => "\x42\162\x6f\x6b\145\156\x20\160\x69\160\x65"); $errorMsgs[VERR_COMMON_DOMAIN] = array("\145\162\162\157\162\103\x6f\144\145" => VERR_COMMON_DOMAIN, "\145\162\162\157\x72\x4d\x65\163\x73\141\x67\145" => "\x4d\x61\164\x68\40\141\x72\147\x75\x6d\145\x6e\164\x20\157\165\164\x20\x6f\x66\40\144\x6f\155\x61\151\x6e\x20\x6f\146\40\x66\165\x6e\x63\x74\151\x6f\x6e"); $errorMsgs[VERR_COMMON_MATH] = array("\145\162\162\x6f\162\x43\x6f\x64\145" => VERR_COMMON_MATH, "\x65\x72\x72\x6f\162\x4d\145\163\163\x61\x67\x65" => "\x4d\141\x74\150\x20\162\145\x73\x75\x6c\164\40\156\x6f\164\40\x72\145\160\x72\145\x73\x65\x6e\x74\141\x62\154\x65"); $errorMsgs[VERR_COMMON_BFONT] = array("\145\162\162\157\x72\103\x6f\144\145" => VERR_COMMON_BFONT, "\145\x72\162\x6f\162\115\x65\163\x73\x61\147\x65" => "\x42\141\x64\40\146\x6f\x6e\x74\40\x66\x69\154\x65\x20\146\157\162\x6d\141\164"); $errorMsgs[VERR_COMMON_NOSTR] = array("\x65\x72\x72\x6f\162\x43\x6f\144\x65" => VERR_COMMON_NOSTR, "\145\162\162\157\162\115\145\x73\x73\141\147\x65" => "\x44\x65\166\x69\x63\x65\x20\156\x6f\164\x20\141\40\163\164\x72\145\x61\x6d"); $errorMsgs[VERR_COMMON_NODATA] = array("\x65\162\x72\x6f\162\x43\157\x64\x65" => VERR_COMMON_NODATA, "\x65\162\162\157\162\x4d\x65\x73\163\141\x67\x65" => "\x4e\157\x20\163\165\143\150\40\x64\141\x74\141\x20\x65\170\x69\163\x74\163"); $errorMsgs[VERR_COMMON_TIME] = array("\x65\x72\x72\x6f\162\x43\157\x64\x65" => VERR_COMMON_TIME, "\x65\x72\162\x6f\162\115\145\163\x73\141\147\145" => "\124\151\155\x65\162\x20\x65\170\x70\151\x72\x65\144"); $errorMsgs[VERR_COMMON_NOSTREAM] = array("\x65\162\x72\x6f\x72\103\157\144\x65" => VERR_COMMON_NOSTREAM, "\x65\x72\x72\157\x72\115\145\x73\x73\x61\x67\145" => "\117\165\164\40\x6f\146\x20\x73\x74\162\x65\141\x6d\163\x20\162\x65\163\157\x75\162\x63\x65\163"); $errorMsgs[VERR_COMMON_NONETWORK] = array("\145\x72\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_NONETWORK, "\x65\x72\162\157\x72\115\145\163\x73\141\147\x65" => "\115\141\143\150\x69\x6e\145\40\x69\163\40\156\157\x74\x20\157\156\x20\164\x68\x65\40\x6e\x65\164\x77\x6f\x72\x6b"); $errorMsgs[VERR_COMMON_NOPACKAGE] = array("\145\162\162\157\162\x43\157\144\145" => VERR_COMMON_NOPACKAGE, "\145\162\x72\157\162\115\145\x73\x73\141\147\145" => "\x50\141\x63\153\141\x67\145\40\x6e\157\164\40\x69\156\163\x74\x61\x6c\x6c\145\144"); $errorMsgs[VERR_COMMON_REMOTE] = array("\x65\x72\162\x6f\x72\103\157\x64\145" => VERR_COMMON_REMOTE, "\x65\162\x72\x6f\162\x4d\145\163\163\141\147\x65" => "\117\x62\152\x65\143\164\x20\151\x73\40\x72\x65\155\x6f\x74\x65"); $errorMsgs[VERR_COMMON_NOLINK] = array("\145\162\x72\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_NOLINK, "\145\162\162\x6f\162\x4d\x65\163\x73\x61\x67\145" => "\114\x69\x6e\x6b\40\x68\141\163\x20\142\145\x65\156\x20\163\x65\166\145\162\145\144"); $errorMsgs[VERR_COMMON_ADVERTISE] = array("\145\162\162\157\162\103\x6f\144\145" => VERR_COMMON_ADVERTISE, "\x65\162\x72\x6f\162\115\x65\x73\x73\141\x67\145" => "\x41\144\x76\145\x72\x74\151\x73\x65\x20\x65\162\x72\157\x72"); $errorMsgs[VERR_COMMON_SRMOUNT] = array("\x65\162\162\x6f\x72\103\157\144\145" => VERR_COMMON_SRMOUNT, "\x65\162\162\x6f\162\115\x65\x73\x73\x61\x67\145" => "\123\162\x6d\157\x75\156\x74\40\145\x72\x72\x6f\162"); $errorMsgs[VERR_COMMON_COMMUNICATION] = array("\x65\x72\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_COMMUNICATION, "\145\162\x72\x6f\162\115\145\163\163\141\147\x65" => "\103\157\155\x6d\x75\x6e\x69\x63\141\164\151\157\x6e\x20\x65\162\x72\157\x72\40\157\156\x20\163\145\156\x64"); $errorMsgs[VERR_COMMON_PROTOCOL] = array("\145\162\162\157\162\x43\157\144\x65" => VERR_COMMON_PROTOCOL, "\x65\x72\x72\x6f\162\115\145\x73\163\x61\x67\145" => "\120\x72\157\x74\157\x63\x6f\154\x20\145\x72\x72\157\162"); $errorMsgs[VERR_COMMON_MULTIHOP] = array("\x65\162\x72\157\x72\x43\157\144\x65" => VERR_COMMON_MULTIHOP, "\145\x72\x72\157\x72\115\x65\163\163\141\x67\x65" => "\115\165\154\164\151\x68\157\x70\x20\x61\x74\x74\145\x6d\x70\164\x65\x64"); $errorMsgs[VERR_COMMON_BADMSG] = array("\145\162\162\157\162\x43\157\x64\x65" => VERR_COMMON_BADMSG, "\145\162\x72\157\162\115\x65\x73\x73\x61\x67\x65" => "\x4e\157\x74\40\x61\40\x64\141\x74\141\x20\155\x65\x73\163\141\147\x65"); $errorMsgs[VERR_COMMON_OVERFLOW] = array("\145\x72\162\157\x72\x43\x6f\144\145" => VERR_COMMON_OVERFLOW, "\x65\162\x72\x6f\162\x4d\145\x73\x73\141\147\x65" => "\x56\x61\x6c\x75\x65\40\164\x6f\157\40\x6c\x61\162\147\145\40\x66\157\162\x20\x64\145\146\x69\156\145\x64\x20\x64\141\164\141\40\x74\171\160\145"); $errorMsgs[VERR_COMMON_NOTUNIQUE] = array("\145\162\162\157\162\103\x6f\144\145" => VERR_COMMON_NOTUNIQUE, "\145\x72\162\x6f\162\x4d\x65\163\x73\x61\147\x65" => "\x4e\x61\155\x65\40\x6e\x6f\x74\40\165\156\151\x71\165\x65\40\157\156\40\156\x65\164\x77\x6f\x72\153"); $errorMsgs[VERR_COMMON_FILEDSECRIPTOR] = array("\x65\162\162\157\162\x43\x6f\144\x65" => VERR_COMMON_FILEDSECRIPTOR, "\x65\162\162\x6f\x72\115\x65\x73\163\141\147\x65" => "\x46\x69\154\x65\x20\144\145\x73\x63\162\151\160\x74\x6f\162\x20\x69\x6e\40\142\141\144\x20\163\164\x61\164\145"); $errorMsgs[VERR_COMMON_REMOTE_CHANGED] = array("\x65\162\x72\157\162\103\x6f\x64\x65" => VERR_COMMON_REMOTE_CHANGED, "\145\x72\x72\x6f\162\x4d\x65\x73\163\141\147\145" => "\122\x65\155\157\164\145\x20\x61\144\144\x72\145\163\x73\40\x63\150\141\156\147\145\144"); $errorMsgs[VERR_COMMON_LIBACCESS] = array("\145\x72\x72\x6f\162\x43\157\144\145" => VERR_COMMON_LIBACCESS, "\x65\x72\162\157\162\115\145\x73\163\x61\x67\x65" => "\103\141\x6e\156\157\x74\40\x61\143\143\145\x73\x73\x20\141\40\156\145\145\x64\145\144\x20\x73\x68\141\162\x65\144\40\x6c\x69\x62\162\141\x72\x79"); $errorMsgs[VERR_COMMON_LIBBAD] = array("\145\162\162\x6f\x72\103\x6f\144\145" => VERR_COMMON_LIBBAD, "\x65\162\162\157\162\115\145\x73\x73\141\147\145" => "\x41\x63\x63\x65\163\163\x69\x6e\x67\40\x61\x20\x63\x6f\162\x72\165\160\x74\145\x64\40\163\150\x61\162\x65\x64\x20\x6c\x69\142\x72\141\x72\171"); $errorMsgs[VERR_COMMON_LIBSECTION] = array("\x65\162\x72\157\162\103\x6f\144\145" => VERR_COMMON_LIBSECTION, "\145\162\162\157\x72\115\145\163\x73\x61\147\x65" => "\x2e\x6c\x69\x62\40\x73\145\143\164\x69\x6f\x6e\x20\151\156\x20\x61\56\157\x75\x74\40\143\x6f\162\x72\165\x70\164\145\x64"); $errorMsgs[VERR_COMMON_LIBMAX] = array("\145\x72\162\157\162\x43\x6f\144\145" => VERR_COMMON_LIBMAX, "\x65\x72\x72\157\x72\115\x65\x73\163\x61\x67\x65" => "\101\164\x74\x65\155\x70\164\151\x6e\147\x20\x74\157\40\x6c\151\x6e\153\40\x69\x6e\40\x74\157\157\x20\155\141\x6e\x79\40\163\x68\x61\x72\x65\x64\40\154\x69\x62\x72\x61\162\x69\x65\163"); $errorMsgs[VERR_COMMON_LIBEXEC] = array("\145\x72\162\x6f\162\103\x6f\144\x65" => VERR_COMMON_LIBEXEC, "\145\x72\162\x6f\x72\x4d\145\x73\163\141\147\145" => "\x43\x61\156\x6e\x6f\x74\40\x65\170\145\143\x20\x61\x20\x73\x68\x61\162\145\x64\40\x6c\x69\142\x72\141\162\x79\x20\144\151\x72\x65\x63\x74\154\x79"); $errorMsgs[VERR_COMMON_ILSEQUENCE] = array("\145\162\x72\157\162\x43\x6f\144\145" => VERR_COMMON_ILSEQUENCE, "\145\x72\162\157\x72\x4d\x65\163\x73\x61\x67\145" => "\111\x6c\154\145\x67\141\154\x20\x62\x79\x74\x65\x20\x73\145\x71\165\x65\156\x63\x65"); $errorMsgs[VERR_COMMON_RESTART] = array("\x65\162\162\157\x72\103\157\x64\145" => VERR_COMMON_RESTART, "\145\x72\162\x6f\x72\115\145\x73\163\x61\x67\145" => "\111\x6e\x74\x65\162\162\x75\160\x74\145\144\x20\163\171\163\164\145\155\x20\143\141\x6c\x6c\x20\x73\150\x6f\x75\x6c\x64\40\x62\x65\40\162\x65\163\x74\141\x72\x74\145\x64"); $errorMsgs[VERR_COMMON_STREAMPIPE] = array("\x65\x72\x72\x6f\x72\x43\157\x64\145" => VERR_COMMON_STREAMPIPE, "\145\162\x72\157\162\115\145\x73\163\x61\147\x65" => "\123\164\162\x65\x61\155\163\x20\160\151\160\x65\x20\145\162\x72\x6f\162"); $errorMsgs[VERR_COMMON_USERS] = array("\145\x72\x72\x6f\x72\103\x6f\144\x65" => VERR_COMMON_USERS, "\145\162\162\157\162\115\x65\x73\163\141\147\145" => "\124\x6f\157\40\155\141\156\171\x20\x75\x73\145\162\x73"); $errorMsgs[VERR_COMMON_NOTSOCKET] = array("\x65\x72\162\157\x72\103\x6f\x64\145" => VERR_COMMON_NOTSOCKET, "\145\x72\x72\157\162\115\145\x73\163\141\x67\145" => "\123\157\x63\x6b\x65\x74\40\157\x70\145\162\141\x74\x69\x6f\156\40\157\x6e\40\156\157\x6e\55\163\157\x63\x6b\x65\164"); $errorMsgs[VERR_COMMON_MSGSIZE] = array("\145\162\x72\x6f\162\103\157\144\x65" => VERR_COMMON_MSGSIZE, "\145\162\162\157\162\x4d\x65\x73\163\x61\x67\x65" => "\115\x65\x73\x73\141\x67\145\40\x74\157\157\x20\x6c\x6f\x6e\x67"); $errorMsgs[VERR_COMMON_PROTOTYPE] = array("\145\162\x72\157\162\103\x6f\144\x65" => VERR_COMMON_PROTOTYPE, "\145\x72\162\x6f\162\x4d\145\163\x73\141\147\145" => "\x50\x72\x6f\x74\157\143\157\154\x20\x77\162\157\156\x67\x20\164\x79\x70\x65\40\146\157\x72\40\x73\x6f\x63\153\145\164"); $errorMsgs[VERR_COMMON_NOPROTOCOL] = array("\145\162\x72\157\162\x43\x6f\x64\x65" => VERR_COMMON_NOPROTOCOL, "\145\162\162\157\162\115\145\x73\x73\x61\147\145" => "\120\162\x6f\x74\157\143\x6f\154\x20\x6e\157\x74\x20\141\x76\141\151\154\x61\142\154\x65"); $errorMsgs[VERR_COMMON_PROTONOSUPPORT] = array("\x65\162\x72\157\162\103\157\x64\x65" => VERR_COMMON_PROTONOSUPPORT, "\x65\x72\x72\x6f\162\115\145\x73\163\x61\147\x65" => "\x50\x72\x6f\164\157\x63\x6f\154\40\x6e\157\164\x20\163\165\x70\x70\x6f\x72\x74\145\x64"); $errorMsgs[VERR_COMMON_SOCKET_NOSUPPORT] = array("\145\x72\x72\x6f\162\x43\157\144\145" => VERR_COMMON_SOCKET_NOSUPPORT, "\x65\x72\162\157\x72\115\145\163\x73\x61\147\x65" => "\x53\x6f\x63\x6b\145\164\40\164\171\x70\x65\x20\156\x6f\x74\40\x73\165\160\x70\x6f\x72\x74\145\x64"); $errorMsgs[VERR_COMMON_OPERATION_NOTSUPPORT] = array("\145\x72\x72\157\162\103\x6f\x64\x65" => VERR_COMMON_OPERATION_NOTSUPPORT, "\145\x72\162\x6f\x72\115\145\163\163\141\147\145" => "\117\160\x65\x72\141\164\x69\157\x6e\40\x6e\x6f\164\x20\163\165\160\160\x6f\162\x74\145\144\40\157\x6e\x20\164\x72\141\x6e\x73\160\x6f\162\164\40\145\156\x64\x70\x6f\151\x6e\x74"); $errorMsgs[VERR_COMMON_PROTOCOL_NOSUPPORT] = array("\x65\162\x72\157\162\103\x6f\144\x65" => VERR_COMMON_PROTOCOL_NOSUPPORT, "\145\162\162\157\x72\115\145\x73\163\x61\147\x65" => "\120\x72\157\164\x6f\143\157\154\x20\x66\x61\x6d\151\154\x79\x20\x6e\x6f\164\40\163\x75\x70\x70\157\162\x74\145\x64"); $errorMsgs[VERR_COMMON_ADDRESS_NOSUPPORT] = array("\x65\162\x72\157\x72\103\157\144\x65" => VERR_COMMON_ADDRESS_NOSUPPORT, "\x65\x72\x72\157\x72\115\145\163\x73\141\147\145" => "\101\144\x64\x72\x65\x73\163\x20\x66\x61\x6d\x69\x6c\171\x20\156\x6f\x74\40\163\x75\x70\x70\x6f\x72\x74\x65\x64\40\142\171\40\x70\162\157\164\157\x63\x6f\154"); $errorMsgs[VERR_COMMON_ADDRESS_INUSE] = array("\145\x72\x72\157\x72\x43\157\144\x65" => VERR_COMMON_ADDRESS_INUSE, "\145\x72\x72\157\162\x4d\x65\x73\163\141\x67\x65" => "\x41\x64\x64\162\x65\163\163\40\141\x6c\x72\145\x61\144\171\x20\151\x6e\40\x75\163\x65"); $errorMsgs[VERR_COMMON_ADDRESS_NOTAVAIL] = array("\x65\162\x72\157\162\x43\x6f\x64\x65" => VERR_COMMON_ADDRESS_NOTAVAIL, "\x65\162\x72\x6f\162\115\x65\x73\x73\x61\147\x65" => "\x43\141\x6e\156\157\x74\40\141\163\163\151\147\156\40\162\x65\x71\165\x65\x73\x74\145\x64\x20\x61\x64\x64\x72\x65\163\163"); $errorMsgs[VERR_COMMON_NETWORK_DOWN] = array("\x65\x72\x72\157\x72\103\x6f\x64\145" => VERR_COMMON_NETWORK_DOWN, "\x65\162\x72\x6f\162\x4d\x65\163\163\x61\147\145" => "\x4e\x65\x74\x77\x6f\x72\153\x20\x69\x73\x20\x64\x6f\x77\156"); $errorMsgs[VERR_COMMON_NETWORK_UNREACH] = array("\145\x72\162\x6f\162\x43\157\x64\145" => VERR_COMMON_NETWORK_UNREACH, "\145\x72\162\x6f\162\x4d\x65\x73\x73\141\147\145" => "\x4e\145\164\167\x6f\x72\153\x20\151\163\40\165\156\162\x65\x61\x63\x68\141\x62\154\145"); $errorMsgs[VERR_COMMON_NETWORK_RESET] = array("\x65\162\162\157\162\103\x6f\x64\x65" => VERR_COMMON_NETWORK_RESET, "\x65\x72\162\x6f\162\115\x65\x73\163\x61\147\145" => "\116\145\164\167\157\162\153\40\144\162\157\x70\160\x65\x64\x20\x63\157\x6e\x6e\x65\x63\164\x69\157\x6e\x20\x62\x65\x63\x61\x75\163\x65\x20\x6f\146\40\x72\x65\163\x65\164"); $errorMsgs[VERR_COMMON_CONNECTION_BORTED] = array("\x65\162\x72\157\162\103\157\x64\145" => VERR_COMMON_CONNECTION_BORTED, "\145\x72\x72\x6f\x72\x4d\145\x73\163\x61\x67\145" => "\x53\x6f\146\164\x77\x61\162\145\x20\x63\x61\x75\x73\x65\x64\40\143\157\x6e\156\x65\x63\164\151\157\x6e\x20\141\x62\x6f\x72\164"); $errorMsgs[VERR_COMMON_NOBUFFER] = array("\x65\x72\162\157\x72\103\157\x64\145" => VERR_COMMON_NOBUFFER, "\145\162\x72\x6f\x72\115\x65\163\x73\141\147\145" => "\116\157\40\142\x75\146\x66\145\x72\40\163\160\141\143\x65\40\x61\166\x61\151\154\x61\142\154\145"); $errorMsgs[VERR_COMMON_NOTCONNECTION] = array("\x65\162\162\157\x72\103\x6f\x64\145" => VERR_COMMON_NOTCONNECTION, "\145\x72\162\x6f\162\115\x65\x73\163\141\147\145" => "\124\162\141\x6e\163\160\x6f\162\x74\40\x65\x6e\144\160\157\151\x6e\x74\x20\151\x73\40\x6e\157\164\x20\x63\x6f\x6e\x6e\145\143\x74\x65\x64"); $errorMsgs[VERR_COMMON_SHUTDOWN] = array("\x65\x72\162\157\x72\x43\x6f\144\x65" => VERR_COMMON_SHUTDOWN, "\145\162\x72\157\x72\115\145\163\163\x61\x67\145" => "\103\x61\x6e\x6e\157\164\x20\163\145\156\x64\x20\x61\146\x74\x65\162\x20\164\x72\141\x6e\x73\160\x6f\162\164\x20\145\x6e\144\x70\157\151\156\164\x20\163\x68\x75\x74\x64\x6f\x77\x6e"); $errorMsgs[VERR_COMMON_REFERENCE] = array("\x65\x72\162\157\x72\103\x6f\x64\145" => VERR_COMMON_REFERENCE, "\x65\x72\162\157\162\x4d\145\163\163\x61\147\x65" => "\x54\x6f\x6f\40\x6d\x61\156\x79\x20\162\x65\146\145\162\145\156\143\145\163\72\x20\x63\141\x6e\156\157\164\40\x73\160\x6c\x69\x63\145"); $errorMsgs[VERR_COMMON_TIMEOUT] = array("\145\162\x72\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_TIMEOUT, "\x65\x72\x72\157\162\115\x65\163\163\x61\147\x65" => "\x43\x6f\156\156\x65\143\164\151\x6f\x6e\40\164\x69\x6d\x65\144\x20\157\165\x74"); $errorMsgs[VERR_COMMON_CONNECTION_REFUSE] = array("\145\162\162\x6f\x72\103\157\x64\x65" => VERR_COMMON_CONNECTION_REFUSE, "\145\162\x72\157\162\x4d\x65\163\163\x61\147\x65" => "\x43\x6f\156\156\145\143\x74\x69\157\x6e\x20\162\x65\146\x75\x73\145\144"); $errorMsgs[VERR_COMMON_HOSTDOWN] = array("\x65\162\x72\x6f\x72\103\x6f\144\x65" => VERR_COMMON_HOSTDOWN, "\145\162\x72\x6f\x72\115\x65\163\163\141\x67\x65" => "\110\157\163\x74\40\x69\x73\x20\144\157\167\156"); $errorMsgs[VERR_COMMON_HOSTUNREACH] = array("\145\162\x72\157\162\103\157\144\145" => VERR_COMMON_HOSTUNREACH, "\x65\162\162\x6f\x72\115\x65\163\x73\x61\147\x65" => "\x4e\157\40\162\157\x75\x74\x65\x20\x74\157\x20\150\x6f\x73\164"); $errorMsgs[VERR_COMMON_ALREADY] = array("\145\162\x72\157\162\103\157\144\x65" => VERR_COMMON_ALREADY, "\145\162\162\157\162\115\x65\x73\163\141\x67\145" => "\x4f\160\145\x72\141\164\x69\x6f\156\40\141\x6c\162\145\141\x64\171\40\x69\156\40\160\162\157\x67\162\145\163\x73"); $errorMsgs[VERR_COMMON_INPROGRESS] = array("\145\x72\162\x6f\162\103\x6f\x64\x65" => VERR_COMMON_INPROGRESS, "\x65\x72\x72\157\162\x4d\x65\163\x73\x61\147\x65" => "\x4f\160\x65\x72\141\x74\x69\157\x6e\40\156\x6f\x77\40\x69\x6e\40\160\x72\157\x67\162\x65\x73\x73"); $errorMsgs[VERR_COMMON_STRUCTURE_CLEAN] = array("\145\x72\x72\157\x72\103\157\144\145" => VERR_COMMON_STRUCTURE_CLEAN, "\x65\x72\x72\157\162\x4d\145\x73\163\x61\147\145" => "\x53\x74\x72\165\x63\164\165\x72\x65\40\x6e\x65\x65\x64\x73\40\143\x6c\x65\141\156\151\x6e\147"); $errorMsgs[VERR_COMMON_NAMED] = array("\x65\162\x72\157\x72\103\x6f\x64\x65" => VERR_COMMON_NAMED, "\x65\162\162\x6f\x72\115\x65\163\163\141\147\145" => "\111\x73\x20\x61\x20\x6e\x61\155\x65\x64\40\164\171\160\145\x20\x66\151\154\145"); $errorMsgs[VERR_COMMON_LICENSE] = array("\x65\x72\x72\x6f\x72\103\157\x64\x65" => VERR_COMMON_LICENSE, "\145\162\162\157\x72\x4d\x65\x73\x73\x61\147\x65" => "\111\x6e\x76\141\154\151\x64\x20\x6c\151\143\x65\x6e\163\x65\56"); $errorMsgs[VERR_COMMON_OVERLAP] = array("\145\162\162\157\162\103\157\x64\x65" => VERR_COMMON_OVERLAP, "\x65\162\x72\157\162\x4d\145\163\163\141\147\145" => "\117\x76\145\x72\154\141\160\x20\104\x61\x74\x61"); $errorMsgs[VERR_COMMON_LOCKFAILED] = array("\145\162\162\x6f\162\103\157\144\145" => VERR_COMMON_LOCKFAILED, "\145\162\x72\157\x72\115\145\163\x73\x61\x67\145" => "\x54\x72\171\x6c\x6f\143\x6b\40\x66\x61\x69\154\145\144\x20\167\150\x69\x6c\x65\x20\x6f\x70\x65\156\x69\x6e\x67\x20\x64\145\x76\151\143\145"); $errorMsgs[VERR_COMMON_RANGE] = array("\145\x72\162\157\x72\x43\157\144\145" => VERR_COMMON_RANGE, "\x65\162\x72\157\162\x4d\145\163\163\141\147\145" => "\x4f\165\164\40\157\146\x20\x72\141\x6e\x67\145\40\126\141\154\165\145"); $errorMsgs[VERR_COMMON_TYPE_CONVERSION] = array("\145\162\x72\x6f\162\x43\x6f\144\145" => VERR_COMMON_TYPE_CONVERSION, "\x65\x72\162\157\162\x4d\x65\163\x73\141\147\x65" => "\x44\x61\164\141\x20\164\x79\160\145\40\143\x6f\x6e\x76\145\x72\163\151\157\156\x20\145\162\162\x6f\162"); $errorMsgs[VERR_COMMON_REJECTED] = array("\145\162\x72\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_REJECTED, "\145\162\x72\x6f\x72\115\x65\163\163\141\147\145" => "\x52\x65\152\x65\143\164\145\144"); $errorMsgs[VERR_COMMON_USER_CANCELED] = array("\x65\162\162\x6f\x72\103\157\x64\x65" => VERR_COMMON_USER_CANCELED, "\x65\162\162\157\x72\x4d\145\163\163\141\147\145" => "\x55\163\x65\x72\x20\x63\x61\x6e\x63\145\154\145\x64"); $errorMsgs[VERR_COMMON_SOCKET_SUCCESS] = array("\x65\x72\x72\x6f\x72\x43\x6f\144\145" => VERR_COMMON_SOCKET_SUCCESS, "\145\x72\162\x6f\162\x4d\145\x73\163\x61\x67\145" => "\123\x75\x63\143\145\x73\163"); $errorMsgs[VERR_COMMON_SOCKET_REFUSED] = array("\145\x72\x72\157\162\x43\157\144\x65" => VERR_COMMON_SOCKET_REFUSED, "\145\x72\162\x6f\162\115\145\x73\163\x61\x67\145" => "\x54\150\x65\40\x63\157\x6e\x6e\x65\143\x74\x69\157\156\40\167\141\163\40\x72\x65\146\165\x73\145\x64\40\142\171\x20\164\x68\145\40\x70\145\x65\x72\x2e"); $errorMsgs[VERR_COMMON_SOCKET_REMOTE_HOST_CLOSED] = array("\145\162\162\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_SOCKET_REMOTE_HOST_CLOSED, "\145\162\162\157\x72\115\145\x73\163\141\x67\145" => "\x54\x68\145\40\162\145\155\x6f\164\145\40\x68\x6f\163\x74\x20\143\154\157\163\145\144\x20\164\150\145\x20\x63\157\x6e\x6e\x65\x63\164\151\x6f\x6e\x2e"); $errorMsgs[VERR_COMMON_SOCKET_HOST_NOT_FOUND] = array("\145\x72\162\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_SOCKET_HOST_NOT_FOUND, "\x65\x72\x72\x6f\162\115\145\x73\x73\x61\147\145" => "\x54\x68\145\40\x68\157\163\164\x20\x61\x64\x64\162\x65\x73\163\40\x77\x61\x73\x20\156\x6f\x74\x20\146\x6f\x75\x6e\x64\x2e"); $errorMsgs[VERR_COMMON_SOCKET_ACCESS] = array("\x65\x72\x72\157\x72\103\157\x64\145" => VERR_COMMON_SOCKET_ACCESS, "\145\162\x72\157\162\x4d\145\x73\163\141\x67\145" => "\124\150\x65\x20\x73\157\x63\x6b\145\x74\x20\x6f\160\145\162\141\x74\151\x6f\156\40\x66\141\151\154\145\144\x20\142\x65\143\141\165\x73\145\x20\x74\x68\x65\40\x61\160\x70\154\x69\143\141\x74\x69\x6f\x6e\x20\x6c\x61\x63\153\x65\x64\x20\x74\150\145\x20\162\145\x71\x75\151\162\x65\144\40\160\x72\151\166\x69\154\145\147\145\x73\x2e"); $errorMsgs[VERR_COMMON_SOCKET_RESOURCE] = array("\x65\x72\x72\x6f\162\103\157\144\x65" => VERR_COMMON_SOCKET_RESOURCE, "\145\162\x72\x6f\x72\x4d\x65\x73\x73\141\147\x65" => "\x54\150\145\40\154\157\x63\141\154\40\163\x79\x73\x74\x65\155\x20\162\141\x6e\x20\x6f\x75\164\40\x6f\146\x20\162\x65\163\x6f\x75\x72\x63\x65\x73\x2e"); $errorMsgs[VERR_COMMON_SOCKET_TIMEOUT] = array("\x65\162\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_SOCKET_TIMEOUT, "\x65\162\162\x6f\x72\115\x65\163\x73\x61\x67\x65" => "\124\150\145\40\123\x6f\x63\x6b\x65\164\40\x6f\x70\145\x72\x61\164\x69\157\x6e\40\164\x69\155\145\x64\x20\157\x75\x74\x2e"); $errorMsgs[VERR_COMMON_SOCKET_DATAGRAM_TOO_LARGE] = array("\x65\162\x72\x6f\x72\x43\x6f\x64\x65" => VERR_COMMON_SOCKET_DATAGRAM_TOO_LARGE, "\x65\162\162\x6f\162\115\x65\163\x73\x61\147\x65" => "\124\x68\x65\40\144\141\x74\141\x67\162\x61\x6d\40\167\x61\163\x20\154\141\162\x67\x65\x72\40\x74\150\x61\x6e\40\164\150\x65\x20\x6f\160\x65\162\141\164\151\156\147\x20\x73\171\x73\x74\145\155\x27\163\40\x6c\151\x6d\x69\x74\x2e"); $errorMsgs[VERR_COMMON_SOCKET_NETWORK] = array("\x65\162\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_SOCKET_NETWORK, "\x65\x72\x72\x6f\162\x4d\x65\163\163\141\147\x65" => "\101\156\x20\145\x72\162\x6f\162\40\157\143\x63\165\x72\162\145\x64\x20\167\x69\164\150\x20\164\x68\145\x20\156\145\x74\x77\x6f\x72\x6b\x2e"); $errorMsgs[VERR_COMMON_SOCKET_ADDRESS_IN_USER] = array("\145\x72\x72\x6f\x72\x43\157\144\145" => VERR_COMMON_SOCKET_ADDRESS_IN_USER, "\145\162\x72\157\x72\115\x65\x73\x73\x61\147\x65" => "\124\x68\x65\x20\141\144\144\x72\145\x73\x73\40\163\160\x65\143\x69\146\151\145\x64\x20\x74\157\40\x62\151\156\144\x28\51\40\x69\163\40\141\x6c\x72\x65\x61\144\x79\40\151\156\40\x75\163\x65\x20\141\x6e\144\40\167\141\x73\x20\x73\x65\164\40\164\x6f\40\142\145\x20\x65\x78\143\x6c\x75\x73\151\166\x65\x2e"); $errorMsgs[VERR_COMMON_SOCKET_ADDRESS_NOT_AVAILABLE] = array("\x65\x72\x72\x6f\162\103\157\x64\145" => VERR_COMMON_SOCKET_ADDRESS_NOT_AVAILABLE, "\x65\162\x72\x6f\162\115\x65\x73\163\141\147\145" => "\124\150\145\x20\141\x64\144\162\x65\163\163\40\x73\160\x65\x63\151\146\151\x65\144\40\164\x6f\40\142\x69\x6e\144\50\x29\40\144\x6f\x65\163\x20\x6e\157\164\x20\x62\x65\x6c\x6f\156\x67\x20\x74\157\x20\164\x68\145\40\x68\157\x73\164\x2e"); $errorMsgs[VERR_COMMON_SOCKET_UNSUPPORTED_OPERATION] = array("\145\x72\162\x6f\x72\x43\157\144\145" => VERR_COMMON_SOCKET_UNSUPPORTED_OPERATION, "\145\162\x72\x6f\162\115\x65\x73\x73\x61\x67\145" => "\124\x68\x65\40\162\x65\161\165\145\x73\x74\145\x64\40\x73\x6f\143\x6b\x65\164\40\x6f\x70\145\x72\x61\x74\x69\157\x6e\x20\x69\163\40\156\157\164\40\163\x75\160\x70\157\162\x74\x65\144\x20\x62\x79\x20\164\x68\x65\40\x6c\157\x63\141\x6c\40\x6f\x70\145\162\x61\x74\x69\156\x67\x20\x73\x79\x73\164\145\155\x2e"); $errorMsgs[VERR_COMMON_SOCKET_PROXY_AUTHENTICATION_REQUIRED] = array("\x65\x72\x72\157\x72\103\157\x64\x65" => VERR_COMMON_SOCKET_PROXY_AUTHENTICATION_REQUIRED, "\145\x72\x72\157\x72\x4d\x65\163\x73\x61\147\145" => "\124\x68\x65\40\x73\x6f\143\x6b\x65\164\x20\151\x73\40\165\163\x69\156\x67\40\141\x20\x70\x72\x6f\x78\171\x2c\40\x61\x6e\144\40\164\150\145\40\x70\x72\x6f\x78\x79\x20\x72\145\x71\165\x69\162\145\163\40\x61\x75\x74\x68\x65\156\x74\x69\143\141\x74\151\157\156\56"); $errorMsgs[VERR_COMMON_SOCKET_SSL_HANDSHAKE_FAILED] = array("\145\162\x72\x6f\162\x43\x6f\144\x65" => VERR_COMMON_SOCKET_SSL_HANDSHAKE_FAILED, "\145\x72\162\x6f\162\x4d\x65\x73\x73\x61\147\x65" => "\x54\150\145\x20\x53\x53\x4c\x2f\124\x4c\x53\40\x68\x61\x6e\144\163\150\141\153\145\x20\x66\x61\151\x6c\x65\x64\54\x20\163\157\40\x74\x68\145\x20\x63\x6f\156\156\x65\143\x74\151\157\x6e\x20\x77\x61\163\40\143\154\157\163\x65\x64\56"); $errorMsgs[VERR_COMMON_SOCKET_UNFINISHED_OPERATION] = array("\145\x72\x72\x6f\x72\103\x6f\x64\145" => VERR_COMMON_SOCKET_UNFINISHED_OPERATION, "\x65\162\162\157\x72\115\145\x73\163\x61\x67\145" => "\124\150\145\40\x6c\141\163\x74\x20\x6f\160\145\162\141\164\x69\157\x6e\40\141\x74\x74\145\155\x70\x74\x65\144\x20\150\141\163\x20\x6e\157\x74\40\146\x69\x6e\x69\x73\x68\145\144\x20\x79\145\164\x2e"); $errorMsgs[VERR_COMMON_SOCKET_PROXY_CONNECTION_REFUSER] = array("\x65\x72\x72\157\x72\x43\x6f\144\145" => VERR_COMMON_SOCKET_PROXY_CONNECTION_REFUSER, "\145\162\x72\x6f\162\x4d\145\x73\x73\x61\147\x65" => "\103\x6f\165\x6c\x64\x20\x6e\157\164\x20\143\x6f\156\164\141\143\164\40\x74\x68\145\40\160\x72\157\170\x79\x20\x73\x65\162\166\145\x72\40\142\x65\143\x61\165\163\x65\x20\x74\x68\145\40\x63\x6f\x6e\x6e\x65\143\164\x69\157\x6e\40\x74\157\40\164\150\x61\164\x20\163\145\x72\x76\145\162\40\x77\141\163\40\x64\x65\x6e\x69\x65\144\56"); $errorMsgs[VERR_COMMON_SOCKET_PROXY_CONNECTION_CLOSED] = array("\145\x72\162\x6f\162\103\157\144\145" => VERR_COMMON_SOCKET_PROXY_CONNECTION_CLOSED, "\145\x72\x72\157\x72\x4d\145\163\163\141\147\x65" => "\x54\150\145\x20\143\x6f\x6e\x6e\145\143\164\x69\x6f\156\x20\164\157\x20\x74\x68\145\x20\x70\162\157\170\171\x20\x73\x65\162\x76\x65\x72\x20\x77\x61\x73\40\x63\x6c\x6f\163\x65\x64\40\x75\x6e\145\170\x70\145\143\164\145\144\154\x79\x2e"); $errorMsgs[VERR_COMMON_SOCKE_PROXY_CONNETION_TIMEOUT] = array("\x65\x72\x72\x6f\x72\103\x6f\x64\145" => VERR_COMMON_SOCKE_PROXY_CONNETION_TIMEOUT, "\145\162\x72\x6f\162\x4d\145\163\163\x61\x67\x65" => "\124\150\x65\40\x63\x6f\156\156\145\x63\x74\151\157\x6e\40\164\x6f\40\x74\150\x65\40\x70\162\x6f\170\x79\40\x73\145\162\166\x65\162\x20\164\x69\x6d\x65\144\x20\x6f\165\164\40\157\162\x20\x74\150\x65\40\160\162\157\170\171\40\x73\145\x72\166\145\x72\40\163\x74\157\160\x70\x65\144\40\162\x65\163\x70\x6f\x6e\x64\x69\x6e\x67\40\x69\156\40\x74\150\145\40\141\x75\164\150\145\x6e\164\x69\x63\141\164\151\157\x6e\40\x70\x68\x61\x73\x65\56"); $errorMsgs[VERR_COMMON_SOCKET_PROXY_NOT_FOUND] = array("\145\x72\162\157\x72\103\157\x64\x65" => VERR_COMMON_SOCKET_PROXY_NOT_FOUND, "\x65\x72\x72\157\x72\x4d\x65\163\x73\x61\147\x65" => "\x54\x68\145\40\x70\x72\157\x78\171\x20\141\144\x64\162\145\x73\163\40\x73\145\x74\x20\x77\x69\164\150\40\x73\x65\164\x50\162\157\170\171\x28\x29\40\x28\x6f\x72\x20\164\150\x65\40\x61\160\160\x6c\x69\143\x61\x74\x69\x6f\156\40\x70\162\x6f\x78\x79\51\40\167\x61\163\x20\156\x6f\x74\40\146\157\x75\156\144\56"); $errorMsgs[VERR_COMMON_SOCKET_PROXY_PROTOCOL] = array("\x65\162\162\157\x72\103\x6f\x64\x65" => VERR_COMMON_SOCKET_PROXY_PROTOCOL, "\145\162\x72\x6f\162\x4d\x65\x73\163\141\x67\145" => "\x54\x68\x65\x20\x63\x6f\x6e\156\145\143\164\151\157\x6e\40\156\145\x67\157\164\x69\x61\164\151\x6f\156\x20\167\151\164\x68\40\164\150\145\x20\x70\x72\157\x78\171\x20\x73\x65\x72\166\x65\162\40\x62\145\x63\x61\x75\x73\145\x20\164\x68\145\40\162\x65\163\x70\x6f\x6e\x73\x65\40\x66\162\x6f\155\40\164\x68\145\40\x70\162\x6f\170\171\40\x73\x65\162\166\x65\x72\40\143\157\165\154\x64\40\156\157\164\40\x62\x65\x20\x75\156\144\145\x72\x73\164\x6f\x6f\144\x2e"); $errorMsgs[VERR_COMMON_SOCKET_UNKNOWN] = array("\145\x72\x72\x6f\162\103\157\144\x65" => VERR_COMMON_SOCKET_UNKNOWN, "\x65\162\x72\157\x72\115\145\163\163\x61\147\145" => "\x41\116\40\165\156\151\x64\145\x6e\164\151\146\x69\145\144\x20\145\162\162\157\x72\40\157\x63\x63\165\x72\162\x65\x64\x2e"); $errorMsgs[VERR_COMMON_SAME_ID] = array("\x65\x72\x72\157\x72\x43\x6f\x64\x65" => VERR_COMMON_SAME_ID, "\145\x72\x72\x6f\162\x4d\x65\x73\x73\x61\147\145" => "\124\150\x65\x20\x73\141\x6d\145\x20\111\104\x20\141\154\x72\x65\141\x64\x79\40\x65\x78\151\163\x74\163"); $errorMsgs[VERR_E2_SUCCESS] = array("\x65\162\x72\x6f\x72\103\x6f\x64\x65" => VERR_E2_SUCCESS, "\x65\x72\x72\157\162\115\x65\x73\163\141\x67\x65" => "\x53\x75\143\143\x65\163\163"); $errorMsgs[VERR_E2_GETSCREEN] = array("\x65\x72\162\x6f\162\103\x6f\x64\x65" => VERR_E2_GETSCREEN, "\x65\x72\x72\x6f\x72\x4d\145\x73\163\141\147\x65" => "\x41\x6e\40\145\x72\x72\x6f\x72\x20\x6f\x63\143\x75\162\162\145\144\40\147\145\164\164\151\x6e\147\x20\x74\150\145\40\x63\x75\x72\x72\145\x6e\164\40\x73\143\162\x65\145\x6e\40\156\x61\155\145\x2e\x20\x4e\x6f\40\x63\x75\162\x72\145\156\164\x20\163\x63\162\x65\145\x6e\x2e"); $errorMsgs[VERR_E2_LOADVALUE] = array("\x65\x72\x72\x6f\x72\x43\157\x64\145" => VERR_E2_LOADVALUE, "\145\x72\x72\157\x72\x4d\145\163\x73\141\x67\145" => "\x43\157\x75\154\x64\x20\x6e\157\x74\x20\x6c\x6f\141\x64\x20\x76\141\x6c\x75\x65\x2e"); $errorMsgs[VERR_E2_SAVEVALUE] = array("\x65\162\x72\x6f\x72\x43\x6f\x64\x65" => VERR_E2_SAVEVALUE, "\x65\162\x72\x6f\x72\x4d\x65\163\163\141\147\x65" => "\103\x6f\165\x6c\x64\40\156\157\164\40\163\141\x76\145\40\x76\141\154\x75\x65\x2e"); $errorMsgs[VERR_E2_WINDOW_HANDLE] = array("\145\x72\x72\157\x72\x43\x6f\x64\x65" => VERR_E2_WINDOW_HANDLE, "\x65\x72\162\157\x72\115\x65\x73\163\141\x67\x65" => "\x45\x72\162\157\162\54\x20\143\x6f\x75\154\144\40\x6e\157\x74\40\x67\145\x74\40\x74\150\x65\40\x61\x70\x70\154\x69\143\x61\164\151\157\156\x27\x73\x20\x77\151\156\x64\x6f\x77\x20\150\141\156\144\154\145\56"); $errorMsgs[VERR_E2_DISPLAY] = array("\x65\162\x72\157\x72\x43\157\x64\145" => VERR_E2_DISPLAY, "\145\x72\162\157\162\x4d\145\x73\163\x61\x67\x65" => "\x54\x68\x65\162\x65\40\151\x73\40\x6e\157\40\x73\x63\x72\x65\x65\x6e\x20\x63\165\x72\x72\x65\156\164\x6c\x79\40\144\x69\x73\x70\154\x61\x79\145\x64\56"); $errorMsgs[VERR_E2_TABLEDATA] = array("\x65\162\162\157\162\103\157\144\x65" => VERR_E2_TABLEDATA, "\145\x72\162\157\x72\115\145\163\x73\141\x67\x65" => "\x49\x6e\166\141\154\x69\x64\x20\x74\x61\x62\154\x65\x20\x64\x61\164\x61\x2e"); $errorMsgs[VERR_E2_EXIT] = array("\x65\x72\162\x6f\162\x43\157\x64\145" => VERR_E2_EXIT, "\x65\x72\x72\157\x72\x4d\145\x73\x73\141\x67\x65" => "\x54\150\x65\40\x61\160\x70\x6c\x69\143\141\164\151\x6f\x6e\40\x74\x65\162\155\151\x6e\141\164\x65\144"); $errorMsgs[VERR_E2_FUNCTION_INTER] = array("\x65\162\162\x6f\x72\103\157\144\145" => VERR_E2_FUNCTION_INTER, "\145\162\x72\157\162\115\145\x73\163\x61\x67\x65" => "\101\156\40\x69\156\164\x65\162\x6e\141\154\40\145\x72\162\x6f\x72\x20\157\x63\x63\165\162\162\x65\144\x20\x72\x65\x73\157\x6c\166\151\x6e\x67\x20\x74\x68\145\x20\x73\x70\x65\x63\151\146\151\x65\144\40\x66\165\x6e\x63\x74\151\157\156\x2e"); $errorMsgs[VERR_E2_FUNCTION_RUNTIME] = array("\x65\162\162\157\162\x43\x6f\x64\145" => VERR_E2_FUNCTION_RUNTIME, "\x65\162\162\157\x72\115\145\x73\x73\x61\147\x65" => "\x41\40\x72\165\156\x74\151\155\145\40\x65\x72\162\157\x72\40\157\143\x63\165\x72\162\145\144\x20\167\x68\x69\x6c\x65\x20\x63\x61\154\x6c\151\156\x67\x20\164\150\145\40\146\165\x6e\143\164\151\157\x6e\x2e"); $errorMsgs[VERR_E2_FUNCTION_ALLOC] = array("\x65\x72\x72\157\x72\x43\157\144\145" => VERR_E2_FUNCTION_ALLOC, "\145\x72\x72\157\162\115\x65\163\x73\141\x67\145" => "\x41\x20\155\x65\155\x6f\162\x79\40\x61\x6c\154\157\x63\141\164\151\x6f\156\40\145\162\x72\x6f\162\40\157\143\143\x75\x72\162\x65\144\40\167\150\151\154\x65\x20\x63\x61\x6c\154\151\156\147\40\x74\x68\x65\40\146\165\x6e\143\164\151\x6f\156\x2e"); $errorMsgs[VERR_E2_PRINT_PAPER] = array("\x65\162\162\x6f\x72\x43\157\x64\x65" => VERR_E2_PRINT_PAPER, "\145\162\x72\x6f\x72\x4d\145\163\163\141\x67\145" => "\x54\x68\x65\x20\x70\162\x69\x6e\x74\145\x72\x20\151\x73\x20\157\165\x74\40\x6f\146\x20\x70\141\x70\x65\162\56"); $errorMsgs[VERR_E2_PRINT_FULL] = array("\x65\162\x72\x6f\162\103\x6f\x64\x65" => VERR_E2_PRINT_FULL, "\145\162\x72\157\162\x4d\x65\x73\163\141\147\145" => "\x54\150\145\40\x70\162\151\156\164\x65\162\40\x71\165\x65\165\x65\40\x69\163\40\x66\165\154\154\56"); $errorMsgs[VERR_E2_PRINT_DELETE] = array("\x65\x72\x72\157\162\103\x6f\144\x65" => VERR_E2_PRINT_DELETE, "\145\162\x72\x6f\x72\x4d\145\x73\x73\141\x67\145" => "\x59\x6f\x75\162\40\146\x69\x6c\145\40\x77\141\151\164\x69\156\x67\40\164\157\40\x62\145\40\x70\162\x69\x6e\164\x65\x64\40\x77\141\163\40\x64\x65\154\145\164\x65\x64\56"); $errorMsgs[VERR_E2_PRINT_PAUSE] = array("\145\x72\162\157\162\103\157\x64\145" => VERR_E2_PRINT_PAUSE, "\x65\162\162\157\162\115\145\x73\163\141\x67\145" => "\x54\150\145\40\163\160\x65\143\151\x66\151\145\144\x20\x70\x72\151\x6e\x74\x65\x72\40\x6f\x72\40\x64\151\x73\153\x20\x64\145\x76\x69\x63\x65\x20\x68\x61\163\x20\142\x65\145\x6e\40\x70\x61\165\x73\x65\x64\56"); $errorMsgs[VERR_E2_O2] = array("\145\162\x72\157\x72\103\157\x64\145" => VERR_E2_O2, "\x65\162\162\157\162\x4d\x65\163\x73\141\147\x65" => "\x49\x6e\x76\141\x6c\151\x64\x20\117\162\x74\150\157\x64\157\156\164\151\x63\40\101\156\141\x6c\171\163\x69\x73\x20\120\162\x6f\147\162\141\155\x2e"); $errorMsgs[VERR_E2_ID] = array("\x65\x72\162\x6f\x72\103\157\144\x65" => VERR_E2_ID, "\145\x72\162\157\162\x4d\x65\x73\163\x61\147\x65" => "\111\156\x76\x61\x6c\x69\x64\x20\125\163\145\162\40\x49\x44"); $errorMsgs[VERR_E2_PASSWORD] = array("\145\162\x72\x6f\162\103\x6f\x64\145" => VERR_E2_PASSWORD, "\x65\162\x72\157\162\115\x65\163\163\x61\147\145" => "\111\x6e\x76\141\x6c\x69\144\x20\x50\141\163\163\x77\157\x72\x64"); $errorMsgs[VERR_E2_OLD_PASSWORD_NOT_ALLOWED] = array("\x65\x72\162\157\162\x43\x6f\144\145" => VERR_E2_OLD_PASSWORD_NOT_ALLOWED, "\x65\x72\162\157\162\x4d\145\163\163\x61\147\145" => "\x4f\154\144\40\160\141\x73\163\x77\157\162\x64\40\151\163\x20\156\157\x74\40\x61\x6c\x6c\157\x77\x65\144\56"); $errorMsgs[VERR_E2_PATIENT_NO] = array("\x65\162\162\157\162\103\157\144\145" => VERR_E2_PATIENT_NO, "\x65\162\x72\157\162\x4d\145\x73\163\141\x67\145" => "\x54\x68\145\x72\145\x20\151\163\x20\x6e\157\40\160\141\164\x69\145\156\x74\40\144\141\x74\x61"); $errorMsgs[VERR_E2_PATIENT_SET] = array("\145\162\x72\157\162\x43\x6f\x64\x65" => VERR_E2_PATIENT_SET, "\145\x72\162\157\x72\115\x65\x73\x73\x61\x67\145" => "\103\x6f\165\154\x64\40\156\157\164\40\163\145\164\x20\164\x68\145\x20\x73\160\x65\143\151\146\x69\x65\144\40\160\x61\164\x69\145\156\x74\x20\144\x61\x74\x61"); $errorMsgs[VERR_E2_PATIENT_DELETE] = array("\145\162\x72\157\162\103\157\x64\x65" => VERR_E2_PATIENT_DELETE, "\x65\x72\162\157\x72\115\x65\163\163\x61\x67\145" => "\103\157\x75\x6c\144\40\x6e\x6f\164\x20\144\145\154\x65\164\145\40\x74\x68\x65\x20\163\x70\x65\143\x69\x66\151\145\x64\40\160\141\164\151\x65\x6e\164\x20\144\x61\x74\x61"); $errorMsgs[VERR_E2_PATIENT_INVALID] = array("\x65\162\x72\157\x72\103\157\144\x65" => VERR_E2_PATIENT_INVALID, "\145\162\162\x6f\162\x4d\x65\x73\x73\x61\147\145" => "\111\x6e\x76\141\x6c\151\144\x20\160\141\164\151\x65\156\x74\40\x64\x61\164\141"); $errorMsgs[VERR_E2_PATIENT_SUPPORT] = array("\x65\162\162\x6f\162\103\x6f\x64\145" => VERR_E2_PATIENT_SUPPORT, "\x65\162\162\157\162\115\x65\x73\163\141\x67\x65" => "\x44\141\164\141\x20\x6f\146\40\164\x68\151\163\x20\164\x79\160\x65\40\x69\x73\40\x6e\x6f\x74\40\163\x75\160\160\x6f\162\164\145\x64"); $errorMsgs[VERR_E2_PATIENT_OVERLAPP] = array("\x65\162\x72\157\x72\103\x6f\144\145" => VERR_E2_PATIENT_OVERLAPP, "\x65\162\162\x6f\x72\x4d\145\x73\163\x61\147\x65" => "\124\x68\145\x20\143\150\x61\x72\x74\x20\156\x75\155\x62\x65\162\x20\x69\x73\40\157\166\x65\162\154\x61\160\160\x65\x64"); $errorMsgs[VERR_E2_IMAGE_NO] = array("\x65\x72\x72\x6f\162\x43\x6f\144\x65" => VERR_E2_IMAGE_NO, "\x65\162\x72\x6f\162\x4d\145\x73\x73\141\x67\x65" => "\124\x68\145\x72\x65\40\x69\163\40\156\157\40\151\x6d\x61\x67\145\40\x64\141\164\x61"); $errorMsgs[VERR_E2_IMAGE_SET] = array("\145\x72\162\157\162\x43\157\x64\x65" => VERR_E2_IMAGE_SET, "\x65\x72\162\x6f\162\115\145\x73\x73\141\147\145" => "\103\x6f\165\154\144\x20\156\157\164\x20\x73\145\164\x20\x74\x68\x65\x20\163\x70\145\143\x69\146\x69\x65\144\x20\151\155\x61\147\145\x20\144\141\x74\141"); $errorMsgs[VERR_E2_IMAGE_DELETE] = array("\145\162\x72\157\162\x43\157\144\x65" => VERR_E2_IMAGE_DELETE, "\145\x72\x72\x6f\x72\115\x65\x73\x73\141\x67\145" => "\103\157\165\x6c\144\x20\156\x6f\x74\x20\x64\x65\154\x65\x74\145\40\x74\x68\145\40\x73\x70\145\x63\x69\x66\151\145\144\x20\x49\155\141\147\x65\40\144\141\164\141"); $errorMsgs[VERR_E2_IMAGE_INVAILD] = array("\x65\x72\x72\x6f\162\x43\157\x64\x65" => VERR_E2_IMAGE_INVAILD, "\145\x72\162\x6f\x72\x4d\x65\163\x73\141\147\x65" => "\111\x6e\x76\141\x6c\x69\x64\x20\x49\155\141\147\145\x20\144\x61\x74\x61"); $errorMsgs[VERR_E2_IMAGE_SUPPORT] = array("\145\x72\162\157\x72\103\157\144\145" => VERR_E2_IMAGE_SUPPORT, "\145\162\x72\157\162\115\145\163\x73\x61\x67\x65" => "\111\x6d\141\147\x65\x20\157\146\40\164\150\151\x73\40\x74\x79\x70\x65\x20\x69\x73\x20\156\x6f\x74\40\163\x75\160\x70\157\162\164\145\x64"); $errorMsgs[VERR_E2_IMAGE_BUFFER] = array("\145\162\162\x6f\x72\103\x6f\144\x65" => VERR_E2_IMAGE_BUFFER, "\145\x72\162\x6f\x72\115\x65\163\163\x61\x67\145" => "\101\40\x62\165\x66\146\x65\162\40\151\163\x20\x74\157\40\163\155\x61\154\x6c\x20\164\x6f\40\x68\x6f\154\144\x20\141\x6c\154\40\157\x66\40\x74\x68\145\40\x64\x61\x74\x61"); $errorMsgs[VERR_E2_IMAGE_2BIG] = array("\145\162\162\157\x72\103\157\x64\145" => VERR_E2_IMAGE_2BIG, "\145\162\x72\157\x72\115\145\163\x73\141\x67\x65" => "\111\155\x61\x67\145\40\x66\x69\x6c\x65\40\163\x69\172\145\40\x74\157\x6f\40\x62\151\x67\56"); $errorMsgs[VERR_E2_IMAGE_TAG] = array("\145\162\162\157\x72\x43\x6f\144\x65" => VERR_E2_IMAGE_TAG, "\x65\x72\x72\157\x72\x4d\145\x73\163\x61\147\145" => "\x54\x68\145\x72\145\x20\x69\x73\40\x6e\157\x74\40\111\x6d\x61\147\145\x20\x54\x61\147\x20\x66\x69\x6c\x65"); $errorMsgs[VERR_E2_IMAGE_THUMNAIL] = array("\x65\x72\162\x6f\x72\103\157\144\145" => VERR_E2_IMAGE_THUMNAIL, "\145\162\162\157\x72\115\x65\163\163\141\x67\x65" => "\124\x68\145\162\x65\40\151\x73\40\156\x6f\164\40\111\155\x61\x67\145\x20\124\x68\165\x6d\142\x6e\x61\x69\x6c\x20\x66\x69\x6c\145"); $errorMsgs[VERR_E2_IMAGE_IN_GROUP] = array("\145\x72\162\157\x72\x43\157\144\x65" => VERR_E2_IMAGE_IN_GROUP, "\145\162\162\157\x72\115\145\x73\x73\141\147\145" => "\x54\x68\x65\x20\x69\x6d\141\147\x65\x20\151\163\x20\151\x6e\40\x61\40\147\x72\x6f\165\x70\56"); $errorMsgs[VERR_E2_VIEW_LINE] = array("\x65\x72\x72\x6f\162\x43\157\x64\x65" => VERR_E2_VIEW_LINE, "\x65\x72\162\x6f\162\x4d\x65\163\163\141\147\x65" => "\x43\157\165\x6c\144\40\156\x6f\164\40\x64\x72\x61\167\x20\114\x69\x6e\145\56"); $errorMsgs[VERR_E2_VIEW_FIGURE] = array("\145\x72\162\157\162\103\157\x64\145" => VERR_E2_VIEW_FIGURE, "\145\162\162\157\x72\x4d\x65\x73\163\x61\x67\x65" => "\103\x6f\165\154\x64\x20\156\x6f\x74\x20\x64\x72\x61\x77\40\x66\151\x67\x75\x72\145\56"); $errorMsgs[VERR_E2_VIEW_TEXT] = array("\x65\162\x72\x6f\x72\x43\157\144\145" => VERR_E2_VIEW_TEXT, "\145\162\162\157\162\115\x65\163\x73\141\147\x65" => "\x43\157\165\x6c\144\x20\156\157\164\x20\x64\162\141\167\40\164\x65\x78\x74\56"); $errorMsgs[VERR_E2_VIEW_MEASURE] = array("\x65\x72\162\x6f\x72\x43\157\144\145" => VERR_E2_VIEW_MEASURE, "\x65\x72\x72\x6f\x72\115\x65\163\x73\x61\147\x65" => "\x43\x6f\165\154\144\40\x6e\x6f\x74\x20\166\x69\x65\x77\40\122\x75\x6c\x65\x72\x20\x6f\x72\x20\x50\x72\x6f\164\162\x61\x63\164\157\x72\56"); $errorMsgs[VERR_E2_VIEW_INVERT] = array("\x65\162\162\x6f\162\x43\157\x64\x65" => VERR_E2_VIEW_INVERT, "\x65\x72\x72\157\x72\x4d\145\x73\x73\x61\x67\145" => "\103\157\x75\x6c\x64\x20\x6e\x6f\164\40\151\x6e\166\x65\162\164\x20\166\x69\x65\x77\56"); $errorMsgs[VERR_E2_VIEW_BRIGHTNESS] = array("\x65\x72\x72\157\162\103\x6f\x64\145" => VERR_E2_VIEW_BRIGHTNESS, "\145\162\162\x6f\162\x4d\145\163\x73\141\147\x65" => "\103\x6f\165\x6c\144\40\x6e\x6f\x74\40\142\x72\151\147\150\x74\x6e\145\163\x73\x20\x76\x69\x65\167\x2e"); $errorMsgs[VERR_E2_VIEW_CONTRAST] = array("\x65\162\x72\157\x72\103\157\x64\145" => VERR_E2_VIEW_CONTRAST, "\x65\162\162\157\162\115\x65\163\x73\141\x67\x65" => "\103\157\x75\x6c\x64\40\x6e\x6f\x74\x20\143\x6f\x6e\x74\x72\x61\x73\164\x20\x76\151\x65\167\x2e"); $errorMsgs[VERR_E2_VIEW_GAMMA] = array("\145\162\162\x6f\x72\103\157\144\x65" => VERR_E2_VIEW_GAMMA, "\x65\162\162\x6f\162\115\x65\163\163\x61\147\145" => "\x43\x6f\x75\x6c\x64\40\156\x6f\x74\x20\x63\157\x6e\x74\x72\x6f\x6c\x20\x76\x69\145\167\x27\163\40\147\141\x6d\x6d\x61\x2e"); $errorMsgs[VERR_E2_VIEW_FILM] = array("\x65\162\162\157\162\103\x6f\x64\145" => VERR_E2_VIEW_FILM, "\x65\162\x72\157\162\115\x65\x73\163\141\147\145" => "\x43\157\165\154\x64\x20\x6e\157\x74\x20\x66\151\154\x6d\x20\x65\x66\x66\x65\143\164\40\x76\151\145\x77\56"); $errorMsgs[VERR_E2_VIEW_EXPAND] = array("\x65\162\x72\x6f\162\x43\x6f\x64\x65" => VERR_E2_VIEW_EXPAND, "\145\x72\x72\157\162\115\145\x73\x73\141\147\x65" => "\x43\x6f\165\154\x64\40\156\x6f\164\40\x65\170\160\141\156\x64\57\x72\145\x64\x75\143\x65\40\x76\151\x65\167\x2e"); $errorMsgs[VERR_E2_VIEW_DRAG] = array("\x65\x72\x72\x6f\162\103\x6f\x64\145" => VERR_E2_VIEW_DRAG, "\x65\162\x72\157\162\x4d\145\163\163\x61\147\145" => "\x43\x6f\x75\x6c\x64\40\156\x6f\164\40\144\162\x61\147\40\166\x69\x65\x77\56"); $errorMsgs[VERR_E2_VIEW_MAGNIFY] = array("\145\x72\162\x6f\162\x43\x6f\144\x65" => VERR_E2_VIEW_MAGNIFY, "\145\x72\x72\157\x72\x4d\x65\x73\163\x61\x67\145" => "\x43\157\165\154\144\x20\x6e\x6f\x74\x20\144\162\x61\167\x20\x6d\141\x67\156\x69\146\x79\x2e"); $errorMsgs[VERR_E2_VIEW_PROFILE] = array("\145\162\162\x6f\162\103\x6f\144\145" => VERR_E2_VIEW_PROFILE, "\145\162\x72\x6f\162\115\x65\163\163\x61\147\145" => "\103\157\165\154\144\40\156\157\164\x20\x76\x69\145\x77\x20\160\162\x6f\x66\x69\x6c\145\56"); $errorMsgs[VERR_E2_VIEW_CAPTURE] = array("\x65\x72\162\157\x72\103\157\144\145" => VERR_E2_VIEW_CAPTURE, "\145\x72\x72\x6f\162\115\145\163\x73\141\147\145" => "\x43\x6f\165\154\x64\40\x6e\157\x74\x20\x63\x61\x70\x74\165\162\x65\56"); $errorMsgs[VERR_E2_VIEW_IMPLANT] = array("\145\162\x72\157\x72\x43\x6f\x64\145" => VERR_E2_VIEW_IMPLANT, "\145\162\x72\x6f\x72\x4d\145\163\163\x61\x67\x65" => "\x54\x68\145\162\x65\x20\151\163\x20\x6e\157\x74\40\x74\x68\145\40\163\x70\145\x63\x69\x66\x69\145\x64\x20\151\155\x70\154\141\x6e\164\x20\144\141\164\141"); $errorMsgs[VERR_E2_VIEW_CROWN] = array("\x65\162\162\157\x72\x43\x6f\x64\x65" => VERR_E2_VIEW_CROWN, "\x65\162\162\x6f\162\115\145\x73\163\x61\147\145" => "\x54\x68\145\x72\x65\40\151\x73\40\156\157\164\x20\x74\150\x65\40\163\160\x65\143\x69\146\x69\x65\x64\40\x63\x72\157\167\x6e\40\144\x61\164\x61"); $errorMsgs[VERR_E2_VIEW_WHITTENING] = array("\x65\162\x72\157\162\103\157\x64\145" => VERR_E2_VIEW_WHITTENING, "\145\x72\162\157\x72\115\145\x73\x73\x61\x67\145" => "\x43\157\x75\x6c\144\40\x6e\157\x74\x20\x77\150\x69\164\x65\x6e\x69\156\147\x2e"); $errorMsgs[VERR_E2_VIEW_CANAL] = array("\145\x72\162\157\x72\103\x6f\x64\145" => VERR_E2_VIEW_CANAL, "\145\162\162\157\162\x4d\x65\x73\x73\141\x67\x65" => "\103\157\165\x6c\144\40\156\x6f\164\x20\144\x72\141\167\x20\x63\141\156\141\x6c\x2e"); $errorMsgs[VERR_E2_VIEW_ROTATE] = array("\x65\162\162\x6f\x72\103\157\x64\145" => VERR_E2_VIEW_ROTATE, "\x65\x72\x72\157\162\115\145\x73\x73\141\147\x65" => "\103\157\x75\154\144\x20\x6e\x6f\x74\40\162\157\x74\141\164\145\x20\166\151\145\167"); $errorMsgs[VERR_E2_VIEW_DELETE] = array("\145\162\x72\157\162\103\x6f\144\x65" => VERR_E2_VIEW_DELETE, "\145\x72\x72\157\162\115\145\163\x73\x61\147\145" => "\103\x6f\165\154\144\x20\156\157\x74\40\144\x65\x6c\x65\164\x65\40\144\x72\141\x77\x6e\40\x74\x68\x69\x6e\147\163"); $errorMsgs[VERR_E2_VIEW_LAYOUT_SET] = array("\x65\x72\162\x6f\x72\x43\157\x64\145" => VERR_E2_VIEW_LAYOUT_SET, "\x65\162\162\x6f\x72\115\x65\x73\163\141\147\145" => "\x43\x6f\165\x6c\x64\x20\156\157\164\x20\x73\145\x74\40\x6c\x61\x79\x6f\x75\x74\56"); $errorMsgs[VERR_E2_VIEW_LAYOUT_LOAD] = array("\145\162\162\157\x72\103\x6f\144\x65" => VERR_E2_VIEW_LAYOUT_LOAD, "\x65\162\x72\x6f\162\x4d\145\x73\x73\141\147\145" => "\x43\x6f\165\x6c\144\40\156\x6f\x74\x20\x6c\x6f\x61\144\x20\x74\150\145\40\163\160\145\143\151\x66\151\145\x64\x20\x6d\x6f\144\141\x6c\151\164\x79\x27\163\40\154\x61\x79\x6f\165\x74\x2e"); $errorMsgs[VERR_E2_ACQ_NOMODALITY] = array("\x65\x72\x72\x6f\x72\x43\157\144\x65" => VERR_E2_ACQ_NOMODALITY, "\145\162\162\157\162\x4d\x65\x73\x73\x61\147\x65" => "\x53\x65\154\145\x63\x74\145\144\x20\115\x6f\144\141\x6c\151\x74\171\x20\x6e\x6f\x74\x20\146\157\165\x6e\x64\56"); $errorMsgs[VERR_E2_ACQ_CONSOLESW] = array("\145\x72\162\x6f\x72\103\157\x64\145" => VERR_E2_ACQ_CONSOLESW, "\x65\x72\162\157\x72\x4d\x65\163\x73\141\147\145" => "\x49\x6e\x76\x61\154\151\x64\x20\103\141\x70\x74\165\x72\145\40\123\x57\40\x50\141\x74\x68"); $errorMsgs[VERR_E2_ACQ_LOAD] = array("\x65\x72\162\157\x72\x43\x6f\x64\145" => VERR_E2_ACQ_LOAD, "\x65\162\162\x6f\162\x4d\x65\x73\163\141\147\145" => "\103\157\x75\x6c\x64\x20\x6e\x6f\164\x20\x6c\157\x61\x64\x20\x41\x63\x71\165\x69\x73\x69\x74\151\157\156\x20\111\155\141\x67\x65"); $errorMsgs[VERR_E2_IMG_SET] = array("\x65\162\162\157\x72\103\157\144\x65" => VERR_E2_IMG_SET, "\x65\162\162\x6f\162\x4d\145\x73\x73\141\147\x65" => "\143\157\x75\154\x64\x20\x6e\x6f\x74\x20\x73\x65\x74\x20\x74\x68\145\40\163\x70\145\x63\x69\x66\x69\145\144\40\115\x6f\144\141\154\151\x74\171\40\144\x61\x74\x61"); $errorMsgs[VERR_E2_IMG_DELETE] = array("\x65\162\x72\x6f\x72\x43\x6f\144\145" => VERR_E2_IMG_DELETE, "\x65\162\162\157\162\x4d\x65\163\x73\141\x67\x65" => "\143\x6f\165\x6c\144\x20\x6e\157\x74\40\x64\x65\154\x65\164\145\40\164\x68\x65\40\x73\x70\x65\143\x69\146\x69\145\x64\40\x4d\157\144\x61\154\x69\164\171\40\x64\141\164\141"); $errorMsgs[VERR_E2_ACQ_INVALID] = array("\145\162\x72\157\x72\103\157\x64\x65" => VERR_E2_ACQ_INVALID, "\145\x72\x72\157\x72\115\145\163\163\x61\147\145" => "\111\156\x76\141\x6c\x69\x64\40\115\x6f\144\141\154\151\x74\171\40\x54\171\160\x65"); $errorMsgs[VERR_E2_ACQ_SUPPORT] = array("\145\162\162\x6f\162\103\157\144\145" => VERR_E2_ACQ_SUPPORT, "\145\x72\x72\157\162\x4d\145\x73\163\141\147\x65" => "\124\x68\145\x20\115\157\x64\x61\154\x69\x74\x79\x20\x69\x73\40\156\157\164\40\x73\x75\x70\x70\157\x72\x74\x65\144"); $errorMsgs[VERR_E2_ACQ_LIB] = array("\145\x72\162\x6f\162\103\x6f\x64\145" => VERR_E2_ACQ_LIB, "\x65\x72\162\157\162\115\x65\163\x73\x61\x67\x65" => "\126\x69\144\x65\x6f\x20\x6f\162\40\111\155\141\x67\145\x20\x4c\111\x42\40\146\141\151\154\x65\x64"); $errorMsgs[VERR_E2_ACQ_ORDER] = array("\145\x72\x72\157\x72\103\157\144\x65" => VERR_E2_ACQ_ORDER, "\145\162\x72\157\162\115\x65\163\x73\x61\x67\x65" => "\x43\x6f\x75\154\144\40\156\x6f\x74\40\x63\x68\141\156\x67\x65\x20\141\143\161\x75\x69\x73\x69\164\x69\157\156\x27\163\40\157\162\x64\x65\x72"); $errorMsgs[VERR_E2_ACQ_STILL] = array("\x65\162\162\157\x72\103\x6f\x64\x65" => VERR_E2_ACQ_STILL, "\145\162\x72\x6f\162\115\145\163\163\x61\147\145" => "\x43\x6f\x75\154\144\40\156\x6f\164\40\x73\x74\x69\x6c\154\x20\x49\x4f\40\143\x61\155\145\x72\141\x20\x76\x69\x65\x77\x2e"); $errorMsgs[VERR_E2_REP_SAVE] = array("\x65\x72\162\157\x72\x43\x6f\144\x65" => VERR_E2_REP_SAVE, "\145\x72\162\x6f\x72\115\145\163\x73\x61\x67\x65" => "\103\157\165\154\144\40\156\x6f\164\40\x73\141\x76\x65\x20\164\150\x65\40\x72\145\160\157\162\164"); $errorMsgs[VERR_E2_REP_OPEN] = array("\145\162\162\157\162\x43\x6f\144\145" => VERR_E2_REP_OPEN, "\145\x72\x72\x6f\162\x4d\x65\163\x73\x61\x67\145" => "\x43\x6f\165\154\x64\40\156\157\x74\40\154\157\x61\144\40\x74\150\145\40\163\x70\x65\143\151\x66\x69\145\x64\40\x72\x65\x70\157\162\164"); $errorMsgs[VERR_E2_REP_IMAGE_PROOCESSING] = array("\x65\162\162\x6f\162\103\x6f\x64\145" => VERR_E2_REP_IMAGE_PROOCESSING, "\145\162\162\x6f\x72\x4d\x65\x73\x73\x61\147\x65" => "\103\157\165\x6c\x64\40\x6e\157\x74\x20\x69\155\141\x67\145\x20\x70\x72\x6f\143\x65\163\x73\151\156\x67\40\164\x68\145\x20\162\x65\x70\x6f\x72\x74"); $errorMsgs[VERR_E2_SET_CONFIG] = array("\x65\x72\162\x6f\x72\x43\157\x64\x65" => VERR_E2_SET_CONFIG, "\145\x72\162\157\x72\115\145\x73\x73\141\147\x65" => "\x54\x68\x65\40\103\157\156\x66\x69\x67\x20\146\x69\x6c\x65\40\143\x6f\156\x74\x61\x69\x6e\x73\40\151\156\x76\141\x6c\x69\x64\x20\x64\141\164\141\x2e"); $errorMsgs[VERR_E2_SET_PATH] = array("\x65\x72\162\157\x72\x43\157\144\x65" => VERR_E2_SET_PATH, "\x65\x72\162\x6f\162\115\x65\x73\163\141\x67\x65" => "\x49\156\166\x61\x6c\151\x64\40\160\162\x6f\147\162\141\155\x20\160\141\x74\x68\56"); $errorMsgs[VERR_E2_GAL_SAME_NAME] = array("\x65\x72\162\x6f\x72\103\157\x64\x65" => VERR_E2_GAL_SAME_NAME, "\145\x72\x72\x6f\162\115\x65\x73\x73\x61\147\145" => "\x54\x68\145\x20\x73\141\x6d\x65\x20\156\x61\x6d\x65\x20\141\154\162\x65\141\x64\x79\x20\145\x78\x69\163\x74\163"); $errorMsgs[VERR_E2_OVERITE_CANCEL] = array("\x65\x72\x72\x6f\162\x43\157\144\145" => VERR_E2_OVERITE_CANCEL, "\x65\x72\x72\x6f\162\x4d\x65\163\163\x61\x67\145" => "\x4f\166\x65\162\167\x72\151\x74\x69\156\x67\40\x77\141\163\x20\143\141\x6e\x63\145\154\154\x65\144"); $errorMsgs[VERR_E3_COM_OPEN_FILE] = array("\x65\x72\x72\157\x72\103\x6f\144\145" => VERR_E3_COM_OPEN_FILE, "\145\x72\162\157\x72\x4d\145\163\x73\x61\147\x65" => "\x46\x61\x69\x6c\145\144\x20\x74\157\40\157\160\145\156\40\x66\x69\154\145"); $errorMsgs[VERR_E3_COM_OPEN_ZIP] = array("\x65\x72\162\x6f\x72\103\x6f\144\145" => VERR_E3_COM_OPEN_ZIP, "\145\162\162\x6f\162\x4d\x65\x73\163\x61\x67\x65" => "\106\x61\151\x6c\x65\144\x20\x74\x6f\x20\x6f\x70\x65\156\40\141\40\132\151\x70\x20\x66\151\154\x65\x2e"); $errorMsgs[VERR_E3_COM_UPLOAD] = array("\145\x72\162\x6f\x72\103\x6f\x64\x65" => VERR_E3_COM_UPLOAD, "\x65\162\162\157\162\115\x65\x73\163\x61\147\145" => "\106\141\151\154\x65\x64\x20\164\157\x20\165\x70\x6c\157\141\144\x20\141\x20\x66\x69\154\x65\x2e"); $errorMsgs[VERR_E3_COM_DOWNLOAD] = array("\x65\162\x72\157\162\103\157\x64\x65" => VERR_E3_COM_DOWNLOAD, "\x65\162\162\157\x72\x4d\145\x73\x73\x61\147\145" => "\x46\141\151\154\x65\144\x20\164\x6f\x20\144\157\167\x6e\x6c\x6f\x61\x64\40\141\x20\146\151\x6c\145\x2e"); $errorMsgs[VERR_E3_COM_INVALID_FORMAT] = array("\x65\x72\162\x6f\x72\x43\x6f\144\x65" => VERR_E3_COM_INVALID_FORMAT, "\145\162\162\x6f\x72\x4d\x65\x73\x73\x61\x67\x65" => "\x49\156\166\x61\154\x69\144\40\146\x69\154\x65\40\146\157\x72\155\x61\x74\56"); $errorMsgs[VERR_E3_COM_CANCELED_BY_USER] = array("\145\162\x72\157\162\103\157\x64\145" => VERR_E3_COM_CANCELED_BY_USER, "\145\162\162\157\x72\x4d\x65\163\163\141\147\x65" => "\103\x61\x6e\143\x65\154\145\x64\40\x62\171\40\165\x73\145\x72"); $errorMsgs[VERR_E3_COM_SAME_FILE] = array("\x65\162\162\x6f\x72\x43\157\144\145" => VERR_E3_COM_SAME_FILE, "\145\x72\x72\157\162\x4d\x65\163\163\x61\147\x65" => "\x54\x68\145\x20\x73\x6f\165\x72\x63\x65\x20\141\x6e\144\40\144\x65\163\164\151\x6e\141\x74\151\157\x6e\x20\x66\151\x6c\x65\x73\40\x61\162\145\40\164\150\x65\40\x73\x61\x6d\x65\x20\x66\x69\154\145\56"); $errorMsgs[VERR_E3_SEG_UNKNOWN] = array("\145\162\x72\x6f\x72\x43\x6f\x64\145" => VERR_E3_SEG_UNKNOWN, "\x65\162\162\x6f\162\115\145\163\163\141\x67\145" => "\125\156\x6b\x6e\157\167\156\40\145\162\162\157\162\40\151\156\x20\163\x65\147\155\x65\x6e\164\x61\x74\151\x6f\156"); $errorMsgs[VERR_E3_SEG_IMPORT_DIFF_UID] = array("\145\162\x72\x6f\162\x43\157\144\145" => VERR_E3_SEG_IMPORT_DIFF_UID, "\145\x72\162\157\x72\115\x65\163\163\141\147\x65" => "\125\111\x44\x20\144\x6f\145\x73\x6e\47\164\x20\x6d\x61\164\143\150\56"); $errorMsgs[VERR_E3_SEG_IMPORT_NO_INFO_FILE] = array("\145\x72\162\x6f\162\x43\x6f\x64\x65" => VERR_E3_SEG_IMPORT_NO_INFO_FILE, "\x65\x72\x72\x6f\162\x4d\x65\163\163\x61\147\145" => "\x54\x68\145\40\x7a\x69\x70\40\146\x69\154\x65\x20\x68\141\x73\x20\156\x6f\x20\151\x6e\146\x6f\x20\146\151\x6c\x65\x2e"); $errorMsgs[VERR_E3_ORTHO_ADD_TREATMENT] = array("\x65\162\x72\x6f\162\103\157\x64\145" => VERR_E3_ORTHO_ADD_TREATMENT, "\x65\162\x72\x6f\162\x4d\145\x73\163\141\147\145" => "\106\x61\x69\154\x20\x74\x6f\40\x61\144\x64\x20\141\40\164\162\145\x61\x74\x6d\x65\x6e\164\x2e"); $errorMsgs[VERR_E3_ORTHO_IMPORT_3D_PHOTO] = array("\x65\x72\162\157\162\x43\x6f\x64\x65" => VERR_E3_ORTHO_IMPORT_3D_PHOTO, "\145\162\162\157\x72\x4d\x65\x73\163\141\147\x65" => "\124\150\x65\x72\145\40\x69\x73\40\x6e\157\40\63\104\x20\x50\x68\x6f\164\157\x20\141\166\141\151\154\141\142\154\145\x2e\x20\120\154\x65\141\x73\145\x20\x74\162\171\x20\141\x67\141\151\x6e\40\141\x66\x74\x65\x72\x20\x69\x6d\160\x6f\162\164\151\x6e\x67\40\x33\104\x20\120\150\157\x74\x6f\x20\x64\141\x74\x61\x2e"); $errorMsgs[VERR_E3_ORTHO_LOAD_MESH_OF_3D_PHOTO] = array("\x65\162\162\x6f\x72\x43\x6f\x64\x65" => VERR_E3_ORTHO_LOAD_MESH_OF_3D_PHOTO, "\145\162\162\x6f\162\115\x65\163\x73\x61\147\145" => "\106\x61\x69\154\x65\144\x20\164\x6f\x20\157\x70\x65\156\40\x33\104\40\x50\150\157\164\157\x20\104\141\164\x61\56"); $errorMsgs[VERR_E3_ORTHO_CALIBRATION] = array("\145\x72\x72\x6f\162\x43\x6f\144\x65" => VERR_E3_ORTHO_CALIBRATION, "\x65\x72\x72\157\162\115\145\163\163\x61\x67\x65" => "\x53\x6f\x66\x74\40\x74\151\x73\163\165\145\x20\143\x61\x6c\151\142\x72\141\x74\x69\157\x6e\40\x70\157\151\x6e\x74\x73\40\x64\157\x20\x6e\x6f\164\x20\x65\170\151\163\164\x2e\x20\120\154\145\x61\x73\145\40\164\x72\171\40\x61\147\x61\x69\156\x20\x61\146\164\x65\x72\40\163\x6f\146\164\40\x74\x69\163\163\165\145\x20\x63\141\x6c\x69\x62\162\x61\x74\151\x6f\x6e\56"); $errorMsgs[VERR_E3_ORTHO_REGISTRATION_3D_PHOTO] = array("\145\162\x72\x6f\x72\103\x6f\x64\145" => VERR_E3_ORTHO_REGISTRATION_3D_PHOTO, "\x65\162\162\157\162\115\x65\x73\x73\141\x67\145" => "\x54\150\x65\x20\63\x44\40\x50\x68\x6f\164\x6f\x20\x64\x61\x74\x61\40\150\x61\163\40\x6e\x6f\164\x20\x62\145\x65\x6e\40\x72\x65\147\151\x73\x74\145\162\145\x64\40\x79\x65\164\x2e"); $errorMsgs[VERR_E3_ENDO_ROOTCANAL_POINT_NOT_ENOUGH] = array("\x65\162\x72\157\x72\x43\157\144\x65" => VERR_E3_ENDO_ROOTCANAL_POINT_NOT_ENOUGH, "\145\x72\162\157\x72\x4d\145\163\x73\x61\147\x65" => "\x54\x68\x65\40\162\x6f\157\x74\40\x63\x61\156\141\x6c\40\160\157\x69\156\x74\40\x69\x73\x20\x6e\x6f\164\40\145\x6e\x6f\x75\147\150\x2e"); $errorMsgs[VERR_O3_CON_XMLPARSE] = array("\145\x72\x72\x6f\162\x43\x6f\x64\145" => VERR_O3_CON_XMLPARSE, "\145\x72\162\157\x72\x4d\145\163\163\141\147\x65" => "\x43\157\x75\154\144\40\x6e\157\164\x20\160\x61\x72\163\x65\40\130\115\x4c\40\144\141\x74\x61"); $errorMsgs[VERR_DB_SUCCESS] = array("\145\162\162\x6f\x72\x43\157\144\x65" => VERR_DB_SUCCESS, "\145\x72\x72\x6f\162\115\x65\163\x73\x61\147\x65" => "\x53\x75\143\143\x65\x73\x73\146\165\x6c\x20\x72\145\x73\x75\154\x74"); $errorMsgs[VERR_DB_ERROR] = array("\145\162\162\157\x72\103\x6f\x64\x65" => VERR_DB_ERROR, "\145\x72\x72\x6f\x72\115\x65\x73\163\141\x67\145" => "\123\121\x4c\x20\x65\x72\x72\x6f\x72\x20\157\x72\x20\155\x69\163\x73\151\156\147\x20\x64\x61\164\x61\x62\x61\163\145"); $errorMsgs[VERR_DB_CONNECT_ERROR] = array("\x65\x72\162\x6f\x72\x43\x6f\x64\145" => VERR_DB_CONNECT_ERROR, "\x65\162\162\157\x72\x4d\x65\163\x73\x61\147\145" => "\103\157\x6e\x6e\145\143\164\x69\x6f\x6e\40\146\141\151\154\x65\x64"); $errorMsgs[VERR_DB_CONNECT_NEXIST] = array("\145\x72\x72\157\162\x43\157\144\145" => VERR_DB_CONNECT_NEXIST, "\x65\162\162\x6f\162\115\145\x73\x73\x61\x67\145" => "\x43\157\x6e\156\x65\143\164\x69\x6f\156\40\144\157\145\163\x20\x6e\157\x74\40\x65\x78\x69\163\x74"); $errorMsgs[VERR_DB_INTERNAL] = array("\145\162\x72\x6f\x72\x43\157\x64\x65" => VERR_DB_INTERNAL, "\x65\162\x72\157\x72\115\145\x73\x73\141\147\x65" => "\111\156\164\145\162\x6e\x61\154\40\x6c\x6f\x67\x69\143\40\x65\162\x72\157\162\x20\x69\156\x20\104\102"); $errorMsgs[VERR_DB_PERMISSION] = array("\145\162\x72\157\162\x43\x6f\x64\x65" => VERR_DB_PERMISSION, "\x65\162\162\x6f\162\115\145\x73\163\141\147\145" => "\x41\x63\143\x65\x73\x73\40\160\145\x72\x6d\151\x73\163\151\157\x6e\x20\x64\x65\x6e\x69\x65\x64"); $errorMsgs[VERR_DB_ABORT] = array("\145\162\162\x6f\x72\x43\157\144\145" => VERR_DB_ABORT, "\x65\162\162\x6f\162\115\x65\163\x73\x61\x67\145" => "\x43\141\154\x6c\x62\x61\143\x6b\40\x72\x6f\x75\x74\x69\x6e\145\x20\162\145\x71\165\x65\x73\164\x65\x64\x20\x61\x6e\40\141\x62\x6f\162\x74"); $errorMsgs[VERR_DB_BUSY] = array("\x65\x72\x72\x6f\x72\x43\x6f\x64\145" => VERR_DB_BUSY, "\145\162\162\157\x72\x4d\x65\163\163\141\x67\x65" => "\124\150\145\40\x64\x61\164\x61\x62\141\x73\x65\x20\x66\151\154\x65\x20\x69\163\x20\x6c\x6f\x63\153\145\x64"); $errorMsgs[VERR_DB_LOCKED] = array("\145\162\x72\157\162\103\x6f\144\145" => VERR_DB_LOCKED, "\145\162\x72\157\x72\x4d\145\x73\163\141\147\145" => "\101\40\x74\x61\142\x6c\145\x20\x69\x6e\40\x74\x68\145\x20\x64\x61\x74\141\142\x61\163\145\x20\151\163\x20\154\157\x63\x6b\x65\x64"); $errorMsgs[VERR_DB_MALLOC] = array("\x65\162\162\x6f\x72\x43\157\144\x65" => VERR_DB_MALLOC, "\x65\162\x72\x6f\162\x4d\x65\x73\x73\141\147\x65" => "\115\145\x6d\157\162\x79\40\141\154\x6c\x6f\143\141\x74\151\157\156\40\146\x61\x69\154\145\144"); $errorMsgs[VERR_DB_READONLY] = array("\145\x72\x72\157\x72\x43\x6f\x64\145" => VERR_DB_READONLY, "\145\x72\162\157\162\x4d\x65\x73\163\141\x67\145" => "\x41\164\x74\145\155\160\x74\x20\164\157\x20\x77\x72\x69\x74\x65\40\141\x20\x72\x65\x61\x64\157\x6e\x6c\x79\x20\144\x61\x74\141\x62\x61\163\x65"); $errorMsgs[VERR_DB_INTERRUPT] = array("\145\162\x72\x6f\162\x43\157\x64\x65" => VERR_DB_INTERRUPT, "\145\x72\162\x6f\162\115\x65\163\x73\141\x67\x65" => "\117\160\145\x72\x61\x74\151\x6f\x6e\x20\164\x65\162\x6d\x69\156\141\x74\x65\x64\40\142\x79\x20\151\x6e\x74\x65\x72\162\x75\160\x74\x28\51"); $errorMsgs[VERR_DB_IO] = array("\145\162\x72\x6f\x72\103\x6f\144\x65" => VERR_DB_IO, "\x65\162\162\157\162\x4d\145\163\x73\141\x67\x65" => "\123\x6f\x6d\x65\40\153\x69\x6e\x64\x20\157\146\40\144\x69\163\153\40\x49\x2f\x4f\x20\x65\x72\162\157\x72\x20\157\143\x63\x75\162\x72\x65\144"); $errorMsgs[VERR_DB_FOUND] = array("\145\x72\x72\x6f\x72\103\x6f\144\145" => VERR_DB_FOUND, "\145\162\x72\x6f\x72\x4d\145\x73\x73\141\147\x65" => "\x54\x68\x65\x20\x64\141\164\x61\142\141\163\145\40\144\151\x73\153\40\x69\x6d\x61\x67\x65\40\x69\x73\40\155\141\154\x66\x6f\162\x6d\x65\x64"); $errorMsgs[VERR_DB_FULL] = array("\145\x72\x72\157\x72\x43\157\144\145" => VERR_DB_FULL, "\145\162\x72\157\x72\115\x65\x73\163\x61\147\145" => "\x55\156\x6b\x6e\x6f\167\x6e\40\x6f\x70\x63\157\x64\145\40\x69\x6e\40\146\151\154\145\137\x63\x6f\156\x74\x72\x6f\154\x28\x29"); $errorMsgs[VERR_DB_INSERTION] = array("\145\x72\x72\x6f\162\103\x6f\x64\145" => VERR_DB_INSERTION, "\145\x72\162\x6f\x72\115\145\x73\x73\141\x67\145" => "\111\x6e\163\145\162\x74\151\157\x6e\40\146\141\x69\154\x65\144\x20\142\145\x63\141\x75\x73\145\40\144\141\x74\141\142\141\163\x65\40\151\163\x20\146\165\x6c\154"); $errorMsgs[VERR_DB_PROTOCOL] = array("\x65\x72\x72\157\x72\103\157\x64\145" => VERR_DB_PROTOCOL, "\145\x72\x72\x6f\162\x4d\145\163\x73\x61\147\145" => "\x55\156\x61\x62\x6c\145\x20\x74\x6f\40\x6f\160\145\156\40\164\x68\145\40\144\141\164\141\142\141\x73\x65\40\x66\x69\x6c\x65"); $errorMsgs[VERR_DB_EMPTY] = array("\145\162\x72\x6f\x72\x43\157\144\x65" => VERR_DB_EMPTY, "\145\x72\x72\x6f\x72\x4d\x65\x73\x73\141\x67\145" => "\x44\141\x74\141\142\141\163\x65\x20\151\163\40\x65\x6d\160\164\171"); $errorMsgs[VERR_DB_SCHEMA] = array("\x65\x72\162\157\x72\x43\157\x64\x65" => VERR_DB_SCHEMA, "\x65\162\x72\x6f\162\115\x65\x73\x73\x61\x67\145" => "\124\150\x65\40\x64\x61\164\141\x62\x61\x73\145\x20\163\143\150\145\x6d\x61\x20\x63\150\x61\x6e\147\x65\144"); $errorMsgs[VERR_DB_TOOBIG] = array("\x65\162\162\x6f\162\103\157\144\145" => VERR_DB_TOOBIG, "\145\x72\x72\x6f\x72\115\x65\x73\x73\141\x67\x65" => "\123\x74\x72\151\156\147\40\157\x72\x20\102\x4c\117\102\40\x65\170\x63\145\x65\x64\x73\40\x73\x69\172\x65\40\154\151\x6d\151\164"); $errorMsgs[VERR_DB_CONSTRAINT] = array("\145\x72\162\x6f\x72\103\x6f\144\x65" => VERR_DB_CONSTRAINT, "\x65\x72\162\x6f\x72\x4d\145\163\163\x61\x67\145" => "\101\142\x6f\x72\x74\x20\x64\x75\x65\40\164\x6f\40\x63\x6f\156\x73\x74\x72\141\151\156\x74\x20\166\151\x6f\154\x61\x74\151\x6f\x6e"); $errorMsgs[VERR_DB_MISMATCH] = array("\145\x72\162\x6f\x72\103\x6f\144\x65" => VERR_DB_MISMATCH, "\145\162\x72\x6f\162\115\x65\x73\x73\141\147\x65" => "\x44\141\x74\x61\40\x74\x79\160\145\x20\155\151\x73\x6d\141\x74\x63\x68"); $errorMsgs[VERR_DB_MISUSE] = array("\145\162\x72\157\162\103\x6f\144\x65" => VERR_DB_MISUSE, "\145\x72\x72\157\x72\x4d\x65\x73\x73\141\147\145" => "\x4c\151\142\x72\x61\x72\171\40\x75\163\145\144\40\151\x6e\143\x6f\x72\x72\x65\x63\x74\154\x79"); $errorMsgs[VERR_DB_OS_SUPPORT] = array("\x65\162\162\x6f\x72\x43\157\x64\x65" => VERR_DB_OS_SUPPORT, "\x65\162\x72\157\x72\x4d\145\x73\163\141\x67\x65" => "\125\163\x65\163\x20\x4f\123\40\x66\x65\141\164\x75\162\145\163\x20\x6e\157\x74\40\163\165\160\160\x6f\x72\164\145\144\x20\157\156\40\150\x6f\163\164"); $errorMsgs[VERR_DB_AUTHOR] = array("\x65\162\x72\x6f\162\x43\157\144\145" => VERR_DB_AUTHOR, "\145\162\162\x6f\162\x4d\x65\163\x73\141\147\x65" => "\101\165\x74\150\157\162\x69\x7a\x61\x74\x69\x6f\156\40\x64\x65\156\x69\145\144"); $errorMsgs[VERR_DB_FORMAT] = array("\x65\x72\162\157\162\x43\x6f\144\145" => VERR_DB_FORMAT, "\x65\x72\162\x6f\x72\115\x65\163\163\x61\x67\x65" => "\x41\165\x78\151\154\x69\x61\x72\171\x20\x64\x61\164\x61\x62\141\x73\x65\40\x66\x6f\x72\155\x61\x74\x20\x65\x72\162\157\162"); $errorMsgs[VERR_DB_RANGE] = array("\145\x72\162\157\162\103\157\x64\x65" => VERR_DB_RANGE, "\145\162\162\x6f\162\115\145\x73\x73\x61\147\x65" => "\120\141\162\141\x6d\145\x74\145\x72\x20\151\163\x20\157\165\164\x20\157\146\x20\162\141\156\x67\145"); $errorMsgs[VERR_DB_ROW] = array("\145\x72\162\x6f\162\103\x6f\144\145" => VERR_DB_ROW, "\x65\x72\162\157\162\115\x65\163\x73\141\147\x65" => "\x6e\x65\170\164\x28\51\x20\150\141\x73\40\x61\156\157\x74\x68\145\162\40\162\157\x77\x20\162\x65\141\x64\x79"); $errorMsgs[VERR_DB_DONE] = array("\x65\x72\162\157\162\103\157\x64\x65" => VERR_DB_DONE, "\x65\162\x72\157\x72\x4d\x65\x73\163\x61\147\145" => "\156\x65\170\x74\50\51\40\150\x61\163\x20\x66\151\156\x69\163\150\145\144\40\x65\170\145\x63\x75\164\x69\156\147"); $errorMsgs[VERR_DB_OVERLAP] = array("\x65\x72\162\x6f\x72\103\x6f\144\x65" => VERR_DB_OVERLAP, "\145\162\162\157\162\115\145\163\163\141\x67\x65" => "\x4f\166\145\x72\x6c\141\160\40\x44\102\x20\104\x61\x74\x61"); $errorMsgs[VERR_DB_FCONNRELEASE] = array("\x65\x72\162\157\162\x43\x6f\x64\145" => VERR_DB_FCONNRELEASE, "\145\162\162\x6f\x72\115\x65\163\x73\x61\147\145" => "\106\141\x69\x6c\x65\x64\x20\x74\x6f\x20\162\145\154\x65\141\x73\x65\x20\143\157\156\x6e\x65\x63\164\x69\x6f\x6e"); $errorMsgs[VERR_DB_ALEADYINIT] = array("\x65\162\x72\157\162\103\157\144\x65" => VERR_DB_ALEADYINIT, "\x65\162\162\x6f\x72\115\145\x73\163\x61\147\x65" => "\103\x6f\156\156\145\x63\164\151\x6f\156\x20\151\x73\x20\x61\x6c\162\145\x61\144\171\40\x69\x6e\151\x74\151\141\154\151\172\145\x64"); $errorMsgs[VERR_DB_OVERMAXCONNECTION] = array("\145\162\162\157\x72\x43\x6f\144\x65" => VERR_DB_OVERMAXCONNECTION, "\145\162\162\x6f\x72\115\145\163\163\x61\x67\x65" => "\105\x78\143\145\x65\144\x65\x64\x20\164\150\145\40\155\x61\170\151\155\165\x6d\40\x6e\165\x6d\x62\145\162\x20\x6f\146\40\143\157\x6e\156\x65\x63\164\x69\157\156\163"); $errorMsgs[VERR_DB_ALRRELECONNECTION] = array("\x65\x72\x72\x6f\162\x43\157\x64\145" => VERR_DB_ALRRELECONNECTION, "\x65\162\162\x6f\162\115\x65\x73\163\x61\x67\145" => "\x63\157\x6e\156\145\143\164\x69\157\156\x20\x61\154\x72\145\x61\x64\x79\x20\151\163\x20\162\145\154\x65\141\163\145\x64\56"); $errorMsgs[VERR_DB_STILLREFERENCED] = array("\x65\x72\x72\x6f\162\x43\x6f\x64\x65" => VERR_DB_STILLREFERENCED, "\145\162\162\x6f\162\x4d\x65\x73\x73\x61\x67\x65" => "\123\x74\x69\x6c\x6c\x20\162\145\x66\x65\x72\145\156\x63\145\x64\x20\x74\141\x62\154\x65"); $errorMsgs[VERR_DB_INVALIDDATA] = array("\x65\x72\x72\157\x72\x43\x6f\x64\x65" => VERR_DB_INVALIDDATA, "\145\162\x72\x6f\x72\x4d\145\x73\x73\141\x67\x65" => "\x55\156\x61\x62\154\145\x20\x74\157\x20\x64\x65\x61\x6c\40\167\x69\x74\x68\x20\164\x68\145\x20\151\x6e\x76\141\x6c\x69\144\40\144\141\x74\x61\40\146\162\157\x6d\40\x74\150\145\x20\x44\x42"); $errorMsgs[VERR_DB_NOSUPPORTDRIVER] = array("\145\162\x72\157\x72\x43\x6f\x64\145" => VERR_DB_NOSUPPORTDRIVER, "\x65\x72\x72\157\x72\x4d\145\163\x73\141\147\145" => "\x55\156\x73\x75\x70\160\157\x72\x74\145\144\40\x44\102\40\104\x72\x69\166\145\162"); $errorMsgs[VERR_DB_NOSUCHDATA] = array("\145\162\162\x6f\162\103\x6f\144\x65" => VERR_DB_NOSUCHDATA, "\145\162\162\157\162\x4d\x65\163\163\141\x67\145" => "\x4e\x6f\x20\163\165\x63\150\x20\x64\141\164\x61\40\151\x6e\x20\104\102"); $errorMsgs[VERR_DB_PATIDTOIMG] = array("\145\x72\162\x6f\162\x43\x6f\144\x65" => VERR_DB_PATIDTOIMG, "\x65\x72\x72\157\162\x4d\145\163\163\x61\147\145" => "\x53\165\143\x63\145\x65\144\x65\x64\40\164\x6f\x20\162\145\x66\145\x72\145\156\x63\x65\40\103\x68\x61\162\x74\40\156\165\x6d\142\x65\162\40\x74\x6f\x20\151\155\x61\x67\145\x20\x74\x61\x62\154\x65\x28\105\x7a\63\104\x20\x70\x6c\165\x73\51"); $errorMsgs[VERR_DB_EMPTYHOST] = array("\x65\x72\x72\x6f\x72\103\157\144\x65" => VERR_DB_EMPTYHOST, "\145\162\x72\x6f\162\x4d\x65\x73\163\141\x67\145" => "\x48\157\163\164\x20\x6e\x61\x6d\145\40\151\163\x20\x65\155\x70\164\171"); $errorMsgs[VERR_DB_OPEN_ERROR] = array("\145\x72\162\x6f\162\103\157\x64\x65" => VERR_DB_OPEN_ERROR, "\x65\x72\x72\157\x72\x4d\x65\163\163\x61\x67\x65" => "\x4f\160\x65\156\x20\x64\x61\164\x61\x62\x61\163\145\x20\146\141\151\154\x65\144"); $errorMsgs[VERR_DB_QUERY_EXEC_ERROR] = array("\145\162\162\x6f\162\103\x6f\144\x65" => VERR_DB_QUERY_EXEC_ERROR, "\145\162\162\157\162\x4d\145\x73\x73\141\x67\145" => "\x51\165\145\162\171\40\145\170\x65\143\165\x74\151\157\156\x20\x66\x61\x69\x6c\x65\x64"); $errorMsgs[VERR_DB_NORESULTDATA] = array("\145\x72\162\157\x72\x43\157\x64\145" => VERR_DB_NORESULTDATA, "\x65\162\x72\157\162\115\x65\x73\x73\x61\147\x65" => "\x54\x68\x65\40\x72\x65\x73\x75\x6c\x74\151\x6e\x67\40\x76\x61\154\165\x65\x20\151\x73\40\x6e\x6f\x74\x20\x70\162\x65\163\145\x6e\x74"); $errorMsgs[VERR_DB_NOSUCHTABLE] = array("\x65\x72\162\157\x72\103\x6f\x64\145" => VERR_DB_NOSUCHTABLE, "\x65\162\x72\x6f\x72\115\145\163\x73\141\x67\x65" => "\116\157\40\163\x75\x63\150\x20\164\x61\142\x6c\145\x20\151\x6e\40\104\102"); $errorMsgs[VERR_DB_VERSION] = array("\x65\162\x72\x6f\162\x43\x6f\144\145" => VERR_DB_VERSION, "\x65\162\162\157\162\x4d\x65\163\x73\141\x67\145" => "\x44\x61\164\x61\x62\141\163\x65\40\166\x65\162\163\x69\157\156\40\145\162\x72\x6f\162"); $errorMsgs[VERR_INI_SUCCESS] = array("\145\162\162\157\162\103\157\144\x65" => VERR_INI_SUCCESS, "\x65\x72\x72\x6f\162\x4d\145\163\x73\x61\147\145" => "\111\116\x49\x20\x66\165\156\x63\x74\x69\x6f\156\40\x6f\x70\145\x72\x61\x74\x69\x6f\156\x20\x69\x73\x20\163\165\143\x63\145\x65\144\145\144"); $errorMsgs[VERR_INI_NOPEN] = array("\x65\162\x72\x6f\162\x43\x6f\144\145" => VERR_INI_NOPEN, "\x65\162\162\157\162\x4d\145\x73\x73\141\147\x65" => "\x43\157\165\x6c\x64\40\x6e\x6f\x74\40\x6f\x70\145\156\x20\x49\116\x49\x20\146\x69\154\145"); $errorMsgs[VERR_INI_INIT_FAILED] = array("\x65\162\x72\157\x72\x43\157\144\145" => VERR_INI_INIT_FAILED, "\145\162\162\x6f\162\x4d\145\163\163\x61\147\145" => "\x49\x6e\x69\164\151\141\154\x69\x7a\141\164\x69\x6f\156\40\x6f\146\x20\x49\116\111\x20\x6f\142\x6a\145\x63\x74\x20\x66\141\x69\154\145\144"); $errorMsgs[VERR_INI_INVALID_SECTION] = array("\145\162\x72\x6f\162\x43\157\144\145" => VERR_INI_INVALID_SECTION, "\145\x72\x72\x6f\162\115\145\163\163\x61\x67\145" => "\x49\x6e\x76\x61\x6c\151\x64\x20\x73\145\x63\x74\151\157\x6e\40\x61\x72\147\165\155\x65\156\164"); $errorMsgs[VERR_INI_INVALID_KEY] = array("\145\162\162\x6f\x72\103\x6f\144\145" => VERR_INI_INVALID_KEY, "\145\x72\162\x6f\x72\x4d\145\163\163\x61\147\145" => "\x49\156\166\x61\x6c\x69\x64\40\x6b\x65\x79\x20\x61\162\x67\165\155\145\x6e\x74"); $errorMsgs[VERR_INI_INVALID_PATH] = array("\x65\162\162\157\162\x43\157\144\145" => VERR_INI_INVALID_PATH, "\x65\162\162\x6f\x72\x4d\145\163\163\141\147\x65" => "\x49\x6e\166\x61\154\151\144\40\111\x4e\x49\x20\x66\x69\x6c\x65\x20\x70\x61\164\x68"); $errorMsgs[VERR_INI_FAILED] = array("\145\162\x72\157\162\x43\x6f\144\x65" => VERR_INI_FAILED, "\145\x72\162\157\162\x4d\145\163\x73\141\147\x65" => "\111\116\x49\x20\146\165\x6e\143\164\151\x6f\156\40\x6f\x70\145\162\x61\x74\151\x6f\x6e\40\146\x61\x69\154\145\144"); $errorMsgs[VERR_CRYPT_SUCCESS] = array("\145\x72\162\x6f\x72\x43\x6f\x64\x65" => VERR_CRYPT_SUCCESS, "\145\x72\162\x6f\x72\x4d\x65\x73\163\x61\x67\145" => "\x43\162\171\x70\x74\x20\146\165\156\x63\x74\151\157\156\40\x6f\x70\145\x72\141\x74\151\157\x6e\x20\163\165\x63\x63\145\145\144\x65\x64"); $errorMsgs[VERR_CRYPT_INIT_FAILED] = array("\145\162\162\x6f\x72\x43\157\x64\145" => VERR_CRYPT_INIT_FAILED, "\x65\x72\162\x6f\162\x4d\145\163\163\141\147\145" => "\x43\162\171\x70\164\x6f\x20\x6f\142\x6a\145\143\x74\163\40\x69\156\x69\x74\x69\x61\154\x69\x7a\141\164\x69\157\156\x20\x66\x61\151\x6c\x65\144"); $errorMsgs[VERR_CRYPT_NEED_KEY_SETTING] = array("\145\x72\x72\157\162\x43\x6f\x64\x65" => VERR_CRYPT_NEED_KEY_SETTING, "\145\162\162\x6f\x72\115\145\163\x73\141\x67\x65" => "\x4d\x75\x73\x74\x20\x73\145\x74\x20\153\145\171\x20\x76\141\x6c\x75\145"); $errorMsgs[VERR_CRYPT_UNKNOWN_VERSION] = array("\x65\x72\x72\x6f\x72\103\157\144\145" => VERR_CRYPT_UNKNOWN_VERSION, "\x65\162\x72\x6f\x72\x4d\145\x73\x73\141\147\x65" => "\x55\x6e\x6b\x6e\x6f\x77\156\40\123\151\155\160\154\x65\x43\162\x79\x70\164\x20\166\145\162\163\151\157\x6e"); $errorMsgs[VERR_CRYPT_WRONG_KEY] = array("\145\x72\162\157\x72\103\157\x64\145" => VERR_CRYPT_WRONG_KEY, "\145\162\x72\x6f\162\x4d\145\163\x73\141\147\x65" => "\x57\x72\157\x6e\147\x20\153\145\x79"); $errorMsgs[VERR_CRYPT_UNKNOWN_ERROR] = array("\145\x72\x72\157\162\103\x6f\x64\x65" => VERR_CRYPT_UNKNOWN_ERROR, "\145\x72\x72\157\162\115\x65\163\163\x61\x67\x65" => "\x55\x6e\x6b\156\157\x77\x6e\40\123\x69\x6d\160\154\145\103\x72\x79\160\x74\x20\145\x72\x72\157\162"); $errorMsgs[VERR_QSSLOADER_SUCCESS] = array("\x65\162\162\x6f\x72\x43\157\x64\145" => VERR_QSSLOADER_SUCCESS, "\x65\x72\162\x6f\x72\x4d\x65\163\x73\141\x67\x65" => "\121\x53\x53\x20\x4c\x6f\141\x64\145\x72\x20\101\x50\111\x20\x6f\x70\x65\162\141\164\151\157\x6e\x20\x73\x75\x63\x63\145\145\144\145\144"); $errorMsgs[VERR_QSSLOADER_DIRNOTFOUND] = array("\145\x72\162\x6f\162\x43\157\144\145" => VERR_QSSLOADER_DIRNOTFOUND, "\145\162\162\157\162\x4d\x65\163\x73\x61\147\145" => "\x43\141\x6e\x6e\157\x74\x20\x66\151\156\x64\x20\164\150\145\x20\x64\151\162\x65\x63\x74\x6f\x72\x79"); $errorMsgs[VERR_QSSLOADER_FILENOTFOUND] = array("\x65\162\162\157\x72\x43\x6f\x64\145" => VERR_QSSLOADER_FILENOTFOUND, "\x65\x72\x72\157\x72\115\x65\x73\x73\141\147\145" => "\103\x61\156\156\157\x74\40\146\151\x6e\144\x20\x51\x53\123\x20\x6f\x72\x20\130\x4d\x4c\x20\146\151\x6c\145"); $errorMsgs[VERR_QSSLOADER_XML_PARSE] = array("\145\162\x72\157\x72\103\x6f\x64\x65" => VERR_QSSLOADER_XML_PARSE, "\x65\162\x72\157\162\x4d\145\163\163\141\x67\x65" => "\130\115\x4c\40\x70\x61\x72\x73\151\156\147\40\145\x72\162\x6f\x72"); $errorMsgs[VERR_QSSLOADER_QINI_PARSE] = array("\x65\162\x72\x6f\x72\x43\157\144\x65" => VERR_QSSLOADER_QINI_PARSE, "\145\162\162\x6f\x72\x4d\x65\x73\x73\x61\x67\x65" => "\111\116\111\40\160\141\x72\x73\x69\156\x67\x20\x65\162\x72\x6f\x72"); $errorMsgs[VERR_QSSLOADER_OUTOFMEMORY] = array("\x65\x72\162\157\x72\x43\157\144\x65" => VERR_QSSLOADER_OUTOFMEMORY, "\x65\x72\162\x6f\162\115\145\163\163\x61\x67\x65" => "\x49\156\163\x75\x66\146\151\x63\151\145\x6e\x74\x20\x6d\x65\x6d\x6f\x72\171"); $errorMsgs[VERR_QSSLOADER_INVALIDARGUMENT] = array("\x65\162\x72\157\x72\x43\x6f\x64\145" => VERR_QSSLOADER_INVALIDARGUMENT, "\x65\162\162\x6f\x72\x4d\x65\163\163\141\x67\145" => "\x50\141\x73\163\x65\x64\40\151\156\166\141\154\x69\144\x20\x61\162\147\165\155\x65\156\x74"); $errorMsgs[VERR_QSSLOADER_NOSUITABLEQSS] = array("\145\x72\x72\x6f\x72\x43\157\x64\x65" => VERR_QSSLOADER_NOSUITABLEQSS, "\x65\162\x72\157\162\x4d\145\x73\x73\x61\147\145" => "\103\141\156\156\x6f\x74\x20\146\151\156\x64\40\x73\x75\x69\x74\x61\x62\x6c\145\40\121\x53\x53\40\146\151\x6c\145"); $errorMsgs[VERR_QSSLOADER_QSSWASNOTLOADED] = array("\x65\162\x72\157\x72\103\157\x64\x65" => VERR_QSSLOADER_QSSWASNOTLOADED, "\145\x72\162\157\162\115\x65\163\x73\x61\147\x65" => "\121\123\123\x20\x69\156\151\x74\151\141\154\x69\x7a\141\164\x69\157\x6e\x20\167\141\x73\x20\156\x6f\164\40\143\x6f\155\x70\x6c\145\164\x65\x64"); $errorMsgs[VERR_QSSLOADER_VALIABLENOTFOUND] = array("\x65\x72\x72\x6f\162\103\157\144\x65" => VERR_QSSLOADER_VALIABLENOTFOUND, "\145\x72\162\x6f\162\115\145\x73\163\141\147\x65" => "\103\x61\x6e\156\x6f\164\x20\146\151\x6e\x64\x20\164\x68\x65\40\x76\141\x72\151\x61\x62\x6c\145"); $errorMsgs[VERR_QSSLOADER_INVALIDSKIN] = array("\145\162\162\x6f\162\103\x6f\x64\145" => VERR_QSSLOADER_INVALIDSKIN, "\x65\x72\162\157\x72\x4d\145\x73\x73\x61\147\145" => "\125\x6e\x73\165\x70\160\x6f\x72\164\x65\x64\40\163\x6b\151\x6e\40\156\x61\155\x65"); $errorMsgs[VERR_QSSLOADER_INVALIDOS] = array("\145\x72\x72\x6f\x72\103\157\x64\x65" => VERR_QSSLOADER_INVALIDOS, "\x65\162\162\157\162\x4d\x65\x73\163\x61\x67\x65" => "\125\156\163\x75\160\x70\x6f\x72\164\x65\144\x20\x4f\123\40\x6e\141\x6d\145"); $errorMsgs[VERR_EMAIL_LIBLICENSE] = array("\145\x72\162\x6f\x72\x43\157\x64\145" => VERR_EMAIL_LIBLICENSE, "\x65\162\162\x6f\x72\115\x65\163\x73\x61\147\x65" => "\114\151\x63\x65\156\163\145\x20\x65\162\162\157\162\x20\x6f\x66\x20\x65\155\x61\151\154\x20\154\151\142\162\x61\162\171"); $errorMsgs[VERR_EMAIL_CONNECTION_FAILURE] = array("\145\x72\162\x6f\x72\103\x6f\144\x65" => VERR_EMAIL_CONNECTION_FAILURE, "\145\162\x72\x6f\x72\115\145\x73\x73\141\147\x65" => "\x43\157\x6e\x6e\145\143\x74\x69\157\156\x20\164\157\40\123\x4d\x54\120\40\x73\x65\x72\166\145\x72\x20\146\141\x69\x6c\145\x64"); $errorMsgs[VERR_EMAIL_AUTHENTICATION] = array("\x65\x72\x72\157\162\103\x6f\144\145" => VERR_EMAIL_AUTHENTICATION, "\145\162\x72\157\x72\115\x65\x73\x73\x61\x67\x65" => "\103\x61\x6e\156\157\x74\40\154\x6f\x67\x69\x6e\x20\x74\157\x20\123\115\124\x50\x20\x73\x65\x72\166\x65\162"); $errorMsgs[VERR_EMAIL_ATTACHFILE] = array("\x65\162\x72\x6f\162\x43\x6f\x64\145" => VERR_EMAIL_ATTACHFILE, "\x65\162\x72\x6f\x72\115\x65\x73\x73\141\147\145" => "\106\141\151\154\145\144\40\164\x6f\40\141\x74\164\141\x63\x68\40\146\x69\x6c\145\163"); $errorMsgs[VERR_EMAIL_SENDING] = array("\x65\162\162\157\162\103\x6f\x64\145" => VERR_EMAIL_SENDING, "\x65\162\162\157\x72\115\145\x73\x73\141\x67\145" => "\101\x6e\40\x65\162\162\157\162\x20\x6f\143\x63\165\x72\x72\145\144\x20\x77\150\151\x6c\145\x20\x73\x65\x6e\x64\x69\156\147\40\x74\x68\145\40\x65\155\x61\151\154"); $errorMsgs[VERR_EMAIL_ADDRESS] = array("\x65\162\x72\x6f\162\x43\x6f\x64\x65" => VERR_EMAIL_ADDRESS, "\145\162\162\157\x72\115\145\163\x73\141\x67\145" => "\102\x61\x64\x20\144\x65\163\x74\x69\156\141\x74\x69\x6f\156\40\155\x61\x69\x6c\x62\x6f\170\40\141\x64\x64\162\145\163\x73"); $errorMsgs[VERR_EMAIL_DENSYS_ADDRESS] = array("\145\x72\162\x6f\162\103\157\144\145" => VERR_EMAIL_DENSYS_ADDRESS, "\x65\162\162\x6f\162\x4d\145\163\163\x61\147\x65" => "\x42\141\x64\40\144\145\x73\x74\151\x6e\x61\x74\151\x6f\156\x20\x73\x79\x73\x74\145\x6d\x20\x61\x64\x64\162\145\x73\163"); $errorMsgs[VERR_EMAIL_DENADDRESS_SYNTAX] = array("\x65\x72\162\157\x72\103\x6f\144\145" => VERR_EMAIL_DENADDRESS_SYNTAX, "\x65\x72\x72\x6f\x72\x4d\145\163\x73\141\x67\145" => "\102\x61\144\x20\144\145\x73\x74\x69\x6e\x61\164\151\157\156\x20\x6d\141\x69\x6c\x62\x6f\x78\40\x61\x64\x64\x72\145\x73\163\x20\163\x79\x6e\x74\x61\170"); $errorMsgs[VERR_EMAIL_ADDRESS_AMBIGUOS] = array("\145\162\x72\x6f\162\x43\x6f\x64\145" => VERR_EMAIL_ADDRESS_AMBIGUOS, "\145\162\x72\157\162\115\x65\x73\x73\141\147\145" => "\x44\x65\163\164\151\x6e\x61\x74\151\x6f\156\40\x6d\141\x69\154\x62\x6f\x78\x20\x61\x64\x64\162\x65\x73\163\x20\141\x6d\142\151\x67\x75\x6f\165\x73"); $errorMsgs[VERR_EMAIL_ADDRESS_VALID] = array("\x65\162\x72\x6f\x72\x43\157\144\145" => VERR_EMAIL_ADDRESS_VALID, "\x65\162\x72\157\162\115\145\163\163\x61\147\x65" => "\x44\145\163\164\x69\156\141\x74\151\x6f\x6e\x20\155\x61\151\x6c\142\157\x78\40\x61\x64\144\162\145\163\163\40\x76\141\154\151\144"); $errorMsgs[VERR_EMAIL_MAILBOX_MOVE] = array("\145\x72\x72\157\162\103\x6f\144\x65" => VERR_EMAIL_MAILBOX_MOVE, "\145\x72\x72\x6f\162\115\145\163\x73\x61\x67\145" => "\x4d\141\151\154\x62\x6f\x78\x20\x68\141\163\40\155\x6f\x76\x65\x64"); $errorMsgs[VERR_EMAIL_SENADDRESS_SYNTAX] = array("\x65\x72\162\x6f\x72\x43\157\144\145" => VERR_EMAIL_SENADDRESS_SYNTAX, "\x65\162\x72\x6f\x72\115\x65\x73\x73\x61\147\145" => "\102\x61\144\40\163\x65\x6e\x64\145\x72\47\x73\40\x6d\141\151\154\142\x6f\170\40\141\144\144\x72\145\x73\x73\40\x73\x79\x6e\x74\x61\170"); $errorMsgs[VERR_EMAIL_SENSYS_ADDRESS] = array("\x65\162\x72\x6f\162\103\x6f\144\145" => VERR_EMAIL_SENSYS_ADDRESS, "\x65\x72\x72\157\x72\115\145\163\163\141\x67\x65" => "\102\141\x64\40\x73\x65\156\144\x65\162\x27\163\40\x73\171\x73\x74\145\x6d\x20\x61\144\144\x72\145\x73\x73"); $errorMsgs[VERR_EMAIL_OTHER_MAILBOX] = array("\145\x72\162\157\x72\x43\157\x64\x65" => VERR_EMAIL_OTHER_MAILBOX, "\x65\x72\x72\157\x72\x4d\x65\x73\x73\141\147\145" => "\117\x74\150\145\162\x20\157\162\x20\x75\156\144\x65\x66\x69\156\x65\x64\x20\155\141\x69\154\142\157\x78\x20\x73\x74\141\164\165\x73"); $errorMsgs[VERR_EMAIL_MAILBOX_DISABLED] = array("\145\162\162\x6f\162\x43\x6f\x64\x65" => VERR_EMAIL_MAILBOX_DISABLED, "\145\x72\162\157\162\x4d\145\x73\x73\x61\147\145" => "\x4d\141\151\x6c\x62\157\x78\x20\x64\151\163\x61\142\x6c\145\x64\x2c\x20\156\157\164\40\x61\143\143\x65\160\x74\x69\156\x67\40\x6d\x65\163\163\141\147\x65\163"); $errorMsgs[VERR_EMAIL_MAILBOX_FULL] = array("\x65\162\162\x6f\x72\103\157\x64\145" => VERR_EMAIL_MAILBOX_FULL, "\145\x72\162\157\x72\115\145\163\163\x61\147\145" => "\115\141\151\x6c\x62\157\x78\x20\x66\x75\154\x6c"); $errorMsgs[VERR_EMAIL_MSSG_LENGTH] = array("\145\x72\162\157\x72\103\x6f\144\x65" => VERR_EMAIL_MSSG_LENGTH, "\x65\162\x72\157\162\115\x65\163\x73\x61\147\x65" => "\x4d\145\x73\x73\x61\147\x65\x20\x6c\145\x6e\x67\164\x68\40\145\x78\x63\145\x65\144\163\40\141\144\x6d\151\156\x69\163\x74\162\141\164\x69\x76\145\40\x6c\x69\x6d\151\164\56"); $errorMsgs[VERR_EMAIL_MAILING_NEXPAN] = array("\x65\162\162\x6f\x72\x43\x6f\x64\145" => VERR_EMAIL_MAILING_NEXPAN, "\145\x72\x72\157\x72\x4d\145\163\163\141\147\145" => "\115\x61\x69\154\x69\x6e\147\x20\x6c\151\163\x74\40\145\x78\160\141\156\163\151\x6f\156\x20\x70\162\157\x62\154\x65\155"); $errorMsgs[VERR_EMAIL_SYS_NNETWORK_MSSG] = array("\145\x72\162\x6f\x72\x43\157\x64\x65" => VERR_EMAIL_SYS_NNETWORK_MSSG, "\145\x72\x72\157\x72\x4d\x65\163\x73\x61\147\145" => "\123\x79\x73\164\x65\155\40\x6e\157\164\40\x61\143\143\x65\x70\x74\x69\x6e\147\x20\x6e\145\x74\x77\x6f\x72\153\x20\x6d\x65\163\x73\x61\147\145\163"); $errorMsgs[VERR_EMAIL_SYS_NFEATURE] = array("\145\162\162\x6f\162\103\157\144\x65" => VERR_EMAIL_SYS_NFEATURE, "\x65\x72\162\157\x72\115\x65\x73\x73\141\x67\x65" => "\x53\x79\163\x74\145\155\x20\x6e\x6f\x74\x20\143\141\160\141\142\154\x65\x20\157\146\x20\x73\x65\154\145\x63\x74\x65\144\40\x66\145\141\x74\165\162\x65\x73"); $errorMsgs[VERR_EMAIL_MSSG_BIG] = array("\x65\x72\162\x6f\162\x43\157\x64\145" => VERR_EMAIL_MSSG_BIG, "\x65\x72\162\x6f\162\115\x65\x73\163\x61\x67\145" => "\x4d\145\x73\x73\141\x67\x65\40\x74\157\x6f\x20\x62\x69\x67\40\146\x6f\162\40\x73\171\163\x74\145\x6d"); $errorMsgs[VERR_EMAIL_NANSWER_HOST] = array("\145\x72\162\x6f\162\x43\157\144\x65" => VERR_EMAIL_NANSWER_HOST, "\x65\x72\162\x6f\x72\x4d\x65\163\163\x61\x67\145" => "\x4e\157\x20\x61\x6e\163\167\x65\x72\40\x66\x72\x6f\155\x20\x68\157\x73\164"); $errorMsgs[VERR_EMAIL_NETWORK_CONGESTION] = array("\145\162\x72\157\x72\x43\157\144\x65" => VERR_EMAIL_NETWORK_CONGESTION, "\145\x72\162\x6f\x72\x4d\145\163\163\141\147\145" => "\116\x65\x74\167\x6f\x72\153\40\143\x6f\156\147\x65\x73\164\151\x6f\x6e"); $errorMsgs[VERR_EMAIL_TIME_EXPIRED] = array("\145\x72\162\x6f\162\x43\157\x64\145" => VERR_EMAIL_TIME_EXPIRED, "\x65\x72\162\157\x72\115\145\x73\163\141\147\145" => "\104\x65\x6c\x69\166\145\162\x79\x20\x74\151\155\145\x20\x65\x78\160\151\x72\x65\x64"); $errorMsgs[VERR_EMAIL_UNDEFIN_PROTOCOL] = array("\145\162\x72\157\x72\103\157\x64\145" => VERR_EMAIL_UNDEFIN_PROTOCOL, "\145\x72\162\x6f\x72\115\145\163\x73\x61\147\145" => "\117\164\150\145\x72\x20\x6f\x72\x20\165\156\x64\145\146\x69\x6e\145\x64\x20\160\x72\157\164\x6f\143\x6f\154\x20\x73\164\141\x74\x75\163"); $errorMsgs[VERR_EMAIL_COMMAND] = array("\145\162\162\157\162\x43\x6f\144\145" => VERR_EMAIL_COMMAND, "\145\x72\162\x6f\162\115\145\163\163\x61\x67\145" => "\111\x6e\166\x61\154\151\144\x20\x63\x6f\x6d\155\141\156\x64"); $errorMsgs[VERR_EMAIL_SYNTAX] = array("\145\162\x72\x6f\162\x43\x6f\144\145" => VERR_EMAIL_SYNTAX, "\145\162\162\157\x72\x4d\x65\x73\163\x61\x67\145" => "\123\x79\156\164\141\x78\x20\x65\x72\x72\157\162"); $errorMsgs[VERR_EMAIL_RECIPIENT] = array("\x65\x72\162\x6f\162\x43\157\x64\145" => VERR_EMAIL_RECIPIENT, "\x65\162\162\157\x72\115\x65\163\163\x61\x67\x65" => "\124\x6f\x6f\x20\x6d\141\x6e\x79\x20\162\145\143\x69\160\x69\145\156\x74\163"); $errorMsgs[VERR_EMAIL_POROTOCOL] = array("\x65\x72\162\157\x72\103\x6f\144\x65" => VERR_EMAIL_POROTOCOL, "\145\162\x72\x6f\x72\x4d\145\x73\x73\141\147\x65" => "\x57\x72\x6f\156\147\x20\x70\162\x6f\x74\157\x63\157\154\x20\x76\x65\x72\163\x69\x6f\x6e"); $errorMsgs[VERR_EMAIL_MEDIA] = array("\145\162\162\157\162\103\x6f\144\145" => VERR_EMAIL_MEDIA, "\145\x72\162\x6f\162\115\x65\x73\x73\x61\x67\x65" => "\x4f\164\x68\145\162\x20\157\162\x20\165\156\x64\145\146\x69\156\145\x64\40\x6d\x65\x64\x69\141\x20\x65\x72\162\x6f\162"); $errorMsgs[VERR_EMAIL_CONVERSION] = array("\x65\x72\x72\x6f\162\x43\157\x64\145" => VERR_EMAIL_CONVERSION, "\145\162\162\x6f\162\x4d\145\163\163\141\147\145" => "\103\157\156\x76\x65\162\x73\x69\157\156\40\146\141\151\154\145\x64"); $errorMsgs[VERR_EMAIL_NDELIVERY] = array("\145\x72\x72\157\162\103\157\x64\145" => VERR_EMAIL_NDELIVERY, "\145\x72\162\x6f\162\115\x65\x73\x73\x61\147\x65" => "\104\x65\x6c\x69\166\145\x72\171\40\x6e\x6f\164\40\x61\x75\164\x68\x6f\x72\x69\172\x65\x64\54\x20\x6d\145\163\x73\141\x67\145\40\x72\145\146\x75\163\145\x64"); $errorMsgs[VERR_EMAIL_INTEGRITY] = array("\x65\x72\x72\x6f\162\103\x6f\144\145" => VERR_EMAIL_INTEGRITY, "\x65\162\x72\x6f\x72\x4d\145\x73\163\141\x67\145" => "\115\x65\163\163\x61\x67\145\x20\x69\156\164\x65\x67\x72\x69\x74\x79\40\x66\141\x69\154\165\162\x65"); $errorMsgs[VERR_IMAGE_SUCCESS] = array("\145\x72\162\157\162\x43\x6f\144\x65" => VERR_IMAGE_SUCCESS, "\x65\162\x72\157\x72\x4d\x65\x73\x73\x61\x67\x65" => "\111\155\141\x67\145\x20\160\141\x72\x73\151\156\x67\40\x73\165\x63\x63\x65\163\163"); $errorMsgs[VERR_IMAGE_SUPPORT] = array("\x65\162\x72\157\162\x43\x6f\x64\x65" => VERR_IMAGE_SUPPORT, "\145\162\162\157\162\x4d\x65\163\x73\141\147\x65" => "\124\150\145\40\151\155\x61\x67\x65\40\164\x79\160\x65\x20\151\x73\x20\x6e\x6f\x74\40\163\x75\160\x70\x6f\x72\164"); $errorMsgs[VERR_IMAGE_LOAD] = array("\x65\162\x72\x6f\162\103\157\144\145" => VERR_IMAGE_LOAD, "\x65\162\x72\157\x72\x4d\145\x73\163\x61\147\x65" => "\124\x68\145\40\151\155\x61\147\x65\x20\151\163\x20\x6e\x6f\164\x20\x6c\x6f\141\x64"); $errorMsgs[VERR_IMAGE_SAVE] = array("\145\162\x72\x6f\x72\x43\157\x64\x65" => VERR_IMAGE_SAVE, "\x65\x72\x72\x6f\x72\x4d\x65\x73\163\141\147\x65" => "\x54\x68\x65\40\x69\x6d\141\147\145\40\x69\x73\x20\x6e\157\164\x20\x73\x61\x76\x65"); $errorMsgs[VERR_IMAGE_INVALID] = array("\x65\x72\x72\x6f\162\x43\x6f\x64\x65" => VERR_IMAGE_INVALID, "\145\x72\x72\157\x72\x4d\x65\163\163\x61\147\x65" => "\111\156\166\x61\154\151\x64\40\111\x6d\x61\147\x65\x20\164\171\x70\x65"); $errorMsgs[VERR_IMAGE_DAMAGED] = array("\145\x72\162\x6f\x72\x43\x6f\x64\x65" => VERR_IMAGE_DAMAGED, "\145\x72\162\x6f\x72\115\x65\x73\163\x61\147\145" => "\111\155\141\147\x65\40\x69\x73\40\144\x61\155\141\x67\x65\x64"); $errorMsgs[VERR_IMAGE_MEMORY] = array("\x65\x72\162\x6f\x72\x43\157\x64\145" => VERR_IMAGE_MEMORY, "\145\x72\x72\157\x72\x4d\x65\x73\x73\x61\147\145" => "\x54\x68\145\x72\145\40\x77\x61\163\40\x6e\157\x74\40\x65\x6e\157\165\x67\x68\x20\155\145\x6d\157\162\x79\x20\164\157\40\143\157\x6d\x70\154\x65\164\145\x20\164\x68\x65\x20\x6f\160\145\162\141\164\x69\x6f\x6e\x2e"); $errorMsgs[VERR_OPEN_SUCCESS] = array("\x65\x72\x72\x6f\x72\103\157\x64\145" => VERR_OPEN_SUCCESS, "\145\x72\162\x6f\x72\115\x65\163\163\x61\147\145" => "\x66\151\154\x65\x20\x6f\x70\x65\156\40\x73\x75\143\x63\x65\163\x73"); $errorMsgs[VERR_OPEN_FAILED] = array("\145\x72\x72\x6f\162\x43\157\144\x65" => VERR_OPEN_FAILED, "\x65\162\162\x6f\x72\x4d\145\163\163\x61\147\x65" => "\106\x61\151\x6c\145\x64\x20\164\x6f\40\x6f\160\145\x6e\40\146\151\x6c\145"); $errorMsgs[VERR_OPEN_PATH] = array("\145\162\x72\x6f\x72\x43\157\144\145" => VERR_OPEN_PATH, "\145\x72\162\x6f\x72\115\x65\x73\x73\141\147\x65" => "\164\x68\x65\40\x70\141\164\150\40\144\157\x65\x73\x20\x6e\x6f\x74"); $errorMsgs[VERR_OPEN_TYPE] = array("\x65\162\x72\157\x72\x43\157\144\145" => VERR_OPEN_TYPE, "\x65\162\162\x6f\162\x4d\x65\x73\x73\141\x67\145" => "\x74\171\x70\x65\x20\x69\x73\40\x69\156\x76\141\x6c\151\x64"); $errorMsgs[VERR_OPEN_SIZE] = array("\x65\162\162\157\162\x43\157\x64\145" => VERR_OPEN_SIZE, "\145\x72\162\157\162\x4d\145\x73\x73\x61\147\145" => "\146\151\x6c\x65\x20\163\x69\x7a\145\x20\x69\163\40\164\x6f\157\x20\x62\151\x67"); $errorMsgs[VERR_SAVE_SUCCESS] = array("\x65\x72\x72\157\162\103\157\144\145" => VERR_SAVE_SUCCESS, "\145\x72\162\157\x72\115\145\x73\163\141\147\145" => "\x66\151\154\145\40\163\x61\166\x65\x20\163\x75\x63\x63\145\x73\x73"); $errorMsgs[VERR_SAVE_FAILED] = array("\x65\162\162\157\162\103\157\x64\x65" => VERR_SAVE_FAILED, "\145\162\x72\157\x72\115\x65\163\163\x61\147\145" => "\x46\x61\151\154\x65\144\x20\164\157\40\163\141\166\145\40\x66\151\x6c\x65\x2e"); $errorMsgs[VERR_SAVE_NPATH] = array("\145\x72\x72\x6f\x72\103\x6f\144\x65" => VERR_SAVE_NPATH, "\145\x72\162\157\162\115\145\163\x73\x61\147\145" => "\164\x68\145\40\x70\141\164\x68\x20\144\x6f\145\x73\x20\156\157\x74"); $errorMsgs[VERR_SAVE_TYPE] = array("\x65\162\x72\157\x72\x43\157\144\145" => VERR_SAVE_TYPE, "\x65\162\162\157\162\x4d\145\163\x73\x61\147\x65" => "\164\171\160\x65\x20\151\x73\40\x69\x6e\x76\141\x6c\x69\x64"); $errorMsgs[VERR_SAVE_SPACE] = array("\x65\162\x72\x6f\x72\x43\x6f\144\x65" => VERR_SAVE_SPACE, "\x65\162\x72\157\162\x4d\x65\x73\163\x61\147\145" => "\x4e\117\40\123\160\141\143\145\40\164\157\40\x73\x61\166\x65"); $errorMsgs[VERR_SAVE_SIZE] = array("\145\x72\162\x6f\x72\x43\x6f\144\x65" => VERR_SAVE_SIZE, "\145\162\162\157\162\115\145\x73\x73\x61\147\x65" => "\x66\151\154\145\40\x73\151\x7a\145\x20\151\163\x20\x74\x6f\x6f\x20\x62\151\147"); $errorMsgs[VERR_VK_SUCCESS] = array("\145\x72\x72\157\x72\103\x6f\144\x65" => VERR_VK_SUCCESS, "\145\162\162\x6f\162\115\145\x73\x73\141\147\x65" => "\113\145\x79\x20\x69\156\160\165\164\x20\x73\x75\143\x63\x65\163\x73"); $errorMsgs[VERR_VK_INVALID] = array("\145\162\162\x6f\x72\103\157\x64\145" => VERR_VK_INVALID, "\x65\x72\162\157\162\115\145\163\163\x61\147\145" => "\113\x65\x79\x20\151\163\x20\x49\x6e\x76\x61\x6c\151\144"); $errorMsgs[VERR_LICENSE_NOKEY] = array("\145\162\162\157\x72\x43\x6f\x64\x65" => VERR_LICENSE_NOKEY, "\145\x72\162\157\x72\x4d\145\x73\x73\141\147\145" => "\x52\x65\x71\165\151\162\145\144\x20\x6b\145\171\40\x6e\x6f\x74\x20\141\x76\141\151\154\141\142\x6c\145"); $errorMsgs[VERR_LICENSE_KEYEXPIRED] = array("\x65\x72\162\157\162\x43\157\144\x65" => VERR_LICENSE_KEYEXPIRED, "\145\162\162\157\x72\x4d\145\x73\163\141\x67\145" => "\x4b\x65\171\40\150\141\163\x20\x65\170\x70\x69\x72\x65\x64"); $errorMsgs[VERR_LICENSE_KEYREVOKED] = array("\145\162\x72\x6f\x72\103\x6f\144\145" => VERR_LICENSE_KEYREVOKED, "\x65\162\162\x6f\162\x4d\x65\x73\x73\x61\x67\145" => "\x4b\145\x79\40\x68\x61\163\x20\x62\x65\x65\156\40\x72\145\x76\x6f\153\x65\x64"); $errorMsgs[VERR_LICENSE_KEYREJECTED] = array("\x65\162\162\x6f\162\103\157\x64\145" => VERR_LICENSE_KEYREJECTED, "\x65\x72\162\157\x72\x4d\x65\x73\x73\141\147\145" => "\113\x65\x79\x20\167\141\163\40\162\x65\x6a\145\x63\164\x65\x64\x20\142\171\40\x73\x65\162\166\151\143\145"); $errorMsgs[VERR_UTILITY_CONVERT_SUCCESS] = array("\x65\162\x72\x6f\x72\x43\157\x64\145" => VERR_UTILITY_CONVERT_SUCCESS, "\145\162\x72\x6f\x72\x4d\x65\x73\x73\x61\x67\x65" => ''); $errorMsgs[VERR_UTILITY_CONVERT_FILEOPEN_FAIL] = array("\x65\x72\162\x6f\x72\x43\x6f\x64\x65" => VERR_UTILITY_CONVERT_FILEOPEN_FAIL, "\x65\162\x72\157\162\115\145\163\163\x61\x67\x65" => ''); $errorMsgs[VERR_DELIVERER_ERROR] = array("\145\x72\x72\157\162\x43\x6f\144\x65" => VERR_DELIVERER_ERROR, "\x65\x72\162\157\162\115\145\163\163\141\147\145" => "\x46\151\154\x65\104\x65\x6c\151\x76\x65\162\145\162\x20\x64\151\x64\40\x6e\157\164\x20\167\x6f\162\x6b\40\160\162\157\160\x65\x72\x6c\171\56"); $errorMsgs[VERR_DELIVERER_LESS_MAXCACHESIZE] = array("\145\x72\x72\157\x72\103\x6f\x64\x65" => VERR_DELIVERER_LESS_MAXCACHESIZE, "\145\x72\x72\x6f\x72\115\145\x73\163\141\147\145" => "\x4d\141\x78\151\x6d\x75\155\40\143\x61\143\x68\x65\x20\163\x69\172\145\40\x6d\x75\x73\x74\40\142\145\40\x6c\141\x72\147\x65\162\x20\x74\x68\x61\156\x20\x6d\x69\156\151\155\x75\x6d\x20\x73\x69\172\x65"); $errorMsgs[VERR_DELIVERER_LESS_MINIMUM_MAXCACHESIZE] = array("\145\162\162\x6f\x72\x43\x6f\x64\x65" => VERR_DELIVERER_LESS_MINIMUM_MAXCACHESIZE, "\145\x72\162\x6f\x72\x4d\x65\x73\x73\x61\x67\145" => "\x43\x61\143\x68\x65\40\163\x70\x61\x63\145\x20\151\x73\40\147\x65\x74\164\x69\x6e\x67\40\154\157\167"); $errorMsgs[VERR_DELIVERER_CACHE_DB_QUERY] = array("\145\x72\162\x6f\x72\x43\x6f\x64\x65" => VERR_DELIVERER_CACHE_DB_QUERY, "\x65\162\x72\x6f\x72\115\145\163\163\141\147\145" => "\121\165\x65\x72\171\40\145\170\145\x63\165\164\151\x6f\156\40\145\x72\162\157\162"); $errorMsgs[VERR_DELIVERER_CACHE_DB_OPEN] = array("\145\162\x72\x6f\162\103\157\144\145" => VERR_DELIVERER_CACHE_DB_OPEN, "\x65\x72\162\157\162\x4d\x65\163\163\x61\147\x65" => "\104\x61\x74\141\142\x61\x73\145\x28\x43\x61\143\150\145\x54\141\x62\154\145\51\x20\x6f\x70\x65\156\x20\145\x72\x72\157\162"); $errorMsgs[VERR_DELIVERER_CACHE_FILE_SYSTEM] = array("\x65\x72\162\157\x72\103\157\144\x65" => VERR_DELIVERER_CACHE_FILE_SYSTEM, "\x65\x72\x72\x6f\162\x4d\x65\163\163\141\147\x65" => "\103\141\143\x68\145\40\x45\162\x72\157\x72\40\50\145\56\x67\x2e\40\103\162\x65\x61\164\151\x6e\x67\40\x63\141\143\150\145\40\x64\151\x72\x65\x63\164\157\x72\171\x29"); $errorMsgs[VERR_FILE_DELIVERER_CACHE_WARNING] = array("\x65\162\162\157\162\103\157\144\x65" => VERR_FILE_DELIVERER_CACHE_WARNING, "\x65\162\x72\157\x72\115\x65\x73\163\141\147\x65" => "\106\x69\x6c\145\x44\145\154\151\166\145\162\x65\x72\x20\x77\x61\162\156\x69\x6e\x67"); $errorMsgs[VERR_DELIVERER_NETWORK_CONNECTION] = array("\x65\x72\x72\x6f\162\x43\157\144\x65" => VERR_DELIVERER_NETWORK_CONNECTION, "\x65\162\162\x6f\x72\115\145\x73\x73\141\x67\x65" => "\x43\157\156\156\x65\x63\164\x69\157\x6e\40\x65\x72\162\x6f\x72"); $errorMsgs[VERR_DELIVERER_NETWORK] = array("\145\x72\162\157\x72\x43\x6f\144\145" => VERR_DELIVERER_NETWORK, "\145\162\162\x6f\162\x4d\145\163\x73\x61\x67\145" => "\106\151\154\x65\115\x61\x6e\x61\x67\x65\162\x20\x65\162\x72\x6f\x72"); $errorMsgs[VERR_DELIVERER_NETWORK_DB_ERROR] = array("\x65\x72\162\157\x72\103\157\x64\145" => VERR_DELIVERER_NETWORK_DB_ERROR, "\145\162\162\157\x72\115\x65\x73\x73\x61\x67\145" => "\104\x61\x74\x61\142\x61\x73\145\x20\x65\162\x72\x6f\162\40\x69\x6e\40\x46\151\154\x65\115\x61\x6e\x61\x67\x65\x72"); $errorMsgs[VERR_DELIVERER_NETWORK_PROTOCOL_VERSION] = array("\145\x72\x72\x6f\162\103\157\144\x65" => VERR_DELIVERER_NETWORK_PROTOCOL_VERSION, "\145\162\162\x6f\x72\115\x65\x73\x73\x61\x67\145" => "\x53\x65\162\x76\x65\x72\x20\x70\x72\x6f\x74\x6f\x63\157\154\x20\x76\x65\x72\x73\x69\157\x6e\x20\x65\x72\x72\157\x72"); $errorMsgs[VERR_DELIVERER_FILEMANAGER_DISK_ERROR] = array("\145\x72\162\157\162\103\x6f\144\x65" => VERR_DELIVERER_FILEMANAGER_DISK_ERROR, "\x65\x72\x72\157\x72\115\x65\163\163\x61\147\145" => "\x46\x69\154\145\x4d\141\x6e\x61\147\145\x72\40\104\x69\x73\x6b\x20\145\x72\x72\157\x72"); $errorMsgs[VERR_DELIVERER_FILEMANAGER_FILE_EXISTS] = array("\145\x72\162\157\x72\103\157\144\145" => VERR_DELIVERER_FILEMANAGER_FILE_EXISTS, "\145\162\162\157\162\115\145\163\163\141\x67\x65" => "\x46\151\154\145\40\x61\x6c\x72\x65\141\x64\171\40\x65\170\151\163\164\163\x2e"); $errorMsgs[VERR_DELIVERER_COMMUNICATOR] = array("\145\x72\x72\x6f\x72\x43\x6f\144\x65" => VERR_DELIVERER_COMMUNICATOR, "\145\162\x72\x6f\162\x4d\x65\x73\163\141\147\145" => "\x43\157\155\x6d\x75\x6e\x69\x63\141\164\x6f\x72\40\145\162\x72\x6f\x72"); $errorMsgs[VERR_DELIVERER_SETTING] = array("\145\162\162\157\x72\103\x6f\144\145" => VERR_DELIVERER_SETTING, "\x65\x72\162\x6f\162\115\x65\163\x73\141\147\x65" => "\x43\x61\156\156\x6f\x74\40\154\157\x61\x64\x20\x74\150\x65\x20\x73\145\162\166\145\162\x20\143\x6f\x6e\146\151\147\165\x72\x61\164\x69\157\156\40\x66\x69\154\x65"); $errorMsgs[VERR_VTEZBRIDGE_REMOVEFILE] = array("\145\162\162\x6f\x72\103\157\x64\145" => VERR_VTEZBRIDGE_REMOVEFILE, "\145\x72\x72\x6f\162\115\145\x73\x73\x61\147\x65" => "\x46\141\x69\x6c\145\x64\x20\x74\x6f\x20\x72\145\155\x6f\166\145\x20\x66\x69\x6c\145"); $errorMsgs[VERR_VTEZBRIDGE_REMOVEDIR] = array("\x65\x72\x72\x6f\162\x43\x6f\144\145" => VERR_VTEZBRIDGE_REMOVEDIR, "\145\162\162\157\162\115\x65\163\163\x61\x67\x65" => "\106\x61\x69\x6c\145\144\x20\164\157\x20\x72\x65\x6d\x6f\x76\145\x20\x64\x69\x72\x65\x63\x74\x6f\162\x79"); $errorMsgs[VERR_VTEZBRIDGE_COPYFILE] = array("\x65\x72\162\x6f\162\x43\157\x64\145" => VERR_VTEZBRIDGE_COPYFILE, "\x65\x72\x72\157\x72\115\145\x73\163\141\x67\145" => "\106\x61\151\154\145\144\40\x74\x6f\x20\143\157\160\171\x20\x66\151\154\x65"); $errorMsgs[VERR_VTEZBRIDGE_MAKEDIR] = array("\145\x72\x72\x6f\x72\103\x6f\144\145" => VERR_VTEZBRIDGE_MAKEDIR, "\x65\x72\x72\x6f\x72\x4d\x65\x73\163\141\147\145" => "\106\x61\151\x6c\145\144\40\x74\x6f\40\x6d\141\x6b\145\40\144\151\162\145\143\164\x6f\162\171"); $errorMsgs[VERR_VTEZBRIDGE_UNCOMPRESS] = array("\x65\162\162\157\x72\x43\157\144\145" => VERR_VTEZBRIDGE_UNCOMPRESS, "\x65\x72\x72\157\x72\115\145\163\163\141\x67\145" => "\x46\x61\x69\x6c\145\x64\40\x74\157\x20\x75\x6e\x63\x6f\x6d\x70\x72\x65\163\x73\x20\x66\x69\x6c\145"); $errorMsgs[VERR_VTEZBRIDGE_COMPRESS] = array("\145\162\162\157\162\x43\157\x64\x65" => VERR_VTEZBRIDGE_COMPRESS, "\145\x72\x72\x6f\162\115\x65\x73\163\x61\x67\145" => "\x46\x61\x69\154\x65\144\x20\x74\x6f\x20\x63\x6f\x6d\160\x72\x65\163\163\40\x66\151\154\x65"); $errorMsgs[VERR_VTEZBRIDGE_WRITETAG] = array("\145\x72\x72\x6f\162\x43\157\144\145" => VERR_VTEZBRIDGE_WRITETAG, "\x65\x72\x72\157\x72\115\x65\x73\x73\141\147\x65" => "\x46\141\151\x6c\145\x64\40\164\157\x20\167\x72\151\164\x65\40\x74\x61\x67\x20\146\151\154\145"); $errorMsgs[VERR_VTEZBRIDGE_MISSINGATTRIBUTE] = array("\x65\x72\x72\x6f\162\x43\157\144\x65" => VERR_VTEZBRIDGE_MISSINGATTRIBUTE, "\x65\162\x72\157\162\x4d\145\x73\x73\x61\147\145" => "\115\x69\x73\x73\x69\x6e\x67\40\141\164\164\162\151\x62\x75\164\145\40\x76\141\154\x75\x65"); $errorMsgs[VERR_VTEZBRIDGE_WRONGATTRIBUTE] = array("\145\x72\x72\x6f\162\103\x6f\x64\145" => VERR_VTEZBRIDGE_WRONGATTRIBUTE, "\145\162\x72\157\162\x4d\145\163\163\x61\147\x65" => "\x57\162\x6f\156\x67\x20\141\x74\164\x72\151\142\x75\164\145\x20\x76\141\x6c\165\145"); $errorMsgs[VERR_VTEZBRIDGE_FILESUPPORTED] = array("\x65\162\162\157\x72\103\157\144\145" => VERR_VTEZBRIDGE_FILESUPPORTED, "\145\162\162\x6f\162\x4d\145\x73\163\141\x67\145" => "\106\x69\154\x65\40\164\x79\x70\x65\40\151\x73\x20\156\157\x74\x20\x73\165\x70\x70\157\162\164\145\x64"); $errorMsgs[VERR_VTEZBRIDGE_READTAG] = array("\x65\x72\162\x6f\x72\103\x6f\144\x65" => VERR_VTEZBRIDGE_READTAG, "\x65\162\x72\157\x72\115\x65\163\163\x61\147\x65" => "\106\x61\151\154\145\x64\x20\x74\157\40\x72\x65\x61\144\40\x74\141\x67\40\146\151\x6c\145"); $errorMsgs[VERR_MESSENGER_INVALID_LOGIN_INFO] = array("\145\x72\162\157\x72\103\x6f\x64\145" => VERR_MESSENGER_INVALID_LOGIN_INFO, "\x65\162\162\x6f\x72\115\145\x73\x73\141\147\x65" => ''); $errorMsgs[VERR_MESSENGER_NO_DELETE_GROUP] = array("\145\x72\x72\x6f\162\x43\157\144\x65" => VERR_MESSENGER_NO_DELETE_GROUP, "\145\162\162\157\x72\x4d\x65\163\x73\141\x67\145" => ''); $errorMsgs[VERR_MESSENGER_NO_RENAME_GROUP] = array("\145\162\162\157\x72\x43\157\x64\145" => VERR_MESSENGER_NO_RENAME_GROUP, "\145\x72\x72\x6f\x72\115\x65\163\x73\141\x67\145" => ''); $errorMsgs[VERR_VATECHHUB_ACC_SESSION_EXPIRED] = array("\x65\x72\162\157\x72\103\x6f\144\145" => VERR_VATECHHUB_ACC_SESSION_EXPIRED, "\x65\x72\x72\x6f\162\x4d\x65\x73\x73\141\147\x65" => "\101\x63\x63\157\x75\156\x74\40\x69\163\40\145\x78\160\151\x72\145\x64"); $errorMsgs[VERR_AUTH_MIN] = array("\x65\162\162\157\162\x43\157\144\145" => VERR_AUTH_MIN, "\x65\x72\162\157\162\115\x65\x73\x73\141\x67\x65" => ''); $errorMsgs[VERR_AUTH_UNAUTHENTICATED] = array("\x65\162\x72\x6f\x72\x43\x6f\x64\x65" => VERR_AUTH_UNAUTHENTICATED, "\x65\162\x72\157\162\115\145\x73\163\141\147\145" => "\111\156\166\x61\x6c\x69\x64\40\165\x73\145\x72\40\x6e\x61\155\145\x20\157\x72\40\160\141\163\x73\x77\x6f\162\x64"); $errorMsgs[VERR_AUTH_ACCOUNT_LOCKED] = array("\x65\x72\x72\x6f\162\103\x6f\x64\x65" => VERR_AUTH_ACCOUNT_LOCKED, "\145\x72\162\157\162\115\145\x73\163\x61\147\145" => "\x54\x68\x65\40\x61\143\x63\157\165\x6e\164\40\x69\x73\x20\154\x6f\143\x6b\x65\x64\56"); $errorMsgs[VERR_AUTH_INVALID_PASSWORD_FORMAT] = array("\145\162\x72\x6f\162\103\157\144\145" => VERR_AUTH_INVALID_PASSWORD_FORMAT, "\x65\162\162\157\162\x4d\x65\x73\x73\x61\147\x65" => "\111\x6e\x76\141\154\x69\144\x20\160\x61\163\x73\x77\x6f\x72\144\40\146\157\x72\155\141\164\56"); $errorMsgs[VERR_AUTH_PASSWORD_EXPIRING] = array("\145\162\x72\x6f\x72\x43\157\144\145" => VERR_AUTH_PASSWORD_EXPIRING, "\x65\162\162\x6f\162\x4d\x65\163\x73\141\x67\145" => "\120\x61\x73\x73\x77\157\162\x64\x20\x77\x69\154\154\40\x62\145\40\145\x78\160\151\162\x65\144\x20\x73\157\x6f\156\56"); $errorMsgs[VERR_AUTH_PASSWORD_EXPIRED] = array("\145\x72\162\157\x72\x43\x6f\x64\x65" => VERR_AUTH_PASSWORD_EXPIRED, "\145\162\x72\157\x72\115\145\x73\x73\x61\147\x65" => "\x50\141\x73\163\167\x6f\x72\x64\x20\151\x73\x20\x65\170\160\151\162\x65\x64\56"); $errorMsgs[VERR_AUTH_ACCESS_BLOCKED] = array("\x65\x72\x72\157\162\x43\157\144\145" => VERR_AUTH_ACCESS_BLOCKED, "\x65\162\162\x6f\x72\115\145\x73\x73\x61\147\x65" => "\x4e\157\x74\x20\x61\x6c\154\x6f\167\x20\164\x6f\40\x61\x63\x63\145\x73\163\x2e"); $errorMsgs[VERR_AUTH_JWT_MIN] = array("\145\162\x72\x6f\x72\x43\x6f\144\x65" => VERR_AUTH_JWT_MIN, "\x65\162\162\157\x72\x4d\x65\163\x73\141\x67\x65" => ''); $errorMsgs[VERR_AUTH_JWT_UNKNOWN] = array("\145\162\x72\157\162\103\x6f\x64\x65" => VERR_AUTH_JWT_UNKNOWN, "\x65\162\x72\157\x72\x4d\x65\163\163\x61\147\x65" => "\125\x6e\153\x6e\157\167\156\40\145\162\x72\x6f\162"); $errorMsgs[VERR_AUTH_JWT_INVALID_ARGUMENT] = array("\145\x72\x72\x6f\162\103\157\144\x65" => VERR_AUTH_JWT_INVALID_ARGUMENT, "\x65\162\x72\157\x72\x4d\145\x73\x73\x61\147\145" => "\x4b\145\x79\x20\155\x61\x79\40\156\157\164\40\x62\145\x20\145\155\160\164\171"); $errorMsgs[VERR_AUTH_JWT_UNEXPECTED_VALUE] = array("\x65\x72\162\157\x72\x43\x6f\x64\x65" => VERR_AUTH_JWT_UNEXPECTED_VALUE, "\x65\x72\162\x6f\162\x4d\145\x73\x73\141\x67\x65" => "\x55\x6e\x65\x78\160\145\x63\x74\x65\144\40\x76\x61\154\165\145\x73"); $errorMsgs[VERR_AUTH_JWT_TOKEN_EXPIRED] = array("\x65\x72\162\x6f\x72\103\x6f\144\x65" => VERR_AUTH_JWT_TOKEN_EXPIRED, "\x65\x72\x72\x6f\162\x4d\x65\x73\163\x61\147\145" => "\101\x75\164\x68\x20\x74\x6f\x6b\145\x6e\x20\150\141\163\x20\x65\x78\160\x69\162\x65\144"); $errorMsgs[VERR_AUTH_JWT_BEFORE_VALID] = array("\x65\162\x72\x6f\x72\103\157\144\x65" => VERR_AUTH_JWT_BEFORE_VALID, "\x65\x72\x72\157\162\x4d\145\163\x73\141\x67\x65" => "\x43\141\156\156\x6f\164\40\x68\141\x6e\x64\x6c\x65\x20\x74\x6f\x6b\x65\x6e\x20\x70\162\x69\157\162\40\x74\157\x20\147\151\166\145\156\x20\144\141\x74\145\164\x69\x6d\x65"); $errorMsgs[VERR_AUTH_JWT_SIGNATURE_INVALID] = array("\145\162\x72\x6f\162\x43\x6f\x64\145" => VERR_AUTH_JWT_SIGNATURE_INVALID, "\145\x72\x72\157\162\115\x65\x73\x73\141\147\145" => "\123\x69\147\156\x61\x74\165\x72\145\40\x76\x65\x72\151\x66\x69\x63\141\x74\x69\x6f\x6e\x20\146\x61\x69\154\x65\x64"); $errorMsgs[VERR_AUTH_JWT_DOMAIN_ERROR] = array("\x65\x72\162\157\x72\103\x6f\144\145" => VERR_AUTH_JWT_DOMAIN_ERROR, "\145\x72\x72\x6f\x72\115\145\163\x73\141\147\x65" => "\x44\x6f\x6d\141\151\156\40\x65\162\x72\157\x72"); $errorMsgs[VERR_AUTH_JWT_TOKEN_INACTIVE] = array("\145\162\x72\x6f\x72\x43\x6f\144\145" => VERR_AUTH_JWT_TOKEN_INACTIVE, "\x65\x72\162\157\162\115\x65\163\163\141\x67\x65" => "\x4a\127\124\40\164\x6f\153\145\156\x20\151\x73\x20\x69\156\141\x63\x74\x69\x76\x65\x2e"); $errorMsgs[VERR_AUTH_JWT_MAX] = array("\x65\162\x72\x6f\x72\103\x6f\x64\x65" => VERR_AUTH_JWT_MAX, "\x65\162\x72\x6f\162\115\x65\x73\163\141\x67\145" => ''); $errorMsgs[VERR_AUTH_MAX] = array("\x65\x72\162\x6f\x72\103\157\144\145" => VERR_AUTH_MAX, "\x65\162\x72\157\162\x4d\x65\x73\x73\x61\147\x65" => ''); $errorMsgs[VERR_PHP_MIN] = array("\145\x72\x72\x6f\x72\103\157\x64\x65" => VERR_PHP_MIN, "\145\x72\162\x6f\x72\115\x65\x73\163\x61\x67\x65" => ''); $errorMsgs[VERR_PHP_ERROR] = array("\x65\162\162\x6f\x72\x43\x6f\144\145" => VERR_PHP_ERROR, "\145\x72\162\x6f\x72\115\x65\x73\x73\141\147\x65" => "\x55\x6e\x6b\156\x6f\167\x6e\40\x50\x48\120\40\145\x72\162\x6f\x72"); $errorMsgs[VERR_PHP_SYSTEM] = array("\x65\162\x72\157\162\x43\157\x64\x65" => VERR_PHP_SYSTEM, "\x65\x72\162\157\x72\x4d\x65\163\x73\x61\147\145" => "\x55\156\x6b\x6e\x6f\x77\x6e\40\x50\x48\x50\x20\x53\x79\163\x74\x65\x6d\40\x65\x72\162\157\162"); $errorMsgs[VERR_PHP_MAX] = array("\145\x72\162\157\x72\x43\x6f\x64\145" => VERR_PHP_MAX, "\145\162\162\x6f\x72\115\145\163\163\x61\147\x65" => ''); $errorMsgs[VERR_EZMOBILE_IOSENSOR_MIN] = array("\145\x72\162\x6f\162\103\157\144\x65" => VERR_EZMOBILE_IOSENSOR_MIN, "\x65\x72\x72\x6f\x72\115\145\x73\x73\x61\147\x65" => ''); $errorMsgs[VERR_EZMOBILE_IOSENSOR_FAILED_TO_ACQUIRE] = array("\145\x72\162\157\x72\x43\157\144\x65" => VERR_EZMOBILE_IOSENSOR_FAILED_TO_ACQUIRE, "\145\x72\162\157\162\115\x65\163\x73\x61\147\145" => "\106\141\x69\x6c\145\x64\40\164\x6f\x20\141\x63\x71\x75\x69\162\145\40\141\x6e\40\x69\155\141\x67\x65\40\146\162\157\155\40\x49\117\x20\123\145\x6e\163\157\x72\x2e"); $errorMsgs[VERR_EZMOBILE_IOSENSOR_MAX] = array("\145\x72\162\x6f\x72\103\x6f\144\145" => VERR_EZMOBILE_IOSENSOR_MAX, "\x65\x72\x72\x6f\162\115\145\163\163\x61\x67\x65" => ''); return $errorMsgs; } } diff --git a/server/original/www/ezwebserver/src/application/controllers/Rest_server.php b/server/original/www/ezwebserver/src/application/controllers/Rest_server.php index 628ef69..e3405c0 100644 --- a/server/original/www/ezwebserver/src/application/controllers/Rest_server.php +++ b/server/original/www/ezwebserver/src/application/controllers/Rest_server.php @@ -1,7 +1,7 @@ load->helper("\x75\x72\x6c"); $this->load->view("\162\x65\x73\164\137\x73\x65\162\x76\145\162"); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/Welcome.php b/server/original/www/ezwebserver/src/application/controllers/Welcome.php index 79b4a99..f117a44 100644 --- a/server/original/www/ezwebserver/src/application/controllers/Welcome.php +++ b/server/original/www/ezwebserver/src/application/controllers/Welcome.php @@ -1,7 +1,7 @@ load->helper("\x75\x72\154"); $this->load->view("\x77\x65\x6c\143\x6f\x6d\x65\x5f\155\x65\163\163\141\147\145"); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Analytics.php b/server/original/www/ezwebserver/src/application/controllers/v1/Analytics.php index 6d041da..6a585c3 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Analytics.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Analytics.php @@ -1,7 +1,7 @@ post("\145\x76\x65\156\x74\124\171\x70\145"); if (isset($eventType) === FALSE || empty($eventType)) { vt_loge("\145\x76\145\x6e\x74\163\137\160\x6f\x73\x74\x20\101\160\x69\x2e\x20" . "\124\150\x65\40\x65\x76\145\156\x74\124\x79\x70\145\40\151\163\40\156\157\x74\x20\163\145\x74\40\157\162\x20\x65\155\160\x74\171\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->Events_model->post_Events($this->post()); return $this->set_response(createResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } public function EventsR2_post() { $eventType = $this->post("\145\166\x65\x6e\x74\124\171\x70\145"); $appName = $this->post("\141\x70\x70\x4e\x61\x6d\x65"); $userName = $this->post("\x75\163\145\x72\x4e\x61\155\145"); $message = $this->post("\155\x65\163\163\141\x67\x65"); if (isset($eventType) === FALSE || empty($eventType)) { vt_loge("\145\166\145\156\x74\x73\x5f\x70\157\x73\164\x20\x41\x70\x69\x2e\40" . "\x54\x68\145\40\x65\x76\x65\156\164\124\171\160\145\x20\151\x73\40\x6e\157\x74\x20\163\145\164\40\x6f\162\x20\x65\155\x70\x74\x79\56"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } vt_log_evt(get_called_class(), $eventType, $message, $userName, $appName, "\x4e\57\101"); return $this->set_response(createResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } public function EventsForSearch_post() { $parametersOfPostEvents = $this->post("\x70\x61\162\141\155\x65\164\x65\162\163\x4f\x66\120\x6f\x73\164\105\x76\x65\156\x74\x73"); $data = $this->Events_model->post_EventsForSearch($this->post()); if ($data["\145\x72\162\x6f\x72\x43\157\x64\145"] === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\x72\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } $this->set_response(["\x65\x72\162\157\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\x43\157\144\x65"], "\x6e\x75\155\x54\157\x74\x61\154\x45\x76\145\x6e\x74\163" => $data["\x6e\165\x6d\x54\x6f\164\141\x6c\x45\166\x65\156\x74\163"], "\160\141\147\x65\144\105\x76\145\156\x74\163" => $data["\160\141\x67\145\x64\105\x76\145\156\164\x73"]], REST_Controller::HTTP_OK); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Auth.php b/server/original/www/ezwebserver/src/application/controllers/v1/Auth.php index 8ffd147..c7c9b3e 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Auth.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Auth.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function Ping_get() { $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\x65" => VERR_COMMON_SUCCESS, "\155\x65\x73\x73\x61\x67\x65" => "\x50\x6f\x6e\x67"], REST_Controller::HTTP_OK); } public function LogIn_post() { load_model($this, "\x41\x75\164\150\145\156\164\x69\143\x61\164\x69\157\x6e\x5f\x6d\157\x64\145\154"); $result = $this->Authentication_model->post_LogIn($this->post()); if ($result["\145\x72\x72\157\x72\x43\157\144\145"] !== VERR_COMMON_SUCCESS) { $this->set_response(returnSetResponse($result["\x65\162\162\157\x72\103\x6f\144\x65"]), REST_Controller::HTTP_UNAUTHORIZED); } else { $this->set_response(["\x65\x72\x72\157\x72\103\x6f\144\x65" => $result["\145\162\162\x6f\x72\103\157\x64\x65"], "\x74\157\x6b\145\156" => $result["\152\x77\x74"]], REST_Controller::HTTP_OK); } } public function appLogin_post() { load_model($this, "\x41\x75\164\x68\x65\156\164\x69\143\x61\x74\151\157\156\137\155\x6f\x64\145\154"); $result = $this->Authentication_model->post_appLogin($this->post()); if ($result["\x65\x72\162\157\x72\103\157\144\x65"] !== VERR_COMMON_SUCCESS) { $this->set_response(returnSetResponse($result["\x65\x72\162\157\162\x43\x6f\x64\x65"]), REST_Controller::HTTP_UNAUTHORIZED); } else { $this->set_response(["\145\162\162\157\162\x43\157\x64\145" => $result["\145\x72\162\x6f\162\x43\157\144\145"], "\164\157\x6b\x65\x6e" => $result["\x6a\167\164"]], REST_Controller::HTTP_OK); } } public function AppLogInR2_post() { load_model($this, "\101\165\164\150\145\156\164\151\x63\x61\x74\x69\x6f\156\122\x32\x5f\x6d\x6f\144\x65\154"); $result = $this->AuthenticationR2_model->post_appLoginR2($this->post()); if ($result["\x65\x72\162\x6f\x72\103\x6f\x64\x65"] == VERR_COMMON_SUCCESS || $result["\145\162\x72\x6f\162\x43\157\144\145"] == VERR_AUTH_PASSWORD_EXPIRING || $result["\145\x72\162\157\162\103\157\144\x65"] == VERR_AUTH_PASSWORD_EXPIRED) { $this->set_response(["\145\x72\x72\x6f\x72\103\x6f\144\x65" => $result["\145\162\162\157\x72\x43\157\x64\x65"], "\164\157\x6b\145\x6e" => $result["\x6a\x77\164"]], REST_Controller::HTTP_OK); } else { if ($result["\145\162\162\x6f\x72\103\157\144\145"] == VERR_AUTH_ACCESS_BLOCKED) { $this->set_response(returnSetResponse($result["\145\162\x72\x6f\162\x43\x6f\144\145"]), REST_Controller::HTTP_FORBIDDEN); } else { $this->set_response(["\x65\x72\x72\157\162\103\x6f\x64\145" => $result["\x65\162\162\157\x72\103\157\x64\x65"], "\x65\x72\162\157\x72\x4d\145\163\x73\x61\x67\x65" => $result["\x65\162\x72\157\162\115\x65\x73\x73\141\147\145"], "\141\x63\x63\157\x75\156\x74\114\157\x63\153\157\165\164\124\150\x72\x65\x73\150\157\x6c\x64" => $result["\x61\143\x63\x6f\165\156\164\114\157\x63\153\157\x75\x74\124\150\162\x65\163\150\157\154\144"], "\146\x61\151\x6c\145\144\114\157\x67\x69\156\x43\x6f\x75\x6e\x74" => $result["\146\141\x69\x6c\145\144\114\157\147\151\156\x43\157\165\156\x74"]], REST_Controller::HTTP_UNAUTHORIZED); } } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Consultds.php b/server/original/www/ezwebserver/src/application/controllers/v1/Consultds.php index 8508bb8..6a83a09 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Consultds.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Consultds.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function Contents_post() { $strContentName = $this->post("\x73\x74\162\x43\157\x6e\164\145\x6e\x74\x4e\x61\155\145"); $strContentFilePath = $this->post("\163\x74\162\x43\x6f\156\x74\145\156\164\x46\x69\x6c\x65\x50\x61\164\150"); $nContentType = $this->post("\x6e\103\x6f\x6e\164\x65\x6e\164\124\171\160\145"); $bFavorite = $this->post("\142\106\141\x76\157\x72\151\164\x65"); $nCategoryId = $this->post("\156\x43\141\x74\145\x67\157\162\x79\x49\x64"); if (!isset($nCategoryId) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x6f\x6e\x74\145\x6e\164\163\x5f\155\157\144\x65\x6c"); $ret = $this->Contents_model->post_Contents($strContentName, $strContentFilePath, $nContentType, $bFavorite, $nCategoryId); if ($ret > 0) { return $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CategoriesById_get() { $nCategoryId = urldecode($this->get("\151\144")); if (empty($nCategoryId) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\x74\145\147\157\162\151\145\163\137\155\x6f\x64\x65\x6c"); $ret = $this->Categories_model->get_CategoriesById($nCategoryId); $category = array(); if (count($ret) > 0) { $category = new SConsultCategory(); $category->strCategoryName = $ret[0]["\163\x63\x5f\x63\x61\x74\145\x67\x6f\x72\x79\x5f\x6e\x61\x6d\x65"]; $category->nParentsId = intval($ret[0]["\163\x63\x5f\143\x61\x74\145\147\x6f\x72\171\137\160\x61\162\x65\156\x74\x73\x5f\x69\144"]); $category->nCategoryOrderNumber = intval($ret[0]["\163\143\137\143\x61\x74\145\x67\x6f\x72\171\x5f\157\162\144\x65\x72\x5f\151\x64"]); $category->bIsCarted = setBoolVal($ret[0]["\163\143\x5f\143\141\164\145\147\x6f\x72\x79\x5f\x63\141\x72\164\145\x64"]); $category->nCategoryType = intval($ret[0]["\x73\x63\137\143\x61\x74\x65\147\x6f\x72\x79\137\164\x79\160\x65"]); $category->bIsLocked = setBoolVal($ret[0]["\x73\143\137\x63\141\164\145\x67\157\162\x79\x5f\154\157\x63\x6b\145\x64"]); return $this->set_response(array("\x65\162\162\x6f\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\x72\103\157\x64\x65"], "\143\141\164\145\147\157\162\171" => $category), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\145\162\x72\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\x72\103\157\144\145"], "\x63\141\x74\145\x67\157\x72\x79" => $category), REST_Controller::HTTP_OK); } } public function CategoriesByID_delete() { $nCategoryId = urldecode($this->get("\151\144")); if (empty($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\164\145\x67\157\x72\x69\x65\x73\x5f\155\157\x64\x65\154"); $ret = $this->Categories_model->delete_CategoriesByID($nCategoryId); if ($ret > 0) { return $this->set_response(["\145\162\x72\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\103\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CartedCategories_get() { load_model($this, "\x43\141\x72\x74\x65\144\x43\141\x74\x65\x67\157\162\151\145\163\137\155\x6f\x64\145\x6c"); $ret = $this->CartedCategories_model->get_CartedCategories(); $vecCategories = array(); if (count($ret) > 0) { for ($i = 0; $i < count($ret); $i++) { $category["\x6e\x43\141\x74\145\147\x6f\x72\171\111\144"] = intval($ret[$i]["\x73\x63\x5f\143\141\x74\x65\147\157\162\x79\x5f\151\144"]); $category["\163\164\162\x43\141\x74\145\x67\x6f\162\171\x4e\x61\x6d\145"] = $ret[$i]["\163\143\137\143\x61\164\x65\x67\157\162\171\x5f\x6e\141\x6d\x65"]; $category["\156\120\x61\x72\x65\x6e\x74\x73\x49\144"] = intval($ret[$i]["\x73\143\x5f\143\x61\x74\145\147\157\x72\x79\137\160\141\162\145\156\164\163\137\151\144"]); $category["\156\103\141\x74\145\147\157\x72\x79\117\x72\144\x65\162\x4e\165\155\x62\x65\162"] = intval($ret[$i]["\163\x63\137\x63\141\x74\145\147\157\x72\171\137\x6f\162\x64\x65\162\137\x69\144"]); $category["\x62\111\163\x43\141\x72\x74\x65\144"] = setBoolVal($ret[$i]["\163\143\x5f\143\x61\x74\145\x67\x6f\162\x79\x5f\143\141\162\x74\x65\x64"]); $category["\x6e\x43\x61\164\x65\x67\x6f\x72\171\x54\x79\160\145"] = intval($ret[$i]["\163\x63\137\x63\141\x74\x65\147\x6f\162\x79\137\164\171\x70\x65"]); $category["\x62\111\x73\x4c\157\x63\153\145\x64"] = setBoolVal($ret[$i]["\163\143\137\x63\x61\164\145\x67\x6f\162\x79\x5f\154\157\x63\x6b\x65\144"]); array_push($vecCategories, $category); } return $this->set_response(array("\x65\162\x72\157\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\103\x6f\144\145"], "\x76\145\x63\103\141\164\x65\147\157\162\171\114\x69\163\164" => $vecCategories), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\145\x72\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\103\x6f\x64\x65"], "\166\145\143\x43\x61\164\145\x67\157\x72\171\114\x69\163\164" => $vecCategories), REST_Controller::HTTP_OK); } } public function FavoritedContentsByLicense_get() { $strLicenseCondition = urldecode($this->get("\x6c\151\x63\x65\x6e\x73\145")); if (empty($strLicenseCondition)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x46\x61\x76\x6f\162\x69\x74\x65\x64\x43\157\156\x74\x65\x6e\164\x73\137\155\157\x64\x65\x6c"); $ret = $this->FavoritedContents_model->get_FavoritedContentsByLicense($strLicenseCondition); $vecFavoritedContents = array(); if (count($ret) > 0 && is_array($ret)) { for ($i = 0; $i < count($ret); $i++) { $SConsultContent = new SConsultContent(); $SConsultContent->nContentId = intval($ret[$i]["\x73\x63\137\143\x6f\156\164\x65\156\164\x5f\x69\144"]); $SConsultContent->strContentName = $ret[$i]["\x73\143\137\143\157\x6e\164\x65\x6e\x74\x5f\x6e\141\x6d\x65"]; $SConsultContent->strContentFilePath = $ret[$i]["\163\143\137\x63\157\x6e\x74\145\156\164\137\x66\151\x6c\x65\x70\x61\164\x68"]; $SConsultContent->nContentType = intval($ret[$i]["\x73\143\137\143\x6f\156\x74\x65\x6e\x74\x5f\164\171\160\145"]); $SConsultContent->dtLastAccessTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\x63\x5f\x63\x6f\x6e\164\x65\156\x74\x5f\154\141\x73\x74\x5f\141\143\143\x65\163\163"]); $SConsultContent->bFavorite = setBoolVal($ret[$i]["\x73\143\137\x63\157\x6e\164\x65\x6e\164\x5f\146\141\x76\157\162\x69\164\145"]); $SConsultContent->nCategoryId = intval($ret[$i]["\163\x63\x5f\x63\x61\164\x65\147\x6f\162\x79\x5f\151\x64"]); $SConsultContent->dtRegisteredTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\x73\143\137\x63\157\156\x74\145\156\164\137\162\145\x67\x69\163\x74\145\162\145\x64"]); array_push($vecFavoritedContents, $SConsultContent); } return $this->set_response(array("\x65\x72\162\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\103\157\x64\x65"], "\166\145\x63\106\x61\x76\x6f\x72\151\x74\145\x64\x43\157\x6e\x74\x65\x6e\164\163" => $vecFavoritedContents), REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(array("\145\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\x6f\144\x65"], "\x76\x65\x63\x46\141\x76\x6f\162\151\164\145\x64\103\x6f\x6e\x74\x65\x6e\x74\x73" => $vecFavoritedContents), REST_Controller::HTTP_OK); } } } public function CategoriesByIDAndNewName_patch() { $nCategoryId = urldecode($this->get("\151\x64")); $strNewCategoryName = urldecode($this->get("\x6e\x61\x6d\x65")); if (empty($nCategoryId) || !is_numeric($nCategoryId) || empty($strNewCategoryName)) { vt_loge(sprintf("\133\45\163\x5d\x3a\x20\x63\x61\164\x65\x67\x6f\x72\171\x49\x64\40\x6f\162\x20\156\x65\167\103\x61\164\145\147\x6f\162\x79\x4e\x61\x6d\145\x20\151\163\x20\x65\155\160\x74\171\x2e\40\x5b\45\163\x5d\133\x25\x73\x5d", __METOHD__, $nCategoryId, $strNewCategoryName)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $strNewCategoryName = urldecode($strNewCategoryName); load_model($this, "\103\141\x74\x65\147\x6f\x72\151\x65\x73\137\x6d\x6f\x64\145\x6c"); $ret = $this->Categories_model->patch_CategoriesByIDAndNewName($nCategoryId, $strNewCategoryName); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ContentsByLicenseForRecently_get() { $strLicenseCondition = urldecode($this->get("\x6c\x69\143\x65\156\163\145")); if (empty($strLicenseCondition)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x6f\156\164\x65\156\164\x73\x5f\x6d\x6f\144\145\154"); $ret = $this->Contents_model->get_ContentsByLicenseForRecently($strLicenseCondition); $contentList = array(); if (count($ret) > 0 && is_array($ret)) { for ($i = 0; $i < count($ret); $i++) { $content = new SConsultContent(); $content->nContentId = intval($ret[$i]["\x73\143\x5f\143\x6f\x6e\x74\145\156\x74\x5f\x69\144"]); $content->strContentName = $ret[$i]["\163\143\137\x63\x6f\156\164\145\156\164\137\156\x61\155\x65"]; $content->strContentFilePath = $ret[$i]["\x73\143\137\x63\x6f\156\164\145\x6e\164\137\x66\x69\154\145\160\x61\164\x68"]; $content->nContentType = intval($ret[$i]["\163\143\x5f\143\x6f\x6e\x74\x65\x6e\x74\137\164\171\x70\145"]); $content->dtLastAccessTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\x73\x63\x5f\x63\157\156\164\x65\156\x74\x5f\x6c\x61\x73\164\x5f\x61\x63\x63\145\x73\x73"]); $content->bFavorite = setBoolVal($ret[$i]["\x73\x63\x5f\x63\x6f\156\164\145\x6e\x74\x5f\x66\141\166\x6f\162\151\164\x65"]); $content->nCategoryId = intval($ret[$i]["\x73\143\137\143\x61\164\145\147\157\162\x79\137\x69\x64"]); $content->dtRegisteredTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\x63\x5f\143\157\156\x74\x65\156\x74\x5f\x72\145\147\x69\x73\x74\x65\162\145\x64"]); array_push($contentList, $content); } return $this->set_response(array("\x65\162\x72\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\103\x6f\144\145"], "\143\x6f\x6e\164\x65\156\164\x4c\x69\163\164" => $contentList), REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(array("\x65\x72\x72\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\x72\x43\157\144\145"], "\x63\x6f\x6e\164\145\x6e\164\114\x69\163\x74" => $contentList), REST_Controller::HTTP_OK); } } } public function CategoriesByIDAndNewParent_put() { $nCategoryId = urldecode($this->get("\151\x64")); $nNewParentsId = urldecode($this->get("\x6e\x65\167")); if (empty($nCategoryId) || !is_numeric($nCategoryId) || empty($nNewParentsId) || !is_numeric($nNewParentsId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\141\164\x65\x67\157\x72\x69\x65\163\x5f\155\157\144\145\x6c"); $ret = $this->Categories_model->put_CategoriesByIDAndNewParent($nCategoryId, $nNewParentsId); if ($ret > 0) { return $this->set_response(returnSetResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ContentsById_get() { $nContentId = urldecode($this->get("\151\144")); if (empty($nContentId) || !is_numeric($nContentId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\157\x6e\164\145\x6e\164\163\137\155\x6f\x64\x65\x6c"); $ret = $this->Contents_model->get_ContentsById($nContentId); if (count($ret) <= 0) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { $content = new SConsultContent(); $content->nContentId = intval($ret[0]["\x73\x63\x5f\143\x6f\156\x74\145\156\x74\137\151\x64"]); $content->strContentName = $ret[0]["\x73\x63\x5f\x63\157\x6e\164\x65\156\164\x5f\156\141\155\145"]; $content->strContentFilePath = $ret[0]["\x73\x63\x5f\143\x6f\156\x74\145\156\164\137\x66\x69\x6c\x65\x70\x61\x74\x68"]; $content->nContentType = intval($ret[0]["\163\x63\137\143\157\x6e\x74\145\x6e\x74\x5f\164\x79\x70\145"]); $content->dtRegisteredTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\163\143\x5f\x63\157\x6e\x74\x65\x6e\x74\x5f\162\x65\147\x69\163\x74\145\x72\145\144"]); $content->dtLastAccessTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\x73\x63\x5f\x63\157\156\x74\x65\156\164\x5f\154\x61\163\164\x5f\141\x63\143\x65\x73\x73"]); $content->bFavorite = setBoolVal($ret[0]["\163\x63\x5f\143\157\156\x74\145\156\x74\137\x66\x61\166\x6f\162\151\x74\145"]); $content->nCategoryId = intval($ret[0]["\163\x63\137\143\x61\x74\145\x67\x6f\x72\171\x5f\x69\x64"]); } return $this->set_response(array("\145\162\x72\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\103\x6f\x64\x65"], "\x63\157\156\x74\145\156\164" => $content), REST_Controller::HTTP_OK); } public function ContentsByID_delete() { $nContentId = urldecode($this->get("\x69\144")); if (empty($nContentId) || !is_numeric($nContentId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x6f\156\164\145\156\x74\163\137\155\x6f\144\145\x6c"); $ret = $this->Contents_model->delete_ContentsByID(intVal($nContentId)); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CategoriesByParentIdAndLicense_get() { $nParentID = urldecode($this->get("\x70\x61\162\x65\x6e\164\x69\144")); $strLicenseCondition = urldecode($this->get("\x6c\x69\x63\x65\156\x73\145")); if (!is_numeric($nParentID) || empty($nParentID) || empty($strLicenseCondition)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\x74\x65\x67\157\x72\151\x65\163\x5f\155\157\x64\x65\x6c"); $ret = $this->Categories_model->get_CategoriesByParentIdAndLicense($nParentID, $strLicenseCondition); $vecCategoryPassInfo = array(); if (count($ret) > 0 && is_array($ret)) { for ($i = 0; $i < count($ret); $i++) { $categoryInfo = new SConsultCategoryPassInfo(); $categoryInfo->sConsultCategory->nCategoryId = intval($ret[$i]["\163\x63\x5f\143\141\x74\x65\x67\x6f\x72\x79\137\151\x64"]); $categoryInfo->sConsultCategory->strCategoryName = $ret[$i]["\163\143\x5f\x63\x61\x74\145\x67\x6f\x72\x79\137\156\141\155\145"]; $categoryInfo->sConsultCategory->nParentsId = intval($ret[$i]["\163\143\x5f\143\x61\164\x65\x67\157\x72\171\x5f\x70\x61\162\145\x6e\x74\x73\x5f\x69\144"]); $categoryInfo->sConsultCategory->nCategoryOrderNumber = intval($ret[$i]["\163\x63\x5f\x63\x61\x74\x65\x67\157\x72\171\137\x6f\162\x64\145\162\x5f\x69\144"]); $categoryInfo->sConsultCategory->bIsCarted = setBoolVal($ret[$i]["\163\x63\137\x63\141\164\145\147\157\162\171\137\x63\141\x72\164\145\144"]); $categoryInfo->sConsultCategory->nCategoryType = intval($ret[$i]["\163\x63\x5f\143\141\164\145\x67\x6f\x72\171\x5f\x74\171\160\x65"]); $categoryInfo->sConsultCategory->bIsLocked = setBoolVal($ret[$i]["\163\143\137\x63\141\x74\x65\x67\x6f\162\171\137\154\x6f\143\153\x65\x64"]); if ($categoryInfo->sConsultCategory->nCategoryType != USER_CATEGORY_TYPE && empty($categoryInfo->sConsultCategory->strCategoryName) != true) { $categoryInfo->strLocaledCategoryName = ''; } array_push($vecCategoryPassInfo, $categoryInfo); } return $this->set_response(array("\x65\162\x72\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\x6f\144\145"], "\166\145\143\x43\141\x74\x65\x67\157\x72\171\x50\x61\163\163\x49\156\146\x6f" => $vecCategoryPassInfo), REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(array("\145\162\x72\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\x43\x6f\144\x65"], "\166\x65\x63\103\141\x74\145\x67\157\162\x79\x50\141\x73\163\x49\156\146\157" => $vecCategoryPassInfo), REST_Controller::HTTP_OK); } } } public function CopiedContentsForPath_post() { $strlContentFilePaths = $this->post("\163\164\162\x6c\x43\157\x6e\x74\x65\x6e\x74\106\151\x6c\x65\120\x61\x74\x68\x73"); if (empty($strlContentFilePaths) || !is_array($strlContentFilePaths)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $vecnNoCopiedContentId = array(); $strlNoCopiedContentPaths = array(); $vecnCopiedContentId = array(); $strlCopiedContentPaths = array(); load_model($this, "\103\x6f\x70\151\x65\x64\x43\157\156\x74\x65\156\x74\x73\137\x6d\157\144\145\154"); foreach ($strlContentFilePaths as $FilePath) { $ret = $this->CopiedContents_model->post_CopiedContentsForPath($FilePath); if (count($ret) == 1) { array_push($vecnNoCopiedContentId, intval($ret[0]["\x73\143\137\143\x6f\156\164\x65\x6e\x74\137\151\x64"])); array_push($strlNoCopiedContentPaths, $FilePath); } else { if (count($ret) > 1) { foreach ($ret as $row) { array_push($vecnCopiedContentId, intval($row["\163\143\x5f\x63\x6f\156\x74\145\156\x74\137\151\x64"])); array_push($strlCopiedContentPaths, $FilePath); } } else { return $this->set_response(array("\x65\x72\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\x72\x43\157\144\145"], "\166\x65\143\156\116\157\x43\157\160\x69\145\x64\103\x6f\156\x74\x65\156\x74\111\x64" => $vecnNoCopiedContentId, "\163\164\x72\x6c\x4e\157\103\x6f\160\151\145\144\103\x6f\156\164\x65\x6e\164\x50\141\x74\x68\163" => $strlNoCopiedContentPaths, "\166\x65\x63\x6e\103\157\160\151\145\x64\103\157\x6e\164\x65\x6e\x74\x49\x64" => $vecnCopiedContentId, "\163\164\162\x6c\103\x6f\160\x69\x65\x64\103\x6f\156\164\x65\156\x74\120\x61\164\x68\x73" => $strlCopiedContentPaths), REST_Controller::HTTP_OK); } } } return $this->set_response(["\x65\162\162\157\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\162\103\x6f\x64\145"], "\x76\145\143\x6e\x4e\157\x43\157\160\151\145\144\x43\157\x6e\164\145\x6e\164\x49\144" => $vecnNoCopiedContentId, "\163\x74\x72\154\116\157\103\x6f\x70\151\145\x64\103\x6f\x6e\164\x65\x6e\x74\x50\x61\x74\150\163" => $strlNoCopiedContentPaths, "\x76\x65\x63\x6e\x43\157\160\151\145\x64\x43\x6f\x6e\x74\x65\x6e\164\111\144" => $vecnCopiedContentId, "\163\164\x72\x6c\x43\157\160\x69\145\144\x43\x6f\x6e\x74\x65\x6e\164\x50\141\x74\150\x73" => $strlCopiedContentPaths], REST_Controller::HTTP_OK); } public function CopiedContentsById_get() { $nContentId = urldecode($this->get("\x69\x64")); if (empty($nContentId) || !is_numeric($nContentId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x6f\160\x69\145\144\103\x6f\156\164\145\156\164\x73\137\155\157\144\145\x6c"); $ret = $this->CopiedContents_model->get_CopiedContentsById($nContentId); $count = intval($ret[0]["\x63\157\x75\x6e\164"]); if ($count > 0) { $bIsCopied = true; } else { $bIsCopied = false; } return $this->set_response(array("\x65\162\x72\157\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\103\157\144\x65"], "\x62\111\163\x43\157\160\x69\145\144" => $bIsCopied), REST_Controller::HTTP_OK); } public function CategoriesByName_get() { $strCategory = urldecode($this->get("\156\141\x6d\145")); if (empty($strCategory)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $strCategory = urldecode($strCategory); load_model($this, "\103\x61\164\145\x67\157\162\x69\145\163\137\x6d\x6f\x64\145\x6c"); $ret = $this->Categories_model->get_CategoriesByName($strCategory); if (count($ret) <= 0) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { $category = new SConsultCategory(); $category->nCategoryId = intval($ret[0]["\x73\143\137\x63\141\164\x65\x67\x6f\x72\x79\x5f\x69\144"]); $category->strCategoryName = $ret[0]["\x73\x63\137\143\141\164\145\x67\x6f\162\171\x5f\156\x61\x6d\145"]; $category->nParentsId = intval($ret[0]["\x73\143\137\143\x61\164\145\147\157\x72\171\137\x70\x61\x72\145\156\x74\x73\137\x69\x64"]); $category->nCategoryOrderNumber = intval($ret[0]["\x73\x63\137\143\x61\164\x65\x67\157\x72\x79\x5f\157\x72\144\x65\162\x5f\151\x64"]); $category->bIsCarted = setBoolVal($ret[0]["\x73\143\137\x63\141\164\145\x67\x6f\x72\171\137\143\141\162\164\x65\144"]); $category->nCategoryType = intval($ret[0]["\x73\x63\x5f\x63\x61\x74\145\x67\x6f\x72\171\137\x74\171\x70\145"]); $category->bIsLocked = setBoolVal($ret[0]["\163\x63\x5f\143\x61\x74\145\147\x6f\x72\x79\x5f\x6c\157\143\153\x65\144"]); return $this->set_response(array("\145\162\x72\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\x43\x6f\144\145"], "\166\x65\x63\103\141\164\x65\147\157\162\x79\120\x61\x73\163\x49\x6e\146\157" => $category), REST_Controller::HTTP_OK); } } public function CartedCategoriesByLicense_get() { $strLicenseCondition = urldecode($this->get("\154\x69\x63\145\x6e\163\145")); if (empty($strLicenseCondition)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\141\x72\164\145\x64\103\x61\x74\145\x67\x6f\162\x69\x65\163\137\155\157\x64\145\x6c"); $ret = $this->CartedCategories_model->get_CartedCategoriesByLicense($strLicenseCondition); $vecCategory = array(); if (count($ret) > 0 && is_array($ret)) { foreach ($ret as $row) { $categoryInfo = new SConsultCategoryPassInfo(); $categoryInfo->sConsultCategory->nCategoryId = intval($row["\x73\x63\x5f\x63\141\x74\145\147\x6f\162\x79\137\151\144"]); $categoryInfo->sConsultCategory->strCategoryName = $row["\163\143\137\x63\x61\164\x65\x67\157\162\x79\137\156\x61\155\145"]; $categoryInfo->sConsultCategory->nParentsId = intval($row["\x73\143\137\x63\x61\164\145\147\157\162\x79\x5f\x70\141\162\x65\x6e\164\x73\137\x69\144"]); $categoryInfo->sConsultCategory->nCategoryOrderNumber = intval($row["\x73\x63\137\143\141\x74\145\x67\157\162\171\x5f\157\162\144\145\162\137\151\x64"]); $categoryInfo->sConsultCategory->bIsCarted = setBoolVal($row["\163\x63\x5f\x63\x61\164\145\147\x6f\162\x79\137\143\x61\162\x74\145\x64"]); $categoryInfo->sConsultCategory->nCategoryType = intval($row["\x73\x63\x5f\143\141\x74\x65\147\x6f\x72\171\x5f\x74\x79\x70\145"]); $categoryInfo->sConsultCategory->bIsLocked = setBoolVal($row["\163\143\137\x63\141\x74\x65\x67\x6f\x72\x79\x5f\154\x6f\143\x6b\x65\144"]); if ($categoryInfo->sConsultCategory->nCategoryType != USER_CATEGORY_TYPE && isset($categoryInfo->sConsultCategory->strCategoryName) != true) { $categoryInfo->sConsultCategory->strLocaledCategoryName = NULL; } array_push($vecCategory, $categoryInfo); } return $this->set_response(array("\145\162\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\103\x6f\144\x65"], "\x76\x65\x63\103\141\x74\x65\147\x6f\x72\171\120\x61\163\x73\111\156\146\x6f" => $vecCategory), REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(array("\145\x72\162\x6f\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\103\x6f\x64\x65"], "\x76\x65\143\x43\141\164\x65\147\x6f\162\x79\120\141\x73\163\111\x6e\146\157" => $vecCategory), REST_Controller::HTTP_OK); } } } public function ContentsByIDAndNewName_patch() { $nContentId = $this->patch("\156\103\x6f\156\164\145\x6e\x74\x49\x64"); $strNewContentName = $this->patch("\x73\x74\162\116\x65\x77\103\157\156\x74\145\156\164\x4e\x61\x6d\x65"); if (!isset($nContentId) || !is_numeric($nContentId) || !isset($strNewContentName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x6f\x6e\164\145\156\x74\163\137\x6d\x6f\144\145\154"); $ret = $this->Contents_model->patch_ContentsByIDAndNewName($nContentId, $strNewContentName); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function Categories_get() { load_model($this, "\x43\141\164\x65\x67\x6f\162\151\x65\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->Categories_model->get_Categories(); $vecCategoryList = array(); if (count($ret) < 1) { return $this->set_response(array("\145\162\x72\157\x72\103\157\144\x65" => returnSetResponse(VERR_DB_RANGE)["\x65\162\x72\x6f\x72\103\x6f\144\x65"], "\x76\145\143\x43\141\164\145\147\x6f\x72\x79\x4c\x69\x73\164" => $vecCategoryList), REST_Controller::HTTP_OK); } else { for ($i = 0; $i < count($ret); $i++) { $category = new SConsultCategory(); $category->nCategoryId = intval($ret[$i]["\163\143\137\143\141\x74\x65\x67\157\162\171\x5f\x69\144"]); $category->strCategoryName = $ret[$i]["\163\143\137\x63\141\164\x65\x67\x6f\x72\x79\137\156\141\155\145"]; $category->nParentsId = intval($ret[$i]["\x73\143\137\x63\x61\x74\x65\147\157\x72\x79\137\160\141\x72\145\156\164\163\x5f\x69\144"]); $category->nCategoryOrderNumber = intval($ret[$i]["\x73\143\x5f\x63\x61\x74\145\x67\157\162\x79\x5f\x6f\x72\x64\x65\x72\x5f\151\x64"]); $category->bIsCarted = setBoolVal($ret[$i]["\163\x63\x5f\x63\x61\164\x65\x67\157\x72\x79\137\x63\141\x72\x74\145\x64"]); $category->nCategoryType = intval($ret[$i]["\x73\143\x5f\x63\141\x74\x65\147\x6f\x72\x79\137\x74\171\160\145"]); $category->bIsLocked = setBoolVal($ret[$i]["\163\x63\x5f\143\141\164\145\x67\x6f\162\x79\137\154\157\143\153\x65\x64"]); array_push($vecCategoryList, $category); } } return $this->set_response(array("\145\x72\x72\157\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\x43\157\144\x65"], "\166\145\143\103\141\164\145\147\x6f\162\171\x4c\x69\163\164" => $vecCategoryList), REST_Controller::HTTP_OK); } public function Categories_post() { $parameters = $this->post(); if (!isset($parameters["\x73\164\x72\103\141\164\x65\x67\x6f\162\x79\x4e\x61\x6d\145"]) || !isset($parameters["\156\x50\x61\162\x65\156\164\x73\x49\x64"]) || !isset($parameters["\x6e\x43\x61\164\x65\x67\157\x72\x79\x4f\162\144\x65\x72\x4e\x75\155\142\x65\x72"]) || !isset($parameters["\156\103\x61\x74\x65\x67\157\162\x79\124\x79\160\145"]) || !isset($parameters["\142\111\163\103\141\x72\x74\x65\144"]) || !isset($parameters["\x62\111\163\114\157\x63\153\145\x64"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $parameters = array("\x73\x74\x72\x43\x61\x74\145\147\x6f\x72\171\116\141\155\145" => $parameters["\x73\164\162\x43\x61\x74\145\147\157\162\171\x4e\x61\155\x65"], "\156\120\x61\162\x65\156\x74\x73\x49\144" => $parameters["\156\120\141\162\x65\156\164\163\x49\144"], "\156\103\x61\x74\145\147\x6f\162\x79\117\162\x64\145\162\116\x75\x6d\x62\x65\x72" => $parameters["\x6e\x43\141\164\145\147\157\162\x79\x4f\x72\144\145\162\116\165\155\142\x65\162"], "\156\x43\141\164\145\147\x6f\x72\x79\x54\x79\160\x65" => $parameters["\x6e\103\141\x74\x65\147\x6f\162\171\124\x79\160\145"], "\142\111\x73\x43\x61\x72\x74\145\144" => $parameters["\142\111\163\x43\x61\162\x74\x65\144"], "\142\111\163\x4c\x6f\x63\x6b\145\144" => $parameters["\x62\x49\x73\x4c\x6f\143\153\145\144"]); load_model($this, "\x43\141\x74\x65\x67\157\x72\x69\x65\163\x5f\x6d\x6f\x64\145\x6c"); if ($parameters["\156\120\x61\162\x65\156\164\x73\x49\x64"] == 0) { $ret = $this->Categories_model->post_Categories($parameters); } else { $ret = $this->Categories_model->post_CategoriesWithnParentsIdIsNotZero($parameters); } if ($ret > 0) { return $this->set_response(array("\x65\162\x72\157\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\x43\x6f\x64\145"]), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CartedCategoriesByIDAndIsCarted_put() { $nCategoryId = $this->put("\x6e\x43\141\164\145\x67\x6f\x72\171\111\x64"); $bIsCarted = $this->put("\x62\111\163\103\x61\x72\x74\145\144"); if (!isset($nCategoryId) || !isset($bIsCarted) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\x72\164\x65\144\x43\141\164\145\147\157\x72\151\145\x73\x5f\x6d\157\144\x65\154"); $ret = $this->CartedCategories_model->put_CartedCategoriesByIDAndIsCarted($nCategoryId); if (count($ret) > 0) { $ret = $this->CartedCategories_model->put_CartedCategoriesByIDAndIsCartedReturnIsEmptyFalse($nCategoryId, $bIsCarted); } else { $ret = $this->CartedCategories_model->put_CartedCategoriesByIDAndIsCartedReturnIsEmptyTrue($nCategoryId, $bIsCarted); } if ($ret < 1) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } return $this->set_response(["\145\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } public function CartedCategoriesByIDAndIsCartedRecursively_put() { $nCategoryId = $this->put("\x6e\103\x61\x74\x65\147\x6f\x72\171\111\x64"); $bIsCarted = $this->put("\142\x49\x73\x43\141\162\164\x65\x64"); if (!isset($nCategoryId) || !isset($bIsCarted) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\162\x74\x65\x64\x43\x61\x74\145\147\157\162\x69\145\x73\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->CartedCategories_model->put_CartedCategoriesByIDAndIsCartedRecursively($nCategoryId, $bIsCarted); if ($ret < 1) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } return $this->set_response(["\145\x72\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\x6f\144\145"]], REST_Controller::HTTP_OK); } public function CategoriesByLicense_get() { $strLicenseCondition = urldecode($this->get("\x6c\151\x63\x65\x6e\163\145")); if (empty($strLicenseCondition)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\164\x65\147\157\x72\151\x65\163\x5f\155\x6f\x64\x65\x6c"); $ret = $this->Categories_model->get_CategoriesByLicense($strLicenseCondition); $vecCategoryList = array(); if (count($ret) > 0 && is_array($ret)) { for ($i = 0; $i < count($ret); $i++) { $categoryInfo = new SConsultCategoryPassInfo(); $categoryInfo->sConsultCategory->nCategoryId = intval($ret[$i]["\x73\x63\137\143\141\x74\x65\147\x6f\x72\x79\x5f\x69\144"]); $categoryInfo->sConsultCategory->strCategoryName = $ret[$i]["\163\x63\x5f\x63\141\x74\145\x67\157\162\x79\137\x6e\141\155\x65"]; $categoryInfo->sConsultCategory->nParentsId = intval($ret[$i]["\x73\x63\x5f\143\x61\164\145\x67\x6f\x72\171\x5f\x70\x61\x72\x65\156\164\163\x5f\x69\x64"]); $categoryInfo->sConsultCategory->nCategoryOrderNumber = intval($ret[$i]["\x73\143\137\x63\141\164\145\x67\x6f\162\x79\x5f\157\x72\144\145\162\x5f\x69\x64"]); $categoryInfo->sConsultCategory->bIsCarted = setBoolVal($ret[$i]["\x73\143\x5f\x63\x61\164\145\147\157\x72\x79\x5f\143\x61\x72\164\x65\144"]); $categoryInfo->sConsultCategory->nCategoryType = intval($ret[$i]["\x73\x63\137\x63\x61\x74\x65\147\157\x72\x79\x5f\164\x79\x70\x65"]); $categoryInfo->sConsultCategory->bIsLocked = setBoolVal($ret[$i]["\x73\x63\137\143\x61\164\x65\147\157\x72\171\137\x6c\157\x63\153\x65\x64"]); if ($categoryInfo->sConsultCategory->nCategoryType != USER_CATEGORY_TYPE && empty($categoryInfo->sConsultCategory->strCategoryName) != true) { $categoryInfo->strLocaledCategoryName = ''; } array_push($vecCategoryList, $categoryInfo); } return $this->set_response(array("\x65\162\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\157\144\145"], "\x76\x65\143\x43\x61\x74\145\147\x6f\162\171\x50\x61\x73\x73\111\156\146\x6f" => $vecCategoryList), REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(array("\145\162\162\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\x43\157\144\x65"], "\166\145\143\x43\x61\x74\x65\x67\157\162\171\x50\x61\163\x73\x49\156\146\x6f" => $vecCategoryList), REST_Controller::HTTP_OK); } } } public function FavoritedContents_get() { load_model($this, "\x46\141\x76\157\162\x69\164\x65\144\x43\157\156\164\x65\x6e\x74\163\x5f\155\157\144\x65\x6c"); $ret = $this->FavoritedContents_model->get_FavoritedContents(); $vecFavoritedContents = array(); if (count($ret) <= 0) { return $this->set_response(returnSetResponse(VERR_DB_RANGE), REST_Controller::HTTP_OK); } else { for ($i = 0; $i < count($ret); $i++) { $content = array(); $content["\x6e\x43\157\156\x74\145\156\164\111\x64"] = intval($ret[$i]["\x73\143\137\x63\157\156\x74\x65\156\164\137\x69\144"]); $content["\x73\x74\x72\103\x6f\x6e\x74\x65\x6e\164\116\x61\155\x65"] = $ret[$i]["\163\x63\137\x63\157\156\164\x65\156\164\x5f\156\x61\x6d\x65"]; $content["\163\164\x72\103\x6f\156\164\145\x6e\x74\106\151\154\145\120\x61\x74\x68"] = $ret[$i]["\x73\x63\x5f\143\x6f\156\x74\x65\156\164\x5f\x66\151\x6c\x65\160\x61\164\x68"]; $content["\x6e\x43\157\156\164\145\156\x74\x54\171\160\145"] = intval($ret[$i]["\x73\143\x5f\143\157\x6e\164\x65\156\164\x5f\x74\x79\x70\x65"]); $content["\x64\164\114\x61\x73\164\101\x63\x63\x65\163\163\x54\151\x6d\x65"] = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\x63\137\x63\x6f\x6e\164\x65\x6e\x74\137\154\x61\x73\164\137\141\143\x63\x65\163\163"]); $content["\142\106\x61\x76\x6f\162\151\x74\x65"] = setBoolVal($ret[$i]["\x73\x63\137\143\157\x6e\164\145\x6e\164\x5f\146\x61\166\157\162\151\164\145"]); $content["\156\103\x61\164\145\147\157\x72\171\x49\x64"] = intval($ret[$i]["\163\x63\137\143\x61\x74\145\x67\x6f\x72\x79\x5f\x69\144"]); $content["\x64\164\122\145\x67\151\163\x74\145\162\145\x64\x54\151\155\x65"] = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\143\x5f\x63\x6f\x6e\x74\145\156\x74\137\162\x65\147\x69\163\164\145\x72\145\x64"]); $content["\x6e\x43\141\x74\145\x67\x6f\x72\x79\124\171\x70\145"] = intval($ret[$i]["\x73\143\137\143\x61\x74\x65\147\x6f\162\x79\x5f\x74\x79\x70\x65"]); array_push($vecFavoritedContents, $content); } return $this->set_response(array("\145\x72\162\157\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\103\x6f\144\145"], "\x76\145\x63\x46\x61\x76\157\x72\151\164\x65\144\103\157\156\x74\x65\x6e\x74\x73" => $vecFavoritedContents), REST_Controller::HTTP_OK); } } public function FavoritedContentsByIsPremium_get() { $bIsPremium = strtoupper(urldecode($this->get("\151\163\x70\x72\x65\155\x69\165\155"))); if (!($bIsPremium === "\x54\x52\x55\x45" || $bIsPremium === "\x46\x41\x4c\123\x45")) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $bIsPremium = $bIsPremium === "\124\122\x55\105" ? true : false; load_model($this, "\106\141\x76\x6f\x72\x69\164\x65\144\x43\x6f\156\164\x65\x6e\164\x73\x5f\155\157\144\x65\x6c"); $ret = $this->FavoritedContents_model->get_FavoritedContentsByIsPremium($bIsPremium); $vecFavoritedContents = array(); if (count($ret) > 0) { for ($i = 0; $i < count($ret); $i++) { $content = array(); $content["\x6e\x43\157\156\164\x65\156\164\111\144"] = intval($ret[$i]["\163\143\x5f\x63\157\x6e\x74\145\x6e\x74\x5f\151\x64"]); $content["\x73\x74\162\x43\x6f\x6e\x74\145\156\x74\x4e\141\155\x65"] = $ret[$i]["\163\143\x5f\143\157\156\x74\145\156\x74\x5f\x6e\141\x6d\145"]; $content["\163\x74\162\x43\x6f\156\x74\145\x6e\164\106\x69\x6c\x65\120\x61\x74\150"] = $ret[$i]["\163\x63\x5f\143\157\156\x74\145\x6e\164\x5f\146\151\x6c\145\x70\141\x74\x68"]; $content["\x6e\103\x6f\156\164\x65\156\x74\x54\x79\160\145"] = intval($ret[$i]["\163\x63\137\x63\x6f\x6e\164\x65\156\x74\x5f\164\x79\x70\145"]); $content["\x64\x74\114\141\163\164\101\x63\x63\x65\x73\163\124\151\x6d\x65"] = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\x63\x5f\x63\x6f\x6e\x74\145\x6e\164\137\x6c\141\x73\x74\137\x61\143\143\145\163\x73"]); $content["\142\x46\141\166\x6f\x72\151\164\145"] = setBoolVal($ret[$i]["\x73\143\x5f\x63\157\x6e\x74\145\156\x74\x5f\x66\x61\166\157\162\x69\164\x65"]); $content["\156\103\x61\x74\145\147\x6f\162\171\x49\144"] = intval($ret[$i]["\x73\143\x5f\143\141\164\x65\147\x6f\162\x79\137\x69\144"]); $content["\144\x74\x52\x65\x67\151\x73\x74\x65\162\x65\x64\124\151\x6d\145"] = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\163\x63\x5f\143\157\x6e\x74\145\156\164\137\162\145\147\151\x73\164\145\x72\x65\144"]); $content["\x6e\x43\141\164\145\147\x6f\x72\x79\124\171\160\x65"] = intval($ret[$i]["\x73\x63\137\143\x61\x74\x65\147\x6f\162\x79\137\164\171\160\145"]); array_push($vecFavoritedContents, $content); } return $this->set_response(array("\145\x72\162\157\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\x43\157\144\x65"], "\166\145\x63\106\141\166\x6f\x72\151\x74\145\x64\103\157\156\x74\145\x6e\x74\163" => $vecFavoritedContents, "\142\x49\163\120\162\145\155\151\x75\155" => $bIsPremium), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\145\162\162\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\162\103\157\144\x65"], "\166\145\143\106\x61\166\157\x72\151\x74\145\x64\x43\157\156\x74\x65\x6e\164\163" => $vecFavoritedContents, "\x62\111\x73\x50\162\x65\x6d\151\165\155" => $bIsPremium), REST_Controller::HTTP_OK); } } public function CategoriesByIdForLocale_get() { $nCategoryId = urldecode($this->get("\x69\x64")); if (empty($nCategoryId) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\141\x74\145\147\157\x72\151\x65\x73\x5f\155\x6f\144\145\x6c"); $categoryPassInfo = $this->Categories_model->get_CategoriesByIdForLocale($nCategoryId); if ($categoryPassInfo == false) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\145\162\x72\157\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\x43\157\144\145"], "\143\x61\x74\x65\147\x6f\x72\x79\x50\141\163\163\x49\x6e\146\x6f" => $categoryPassInfo), REST_Controller::HTTP_OK); } } public function CategoriesByLocale_post() { $parameters = $this->post(); if (!isset($parameters["\x73\x43\x6f\x6e\x73\165\x6c\x74\x43\x61\164\145\147\157\162\x79"]["\156\120\x61\x72\x65\x6e\x74\163\111\144"]) || !is_numeric($parameters["\x73\103\x6f\x6e\x73\165\x6c\164\x43\141\164\x65\147\157\162\171"]["\156\120\x61\x72\145\x6e\x74\163\111\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\164\x65\x67\157\162\151\x65\x73\137\155\157\x64\145\154"); $ret = $this->Categories_model->post_CategoriesByLocale($parameters); if ($ret < 1) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } public function ContentsByCategoryId_post() { $nCategoryId = $this->post("\x6e\x43\141\164\145\147\x6f\162\x79\x49\x64"); $pageNum = $this->post("\160\141\147\145\116\165\x6d"); $numItems = $this->post("\156\165\155\111\164\145\x6d\x73"); $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; if (!isset($nCategoryId) || !is_numeric($nCategoryId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x6f\156\164\x65\156\x74\x73\x5f\x6d\157\144\145\154"); $ret = $this->Contents_model->post_ContentsByCategoryId($nCategoryId, $pageNum, $numItems); $contentList = array(); if (count($ret) > 0) { for ($i = 0; $i < count($ret); $i++) { $content = new SConsultContent(); $content->nContentId = intval($ret[$i]["\x73\x63\137\143\x6f\x6e\x74\145\156\164\137\151\x64"]); $content->strContentName = $ret[$i]["\x73\143\x5f\x63\x6f\x6e\164\145\156\164\137\x6e\141\155\145"]; $content->strContentFilePath = $ret[$i]["\163\x63\x5f\x63\x6f\x6e\x74\145\156\164\x5f\x66\x69\154\145\x70\141\x74\x68"]; $content->nContentType = intval($ret[$i]["\x73\143\137\x63\x6f\156\x74\145\x6e\164\137\164\171\x70\145"]); $content->dtRegisteredTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\x73\x63\137\143\157\156\164\145\156\x74\x5f\162\x65\x67\151\163\164\x65\x72\x65\x64"]); $content->dtLastAccessTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[$i]["\x73\x63\137\x63\x6f\156\x74\145\x6e\x74\x5f\154\x61\163\164\137\141\143\x63\x65\x73\163"]); $content->bFavorite = setBoolVal($ret[$i]["\163\143\x5f\143\x6f\x6e\x74\x65\156\x74\x5f\146\141\166\x6f\x72\151\164\x65"]); $content->nCategoryId = intval($ret[$i]["\x73\143\x5f\x63\x61\x74\145\x67\x6f\x72\x79\x5f\151\144"]); array_push($contentList, $content); } return $this->set_response(array("\145\162\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\x43\157\144\x65"], "\x63\x6f\x6e\164\145\x6e\164\114\x69\x73\164" => $contentList), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\x72\162\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\x72\103\x6f\x64\145"], "\143\157\156\x74\145\156\164\x4c\x69\x73\x74" => $contentList), REST_Controller::HTTP_OK); } } public function ContentsByIDForLastAccess_put() { $nContentId = $this->put("\156\103\157\x6e\x74\145\x6e\x74\x49\144"); if (!isset($nContentId) || !is_numeric($nContentId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\157\x6e\164\145\156\x74\x73\137\x6d\157\144\145\154"); $ret = $this->Contents_model->put_ContentsByIDForLastAccess($nContentId); if ($ret > 0) { return $this->set_response(array("\x65\162\162\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\103\157\144\145"]), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function FavoritedCategoriesByContentIDAndIsFavorite_put() { $nContentId = $this->put("\x6e\103\157\x6e\164\x65\x6e\x74\111\x64"); $bIsFavorite = $this->put("\142\111\163\106\x61\x76\157\x72\151\164\145"); if (!isset($nContentId) || !is_numeric($nContentId) || !isset($bIsFavorite)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\106\x61\166\x6f\162\151\164\x65\144\103\141\x74\145\x67\157\162\151\145\163\137\155\x6f\x64\145\154"); $ret = $this->FavoritedCategories_model->put_FavoritedCategoriesByContentIDAndIsFavorite($nContentId); if (count($ret) < 1) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } $bFavorite = $ret["\163\143\x5f\x63\157\x6e\164\145\156\164\137\146\141\x76\x6f\x72\151\x74\x65"] === "\x74"; if ($bFavorite != $bIsFavorite) { $ret = $this->FavoritedCategories_model->put_FavoritedCategoriesByContentIDAndIsFavoriteUpdate($nContentId, $bIsFavorite); return $this->set_response(array("\x65\162\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\162\103\x6f\x64\x65"]), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } } public function CategoriesByRecentlyAccessedAndIsPremium_get() { $bIsPremium = strtoupper(urldecode($this->get("\x62\111\x73\x50\x72\x65\155\151\165\155"))); if (!($bIsPremium === "\x54\122\125\x45" || $bIsPremium === "\x46\x41\x4c\123\105")) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $bIsPremium = $bIsPremium === "\x54\122\x55\x45" ? true : false; load_model($this, "\x43\x61\x74\145\x67\x6f\x72\151\145\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->Categories_model->get_CategoriesByRecentlyAccessedAndIsPremium($bIsPremium); $vecRecentContents = array(); if (count($ret) > 0) { foreach ($ret as $row) { $content = array(); $content["\x6e\x43\157\156\164\x65\x6e\164\111\144"] = intval($row["\163\143\x5f\x63\x6f\156\164\145\x6e\164\x5f\151\144"]); $content["\163\x74\162\x43\157\156\x74\145\x6e\x74\116\x61\x6d\145"] = $row["\163\x63\137\x63\x6f\156\x74\145\x6e\x74\x5f\x6e\x61\x6d\x65"]; $content["\x73\x74\162\x43\157\x6e\x74\145\156\x74\x46\151\x6c\x65\120\x61\x74\150"] = $row["\x73\143\x5f\143\157\x6e\x74\x65\156\164\137\146\x69\154\x65\160\x61\164\x68"]; $content["\156\103\157\156\x74\145\x6e\x74\x54\171\160\145"] = intval($row["\163\x63\x5f\143\157\156\164\x65\156\164\137\x74\x79\160\145"]); $content["\x64\164\x4c\141\163\164\101\x63\143\145\x73\163\x54\151\155\145"] = currentDateFormat(DATEFORMAT_ISO8601, $row["\x73\x63\x5f\x63\157\x6e\164\145\x6e\164\137\154\x61\x73\164\x5f\141\143\x63\145\163\x73"]); $content["\142\106\141\166\x6f\162\x69\x74\x65"] = setBoolVal($row["\x73\x63\137\143\x6f\x6e\164\145\156\164\x5f\x66\x61\x76\x6f\162\151\x74\x65"]); $content["\156\103\x61\x74\145\x67\x6f\x72\x79\x49\x64"] = intval($row["\163\143\137\143\141\164\145\147\x6f\x72\171\137\x69\x64"]); $content["\x64\164\122\x65\147\x69\163\x74\x65\x72\x65\x64\124\151\x6d\x65"] = currentDateFormat(DATEFORMAT_ISO8601, $row["\163\x63\x5f\x63\157\156\x74\x65\156\164\137\x72\x65\147\x69\x73\x74\x65\162\145\x64"]); array_push($vecRecentContents, $content); } return $this->set_response(array("\x65\162\x72\157\x72\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\x43\157\144\x65"], "\166\x65\x63\x43\x61\x74\145\x67\x6f\162\171\x4c\151\163\164" => $vecRecentContents, "\x62\111\163\x50\162\145\155\x69\x75\x6d" => $bIsPremium), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\145\x72\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\103\x6f\144\x65"], "\166\x65\143\103\x61\164\145\x67\x6f\x72\171\x4c\x69\x73\x74" => $vecRecentContents, "\x62\x49\x73\120\162\145\x6d\151\165\155" => $bIsPremium), REST_Controller::HTTP_OK); } } public function ContentsByRecentlyAccessedAndIsPremium_get() { $bIsPremium = strtoupper(urldecode($this->get("\x62\111\163\x50\x72\145\x6d\151\x75\155"))); if (!($bIsPremium === "\124\122\125\105" || $bIsPremium === "\x46\x41\x4c\x53\105")) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $bIsPremium = $bIsPremium === "\124\x52\125\105" ? true : false; load_model($this, "\x43\x61\164\145\x67\x6f\x72\151\145\x73\x5f\x6d\x6f\144\145\x6c"); $vecRecentContents = $this->Categories_model->get_ConsultContentByRecentlyAccessedAndIsPremium($bIsPremium); if (count($vecRecentContents) > 0) { return $this->set_response(array("\x65\162\x72\157\x72\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\103\x6f\x64\x65"], "\166\145\x63\122\x65\143\x65\x6e\x74\103\x6f\x6e\x74\145\x6e\x74\163" => $vecRecentContents, "\x62\111\x73\120\162\145\x6d\x69\165\x6d" => $bIsPremium), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\162\x72\x6f\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\103\x6f\x64\x65"], "\166\145\x63\x52\145\x63\145\156\164\x43\157\x6e\164\145\156\164\163" => $vecRecentContents, "\142\x49\163\x50\162\x65\155\x69\x75\x6d" => $bIsPremium), REST_Controller::HTTP_OK); } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/E2Ds.php b/server/original/www/ezwebserver/src/application/controllers/v1/E2Ds.php index 02aee82..4fb8c13 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/E2Ds.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/E2Ds.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function AcqInformations_post() { $searchCondition = $this->post(); if (empty($searchCondition["\x65\x4d\x6f\x64\141\154\x69\164\171"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x41\143\x71\x49\x6e\146\x6f\x72\155\x61\164\x69\x6f\x6e\x73\137\x6d\x6f\x64\x65\154"); $result = $this->AcqInformations_model->post_AcqInformations($searchCondition); if ($result["\145\162\162\x6f\x72\x43\157\144\x65"] == VERR_DB_QUERY_EXEC_ERROR) { return $this->set_response(returnSetResponse($result["\145\x72\162\x6f\162\103\x6f\x64\145"]), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\145\162\162\x6f\162\x43\x6f\144\145" => $result["\x65\x72\162\x6f\162\103\x6f\144\145"], "\x61\x63\161\111\156\x66\x6f\114\151\x73\x74" => $result["\x61\x63\161\x49\156\x66\157\114\x69\x73\164"]], REST_Controller::HTTP_OK); } } public function AttendingDoctorsForChartNo_get() { $strChartNo = urldecode($this->get("\x63\150\x61\x72\164\156\157")); if (!isset($strChartNo) || strlen($strChartNo) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\101\x74\x74\145\156\x64\151\156\x67\x44\157\143\x74\x6f\x72\163\137\x6d\157\144\145\154"); $result = $this->AttendingDoctors_model->get_AttendingDoctorsForChartNo($strChartNo); return $this->set_response(["\x65\x72\x72\x6f\162\103\x6f\x64\145" => $result["\145\162\162\157\162\103\x6f\144\145"], "\x64\x6f\x63\164\x6f\x72\x4e\141\x6d\145\114\x69\163\164" => $result["\x64\x6f\143\x74\x6f\x72\x4e\x61\x6d\145\114\x69\163\x74"]], REST_Controller::HTTP_OK); } public function AttendingDoctorsForChartNo_delete() { $strChartNo = urldecode($this->get("\143\x68\141\x72\164\156\x6f")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\101\164\x74\145\156\x64\151\156\x67\x44\x6f\x63\x74\x6f\x72\x73\x5f\155\x6f\144\145\154"); $ret = $this->AttendingDoctors_model->delete_AttendingDoctorsForChartNo($strChartNo); if ($ret > 0) { $this->set_response(["\145\x72\x72\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\x72\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\157\162\103\157\144\x65"]], REST_Controller::HTTP_OK); } } public function AttendingDoctorsForChartNo_post() { $strChartNo = $this->post("\x73\164\x72\x43\150\141\x72\x74\116\157"); $strlDoctorList = $this->post("\x73\164\x72\x6c\x44\x6f\x63\x74\x6f\x72\114\151\x73\x74"); if (empty($strChartNo) || empty($strlDoctorList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x41\164\164\x65\x6e\x64\x69\x6e\x67\x44\157\x63\164\x6f\x72\163\137\155\157\144\x65\154"); $data = $this->AttendingDoctors_model->post_AttendingDoctorsForChartNo($strChartNo, $strlDoctorList); if ($data === VERR_DB_RANGE) { return $this->set_response(["\x65\x72\x72\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_DB_RANGE)["\x65\x72\x72\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } if (count($data) > 0) { return $this->set_response(["\145\162\162\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\103\157\x64\x65"], "\163\164\x72\154\x41\144\x64\145\x64\104\157\143\x74\x6f\162\114\151\163\164" => $data], REST_Controller::HTTP_OK); } elseif ($data === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\x72\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } public function AttendingDoctorsForChartNo_put() { $strChartNo = $this->put("\163\164\162\103\150\x61\162\x74\x4e\157"); $strlDoctorList = $this->put("\x73\x74\x72\154\x44\x6f\x63\164\157\162\x4c\151\x73\164"); if (empty($strChartNo) || count($strlDoctorList) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x41\164\x74\x65\156\x64\x69\156\147\104\x6f\x63\164\x6f\162\x73\x5f\x6d\157\x64\145\154"); $ret = $this->AttendingDoctors_model->delete_AttendingDoctorsForChartNo($strChartNo); if ($ret > 0 || $ret === VERR_DB_NOSUCHDATA) { $ret = $this->AttendingDoctors_model->post_AttendingDoctorsForChartNo($strChartNo, $strlDoctorList); if ($ret === VERR_DB_RANGE) { return $this->set_response(["\145\x72\x72\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_DB_RANGE)["\145\x72\162\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } if ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } if ($ret > 0) { return $this->set_response(["\x65\x72\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } else { return $this->set_response(["\x65\x72\x72\x6f\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function DataGroups_get() { load_model($this, "\104\x61\164\x61\x47\x72\157\x75\160\x73\x5f\x6d\x6f\x64\x65\154"); $ret = $this->DataGroups_model->get_DataGroups(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $dataGroupInfo = new SDataGroupInfo(); $dataGroupInfo->strDataGroupName = $row["\144\x61\164\141\x5f\x67\162\160\137\156\141\x6d\x65"]; $dataGroupInfo->dtCreateDateTime = $row["\144\x61\164\x61\x5f\x67\x72\x70\137\143\162\145\164\137\144\x61\x74\x65"]; $dataGroupInfo->strGroupCTFilename = $row["\x64\x61\x74\141\137\147\162\x70\x5f\x63\x74\137\146\151\x6c\145\156\141\155\x65"]; $dataGroupInfo->strGroup3DPFilename = $row["\x64\141\164\x61\x5f\x67\162\x70\137\63\x64\x70\137\146\x69\x6c\x65\156\x61\x6d\145"]; $dataGroupInfo->strGroupUpperSTLFilename = $row["\144\141\x74\141\x5f\147\162\x70\x5f\165\163\164\x6c\x5f\146\x69\154\145\156\x61\155\x65"]; $dataGroupInfo->strGroupLowerSTLFilename = $row["\144\141\x74\141\137\147\x72\160\x5f\x6c\163\x74\154\137\x66\x69\154\145\156\141\x6d\145"]; $dataGroupInfo->strGroupRealPanoFilename = $row["\x64\x61\164\141\137\x67\x72\x70\137\162\145\141\x6c\160\x61\156\x6f\x5f\146\151\154\x65\156\141\155\145"]; $dataGroupInfo->bUserConfirm = $row["\144\x61\164\141\x5f\x67\x72\160\x5f\165\163\145\x72\x5f\x63\x6f\156\x66\x69\x72\x6d\x65\x64"]; array_push($items, $dataGroupInfo); } return $this->set_response(["\145\162\x72\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\103\157\x64\145"], "\x64\x61\x74\x61\x47\162\x6f\x75\x70\x4c\x69\x73\164" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\x72\x43\x6f\144\x65"], "\x64\141\164\x61\x47\162\157\x75\160\x4c\x69\163\x74" => $items], REST_Controller::HTTP_OK); } } public function DataGroups_put() { $dataGroupInfo = $this->put(); if (!isset($dataGroupInfo["\x73\164\x72\x44\x61\164\x61\107\162\x6f\165\x70\x4e\141\155\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x61\x74\141\x47\162\157\165\160\x73\x5f\155\157\144\145\154"); $ret = $this->DataGroups_model->put_DataGroups($dataGroupInfo); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\162\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\x72\x6f\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\x65\162\x72\x6f\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\157\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function DataGroupsByName_get() { $strDataGroupName = urldecode($this->get("\156\x61\155\145")); if (!isset($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x61\x74\141\x47\162\157\165\x70\163\137\x6d\157\144\x65\x6c"); $ret = $this->DataGroups_model->get_DataGroupsByName($strDataGroupName); if (count($ret) > 0) { $dataGroupInfo = new SDataGroupInfo(); $dataGroupInfo->strDataGroupName = $ret[0]["\x64\141\x74\141\137\x67\162\160\x5f\x6e\141\155\145"]; $dataGroupInfo->dtCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\144\x61\x74\x61\137\x67\162\160\x5f\143\x72\145\164\137\144\x61\x74\145"]); $dataGroupInfo->strGroupCTFilename = $ret[0]["\144\x61\x74\141\x5f\x67\x72\x70\x5f\143\164\137\146\151\154\x65\x6e\x61\155\145"]; $dataGroupInfo->strGroup3DPFilename = $ret[0]["\144\x61\x74\x61\137\x67\162\x70\137\x33\x64\160\x5f\146\151\154\145\x6e\141\x6d\x65"]; $dataGroupInfo->strGroupUpperSTLFilename = $ret[0]["\144\141\164\141\137\x67\x72\160\x5f\x75\163\x74\154\137\x66\151\154\x65\x6e\141\x6d\x65"]; $dataGroupInfo->strGroupLowerSTLFilename = $ret[0]["\144\x61\164\x61\x5f\147\162\x70\137\154\163\164\154\x5f\146\151\154\145\156\x61\x6d\145"]; $dataGroupInfo->strGroupRealPanoFilename = $ret[0]["\x64\x61\164\141\137\x67\162\160\x5f\x72\145\141\x6c\x70\141\x6e\x6f\137\x66\x69\x6c\145\156\141\x6d\x65"]; $dataGroupInfo->bUserConfirm = setBoolVal($ret[0]["\x64\x61\x74\141\x5f\x67\162\160\137\x75\x73\x65\162\137\x63\157\156\146\x69\162\x6d\145\144"]); return $this->set_response(["\x65\162\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\x6f\x64\x65"], "\145\62\x44\141\164\x61\107\x72\157\x75\x70\111\x6e\x66\x6f" => $dataGroupInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\103\x6f\x64\145"], "\145\62\104\x61\164\x61\107\162\157\165\160\x49\x6e\x66\157" => array()], REST_Controller::HTTP_OK); } } public function DataGroupsByName_delete() { $strDataGroupName = urldecode($this->get("\x6e\x61\x6d\x65")); if (empty($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x61\164\x61\x47\162\157\x75\x70\x73\x5f\x6d\157\x64\x65\154"); $ret = $this->DataGroups_model->delete_DataGroupsByName($strDataGroupName); if ($ret > 0) { $this->set_response(["\145\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\103\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupsByChartNo_get() { $strChartNo = urldecode($this->get("\143\150\141\x72\164\x6e\x6f")); if (!isset($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x61\164\141\107\162\157\165\160\x73\137\x6d\x6f\144\x65\154"); $ret = $this->DataGroups_model->get_DataGroupsByChartNo($strChartNo); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $dataGroupInfo = new SDataGroupInfo(); $dataGroupInfo->strDataGroupName = $row["\144\141\x74\141\x5f\x67\162\x70\x5f\x6e\141\155\x65"]; $dataGroupInfo->dtCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\144\x61\164\x61\x5f\147\162\x70\137\x63\162\145\x74\137\144\x61\164\145"]); $dataGroupInfo->strGroupCTFilename = $row["\x64\x61\x74\x61\x5f\147\x72\x70\x5f\x63\x74\x5f\146\151\x6c\145\156\141\155\145"]; $dataGroupInfo->strGroup3DPFilename = $row["\144\x61\164\x61\137\147\x72\x70\x5f\63\x64\160\137\x66\151\x6c\x65\156\x61\155\145"]; $dataGroupInfo->strGroupUpperSTLFilename = $row["\x64\x61\164\x61\137\x67\x72\x70\x5f\165\163\x74\x6c\x5f\146\x69\154\145\156\141\155\145"]; $dataGroupInfo->strGroupLowerSTLFilename = $row["\x64\141\x74\x61\x5f\147\x72\x70\137\x6c\x73\x74\154\137\146\151\154\x65\156\x61\155\x65"]; $dataGroupInfo->strGroupRealPanoFilename = $row["\144\141\x74\141\137\x67\162\160\x5f\x72\145\141\x6c\160\141\x6e\157\137\146\x69\154\x65\x6e\141\155\145"]; $dataGroupInfo->bUserConfirm = setBoolVal($row["\144\x61\164\x61\137\147\162\160\137\x75\163\145\x72\137\x63\x6f\156\146\x69\162\155\x65\144"]); array_push($items, $dataGroupInfo); } return $this->set_response(["\145\162\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\x6f\x64\x65"], "\144\141\164\141\107\x72\157\165\x70\114\x69\163\x74" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\x43\x6f\x64\x65"], "\144\141\x74\141\x47\162\x6f\165\160\x4c\151\x73\x74" => $items], REST_Controller::HTTP_OK); } } public function DataGroupsByChartNo_post() { $strChartNo = $this->post("\163\164\162\103\x68\141\162\164\x4e\x6f"); $dataGroupInfo = $this->post("\123\104\x61\x74\x61\107\162\157\x75\x70\x49\156\x66\157"); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\141\164\x61\107\162\x6f\x75\x70\x73\x5f\155\157\x64\x65\154"); $ret = $this->DataGroups_model->post_DataGroupsByChartNo($strChartNo, $dataGroupInfo); if ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\x72\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\157\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\x72\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } elseif (count($ret) > 0) { return $this->set_response(["\x65\x72\162\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupsByNameAndChartNo_put() { $strDataGroupName = $this->put("\163\164\162\104\141\164\x61\x47\x72\157\165\160\x4e\141\x6d\145"); $strChartNo = $this->put("\x73\164\162\x43\x68\141\162\164\116\x6f"); if (!isset($strDataGroupName) || !isset($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x61\x74\x61\107\x72\x6f\165\x70\x73\x5f\x6d\x6f\144\x65\154"); $ret = $this->DataGroups_model->put_DataGroupsByNameAndChartNo($strChartNo, $strDataGroupName); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\x72\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupsByCTFileAndStudyUID_get() { $strCtFileName = urldecode($this->get("\x63\x74\146\x69\154\145")); $strStudyInstanceUID = urldecode($this->get("\x73\164\x75\144\x79\x75\x69\144")); if (!isset($strCtFileName) && !isset($strStudyInstanceUID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\141\x74\x61\107\x72\x6f\165\160\163\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->DataGroups_model->get_DataGroupsByCTFileAndStudyUID($strCtFileName, $strStudyInstanceUID); if (count($ret) > 0) { $dataGroupInfo = new SDataGroupInfo(); $dataGroupInfo->strDataGroupName = $ret[0]["\144\141\x74\x61\x5f\x67\x72\160\x5f\156\x61\x6d\145"]; $dataGroupInfo->dtCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\144\x61\x74\141\137\x67\x72\x70\137\143\162\145\x74\137\144\141\x74\145"]); $dataGroupInfo->strGroupCTFilename = $ret[0]["\x64\x61\x74\141\x5f\147\162\160\137\143\x74\x5f\146\151\x6c\145\156\141\x6d\x65"]; $dataGroupInfo->strGroup3DPFilename = $ret[0]["\x64\141\x74\x61\x5f\x67\162\160\x5f\63\144\160\x5f\x66\x69\x6c\x65\156\141\x6d\x65"]; $dataGroupInfo->strGroupUpperSTLFilename = $ret[0]["\x64\141\x74\x61\x5f\147\162\160\137\165\x73\x74\x6c\x5f\146\151\x6c\x65\x6e\x61\155\145"]; $dataGroupInfo->strGroupLowerSTLFilename = $ret[0]["\144\141\164\x61\x5f\x67\x72\160\x5f\x6c\163\x74\x6c\x5f\x66\151\154\145\x6e\141\155\x65"]; $dataGroupInfo->strGroupRealPanoFilename = $ret[0]["\x64\x61\x74\x61\137\147\162\160\x5f\x72\145\141\154\x70\141\156\157\x5f\146\x69\x6c\x65\156\141\x6d\145"]; $dataGroupInfo->bUserConfirm = setBoolVal($ret[0]["\144\x61\x74\x61\x5f\x67\162\160\x5f\165\x73\145\162\137\143\x6f\156\x66\x69\162\155\x65\144"]); return $this->set_response(["\145\162\x72\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\162\x43\157\144\145"], "\145\62\104\141\164\141\x47\162\157\x75\160\x49\x6e\x66\157" => $dataGroupInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\162\103\157\x64\145"], "\145\x32\104\141\164\x61\107\162\157\165\x70\111\x6e\x66\x6f" => array()], REST_Controller::HTTP_OK); } } public function DataGroupImages_get() { load_model($this, "\x44\x61\x74\141\x47\162\157\165\160\x49\x6d\141\147\145\163\137\x6d\x6f\144\145\154"); $ret = $this->DataGroupImages_model->get_DataGroupImages(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function DataGroupImages_post() { $dataGroupImageInfo = $this->post(); if (!isset($dataGroupImageInfo["\163\x74\162\104\141\x74\x61\x47\162\x6f\x75\x70\116\141\155\145"]) || !isset($dataGroupImageInfo["\x73\x74\162\x49\x6d\x61\147\x65\x46\x69\154\145\x4e\141\x6d\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\141\164\x61\107\x72\x6f\x75\x70\x49\155\x61\x67\145\x73\x5f\x6d\x6f\144\x65\154"); $ret = $this->DataGroupImages_model->post_DataGroupImages($dataGroupImageInfo); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\103\x6f\x64\x65"], "\x6e\104\141\164\x61\107\162\157\165\x70\111\x6d\141\x67\145\111\x44" => $ret], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\x72\x6f\162\x43\157\144\x65"], "\156\104\x61\x74\141\x47\162\157\165\x70\x49\155\x61\x67\x65\x49\x44" => 0], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\x72\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\103\x6f\144\x65"], "\156\x44\141\164\141\107\162\x6f\165\160\x49\x6d\x61\147\145\x49\104" => 0], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\162\103\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\x6f\162\x43\x6f\x64\145"], "\156\104\141\x74\141\107\162\x6f\x75\160\111\155\141\147\145\111\104" => 0], REST_Controller::HTTP_OK); } } public function DataGroupImages_put() { $dataGroupImageInfo = $this->put(); if (!isset($dataGroupImageInfo["\163\164\x72\111\x6d\x61\x67\x65\106\x69\x6c\145\x4e\141\x6d\145"]) || !isset($dataGroupImageInfo["\x6e\107\x72\157\165\160\x49\x6d\x61\x67\145\x49\104"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x61\x74\x61\x47\x72\x6f\165\x70\x49\155\x61\x67\x65\x73\137\155\x6f\144\145\154"); $ret = $this->DataGroupImages_model->put_DataGroupImages($this->put()); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\162\x72\x6f\162\103\157\144\145" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\x72\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\162\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\x6f\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupImagesByName_get() { $strDataGroupName = urldecode($this->get("\156\141\x6d\x65")); if (!isset($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x61\x74\x61\107\x72\157\165\160\x49\x6d\x61\147\145\163\x5f\x6d\157\x64\145\154"); $ret = $this->DataGroupImages_model->get_DataGroupImagesByName($strDataGroupName); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function DataGroupImagesByID_put() { $nDataGroupImageID = $this->put("\156\x44\141\164\141\107\x72\157\165\160\x49\155\141\147\145\x49\104"); if (!isset($nDataGroupImageID) || !is_numeric($nDataGroupImageID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x61\x74\x61\107\x72\157\165\160\111\x6d\141\147\145\x73\137\x6d\x6f\144\145\154"); $ret = $this->DataGroupImages_model->put_DataGroupImagesByID(intval($nDataGroupImageID)); if ($ret > 0) { return $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupImagesByID_delete() { $nDataGroupImageID = urldecode($this->get("\151\144")); if (empty($nDataGroupImageID) || !is_numeric($nDataGroupImageID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\141\x74\x61\107\162\x6f\x75\x70\111\x6d\141\x67\145\163\137\155\x6f\x64\x65\154"); $ret = $this->DataGroupImages_model->delete_DataGroupImagesByID($nDataGroupImageID); if ($ret === FALSE) { return $this->set_response(["\145\162\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupImagesByImageNameForImageId_get() { $strImageName = urldecode($this->get("\x69\155\141\147\145\x6e\141\x6d\145")); if (empty($strImageName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\141\x74\141\x47\x72\157\165\160\111\x6d\141\147\145\163\137\155\x6f\144\x65\x6c"); $imageId = $this->DataGroupImages_model->get_DataGroupImagesByImageNameForImageId($strImageName); if ($imageId != false) { return $this->set_response(["\145\x72\162\x6f\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\x72\103\x6f\x64\145"], "\x69\x6d\141\x67\x65\x49\144" => $imageId], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupProjects_post() { $strProjectName = $this->post("\163\164\162\x50\x72\157\152\145\143\164\x4e\141\x6d\x65"); $strApplicationName = $this->post("\163\164\162\101\160\160\154\151\x63\x61\x74\151\x6f\156\116\x61\155\x65"); $strCompanyName = $this->post("\163\x74\162\103\157\x6d\x70\x61\156\x79\x4e\141\x6d\x65"); $strGroupName = $this->post("\x73\x74\x72\107\162\x6f\x75\x70\x4e\x61\x6d\145"); $strServerFileName = $this->post("\x73\x74\x72\123\145\x72\166\145\162\106\151\x6c\x65\x4e\x61\155\x65"); if (!isset($strProjectName) || !isset($strApplicationName) || !isset($strCompanyName) || !isset($strGroupName) || !isset($strServerFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x61\164\x61\107\x72\x6f\165\x70\120\162\x6f\x6a\145\x63\x74\x73\137\x6d\x6f\x64\145\154"); $wasSuccess = $this->DataGroupProjects_model->post_DataGroupProjects($strProjectName, $strApplicationName, $strCompanyName, $strGroupName, $strServerFileName); if ($wasSuccess["\145\x72\162\157\x72\103\x6f\x64\145"] == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\162\162\157\x72\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function DataGroupProjectImages_post() { $strProjectImageInformation = $this->post("\163\x74\x72\x50\x72\157\152\145\143\164\x49\155\141\x67\145\x49\x6e\x66\157\162\x6d\141\x74\151\157\x6e"); $strGroupName = $this->post("\x73\164\x72\107\162\x6f\x75\160\x4e\141\x6d\145"); $strImageName = $this->post("\x73\164\x72\x49\155\x61\x67\145\x4e\141\x6d\x65"); if (!isset($strProjectImageInformation) || !isset($strGroupName) || !isset($strImageName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x61\164\141\107\162\x6f\x75\160\x50\162\x6f\x6a\145\143\164\111\155\141\147\x65\163\137\155\157\144\x65\154"); $wasSuccess = $this->DataGroupProjectImages_model->post_DataGroupProjectImages($strProjectImageInformation, $strGroupName, $strImageName); if ($wasSuccess == false) { return $this->set_response(["\x65\162\x72\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } } public function DataGroupProjectImagesByImageName_get() { $strImageName = urldecode($this->get("\151\155\141\147\x65\156\141\x6d\145")); if (!isset($strImageName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\141\164\x61\x47\x72\157\x75\160\x50\162\x6f\x6a\x65\143\x74\111\x6d\141\147\145\x73\137\x6d\x6f\x64\145\x6c"); $data = $this->DataGroupProjectImages_model->get_DataGroupProjectImagesByImageName($this->get()); if ($data == false) { return $this->set_response(["\145\x72\162\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\x43\157\144\x65"], "\163\164\x72\x50\x72\x6f\152\x65\x63\x74\116\x61\x6d\145" => $data["\x73\x74\x72\120\x72\157\152\145\x63\164\116\141\x6d\x65"], "\x73\164\x72\111\155\141\x67\x65\x49\156\x66\157" => $data["\x73\164\x72\x49\x6d\141\x67\x65\111\156\146\157"]], REST_Controller::HTTP_OK); } } public function IOScanner3rdPartyDataByImageName_get() { $strImageName = urldecode($this->get("\151\x6d\141\147\145\156\x61\x6d\x65")); if (!isset($strImageName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\117\x53\x63\x61\156\156\145\162\63\x72\144\120\x61\x72\x74\x79\x44\x61\x74\141\137\x6d\x6f\144\145\x6c"); $data = $this->IOScanner3rdPartyData_model->get_IOScanner3rdPartyDataByImageName($strImageName); if ($data == false) { return $this->set_response(["\x65\162\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\x43\157\144\145"], "\x64\141\x74\x61" => $data["\x64\141\x74\x61"], "\x73\164\x72\x53\x65\x72\x76\x65\x72\x46\x69\x6c\x65\116\x61\x6d\x65" => $data["\x73\164\162\123\x65\162\166\x65\162\106\151\x6c\145\116\x61\x6d\x65"]], REST_Controller::HTTP_OK); } } public function Doctors_get() { load_model($this, "\x44\157\143\x74\157\162\163\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->Doctors_model->get_Doctors(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $strDocName = $row["\x64\x6f\143\x5f\156\141\155\145"]; array_push($items, $strDocName); } $this->set_response(["\x65\162\x72\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\103\x6f\x64\x65"], "\x64\x6f\143\x74\x6f\162\x4e\x61\155\145\x4c\x69\x73\164" => $items], REST_Controller::HTTP_OK); } else { $this->set_response(["\x65\162\162\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\103\x6f\144\x65"], "\x64\x6f\x63\x74\x6f\162\116\x61\x6d\x65\114\x69\163\164" => $items], REST_Controller::HTTP_OK); } } public function DoctorsByName_put() { $strDoctorName = $this->put("\x73\164\x72\104\x6f\x63\x74\x6f\162\x4e\141\155\x65"); $sAccountInfo = $this->put("\x73\x41\143\x63\157\x75\156\164\111\x6e\x66\157"); if (empty($strDoctorName) || !isset($sAccountInfo["\163\x74\162\x41\x63\x63\x6f\165\156\x74\116\x61\155\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\104\x6f\x63\164\x6f\x72\x73\x5f\155\x6f\144\145\154"); $ret = $this->Doctors_model->put_DoctorsByName($strDoctorName, $sAccountInfo); if ($ret > 0) { return $this->set_response(["\x65\x72\162\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\x6f\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } } public function DoctorsByName_delete() { $strDoctorName = urldecode($this->get("\x6e\141\155\x65")); if (empty($strDoctorName)) { vt_loge("\x44\157\143\x74\157\162\163\102\x79\116\x61\155\x65\x5f\x64\145\154\x65\x74\145\40\101\x70\151\56\40" . "\111\156\166\141\154\151\144\40\120\x61\x72\x61\x6d\x65\164\145\162\40\x45\x72\162\157\x72\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x6f\x63\x74\x6f\162\x73\137\155\157\144\145\x6c"); $ret = $this->Doctors_model->delete_DoctorsByName($strDoctorName); if ($ret > 0) { return $this->set_response(["\145\x72\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\x72\103\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\x72\157\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function DoctorsByNameAndAccount_post() { $strDoctorName = $this->post("\163\x74\x72\x44\x6f\x63\x74\x6f\162\x4e\x61\x6d\x65"); $strAccountID = $this->post("\x73\x74\x72\x41\143\143\157\x75\156\x74\111\104"); if (!isset($strDoctorName) || !isset($strAccountID) || strlen($strDoctorName) < 1 || strlen($strAccountID) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x44\x6f\143\x74\x6f\162\163\x5f\155\157\x64\145\154"); $ret = $this->Doctors_model->post_DoctorsByNameAndAccount($strDoctorName, $strAccountID); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\x6f\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevices_get() { load_model($this, "\105\170\x74\x72\141\117\x72\141\x6c\x44\x65\x76\x69\x63\145\163\x5f\x6d\157\144\145\x6c"); $ret = $this->ExtraOralDevices_model->get_ExtraOralDevices(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $sDeviceInfo = SExtraOralDeviceInfo::constructWithParameter($row); array_push($items, $sDeviceInfo); } return $this->set_response(["\x65\x72\162\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\103\157\144\x65"], "\155\141\x70\x44\x65\166\151\x63\145\x49\x6e\146\157" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\103\x6f\x64\x65"], "\x6d\141\x70\104\x65\x76\x69\x63\145\111\x6e\x66\x6f" => $items], REST_Controller::HTTP_OK); } } public function ExtraOralDevices_put() { $sExtraOralDeviceInfo = $this->put(); if (!isset($sExtraOralDeviceInfo["\x73\164\162\104\145\166\151\143\145\x53\145\162\151\141\x6c\x4e\x75\x6d\x62\x65\x72"]) || !isset($sExtraOralDeviceInfo["\145\104\x65\x76\x69\143\x65\123\x61\x6c\x65\163\x54\171\160\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x78\x74\x72\x61\x4f\162\141\x6c\x44\145\x76\x69\x63\145\163\137\x6d\x6f\x64\145\154"); $ret = $this->ExtraOralDevices_model->put_ExtraOralDevices($sExtraOralDeviceInfo); if ($ret["\x65\162\162\157\x72\103\x6f\144\145"] == VERR_COMMON_SUCCESS) { return $this->set_response(["\x65\162\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesBySN_get() { $strDeviceSerialNumber = urldecode($this->get("\163\x6e")); load_model($this, "\105\x78\x74\x72\x61\117\162\141\x6c\104\145\166\151\x63\x65\163\137\155\x6f\144\145\154"); $ret = $this->ExtraOralDevices_model->get_ExtraOralDevicesBySN($strDeviceSerialNumber); if (count($ret) > 0) { $sDeviceInfo = SExtraOralDeviceInfo::constructWithParameter($ret[0]); return $this->set_response(["\145\x72\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\157\144\145"], "\x73\x44\145\166\151\x63\145\x49\156\146\157" => $sDeviceInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\x43\157\144\145"], "\x73\104\145\166\x69\x63\x65\x49\x6e\146\157" => array()], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesBySN_post() { $strDeviceSerialNumber = $this->post("\163\164\162\x44\145\x76\x69\143\x65\123\145\x72\151\141\x6c\x4e\165\155\x62\x65\x72"); $eDeviceSalesType = $this->post("\145\104\x65\x76\151\143\145\123\x61\154\145\x73\x54\x79\x70\145"); load_model($this, "\105\x78\164\162\141\117\x72\x61\x6c\104\x65\x76\151\x63\145\x73\x5f\x6d\x6f\x64\145\154"); $ret = $this->ExtraOralDevices_model->post_ExtraOralDevicesBySN($strDeviceSerialNumber, $eDeviceSalesType); if ($ret == true) { return $this->set_response(["\145\162\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\x72\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\162\103\157\144\x65"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesBySN_put() { $strDeviceSerialNumber = $this->put("\163\164\162\104\145\x76\x69\x63\145\123\x65\162\151\141\154\116\x75\x6d\x62\x65\x72"); $eDeviceSalesType = $this->put("\x65\x44\x65\166\151\x63\145\x53\x61\x6c\x65\x73\124\x79\160\x65"); load_model($this, "\105\170\x74\162\x61\117\162\x61\154\x44\145\x76\151\x63\145\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->ExtraOralDevices_model->put_ExtraOralDevicesBySN($strDeviceSerialNumber, $eDeviceSalesType); if ($ret == TRUE) { return $this->set_response(["\145\162\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesBySNForStatus_put() { $strDeviceSerialNumber = $this->put("\x73\x74\162\x44\145\x76\151\143\145\x53\145\x72\151\141\154\x4e\x75\155\142\x65\x72"); $parameters = $this->put(); load_model($this, "\105\170\164\x72\x61\117\x72\141\x6c\104\145\166\x69\143\145\x73\x5f\155\x6f\144\145\x6c"); $ret = $this->ExtraOralDevices_model->put_ExtraOralDevicesBySNForStatus($strDeviceSerialNumber, $parameters); if ($ret == true) { return $this->set_response(["\x65\162\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesForInfo_post() { $sExtraOralDeviceInfo = $this->post("\x73\x45\x78\164\162\x61\117\162\141\154\x44\x65\x76\x69\143\x65\111\x6e\x66\x6f"); $bUpdateDeviceInfo = $this->post("\x62\125\x70\x64\x61\164\145\104\x65\166\151\143\145\x49\156\x66\157"); $bCheckSum = $this->post("\x62\103\x68\x65\143\x6b\123\x75\x6d"); load_model($this, "\105\x78\x74\162\x61\117\162\141\x6c\x44\x65\166\151\143\145\163\x5f\155\157\144\145\x6c"); $ret = $this->ExtraOralDevices_model->post_ExtraOralDevicesForInfo($sExtraOralDeviceInfo, $bUpdateDeviceInfo, $bCheckSum); if ($ret === TRUE) { return $this->set_response(array("\x65\162\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\x6f\144\145"]), REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\162\162\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\157\x72\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesForChecksum_put() { $Parameters = $this->put(); $strCondition = $Parameters["\x73\x74\162\x43\x6f\156\144\151\164\151\x6f\156"]; $strUpdateValue = $Parameters["\163\x74\x72\x55\160\x64\x61\x74\145\126\x61\x6c\x75\x65"]; $bVerifyCheckSum = $Parameters["\x62\x56\145\162\151\x66\171\103\x68\145\143\x6b\123\165\x6d"]; $bUpdateData = $Parameters["\x62\x55\160\x64\x61\164\145\x44\141\164\x61"]; load_model($this, "\105\x78\164\x72\141\117\x72\141\154\x44\145\x76\151\x63\145\x73\137\155\157\144\x65\x6c"); $ret = $this->ExtraOralDevices_model->put_ExtraOralDevicesForChecksum($strCondition, $strUpdateValue, $bVerifyCheckSum, $bUpdateData); if ($ret == TRUE) { return $this->set_response(["\145\162\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesBySNAndChecksumAndUpdate_get() { $strDeviceSerialNumber = urldecode($this->get("\x73\x6e")); $strCheckSum = urldecode($this->get("\x63\150\x65\x63\x6b\163\165\155")); $bUpdateData = urldecode($this->get("\165\x70\x64\141\x74\x65")); if (!isset($strDeviceSerialNumber) || !isset($strCheckSum) || !isset($bUpdateData)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\170\164\x72\141\x4f\x72\x61\x6c\x44\145\x76\151\143\x65\163\x5f\155\157\x64\x65\x6c"); $ret = $this->ExtraOralDevices_model->get_ExtraOralDevicesBySNAndChecksumAndUpdate($strDeviceSerialNumber, $strCheckSum, $bUpdateData); if ($ret == true) { return $this->set_response(["\145\x72\x72\157\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesByChecksumAndImageFileAndUpdate_get() { $strImgFileName = urldecode($this->get("\x69\x6d\x61\147\x65\146\151\x6c\x65")); $strCheckSum = urldecode($this->get("\143\150\x65\x63\153\x73\x75\155")); $bUpdateData = urldecode($this->get("\165\160\144\141\x74\145")); if (!isset($strImgFileName) || !$bUpdateData == "\x74\x72\165\145" || !$bUpdateData == "\146\141\154\163\x65") { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\170\x74\x72\x61\x4f\162\x61\x6c\x44\x65\x76\x69\x63\x65\x73\137\x6d\x6f\144\x65\x6c"); $ret = $this->ExtraOralDevices_model->get_ExtraOralDevicesByChecksumAndImageFileAndUpdate($strImgFileName, $strCheckSum, $bUpdateData); if ($ret == TRUE) { return $this->set_response(["\x65\x72\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\x72\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesForCount_post() { $eDeviceSalesType = $this->post(); if (!isset($eDeviceSalesType) || empty($eDeviceSalesType)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x78\164\162\141\x4f\162\141\x6c\x44\145\x76\x69\143\145\x73\137\155\x6f\144\145\x6c"); $ret = $this->ExtraOralDevices_model->post_ExtraOralDevicesForCount($eDeviceSalesType); $nDeviceCount = intval($ret[0]["\143\157\x75\156\x74"]); if (count($ret) > 0) { return $this->set_response(array("\x65\162\162\157\x72\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\162\103\157\144\x65"], "\x6e\104\145\x76\x69\143\x65\x43\157\x75\x6e\164" => $nDeviceCount), REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\103\x6f\144\x65"], "\x6e\x44\x65\166\x69\x63\145\x43\x6f\165\156\x74" => 0], REST_Controller::HTTP_OK); } } public function ExtraOralDevicesByImageFile_get() { $strImgFileName = urldecode($this->get("\x69\x6d\x61\147\x65\146\151\x6c\145")); if (!isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $sDeviceInfo = new SExtraOralDeviceInfo(); load_model($this, "\x45\170\x74\x72\141\117\x72\141\x6c\x44\x65\166\151\x63\x65\163\137\155\x6f\x64\x65\154"); $ret = $this->ExtraOralDevices_model->get_ExtraOralDevicesByImageFile($strImgFileName, $sDeviceInfo); if ($ret === TRUE) { return $this->set_response(["\145\162\x72\x6f\162\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\x43\157\x64\x65"], "\163\x44\x65\x76\x69\143\x65\x49\156\146\x6f" => $sDeviceInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function E2DataGroups_get() { load_model($this, "\105\x32\104\141\x74\141\107\162\157\165\x70\x73\137\155\x6f\x64\145\154"); $ret = $this->E2DataGroups_model->get_E2DataGroups(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $dataGropInfo = new SE2DataGroupInfo(); $dataGropInfo->strDataGroupName = $row["\147\162\157\165\x70\137\156\141\155\145"]; $dataGropInfo->dtCreateDateTime = $row["\147\x72\x6f\165\160\x5f\x63\x72\145\164\x5f\x64\141\164\145"]; array_push($items, $dataGropInfo); } return $this->set_response(["\x65\162\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\103\157\144\x65"], "\145\x32\x44\141\x74\141\x47\162\157\x75\x70\x49\x6e\x66\157\114\151\163\164" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\x43\157\144\145"], "\x65\62\104\141\x74\x61\x47\x72\x6f\x75\160\x49\156\x66\x6f\114\x69\163\x74" => $items], REST_Controller::HTTP_OK); } } public function E2DataGroupsByChartNo_get() { $strChartNo = urldecode($this->get("\143\x68\141\162\x74\156\157")); if (!isset($strChartNo) || strlen($strChartNo) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\62\104\x61\x74\x61\x47\x72\x6f\x75\x70\163\x5f\155\x6f\144\145\x6c"); $ret = $this->E2DataGroups_model->get_E2DataGroupsByChartNo($strChartNo); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $dataGroupInfo = SE2DataGroupInfo::createFromDBRecord($row); array_push($items, $dataGroupInfo); } return $this->set_response(["\145\x72\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\x43\157\x64\145"], "\x65\x32\x44\141\x74\x61\107\162\157\165\160\111\156\x66\157\x4c\151\x73\164" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\x43\x6f\144\145"], "\x65\x32\104\x61\x74\141\x47\162\x6f\165\x70\111\156\x66\x6f\x4c\151\163\x74" => $items], REST_Controller::HTTP_OK); } } public function E2DataGroupsByChartNo_post() { $strChartNo = $this->post("\163\x74\x72\x43\150\x61\x72\164\116\x6f"); $dataGroupInfo = $this->post("\123\x45\62\104\x61\164\x61\107\x72\x6f\x75\160\111\156\x66\157"); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x32\104\x61\x74\141\x47\162\x6f\x75\160\163\x5f\155\157\144\145\x6c"); $ret = $this->E2DataGroups_model->post_E2DataGroupsByChartNo($strChartNo, $dataGroupInfo); if ($ret["\x65\x72\162\x6f\x72\x43\157\x64\x65"] === VERR_COMMON_SUCCESS) { return $this->set_response(["\x65\x72\162\157\x72\103\157\144\145" => $ret["\x65\x72\x72\157\162\103\x6f\x64\145"], "\163\164\162\x47\x72\x6f\x75\x70\x44\141\x74\x61\116\141\x6d\x65" => $ret["\x73\x74\x72\107\162\157\x75\160\x44\141\x74\141\116\x61\x6d\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\162\103\x6f\x64\145" => $ret["\145\x72\x72\157\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function E2DataGroupsByChartNo_put() { $strChartNo = $this->put("\x73\x74\x72\103\150\141\162\x74\x4e\x6f"); $strDataGroupName = $this->put("\x73\164\162\104\x61\164\141\107\x72\157\x75\x70\116\x61\x6d\145"); if (empty($strChartNo) || empty($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x32\104\141\x74\141\x47\x72\x6f\x75\160\163\x5f\x6d\157\144\145\154"); $ret = $this->E2DataGroups_model->put_E2DataGroupsByChartNo($strChartNo, $strDataGroupName); if ($ret > 0) { return $this->set_response(["\145\x72\x72\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\x72\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\157\162\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\162\x6f\162\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\157\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } } public function E2DataGroupsByName_get() { $strDataGroupName = urldecode($this->get("\x6e\141\x6d\145")); if (!isset($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x32\104\141\164\141\x47\162\157\165\160\163\x5f\155\157\x64\145\x6c"); $ret = $this->E2DataGroups_model->get_E2DataGroupsByName($strDataGroupName); if (count($ret) > 0) { $dataGroupInfo = new SE2DataGroupInfo(); $dataGroupInfo->strDataGroupName = $ret[0]["\x67\162\x6f\x75\160\x5f\156\141\x6d\x65"]; $dataGroupInfo->dtCreateDateTime = $ret[0]["\x67\x72\157\x75\160\x5f\143\162\x65\164\x5f\x64\141\x74\x65"]; $dataGroupInfo->bAutoCreated = $ret[0]["\147\x72\x6f\x75\x70\x5f\x61\165\164\x6f\137\143\162\145\141\x74\145\144"]; return $this->set_response(["\x65\162\x72\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\x43\157\x64\145"], "\145\x32\104\x61\164\141\107\x72\x6f\165\x70\x49\156\146\x6f" => $dataGroupInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\x72\103\157\144\145"], "\145\62\x44\x61\x74\141\x47\x72\157\165\x70\x49\x6e\x66\x6f" => array()], REST_Controller::HTTP_OK); } } public function E2DataGroupsByName_delete() { $strDataGroupName = urldecode($this->get("\x6e\x61\x6d\145")); if (!isset($strDataGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x32\104\141\164\141\107\162\157\x75\x70\163\x5f\x6d\157\144\x65\x6c"); $ret = $this->E2DataGroups_model->delete_E2DataGroupsByName($strDataGroupName); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\x6f\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } public function E2DataGroupsByCTFileandStudyUID_get() { $strCtFileName = urldecode($this->get("\143\164\146\151\154\145")); $strStudyInstanceUID = urldecode($this->get("\x73\x74\x75\144\171\x75\x69\144")); if (!isset($strCtFileName) && !isset($strStudyInstanceUID) || strlen($strCtFileName) < 1 && strlen($strStudyInstanceUID) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x32\x44\141\164\x61\x47\x72\x6f\165\x70\104\102\137\x6d\x6f\x64\145\x6c"); $ret = $this->E2DataGroupDB_model->get_E2DataGroupsByCTFileandStudyUID($strCtFileName, $strStudyInstanceUID); if (count($ret) > 0) { $dataGroupInfo = new SE2DataGroupInfo(); $dataGroupInfo->strDataGroupName = $ret[0]["\x67\x72\157\x75\160\137\x6e\x61\x6d\145"]; $dataGroupInfo->dtCreateDateTime = $ret[0]["\x67\x72\x6f\x75\x70\137\143\x72\145\164\137\x64\x61\x74\x65"]; $dataGroupInfo->bAutoCreated = $ret[0]["\147\x72\x6f\x75\160\137\x61\x75\x74\x6f\x5f\x63\162\145\x61\164\x65\144"]; return $this->set_response(["\x65\162\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\x43\x6f\x64\145"], "\x65\62\x44\141\x74\x61\x47\162\157\165\160\x49\156\146\157" => $dataGroupInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\162\x43\x6f\144\x65"], "\x65\62\104\x61\x74\141\x47\x72\x6f\165\x70\111\x6e\146\x6f" => array()], REST_Controller::HTTP_OK); } } public function E2DataGroupsByCTFileOrStudyUID_get() { load_model($this, "\x45\x32\x44\x61\164\141\x47\162\157\x75\x70\163\137\x6d\x6f\144\145\154"); $data = $this->E2DataGroups_model->get_E2DataGroupsByCTFileOrStudyUID($this->get()); if (in_array($data["\x65\162\162\157\x72\103\157\x64\145"], [VERR_COMMON_SUCCESS, VERR_DB_NOSUCHDATA])) { $this->set_response($data, REST_Controller::HTTP_OK); } else { $this->set_response($data, REST_Controller::HTTP_BAD_REQUEST); } } public function E2DBForConnection_get() { load_model($this, "\105\x32\104\x42\x5f\x6d\157\x64\145\x6c"); $ret = $this->E2DB_model->get_E2DBForConnection(); $this->set_response(returnSetResponse($ret ? VERR_COMMON_SUCCESS : "\126\x45\122\x52\x5f\104\102\x5f\x45\122\x52\x4f\122"), $ret ? REST_Controller::HTTP_OK : REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } public function E2DBForVersion_get() { load_model($this, "\x45\x32\104\102\137\155\157\144\x65\154"); $ret = $this->E2DB_model->get_E2DBForVersion($this->get()); if ($ret > 0) { $ret = $this->E2DB_model->get_E2DBForVersion_New_Version(); if (count($ret) > 0) { $nVersion = $ret[0]["\166\x65\162\x5f\143\x75\x72\162\145\156\x74\x5f\x76\145\x72\163\151\157\156"]; return $this->set_response(["\x65\x72\x72\157\162\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\x43\x6f\x64\x65"], "\x6e\x56\145\x72\x73\x69\157\x6e" => $nVersion], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\x43\157\x64\145"], "\156\126\145\162\x73\x69\x6f\156" => 0], REST_Controller::HTTP_OK); } } else { return $this->set_response(array("\145\x72\x72\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\x72\103\x6f\x64\x65"], "\x6e\x56\x65\162\x73\x69\x6f\156" => 0), REST_Controller::HTTP_OK); } } public function Images_put() { $savingImageInfo = $this->put("\x73\x61\x76\x69\x6e\147\x49\x6d\141\147\145\111\x6e\x66\157"); $bSmartPayImage = $this->put("\142\x53\155\141\162\164\x50\x61\x79\x49\155\141\x67\145"); if (!isset($savingImageInfo["\x73\164\x72\103\150\141\162\164\x4e\157"]) || !isset($savingImageInfo["\163\x74\162\x49\x6d\147\x46\x69\154\145\x4e\141\155\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\141\x67\x65\x73\137\155\157\x64\x65\x6c"); $ret = $this->Images_model->put_Images($savingImageInfo, $bSmartPayImage); if ($ret === VERR_COMMON_SUCCESS) { load_model($this, "\105\x32\x44\x61\164\141\x47\x72\x6f\165\x70\x73\137\155\157\x64\x65\154"); $this->E2DataGroups_model->ProcessToMakeGroupData($savingImageInfo); return $this->set_response(["\x65\x72\x72\157\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { if ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\162\157\162\103\x6f\144\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\x72\157\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } } public function ImagesByFile_get() { $file = urldecode($this->get("\x66\x69\x6c\x65")); $parameters = array($file); load_model($this, "\x49\155\x61\147\x65\x73\137\155\157\x64\145\x6c"); $ret = $this->Images_model->get_ImagesByFile($parameters); if (count($ret) <= 0) { return $this->set_response(array("\x65\162\162\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_RANGE)["\x65\x72\x72\x6f\x72\x43\x6f\144\145"], "\163\111\x6d\141\147\x65\x49\156\146\x6f" => array()), REST_Controller::HTTP_OK); } else { load_model($this, "\x44\141\x74\x61\107\x72\x6f\x75\160\111\x6d\x61\x67\145\x73\x5f\155\x6f\x64\145\x6c"); $imgInfo = SImageInfo::createFromDBRecord($ret[0]); $imgInfo->bIsThirdPartyGroupImage = $this->DataGroupImages_model->CheckIfThirdPartyImageByID($ret[0]["\151\x6d\147\x5f\x69\x64"]); $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); $strImagePayStatus = trim($ret[0]["\163\160\137\x69\x6d\x67\137\x70\x61\x79\x5f\x73\x74\x61\164\165\163"]); $imagePayStatus = stringToImagePayStatus($strImagePayStatus); if (empty($strImagePayStatus)) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); } else { if ($imagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus)) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayPaidImage); } else { $imgInfo->bPaidImage = FALSE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayUnpaidImage); } } return $this->set_response(array("\x65\162\162\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\x43\x6f\x64\x65"], "\x73\x49\155\x61\147\145\111\x6e\x66\x6f" => $imgInfo), REST_Controller::HTTP_OK); } } public function ImagesByFile_put() { $strImgFileName = $this->put("\163\164\x72\111\x6d\147\106\151\x6c\x65\x4e\141\155\145"); $imgInfo = $this->put("\163\111\155\x61\147\x65\111\156\146\157"); if (!isset($imgInfo["\144\x74\x41\x63\161\124\x69\155\x65"]) || !isset($imgInfo["\x66\x4b\x76\160"]) || !isset($imgInfo["\146\x4d\141"]) || !isset($imgInfo["\x66\104\x6f\x73\x65"]) || !isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x61\147\x65\x73\137\x6d\x6f\x64\x65\x6c"); $ret = $this->Images_model->put_ImagesByFile($strImgFileName, $imgInfo); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\103\157\144\145"]], REST_Controller::HTTP_OK); } } public function ImagesByFileAndChartNo_get() { $strImagFileName = urldecode($this->get("\x66\x69\154\x65")); $strChartNo = urldecode($this->get("\x63\150\x61\x72\x74\156\x6f")); if (empty($strImagFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $parameters = array("\163\x74\162\111\155\141\147\x46\151\154\x65\x4e\x61\155\145" => $strImagFileName, "\x73\164\x72\x43\x68\141\162\164\116\157" => $strChartNo); load_model($this, "\x49\155\141\147\x65\163\x5f\x6d\x6f\x64\x65\154"); if (empty($strChartNo)) { $ret = $this->Images_model->get_ImagesByFile(array($strImagFileName)); } else { $ret = $this->Images_model->get_ImagesByFileAndChartNo($parameters); } if (count($ret) <= 0) { return $this->set_response(array("\145\x72\x72\157\x72\x43\157\144\x65" => returnSetResponse(VERR_DB_RANGE)["\145\x72\x72\157\x72\103\157\144\x65"], "\x73\x49\x6d\141\147\145\111\156\x66\x6f" => null), REST_Controller::HTTP_OK); } else { $imgInfo = SImageInfo::createFromDBRecord($ret[0]); $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); $strImagePayStatus = trim($ret[0]["\163\160\x5f\151\x6d\147\137\160\141\x79\x5f\x73\x74\x61\164\x75\x73"]); $imagePayStatus = stringToImagePayStatus($strImagePayStatus); if (empty($strImagePayStatus)) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); } else { if ($imagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus)) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayPaidImage); } else { $imgInfo->bPaidImage = FALSE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayUnpaidImage); } } return $this->set_response(array("\x65\162\x72\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\x72\103\157\x64\x65"], "\x73\x49\x6d\x61\x67\x65\x49\x6e\x66\157" => $imgInfo), REST_Controller::HTTP_OK); } } public function ImagesByFileAndChartNo_delete() { $strImgFileName = urldecode($this->get("\x66\151\x6c\x65")); $strChartNo = urldecode($this->get("\143\150\x61\x72\x74\x6e\x6f")); if (empty($strImgFileName) || empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x61\147\145\163\137\155\x6f\x64\145\x6c"); $ret = $this->Images_model->delete_ImagesByFileAndChartNo($strImgFileName, $strChartNo); if ($ret >= 0) { return $this->set_response(["\x65\162\162\157\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\157\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\x72\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\157\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function ImagesByFileForId_get() { $strImgFileName = urldecode($this->get("\x66\x69\154\145")); if (!isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\141\x67\145\163\137\155\x6f\144\145\x6c"); $ret = $this->Images_model->get_ImagesByFileForId($strImgFileName); if (count($ret) > 0) { return $this->set_response(["\145\162\162\x6f\162\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\x43\x6f\x64\145"], "\x6e\111\155\x61\147\145\x49\x44" => $ret[0]["\x69\155\147\137\151\x64"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\x72\x43\157\x64\145"], "\156\x49\x6d\x61\x67\x65\x49\104" => 0], REST_Controller::HTTP_OK); } } public function ImagesByFileForAcqMode_put() { $strImgFileName = $this->put("\163\x74\162\111\x6d\147\106\151\x6c\145\116\x61\155\x65"); $strAcqMode = $this->put("\163\164\162\101\x63\x71\x4d\157\x64\145"); if (!isset($strImgFileName) || !isset($strAcqMode)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\141\x67\x65\163\x5f\x6d\x6f\144\145\x6c"); $ret = $this->Images_model->put_ImagesByFileForAcqMode($strImgFileName, $strAcqMode); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function ImagesByFileForDateTime_put() { $dtUpdateDateTime = $this->put("\144\x74\x55\x70\x64\x61\164\145\104\141\164\x65\x54\151\x6d\145"); $strImgFileName = $this->put("\163\164\162\111\x6d\147\106\151\154\145\116\141\x6d\x65"); if (!isset($dtUpdateDateTime) || !isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\141\x67\x65\163\x5f\155\x6f\144\145\154"); $ret = $this->Images_model->put_ImagesByFileForDateTime($dtUpdateDateTime, $strImgFileName); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_RANGE), REST_Controller::HTTP_OK); } } public function ImagesByFileForLastFilter_get() { $strImgFileName = urldecode($this->get("\146\151\154\145")); if (!isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x61\x67\x65\x73\137\155\x6f\x64\145\x6c"); $ret = $this->Images_model->get_ImagesByFileForLastFilter($strImgFileName); if (count($ret) > 0) { return $this->set_response(["\145\x72\162\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\103\157\x64\x65"], "\x73\x74\162\x4c\141\163\164\x46\x69\x6c\x74\x65\x72" => $ret[0]["\151\x6d\147\x5f\x75\163\x65\x72\137\144\145\146\x69\156\x65\144\x5f\61\60"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\162\x43\x6f\144\x65"], "\x73\x74\162\114\141\x73\x74\106\151\x6c\x74\145\x72" => ''], REST_Controller::HTTP_OK); } } public function ImagesByFileForLastFilter_put() { $strImgFileName = $this->put("\x73\164\x72\x49\x6d\147\106\x69\154\x65\x4e\141\x6d\145"); $strLastFilter = $this->put("\x73\164\x72\x4c\x61\163\x74\x46\151\154\164\145\x72"); if (!isset($strImgFileName) || !isset($strLastFilter)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x61\x67\145\163\137\155\157\144\145\154"); $ret = $this->Images_model->put_ImagesByFileForLastFilter($strImgFileName, $strLastFilter); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\162\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } } public function ImagesByFileForModality_put() { $strImgFileName = $this->put("\163\164\x72\111\x6d\147\106\151\x6c\145\x4e\141\x6d\x65"); $modality = $this->put("\155\x6f\x64\x61\x6c\151\164\x79"); if (!isset($strImgFileName) || !isset($modality)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $checkmodality = modality_api_str_to_modality_db_str($modality); if ($checkmodality == "\x55\x6e\153\x6e\x6f\x77\156") { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\141\147\145\x73\137\x6d\157\144\x65\x6c"); $ret = $this->Images_model->put_ImagesByFileForModality($strImgFileName, $checkmodality); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } } public function ImagesByStudyUID_get() { $strStudyInstanceUID = urldecode($this->get("\x73\164\165\144\x79\165\x69\x64")); if (!isset($strStudyInstanceUID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\141\x67\x65\163\137\155\x6f\144\145\154"); $ret = $this->Images_model->get_ImagesByStudyUID($strStudyInstanceUID); $items = array(); if (count($ret) > 0) { load_model($this, "\104\141\164\141\x47\x72\x6f\x75\160\x49\x6d\141\x67\x65\x73\137\x6d\157\144\x65\x6c"); foreach ($ret as $row) { $imgInfo = SImageInfo::createFromDBRecord($row); $imgInfo->{$bIsThirdPartyGroupImage} = $this->DataGroupImages_model->CheckIfThirdPartyImageByID($row["\151\155\x67\137\151\144"]); array_push($items, $imgInfo); } return $this->set_response(["\145\162\162\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\x6f\144\145"], "\x76\x65\x63\x49\155\141\x67\x65\x49\x6e\146\x6f" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\x72\103\157\x64\145"], "\x76\x65\x63\111\x6d\141\147\x65\111\x6e\x66\x6f" => $items], REST_Controller::HTTP_OK); } } public function ImagesByFileForStudyUID_get() { $strImgFileName = urldecode($this->get("\146\151\x6c\145")); if (!isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\141\x67\x65\163\x5f\x6d\157\144\145\x6c"); $ret = $this->Images_model->get_ImagesByFileForStudyUID($strImgFileName); if (count($ret) > 0) { return $this->set_response(["\145\x72\x72\x6f\162\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\x43\157\x64\x65"], "\x73\x74\x72\x53\x74\x75\x64\171\111\156\x73\x74\x61\156\x63\x65\125\111\104" => $ret[0]["\151\x6d\x67\137\x73\x74\x75\x64\171\x5f\x69\156\163\x74\x61\x6e\x63\x65\x5f\x75\x69\x64"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\103\x6f\x64\x65"], "\x73\x74\162\123\x74\165\x64\171\x49\x6e\163\164\x61\x6e\x63\145\x55\111\104" => 0], REST_Controller::HTTP_OK); } } public function ImagesByFileForStudyUID_put() { $strImgFileName = $this->put("\x73\164\162\x49\155\x67\x46\151\154\145\116\141\x6d\x65"); $strStudyInstanceUID = $this->put("\x73\x74\162\x53\164\x75\x64\171\x49\x6e\163\164\141\x6e\x63\x65\125\111\x44"); if (!isset($strImgFileName) || !isset($strStudyInstanceUID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x61\147\x65\163\x5f\x6d\157\x64\x65\154"); $ret = $this->Images_model->put_ImagesByFileForStudyUID($strImgFileName, $strStudyInstanceUID); if ($ret > 0) { return $this->set_response(["\x65\162\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } public function ImagesForChartNo_put() { $parametersOfPutImagesForChartNo = $this->put(); if (!isset($parametersOfPutImagesForChartNo["\163\164\x72\154\111\155\147\106\151\x6c\x65\116\x61\x6d\x65\x73"]) || !isset($parametersOfPutImagesForChartNo["\x73\x74\x72\x43\150\x61\x72\164\x4e\157"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x61\147\145\163\x5f\x6d\x6f\144\145\154"); $ret = $this->Images_model->put_ImagesForChartNo($parametersOfPutImagesForChartNo); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } else { if ($ret === VERR_DB_INVALIDDATA) { return $this->set_response(["\145\x72\162\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } } } public function ImagesByChartNo_post() { $strChartNo = $this->post("\x73\x74\x72\x43\150\141\162\164\116\157"); $pageNum = $this->post("\x70\x61\147\x65\x4e\x75\155"); $numItems = $this->post("\x6e\165\x6d\x49\164\145\155\163"); $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; if (!isset($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x61\147\x65\x73\x5f\x6d\x6f\144\145\154"); $countSmartpay = $this->Images_model->get_countFromTable("\x65\62\137\x73\155\141\x72\x74\160\x61\171\137\x69\x6d\x61\x67\145"); $items = array(); if ($countSmartpay > 0) { $ret = $this->Images_model->post_ImagesByChartNo_True($strChartNo, $pageNum, $numItems); } else { $ret = $this->Images_model->post_ImagesByChartNo_False($strChartNo, $pageNum, $numItems); } if (count($ret) < 1) { return $this->set_response(["\x65\162\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\162\x43\157\x64\x65"], "\166\145\143\x49\x6d\141\x67\145\x49\x6e\146\x6f" => $items], REST_Controller::HTTP_OK); } else { load_model($this, "\104\141\164\141\107\x72\157\x75\160\111\x6d\141\x67\x65\x73\x5f\x6d\x6f\x64\x65\154"); foreach ($ret as $row) { $imgInfo = SImageInfo::createFromDBRecord($row); $imgInfo->bIsThirdPartyGroupImage = $this->DataGroupImages_model->CheckIfThirdPartyImageByID($row["\x69\155\x67\137\151\x64"]); $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); if ($countSmartpay > 0) { $strImagePayStatus = trim($row["\163\160\x5f\x69\155\147\137\160\141\x79\x5f\x73\x74\141\164\165\163"]); if (empty($strImagePayStatus)) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eNormalDeviceImage); } else { if ($strImagePayStatus == "\120\141\151\144") { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayPaidImage); } else { $imgInfo->bPaidImage = FALSE; $imgInfo->eImageType = enumToString(new EImageType(), (new EImageType())->eSmartPayUnpaidImage); } } } array_push($items, $imgInfo); } return $this->set_response(["\145\162\162\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\103\157\144\145"], "\166\145\143\x49\x6d\x61\x67\145\x49\156\x66\x6f" => $items], REST_Controller::HTTP_OK); } } public function ImagesForChartNoR2_put() { $parametersOfPutImagesForChartNo = $this->put(); if (!isset($parametersOfPutImagesForChartNo["\x73\x74\162\154\x49\155\147\x46\151\154\x65\x4e\141\x6d\145\x73"]) || !isset($parametersOfPutImagesForChartNo["\x73\164\x72\x43\x68\141\x72\164\x4e\x6f"]) || !isset($parametersOfPutImagesForChartNo["\146\x6f\162\143\145\124\x6f\x54\x72\141\x6e\x73\x66\x65\x72"])) { vt_loge(sprintf("\x25\x73\72\40\101\x72\x67\165\x6d\145\156\164\163\40\x61\162\x65\40\155\151\x73\163\x69\156\147\x3a\x20\45\x73", __METHOD__, json_encode($parametersOfPutImagesForChartNo))); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x61\147\145\163\x52\62\x5f\155\157\144\x65\x6c"); $ret = $this->ImagesR2_model->put_ImagesForChartNoR2($parametersOfPutImagesForChartNo); if ($ret["\145\162\x72\157\162\x43\157\x64\145"] === VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\145\x72\x72\157\162\x43\x6f\x64\x65"] === VERR_DB_INVALIDDATA || $ret["\x65\162\x72\x6f\x72\x43\x6f\144\x65"] === VERR_DB_NOSUCHDATA || $ret["\145\x72\162\157\x72\x43\157\144\x65"] === VERR_E2_IMAGE_IN_GROUP) { return $this->set_response(createResponse($ret["\145\162\x72\x6f\162\x43\x6f\x64\145"]), REST_Controller::HTTP_OK); } else { return $this->set_response(createResponse($ret["\x65\x72\x72\157\162\x43\x6f\144\145"]), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function ImagesForRaw_put() { $Parameters = $this->put(); if (!isset($Parameters["\163\x74\x72\x49\155\x67\x46\x69\154\x65\x4e\141\x6d\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x61\x67\145\x73\x5f\155\157\x64\145\154"); $ret = $this->Images_model->put_ImagesForRaw($Parameters); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function ImagesForSourceID_post() { $strNode = $this->post("\163\164\x72\116\157\164\x65"); if (!isset($strNode)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\141\x67\x65\x73\137\x6d\x6f\144\x65\x6c"); $ret = $this->Images_model->post_ImagesForSourceID($strNode); if ($ret === FALSE) { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\157\x64\145"], "\x6e\123\157\x75\162\x63\145\x49\104" => $ret], REST_Controller::HTTP_OK); } } public function ImagesForSourceID_put() { $imageInfo = $this->put("\x69\155\141\147\x65\x49\x6e\x66\x6f"); $nSourceID = $this->put("\156\123\x6f\165\162\x63\x65\111\104"); if (!isset($imageInfo["\163\164\162\x49\155\x67\x46\x69\x6c\x65\x4e\141\x6d\x65"]) || !isset($imageInfo["\x73\x74\x72\103\x68\141\162\164\116\157"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\x61\x67\x65\x73\x5f\x6d\x6f\x64\145\x6c"); $ret = $this->Images_model->put_ImagesForSourceID($imageInfo, $nSourceID); if ($ret > 0) { return $this->set_response(["\145\162\x72\157\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\162\x72\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\162\x6f\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\157\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function ImagesBySourceIDForID_post() { $nMGSourceID = $this->post("\x6e\x4d\x47\x53\157\x75\x72\x63\x65\x49\x44"); $imageInfo = $this->post("\123\x49\155\x61\x67\x65\111\156\x66\x6f"); $strImgFileName = ''; if (!isset($nMGSourceID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\141\x67\x65\163\x5f\155\x6f\x64\145\x6c"); $ret = $this->Images_model->post_ImagesBySourceIDForID($nMGSourceID, $imageInfo, $strImgFileName); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\157\x72\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\157\x64\145"], "\156\x49\155\147\x49\104" => $ret, "\163\164\162\x49\155\x67\x46\151\154\145\116\x61\x6d\x65" => $strImgFileName], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\x6f\x72\x43\x6f\x64\x65"], "\156\111\155\147\111\104" => 0, "\163\x74\x72\111\155\147\x46\x69\154\145\116\x61\155\145" => ''], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\162\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\162\x43\157\x64\x65"], "\x6e\x49\155\x67\x49\104" => 0, "\x73\x74\x72\111\x6d\147\106\x69\x6c\145\116\141\155\x65" => ''], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\x6f\162\103\157\144\x65"], "\156\x49\155\147\111\104" => 0, "\163\x74\x72\111\x6d\147\106\151\x6c\145\x4e\x61\155\145" => ''], REST_Controller::HTTP_OK); } } public function ImagesByLimitForSearch_post() { $searchCondition = $this->post("\x53\x53\x65\141\162\143\150\x43\x6f\156\x64\151\x74\151\x6f\156"); $nLimit = $this->post("\x6e\x4c\151\x6d\x69\164"); $bExistSmartPayImage = FALSE; load_model($this, "\x49\x6d\141\x67\x65\x73\x5f\155\x6f\x64\x65\x6c"); $ret = $this->Images_model->post_ImagesByLimitForSearch($searchCondition, $nLimit, $bExistSmartPayImage); $items = array(); if (count($ret) > 0) { load_model($this, "\x44\x61\164\141\x47\162\157\x75\160\111\x6d\141\147\x65\x73\137\x6d\x6f\x64\x65\154"); foreach ($ret as $row) { $imgInfo = SImageInfo::createFromDBRecord($row); $imgInfo->bIsThirdPartyGroupImage = $this->DataGroupImages_model->CheckIfThirdPartyImageByID($row["\151\x6d\147\x5f\x69\144"]); $imgInfo->eImageType = "\x65\x4e\x6f\x72\x6d\x61\154\104\145\166\151\143\145\x49\x6d\141\x67\x65"; if ($bExistSmartPayImage == TRUE) { if (empty($row["\x73\x70\137\x69\155\x67\137\x70\x61\x79\x5f\163\164\x61\164\x75\x73"])) { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = "\145\x4e\x6f\162\155\x61\154\x44\x65\166\x69\x63\145\x49\x6d\x61\x67\x65"; } else { if ($row["\x73\x70\x5f\x69\155\147\x5f\x70\x61\171\137\x73\164\141\x74\x75\x73"] == "\120\141\x69\144") { $imgInfo->bPaidImage = TRUE; $imgInfo->eImageType = "\145\x53\x6d\141\162\x74\120\141\x79\x50\141\x69\x64\x49\x6d\x61\147\145"; } else { $imgInfo->bPaidImage = FALSE; $imgInfo->eImageType = "\x65\x53\x6d\141\162\x74\x50\x61\x79\125\x6e\x70\141\x69\x64\111\155\141\x67\x65"; } } } array_push($items, $imgInfo); } return $this->set_response(["\x65\162\162\157\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\x43\157\144\x65"], "\166\145\143\x49\x6d\x61\x67\x65\x49\x6e\146\157" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\162\103\157\144\x65"], "\166\x65\143\x49\x6d\x61\147\x65\x49\x6e\146\157" => $items], REST_Controller::HTTP_OK); } } public function ImagesForAcqDateDup_get() { load_model($this, "\x49\155\x61\147\x65\163\x5f\x6d\157\x64\x65\154"); $ret = $this->Images_model->get_ImagesForAcqDateDup(); $items = array(); if (count($ret) > 0) { load_model($this, "\104\x61\164\x61\107\162\x6f\165\x70\111\155\x61\x67\x65\163\137\155\157\144\x65\154"); $item_index = array(); foreach ($ret as $rows) { array_push($item_index, count($rows) - 1); foreach ($rows as $row) { $imgInfo = SImageInfo::createFromDBRecord($row); $imgInfo->bIsThirdPartyGroupImage = $this->DataGroupImages_model->CheckIfThirdPartyImageByID($row["\x69\x6d\147\x5f\151\144"]); array_push($items, $imgInfo); } } return $this->set_response(["\145\162\162\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\x43\157\144\145"], "\166\145\x63\111\155\141\147\x65\x49\x6e\144\x65\x78" => $item_index, "\166\145\143\x49\155\141\x67\145\x49\156\x66\157" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\103\157\144\145"], "\166\x65\143\x49\155\141\x67\x65\111\x6e\x64\145\x78" => 0, "\x76\x65\x63\x49\x6d\141\147\145\x49\156\146\157" => $items], REST_Controller::HTTP_OK); } } public function ImagesInGroup_post() { load_model($this, "\111\x6d\141\x67\145\x73\x5f\155\x6f\144\145\x6c"); $data = $this->Images_model->post_ImagesInGroup($this->post()); $this->set_response($data, REST_Controller::HTTP_OK); } public function Patients_post() { $savingData = $this->post(); if (!isset($savingData["\x73\164\162\x43\150\141\x72\x74\116\157"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { load_model($this, "\x50\141\164\151\x65\x6e\164\x73\137\x6d\157\x64\x65\x6c"); $ret = $this->Patients_model->getPatientIdByChartNo($savingData["\x73\x74\162\103\150\141\162\x74\116\157"]); if (count($ret) > 0) { if ($ret[0]["\x70\x61\164\137\151\144"] > 0) { return $this->set_response(["\145\x72\x72\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\x72\x6f\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } } if (!isset($savingData["\144\x74\x42\151\162\x74\150\144\141\x74\145"])) { $dtPatBirthDate = date("\131\55\x6d\55\144"); } else { $now = new DateTime(); $diffBirthDate = new DateTime($savingData["\144\x74\102\x69\162\164\x68\144\x61\x74\x65"]); if ($diffBirthDate->diff($now)->invert !== 0) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $dtPatBirthDate = currentDateFormat(DATEFORMAT_SEARCH_DB, $savingData["\144\164\x42\151\x72\x74\150\144\x61\x74\145"]); } if (empty($savingData["\163\x74\x72\107\x65\156\144\145\162"])) { $strGender = "\117"; } else { $gender = $savingData["\163\164\162\x47\145\x6e\144\x65\162"]; $strGender = substr($gender, 0, 1); $strGender = strtoupper($strGender); if (!($strGender === "\117" || $strGender === "\x4d" || $strGender === "\106")) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } if (!isset($savingData["\x64\x74\122\x65\147\x69\163\164\x65\162\145\144\x44\x61\164\145\124\x69\x6d\x65"])) { $strPatientRegisteredDateTime = date("\x59\x2d\x6d\x2d\x64"); } else { $strPatientRegisteredDateTime = $savingData["\x64\x74\x52\x65\147\151\163\x74\145\x72\x65\x64\104\141\x74\x65\x54\x69\155\x65"]; } $strBirthDate = $dtPatBirthDate; $parameters = array($savingData["\163\x74\162\103\150\x61\162\x74\x4e\157"], $savingData["\x73\164\162\x4c\x61\x73\164\116\x61\155\x65"], $savingData["\163\x74\x72\106\x69\162\x73\x74\116\x61\155\x65"], $savingData["\163\164\162\x4d\x69\x64\x64\154\x65\x4e\x61\155\x65"], $strGender, $strBirthDate, $savingData["\163\x74\x72\105\x6d\141\x69\x6c"], $savingData["\x73\164\162\123\x6f\x63\x69\x61\154\x49\104"], $savingData["\163\164\162\120\x68\x6f\x6e\x65"], $savingData["\x73\164\x72\x4d\157\x62\x69\x6c\x65"], $savingData["\x73\x74\162\132\151\x70\x43\x6f\144\x65"], $savingData["\163\x74\x72\x41\x64\144\x72\145\x73\163"], $strPatientRegisteredDateTime, $savingData["\x73\x74\x72\x50\150\157\x74\x6f\111\104\116\141\x6d\145"], getChosung($savingData["\x73\x74\162\x4c\141\x73\x74\116\x61\155\145"]), sourceTypeEnum2String($savingData["\145\x53\x6f\165\x72\143\x65\124\x79\x70\x65"])); $ret = $this->Patients_model->post_Patients($parameters); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\x6f\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } } } public function PatientsR2_post() { $sPatientInfo = SPatientInfo::constructWithParameter($this->post()); if (!isset($sPatientInfo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\141\x74\151\x65\156\x74\x73\122\62\137\155\x6f\x64\145\x6c"); $ret = $this->PatientsR2_model->post_PatientsR2($sPatientInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientsByChartNo_get() { $strChartNo = urldecode($this->get("\x63\150\x61\x72\x74\156\157")); load_model($this, "\x50\141\164\x69\145\156\x74\163\137\x6d\x6f\x64\145\x6c"); $ret = $this->Patients_model->get_PatientsByChartNo($strChartNo); if ($ret["\145\x72\x72\157\162\103\x6f\144\x65"] == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\x43\x6f\x64\x65"], "\160\141\164\151\x65\x6e\x74\x49\x6e\x66\x6f" => $ret["\160\x61\164\x69\145\x6e\x74\111\x6e\x66\x6f"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\103\157\144\x65"], "\x70\141\x74\151\145\156\x74\x49\x6e\x66\157" => array()], REST_Controller::HTTP_OK); } } public function PatientsByChartNo_delete() { $strChartNo = urldecode($this->get("\x63\150\x61\x72\164\x6e\x6f")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\141\x74\x69\x65\156\x74\163\x5f\x6d\157\144\145\x6c"); $ret = $this->Patients_model->delete_PatientsByChartNo($strChartNo); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\162\157\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\x72\157\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function PatientsByChartNoR2_get() { $chartno = trim(urldecode($this->get("\x63\150\141\162\x74\x6e\x6f"))); if (empty($chartno)) { vt_loge("\120\141\164\x69\x65\156\x74\163\x42\x79\x43\150\141\x72\x74\116\157\137\147\x65\x74\x20\101\x70\151\x2e\x20" . "\x54\x68\x65\x20\x70\141\162\141\155\x65\164\145\162\40\x69\163\x20\x69\x6e\166\141\154\x69\x64\40\x64\x61\164\x61\56"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\141\x74\x69\145\x6e\x74\163\122\62\137\x6d\x6f\144\145\154"); $ret = $this->PatientsR2_model->get_PatientsByChartNoR2($chartno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientsByChartNo_put() { $strChartNo = $this->put("\163\x74\x72\x43\150\141\162\x74\116\157"); $savingData = $this->put("\163\x50\141\x74\x69\x65\x6e\x74\111\x6e\146\157"); if (!isset($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\x61\164\x69\145\x6e\x74\x73\x5f\155\x6f\x64\145\x6c"); $ret = $this->Patients_model->put_PatientsByChartNo($strChartNo, $savingData); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\x72\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\162\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\x6f\162\103\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\162\x6f\162\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\x6f\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function PatientsByChartNoR2_put() { $strChartNo = $this->put("\x73\x74\x72\103\x68\x61\x72\164\116\157"); if (!isset($strChartNo) || empty($strChartNo)) { vt_loge(__METHOD__ . "\72" . "\x73\164\162\103\150\x61\x72\164\x4e\157\40\x69\163\x20\x6e\157\164\x20\x73\145\x74\x20\x6f\x72\x20\x65\x6d\160\164\171\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $sPatientInfo = SPatientInfo::constructWithParameter($this->put("\x73\x50\141\x74\151\x65\156\x74\x49\156\146\x6f")); if (!isset($sPatientInfo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\141\x74\151\x65\156\164\x73\122\x32\137\x6d\x6f\144\145\x6c"); $ret = $this->PatientsR2_model->put_PatientsByChartNoR2($strChartNo, $sPatientInfo); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\162\x6f\x72\103\157\144\145" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\x72\x6f\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\x6f\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function PatientsByChartNoForID_get() { $strChartNo = urldecode($this->get("\143\150\x61\162\164\x6e\157")); if (!isset($strChartNo) || strlen($strChartNo) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\x61\164\x69\145\x6e\164\x73\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->Patients_model->get_PatientsByChartNoForID($strChartNo); if (count($ret) > 0) { $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\157\144\x65"], "\156\120\x61\x74\111\104" => $ret[0]["\160\x61\x74\x5f\151\x64"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\162\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\x43\157\x64\145"], "\x6e\120\141\x74\x49\x44" => 0], REST_Controller::HTTP_OK); } } public function PatientsForCondition_post() { $parameters = $this->post(); $pageNum = $this->post("\160\141\x67\145\116\165\x6d"); $numItems = $this->post("\x6e\165\155\x49\164\x65\155\163"); if (!isset($parameters["\x73\x65\141\x72\x63\x68\x43\157\x6e\144\151\x74\x69\x6f\x6e"]["\x65\x4d\x6f\x64\141\x6c\x69\164\171"]) || $parameters["\x73\145\x61\162\x63\150\x43\x6f\156\x64\151\x74\x69\157\x6e"]["\x65\x4d\157\144\x61\x6c\x69\164\x79"] == '' || !isset($parameters["\160\x61\x69\162\x44\x6f\x63\164\x6f\x72\x54\171\160\145"]["\163\x65\143\157\156\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; load_model($this, "\120\x61\164\151\x65\156\x74\163\x5f\155\157\x64\145\x6c"); $ret = $this->Patients_model->post_PatientsForCondition($parameters, $pageNum, $numItems); $items = array(); if ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\162\x6f\x72\103\157\x64\145"], "\x73\x65\141\162\143\x68\145\x64\x50\x61\x74\151\145\x6e\x74\114\x69\163\164" => array(), "\x6e\103\x6e\x74" => 0], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\x43\157\144\x65"], "\163\145\141\x72\x63\x68\145\x64\x50\x61\x74\x69\x65\x6e\164\x4c\x69\x73\x74" => array(), "\x6e\x43\x6e\x74" => 0], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_INVALIDDATA) { return $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\157\x72\103\157\144\145"], "\163\x65\141\162\143\x68\145\x64\120\141\164\151\145\x6e\164\114\151\163\164" => array(), "\156\103\156\x74" => 0], REST_Controller::HTTP_OK); } else { foreach ($ret as $row) { $patInfo = new SSearchedPatient($row); array_push($items, $patInfo); } return $this->set_response(["\x65\162\x72\157\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\157\x64\145"], "\x73\x65\141\x72\143\x68\145\144\120\141\164\x69\x65\x6e\x74\114\151\163\x74" => $items, "\x6e\x43\x6e\x74" => count($items)], REST_Controller::HTTP_OK); } } public function PatientsForConditionP2_post() { load_model($this, "\x50\141\164\151\145\156\x74\163\x5f\155\157\144\145\154"); $ret = $this->Patients_model->post_PatientsForConditionP2($this->post()); if ($ret["\145\162\x72\x6f\x72\103\x6f\144\145"] == VERR_COMMON_INVALID) { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response($ret, REST_Controller::HTTP_OK); } } public function PatientsForNameOpOr_post() { $parameters = $this->post(); if (!isset($parameters["\163\x74\162\x4c\141\x73\x74\116\141\155\145"]) && !isset($parameters["\163\164\162\106\151\162\x73\164\x4e\x61\x6d\145"]) && !isset($parameters["\163\164\162\x4d\151\x64\144\x6c\x65\x4e\141\155\x65"]) || !isset($parameters["\x62\111\163\x45\170\141\143\164\x6c\x79"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\x61\x74\x69\145\156\x74\x73\137\x6d\x6f\144\x65\x6c"); $ret = $this->Patients_model->post_PatientsForNameOpOr($parameters); $items = array(); if (count($ret) < 1) { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\x43\157\144\x65"], "\x70\141\164\x69\145\156\x74\x49\156\146\157\114\x69\x73\x74" => $items], REST_Controller::HTTP_OK); } else { foreach ($ret as $row) { $pi = SPatientInfo::createFromDBRecord($row); array_push($items, $pi); } return $this->set_response(["\145\162\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\x43\x6f\144\x65"], "\160\x61\164\151\145\156\164\x49\x6e\146\157\x4c\x69\x73\x74" => $items], REST_Controller::HTTP_OK); } } public function PatientsForNameOpAnd_post() { $parameters = $this->post(); if (!isset($parameters["\163\x74\162\x4c\x61\163\164\116\x61\x6d\x65"]) || !isset($parameters["\163\x74\x72\x46\x69\x72\x73\164\x4e\x61\155\145"]) || !isset($parameters["\163\164\162\x4d\x69\144\144\154\145\x4e\x61\x6d\145"]) || !isset($parameters["\x62\x49\163\105\x78\141\x63\164\x6c\x79"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\x61\164\151\x65\156\164\x73\x5f\x6d\x6f\144\x65\154"); $ret = $this->Patients_model->post_PatientsForNameOpAnd($parameters); $items = array(); if (count($ret) < 1) { return $this->set_response(["\145\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\x43\x6f\144\x65"], "\160\141\x74\x69\145\156\x74\x49\x6e\x66\x6f\x4c\151\x73\164" => $items], REST_Controller::HTTP_OK); } else { foreach ($ret as $row) { $pi = SPatientInfo::createFromDBRecord($row); array_push($items, $pi); } return $this->set_response(["\x65\162\162\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\103\157\x64\145"], "\160\141\164\x69\x65\x6e\164\x49\x6e\146\x6f\x4c\151\163\x74" => $items], REST_Controller::HTTP_OK); } } public function PatientsForChartNoList_post() { $strChartNoList = $this->post("\163\x74\162\x43\x68\141\162\x74\116\157\114\x69\x73\x74"); if (!isset($strChartNoList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\x61\164\x69\145\156\x74\163\x5f\x6d\x6f\144\145\x6c"); $ret = $this->Patients_model->post_PatientsForChartNoList($strChartNoList); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $patInfo = new SSearchedPatient($row); $patInfo->dtBirthdate = currentDateFormat(DATEFORMAT_ISO8601, $row["\160\x61\x74\137\142\x69\x72\x74\150\x64\x61\x74\145"]); array_push($items, $patInfo); } return $this->set_response(["\145\x72\162\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\103\x6f\x64\x65"], "\163\x65\141\x72\x63\x68\x65\144\120\141\x74\x69\145\x6e\x74\x4c\x69\x73\164" => $items, "\156\x43\156\x74" => count($ret)], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\x72\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\x72\x43\x6f\x64\x65"], "\x73\x65\141\162\x63\x68\145\x64\x50\x61\164\x69\x65\x6e\x74\x4c\151\x73\164" => $items, "\x6e\103\x6e\164" => 0], REST_Controller::HTTP_OK); } } public function PatientsForChartNoListP2_post() { $strChartNoList = $this->post("\x73\164\x72\x43\150\141\162\164\x4e\157\x4c\x69\x73\x74"); if (!isset($strChartNoList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\141\x74\151\x65\156\164\163\x5f\x6d\157\x64\x65\x6c"); $ret = $this->Patients_model->post_PatientsForChartNoListP2($strChartNoList); if ($ret["\145\x72\162\x6f\x72\103\x6f\x64\x65"] === VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\x65\162\162\x6f\x72\103\157\x64\x65"] === VERR_DB_NOSUCHDATA) { return $this->set_response(createResponse($ret["\x65\162\x72\x6f\162\x43\157\144\x65"]), REST_Controller::HTTP_OK); } else { return $this->set_response(createResponse($ret["\145\x72\x72\157\x72\103\157\144\x65"]), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function PatientsByChartNoForImage_post() { $strChartNo = $this->post("\x73\164\162\x43\150\x61\162\x74\116\x6f"); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\141\164\x69\x65\x6e\x74\163\137\155\157\x64\145\154"); $ret = $this->Patients_model->post_PatientsByChartNoForImage($strChartNo); if ($ret === VSUCCESS) { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_PATIDTOIMG) { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_DB_PATIDTOIMG)["\145\162\162\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\x72\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function PatientsForAttendingDoctor_post() { $parametersOfPostPatientsForAttendingDoctor = $this->post(); if (!isset($parametersOfPostPatientsForAttendingDoctor["\x73\164\x72\x44\157\143\164\157\x72\116\x61\x6d\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\141\164\151\x65\156\164\x73\137\155\x6f\x64\145\x6c"); $ret = $this->Patients_model->post_PatientsForAttendingDoctor($parametersOfPostPatientsForAttendingDoctor); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\103\157\144\x65"], "\163\164\x72\x6c\x50\x61\164\x69\145\156\164\x4c\151\163\x74" => $parametersOfPostPatientsForAttendingDoctor["\x73\164\162\x6c\120\x61\x74\151\145\156\x74\x4c\151\x73\164"]], REST_Controller::HTTP_OK); } elseif (VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\x43\x6f\144\145"], "\x73\164\162\154\x50\141\164\151\x65\x6e\x74\x4c\151\x73\164" => array()], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\x6f\x72\x43\157\144\x65"], "\x73\x74\162\x6c\x50\141\164\151\x65\x6e\x74\x4c\151\163\164" => array()], REST_Controller::HTTP_OK); } } public function PatientsByDoctorNameForAttendingDoctor_get() { $strDoctorName = urldecode($this->get("\144\157\x63\x74\157\x72\x6e\x61\155\145")); if (empty($strDoctorName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\x61\x74\x69\145\x6e\x74\x73\137\155\x6f\144\x65\154"); $ret = $this->Patients_model->get_PatientsByDoctorNameForAttendingDoctor($strDoctorName); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $strChartno = $row["\160\x61\x74\137\143\150\x61\x72\164"]; array_push($items, $strChartno); } return $this->set_response(["\x65\x72\x72\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\x43\x6f\144\x65"], "\x73\x74\x72\x6c\x50\141\x74\151\145\x6e\164\x4c\151\163\164" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\162\103\x6f\144\145"], "\x73\x74\x72\x6c\x50\x61\164\151\145\156\164\x4c\x69\163\x74" => $items], REST_Controller::HTTP_OK); } } public function PatientsForChartNo_put() { $strNewChartNo = $this->put("\163\164\162\x4e\x65\x77\103\x68\x61\x72\164\x4e\x6f"); $strExistChartNo = $this->put("\x73\164\162\x45\x78\151\163\164\103\150\141\x72\164\116\x6f"); if (empty($strExistChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\141\x74\151\x65\x6e\164\x73\137\x6d\x6f\x64\145\154"); $ret = $this->Patients_model->put_PatientsForChartNo($strNewChartNo, $strExistChartNo); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\x6f\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function PatientsByChartNoForRecentlyViewed_put() { $strChartNo = $this->put(); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\x61\x74\151\x65\x6e\x74\163\x5f\x6d\157\x64\145\x6c"); $ret = $this->Patients_model->put_PatientsByChartNoForRecentlyViewed($strChartNo); if ($ret > 0) { return $this->set_response(returnSetResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_RANGE), REST_Controller::HTTP_OK); } } public function PatientsByNumListForRecentlyViewed_post() { $DoctorNameAccountTypePair = $this->post("\104\157\143\x74\157\x72\116\x61\x6d\x65\101\143\143\x6f\165\x6e\164\x54\x79\160\145\x50\x61\x69\x72"); $pageNum = $this->post("\160\x61\147\x65\116\165\x6d"); $numItems = $this->post("\x6e\x75\x6d\x49\164\145\155\163"); $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; if (!isset($DoctorNameAccountTypePair["\x66\151\162\163\x74"]) || !isset($DoctorNameAccountTypePair["\x73\x65\x63\157\156\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (!EDoctorAccountType::isValidName($DoctorNameAccountTypePair["\163\x65\143\x6f\156\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\x61\164\x69\x65\x6e\x74\x73\x5f\x6d\x6f\x64\145\154"); $searchedPatientList = array(); if ("\x65\x44\x6f\x63\x74\x6f\162\x41\143\x63\x6f\x75\156\164\101\x6c\154" == $DoctorNameAccountTypePair["\x73\145\143\157\x6e\x64"]) { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientAll($searchedPatientList, $pageNum, $numItems); } else { if ("\145\x44\157\x63\164\157\x72\101\143\143\157\x75\156\x74\116\157\156\145" == $DoctorNameAccountTypePair["\x73\145\x63\157\156\x64"]) { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientNone($searchedPatientList, $pageNum, $numItems); } else { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientDoctor($searchedPatientList, $DoctorNameAccountTypePair["\x66\x69\x72\163\x74"], $pageNum, $numItems); } } if (count($searchedPatientList) == 0 || $ret < VSUCCESS) { return $this->set_response(array("\x65\x72\162\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\162\103\x6f\x64\145"], "\163\145\141\162\143\x68\x65\144\x50\x61\164\151\x65\156\x74\114\151\x73\x74" => $searchedPatientList), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\162\162\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\103\x6f\x64\x65"], "\163\x65\141\x72\x63\150\145\144\x50\141\x74\x69\x65\156\x74\114\151\163\x74" => $searchedPatientList), REST_Controller::HTTP_OK); } } public function PatientsByNumListForRecentlyAcquired_post() { $DoctorNameAccountTypePair = $this->post("\104\x6f\143\x74\x6f\x72\116\141\155\x65\101\x63\143\x6f\x75\156\x74\124\171\160\x65\x50\x61\151\162"); $pageNum = $this->post("\160\141\147\145\x4e\x75\x6d"); $numItems = $this->post("\x6e\165\155\x49\x74\x65\155\163"); $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; if (!isset($DoctorNameAccountTypePair["\146\151\x72\x73\x74"]) || !isset($DoctorNameAccountTypePair["\163\145\143\157\156\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (!EDoctorAccountType::isValidName($DoctorNameAccountTypePair["\163\145\x63\x6f\156\144"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x50\x61\x74\x69\145\x6e\164\163\137\x6d\x6f\144\145\x6c"); $searchedPatientList = array(); if ("\145\104\x6f\143\x74\x6f\162\101\x63\143\157\165\156\x74\101\x6c\x6c" == $DoctorNameAccountTypePair["\163\145\x63\157\156\x64"]) { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientAll($searchedPatientList, $pageNum, $numItems); } else { if ("\x65\x44\x6f\143\164\157\162\x41\x63\143\x6f\x75\x6e\x74\x4e\157\x6e\x65" == $DoctorNameAccountTypePair["\163\145\x63\157\x6e\x64"]) { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientNone($searchedPatientList, $pageNum, $numItems); } else { $ret = $this->Patients_model->post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientDoctor($searchedPatientList, $DoctorNameAccountTypePair["\146\x69\x72\x73\164"], $pageNum, $numItems); } } if (count($searchedPatientList) == 0 || $ret < VSUCCESS) { return $this->set_response(array("\145\x72\x72\157\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\103\x6f\x64\x65"], "\x73\x65\141\162\x63\150\x65\x64\120\141\164\x69\145\x6e\x74\114\151\x73\x74" => $searchedPatientList), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\162\162\x6f\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\157\144\145"], "\163\145\141\x72\x63\150\145\144\120\x61\164\151\x65\x6e\164\114\151\163\164" => $searchedPatientList), REST_Controller::HTTP_OK); } } public function PatientsByNumListForRecentlyScheduled_post() { $DoctorNameAccountTypePair = $this->post("\104\157\x63\x74\x6f\162\x4e\141\155\x65\x41\x63\143\157\x75\156\164\124\171\160\x65\120\x61\x69\162"); if (!isset($DoctorNameAccountTypePair["\146\151\x72\x73\x74"]) || !isset($DoctorNameAccountTypePair["\163\145\143\157\156\144"]) || !EDoctorAccountType::isValidName($DoctorNameAccountTypePair["\163\x65\x63\x6f\156\144"])) { vt_loge("\120\141\x74\151\145\x6e\164\x73\102\171\116\165\x6d\114\x69\x73\164\x46\157\x72\122\145\x63\145\156\x74\154\x79\x53\143\150\x65\144\x75\154\145\144\x5f\160\157\x73\x74\x20\101\x70\151\56\40" . "\x50\x61\162\141\155\145\x74\x65\162\163\40\x61\x72\145\40\151\156\x76\141\x6c\151\x64\x20\x64\141\164\141\56"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $pageNum = $this->post("\160\141\147\x65\116\x75\155"); $numItems = $this->post("\x6e\165\x6d\x49\164\145\x6d\163"); $pageNum = !isset($pageNum) ? PAGE_NUM : intval($pageNum); $numItems = !isset($numItems) ? NUM_ITEMS : intval($numItems); $this->load->model("\x50\x61\164\151\145\x6e\x74\163\137\x6d\x6f\x64\x65\154"); $ret = $this->Patients_model->post_PatientsByNumListForRecentlyScheduled($DoctorNameAccountTypePair["\x66\151\x72\163\164"], $DoctorNameAccountTypePair["\x73\x65\143\157\156\144"], $pageNum, $numItems); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientsByRecentlyAdded_post() { $DoctorNameAccountTypePair = $this->post("\x44\157\143\x74\157\x72\116\141\x6d\145\101\143\x63\x6f\165\156\x74\x54\x79\160\x65\x50\x61\151\x72"); if (!isset($DoctorNameAccountTypePair["\146\151\x72\163\164"]) || !isset($DoctorNameAccountTypePair["\163\x65\x63\x6f\x6e\144"]) || !EDoctorAccountType::isValidName($DoctorNameAccountTypePair["\x73\x65\143\157\x6e\144"])) { vt_loge(__METHOD__ . "\x3a\x20\120\141\162\141\155\145\164\x65\162\163\x20\141\162\145\x20\151\156\166\x61\x6c\x69\x64\x20\x64\x61\164\x61\x2e\x20\146\151\162\x73\x74\75\40" . $DoctorNameAccountTypePair["\x66\x69\162\x73\x74"] . "\40\x73\x65\x63\157\156\144\75\40" . $DoctorNameAccountTypePair["\x73\x65\x63\157\156\144"]); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $pageNum = $this->post("\160\x61\147\x65\116\x75\155"); $numItems = $this->post("\156\165\155\x49\164\x65\155\x73"); $pageNum = !isset($pageNum) ? PAGE_NUM : intval($pageNum); $numItems = !isset($numItems) ? NUM_ITEMS : intval($numItems); $this->load->model("\120\141\x74\151\x65\x6e\164\163\x5f\155\x6f\x64\145\154"); $ret = $this->Patients_model->post_PatientsByRecentlyAdded($DoctorNameAccountTypePair["\x66\x69\x72\163\164"], $DoctorNameAccountTypePair["\x73\x65\143\x6f\x6e\144"], $pageNum, $numItems); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientsForLastUpdated_get() { $strChartNo = urldecode($this->get("\x63\150\141\162\164\x6e\157")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\141\x74\151\x65\156\x74\x73\x5f\x6d\157\x64\x65\154"); $data = $this->Patients_model->get_PatientsForLastUpdated($this->get()); if ($data["\145\x72\x72\x6f\x72\x43\157\x64\145"] == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\162\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\x72\x43\157\144\x65"], "\x6c\141\x73\x74\x55\160\x64\x61\164\x65\144" => $data["\154\x61\x73\164\x55\160\144\141\x74\x65\144"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } } public function ReportsByChartNo_get() { $strChartNo = urldecode($this->get("\x63\150\x61\162\164\x6e\x6f")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x32\162\x70\x74\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->E2rpt_model->get_ReportsByChartNo($strChartNo); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $rptInfo = new SReportList(); $rptInfo->strReportName = $row["\162\160\x74\x5f\x6e\141\155\145"]; $rptInfo->strRptFileName = $row["\x72\x70\164\x5f\x66\151\x6c\x65\x6e\141\155\x65"]; $rptInfo->strComment = $row["\162\160\164\x5f\x63\x6f\x6d\155\145\x6e\x74"]; $rptInfo->dtCreatedRptTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\162\x70\164\x5f\143\x72\x65\x61\164\145\144\137\144\141\164\145\164\x69\x6d\145"]); array_push($items, $rptInfo); } return $this->set_response(["\145\162\162\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\103\x6f\144\x65"], "\166\145\x63\122\145\x70\157\x72\x74" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\x72\103\157\144\145"], "\x76\x65\x63\122\x65\x70\157\162\x74" => $items], REST_Controller::HTTP_OK); } } public function ReportsByChartNo_post() { $strCharNo = $this->post("\163\x74\x72\103\150\x61\x72\164\116\x6f"); $report = $this->post("\x73\122\145\160\157\162\164\x4c\151\x73\164"); if (!isset($strCharNo) || empty($strCharNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\122\x65\x70\157\162\x74\163\137\x6d\157\144\x65\154"); $ret = $this->Reports_model->post_ReportsByChartNo($strCharNo, $report); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\x65\x72\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\162\x6f\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } } public function ReportsByChartNo_put() { $strChartNo = $this->put("\x73\x74\x72\103\x68\x61\162\x74\x4e\x6f"); $report = $this->put("\x73\x52\145\160\157\x72\164\x4c\151\x73\x74"); if (!isset($strChartNo) || empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\122\x65\x70\157\x72\x74\163\x5f\x6d\x6f\x64\x65\154"); $ret = $this->Reports_model->put_ReportsByChartNo($strChartNo, $report); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function ReportsByChartNoForComment_put() { $strChartNo = $this->put("\163\164\x72\x43\150\141\x72\x74\116\157"); $parametersOfPutReportsByChartNoForComment = $this->put(); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x52\x65\160\x6f\162\164\x73\x5f\155\157\144\145\154"); $ret = $this->Reports_model->put_ReportsByChartNoForComment($strChartNo, $parametersOfPutReportsByChartNoForComment); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function ReportsByChartNoAndName_delete() { $strChartNo = urldecode($this->get("\x63\x68\x61\x72\x74\x6e\x6f")); $strReportName = urldecode($this->get("\156\x61\x6d\x65")); if (!isset($strChartNo) || empty($strChartNo) || !isset($strReportName) || empty($strReportName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x52\x65\x70\x6f\162\164\x73\137\x6d\x6f\x64\145\x6c"); $ret = $this->Reports_model->delete_ReportsByChartNoAndName($strChartNo, $strReportName); if ($ret > 0) { return $this->set_response(["\145\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } } public function SmartPayConfigs_get() { $nLockingTimeLimit = 168; load_model($this, "\x53\x6d\141\162\x74\x50\141\x79\103\157\156\146\x69\147\x73\137\x6d\157\x64\145\154"); $ret = $this->SmartPayConfigs_model->get_SmartPayConfigs(); $strE3Version = 0; if ($ret > 0) { $nLockingTimeLimit = intval($ret[0]["\x73\x70\x5f\x63\146\147\x5f\x6c\x6f\143\x6b\x69\x6e\x67\137\164\x69\155\145"]); $strE3Version = trim($ret[0]["\x73\x70\137\x63\x66\x67\137\x65\x33\137\166\145\x72\163\x69\x6f\x6e"]); $strDBCheckSum = trim($ret[0]["\163\160\x5f\143\x66\147\137\143\x68\145\143\x6b\x73\x75\x6d"]); return $this->set_response(["\145\x72\162\x6f\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\103\x6f\x64\145"], "\x6e\x4c\157\143\153\x69\x6e\x67\x54\151\155\145\x4c\151\155\x69\x74" => $nLockingTimeLimit, "\x73\x74\162\105\x33\126\145\x72\163\x69\x6f\156" => $strE3Version], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\162\x43\x6f\144\145"], "\x6e\x4c\x6f\x63\x6b\x69\x6e\x67\x54\x69\155\145\x4c\x69\x6d\x69\164" => $nLockingTimeLimit, "\163\x74\162\105\63\126\145\162\163\151\157\156" => $strE3Version], REST_Controller::HTTP_OK); } } public function SmartPayConfigsForE3Version_put() { $strE3Version = $this->put(); if (!isset($strE3Version) || empty($strE3Version)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\x6d\141\162\x74\120\x61\x79\103\157\x6e\x66\x69\x67\163\x5f\155\157\x64\x65\x6c"); $ret = $this->SmartPayConfigs_model->put_SmartPayConfigsForE3Version($strE3Version); if ($ret > 0) { return $this->set_response(["\x65\162\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayConfigsForChecksum_post() { $bUpdateData = $this->post("\142\125\160\144\x61\164\x65\104\x61\164\141"); if (!isset($bUpdateData)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\x6d\x61\162\164\x50\x61\171\x43\157\x6e\x66\x69\147\163\137\155\157\144\x65\154"); $ret = $this->SmartPayConfigs_model->get_SmartPayConfigsForChecksum($bUpdateData); if ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\103\157\x64\x65"], "\x73\x74\162\x43\x68\x65\x63\153\123\165\155" => 0], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_INVALIDDATA) { return $this->set_response(["\145\162\x72\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\162\x6f\x72\103\x6f\x64\145"], "\x73\x74\162\x43\x68\x65\x63\x6b\x53\165\155" => 0], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\x6f\144\145"], "\x73\x74\x72\103\150\x65\143\153\123\165\155" => $ret], REST_Controller::HTTP_OK); } } public function SmartPayAccounts_put() { $strUserID = $this->put("\x73\x74\x72\125\163\x65\162\111\104"); $strPassword = $this->put("\163\164\x72\x50\x61\163\163\x77\157\x72\144"); $bQueryUserID = $this->put("\x62\121\165\145\162\x79\x55\x73\x65\x72\x49\x44"); if (empty($strUserID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\155\141\x72\x74\x50\x61\171\101\143\143\x6f\165\156\164\163\x5f\155\157\144\x65\154"); $ret = $this->SmartPayAccounts_model->put_SmartPayAccounts($strUserID, $strPassword, $bQueryUserID); if ($ret > 0) { return $this->set_response(["\145\162\x72\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_OVERLAP)["\x65\x72\162\157\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\x6f\x72\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\x72\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\x72\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayAccounts_delete() { $strUserID = urldecode($this->delete("\x73\164\x72\125\163\x65\162\x49\104")); $bQueryUserID = urldecode($this->delete("\x62\x51\165\x65\162\171\x55\163\145\162\111\104")); if (!isset($bQueryUserID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\x6d\141\x72\x74\x50\x61\x79\x41\143\x63\x6f\165\x6e\x74\x73\137\x6d\157\x64\145\154"); $ret = $this->SmartPayAccounts_model->delete_SmartPayAccounts($strUserID, $bQueryUserID); if ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\x65\162\x72\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_INVALID)["\x65\x72\162\157\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayAccountsByIDAndQueryUserID_get() { $strUserID = urldecode($this->get("\151\x64")); $bQueryUserID = urldecode($this->get("\x71\x75\x65\162\x79\x75\163\145\x72\151\x64")); if (!isset($bQueryUserID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\155\x61\x72\164\x50\x61\x79\x41\x63\143\x6f\x75\156\164\x73\137\x6d\157\x64\145\x6c"); $ret = $this->SmartPayAccounts_model->get_SmartPayAccountsByIDAndQueryUserID($strUserID, $bQueryUserID); if ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\144\145" => returnSetResponse(VERR_COMMON_INVALID)["\x65\x72\162\157\162\103\x6f\144\x65"], "\x73\164\162\x55\x73\x65\162\x49\x44" => '', "\x73\164\x72\120\x61\163\163\167\x6f\x72\144" => ''], REST_Controller::HTTP_OK); } else { if (count($ret) > 0) { return $this->set_response(["\x65\162\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\103\157\144\x65"], "\x73\x74\x72\x55\163\x65\162\111\104" => $ret[0]["\163\160\x5f\141\143\143\137\165\x73\x65\x72\156\x61\x6d\x65"], "\163\164\162\120\x61\163\x73\167\157\x72\144" => $ret[0]["\163\160\x5f\x61\143\x63\137\x70\x61\163\163\x77\157\x72\x64"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\162\103\x6f\x64\145"], "\x73\x74\162\125\x73\145\162\x49\104" => '', "\163\164\162\x50\141\x73\163\167\157\x72\144" => ''], REST_Controller::HTTP_OK); } } } public function SmartPayCheckSumsByData_get() { $strData = urldecode($this->get("\x64\141\164\141")); if (!isset($strData)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\155\x61\162\164\x50\x61\x79\x43\x68\x65\x63\x6b\123\x75\155\x73\137\155\x6f\144\x65\154"); $ret = $this->SmartPayCheckSums_model->get_SmartPayCheckSumsByData($strData); return $this->set_response(["\x65\x72\162\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\103\157\144\145"], "\163\164\162\103\x68\145\143\153\123\x75\155" => $ret], REST_Controller::HTTP_OK); } public function SmartPayImages_post() { $parametersWithSmartPayImage = $this->post(); if (!isset($parametersWithSmartPayImage["\x73\164\162\111\x6d\x67\106\x69\x6c\145\x4e\141\155\145"]) || empty($parametersWithSmartPayImage["\163\x74\162\x49\x6d\147\x46\x69\154\x65\x4e\x61\x6d\145"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\x6d\x61\162\164\x50\141\x79\111\155\141\147\145\x73\x5f\155\157\x64\145\x6c"); $ret = $this->SmartPayImages_model->post_SmartPayImages($parametersWithSmartPayImage); if ($ret > 0) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\x72\157\x72\x43\157\144\x65" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\162\x6f\162\103\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\157\162\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\x72\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\157\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayImages_put() { $parametersWithSmartPayImage = $this->put(); if (!isset($parametersWithSmartPayImage["\163\x74\162\111\x6d\x67\106\x69\x6c\145\x4e\x61\x6d\x65"]) || empty($parametersWithSmartPayImage["\x73\164\x72\111\x6d\x67\x46\x69\x6c\145\116\141\x6d\145"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\155\x61\x72\x74\120\x61\x79\111\x6d\141\147\x65\x73\x5f\x6d\157\144\x65\x6c"); $ret = $this->SmartPayImages_model->put_SmartPayImages($parametersWithSmartPayImage); if ($ret > 0) { return $this->set_response(["\x65\162\x72\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_INVALIDDATA) { return $this->set_response(["\145\162\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\x72\162\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\162\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\162\103\157\x64\145" => returnSetResponse(VERR_DB_RANGE)["\x65\x72\x72\157\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesByFile_get() { $strImgFileName = urldecode($this->get("\146\151\x6c\x65")); load_model($this, "\x53\x6d\141\162\164\120\x61\171\x49\155\x61\147\x65\163\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->SmartPayImages_model->get_SmartPayImagesByFile($strImgFileName); if (count($ret) > 0) { $sSmartPayImage = new SSmartPayImage(); $sSmartPayImage->nImageID = intval($ret[0]["\x69\x6d\147\x5f\x69\x64"]); $sSmartPayImage->eImagePayStatus = stringToImagePayStatus($ret[0]["\x73\160\x5f\151\x6d\x67\137\x70\x61\171\x5f\163\164\141\x74\165\x73"]); $sSmartPayImage->dtImagePayTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\163\160\x5f\151\155\x67\x5f\160\x61\171\137\x64\141\164\145\x74\151\x6d\x65"]); $sSmartPayImage->eImageReportStatus = stringToImageReportStatus($ret[0]["\x73\x70\x5f\x69\155\147\137\162\x65\x70\x6f\x72\x74\137\x73\164\x61\164\x75\x73"]); $sSmartPayImage->dtImageReportTime = currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\x73\x70\137\151\155\x67\137\162\145\160\157\162\164\137\x64\x61\x74\x65\164\x69\155\x65"]); $sSmartPayImage->eImagePayType = StringToImagePayType($ret[0]["\163\160\137\151\x6d\147\137\160\x61\x79\137\x74\171\160\x65"]); $sSmartPayImage->strUnavailableFeatures = trim($ret[0]["\x73\x70\x5f\151\x6d\147\137\165\x6e\x61\166\141\x69\x6c\141\x62\x6c\x65\x5f\x66\x65\141\x74\165\162\x65\x73"]); $sSmartPayImage->strCheckSum = $ret[0]["\163\160\137\151\x6d\147\x5f\x63\x68\145\143\x6b\x73\x75\155"]; $strCheckSum = getSmartPayCheckSum($ret[0], "\163\x70\137\151\x6d\147\x5f\x63\x68\145\x63\x6b\163\165\155", "\163\x70\137\x69\155\147\x5f\165\163\145\162\137\x64\x65\146\151\x6e\x65\x64\x5f\64"); if (trim($ret[0]["\163\160\x5f\151\155\x67\x5f\143\x68\x65\143\x6b\163\x75\x6d"]) != $strCheckSum) { $sSmartPayImage->eImagePayStatus = enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImageUnpaidStatus); $sSmartPayImage->eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType); $sSmartPayImage->strUnavailableFeatures = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; $parameters = array(ImagePayStatusToString($sSmartPayImage->eImagePayStatus), ImagePayTypeToString($sSmartPayImage->eImagePayType), strval($sSmartPayImage->strUnavailableFeatures), $sSmartPayImage->nImageID); $updateRet = $this->SmartPayImages_model->get_SmartPayImagesByFile_UpdateSmartPayImage($parameters); if ($updateRet > 0) { $updateStrCheckSum = $this->SmartPayImages_model->get_SmartPayImagesForChecksum($strImgFileName, $strCheckSum, TRUE); if ($updateStrCheckSum == 0) { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\x72\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } } else { return $this->set_response(["\x65\x72\x72\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\x72\157\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } if ($sSmartPayImage->eImagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImageUnpaidStatus) && empty($sSmartPayImage->strUnavailableFeatures)) { $sSmartPayImage->strUnavailableFeatures = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; } return $this->set_response(["\x65\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\x43\157\x64\145"], "\163\x53\155\141\x72\164\x50\141\x79\111\x6d\141\147\x65" => $sSmartPayImage], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\x43\157\x64\x65"], "\163\123\155\x61\162\164\120\x61\x79\111\155\141\147\x65" => array()], REST_Controller::HTTP_OK); } } public function SmartPayImagesByFile_delete() { $strImgFileName = urldecode($this->get("\x66\151\154\145")); if (empty($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\155\141\162\x74\120\x61\x79\111\x6d\x61\x67\145\x73\137\x6d\x6f\x64\145\x6c"); $ret = $this->SmartPayImages_model->delete_SmartPayImagesByFile($strImgFileName); if ($ret > 0) { return $this->set_response(["\145\162\x72\x6f\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\x6f\162\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesByFile_post() { $strImgFileName = $this->post("\x73\x74\x72\x49\x6d\x67\x46\151\154\145\x4e\x61\155\x65"); $sSmartPayImage = $this->post("\x73\123\155\141\162\164\x50\x61\x79\x49\155\x61\x67\x65"); if (!isset($strImgFileName) && !isset($sSmartPayImage)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\155\x61\162\164\x50\x61\x79\111\x6d\x61\x67\x65\163\x5f\155\x6f\144\x65\x6c"); $ret = $this->SmartPayImages_model->post_SmartPayImagesByFile($strImgFileName, $sSmartPayImage); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\162\x72\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\162\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\x6f\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesByFileForPaid_put() { $strImgFileName = $this->put("\x73\164\x72\111\155\147\x46\151\154\145\116\141\x6d\145"); if (empty($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\x6d\x61\162\x74\120\141\171\111\155\141\147\145\163\x5f\x6d\x6f\x64\145\x6c"); $ret = $this->SmartPayImages_model->put_SmartPayImagesByFileForPaid($strImgFileName); if ($ret > 0) { return $this->set_response(["\x65\x72\162\x6f\x72\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\x72\x43\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\x72\x6f\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\x43\157\144\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\x6f\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesByID_delete() { $nImageID = urldecode($this->get("\151\x64")); if (empty($nImageID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\x6d\141\162\164\x50\141\x79\111\155\141\x67\x65\x73\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->SmartPayImages_model->delete_SmartPayImagesByID($nImageID); if ($ret > 0) { return $this->set_response(["\145\162\162\157\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesForChecksum_post() { $parameters = $this->post(); $strimgFileName = $parameters["\163\x74\x72\x49\155\x67\106\x69\x6c\x65\116\x61\155\x65"]; $strCheckSum = $parameters["\x73\164\162\x43\150\x65\143\x6b\x53\165\155"]; $bUpdateData = $parameters["\142\x55\x70\144\x61\x74\x65\104\x61\x74\141"]; load_model($this, "\123\x6d\x61\x72\164\120\141\x79\111\x6d\x61\147\x65\x73\137\155\x6f\144\x65\x6c"); $ret = $this->SmartPayImages_model->get_SmartPayImagesForChecksum($strimgFileName, $strCheckSum, $bUpdateData); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\x72\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\x65\162\x72\x6f\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\162\162\157\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } } public function SmartPayImagesForNotReported_get() { load_model($this, "\123\155\x61\x72\164\120\141\171\111\x6d\x61\x67\145\163\x5f\155\x6f\x64\145\154"); $ret = $this->SmartPayImages_model->get_SmartPayImagesForNotReported(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $sSmartPayImage = new SSmartPayImage(); $sSmartPayImage->nImageID = intval($row["\151\155\x67\x5f\x69\x64"]); $sSmartPayImage->strImgFileName = trim($row["\151\155\x67\137\146\151\x6c\x65\156\141\x6d\x65"]); $sSmartPayImage->strChartNo = trim($row["\x70\141\x74\x5f\143\x68\x61\162\164\x6e\x6f"]); $sSmartPayImage->strDeviceSerialNumber = trim($row["\144\145\x76\x5f\x73\x65\162\x69\x61\x6c\137\156\x75\x6d"]); $sSmartPayImage->eImagePayStatus = stringToImagePayStatus($row["\163\160\137\x69\x6d\x67\137\x70\141\x79\137\x73\x74\141\x74\x75\163"]); $sSmartPayImage->dtImagePayTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x73\x70\137\151\155\147\x5f\160\x61\x79\137\x64\x61\164\145\x74\x69\x6d\145"]); $sSmartPayImage->eImageReportStatus = stringToImageReportStatus($row["\x73\160\x5f\151\x6d\x67\137\162\145\160\x6f\162\x74\137\x73\x74\x61\x74\x75\163"]); $sSmartPayImage->dtImageReportTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x73\x70\137\151\155\147\137\x72\145\x70\x6f\162\164\x5f\144\x61\164\145\x74\x69\x6d\x65"]); $sSmartPayImage->eImagePayType = stringToImagePayType($row["\x73\x70\137\151\x6d\147\x5f\x70\x61\171\137\x74\171\160\x65"]); $sSmartPayImage->strUnavailableFeatures = trim($row["\x73\160\x5f\151\155\x67\137\165\x6e\141\x76\141\x69\x6c\141\142\x6c\145\137\x66\145\141\x74\165\x72\x65\x73"]); $sSmartPayImage->strCheckSum = trim($row["\x73\160\x5f\151\155\x67\137\x63\150\145\143\x6b\x73\x75\155"]); array_push($items, $sSmartPayImage); } return $this->set_response(["\x65\162\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\103\x6f\x64\x65"], "\x76\145\143\x53\x6d\141\x72\164\x50\x61\171\111\x6d\141\147\145" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\x43\157\144\x65"], "\x76\x65\x63\123\x6d\x61\x72\164\x50\141\171\x49\x6d\x61\x67\x65" => $items], REST_Controller::HTTP_OK); } } public function SmartPayImagesByFileForReportStatus_put() { $strImgFileName = $this->put("\163\x74\x72\111\x6d\141\x67\145\x46\x69\x6c\x65\x4e\x61\155\x65"); $eImageReportStatus = $this->put("\145\111\155\141\147\145\x52\145\x70\x6f\x72\x74\123\164\x61\164\165\x73"); if (!isset($eImageReportStatus) || !isset($strImgFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x53\x6d\x61\162\164\120\x61\x79\x49\x6d\141\147\x65\163\137\x6d\x6f\x64\145\x6c"); $ret = $this->SmartPayImages_model->put_SmartPayImagesByFileForReportStatus($strImgFileName, $eImageReportStatus); if ($ret > 0) { return $this->set_response(["\x65\162\x72\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_OVERLAP)["\x65\162\162\157\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(["\145\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\x72\x6f\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function UserAccounts_get() { load_model($this, "\x55\163\145\162\101\143\x63\157\165\x6e\x74\x73\137\x6d\157\144\x65\x6c"); $ret = $this->UserAccounts_model->get_UserAccounts($this->get()); $accountInfoList = array(); if (count($ret) < 1) { return $this->set_response(array("\145\162\162\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\103\x6f\x64\x65"], "\x61\x63\x63\157\165\156\164\111\156\x66\x6f\x4c\x69\x73\164" => $accountInfoList), REST_Controller::HTTP_OK); } else { for ($i = 0; $i < count($ret); $i++) { $accInfo = new SAccountInfo(); $accInfo->strAccountName = $ret[$i]["\141\x63\143\137\x75\163\145\162\x6e\141\155\145"]; $accInfo->strAccountPasswd = $ret[$i]["\x61\x63\143\137\x70\x61\163\163\167\x6f\x72\144"]; $accInfo->strGrade = $ret[$i]["\141\x63\x63\x5f\x6c\145\166\x65\x6c"]; $accInfo->bDataDel = setBoolVal($ret[$i]["\x61\x63\143\x5f\x64\x61\164\141\x5f\x64\145\x6c"]); $accInfo->bDataTransfer = setBoolVal($ret[$i]["\x61\x63\143\137\144\x61\164\141\137\x74\162\x61\x6e\x73\146\145\x72"]); $accInfo->bDataExport = setBoolVal($ret[$i]["\141\143\x63\x5f\x64\141\164\141\137\x65\x78\160\x6f\x72\x74"]); array_push($accountInfoList, $accInfo); } } return $this->set_response(array("\145\162\x72\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\x43\x6f\x64\x65"], "\x61\x63\x63\157\165\x6e\164\111\156\146\157\x4c\151\163\x74" => $accountInfoList), REST_Controller::HTTP_OK); } public function UserAccounts_post() { $accountInfo = $this->post(); if (!isset($accountInfo["\x73\x74\x72\x41\143\143\157\x75\x6e\164\x4e\x61\x6d\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\125\x73\145\x72\101\143\x63\157\x75\156\164\163\137\155\x6f\x64\x65\154"); $ret = $this->UserAccounts_model->post_UserAccounts($accountInfo); if ($ret > 0) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { if ($ret === VERR_DB_OVERLAP) { return $this->set_response(["\x65\162\x72\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_DB_OVERLAP)["\145\x72\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\103\157\144\145"]], REST_Controller::HTTP_OK); } } } public function UserAccountsR2_get() { load_model($this, "\125\163\x65\x72\x41\x63\x63\157\x75\156\x74\163\x5f\x6d\x6f\144\145\x6c"); $ret = $this->UserAccounts_model->get_UserAccountsR2(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function UserAccountsR2_post() { $accountInfo = SAccountInfoR2::constructWithParameter($this->post()); if (!isset($accountInfo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\125\x73\145\162\x41\x63\x63\157\165\x6e\164\163\137\x6d\157\x64\x65\x6c"); $ret = $this->UserAccounts_model->post_UserAccountsR2($accountInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function UserAccountsForNames_get() { load_model($this, "\x55\x73\145\x72\101\x63\143\157\165\x6e\164\x73\137\x6d\157\x64\145\x6c"); $ret = $this->UserAccounts_model->get_UserAccountsForNames($this->get()); $items = array(); if (count($ret) < 1) { return $this->set_response(["\145\x72\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\x72\x43\x6f\x64\145"], "\x73\164\x72\x6c\125\x73\x65\162\116\141\155\x65" => $items], REST_Controller::HTTP_OK); } else { foreach ($ret as $row) { $strUserName = $row["\141\x63\x63\x5f\165\x73\145\162\x6e\141\155\x65"]; array_push($items, $strUserName); } return $this->set_response(["\145\162\x72\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\103\157\144\145"], "\163\x74\x72\154\125\x73\x65\162\x4e\141\x6d\145" => $items], REST_Controller::HTTP_OK); } } public function UserAccountsByName_get() { $strAccountName = urldecode($this->get("\x6e\x61\x6d\145")); if (!isset($strAccountName) && strlen($strAccountName) < 1) { vt_loge(__METHOD__ . "\x3a\40\156\x61\x6d\145\x20\151\163\x20\x65\x6d\160\x74\171\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\125\x73\145\x72\101\143\143\x6f\x75\x6e\x74\x73\137\x6d\x6f\144\x65\154"); $ret = $this->UserAccounts_model->get_UserAccountsByName($strAccountName); if (count($ret) <= 0) { vt_loge(__METHOD__ . "\x3a\40\156\157\x20\165\x73\145\x72\x20\x66\x6f\165\x6e\x64\72\x20" . $strAccountName); return $this->set_response(["\x65\x72\162\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\x72\x43\157\x64\145"], "\x61\143\143\x6f\x75\x6e\164\111\156\x66\x6f" => array()], REST_Controller::HTTP_OK); } else { $accountInfo = new SAccountInfo(); $accountInfo->strAccountName = $ret[0]["\x61\x63\x63\137\165\x73\x65\x72\156\141\155\145"]; $accountInfo->strAccountPasswd = $ret[0]["\141\143\x63\x5f\160\x61\x73\163\167\157\162\x64"]; $accountInfo->strGrade = $ret[0]["\x61\143\143\x5f\154\145\166\x65\154"]; $accountInfo->bDataDel = setBoolVal($ret[0]["\x61\143\143\137\144\141\164\141\x5f\x64\x65\154"]); $accountInfo->bDataTransfer = setBoolVal($ret[0]["\x61\x63\x63\137\144\x61\x74\x61\137\x74\162\x61\156\x73\146\x65\x72"]); $accountInfo->bDataExport = setBoolVal($ret[0]["\141\143\x63\137\x64\141\164\x61\x5f\x65\x78\160\x6f\162\x74"]); return $this->set_response(array("\145\162\162\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\157\x64\145"], "\141\x63\x63\x6f\165\x6e\x74\x49\156\x66\x6f" => $accountInfo), REST_Controller::HTTP_OK); } } public function UserAccountsByName_delete() { $strAccountName = urldecode($this->get("\156\141\x6d\145")); if (!isset($strAccountName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\125\x73\x65\x72\x41\x63\x63\x6f\x75\156\x74\x73\x5f\x6d\157\x64\145\x6c"); $ret = $this->UserAccounts_model->delete_UserAccountsByName($strAccountName); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\x72\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function UserAccountsByNameR2_get() { $strAccountName = trim(urldecode($this->get("\156\141\155\x65"))); if (empty($strAccountName)) { vt_loge("\125\x73\x65\162\x41\x63\x63\x6f\x75\156\164\x73\102\171\116\141\x6d\145\x5f\147\x65\x74\x20\x41\160\x69\56\40" . "\x54\150\x65\x20\160\x61\162\141\x6d\x65\x74\x65\162\40\x69\163\x20\x69\x6e\x76\x61\x6c\151\x64\x20\x64\141\x74\141\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\125\x73\145\162\x41\x63\x63\x6f\165\x6e\164\x73\137\155\157\x64\x65\154"); $ret = $this->UserAccounts_model->get_UserAccountsByNameR2($strAccountName); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function UserAccountsByName_put() { $strAccountName = $this->put("\x73\x74\x72\101\x63\x63\157\165\x6e\164\116\141\155\x65"); $accountInfo = $this->put("\163\x41\x63\x63\157\x75\156\164\x49\x6e\146\157"); load_model($this, "\x55\163\145\x72\101\x63\143\157\165\156\x74\163\137\155\157\144\145\x6c"); $ret = $this->UserAccounts_model->put_UserAccountsByName($strAccountName, $accountInfo); $errorCode = $ret["\x65\x72\162\x6f\162\103\157\144\x65"]; if ($errorCode === VERR_COMMON_SUCCESS) { return $this->set_response(["\145\x72\162\x6f\x72\x43\x6f\144\x65" => VERR_COMMON_SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\162\x43\x6f\144\145" => $errorCode, "\x65\162\x72\x6f\162\115\145\x73\x73\141\x67\x65" => createResponse($errorCode)], REST_Controller::HTTP_OK); } } public function UserAccountsByNameR2_put() { $strAccountName = $this->put("\x73\164\162\101\143\x63\x6f\x75\156\164\116\x61\x6d\x65"); $accountInfo = $this->put("\163\101\x63\x63\x6f\x75\156\x74\111\x6e\146\x6f"); load_model($this, "\x55\163\145\x72\101\x63\x63\x6f\x75\156\164\163\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->UserAccounts_model->put_UserAccountsByNameR2($strAccountName, $accountInfo); $errorCode = $ret["\145\x72\162\157\162\x43\157\144\145"]; if ($errorCode === VERR_COMMON_SUCCESS) { return $this->set_response(["\x65\x72\162\x6f\162\103\157\x64\x65" => VERR_COMMON_SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(createResponse($errorCode), REST_Controller::HTTP_OK); } } public function UserAccountsByNameForPassword_get() { $strAccountName = urldecode($this->get("\x6e\141\155\x65")); if (!isset($strAccountName) && strlen($strAccountName) < 1) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x55\x73\x65\162\101\143\x63\x6f\165\x6e\164\x73\137\x6d\157\144\145\154"); $ret = $this->UserAccounts_model->get_UserAccountsByNameForPassword($strAccountName); if (count($ret) < 1) { return $this->set_response(["\x65\x72\x72\x6f\162\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\103\x6f\144\x65"], "\163\x74\162\107\145\x74\120\141\163\163\x77\x6f\x72\x64" => ''], REST_Controller::HTTP_OK); } else { $strPassword = $ret[0]["\x61\x63\143\137\160\x61\163\163\x77\157\162\144"]; return $this->set_response(["\145\162\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\x43\157\x64\145"], "\163\164\x72\107\x65\164\120\x61\163\163\x77\157\x72\144" => $strPassword], REST_Controller::HTTP_OK); } } public function UserAccountsByNameForPassword_put() { $strAccountName = $this->put("\x73\x74\162\x41\143\143\157\x75\x6e\164\116\141\155\x65"); $strEditPassword = $this->put("\163\x74\x72\x45\144\151\x74\120\141\x73\163\167\x6f\x72\x64"); if (!isset($strAccountName) || !isset($strEditPassword)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\125\163\x65\162\101\143\143\157\165\156\164\163\137\x6d\157\144\145\x6c"); $ret = $this->UserAccounts_model->put_UserAccountsByNameForPassword($strAccountName, $strEditPassword); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function trOngoingOrders_get() { load_model($this, "\124\x65\154\145\x72\141\x64\x69\x6f\x6c\157\147\x79\104\x61\164\x61\x53\x65\162\x76\151\143\x65\x5f\155\157\x64\x65\154"); $ret = $this->TeleradiologyDataService_model->Get_trOngoingOrders(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $caseName = $row["\x74\162\x5f\x6f\x72\x64\x72\137\143\141\x73\x65\137\x6e\141\x6d\x65"]; array_push($items, $caseName); } return $this->set_response(["\145\x72\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\x43\x6f\x64\145"], "\143\x61\163\145\x6e\141\x6d\145" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\x72\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\162\103\157\144\x65"], "\143\141\163\145\x6e\141\x6d\145" => $items], REST_Controller::HTTP_OK); } } public function trOngoingOrderByCaseName_delete() { $caseName = urldecode($this->get("\143\x61\163\145\116\141\155\x65")); if (empty($caseName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\145\154\x65\x72\141\x64\x69\157\x6c\157\x67\171\104\141\164\141\123\145\x72\166\x69\x63\145\137\x6d\157\144\145\154"); $ret = $this->TeleradiologyDataService_model->delete_trOngoingOrderByCaseName($caseName); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } } public function dataGroupProjectImagesByImageFile_get() { $imageFileName = urldecode($this->get("\151\155\141\147\x65\x46\151\154\x65\x4e\x61\155\145")); if (empty($imageFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\124\x65\154\x65\162\x61\144\151\157\154\x6f\147\x79\x44\141\x74\141\123\x65\162\166\151\143\145\137\x6d\157\x64\x65\154"); $ret = $this->TeleradiologyDataService_model->get_dataGroupProjectImagesByImageFile($imageFileName); if ($ret == false) { return $this->set_response(["\x65\162\x72\157\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\x43\157\144\145"], "\x66\x69\154\x65\116\141\155\145" => array()], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\157\x64\x65"], "\x66\151\x6c\x65\x4e\x61\x6d\145" => $ret], REST_Controller::HTTP_OK); } } public function trOrderByCaseName_post() { $orderByCaseName = $this->post(); if (!isset($orderByCaseName["\143\141\163\145\x4e\x61\x6d\145"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\x65\154\x65\x72\141\144\151\157\x6c\x6f\x67\x79\x44\x61\164\141\123\x65\x72\166\x69\x63\x65\x5f\x6d\x6f\144\145\154"); $ret = $this->TeleradiologyDataService_model->post_trOrderByCaseName($orderByCaseName); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\x72\103\157\x64\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\145\x72\x72\157\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function trOrderByCaseNameForStatus_put() { $caseName = $this->put("\x63\141\163\145\x4e\141\155\145"); $orderStatus = $this->put("\x6f\162\x64\x65\x72\123\164\x61\x74\165\163"); if (empty($caseName) || empty($orderStatus)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\124\145\x6c\145\x72\x61\x64\151\x6f\154\x6f\147\x79\x44\x61\164\141\x53\x65\162\166\151\143\145\x5f\x6d\157\144\145\x6c"); $ret = $this->TeleradiologyDataService_model->put_trOrderByCaseNameForStatus($caseName, $orderStatus); if ($ret > 0) { return $this->set_response(["\145\162\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\x72\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\157\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function trUserAccounts_get() { load_model($this, "\124\x65\154\x65\x72\x61\144\151\157\154\x6f\x67\171\x44\141\164\x61\123\x65\162\166\151\143\145\x5f\155\157\144\x65\x6c"); $ret = $this->TeleradiologyDataService_model->get_trUserAccounts(); if ($ret == false) { return $this->set_response(["\x65\x72\x72\157\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\162\103\x6f\x64\145"], "\164\x72\125\x73\x65\x72\101\x63\143\x6f\165\156\164\x73" => array()], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\103\157\x64\145"], "\x74\x72\125\x73\145\162\x41\x63\x63\157\x75\x6e\164\163" => $ret], REST_Controller::HTTP_OK); } } public function trUserAccount_post() { $userAccounts = $this->post(); if (!isset($userAccounts["\145\x6d\x61\x69\x6c\101\144\x64\162\145\x73\163"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\145\154\x65\x72\x61\144\151\157\x6c\157\x67\x79\104\141\164\x61\123\x65\162\166\x69\x63\x65\x5f\x6d\157\144\145\x6c"); $ret = $this->TeleradiologyDataService_model->post_trUserAccount($userAccounts); if ($ret > 0) { return $this->set_response(["\145\162\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { if ($ret == VERR_DB_CONSTRAINT) { return $this->set_response(["\145\162\x72\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_DB_CONSTRAINT)["\x65\x72\162\x6f\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\162\162\157\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } } } public function trResultByCaseNameAndResultFileNumAndResultComment_post() { $parameters = $this->post(); if (!isset($parameters["\143\x61\163\145\116\141\x6d\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\x65\154\x65\x72\x61\x64\x69\x6f\x6c\157\147\x79\x44\141\164\x61\123\x65\x72\166\x69\x63\x65\x5f\155\x6f\144\x65\154"); $ret = $this->TeleradiologyDataService_model->post_trResultByCaseNameAndResultFileNumAndResultComment($parameters); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\162\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\x72\157\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function trResultByCaseName_get() { $caseName = urldecode($this->get("\143\x61\163\x65\x4e\141\x6d\x65")); if (empty($caseName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\x65\x6c\145\x72\x61\x64\x69\x6f\154\157\147\x79\x44\x61\x74\x61\123\x65\x72\166\x69\x63\x65\137\x6d\x6f\144\x65\x6c"); $ret = $this->TeleradiologyDataService_model->get_trResultByCaseName($caseName); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\x6f\x64\145"], "\x72\145\163\165\x6c\x74\x43\157\x6d\x6d\145\156\164" => $ret["\162\145\163\165\154\164\x43\x6f\x6d\x6d\x65\156\x74"], "\162\x65\163\165\x6c\x74\106\x69\x6c\145\x73" => $ret["\162\145\163\x75\154\164\x46\151\x6c\x65\163"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function trResultByCaseName_delete() { $caseName = urldecode($this->get("\143\x61\x73\145\x4e\x61\155\145")); if (empty($caseName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\145\x6c\145\x72\x61\144\x69\x6f\x6c\x6f\147\171\104\x61\x74\x61\123\x65\162\166\x69\x63\x65\137\x6d\x6f\144\x65\154"); $ret = $this->TeleradiologyDataService_model->delete_trResultByCaseName($caseName); if ($ret > 0) { return $this->set_response(["\145\162\x72\157\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\157\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } } public function trResultByChartNo_get() { $strChartNo = urldecode($this->get("\x63\x68\141\x72\164\x6e\157")); if (empty($strChartNo)) { vt_loge("\164\162\122\x65\x73\x75\154\x74\102\171\x43\150\x61\x72\164\x4e\x6f\x5f\147\145\x74\x20\101\x70\x69\x2e\x20" . "\x49\x6e\x76\141\154\x69\x64\40\x50\x61\162\141\155\x65\164\145\x72\x20\x45\162\x72\x6f\x72\56"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x54\145\154\x65\162\x61\144\x69\x6f\154\x6f\147\171\104\x61\x74\x61\x53\145\x72\x76\151\143\145\137\155\x6f\x64\145\x6c"); $ret = $this->TeleradiologyDataService_model->get_trResultByChartNo($strChartNo); if ($ret["\145\x72\x72\x6f\x72\103\157\144\x65"] === VERR_COMMON_SUCCESS) { return $this->set_response(["\x65\x72\162\157\162\x43\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\x72\145\x73\x75\154\x74\163" => $ret["\x72\x65\x73\165\154\164\x73"]], REST_Controller::HTTP_OK); } else { return $this->set_response(createResponse($ret["\145\x72\162\157\162\x43\157\144\x65"]), REST_Controller::HTTP_OK); } } public function PatientSocialIDs_get() { load_model($this, "\120\141\164\x69\x65\x6e\164\x73\137\155\157\x64\145\154"); $data = $this->Patients_model->get_PatientSocialIDs(); $this->set_response(["\x65\x72\x72\x6f\x72\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\160\x72\157\x74\145\143\x74\145\x64\123\157\x63\x69\141\154\111\104\x73" => $data["\x70\x72\x6f\x74\x65\143\x74\x65\x64\x53\x6f\143\151\141\x6c\111\104\163"], "\x75\x6e\160\162\157\164\x65\143\x74\145\x64\123\157\x63\x69\x61\154\111\104\163" => $data["\x75\156\x70\x72\x6f\164\x65\x63\x74\x65\144\x53\x6f\x63\151\141\154\x49\104\x73"]], REST_Controller::HTTP_OK); } public function PatientSocialIDs_put() { $parametersPutPatientSocialIDs = $this->put("\160\x61\x72\x61\x6d\x65\164\x65\162\163\x50\x75\164\120\x61\164\151\x65\x6e\x74\123\x6f\x63\x69\x61\154\x49\x44\x73"); load_model($this, "\120\141\164\151\x65\156\164\163\x5f\x6d\157\144\145\154"); $data = $this->Patients_model->put_PatientSocialIDs($this->put()); $this->set_response(["\145\162\x72\157\x72\x43\x6f\144\x65" => VERR_COMMON_SUCCESS, "\160\x72\x6f\164\x65\143\x74\x65\x64\123\157\x63\x69\x61\154\x49\x44\163" => $data["\x70\x72\157\x74\x65\143\164\145\144\x53\157\x63\151\x61\x6c\111\x44\x73"], "\x75\x6e\x70\x72\x6f\164\145\143\164\x65\144\123\x6f\x63\x69\x61\x6c\x49\x44\163" => $data["\x75\156\x70\162\x6f\164\145\143\164\145\x64\x53\x6f\x63\x69\x61\154\111\x44\163"]], REST_Controller::HTTP_OK); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/E3Ds.php b/server/original/www/ezwebserver/src/application/controllers/v1/E3Ds.php index f1cb5b0..10540b9 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/E3Ds.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/E3Ds.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function CapturesByChartNo_get() { $strChartNo = urldecode($this->get("\143\x68\141\162\164\156\x6f")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x61\160\164\x75\x72\145\x73\x5f\155\x6f\144\145\x6c"); $ret = $this->Captures_model->get_CapturesByChartNo($strChartNo); $vecCaptureList = array(); if (count($ret) > 0) { foreach ($ret as $row) { $sCaptureImage = new SCaptureImage(); $sCaptureImage->strStudyUID = $row["\x69\x6d\147\137\x73\x74\x75\144\171\x5f\165\151\144"]; $sCaptureImage->strCTName = $row["\x69\x6d\147\x5f\x63\164\x5f\156\141\x6d\x65"]; $sCaptureImage->strFileName = $row["\151\155\147\137\146\151\x6c\x65\137\x6e\141\x6d\145"]; $sCaptureImage->dtCaptureDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x69\155\x67\x5f\x63\x61\160\164\165\x72\145\x5f\144\141\164\145"]); $sCaptureImage->strChartNo = $row["\151\155\147\x5f\143\x68\x61\x72\164\x5f\156\x6f"]; $sCaptureImage->strDcmFileCount = $row["\x69\x6d\147\x5f\162\145\163\145\x72\x76\x65\x64\61"]; $sCaptureImage->strComment = $row["\151\x6d\147\137\x63\x6f\x6d\x6d\x65\156\164"]; array_push($vecCaptureList, $sCaptureImage); } return $this->set_response(["\145\x72\162\157\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\103\x6f\144\145"], "\166\x65\143\103\x61\160\x74\165\162\x65\x4c\151\x73\x74" => $vecCaptureList], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\157\144\145"], "\x76\145\x63\x43\x61\x70\x74\x75\162\x65\114\x69\163\164" => $vecCaptureList], REST_Controller::HTTP_OK); } } public function CapturesByChartNoAndGroupList_get() { $strChartNo = urldecode($this->get("\x63\150\141\x72\x74\156\x6f")); if (empty($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\160\164\x75\x72\145\163\137\155\x6f\144\145\x6c"); $ret = $this->Captures_model->get_CapturesByChartNoAndGroupList($strChartNo); $strlGroupList = array(); if (count($ret) > 0) { foreach ($ret as $row) { array_push($strlGroupList, $row["\151\155\x67\x5f\143\x74\137\x6e\141\x6d\x65"]); } return $this->set_response(["\145\162\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\162\x43\x6f\144\145"], "\x73\164\x72\x6c\107\x72\157\165\160\x4c\x69\x73\x74" => $strlGroupList], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\x43\x6f\x64\x65"], "\163\x74\x72\x6c\x47\162\x6f\x75\160\114\151\x73\164" => $strlGroupList], REST_Controller::HTTP_OK); } } public function Captures_put() { $sCaptureImage = $this->put(); if (!isset($sCaptureImage["\163\x74\x72\x53\x74\x75\x64\171\x55\x49\x44"]) || !isset($sCaptureImage["\163\x74\x72\x43\x54\x4e\141\155\x65"]) || !isset($sCaptureImage["\163\164\162\x46\x69\x6c\x65\x4e\141\x6d\x65"]) || !isset($sCaptureImage["\x64\164\103\141\x70\x74\165\162\145\x44\x61\164\145\124\x69\155\x65"]) || !isset($sCaptureImage["\x73\164\162\103\x68\141\162\164\116\157"]) || !isset($sCaptureImage["\x73\164\x72\104\143\x6d\x46\151\154\x65\103\157\x75\x6e\164"]) || !isset($sCaptureImage["\x73\164\x72\103\x6f\155\155\145\156\x74"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\160\x74\x75\x72\145\x73\137\155\157\x64\145\x6c"); $ret = $this->Captures_model->put_Captures($sCaptureImage); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\162\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function CapturesByFile_delete() { $strDeleteFileName = urldecode($this->get("\x66\x69\x6c\145")); if (!isset($strDeleteFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\x70\164\x75\162\145\163\x5f\155\x6f\144\145\154"); $ret = $this->Captures_model->delete_CapturesByFile($strDeleteFileName); if ($ret > 0) { $this->set_response(["\x65\x72\x72\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CapturesByStudyUIDForGroup_get() { $strUID = urldecode($this->get("\x73\x74\165\144\x79\165\x69\x64")); if (!isset($strUID)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\x61\160\164\165\x72\145\163\137\155\x6f\x64\x65\154"); $ret = $this->Captures_model->get_CapturesByStudyUIDForGroup($strUID); if (count($ret) > 0) { return $this->set_response(["\x65\x72\162\157\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\162\x43\157\x64\145"], "\x73\x74\162\107\x72\157\165\x70\116\x61\x6d\x65" => $ret[0]["\x69\x6d\x67\137\143\x74\x5f\156\141\155\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CapturesByChartNoAndGroup_get() { $strChartNo = urldecode($this->get("\x63\150\141\x72\x74\156\157")); $strGroupName = urldecode($this->get("\147\x72\157\x75\x70")); if (!isset($strChartNo) || !isset($strGroupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\103\x61\160\164\165\162\x65\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->Captures_model->get_CapturesByChartNoAndGroup($strChartNo, $strGroupName); $vecCaptureList = array(); if (count($ret) > 0) { foreach ($ret as $row) { $sCaptureImage = new SCaptureImage(); $sCaptureImage->strStudyUID = $row["\151\155\147\x5f\x73\164\x75\x64\x79\137\165\151\144"]; $sCaptureImage->strCTName = $row["\x69\x6d\147\x5f\143\164\137\156\x61\x6d\x65"]; $sCaptureImage->strFileName = $row["\x69\x6d\x67\x5f\146\x69\x6c\x65\137\x6e\141\x6d\x65"]; $sCaptureImage->dtCaptureDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x69\x6d\x67\137\x63\x61\160\164\x75\162\x65\x5f\144\141\164\x65"]); $sCaptureImage->strChartNo = $row["\x69\155\147\137\143\x68\141\162\164\x5f\156\157"]; $sCaptureImage->strDcmFileCount = $row["\151\155\147\137\162\x65\x73\145\x72\166\145\144\61"]; $sCaptureImage->strComment = $row["\151\155\x67\137\x63\157\x6d\x6d\145\156\x74"]; array_push($vecCaptureList, $sCaptureImage); } return $this->set_response(["\145\x72\x72\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\x43\x6f\x64\x65"], "\166\145\x63\x43\141\160\164\165\x72\x65\114\151\x73\x74" => $vecCaptureList], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\162\157\x72\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\x6f\162\x43\x6f\x64\145"], "\166\x65\x63\x43\x61\x70\x74\x75\x72\145\x4c\151\163\164" => $vecCaptureList], REST_Controller::HTTP_OK); } } public function E3Reports_post() { $sE3DBReport = $this->post(); if (!isset($sE3DBReport["\x6e\x49\156\144\x65\x78"]) || !isset($sE3DBReport["\163\164\x72\x43\x68\141\162\x74\116\x6f"]) || !isset($sE3DBReport["\163\164\162\x43\157\155\155\x65\x6e\164"]) || !isset($sE3DBReport["\163\x74\x72\x46\151\154\145\116\141\x6d\145"]) || !isset($sE3DBReport["\x73\164\x72\x54\x69\x74\154\x65"]) || !isset($sE3DBReport["\x74\151\155\x65\103\162\145\141\x74\x69\x6f\156"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\63\x52\x65\160\x6f\162\164\163\x5f\155\x6f\144\x65\x6c"); $ret = $this->E3Reports_model->post_E3Reports($sE3DBReport); if ($ret > 0) { return $this->set_response(["\145\x72\x72\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function E3Reports_put() { $sE3DBReport = $this->put(); if (!isset($sE3DBReport["\156\111\156\144\x65\170"]) || !is_numeric($sE3DBReport["\x6e\x49\x6e\144\145\x78"]) || !isset($sE3DBReport["\163\164\x72\x43\150\x61\162\x74\x4e\157"]) || !isset($sE3DBReport["\x73\164\162\x43\x6f\155\x6d\145\x6e\x74"]) || !isset($sE3DBReport["\x73\164\162\x46\x69\154\145\116\141\x6d\x65"]) || !isset($sE3DBReport["\163\x74\162\124\x69\x74\x6c\x65"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\63\x52\145\x70\x6f\162\164\x73\x5f\155\x6f\144\145\x6c"); $ret = $this->E3Reports_model->put_E3Reports($sE3DBReport); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function E3ReportsByIndex_delete() { $nIndex = urldecode($this->get("\x69\156\144\x65\x78")); if (!isset($nIndex) || !is_numeric($nIndex)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x33\x52\x65\160\x6f\x72\164\163\137\155\157\144\x65\154"); $ret = $this->E3Reports_model->delete_E3ReportsByIndex($nIndex); if ($ret > 0) { return $this->set_response(["\145\x72\162\157\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function E3ReportsByChartNo_get() { $strChartNo = urldecode($this->get("\x63\x68\141\162\x74\156\x6f")); if (!isset($strChartNo)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\63\122\145\160\157\x72\164\163\x5f\155\x6f\144\145\154"); $ret = $this->E3Reports_model->get_E3ReportsByChartNo($strChartNo); $vecReportInfo = array(); if (count($ret) > 0) { foreach ($ret as $row) { $reportData = new SE3DBReport(); $reportData->nIndex = intval($row["\162\x70\164\x5f\x69\156\x64\x65\x78"]); $reportData->strChartNo = $row["\x72\x70\164\137\x63\x68\x61\162\x74\x5f\x6e\157"]; $reportData->strTitle = $row["\162\160\x74\x5f\x74\151\164\154\x65"]; $reportData->strFileName = $row["\162\160\x74\137\146\151\154\145\x5f\x6e\x61\155\145"]; $reportData->strComment = $row["\x72\x70\x74\137\x63\x6f\155\x6d\145\156\164"]; $reportData->timeCreation = $row["\x72\x70\x74\x5f\143\162\x65\141\x74\151\157\x6e\x5f\144\141\x74\x65"]; array_push($vecReportInfo, $reportData); } return $this->set_response(["\x65\162\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\x6f\x64\145"], "\x76\x65\x63\122\145\x70\157\x72\164\x49\x6e\x66\x6f" => $vecReportInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\x6f\x72\x43\157\x64\145"], "\x76\x65\143\x52\x65\160\x6f\162\x74\111\x6e\x66\x6f" => $vecReportInfo], REST_Controller::HTTP_OK); } } public function E3ReportsByFile_get() { $strFileName = urldecode($this->get("\146\151\154\145")); if (empty($strFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\63\x52\x65\x70\157\x72\164\x73\137\155\157\x64\145\154"); $ret = $this->E3Reports_model->get_E3ReportsByFile($strFileName); $vecReportInfo = array(); if (count($ret) > 0) { foreach ($ret as $row) { $reportData = new SE3DBReport(); $reportData->nIndex = intval($row["\162\160\x74\x5f\151\x6e\144\145\170"]); $reportData->strChartNo = $row["\162\x70\x74\x5f\x63\150\x61\162\164\137\x6e\x6f"]; $reportData->strTitle = $row["\162\160\164\x5f\x74\x69\x74\x6c\x65"]; $reportData->strFileName = $row["\x72\x70\x74\137\146\151\154\x65\x5f\x6e\x61\155\145"]; $reportData->strComment = $row["\x72\160\164\x5f\x63\x6f\155\155\145\156\164"]; $reportData->timeCreation = currentDateFormat(DATEFORMAT_ISO8601, $row["\x72\160\x74\137\x63\162\x65\x61\x74\151\x6f\x6e\x5f\144\141\164\x65"]); array_push($vecReportInfo, $reportData); } return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\x43\157\x64\145"], "\166\145\143\122\145\x70\x6f\162\x74\x49\x6e\x66\157" => $vecReportInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\x72\103\x6f\144\x65"], "\x76\145\143\122\145\160\x6f\x72\164\x49\x6e\146\x6f" => $vecReportInfo], REST_Controller::HTTP_OK); } } public function E3ReportSettings_get() { load_model($this, "\x45\63\x52\145\x70\x6f\162\164\123\x65\164\164\x69\x6e\147\x73\137\x6d\x6f\x64\145\154"); $ret = $this->E3ReportSettings_model->get_E3ReportSettings(); if (is_object($ret)) { return $this->set_response(["\x65\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\103\x6f\x64\145"], "\x73\x52\145\160\x6f\x72\x74\123\x65\x74\164\151\156\x67" => $ret], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\x43\x6f\144\x65"], "\163\122\x65\x70\157\162\164\x53\x65\164\x74\151\156\147" => (object) array()], REST_Controller::HTTP_OK); } } public function E3ReportTemplatesByIndex_delete() { $nIndex = urldecode($this->get("\x69\x6e\144\x65\170")); if (!isset($nIndex)) { return $this->set_response(["\x65\162\162\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x33\x52\x65\x70\157\x72\x74\x54\x65\x6d\x70\x6c\x61\x74\145\x73\x5f\155\157\x64\145\154"); $ret = $this->E3ReportTemplates_model->delete_E3ReportTemplatesByIndex($nIndex); if ($ret > 0) { $this->set_response(["\x65\162\x72\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplates_get() { load_model($this, "\x45\63\122\x65\160\157\x72\164\124\145\x6d\x70\x6c\141\164\145\x73\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->E3ReportTemplates_model->get_E3ReportTemplates(); if (is_array($ret)) { return $this->set_response(["\145\162\x72\157\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\103\x6f\144\145"], "\x76\x65\x63\x52\145\160\157\x72\x74\124\x65\x6d\160\x6c\x61\x74\145" => $ret], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\x43\x6f\x64\145"], "\x76\145\x63\x52\145\x70\157\162\x74\124\x65\155\160\154\141\x74\x65" => array()], REST_Controller::HTTP_OK); } } public function E3ReportTemplates_post() { $SE3DBReportTemplate = $this->post(); if (!isset($SE3DBReportTemplate["\x73\164\x72\116\x61\x6d\145"]) || !isset($SE3DBReportTemplate["\163\x74\162\106\151\154\x65\116\x61\155\145"])) { return $this->set_response(["\x65\162\x72\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\63\122\145\x70\157\x72\164\x54\x65\x6d\x70\x6c\141\x74\x65\163\137\155\x6f\x64\145\x6c"); $ret = $this->E3ReportTemplates_model->post_E3ReportTemplates($SE3DBReportTemplate); if ($ret > 0) { $this->set_response(["\x65\x72\162\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\157\162\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplates_put() { $SE3DBReportTemplate = $this->put(); if (!isset($SE3DBReportTemplate["\156\x49\x6e\144\145\170"]) || !isset($SE3DBReportTemplate["\x73\164\x72\x4e\141\x6d\145"]) || !isset($SE3DBReportTemplate["\x73\164\162\x46\x69\x6c\x65\x4e\x61\155\x65"])) { return $this->set_response(["\145\162\x72\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\63\x52\145\160\157\162\164\x54\145\155\160\154\141\164\x65\163\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->E3ReportTemplates_model->put_E3ReportTemplates($SE3DBReportTemplate); if ($ret > 0) { $this->set_response(["\145\x72\162\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplatesByFile_get() { $strFileName = urldecode($this->get("\x66\x69\x6c\x65")); if (empty($strFileName)) { return $this->set_response(["\x65\162\x72\x6f\162\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\63\122\145\x70\x6f\x72\x74\124\145\x6d\x70\154\x61\x74\x65\x73\137\x6d\x6f\144\x65\x6c"); $ret = $this->E3ReportTemplates_model->get_E3ReportTemplatesByFile($strFileName); if (is_object($ret)) { return $this->set_response(["\x65\x72\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\103\x6f\144\x65"], "\x73\104\145\146\141\165\x6c\164\124\145\155\160\x6c\x61\x74\x65" => $ret], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\x72\x43\x6f\x64\x65"], "\163\104\x65\146\x61\165\x6c\x74\x54\145\155\160\x6c\x61\x74\x65" => (object) array()], REST_Controller::HTTP_OK); } } public function E3ReportSettingsForDefaultTemplate_get() { load_model($this, "\105\x33\x52\145\160\157\162\164\x53\x65\164\164\x69\156\147\163\x5f\155\157\144\x65\x6c"); $ret = $this->E3ReportSettings_model->Get_E3ReportSettingsForDefaultTemplate(); if (is_string($ret) == true && empty($ret) == false) { return $this->set_response(["\x65\162\x72\157\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\x43\157\x64\x65"], "\163\x74\162\104\x65\146\x61\165\154\164\124\x65\155\x70\x6c\141\x74\145\x46\x69\154\145\156\x61\155\x65" => $ret], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\x6f\162\103\157\144\x65"], "\163\x74\x72\104\145\x66\141\165\154\x74\x54\x65\x6d\x70\x6c\141\164\145\x46\x69\154\145\x6e\x61\155\x65" => ''], REST_Controller::HTTP_OK); } } public function E3ReportSettingsForDefaultTemplate_put() { $SE3DBReportSetting = $this->put(); if (!isset($SE3DBReportSetting["\163\164\x72\x44\x65\x66\141\x75\154\x74\124\145\x6d\x70\x6c\141\164\145\x46\x69\x6c\145\x6e\141\155\x65"])) { return $this->set_response(["\145\162\162\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\63\x52\x65\160\x6f\162\164\x53\x65\x74\x74\x69\156\147\163\137\x6d\x6f\x64\145\x6c"); $ret = $this->E3ReportSettings_model->put_E3ReportSettingsForDefaultTemplate($SE3DBReportSetting); if ($ret > 0) { $this->set_response(["\145\162\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } public function E3PresetCommentsByIndex_delete() { $nIndex = urldecode($this->get("\151\156\144\x65\170")); if (!isset($nIndex)) { return $this->set_response(["\145\162\162\157\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\63\120\162\x65\x73\x65\x74\x43\157\155\155\145\x6e\x74\163\137\x6d\157\x64\145\154"); $ret = $this->E3PresetComments_model->delete_E3PresetCommentsByIndex($nIndex); if ($ret > 0) { $this->set_response(["\145\162\162\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\157\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\x43\x6f\144\x65"]], REST_Controller::HTTP_OK); } } public function E3PresetComments_get() { load_model($this, "\x45\63\120\x72\145\x73\x65\164\x43\x6f\x6d\x6d\x65\x6e\164\163\137\x6d\x6f\x64\145\154"); $ret = $this->E3PresetComments_model->get_E3PresetComments(); if (is_array($ret)) { return $this->set_response(["\145\162\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\162\x43\157\144\x65"], "\166\x65\x63\x50\x72\x65\163\145\x74\103\x6f\x6d\x6d\145\x6e\x74" => $ret], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\x72\x6f\162\x43\x6f\x64\145"], "\166\x65\x63\120\x72\x65\163\x65\x74\103\157\155\155\145\156\x74" => array()], REST_Controller::HTTP_OK); } } public function E3PresetComments_post() { $SE3DBPresetComment = $this->post(); if (!isset($SE3DBPresetComment["\163\164\x72\x54\x69\x74\154\x65"]) || !isset($SE3DBPresetComment["\163\x74\162\103\157\x6d\x6d\x65\156\164"])) { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x33\x50\162\x65\x73\x65\x74\103\x6f\155\x6d\145\156\x74\163\137\x6d\x6f\144\145\154"); $ret = $this->E3PresetComments_model->post_E3PresetComments($this->post()); if ($ret > 0) { $this->set_response(["\x65\162\x72\x6f\x72\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } } public function E3PresetComments_put() { $SE3DBPresetComment = $this->put(); if (!isset($SE3DBPresetComment["\156\111\x6e\144\145\x78"]) || !isset($SE3DBPresetComment["\x73\164\162\124\x69\164\x6c\145"]) || !isset($SE3DBPresetComment["\163\x74\x72\103\157\155\155\x65\156\x74"])) { return $this->set_response(["\x65\x72\x72\x6f\162\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x33\120\x72\145\x73\x65\x74\103\x6f\155\x6d\x65\156\164\x73\x5f\155\157\144\x65\x6c"); $ret = $this->E3PresetComments_model->put_E3PresetComments($SE3DBPresetComment); if ($ret > 0) { $this->set_response(["\145\x72\162\157\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\x72\157\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\162\162\157\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplatesByIndexForVisibe_put() { $SE3DBReportTemplate = $this->put(); if (!isset($SE3DBReportTemplate["\x6e\111\156\x64\145\x78"]) || !isset($SE3DBReportTemplate["\142\126\x69\x73\151\x62\x6c\x65"])) { return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\x33\x52\145\160\x6f\x72\164\x54\x65\155\160\x6c\141\164\x65\163\x5f\155\157\144\145\154"); $ret = $this->E3ReportTemplates_model->put_E3ReportTemplatesByIndexForVisibe($SE3DBReportTemplate); if ($ret > 0) { $this->set_response(["\145\x72\x72\157\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\162\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplateEditStates_get() { load_model($this, "\105\63\122\145\x70\x6f\x72\164\124\145\155\x70\154\x61\x74\145\x45\x64\x69\x74\x53\x74\141\x74\x65\163\x5f\155\157\x64\145\154"); $ret = $this->E3ReportTemplateEditStates_model->get_E3ReportTemplateEditStates(); if ($ret["\x65\162\x72\x6f\162\103\157\x64\145"] == VERR_COMMON_SUCCESS) { $this->set_response(["\145\162\x72\157\162\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\x72\103\x6f\144\145"], "\163\124\145\x6d\160\154\x61\x74\145\x45\x64\151\164\123\164\141\164\x65" => $ret["\163\124\145\155\160\x6c\141\164\x65\x45\144\151\x74\123\164\x61\x74\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\157\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } } public function E3ReportTemplateEditStates_put() { $sTemplateEditState = $this->put(); if (!isset($sTemplateEditState) || empty($sTemplateEditState)) { vt_loge("\105\x33\x52\x65\160\157\x72\x74\124\145\x6d\160\154\141\x74\x65\105\144\x69\164\x53\x74\141\x74\x65\x73\137\x70\165\164\x20\101\160\151\x2e\40" . "\x50\x61\x72\141\x6d\x65\164\145\162\x73\x20\141\x72\x65\40\x65\x6d\x70\x74\x79\56"); return $this->set_response(["\145\162\162\157\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_INVALID)], REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x45\x33\122\145\160\157\162\x74\124\145\x6d\160\154\x61\164\x65\105\144\x69\164\x53\x74\x61\x74\145\x73\137\155\157\144\145\154"); $ret = $this->E3ReportTemplateEditStates_model->put_E3ReportTemplateEditStates($sTemplateEditState); if ($ret["\x65\162\162\x6f\162\x43\157\x64\145"] == VERR_COMMON_SUCCESS) { $this->set_response(["\145\162\162\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\x43\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Fs.php b/server/original/www/ezwebserver/src/application/controllers/v1/Fs.php index c6cd3e2..57e97b3 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Fs.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Fs.php @@ -1,7 +1,7 @@ Datafile_model->getSysFilePathByType($type, combineFilePath(array($path))); if ($checkCache === FALSE) { $this->Datafile_model->checkMultiDrive($fileAbsFilePath); if (!file_exists($fileAbsFilePath)) { header("\x43\x6f\156\164\x65\156\x74\55\124\x79\160\145\x3a\40\141\x70\160\x6c\151\x63\141\x74\x69\157\156\57\x6a\x73\x6f\156"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $decrypted_file = APPPATH . "\x63\x61\x63\x68\x65\x5c" . $type . "\134" . $path . "\56\x41\x56\111"; decrypt_provided_consult_video($fileAbsFilePath, $decrypted_file); if (!file_exists($decrypted_file)) { header("\x43\157\156\x74\x65\156\164\55\x54\171\x70\145\72\x20\141\160\x70\154\151\x63\x61\164\x69\157\x6e\x2f\152\x73\x6f\x6e"); return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_NOT_FOUND); } $output_file = APPPATH . "\143\141\x63\x68\145\134" . $type . "\x5c" . sha1($path, FALSE); $ret = convert_video_to_x264($decrypted_file, $output_file); if ($ret !== TRUE) { header("\x43\x6f\x6e\164\145\156\164\x2d\124\171\x70\x65\x3a\40\x61\x70\x70\x6c\x69\143\141\x74\x69\x6f\x6e\57\x6a\x73\x6f\x6e"); return $this->set_response(array("\145\x72\x72\157\x72\x43\157\x64\x65" => VERR_COMMON_IO, "\145\162\162\x6f\162\115\145\x73\163\x61\147\x65" => $ret), REST_Controller::HTTP_NOT_FOUND); } unlink($decrypted_file); return streaming($output_file); } else { return streaming($checkCache); } case "\123\103\125": $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($type, combineFilePath(array($path))); $exclude = ["\144\143\155", "\160\156\147", "\164\151\x66", "\164\151\x66\146", "\x6a\160\x67", "\152\x70\x65\x67", "\142\155\x70", "\x64\x6f\143", "\144\x6f\143\170", "\x70\x70\x74", "\x70\x70\x74\170", "\160\x64\146"]; $include = ["\141\166\151", "\x6d\157\x76", "\x6d\160\x34", "\167\155\x76"]; if (in_array(getFileExtension($path), $exclude)) { return $this->Datafile_model->DownloadFile($fileAbsFilePath); } else { if (in_array(getFileExtension($path), $include)) { $checkCache = checkCacheExistsByTypeAndName($type, $path); if ($checkCache === FALSE) { $this->Datafile_model->checkMultiDrive($fileAbsFilePath); if (!file_exists($fileAbsFilePath)) { header("\103\x6f\x6e\164\x65\x6e\164\55\x54\x79\x70\145\72\40\x61\160\x70\x6c\x69\143\141\164\151\x6f\x6e\x2f\152\x73\x6f\x6e"); return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_NOT_FOUND); } $output_file = APPPATH . "\x63\141\x63\150\x65\x5c" . $type . "\134" . sha1($path, FALSE); $ret = convert_video_to_x264($fileAbsFilePath, $output_file); if ($ret === FALSE) { header("\103\x6f\x6e\164\145\156\164\x2d\x54\171\160\145\72\x20\x61\160\x70\154\151\143\x61\x74\x69\x6f\156\57\152\163\x6f\x6e"); return $this->set_response(array("\145\x72\162\x6f\x72\x43\x6f\144\x65" => VERR_COMMON_IO, "\145\x72\162\x6f\x72\x4d\145\x73\163\x61\x67\145" => $ret), REST_Controller::HTTP_NOT_FOUND); } return streaming($output_file); } else { return streaming($checkCache); } } else { log_message("\x65\x72\162\x6f\x72", getFileExtension($path) . "\40\x6e\157\x74\x20\x73\x75\160\x70\x6f\x72\164\145\144\40\x65\170\164\x2e"); header("\103\157\x6e\x74\x65\x6e\x74\x2d\124\171\160\145\72\x20\x61\160\160\x6c\x69\143\x61\x74\x69\x6f\156\57\152\x73\x6f\x6e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } case "\123\105\124": $filePath = $this->Datafile_model->getSysFilePathByOnlyType(strtoupper($type), $path); $this->Datafile_model->checkMultiDrive($filePath); if (file_exists($filePath)) { header("\x43\157\x6e\x74\145\x6e\x74\55\124\171\160\x65\72\x20\x6f\x63\x74\x65\x74\x2d\163\164\x72\x65\141\155"); header("\130\x2d\x43\157\x6e\x74\145\156\x74\55\124\171\x70\145\55\117\x70\164\x69\x6f\156\x73\72\40\x6e\157\x73\x6e\x69\x66\x66"); header("\x43\x6f\x6e\x74\x65\x6e\x74\55\104\x69\163\x70\x6f\163\151\164\x69\x6f\x6e\x3a\40\141\164\164\x61\x63\x68\x6d\145\156\164\73\x20\x66\x69\154\145\x6e\141\x6d\x65\x20\75\40\42" . $path . "\42"); header("\x43\x6f\156\x74\x65\x6e\164\x2d\124\162\141\x6e\163\146\145\162\x2d\x45\156\x63\157\x64\151\156\x67\x3a\x20\x62\x69\x6e\141\162\171"); header("\103\x61\143\x68\x65\55\103\157\156\164\x72\157\154\72\x20\156\x6f\x2d\x73\x74\x6f\x72\x65\54\x20\x6e\x6f\55\x63\x61\143\x68\145\x2c\x20\155\x75\163\x74\55\x72\x65\x76\141\x6c\x69\144\141\x74\145"); header("\x43\x6f\156\164\x65\156\x74\55\x4c\145\156\x67\x74\x68\72\40" . filesize($filePath)); return readfile($filePath); } else { $return = FALSE; break; } default: $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($type, combineFilePath(array($path))); $this->Datafile_model->checkMultiDrive($fileAbsFilePath); if (!file_exists($fileAbsFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $return = $this->Datafile_model->DownloadFile($fileAbsFilePath); break; } if ($return === FALSE) { header("\x43\157\x6e\164\x65\156\164\x2d\x54\x79\160\145\x3a\x20\141\x70\160\x6c\x69\x63\141\164\x69\157\156\x2f\152\163\x6f\156"); return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } } private function _saveResourceFile($fileType, $fileName, $fileExt) { $fileNameExt = removeFileExtension($fileName) . "\56" . $fileExt; $filePath = $this->Datafile_model->getResourceFilePath($fileType, $fileNameExt); checkPostUploadFile("\141\x74\164\141\x63\150\x65\144\106\x69\x6c\145", $filePath); return basename($filePath); } private function _saveReportFile($chartNo, $fileName, $comment) { $reportName = ''; if (strstr($fileName, "\174")) { separateString($fileName, "\174", $reportName, $comment); } else { $reportName = $fileName; } $reportFilePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_REPORT, "\x52\x65\x70\x6f\x72\x74", EXT_REPORT); checkPostUploadFile("\x61\164\164\141\x63\x68\145\x64\x46\151\x6c\x65", $reportFilePath); $thumbnailFileName = $this->Datafile_model->getThumbnailFileName(FILETYPE_RPTTHM, basename($reportFilePath)); $thumbnailFileExt = EXT_IMGTHM; $thmFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_RPTTHM, $thumbnailFileName . "\56" . $thumbnailFileExt); load_model($this, "\145\62\x72\x70\x74\137\x6d\157\x64\x65\154"); $this->e2rpt_model->insertReport($chartNo, $reportName, basename($reportFilePath), $comment); checkPostUploadFile("\164\x68\155\106\x69\x6c\145", $thmFilePath, false); return removeFileExtension(basename($reportFilePath)); } private function _saveProjectFile($chartNo, $fileName, $ext) { if (strstr($fileName, "\174")) { $fileExt = strtok($fileName, "\174"); $ctName = strtok("\x7c"); } else { $fileExt = $ext; $ctName = $fileName; } $filePath = $this->Datafile_model->getNewProjectFilePath($ctName, $fileExt); $thumbnailFileName = $this->Datafile_model->getThumbnailFileName(FILETYPE_PRJTHM, basename($filePath)); $thumbnailFileExt = $this->Datafile_model->getProjectThumbnailFileExtension($fileExt); $thmFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_PRJTHM, $thumbnailFileName . "\x2e" . $thumbnailFileExt); $fileCheck = checkPostUploadFile("\141\164\x74\x61\143\x68\x65\x64\x46\151\154\x65", $filePath); if ($fileCheck === FALSE) { return FALSE; } checkPostUploadFile("\164\x68\155\x46\x69\154\x65", $thmFilePath, false); return removeFileExtension(basename($filePath)); } private function _moveSysDir($fileType, $fromPath, $toPath) { $fromPathCheck = checkDotDotInDirectory($fromPath); $toPathCheck = checkDotDotInDirectory($toPath); if ($fromPath === false || $toPathCheck === false) { return false; } $absFromDirPath = $this->Datafile_model->getSysFilePathByType($fileType, $fromPath); $absToDirPath = $this->Datafile_model->getSysFilePathByType($fileType, $toPath); $this->Datafile_model->checkMultiDrive($absFromDirPath, $absToDirPath); return renameDir($absFromDirPath, $absToDirPath); } private function _deleteSysDir($fileType, $dirPath) { checkDotDotInDirectory($dirPath); $absDirPath = $this->Datafile_model->getSysFilePathByType($fileType, $dirPath); if ($this->Datafile_model->rmDirRecurMultiDrive($absDirPath) === false) { return false; } else { return true; } } private function _getDiskSpace() { $configIni = get_ini_array(APPPATH . INI_CONFIG_PATH); $baseDir = $configIni["\105\172\x57\x65\x62\x53\145\162\x76\145\x72"]["\x66\155\x5f\164\x6f\x70\137\144\151\162"]; $diskSpace = disk_free_space(baseDir); return round($diskSpace); } private function _deleteSampleCaseUserContents($fileName, $contentID) { if (strstr($fileName, "\174")) { $contentID = strtok($fileName, "\x7c"); $fileName = strtok("\x7c"); } $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType("\123\x43\x55", $fileName); $fileAbsThumbnailFilePath = $this->Datafile_model->getSampleCaserUserContentThumbnailFilePath($fileAbsFilePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsThumbnailFilePath); load_model($this, "\123\143\x63\157\156\x74\145\156\x74\137\155\x6f\144\145\x6c"); $ret = $this->Sccontent_model->deleteUserContent($contentID); return $ret > 0 ? TRUE : FALSE; } private function _deleteSysFile($fileType, $fileName) { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($fileType, $fileName); $ret = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); return $ret; } private function _updateSampleCaseUserContents($fileName) { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType("\x53\x43\125", $fileName); checkPostUploadFile("\x61\x74\164\x61\143\x68\x65\x64\106\x69\154\x65", $fileAbsFilePath); $ret = $this->Datafile_model->deleteFileSubDrive($fileAbsFilePath); return $ret; } private function _updateSysFile($fileType, $fileName) { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($fileType, $fileName); checkPostUploadFile("\x61\x74\x74\x61\143\x68\145\x64\106\x69\154\x65", $fileAbsFilePath); $ret = $this->Datafile_model->deleteFileSubDrive($fileAbsFilePath); return $ret; } function __construct() { parent::__construct(); $this->load->enum(); $this->load->struct(); load_model($this, "\x44\x61\164\x61\146\151\x6c\145\x5f\155\x6f\144\x65\154"); $this->load->helper("\166\x74\x5f\x76\x69\144\145\157\137\146\151\x6c\145"); } public function ImageFileInfosByFileName_get() { $strServerFilePath = urldecode($this->get("\x66\151\x6c\x65\x6e\141\155\145")); if (!isset($strServerFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\141\x67\145\106\151\x6c\x65\111\156\x66\x6f\x73\x5f\x6d\157\144\145\x6c"); $data = $this->ImageFileInfos_model->get_ImageFileInfosByFileName($strServerFilePath); if ($data === false) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } return $this->set_response(["\145\x72\x72\157\x72\x43\x6f\x64\x65" => ErrorCode::SUCCESS, "\x62\105\x78\x69\163\164\163" => $data["\x62\x45\170\151\x73\x74\163"], "\156\x46\x69\x6c\x65\123\151\x7a\x65" => $data["\x6e\x46\151\154\145\x53\x69\172\145"], "\163\x74\x72\106\151\x6c\145\x50\141\164\x68" => $data["\163\x74\162\x46\x69\154\x65\x50\x61\x74\150"]], REST_Controller::HTTP_OK); } public function CTFilesByChartNo_post() { $ret = VSUCCESS; $ctDirPath = ''; load_model($this, "\x43\124\x46\151\154\x65\163\137\155\x6f\144\x65\x6c"); $ret = $this->CTFiles_model->post_CTFilesByChartNo($this->post(), $ctDirPath); if ($ret == VSUCCESS) { return $this->set_response(["\x65\x72\162\x6f\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\162\x43\x6f\144\145"], "\x75\x70\x64\x61\164\x65\144\x46\x69\154\145\x54\x79\160\x65" => "\103\124", "\165\160\x64\x61\x74\145\x64\106\151\154\145\x4e\x61\155\x65" => basename($ctDirPath)], REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse($ret), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(returnSetResponse($ret), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function CTFilesByChartNoAndPath_get() { vt_logw("\104\145\160\162\x65\143\x61\x74\145\x64\x2e\x20\125\163\145\40\x47\x65\x74\137\103\124\x46\151\154\x65\x73\102\171\120\141\x74\150\x20\x69\156\163\x74\x65\141\144\x2e"); $chartNo = urldecode($this->get("\143\150\141\x72\164\x6e\157")); $filePath = urldecode($this->get("\x70\141\x74\x68")); $fileAbsFilePath = $this->Datafile_model->getAbsCtFilePath($filePath); $this->Datafile_model->DownloadFile($fileAbsFilePath); } public function CTFilesByChartNoAndPath_delete() { $filePath = urldecode($this->get("\160\141\164\150")); $chartNo = urldecode($this->get("\x63\x68\141\x72\164\156\157")); load_model($this, "\103\124\106\x69\154\145\x73\137\155\157\x64\145\154"); $ret = $this->CTFiles_model->delete_CTFilesByChartNoAndPath($chartNo, $filePath); if ($ret["\145\x72\162\157\162\x43\157\x64\x65"] == VERR_COMMON_SUCCESS) { vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\x44\x65\154\x65\x74\x65\x64\40\151\155\141\x67\x65\x2e\40\x43\x68\x61\162\x74\40\156\157\x20\72\x20{$chartNo}\x2c\x20\x46\x69\154\145\x20\x6e\x61\x6d\x65\40\x3a\40{$filePath}"); return $this->set_response(["\x65\162\x72\157\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CTFilesByPath_get() { $filePath = urldecode($this->get("\160\x61\x74\150")); $fileAbsFilePath = $this->Datafile_model->getAbsCtFilePath($filePath); $this->Datafile_model->DownloadFile($fileAbsFilePath); } public function CTFilesByPath_delete() { vt_logw("\104\x65\160\x72\x65\x63\141\164\x65\144\56\x20\125\163\x65\40\x44\x65\154\145\164\145\137\x43\x54\x46\151\154\145\x73\x42\171\103\x68\x61\x72\x74\x4e\157\x41\156\x64\x50\141\164\x68\x20\151\156\x73\164\x65\141\x64\56"); $filePath = urldecode($this->get("\160\x61\164\150")); load_model($this, "\x45\x32\x69\x6d\147\137\155\157\x64\145\x6c"); $this->E2img_model->delete($filePath); $dirAbsPath = $this->Datafile_model->getAbsCtDirPath($filePath); $ret = $this->Datafile_model->rmDirRecurMultiDrive($dirAbsPath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTAG, $filePath); $retTag = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTHM, $filePath); $retThumbnail = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); $retRaw = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); if ($ret !== FALSE) { return $this->set_response(["\x65\162\162\157\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\x72\103\x6f\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function CTFilesByChartNoAndPathForFirst_get() { $filePath = urldecode($this->get("\160\141\x74\x68")); if (!isset($filePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileAbsFilePath = $this->Datafile_model->getAbsCtFilePath($filePath); if ($fileAbsFilePath == null) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } $dirToSaveDicom = $this->Datafile_model->getTempDir($filePath); $tempDicomFilePath = createOneDicomFileFromCT($fileAbsFilePath, $dirToSaveDicom); if ($tempDicomFilePath == null) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } $this->Datafile_model->DownloadFile($tempDicomFilePath); } public function CTFilesByChartNoAndPathR2_delete() { $chartNo = urldecode($this->get("\x63\150\x61\162\164\156\157")); $filePath = urldecode($this->get("\x70\x61\x74\150")); $force = urldecode($this->get("\146\157\x72\143\145")); load_model($this, "\103\x54\x46\151\x6c\145\x73\x52\62\x5f\x6d\x6f\x64\145\154"); $ret = $this->CTFilesR2_model->delete_CTFilesByChartNoAndPathR2($this->get()); if ($ret["\145\162\x72\x6f\x72\103\x6f\144\145"] == VERR_COMMON_SUCCESS) { vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\104\145\x6c\145\x74\145\x64\x20\x69\155\x61\147\145\x2e\40\x43\150\x61\162\x74\x20\x6e\x6f\40\72\x20{$chartNo}\x2c\40\x46\x69\x6c\145\40\156\x61\x6d\145\x20\72\x20{$filePath}"); return $this->set_response(createResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } else { if ($ret["\x65\x72\162\x6f\x72\103\x6f\144\x65"] == VERR_COMMON_SUCCESS || $ret["\145\162\x72\157\162\x43\x6f\144\145"] == VERR_E2_IMAGE_IN_GROUP) { return $this->set_response(createResponse($ret["\x65\162\162\x6f\162\103\x6f\x64\145"]), REST_Controller::HTTP_OK); } else { return $this->set_response(createResponse($ret["\145\x72\x72\x6f\162\103\157\144\x65"]), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function FilesByTypeAndNameAndExt_get() { $type = urldecode($this->get("\164\171\x70\145")); $name = urldecode($this->get("\x6e\x61\x6d\x65")); $ext = urldecode($this->get("\x65\170\164")); if (!isset($type) || !isset($name) || !isset($ext)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $type = strtoupper($type); switch ($type) { case FILETYPE_PROJECT: $files = $this->Datafile_model->getProjectFileList($name, $ext); break; case FILETYPE_E3FILE: $files = $this->Datafile_model->getE3FileList($name, $ext); break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (count($files) > 0) { return $this->set_response(["\x65\x72\x72\157\162\103\157\144\x65" => ErrorCode::SUCCESS, "\146\151\154\145\114\x69\163\x74" => $files], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\162\157\162\103\157\144\145" => ErrorCode::VERR_DB_NOSUCHDATA, "\146\x69\154\x65\x4c\151\163\164" => array()], REST_Controller::HTTP_OK); } } public function FilesByChartNo_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\x70\x65\x72\x6d\x69\x73\163\x69\x6f\x6e"]) { vt_loge(__METHOD__ . "\x3a\40\160\145\162\155\x69\x73\x73\x69\157\156\x20\144\145\x6e\x69\x65\x64\56"); return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $parameters = $this->post(); $chartNo = $this->post("\x63\150\x61\162\x74\116\x6f"); $attachedFile = $this->post("\x61\x74\x74\x61\143\x68\145\144\106\151\154\145"); $fileName = $this->post("\x61\164\x74\141\143\x68\145\x64\106\x69\x6c\145\116\141\x6d\x65"); $fileType = $this->post("\x66\x69\154\x65\124\171\160\145"); $acqTime = $this->post("\x61\x63\161\124\x69\155\145"); $studyInstanceUID = $this->post("\163\164\165\x64\171\x49\156\x73\x74\141\156\143\145\x55\x49\x44"); $fileExt = $this->post("\x66\151\x6c\145\105\170\x74"); $tagFile = $this->post("\x74\x61\x67\106\x69\x6c\145"); $thmFile = $this->post("\x74\150\155\106\x69\x6c\x65"); $rawFile = $this->post("\162\141\x77\x46\151\x6c\x65"); $comment = $this->post("\143\157\x6d\x6d\x65\x6e\x74"); $groupingMode = $this->post("\145\107\162\157\x75\x70\x69\x6e\147\115\157\x64\x65"); $eSourceTypeEnum = $this->post("\145\x53\x6f\165\162\x63\145\x54\171\160\x65"); $sourceType = EmodalityTransfer::SourceTypeToDatabaseString($eSourceTypeEnum); $deviceInfo = $this->post("\144\x65\166\151\x63\145\111\156\146\x6f"); $modelName = $this->post("\155\x6f\144\145\154\x4e\x61\155\145"); if (!isset($fileType)) { vt_loge(__METHOD__ . "\x3a\x20\151\156\166\141\154\151\x64\40\146\151\x6c\x65\x20\x74\171\160\x65\x3a\40\133" . $fileType . "\135"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); if (!isset($chartNo) || empty($chartNo)) { switch ($fileType) { case FILETYPE_IMGTHM: case FILETYPE_PHOTOID: case FILETYPE_IMGTAG: case FILETYPE_PROJECT: case FILETYPE_PRJTHM: case FILETYPE_CHART: case FILETYPE_OTHTAG: case FILETYPE_FGBPT: case FILETYPE_FFG: break; default: vt_loge(__METHOD__ . "\72\x20\143\x68\141\x72\x74\156\x6f\40\x69\163\40\x65\155\160\x74\x79\40\141\x6e\144\40\151\156\x76\x61\154\x69\144\40\x66\151\x6c\145\x20\164\171\x70\145\x3a\x20\x5b" . $fileType . "\135"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } else { load_model($this, "\120\141\x74\x69\x65\x6e\x74\163\137\x6d\x6f\144\145\x6c"); $ret = $this->Patients_model->getPatientIdByChartNo($chartNo); if (count($ret) == 0) { vt_loge(__METHOD__ . "\x3a\40\160\141\x74\x69\145\156\164\x20\x69\144\40\156\157\x74\x20\x66\x6f\x75\x6e\x64\x3a\40\x5b" . $chartNo . "\135"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } switch ($fileType) { case FILETYPE_VPANO: load_model($this, "\106\151\154\x65\x73\137\x6d\x6f\144\x65\154"); $filePath = $this->Files_model->uploadVPanoFileByChartNo($chartNo, $fileType, $fileName); if (is_string($filePath) == true && empty($filePath) == false) { return $this->set_response(["\x65\x72\162\157\x72\x43\x6f\x64\x65" => ErrorCode::SUCCESS, "\x75\x70\144\x61\x74\x65\x64\106\x69\154\145\x54\x79\x70\x65" => $fileType, "\x75\x70\x64\x61\x74\x65\x64\106\x69\x6c\145\x4e\141\x6d\x65" => basename($filePath)], REST_Controller::HTTP_OK); } else { if ($filePath == VERR_DB_NOSUCHDATA) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { vt_loge(__METHOD__ . "\72\x20\146\x69\x6c\x65\x70\x61\164\x68\40\156\157\x74\40\x66\x6f\165\x6e\x64\72\40\133" . $filePath . "\x5d"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } case FILETYPE_IMAGE: $acqTime = @$parameters["\x61\143\161\x54\x69\x6d\x65"]; $studyInstanceUID = @$parameters["\x73\164\x75\x64\x79\x49\x6e\x73\x74\141\x6e\143\145\x55\111\x44"]; if (strstr($fileName, "\x7c")) { $modality = strtok($fileName, "\x7c"); $acqMode = strtok("\x7c"); $fileExt = strtok("\174"); $isImported = strtok("\x7c"); } else { $modality = @$parameters["\x6d\x6f\x64\x61\154\151\164\171"]; $acqMode = @$parameters["\x61\x63\161\115\x6f\x64\x65"]; $fileExt = @$parameters["\146\x69\x6c\x65\105\170\164"]; $isImported = @$parameters["\x69\163\111\155\x70\157\162\164\x65\144"]; if (!isset($modality) || empty($modality) || !isset($fileExt) || empty($fileExt)) { vt_loge(__METHOD__ . "\72\x20\x6d\157\x64\x61\x6c\151\171\40\x6f\162\40\x66\x69\154\x65\x45\170\x74\x20\151\163\40\x65\x6d\x70\164\x79\x3a\x20\133" . $modality . "\x5d\133" . $fileExt . "\135"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } if (!(strtoupper($isImported) === "\x54\122\125\x45" || strtoupper($isImported) === "\x46\x41\114\123\x45")) { vt_loge(__METHOD__ . "\x3a\40\151\163\151\x6d\x70\157\x72\164\145\144\x20\x69\x73\x20\145\155\x70\x74\171\72\x20\x5b" . $isImported . "\x5d"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $dicom = null; if (isDicomFileExt($fileExt)) { $tempDir = $this->Datafile_model->getTempDir(); $tempFile = $tempDir . DIRECTORY_SEPARATOR . $fileName; checkPostUploadFile("\x61\164\x74\x61\143\x68\x65\144\x46\x69\154\x65", $tempFile); $dicom = readDicomHeader($tempFile); } $acqTimestamp = getAcquisitionTimestamp($dicom, $acqTime); if ($acqTimestamp == null) { vt_loge(__METHOD__ . "\x3a\x20\x43\x61\x6e\x6e\157\164\40\x72\145\141\x64\40\163\x74\165\x64\171\40\144\x61\x74\x65\40\x61\156\x64\40\164\151\155\x65\40\x74\141\x67\40\x76\141\x6c\x75\145\163\x20\x66\x72\157\x6d\40\x74\x68\x65\x20\x44\x49\x43\117\115\x20\x66\x69\x6c\x65\x2e\x20\103\x75\162\x72\x65\x6e\x74\40\x64\141\164\145\40\x74\x69\x6d\x65\x20\165\163\x65\144\x20\x69\156\x73\164\145\141\144\56\40\x66\x69\154\x65\x3d\x5b" . $tempFile . "\135"); } $dbmodality = modality_api_str_to_modality_db_str($modality); $imageFilePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_IMAGE, $dbmodality, $fileExt, $acqTimestamp); if (is_null($dicom)) { $fileCheck = checkPostUploadFile("\x61\164\x74\x61\x63\x68\x65\x64\x46\151\x6c\x65", $imageFilePath); } else { $fileCheck = rename($tempFile, $imageFilePath); } if ($fileCheck === FALSE) { vt_loge("\106\x69\x6c\145\x73\102\171\103\150\x61\x72\164\x4e\x6f\137\160\x6f\x73\x74\40\x41\160\x69\x2e\x20" . "\x46\141\x69\154\145\144\x20\x74\x6f\40\x75\160\x6c\157\x61\x64\x20\x66\x69\x6c\x65\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\105\62\151\155\x67\137\155\157\144\145\x6c"); $imageOnlyName = removeFileExtension(basename($imageFilePath)); $tagFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_IMGTAG, $imageOnlyName . "\x2e" . EXT_IMGTAG); $rawFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_IMGRAW, $imageOnlyName . "\x2e" . EXT_IMGRAW); $thumbnailFileName = $this->Datafile_model->getThumbnailFileName(FILETYPE_IMGTHM, $imageOnlyName); $thmFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_IMGTHM, $thumbnailFileName . "\x2e" . EXT_IMGTHM); checkPostUploadFile("\164\x61\147\x46\151\154\x65", $tagFilePath, false); checkPostUploadFile("\164\x68\155\106\x69\154\145", $thmFilePath, false); $rawFilecheck = checkPostUploadFile("\162\x61\167\x46\151\154\x65", $rawFilePath, false); $rawFileName = ''; if ($rawFilecheck) { $rawFileName = $imageOnlyName . "\56" . EXT_IMGRAW; } $acqDateTime = date(DATAFORMAT[DATEFORMAT_DCM], $acqTimestamp); $this->E2img_model->insertImage($chartNo, basename($imageFilePath), $dbmodality, $acqMode, $isImported, $dicom, $acqDateTime, $studyInstanceUID, $sourceType, $groupingMode, $rawFileName, $deviceInfo, $modelName); return $this->set_response(["\x65\162\x72\157\162\x43\x6f\x64\145" => ErrorCode::SUCCESS, "\x75\160\x64\141\x74\x65\x64\106\x69\x6c\145\x54\x79\160\145" => $fileType, "\x75\160\144\141\x74\x65\x64\106\x69\154\x65\x4e\x61\155\145" => basename($imageFilePath)], REST_Controller::HTTP_OK); case FILETYPE_IMGTAG: $updatedFileName = $this->_saveResourceFile($fileType, $tagFile, EXT_IMGTAG); break; case FILETYPE_OTHTAG: $updatedFileName = $this->_saveResourceFile($fileType, $tagFile, EXT_OTHTAG); break; case FILETYPE_FGBPT: $updatedFileName = $this->_saveResourceFile($fileType, $tagFile, EXT_FGBPT); break; case FILETYPE_FFG: $updatedFileName = $this->_saveResourceFile($fileType, $tagFile, EXT_FFG); break; case FILETYPE_IMGRAW: $updatedFileName = $this->_saveResourceFile($fileType, $rawFile, EXT_IMGRAW); break; case FILETYPE_REPORT: $updatedFileName = $this->_saveReportFile($chartNo, $fileName, $comment); break; case FILETYPE_CHART: $updatedFileName = $this->Datafile_model->saveChartFile($chartNo, $fileName); break; case FILETYPE_PROJECT: $updatedFileName = $this->_saveProjectFile($chartNo, $fileName, $fileExt); if ($updatedFileName === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } break; case FILETYPE_IMGTHM: $updatedFileName = $this->_saveResourceFile($fileType, $thmFile, EXT_IMGTHM); break; case FILETYPE_CHTTHM: case FILETYPE_RPTTHM: case FILETYPE_PRJTHM: if (!isset($fileExt)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (strstr($fileName, "\174")) { $fileName = strtok($fileName, "\x7c"); $fileExt = strtok("\174"); } $thumbnailFileName = $this->Datafile_model->getThumbnailFileName($fileType, $fileName); $updatedFileName = $this->_saveResourceFile($fileType, $thumbnailFileName, $fileExt); break; case FILETYPE_PHOTOID: if (!isset($fileExt)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (strstr($fileName, "\174")) { $fileExt = strtok($fileName, "\x7c"); $fileName = strtok("\174"); } if ($fileName !== null && strlen($fileName) > 0) { $filePath = $this->Datafile_model->getAbsFilePathByType(FILETYPE_PHOTOID, $fileName); $this->Datafile_model->deleteFileMultiDrive($filePath); $filePath = removeFileExtension($filePath) . "\x2e" . $fileExt; } else { $filePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_PHOTOID, "\120\x68\x6f\164\157\111\104", $fileExt); } checkPostUploadFile("\x61\164\x74\141\x63\150\145\x64\106\151\x6c\x65", $filePath); return $this->set_response(["\145\162\162\x6f\x72\103\157\x64\x65" => ErrorCode::SUCCESS, "\x75\160\144\x61\164\145\144\106\x69\154\145\x54\x79\160\x65" => $fileType, "\165\x70\144\141\164\145\x64\x46\x69\154\x65\x4e\x61\x6d\x65" => basename($filePath)], REST_Controller::HTTP_OK); break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->set_response(["\x65\x72\162\x6f\x72\103\157\x64\145" => ErrorCode::SUCCESS, "\x75\160\144\141\x74\x65\144\x46\151\154\x65\124\171\x70\x65" => $fileType, "\x75\x70\144\x61\164\x65\x64\106\151\154\145\x4e\x61\155\145" => $updatedFileName], REST_Controller::HTTP_OK); } public function FilesByChartNoR2_post() { $this->FilesByChartNo_post(); } public function FilesByTypeAndPath_get() { $type = urldecode($this->get("\x74\171\160\145")); $path = urldecode($this->get("\160\141\164\x68")); $type = strtoupper($type); if (!isset($type)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType($type, combineFilePath(array($path))); if ($fileAbsFilePath === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { if ($type == FILETYPE_IMGTHM && file_exists($fileAbsFilePath) === FALSE) { $return = $this->Datafile_model->makeThumbnailFile($fileAbsFilePath, combineFilePath(array($path))); if ($return != VSUCCESS) { return $this->set_response(returnSetResponse($return), REST_Controller::HTTP_NOT_FOUND); } } } $return = $this->Datafile_model->DownloadFile($fileAbsFilePath); if ($return === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_NOT_FOUND); } } public function FilesByTypeAndPath_delete() { $fileType = urldecode($this->get("\x74\171\x70\145")); $filePath = urldecode($this->get("\x70\141\x74\150")); if (!isset($fileType) || !isset($filePath)) { vt_loge(sprintf("\133\x25\163\x5d\72\x20\146\x69\154\145\124\x79\160\x65\x20\x6f\162\40\146\x69\154\145\x50\x61\x74\x68\x20\151\x73\40\145\x6d\160\x74\x79\56\40\x5b\45\163\135\133\45\x73\x5d", __METHOD__, $fileType, $filePath)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\106\151\x6c\x65\163\x52\x32\x5f\x6d\x6f\144\x65\154"); if ($fileType == FILETYPE_IMAGE && $this->FilesR2_model->containsDatagroupOrRecordesetImages($filePath)) { vt_loge(sprintf("\x25\x73\72\x20\x53\x6b\x69\160\x20\x74\x6f\40\x64\x65\x6c\145\x74\x65\40\x65\x76\145\x6e\x20\x25\x73\x20\146\151\x6c\145\x20\x6d\141\x79\40\142\145\x6c\x6f\156\x67\40\164\x6f\40\141\40\144\141\x74\x61\x67\162\x6f\165\160\x20\157\162\40\141\x20\162\145\143\x6f\x72\x64\163\145\x74\40\x69\x6d\x61\x67\x65\163\56", __METHOD__, $filePath)); } $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType($fileType, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); switch ($fileType) { case FILETYPE_IMAGE: load_model($this, "\105\x32\151\155\147\x5f\155\157\144\x65\154"); $this->E2img_model->delete($filePath); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\x54\x68\x65\x20\x69\x6d\141\147\145\40{$filePath}\x20\x68\141\163\40\142\145\x65\156\x20\144\x65\154\x65\x74\x65\144\x20\x66\x6f\x72\x6d\40\144\141\164\x61\x62\x61\163\145\x2e" . "\x20\102\x75\x74\40\x73\164\151\x6c\154\x20\x72\145\155\x61\x69\156\x73\x20\x69\156\x20\146\151\154\145\x20\163\x79\x73\x74\145\155\56"); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTHM, $filePath); vt_logi(sprintf("\x25\x73\72\x20\123\153\x69\160\x20\x74\157\x20\x64\x65\x6c\145\x74\145\x20\45\x73\x20\144\165\145\x20\164\x6f\40\x70\x61\x74\151\x65\x6e\164\x20\x69\155\x61\147\x65\40\x66\x69\x6c\x65\163\56", __METHOD__, $fileAbsFilePath)); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTAG, $filePath); vt_logi(sprintf("\x25\163\x3a\40\123\x6b\151\x70\x20\164\x6f\40\144\x65\x6c\145\x74\145\40\x25\163\40\x64\x75\x65\40\x74\157\40\160\x61\164\x69\145\x6e\164\x20\x69\x6d\141\147\x65\40\146\x69\x6c\145\163\x2e", __METHOD__, $fileAbsFilePath)); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); vt_logi(sprintf("\45\x73\x3a\40\x53\153\151\160\40\164\157\40\x64\145\154\145\164\145\x20\45\163\x20\144\x75\145\40\164\157\40\160\141\164\151\x65\156\x74\40\x69\x6d\141\147\x65\x20\x66\151\154\x65\x73\56", __METHOD__, $fileAbsFilePath)); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_FGBPT, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_FFG, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_PROJECT: $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_PRJTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_REPORT: load_model($this, "\x45\62\162\160\x74\137\155\157\144\145\x6c"); $this->E2rpt_model->deleteReportByFileName($filePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_RPTTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_IMGRAW: $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\x54\150\145\x20\151\155\141\147\x65\40{$filePath}\40\x68\x61\163\x20\142\145\x65\x6e\x20\144\x65\154\145\164\145\144\40\x66\157\x72\155\x20\x64\x61\x74\141\142\x61\163\145\x2e"); break; case FILETYPE_CHART: load_model($this, "\x50\x61\164\x69\x65\156\164\x43\150\141\x72\164\163\137\x6d\x6f\x64\x65\154"); $this->PatientCharts_model->delete_PatientChartByFileName($filePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_CHTTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; } return $this->set_response(["\145\162\x72\157\162\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } public function FilesByTypeAndPathR2_delete() { $this->load->model("\106\151\x6c\145\x73\x52\62\x5f\x6d\x6f\144\x65\154"); $ret = $this->FilesR2_model->delete_FilesByTypeAndPathR2($this->get()); if (in_array($ret["\x65\162\x72\157\162\103\x6f\144\x65"], [VERR_COMMON_SUCCESS, VERR_E2_IMAGE_IN_GROUP])) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\x65\162\x72\x6f\162\103\x6f\x64\x65"] == VERR_COMMON_INVALID) { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response($ret, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function FilesForUpdate_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\x70\145\162\x6d\151\x73\163\x69\x6f\156"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $fileType = $this->post("\146\151\x6c\x65\124\171\x70\x65"); $fileName = $this->post("\x61\164\x74\x61\x63\x68\x65\x64\106\151\154\x65\x4e\x61\x6d\x65"); $thmFileName = $this->post("\x74\x68\x75\155\x62\x6e\141\x69\x6c\x46\x69\154\145\x4e\x61\155\145"); if (!isset($fileType) || !isset($fileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); switch ($fileType) { case FILETYPE_IMAGE: case FILETYPE_IMGTAG: case FILETYPE_OTHTAG: case FILETYPE_FGBPT: case FILETYPE_FFG: case FILETYPE_PRJTHM: case FILETYPE_RPTTHM: case FILETYPE_CHTTHM: case FILETYPE_IMGTHM: $filePath = $this->Datafile_model->getAbsFilePathByType($fileType, $fileName); if (!file_exists($filePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileCheck = checkPostUploadFile("\141\164\164\141\143\150\145\x64\x46\x69\154\145", $filePath); if ($fileCheck === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } break; case FILETYPE_PROJECT: if (!isset($thmFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $prjFilePath = $this->Datafile_model->getAbsFilePathByType($fileType, $fileName); $thmFilePath = $this->Datafile_model->getAbsFilePathByType(FILETYPE_PRJTHM, $thmFileName); if (!file_exists($prjFilePath) || !file_exists($thmFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileCheck = checkPostUploadFile("\141\164\x74\141\143\x68\145\x64\106\151\154\145", $prjFilePath); if ($fileCheck === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } checkPostUploadFile("\164\x68\165\155\x62\156\141\x69\x6c\106\151\x6c\145", $thmFilePath, false); break; case FILETYPE_REPORT: if (!isset($thmFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $rptFilePath = $this->Datafile_model->getAbsFilePathByType($fileType, $fileName); $thmFilePath = $this->Datafile_model->getAbsFilePathByType(FILETYPE_RPTTHM, $thmFileName); if (!file_exists($rptFilePath) || !file_exists($thmFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileCheck = checkPostUploadFile("\141\x74\x74\141\143\150\145\144\106\151\154\145", $rptFilePath); if ($fileCheck === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } checkPostUploadFile("\x74\x68\x75\155\142\x6e\x61\151\x6c\x46\151\154\x65", $thmFilePath, false); break; case FILETYPE_CHART: $chartFilePath = $this->Datafile_model->getAbsFilePathByType($fileType, $fileName); $fileCheck = checkPostUploadFile("\141\x74\x74\x61\143\150\145\144\106\151\154\145", $chartFilePath); if ($fileCheck === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (empty($thmFileName) === FALSE) { $thmFilePath = $this->Datafile_model->getAbsFilePathByType(FILETYPE_CHTTHM, $thmFileName); if (!file_exists($thmFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileCheck = checkPostUploadFile("\x74\150\165\155\x62\x6e\x61\x69\154\x46\151\x6c\x65", $thmFilePath); if ($fileCheck === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } return $this->set_response(["\x65\x72\x72\x6f\162\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\x72\103\x6f\144\145"]], REST_Controller::HTTP_OK); } public function MultiFilesInOne_post() { $method = $this->post("\x6d\x65\164\x68\157\x64"); $typeList = $this->post("\146\x69\x6c\145\x54\x79\160\x65"); $fileList = $this->post("\146\x69\x6c\145\116\141\x6d\x65"); $skipOnError = $this->post("\x73\x6b\x69\160\x4f\x6e\x45\x72\x72\x6f\x72"); if (!isset($skipOnError) || empty($skipOnError)) { $skipOnError = "\x66\141\x6c\163\145"; } $skipOnError = filter_var($skipOnError, FILTER_VALIDATE_BOOLEAN); if (!isset($typeList) || !isset($fileList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (count($typeList) != count($fileList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\115\165\154\x74\x69\106\151\154\145\x73\x5f\x6d\x6f\144\x65\154"); $ret = $this->MultiFiles_model->post_MultiFilesInOne($typeList, $fileList, $skipOnError); if ($ret["\x65\162\x72\x6f\x72\x43\x6f\144\145"] == VERR_COMMON_SUCCESS) { $this->Datafile_model->DownloadFile($ret["\x66\151\x6c\x65\x4e\141\155\x65"]); } else { if ($ret["\145\162\x72\157\162\103\157\144\x65"] == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function MultiFilesInOneForUpload_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\160\145\x72\155\151\x73\163\x69\157\x6e"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $fileInfoList = json_decode($this->post("\146\x69\x6c\145\x49\156\146\157\114\x69\x73\x74")); if (!isset($fileInfoList)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\115\x75\154\x74\x69\x46\151\x6c\x65\x73\x5f\155\x6f\x64\x65\154"); $ret = $this->MultiFiles_model->post_MultiFilesInOneForUpload($fileInfoList); if ($ret["\x65\x72\162\157\162\103\157\x64\x65"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\145\x72\162\x6f\x72\103\x6f\144\145"] == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function SysFiles_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\x70\145\162\x6d\151\x73\163\151\157\156"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $type = $this->post("\x74\x79\160\145"); $fileName = $this->post("\141\164\164\141\x63\150\145\144\x46\151\x6c\x65\116\x61\x6d\x65"); $contentId = $this->post("\x63\x6f\156\164\145\x6e\164\x49\x64"); $categoryId = $this->post("\143\141\x74\x65\147\x6f\x72\171\x49\x64"); $contentFilePath = $this->post("\143\157\x6e\164\145\156\x74\x46\x69\154\145\x50\141\x74\x68"); $contentExt = $this->post("\143\x6f\x6e\164\145\x6e\164\x45\170\164"); $contentType = $this->post("\x63\157\156\x74\x65\156\164\x54\171\x70\145"); $favorite = $this->post("\x66\141\x76\x6f\162\x69\164\x65"); if (!isset($type) || !isset($fileName) || count($_FILES) == 0) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $type = strtoupper($type); switch ($type) { case "\123\103\125": if (strstr($fileName, "\174")) { $contentId = strtok($fileName, "\174"); $categoryId = strtok("\174"); $contentName = strtok("\174"); $contentFilePath = strtok("\174"); $contentExt = strtok("\174"); $contentType = strtok("\174"); $favorite = strtok("\x7c"); } else { $contentId = $this->post("\x63\x6f\156\164\x65\156\x74\111\x64"); $categoryId = $this->post("\x63\x61\x74\x65\x67\157\x72\x79\111\144"); $contentName = $fileName; $contentFilePath = $this->post("\x63\157\x6e\x74\145\x6e\164\106\x69\154\x65\x50\141\164\x68"); $contentExt = $this->post("\x63\157\156\x74\x65\156\164\x45\170\164"); $contentType = $this->post("\x63\157\x6e\164\145\156\x74\x54\x79\160\145"); $favorite = $this->post("\146\141\x76\157\x72\151\x74\x65"); } $fileAbsFilePath = $this->Datafile_model->getNewSampleCaseUserContentFilePath($contentExt); if ($fileAbsFilePath === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_BAD_REQUEST); } $return = checkPostUploadFile("\141\164\x74\141\x63\150\145\144\x46\151\154\x65", $fileAbsFilePath); if ($return) { load_model($this, "\123\143\143\x6f\x6e\x74\145\x6e\x74\137\155\157\144\145\154"); $this->Sccontent_model->insertUserContent($contentName, basename($fileAbsFilePath), $contentType, $favorite, $categoryId); } break; default: $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($type, $fileName); $dirPath = dirname($fileAbsFilePath); makeDir($dirPath); $resFilePath = $dirPath . "\57" . $fileName; move_uploaded_file($_FILES["\141\164\x74\141\x63\150\x65\x64\x46\x69\154\x65"]["\x74\155\160\x5f\x6e\x61\x6d\x65"], $resFilePath); checkPostUploadFile("\141\x74\x74\x61\143\150\x65\144\x46\151\154\x65", $fileAbsFilePath); break; } return $this->set_response(["\145\162\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\162\103\x6f\x64\x65"], "\x75\x70\144\141\164\x65\x64\x46\x69\154\145\124\x79\x70\145" => $type, "\x75\160\x64\x61\x74\145\x64\x46\x69\x6c\145\116\141\155\x65" => basename($fileAbsFilePath)], REST_Controller::HTTP_OK); } public function SysFiles_patch() { $fileType = $this->patch("\x74\x79\160\x65"); $fileName = $this->patch("\x6e\141\x6d\145"); $newFileName = $this->patch("\156\x65\167"); if (!isset($fileType) || !isset($fileName) || !isset($fileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($fileType, $fileName); $this->Datafile_model->checkMultiDrive($fileAbsFilePath); $ret = rename($fileAbsFilePath, pathinfo($fileAbsFilePath, PATHINFO_DIRNAME) . "\134" . $newFileName); if ($ret === TRUE) { return $this->set_response(["\145\162\162\x6f\x72\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function SysFiles_delete() { $fileType = urldecode($this->delete("\x74\171\x70\145")); $fileName = urldecode($this->delete("\x6e\x61\x6d\145")); $contentId = urldecode($this->delete("\x63\x6f\156\x74\145\x6e\164\x49\x64")); if (!isset($fileType) || !isset($fileName) || !isset($contentId)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); switch ($fileType) { case "\x53\x43\x55": $ret = $this->_deleteSampleCaseUserContents($fileName, $contentId); break; default: $ret = $this->_deleteSysFile($fileType, $fileName); break; } if ($ret === TRUE) { return $this->set_response(["\x65\162\x72\157\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function SysFilesForUpdate_post() { $fileType = $this->post("\164\171\160\x65"); $fileName = $this->post("\x61\164\x74\141\143\x68\145\x64\106\x69\154\x65\116\141\155\x65"); if (!isset($fileType) || !isset($fileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); switch ($fileType) { case "\x53\x43\x55": $ret = $this->_updateSampleCaseUserContents($fileName); break; default: $ret = $this->_updateSysFile($fileType, $fileName); break; } if ($ret === TRUE) { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\103\157\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function SysFilesByType_get() { $type = strtoupper(urldecode($this->get("\x74\171\x70\x65"))); $path = urldecode($this->get("\160\x61\x74\150")); switch ($type) { case "\107\101\114": case "\x47\x54\x48": case "\123\x45\124": return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); default: $files = $this->Datafile_model->getSysFileList($type, ''); break; } if (is_array($files)) { return $this->set_response(["\x65\x72\x72\x6f\162\103\157\x64\x65" => ErrorCode::SUCCESS, "\146\x69\154\145\114\151\163\164" => $files], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } public function SysFilesByTypeAndPath_get() { $type = urldecode($this->get("\164\171\160\x65")); $path = urldecode($this->get("\x70\141\x74\x68")); if (!isset($type) || $type === "\160\141\164\150") { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->_SysFileConversion($type, $path); } public function SysFilesNoConversionByTypeAndPath_get() { $type = urldecode($this->get("\164\171\x70\145")); $path = urldecode($this->get("\160\141\x74\x68")); $conversion = json_decode($this->get("\143\x6f\156\166\x65\162\x73\151\x6f\x6e")); if (!isset($type) || $type === "\x70\141\164\x68" || !isset($conversion)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if ($conversion) { $this->_SysFileConversion($type, $path); } else { if ($type === "\123\x43\125") { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType("\123\103\120", combineFilePath(array($path))); $this->Datafile_model->checkMultiDrive($fileAbsFilePath); $check = file_exists($fileAbsFilePath); } else { if ($type === "\x55\x54\110") { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType("\123\124\x48", combineFilePath(array($path))); $this->Datafile_model->checkMultiDrive($fileAbsFilePath); $check = file_exists($fileAbsFilePath); } else { $check = false; } } if (!$check) { $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($type, combineFilePath(array($path))); } $this->Datafile_model->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath)) { $this->Datafile_model->DownloadFile($fileAbsFilePath); } else { header("\103\x6f\x6e\164\145\x6e\164\x2d\x54\x79\160\145\72\40\141\x70\x70\154\151\x63\141\x74\151\157\x6e\57\x6a\163\157\x6e"); return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } } } public function Dirs_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\160\x65\162\155\151\x73\x73\x69\x6f\x6e"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $type = $this->post("\x74\x79\160\145"); $path = $this->post("\x70\141\x74\x68"); if (!isset($type)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } switch ($type) { case "\x46\x49\x58": case "\123\106\130": case "\103\106\x58": checkDotDotInDirectory($path); $absDirPath = $this->Datafile_model->getSysFilePathByType($type, $path); $checkMkdir = makeDir($absDirPath); if ($checkMkdir === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_BAD_REQUEST); } break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); break; } $this->set_response(["\145\162\162\x6f\162\103\x6f\144\145" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } public function Dirs_patch() { $type = $this->patch("\164\171\160\x65"); $path = $this->patch("\x70\141\x74\150"); $to = $this->patch("\164\157"); if (!isset($type)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } switch ($type) { case "\106\111\130": case "\x53\x46\x58": case "\103\x46\130": checkDotDotInDirectory($path); checkDotDotInDirectory($to); $absFromDirPath = $this->Datafile_model->getSysFilePathByType($type, $path); $absToDirPath = dirname($absFromDirPath) . "\x2f" . $to; $ret = renameDir($absFromDirPath, $absToDirPath); break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if ($ret == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\162\x72\157\x72\103\x6f\144\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { if ($ret == VERR_DELIVERER_FILEMANAGER_FILE_EXISTS) { return $this->set_response(returnSetResponse(VERR_DELIVERER_FILEMANAGER_FILE_EXISTS), REST_Controller::HTTP_BAD_REQUEST); } else { if ($ret == VERR_COMMON_IO) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } else { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } } } public function Dirs_delete() { $fileType = urldecode($this->delete("\164\171\x70\145")); $dirPath = urldecode($this->delete("\x70\x61\164\150")); if (!isset($fileType) || !isset($dirPath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileType = strtoupper($fileType); switch ($fileType) { case "\x46\x49\x58": case "\123\x46\x58": case "\x43\x46\x58": $ret = $this->_deleteSysDir($fileType, $dirPath); if ($ret === TRUE) { return $this->set_response(["\145\162\162\157\x72\x43\x6f\144\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } break; default: break; } return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } public function DirsByTypeAndPath_get() { $type = strtoupper(urldecode($this->get("\164\171\160\145"))); $path = urldecode($this->get("\160\141\164\150")); if (empty($type) || empty($path)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } switch ($type) { case "\106\111\x58": $ret = $this->Datafile_model->getSysDirList("\x46\x49\130", combineFilePath(array($path))); break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } return $this->set_response(["\x65\x72\x72\157\162\103\x6f\144\x65" => ErrorCode::SUCCESS, "\x64\x69\x72\x4c\x69\x73\x74" => $ret], REST_Controller::HTTP_OK); } public function DirsForMoving_put() { $ret = $this->Datafile_model->moveSysDir($this->put()); if ($ret == VERR_COMMON_SUCCESS) { return $this->set_response(["\x65\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\103\x6f\144\x65"]], REST_Controller::HTTP_OK); } else { if ($ret == VERR_DELIVERER_FILEMANAGER_FILE_EXISTS) { return $this->set_response(returnSetResponse(VERR_DELIVERER_FILEMANAGER_FILE_EXISTS), REST_Controller::HTTP_BAD_REQUEST); } else { if ($ret == VERR_COMMON_IO) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } else { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } } } public function DirsForCopying_put() { $ret = $this->Datafile_model->copySysDir($this->put()); if ($ret == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { if ($ret == VERR_COMMON_IO) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } } } public function SysInfoForDiskSpace_get() { load_model($this, "\123\x79\163\111\x6e\146\x6f\137\x6d\157\144\x65\154"); $data = $this->SysInfo_model->get_SysInfoForDiskSpace($this->get()); if ($data === false) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\x72\x6f\x72\103\x6f\144\x65"], "\x6e\124\x6f\164\x61\154\123\160\x61\143\145" => $data["\156\x54\x6f\x74\141\x6c\x53\x70\141\x63\145"], "\x6e\x46\x72\145\x65\x53\x70\x61\x63\145" => $data["\x6e\106\162\145\x65\123\160\141\x63\145"]], REST_Controller::HTTP_OK); } public function ThirdPartyFilesbyPath_get() { $path = urldecode($this->get("\x70\x61\x74\150")); if (!isset($path)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType(FILETYPE_THIRDPARTY, $path); if ($fileAbsFilePath === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $return = $this->Datafile_model->DownloadFile($fileAbsFilePath); if ($return === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_NOT_FOUND); } } public function ThirdPartyFiles_post() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\160\145\162\x6d\x69\163\163\x69\157\x6e"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $chartNo = $this->post("\x63\x68\141\162\x74\x4e\157"); $studyInstanceUID = $this->post("\x73\x74\x75\144\171\x49\156\163\x74\x61\x6e\143\145\125\111\x44"); $projectName = $this->post("\160\x72\x6f\x6a\145\x63\x74\116\x61\155\x65"); $appName = $this->post("\x61\160\160\116\141\x6d\x65"); $targetZipFilePath = $this->post("\x74\141\162\147\145\164\132\151\160\106\151\x6c\145\x50\141\164\x68"); if (!isset($_FILES["\141\164\x74\x61\143\x68\145\144\106\151\x6c\x65"]) || !isset($targetZipFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $fileExt = end(explode("\x2e", strtolower($targetZipFilePath))); if (!isset($chartNo) || !isset($studyInstanceUID) || !isset($chartNo) || !isset($projectName) || !isset($appName) || !isset($targetZipFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $filePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_THIRDPARTY, "\124\x68\151\x72\x64\120\x61\162\164\x79", $fileExt); $return = checkPostUploadFile("\141\x74\x74\x61\143\150\145\144\x46\x69\x6c\x65", $filePath); if ($return === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } return $this->set_response(["\x65\x72\x72\157\162\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\103\x6f\144\145"], "\165\x70\x64\x61\164\145\x64\106\151\154\145\x4e\x61\155\145" => basename($filePath)], REST_Controller::HTTP_OK); } public function trResultFileByCaseNameAndResultTypeAndFileName_post() { $caseName = $this->post("\143\x61\163\145\116\141\155\x65"); $resultType = $this->post("\x72\145\x73\165\154\x74\x54\171\160\145"); $webFileName = $this->post("\146\x69\154\x65\116\x61\x6d\145"); if (!isset($caseName) || !isset($webFileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $path_info = pathinfo($webFileName); $fileExt = $path_info["\145\x78\x74\145\x6e\163\x69\157\156"]; if ($resultType === RESULTTYPE_3D_OBJECT) { $imageFilePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_IMAGE, $resultType, $fileExt); } else { $imageFilePath = $this->Datafile_model->GetNewResourcePath(FILETYPE_RESULT, $resultType, $fileExt); } $parameters = ["\143\x61\x73\x65\x4e\x61\155\x65" => $caseName, "\162\x65\x73\x75\x6c\x74\x54\x79\160\145" => $resultType, "\167\x65\142\106\151\154\x65\116\141\x6d\145" => $webFileName, "\151\x6d\141\147\145\106\x69\154\145\120\141\164\150" => $imageFilePath]; load_model($this, "\124\x65\154\x65\162\x61\x64\151\x6f\154\157\147\x79\x46\x69\x6c\x65\123\145\x72\x76\x69\x63\145\x5f\155\157\144\145\154"); $ret = $this->TeleradiologyFileService_model->post_trResultFileByCaseNameAndResultTypeAndFileName($parameters); if ($ret["\x65\162\x72\x6f\162\103\x6f\144\x65"] == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\162\162\157\x72\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\162\x43\x6f\x64\145"], "\x75\160\x64\141\x74\145\144\106\x69\154\145\116\141\155\145" => $ret["\165\160\144\141\164\145\x64\106\x69\154\x65\116\x61\155\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\157\x72\103\x6f\144\145" => returnSetResponse(VERR_COMMON_INVALID)["\145\162\x72\x6f\162\x43\x6f\x64\x65"]], REST_Controller::HTTP_BAD_REQUEST); } } public function trResultFileByCaseNameAndResultTypeAndFileName_get() { $caseName = urldecode($this->get("\143\x61\x73\x65\x4e\141\x6d\145")); $fileName = urldecode($this->get("\146\151\154\145\116\141\x6d\x65")); $resultType = urldecode($this->get("\162\x65\x73\165\154\164\x54\171\x70\145")); if (!isset($caseName) || !isset($fileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\124\145\154\x65\162\x61\144\x69\157\x6c\x6f\147\171\106\151\x6c\145\x53\145\x72\x76\x69\143\x65\x5f\x6d\157\144\145\x6c"); $strServerFileName = $this->TeleradiologyFileService_model->get_trResultFileByCaseNameAndResultTypeAndFileName($this->get()); if ($strServerFileName === FALSE) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_BAD_REQUEST); } if ($resultType === RESULTTYPE_3D_OBJECT) { $fileAbsFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_IMAGE, $strServerFileName); } else { $fileAbsFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_RESULT, $strServerFileName); } $this->Datafile_model->checkMultiDrive($fileAbsFilePath); if (!file_exists($fileAbsFilePath)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $return = $this->Datafile_model->DownloadFile($fileAbsFilePath); if ($return === FALSE) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_NOT_FOUND); } } public function trResultFileByCaseNameAndResultTypeAndFileName_delete() { $caseName = urldecode($this->get("\143\x61\x73\145\x4e\x61\155\145")); $fileName = urldecode($this->get("\x66\151\x6c\145\116\x61\x6d\x65")); if (!isset($caseName) || !isset($fileName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\124\145\x6c\145\x72\x61\144\151\157\154\157\147\171\x46\x69\x6c\145\x53\x65\162\166\x69\143\145\137\x6d\157\x64\145\x6c"); $ret = $this->TeleradiologyFileService_model->delete_trResultFileByCaseNameAndResultTypeAndFileName($this->get()); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_NOFILE) { return $this->set_response(["\x65\162\162\x6f\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_NOFILE)["\x65\x72\x72\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\162\157\162\103\x6f\x64\145" => returnSetResponse(VERR_DB_INVALIDDATA)["\x65\x72\162\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } } } public function thirdPartyProjectFileByPath_get() { $path = $this->get("\160\x61\164\x68"); $data = $this->TeleradiologyFileService_model->get_thirdPartyProjectFileByPath($this->get()); $this->set_response([], REST_Controller::HTTP_OK); } public function SysfilesForThumbnailByTypeAndName_get() { $type = urldecode($this->get("\164\x79\x70\145")); $name = urldecode($this->get("\156\141\155\x65")); if (!isset($type) || !isset($name)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $type = strtoupper($type); switch ($type) { case "\x53\103\x55": load_model($this, "\123\171\x73\x46\151\x6c\145\163\137\x6d\x6f\144\x65\154"); $ret = $this->SysFiles_model->get_SysfilesForThumbnailByTypeAndName($type, $name); break; default: return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); break; } if ($ret == VERR_COMMON_SUCCESS) { return $this->set_response(["\145\162\162\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\x72\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { if ($ret == VERR_COMMON_IO) { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } else { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function PatientFilesByChartNo_delete() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\x70\x65\162\x6d\151\x73\x73\151\x6f\x6e"]) { vt_loge(__METHOD__ . "\72\40\x50\x65\x72\155\x69\x73\163\x69\x6f\x6e\40\105\162\x72\x6f\162\56"); return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $chartNo = urldecode($this->get("\x63\x68\x61\162\x74\156\x6f")); if (!isset($chartNo) || empty($chartNo)) { vt_loge(__METHOD__ . "\x3a\40" . "\x63\150\x61\x72\164\x4e\157\x20\151\x73\x20\105\155\x70\164\x79\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\120\x61\164\151\145\x6e\x74\x46\151\x6c\145\x73\137\x6d\x6f\144\x65\154"); $ret = $this->PatientFiles_model->delete_PatientFilesByChartNo($chartNo); if ($ret["\x65\162\162\x6f\x72\103\157\144\145"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\145\x72\162\157\x72\x43\x6f\144\145"] == VERR_DB_INVALIDDATA) { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_BAD_REQUEST); } else { $this->set_response(returnSetResponse(VERR_E2_PATIENT_DELETE), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function PatientFilesByChartNoR2_delete() { $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\160\x65\162\x6d\x69\163\x73\151\157\156"]) { return $this->set_response(returnSetResponse(VERR_COMMON_ACCESS), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } $this->load->model("\x50\141\164\x69\145\156\164\106\x69\154\x65\x73\122\62\x5f\x6d\157\x64\145\154"); $ret = $this->PatientFilesR2_model->delete_PatientFilesByChartNoR2($this->get()); if (in_array($ret["\145\162\162\157\x72\103\157\144\x65"], [VERR_COMMON_SUCCESS, VERR_E2_IMAGE_IN_GROUP])) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\145\162\x72\x6f\162\x43\157\x64\x65"] === VERR_COMMON_INVALID) { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response($ret, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Implantds.php b/server/original/www/ezwebserver/src/application/controllers/v1/Implantds.php index 22dfc79..31f97b6 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Implantds.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Implantds.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function ImplantTableForVersion_post() { load_model($this, "\111\155\160\x6c\x61\156\164\124\141\142\x6c\145\x5f\155\157\144\145\x6c"); $ret = $this->ImplantTable_model->post_ImplantTableForVersion(); if ($ret === true) { $this->set_response(["\x65\162\162\157\162\103\157\144\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantCompanies_get() { load_model($this, "\111\155\x70\x6c\141\x6e\x74\x43\157\155\160\141\x6e\151\x65\163\137\x6d\157\144\x65\x6c"); $ret = $this->ImplantCompanies_model->get_ImplantCompanies(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { array_push($items, $row["\x63\157\x6d\137\156\x61\155\145"]); } return $this->set_response(array("\145\x72\162\x6f\x72\x43\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\157\162\103\x6f\144\x65"], "\163\164\x72\x6c\103\157\155\x4e\x61\x6d\x65" => $items), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\162\162\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\x6f\x72\103\x6f\x64\x65"], "\163\x74\162\x6c\x43\x6f\155\x4e\141\x6d\145" => $items), REST_Controller::HTTP_OK); } } public function ImplantCompanies_put() { $parametersOfPutImplantCompanies = $this->put(); if (!isset($parametersOfPutImplantCompanies["\163\164\162\103\157\155\x4e\141\x6d\145"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x70\154\x61\156\164\103\x6f\x6d\x70\x61\156\x69\145\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->ImplantCompanies_model->put_ImplantCompanies($parametersOfPutImplantCompanies); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\162\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByUser_post() { $parameters = $this->post(); if (!isset($parameters["\x69\155\160\154\x61\156\x74\111\156\146\157"]["\x73\164\x72\103\x6f\x6d\x70\141\156\x79"]) || !isset($parameters["\x69\155\160\x6c\141\156\x74\x49\156\x66\157"]["\163\164\x72\114\x69\156\145\x75\160"]) || !isset($parameters["\x69\x6d\x70\x6c\x61\x6e\x74\x49\156\146\x6f"]["\163\x74\162\x4d\x6f\144\x65\154\x4e\x61\155\145"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\160\154\x61\156\x74\x4d\x6f\144\145\154\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->ImplantModels_model->post_ImplantModelsByUser($parameters); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\157\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByDetail_put() { $parameters = $this->put(); if (!isset($parameters["\x69\x6d\x70\x6c\x61\x6e\164\111\x6e\x66\157"]["\163\x74\162\x43\157\x6d\x70\141\156\171"]) || !isset($parameters["\151\155\x70\x6c\141\156\x74\x49\156\x66\157"]["\x73\x74\x72\x4c\151\x6e\145\x75\x70"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x70\x6c\x61\156\164\115\x6f\x64\x65\x6c\x73\x5f\x6d\x6f\x64\145\154"); $ret = $this->ImplantModels_model->put_ImplantModelsByDetail($parameters); if (count($ret) > 0) { $nLnupID = $ret[0]["\154\x6e\x75\x70\x5f\x69\x64"]; $ret = $this->ImplantModels_model->put_ImplantModelsByDetail_Success($parameters, $nLnupID); if ($ret > 0) { return $this->set_response(["\145\x72\x72\157\162\x43\157\144\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndNameAndContainsSTL_get() { $strComName = urldecode($this->get("\x63\157\155\x70\141\x6e\x79")); $strLineupName = urldecode($this->get("\x6c\x69\x6e\x65\165\x70")); $strModelName = urldecode($this->get("\x6e\141\155\x65")); $boolContainSTL = json_decode($this->get("\143\x6f\156\164\x61\x69\156\x73\163\x74\x6c")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (!($boolContainSTL === true || $boolContainSTL === false)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\160\x6c\x61\156\164\x4d\x6f\x64\145\x6c\163\137\x6d\x6f\x64\x65\154"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupAndNameAndContainsSTL($strComName, $strLineupName, $strModelName, $boolContainSTL); if (count($ret) > 0) { $ret[0]["\x63\x6f\155\137\156\x61\155\x65"] = $strComName; $ret[0]["\x6c\156\x75\160\x5f\x6e\141\x6d\145"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($ret[0], "\150\145\x78", $boolContainSTL); return $this->set_response(["\x65\162\162\157\x72\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\x72\103\x6f\144\x65"], "\x73\111\x6d\x70\154\141\156\164\x49\156\x66\157" => $sImplantInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupWithoutFiles_get() { $strComName = urldecode($this->get("\x63\x6f\x6d\160\141\156\x79")); $strLineupName = urldecode($this->get("\x6c\x69\156\145\x75\x70")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x70\154\141\x6e\164\x4d\157\144\x65\154\163\x5f\155\x6f\x64\x65\x6c"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupWithoutFiles($strComName, $strLineupName); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $row["\143\157\x6d\137\x6e\141\155\145"] = $strComName; $row["\x6c\156\x75\x70\137\x6e\141\155\x65"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($row); array_push($items, $sImplantInfo); } return $this->set_response(["\145\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\103\157\144\x65"], "\x76\x65\x63\x49\x6d\160\x6c\x61\x6e\x74\x49\x6e\146\x6f" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\157\162\103\157\144\x65"], "\x76\x65\143\111\x6d\x70\x6c\x61\156\164\111\156\x66\x6f" => $items], REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupForNameList_get() { $strComName = urldecode($this->get("\143\x6f\x6d\160\x61\156\x79")); $strLineupName = urldecode($this->get("\x6c\x69\x6e\x65\165\x70")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\154\141\x6e\x74\x4d\157\144\145\154\163\x5f\155\x6f\x64\145\x6c"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupForNameList(array("\x73\164\162\103\157\x6d\x4e\x61\x6d\145" => $strComName, "\163\x74\x72\114\x69\x6e\x65\x75\160\x4e\141\155\x65" => $strLineupName)); if (count($ret) > 0) { $items = array(); foreach ($ret as $row) { $strlModelName = $row["\155\157\x64\145\x6c\x5f\x6e\141\155\x65"]; array_push($items, $strlModelName); } $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\145" => ErrorCode::SUCCESS, "\163\x74\x72\114\x69\x6e\145\165\160\x4e\141\155\x65" => $items], REST_Controller::HTTP_OK); } else { $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndNameForDetail_get() { $strComName = urldecode($this->get("\143\157\x6d\160\x61\x6e\171")); $strLineupName = urldecode($this->get("\154\x69\x6e\x65\x75\160")); $strModelName = urldecode($this->get("\x6e\141\155\145")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x70\154\x61\x6e\164\x4d\157\x64\145\154\163\137\155\x6f\x64\x65\154"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupAndNameForDetail($strComName, $strLineupName, $strModelName); if (count($ret) > 0) { $ret[0]["\143\x6f\x6d\137\156\141\x6d\145"] = $strComName; $ret[0]["\154\156\x75\160\137\156\141\155\145"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($ret[0], "\150\x65\170"); return $this->set_response(["\145\x72\162\x6f\162\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\157\162\x43\x6f\144\145"], "\x73\111\155\x70\154\141\x6e\164\111\156\146\157" => $sImplantInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantTableForSurgicalKit_post() { load_model($this, "\x49\155\160\154\141\x6e\164\x54\141\142\154\x65\x5f\155\157\144\145\x6c"); $ret = $this->ImplantTable_model->post_ImplantTableForSurgicalKit(); if ($ret === true) { return $this->set_response(["\145\162\162\157\162\103\157\144\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantTableForCompany_post() { load_model($this, "\111\x6d\160\154\141\156\x74\124\x61\142\x6c\x65\x5f\155\157\x64\x65\154"); $ret = $this->ImplantTable_model->post_ImplantTableForCompany(); if ($ret === TRUE) { return $this->set_response(["\x65\x72\162\x6f\162\x43\x6f\x64\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByNameForId_get() { $strComName = urldecode($this->get("\156\141\x6d\x65")); if (empty($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\160\154\x61\156\164\x43\157\155\x70\141\x6e\151\x65\163\137\155\x6f\x64\145\154"); $ret = $this->ImplantCompanies_model->get_ImplantCompaniesByNameForId($strComName); if (count($ret) > 0 && isset($ret[0])) { return $this->set_response(["\145\162\x72\157\x72\103\x6f\x64\145" => ErrorCode::SUCCESS, "\x6e\103\157\155\x61\156\171\111\144" => $ret[0]["\x63\x6f\x6d\x5f\x69\144"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndName_get() { $strComName = urldecode($this->get("\x63\x6f\155\160\x61\x6e\x79")); $strLineupName = urldecode($this->get("\156\141\x6d\x65")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\x6c\141\156\x74\114\151\156\x65\x75\x70\x73\137\155\x6f\144\145\154"); $ret = $this->ImplantLineups_model->get_ImplantLineupsByCompanyAndName(array("\163\x74\162\103\157\155\116\x61\155\145" => $strComName, "\x73\164\162\x4c\151\156\145\x75\160\x4e\141\x6d\x65" => $strLineupName)); if (count($ret) > 0 && count($ret[0] > 3)) { return $this->set_response(["\145\162\x72\157\x72\x43\157\x64\145" => ErrorCode::SUCCESS, "\142\123\x79\x6e\143" => setBoolVal($ret[0]["\x6c\x6e\x75\160\137\x73\171\156\x63"]), "\x62\x55\x73\x65\x72\101\144\144\x65\144" => setBoolVal($ret[0]["\154\x6e\x75\x70\x5f\165\163\145\x72\x5f\141\x64\144\145\144"]), "\142\x53\x68\157\167\x48\x69\144\x65" => $ret[0]["\154\x6e\165\160\x5f\165\x73\x65\162\137\144\145\x66\151\x6e\x65\144\137\x31"] == null ? TRUE : setBoolVal($ret[0]["\154\156\x75\x70\x5f\165\x73\x65\x72\137\144\x65\146\151\156\x65\144\x5f\61"]), "\x73\x74\162\x52\x65\163\145\x72\166\145\x64\x32" => $ret[0]["\x6c\156\165\160\x5f\x75\x73\145\162\x5f\144\145\x66\x69\x6e\x65\x64\137\x32"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndName_post() { $strComName = $this->post("\x73\x74\x72\x43\x6f\x6d\x4e\x61\155\x65"); $strLineupName = $this->post("\x73\164\x72\x4c\151\156\145\165\160\116\x61\155\145"); if (!isset($strComName) || !isset($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\x6c\x61\156\x74\x4c\x69\x6e\145\x75\160\163\x5f\155\157\144\145\x6c"); $ret = $this->ImplantLineups_model->post_ImplantLineupsByCompanyAndName($strComName, $strLineupName); if ($ret > 0) { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\162\103\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndName_put() { $strComName = $this->put("\x73\x74\162\103\x6f\x6d\116\141\x6d\145"); $strLineupName = $this->put("\x73\x74\x72\x4c\x69\156\145\x75\x70\x4e\141\x6d\x65"); $Parameters = $this->put(); if (!isset($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\160\x6c\141\x6e\164\x4c\151\156\145\x75\x70\x73\137\x6d\157\x64\x65\154"); $ret = $this->ImplantLineups_model->put_ImplantLineupsByCompanyAndName($strComName, $strLineupName, $Parameters); if ($ret > 0) { return $this->set_response(["\145\x72\x72\157\162\x43\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\157\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndName_delete() { $strComName = urldecode($this->get("\x63\157\x6d\x70\141\x6e\x79")); $strLineupName = urldecode($this->get("\156\x61\155\x65")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\160\154\x61\x6e\x74\x4c\x69\x6e\x65\x75\160\x73\137\x6d\157\144\x65\154"); $ret = $this->ImplantLineups_model->delete_ImplantLineupsByCompanyAndName($strComName, $strLineupName); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompany_get() { $strComName = urldecode($this->get("\x63\x6f\155\x70\x61\x6e\x79")); if (empty($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x70\x6c\141\156\164\x4c\x69\156\145\165\160\163\x5f\x6d\157\x64\145\x6c"); $ret = $this->ImplantLineups_model->get_ImplantLineupsByCompany($strComName); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { if ($row["\x6c\x6e\165\x70\137\x75\163\145\x72\137\144\145\146\151\156\145\144\x5f\x31"] === null || setBoolVal($row["\x6c\x6e\x75\x70\x5f\165\163\145\162\x5f\144\145\x66\x69\156\145\x64\137\x31"]) === true) { array_push($items, $row["\x6c\156\165\x70\x5f\156\x61\x6d\x65"]); } } return $this->set_response(array("\145\x72\x72\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\157\162\x43\157\144\x65"], "\x73\164\x72\154\x4c\151\156\x65\x75\160\116\141\155\145" => $items), REST_Controller::HTTP_OK); } else { return $this->set_response(array("\x65\162\162\x6f\x72\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\162\157\162\103\157\144\x65"], "\163\164\x72\x6c\x4c\151\x6e\x65\165\160\x4e\x61\x6d\145" => $items), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompany_post() { $strComName = $this->post("\x73\164\162\x43\x6f\x6d\116\141\155\x65"); $strlLineupName = $this->post("\x73\x74\x72\x6c\x4c\x69\x6e\x65\x75\160\x4e\141\155\x65"); if (!isset($strComName) || !isset($strlLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\154\141\156\x74\x4c\x69\156\145\165\x70\163\137\x6d\157\144\145\154"); $ret = $this->ImplantLineups_model->post_ImplantLineupsByCompany($strComName, $strlLineupName); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\162\103\157\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\103\157\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByNameAndNew_patch() { $strComName = urldecode($this->patch("\x73\164\x72\103\x6f\155\116\x61\155\x65")); $strNewComName = urldecode($this->patch("\163\x74\x72\116\145\x77\x43\157\x6d\x4e\141\155\x65")); if (empty($strComName) || empty($strNewComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\160\x6c\x61\x6e\x74\103\157\x6d\x70\x61\156\151\145\x73\x5f\155\157\x64\x65\154"); $ret = $this->ImplantCompanies_model->patch_ImplantCompaniesByNameAndNew($strComName, $strNewComName); if ($ret > 0) { return $this->set_response(["\145\x72\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\x43\x6f\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModels_post() { $implantInfo = $this->post(); if (!isset($implantInfo["\163\164\x72\x4d\157\144\x65\154\x4e\141\155\145"]) || !isset($implantInfo["\x73\164\x72\114\151\x6e\145\165\x70"]) || !isset($implantInfo["\x73\164\162\103\157\155\x70\x61\156\171"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x70\154\x61\156\164\115\x6f\x64\x65\x6c\x73\137\155\157\x64\145\154"); $ret = $this->ImplantModels_model->post_ImplantModels($implantInfo); if ($ret > 0) { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantModels_put() { $implantInfo = $this->put(); if (!isset($implantInfo["\163\164\162\103\x6f\x6d\x70\141\x6e\171"]) || !isset($implantInfo["\x73\x74\x72\x4c\151\x6e\145\165\160"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x70\154\141\x6e\x74\115\x6f\144\145\x6c\163\x5f\155\157\144\145\x6c"); $ret = $this->ImplantModels_model->put_ImplantModels($implantInfo); if ($ret > 0) { return $this->set_response(["\145\162\162\157\x72\x43\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByNameList_post() { $strlComName = $this->post(); if (!isset($strlComName) || empty($strlComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x70\154\141\156\164\x43\157\155\160\141\156\151\x65\x73\x5f\155\x6f\144\x65\154"); $ret = $this->ImplantCompanies_model->post_ImplantCompaniesByNameList($strlComName); if ($ret > 0) { return $this->set_response(["\x65\162\162\x6f\162\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\x72\x43\x6f\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndNameAndNew_patch() { $strComName = $this->patch("\163\x74\162\103\157\x6d\x4e\141\155\x65"); $strLineupName = $this->patch("\163\x74\x72\114\151\156\x65\x75\160\116\141\x6d\x65"); $strNewLineupName = $this->patch("\x73\164\162\x4e\x65\167\114\151\156\x65\x75\160\116\x61\x6d\145"); if (!isset($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\160\154\x61\156\164\x4c\x69\156\x65\x75\160\163\x5f\x6d\x6f\144\x65\154"); $ret = $this->ImplantLineups_model->patch_ImplantLineupsByCompanyAndNameAndNew($strComName, $strLineupName, $strNewLineupName); if ($ret > 0) { return $this->set_response(["\x65\x72\162\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantTableForLineup_post() { load_model($this, "\x49\x6d\160\154\141\x6e\164\124\141\142\x6c\145\137\x6d\x6f\144\145\154"); $ret = $this->ImplantTable_model->post_ImplantTableForLineup(); if ($ret === true) { return $this->set_response(["\145\x72\162\157\162\103\157\x64\x65" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupForE3_get() { $strComName = urldecode($this->get("\143\157\x6d\160\x61\x6e\x79")); $strLineupName = urldecode($this->get("\x6c\x69\156\x65\x75\x70")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x70\154\141\x6e\164\115\x6f\144\x65\x6c\x73\x5f\x6d\157\x64\x65\154"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupForE3($strComName, $strLineupName); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $row["\143\x6f\x6d\137\156\141\x6d\x65"] = $strComName; $row["\x6c\156\165\160\x5f\x6e\141\x6d\145"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($row); array_push($items, $sImplantInfo); } return $this->set_response(["\145\x72\162\x6f\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\x72\103\157\x64\x65"], "\x76\145\x63\x49\155\x70\x6c\x61\x6e\x74\111\156\146\157" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\162\x43\157\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\x72\x6f\162\103\x6f\144\145"], "\x76\145\143\x49\x6d\x70\154\141\156\x74\111\x6e\x66\x6f" => $items], REST_Controller::HTTP_OK); } } public function SurgicalKitsByCompanyAndLineupAndModel_get() { $strComName = urldecode($this->get("\143\x6f\155\x70\141\156\171")); $strLineupName = urldecode($this->get("\154\x69\x6e\145\x75\x70")); $strModelName = urldecode($this->get("\155\x6f\144\x65\x6c")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\165\x72\147\x69\x63\x61\154\113\x69\164\x73\137\155\157\144\145\x6c"); $ret = $this->SurgicalKits_model->get_SurgicalKitsByCompanyAndLineupAndModel($strComName, $strLineupName, $strModelName); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $strSurgicalKit = $row["\163\165\162\147\151\143\141\154\137\x6b\x69\x74\137\x6e\141\155\145"]; array_push($items, $strSurgicalKit); } return $this->set_response(["\145\x72\162\157\x72\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\x43\x6f\144\x65"], "\163\x74\x72\154\123\165\162\147\151\x63\141\154\113\x69\164" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\x72\x72\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\103\157\x64\145"], "\163\164\x72\154\x53\165\x72\x67\x69\143\x61\x6c\x4b\151\x74" => $items], REST_Controller::HTTP_OK); } } public function SurgicalKitsByCompanyAndLineupAndModel_post() { $strComName = $this->post("\163\164\x72\103\157\155\x4e\x61\x6d\145"); $strLineupName = $this->post("\163\x74\x72\x4c\151\156\145\165\x70\x4e\141\x6d\145"); $strModelName = $this->post("\163\x74\x72\x4d\157\144\145\x6c\x4e\x61\x6d\x65"); $strlSurgicalKit = $this->post("\163\x74\162\154\x53\165\x72\x67\151\x63\141\x6c\x4b\151\x74"); if (!isset($strComName) || !isset($strLineupName) || !isset($strModelName) || !isset($strlSurgicalKit)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\x75\162\x67\x69\x63\141\x6c\x4b\x69\x74\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->SurgicalKits_model->post_SurgicalKitsByCompanyAndLineupAndModel($strComName, $strLineupName, $strModelName, $strlSurgicalKit); if ($ret > 0) { return $this->set_response(["\145\x72\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\x72\x6f\x72\103\157\x64\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantLineupsByCompanyAndNameForId_get() { $strComName = urldecode($this->get("\x63\157\155\160\141\x6e\x79")); $strLineupName = urldecode($this->get("\156\x61\x6d\145")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x70\154\x61\x6e\x74\x4c\151\156\x65\165\x70\x73\x5f\155\157\x64\145\x6c"); $ret = $this->ImplantLineups_model->get_ImplantLineupsByCompanyAndNameForId($strComName, $strLineupName); if (count($ret) > 0) { $nLineupId = $ret[0]["\154\156\x75\x70\137\x69\144"]; return $this->set_response(["\x65\162\x72\x6f\x72\x43\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\x72\x43\157\144\x65"], "\x6e\x4c\151\156\145\x75\160\111\144" => $nLineupId], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByName_get() { $strComName = urldecode($this->get("\156\141\x6d\145")); if (!isset($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $strComName = urldecode($strComName); load_model($this, "\111\155\160\x6c\x61\156\164\103\157\155\160\x61\156\x69\145\x73\x5f\x6d\157\144\x65\x6c"); $ret = $this->ImplantCompanies_model->get_ImplantCompaniesByName($strComName); if (count($ret) > 0 && count($ret[0]) > 3) { return $this->set_response(["\x65\162\162\x6f\x72\x43\157\x64\x65" => ErrorCode::SUCCESS, "\x62\123\171\x6e\x63" => setBoolVal($ret[0]["\x63\157\x6d\137\163\171\x6e\143"]), "\x62\x55\x73\x65\x72\x41\x64\144\x65\x64" => setBoolVal($ret[0]["\x63\x6f\155\x5f\165\x73\145\x72\137\141\x64\144\145\144"]), "\x62\122\145\163\x65\162\166\x65\144\x31" => setBoolVal($ret[0]["\143\x6f\x6d\x5f\x75\163\145\162\x5f\x64\x65\x66\x69\x6e\145\x64\137\61"]), "\163\x74\162\x56\x65\162\x73\151\x6f\156" => $ret[0]["\x63\157\155\x5f\x75\x73\x65\162\x5f\x64\x65\x66\151\x6e\145\144\x5f\x32"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByName_post() { $strComName = urldecode($this->post("\163\x74\162\x43\157\x6d\116\x61\155\145")); if (!isset($strComName) || empty($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\x6c\141\156\164\x43\x6f\155\x70\141\156\x69\145\x73\137\x6d\157\144\x65\x6c"); $ret = $this->ImplantCompanies_model->post_ImplantCompaniesByName($strComName); if ($ret > 0) { return $this->set_response(["\145\162\162\157\x72\x43\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\x43\x6f\x64\145"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } } public function ImplantCompaniesByName_delete() { $strComName = urldecode($this->get("\156\x61\x6d\x65")); if (empty($strComName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\x70\x6c\141\156\x74\x43\157\x6d\160\x61\x6e\151\145\x73\137\x6d\157\x64\x65\x6c"); $ret = $this->ImplantCompanies_model->delete_ImplantCompaniesByName($strComName); if ($ret > 0) { return $this->set_response(["\145\162\162\x6f\x72\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\x6f\162\x43\157\144\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantTableForModel_post() { load_model($this, "\111\x6d\160\x6c\141\156\164\x54\x61\142\x6c\145\x5f\x6d\x6f\144\145\154"); $ret = $this->ImplantTable_model->post_ImplantTableForModel(); if ($ret === true) { $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\145" => ErrorCode::SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndName_get() { $strComName = urldecode($this->get("\x63\157\155\x70\x61\156\x79")); $strLineupName = urldecode($this->get("\x6c\151\x6e\145\165\160")); $strModelName = urldecode($this->get("\x6e\x61\x6d\145")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\160\x6c\x61\156\164\115\x6f\144\x65\x6c\163\x5f\155\x6f\x64\145\154"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupAndName($strComName, $strLineupName, $strModelName); if (count($ret) > 0 && count($ret[0]) > 0) { $ret[0]["\x63\157\155\x5f\156\x61\155\145"] = $strComName; $ret[0]["\154\156\165\x70\137\156\141\x6d\x65"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($ret[0], "\150\x65\170"); return $this->set_response(["\145\162\x72\x6f\162\103\157\144\145" => ErrorCode::SUCCESS, "\151\155\160\154\141\x6e\164\111\156\146\x6f" => $sImplantInfo], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndName_delete() { $strComName = urldecode($this->get("\143\157\x6d\160\x61\156\171")); $strLineupName = urldecode($this->get("\154\x69\156\x65\x75\160")); $strModelName = urldecode($this->get("\x6e\x61\155\145")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\160\154\141\156\x74\x4d\x6f\x64\x65\154\x73\137\155\x6f\x64\145\x6c"); $ret = $this->ImplantModels_model->delete_ImplantModelsByCompanyAndLineupAndName($strComName, $strLineupName, $strModelName); if ($ret > 0) { return $this->set_response(["\145\x72\162\157\162\103\x6f\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\103\157\144\x65"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function SurgicalKitsByImplant_put() { $implantInfo = $this->put(); if (!isset($implantInfo["\x73\164\162\x4d\157\144\x65\154\116\x61\x6d\145"]) || !isset($implantInfo["\163\164\162\114\151\156\145\x75\160"]) || !isset($implantInfo["\163\164\162\103\157\155\x70\x61\156\x79"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\165\x72\147\151\x63\141\x6c\113\151\164\163\137\155\x6f\144\x65\x6c"); $ret = $this->SurgicalKits_model->put_SurgicalKitsByImplant($implantInfo); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $strSurgicalKit = array(); $strSurgicalKit = $row["\163\165\x72\x67\151\x63\141\x6c\137\x6b\151\x74\x5f\156\x61\155\145"]; array_push($items, $strSurgicalKit); } return $this->set_response(["\x65\x72\162\157\162\103\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\x6f\162\x43\x6f\144\145"], "\x73\x74\x72\x6c\x53\165\x72\147\x69\143\141\x6c\x4b\151\x74" => $items], REST_Controller::HTTP_OK); } else { return $this->set_response(["\145\162\x72\157\x72\x43\x6f\x64\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\162\x72\157\162\103\x6f\144\x65"], "\163\164\x72\x6c\x53\x75\x72\147\x69\x63\141\154\x4b\151\164" => $items], REST_Controller::HTTP_OK); } } public function SurgicalKitsByImplant_post() { $parameters = $this->post(); if (!isset($parameters["\151\155\160\x6c\141\156\x74\111\156\146\x6f"]["\163\164\162\103\157\x6d\160\x61\x6e\171"]) || !isset($parameters["\x69\155\x70\x6c\141\156\x74\111\156\146\157"]["\163\x74\x72\x4c\151\x6e\145\x75\160"]) || !isset($parameters["\151\x6d\160\154\x61\x6e\164\111\x6e\x66\157"]["\163\164\162\115\157\144\145\x6c\x4e\x61\155\145"]) || !isset($parameters["\163\164\x72\x6c\123\165\162\x67\151\143\x61\x6c\113\151\164"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\123\165\x72\x67\x69\143\x61\x6c\113\x69\164\x73\137\155\157\144\145\154"); $ret = $this->SurgicalKits_model->post_SurgicalKitsByImplant($parameters); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\162\103\x6f\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\x72\162\x6f\x72\x43\157\144\145"]], REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_OVERLAP) { return $this->set_response(returnSetResponse(VERR_DB_OVERLAP), REST_Controller::HTTP_OK); } elseif ($ret === VERR_DB_NOSUCHDATA) { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_INVALIDDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndNameForId_get() { $strComName = urldecode($this->get("\x63\157\155\160\141\x6e\171")); $strLineupName = urldecode($this->get("\x6c\151\156\145\165\x70")); $strModelName = urldecode($this->get("\156\x61\155\145")); if (empty($strComName) || empty($strLineupName) || empty($strModelName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x70\x6c\141\156\x74\x4d\x6f\x64\145\154\x73\x5f\155\157\144\145\x6c"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupAndNameForId($strComName, $strLineupName, $strModelName); if (count($ret) > 0) { return $this->set_response(["\145\x72\162\x6f\162\x43\x6f\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\x72\x6f\162\103\157\x64\145"], "\x6e\115\157\x64\x65\154\x49\x64" => $ret[0]["\155\157\144\145\154\x5f\151\144"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndNameAndNew_patch() { $strComName = $this->patch("\163\164\x72\103\x6f\155\116\x61\x6d\x65"); $strLineupName = $this->patch("\163\164\x72\114\151\156\x65\x75\x70\x4e\x61\x6d\145"); $strModelName = $this->patch("\x73\164\x72\x4d\x6f\x64\145\154\116\141\155\145"); $strNewModelName = $this->patch("\163\x74\x72\116\x65\x77\115\157\x64\x65\x6c\116\x61\x6d\145"); if (!isset($strComName) || !isset($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x6d\x70\x6c\141\156\x74\x4d\157\x64\145\154\163\x5f\x6d\x6f\144\x65\154"); $ret = $this->ImplantModels_model->patch_ImplantModelsByCompanyAndLineupAndNameAndNew($strComName, $strLineupName, $strModelName, $strNewModelName); if ($ret > 0) { return $this->set_response(["\x65\162\x72\x6f\x72\103\157\144\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\162\157\162\103\157\x64\x65"]], REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_DB_NOSUCHDATA), REST_Controller::HTTP_OK); } } public function ImplantModelsByCompanyAndLineupAndFileEncodingWithoutStl_get() { $strComName = urldecode($this->get("\x63\157\x6d\x70\141\156\x79")); $strLineupName = urldecode($this->get("\154\151\156\145\165\160")); $fileEncoding = urldecode($this->get("\x66\151\154\x65\x65\x6e\143\x6f\x64\x69\x6e\147")); if (empty($strComName) || empty($strLineupName)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\155\x70\x6c\x61\156\x74\115\x6f\144\x65\154\x73\137\x6d\x6f\x64\x65\x6c"); $ret = $this->ImplantModels_model->get_ImplantModelsByCompanyAndLineupAndFileEncodingWithoutStl($strLineupName, $strComName, $fileEncoding); if ($ret["\x65\162\162\157\162\103\x6f\x64\x65"] == VERR_COMMON_SUCCESS || $ret["\145\x72\x72\x6f\162\103\x6f\x64\x65"] == VERR_DB_NOSUCHDATA) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } } public function ImplantModelsByModelsWithoutStl_post() { $parameters = $this->post(); if (!isset($parameters["\x76\145\x63\x49\155\160\154\x61\x6e\164\x4d\157\144\145\x6c\163"]) || empty($parameters["\x76\x65\143\x49\x6d\x70\x6c\141\156\x74\115\157\x64\x65\154\163"])) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\111\x6d\x70\154\141\156\x74\x4d\157\144\x65\154\163\x5f\155\x6f\144\x65\154"); $ret = $this->ImplantModels_model->post_ImplantModelsByModelsWithoutStl($parameters["\166\145\x63\111\155\160\154\x61\156\x74\x4d\157\144\x65\154\163"], $parameters["\146\151\154\145\x45\x6e\x63\157\x64\x69\156\147"]); if ($ret["\x65\162\162\157\162\103\x6f\x64\145"] == VERR_COMMON_SUCCESS || $ret["\x65\x72\162\x6f\162\103\x6f\144\x65"] == VERR_DB_NOSUCHDATA) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } } public function ImplantCompaniesByIsShown_get() { $bIsShown = filter_var(urldecode($this->get("\x69\x73\163\x68\157\x77\156")), FILTER_VALIDATE_BOOLEAN); if ($bIsShown !== true && $bIsShown !== false) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\155\x70\x6c\141\156\x74\103\157\x6d\160\141\x6e\151\x65\x73\137\x6d\x6f\x64\145\154"); $ret = $this->ImplantCompanies_model->get_ImplantCompaniesByIsShown($bIsShown); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function ImplantSTLFilesInZipFile_post() { $vecImplantModels = $this->post("\x76\x65\143\x49\155\x70\154\x61\x6e\x74\x4d\157\x64\145\154\163"); if (empty($vecImplantModels)) { vt_loge("\111\x6d\160\x6c\141\156\x74\x53\124\114\x46\151\x6c\x65\x73\111\156\x5a\151\x70\106\151\x6c\145\137\x70\157\x73\x74\40\101\x70\151\56\40" . "\x49\x6e\x76\x61\154\151\x64\40\120\141\162\141\x6d\145\x74\x65\162\40\x45\x72\162\157\162\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x49\155\160\x6c\141\x6e\164\123\x54\x4c\x46\x69\154\145\163\137\x6d\x6f\144\145\x6c"); $ret = $this->ImplantSTLFiles_model->post_ImplantSTLFilesInZipFile($vecImplantModels); if ($ret["\x65\x72\x72\x6f\162\103\157\144\x65"] == VERR_COMMON_SUCCESS) { $this->load->model("\x44\x61\x74\141\x66\151\x6c\145\137\155\x6f\x64\145\x6c"); $this->Datafile_model->DownloadFile($ret["\x66\151\154\145\116\x61\x6d\145"]); } else { if ($ret["\x65\x72\x72\157\162\103\x6f\x64\x65"] == VERR_COMMON_INVALID) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } else { $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Info.php b/server/original/www/ezwebserver/src/application/controllers/v1/Info.php index d9464a2..d99e0d7 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Info.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Info.php @@ -1,7 +1,7 @@ get("\x6e\x61\155\145")); $data = $this->Versions_model->get_VersionsByName($name); $serverName = $this->Versions_model->getServerName(); $this->set_response(["\x65\x72\x72\157\162\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\143\154\151\145\x6e\164\x56\x65\x72\x73\x69\x6f\156" => $data[0], "\163\145\x72\x76\145\x72\x56\145\162\x73\x69\x6f\x6e" => $data[1], "\163\145\162\x76\x65\x72\116\x61\155\145" => $serverName], REST_Controller::HTTP_OK); } public function Versions_get() { $data = $this->Versions_model->get_Versions(); $currentVersion = $this->Versions_model->getCurrentVersion(); if ($currentVersion["\x65\x72\x72\x6f\162\103\x6f\x64\145"] !== VERR_COMMON_SUCCESS) { return $this->set_response(returnSetResponse($currentVersion["\145\x72\x72\157\162\103\157\x64\145"]), REST_Controller::HTTP_BAD_REQUEST); } else { $currentVersionName = $currentVersion["\143\x75\x72\162\145\x6e\164\x56\145\162\163\x69\157\x6e\x4e\x61\155\x65"]; } $currentStageVersion = $this->Versions_model->getCurrentStageVersion(); if ($currentStageVersion["\x65\162\x72\157\x72\x43\x6f\144\x65"] !== VERR_COMMON_SUCCESS) { return $this->set_response(returnSetResponse($currentVersion["\x65\x72\x72\157\x72\x43\x6f\x64\145"]), REST_Controller::HTTP_BAD_REQUEST); } else { $currentStageVersionName = $currentStageVersion["\x63\165\162\x72\145\x6e\x74\x53\x74\x61\x67\145\x56\x65\162\163\x69\157\x6e\x4e\141\x6d\145"]; } $serverName = $this->Versions_model->getServerName(); $this->set_response(["\x65\162\162\x6f\x72\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\163\145\x72\x76\145\x72\x4e\x61\x6d\145" => $serverName, "\x63\165\162\x72\145\156\164\x56\x65\162\x73\x69\157\x6e\x4e\x61\155\145" => $currentVersionName, "\143\x75\x72\162\145\x6e\x74\x53\x74\141\147\x65\126\x65\x72\163\x69\157\156\116\141\155\x65" => $currentStageVersionName, "\x76\x65\x72\x73\151\x6f\156\x73" => $data], REST_Controller::HTTP_OK); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Iosensor.php b/server/original/www/ezwebserver/src/application/controllers/v1/Iosensor.php index 1ef49c3..248b83e 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Iosensor.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Iosensor.php @@ -1,7 +1,7 @@ get("\x73\145\162\151\x61\x6c\156\165\155\142\145\162")); if (empty($serialNumber)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x49\x4f\123\x65\156\163\x6f\x72\x73\137\x6d\x6f\x64\145\154"); $ret = $this->IOSensors_model->get_IOSensorsBySerialNumber($serialNumber); if ($ret["\145\162\x72\x6f\x72\103\x6f\x64\x65"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\x65\162\x72\157\162\x43\157\x64\145"] == VERR_COMMON_NOFILE) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function CalibrationFilesInZipFileBySerialNumber_get() { $serialNumber = urldecode($this->get("\163\145\x72\x69\x61\x6c\156\x75\155\x62\145\x72")); if (empty($serialNumber)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } load_model($this, "\x43\141\154\151\x62\162\x61\164\x69\157\156\x46\151\x6c\145\x73\x5f\x6d\157\x64\x65\154"); $ret = $this->CalibrationFiles_model->get_CalibrationFilesInZipFileBySerialNumber($serialNumber); if ($ret["\x65\162\x72\x6f\162\x43\157\144\x65"] == VERR_COMMON_SUCCESS) { vt_logi(json_encode($ret)); $this->load->model("\x44\141\x74\x61\146\151\x6c\145\x5f\155\157\144\145\x6c"); $this->Datafile_model->DownloadFile($ret["\146\151\x6c\x65\x4e\x61\155\x65"]); } else { if ($ret["\145\x72\162\x6f\162\x43\157\144\145"] == VERR_COMMON_NOFILE) { return $this->set_response(returnSetResponse(VERR_COMMON_NOFILE), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(returnSetResponse(VERR_COMMON_IO), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Orthods.php b/server/original/www/ezwebserver/src/application/controllers/v1/Orthods.php index 86d5f41..ce482ed 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Orthods.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Orthods.php @@ -1,7 +1,7 @@ load->enum(); $this->load->struct(); } public function AnalysesP2_get() { $modality = trim(urldecode($this->get("\155\157\144\141\x6c\x69\x74\x79"))); if (empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\124\x68\x65\40\160\x61\x72\x61\155\x65\x74\145\x72\40\x69\x73\x20\x69\156\x76\141\154\151\x64\x20\x64\x61\164\x61\72\x20" . $modality); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\101\x6e\141\154\x79\163\x65\163\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->Analyses_model->get_AnalysesP2($modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function AnalysesP3_get() { $landmarkname = trim(urldecode($this->get("\x6c\141\x6e\x64\x6d\x61\162\153\x6e\x61\155\145"))); $modality = trim(urldecode($this->get("\x6d\157\x64\x61\154\x69\164\x79"))); if (empty($landmarkname) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\120\141\x72\x61\155\145\164\145\162\x73\40\x61\x72\x65\x20\x69\x6e\x76\141\x6c\151\144\40\144\x61\x74\x61\x3a\40" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x41\x6e\141\x6c\171\163\145\163\137\155\157\x64\145\154"); $ret = $this->Analyses_model->get_AnalysesP3($landmarkname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function AnalysesP4_get() { $guidelinename = trim(urldecode($this->get("\x67\x75\151\144\145\x6c\x69\156\145\156\141\x6d\145"))); $modality = trim(urldecode($this->get("\x6d\x6f\144\141\154\x69\x74\x79"))); if (empty($guidelinename) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\x72\x61\155\145\164\x65\x72\163\x20\141\162\x65\40\151\156\x76\x61\x6c\151\144\40\x64\141\x74\141\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x41\x6e\141\154\x79\x73\x65\x73\x5f\x6d\157\x64\x65\154"); $ret = $this->Analyses_model->get_AnalysesP4($guidelinename, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function AnalysesP5_get() { $measurementname = trim(urldecode($this->get("\x6d\x65\x61\163\165\x72\x65\155\x65\x6e\x74\156\x61\155\145"))); $modality = trim(urldecode($this->get("\x6d\x6f\144\x61\x6c\x69\x74\x79"))); if (empty($measurementname) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\x50\141\162\141\x6d\145\x74\145\162\163\40\141\x72\145\40\151\x6e\166\x61\x6c\x69\x64\x20\x64\x61\164\x61\72\40" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x41\156\x61\154\x79\x73\x65\163\x5f\x6d\x6f\x64\x65\154"); $ret = $this->Analyses_model->get_AnalysesP5($measurementname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Analyses_get() { $analysisname = trim(urldecode($this->get("\156\141\155\x65"))); $modality = trim(urldecode($this->get("\155\157\144\141\x6c\x69\164\x79"))); if (empty($analysisname) || empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\x72\141\x6d\x65\x74\145\x72\163\40\141\x72\x65\x20\151\156\166\141\x6c\151\x64\40\144\x61\164\141\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x41\x6e\x61\154\x79\x73\145\x73\x5f\x6d\x6f\x64\145\154"); $ret = $this->Analyses_model->get_Analyses($analysisname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Analyses_delete() { $analysisname = trim(urldecode($this->get("\156\x61\155\145"))); $modality = trim(urldecode($this->get("\155\x6f\144\141\x6c\x69\164\171"))); if (empty($analysisname) || empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\x50\x61\x72\141\155\145\164\145\x72\163\x20\x61\162\145\40\151\156\166\141\154\x69\x64\40\144\x61\x74\x61\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\101\x6e\x61\x6c\x79\x73\x65\x73\x5f\155\x6f\144\145\154"); $ret = $this->Analyses_model->delete_Analyses($analysisname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Analyses_post() { $parameters = $this->post(); if (!isset($parameters["\156\141\155\145"]) || !isset($parameters["\x6d\157\144\141\154\x69\164\171"]) || empty(trim($parameters["\156\x61\155\x65"])) || empty(trim($parameters["\155\x6f\x64\141\154\x69\x74\171"]))) { vt_loge(__METHOD__ . "\72" . "\x50\141\x72\x61\155\x65\x74\x65\x72\163\40\x61\x72\145\40\x69\156\x76\x61\x6c\151\144\40\x64\x61\164\x61\x3a\40" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $analysisname = trim($parameters["\156\x61\x6d\145"]); $modality = trim($parameters["\x6d\157\x64\x61\x6c\151\164\x79"]); $label = trim($parameters["\154\x61\x62\x65\154"]); if (empty($label)) { $label = $analysisname; } $userAdded = filter_var($parameters["\165\x73\145\x72\101\144\144\145\x64"], FILTER_VALIDATE_BOOLEAN); $measureGroups = $parameters["\x6d\145\x61\x73\165\x72\x65\x47\x72\x6f\165\x70\163"]; $guidelinesNames = $parameters["\147\165\151\144\145\154\x69\x6e\x65\163\x4e\141\x6d\x65\163"]; $this->load->model("\x41\156\141\x6c\171\163\145\163\137\155\x6f\x64\x65\154"); $ret = $this->Analyses_model->post_Analyses($analysisname, $label, $userAdded, $modality, $measureGroups, $guidelinesNames); if ($ret === VERR_DB_INVALIDDATA) { return $this->set_response(createResponse($ret), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(createResponse($ret), REST_Controller::HTTP_OK); } } public function Analyses_put() { $parameters = $this->put(); if (!isset($parameters["\156\141\x6d\145"]) || !isset($parameters["\x6d\x6f\144\141\x6c\x69\x74\x79"]) || empty(trim($parameters["\x6e\141\x6d\145"])) || empty(trim($parameters["\155\157\x64\x61\154\151\x74\x79"])) || empty($parameters["\x6d\145\x61\x73\x75\162\145\107\162\x6f\165\160\163"]) && empty($parameters["\147\165\x69\144\145\154\151\156\x65\163\x4e\x61\155\145\x73"])) { vt_loge(__METHOD__ . "\72" . "\120\141\x72\x61\155\x65\164\145\162\163\40\141\162\145\40\x69\156\x76\141\154\x69\x64\x20\x64\x61\164\x61\72\40" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $analysisname = trim($parameters["\x6e\x61\x6d\x65"]); $label = trim($parameters["\x6c\x61\142\x65\154"]); $modality = trim($parameters["\x6d\x6f\144\x61\x6c\x69\x74\x79"]); $measureGroups = $parameters["\155\145\141\x73\x75\162\145\107\162\x6f\x75\160\163"]; $guidelinesNames = $parameters["\147\165\151\144\145\154\x69\x6e\x65\163\x4e\x61\155\x65\x73"]; $userAdded = $parameters["\165\163\145\162\x41\144\144\145\144"]; $this->load->model("\x41\x6e\x61\154\171\163\145\x73\x5f\x6d\x6f\x64\x65\154"); $ret = $this->Analyses_model->put_Analyses($analysisname, $label, $modality, $measureGroups, $guidelinesNames, $userAdded); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function AnalysesP6_put() { $this->load->model("\x41\x6e\x61\154\171\163\x65\x73\x5f\x6d\157\x64\x65\x6c"); $ret = $this->Analyses_model->put_AnalysesP6($this->put()); if ($ret == VERR_COMMON_INVALID) { return $this->set_response(createResponse($ret), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(createResponse($ret), REST_Controller::HTTP_OK); } } public function Formulas_get() { $this->load->model("\106\157\162\155\x75\x6c\x61\163\x5f\x6d\157\x64\145\x6c"); $ret = $this->Formulas_model->get_Formulas(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function GuidelinesP2_get() { $modality = trim(urldecode($this->get("\155\x6f\144\141\x6c\151\x74\x79"))); if (empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\145\x20\160\x61\162\x61\155\x65\164\x65\162\x20\x69\163\x20\151\156\x76\x61\154\x69\144\40\144\141\x74\x61\72\x20" . $modality); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\107\165\x69\144\x65\154\151\x6e\145\163\137\155\157\x64\145\x6c"); $ret = $this->Guidelines_model->get_GuidelinesP2($modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Guidelines_get() { $guidelinename = trim(urldecode($this->get("\x6e\141\x6d\x65"))); $modality = trim(urldecode($this->get("\155\x6f\144\141\x6c\151\x74\171"))); if (empty($guidelinename) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\x50\141\162\141\155\145\x74\145\x72\163\40\141\162\145\40\151\x6e\166\141\154\x69\144\x20\x64\x61\x74\x61\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x47\x75\x69\x64\x65\x6c\151\x6e\145\163\x5f\x6d\157\x64\145\154"); $ret = $this->Guidelines_model->get_Guidelines($guidelinename, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Guidelines_delete() { $guidelinename = trim(urldecode($this->get("\156\141\x6d\x65"))); $modality = trim(urldecode($this->get("\155\157\144\x61\154\x69\164\171"))); if (empty($guidelinename) || empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\162\141\155\x65\164\145\x72\163\40\x61\162\x65\x20\x69\x6e\x76\x61\x6c\151\144\x20\x64\x61\x74\x61\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x47\x75\x69\144\x65\x6c\151\156\x65\163\137\155\157\x64\145\154"); $ret = $this->Guidelines_model->delete_Guidelines($guidelinename, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Guidelines_post() { $sGuidelineInfoParameter = SGuidelineInfoParameter::constructWithParameter($this->post()); if (!isset($sGuidelineInfoParameter)) { vt_loge(__METHOD__ . "\72" . "\x50\141\x72\141\155\145\164\145\x72\163\40\x61\162\145\x20\151\x6e\x76\x61\154\151\x64\40\144\141\164\141\x3a\40" . json_encode($sGuidelineInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\107\x75\151\144\x65\x6c\x69\x6e\x65\x73\137\x6d\x6f\x64\x65\x6c"); $ret = $this->Guidelines_model->post_Guidelines($sGuidelineInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Guidelines_put() { $sGuidelineInfoParameter = SGuidelineInfoParameter::constructWithParameter($this->put()); if (!isset($sGuidelineInfoParameter)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\x72\x61\155\x65\164\x65\x72\163\40\x61\162\x65\x20\x69\156\x76\141\154\151\144\x20\144\141\164\141\72\40" . json_encode($sGuidelineInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\107\x75\x69\144\145\x6c\151\156\145\x73\x5f\x6d\x6f\144\145\x6c"); $ret = $this->Guidelines_model->put_Guidelines($sGuidelineInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function LandmarksP2_get() { $modality = trim(urldecode($this->get("\x6d\x6f\x64\x61\x6c\x69\164\x79"))); if (empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\145\x20\160\x61\162\141\x6d\x65\x74\x65\162\x20\151\x73\40\x69\x6e\166\141\x6c\x69\144\x20\x64\141\164\x61\x3a\x20" . $modality); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\114\141\156\144\x6d\141\162\x6b\163\x5f\x6d\157\x64\x65\x6c"); $ret = $this->Landmarks_model->get_LandmarksP2($modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function LandmarksP3_get() { $modality = trim(urldecode($this->get("\155\157\x64\x61\154\x69\x74\171"))); $landmarktype = trim(urldecode($this->get("\x74\x79\160\x65"))); if (empty($modality) || empty($landmarktype)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\x72\141\155\x65\x74\145\162\x73\x20\141\162\x65\x20\x69\156\166\x61\154\x69\x64\x20\x64\x61\164\141\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\114\x61\156\x64\155\x61\162\153\163\x5f\x6d\157\144\x65\x6c"); $ret = $this->Landmarks_model->get_LandmarksP3($landmarktype, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function LandmarksP4_get() { $simulationname = trim(urldecode($this->get("\x73\x69\x6d\x75\154\x61\164\151\157\x6e\x6e\x61\155\x65"))); if (empty($simulationname) || !(strcasecmp($simulationname, "\x56\124\x4f\x53\x54\x4f") === 0 || strcasecmp($simulationname, "\x50\x72\x6f\146\151\x6c\157\147\x72\141\155") === 0 || strcasecmp($simulationname, "\101\x6c\x6c") === 0)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\141\155\x65\164\x65\x72\x73\40\141\162\145\x20\151\x6e\x76\x61\x6c\151\x64\40\x64\x61\x74\141\x3a\x20" . json_encode($simulationname)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\114\x61\x6e\x64\x6d\x61\x72\x6b\x73\137\155\x6f\x64\145\x6c"); $ret = $this->Landmarks_model->get_LandmarksP4($simulationname); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Landmarks_get() { $landmarkname = trim(urldecode($this->get("\156\x61\x6d\145"))); $modality = trim(urldecode($this->get("\155\157\144\141\154\x69\164\171"))); if (empty($landmarkname) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\x50\141\x72\x61\155\x65\164\145\162\163\40\x61\162\145\x20\151\x6e\166\x61\154\x69\x64\40\x64\141\x74\x61\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\114\141\156\144\x6d\141\162\153\x73\137\x6d\157\144\x65\x6c"); $ret = $this->Landmarks_model->get_Landmarks($landmarkname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Landmarks_delete() { $landmarkname = trim(urldecode($this->get("\156\141\x6d\145"))); $modality = trim(urldecode($this->get("\155\157\144\141\x6c\151\x74\171"))); if (empty($landmarkname) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\120\x61\162\x61\155\x65\164\x65\x72\163\40\141\x72\145\x20\151\x6e\x76\141\154\x69\144\40\144\141\x74\x61\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x4c\x61\156\x64\155\141\x72\x6b\x73\137\x6d\x6f\144\x65\x6c"); $ret = $this->Landmarks_model->delete_Landmarks($landmarkname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Landmarks_post() { $sLandmarkInfoParameter = SLandmarkInfoParameter::constructWithParameter($this->post()); if (!isset($sLandmarkInfoParameter)) { vt_loge(__METHOD__ . "\72" . "\x50\141\162\141\x6d\x65\164\145\162\x73\x20\141\162\145\x20\x69\x6e\x76\141\x6c\x69\144\40\x64\x61\164\141\x3a\40" . json_encode($sLandmarkInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x4c\x61\x6e\144\155\141\162\x6b\x73\137\x6d\157\144\x65\154"); $ret = $this->Landmarks_model->post_Landmarks($sLandmarkInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Landmarks_put() { $sLandmarkInfoParameter = SLandmarkInfoParameter::constructWithParameter($this->put()); if (!isset($sLandmarkInfoParameter)) { vt_loge(__METHOD__ . "\72" . "\120\x61\x72\141\155\x65\164\x65\162\x73\x20\x61\162\145\40\x69\156\x76\x61\x6c\151\x64\40\x64\x61\164\141\x3a\x20" . json_encode($sLandmarkInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\114\141\156\x64\x6d\x61\162\x6b\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->Landmarks_model->put_Landmarks($sLandmarkInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function MeasurementsP2_get() { $modality = trim(urldecode($this->get("\x6d\x6f\144\x61\x6c\151\x74\171"))); $searchjson_param = strtolower(trim(urldecode($this->get("\x73\x65\x61\162\x63\150\152\163\157\156")))); if (empty($modality) || $searchjson_param !== "\x74\x72\165\145" && $searchjson_param !== "\x66\141\154\163\145") { vt_loge(__METHOD__ . "\72" . "\120\x61\x72\x61\155\x65\x74\145\x72\x73\x20\x61\x72\145\40\x69\156\166\141\x6c\151\x64\40\144\x61\x74\141\x3a\40" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $searchjson = filter_var($searchjson_param, FILTER_VALIDATE_BOOLEAN); $this->load->model("\115\145\141\163\x75\162\x65\x6d\145\x6e\x74\163\x5f\x6d\157\x64\x65\x6c"); $ret = $this->Measurements_model->get_MeasurementsP2($modality, $searchjson); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Measurements_get() { $measurementname = trim(urldecode($this->get("\156\x61\155\145"))); $modality = trim(urldecode($this->get("\155\157\x64\141\154\151\x74\x79"))); if (empty($measurementname) || empty($modality)) { vt_loge(__METHOD__ . "\x3a" . "\x50\x61\x72\141\x6d\x65\164\145\162\163\40\x61\x72\145\40\151\156\x76\x61\x6c\151\144\x20\144\141\x74\141\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x4d\145\x61\x73\165\x72\145\155\145\156\164\x73\137\x6d\157\x64\x65\x6c"); $ret = $this->Measurements_model->get_Measurements($measurementname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Measurements_delete() { $measurementname = trim(urldecode($this->get("\x6e\141\x6d\145"))); $modality = trim(urldecode($this->get("\155\x6f\144\x61\x6c\x69\164\x79"))); if (empty($measurementname) || empty($modality)) { vt_loge(__METHOD__ . "\72" . "\x50\141\x72\x61\x6d\x65\164\145\162\x73\40\x61\162\145\x20\151\156\166\x61\154\x69\x64\40\x64\141\164\x61\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x4d\x65\141\x73\x75\x72\145\155\x65\156\164\x73\137\155\157\x64\x65\x6c"); $ret = $this->Measurements_model->delete_Measurements($measurementname, $modality); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Measurements_post() { $sMeasurementInfoParameter = SMeasurementInfoParameter::constructWithParameter($this->post()); if (!isset($sMeasurementInfoParameter)) { vt_loge(__METHOD__ . "\72" . "\x50\141\x72\141\x6d\145\x74\145\162\x73\40\141\162\x65\x20\x69\x6e\166\x61\x6c\x69\x64\x20\x64\141\x74\141\x3a\40" . json_encode($sMeasurementInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\115\145\141\x73\x75\162\145\x6d\x65\x6e\x74\x73\137\x6d\157\144\x65\x6c"); $ret = $this->Measurements_model->post_Measurements($sMeasurementInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Measurements_put() { $sMeasurementInfoParameter = SMeasurementInfoParameter::constructWithParameter($this->put()); if (!isset($sMeasurementInfoParameter)) { vt_loge(__METHOD__ . "\x3a" . "\120\x61\162\x61\155\x65\x74\x65\x72\163\x20\x61\162\x65\x20\x69\x6e\166\141\x6c\151\x64\40\x64\x61\164\141\x3a\40" . json_encode($sMeasurementInfoParameter)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\115\145\141\x73\165\x72\x65\x6d\145\156\164\163\x5f\x6d\x6f\x64\145\154"); $ret = $this->Measurements_model->put_Measurements($sMeasurementInfoParameter); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function OrthoDataVersions_get() { $this->load->model("\117\x72\164\150\157\104\141\x74\x61\126\x65\x72\163\151\157\x6e\x73\x5f\155\x6f\x64\x65\x6c"); $ret = $this->OrthoDataVersions_model->get_OrthoDataVersions(); if ($ret["\145\x72\162\x6f\x72\103\x6f\144\145"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\145\162\x72\157\x72\103\157\144\145"] == VERR_DB_NOSUCHDATA) { vt_loge(__METHOD__ . "\x3a\40\x46\x61\151\154\145\144\40\x74\x6f\x20\x67\145\x74\40\x6f\162\x74\150\157\40\x64\141\164\141\x20\x76\145\162\x73\151\157\x6e\40\x2d\x20\x65\x72\162\x6f\162\103\x6f\x64\145\x3a\40" . VERR_DB_NOSUCHDATA); return $this->set_response($ret, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function OrthoDataVersions_put() { $this->load->model("\117\x72\164\150\x6f\104\x61\x74\x61\x56\145\x72\163\151\x6f\x6e\163\x5f\155\157\144\x65\x6c"); $ret = $this->OrthoDataVersions_model->put_OrthoDataVersions(); if ($ret["\145\x72\162\157\x72\x43\x6f\144\x65"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { if ($ret["\x65\x72\162\157\x72\103\x6f\x64\145"] == VERR_DB_NOSUCHDATA) { vt_loge(__METHOD__ . "\x3a\x20\106\x61\x69\154\x65\x64\x20\x74\157\x20\x6d\x69\147\x72\141\164\x65\144\40\157\x72\x74\150\x6f\x20\x64\141\164\x61\40\x76\x65\162\163\x69\x6f\x6e\x20\55\40\x65\162\162\x6f\162\x43\157\144\x65\x3a\40" . VERR_DB_NOSUCHDATA); return $this->set_response($ret, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } } public function PatientCharts_get() { $chartno = trim(urldecode($this->get("\143\150\141\x72\x74\x6e\157"))); if (empty($chartno)) { vt_loge(__METHOD__ . "\x3a" . "\124\x68\x65\40\160\141\162\141\x6d\x65\164\x65\162\40\151\x73\40\x69\156\x76\x61\x6c\x69\144\x20\x64\141\x74\141\72\x20" . $chartno); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\x61\x74\151\145\156\x74\x43\150\141\162\x74\163\137\x6d\157\x64\x65\x6c"); $ret = $this->PatientCharts_model->get_PatientCharts($chartno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientCharts_put() { $sPatientCharts = SPatientCharts::constructWithParameter($this->put()); if (!isset($sPatientCharts)) { vt_loge(__METHOD__ . "\72" . "\x54\150\145\x20\160\x61\162\141\155\145\164\145\x72\40\151\163\40\151\x6e\166\x61\154\151\144\40\x64\x61\164\x61\x20\72\40" . json_encode($this->put())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\x61\x74\x69\145\x6e\164\x43\150\141\162\x74\x73\137\155\157\x64\x65\x6c"); $ret = $this->PatientCharts_model->put_PatientCharts($sPatientCharts); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PatientChartsP2_put() { $sPatientCharts = SPatientCharts::constructWithParameter($this->put()); if (!isset($sPatientCharts)) { vt_loge(__METHOD__ . "\x3a" . "\124\x68\x65\x20\x70\x61\162\141\155\145\x74\x65\x72\40\151\163\40\x69\x6e\166\141\154\151\144\x20\x64\141\x74\x61\40\72\x20" . json_encode($this->put())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\141\x74\x69\145\x6e\x74\x43\x68\141\162\x74\x73\137\155\157\144\x65\154"); $ret = $this->PatientCharts_model->put_PatientChartsP2($sPatientCharts); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PracticeChairs_get() { $this->load->model("\120\162\x61\143\164\151\x63\145\103\150\141\151\x72\163\x5f\x6d\157\x64\145\154"); $ret = $this->PracticeChairs_model->get_PracticeChairs(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PracticeChairs_put() { $chairs = SPracticeChair::constructWithParameter($this->put()); if (count($chairs) === 0) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\x72\x61\x6d\x65\x74\x65\162\163\x20\x61\x72\x65\40\151\x6e\166\x61\154\x69\x64\x20\144\x61\164\x61\x3a\x20" . json_encode($chairs)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x50\x72\141\x63\164\151\143\x65\103\150\x61\151\x72\163\137\155\157\x64\x65\154"); $ret = $this->PracticeChairs_model->put_PracticeChairs($chairs); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PracticeChairsP2_get() { $starttimestamp = trim(urldecode($this->get("\x73\164\x61\x72\164\164\x69\x6d\145\x73\164\x61\155\160"))); $endtimestamp = trim(urldecode($this->get("\145\x6e\144\x74\x69\x6d\145\163\164\141\155\x70"))); if (empty($starttimestamp) || empty($endtimestamp)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\x72\141\155\x65\x74\x65\162\163\40\x61\162\145\40\x69\x6e\166\141\154\151\144\40\x64\x61\164\141\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\x72\141\143\x74\x69\143\x65\103\x68\x61\x69\x72\163\137\x6d\157\x64\x65\154"); $ret = $this->PracticeChairs_model->get_PracticeChairsP2($starttimestamp, $endtimestamp); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PracticeHours_get() { $this->load->model("\x50\x72\141\143\x74\x69\143\145\x48\x6f\x75\x72\x73\x5f\x6d\x6f\x64\x65\154"); $ret = $this->PracticeHours_model->get_PracticeHours(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function PracticeHours_put() { $sPractieHours = SPractieHours::constructWithParameter($this->put()); if (!isset($sPractieHours)) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\162\x61\155\x65\x74\145\162\163\40\141\162\x65\40\x69\156\x76\x61\x6c\x69\x64\40\144\x61\164\x61\72\x20" . json_encode($sPractieHours)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\120\162\x61\x63\x74\x69\x63\145\110\x6f\165\x72\163\137\x6d\x6f\x64\x65\154"); $ret = $this->PracticeHours_model->put_PracticeHours($sPractieHours); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Practices_get() { $this->load->model("\120\x72\141\143\x74\x69\143\145\163\137\155\x6f\144\145\x6c"); $ret = $this->Practices_model->get_Practices(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Practices_put() { $sPracticeInfo = SPracticeInfo::constructWithParameter($this->put("\x70\x72\x61\143\164\151\x63\145")); if (!isset($sPracticeInfo)) { vt_loge(__METHOD__ . "\x3a" . "\120\x61\162\141\155\145\164\x65\162\163\40\x61\162\145\40\151\156\166\141\x6c\x69\144\40\x64\x61\164\141\72\40" . json_encode($sPracticeInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x50\x72\141\x63\x74\151\143\145\x73\x5f\155\x6f\144\145\154"); $ret = $this->Practices_model->put_Practices($sPracticeInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function ProfilogramNormalData_get() { $this->load->model("\x50\x72\x6f\x66\x69\x6c\x6f\x67\162\x61\x6d\116\157\162\x6d\141\154\x44\x61\164\x61\137\155\x6f\x64\145\154"); $data = $this->ProfilogramNormalData_model->get_ProfilogramNormalData($this->get()); $this->set_response($data, REST_Controller::HTTP_OK); } public function Races_get() { $this->load->model("\122\x61\x63\145\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->Races_model->get_Races(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Races_post() { $parameters = $this->post(); if (!isset($parameters["\156\141\155\145"]) || empty(trim($parameters["\x6e\x61\x6d\x65"]))) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\x65\40\160\141\x72\x61\x6d\145\x74\x65\162\x20\151\163\x20\x69\156\166\x61\154\x69\x64\x20\144\x61\x74\x61\x3a\40" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $racename = trim($parameters["\156\141\x6d\145"]); $label = trim($parameters["\x6c\141\142\145\154"]); if (empty($label)) { $label = $racename; } $userAdded = filter_var($parameters["\x75\163\145\162\x41\x64\x64\145\144"], FILTER_VALIDATE_BOOLEAN); $this->load->model("\122\x61\143\x65\163\137\155\x6f\144\145\x6c"); $ret = $this->Races_model->post_Races($racename, $label, $userAdded); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Races_put() { $parameters = $this->put(); if (!isset($parameters["\156\x61\155\145"]) || empty(trim($parameters["\156\x61\x6d\x65"])) || !isset($parameters["\154\x61\x62\145\154"]) || empty(trim($parameters["\x6c\141\142\145\154"]))) { vt_loge(__METHOD__ . "\72" . "\x50\x61\x72\141\155\x65\164\x65\x72\x73\40\141\x72\x65\x20\151\x6e\x76\141\154\151\144\x20\x64\x61\x74\141\x3a\x20" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $racename = trim($parameters["\156\x61\x6d\145"]); $label = trim($parameters["\x6c\x61\x62\145\x6c"]); $this->load->model("\122\141\x63\145\x73\137\155\157\144\145\x6c"); $ret = $this->Races_model->put_Races($racename, $label); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Races_delete() { $racename = trim(urldecode($this->get("\156\141\x6d\145"))); if (empty($racename)) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\145\40\x70\x61\162\x61\155\x65\164\x65\162\40\x69\163\x20\151\x6e\166\141\x6c\151\144\40\144\141\164\141\72\40" . $racename); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x52\x61\143\145\x73\137\155\x6f\144\x65\154"); $ret = $this->Races_model->delete_Races($racename); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetImages_post() { $sRecordsetImageParameterInfo = SRecordsetImageParameterInfo::constructWithPostParameter($this->post()); if (!isset($sRecordsetImageParameterInfo)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\x61\x6d\x65\x74\145\162\163\40\141\x72\145\40\151\x6e\x76\141\x6c\151\x64\40\144\x61\164\141\x3a\40" . json_decode($sRecordsetImageParameterInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x52\x65\x63\x6f\162\144\163\x65\x74\x49\x6d\x61\147\145\x73\x5f\x6d\x6f\x64\145\x6c"); $ret = $this->RecordsetImages_model->post_RecordsetImages($sRecordsetImageParameterInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetImages_put() { $sRecordsetImageParameterInfo = SRecordsetImageParameterInfo::constructWithPutParameter($this->put()); if (!isset($sRecordsetImageParameterInfo)) { vt_loge(__METHOD__ . "\72" . "\120\x61\x72\141\x6d\x65\164\x65\162\163\40\x61\162\145\40\151\156\x76\x61\154\x69\x64\x20\144\141\164\x61\72\x20" . json_decode($sRecordsetImageParameterInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x52\x65\143\157\x72\144\163\145\x74\111\x6d\x61\x67\x65\x73\x5f\155\157\144\x65\x6c"); $ret = $this->RecordsetImages_model->put_RecordsetImages($sRecordsetImageParameterInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetImages_delete() { $chartno = trim(urldecode($this->get("\143\150\141\162\x74\x6e\157"))); $createddate = trim($this->get("\143\162\x65\x61\x74\x65\x64\x64\141\164\x65")); $seqno = trim(urldecode($this->get("\163\145\x71\156\157"))); $filename = trim(urldecode($this->get("\146\151\x6c\145\156\x61\x6d\145"))); if (empty($chartno) || empty($createddate) || empty($seqno) || empty($filename)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\x72\141\x6d\145\x74\x65\x72\163\40\141\162\x65\40\x69\156\x76\x61\154\151\144\40\x64\141\x74\x61\x3a\40" . json_decode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\122\145\x63\157\162\x64\x73\x65\x74\x49\x6d\141\147\145\163\x5f\155\157\x64\145\x6c"); $ret = $this->RecordsetImages_model->delete_RecordsetImages($chartno, $createddate, $seqno, $filename); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetImages_get() { $chartno = trim(urldecode($this->get("\143\150\x61\x72\x74\x6e\157"))); $createddate = trim($this->get("\143\162\145\x61\x74\145\144\x64\141\164\x65")); $seqno = trim(urldecode($this->get("\x73\x65\161\156\x6f"))); if (empty($chartno) || empty($createddate) || empty($seqno)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\141\x6d\x65\x74\145\162\x73\40\x61\162\145\40\151\x6e\166\x61\154\151\144\40\144\x61\164\141\72\x20" . json_decode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\122\x65\x63\x6f\162\x64\163\x65\164\111\x6d\141\147\145\x73\x5f\155\x6f\144\145\154"); $ret = $this->RecordsetImages_model->get_RecordsetImages($chartno, $createddate, $seqno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Recordsets_get() { $chartno = trim(urldecode($this->get("\x63\x68\x61\x72\x74\156\x6f"))); if (empty($chartno)) { vt_loge(__METHOD__ . "\x3a" . "\124\x68\145\x20\x70\x61\162\141\x6d\145\x74\145\162\x20\x69\x73\40\x69\156\166\141\x6c\151\144\40\144\141\x74\x61\72\x20" . $chartno); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x52\145\143\x6f\162\144\x73\145\164\x73\x5f\x6d\157\x64\145\154"); $ret = $this->Recordsets_model->get_Recordsets($chartno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Recordsets_post() { $sRecordsetParameterInfo = SRecordsetParameterInfo::constructWithPostParameter($this->post()); if (!isset($sRecordsetParameterInfo)) { vt_loge(__METHOD__ . "\72" . "\120\141\162\141\x6d\x65\x74\145\x72\163\40\x61\162\x65\x20\151\156\x76\x61\x6c\x69\x64\40\144\141\x74\x61\x3a\40" . json_decode($sRecordsetParameterInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\122\x65\143\157\x72\144\x73\145\164\x73\x5f\155\x6f\144\145\154"); $ret = $this->Recordsets_model->post_Recordsets($sRecordsetParameterInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Recordsets_put() { $sRecordsetParameterInfo = SRecordsetParameterInfo::constructWithPutParameter($this->put()); if (!isset($sRecordsetParameterInfo)) { vt_loge(__METHOD__ . "\72" . "\120\x61\x72\x61\x6d\145\164\145\162\x73\x20\x61\x72\145\40\151\x6e\166\x61\154\x69\144\x20\144\x61\x74\x61\72\40" . json_decode($sRecordsetParameterInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\122\x65\143\x6f\162\144\163\145\x74\163\137\x6d\x6f\x64\145\154"); $ret = $this->Recordsets_model->put_Recordsets($sRecordsetParameterInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Recordsets_delete() { $chartno = trim(urldecode($this->get("\x63\150\141\x72\164\x6e\x6f"))); $createddate = trim($this->get("\143\162\x65\141\x74\145\144\x64\141\x74\145")); $seqno = trim(urldecode($this->get("\163\145\x71\156\157"))); if (empty($chartno) || empty($createddate) || empty($seqno)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\x72\141\x6d\145\x74\x65\162\x73\x20\141\162\x65\x20\151\x6e\166\141\x6c\151\x64\x20\144\141\164\x61\x3a\40" . json_decode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\122\x65\143\x6f\162\x64\x73\x65\164\x73\137\155\x6f\x64\x65\154"); $ret = $this->Recordsets_model->delete_Recordsets($chartno, $createddate, $seqno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function SuperimpositionsP2_get() { $this->load->model("\123\165\160\145\162\x69\155\160\157\x73\151\164\x69\157\156\163\x5f\155\157\x64\145\x6c"); $ret = $this->Superimpositions_model->get_SuperimpositionsP2(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Superimpositions_post() { $sSuperimpositionInfo = SSuperimpositionInfo::constructWithParameter($this->post()); if (!isset($sSuperimpositionInfo)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\x72\141\155\x65\164\145\162\163\40\x61\x72\145\x20\x69\x6e\x76\141\x6c\151\x64\40\144\x61\x74\141\72\40" . json_decode($sSuperimpositionInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x75\160\x65\162\151\155\160\157\x73\x69\x74\151\x6f\156\x73\137\x6d\x6f\x64\x65\154"); $ret = $this->Superimpositions_model->post_Superimpositions($sSuperimpositionInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Superimpositions_put() { $sSuperimpositionInfo = SSuperimpositionInfo::constructWithParameter($this->put()); if (!isset($sSuperimpositionInfo)) { vt_loge(__METHOD__ . "\72" . "\120\141\x72\x61\155\145\164\145\x72\163\40\141\x72\x65\x20\x69\156\166\141\x6c\x69\x64\x20\144\141\164\141\x3a\x20" . json_decode($sSuperimpositionInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x53\165\x70\145\x72\151\155\160\157\163\x69\164\x69\x6f\156\x73\x5f\155\157\x64\145\154"); $ret = $this->Superimpositions_model->put_Superimpositions($sSuperimpositionInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Superimpositions_get() { $superimpositionname = trim(urldecode($this->get("\156\x61\x6d\145"))); if (empty($superimpositionname)) { vt_loge(__METHOD__ . "\72" . "\x54\x68\145\x20\160\141\162\141\155\x65\x74\x65\162\40\x69\x73\x20\x69\156\x76\141\x6c\151\x64\x20\x64\x61\x74\141\x3a\x20" . $superimpositionname); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x75\160\145\162\151\x6d\x70\157\163\x69\x74\151\157\x6e\x73\x5f\x6d\157\x64\145\x6c"); $ret = $this->Superimpositions_model->get_Superimpositions($superimpositionname); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Superimpositions_delete() { $superimpositionname = trim(urldecode($this->get("\x6e\141\155\145"))); if (empty($superimpositionname)) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\x65\40\160\x61\x72\141\x6d\x65\x74\145\x72\40\x69\163\x20\151\156\x76\x61\x6c\151\x64\40\x64\x61\164\141\72\x20" . $superimpositionname); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x75\160\145\x72\151\x6d\160\157\163\151\164\x69\157\x6e\163\137\155\157\x64\x65\x6c"); $ret = $this->Superimpositions_model->delete_Superimpositions($superimpositionname); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Schedules_get() { $starttimestamp = trim(urldecode($this->get("\163\x74\141\162\x74\x74\151\155\145\163\164\x61\x6d\x70"))); $endtimestamp = trim(urldecode($this->get("\145\x6e\x64\164\151\x6d\145\163\164\x61\x6d\x70"))); if (empty($starttimestamp) || empty($endtimestamp)) { vt_loge(__METHOD__ . "\72" . "\120\141\x72\141\155\145\x74\x65\x72\163\x20\x61\162\x65\40\x69\x6e\x76\141\x6c\151\x64\x20\144\141\164\x61\72\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x53\143\150\x65\x64\x75\x6c\145\x73\137\x6d\157\x64\145\x6c"); $ret = $this->Schedules_model->get_Schedules($starttimestamp, $endtimestamp); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function SchedulesR2_get() { $starttimestamp = trim(urldecode($this->get("\x73\x74\141\x72\x74\x74\x69\155\145\x73\x74\141\155\x70"))); $endtimestamp = trim(urldecode($this->get("\145\156\x64\164\x69\x6d\145\163\x74\x61\155\160"))); if (empty($starttimestamp) || empty($endtimestamp)) { vt_loge(__METHOD__ . "\x3a" . "\120\141\x72\141\x6d\145\164\x65\162\163\40\141\162\x65\x20\151\x6e\166\x61\154\x69\x64\40\144\x61\x74\141\72\40" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x63\150\145\x64\165\x6c\145\x73\137\155\x6f\x64\145\x6c"); $ret = $this->Schedules_model->get_SchedulesR2($starttimestamp, $endtimestamp); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Schedules_post() { $sScheduleInfo = SScheduleInfo::constructWithParameter($this->post("\x73\143\x68\x65\144\x75\154\145")); if (!isset($sScheduleInfo)) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\x72\141\155\145\x74\x65\162\x73\40\x61\162\145\x20\x69\156\x76\x61\154\151\144\40\144\141\164\141\72\x20" . json_encode($sScheduleInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x63\x68\x65\x64\x75\x6c\x65\163\137\x6d\157\x64\145\x6c"); $ret = $this->Schedules_model->post_Schedules($sScheduleInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function SchedulesR2_post() { $sScheduleInfo = SScheduleInfo::constructWithParameter($this->post("\163\143\x68\x65\144\x75\x6c\145")); if (!isset($sScheduleInfo)) { vt_loge(__METHOD__ . "\72" . "\120\x61\162\141\155\145\164\145\162\x73\x20\x61\x72\x65\x20\x69\156\x76\x61\x6c\151\x64\40\x64\141\164\141\72\40" . json_encode($sScheduleInfo)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x53\143\150\145\144\165\x6c\145\x73\137\x6d\157\144\145\154"); $ret = $this->Schedules_model->post_SchedulesR2($sScheduleInfo); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Schedules_put() { $oldSchedule = SScheduleInfo::constructWithParameter($this->put("\x6f\x6c\144\123\143\x68\x65\144\x75\x6c\x65")); $newSchedule = SScheduleInfo::constructWithParameter($this->put("\156\x65\x77\x53\x63\150\x65\x64\x75\x6c\145")); if (!isset($oldSchedule) || !isset($newSchedule)) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\x72\x61\x6d\x65\x74\x65\x72\x73\40\x61\x72\x65\x20\x69\156\166\141\154\151\144\40\x64\141\x74\141\72\x20" . json_encode($this->put())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\143\150\x65\x64\165\x6c\145\163\137\x6d\157\144\x65\154"); $ret = $this->Schedules_model->put_Schedules($oldSchedule, $newSchedule); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function SchedulesR2_put() { (string) ($oldScheduleId = $this->put("\x6f\154\144\123\x63\x68\x65\144\x75\154\x65\x49\x64")); $newSchedule = SScheduleInfo::constructWithParameter($this->put("\156\x65\x77\x53\143\150\145\144\x75\154\145")); if (!isset($oldScheduleId) || !isset($newSchedule)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\141\155\145\164\145\162\163\40\x61\162\145\x20\151\x6e\166\x61\x6c\151\144\x20\x64\x61\x74\141\x3a\x20" . json_encode($this->put())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\143\x68\145\144\x75\154\x65\163\x5f\155\157\x64\145\154"); $ret = $this->Schedules_model->put_SchedulesR2($oldScheduleId, $newSchedule); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Schedules_delete() { $doctor = trim(urldecode($this->get("\144\157\143\164\x6f\x72"))); $starttimestamp = trim(urldecode($this->get("\x73\x74\141\162\164\x74\x69\x6d\x65\163\x74\141\155\x70"))); $endtimestamp = trim(urldecode($this->get("\x65\x6e\144\x74\x69\155\145\163\x74\141\x6d\160"))); $chartno = trim(urldecode($this->get("\143\150\x61\162\164\x6e\x6f"))); if (empty($doctor)) { vt_loge(__METHOD__ . "\72" . "\x64\x6f\x63\164\x6f\162\40\151\x73\40\x65\x6d\x74\x70\x79\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (empty($starttimestamp)) { vt_loge(__METHOD__ . "\x3a" . "\x73\x74\x61\x72\164\x74\151\155\145\x73\x74\141\x6d\160\40\151\163\40\145\x6d\164\160\x79\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (empty($endtimestamp)) { vt_loge(__METHOD__ . "\x3a" . "\145\x6e\x64\164\x69\x6d\x65\163\x74\x61\x6d\x70\x20\151\x73\40\145\155\164\x70\x79\x2e"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (empty($chartno)) { vt_loge(__METHOD__ . "\x3a" . "\x63\x68\x61\162\x74\x6e\157\40\151\163\40\145\x6d\164\x70\171\56"); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x53\x63\150\x65\x64\165\154\x65\163\x5f\155\x6f\144\x65\x6c"); $ret = $this->Schedules_model->delete_Schedules($doctor, $starttimestamp, $endtimestamp, $chartno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function SchedulesR2_delete() { $id = trim(urldecode($this->get("\x69\144"))); $this->load->model("\123\x63\150\x65\x64\165\154\145\163\x5f\155\x6f\144\x65\154"); $ret = $this->Schedules_model->delete_SchedulesR2($id); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function StandardData_post() { $parameters = $this->post(); if (!isset($parameters["\x72\x61\143\145\x4e\141\x6d\x65"]) || !isset($parameters["\163\x74\x61\156\x64\141\x72\144\104\141\164\x61"]) || empty(trim($parameters["\162\x61\x63\145\116\141\x6d\145"])) || count($parameters["\x73\x74\x61\x6e\144\x61\x72\144\x44\x61\164\x61"]) == 0) { vt_loge(__METHOD__ . "\72" . "\120\x61\162\x61\155\x65\164\x65\162\x73\40\141\162\145\40\151\x6e\166\141\x6c\151\x64\x20\x64\141\164\141\x3a\x20" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $standardDataItems = array(); foreach ($parameters["\163\164\141\156\144\141\162\x64\104\x61\x74\141"] as $data) { $standardData = SStandardDataItem::constructWithParameter($data); if (!isset($standardData)) { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } array_push($standardDataItems, $standardData); } $this->load->model("\123\x74\141\x6e\x64\141\x72\144\104\x61\164\141\x5f\x6d\x6f\x64\x65\x6c"); $ret = $this->StandardData_model->post_StandardData(trim($parameters["\x72\141\143\x65\x4e\x61\155\x65"]), $standardDataItems); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function StandardDataCopyByRace_post() { $parameters = $this->post(); if (!isset($parameters["\x73\157\x75\x72\143\145\122\141\143\x65\x4e\x61\x6d\145"]) || !isset($parameters["\x74\x61\x72\147\145\164\122\x61\143\145\116\x61\155\145"]) || empty(trim($parameters["\x73\157\165\162\143\145\122\141\143\145\x4e\141\155\x65"])) || empty($parameters["\164\x61\x72\147\x65\164\x52\x61\143\x65\x4e\x61\x6d\145"])) { vt_loge(__METHOD__ . "\x3a" . "\x50\x61\162\x61\x6d\145\x74\145\x72\163\40\141\162\145\40\151\156\x76\141\x6c\151\144\40\144\x61\x74\141\x3a\40" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\123\x74\141\156\x64\141\162\x64\104\141\164\x61\137\155\x6f\144\x65\154"); $ret = $this->StandardData_model->post_StandardDataCopyByRace($parameters["\163\x6f\x75\162\x63\145\122\141\143\145\116\x61\x6d\145"], $parameters["\164\x61\162\x67\145\x74\122\x61\143\145\x4e\x61\155\x65"]); if ($ret["\x65\162\x72\x6f\x72\x43\x6f\144\145"] == VERR_COMMON_SUCCESS) { return $this->set_response($ret, REST_Controller::HTTP_OK); } else { return $this->set_response($ret, REST_Controller::HTTP_BAD_REQUEST); } } public function TreatmentCategories_get() { $this->load->model("\124\162\145\141\x74\x6d\x65\156\x74\x43\141\164\x65\x67\x6f\162\x69\145\x73\x5f\x6d\157\144\145\154"); $ret = $this->TreatmentCategories_model->get_TreatmentCategories(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function TreatmentCategories_put() { $sCategoryArray = STreatmentCategory::constructWithParameter($this->put("\x63\x61\x74\x65\147\x6f\162\x69\145\163")); if (!isset($sCategoryArray) && count($sCategoryArray) > 0) { vt_loge(__METHOD__ . "\72" . "\120\141\162\x61\x6d\x65\164\x65\x72\163\x20\141\x72\145\40\151\x6e\166\141\154\151\144\x20\x64\x61\164\141\x3a\40" . json_encode($sCategoryArray)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x54\x72\x65\x61\x74\155\x65\156\164\103\141\x74\145\x67\157\x72\151\145\163\x5f\x6d\157\x64\145\154"); $ret = $this->TreatmentCategories_model->put_TreatmentCategories($sCategoryArray); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOControlPoints_get() { $this->load->model("\x56\x54\x4f\123\124\x4f\x43\157\x6e\x74\162\157\x6c\x50\x6f\x69\156\164\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->VTOSTOControlPoints_model->get_VTOSTOControlPoints(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOData_get() { $chartno = trim(urldecode($this->get("\143\150\141\x72\x74\156\157"))); $createddate = trim($this->get("\x63\162\145\x61\x74\145\144\x64\x61\x74\145")); $seqno = trim(urldecode($this->get("\x73\145\x71\156\157"))); if (empty($chartno) || empty($createddate) || empty($seqno)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\141\x6d\145\x74\x65\x72\163\x20\x61\162\145\40\x69\x6e\166\x61\x6c\x69\x64\40\x64\x61\x74\x61\x3a\x20" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\126\x54\117\123\x54\x4f\104\141\164\x61\x5f\x6d\157\144\x65\x6c"); $ret = $this->VTOSTOData_model->get_VTOSTOData($chartno, $createddate, $seqno); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOData_post() { $sVTOSTOData = SVTOSTOData::constructWithPostParameter($this->post()); if (!isset($sVTOSTOData)) { vt_loge(__METHOD__ . "\72" . "\x50\141\162\x61\x6d\x65\164\145\162\163\x20\141\x72\x65\x20\x69\156\166\141\x6c\x69\144\40\144\x61\164\x61\72\x20" . json_encode($sVTOSTOData)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\126\124\x4f\x53\x54\x4f\x44\141\x74\141\x5f\155\157\144\145\154"); $ret = $this->VTOSTOData_model->post_VTOSTOData($sVTOSTOData); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOData_put() { $sVTOSTOData = SVTOSTOData::constructWithPutParameter($this->put()); if (!isset($sVTOSTOData)) { vt_loge(__METHOD__ . "\x3a" . "\x50\x61\x72\141\155\145\164\145\x72\x73\40\x61\162\x65\x20\x69\156\x76\141\x6c\151\144\x20\144\141\x74\x61\72\x20" . json_encode($sVTOSTOData)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\126\124\x4f\123\124\117\104\141\164\141\137\x6d\157\x64\145\x6c"); $ret = $this->VTOSTOData_model->put_VTOSTOData($sVTOSTOData); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOData_delete() { $chartno = trim(urldecode($this->get("\143\150\141\x72\x74\x6e\157"))); $createddate = trim($this->get("\143\162\145\x61\164\145\x64\144\141\164\145")); $seqno = trim(urldecode($this->get("\163\145\161\x6e\157"))); $dataname = trim(urldecode($this->get("\144\141\x74\x61\156\x61\x6d\x65"))); if (empty($chartno) || empty($createddate) || empty($seqno) || empty($dataname)) { vt_loge(__METHOD__ . "\72" . "\120\141\x72\141\x6d\x65\x74\x65\x72\163\40\x61\162\145\x20\151\x6e\x76\x61\x6c\x69\144\40\x64\141\x74\141\x3a\40" . json_encode($this->get())); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $this->load->model("\x56\x54\117\x53\124\117\104\141\164\141\x5f\x6d\x6f\144\x65\x6c"); $ret = $this->VTOSTOData_model->delete_VTOSTOData($chartno, $createddate, $seqno, $dataname); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOSettings_get() { $this->load->model("\126\x54\117\123\x54\117\123\x65\164\164\x69\156\x67\x73\137\x6d\x6f\x64\x65\x6c"); $ret = $this->VTOSTOSettings_model->get_VTOSTOSettings(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function VTOSTOSettings_put() { $parameters = $this->put(); if (!isset($parameters["\x63\x6c\141\163\163\x4e\x61\155\145"]) || !isset($parameters["\x6c\x61\156\x64\x6d\141\162\153\116\141\155\x65"]) || !isset($parameters["\163\157\x66\164\x54\151\x73\x73\165\145\x4c\141\x6e\144\x6d\141\162\x6b\x4d\157\x76\145\x6d\x65\x6e\x74\x73"]) || empty(trim($parameters["\143\154\x61\x73\163\x4e\141\x6d\145"])) || empty(trim($parameters["\x6c\x61\156\x64\x6d\x61\162\x6b\x4e\x61\x6d\x65"])) || count($parameters["\163\x6f\146\164\124\151\163\163\165\145\x4c\141\x6e\144\155\141\x72\153\x4d\x6f\166\x65\x6d\145\156\164\x73"]) == 0) { vt_loge(__METHOD__ . "\x3a" . "\x50\x61\162\141\x6d\x65\x74\x65\162\x73\x20\x61\162\145\x20\151\156\166\x61\154\151\144\x20\x64\x61\164\x61\x2e" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } if (isset($parameters["\x72\x61\x63\x65\116\x61\155\x65"])) { $raceName = trim($parameters["\162\x61\x63\x65\116\x61\x6d\x65"]); } $className = trim($parameters["\x63\154\141\x73\x73\116\x61\x6d\145"]); $landmarkName = trim($parameters["\x6c\141\x6e\x64\x6d\141\x72\x6b\116\141\155\145"]); $softTissueLandmarkMovements = $parameters["\163\x6f\146\164\x54\151\x73\163\x75\145\x4c\x61\x6e\144\x6d\141\x72\153\115\157\166\145\x6d\x65\156\x74\163"]; $this->load->model("\x56\x54\x4f\123\x54\117\123\145\x74\164\151\x6e\x67\x73\x5f\155\x6f\144\x65\x6c"); $ret = $this->VTOSTOSettings_model->put_VTOSTOSettings($raceName, $className, $landmarkName, $softTissueLandmarkMovements); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function Classifications_get() { $this->load->model("\103\x6c\x61\163\163\x69\146\x69\x63\141\x74\x69\x6f\x6e\x73\x5f\x6d\157\144\145\x6c"); $ret = $this->Classifications_model->get_Classifications(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetStages_get() { $this->load->model("\x52\x65\x63\157\x72\144\163\x65\x74\123\164\141\x67\x65\163\137\155\157\x64\x65\x6c"); $ret = $this->RecordsetStages_model->get_RecordsetStages(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetModalities_get() { $this->load->model("\x52\x65\x63\x6f\162\x64\163\145\164\x4d\157\144\141\154\x69\x74\151\x65\163\137\x6d\x6f\x64\145\154"); $ret = $this->RecordsetModalities_model->get_RecordsetModalities(); return $this->set_response($ret, REST_Controller::HTTP_OK); } public function RecordsetModalitiesP2_get() { $this->load->model("\122\x65\x63\157\x72\144\x73\x65\x74\115\157\x64\x61\154\x69\x74\x69\145\163\x5f\155\x6f\144\145\x6c"); $ret = $this->RecordsetModalities_model->get_RecordsetModalitiesP2(); return $this->set_response($ret, REST_Controller::HTTP_OK); } } diff --git a/server/original/www/ezwebserver/src/application/controllers/v1/Settings.php b/server/original/www/ezwebserver/src/application/controllers/v1/Settings.php index 891bb27..7ad4c14 100644 --- a/server/original/www/ezwebserver/src/application/controllers/v1/Settings.php +++ b/server/original/www/ezwebserver/src/application/controllers/v1/Settings.php @@ -1,7 +1,7 @@ Settings_model->get_fileServerSettings(); if ($ret === VERR_INI_INVALID_PATH) { return $this->set_response(["\145\x72\x72\157\162\103\157\144\x65" => VERR_INI_INVALID_PATH, "\106\151\x6c\x65\123\x65\162\166\145\162\123\145\164\164\151\x6e\x67\163" => array()], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret === VERR_INI_INVALID_SECTION) { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\x64\145" => VERR_INI_INVALID_SECTION, "\x46\x69\x6c\x65\x53\145\x72\x76\x65\x72\123\x65\164\164\151\156\x67\163" => array()], REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\145\x72\x72\157\x72\x43\157\x64\x65" => VERR_COMMON_INVALID, "\x46\x69\154\145\x53\x65\x72\166\x65\x72\123\x65\x74\x74\151\x6e\147\x73" => array()], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\145\x72\162\157\x72\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\106\151\154\x65\x53\145\162\x76\x65\x72\x53\x65\164\x74\151\156\x67\163" => $ret], REST_Controller::HTTP_OK); } } public function fileServerSettings_post() { $parameters = $this->post(); $settingValueList = $parameters["\x73\x65\164\164\151\x6e\147\126\x61\154\165\145\114\x69\163\x74"]; if (!isset($settingValueList[0]["\x73\145\x63\x74\151\x6f\x6e"])) { vt_loge(__METHOD__ . "\x3a" . "\120\141\162\141\x6d\145\x74\145\162\163\x20\141\162\145\x20\x69\156\166\x61\154\x69\144\40\x64\141\164\x61\x3a\40" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $token = $parameters["\x63\163\x72\x66\x5f\x74\x6f\153\x65\x6e"]; if ($token != $_SESSION["\163\x65\x74\164\151\x6e\x67\137\x63\x73\162\146\x5f\x74\x6f\153\x65\x6e"]) { return $this->set_response(["\x65\x72\162\157\x72\103\157\144\x65" => VERR_COMMON_INVALID, "\104\x42\123\145\x72\x76\x65\162\123\x65\x74\164\151\x6e\147\163" => array()], REST_Controller::HTTP_OK); } $ret = $this->Settings_model->post_fileServerSettings($settingValueList); if ($ret === VERR_INI_INVALID_PATH) { return $this->set_response(["\x65\x72\x72\x6f\x72\x43\x6f\x64\145" => VERR_INI_INVALID_PATH, "\104\x42\x53\145\x72\166\145\162\x53\x65\x74\164\x69\x6e\147\x73" => array()], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret === VERR_INI_INVALID_SECTION) { return $this->set_response(["\x65\162\162\x6f\162\x43\x6f\x64\x65" => VERR_INI_INVALID_SECTION, "\104\x42\123\145\162\166\145\162\123\145\164\x74\x69\x6e\147\x73" => array()], REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\x65\162\162\x6f\162\x43\157\144\145" => VERR_COMMON_INVALID, "\x44\102\123\145\x72\x76\x65\162\123\145\x74\x74\x69\156\147\x73" => array()], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\145\x72\162\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x44\102\123\145\x72\166\145\x72\x53\145\164\164\151\156\147\x73" => $ret], REST_Controller::HTTP_OK); } } public function FileServerSettings_put() { $paramsPutFileServerSettings = $this->put("\160\141\x72\x61\155\x73\x50\x75\164\x46\x69\x6c\x65\x53\x65\162\166\145\x72\123\145\164\164\151\x6e\x67\163"); $data = $this->Settings_model->put_FileServerSettings($this->put()); if ($data === VERR_COMMON_SUCCESS) { return $this->set_response(["\145\x72\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_SUCCESS], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\x65" => VERR_COMMON_IO, "\145\x72\x72\x6f\162\111\156\120\x61\164\150\163" => $data], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } public function DirsForAccessible_post() { $data = $this->Settings_model->post_DirsForAccessible($this->post()); return $this->set_response(["\x65\x72\162\x6f\x72\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\x64\151\x72\x73" => $data], REST_Controller::HTTP_OK); } public function dbServerSettings_get() { $ret = $this->Settings_model->get_dbServerSettings(); if ($ret === VERR_INI_INVALID_PATH) { return $this->set_response(["\x65\162\x72\157\162\x43\157\x64\x65" => VERR_INI_INVALID_PATH, "\104\x42\123\145\162\166\145\x72\123\145\164\x74\x69\156\x67\163" => array()], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret === VERR_INI_INVALID_SECTION) { return $this->set_response(["\x65\x72\x72\157\x72\x43\157\144\145" => VERR_INI_INVALID_SECTION, "\x44\102\x53\145\162\166\145\x72\123\145\x74\164\x69\156\x67\163" => array()], REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\145\162\162\x6f\162\103\157\144\145" => VERR_COMMON_INVALID, "\x44\102\x53\x65\x72\x76\145\162\x53\x65\x74\164\151\x6e\147\163" => array()], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\x65" => VERR_COMMON_SUCCESS, "\104\102\123\145\162\x76\x65\162\123\145\164\x74\x69\x6e\147\x73" => $ret], REST_Controller::HTTP_OK); } } public function saveToken_post() { $token = md5(uniqid()); $this->session->set_userdata("\x73\145\164\164\151\156\147\x5f\143\163\x72\x66\x5f\x74\x6f\153\145\156", $token); return $this->set_response(["\164\157\153\145\x6e" => $token], REST_Controller::HTTP_OK); } public function dbServerSettings_post() { $token = $this->post("\143\x73\162\146\x5f\x74\157\x6b\145\156"); if ($token != $_SESSION["\x73\145\x74\x74\x69\156\147\x5f\143\x73\x72\146\x5f\x74\157\153\145\x6e"]) { vt_loge(sprintf("\x25\x73\x3a\x20\x69\x6e\x76\x61\154\x69\x64\x20\x63\x73\x72\x66\40\x74\x6f\153\145\x6e", __METHOD__)); return $this->set_response(["\145\x72\x72\157\162\103\157\x64\145" => VERR_COMMON_INVALID, "\x44\102\123\145\x72\x76\145\x72\123\145\x74\164\151\156\x67\163" => array()], REST_Controller::HTTP_BAD_REQUEST); } $ret = $this->Settings_model->post_dbServerSettings($this->post()); if ($ret === VERR_INI_INVALID_PATH) { return $this->set_response(["\145\x72\x72\x6f\162\x43\x6f\144\145" => VERR_INI_INVALID_PATH, "\x44\x42\x53\145\x72\166\x65\162\123\145\164\x74\x69\x6e\x67\x73" => array()], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret === VERR_INI_INVALID_SECTION) { return $this->set_response(["\x65\x72\162\x6f\x72\x43\x6f\x64\145" => VERR_INI_INVALID_SECTION, "\104\102\x53\x65\x72\166\x65\x72\123\145\x74\x74\x69\156\x67\163" => array()], REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\145\162\162\157\x72\103\157\x64\145" => VERR_COMMON_INVALID, "\x44\x42\x53\x65\x72\x76\145\162\123\x65\164\164\151\x6e\x67\x73" => array()], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\145\x72\x72\157\x72\103\157\x64\x65" => VERR_COMMON_SUCCESS, "\x44\x42\123\145\x72\x76\x65\x72\123\x65\x74\164\x69\156\147\x73" => $ret], REST_Controller::HTTP_OK); } } public function DBServerSettings_put() { $ret = $this->Settings_model->put_dbServerSettings($this->put()); if ($ret["\x65\162\x72\x6f\x72\103\x6f\x64\x65"] === VERR_INI_INVALID_PATH) { return $this->set_response(createResponse($ret["\x65\162\x72\x6f\162\x43\x6f\144\x65"]), REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret["\145\x72\x72\157\162\103\157\x64\x65"] === VERR_INI_INVALID_SECTION) { return $this->set_response(createResponse($ret["\x65\162\162\157\162\x43\x6f\x64\x65"]), REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret["\145\162\x72\x6f\162\103\157\x64\145"] === VERR_COMMON_INVALID) { return $this->set_response(createResponse($ret["\x65\x72\x72\x6f\x72\x43\x6f\144\145"]), REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(createResponse($ret["\x65\x72\162\x6f\x72\103\157\144\145"]), REST_Controller::HTTP_OK); } } public function checkExistDirectory_post() { $ret = $this->Settings_model->post_checkExistDirectory($this->post()); return $this->set_response(["\145\162\x72\x6f\162\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\x45\x78\151\x73\164\x44\151\162\x65\143\x74\157\x72\171\x4c\x69\x73\x74\163" => $ret], REST_Controller::HTTP_OK); } public function checkValidDBConnection_post() { $ret = $this->Settings_model->post_checkValidDBConnection($this->post()); if ($ret === VERR_INI_INVALID_PATH) { return $this->set_response(["\x65\162\162\157\x72\103\157\x64\x65" => VERR_INI_INVALID_PATH, "\x56\x61\154\x69\x64\x44\x42\103\x6f\x6e\156\x65\143\164\151\x6f\156" => false], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } elseif ($ret === VERR_INI_INVALID_SECTION) { return $this->set_response(["\145\x72\162\x6f\x72\103\x6f\144\145" => VERR_INI_INVALID_SECTION, "\x56\x61\x6c\151\144\104\102\103\157\x6e\156\145\x63\x74\x69\x6f\156" => false], REST_Controller::HTTP_BAD_REQUEST); } elseif ($ret === VERR_COMMON_INVALID) { return $this->set_response(["\x65\x72\162\x6f\x72\103\x6f\144\145" => VERR_COMMON_INVALID, "\126\x61\154\151\144\x44\x42\x43\157\x6e\156\x65\x63\x74\x69\157\x6e" => false], REST_Controller::HTTP_BAD_REQUEST); } else { return $this->set_response(["\x65\162\x72\157\162\103\157\144\x65" => VERR_COMMON_SUCCESS, "\126\141\154\x69\144\104\x42\x43\157\x6e\156\x65\x63\164\x69\x6f\x6e" => $ret], REST_Controller::HTTP_OK); } } public function serverPorts_get() { $data = $this->ServerPorts_model->get_serverPorts($this->get()); if ($data[self::ERROR_CODE_FIELD] === VERR_COMMON_SUCCESS) { $this->set_response(array(self::ERROR_CODE_FIELD => VERR_COMMON_SUCCESS, "\160\157\x72\x74" => $data["\160\x6f\162\x74"]), REST_Controller::HTTP_OK); } else { $this->set_response($data, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } public function serverPorts_put() { $parametersPutServerPorts = $this->put(); $data = $this->ServerPorts_model->put_serverPorts($this->put()); if ($data[self::ERROR_CODE_FIELD] === VERR_COMMON_SUCCESS) { $this->set_response(array(self::ERROR_CODE_FIELD => VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } else { $this->set_response($data, REST_Controller::HTTP_INTERNAL_SERVER_ERROR); } } public function SettingValues_get() { $section = $this->get("\163\145\143\x74\151\x6f\156"); if (!isset($section) || empty($section)) { vt_loge(__METHOD__ . "\x3a" . "\x50\141\162\141\155\145\x74\x65\x72\x73\40\x61\x72\x65\40\151\156\x76\x61\x6c\x69\x64\40\x64\x61\x74\141\x3a\x20" . json_encode($section)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $data = $this->SettingValues_model->get_SettingValues($this->get("\163\x65\143\164\x69\x6f\x6e")); if (count($data) > 0) { return $this->set_response(["\145\x72\x72\x6f\x72\103\x6f\x64\145" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\162\162\157\162\103\157\144\145"], "\x64\141\164\x61" => $data], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\162\x72\x6f\x72\x43\x6f\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\x72\157\162\103\157\x64\145"], "\x64\x61\x74\x61" => $data], REST_Controller::HTTP_OK); } } public function SettingValuesP2_get() { $parameters = $this->get(); $section = $parameters["\163\145\x63\x74\x69\x6f\156"]; $key = $parameters["\x6b\145\171"]; if (!isset($section) || !isset($key) || empty($section) || empty($key)) { vt_loge(__METHOD__ . "\72" . "\x50\x61\162\x61\155\x65\x74\145\162\163\x20\x61\x72\x65\40\x69\156\x76\x61\x6c\x69\144\40\x64\x61\x74\141\72\x20" . json_encode($parameters)); return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } $data = $this->SettingValues_model->get_SettingValuesP2($this->get()); if (count($data) > 0) { return $this->set_response(["\145\162\162\157\162\103\157\x64\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\x65\x72\162\x6f\x72\103\157\x64\145"], "\144\141\x74\141" => $data], REST_Controller::HTTP_OK); } else { return $this->set_response(["\x65\x72\162\x6f\162\x43\157\144\x65" => returnSetResponse(VERR_DB_NOSUCHDATA)["\x65\x72\162\x6f\162\103\157\144\145"], "\x64\x61\164\141" => $data], REST_Controller::HTTP_OK); } } public function SettingValues_post() { $parametersPostSettingValues = $this->post("\x70\x61\x72\x61\x6d\145\164\x65\x72\163\x50\157\x73\164\123\145\164\x74\x69\156\x67\x56\x61\x6c\x75\145\163"); $data = $this->SettingValues_model->post_SettingValues($this->post()); if ($data == VERR_COMMON_SUCCESS) { return $this->set_response(returnSetResponse(VERR_COMMON_SUCCESS), REST_Controller::HTTP_OK); } else { return $this->set_response(returnSetResponse(VERR_COMMON_INVALID), REST_Controller::HTTP_BAD_REQUEST); } } } diff --git a/server/original/www/ezwebserver/src/application/core/REST_Loader.php b/server/original/www/ezwebserver/src/application/core/REST_Loader.php index bc6074f..9bdc6b3 100644 --- a/server/original/www/ezwebserver/src/application/core/REST_Loader.php +++ b/server/original/www/ezwebserver/src/application/core/REST_Loader.php @@ -1,7 +1,7 @@ {$object_name} = new $class_name(); } else { show_error("\x55\156\141\x62\154\x65\x20\164\157\x20\154\157\141\x64\x20\164\150\145\40\162\145\161\x75\x65\x73\164\145\x64\40\143\157\156\164\x72\x6f\154\x6c\x65\162\x20\x63\154\141\163\163\x3a\x20" . $class_name); } } public function enum() { $file_name = "\105\156\165\155"; $CI =& get_instance(); $file_path = APPPATH . "\154\151\x62\162\x61\x72\151\x65\163\57" . $file_name . "\x2e\x70\150\x70"; $object_name = $file_name; $class_name = ucfirst($file_name); if (file_exists($file_path)) { require_once $file_path; $CI->{$object_name} = new $class_name(); } else { show_error("\x55\x6e\x61\x62\x6c\x65\40\x74\157\40\x6c\x6f\141\144\40\164\150\145\40\162\145\161\165\x65\163\164\x65\x64\40\143\157\156\164\x72\157\x6c\154\145\162\40\143\x6c\141\x73\163\72\x20" . $class_name); } } public function struct() { $CI =& get_instance(); if (func_num_args() == 0) { $structName = "\123\x74\162\165\x63\164"; $file_path = APPPATH . "\x6c\151\x62\x72\141\162\x69\x65\x73\x2f" . $structName . "\x2e\160\150\160"; $object_name = $structName; $class_name = ucfirst($structName); if (file_exists($file_path)) { require_once $file_path; } else { } } else { if (func_num_args() >= 1) { $args = func_get_args(); for ($i = 0; $i < count($args); $i++) { if (is_array($args[$i])) { $structs = $args[$i]; for ($j = 0; $j < count($structs); $j++) { $structName = $structs[$j]; $file_path = APPPATH . "\x6c\x69\x62\x72\141\x72\151\145\163\57" . $structName . "\x2e\x70\150\x70"; $object_name = $structName; $class_name = ucfirst($structName); if (file_exists($file_path)) { require_once $file_path; } else { } } } else { $structName = $args[$i]; $file_path = APPPATH . "\154\x69\x62\162\x61\x72\151\145\163\x2f" . $structName . "\x2e\160\150\160"; $object_name = $structName; $class_name = ucfirst($structName); if (file_exists($file_path)) { require_once $file_path; } else { } } } } } } public function error() { $CI =& get_instance(); $CI->load->helper("\x65\162\162\x6f\162"); } } diff --git a/server/original/www/ezwebserver/src/application/core/REST_Log.php b/server/original/www/ezwebserver/src/application/core/REST_Log.php index e279df1..0e0ed9e 100644 --- a/server/original/www/ezwebserver/src/application/core/REST_Log.php +++ b/server/original/www/ezwebserver/src/application/core/REST_Log.php @@ -1,7 +1,7 @@ "\x31", "\104\105\x42\125\107" => "\x32", "\x49\x4e\106\x4f" => "\63", "\x57\x41\x52\116\x49\x4e\107" => "\64", "\105\x56\x45\x4e\124" => "\65", "\x41\114\114" => "\x39\71"); public function __construct($config = array()) { parent::__construct($config); } } diff --git a/server/original/www/ezwebserver/src/application/helpers/error_helper.php b/server/original/www/ezwebserver/src/application/helpers/error_helper.php index f8a2761..1da8120 100644 --- a/server/original/www/ezwebserver/src/application/helpers/error_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/error_helper.php @@ -1,7 +1,7 @@ VERR_AUTH_UNAUTHENTICATED, "\x65\x72\x72\157\x72\115\145\163\163\141\x67\x65" => "\x49\156\x76\141\154\x69\144\40\x75\x73\145\x72\x20\x6e\x61\x6d\145\40\x6f\162\x20\160\141\163\163\x77\x6f\162\144\x2e"); if (!isset($codeOrKeyword)) { log_message("\x65\x72\x72\157\x72", "\116\157\x20\145\x72\162\x6f\x72\40\143\x6f\x64\145\x2e"); return array("\145\162\x72\157\x72\103\157\x64\x65" => VFAILURE, "\x65\x72\x72\157\162\x4d\145\x73\163\141\147\x65" => "\156\157\x74\x20\x65\x72\x72\157\x72\x20\143\x6f\x64\x65"); } if (is_numeric($codeOrKeyword)) { foreach ($errorMsg as $key => $item) { if (array_key_exists("\145\162\162\x6f\162\x43\157\144\x65", $item) && $item["\145\x72\162\x6f\162\103\x6f\144\145"] == (int) $codeOrKeyword) { return $item; } } } $converted = eval("\x72\145\x74\x75\x72\156\x20" . $codeOrKeyword . "\x3b"); if (array_key_exists($converted, $errorMsg)) { return $errorMsg[$converted]; } else { log_message("\145\x72\162\x6f\162", $codeOrKeyword . "\40\151\x73\x20\165\156\x64\x65\x66\151\x6e\145\144\40\x65\162\x72\x6f\x72\x20\143\x6f\x64\145\x2e"); return array("\145\x72\x72\x6f\162\103\x6f\x64\x65" => 1, "\145\x72\162\x6f\162\115\x65\163\163\x61\147\x65" => "\x6e\x6f\x74\40\163\x65\141\x72\x63\150\x20\x65\162\162\x6f\x72\137\x63\157\x64\145"); } } } if (!function_exists("\x63\x72\x65\x61\x74\145\x52\145\163\x70\157\156\x73\x65")) { function createResponse($errorCode) { $errorCodes = get_vterror_messages(); if (!isset($errorCode) || !array_key_exists($errorCode, $errorCodes)) { vt_loge("\116\157\40\x65\162\x72\x6f\162\40\x63\157\144\x65\40\x69\x6e\x20\143\162\x65\x61\x74\151\156\147\x20\162\145\163\160\x6f\156\163\145\56"); $errorCode = VERR_COMMON_INVALID; } return $errorCodes[$errorCode]; } } if (!function_exists("\143\162\x65\141\x74\x65\x52\145\163\x70\157\156\x73\x65\x42\x79\105\x72\162\x6f\162\x43\x6f\144\x65\123\164\162\x69\x6e\x67")) { function createResponseByErrorCodeString($errorCodeString) { $errorCode = eval("\x72\145\164\x75\x72\156\40" . $errorCodeString . "\73"); return createResponse($errorCode); } } diff --git a/server/original/www/ezwebserver/src/application/helpers/fs_helper.php b/server/original/www/ezwebserver/src/application/helpers/fs_helper.php index 32d39f2..1f6f77e 100644 --- a/server/original/www/ezwebserver/src/application/helpers/fs_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/fs_helper.php @@ -1,7 +1,7 @@ $diskFreeSpace, "\153\151\154\x6c\157\x42\x79\164\145" => $diskFreeSpace / 1024, "\155\145\147\x61\102\171\x74\145" => $diskFreeSpace / 1024 / 1024, "\147\x69\147\x61\x42\171\164\x65" => $diskFreeSpace / 1024 / 1024 / 1024); } } if (!function_exists("\147\x65\x74\124\157\164\141\x6c\123\160\141\x63\145")) { function getTotalSpace() { $config = get_ini_array(APPPATH . INI_CONFIG_PATH); $diskTotalSpace = disk_total_space($config["\105\x7a\x57\x65\x62\x53\145\x72\166\x65\x72"]["\146\155\x5f\x74\157\x70\x5f\x64\151\x72"]); if ($diskTotalSpace === false) { return false; } return array("\x62\171\164\145" => $diskTotalSpace, "\153\x69\154\154\x6f\102\x79\164\x65" => $diskTotalSpace / 1024, "\155\145\147\x61\x42\171\164\x65" => $diskTotalSpace / 1024 / 1024, "\147\151\147\141\x42\171\164\x65" => $diskTotalSpace / 1024 / 1024 / 1024); } } if (!function_exists("\147\145\x74\104\x69\x72\114\151\x73\x74")) { function getDirList($dirPath) { $dirs = array(); $items = scanDirSafe($dirPath); foreach ($items as $dir) { if ($dir !== "\56" and $dir !== "\x2e\x2e") { if (is_dir($dirPath . "\57" . $dir)) { array_push($dirs, $dir); } else { } } else { } } return $dirs; } } if (!function_exists("\x73\x63\141\156\104\151\x72\x53\141\x66\x65")) { function scanDirSafe($dirPath) { if (file_exists($dirPath)) { return scandir($dirPath); } else { return array(); } } } if (!function_exists("\143\157\x6d\142\x69\156\145\106\151\154\x65\120\141\x74\150")) { function combineFilePath($filePaths) { $filePath = ''; foreach ($filePaths as $value) { if ($filePath != '') { $filePath .= "\x2f"; } $filePath .= $value; } return $filePath; } } if (!function_exists("\143\150\x65\143\153\x44\157\x74\x44\x6f\164\x49\156\104\151\162\x65\x63\x74\x6f\162\171")) { function checkDotDotInDirectory($dirPath) { if (strstr($dirPath, "\x2e\56")) { vt_loge("\124\x68\x65\40\x64\x69\162\160\x61\164\150\x20\143\x6f\156\x74\141\151\156\x73\40\56\56\x2c\x20\144\151\x72\120\x61\x74\x68\75" . $dirPath); return false; } else { } } } if (!function_exists("\155\x61\x6b\145\104\x69\x72")) { function makeDir($dirPath) { if (!file_exists($dirPath)) { if (!@mkdir($dirPath, 0777, true)) { return FALSE; } } return TRUE; } } if (!function_exists("\x72\x65\156\x61\155\145\104\151\x72")) { function renameDir($fromPath, $toPath) { if (file_exists($fromPath) === false) { vt_loge("\146\162\157\155\120\x61\164\x68\x20\x64\157\145\x73\x20\156\157\164\40\145\x78\x69\163\164\54\40\146\x72\157\155\x50\141\164\150\75" . $fromPath); return VERR_COMMON_INVALID; } if (file_exists($toPath) === true) { vt_loge("\164\157\x50\141\164\150\x20\x61\x6c\162\145\141\144\x79\x20\x65\x78\151\x73\x74\163\56\x2c\40\x74\157\120\141\x74\x68\75" . $toPath); return VERR_DELIVERER_FILEMANAGER_FILE_EXISTS; } $toBaseDir = dirname($toPath); if (!file_exists($toBaseDir)) { makeDir($toBaseDir); } if (!rename($fromPath, $toPath)) { vt_loge("\122\x65\x6e\141\155\145\x20\x66\x61\151\154\x65\x64\56"); return VERR_COMMON_IO; } return VERR_COMMON_SUCCESS; } } if (!function_exists("\143\x6f\160\x79\x44\x69\162")) { function copyDir($fromPath, $toPath) { if (file_exists($fromPath) === false) { vt_loge("\146\x72\x6f\x6d\x50\x61\164\150\40\144\x6f\x65\x73\40\x6e\157\164\x20\145\170\x69\x73\164\54\x20\x66\x72\x6f\x6d\x50\141\x74\150\75" . $fromPath); return FALSE; } if (file_exists($toPath) === true) { vt_loge("\x74\157\x50\x61\164\x68\x20\x61\x6c\x72\x65\141\144\x79\40\145\x78\151\x73\164\163\x2e\54\40\164\x6f\x50\x61\164\150\75" . $toPath); return FALSE; } makeDir($toPath); $ret = _copyDirRecursive($fromPath, $toPath); if ($ret == VERR_COMMON_IO) { vt_loge("\103\157\160\171\x20\146\x61\x69\x6c\145\144\56"); } return $ret; } function _copyDirRecursive($src, $dst) { $ret = VERR_COMMON_IO; $dir = opendir($src); @mkdir($dst); while (false !== ($file = readdir($dir))) { if ($file != "\56" && $file != "\x2e\56") { if (is_dir($src . "\57" . $file)) { _copyDirRecursive($src . "\57" . $file, $dst . "\57" . $file); } else { $ret = true; copy($src . "\x2f" . $file, $dst . "\57" . $file); } } } closedir($dir); return $ret; } } if (!function_exists("\x66\157\162\143\145\137\x64\157\167\x6e\154\x6f\141\x64")) { function force_download($filename = '', $data = '', $set_mime = FALSE) { if ($filename === '' or $data === '') { return FALSE; } elseif ($data === NULL) { if (@is_file($filename) && ($filesize = @filesize($filename)) !== FALSE) { $filepath = $filename; $filename = explode("\57", str_replace(DIRECTORY_SEPARATOR, "\x2f", $filename)); $filename = end($filename); } else { return FALSE; } } else { $filesize = strlen($data); } $mime = "\141\160\x70\154\x69\x63\x61\164\151\157\x6e\57\x6f\143\x74\x65\164\55\163\164\x72\x65\x61\x6d"; $x = explode("\56", $filename); $extension = end($x); if ($set_mime === TRUE) { if (count($x) === 1 or $extension === '') { return FALSE; } $mimes =& get_mimes(); if (isset($mimes[$extension])) { $mime = is_array($mimes[$extension]) ? $mimes[$extension][0] : $mimes[$extension]; } } if (count($x) !== 1 && isset($_SERVER["\110\x54\x54\x50\x5f\125\x53\105\122\x5f\x41\107\105\x4e\124"]) && preg_match("\57\x41\156\144\x72\x6f\151\144\x5c\x73\x28\61\174\62\x5c\56\x5b\60\x31\x5d\51\57", $_SERVER["\110\124\x54\x50\x5f\x55\x53\105\x52\137\x41\x47\x45\x4e\124"])) { $x[count($x) - 1] = strtoupper($extension); $filename = implode("\x2e", $x); } if ($data === NULL && ($fp = @fopen($filepath, "\162\x62")) === FALSE) { return FALSE; } if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { @ob_clean(); } header("\x43\157\x6e\164\x65\x6e\164\x2d\x54\x79\x70\x65\x3a\40" . $mime); header("\103\157\156\x74\x65\x6e\164\x2d\104\x69\163\x70\157\x73\x69\164\x69\157\156\x3a\40\141\x74\164\x61\143\x68\155\145\156\164\x3b\x20\146\x69\x6c\145\x6e\x61\x6d\x65\x3d\x22" . $filename . "\x22"); header("\105\170\x70\151\x72\145\163\72\x20\x30"); header("\103\157\x6e\164\x65\x6e\x74\x2d\x54\x72\x61\x6e\x73\x66\145\x72\55\x45\x6e\143\x6f\x64\151\x6e\x67\72\x20\142\x69\x6e\141\162\171"); header("\x43\x6f\x6e\164\x65\156\164\55\x4c\x65\156\x67\164\x68\72\x20" . $filesize); if (isset($_SERVER["\110\124\x54\120\137\125\x53\105\122\137\x41\x47\x45\x4e\124"]) && strpos($_SERVER["\110\x54\124\120\x5f\x55\123\105\x52\x5f\101\x47\105\116\124"], "\x4d\x53\x49\105") !== FALSE) { header("\x43\x61\x63\150\145\55\x43\157\x6e\x74\x72\157\x6c\72\40\156\157\55\143\141\x63\150\145\x2c\x20\x6e\157\55\x73\164\157\x72\145\54\40\x6d\165\x73\x74\x2d\162\145\x76\141\154\151\144\x61\x74\x65"); } header("\120\x72\x61\147\x6d\x61\x3a\x20\156\x6f\55\143\x61\x63\150\x65"); if ($data !== NULL) { exit($data); } fpassthru($fp); fclose($fp); exit; } } if (!function_exists("\151\x73\x43\124\x50\x61\x74\150\116\141\x6d\x65")) { function isCTPathName($fileName) { return strncmp($fileName, "\x43\x54", 2) == 0; } } if (!function_exists("\151\x73\x44\151\x63\157\155\x46\x69\154\x65\116\141\x6d\145")) { function isDicomFileName($fileName) { return isDicomFileExt(getFileExtension($fileName)); } } if (!function_exists("\147\145\x74\x41\x63\161\x75\151\163\x69\164\x69\157\x6e\x54\151\155\x65\x73\x74\141\x6d\x70")) { function getAcquisitionTimestamp($dicomHandler = null, $acqTime = '') { $acquisitionTimestamp = null; $filters = array(new UserDateTimeFilter($acqTime), new DicomTagDateTimeFilter($dicomHandler, tagInstanceCreationDate, tagInstanceCreationTime), new DicomTagDateTimeFilter($dicomHandler, tagAcquisitionDate, tagAcquisitionTime), new DicomTagDateTimeFilter($dicomHandler, tagSeriesDate, tagSeriesTime), new DicomTagDateTimeFilter($dicomHandler, tagStudyDate, tagStudyTime), new CurrentDateTimeFilter($acqTime)); foreach ($filters as $filter) { if ($filter->filter($acquisitionTimestamp)) { break; } } return $acquisitionTimestamp; } } if (!function_exists("\x72\145\x6d\157\x76\145\x46\x69\154\145\105\x78\x74\x65\156\163\x69\157\156")) { function removeFileExtension($fileName) { $pos = strrpos($fileName, "\x2e"); if ($pos === false) { return $fileName; } return substr($fileName, 0, $pos); } } if (!function_exists("\147\x65\164\106\151\154\145\105\170\164\x65\x6e\163\x69\157\156")) { function getFileExtension($filePath) { return pathinfo($filePath, PATHINFO_EXTENSION); } } if (!function_exists("\x63\150\141\x6e\147\145\106\151\154\x65\105\x78\x74\x65\156\x73\x69\x6f\x6e")) { function changeFileExtension($filePath, $fileExt) { $dot_pos = strripos($filePath, "\x2e"); if ($dot_pos === false) { return $filePath . "\x2e" . $fileExt; } else { return substr($filePath, 0, $dot_pos) . "\56" . $fileExt; } } } if (!function_exists("\x67\x65\164\106\x69\154\145\x45\x78\164\145\x6e\x73\x69\x6f\x6e")) { function getFileExtension($fileName) { $pos = strrpos($fileName, "\x2e"); if ($pos == false) { return ''; } return substr($fileName, $pos + 1); } } if (!function_exists("\143\150\x65\x63\153\120\x6f\163\x74\125\x70\154\x6f\141\x64\x46\x69\154\145")) { function checkPostUploadFile($fileField, $uploadFilePath, $dieWhenError = true) { if (!array_key_exists($fileField, $_FILES)) { vt_loge(__METHOD__ . "\x3a\x20\x4b\x65\171\x20\156\157\164\x20\146\157\x75\x6e\x64\40\151\x6e\40\x66\x69\154\145\163\56\x20\x6b\x65\171\x3d" . $fileField); return FALSE; } if ($_FILES[$fileField]["\145\x72\162\157\x72"] > 0 || $_FILES[$fileField]["\x73\151\x7a\145"] <= 0) { vt_loge(__METHOD__ . "\x3a\40\x45\162\162\157\162\40\x69\156\x20\x75\x70\x6c\157\141\x64\40\x66\x69\154\x65\x2e\40\146\151\154\145\x73\40\x6f\162\x20\163\151\172\145\x20\151\163\40\172\145\x72\157\56\x20\145\x72\x72\x6f\x72\x3d" . $_FILES[$fileField]["\145\162\x72\157\162"] . "\54\40\163\151\x7a\x65\75" . $_FILES[$fileField]["\x73\x69\172\145"]); return FALSE; } $tmp_file_name = $_FILES[$fileField]["\x74\155\160\137\x6e\141\155\x65"]; $is_uploaded_file = is_uploaded_file($tmp_file_name); if (!$is_uploaded_file) { vt_loge(sprintf("\45\163\x3a\x20\124\150\145\40\x66\x69\x6c\x65\x20\151\163\x20\x6e\x6f\164\40\x75\x70\x6c\157\141\x64\x65\144\x20\166\151\x61\40\150\x74\164\x70\x20\160\x6f\163\164\x3a\x20\133\x25\163\x5d\x5b\x25\x73\135", __METHOD__, $_FILES[$fileField]["\x74\x6d\160\137\x6e\141\155\x65"], json_encode($_FILES))); if (!is_writable($tmp_file_name)) { vt_loge(sprintf("\x25\x73\x3a\40\124\150\145\x20\x66\151\154\x65\40\151\163\40\156\x6f\x74\40\167\x72\151\164\141\x62\x6c\x65\x3a\x20\x5b\x25\x73\x5d\x5b\x25\163\135", __METHOD__, $_FILES[$fileField]["\164\x6d\x70\137\x6e\x61\155\x65"], json_encode($_FILES))); return FALSE; } else { } } deleteLinkFile($uploadFilePath); $uploadFilePath = str_replace(array("\x2f", "\134"), DIRECTORY_SEPARATOR, $uploadFilePath); makeDirRecursive(dirname($uploadFilePath)); if ($is_uploaded_file) { if (!move_uploaded_file($tmp_file_name, $uploadFilePath)) { vt_loge(sprintf("\x25\163\x3a\x20\105\162\x72\x6f\162\40\151\x6e\x20\155\157\166\151\156\147\40\165\160\154\x6f\141\x64\x65\144\40\x66\151\154\145\72\40", __METHOD__, $tmp_file_name)); return FALSE; } } else { $ret_rename = rename($tmp_file_name, $uploadFilePath); if (!$ret_rename) { vt_loge(sprintf("\x25\x73\72\40\106\x61\151\154\145\x64\40\x74\x6f\40\x72\x65\156\141\155\145\x20\164\x6d\160\40\x66\x69\x6c\145\72\x20", __METHOD__, $tmp_file_name)); return FALSE; } } return TRUE; } } if (!function_exists("\x72\x65\x61\144\x44\x69\143\x6f\x6d\x48\145\141\144\145\x72")) { function readDicomHeader($dicomFile) { return new MyDicom(array("\144\151\x63\x6f\x6d\x66\151\x6c\x65" => $dicomFile)); } } if (!function_exists("\x69\163\104\x69\x63\x6f\x6d\x46\151\x6c\145\105\170\x74")) { function isDicomFileExt($fileExt) { return strcasecmp($fileExt, "\144\143\155") == 0; } } if (!function_exists("\143\150\145\143\x6b\x43\x61\143\150\x65\105\x78\x69\x73\164\x73")) { function checkCacheExistsByTypeAndName($type = '', $name = '') { return file_exists(APPPATH . "\x63\x61\x63\150\145\134" . $type . "\134" . sha1($name, FALSE)) ? APPPATH . "\x63\141\143\150\x65\x5c" . $type . "\134" . sha1($name, FALSE) : FALSE; } } if (!function_exists("\163\x74\x72\x65\141\155\151\156\x67")) { function streaming($path) { if (!($stream = fopen($path, "\x72\x62"))) { return FALSE; } $buffer = 102400; $start = -1; $end = -1; $size = 0; ob_get_clean(); header("\x43\157\x6e\164\145\156\164\55\x54\x79\160\145\72\40\x76\x69\144\145\x6f\57\155\x70\64"); header("\103\141\x63\x68\x65\x2d\x43\x6f\156\164\x72\157\x6c\x3a\x20\155\141\x78\55\141\x67\145\x3d\62\x35\71\62\60\x30\x30\54\40\x70\165\x62\x6c\151\x63"); header("\105\170\160\x69\162\145\x73\x3a\x20" . gmdate("\104\x2c\40\x64\40\x4d\40\131\40\x48\x3a\x69\72\163", time() + 2592000) . "\x20\107\115\x54"); header("\114\x61\163\x74\x2d\115\157\x64\x69\146\151\145\x64\72\x20" . gmdate("\x44\x2c\x20\144\x20\115\x20\x59\40\x48\72\x69\72\x73", @filemtime($path)) . "\40\107\x4d\124"); $start = 0; $size = filesize($path); $end = $size - 1; header("\101\x63\x63\145\x70\164\x2d\x52\141\x6e\x67\145\x73\72\40\x30\55" . $end); if (isset($_SERVER["\110\124\x54\x50\137\x52\x41\116\107\105"])) { $c_start = $start; $c_end = $end; list(, $range) = explode("\x3d", $_SERVER["\x48\x54\124\120\137\122\101\x4e\x47\x45"], 2); if (strpos($range, "\x2c") !== false) { header("\110\x54\124\x50\x2f\61\x2e\x31\40\x34\61\x36\x20\x52\x65\161\165\x65\x73\164\145\144\40\122\x61\x6e\x67\x65\x20\x4e\x6f\164\40\x53\x61\x74\151\163\x66\x69\141\142\x6c\145"); header("\103\x6f\156\x74\x65\156\x74\x2d\122\x61\x6e\x67\x65\72\40\142\x79\x74\145\x73\40{$start}\x2d{$end}\57{$size}"); exit; } if ($range == "\55") { $c_start = $size - substr($range, 1); } else { $range = explode("\x2d", $range); $c_start = $range[0]; $c_end = isset($range[1]) && is_numeric($range[1]) ? $range[1] : $c_end; } $c_end = $c_end > $end ? $end : $c_end; if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) { header("\110\x54\124\x50\x2f\x31\56\x31\x20\64\x31\66\40\122\145\x71\x75\145\163\x74\145\144\x20\x52\141\x6e\x67\145\x20\x4e\157\x74\x20\x53\x61\x74\151\163\146\151\x61\x62\154\x65"); header("\103\157\x6e\164\x65\x6e\164\55\122\x61\156\x67\x65\x3a\40\x62\x79\x74\145\163\40{$start}\55{$end}\57{$size}"); exit; } $start = $c_start; $end = $c_end; $length = $end - $start + 1; fseek($stream, $start); header("\x48\x54\124\x50\x2f\61\56\61\40\x32\x30\x36\40\x50\x61\x72\164\x69\141\154\40\103\157\x6e\x74\x65\156\164"); header("\103\x6f\x6e\164\x65\156\164\55\114\145\x6e\147\x74\150\72\x20" . $length); header("\103\x6f\x6e\x74\x65\156\164\55\x52\141\156\x67\145\72\40\x62\171\x74\145\163\x20{$start}\x2d{$end}\57" . $size); } else { header("\103\157\x6e\164\145\x6e\x74\x2d\114\145\x6e\x67\x74\150\72\x20" . $size); } $i = $start; set_time_limit(0); while (!feof($stream) && $i <= $end) { $bytesToRead = $buffer; if ($i + $bytesToRead > $end) { $bytesToRead = $end - $i + 1; } $data = fread($stream, $bytesToRead); echo $data; flush(); $i += $bytesToRead; } fclose($stream); } } if (!function_exists("\143\x72\x65\x61\x74\x65\x4f\156\x65\x44\151\143\x6f\x6d\x46\151\x6c\145\x46\162\x6f\155\103\124")) { function createOneDicomFileFromCT($ctFilePath, $tempDirPath) { $dicomFilePath = extractOneFileFromCT($ctFilePath, $tempDirPath, 0); return $dicomFilePath; } } if (!function_exists("\145\170\164\162\x61\x63\164\117\x6e\145\106\x69\x6c\x65\x46\162\157\x6d\x43\124")) { function extractOneFileFromCT($ctFilePath, $tempDirPath, $pos = 1) { $zip = new ZipArchive(); $ret = null; $path_info = pathinfo($ctFilePath); if ($zip->open($ctFilePath) === TRUE) { if (strtoupper($path_info["\x65\170\164\x65\156\163\151\157\x6e"]) === "\x43\x54\x58") { $key = getSmartPayDataKeyCode(); $zip->setPassword($key); } $fileName = $zip->getNameIndex($pos == 1 ? $zip->numFiles / 2 : 0); if ($fileName) { if ($zip->extractTo($tempDirPath, $fileName) === TRUE) { $ret = $tempDirPath . "\57" . $fileName; } } $zip->close(); } return $ret; } function getSmartPayDataKeyCode() { $anSmartPayDataKeyCode = array(119 + 0, 77 + 1, 124 + 2, 74 + 3, 94 + 4, 108 + 5, 33 + 6, 38 + 7, 96 + 8, 109 + 9, 52 + 10, 64 + 11, 104 + 12, 76 + 13, 103 + 14, 121 + 15, 88 + 16, 98 + 17, 122 + 18, 60 + 19, 77 + 20, 106 + 21, 36 + 22, 68 + 23, 58 + 24, 59 + 25, 123 + 26, 32 + 27, 45 + 28, 109 + 29, 79 + 30, 63 + 31, 101 + 32, 54 + 33, 34 + 34, 95 + 35, 62 + 36, 70 + 37, 78 + 38, 75 + 39, 86 + 40, 88 + 41, 82 + 42, 120 + 43, 81 + 44, 35 + 45, 68 + 46, 78 + 47, 48 + 48, 120 + 49, 85 + 50, 58 + 51, 32 + 52, 118 + 53, 124 + 54, 117 + 55, 56 + 56, 98 + 57, 106 + 58, 117 + 59, 102 + 60, 99 + 61, 39 + 62, 53 + 63, 118 + 64, 71 + 65, 88 + 66, 96 + 67, 125 + 68, 42 + 69, 61 + 70, 38 + 71, 92 + 72, 66 + 73, 58 + 74, 40 + 75, 58 + 76, 118 + 77, 91 + 78, 102 + 79, 87 + 80, 41 + 81, 73 + 82, 72 + 83, 101 + 84, 79 + 85, 84 + 86, 77 + 87, 117 + 88, 58 + 89, 98 + 90, 37 + 91, 60 + 92, 76 + 93, 107 + 94, 38 + 95, 45 + 96, 77 + 97, 90 + 98, 38 + 99, 72 + 100, 60 + 101, 41 + 102, 86 + 103, 119 + 104, 57 + 105, 66 + 106, 56 + 107, 101 + 108, 36 + 109, 104 + 110, 81 + 111, 82 + 112, 44 + 113, 115 + 114, 74 + 115, 103 + 116, 89 + 117, 104 + 118, 58 + 119, 111 + 120, 47 + 121, 56 + 122, 99 + 123, 73 + 124, 64 + 125, 108 + 126); $strKey = ''; $size = sizeof($anSmartPayDataKeyCode); for ($i = 0; $i < $size; $i++) { $strKey .= chr($anSmartPayDataKeyCode[$i] - $i); } return $strKey; } } if (!function_exists("\147\x65\x74\103\164\116\x61\x6d\x65\106\162\157\155\x54\x68\165\155\142\156\x61\151\154\x4e\141\x6d\145")) { function getCtNameFromThumbnailName($name) { $name = str_replace("\164\x5f", "\x5f", $name); $name = removeFileExtension($name); return $name; } } if (!function_exists("\143\162\x65\x61\164\145\124\150\x75\155\x62\x6e\141\x69\x6c\106\x69\x6c\145\106\x72\157\155\x43\124")) { function createThumbnailFileFromCT($thumbnailFilePath, $ctFilePath, &$dicom = null) { $tempDirPath = dirname($ctFilePath); $dicomFilePath = extractOneFileFromCT($ctFilePath, $tempDirPath, 1); $ret = createThumbnailFileFromImage($thumbnailFilePath, $dicomFilePath); return $ret; } } if (!function_exists("\143\x72\x65\141\164\145\124\x68\x75\x6d\x62\156\x61\x69\154\106\151\x6c\145\106\x72\x6f\x6d\111\x6d\x61\147\145")) { function createThumbnailFileFromImage($thumbnailFilePath, $imageFilePath) { makeDirRecursive(dirname($thumbnailFilePath)); $path_info = pathinfo($imageFilePath); $fileExt = $path_info["\145\x78\164\x65\156\163\x69\x6f\156"]; if (strtoupper($fileExt) == "\x4c\111\x4e\113") { $config = get_ini_array(APPPATH . INI_CONFIG_PATH); $linkBaseDirs = explode("\x7c", $config["\x45\x7a\x57\x65\142\x53\145\162\166\x65\x72"]["\x6c\x69\156\x6b\x5f\x62\141\x73\145\x5f\x64\x69\x72\x73"]); $imageFilePath = getSrcFilePathFromLinkFile($path_info["\x64\x69\x72\x6e\141\x6d\145"] . DIRECTORY_SEPARATOR . $path_info["\x66\151\154\145\x6e\x61\x6d\x65"], $linkBaseDirs); if ($imageFilePath == false) { return VERR_COMMON_INVALID; } } $imgOption = ["\x74\x68\x75\155\142\x6e\x61\x69\x6c" => true, "\x77\151\x64\x74\150" => THUMBNAIL_WIDTH, "\150\145\x69\147\x68\164" => THUMBNAIL_HEIGHT, "\142\145\x73\164\x66\x69\x74" => true, "\146\151\154\154" => false, "\x71\165\x61\x6c\151\x74\x79" => 100]; $ret = convertImage($thumbnailFilePath, $imageFilePath, $imgOption); return $ret; } } if (!function_exists("\x6d\141\153\145\104\x69\x72\122\x65\143\165\162\163\x69\166\145")) { function makeDirRecursive($dirPath) { if (!file_exists($dirPath)) { if (!mkdir($dirPath, 0777, true)) { vt_loge(__METHOD__ . "\x3a\x20\106\141\x69\154\x65\x64\40\x74\157\x20\155\141\153\x65\x20\x64\151\x72\x2e\x20\x64\151\162\x3d" . $dirPath); } } } } if (!function_exists("\x64\x65\154\x65\164\x65\x46\x69\154\145\111\x66\x45\170\x69\163\164")) { function deleteFileIfExist($file) { if (file_exists($file)) { $ret = unlink($file); } deleteLinkFile($file); if (isset($ret)) { return $ret; } } } if (!function_exists("\x72\x6d\x44\151\162\x52\145\x63\x75\162\x73\151\166\x65")) { function rmDirRecursive($dir) { if (is_dir($dir)) { $objects = scanDirSafe($dir); foreach ($objects as $object) { if ($object != "\x2e" && $object != "\56\x2e") { if (filetype($dir . "\x2f" . $object) == "\144\x69\x72") { rmDirRecursive($dir . "\57" . $object); } else { unlink($dir . "\x2f" . $object); } } else { } } reset($objects); $isDirEmpty = !(new \FilesystemIterator($dir))->valid(); if ($isDirEmpty) { rmdir($dir); } return true; } else { return false; } } } if (!function_exists("\147\145\164\123\165\142\x44\151\x72\116\x61\x6d\x65")) { function getSubDirName($baseUniqueName) { $subDir = "\x53\x75\x62" . substr($baseUniqueName, 1, 6); return $subDir; } } if (!function_exists("\147\x65\x74\x42\141\163\x65\125\156\x69\x71\x75\145\x4e\141\155\x65")) { function getBaseUniqueName($timestamp = null) { if ($timestamp == null) { $timestamp = time(); } $date = new DateTime(); date_timestamp_set($date, $timestamp); list($usec, $sec) = explode("\x20", microtime()); $msec = sprintf("\x25\x30\64\144", round($usec * 10000)); $uniqueName = date_format($date, "\131\x6d\144\x5f\110\x69\163") . "\x5f" . $msec; return $uniqueName; } } if (!function_exists("\147\x65\164\122\x65\163\x6f\165\162\x63\145\125\x6e\x69\x71\165\x65\111\156\144\x65\170")) { function getResourceUniqueIndex() { $randvalue = rand(0, 99999999); return sprintf("\45\x30\x38\144", $randvalue); } } diff --git a/server/original/www/ezwebserver/src/application/helpers/http_helper.php b/server/original/www/ezwebserver/src/application/helpers/http_helper.php index 234e1aa..701af4b 100644 --- a/server/original/www/ezwebserver/src/application/helpers/http_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/http_helper.php @@ -1,7 +1,7 @@ get($section, $key); } } if (!function_exists("\x67\145\x74\137\x69\156\151\x5f\x61\x72\162\x61\x79")) { function get_ini_array($config_file) { $ini_file = IniFile::load($config_file); return $ini_file->toArray(); } } if (!function_exists("\163\145\164\x5f\151\x6e\151")) { function set_ini($config_file, $settingValueList) { $ini_file = IniFile::load($config_file); $settingArr = $ini_file->toArray(); foreach ($settingValueList as $settingValue) { if (array_key_exists($settingValue["\163\145\x63\x74\x69\157\x6e"], $settingArr)) { if (array_key_exists($settingValue["\153\x65\171"], $settingArr[$settingValue["\x73\x65\x63\164\151\x6f\156"]])) { $settingArr[$settingValue["\163\145\x63\x74\x69\x6f\156"]][$settingValue["\x6b\x65\x79"]] = $settingValue["\166\141\x6c\165\x65"]; } } } $iniSave = new IniFile(); foreach ($settingArr as $key => $val) { $section = new IniSection($key); foreach ($settingArr[$key] as $aKey => $aVal) { $section->set($aKey, $aVal); } $iniSave->addSection($section); } $iniSave->save($config_file); } } if (!function_exists("\163\x61\166\145\x5f\151\x6e\x69")) { function save_ini($config_file, $settingValueList) { $iniSave = new IniFile(); foreach ($settingValueList as $key => $val) { $section = new IniSection($key); foreach ($settingValueList[$key] as $aKey => $aVal) { $section->set($aKey, $aVal); } $iniSave->addSection($section); } $iniSave->save($config_file); } } diff --git a/server/original/www/ezwebserver/src/application/helpers/model_helper.php b/server/original/www/ezwebserver/src/application/helpers/model_helper.php index 2093904..187dd80 100644 --- a/server/original/www/ezwebserver/src/application/helpers/model_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/model_helper.php @@ -1,7 +1,7 @@ db = $dbConns[$dbName]; } else { $model->db = DB($dbName, NULL); $dbConns[$dbName] = $model->db; } return; } } if (!function_exists("\147\145\x74\x5f\x6f\x66\146\x73\145\x74")) { function get_offset($numItems, $pageNum) { return $pageNum * $numItems; } } if (!function_exists("\154\157\141\x64\137\x6d\x6f\144\145\x6c")) { function load_model($class, $modelName) { if (ENVIRONMENT == "\164\x65\163\x74\x69\156\x67") { StaticModelLoader::load($class, $modelName); } else { $class->load->model($modelName); } } } diff --git a/server/original/www/ezwebserver/src/application/helpers/type_helper.php b/server/original/www/ezwebserver/src/application/helpers/type_helper.php index 9227317..b151fe6 100644 --- a/server/original/www/ezwebserver/src/application/helpers/type_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/type_helper.php @@ -1,7 +1,7 @@ eImagePayPerView)) { return "\x50\141\x79\120\x65\162\x56\x69\145\x77"; } else { if ($EImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyPrepaid)) { return "\x4d\157\x6e\x74\150\x6c\171\120\x72\145\160\141\151\x64"; } else { if ($EImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatA)) { return "\115\x6f\156\164\x68\x6c\171\106\154\141\164\101"; } else { if ($EImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatB)) { return "\x4d\x6f\x6e\x74\x68\x6c\x79\x46\x6c\x61\x74\102"; } else { if ($EImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType)) { return "\125\156\x70\141\x69\x64"; } else { if ($EImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImagePayTestType)) { return "\124\145\163\x74"; } else { return ''; } } } } } } } } if (!function_exists("\111\155\141\147\145\120\x61\x79\123\x74\141\x74\165\163\124\157\123\x74\x72\151\156\x67")) { function ImagePayStatusToString($imagePayStatus) { if ($imagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePayStausNone)) { return "\x4e\x6f\156\x65"; } else { if ($imagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImageUnpaidStatus)) { return "\125\156\x70\x61\x69\x64"; } else { if ($imagePayStatus == enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus)) { return "\x50\x61\x69\x64"; } else { return ''; } } } } } if (!function_exists("\154\x69\143\145\x6e\163\145\103\x6f\x6e\144\151\x74\151\157\x6e\124\157\101\x72\x72\141\171")) { function licenseConditionToIntArr($licenseCondition) { preg_match_all("\x2f\133\x30\x2d\71\135\x2b\x2f", $licenseCondition, $licenseArray); return $licenseArray[0]; } } if (!function_exists("\163\x65\164\102\x6f\x6f\x6c\x56\141\x6c")) { function setBoolVal($bool) { return $bool == "\x74" ? TRUE : FALSE; } } if (!function_exists("\104\x65\x76\151\143\x65\120\x61\x79\x53\164\x61\x74\165\163\x54\157\x53\164\x72\x69\x6e\x67")) { function DevicePayStatusToString($eDevicePayStatus) { $strDevicePayStatus = ''; switch ($eDevicePayStatus) { case enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid): $strDevicePayStatus = "\x55\x6e\x70\141\151\x64"; break; case enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayOverdue): $strDevicePayStatus = "\x4f\x76\145\162\x64\x75\145"; break; case enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePaid): $strDevicePayStatus = "\120\x61\x69\144"; break; case enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayCancel): $strDevicePayStatus = "\x43\141\x6e\143\x65\154\x65\144"; break; case enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayRefund): $strDevicePayStatus = "\122\x65\146\x75\x6e\144\x65\x64"; break; default: break; } return $strDevicePayStatus; } } if (!function_exists("\104\145\x76\151\x63\x65\120\141\171\x54\171\160\145\124\x6f\123\x74\162\x69\x6e\x67")) { function DevicePayTypeToString($eDevicePayType) { switch ($eDevicePayType) { case enumToString(new EDevicePayType(), (new EDevicePayType())->eDevicePayPerView): $strDevicePayStatus = "\x50\x61\x79\x50\x65\162\x56\x69\x65\167"; break; case enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyPrepaid): $strDevicePayStatus = "\115\x6f\156\164\150\154\171\120\162\x65\x70\141\x69\144"; break; case enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyFlatA): $strDevicePayStatus = "\x4d\157\x6e\164\150\154\x79\x46\x6c\x61\164\x41"; break; case enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyFlatB): $strDevicePayStatus = "\x4d\x6f\156\164\150\x6c\171\106\x6c\141\164\102"; break; default: break; } return $strDevicePayStatus; } } if (!function_exists("\104\x65\166\x69\143\145\x53\141\x6c\x65\x73\124\171\x70\145\x54\x6f\x53\164\x72\151\x6e\147")) { function DeviceSalesTypeToString($eDeviceSalesType) { $strDeviceSalesType = ''; switch ($eDeviceSalesType) { case enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eNormalDevice): $strDeviceSalesType = "\x4e\157\162\x6d\141\154"; break; case enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice): $strDeviceSalesType = "\x53\x6d\x61\162\x74\x50\x61\171"; break; default: $strDeviceSalesType = "\x55\x6e\153\x6e\x6f\x77\x6e"; break; } return $strDeviceSalesType; } } if (!function_exists("\x73\x74\x72\x69\x6e\x67\124\157\104\145\166\x69\x63\145\x50\x61\171\x54\x79\160\x65")) { function stringToDevicePayType($string) { if ($string == "\x50\x61\x79\120\x65\x72\x56\151\x65\167") { return enumToString(new EDevicePayType(), (new EDevicePayType())->eDevicePayPerView); } else { if ($string == "\115\157\x6e\x74\x68\154\171\x50\162\145\160\x61\151\x64") { return enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyPrepaid); } else { if ($string == "\x4d\x6f\156\x74\x68\x6c\x79\106\154\x61\x74\x41") { return enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyFlatA); } else { if ($string == "\115\x6f\156\164\150\x6c\x79\x46\154\141\164\x42") { return enumToString(new EDevicePayType(), (new EDevicePayType())->eDeviceMonthlyFlatB); } else { return enumToString(new EDevicePayType(), (new EDevicePayType())->eDevicePayTypeNone); } } } } } } if (!function_exists("\x73\x74\x72\x69\156\147\124\x6f\x44\x65\x76\x69\x63\145\x50\x61\x79\123\164\141\x74\165\163")) { function stringToDevicePayStatus($string) { if ($string == "\125\156\160\x61\151\x64") { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); } else { if ($string == "\117\x76\145\x72\144\165\145") { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayOverdue); } else { if ($string == "\x50\x61\x69\144") { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePaid); } else { if ($string == "\103\x61\x6e\x63\x65\154\145\x64") { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayCancel); } else { if ($string == "\x52\145\146\165\156\x64\x65\x64") { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayRefund); } else { return enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDevicePayStatusNone); } } } } } } } if (!function_exists("\163\164\162\x69\156\147\x54\157\x44\145\x76\151\x63\145\x53\x61\x6c\x65\163\x54\x79\x70\x65")) { function stringToDeviceSalesType($string) { if ($string == "\x4e\157\x72\x6d\141\x6c") { return enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eNormalDevice); } else { if ($string == "\123\155\x61\x72\164\120\x61\171") { return enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice); } else { return enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eUnknownDevice); } } } } if (!function_exists("\x75\164\x66\x38\x5f\x6f\162\144")) { function utf8_ord($ch) { $len = strlen($ch); if ($len <= 0) { return false; } $h = ord($ch[0]); if ($h <= 0x7f) { return $h; } if ($h < 0xc2) { return false; } if ($h <= 0xdf && $len > 1) { return ($h & 0x1f) << 6 | ord($ch[1]) & 0x3f; } if ($h <= 0xef && $len > 2) { return ($h & 0xf) << 12 | (ord($ch[1]) & 0x3f) << 6 | ord($ch[2]) & 0x3f; } if ($h <= 0xf4 && $len > 3) { return ($h & 0xf) << 18 | (ord($ch[1]) & 0x3f) << 12 | (ord($ch[2]) & 0x3f) << 6 | ord($ch[3]) & 0x3f; } return false; } } if (!function_exists("\147\145\164\x43\x68\157\x53\x75\156\x67")) { function getChoSung($str) { $cho = array("\343\x84\xb1", "\xe3\x84\262", "\343\204\xb4", "\xe3\x84\267", "\343\204\270", "\xe3\x84\xb9", "\343\x85\201", "\xe3\x85\202", "\343\205\x83", "\xe3\205\x85", "\xe3\x85\206", "\343\x85\207", "\343\x85\210", "\343\205\211", "\343\x85\212", "\343\205\213", "\xe3\205\214", "\xe3\x85\x8d", "\xe3\205\x8e"); $result = ''; for ($i = 0; $i < mb_strlen($str, "\125\x54\x46\x2d\70"); $i++) { $code = utf8_ord(mb_substr($str, $i, 1, "\x55\x54\106\55\70")) - 44032; if ($code > -1 && $code < 11172) { $cho_idx = $code / 588; $result .= $cho[$cho_idx]; } } return $result; } } if (!function_exists("\x63\165\x72\x72\145\156\164\104\x61\x74\145\102\171\x46\x6f\x72\155\x61\164")) { function currentDateByFormat($format = DATEFORMAT_ISO8601) { if (array_key_exists($format, DATAFORMAT)) { return date(DATAFORMAT[$format]); } else { return date(DATAFORMAT[DATEFORMAT_ISO8601]); } } } if (!function_exists("\143\x6f\156\166\145\162\x74\104\141\164\x65\x42\x79\106\157\162\x6d\x61\x74")) { function convertDateByFormat($format, $date) { try { $dateTime = new DateTime($date); } catch (Exception $e) { vt_loge("\124\150\x65\40\144\x61\164\145\x54\151\155\x65\40\x66\x6f\162\x6d\141\164\40\151\163\40\156\x6f\x74\40\x76\x61\154\151\x64\x2e\54\40\44\144\141\164\145\75" . $date); $dateTime = new DateTime(); } if (array_key_exists($format, DATAFORMAT)) { return $dateTime->format(DATAFORMAT[$format]); } else { return $dateTime->format(DATAFORMAT[DATEFORMAT_ISO8601]); } } } if (!function_exists("\x63\x75\x72\x72\x65\156\164\104\141\x74\145\x46\x6f\x72\155\141\164")) { function currentDateFormat() { if (func_num_args() == 0) { return currentDateByFormat(DATEFORMAT_ISO8601); } else { if (func_num_args() == 1) { $args = func_get_args(); return currentDateByFormat($args[0]); } else { if (func_num_args() == 2) { $args = func_get_args(); return convertDateByFormat($args[0], $args[1]); } } } } } if (!function_exists("\144\x62\x4d\157\144\141\154\x69\164\x79\x53\x74\162\x69\x6e\x67\124\157\105\x6d\157\x64\141\x6c\x69\x74\171")) { function dbModalityStringToEmodality($string) { if ($string == "\x50\141\x6e\x6f\162\x61\x6d\141") { return "\x65\x50\141\x6e\x6f\x72\141\x6d\x61"; } if ($string == "\103\145\x70\x68\x61\x6c\x6f") { return "\145\x43\x65\x70\150\x61\154\x6f"; } if ($string == "\x43\x54") { return "\145\103\124"; } if ($string == "\x49\117\x53\x65\156\x73\157\x72") { return "\145\x49\117\123\145\156\163\157\x72"; } if ($string == "\111\117\103\x61\x6d\x65\x72\141") { return "\x65\111\117\x43\141\155\145\162\x61"; } if ($string == "\111\117\x58\x52\x61\x79") { return "\145\x49\x4f\130\x52\x61\171"; } if ($string == "\104\123\x4c\122") { return "\145\104\123\x4c\122"; } if ($string == "\124\150\162\x65\x65\104\x50\150\x6f\164\x6f") { return "\145\x54\150\162\x65\145\104\x50\150\157\x74\x6f"; } if ($string == "\x49\155\160\162\145\x73\x73\151\157\156") { return "\145\111\x6d\x70\x72\x65\x73\x73\x69\x6f\x6e"; } if ($string == "\x49\117\123\x63\141\x6e\x6e\x65\x72") { return "\x65\x49\x4f\123\x63\141\156\x6e\145\162"; } if ($string == "\103\x61\x70\164\x75\x72\145") { return "\x65\x43\x61\x70\164\x75\x72\x65"; } if ($string == "\117\164\150\145\x72") { return "\x65\117\x74\x68\145\162"; } if ($string == "\106\151\x6c\x65") { return "\145\x46\151\x6c\x65"; } if ($string == "\x44\x6f\156\x74\x43\x61\162\x65") { return "\145\104\x6f\156\164\x43\x61\x72\x65"; } if ($string == "\101\156\x79\x4d\157\x64\141\154\x69\164\171") { return "\x65\101\x6e\x79\x4d\157\x64\141\154\151\164\171"; } if ($string == "\x54\150\162\145\x65\x44\117\x62\152\x65\x63\164") { return "\145\x54\x68\162\145\145\x44\x4f\x62\152\x65\x63\x74"; } return "\x65\x55\156\x6b\x6e\157\167\x6e"; } } if (!function_exists("\163\x68\157\x77\x44\102\x4d\157\144\x61\x6c\x69\164\171\x53\x74\x72\x69\156\x67\x54\x6f\105\x6d\157\x64\141\154\151\x74\x79")) { function showDBModalityStringToEmodality($string) { return dbModalityStringToEmodality($string); } } if (!function_exists("\x6d\x6f\x64\141\154\x69\164\171\x5f\x61\x70\x69\137\x73\164\162\137\164\x6f\x5f\x6d\157\x64\141\x6c\x69\164\x79\137\144\142\137\163\x74\162")) { function modality_api_str_to_modality_db_str($string) { $modality = EmodalityTransfer::StringToEmodality($string); return EmodalityTransfer::EModalityToStringDeliverer($modality); } } if (!function_exists("\x73\164\x72\x69\156\147\x54\157\x49\155\x61\x67\145\120\x61\171\123\x74\141\164\x75\x73")) { function stringToImagePayStatus($strImagePayStatus) { if ($strImagePayStatus === "\x55\x6e\160\141\151\144") { return enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImageUnpaidStatus); } else { if ($strImagePayStatus === "\x50\141\x69\144") { return enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus); } else { return enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePayStausNone); } } } } if (!function_exists("\163\164\162\151\156\147\x54\x6f\x49\155\x61\x67\x65\122\145\x70\x6f\x72\164\x53\164\141\164\x75\x73")) { function stringToImageReportStatus($strImageReportStatus) { if ($strImageReportStatus == "\x4e\x6f\x74\122\145\x70\157\x72\164\x65\x64") { return enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageNotReported); } else { if ($strImageReportStatus == "\122\x65\160\157\162\164\145\144") { return enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageReported); } else { return enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageReportStatusNone); } } } } if (!function_exists("\111\x6d\141\147\x65\122\x65\x70\x6f\162\164\x53\164\x61\164\165\163\124\157\x53\164\162\151\156\147")) { function ImageReportStatusToString($eImageReportStatus) { if ($eImageReportStatus == enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageReportStatusNone)) { return "\116\x6f\x6e\145"; } else { if ($eImageReportStatus == enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageNotReported)) { return "\x4e\x6f\x74\122\145\x70\157\162\x74\145\x64"; } else { if ($eImageReportStatus == enumToString(new EImageReportStatus(), (new EImageReportStatus())->eImageReported)) { return "\x52\145\x70\157\162\164\x65\x64"; } else { return ''; } } } } } if (!function_exists("\163\x74\x72\151\156\147\124\x6f\x49\x6d\141\147\x65\x50\x61\171\x54\171\160\145")) { function stringToImagePayType($strImagePayType) { if ($strImagePayType === "\x50\x61\171\x50\x65\x72\x56\151\x65\167") { return enumToString(new EImagePayType(), (new EImagePayType())->eImagePayPerView); } else { if ($strImagePayType === "\x4d\x6f\x6e\x74\150\x6c\x79\x50\x72\145\x70\141\151\x64") { return enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyPrepaid); } else { if ($strImagePayType === "\x4d\x6f\x6e\x74\x68\x6c\171\106\x6c\x61\164\101") { return enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatA); } else { if ($strImagePayType === "\115\157\x6e\x74\x68\x6c\x79\x46\154\141\x74\102") { return enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatB); } else { if ($strImagePayType === "\x55\156\160\x61\x69\144") { return enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType); } else { if ($strImagePayType === "\124\145\163\x74") { return enumToString(new EImagePayType(), (new EImagePayType())->eImagePayTestType); } else { return enumToString(new EImagePayType(), (new EImagePayType())->eImagePayTypeNone); } } } } } } } } if (!function_exists("\x65\156\165\155\x54\x6f\x53\164\162\151\x6e\x67")) { function enumToString($enum, $name) { $properties = get_object_vars($enum); foreach ($properties as $key => $value) { if ($value == $name) { return $key; } } return false; } } if (!function_exists("\x73\157\165\x72\x63\x65\x54\x79\160\x65\105\156\165\x6d\62\x53\x74\x72\151\156\147")) { function sourceTypeEnum2String($sourceType) { switch ($sourceType) { case "\x65\125\x6e\x6b\x6e\x6f\167\x6e\123\157\x75\162\x63\x65\124\171\x70\x65": return "\x55\x6e\153\x6e\157\167\156"; case "\145\114\151\x6e\x6b\x61\x67\x65\137\x78\155\154\123\x6f\x75\162\143\x65\124\x79\160\x65": return "\114\x69\156\153\x61\x67\145\x2e\x78\155\154"; case "\145\x45\172\120\151\143\x6b\145\162\123\157\165\162\x63\145\124\x79\160\x65": return "\x45\x7a\120\151\x63\x6b\x65\x72"; case "\145\x45\172\x42\x72\x69\144\x67\x65\x53\157\x75\162\143\145\x54\171\x70\x65": return "\x45\x7a\x42\x72\x69\x64\x67\145"; case "\x65\x45\x53\123\x79\x6e\143\x72\157\x53\x6f\165\x72\143\x65\124\x79\160\x65": return "\105\123\123\x79\x6e\x63\162\157"; case "\x65\x45\172\104\145\156\164\x5f\x69\123\x6f\x75\x72\143\145\124\171\160\145": return "\105\172\x44\x65\x6e\x74\55\x69"; case "\x65\x45\172\x33\x44\137\x69\123\x6f\x75\x72\143\x65\124\x79\x70\x65": return "\x45\x7a\63\104\x2d\151"; case "\145\x45\172\63\104\x50\x6c\165\163\x53\x6f\165\162\x63\x65\x54\x79\x70\145": return "\105\172\63\104\120\x6c\x75\163"; case "\145\x45\172\x4f\162\x74\x68\x6f\x53\157\x75\162\x63\145\124\171\160\x65": return "\x45\x7a\117\162\164\150\157"; case "\x65\x4d\x69\147\x72\141\164\151\x6f\156\x53\x6f\x75\162\x63\x65\124\171\160\x65": return "\115\151\147\x72\x61\x74\151\x6f\156"; case "\145\x45\164\143\x53\157\165\162\143\145\124\x79\160\x65": return "\105\x74\x63"; case "\145\105\172\117\x72\164\150\x6f\115\151\x67\162\x61\164\151\x6f\x6e\123\157\x75\x72\143\x65\x54\x79\x70\145": return "\x45\172\x4f\x72\164\150\x6f\x4d\151\x67\x72\141\164\151\157\x6e"; default: return "\x55\x6e\x6b\x6e\157\167\x6e"; } } } diff --git a/server/original/www/ezwebserver/src/application/helpers/vt_config_helper.php b/server/original/www/ezwebserver/src/application/helpers/vt_config_helper.php index f7dd8c8..a3a1473 100644 --- a/server/original/www/ezwebserver/src/application/helpers/vt_config_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/vt_config_helper.php @@ -1,7 +1,7 @@ format = "\152\160\x67"; $options->quality = $imgOption["\x71\x75\x61\x6c\151\x74\171"]; $options->widthPixels = $imgOption["\167\x69\x64\x74\150"]; $options->heightPixels = $imgOption["\150\x65\151\147\150\x74"]; $options->voiWindow = 1; $convertCT = new DCMTKWrapper(); $ret = $convertCT->convert($dstImgPath, $srcImgPath, $options); if ($ret != VSUCCESS) { vt_loge("\105\x72\162\x6f\162\x20\164\x6f\40\x63\x6f\x6e\x76\145\162\x74\x20\x69\155\141\147\x65\40\146\x72\157\x6d\x20\x28" . $srcImgPath . "\51\x20\x74\x6f\40\50" . $dstImgPath . "\x29"); return $ret; } } else { $img = new Imagick($srcImgPath); if ($imgOption["\164\x68\165\x6d\x62\156\x61\x69\154"]) { $img->thumbnailImage($imgOption["\x77\151\x64\x74\x68"], $imgOption["\x68\145\151\x67\150\164"], $imgOption["\142\145\163\x74\146\151\164"], $imgOption["\x66\x69\154\x6c"]); $img->setcompressionquality($imgOption["\x71\x75\141\x6c\x69\x74\x79"]); $img->writeImage($dstImgPath); } $img->destroy(); } } catch (Exception $ex) { vt_loge("\105\162\x72\157\x72\40\x69\x6e\x20\x6d\141\153\x69\x6e\x67\x20\x61\40\x74\150\165\155\142\x6e\x61\151\x6c\40\146\x69\x6c\x65\40\x66\162\157\155\40\50" . $srcImgPath . "\51\x20\167\151\x74\x68\x20\50" . $imgOption["\x74\150\165\155\x62\x6e\141\151\154"] . "\x29"); return VERR_COMMON_IO; } return VSUCCESS; } } diff --git a/server/original/www/ezwebserver/src/application/helpers/vt_iosensor_helper.php b/server/original/www/ezwebserver/src/application/helpers/vt_iosensor_helper.php index 788acb1..84056e7 100644 --- a/server/original/www/ezwebserver/src/application/helpers/vt_iosensor_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/vt_iosensor_helper.php @@ -1,7 +1,7 @@ EventsR2_model->post_EventsR2(["\x65\166\x65\x6e\x74\124\171\160\x65" => $evtLogType, "\141\x70\x70\x4e\141\x6d\145" => $appName, "\x75\x73\x65\162\x4e\141\155\x65" => $accountName, "\155\x65\163\163\141\147\145" => $message]); } } } diff --git a/server/original/www/ezwebserver/src/application/helpers/vt_pg_json_helper.php b/server/original/www/ezwebserver/src/application/helpers/vt_pg_json_helper.php index f439307..6501e68 100644 --- a/server/original/www/ezwebserver/src/application/helpers/vt_pg_json_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/vt_pg_json_helper.php @@ -1,7 +1,7 @@ db->select("{$idColumnName}\x2c{$jsonColumnName}"); $model->db->from($tableName); $model->db->like("\143\x61\163\x74\x28{$jsonColumnName}\x20\141\x73\40\166\141\162\x63\x68\141\162\x29", "\42{$value}\42"); $ret = $model->db->get()->result_array(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $paramjson = json_decode($row[$jsonColumnName]); foreach ($paramjson->{"\x70\x61\x72\x61\155\x73"} as $paramrow) { if (strcasecmp($paramrow->{"{$keyName}"}, $value) == 0) { array_push($items, $row[$idColumnName]); break; } } } } return $items; } } if (!function_exists("\147\145\164\126\x61\154\165\x65\x73\111\x6e\x54\x61\142\x6c\145\112\x73\x6f\x6e\x50\141\x72\141\x6d\163")) { function getValuesInTableJsonParams($model, $tableName, $jsonColumnName, $keyName) { $model->db->select("{$jsonColumnName}"); $model->db->from($tableName); $model->db->like("\x63\141\x73\164\50{$jsonColumnName}\40\141\x73\40\x76\141\x72\x63\150\x61\x72\x29", "\42{$keyName}\x22"); $ret = $model->db->get()->result_array(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $paramjson = json_decode($row[$jsonColumnName]); $items = array_merge($items, array_column(array_values($paramjson->{"\160\141\x72\x61\155\x73"}), $keyName)); } } return $items; } } if (!function_exists("\x67\145\x74\x56\x61\154\x75\145\163\x49\x6e\112\x73\x6f\x6e\x50\x61\162\141\155\x73")) { function getValuesInJsonParams($rows, $jsonColumnName, $keyName) { $items = array(); foreach ($rows as $row) { $paramjson = json_decode($row[$jsonColumnName]); $items = array_merge($items, array_column(array_values($paramjson->{"\160\x61\x72\141\x6d\163"}), $keyName)); } return $items; } } if (!function_exists("\x72\x65\x6d\157\166\x65\106\162\157\x6d\x4a\163\x6f\156\x50\x61\x72\x61\x6d\163")) { function removeFromJsonParams($model, $tableName, $jsonColumnName, $idColumnName, $keyName, $value) { $model->db->select("{$idColumnName}\x2c{$jsonColumnName}"); $model->db->from($tableName); $model->db->like("\x63\x61\x73\x74\x28{$jsonColumnName}\40\x61\x73\40\166\x61\x72\143\x68\141\162\51", "\x22{$value}\x22"); $ret = $model->db->get()->result_array(); $items = array(); if (count($ret) > 0) { foreach ($ret as $row) { $removed = FALSE; $paramjson = json_decode($row[$jsonColumnName]); $params = $paramjson->{"\160\x61\x72\x61\x6d\x73"}; foreach ($params as $key => $paramrow) { if (strcasecmp($paramrow->{"{$keyName}"}, $value) == 0) { unset($params[$key]); $removed = TRUE; } } if ($removed == TRUE) { $model->db->set($jsonColumnName, json_encode(array("\160\141\162\x61\x6d\163" => array_values($params)))); $model->db->where($idColumnName, $row[$idColumnName]); $model->db->update($tableName); } } } } } diff --git a/server/original/www/ezwebserver/src/application/helpers/vt_video_file_helper.php b/server/original/www/ezwebserver/src/application/helpers/vt_video_file_helper.php index de7eea6..b565569 100644 --- a/server/original/www/ezwebserver/src/application/helpers/vt_video_file_helper.php +++ b/server/original/www/ezwebserver/src/application/helpers/vt_video_file_helper.php @@ -1,7 +1,7 @@ $ffmpeg_path . "\134\142\x69\x6e\x5c\x66\x66\155\x70\145\x67\x2e\145\170\145", "\146\146\x70\x72\x6f\x62\x65\x2e\x62\151\x6e\x61\x72\151\145\163" => $ffmpeg_path . "\134\x62\x69\156\134\146\x66\160\162\x6f\142\x65\56\x65\x78\x65", "\x74\x69\155\145\x6f\165\164" => 3600, "\146\146\x6d\160\145\147\56\x74\150\162\x65\141\x64\163" => 12]); $video = $ffmpeg->open($input_file); $format = new FFMpeg\Format\Video\X264(); $format->setAudioCodec("\x6c\x69\142\155\x70\x33\x6c\141\x6d\x65")->setAudioChannels(1)->setAdditionalParameters(array("\x2d\x78\x32\66\64\157\x70\164\163", "\153\x65\171\151\x6e\x74\75\61\x30"))->setKiloBitrate(158)->setAudioKiloBitrate(158); $video->save($format, $output_file_mp4); rename($output_file_mp4, $output_file); return TRUE; } catch (Exception $ex) { return $ex->getMessage(); } } } if (!function_exists("\144\x65\x63\162\x79\160\164\137\x70\x72\157\x76\x69\x64\145\144\x5f\143\x6f\156\163\165\154\x74\137\166\x69\x64\x65\x6f")) { function decrypt_provided_consult_video($input_file, $decrypted_file) { $VT_CONSULT_FILE_SIGNATURE = "\x56\x54\123\120\x4f\x49\114\105\122"; $VT_CONSULT_FILE_SIGNATURE_SIZE = 9; $fileBefore = file_get_contents($input_file); if ($VT_CONSULT_FILE_SIGNATURE === substr($fileBefore, 0, $VT_CONSULT_FILE_SIGNATURE_SIZE)) { $data = strrev($fileBefore); file_put_contents($decrypted_file, $data); chmod($decrypted_file, 0777); } } } diff --git a/server/original/www/ezwebserver/src/application/hooks/DisplayHook.php b/server/original/www/ezwebserver/src/application/hooks/DisplayHook.php index 0d993a7..b148864 100644 --- a/server/original/www/ezwebserver/src/application/hooks/DisplayHook.php +++ b/server/original/www/ezwebserver/src/application/hooks/DisplayHook.php @@ -1,7 +1,7 @@ CI =& get_instance(); $output = $this->CI->output->get_output(); if (ENVIRONMENT != "\x74\145\163\x74\151\x6e\x67") { echo $output; } } } diff --git a/server/original/www/ezwebserver/src/application/language/arabic/calendar_lang.php b/server/original/www/ezwebserver/src/application/language/arabic/calendar_lang.php index 6d1addc..0329659 100644 --- a/server/original/www/ezwebserver/src/application/language/arabic/calendar_lang.php +++ b/server/original/www/ezwebserver/src/application/language/arabic/calendar_lang.php @@ -1,7 +1,7 @@ newAESEngine(); $props = new AESProperties(); $props->cipherMode = CipherMode::CBC; $props->paddingMode = PaddingMode::Zeros; $props->keySize = ChunkSize::e256bits; $props->blockSize = ChunkSize::e256bits; $engine->setProperties($props); $engine->setKey($key); $engine->setIV($iv); $engine->encrypt($data, $body); $header = "\x4" . StrUtils::int2bytes(mb_strlen($data, "\70\142\151\164")) ^ $magic; $output = $header . $body; return $output; } public static function xor_string($string, $key) { $stringLen = strlen($string); $keyLen = strlen($key); for ($i = 0; $i < $stringLen; $i++) { $string[$i] = $string[$i] ^ $key[$i % $keyLen]; } return $string; } public static function decrypt_aes_with_magic($data, $key, $iv = null, $magic = null, $cipher = null, $mode = null) { if (is_null($iv)) { $iv = self::$_IV; } if (is_null($magic)) { $magic = self::$_MAGIC; } $body = substr($data, 5); $header = substr($data, 0, 5) ^ $magic; $size_type = substr($header, 0, 1); if ($size_type != "\x4") { throw new InvalidHeaderException(); } $size_data = StrUtils::bytes2int(substr($header, 1, 4)); $factory = CryptoUtils::getCryptoClassFactory(CryptoUtils::PHPSECLIB); $engine = $factory->newAESEngine(); $props = new AESProperties(); $props->cipherMode = CipherMode::CBC; $props->paddingMode = PaddingMode::Zeros; $props->keySize = ChunkSize::e256bits; $props->blockSize = ChunkSize::e256bits; $engine->setProperties($props); $engine->setKey($key); $engine->setIV($iv); $ret = $engine->decrypt($body, $decrypted); return substr($decrypted, 0, $size_data); } public static function getCryptoClassFactory($name = CryptoUtils::PHPSECLIB) { switch ($name) { case CryptoUtils::PHPSECLIB: return new VTPhpseclibCryptoClassFactory(); default: vt_loge("\125\156\163\165\160\x70\x6f\162\x74\x65\144\x20\103\162\171\x70\164\x6f\103\x6c\x61\x73\x73\106\141\143\x74\157\162\171\x3a\x20" . $name); throw new \InvalidArgumentException("\125\x6e\163\x75\x70\x70\x6f\162\x74\x65\144\x20\x43\162\171\x70\164\157\x43\x6c\141\163\x73\106\x61\x63\x74\157\162\171\x3a\x20" . $name); } } public static function pad($src, $paddingMode, $blockSize) { $blockSizeInBytes = $blockSize / 8; switch ($paddingMode) { case PaddingMode::NoPadding: return $src; case PaddingMode::Zeros: $pad = $blockSizeInBytes - strlen($src) % $blockSizeInBytes; $dst = $src . str_repeat(chr(0), $pad); return $dst; case PaddingMode::PKCS7: $pad = $blockSizeInBytes - strlen($src) % $blockSizeInBytes; $dst = $src . str_repeat(chr($pad), $pad); return $dst; case PaddingMode::OneAndZeros: $pad = $blockSizeInBytes - strlen($src) % $blockSizeInBytes; $dst = $src . chr(0x80) . str_repeat(chr(0), $pad - 1); return $dst; default: vt_loge("\x55\156\163\x75\160\160\157\162\164\x65\144\x20\160\141\144\144\x69\156\x67\x20\x6d\157\x64\x65\x3a\40" . $paddingMode); throw new \InvalidArgumentException("\125\x6e\x73\165\x70\160\x6f\162\164\x65\x64\40\x70\x61\x64\144\x69\156\147\40\155\157\x64\x65\72\40" . $paddingMode); } } public static function unpad($src, $paddingMode, $blockSize) { if (strlen($src) == 0) { throw new \InvalidArgumentException("\116\157\x20\151\x6e\160\x75\164\40\x64\x61\x74\x61\x2e"); } $blockSizeInBytes = $blockSize / 8; switch ($paddingMode) { case PaddingMode::NoPadding: return $src; case PaddingMode::Zeros: for ($i = 0; $i < $blockSizeInBytes; $i++) { if (ord($src[strlen($src) - 1 - $i]) != 0x0) { $pos = $i; break; } } return substr($src, 0, strlen($src) - $pos); case PaddingMode::PKCS7: $pad = ord($src[($len = strlen($src)) - 1]); $len = strlen($src); $pad = ord($src[$len - 1]); $dst = substr($src, 0, strlen($src) - $pad); return $dst; case PaddingMode::OneAndZeros: for ($i = 0; $i < $blockSizeInBytes; $i++) { $chr = ord($src[strlen($src) - 1 - $i]); if ($chr === 0x80) { $pos = $i + 1; break; } else { if ($chr != 0x0) { throw new \InvalidArgumentException("\116\157\x74\40\117\x6e\x65\40\141\x6e\x64\x20\132\145\162\x6f\163\40\x70\x61\x64\144\x69\156\x67\56"); } } } return substr($src, 0, strlen($src) - $pos); default: vt_loge("\x55\156\x73\165\160\160\157\x72\x74\x65\144\40\x70\x61\x64\144\x69\x6e\147\x20\155\x6f\x64\145\x3a\40" . $paddingMode); throw new \InvalidArgumentException("\125\156\x73\165\160\160\x6f\x72\164\145\x64\40\160\141\144\x64\151\156\x67\x20\x6d\x6f\x64\x65\x3a\x20" . $paddingMode); } } } class InvalidHeaderException extends Exception { } diff --git a/server/original/www/ezwebserver/src/application/libraries/CurrentDateTimeFilter.php b/server/original/www/ezwebserver/src/application/libraries/CurrentDateTimeFilter.php index 320c136..9ff26e6 100644 --- a/server/original/www/ezwebserver/src/application/libraries/CurrentDateTimeFilter.php +++ b/server/original/www/ezwebserver/src/application/libraries/CurrentDateTimeFilter.php @@ -1,7 +1,7 @@ acqTime = $acqTime; } function filter(&$acquisitionTimestamp) { $dicomDateTime = new Datetime(); $acquisitionTimestamp = DateTime::createFromFormat(DATAFORMAT[DATEFORMAT_DCM], $dicomDateTime->format(DATAFORMAT[DATEFORMAT_DCM]))->getTimestamp(); return true; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/DCMTKWrapper.php b/server/original/www/ezwebserver/src/application/libraries/DCMTKWrapper.php index 0d3d621..270a3c5 100644 --- a/server/original/www/ezwebserver/src/application/libraries/DCMTKWrapper.php +++ b/server/original/www/ezwebserver/src/application/libraries/DCMTKWrapper.php @@ -1,7 +1,7 @@ $inputFilePath)); $convert_cmd = "\42" . BIN_DCMJ2PNM . "\42\x20\x2b\157\152" . "\x20\x2b\112\x71\40" . $options->quality; if ($dicom->getTagValue(tagColumns) * 3 > $dicom->getTagValue(tagRows) * 4) { $convert_cmd .= "\x20\53\123\x78\166\x20" . $options->widthPixels; } else { $convert_cmd .= "\x20\x2b\x53\x79\x76\x20" . $options->heightPixels; } if ($dicom->getTagValue(tagSamplesPerPixel) == 1 && ($dicom->getTagValue(tagNumberOfFrames) == false || $dicom->getTagValue(tagNumberOfFrames) == 1)) { $convert_cmd .= "\x20\x2b\127\x69\40" . $options->voiWindow; } else { if ($dicom->getTagValue(tagNumberOfFrames) > 1) { $convert_cmd .= "\x20\x2b\x46\x20" . round((float) $dicom->getTagValue(tagNumberOfFrames) / 2); } } $convert_cmd .= "\x20\42" . $inputFilePath . "\42" . "\x20\42" . $outputFilePath . "\x22"; try { $descriptorspec = array(1 => array("\x70\x69\160\145", "\167"), 2 => array("\160\x69\x70\145", "\167")); $process = proc_open($convert_cmd, $descriptorspec, $pipes, null, null, array("\x62\171\x70\x61\163\x73\x5f\x73\x68\145\154\154" => true)); $stdout = stream_get_contents($pipes[1]); $stderr = stream_get_contents($pipes[2]); fclose($pipes[1]); fclose($pipes[2]); $returnCode = proc_close($process); if ($returnCode == 0) { return VSUCCESS; } else { if ($returnCode == 1 && strpos($stdout, "\x4e\157\40\163\x75\x63\150\40\x66\x69\x6c\x65\x20\157\x72\x20\x64\151\x72\x65\x63\x74\x6f\162\171")) { vt_loge(__METHOD__ . "\x3a\x20\116\157\x20\163\x75\143\x68\40\x66\151\154\x65\40\157\x72\40\x64\151\x72\x65\143\x74\157\162\171\x3a\40\x72\145\141\144\151\x6e\147\40\146\x69\x6c\145\x3a\40" . $inputFilePath); return VERR_COMMON_NOFILE; } else { if ($returnCode == 1 && strpos($stdout, "\111\156\x76\x61\x6c\151\144\x20\x76\x61\154\x75\x65\40\146\157\162\40\x6f\x70\x74\x69\157\156")) { vt_loge(__METHOD__ . "\72\x20\x49\x6e\x76\x61\x6c\151\x64\40\x76\x61\x6c\165\145\40\146\157\x72\x20\x6f\160\x74\151\157\156\72\40" . $convert_cmd); return VERR_COMMON_INVALID; } else { vt_loge(__METHOD__ . "\72\x20\x55\x6e\153\x6e\157\167\x6e\40\x65\x72\162\157\x72\x2c\x20\143\157\155\x6d\x61\156\x64\x3a\40" . $convert_cmd); vt_loge(__METHOD__ . "\x3a\40\x55\156\x6b\x6e\157\x77\x6e\40\145\x72\162\x6f\162\x2c\40\163\164\x64\157\x75\x74\72\40" . $stdout); vt_loge(__METHOD__ . "\x3a\x20\125\x6e\x6b\156\157\x77\x6e\40\x65\162\162\157\x72\x2c\x20\163\164\x64\x65\x72\162\72\x20" . $stderr); vt_loge(__METHOD__ . "\x3a\x20\125\156\153\156\x6f\167\156\x20\x65\x72\x72\157\x72\54\40\162\x65\164\165\x72\156\x20\x63\157\144\x65\72\x20" . $returnCode); return VERR_PHP_ERROR; } } } } catch (Exception $ex) { vt_loge(__METHOD__ . "\x3a\40\105\162\162\x6f\x72\x20\151\x6e\40\x6d\141\153\x69\156\x67\x20\x61\x20\x74\150\x75\x6d\x62\156\x61\151\x6c\x20\146\151\154\x65\x20\x66\162\x6f\155\40\x28" . $inputFilePath . "\51\40\x62\141\143\141\165\x73\145\40\157\x66\40\50" . $ex . "\x29"); return VERR_COMMON_IO; } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/DicomTagDateTimeFilter.php b/server/original/www/ezwebserver/src/application/libraries/DicomTagDateTimeFilter.php index 79668d5..986ced8 100644 --- a/server/original/www/ezwebserver/src/application/libraries/DicomTagDateTimeFilter.php +++ b/server/original/www/ezwebserver/src/application/libraries/DicomTagDateTimeFilter.php @@ -1,7 +1,7 @@ dicomHandler = $dicomHandler; $this->tagDate = $tagDate; $this->tagTime = $tagTime; } function filter(&$acquisitionTimestamp) { if (!isset($this->dicomHandler)) { return false; } $dicomDateTime = $this->dicomHandler->getTagValue($this->tagDate) . "\x20" . substr($this->dicomHandler->getTagValue($this->tagTime), 0, 6); $dicomTimestamp = DateTime::createFromFormat(DATAFORMAT[DATEFORMAT_DCM], $dicomDateTime); if (json_encode($dicomTimestamp) != "\146\x61\x6c\x73\145") { $acquisitionTimestamp = $dicomTimestamp->getTimestamp(); } if ($acquisitionTimestamp == '') { return false; } return true; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/EmodalityTransfer.php b/server/original/www/ezwebserver/src/application/libraries/EmodalityTransfer.php index 99692a0..d9a7407 100644 --- a/server/original/www/ezwebserver/src/application/libraries/EmodalityTransfer.php +++ b/server/original/www/ezwebserver/src/application/libraries/EmodalityTransfer.php @@ -1,7 +1,7 @@ GetGroupingModeData() as $key => $value) { if ($eGroupingMode === $value) { return $key; } } return false; } public static function GroupingModeFromString($sGroupingMode) { foreach ($this->GetGroupingModeData() as $key => $value) { if ($sGroupingMode === $key) { return $value; } } return false; } private static function GetSourceTypeData() { $data["\x65\125\x6e\x6b\x6e\157\x77\156\x53\157\165\162\143\x65\x54\x79\x70\x65"] = ESourceType::eUnknownSourceType; $data["\145\114\151\x6e\x6b\141\147\x65\137\x78\x6d\154\x53\x6f\165\162\143\145\124\171\x70\x65"] = ESourceType::eLinkage_xmlSourceType; $data["\x65\105\172\x50\151\x63\153\145\x72\x53\157\x75\x72\x63\x65\x54\171\160\145"] = ESourceType::eEzPickerSourceType; $data["\x65\105\172\102\x72\151\144\x67\145\123\x6f\165\x72\143\145\124\171\x70\x65"] = ESourceType::eEzBridgeSourceType; $data["\x65\105\x53\x53\171\x6e\x63\162\x6f\123\x6f\x75\x72\143\x65\124\171\x70\145"] = ESourceType::eESSyncroSourceType; $data["\145\105\172\x44\145\x6e\x74\137\x69\123\157\165\x72\x63\x65\x54\171\x70\145"] = ESourceType::eEzDent_iSourceType; $data["\145\105\x7a\x33\104\x5f\x69\x53\x6f\165\x72\x63\145\124\x79\160\145"] = ESourceType::eEz3D_iSourceType; $data["\145\105\x7a\x33\x44\x50\x6c\165\163\x53\x6f\165\x72\143\145\124\x79\160\x65"] = ESourceType::eEz3DPlusSourceType; $data["\145\115\x69\x67\x72\141\x74\x69\157\156\x53\157\165\x72\143\145\124\x79\x70\145"] = ESourceType::eMigrationSourceType; $data["\x65\105\164\143\123\157\x75\162\x63\x65\x54\171\160\x65"] = ESourceType::eEtcSourceType; $data["\x65\124\x68\x69\x72\x64\120\x61\162\164\x79\123\x6f\x75\162\x63\x65\124\171\160\x65"] = ESourceType::eThirdPartySourceType; $data["\145\105\156\144\123\157\165\x72\x63\145\x54\171\160\145"] = ESourceType::eEndSourceType; $data["\x65\105\x7a\115\157\x62\x69\154\x65\123\157\165\x72\x63\145\124\171\x70\145"] = ESourceType::eEzMobileSourceType; $data["\145\104\145\x6e\164\x61\154\123\145\x72\x76\x69\143\x65\127\x65\142\x53\157\165\x72\143\x65\x54\x79\x70\x65"] = ESourceType::eDentalServiceWebSourceType; $data["\x65\x45\x7a\117\162\164\150\157\123\157\165\x72\x63\x65\124\171\160\145"] = ESourceType::eEzOrthoSourceType; $data["\145\x45\x7a\x4f\x72\x74\x68\157\115\x69\147\162\x61\164\x69\x6f\x6e\123\157\165\162\143\x65\124\x79\160\x65"] = ESourceType::eEzOrthoMigrationSourceType; return $data; } private static function GetSourceTypeForDatabase() { $data["\145\125\156\x6b\x6e\x6f\167\156\x53\x6f\x75\x72\x63\x65\124\x79\160\x65"] = "\125\x6e\153\x6e\x6f\167\x6e"; $data["\145\x4c\151\x6e\x6b\x61\147\145\x5f\170\155\154\x53\x6f\165\x72\x63\145\124\171\x70\145"] = "\x4c\x69\x6e\x6b\141\147\x65\56\x78\155\x6c"; $data["\145\x45\x7a\x50\x69\x63\x6b\x65\x72\123\157\165\x72\x63\x65\x54\x79\160\x65"] = "\105\172\120\151\143\153\x65\x72"; $data["\145\105\x7a\102\x72\x69\x64\x67\x65\x53\x6f\x75\x72\143\x65\124\171\x70\x65"] = "\105\x7a\102\x72\151\x64\147\145"; $data["\x65\x45\x53\x53\x79\x6e\x63\x72\x6f\123\x6f\165\162\x63\x65\124\x79\x70\145"] = "\x45\x53\123\x79\156\143\x72\x6f"; $data["\x65\x45\172\x44\145\x6e\164\x5f\x69\x53\x6f\165\162\x63\145\124\171\x70\x65"] = "\x45\172\104\145\156\x74\x2d\151"; $data["\x65\105\172\x33\104\x5f\x69\x53\157\x75\162\143\x65\124\x79\x70\x65"] = "\x45\172\x33\x44\55\x69"; $data["\145\x45\172\x33\104\x50\x6c\165\x73\x53\157\165\162\143\145\x54\171\x70\x65"] = "\105\x7a\63\x44\x50\154\x75\x73"; $data["\x65\x45\x7a\x4d\157\x62\151\x6c\145\123\157\x75\162\143\x65\x54\x79\160\x65"] = "\105\172\115\x6f\x62\x69\154\145"; $data["\x65\115\x69\x67\162\141\164\151\x6f\x6e\x53\157\x75\162\x63\145\x54\x79\160\145"] = "\115\x69\147\162\141\164\151\157\x6e"; $data["\145\x45\x74\x63\x53\157\x75\x72\143\x65\x54\171\x70\145"] = "\105\x74\x63"; $data["\145\105\x6e\144\123\157\165\162\x63\145\124\x79\160\145"] = ''; $data["\145\x45\172\115\x6f\142\x69\154\145\x53\x6f\165\x72\143\145\x54\171\160\x65"] = "\x45\172\115\157\142\x69\154\x65"; $data["\x65\x44\x65\156\x74\141\x6c\123\145\162\166\x69\143\145\127\145\x62\123\157\x75\162\143\145\124\x79\x70\145"] = "\x44\x65\156\164\141\x6c\123\x65\x72\x76\x69\143\x65\127\x65\x62"; $data["\x65\x45\172\117\x72\x74\150\157\123\x6f\x75\162\x63\145\x54\x79\160\x65"] = "\105\172\x4f\x72\164\150\157"; $data["\x65\105\172\x4f\162\164\x68\x6f\115\151\x67\x72\x61\164\x69\x6f\x6e\123\157\x75\x72\x63\145\x54\x79\160\x65"] = "\x45\172\117\x72\x74\150\157\115\151\x67\x72\x61\164\151\x6f\x6e"; return $data; } public static function SourceTypeToDatabaseString($sSourceType) { foreach (EmodalityTransfer::GetSourceTypeForDatabase() as $key => $value) { if ($sSourceType === $key) { return $value; } } return "\x55\156\153\x6e\x6f\167\156"; } public static function DatabaseStringToSourceType($dbSourceType) { foreach (EmodalityTransfer::GetSourceTypeForDatabase() as $key => $value) { if ($dbSourceType === $value) { return $key; } } return false; } public static function SourceTypeToString($eSourceType) { foreach (EmodalityTransfer::GetSourceTypeData() as $key => $value) { if ($eSourceType === $value) { return $key; } } return false; } public static function SourceTypeFromString($sSourceType) { foreach (EmodalityTransfer::GetSourceTypeData() as $key => $value) { if ($sSourceType === $key) { return $value; } } return false; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/Enum.php b/server/original/www/ezwebserver/src/application/libraries/Enum.php index 6a510d5..8d36fb3 100644 --- a/server/original/www/ezwebserver/src/application/libraries/Enum.php +++ b/server/original/www/ezwebserver/src/application/libraries/Enum.php @@ -1,7 +1,7 @@ $value) { if (isset($this->{$key})) { if (is_numeric($this->{$key})) { $count = (int) $this->{$key}; $count++; } else { $this->{$key} = $count; $count++; } } else { $this->{$key} = $count; $count++; } } } public static function isValidName($name) { $calledClass = get_called_class(); $properties = get_object_vars(new $calledClass()); return array_key_exists($name, $properties); } } abstract class BasicEnum { private static $constCacheArray = NULL; private function __construct() { } private static function getConstants() { if (self::$constCacheArray == NULL) { self::$constCacheArray = []; } $calledClass = get_called_class(); if (!array_key_exists($calledClass, self::$constCacheArray)) { $reflect = new ReflectionClass($calledClass); self::$constCacheArray[$calledClass] = $reflect->getConstants(); } return self::$constCacheArray[$calledClass]; } public static function isValidName($name, $strict = false) { $constants = self::getConstants(); if ($strict) { return array_key_exists($name, $constants); } $keys = array_map("\x73\x74\x72\164\x6f\154\157\167\x65\162", array_keys($constants)); return in_array(strtolower($name), $keys); } public static function isValidValue($value) { $values = array_values(self::getConstants()); return in_array($value, $values, $strict = true); } } class EModality extends BasicEnum { const ePanorama = 0; const eCephalo = 1; const eCT = 2; const eIOSensor = 3; const eIOCamera = 4; const eIOXRay = 5; const eDSLR = 6; const eThreeDPhoto = 7; const eImpression = 8; const eIOScanner = 9; const eCapture = 10; const eOther = 11; const eDontCare = 12; const eFile = 13; const eUnknown = 14; const MAX_MODALITY_COUNT = 15; const eAnyModality = 16; const eThreeDObject = 17; } class ELayoutCategory extends Enum { var $eAcquisition; var $eViewer; var $eGallery; var $eReport; var $eConsult; var $eAnalysis; } class EImageType extends Enum { var $eUnknownImage; var $eNormalDeviceImage; var $eSmartPayPaidImage; var $eSmartPayUnpaidImage; } class E3DViewerCOMBO extends Enum { var $e3DVCombo_Unknown = -1; var $e3DVCombo_1 = 0; var $e3DVCombo_2; var $e3DVCombo_3; var $e3DVCombo_Count; } class EScheduleTriggerType extends Enum { var $eRegularInterval = 1; var $eSpecfiedTime; } class EDeviceSalesType extends Enum { var $eUnknownDevice; var $eNormalDevice; var $eSmartPayDevice; } class EDevicePayType extends Enum { var $eDevicePayTypeNone; var $eDevicePayPerView; var $eDeviceMonthlyPrepaid; var $eDeviceMonthlyFlatA; var $eDeviceMonthlyFlatB; } class EDevicePayStatus extends Enum { var $eDevicePayStatusNone; var $eDeviceUnpaid; var $eDevicePayOverdue; var $eDevicePaid; var $eDevicePayCancel; var $eDevicePayRefund; } class EImagePayStatus extends Enum { var $eImagePayStausNone; var $eImageUnpaidStatus; var $eImagePaidStatus; } class EImageReportStatus extends Enum { var $eImageReportStatusNone; var $eImageNotReported; var $eImageReported; } class EImagePayType extends Enum { var $eImagePayTypeNone; var $eImagePayPerView; var $eImageMonthlyPrepaid; var $eImageMonthlyFlatA; var $eImageMonthlyFlatB; var $eImageUnpaidType; var $eImagePayTestType; } class EDoctorAccountType extends Enum { var $eDoctorAccountAll = 0; var $eDoctorAccountNone; var $eDoctorAccountName; } class EEventLogType extends Enum { var $eLoggedIn; var $eLoggedOut; var $eDataExported; var $eDataDeleted; var $eDataTransfered; var $eUserAdded; var $eUserDeleted; var $eUserModified; var $ePatientAdded; var $ePatientDeleted; var $ePatientModified; public static function getTypeString($enum) { switch ($enum) { case 0: return "\114\x4f\x47\111\116"; break; case 1: return "\x4c\x4f\x47\117\x55\124"; break; case 2: return "\x44\101\x54\x41\x20\x45\130\120\117\x52\124"; break; case 3: return "\104\101\124\101\x20\104\105\114\x45\x54\105"; break; case 4: return "\104\x41\x54\x41\40\x54\x52\x41\x4e\123\106\x45\x52"; break; case 5: return "\x55\x53\x45\122\40\101\x44\x44"; break; case 6: return "\125\x53\105\122\x20\x44\x45\114\105\124\105"; break; case 7: return "\x55\x53\105\122\40\x4d\x4f\104\x49\106\131"; break; case 8: return "\x50\x41\124\111\x45\116\x54\x20\x41\x44\104"; break; case 9: return "\x50\x41\124\x49\105\x4e\x54\40\104\105\114\x45\124\105"; break; case 10: return "\x50\101\124\111\105\116\x54\40\115\117\x44\x49\x46\x59"; break; default: vt_loge(__METHOD__ . "\101\156\x20\151\156\x63\x6f\162\162\145\x63\x74\40\145\x6e\x75\155\x20\x76\x61\x6c\165\x65\x20\167\x61\x73\x20\160\141\163\x73\x65\144\72\x20" . $enum); return "\x28\x45\x56\x45\116\124\x20\116\117\124\x20\106\117\x55\116\x44\51"; break; } } public static function isValidType($etype) { $eventLogType = strtoupper($etype); switch ($eventLogType) { case "\114\117\x47\111\x4e": case "\114\x4f\107\117\x55\x54": case "\104\101\x54\101\40\105\x58\120\x4f\122\x54": case "\104\101\124\x41\x20\x44\105\114\x45\124\x45": case "\104\101\x54\x41\x20\x54\x52\x41\x4e\123\106\105\122": case "\x55\x53\x45\122\40\101\x44\104": case "\x55\123\105\x52\40\104\105\114\105\x54\x45": case "\125\123\x45\x52\40\x4d\x4f\104\x49\x46\x59": case "\120\x41\x54\111\x45\116\124\40\x41\104\104": case "\120\x41\124\111\105\116\124\40\104\x45\114\105\x54\x45": case "\x50\101\x54\x49\105\x4e\x54\40\115\117\104\x49\x46\x59": return TRUE; default: return FALSE; } } } class EGroupingMode extends BasicEnum { const eUnknownGroupingMode = -1; const eH2Mode = 0; const eE2Mode = 1; } class ESourceType extends BasicEnum { const eUnknownSourceType = 0; const eLinkage_xmlSourceType = 1; const eEzPickerSourceType = 2; const eEzBridgeSourceType = 3; const eESSyncroSourceType = 4; const eEzDent_iSourceType = 5; const eEz3D_iSourceType = 6; const eEz3DPlusSourceType = 7; const eMigrationSourceType = 8; const eEtcSourceType = 9; const eThirdPartySourceType = 10; const eEndSourceType = 11; const eEzMobileSourceType = 12; const eDentalServiceWebSourceType = 13; const eEzOrthoSourceType = 14; const eEzOrthoMigrationSourceType = 15; } diff --git a/server/original/www/ezwebserver/src/application/libraries/ErrorCode.php b/server/original/www/ezwebserver/src/application/libraries/ErrorCode.php index 6a8c1da..0cf4c2a 100644 --- a/server/original/www/ezwebserver/src/application/libraries/ErrorCode.php +++ b/server/original/www/ezwebserver/src/application/libraries/ErrorCode.php @@ -1,7 +1,7 @@ _CI =& get_instance(); $this->_CI->load->helper("\151\156\x66\x6c\145\143\164\157\162"); if ($from_type !== NULL) { if (method_exists($this, "\137\146\x72\x6f\155\x5f" . $from_type)) { $data = call_user_func([$this, "\137\146\162\157\155\137" . $from_type], $data); } else { throw new Exception("\x46\x6f\162\155\141\164\40\x63\x6c\x61\163\x73\40\144\x6f\145\163\x20\156\x6f\x74\x20\163\x75\x70\160\157\x72\x74\40\143\157\x6e\166\x65\x72\x73\151\157\x6e\x20\146\x72\x6f\x6d\x20\42" . $from_type . "\42\x2e"); } } $this->_data = $data; } public function factory($data, $from_type = NULL) { return new static($data, $from_type); } public function to_array($data = NULL) { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } if (is_array($data) === FALSE) { $data = (array) $data; } $array = []; foreach ((array) $data as $key => $value) { if (is_object($value) === TRUE || is_array($value) === TRUE) { $array[$key] = $this->to_array($value); } else { $array[$key] = $value; } } return $array; } public function to_xml($data = NULL, $structure = NULL, $basenode = "\x78\155\x6c") { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } if ($structure === NULL) { $structure = simplexml_load_string("\74\77\170\155\154\x20\166\145\162\163\151\157\x6e\x3d\47\61\56\60\47\x20\x65\x6e\x63\157\144\x69\x6e\147\x3d\x27\165\164\x66\x2d\70\47\77\x3e\x3c{$basenode}\x20\57\x3e"); } if (is_array($data) === FALSE && is_object($data) === FALSE) { $data = (array) $data; } foreach ($data as $key => $value) { if (is_bool($value)) { $value = (int) $value; } if (is_numeric($key)) { $key = singular($basenode) != $basenode ? singular($basenode) : "\151\x74\145\155"; } $key = preg_replace("\57\133\x5e\x61\x2d\172\x5f\134\x2d\60\55\71\x5d\x2f\x69", '', $key); if ($key === "\137\x61\x74\164\x72\151\x62\165\x74\145\163" && (is_array($value) || is_object($value))) { $attributes = $value; if (is_object($attributes)) { $attributes = get_object_vars($attributes); } foreach ($attributes as $attribute_name => $attribute_value) { $structure->addAttribute($attribute_name, $attribute_value); } } elseif (is_array($value) || is_object($value)) { $node = $structure->addChild($key); $this->to_xml($value, $node, $key); } else { $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, "\x55\x54\106\55\70"), ENT_QUOTES, "\125\x54\x46\55\70"); $structure->addChild($key, $value); } } return $structure->asXML(); } public function to_html($data = NULL) { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } if (is_array($data) === FALSE) { $data = (array) $data; } if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) { $headings = array_keys($data[0]); } else { $headings = array_keys($data); $data = [$data]; } $this->_CI->load->library("\164\x61\142\x6c\x65"); $this->_CI->table->set_heading($headings); foreach ($data as $row) { $row = @array_map("\x73\164\162\166\x61\x6c", $row); $this->_CI->table->add_row($row); } return $this->_CI->table->generate(); } public function to_csv($data = NULL, $delimiter = "\x2c", $enclosure = "\x22") { $handle = fopen("\160\x68\160\x3a\57\57\x74\145\155\x70\57\155\x61\170\x6d\145\x6d\157\162\x79\x3a\61\x30\x34\x38\65\x37\66", "\167"); if ($handle === FALSE) { return NULL; } if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } if ($delimiter === NULL) { $delimiter = "\x2c"; } if ($enclosure === NULL) { $enclosure = "\42"; } if (is_array($data) === FALSE) { $data = (array) $data; } if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) { $headings = array_keys($data[0]); } else { $headings = array_keys($data); $data = [$data]; } fputcsv($handle, $headings, $delimiter, $enclosure); foreach ($data as $record) { if (is_array($record) === FALSE) { break; } $record = @array_map("\163\164\162\x76\x61\x6c", $record); fputcsv($handle, $record, $delimiter, $enclosure); } rewind($handle); $csv = stream_get_contents($handle); fclose($handle); return $csv; } public function to_json($data = NULL) { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } $callback = $this->_CI->input->get("\x63\x61\x6c\154\142\141\x63\153"); if (empty($callback) === TRUE) { return json_encode($data); } elseif (preg_match("\x2f\136\133\x61\x2d\172\x5f\x5c\x24\135\x5b\x61\55\x7a\x30\55\x39\134\x24\x5f\x5d\x2a\50\134\56\133\x61\x2d\x7a\137\134\44\x5d\x5b\141\55\172\60\55\x39\134\x24\x5f\x5d\x2a\x29\x2a\x24\x2f\x69", $callback)) { return $callback . "\50" . json_encode($data) . "\51\73"; } $data["\x77\141\162\x6e\151\156\x67"] = "\x49\x4e\126\101\114\111\x44\40\x4a\x53\x4f\x4e\x50\x20\103\101\114\114\102\x41\103\x4b\72\x20" . $callback; return json_encode($data); } public function to_serialized($data = NULL) { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } return serialize($data); } public function to_php($data = NULL) { if ($data === NULL && func_num_args() === 0) { $data = $this->_data; } return var_export($data, TRUE); } protected function _from_xml($data) { return $data ? (array) simplexml_load_string($data, "\123\151\x6d\x70\154\145\130\115\114\105\154\145\155\145\x6e\164", LIBXML_NOCDATA) : []; } protected function _from_csv($data, $delimiter = "\54", $enclosure = "\x22") { if ($delimiter === NULL) { $delimiter = "\54"; } if ($enclosure === NULL) { $enclosure = "\x22"; } return str_getcsv($data, $delimiter, $enclosure); } protected function _from_json($data) { return json_decode(trim($data)); } protected function _from_serialize($data) { return unserialize(trim($data)); } protected function _from_php($data) { return trim($data); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/HttpClient.php b/server/original/www/ezwebserver/src/application/libraries/HttpClient.php index 3f20164..da612c5 100644 --- a/server/original/www/ezwebserver/src/application/libraries/HttpClient.php +++ b/server/original/www/ezwebserver/src/application/libraries/HttpClient.php @@ -1,7 +1,7 @@ host = $host; $this->port = $port; } function get($path, $data = false) { $this->path = $path; $this->method = "\x47\105\x54"; if ($data) { $this->path .= "\77" . $this->buildQueryString($data); } return $this->doRequest(); } function post($path, $data) { $this->path = $path; $this->method = "\x50\x4f\123\124"; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function patch($path, $data) { $this->path = $path; $this->method = "\x50\x41\x54\x43\110"; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function put($path, $data) { $this->path = $path; $this->method = "\120\x55\124"; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function delete($path, $data) { $this->path = $path; $this->method = "\104\105\x4c\x45\124\105"; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function buildQueryString($data) { $querystring = ''; if (is_array($data)) { foreach ($data as $key => $val) { if (is_array($val)) { foreach ($val as $val2) { $querystring .= urlencode($key) . "\75" . urlencode($val2) . "\46"; } } else { $querystring .= urlencode($key) . "\75" . urlencode($val) . "\46"; } } $querystring = substr($querystring, 0, -1); } else { $querystring = $data; } return $querystring; } function doRequest() { if (!($fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout))) { switch ($errno) { case -3: $this->errormsg = "\x53\157\143\x6b\145\x74\40\x63\162\145\141\x74\151\x6f\x6e\x20\146\141\x69\x6c\145\x64\40\50\55\x33\51"; case -4: $this->errormsg = "\104\x4e\x53\40\x6c\157\157\153\165\160\40\x66\141\151\x6c\x75\162\x65\x20\50\55\x34\x29"; case -5: $this->errormsg = "\103\157\x6e\x6e\x65\x63\x74\151\x6f\x6e\x20\x72\145\146\165\163\x65\144\x20\157\x72\x20\164\151\155\145\144\x20\x6f\x75\164\40\50\55\x35\51"; default: $this->errormsg = "\103\157\x6e\156\145\x63\x74\x69\157\x6e\40\x66\x61\x69\154\x65\144\x20\x28" . $errno . "\51"; $this->errormsg .= "\40" . $errstr; $this->debug($this->errormsg); } return false; } socket_set_timeout($fp, $this->timeout); $request = $this->buildRequest(); $this->debug("\x52\x65\x71\165\145\x73\x74", $request); fwrite($fp, $request); $this->headers = array(); $this->content = ''; $this->errormsg = ''; $inHeaders = true; $atStart = true; while (!feof($fp)) { $line = fgets($fp, 4096); if ($atStart) { $atStart = false; if (!preg_match("\x2f\x48\124\124\120\134\57\50\x5c\144\134\56\134\x64\x29\134\163\52\x28\x5c\144\53\x29\134\163\x2a\50\x2e\x2a\51\57", $line, $m)) { $this->errormsg = "\x53\164\x61\164\x75\163\x20\143\157\144\145\40\154\151\x6e\x65\x20\151\156\166\141\154\151\144\x3a\x20" . htmlentities($line); $this->debug($this->errormsg); return false; } $http_version = $m[1]; $this->status = $m[2]; $status_string = $m[3]; $this->debug(trim($line)); continue; } if ($inHeaders) { if (trim($line) == '') { $inHeaders = false; $this->debug("\122\145\x63\145\151\166\145\x64\x20\x48\145\141\144\145\x72\x73", $this->headers); if ($this->headers_only) { break; } continue; } if (!preg_match("\57\50\x5b\x5e\72\x5d\x2b\51\x3a\x5c\x73\52\50\x2e\52\51\57", $line, $m)) { continue; } $key = strtolower(trim($m[1])); $val = trim($m[2]); if (isset($this->headers[$key])) { if (is_array($this->headers[$key])) { $this->headers[$key][] = $val; } else { $this->headers[$key] = array($this->headers[$key], $val); } } else { $this->headers[$key] = $val; } continue; } $this->content .= $line; } fclose($fp); if (isset($this->headers["\143\157\x6e\164\145\156\164\x2d\x65\x6e\143\x6f\x64\x69\156\147"]) && $this->headers["\143\x6f\156\164\x65\156\164\x2d\145\x6e\x63\157\x64\151\156\x67"] == "\147\172\151\x70") { $this->debug("\103\157\156\x74\145\x6e\164\40\x69\163\x20\x67\172\x69\x70\x20\x65\x6e\143\157\x64\x65\144\54\x20\x75\156\x7a\151\160\x70\151\156\147\40\151\164"); $this->content = substr($this->content, 10); $this->content = gzinflate($this->content); } if ($this->persist_cookies && isset($this->headers["\x73\145\164\x2d\x63\157\157\153\151\145"]) && $this->host == $this->cookie_host) { $cookies = $this->headers["\x73\x65\164\55\143\157\157\153\151\145"]; if (!is_array($cookies)) { $cookies = array($cookies); } foreach ($cookies as $cookie) { if (preg_match("\57\x28\x5b\136\75\135\x2b\51\x3d\50\133\x5e\73\x5d\53\51\x3b\57", $cookie, $m)) { $this->cookies[$m[1]] = $m[2]; } } $this->cookie_host = $this->host; } if ($this->persist_referers) { $this->debug("\120\x65\162\x73\x69\163\164\151\156\147\x20\x72\145\x66\145\x72\145\x72\x3a\40" . $this->getRequestURL()); $this->referer = $this->getRequestURL(); } if ($this->handle_redirects) { if (++$this->redirect_count >= $this->max_redirects) { $this->errormsg = "\x4e\x75\x6d\142\145\x72\x20\x6f\146\40\x72\145\x64\x69\162\x65\143\164\x73\40\145\170\143\145\145\144\145\x64\40\155\141\170\151\x6d\x75\155\40\50" . $this->max_redirects . "\51"; $this->debug($this->errormsg); $this->redirect_count = 0; return false; } $location = isset($this->headers["\154\157\143\x61\164\151\157\x6e"]) ? $this->headers["\154\x6f\143\141\x74\151\157\x6e"] : ''; $uri = isset($this->headers["\x75\162\x69"]) ? $this->headers["\x75\162\x69"] : ''; if ($location || $uri) { $url = parse_url($location . $uri); return $this->get($url["\x70\141\x74\x68"]); } } return true; } function buildRequest() { $headers = array(); $headers[] = "{$this->method}\40{$this->path}\40\x48\124\124\120\57\61\56\60"; $headers[] = "\x48\x6f\x73\164\x3a\40{$this->host}"; $headers[] = "\125\163\145\x72\55\x41\147\145\156\164\x3a\40{$this->user_agent}"; $headers[] = "\x41\143\143\x65\160\164\72\x20{$this->accept}"; if ($this->use_gzip) { $headers[] = "\x41\x63\143\145\x70\x74\55\145\156\x63\157\144\151\x6e\147\x3a\40{$this->accept_encoding}"; } $headers[] = "\101\x63\x63\x65\160\x74\55\154\x61\x6e\147\165\141\147\x65\72\40{$this->accept_language}"; if ($this->referer) { $headers[] = "\122\145\x66\x65\162\x65\x72\x3a\x20{$this->referer}"; } if ($this->cookies) { $cookie = "\103\x6f\157\x6b\x69\145\x3a\x20"; foreach ($this->cookies as $key => $value) { $cookie .= "{$key}\75{$value}\x3b\x20"; } $headers[] = $cookie; } if ($this->username && $this->password) { $headers[] = "\101\x75\x74\150\157\x72\x69\172\141\x74\x69\157\x6e\72\40\102\101\123\x49\x43\x20" . base64_encode($this->username . "\x3a" . $this->password); } if ($this->postdata) { $headers[] = "\x43\157\x6e\164\145\156\164\x2d\124\171\x70\x65\x3a\x20\141\160\160\x6c\x69\x63\x61\164\x69\157\156\57\x78\55\167\167\167\55\x66\x6f\x72\x6d\x2d\165\162\x6c\145\x6e\x63\x6f\x64\x65\144"; $headers[] = "\x43\x6f\156\x74\145\156\164\x2d\114\145\x6e\x67\x74\x68\72\x20" . strlen($this->postdata); } $request = implode("\15\12", $headers) . "\15\xa\15\xa" . $this->postdata; return $request; } function getStatus() { return $this->status; } function getContent() { return $this->content; } function getHeaders() { return $this->headers; } function getHeader($header) { $header = strtolower($header); if (isset($this->headers[$header])) { return $this->headers[$header]; } else { return false; } } function getError() { return $this->errormsg; } function getCookies() { return $this->cookies; } function getRequestURL() { $url = "\x68\x74\x74\160\x3a\57\57" . $this->host; if ($this->port != 80) { $url .= "\72" . $this->port; } $url .= $this->path; return $url; } function setUserAgent($string) { $this->user_agent = $string; } function setAuthorization($username, $password) { $this->username = $username; $this->password = $password; } function setCookies($array) { $this->cookies = $array; } function useGzip($boolean) { $this->use_gzip = $boolean; } function setPersistCookies($boolean) { $this->persist_cookies = $boolean; } function setPersistReferers($boolean) { $this->persist_referers = $boolean; } function setHandleRedirects($boolean) { $this->handle_redirects = $boolean; } function setMaxRedirects($num) { $this->max_redirects = $num; } function setHeadersOnly($boolean) { $this->headers_only = $boolean; } function setDebug($boolean) { $this->debug = $boolean; } function quickGet($url) { $bits = parse_url($url); $host = $bits["\150\157\x73\x74"]; $port = isset($bits["\x70\x6f\x72\x74"]) ? $bits["\x70\x6f\x72\164"] : 80; $path = isset($bits["\x70\141\x74\x68"]) ? $bits["\x70\141\x74\150"] : "\x2f"; if (isset($bits["\161\165\x65\x72\171"])) { $path .= "\77" . $bits["\161\x75\145\x72\171"]; } $client = new HttpClient($host, $port); if (!$client->get($path)) { return false; } else { return $client->getContent(); } } function quickPost($url, $data) { $bits = parse_url($url); $host = $bits["\x68\x6f\x73\164"]; $port = isset($bits["\160\157\162\x74"]) ? $bits["\160\157\162\x74"] : 80; $path = isset($bits["\160\x61\164\x68"]) ? $bits["\160\x61\x74\150"] : "\x2f"; $client = new HttpClient($host, $port); if (!$client->post($path, $data)) { return false; } else { return $client->getContent(); } } function debug($msg, $object = false) { if ($this->debug) { print "\x3c\144\x69\166\x20\163\164\171\154\145\x3d\42\142\157\162\144\145\x72\72\40\x31\x70\170\x20\x73\x6f\x6c\x69\144\x20\162\x65\144\73\40\x70\141\x64\144\151\156\147\72\x20\x30\56\65\x65\x6d\73\40\x6d\141\x72\147\x69\x6e\x3a\x20\60\x2e\65\145\x6d\73\42\x3e\x3c\163\164\162\157\156\x67\76\x48\x74\x74\x70\103\x6c\x69\x65\156\164\x20\x44\145\142\x75\x67\x3a\74\57\163\x74\x72\157\x6e\147\x3e\x20" . $msg; if ($object) { ob_start(); print_r($object); $content = htmlentities(ob_get_contents()); ob_end_clean(); print "\74\x70\x72\145\76" . $content . "\x3c\57\160\162\x65\x3e"; } print "\74\x2f\144\151\166\76"; } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/IAcquisitionDateTimeFilter.php b/server/original/www/ezwebserver/src/application/libraries/IAcquisitionDateTimeFilter.php index dbca783..04dc917 100644 --- a/server/original/www/ezwebserver/src/application/libraries/IAcquisitionDateTimeFilter.php +++ b/server/original/www/ezwebserver/src/application/libraries/IAcquisitionDateTimeFilter.php @@ -1,7 +1,7 @@ load->model($model); } } class MockModelLoader implements IModelLoader { public function load($ci, $model) { require_once APPPATH . "\x74\x65\163\164\x73\57\x6d\157\143\x6b\163\57\155\157\x64\145\154\57" . $model . "\56\160\x68\x70"; $mockClass = "\x4d\157\143\x6b\x5f" . $model; $ci->{$model} = new $mockClass(); } } class StaticModelLoader { private $_loader = null; private function __construct() { } public static function getInstance() { static $_instance = null; if ($_instance === null) { $_instance = new StaticModelLoader(); $_instance->setLoader(new DefaultModelLoader()); } return $_instance; } public function setLoader($loader) { $this->_loader = $loader; } public function getLoader() { return $this->_loader; } public static function load($ci, $model) { StaticModelLoader::getInstance()->getLoader()->load($ci, $model); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/MyDicom.php b/server/original/www/ezwebserver/src/application/libraries/MyDicom.php index 6f0a584..c7d8b5f 100644 --- a/server/original/www/ezwebserver/src/application/libraries/MyDicom.php +++ b/server/original/www/ezwebserver/src/application/libraries/MyDicom.php @@ -1,7 +1,7 @@ array(0x8, 0x12), tagInstanceCreationTime => array(0x8, 0x13), tagStudyDate => array(0x8, 0x20), tagSeriesDate => array(0x8, 0x21), tagAcquisitionDate => array(0x8, 0x22), tagStudyTime => array(0x8, 0x30), tagSeriesTime => array(0x8, 0x31), tagAcquisitionTime => array(0x8, 0x32), tagModality => array(0x8, 0x60), tagFOVSize => array(0x9, 0x1000), tagToothIndex => array(0x9, 0x1006), tagVerticalMode => array(0x9, 0x1007), tagHorizontalMode => array(0x9, 0x1008), tagArchMode => array(0x9, 0x1009), tagSegmentMode => array(0x9, 0x1010), tagFormMode => array(0x9, 0x1011), tagPatientName => array(0x10, 0x10), tagPatientId => array(0x10, 0x20), tagkVp => array(0x18, 0x60), tagDeviceSerialNumber => array(0x18, 0x1000), tagExposureTime => array(0x18, 0x1150), tagmA => array(0x18, 0x1151), tagDAP => array(0x18, 0x115e), taguA => array(0x18, 0x8151), tagStudyInstanceUID => array(0x20, 0xd), tagSamplesPerPixel => array(0x28, 0x2), tagNumberOfFrames => array(0x28, 0x8), tagRows => array(0x28, 0x10), tagColumns => array(0x28, 0x11), tagPixelSpacing => array(0x28, 0x30)); public function getTagValue($tagName) { return $this->dicom->value($this->tags[$tagName][0], $this->tags[$tagName][1]); } public function __construct($params) { $filename = $params["\x64\151\x63\x6f\155\x66\x69\154\x65"]; $this->dicom = Nanodicom::factory($filename, "\163\151\x6d\x70\x6c\x65"); $this->dicom->parse($this->tags); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/PasswordExpired.php b/server/original/www/ezwebserver/src/application/libraries/PasswordExpired.php index a2e55ca..b67ad8c 100644 --- a/server/original/www/ezwebserver/src/application/libraries/PasswordExpired.php +++ b/server/original/www/ezwebserver/src/application/libraries/PasswordExpired.php @@ -1,7 +1,7 @@ format("\x25\141"); if ($expirationEnable === "\x74\x72\165\x65" && $interval > $expirationDays) { return VERR_AUTH_PASSWORD_EXPIRED; } else { if ($expirationEnable === "\x74\162\165\145" && $expirationDays - $interval < $expirationReminderDays) { return VERR_AUTH_PASSWORD_EXPIRING; } } return VERR_COMMON_SUCCESS; } public function load_settings() { load_database($this, "\x53\105\124\x54\111\116\x47"); $sql = "\123\105\114\105\x43\124\x20\x2a\40\x46\x52\x4f\115\40\x53\124\x5f\x53\x45\x54\124\x49\116\107\123\x20\x57\x48\x45\x52\x45\40\123\x54\x5f\123\x45\x43\124\111\117\116\x20\x3d\x20\x3f"; return $this->db->query($sql, array("\x50\141\163\x73\167\157\x72\x64\x50\157\154\151\143\171"))->result_array(); } public function load_updated_password($userAccountName) { load_database($this, "\105\62\104\x42"); $this->db->select("\141\143\x63\137\x70\x61\163\x73\167\x6f\x72\x64\137\165\x70\x64\141\x74\x65\x64"); $this->db->from("\x65\62\137\x61\143\x63"); $this->db->where("\x61\x63\143\137\165\x73\145\x72\x6e\141\x6d\x65", $userAccountName); $result = $this->db->get()->result_array(); return $result[0]["\x61\x63\143\137\160\x61\x73\163\x77\157\162\144\137\165\160\144\141\x74\145\144"]; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/REST_Controller.php b/server/original/www/ezwebserver/src/application/libraries/REST_Controller.php index 0d6084a..20f1bdf 100644 --- a/server/original/www/ezwebserver/src/application/libraries/REST_Controller.php +++ b/server/original/www/ezwebserver/src/application/libraries/REST_Controller.php @@ -1,7 +1,7 @@ "\141\x70\160\x6c\x69\143\x61\164\x69\x6f\x6e\57\x6a\x73\157\x6e", "\x61\162\x72\141\171" => "\141\160\x70\x6c\151\143\141\164\x69\157\x6e\57\x6a\163\157\156", "\143\163\166" => "\141\160\x70\154\151\x63\x61\164\151\157\x6e\x2f\143\163\166", "\150\x74\155\154" => "\x74\145\x78\x74\57\150\164\x6d\x6c", "\152\x73\x6f\x6e\x70" => "\x61\160\x70\x6c\151\x63\x61\164\x69\157\x6e\x2f\x6a\141\x76\x61\163\143\162\151\160\x74", "\x70\x68\x70" => "\x74\145\170\164\x2f\160\154\141\x69\156", "\x73\x65\162\151\141\x6c\151\172\145\x64" => "\141\160\x70\x6c\x69\143\141\164\x69\157\x6e\x2f\166\156\144\x2e\x70\x68\x70\56\163\145\x72\x69\x61\154\x69\x7a\145\x64"]; protected $_apiuser; protected $check_cors = NULL; protected $_enable_xss = FALSE; protected $http_status_codes = [self::HTTP_OK => "\117\x4b", self::HTTP_CREATED => "\103\x52\105\101\124\x45\x44", self::HTTP_NO_CONTENT => "\116\x4f\x20\103\x4f\116\x54\x45\x4e\x54", self::HTTP_NOT_MODIFIED => "\x4e\x4f\124\40\x4d\x4f\104\111\x46\x49\105\104", self::HTTP_BAD_REQUEST => "\x42\x41\x44\40\x52\105\x51\125\x45\123\124", self::HTTP_UNAUTHORIZED => "\x55\116\101\125\124\110\x4f\x52\111\132\x45\x44", self::HTTP_FORBIDDEN => "\106\x4f\x52\102\111\104\104\105\x4e", self::HTTP_NOT_FOUND => "\x4e\x4f\x54\x20\106\x4f\x55\116\x44", self::HTTP_METHOD_NOT_ALLOWED => "\115\x45\124\x48\x4f\104\x20\x4e\x4f\124\40\101\114\x4c\117\x57\105\x44", self::HTTP_NOT_ACCEPTABLE => "\116\x4f\124\40\x41\x43\x43\105\x50\x54\x41\x42\x4c\x45", self::HTTP_CONFLICT => "\103\x4f\116\x46\114\x49\103\124", self::HTTP_INTERNAL_SERVER_ERROR => "\x49\116\124\105\122\x4e\x41\114\40\123\x45\x52\x56\x45\x52\x20\x45\x52\x52\x4f\x52", self::HTTP_NOT_IMPLEMENTED => "\116\117\124\x20\111\115\x50\114\105\115\x45\116\x54\x45\104"]; protected function early_checks() { } public function __construct($config = "\162\x65\163\x74") { parent::__construct(); $this->preflight_checks(); $this->_enable_xss = $this->config->item("\147\154\157\142\x61\x6c\137\170\x73\x73\x5f\146\151\x6c\164\145\162\151\156\147") === TRUE; $this->output->parse_exec_vars = FALSE; $this->_start_rtime = microtime(TRUE); $this->load->config($config); $this->load->library("\146\157\162\x6d\141\164"); $supported_formats = $this->config->item("\162\145\163\x74\x5f\x73\x75\x70\160\157\162\164\x65\x64\137\146\x6f\162\155\141\x74\x73"); if (empty($supported_formats)) { $supported_formats = []; } if (!is_array($supported_formats)) { $supported_formats = [$supported_formats]; } $default_format = $this->_get_default_output_format(); if (!in_array($default_format, $supported_formats)) { $supported_formats[] = $default_format; } $this->_supported_formats = array_intersect_key($this->_supported_formats, array_flip($supported_formats)); $language = $this->config->item("\162\x65\163\x74\x5f\x6c\141\156\147\165\141\x67\x65"); if ($language === NULL) { $language = "\145\156\147\x6c\x69\163\150"; } $this->lang->load("\x72\145\163\x74\137\143\157\156\x74\162\157\x6c\x6c\145\x72", $language); $this->request = new stdClass(); $this->response = new stdClass(); $this->rest = new stdClass(); if ($this->config->item("\x72\x65\163\164\137\x69\160\137\x62\154\141\x63\153\x6c\x69\x73\x74\x5f\x65\156\x61\142\x6c\145\144") === TRUE) { $this->_check_blacklist_auth(); } $this->request->ssl = is_https(); $this->request->method = $this->_detect_method(); $check_cors = $this->config->item("\143\150\x65\143\x6b\x5f\143\x6f\x72\163"); if ($check_cors === TRUE) { $this->_check_cors(); } if (isset($this->{"\137" . $this->request->method . "\137\141\x72\147\163"}) === FALSE) { $this->{"\x5f" . $this->request->method . "\137\141\162\x67\163"} = []; } $this->_parse_query(); $this->_get_args = array_merge($this->_get_args, $this->uri->ruri_to_assoc()); $this->request->format = $this->_detect_input_format(); $this->request->body = NULL; $this->{"\137\x70\141\x72\x73\145\137" . $this->request->method}(); if ($this->request->format && $this->request->body) { $this->request->body = $this->format->factory($this->request->body, $this->request->format)->to_array(); $this->{"\137" . $this->request->method . "\137\141\x72\147\163"} = $this->request->body; } $this->_head_args = $this->input->request_headers(); $this->_args = array_merge($this->_get_args, $this->_options_args, $this->_patch_args, $this->_head_args, $this->_put_args, $this->_post_args, $this->_delete_args, $this->{"\x5f" . $this->request->method . "\137\141\x72\x67\163"}); $this->response->format = $this->_detect_output_format(); $this->response->lang = $this->_detect_lang(); $this->early_checks(); if ($this->config->item("\162\x65\x73\x74\137\x64\x61\x74\141\x62\x61\163\x65\x5f\147\162\x6f\165\160") && ($this->config->item("\162\x65\163\164\137\x65\x6e\x61\x62\154\x65\137\x6b\x65\171\x73") || $this->config->item("\162\145\163\x74\137\x65\x6e\141\142\x6c\145\137\x6c\x6f\x67\147\x69\x6e\x67"))) { $this->rest->db = $this->load->database($this->config->item("\x72\145\x73\164\137\144\141\x74\141\x62\141\163\145\x5f\147\x72\x6f\165\x70"), TRUE); } elseif (property_exists($this, "\x64\x62")) { $this->rest->db = $this->db; } $this->auth_override = $this->_auth_override_check(); if ($this->config->item("\x72\145\x73\164\137\145\156\x61\x62\x6c\145\137\x6b\x65\x79\163") && $this->auth_override !== TRUE) { $this->_allow = $this->_detect_api_key(); } if ($this->input->is_ajax_request() === FALSE && $this->config->item("\162\x65\x73\164\137\x61\x6a\141\170\137\157\156\x6c\171")) { $this->response([$this->config->item("\162\145\x73\x74\x5f\163\x74\x61\164\165\163\x5f\x66\151\145\x6c\144\x5f\x6e\141\155\145") => FALSE, $this->config->item("\162\145\x73\164\x5f\x6d\145\163\163\141\147\x65\x5f\x66\151\145\x6c\x64\137\x6e\141\155\x65") => $this->lang->line("\164\x65\x78\164\137\x72\145\163\x74\x5f\141\152\141\170\x5f\157\156\154\x79")], self::HTTP_NOT_ACCEPTABLE); } if ($this->auth_override === FALSE && (!($this->config->item("\162\145\x73\164\137\x65\x6e\x61\x62\x6c\x65\137\x6b\145\x79\163") && $this->_allow === TRUE) || $this->config->item("\x61\x6c\154\x6f\x77\x5f\x61\x75\x74\x68\137\x61\x6e\x64\x5f\x6b\x65\171\163") === TRUE && $this->_allow === TRUE)) { $rest_auth = strtolower($this->config->item("\162\145\163\x74\137\141\x75\164\x68")); switch ($rest_auth) { case "\x62\141\x73\x69\143": $this->_prepare_basic_auth(); break; case "\x64\151\147\x65\x73\x74": $this->_prepare_digest_auth(); break; case "\163\x65\x73\163\x69\157\156": $this->_check_php_session(); break; case "\x6a\167\164": $this->_check_jwt(); } if ($this->config->item("\162\145\x73\164\137\x69\x70\x5f\167\x68\151\x74\x65\154\151\x73\x74\x5f\x65\x6e\x61\142\154\x65\144") === TRUE) { $this->_check_whitelist_auth(); } } } public function __destruct() { $this->_end_rtime = microtime(TRUE); if ($this->config->item("\x72\x65\x73\x74\137\x65\156\x61\142\154\x65\137\x6c\157\x67\147\151\x6e\x67") === TRUE) { $this->_log_access_time(); } } protected function preflight_checks() { if (is_php("\65\x2e\64") === FALSE) { throw new Exception("\125\163\x69\156\147\40\x50\110\120\40\166" . PHP_VERSION . "\x2c\40\x74\150\157\x75\147\150\40\x50\x48\x50\40\166\x35\x2e\64\x20\157\x72\x20\x67\x72\x65\141\164\145\x72\x20\151\x73\40\x72\x65\161\x75\x69\x72\145\144"); } if (explode("\56", CI_VERSION, 2)[0] < 3) { throw new Exception("\122\x45\123\x54\40\123\145\162\x76\145\x72\x20\162\145\161\165\151\x72\145\x73\40\103\x6f\144\x65\111\147\156\x69\x74\x65\x72\40\x33\x2e\x78"); } } public function _remap($object_called, $arguments = []) { if ($this->config->item("\x66\x6f\x72\143\145\137\x68\x74\164\160\163") && $this->request->ssl === FALSE) { $this->response([$this->config->item("\162\x65\x73\x74\x5f\163\x74\141\164\x75\x73\x5f\146\x69\145\x6c\144\x5f\x6e\141\x6d\145") => FALSE, $this->config->item("\x72\145\163\x74\x5f\x6d\145\x73\x73\141\147\145\137\x66\x69\x65\154\x64\137\156\x61\x6d\x65") => $this->lang->line("\x74\145\170\164\x5f\x72\145\x73\x74\x5f\165\156\x73\x75\160\160\x6f\162\x74\145\x64")], self::HTTP_FORBIDDEN); } $object_called = preg_replace("\57\x5e\50\56\x2a\x29\134\56\x28\x3f\x3a" . implode("\174", array_keys($this->_supported_formats)) . "\51\44\x2f", "\x24\61", $object_called); $controller_method = $object_called . "\137" . $this->request->method; $log_method = !(isset($this->methods[$controller_method]["\154\x6f\x67"]) && $this->methods[$controller_method]["\154\x6f\x67"] === FALSE); $use_key = !(isset($this->methods[$controller_method]["\x6b\x65\x79"]) && $this->methods[$controller_method]["\153\x65\x79"] === FALSE); if ($this->config->item("\x72\145\163\x74\x5f\x65\x6e\141\142\154\x65\x5f\153\x65\x79\163") && $use_key && $this->_allow === FALSE) { if ($this->config->item("\162\145\x73\164\x5f\145\x6e\x61\x62\x6c\145\x5f\x6c\x6f\x67\x67\151\x6e\x67") && $log_method) { $this->_log_request(); } $this->response([$this->config->item("\162\x65\163\x74\x5f\x73\x74\141\164\165\x73\137\x66\x69\x65\154\144\x5f\x6e\x61\x6d\x65") => FALSE, $this->config->item("\x72\145\163\x74\x5f\x6d\x65\x73\163\x61\147\x65\137\x66\151\145\154\x64\137\156\x61\x6d\x65") => sprintf($this->lang->line("\x74\145\x78\164\137\162\145\163\164\x5f\151\x6e\x76\x61\x6c\151\144\137\x61\160\151\137\153\145\171"), $this->rest->key)], self::HTTP_FORBIDDEN); } if ($this->config->item("\162\x65\x73\164\137\x65\x6e\x61\x62\x6c\145\x5f\153\145\171\163") && $use_key && empty($this->rest->key) === FALSE && $this->_check_access() === FALSE) { if ($this->config->item("\162\145\x73\164\x5f\145\x6e\141\x62\x6c\145\x5f\x6c\x6f\x67\x67\x69\x6e\147") && $log_method) { $this->_log_request(); } $this->response([$this->config->item("\162\145\163\x74\x5f\x73\164\141\x74\165\163\x5f\146\x69\x65\154\x64\137\x6e\x61\155\x65") => FALSE, $this->config->item("\162\145\163\x74\x5f\155\145\163\x73\x61\147\x65\137\x66\151\x65\x6c\144\137\156\141\x6d\x65") => $this->lang->line("\164\x65\x78\164\x5f\162\145\x73\164\137\x61\x70\151\x5f\x6b\145\x79\x5f\165\x6e\x61\165\164\x68\157\x72\151\x7a\145\144")], self::HTTP_UNAUTHORIZED); } if (!method_exists($this, $controller_method)) { $this->response([$this->config->item("\162\145\163\x74\x5f\163\164\141\x74\x75\x73\137\x66\151\145\x6c\144\137\156\141\155\x65") => VERR_COMMON_INVALID_FUNCTION, $this->config->item("\x72\x65\163\164\x5f\155\x65\163\x73\x61\x67\145\137\146\151\x65\x6c\x64\137\x6e\x61\x6d\x65") => $this->lang->line("\164\x65\x78\x74\137\162\x65\163\x74\137\x75\156\153\156\x6f\167\x6e\x5f\x6d\x65\x74\x68\x6f\x64")], self::HTTP_METHOD_NOT_ALLOWED); } if ($this->config->item("\x72\x65\163\164\137\145\156\141\x62\x6c\145\137\x6b\x65\171\163") && empty($this->rest->key) === FALSE) { if ($this->config->item("\162\x65\163\164\137\x65\x6e\141\142\154\145\x5f\154\151\155\151\164\163") && $this->_check_limit($controller_method) === FALSE) { $response = [$this->config->item("\x72\x65\163\x74\137\x73\164\x61\164\165\x73\137\146\151\145\x6c\x64\137\x6e\141\x6d\145") => FALSE, $this->config->item("\162\145\163\164\x5f\x6d\x65\x73\163\x61\x67\x65\137\146\x69\145\154\x64\137\156\141\x6d\145") => $this->lang->line("\x74\x65\x78\x74\x5f\x72\145\x73\x74\137\x61\160\x69\x5f\153\145\x79\137\x74\x69\155\145\x5f\x6c\x69\x6d\x69\164")]; $this->response($response, self::HTTP_UNAUTHORIZED); } $level = isset($this->methods[$controller_method]["\154\x65\x76\145\x6c"]) ? $this->methods[$controller_method]["\x6c\x65\166\145\154"] : 0; $authorized = $level <= $this->rest->level; if ($this->config->item("\162\145\163\164\x5f\x65\x6e\141\142\154\x65\x5f\154\157\x67\147\151\156\147") && $log_method) { $this->_log_request($authorized); } if ($authorized === FALSE) { $response = [$this->config->item("\x72\x65\x73\164\x5f\163\164\x61\164\165\163\137\146\x69\x65\154\x64\137\156\x61\155\x65") => FALSE, $this->config->item("\162\145\x73\164\x5f\155\145\163\163\141\x67\x65\137\146\x69\145\x6c\x64\137\x6e\x61\x6d\x65") => $this->lang->line("\x74\x65\x78\164\x5f\162\x65\163\x74\137\141\x70\151\137\153\x65\171\x5f\160\x65\162\155\x69\163\x73\x69\157\x6e\163")]; $this->response($response, self::HTTP_UNAUTHORIZED); } } elseif ($this->config->item("\x72\x65\163\x74\x5f\145\x6e\x61\x62\x6c\x65\x5f\154\x6f\x67\x67\x69\x6e\147") && $log_method) { $this->_log_request($authorized = TRUE); } try { call_user_func_array([$this, $controller_method], $arguments); } catch (CIPHPUnitTestExitException $ex) { throw $ex; } catch (Exception $ex) { log_message("\x65\162\162\x6f\162", __METHOD__ . "\x20\111\x6e\164\x65\162\156\141\x6c\40\x73\145\162\x76\x65\x72\40\x65\x72\x72\x6f\162\54\40\x63\x6c\x61\163\x73\x20\156\x61\x6d\x65\x3a\40" . get_class($ex) . "\x20\155\x65\x73\x73\141\x67\x65\x3a\x20" . $ex->getMessage()); $this->response([$this->config->item("\x72\145\163\x74\137\x73\164\141\x74\x75\163\x5f\146\151\x65\x6c\x64\x5f\x6e\141\x6d\145") => VERR_PHP_ERROR, $this->config->item("\x72\145\x73\164\137\x6d\145\163\163\x61\147\145\x5f\x66\x69\x65\154\144\x5f\156\141\x6d\145") => ["\143\154\x61\x73\x73\156\x61\155\145" => get_class($ex), "\155\145\163\163\x61\147\x65" => $ex->getMessage()]], self::HTTP_INTERNAL_SERVER_ERROR); } } public function response($data = NULL, $http_code = NULL, $continue = FALSE) { if ($http_code !== NULL) { $http_code = (int) $http_code; } $output = NULL; if ($data === NULL && $http_code === NULL) { $http_code = self::HTTP_NOT_FOUND; } elseif ($data !== NULL) { if (method_exists($this->format, "\x74\157\x5f" . $this->response->format)) { $this->output->set_content_type($this->_supported_formats[$this->response->format], strtolower($this->config->item("\143\x68\x61\162\x73\145\164"))); $output = $this->format->factory($data)->{"\x74\157\x5f" . $this->response->format}(); if ($this->response->format === "\141\162\x72\x61\171") { $output = $this->format->factory($output)->{"\164\157\x5f\x6a\x73\157\156"}(); } } else { if (is_array($data) || is_object($data)) { $data = $this->format->factory($data)->{"\164\x6f\137\152\x73\157\156"}(); } $output = $data; } } $http_code > 0 || ($http_code = self::HTTP_OK); $this->output->set_status_header($http_code); if ($this->config->item("\162\145\x73\164\x5f\x65\156\141\142\x6c\x65\x5f\x6c\x6f\x67\x67\x69\x6e\x67") === TRUE) { $this->_log_response_code($http_code); } $this->output->set_output($output); if ($continue === FALSE) { $this->output->_display(); exit; } } public function set_response($data = NULL, $http_code = NULL) { $this->response($data, $http_code, TRUE); } protected function _detect_input_format() { $content_type = $this->input->server("\x43\117\x4e\124\105\116\124\x5f\124\x59\x50\105"); if (empty($content_type) === FALSE) { $content_type = strpos($content_type, "\73") !== FALSE ? current(explode("\x3b", $content_type)) : $content_type; foreach ($this->_supported_formats as $type => $mime) { if ($content_type === $mime) { return $type; } } } return NULL; } protected function _get_default_output_format() { $default_format = (string) $this->config->item("\162\145\x73\x74\137\144\x65\x66\141\x75\x6c\164\x5f\146\x6f\162\x6d\x61\164"); return $default_format === '' ? "\152\163\x6f\x6e" : $default_format; } protected function _detect_output_format() { $pattern = "\57\x5c\56\x28" . implode("\x7c", array_keys($this->_supported_formats)) . "\51\x28\44\x7c\x5c\x2f\x29\57"; $matches = []; if (preg_match($pattern, $this->uri->uri_string(), $matches)) { return $matches[1]; } if (isset($this->_get_args["\146\157\x72\x6d\141\x74"])) { $format = strtolower($this->_get_args["\x66\x6f\x72\155\141\164"]); if (isset($this->_supported_formats[$format]) === TRUE) { return $format; } } $http_accept = $this->input->server("\110\x54\x54\120\x5f\101\x43\103\x45\x50\124"); if ($this->config->item("\x72\x65\x73\164\x5f\151\147\x6e\157\162\145\137\150\x74\164\x70\137\x61\143\143\x65\160\x74") === FALSE && $http_accept !== NULL) { foreach (array_keys($this->_supported_formats) as $format) { if (strpos($http_accept, $format) !== FALSE) { if ($format !== "\x68\164\155\x6c" && $format !== "\x78\x6d\154") { return $format; } elseif ($format === "\150\x74\155\154" && strpos($http_accept, "\x78\x6d\x6c") === FALSE) { return $format; } else { if ($format === "\170\x6d\154" && strpos($http_accept, "\150\x74\155\x6c") === FALSE) { return $format; } } } } } if (empty($this->rest_format) === FALSE) { return $this->rest_format; } return $this->_get_default_output_format(); } protected function _detect_method() { $method = NULL; if ($this->config->item("\x65\x6e\x61\142\154\x65\x5f\x65\155\x75\154\x61\x74\x65\x5f\x72\145\x71\165\145\163\164") === TRUE) { $method = $this->input->post("\x5f\155\145\x74\150\157\144"); if ($method === NULL) { $method = $this->input->server("\110\124\x54\120\137\x58\137\x48\124\124\x50\x5f\x4d\x45\x54\x48\117\x44\x5f\117\126\105\x52\x52\111\104\x45"); } $method = strtolower($method); } if (empty($method)) { $method = $this->input->method(); } return in_array($method, $this->allowed_http_methods) && method_exists($this, "\x5f\160\141\x72\163\x65\137" . $method) ? $method : "\147\145\x74"; } protected function _detect_api_key() { $api_key_variable = $this->config->item("\x72\145\163\x74\x5f\x6b\145\x79\137\156\x61\155\145"); $key_name = "\110\x54\124\120\x5f" . strtoupper(str_replace("\55", "\137", $api_key_variable)); $this->rest->key = NULL; $this->rest->level = NULL; $this->rest->user_id = NULL; $this->rest->ignore_limits = FALSE; if ($key = isset($this->_args[$api_key_variable]) ? $this->_args[$api_key_variable] : $this->input->server($key_name)) { if (!($row = $this->rest->db->where($this->config->item("\162\145\163\164\x5f\153\145\x79\x5f\143\157\154\x75\155\x6e"), $key)->get($this->config->item("\x72\145\x73\164\137\x6b\145\171\x73\137\164\x61\x62\x6c\x65"))->row())) { return FALSE; } $this->rest->key = $row->{$this->config->item("\162\x65\163\x74\x5f\x6b\145\171\137\x63\157\154\165\x6d\156")}; isset($row->user_id) && ($this->rest->user_id = $row->user_id); isset($row->level) && ($this->rest->level = $row->level); isset($row->ignore_limits) && ($this->rest->ignore_limits = $row->ignore_limits); $this->_apiuser = $row; if (empty($row->is_private_key) === FALSE) { if (isset($row->ip_addresses)) { $list_ip_addresses = explode("\x2c", $row->ip_addresses); $found_address = FALSE; foreach ($list_ip_addresses as $ip_address) { if ($this->input->ip_address() === trim($ip_address)) { $found_address = TRUE; break; } } return $found_address; } else { return FALSE; } } return TRUE; } return FALSE; } protected function _detect_lang() { $lang = $this->input->server("\x48\x54\124\x50\137\101\103\103\105\120\x54\x5f\x4c\x41\x4e\107\125\101\x47\x45"); if ($lang === NULL) { return NULL; } if (strpos($lang, "\x2c") !== FALSE) { $langs = explode("\54", $lang); $return_langs = []; foreach ($langs as $lang) { list($lang) = explode("\73", $lang); $return_langs[] = trim($lang); } return $return_langs; } return $lang; } protected function _log_request($authorized = FALSE) { $is_inserted = $this->rest->db->insert($this->config->item("\x72\145\163\164\137\154\x6f\x67\x73\137\164\x61\x62\x6c\x65"), ["\x75\x72\x69" => $this->uri->uri_string(), "\x6d\x65\x74\x68\x6f\144" => $this->request->method, "\x70\x61\x72\141\x6d\x73" => $this->_args ? $this->config->item("\162\x65\x73\164\137\x6c\157\147\x73\137\152\163\157\156\137\160\141\x72\141\x6d\163") === TRUE ? json_encode($this->_args) : serialize($this->_args) : NULL, "\141\x70\151\137\x6b\x65\171" => isset($this->rest->key) ? $this->rest->key : '', "\151\x70\x5f\x61\144\x64\162\145\163\163" => $this->input->ip_address(), "\164\151\x6d\145" => time(), "\141\x75\x74\150\x6f\162\x69\172\x65\x64" => $authorized]); $this->_insert_id = $this->rest->db->insert_id(); return $is_inserted; } protected function _check_limit($controller_method) { if (empty($this->rest->ignore_limits) === FALSE) { return TRUE; } switch ($this->config->item("\162\x65\163\164\137\154\151\155\151\164\x73\x5f\155\x65\x74\x68\x6f\144")) { case "\101\120\x49\137\113\x45\131": $limited_uri = "\x61\x70\151\x2d\153\145\171\x3a" . (isset($this->rest->key) ? $this->rest->key : ''); $limited_method_name = isset($this->rest->key) ? $this->rest->key : ''; break; case "\115\105\x54\x48\117\x44\137\x4e\101\x4d\105": $limited_uri = "\155\145\x74\150\x6f\144\x2d\x6e\x61\x6d\145\72" . $controller_method; $limited_method_name = $controller_method; break; case "\122\x4f\x55\124\105\x44\137\125\x52\114": default: $limited_uri = $this->uri->ruri_string(); if (strpos(strrev($limited_uri), strrev($this->response->format)) === 0) { $limited_uri = substr($limited_uri, 0, -strlen($this->response->format) - 1); } $limited_uri = "\x75\x72\x69\x3a" . $limited_uri . "\72" . $this->request->method; $limited_method_name = $controller_method; break; } if (isset($this->methods[$limited_method_name]["\154\151\155\x69\164"]) === FALSE) { return TRUE; } $limit = $this->methods[$limited_method_name]["\x6c\x69\155\x69\164"]; $time_limit = isset($this->methods[$limited_method_name]["\164\151\x6d\x65"]) ? $this->methods[$limited_method_name]["\x74\151\155\x65"] : 3600; $result = $this->rest->db->where("\x75\162\x69", $limited_uri)->where("\x61\160\151\x5f\x6b\145\171", $this->rest->key)->get($this->config->item("\x72\145\x73\164\137\154\151\x6d\x69\x74\x73\x5f\x74\x61\142\x6c\145"))->row(); if ($result === NULL) { $this->rest->db->insert($this->config->item("\162\145\163\x74\x5f\x6c\151\x6d\x69\x74\163\x5f\164\141\x62\x6c\x65"), ["\165\x72\151" => $limited_uri, "\x61\x70\x69\137\x6b\x65\171" => isset($this->rest->key) ? $this->rest->key : '', "\x63\x6f\x75\x6e\x74" => 1, "\150\157\165\162\137\163\164\x61\x72\164\145\x64" => time()]); } elseif ($result->hour_started < time() - $time_limit) { $this->rest->db->where("\x75\x72\151", $limited_uri)->where("\x61\x70\151\x5f\153\x65\171", isset($this->rest->key) ? $this->rest->key : '')->set("\x68\157\165\162\x5f\x73\x74\141\x72\164\145\144", time())->set("\x63\157\x75\156\x74", 1)->update($this->config->item("\x72\145\x73\x74\137\x6c\x69\x6d\151\x74\x73\137\164\141\142\x6c\145")); } else { if ($result->count >= $limit) { return FALSE; } $this->rest->db->where("\165\x72\151", $limited_uri)->where("\x61\x70\151\x5f\153\145\x79", $this->rest->key)->set("\143\x6f\x75\x6e\164", "\x63\x6f\x75\156\164\x20\53\x20\x31", FALSE)->update($this->config->item("\x72\x65\163\x74\x5f\x6c\x69\155\x69\164\x73\x5f\x74\x61\142\x6c\145")); } return TRUE; } protected function _auth_override_check() { $auth_override_class_method = $this->config->item("\141\165\164\x68\137\x6f\166\x65\162\162\x69\144\x65\x5f\143\x6c\x61\163\163\x5f\x6d\145\164\150\157\144"); if (!empty($auth_override_class_method)) { if (!empty($auth_override_class_method[$this->router->class]["\x2a"])) { if ($auth_override_class_method[$this->router->class]["\x2a"] === "\156\157\156\x65") { return TRUE; } if ($auth_override_class_method[$this->router->class]["\x2a"] === "\x62\x61\x73\151\143") { $this->_prepare_basic_auth(); return TRUE; } if ($auth_override_class_method[$this->router->class]["\x2a"] === "\x64\151\x67\145\163\164") { $this->_prepare_digest_auth(); return TRUE; } if ($auth_override_class_method[$this->router->class]["\52"] === "\163\145\x73\163\x69\157\156") { $this->_check_php_session(); return TRUE; } if ($auth_override_class_method[$this->router->class]["\52"] === "\167\150\151\164\x65\x6c\151\x73\164") { $this->_check_whitelist_auth(); return TRUE; } } if (!empty($auth_override_class_method[$this->router->class][$this->router->method])) { if ($auth_override_class_method[$this->router->class][$this->router->method] === "\x6e\x6f\156\145") { return TRUE; } if ($auth_override_class_method[$this->router->class][$this->router->method] === "\142\x61\163\x69\x63") { $this->_prepare_basic_auth(); return TRUE; } if ($auth_override_class_method[$this->router->class][$this->router->method] === "\x64\151\147\145\x73\164") { $this->_prepare_digest_auth(); return TRUE; } if ($auth_override_class_method[$this->router->class][$this->router->method] === "\163\145\x73\x73\x69\157\156") { $this->_check_php_session(); return TRUE; } if ($auth_override_class_method[$this->router->class][$this->router->method] === "\x77\x68\151\x74\145\154\x69\x73\164") { $this->_check_whitelist_auth(); return TRUE; } } } $auth_override_class_method_http = $this->config->item("\141\x75\x74\150\x5f\x6f\166\145\162\162\x69\144\145\137\x63\154\x61\163\x73\137\x6d\145\164\150\157\x64\137\150\x74\x74\x70"); if (!empty($auth_override_class_method_http)) { if (!empty($auth_override_class_method_http[$this->router->class]["\x2a"][$this->request->method])) { if ($auth_override_class_method_http[$this->router->class]["\52"][$this->request->method] === "\156\x6f\156\x65") { return TRUE; } if ($auth_override_class_method_http[$this->router->class]["\52"][$this->request->method] === "\x62\x61\x73\x69\x63") { $this->_prepare_basic_auth(); return TRUE; } if ($auth_override_class_method_http[$this->router->class]["\x2a"][$this->request->method] === "\144\151\147\x65\163\x74") { $this->_prepare_digest_auth(); return TRUE; } if ($auth_override_class_method_http[$this->router->class]["\52"][$this->request->method] === "\163\145\163\163\151\x6f\x6e") { $this->_check_php_session(); return TRUE; } if ($auth_override_class_method_http[$this->router->class]["\52"][$this->request->method] === "\167\150\151\x74\x65\x6c\x69\x73\164") { $this->_check_whitelist_auth(); return TRUE; } } if (!empty($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method])) { if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === "\156\157\x6e\x65") { return TRUE; } if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === "\142\x61\x73\x69\x63") { $this->_prepare_basic_auth(); return TRUE; } if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === "\x64\151\147\145\163\x74") { $this->_prepare_digest_auth(); return TRUE; } if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === "\163\145\163\163\151\x6f\156") { $this->_check_php_session(); return TRUE; } if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === "\x77\x68\151\164\145\154\151\163\164") { $this->_check_whitelist_auth(); return TRUE; } } } return FALSE; } protected function _parse_get() { $this->_get_args = array_merge($this->_get_args, $this->_query_args); } protected function _parse_post() { $this->_post_args = $_POST; if ($this->request->format) { $this->request->body = $this->input->raw_input_stream; } } protected function _parse_put() { if ($this->request->format) { $this->request->body = $this->input->raw_input_stream; if ($this->request->format === "\x6a\163\x6f\156") { $this->_put_args = json_decode($this->input->raw_input_stream); } } else { if ($this->input->method() === "\x70\165\x74") { $this->_put_args = $this->input->input_stream(); } } } protected function _parse_head() { parse_str(parse_url($this->input->server("\x52\105\121\125\x45\x53\x54\x5f\125\x52\x49"), PHP_URL_QUERY), $head); $this->_head_args = array_merge($this->_head_args, $head); } protected function _parse_options() { parse_str(parse_url($this->input->server("\x52\x45\x51\x55\x45\123\124\137\x55\122\111"), PHP_URL_QUERY), $options); $this->_options_args = array_merge($this->_options_args, $options); } protected function _parse_patch() { if ($this->request->format) { $this->request->body = $this->input->raw_input_stream; } else { if ($this->input->method() === "\x70\x61\x74\x63\x68") { $this->_patch_args = $this->input->input_stream(); } } } protected function _parse_delete() { if ($this->request->format) { $this->request->body = $this->input->raw_input_stream; if ($this->request->format === "\x6a\x73\157\156") { $this->_put_args = json_decode($this->input->raw_input_stream); } } else { if ($this->input->method() === "\144\145\154\x65\x74\x65") { $this->_delete_args = $this->input->input_stream(); } } } protected function _parse_query() { $this->_query_args = $this->input->get(); } public function get($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_get_args; } return isset($this->_get_args[$key]) ? $this->_xss_clean($this->_get_args[$key], $xss_clean) : NULL; } public function options($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_options_args; } return isset($this->_options_args[$key]) ? $this->_xss_clean($this->_options_args[$key], $xss_clean) : NULL; } public function head($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_head_args; } return isset($this->_head_args[$key]) ? $this->_xss_clean($this->_head_args[$key], $xss_clean) : NULL; } public function post($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_post_args; } return isset($this->_post_args[$key]) ? $this->_xss_clean($this->_post_args[$key], $xss_clean) : NULL; } public function put($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_put_args; } return isset($this->_put_args[$key]) ? $this->_xss_clean($this->_put_args[$key], $xss_clean) : NULL; } public function delete($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_delete_args; } return isset($this->_delete_args[$key]) ? $this->_xss_clean($this->_delete_args[$key], $xss_clean) : NULL; } public function patch($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_patch_args; } return isset($this->_patch_args[$key]) ? $this->_xss_clean($this->_patch_args[$key], $xss_clean) : NULL; } public function query($key = NULL, $xss_clean = NULL) { if ($key === NULL) { return $this->_query_args; } return isset($this->_query_args[$key]) ? $this->_xss_clean($this->_query_args[$key], $xss_clean) : NULL; } protected function _xss_clean($value, $xss_clean) { is_bool($xss_clean) || ($xss_clean = $this->_enable_xss); return $xss_clean === TRUE ? $this->security->xss_clean($value) : $value; } public function validation_errors() { $string = strip_tags($this->form_validation->error_string()); return explode(PHP_EOL, trim($string, PHP_EOL)); } protected function _perform_ldap_auth($username = '', $password = NULL) { if (empty($username)) { log_message("\144\145\142\165\x67", "\x4c\104\101\120\40\101\165\x74\x68\72\40\x66\x61\151\x6c\165\162\145\x2c\x20\145\155\160\x74\x79\x20\x75\163\x65\162\x6e\141\155\145"); return FALSE; } log_message("\144\x65\142\x75\x67", "\x4c\104\101\120\x20\x41\x75\x74\x68\72\40\114\x6f\x61\x64\x69\156\x67\x20\143\157\x6e\146\151\x67\165\x72\x61\x74\151\x6f\156"); $this->config->load("\x6c\144\141\160\x2e\160\150\x70", TRUE); $ldap = ["\164\151\155\x65\157\165\x74" => $this->config->item("\164\151\155\145\157\x75\164", "\x6c\144\x61\160"), "\x68\x6f\x73\164" => $this->config->item("\163\145\x72\166\145\162", "\154\x64\141\x70"), "\x70\x6f\x72\x74" => $this->config->item("\x70\x6f\x72\164", "\x6c\144\141\160"), "\x72\144\156" => $this->config->item("\x62\151\156\144\165\x73\145\x72", "\x6c\144\x61\160"), "\x70\x61\x73\163" => $this->config->item("\x62\151\156\144\x70\167", "\154\144\141\160"), "\x62\x61\163\145\x64\x6e" => $this->config->item("\142\141\x73\x65\144\x6e", "\x6c\144\x61\x70")]; log_message("\x64\x65\x62\x75\x67", "\114\104\x41\x50\x20\101\165\x74\150\x3a\40\x43\157\156\x6e\x65\143\164\40\164\x6f\x20" . (isset($ldaphost) ? $ldaphost : "\x5b\154\x64\141\x70\40\156\157\x74\x20\x63\157\156\x66\151\147\165\162\145\144\135")); $ldapconn = ldap_connect($ldap["\150\x6f\x73\164"], $ldap["\x70\157\x72\164"]); if ($ldapconn) { log_message("\x64\x65\142\x75\x67", "\123\145\x74\x74\151\x6e\x67\40\x74\151\155\x65\x6f\x75\x74\x20\x74\157\x20" . $ldap["\x74\x69\155\x65\157\x75\164"] . "\40\x73\x65\x63\157\156\144\x73"); ldap_set_option($ldapconn, LDAP_OPT_NETWORK_TIMEOUT, $ldap["\x74\x69\155\145\x6f\165\164"]); log_message("\144\145\142\x75\147", "\x4c\x44\101\x50\x20\101\165\164\150\x3a\x20\102\x69\156\x64\x69\156\147\x20\x74\x6f\40" . $ldap["\150\157\x73\x74"] . "\x20\167\x69\164\150\40\x64\156\40" . $ldap["\x72\144\156"]); $ldapbind = ldap_bind($ldapconn, $ldap["\162\144\x6e"], $ldap["\160\x61\163\163"]); if ($ldapbind === FALSE) { log_message("\x65\x72\x72\157\162", "\x4c\104\101\120\40\x41\165\164\150\72\x20\142\x69\x6e\x64\40\x77\141\x73\40\165\156\163\x75\143\x63\145\163\x73\x66\165\x6c"); return FALSE; } log_message("\144\x65\142\165\147", "\114\x44\101\120\x20\x41\x75\164\150\x3a\x20\142\x69\156\x64\40\x73\165\x63\143\145\x73\x73\x66\x75\154"); } if (($res_id = ldap_search($ldapconn, $ldap["\142\141\163\x65\x64\156"], "\x75\x69\144\x3d{$username}")) === FALSE) { log_message("\145\x72\x72\x6f\x72", "\x4c\104\101\x50\40\101\x75\164\x68\72\40\125\x73\145\x72\40" . $username . "\x20\156\157\x74\40\146\x6f\x75\x6e\x64\40\x69\x6e\40\x73\145\141\x72\x63\x68"); return FALSE; } if (ldap_count_entries($ldapconn, $res_id) !== 1) { log_message("\x65\x72\x72\x6f\x72", "\114\x44\x41\120\40\101\x75\164\x68\72\x20\106\x61\x69\154\x75\x72\x65\x2c\x20\x75\163\x65\x72\156\141\155\145\40" . $username . "\146\157\x75\156\144\40\155\157\162\x65\40\164\150\x61\x6e\x20\157\x6e\x63\145"); return FALSE; } if (($entry_id = ldap_first_entry($ldapconn, $res_id)) === FALSE) { log_message("\145\162\x72\157\162", "\x4c\x44\101\x50\x20\x41\165\164\150\72\x20\x46\x61\151\154\x75\162\x65\x2c\40\x65\x6e\164\x72\x79\x20\x6f\x66\40\x73\145\x61\162\x63\150\40\162\145\x73\165\x6c\x74\40\x63\x6f\165\x6c\x64\x20\x6e\157\x74\40\142\x65\40\x66\x65\x74\143\x68\x65\x64"); return FALSE; } if (($user_dn = ldap_get_dn($ldapconn, $entry_id)) === FALSE) { log_message("\145\x72\x72\157\x72", "\x4c\x44\x41\x50\40\x41\165\x74\150\72\40\106\x61\151\154\x75\x72\x65\x2c\x20\x75\163\145\x72\55\x64\x6e\x20\x63\x6f\x75\154\x64\40\156\157\x74\x20\142\x65\x20\146\145\x74\x63\x68\145\x64"); return FALSE; } if (($link_id = ldap_bind($ldapconn, $user_dn, $password)) === FALSE) { log_message("\x65\162\x72\x6f\162", "\114\104\101\x50\40\101\165\x74\x68\72\x20\106\141\x69\154\x75\162\145\54\40\x75\x73\x65\x72\x6e\x61\155\x65\57\160\141\163\163\167\x6f\x72\144\x20\144\x69\144\x20\156\x6f\x74\40\x6d\141\x74\x63\x68\72\x20" . $user_dn); return FALSE; } log_message("\144\145\142\x75\x67", "\114\x44\x41\x50\x20\101\x75\x74\x68\x3a\40\123\165\x63\x63\x65\163\163\x20" . $user_dn . "\x20\x61\165\x74\x68\x65\156\x74\x69\x63\x61\164\x65\x64\40\163\165\143\x63\x65\163\x73\146\x75\154\x6c\171"); $this->_user_ldap_dn = $user_dn; ldap_close($ldapconn); return TRUE; } protected function _perform_library_auth($username = '', $password = NULL) { if (empty($username)) { log_message("\145\x72\x72\157\162", "\114\151\142\x72\141\162\171\40\101\x75\x74\150\72\40\106\x61\x69\154\x75\x72\x65\x2c\x20\145\x6d\x70\x74\171\x20\165\x73\x65\162\156\141\x6d\x65"); return FALSE; } $auth_library_class = strtolower($this->config->item("\x61\x75\x74\x68\x5f\x6c\151\142\x72\x61\162\171\x5f\x63\154\x61\163\x73")); $auth_library_function = strtolower($this->config->item("\x61\x75\164\x68\137\x6c\x69\142\162\x61\162\171\137\x66\165\x6e\143\164\151\x6f\156")); if (empty($auth_library_class)) { log_message("\144\145\x62\165\147", "\x4c\x69\142\x72\x61\x72\x79\x20\101\x75\164\150\72\40\106\141\151\154\x75\162\x65\x2c\x20\x65\155\160\164\x79\40\x61\x75\x74\x68\137\x6c\x69\142\162\x61\x72\x79\x5f\x63\x6c\141\x73\x73"); return FALSE; } if (empty($auth_library_function)) { log_message("\x64\x65\x62\x75\147", "\x4c\151\x62\162\x61\x72\171\x20\101\165\164\x68\x3a\x20\x46\141\151\x6c\165\x72\145\54\x20\145\155\x70\x74\x79\x20\141\x75\x74\150\137\154\x69\142\x72\x61\162\x79\x5f\146\165\156\143\164\x69\157\156"); return FALSE; } if (is_callable([$auth_library_class, $auth_library_function]) === FALSE) { $this->load->library($auth_library_class); } return $this->{$auth_library_class}->{$auth_library_function}($username, $password); } protected function _check_login($username = NULL, $password = FALSE) { if (empty($username)) { return FALSE; } $auth_source = strtolower($this->config->item("\x61\x75\164\150\137\x73\157\x75\162\x63\x65")); $rest_auth = strtolower($this->config->item("\162\145\x73\x74\137\x61\165\164\x68")); $valid_logins = $this->config->item("\x72\145\x73\164\x5f\x76\141\154\151\144\137\x6c\x6f\x67\x69\x6e\163"); if (!$this->config->item("\141\165\x74\150\137\x73\157\165\162\143\145") && $rest_auth === "\x64\x69\147\145\163\164") { return md5($username . "\72" . $this->config->item("\162\x65\163\164\137\x72\145\141\x6c\x6d") . "\72" . (isset($valid_logins[$username]) ? $valid_logins[$username] : '')); } if ($password === FALSE) { return FALSE; } if ($auth_source === "\x6c\x64\x61\160") { log_message("\x64\x65\x62\x75\147", "\120\x65\162\x66\157\x72\155\x69\156\x67\x20\x4c\x44\x41\x50\40\141\165\x74\x68\x65\156\x74\151\x63\x61\x74\x69\157\x6e\x20\x66\x6f\x72\40{$username}"); return $this->_perform_ldap_auth($username, $password); } if ($auth_source === "\154\151\x62\162\141\162\171") { log_message("\x64\x65\x62\x75\x67", "\120\145\x72\146\x6f\162\155\151\x6e\147\40\x4c\x69\142\x72\x61\162\x79\x20\x61\x75\x74\x68\x65\x6e\x74\151\x63\141\x74\x69\x6f\156\x20\x66\x6f\x72\40{$username}"); return $this->_perform_library_auth($username, $password); } if (array_key_exists($username, $valid_logins) === FALSE) { return FALSE; } if ($valid_logins[$username] !== $password) { return FALSE; } return TRUE; } protected function _check_php_session() { $key = $this->config->item("\141\165\164\x68\137\163\157\x75\x72\x63\x65"); if (!$this->session->userdata($key)) { $this->response([$this->config->item("\x72\145\x73\x74\137\x73\164\141\164\165\163\137\x66\x69\145\154\144\x5f\156\x61\155\145") => FALSE, $this->config->item("\x72\x65\x73\164\137\x6d\x65\163\x73\x61\147\x65\137\x66\151\x65\x6c\144\x5f\x6e\141\x6d\145") => $this->lang->line("\x74\x65\x78\164\x5f\x72\x65\163\x74\x5f\165\x6e\x61\x75\x74\x68\x6f\x72\x69\x7a\x65\x64")], self::HTTP_UNAUTHORIZED); } } protected function _check_jwt() { if (isset($this->_head_args["\101\x75\164\x68\157\162\151\172\141\164\x69\x6f\x6e"])) { try { $exploded = explode("\x20", $this->_head_args["\101\165\164\x68\x6f\162\151\x7a\x61\164\151\157\156"]); $bearer = $exploded[0]; if ($bearer !== "\102\145\141\x72\145\162") { throw new InvalidArgumentException("\102\145\141\x72\145\x72"); } $token = $exploded[1]; $payload = JWT::decode($token, $this->config->item("\152\x77\164\x5f\x6b\x65\x79"), array($this->config->item("\152\167\x74\137\141\x6c\x67"))); saveTokenToSession(array("\145\156\143" => $payload->enc, "\151\163\163" => $payload->iss, "\x63\154\151\145\x6e\164\x4e\141\x6d\x65" => $payload->clientName, "\143\x6c\151\145\156\x74\126\145\x72\163\151\x6f\156" => $payload->clientVersion)); } catch (Exception $e) { if ($e instanceof Firebase\JWT\ExpiredException) { $error_code = VERR_AUTH_JWT_TOKEN_EXPIRED; } else { if ($e instanceof DomainException) { $error_code = VERR_AUTH_JWT_DOMAIN_ERROR; } else { if ($e instanceof Firebase\JWT\BeforeValidException) { $error_code = VERR_AUTH_JWT_BEFORE_VALID; } else { if ($e instanceof InvalidArgumentException) { $error_code = VERR_AUTH_JWT_INVALID_ARGUMENT; } else { if ($e instanceof UnexpectedValueException) { $error_code = VERR_AUTH_JWT_UNEXPECTED_VALUE; } else { $error_code = VERR_AUTH_JWT_UNKNOWN; log_message("\145\x72\162\157\162", sprintf("\45\163\x3a\40\x75\156\153\x6e\x6f\x77\156\40\152\x77\x74\40\x65\162\x72\157\162\x3a\x20\x25\x73", __METHOD__, $e)); } } } } } log_message("\145\162\x72\x6f\x72", sprintf("\45\163\x3a\40\x6a\167\164\40\x65\162\162\157\x72\72\40\45\163", __METHOD__, $error_code)); $this->response([$this->config->item("\x72\145\x73\x74\x5f\x73\x74\x61\164\165\163\x5f\x66\151\x65\x6c\x64\137\156\141\155\x65") => $error_code, $this->config->item("\x72\x65\163\x74\137\155\145\x73\163\x61\147\145\137\146\x69\x65\x6c\144\x5f\x6e\141\155\x65") => $e->getMessage()], self::HTTP_UNAUTHORIZED); } } else { $this->response([$this->config->item("\162\x65\x73\164\x5f\163\164\141\x74\x75\x73\x5f\x66\151\145\154\144\137\x6e\141\155\x65") => VERR_AUTH_JWT_INVALID_ARGUMENT, $this->config->item("\162\145\x73\x74\x5f\x6d\145\163\x73\141\x67\x65\x5f\146\151\145\x6c\x64\x5f\x6e\141\x6d\x65") => $this->lang->line("\164\x65\170\x74\x5f\162\145\163\x74\x5f\165\156\x61\x75\164\150\x6f\162\x69\172\145\144")], self::HTTP_UNAUTHORIZED); } } protected function _prepare_basic_auth() { if ($this->config->item("\x72\x65\x73\x74\137\x69\160\137\167\x68\151\164\145\x6c\151\x73\x74\137\145\156\141\x62\x6c\x65\x64")) { $this->_check_whitelist_auth(); } $username = $this->input->server("\x50\110\x50\137\x41\x55\x54\110\137\125\123\105\122"); $http_auth = $this->input->server("\110\124\124\x50\137\x41\x55\124\110\x45\116\124\111\103\x41\x54\x49\x4f\116"); $password = NULL; if ($username !== NULL) { $password = $this->input->server("\x50\x48\x50\137\101\125\x54\x48\x5f\120\127"); } elseif ($http_auth !== NULL) { if (strpos(strtolower($http_auth), "\142\141\163\x69\x63") === 0) { list($username, $password) = explode("\x3a", base64_decode(substr($this->input->server("\x48\124\x54\x50\137\x41\125\x54\x48\x4f\x52\x49\x5a\x41\124\x49\117\x4e"), 6))); } } if ($this->_check_login($username, $password) === FALSE) { $this->_force_login(); } } protected function _prepare_digest_auth() { if ($this->config->item("\x72\x65\x73\164\x5f\x69\160\137\167\x68\151\x74\145\154\151\163\164\x5f\x65\156\141\x62\154\x65\144")) { $this->_check_whitelist_auth(); } $digest_string = $this->input->server("\x50\110\x50\x5f\101\x55\x54\x48\137\104\x49\x47\105\x53\124"); if ($digest_string === NULL) { $digest_string = $this->input->server("\110\x54\124\120\x5f\101\125\124\x48\117\x52\111\132\x41\x54\111\x4f\x4e"); } $unique_id = uniqid(); if (empty($digest_string)) { $this->_force_login($unique_id); } $matches = []; preg_match_all("\100\x28\165\x73\145\162\x6e\x61\155\x65\x7c\156\x6f\156\143\x65\174\165\162\x69\174\156\143\x7c\143\x6e\157\x6e\143\145\x7c\x71\157\160\x7c\x72\x65\163\160\157\156\163\x65\x29\75\x5b\47\x22\x5d\x3f\x28\x5b\x5e\47\42\54\135\53\x29\x40", $digest_string, $matches); $digest = empty($matches[1]) || empty($matches[2]) ? [] : array_combine($matches[1], $matches[2]); $username = $this->_check_login($digest["\165\163\145\x72\156\x61\155\x65"], TRUE); if (array_key_exists("\x75\x73\145\x72\156\x61\x6d\145", $digest) === FALSE || $username === FALSE) { $this->_force_login($unique_id); } $md5 = md5(strtoupper($this->request->method) . "\x3a" . $digest["\x75\162\x69"]); $valid_response = md5($username . "\72" . $digest["\156\157\156\x63\145"] . "\x3a" . $digest["\x6e\143"] . "\72" . $digest["\143\x6e\x6f\156\x63\145"] . "\x3a" . $digest["\x71\157\160"] . "\x3a" . $md5); if (strcasecmp($digest["\162\x65\163\x70\x6f\x6e\x73\145"], $valid_response) !== 0) { $this->response([$this->config->item("\x72\x65\163\x74\x5f\163\164\141\x74\165\163\137\146\151\145\x6c\144\x5f\x6e\141\x6d\x65") => FALSE, $this->config->item("\x72\145\x73\164\137\x6d\x65\x73\163\141\x67\x65\137\146\x69\145\154\x64\137\x6e\141\155\x65") => $this->lang->line("\x74\145\170\164\x5f\162\x65\163\x74\x5f\151\156\166\141\x6c\x69\144\x5f\143\x72\145\144\x65\156\x74\x69\141\154\x73")], self::HTTP_UNAUTHORIZED); } } protected function _check_blacklist_auth() { $pattern = sprintf("\57\x28\x3f\x3a\54\x5c\163\x2a\174\136\x29\134\x51\45\x73\134\x45\x28\x3f\75\54\x5c\x73\x2a\174\44\x29\57\x6d", $this->input->ip_address()); if (preg_match($pattern, $this->config->item("\162\145\x73\164\x5f\x69\x70\x5f\142\154\x61\x63\x6b\154\x69\163\x74"))) { $this->response([$this->config->item("\x72\145\163\x74\x5f\163\x74\x61\164\165\163\x5f\x66\x69\145\154\x64\137\156\x61\155\145") => FALSE, $this->config->item("\x72\145\163\x74\x5f\155\x65\x73\163\x61\147\x65\137\146\151\145\x6c\x64\137\x6e\x61\155\x65") => $this->lang->line("\164\145\170\164\137\x72\145\163\x74\x5f\x69\x70\x5f\x64\145\x6e\x69\x65\144")], self::HTTP_UNAUTHORIZED); } } protected function _check_whitelist_auth() { $whitelist = explode("\54", $this->config->item("\x72\x65\x73\164\x5f\x69\x70\137\x77\x68\151\164\x65\154\x69\x73\164")); array_push($whitelist, "\61\x32\67\56\60\x2e\x30\56\x31", "\60\x2e\x30\56\x30\56\60"); foreach ($whitelist as &$ip) { $ip = trim($ip); } if (in_array($this->input->ip_address(), $whitelist) === FALSE) { $this->response([$this->config->item("\162\145\163\164\x5f\163\x74\141\x74\165\x73\x5f\146\151\145\154\144\137\156\x61\155\145") => FALSE, $this->config->item("\162\x65\163\x74\x5f\155\145\163\163\x61\147\x65\x5f\146\151\x65\x6c\x64\137\x6e\141\155\145") => $this->lang->line("\x74\145\x78\x74\137\x72\x65\x73\164\137\x69\160\137\165\156\141\x75\x74\150\157\162\151\172\145\144")], self::HTTP_UNAUTHORIZED); } } protected function _force_login($nonce = '') { $rest_auth = $this->config->item("\x72\x65\x73\164\x5f\x61\165\164\150"); $rest_realm = $this->config->item("\x72\x65\x73\164\x5f\x72\x65\x61\154\x6d"); if (strtolower($rest_auth) === "\142\x61\x73\151\143") { header("\127\127\x57\x2d\x41\x75\164\x68\x65\156\x74\151\143\141\164\x65\x3a\40\x42\141\163\x69\x63\x20\162\x65\141\x6c\x6d\75\42" . $rest_realm . "\42"); } elseif (strtolower($rest_auth) === "\x64\151\x67\145\163\164") { header("\x57\127\127\55\x41\x75\x74\150\145\156\x74\x69\x63\141\164\x65\72\x20\x44\x69\147\x65\163\164\40\162\x65\141\x6c\x6d\75\x22" . $rest_realm . "\x22\54\40\x71\x6f\x70\75\42\x61\165\x74\150\42\54\40\156\157\x6e\143\x65\75\x22" . $nonce . "\42\54\x20\157\x70\141\161\165\x65\x3d\42" . md5($rest_realm) . "\x22"); } $this->response([$this->config->item("\162\x65\x73\x74\x5f\x73\164\141\x74\165\x73\x5f\x66\151\145\x6c\144\137\156\x61\x6d\x65") => FALSE, $this->config->item("\162\145\x73\x74\x5f\155\145\163\163\x61\x67\x65\x5f\x66\151\x65\x6c\x64\x5f\156\x61\x6d\145") => $this->lang->line("\x74\145\170\x74\x5f\x72\145\163\x74\x5f\x75\156\x61\165\164\x68\157\162\151\x7a\x65\x64")], self::HTTP_UNAUTHORIZED); } protected function _log_access_time() { $payload["\162\x74\x69\155\x65"] = $this->_end_rtime - $this->_start_rtime; return $this->rest->db->update($this->config->item("\x72\145\163\164\137\154\157\147\163\137\x74\141\x62\x6c\145"), $payload, ["\x69\144" => $this->_insert_id]); } protected function _log_response_code($http_code) { $payload["\162\145\163\x70\157\156\x73\x65\x5f\x63\157\144\145"] = $http_code; return $this->rest->db->update($this->config->item("\162\145\163\x74\137\x6c\157\x67\x73\x5f\x74\x61\142\x6c\x65"), $payload, ["\x69\144" => $this->_insert_id]); } protected function _check_access() { if ($this->config->item("\162\x65\x73\164\137\145\x6e\141\x62\154\145\137\x61\x63\143\145\163\x73") === FALSE) { return TRUE; } $accessRow = $this->rest->db->where("\x6b\x65\x79", $this->rest->key)->get($this->config->item("\162\x65\163\x74\x5f\x61\x63\143\145\x73\163\137\164\141\x62\x6c\x65"))->row_array(); if (!empty($accessRow) && !empty($accessRow["\141\154\154\x5f\141\x63\143\145\x73\163"])) { return TRUE; } $controller = implode("\x2f", [$this->router->directory, $this->router->class]); $controller = str_replace("\x2f\57", "\57", $controller); return $this->rest->db->where("\153\145\x79", $this->rest->key)->where("\x63\x6f\156\164\162\x6f\154\x6c\x65\x72", $controller)->get($this->config->item("\162\145\163\164\x5f\141\x63\x63\x65\x73\x73\x5f\164\141\x62\154\x65"))->num_rows() > 0; } protected function _check_cors() { $allowed_headers = implode("\x20\54", $this->config->item("\x61\x6c\x6c\x6f\167\145\x64\137\143\x6f\162\163\137\x68\x65\x61\144\145\x72\163")); $allowed_methods = implode("\x20\x2c", $this->config->item("\141\154\x6c\x6f\x77\x65\x64\137\x63\157\x72\163\137\155\x65\164\x68\x6f\x64\x73")); if ($this->config->item("\x61\154\154\157\x77\137\x61\156\x79\137\x63\x6f\x72\163\x5f\x64\x6f\155\x61\x69\156") === TRUE) { header("\101\x63\143\x65\163\x73\55\103\157\x6e\164\162\157\154\x2d\101\x6c\154\x6f\x77\55\x4f\x72\x69\147\151\x6e\72\x20\52"); header("\101\143\x63\x65\x73\x73\x2d\103\x6f\156\164\x72\157\154\x2d\x41\x6c\154\x6f\167\55\x48\145\141\144\145\162\163\72\40" . $allowed_headers); header("\101\143\143\x65\x73\163\55\103\x6f\156\164\162\157\154\x2d\101\x6c\154\x6f\x77\x2d\115\x65\164\150\x6f\144\163\72\x20" . $allowed_methods); } else { $origin = $this->input->server("\110\x54\124\120\137\x4f\x52\111\x47\x49\x4e"); if ($origin === NULL) { $origin = ''; } if (in_array($origin, $this->config->item("\x61\154\154\157\x77\145\x64\137\x63\157\162\x73\137\157\162\151\147\151\156\163"))) { header("\x41\x63\143\x65\x73\x73\55\x43\x6f\x6e\x74\162\157\154\55\101\154\154\x6f\x77\x2d\117\162\x69\x67\151\x6e\72\40" . $origin); header("\x41\x63\143\x65\x73\163\55\103\x6f\x6e\x74\162\x6f\x6c\x2d\x41\x6c\x6c\157\167\x2d\x48\x65\x61\144\x65\162\x73\x3a\x20" . $allowed_headers); header("\x41\x63\x63\145\x73\x73\x2d\103\157\x6e\164\162\x6f\x6c\55\101\x6c\154\157\167\x2d\x4d\x65\164\150\x6f\x64\163\x3a\40" . $allowed_methods); } } if ($this->input->method() === "\x6f\160\164\x69\x6f\156\x73") { exit; } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/StrUtils.php b/server/original/www/ezwebserver/src/application/libraries/StrUtils.php index 876ddde..db910b1 100644 --- a/server/original/www/ezwebserver/src/application/libraries/StrUtils.php +++ b/server/original/www/ezwebserver/src/application/libraries/StrUtils.php @@ -1,7 +1,7 @@ $value) { if (property_exists($this, $key)) { if (is_numeric($this->{$key}) && is_numeric($value)) { $this->{$key} = (int) $value; } else { $this->{$key} = $value; } } } } } class SE3DBImage extends Struct { var $nIndex; var $strStudyUID; var $strChartID; var $strCTName; var $strFileName; var $strComment; var $timeCapture; var $nCntMultiCapture; var $strReserved1; } class SE3DBReport extends Struct { var $nIndex; var $strChartNo; var $strTitle; var $strComment; var $strFileName; var $timeCreation; } class SE3DBReportTemplate extends Struct { public function __construct($var) { $this->nIndex = intval($var["\x72\160\x74\x74\x6d\160\x5f\151\x6e\144\145\x78"]); $this->strName = $var["\x72\160\x74\164\x6d\x70\x5f\156\x61\x6d\145"]; $this->strFileName = $var["\x72\x70\x74\x74\x6d\160\137\x66\151\154\145\x5f\x6e\x61\x6d\145"]; $this->dtCreated = currentDateFormat(DATEFORMAT_ISO8601, $var["\162\x70\x74\164\x6d\160\137\143\x72\x65\x61\x74\145\144"]); $this->dtModified = currentDateFormat(DATEFORMAT_ISO8601, $var["\x72\160\x74\x74\155\x70\137\154\x61\163\164\137\x6d\x6f\144\x69\146\x69\x65\x64"]); $this->bUserAdded = setBoolVal($var["\x72\160\x74\164\x6d\x70\x5f\x61\x64\144\x65\x64\137\x62\171\137\165\163\145\x72"]); $this->bVisible = setBoolVal($var["\x72\160\164\x74\155\x70\x5f\166\151\163\151\142\154\x65\137\151\x6e\x5f\154\151\x73\164"]); $this->nPageCount = intval($var["\162\x70\164\x74\155\x70\137\160\141\x67\x65\137\x63\157\165\156\164"]); $this->strPaperSize = $var["\162\160\x74\164\x6d\160\137\x70\x61\x70\145\x72\x5f\163\x69\172\x65"]; } var $nIndex; var $strName; var $strFileName; var $dtCreated; var $dtModified; var $bUserAdded; var $bVisible; var $nPageCount; var $strPaperSize; } class SE3DBReportSetting extends Struct { public function __construct($var) { $this->nIndex = intval($var["\x72\160\x74\x73\145\x74\x5f\x69\156\x64\145\170"]); $this->strSettingVersion = $var["\x72\x70\x74\163\145\164\137\x76\145\x72\x73\151\x6f\x6e"]; $this->strDefaultTemplateFilename = $var["\x72\160\164\163\x65\164\x5f\144\145\x66\x61\x75\x6c\x74\137\164\x65\155\160\x6c\x61\164\145"]; } var $strSettingVersion; var $strDefaultTemplateFilename; } class SE3DBPresetComment extends Struct { public function __construct($var) { $this->nIndex = intval($var["\x72\160\x74\160\x63\x6d\x5f\151\x6e\144\145\x78"]); $this->strTitle = $var["\162\160\164\160\143\x6d\x5f\x74\x69\164\x6c\145"]; $this->strComment = $var["\162\160\164\x70\143\x6d\137\143\x6f\155\x6d\x65\156\x74"]; $this->dtCreate = currentDateFormat(DATEFORMAT_ISO8601, $var["\162\x70\164\160\143\155\x5f\143\x72\145\x61\x74\145\x64"]); $this->dtModified = currentDateFormat(DATEFORMAT_ISO8601, $var["\162\160\164\160\x63\x6d\x5f\x6c\x61\x73\164\137\155\x6f\x64\151\146\x69\145\144"]); } var $nIndex; var $strTitle; var $strComment; var $dtCreate; var $dtModified; } class SCaptureImage extends Struct { var $strStudyUID; var $strCTName; var $strFileName; var $dtCaptureDateTime; var $strChartNo; var $strDcmFileCount; var $strComment; } class SConsultCategory extends Struct { var $nCategoryId; var $strCategoryName; var $nParentsId; var $nCategoryOrderNumber; var $nCategoryType; var $bIsCarted; var $bIsLocked; } class SConsultCategoryPassInfo extends Struct { var $sConsultCategory; var $strLocaledCategoryName; public function __construct() { $this->sConsultCategory = new SConsultCategory(); } } class SConsultContent extends Struct { var $nContentId; var $strContentName; var $strContentFilePath; var $nContentType; var $dtLastAccessTime; var $bFavorite; var $nCategoryId; var $dtRegisteredTime; public function __construct() { $this->nContentId = 0; $this->strContentName = ''; $this->strContentFilePath = ''; $this->nContentType = 0; $this->dtLastAccessTime = ''; $this->bFavorite = false; $this->nCategoryId = 0; $this->dtRegisteredTime = ''; } } class SImplantInfo extends Struct { var $strCompany; var $strLineup; var $strModelName; var $dLength; var $dTotalLength; var $dOcclusal; var $dApical; var $nModelID; var $imgSTL; var $imgPNG; public function __construct() { $this->strCompany = ''; $this->strLineup = ''; $this->strModelName = ''; $this->dLength = 0.0; $this->dTotalLength = 0.0; $this->dOcclusal = 0.0; $this->dApical = 0.0; $this->nModelID = 0; $this->imgSTL = ''; $this->imgPNG = ''; } public static function constructWithParameter($row, $fileEncoding = "\x62\141\163\145\x36\64", $boolContainSTL = TRUE) { if (empty($fileEncoding) == TRUE || strcasecmp($fileEncoding, "\x62\x61\x73\145\x36\x34") == 0) { if (isset($row["\x6d\157\144\x65\x6c\137\163\164\x6c\x5f\x69\155\x67"]) && !empty($row["\x6d\x6f\x64\x65\154\137\163\164\x6c\137\151\x6d\x67"])) { $row["\155\157\144\145\154\137\163\x74\154\x5f\151\155\x67"] = base64_encode($row["\155\x6f\144\x65\x6c\137\163\164\154\137\x69\x6d\x67"]); } if (isset($row["\155\x6f\144\145\x6c\137\160\x6e\147\x5f\151\x6d\147"]) && !empty($row["\155\x6f\x64\145\154\137\160\x6e\147\x5f\151\x6d\147"])) { $row["\x6d\x6f\x64\145\154\x5f\160\x6e\x67\x5f\x69\x6d\147"] = base64_encode($row["\x6d\157\x64\145\x6c\137\x70\156\x67\137\x69\x6d\147"]); } } else { if (strcasecmp($fileEncoding, "\150\145\170") == 0) { } else { vt_loge(__METHOD__ . "\x3a" . "\111\x6e\166\141\x6c\151\x64\40\105\x6e\143\157\144\x69\156\147\40\x50\x61\x72\x61\x6d\145\164\145\x72\x20\105\x72\162\157\162\56"); return VERR_COMMON_INVALID; } } $sImplantInfo = new SImplantInfo(); $sImplantInfo->strCompany = $row["\x63\157\x6d\137\156\141\x6d\x65"]; $sImplantInfo->strLineup = $row["\x6c\156\165\x70\x5f\x6e\141\155\145"]; $sImplantInfo->strModelName = $row["\155\157\x64\x65\154\137\x6e\141\155\145"]; $sImplantInfo->dLength = doubleval($row["\155\157\x64\x65\154\137\154\145\156\x67\x74\150"]); $sImplantInfo->dTotalLength = doubleval($row["\155\x6f\144\145\x6c\137\x74\x6f\x74\x61\x6c\x6c\x65\x6e\147\164\x68"]); $sImplantInfo->dOcclusal = doubleval($row["\x6d\x6f\x64\145\154\137\x6f\143\143\x6c\x75\163\x61\x6c"]); $sImplantInfo->dApical = doubleval($row["\155\x6f\144\x65\154\x5f\x61\x70\x69\143\141\x6c"]); $sImplantInfo->nModelID = isset($row["\x6d\x6f\144\145\x6c\x5f\x69\x64"]) ? intval($row["\155\157\x64\x65\x6c\137\x69\x64"]) : 0; if ($boolContainSTL) { $sImplantInfo->imgSTL = isset($row["\155\x6f\x64\145\x6c\137\x73\x74\x6c\137\151\x6d\147"]) ? $row["\x6d\x6f\x64\145\x6c\x5f\163\164\x6c\x5f\x69\155\x67"] : ''; } $sImplantInfo->imgPNG = isset($row["\155\157\144\145\154\137\x70\x6e\x67\137\151\x6d\x67"]) ? $row["\155\x6f\144\x65\154\x5f\x70\x6e\x67\137\x69\155\147"] : ''; return $sImplantInfo; } } class SImageInfo extends Struct { var $nImageID; var $strChartNo; var $strImgFileName; var $modality; var $strAcqMode; var $dtAcqTime; var $bIsImported; var $fKvp; var $fMa; var $fDose; var $fExposureTime; var $strRawFileName; var $strVPanoFileName; var $dtUpdateDateTime; var $strModelName; var $strDeviceInfo; var $strNote; var $nRecordID; var $nPatID; var $strStudyInstanceUID; var $strDeviceSerialNumber; var $bPaidImage; var $eImageType; var $eSourceType; var $bIsThirdPartyGroupImage; public function __construct() { $this->nImageID = 0; $this->strChartNo = ''; $this->strImgFileName = 0; $this->modality; $this->strAcqMode = ''; $this->dtAcqTime; $this->bIsImported = FALSE; $this->fKvp = 0.0; $this->fMa = 0.0; $this->fDose = 0.0; $this->fExposureTime = 0.0; $this->strRawFileName = ''; $this->strVPanoFileName = ''; $this->dtUpdateDateTime; $this->strModelName = ''; $this->strDeviceInfo = ''; $this->strNote = ''; $this->nRecordID = 0; $this->nPatID = 0; $this->strStudyInstanceUID = ''; $this->strDeviceSerialNumber = ''; $this->bPaidImage = TRUE; $this->eSourceType; $this->eImageType = "\x65\x4e\x6f\x72\x6d\x61\154\x44\x65\x76\151\x63\x65\111\155\141\x67\x65"; $this->bIsThirdPartyGroupImage = false; } public static function createFromDBRecord($row) { $imgInfo = new SImageInfo(); $imgInfo->nImageID = isset($row["\x69\x6d\x67\137\151\x64"]) ? intval($row["\x69\155\x67\x5f\151\144"]) : 0; $imgInfo->strChartNo = isset($row["\x70\x61\x74\x5f\143\x68\141\162\164\156\x6f"]) ? $row["\x70\x61\x74\x5f\x63\x68\141\162\x74\x6e\x6f"] : ''; $imgInfo->strImgFileName = isset($row["\151\155\147\x5f\146\151\154\145\x6e\141\x6d\145"]) ? $row["\x69\x6d\147\137\146\x69\x6c\145\x6e\x61\x6d\145"] : ''; $imgInfo->modality = isset($row["\x69\155\147\137\155\157\x64\141\x6c\151\164\171"]) ? showDBModalityStringToEmodality($row["\151\x6d\147\137\x6d\157\144\x61\x6c\x69\x74\171"]) : ''; $imgInfo->strAcqMode = isset($row["\x69\x6d\x67\137\155\x6f\144\x65"]) ? $row["\151\x6d\147\137\x6d\x6f\x64\x65"] : ''; $imgInfo->dtAcqTime = isset($row["\151\x6d\147\x5f\x61\143\x71\165\x69\163\151\164\x69\x6f\x6e\137\144\x61\x74\145\164\151\x6d\x65"]) ? currentDateFormat(DATEFORMAT_ISO8601, $row["\151\x6d\x67\137\x61\x63\161\x75\x69\x73\151\164\x69\x6f\x6e\x5f\144\x61\164\x65\x74\151\x6d\x65"]) : ''; $imgInfo->bIsImported = isset($row["\151\155\x67\x5f\x69\155\x70\157\x72\164\x65\x64"]) ? setBoolVal($row["\151\x6d\147\137\151\155\x70\x6f\162\164\x65\x64"]) : FALSE; $imgInfo->fKvp = isset($row["\151\155\x67\137\153\166\x70"]) ? floatval($row["\x69\155\x67\x5f\153\166\160"]) : 0.0; $imgInfo->fMa = isset($row["\151\x6d\x67\x5f\x6d\x61"]) ? floatval($row["\x69\x6d\147\x5f\155\x61"]) : 0.0; $imgInfo->fDose = isset($row["\151\x6d\147\137\144\157\163\x65"]) ? floatval($row["\x69\155\x67\x5f\144\x6f\163\x65"]) : 0.0; $imgInfo->fExposureTime = isset($row["\151\x6d\147\x5f\x65\x78\160\x6f\163\x75\162\145\137\x74\x69\155\x65"]) ? floatval($row["\x69\155\147\x5f\x65\x78\160\x6f\163\165\x72\x65\137\x74\x69\155\145"]) : 0.0; $imgInfo->strRawFileName = isset($row["\x69\x6d\x67\x5f\x72\x61\167\x5f\146\x69\154\x65\x6e\141\155\x65"]) ? $row["\151\155\x67\x5f\x72\141\x77\x5f\x66\x69\154\145\156\141\155\145"] : ''; $imgInfo->strVPanoFileName = isset($row["\x69\x6d\x67\x5f\165\163\145\x72\x5f\144\x65\146\151\156\x65\x64\x5f\61\61"]) ? $row["\151\155\x67\137\x75\163\145\162\137\144\145\x66\x69\x6e\145\x64\x5f\61\x31"] : ''; $imgInfo->dtUpdateDateTime = isset($row["\151\155\147\137\165\x70\144\x61\x74\x65\x5f\144\141\x74\145\164\151\155\x65"]) ? currentDateFormat(DATEFORMAT_ISO8601, $row["\x69\155\x67\x5f\165\160\144\141\164\145\x5f\144\141\x74\x65\164\151\155\145"]) : ''; $imgInfo->strModelName = isset($row["\x69\x6d\147\x5f\155\x6f\x64\145\154\156\x61\155\145"]) ? $row["\x69\x6d\147\x5f\155\x6f\144\x65\154\x6e\x61\155\145"] : ''; $imgInfo->strDeviceInfo = isset($row["\151\155\147\x5f\x75\x73\145\x72\137\144\145\146\151\156\145\144\137\x39"]) ? $row["\x69\155\147\x5f\x75\163\x65\162\x5f\144\x65\146\x69\x6e\x65\144\137\x39"] : ''; $imgInfo->strNote = isset($row["\x69\x6d\147\x5f\156\157\x74\145"]) ? $row["\x69\155\147\x5f\x6e\157\x74\x65"] : ''; $imgInfo->strStudyInstanceUID = isset($row["\151\x6d\147\137\x73\164\165\144\x79\137\x69\156\163\164\x61\156\143\145\x5f\x75\x69\x64"]) ? $row["\151\155\x67\x5f\x73\164\165\x64\x79\137\151\x6e\163\164\141\x6e\143\145\x5f\165\x69\x64"] : ''; $imgInfo->strDeviceSerialNumber = isset($row["\x64\145\x76\x5f\163\145\x72\151\141\154\x5f\156\x75\x6d"]) ? $row["\144\x65\166\x5f\x73\x65\x72\151\x61\154\x5f\156\x75\x6d"] : ''; $imgInfo->eSourceType = isset($row["\151\x6d\147\x5f\163\x6f\165\162\x63\x65\x5f\164\x79\x70\x65"]) ? EmodalityTransfer::DatabaseStringToSourceType($row["\151\x6d\147\137\x73\157\x75\162\x63\145\137\164\171\x70\145"]) : ''; return $imgInfo; } public function createDBRecord($dicomData) { $DBRecord = array("\151\155\x67\x5f\x66\151\154\145\x6e\x61\155\x65" => $this->strImgFileName, "\151\x6d\147\x5f\x6d\x6f\x64\x61\x6c\151\x74\x79" => $this->modality, "\x69\155\x67\x5f\155\x6f\x64\145" => $this->strAcqMode, "\x69\x6d\147\137\x61\x63\161\165\x69\163\x69\x74\x69\x6f\x6e\x5f\x64\141\164\x65\x74\151\x6d\145" => empty($dicomData) ? $this->dtAcqTime : $dicomData["\x61\143\x71\165\151\163\x69\x74\x69\157\x6e\104\x61\x74\x65\124\151\155\145"], "\x69\155\x67\x5f\151\x6d\x70\157\162\x74\145\144" => $this->bIsImported, "\151\x6d\x67\137\x6b\x76\160" => empty($dicomData) ? 0.0 : $dicomData["\153\x56\x70"], "\x69\x6d\147\137\155\x61" => empty($dicomData) ? 0.0 : $dicomData["\155\101"], "\x69\155\x67\x5f\144\x6f\163\x65" => empty($dicomData) ? 0.0 : $dicomData["\x64\157\163\145"], "\151\x6d\x67\x5f\x72\x61\167\137\146\x69\154\x65\x6e\141\155\145" => $this->strRawFileName, "\x69\155\147\x5f\x75\x70\x64\141\x74\x65\137\144\141\164\x65\x74\x69\x6d\x65" => empty($dicomData) ? $this->dtUpdateDateTime : $dicomData["\141\x63\161\x75\x69\x73\151\x74\x69\x6f\156\104\141\x74\145\124\x69\155\x65"], "\151\x6d\x67\x5f\165\163\x65\162\137\144\145\146\151\156\145\144\137\x39" => $this->strDeviceInfo, "\x69\x6d\x67\137\x6d\x6f\x64\x65\x6c\156\x61\155\x65" => $this->strModelName, "\160\141\x74\x5f\x63\x68\x61\x72\x74\x6e\157" => $this->strChartNo, "\x69\155\147\x5f\163\x74\x75\144\x79\x5f\151\x6e\x73\164\141\x6e\x63\145\137\x75\x69\x64" => $this->strStudyInstanceUID, "\x69\155\147\x5f\163\157\x75\x72\x63\145\137\164\171\160\x65" => $this->eSourceType, "\151\x6d\x67\137\x65\170\x70\x6f\x73\x75\x72\x65\x5f\x74\x69\x6d\x65" => empty($dicomData) ? 0.0 : $dicomData["\145\x78\160\x6f\163\x75\x72\145\124\x69\155\x65"], "\144\145\x76\137\163\x65\x72\x69\x61\154\x5f\x6e\x75\155" => empty($dicomData) ? null : $dicomData["\x64\x65\166\151\143\x65\x53\145\x72\151\x61\x6c\116\165\x6d\142\145\x72"], "\x70\141\x74\137\x69\x64" => $this->nPatID); return $DBRecord; } } class SDataGroupInfo extends Struct { var $strDataGroupName = array(); var $dtCreateDateTime; var $strGroupCTFilename; var $strGroup3DPFilename; var $strGroupUpperSTLFilename; var $strGroupLowerSTLFilename; var $strGroupRealPanoFilename; var $bUserConfirm; } class SE2DataGroupInfo extends Struct { var $strDataGroupName; var $dtCreateDateTime; var $bAutoCreated; public static function createFromDBRecord($row) { $dataGroupInfo = new SE2DataGroupInfo(); $dataGroupInfo->strDataGroupName = $row["\x67\162\157\165\160\137\156\141\x6d\x65"]; $dataGroupInfo->dtCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x67\162\157\x75\x70\137\x63\162\145\164\x5f\144\141\164\145"]); $dataGroupInfo->bAutoCreated = setBoolVal($row["\x67\x72\157\165\x70\137\141\x75\164\x6f\137\143\162\x65\141\164\145\144"]); return $dataGroupInfo; } } class SDataGroupImageInfo extends Struct { var $nGroupImageID; var $strDataGroupName; var $dtDataGroupCreateDateTime; var $eImageModality; var $strImageMode; var $dtImageRegDateTime; var $bImageSelected; var $strImageFileName; var $strChartNo; var $bImageAutoRegistered; public static function createFromDBRecord($row) { $dataGroupImageInfo = new SDataGroupImageInfo(); $dataGroupImageInfo->nGroupImageID = intval($row["\x67\x72\x6f\x75\160\137\x69\x6d\x67\x5f\151\144"]); $dataGroupImageInfo->strDataGroupName = $row["\x67\x72\157\165\160\x5f\156\141\155\145"]; $dataGroupImageInfo->eImageModality = showDBModalityStringToEmodality($row["\x67\162\x6f\x75\x70\137\x69\155\x67\137\x6d\x6f\x64\x61\x6c\151\164\171"]); $dataGroupImageInfo->strImageMode = $row["\x67\162\x6f\165\x70\137\151\155\x67\137\x6d\x6f\x64\x65"]; $dataGroupImageInfo->dtDataGroupCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x67\162\157\x75\160\137\x63\162\x65\x74\x5f\144\x61\x74\x65"]); $dataGroupImageInfo->dtImageRegDateTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x67\x72\x6f\165\x70\x5f\x69\x6d\147\137\x72\145\147\x5f\x64\141\x74\x65\x74\151\155\x65"]); $dataGroupImageInfo->bImageSelected = setBoolVal($row["\x67\x72\x6f\165\160\x5f\151\155\x67\137\163\x65\154\145\143\164\x65\x64"]); $dataGroupImageInfo->strImageFileName = $row["\x69\x6d\x67\137\146\151\154\x65\x6e\141\x6d\x65"]; $dataGroupImageInfo->bImageAutoRegistered = setBoolVal($row["\147\x72\157\x75\x70\137\x69\155\147\x5f\141\165\x74\157\137\162\x65\x67"]); $dataGroupImageInfo->strChartNo = $row["\160\141\x74\137\x63\x68\141\162\164\x6e\157"]; return $dataGroupImageInfo; } } class SReportList extends Struct { var $strReportName; var $strComment; var $strRptFileName; var $dtCreatedRptTime; } class SSearchCondition extends Struct { var $eModality; var $dtAcquisitionTime; var $strCondition; var $dtToAcqTime; } class SSearchedPatient extends Struct { public function __construct($var) { $this->dtBirthdate = currentDateFormat(DATEFORMAT_ISO8601, $var["\160\141\164\x5f\142\151\x72\164\150\x64\x61\164\145"]); $this->strChartNo = $var["\x70\x61\164\x5f\143\150\x61\162\x74\x6e\157"]; $this->strFirstName = $var["\160\x61\x74\137\146\151\162\x73\x74\x6e\x61\x6d\145"]; $this->strLastName = $var["\160\141\164\137\154\141\163\x74\156\x61\155\x65"]; $this->strMiddleName = $var["\x70\141\164\x5f\155\x69\x64\x64\154\x65\156\x61\155\145"]; $this->strGender = $var["\x70\x61\x74\x5f\x67\145\x6e\144\x65\x72"]; } var $strChartNo; var $strLastName; var $strFirstName; var $strMiddleName; var $dtBirthdate; var $strGender; } class SPatientInfo extends Struct { var $strChartNo; var $strLastName; var $strFirstName; var $strMiddleName; var $strGender; var $strAge; var $dtBirthdate; var $strEmail; var $strSocialID; var $strPhone; var $strPhotoIDName; var $dtRegisteredDateTime; var $strZipCode; var $strAddress; var $strMobile; var $strlDoctor; var $eSourceType; var $strRace; var $strClassification; var $strJob; public function __construct() { $this->dtBirthdate = ''; $this->dtRegisteredDateTime = ''; $this->eSourceType = "\x65\x55\156\x6b\x6e\157\x77\x6e\123\157\x75\162\143\145\124\171\160\x65"; $this->strAddress = ''; $this->strAge = ''; $this->strChartNo = ''; $this->strEmail = ''; $this->strFirstName = ''; $this->strGender = ''; $this->strLastName = ''; $this->strMiddleName = ''; $this->strMobile = ''; $this->strPhone = ''; $this->strSocialID = ''; $this->strPhotoIDName = ''; $this->strZipCode = ''; $this->strlDoctor = array(); } public static function constructWithParameter($parameters) { if (!isset($parameters["\163\164\162\x43\150\x61\162\164\116\157"]) || empty($parameters["\163\164\162\103\150\x61\x72\x74\x4e\x6f"])) { vt_loge(__METHOD__ . "\72" . "\x73\164\x72\x43\x68\141\x72\164\x4e\157\40\x69\x73\x20\x6e\157\x74\40\163\145\164\x20\157\x72\x20\145\155\x70\x74\x79\56"); return; } if (!isset($parameters["\x64\164\102\x69\x72\x74\150\144\141\x74\x65"]) || empty(trim($parameters["\144\164\x42\151\x72\x74\150\144\141\164\145"]))) { $birthdate = currentDateFormat(DATEFORMAT_ISO8601); } else { $birthdate = date_create($parameters["\x64\x74\x42\151\162\164\x68\x64\141\x74\x65"]); if ($birthdate === FALSE || date_create("\x6e\157\167") < $birthdate) { vt_loge(__METHOD__ . "\x3a" . "\x64\164\x42\151\x72\x74\x68\x64\141\164\x65\x20\x69\x73\40\x69\x6e\x76\141\x6c\151\144\x20\144\x61\164\x61\56"); return; } $birthdate = currentDateFormat(DATEFORMAT_ISO8601, $parameters["\144\164\x42\x69\162\x74\x68\x64\x61\x74\145"]); } if (!isset($parameters["\x73\164\x72\107\145\156\x64\145\x72"]) || empty($parameters["\x73\x74\x72\107\145\x6e\144\145\x72"])) { $gender = "\x4f"; } else { $gender = strtoupper(substr($parameters["\163\x74\x72\x47\145\x6e\x64\x65\x72"], 0, 1)); if (!($gender === "\117" || $gender === "\115" || $gender === "\106")) { vt_loge(__METHOD__ . "\72" . "\163\164\x72\x47\x65\156\144\145\162\40\151\x73\40\x69\x6e\x76\141\154\151\144\40\144\x61\164\141\56"); return; } } $patInfo = new SPatientInfo(); if (!isset($parameters["\144\164\x52\x65\147\151\163\x74\x65\162\x65\x64\x44\141\x74\145\x54\x69\x6d\145"])) { $patInfo->dtRegisteredDateTime = currentDateFormat(DATEFORMAT_ISO8601); } else { $patInfo->dtRegisteredDateTime = currentDateFormat(DATEFORMAT_ISO8601, $parameters["\x64\164\x52\x65\x67\x69\163\x74\145\162\145\x64\x44\141\164\145\x54\x69\155\145"]); } $patInfo->strGender = $gender; $patInfo->dtBirthdate = $birthdate; $patInfo->strChartNo = $parameters["\x73\164\x72\103\x68\x61\x72\164\x4e\157"]; $patInfo->strLastName = $parameters["\x73\164\x72\114\x61\163\164\x4e\x61\x6d\145"]; $patInfo->strFirstName = $parameters["\x73\x74\162\x46\151\x72\163\164\x4e\141\x6d\x65"]; $patInfo->strMiddleName = $parameters["\163\x74\162\x4d\x69\x64\144\x6c\145\116\x61\155\145"]; $patInfo->strEmail = $parameters["\163\x74\162\105\x6d\141\151\154"]; $patInfo->strSocialID = $parameters["\163\164\x72\123\x6f\x63\151\141\154\x49\104"]; $patInfo->strPhone = $parameters["\x73\164\162\120\150\157\x6e\x65"]; $patInfo->strMobile = $parameters["\163\164\162\115\157\x62\151\x6c\145"]; $patInfo->strZipCode = $parameters["\163\164\x72\x5a\151\x70\x43\x6f\144\x65"]; $patInfo->strAddress = $parameters["\x73\164\x72\x41\x64\144\162\x65\x73\x73"]; $patInfo->strPhotoIDName = $parameters["\x73\164\x72\120\x68\157\164\x6f\111\x44\116\141\x6d\145"]; $patInfo->strJob = $parameters["\163\x74\x72\112\x6f\142"]; $patInfo->strRace = $parameters["\x73\x74\x72\122\141\x63\145"]; $patInfo->strClassification = $parameters["\x73\164\162\103\x6c\141\x73\x73\x69\x66\151\x63\x61\164\x69\157\x6e"]; $patInfo->eSourceType = sourceTypeEnum2String($parameters["\145\123\157\x75\x72\x63\145\124\x79\x70\x65"]); $patInfo->strlDoctor = $parameters["\163\x74\x72\x6c\x44\157\143\x74\x6f\x72"]; return $patInfo; } public static function createFromDBRecord($row) { $patInfo = new SPatientInfo(); $patInfo->dtBirthdate = isset($row["\x70\x61\164\x5f\x62\x69\x72\164\x68\144\141\x74\145"]) ? currentDateFormat(DATEFORMAT_ISO8601, $row["\x70\141\x74\137\x62\151\x72\164\x68\x64\x61\164\x65"]) : ''; $patInfo->dtRegisteredDateTime = isset($row["\x70\x61\164\x5f\x72\x65\147\x69\x73\x74\145\x72\x65\x64\x5f\x64\141\x74\x65\164\x69\x6d\x65"]) ? currentDateFormat(DATEFORMAT_ISO8601, $row["\x70\141\164\x5f\x72\145\147\151\x73\x74\x65\162\x65\x64\137\x64\x61\164\x65\164\x69\x6d\145"]) : ''; $patInfo->strAddress = isset($row["\x70\x61\164\137\141\x64\144\162\145\163\x73"]) ? $row["\x70\x61\164\x5f\141\144\x64\162\145\x73\163"] : ''; $patInfo->strChartNo = isset($row["\160\x61\164\137\x63\x68\x61\162\164\x6e\157"]) ? $row["\x70\x61\164\x5f\x63\x68\x61\162\164\156\x6f"] : ''; $patInfo->strEmail = isset($row["\160\x61\164\x5f\x65\x6d\141\151\154"]) ? $row["\x70\141\x74\137\145\155\x61\x69\x6c"] : ''; $patInfo->strFirstName = isset($row["\x70\x61\164\x5f\x66\x69\162\163\164\156\141\155\145"]) ? $row["\160\x61\164\x5f\146\151\162\163\x74\156\141\155\145"] : ''; $patInfo->strGender = isset($row["\160\141\164\x5f\147\145\156\144\x65\x72"]) ? $row["\160\x61\164\137\147\x65\x6e\x64\x65\162"] : ''; $patInfo->strLastName = isset($row["\160\141\x74\137\x6c\x61\x73\164\x6e\x61\x6d\x65"]) ? $row["\160\x61\164\x5f\x6c\x61\x73\x74\156\x61\x6d\145"] : ''; $patInfo->strMiddleName = isset($row["\160\141\x74\137\x6d\x69\x64\144\154\145\156\141\155\x65"]) ? $row["\x70\141\164\x5f\155\151\x64\x64\154\145\x6e\x61\x6d\145"] : ''; $patInfo->strMobile = isset($row["\x70\141\x74\137\x6d\157\142\151\x6c\145"]) ? $row["\160\141\x74\137\x6d\157\x62\151\x6c\145"] : ''; $patInfo->strPhone = isset($row["\160\x61\x74\x5f\x70\x68\x6f\x6e\x65"]) ? $row["\160\141\x74\x5f\160\150\x6f\156\x65"] : ''; $patInfo->strSocialID = isset($row["\x70\141\164\x5f\163\x6f\143\151\141\154\x69\144"]) ? $row["\x70\141\164\137\x73\x6f\x63\151\x61\x6c\x69\x64"] : ''; $patInfo->strPhotoIDName = isset($row["\x70\141\164\x5f\160\x68\x6f\x74\157\x5f\146\x69\x6c\145\x6e\x61\155\x65"]) ? $row["\160\x61\x74\x5f\x70\150\157\164\x6f\137\146\151\x6c\145\x6e\141\x6d\x65"] : ''; $patInfo->strZipCode = isset($row["\160\141\x74\x5f\x7a\151\x70\x63\157\x64\x65"]) ? $row["\x70\141\x74\137\172\x69\160\143\157\x64\145"] : ''; $patInfo->eSourceType = isset($row["\x70\x61\164\x5f\163\x6f\165\162\x63\145\137\164\171\160\x65"]) ? EmodalityTransfer::DatabaseStringToSourceType($row["\x70\141\x74\137\x73\157\x75\162\x63\145\x5f\x74\x79\160\x65"]) : ''; $patInfo->strAge = ''; $patInfo->strlDoctor = array(); $patInfo->strRace = isset($row["\x6f\x74\x68\137\x72\141\x63\x65\137\x6e\x61\155\145"]) ? strval($row["\x6f\x74\x68\137\162\x61\143\x65\137\156\x61\155\145"]) : ''; $patInfo->strClassification = isset($row["\157\x74\x68\137\x63\154\141\x73\x73\x5f\x6e\x61\x6d\145"]) ? strval($row["\157\164\x68\137\x63\154\x61\163\x73\x5f\156\141\155\x65"]) : ''; $patInfo->strJob = isset($row["\160\141\164\x5f\152\x6f\142"]) ? strval($row["\160\x61\x74\137\x6a\x6f\x62"]) : ''; return $patInfo; } } class SExportAcqInfo extends Struct { var $patInfo; var $imgInfo; } class SSampleCaseGroup extends Struct { var $nGroupId; var $strGroupName; var $nParentsId; var $nGroupOrderNumeber; } class SAccountInfo extends Struct { var $nAccountId; var $strAccountName; var $strAccountPasswd; var $strGrade; var $bDataDel; var $bDataTransfer; var $bDataExport; } class SSmartPayAccountInfo extends Struct { var $strSmartPayID; var $strSmartPayPassword; } class SSchedule extends Struct { var $eTriggerType; var $nTriggerMinute; var $specifiedTimeList; } class SPaymentServerConf extends Struct { var $strURL; var $strRestServerHostName; var $strRestServerUrlSceme; var $nPaymentCheckInterval; var $nPaymentCheckCount; var $nReportInterval; var $nReportCount; var $nLockingTime; var $sCheckingSchedule; var $sReportingSchedule; } class SSmartPayConf extends Struct { var $bUseSmartPay; var $strAcquisitionTitle; var $strLocale; var $strCountry; var $sPaymentServerConf; } class SExtraOralDeviceInfo extends Struct { var $strDeviceSerialNumber; var $eDeviceSalesType; var $eDevicePayType; var $eDevicePayStatus; var $strUnavailableFeatures; var $dtPayLastDate; var $dtPayExpiredDate; var $dtPayCanceledDate; var $nMaxPayImage; var $nPayImageCount; var $dtUpdateTime; var $strCheckSum; var $strSmartPayUserID; var $nCheckStatus; var $bUpdatePaidImageCount; var $bUpdateExpiredDate; var $bUpdateCanceledDate; public function __construct() { $this->strDeviceSerialNumber = ''; $this->eDeviceSalesType = "\x65\125\156\153\156\157\167\x6e\104\x65\166\151\143\x65"; $this->eDevicePayType = "\x65\104\145\166\151\143\145\x50\x61\x79\x50\145\x72\126\151\x65\x77"; $this->eDevicePayStatus = "\x65\x44\x65\x76\151\x63\145\125\x6e\x70\141\x69\x64"; $this->strUnavailableFeatures = ''; $this->nMaxPayImage = -1; $this->nPayImageCount = 0; $this->strSmartPayUserID = ''; $this->nCheckStatus = 0; $this->strCheckSum = ''; $this->bUpdatePaidImageCount = FALSE; $this->bUpdateExpiredDate = TRUE; $this->bUpdateCanceledDate = FALSE; } public static function constructWithParameter($param) { $sDeviceInfo = new SExtraOralDeviceInfo(); $sDeviceInfo->strDeviceSerialNumber = trim($param["\x64\145\166\x5f\163\145\162\151\x61\x6c\x5f\156\x75\155"]); $sDeviceInfo->eDeviceSalesType = stringToDeviceSalesType($param["\x64\x65\166\137\163\x61\x6c\x65\163\x5f\x74\171\160\145"]); $sDeviceInfo->eDevicePayType = stringToDevicePayType($param["\144\145\166\x5f\x73\x70\137\164\171\x70\x65"]); $sDeviceInfo->eDevicePayStatus = stringToDevicePayStatus($param["\x64\145\x76\x5f\x73\x70\x5f\x73\x74\x61\164\x75\x73"]); $sDeviceInfo->strUnavailableFeatures = trim($param["\144\x65\166\x5f\163\160\x5f\165\x6e\141\166\141\x69\154\x61\142\154\145\x5f\x66\x65\x61\x74\x75\x72\x65\163"]); $sDeviceInfo->dtPayLastDate = currentDateFormat(DATEFORMAT_ISO8601, $param["\x64\x65\x76\x5f\x73\x70\137\x6c\141\163\164\x5f\144\141\164\145\164\x69\155\145"]); $sDeviceInfo->dtPayExpiredDate = currentDateFormat(DATEFORMAT_ISO8601, $param["\144\x65\x76\x5f\163\x70\x5f\x65\170\160\151\162\145\144\137\144\x61\164\145\164\x69\155\x65"]); $sDeviceInfo->dtPayCanceledDate = currentDateFormat(DATEFORMAT_ISO8601, $param["\144\x65\x76\x5f\163\x70\x5f\x63\x61\x6e\143\x65\154\x65\144\137\144\141\164\x65\x74\x69\x6d\x65"]); $sDeviceInfo->nMaxPayImage = intval($param["\x64\x65\166\137\163\160\137\x70\141\x79\x5f\155\x61\170"]); $sDeviceInfo->nPayImageCount = intval($param["\144\145\166\x5f\x73\x70\x5f\160\141\171\x5f\143\157\165\x6e\164"]); $sDeviceInfo->dtUpdateTime = currentDateFormat(DATEFORMAT_ISO8601, $param["\x64\145\166\x5f\163\160\x5f\165\160\144\141\x74\x65\137\144\141\x74\145\x74\x69\155\145"]); $sDeviceInfo->strSmartPayUserID = trim($param["\x73\160\x5f\x61\143\x63\x5f\165\163\145\162\156\x61\x6d\x65"]); $sDeviceInfo->strCheckSum = trim($param["\x64\145\166\x5f\x63\150\x65\x63\x6b\x73\165\x6d"]); return $sDeviceInfo; } } class SSmartPayImage extends Struct { var $nImageID; var $strImgFileName; var $eImagePayStatus; var $dtImagePayTime; var $eImageReportStatus; var $dtImageReportTime; var $eImagePayType; var $strUnavailableFeatures; var $strCheckSum; var $strChartNo; var $strDeviceSerialNumber; public function __construct() { $this->nImageID = 0; $this->strImgFileName = ''; $this->eImagePayStatus = 0; $this->eImageReportStatus = 0; $this->eImagePayType = "\145\x49\155\141\x67\145\125\156\x70\141\151\x64\x54\171\160\145"; $this->strUnavailableFeatures = ''; $this->strCheckSum = ''; $this->strChartNo = ''; $this->strDeviceSerialNumber = ''; } } class SFormula extends Struct { var $name; var $inputType; var $outputType; var $inputNum; var $outputUnitType; var $funcName; var $description; public function __construct($var) { $this->name = $var["\157\x74\150\137\146\157\162\x6d\165\x6c\x61\x5f\x6e\141\155\x65"]; $this->inputType = intval($var["\x6f\164\x68\x5f\x66\x6f\162\x6d\165\154\x61\x5f\x69\156\160\x75\164\137\164\171\160\145"]); $this->outputType = intval($var["\x6f\x74\150\x5f\x66\157\162\155\x75\154\141\137\x6f\x75\x74\x70\165\164\x5f\164\x79\x70\x65"]); $this->inputNum = intval($var["\x6f\164\150\137\146\x6f\x72\155\x75\154\141\137\151\x6e\160\165\164\x5f\156\165\155"]); $this->outputUnitType = intval($var["\x6f\164\150\137\x66\157\162\155\x75\154\x61\137\x6f\x75\164\160\165\164\x5f\165\156\151\164\137\164\x79\x70\x65"]); $this->funcName = $var["\157\x74\150\137\146\x6f\162\x6d\x75\x6c\x61\137\146\x75\156\143\x5f\x6e\141\155\145"]; $this->description = $var["\x6f\x74\x68\x5f\x66\x6f\162\x6d\x75\154\x61\x5f\144\145\x73\x63\162\x69\160\x74\x69\x6f\156"]; } } class SVTOSTOSetting extends Struct { var $raceName; var $raceLabel; var $className; var $landmarkName; var $landmarkLabel; var $softTissueLandmarkMovements; public static function createFromDBRecord($var) { $sVTOSTOSettings = new SVTOSTOSetting(); $sVTOSTOSettings->raceName = strval($var["\157\x74\150\x5f\162\141\143\x65\x5f\x6e\x61\155\145"]); $sVTOSTOSettings->raceLabel = strval($var["\157\x74\150\137\x72\x61\x63\x65\137\x6c\141\142\145\154"]); $sVTOSTOSettings->className = $var["\x6f\x74\150\137\143\x6c\141\163\x73\137\x6e\141\x6d\x65"]; $sVTOSTOSettings->landmarkName = $var["\x6f\x74\x68\x5f\154\141\x6e\144\x6d\x61\x72\153\x5f\156\141\x6d\x65"]; $sVTOSTOSettings->landmarkLabel = $var["\157\x74\150\x5f\154\x61\x6e\144\x6d\x61\162\153\137\154\x61\142\145\154"]; $sVTOSTOSettings->softTissueLandmarkMovements = array(); return $sVTOSTOSettings; } } class SSoftTissueLandmarkMovements extends Struct { var $name; var $label; var $x; var $y; var $userUpdated; public static function createFromDBRecord($row) { $sSoftTissueLandmarkMovements = new SSoftTissueLandmarkMovements(); $sSoftTissueLandmarkMovements->name = $row["\x73\x66\x74\x4c\141\x6e\x64\155\141\162\x6b\116\141\155\145"]; $sSoftTissueLandmarkMovements->label = $row["\163\x66\x74\x4c\x61\x6e\144\x6d\141\162\153\x4c\x61\x62\145\154"]; $sSoftTissueLandmarkMovements->x = doubleval($row["\x6f\164\150\137\x73\157\146\164\x74\x69\163\x73\x75\145\x5f\x6d\x6f\x76\x65\155\145\x6e\x74\137\x78"]); $sSoftTissueLandmarkMovements->y = doubleval($row["\x6f\164\x68\137\163\157\x66\164\164\151\163\163\165\x65\x5f\155\157\x76\x65\155\145\x6e\x74\x5f\171"]); $sSoftTissueLandmarkMovements->userUpdated = $row["\x6f\x74\x68\x5f\163\157\146\164\x74\151\x73\x73\165\145\x5f\155\157\166\145\x6d\145\x6e\164\x5f\165\x73\x65\162\137\165\160\x64\x61\x74\x65\x64"]; return $sSoftTissueLandmarkMovements; } } class SLabeledObject extends Struct { var $name; var $label; var $userAdded; public function __construct($var) { $this->name = $var["\156\x61\155\145"]; $this->label = $var["\154\141\142\145\154"]; $this->userAdded = setBoolVal($var["\x75\x73\145\x72\137\x61\144\x64\x65\144"]); } } class SLabeledAnalysis extends SLabeledObject { var $disused; public function __construct($var) { parent::__construct($var); $this->disused = setBoolVal($var["\157\164\150\x5f\x61\156\141\154\x79\163\151\x73\137\144\x69\x73\x75\163\145\144"]); } } class SLabeledGuideline extends SLabeledObject { } class LabeledRace extends SLabeledObject { } class SLabeledSuperimposition extends SLabeledObject { } class SLabeledLandmark extends SLabeledObject { var $type; public function __construct($var) { parent::__construct($var); $this->type = $var["\164\x79\x70\145"]; } } class SLabeledMeasurement extends SLabeledObject { var $displayedOrder; var $displayInfo; public function __construct($var) { parent::__construct($var); $this->displayedOrder = intval($var["\157\x74\x68\x5f\141\x6e\141\x6c\171\x73\x69\x73\x5f\x6d\x65\x61\x73\x75\162\145\x6d\x65\156\164\x5f\157\x72\x64\x65\162"]); if (isset($var["\x6f\164\150\137\x61\156\141\x6c\x79\163\151\163\137\x6d\145\x61\x73\x75\x72\145\x6d\x65\156\164\x5f\x64\151\163\160\x6c\x61\171"])) { $paramjson = json_decode($var["\x6f\164\x68\137\x61\156\x61\x6c\171\x73\151\163\137\x6d\x65\x61\x73\165\x72\145\155\x65\x6e\164\137\144\x69\163\x70\154\x61\x79"]); $this->displayInfo = $paramjson; } } } class SAnalysis extends Struct { var $analysisName; var $analysisLabel; var $analysisUserAdded; var $disused; var $measurementGroups; var $guidelines; var $landmarks; public function __construct($var) { $this->analysisName = $var->oth_analysis_name; $this->analysisLabel = $var->oth_analysis_label; $this->analysisUserAdded = setBoolVal($var->oth_analysis_user_added); $this->disused = setBoolVal($var->oth_analysis_disused); $this->measurementGroups = array(); $this->guidelines = array(); $this->landmarks = array(); } } class SMeasurementGroup extends Struct { var $name; var $measurements; public function __construct($var) { $this->name = $var; $this->measurements = array(); } } class SGuidelineInfo extends Struct { var $name; var $label; var $description; var $descriptionImage; var $type; var $params; var $starting; var $ending; var $userAdded; var $usingAnalysisList; public static function constructWithRow($var, $analysNames) { $sGuidelineInfo = new SGuidelineInfo(); $sGuidelineInfo->name = $var->oth_guideline_name; $sGuidelineInfo->label = $var->oth_guideline_label; $sGuidelineInfo->description = strval($var->oth_guideline_description); $sGuidelineInfo->descriptionImage = strval($var->oth_guideline_description_image); $sGuidelineInfo->type = $var->oth_guideline_type; $sGuidelineInfo->starting = doubleval($var->oth_guideline_starting); $sGuidelineInfo->ending = doubleval($var->oth_guideline_ending); $sGuidelineInfo->userAdded = setBoolVal($var->oth_guideline_user_added); if (isset($var->oth_guideline_params)) { $paramjson = json_decode($var->oth_guideline_params); $sGuidelineInfo->params = $paramjson->{"\160\x61\x72\x61\x6d\163"}; } else { $sGuidelineInfo->params = array(); } if (isset($analysNames)) { $sGuidelineInfo->usingAnalysisList = $analysNames; } else { $sGuidelineInfo->usingAnalysisList = array(); } return $sGuidelineInfo; } } class SGuidelineInfoParameter extends SGuidelineInfo { var $modality; public static function constructWithParameter($parameters) { if (!isset($parameters["\156\x61\x6d\145"]) || empty(trim($parameters["\156\x61\x6d\145"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\141\x6d\145\40\x69\x73\40\156\157\164\x20\163\145\164\40\157\x72\40\145\155\160\164\171\56"); return; } if (!isset($parameters["\155\157\x64\x61\x6c\x69\164\171"]) || empty(trim($parameters["\x6d\157\x64\141\x6c\x69\164\171"]))) { vt_loge(__METHOD__ . "\72" . "\155\x6f\x64\141\154\151\x74\171\40\x69\163\x20\156\x6f\x74\x20\x73\145\x74\x20\157\x72\x20\x65\x6d\x70\164\171\56"); return; } if (!isset($parameters["\x74\171\x70\x65"]) || empty(trim($parameters["\164\x79\x70\x65"]))) { vt_loge(__METHOD__ . "\72" . "\164\171\x70\145\40\x69\163\40\x6e\x6f\x74\40\x73\145\x74\x20\x6f\x72\40\x65\155\x70\x74\171\x2e"); return; } $sGuidelineInfoParameter = new SGuidelineInfoParameter(); $sGuidelineInfoParameter->name = trim($parameters["\x6e\141\155\x65"]); $sGuidelineInfoParameter->modality = trim($parameters["\155\x6f\144\x61\x6c\x69\164\x79"]); $sGuidelineInfoParameter->type = $parameters["\164\171\160\x65"]; $sGuidelineInfoParameter->userAdded = filter_var($parameters["\x75\x73\145\x72\x41\144\144\x65\144"], FILTER_VALIDATE_BOOLEAN); if (isset($parameters["\x6c\x61\x62\145\154"])) { $sGuidelineInfoParameter->label = $parameters["\154\141\x62\145\154"]; } if (isset($parameters["\x70\141\x72\x61\155\x73"])) { $sGuidelineInfoParameter->params = json_encode(array("\x70\141\162\141\155\x73" => $parameters["\x70\141\162\141\155\163"])); } $sGuidelineInfoParameter->starting = doubleval($parameters["\x73\164\141\162\x74\151\156\147"]); $sGuidelineInfoParameter->ending = doubleval($parameters["\x65\156\x64\151\156\x67"]); if (isset($parameters["\x64\145\x73\x63\162\151\160\164\x69\157\156"])) { $sGuidelineInfoParameter->description = $parameters["\144\145\x73\143\x72\151\160\x74\x69\157\x6e"]; } if (isset($parameters["\x64\145\163\143\162\x69\x70\x74\x69\157\156\x49\155\x61\147\145"])) { $sGuidelineInfoParameter->descriptionImage = $parameters["\144\145\x73\143\x72\151\160\x74\x69\x6f\x6e\x49\155\141\147\145"]; } return $sGuidelineInfoParameter; } } class SLandmarkSimulationName extends Struct { var $name; var $label; var $simulationName; public function __construct($var) { $this->name = $var["\157\x74\x68\x5f\x6c\x61\156\144\155\141\162\x6b\137\156\141\x6d\x65"]; $this->label = $var["\157\x74\150\x5f\x6c\141\156\144\155\141\x72\153\137\154\x61\x62\145\x6c"]; $this->simulationName = $var["\157\164\150\137\163\x69\155\165\x6c\141\x74\151\x6f\x6e\x5f\164\x79\160\x65"] == "\60" ? "\126\124\x4f\x53\x54\x4f" : "\120\162\157\146\x69\154\x6f\x67\162\x61\155"; } } class SLandmarkInfo extends Struct { var $name; var $label; var $shortName; var $bitmask; var $type; var $formulaName; var $params; var $description; var $descriptionImage; var $userAdded; var $usingAnalysisList; public static function constructWithRow($var, $analysNames) { $sLandmarkInfo = new SLandmarkInfo(); $sLandmarkInfo->name = $var->oth_landmark_name; $sLandmarkInfo->label = $var->oth_landmark_label; $sLandmarkInfo->shortName = strval($var->oth_landmark_shortname); $sLandmarkInfo->bitmask = strval($var->oth_landmark_bitmask); $sLandmarkInfo->description = strval($var->oth_landmark_description); $sLandmarkInfo->descriptionImage = strval($var->oth_landmark_description_image); $sLandmarkInfo->type = $var->oth_landmark_type; $sLandmarkInfo->formulaName = strval($var->oth_formula_name); $sLandmarkInfo->userAdded = setBoolVal($var->oth_landmark_user_added); if (isset($var->oth_landmark_params)) { $paramjson = json_decode($var->oth_landmark_params); $sLandmarkInfo->params = $paramjson->{"\x70\x61\162\x61\x6d\x73"}; } else { $sLandmarkInfo->params = array(); } if (isset($analysNames)) { $sLandmarkInfo->usingAnalysisList = $analysNames; } else { $sLandmarkInfo->usingAnalysisList = array(); } return $sLandmarkInfo; } } class SLandmarkInfoParameter extends SLandmarkInfo { var $modality; public static function constructWithParameter($parameters) { if (!isset($parameters["\156\x61\155\145"]) || empty(trim($parameters["\x6e\x61\x6d\145"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\x61\155\145\40\x69\163\x20\156\157\x74\40\163\145\164\x20\157\162\x20\x65\x6d\160\x74\171\x2e"); return; } if (!isset($parameters["\x6d\x6f\144\141\154\x69\164\x79"]) || empty(trim($parameters["\x6d\x6f\144\x61\x6c\151\164\171"]))) { vt_loge(__METHOD__ . "\x3a" . "\x6d\x6f\x64\x61\154\x69\x74\171\x20\x69\163\40\x6e\157\164\x20\163\x65\164\40\157\162\x20\145\155\x70\164\171\x2e"); return; } if (!isset($parameters["\x74\171\160\145"]) || empty(trim($parameters["\x74\x79\x70\x65"]))) { vt_loge(__METHOD__ . "\x3a" . "\x74\171\160\145\x20\x69\x73\40\156\x6f\x74\40\x73\x65\164\x20\x6f\162\40\145\155\160\164\x79\x2e"); return; } $sLandmarkInfoParameter = new SLandmarkInfoParameter(); $sLandmarkInfoParameter->name = trim($parameters["\156\x61\155\x65"]); $sLandmarkInfoParameter->modality = trim($parameters["\x6d\157\x64\141\x6c\151\164\171"]); $sLandmarkInfoParameter->type = $parameters["\x74\171\160\145"]; $sLandmarkInfoParameter->userAdded = filter_var($parameters["\x75\163\145\x72\x41\144\x64\x65\x64"], FILTER_VALIDATE_BOOLEAN); if (isset($parameters["\x6c\141\x62\x65\x6c"])) { $sLandmarkInfoParameter->label = $parameters["\154\x61\142\145\154"]; } if (isset($parameters["\x70\x61\x72\x61\155\x73"])) { $sLandmarkInfoParameter->params = json_encode(array("\x70\141\x72\141\x6d\x73" => $parameters["\160\x61\162\x61\x6d\x73"])); } if (isset($parameters["\144\x65\x73\143\x72\x69\x70\164\x69\157\x6e"])) { $sLandmarkInfoParameter->description = $parameters["\x64\x65\x73\x63\162\x69\x70\x74\151\157\x6e"]; } if (isset($parameters["\144\x65\x73\x63\162\151\160\164\x69\157\156\x49\155\141\147\145"])) { $sLandmarkInfoParameter->descriptionImage = $parameters["\x64\145\x73\143\x72\x69\160\164\x69\x6f\x6e\x49\x6d\x61\x67\x65"]; } if (isset($parameters["\163\150\157\x72\x74\x4e\141\x6d\145"])) { $sLandmarkInfoParameter->shortName = $parameters["\163\x68\157\162\164\116\x61\x6d\x65"]; } if (isset($parameters["\146\x6f\x72\155\165\x6c\x61\x4e\x61\155\x65"])) { $sLandmarkInfoParameter->formulaName = $parameters["\x66\x6f\x72\x6d\165\x6c\141\x4e\x61\155\145"]; } return $sLandmarkInfoParameter; } } class SMeasurementWithCalculation extends Struct { var $name; var $label; var $userAdded; var $isCalculation; public static function constructWithRow($var) { $sMeasurementWithCalculation = new SMeasurementWithCalculation(); $sMeasurementWithCalculation->name = $var["\x6e\x61\155\145"]; $sMeasurementWithCalculation->label = $var["\154\x61\142\145\154"]; $sMeasurementWithCalculation->userAdded = setBoolVal($var["\x75\x73\x65\162\x5f\x61\144\x64\x65\144"]); $sMeasurementWithCalculation->isCalculation = false; return $sMeasurementWithCalculation; } public static function constructWithName($var) { $sMeasurementWithCalculation = new SMeasurementWithCalculation(); $sMeasurementWithCalculation->name = $var; $sMeasurementWithCalculation->label = $var; $sMeasurementWithCalculation->userAdded = false; $sMeasurementWithCalculation->isCalculation = true; return $sMeasurementWithCalculation; } } class SMeasurementInfo extends Struct { var $name; var $label; var $shortName; var $description; var $descriptionImage; var $formulaName; var $params; var $userAdded; var $usingAnalysisList; var $standardData; public static function constructWithRow($var, $analysNames, $standardDatas) { $sMeasurementInfo = new SMeasurementInfo(); $sMeasurementInfo->name = $var->oth_measurement_name; $sMeasurementInfo->label = $var->oth_measurement_label; $sMeasurementInfo->shortName = strval($var->oth_measurement_shortname); $sMeasurementInfo->formulaName = $var->oth_formula_name; $sMeasurementInfo->description = strval($var->oth_measurement_description); $sMeasurementInfo->descriptionImage = strval($var->oth_measurement_description_image); $sMeasurementInfo->userAdded = setBoolVal($var->oth_measurement_user_added); if (isset($var->oth_measurement_params)) { $paramjson = json_decode($var->oth_measurement_params); $sMeasurementInfo->params = $paramjson->{"\x70\x61\x72\x61\x6d\x73"}; } else { $sMeasurementInfo->params = array(); } if (isset($analysNames)) { $sMeasurementInfo->usingAnalysisList = $analysNames; } else { $sMeasurementInfo->usingAnalysisList = array(); } $sMeasurementInfo->standardData = array(); foreach ($standardDatas as $sData) { array_push($sMeasurementInfo->standardData, SStandardDataItemForMeasurement::constructWithRow($sData)); } return $sMeasurementInfo; } } class SMeasurementInfoParameter extends SMeasurementInfo { var $modality; public static function constructWithParameter($parameters) { if (!isset($parameters["\156\x61\x6d\x65"]) || empty(trim($parameters["\156\x61\155\x65"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\x61\x6d\145\40\x69\x73\x20\156\x6f\x74\x20\x73\145\164\x20\157\x72\40\x65\155\x70\164\171\x2e"); return; } if (!isset($parameters["\155\157\x64\x61\x6c\151\164\171"]) || empty(trim($parameters["\155\157\144\141\154\151\x74\x79"]))) { vt_loge(__METHOD__ . "\x3a" . "\x6d\157\144\141\x6c\x69\164\171\40\x69\163\40\x6e\x6f\164\x20\163\x65\x74\x20\x6f\162\40\x65\155\x70\x74\171\x2e"); return; } $sMeasurementInfoParameter = new SMeasurementInfoParameter(); $sMeasurementInfoParameter->name = trim($parameters["\156\141\x6d\x65"]); $sMeasurementInfoParameter->modality = trim($parameters["\155\157\x64\x61\x6c\151\164\x79"]); $sMeasurementInfoParameter->userAdded = filter_var($parameters["\165\163\145\x72\101\x64\144\145\144"], FILTER_VALIDATE_BOOLEAN); if (isset($parameters["\154\x61\142\x65\x6c"])) { $sMeasurementInfoParameter->label = $parameters["\154\141\x62\145\x6c"]; } if (isset($parameters["\x70\141\162\141\x6d\163"])) { $sMeasurementInfoParameter->params = json_encode(array("\x70\141\x72\141\x6d\163" => $parameters["\160\x61\x72\x61\155\163"])); } if (isset($parameters["\144\x65\x73\143\x72\151\x70\164\151\157\156"])) { $sMeasurementInfoParameter->description = $parameters["\x64\145\163\143\162\x69\160\164\x69\x6f\x6e"]; } if (isset($parameters["\x64\x65\163\143\x72\151\x70\x74\151\x6f\156\x49\x6d\x61\x67\x65"])) { $sMeasurementInfoParameter->descriptionImage = $parameters["\144\x65\x73\x63\162\x69\x70\x74\x69\x6f\x6e\x49\155\x61\x67\145"]; } if (isset($parameters["\163\x68\157\x72\x74\116\x61\x6d\x65"])) { $sMeasurementInfoParameter->shortName = $parameters["\x73\150\x6f\x72\x74\116\x61\x6d\145"]; } if (isset($parameters["\x66\x6f\162\x6d\165\x6c\141\116\x61\x6d\145"])) { $sMeasurementInfoParameter->formulaName = $parameters["\146\157\x72\155\x75\x6c\x61\116\x61\x6d\x65"]; } $sMeasurementInfoParameter->standardData = array(); if (isset($parameters["\163\164\141\156\x64\x61\162\144\x44\141\x74\x61"])) { foreach ($parameters["\x73\164\141\156\x64\141\162\x64\x44\141\x74\141"] as $data) { $standardData = SStandardDataItemForMeasurement::constructWithParameter($data); if (!isset($standardData)) { return; } array_push($sMeasurementInfoParameter->standardData, $standardData); } } return $sMeasurementInfoParameter; } } class SBaseStandardDataItem extends Struct { var $dentalAgeType; var $gender; var $mean; var $SD; var $userUpdated; } class SStandardDataItemForMeasurement extends SBaseStandardDataItem { var $race; var $analysisName; public static function constructWithRow($var) { $sStandardDataItemForMeasurement = new SStandardDataItemForMeasurement(); $sStandardDataItemForMeasurement->race = $var["\157\x74\x68\x5f\162\141\143\x65\x5f\156\x61\x6d\145"]; $sStandardDataItemForMeasurement->dentalAgeType = intval($var["\x6f\164\x68\137\163\x74\144\137\144\141\x74\x61\x5f\144\x65\156\x74\141\154\x61\x67\x65\x5f\x74\171\x70\145"]); $sStandardDataItemForMeasurement->gender = trim($var["\x6f\x74\150\x5f\x73\164\x64\137\x64\x61\164\x61\x5f\147\145\x6e\144\145\162"]); $sStandardDataItemForMeasurement->mean = $var["\x6f\164\150\137\x73\x74\x64\x5f\x64\141\x74\x61\137\155\x65\141\156"]; $sStandardDataItemForMeasurement->SD = $var["\157\164\x68\x5f\163\x74\144\137\x64\141\x74\141\137\x73\144"]; $sStandardDataItemForMeasurement->userUpdated = setBoolVal($var["\x6f\164\150\137\x73\x74\x64\137\x64\141\x74\x61\137\165\163\x65\162\x5f\165\x70\x64\141\x74\x65\x64"]); $sStandardDataItemForMeasurement->analysisName = $var["\x6f\x74\x68\x5f\141\x6e\141\154\x79\x73\x69\163\x5f\x6e\x61\x6d\x65"]; return $sStandardDataItemForMeasurement; } public static function constructWithParameter($parameters) { if (!isset($parameters["\x72\x61\143\x65"]) || empty($parameters["\x72\x61\143\145"])) { vt_loge(__METHOD__ . "\72" . "\162\141\143\x65\x20\x69\163\40\x6e\157\x74\40\163\x65\x74\40\157\162\40\x65\x6d\160\164\171\56"); return; } if (!isset($parameters["\144\x65\x6e\164\141\x6c\101\147\x65\x54\x79\160\x65"])) { vt_loge(__METHOD__ . "\72" . "\x64\x65\x6e\164\x61\x6c\x41\x67\x65\x54\x79\x70\x65\40\151\x73\40\x6e\x6f\164\40\x73\x65\x74\56"); return; } if (!isset($parameters["\x67\x65\156\x64\x65\x72"]) || empty($parameters["\x67\145\x6e\x64\145\162"])) { vt_loge(__METHOD__ . "\72" . "\x67\x65\156\x64\x65\162\x20\151\x73\x20\x6e\x6f\x74\x20\x73\x65\164\40\157\162\40\x65\x6d\x70\164\x79\x2e"); return; } if (!isset($parameters["\155\x65\x61\156"]) || empty(trim($parameters["\155\145\141\156"]))) { vt_loge(__METHOD__ . "\x3a" . "\x6d\x65\x61\x6e\40\x69\163\40\x6e\157\164\x20\163\145\164\40\157\162\x20\x65\155\160\x74\x79\56"); return; } if (!isset($parameters["\123\x44"]) || empty(trim($parameters["\123\104"]))) { vt_loge(__METHOD__ . "\72" . "\123\104\x20\x69\x73\40\156\x6f\164\x20\x73\x65\x74\40\157\x72\x20\145\155\x70\164\x79\56"); return; } $gender = $parameters["\147\x65\156\x64\145\x72"]; if ($gender != "\x4d" && $gender != "\x46" && $gender != "\117") { vt_loge(__METHOD__ . "\72" . "\147\x65\x6e\x64\145\162\x20\151\x73\40\151\156\166\141\154\151\144\x20\x64\141\164\x61\x2e"); return; } $sStandardDataItemForMeasurement = new SStandardDataItemForMeasurement(); $sStandardDataItemForMeasurement->race = $parameters["\162\x61\143\x65"]; $sStandardDataItemForMeasurement->dentalAgeType = intval($parameters["\144\x65\x6e\164\x61\154\101\147\x65\x54\171\160\145"]); $sStandardDataItemForMeasurement->gender = $gender; $sStandardDataItemForMeasurement->mean = $parameters["\155\145\x61\x6e"]; $sStandardDataItemForMeasurement->SD = $parameters["\123\104"]; if (isset($parameters["\165\x73\145\162\125\160\144\141\x74\145\x64"])) { $sStandardDataItemForMeasurement->userUpdated = filter_var($parameters["\x75\163\x65\x72\125\160\x64\x61\164\x65\x64"], FILTER_VALIDATE_BOOLEAN); } else { $sStandardDataItemForMeasurement->userUpdated = false; } if (isset($parameters["\141\156\141\154\x79\163\x69\x73\116\x61\155\145"]) && empty(trim($parameters["\x61\156\x61\x6c\171\x73\151\x73\116\x61\x6d\145"])) == false) { $sStandardDataItemForMeasurement->analysisName = $parameters["\x61\156\x61\x6c\x79\163\151\x73\116\141\155\x65"]; } return $sStandardDataItemForMeasurement; } } class SStandardDataItem extends SBaseStandardDataItem { var $measurementName; public static function constructWithParameter($parameters) { if (!isset($parameters["\x6d\145\x61\x73\x75\162\x65\155\145\x6e\x74\x4e\141\155\145"]) || empty($parameters["\x6d\145\x61\x73\165\x72\x65\x6d\145\156\164\x4e\x61\155\145"])) { vt_loge(__METHOD__ . "\x3a" . "\x6d\145\141\163\165\x72\145\155\145\156\x74\116\x61\155\x65\x20\151\163\x20\156\157\x74\x20\163\x65\164\40\x6f\162\x20\145\155\160\x74\x79\56"); return; } if (!isset($parameters["\144\x65\x6e\164\x61\154\x41\x67\145\x54\171\x70\145"])) { vt_loge(__METHOD__ . "\72" . "\x64\145\156\x74\x61\x6c\101\x67\145\124\x79\160\145\x20\151\x73\40\156\157\x74\x20\163\x65\x74\40\x6f\x72\40\x65\155\x70\x74\171\x2e"); return; } if (!isset($parameters["\x67\145\x6e\144\x65\x72"]) || empty($parameters["\147\145\x6e\x64\x65\x72"])) { vt_loge(__METHOD__ . "\72" . "\147\x65\156\144\x65\162\40\x69\x73\x20\x6e\157\x74\40\x73\x65\x74\40\x6f\162\x20\x65\155\x70\x74\x79\x2e"); return; } if (!isset($parameters["\x6d\x65\141\x6e"]) || empty(trim($parameters["\x6d\x65\141\x6e"]))) { vt_loge(__METHOD__ . "\x3a" . "\x6d\145\141\x6e\x20\x69\x73\x20\x6e\x6f\164\x20\163\145\x74\40\x6f\162\40\145\155\x70\x74\171\x2e"); return; } if (!isset($parameters["\x53\x44"]) || empty(trim($parameters["\x53\104"]))) { vt_loge(__METHOD__ . "\72" . "\x53\x44\x20\x69\163\x20\156\157\x74\40\x73\x65\x74\40\x6f\x72\40\x65\x6d\160\x74\171\56"); return; } $gender = $parameters["\x67\145\156\x64\145\162"]; if ($gender != "\115" && $gender != "\x46" && $gender != "\x4f") { vt_loge(__METHOD__ . "\72" . "\147\x65\x6e\x64\145\162\40\x69\x73\x20\151\x6e\166\141\154\x69\x64\x20\144\141\x74\x61\x2e"); return; } $sStandardDataItem = new SStandardDataItem(); $sStandardDataItem->measurementName = $parameters["\x6d\x65\x61\163\x75\x72\145\155\x65\156\x74\116\x61\x6d\145"]; $sStandardDataItem->dentalAgeType = intval($parameters["\x64\145\156\x74\141\154\101\x67\x65\124\171\x70\145"]); $sStandardDataItem->gender = $gender; $sStandardDataItem->mean = $parameters["\x6d\145\141\156"]; $sStandardDataItem->SD = $parameters["\x53\x44"]; if (isset($parameters["\x75\163\x65\162\125\160\x64\141\164\145\x64"])) { $sStandardDataItem->userUpdated = filter_var($parameters["\165\163\x65\162\x55\x70\144\x61\x74\145\144"], FILTER_VALIDATE_BOOLEAN); } else { $sStandardDataItem->userUpdated = false; } return $sStandardDataItem; } } class SVTOSTOControlPoints extends Struct { var $controlPointLandmarkName; var $rotateCenterLandmarkName; var $affectedLandmarks; public function __construct($var) { $this->controlPointLandmarkName = $var["\x63\157\156\164\x72\x6f\154\156\x61\x6d\x65"]; $this->rotateCenterLandmarkName = $var["\162\157\164\x61\x74\x65\156\141\155\x65"]; $this->affectedLandmarks = array(); } } class SAffectedLandmark extends Struct { var $name; var $type; var $part; public function __construct($var) { $this->name = $var["\141\146\146\x65\x63\x65\144\x74\x65\x64\137\x6e\x61\155\x65"]; $this->type = intval($var["\157\164\x68\x5f\x76\x74\157\x73\x74\x6f\137\x61\x66\146\x65\143\164\x65\144\137\x74\x79\160\145"]); if (isset($var["\157\x74\x68\137\166\x74\157\x73\x74\157\x5f\x61\146\x66\145\143\164\x65\x64\x5f\160\x61\162\164"])) { $this->part = intval($var["\157\164\150\x5f\166\x74\x6f\163\x74\157\137\x61\146\x66\x65\143\x74\145\144\x5f\160\141\162\x74"]); } else { $this->part = -1; } } } class SSuperimpositionInfo extends Struct { var $name; var $label; var $order; var $origin; var $pointA; var $pointB; var $guidelines; var $interestingLandmarks; var $userAdded; public static function constructWithRow($var) { $sSuperimpositionInfo = new SSuperimpositionInfo(); $sSuperimpositionInfo->name = $var->oth_superimposition_name; $sSuperimpositionInfo->label = $var->oth_superimposition_label; $sSuperimpositionInfo->order = intval($var->oth_superimposition_displayed_order); $sSuperimpositionInfo->origin = strval($var->orgin); $sSuperimpositionInfo->pointA = strval($var->pointA); $sSuperimpositionInfo->pointB = strval($var->pointB); $sSuperimpositionInfo->userAdded = setBoolVal($var->oth_superimposition_user_added); return $sSuperimpositionInfo; } public static function constructWithParameter($parameters) { if (!isset($parameters["\x6e\x61\x6d\145"]) || empty(trim($parameters["\x6e\141\x6d\145"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\x61\x6d\145\x20\151\163\x20\156\157\164\x20\x73\x65\x74\40\157\x72\40\145\x6d\x70\164\171\x2e"); return; } $sSuperimpositionInfo = new SSuperimpositionInfo(); $sSuperimpositionInfo->name = trim($parameters["\x6e\141\155\145"]); $sSuperimpositionInfo->order = intval($parameters["\157\x72\x64\145\162"]); $sSuperimpositionInfo->userAdded = filter_var($parameters["\165\x73\x65\x72\x41\x64\144\x65\x64"], FILTER_VALIDATE_BOOLEAN); if (!isset($parameters["\x6c\x61\x62\x65\x6c"]) || empty(trim($parameters["\x6c\x61\142\x65\154"]))) { $sSuperimpositionInfo->label = $sSuperimpositionInfo->name; } else { $sSuperimpositionInfo->label = $parameters["\154\x61\142\145\154"]; } if (isset($parameters["\x67\165\x69\144\x65\154\151\156\145\163"])) { $sSuperimpositionInfo->guidelines = $parameters["\147\165\151\144\145\154\x69\156\145\163"]; } if (isset($parameters["\151\156\164\x65\x72\145\163\x74\x69\x6e\147\x4c\141\x6e\144\155\141\x72\153\x73"])) { $sSuperimpositionInfo->interestingLandmarks = $parameters["\151\x6e\x74\145\x72\x65\163\164\x69\156\x67\x4c\141\156\x64\x6d\141\x72\153\163"]; } $sSuperimpositionInfo->origin = $parameters["\x6f\162\151\147\151\x6e"]; $sSuperimpositionInfo->pointA = $parameters["\x70\x6f\151\156\164\x41"]; $sSuperimpositionInfo->pointB = $parameters["\x70\157\x69\x6e\x74\102"]; return $sSuperimpositionInfo; } } class STreatmentCategory extends Struct { var $name; var $visible; var $userAdded; var $children; public static function constructWithRow($resutRows, $var) { $sCategory = new STreatmentCategory(); $sCategory->name = $var["\x6f\164\x68\x5f\164\x72\x65\141\164\155\x65\156\164\137\x63\x61\x74\x65\147\157\162\x79\x5f\x6e\x61\155\x65"]; $sCategory->visible = setBoolVal($var["\157\164\x68\x5f\x74\162\x65\x61\164\155\145\x6e\164\x5f\x63\x61\x74\145\147\157\162\x79\137\166\151\163\x69\x62\154\x65"]); $sCategory->userAdded = setBoolVal($var["\157\x74\x68\137\164\x72\x65\x61\164\x6d\x65\156\164\137\164\162\145\145\x5f\x75\163\145\162\137\141\x64\x64\x65\144"]); $childCategoryArray = array(); $category_id = $var["\157\164\150\137\164\x72\145\141\x74\x6d\x65\x6e\x74\137\x63\141\x74\145\147\157\x72\171\x5f\151\144"]; foreach ($resutRows as $row) { if ($row["\x70\x61\162\145\x6e\164\x5f\x63\141\164\x65\x67\157\x72\171\137\151\144"] == $category_id) { $sChildCategory = STreatmentCategory::constructWithRow($resutRows, $row); array_push($childCategoryArray, $sChildCategory); } } if (count($childCategoryArray) > 0) { $sCategory->children = $childCategoryArray; } return $sCategory; } public static function constructWithParameter($parameters) { $categoryArray = array(); foreach ($parameters as $category) { $sCategory = new STreatmentCategory(); $sCategory->name = trim($category["\x6e\141\155\x65"]); $sCategory->visible = filter_var($category["\x76\151\x73\x69\x62\154\x65"], FILTER_VALIDATE_BOOLEAN); $sCategory->userAdded = filter_var($category["\165\163\x65\162\101\x64\x64\145\144"], FILTER_VALIDATE_BOOLEAN); if (isset($category["\143\150\151\154\144\162\145\156"]) && count($category["\x63\x68\151\154\144\162\x65\156"]) > 0) { $sCategory->children = STreatmentCategory::constructWithParameter($category["\x63\x68\151\x6c\x64\x72\x65\x6e"]); } array_push($categoryArray, $sCategory); } return $categoryArray; } } class SPatientCharts extends Struct { var $chartNo; var $updatedDateTime; var $chartFileName; var $createdDateTime; var $chartType; public static function constructWithParameter($parameters) { if (!isset($parameters["\143\x68\141\x72\x74\x4e\x6f"]) || empty(trim($parameters["\143\150\x61\x72\x74\x4e\157"]))) { vt_loge(__METHOD__ . "\72" . "\x63\x68\141\x72\164\116\157\40\x69\163\40\156\157\164\x20\163\x65\164\40\x6f\x72\40\x65\x6d\x70\x74\171\56"); return; } if (!isset($parameters["\165\160\x64\x61\164\x65\144\x44\x61\164\x65\124\x69\155\x65"]) || empty(trim($parameters["\x75\160\144\141\x74\x65\144\104\x61\164\145\x54\151\x6d\x65"]))) { vt_loge(__METHOD__ . "\72" . "\165\x70\x64\141\x74\x65\144\x44\x61\164\x65\x54\x69\x6d\145\40\x69\163\40\x6e\157\164\x20\163\145\164\x20\157\162\40\x65\155\160\x74\x79\x2e"); return; } if (!isset($parameters["\x63\x68\141\x72\164\106\151\x6c\x65\x4e\141\x6d\145"]) || empty(trim($parameters["\x63\150\141\162\164\106\x69\x6c\x65\x4e\x61\155\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\143\x68\x61\x72\164\106\151\154\x65\x4e\x61\x6d\x65\40\x69\x73\40\156\157\164\40\x73\x65\x74\x20\x6f\162\x20\145\155\160\x74\x79\56"); return; } $updatedDateTime = date_create($parameters["\165\x70\144\141\x74\x65\144\x44\x61\x74\x65\x54\151\155\145"]); if ($updatedDateTime === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\x75\x70\x64\x61\x74\145\x64\x44\141\164\145\124\151\x6d\x65\40\151\163\x20\x69\156\x76\x61\154\x69\144\40\144\x61\x74\145\40\x66\157\x72\x6d\x61\x74\56"); return; } $sPatientCharts = new SPatientCharts(); $sPatientCharts->chartNo = trim($parameters["\x63\150\x61\x72\164\116\157"]); $sPatientCharts->updatedDateTime = $updatedDateTime->format(DATAFORMAT[DATEFORMAT_DATABASE]); $sPatientCharts->chartFileName = $parameters["\x63\x68\x61\x72\x74\106\x69\x6c\145\x4e\141\x6d\145"]; if (isset($parameters["\143\162\145\x61\x74\x65\144\x44\141\x74\x65\x54\151\155\x65"]) && !empty($parameters["\x63\162\145\141\164\x65\144\104\x61\164\x65\x54\151\155\145"])) { $createDateTime = date_create($parameters["\143\x72\x65\141\x74\145\144\104\x61\164\x65\x54\x69\x6d\145"]); $sPatientCharts->createdDateTime = $createDateTime->format(DATAFORMAT[DATEFORMAT_DATABASE]); } if (isset($parameters["\x63\x68\141\162\x74\x54\171\160\145"]) && !empty($parameters["\143\x68\x61\162\x74\124\171\x70\x65"])) { $sPatientCharts->chartType = $parameters["\143\150\x61\x72\x74\x54\x79\x70\145"]; } return $sPatientCharts; } } class SPatientChartInfo extends Struct { var $createdDateTime; var $updatedDateTime; var $chartType; var $chartFileName; public function __construct($var) { $this->createdDateTime = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\x74\150\137\143\150\x61\x72\x74\x5f\x63\x72\x65\141\x74\x65\144"]); $this->updatedDateTime = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\x74\x68\x5f\143\x68\141\162\x74\137\165\x70\144\141\x74\x65\x64"]); $this->chartType = intval($var["\x6f\x74\x68\x5f\143\x68\141\162\164\x5f\x74\x79\160\x65"]); $this->chartFileName = $var["\157\164\150\x5f\143\150\x61\162\164\137\146\151\x6c\145\156\141\155\145"]; } } class SPracticeChair extends Struct { var $seqNo; var $name; public static function constructWithRow($var) { $sPracticeChair = new SPracticeChair(); $sPracticeChair->seqNo = intval($var["\157\164\x68\137\143\x68\x61\x69\162\137\x73\145\x71\156\x6f"]); $sPracticeChair->name = $var["\x6f\x74\x68\x5f\x63\150\141\x69\162\137\x6e\x61\x6d\145"]; return $sPracticeChair; } public static function constructWithParameter($parameters) { $chairs = array(); if (isset($parameters["\x63\x68\141\x69\x72\x73"])) { foreach ($parameters["\143\150\141\x69\x72\163"] as $chair) { if (isset($chair["\x73\x65\x71\116\157"]) && isset($chair["\x6e\141\x6d\x65"])) { $sPracticeChair = new SPracticeChair(); $sPracticeChair->seqNo = intval($chair["\x73\x65\x71\x4e\x6f"]); $sPracticeChair->name = $chair["\x6e\141\155\x65"]; array_push($chairs, $sPracticeChair); } } } return $chairs; } } class SScheduleInfo extends Struct { var $startTimestamp; var $endTimestamp; var $type; var $docName; var $chartNo; var $patLastName; var $patFirstName; var $chairName; var $description; public static function constructWithRow($var) { $sScheduleInfo = new SScheduleInfo(); $sScheduleInfo->startTimestamp = currentDateFormat(DATEFORMAT_ISO8601, $var["\x6f\x74\x68\x5f\160\162\x61\x63\x74\151\143\x65\137\x73\143\150\x65\144\x75\154\145\137\x73\164\141\162\164\164\151\155\x65"]); $sScheduleInfo->endTimestamp = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\164\x68\x5f\160\x72\x61\x63\x74\151\143\145\x5f\163\143\x68\145\x64\165\154\145\x5f\145\x6e\144\164\151\155\x65"]); $sScheduleInfo->type = $var["\157\164\x68\137\x70\x72\141\x63\164\x69\x63\x65\x5f\163\143\150\145\x64\165\154\x65\137\164\x79\160\145"]; $sScheduleInfo->docName = $var["\144\157\x63\x5f\156\141\x6d\145"]; $sScheduleInfo->chartNo = $var["\160\x61\164\137\x63\150\141\x72\164\x6e\x6f"]; $sScheduleInfo->patLastName = $var["\x70\x61\x74\137\154\x61\x73\164\x6e\x61\x6d\x65"]; $sScheduleInfo->patFirstName = $var["\x70\x61\164\x5f\x66\151\162\x73\164\156\x61\155\x65"]; $sScheduleInfo->chairName = $var["\157\164\x68\137\x63\150\x61\x69\x72\137\156\x61\155\145"]; $sScheduleInfo->description = $var["\157\164\x68\137\x70\x72\141\143\x74\x69\x63\x65\137\x73\143\150\x65\x64\x75\154\145\x5f\x64\x65\163\x63"]; return $sScheduleInfo; } public static function constructWithParameter($parameters) { if (!isset($parameters["\x74\171\x70\x65"])) { vt_loge(__METHOD__ . "\72" . "\x74\171\160\145\40\151\x73\40\156\x6f\164\x20\x73\145\x74\56"); return; } if (!isset($parameters["\163\x74\x61\x72\164\124\x69\155\x65\x73\164\x61\155\x70"]) || empty(trim($parameters["\163\164\141\162\164\124\x69\x6d\145\163\164\141\x6d\x70"]))) { vt_loge(__METHOD__ . "\72" . "\163\x74\x61\162\164\x54\x69\155\145\163\164\x61\x6d\x70\x20\x69\x73\40\x6e\x6f\x74\x20\x73\x65\x74\x20\157\162\40\x65\155\160\164\x79\56"); return; } if (!isset($parameters["\145\156\144\x54\151\155\x65\x73\164\x61\x6d\160"]) || empty(trim($parameters["\145\x6e\x64\x54\x69\155\x65\163\164\x61\155\160"]))) { vt_loge(__METHOD__ . "\x3a" . "\x65\156\144\x54\151\x6d\145\x73\164\x61\x6d\160\40\x69\163\x20\156\157\164\40\163\x65\x74\x20\x6f\x72\x20\145\155\x70\x74\x79\56"); return; } $sScheduleInfo = new SScheduleInfo(); $sScheduleInfo->type = intval($parameters["\x74\x79\160\145"]); $sScheduleInfo->startTimestamp = $parameters["\163\x74\x61\162\x74\124\x69\x6d\145\163\x74\x61\x6d\x70"]; $sScheduleInfo->endTimestamp = $parameters["\145\156\x64\x54\x69\x6d\x65\x73\x74\x61\155\160"]; $sScheduleInfo->docName = $parameters["\x64\157\x63\x4e\141\x6d\x65"]; $sScheduleInfo->chartNo = $parameters["\x63\x68\x61\162\164\116\157"]; $sScheduleInfo->chairName = $parameters["\143\x68\x61\151\162\x4e\141\x6d\x65"]; $sScheduleInfo->description = $parameters["\x64\x65\163\x63\162\x69\x70\x74\x69\157\x6e"]; return $sScheduleInfo; } } class SScheduleInfoWithId extends Struct { var $startTimestamp; var $endTimestamp; var $type; var $docName; var $chartNo; var $patLastName; var $patFirstName; var $chairName; var $description; var $id; public static function constructWithRow($var) { $sScheduleInfoWithId = new SScheduleInfoWithId(); (int) ($sScheduleInfoWithId->id = (int) $var["\157\164\x68\137\x70\162\141\x63\x74\x69\143\145\137\x73\x63\150\145\144\x75\154\145\x5f\151\144"]); $sScheduleInfoWithId->startTimestamp = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\x74\x68\x5f\x70\x72\141\143\164\x69\x63\145\x5f\x73\x63\150\145\144\x75\x6c\x65\137\163\x74\141\x72\x74\x74\151\x6d\145"]); $sScheduleInfoWithId->endTimestamp = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\164\150\137\160\162\141\143\164\x69\143\x65\x5f\163\143\x68\x65\144\165\x6c\x65\137\x65\x6e\144\x74\151\x6d\145"]); $sScheduleInfoWithId->type = $var["\157\x74\x68\137\160\162\141\143\x74\151\x63\145\x5f\x73\143\150\145\144\165\154\145\137\164\171\x70\145"]; $sScheduleInfoWithId->docName = $var["\x64\x6f\x63\x5f\156\141\155\x65"]; $sScheduleInfoWithId->chartNo = $var["\x70\141\x74\137\143\x68\141\x72\164\156\157"]; $sScheduleInfoWithId->patLastName = $var["\x70\x61\x74\137\154\x61\x73\164\x6e\141\x6d\145"]; $sScheduleInfoWithId->patFirstName = $var["\160\x61\164\137\146\x69\162\x73\x74\156\x61\x6d\x65"]; $sScheduleInfoWithId->chairName = $var["\157\x74\150\137\143\x68\141\x69\162\137\156\141\x6d\x65"]; $sScheduleInfoWithId->description = $var["\157\x74\x68\137\160\x72\141\x63\164\x69\143\x65\x5f\163\143\150\145\144\x75\154\x65\x5f\x64\x65\163\x63"]; return $sScheduleInfoWithId; } public static function constructWithParameter($parameters) { if (!isset($parameters["\x74\x79\x70\x65"])) { vt_loge(__METHOD__ . "\72" . "\x74\171\x70\x65\x20\151\x73\40\x6e\x6f\164\x20\163\x65\x74\x2e"); return; } if (!isset($parameters["\x64\x6f\143\116\x61\x6d\x65"]) || empty(trim($parameters["\x64\x6f\143\116\141\155\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\144\157\143\116\x61\x6d\x65\40\x69\163\40\x6e\157\x74\40\163\x65\164\40\x6f\162\x20\x65\x6d\x70\164\171\56"); return; } if (!isset($parameters["\x73\164\x61\162\x74\x54\151\x6d\x65\163\164\x61\x6d\x70"]) || empty(trim($parameters["\x73\164\141\162\x74\124\151\x6d\145\163\x74\x61\155\160"]))) { vt_loge(__METHOD__ . "\x3a" . "\163\164\x61\x72\164\x54\x69\x6d\145\163\164\141\155\160\40\x69\x73\40\x6e\x6f\164\x20\x73\x65\x74\40\x6f\x72\x20\145\155\x70\x74\171\56"); return; } if (!isset($parameters["\145\156\x64\124\x69\x6d\x65\163\164\141\x6d\x70"]) || empty(trim($parameters["\x65\x6e\144\124\151\x6d\x65\x73\164\x61\155\x70"]))) { vt_loge(__METHOD__ . "\72" . "\x65\156\x64\x54\x69\155\x65\163\164\x61\155\160\40\x69\x73\x20\x6e\157\164\x20\x73\x65\164\x20\157\x72\40\x65\x6d\160\x74\x79\x2e"); return; } $sScheduleInfoWithId = new SScheduleInfoWithId(); if (isset($parameters["\x69\x64"]) && !empty($parameters["\151\144"])) { $sScheduleInfoWithId->id = $parameters["\151\x64"]; } if (isset($parameters["\x64\157\x63\116\141\x6d\145"]) && !empty($parameters["\144\157\x63\116\141\x6d\x65"])) { $sScheduleInfoWithId->docName = $parameters["\x64\x6f\x63\x4e\x61\x6d\x65"]; } $sScheduleInfoWithId->type = intval($parameters["\164\x79\x70\x65"]); $sScheduleInfoWithId->startTimestamp = $parameters["\163\x74\141\x72\164\x54\x69\155\x65\163\164\x61\x6d\x70"]; $sScheduleInfoWithId->endTimestamp = $parameters["\145\156\x64\x54\151\155\x65\163\164\x61\x6d\160"]; $sScheduleInfoWithId->chartNo = $parameters["\143\x68\141\x72\x74\x4e\x6f"]; $sScheduleInfoWithId->chairName = $parameters["\143\150\x61\x69\162\x4e\141\155\145"]; $sScheduleInfoWithId->description = $parameters["\144\x65\x73\x63\162\151\160\164\x69\157\156"]; return $sScheduleInfoWithId; } } class SPracticeInfo extends Struct { var $name; var $web; var $phone; var $fax; var $address; var $state; var $country; var $zipcode; var $logo; var $clockType; public static function constructWithRow($var) { $sPracticeInfo = new SPracticeInfo(); $sPracticeInfo->name = $var->oth_practice_name; $sPracticeInfo->web = $var->oth_practice_web_address; $sPracticeInfo->phone = $var->oth_practice_phone_num; $sPracticeInfo->fax = $var->oth_practice_fax_num; $sPracticeInfo->address = $var->oth_practice_address; $sPracticeInfo->state = $var->oth_practice_state; $sPracticeInfo->country = $var->oth_practice_country; $sPracticeInfo->zipcode = $var->oth_practice_zipcode; $sPracticeInfo->logo = new SPracticeLogo(); $sPracticeInfo->logo->preferrendLogo = intval($var->oth_practice_preferred_logo); $sPracticeInfo->logo->textLogo = $var->oth_practice_text_logo; $sPracticeInfo->logo->textLogoFontFamily = $var->oth_practice_text_logo_font_family; $sPracticeInfo->logo->imageLogo = $var->oth_practice_image_logo; $sPracticeInfo->clockType = intval($var->oth_practice_clock_type); return $sPracticeInfo; } public static function constructWithParameter($parameters) { $sPracticeInfo = new SPracticeInfo(); $sPracticeInfo->name = $parameters["\156\x61\x6d\x65"]; $sPracticeInfo->web = $parameters["\x77\x65\142"]; $sPracticeInfo->phone = $parameters["\160\x68\x6f\x6e\145"]; $sPracticeInfo->fax = $parameters["\146\x61\170"]; $sPracticeInfo->address = $parameters["\141\144\x64\162\145\x73\163"]; $sPracticeInfo->state = $parameters["\163\164\141\x74\x65"]; $sPracticeInfo->country = $parameters["\143\x6f\x75\x6e\164\162\x79"]; $sPracticeInfo->zipcode = $parameters["\172\151\x70\143\x6f\x64\x65"]; $sPracticeInfo->logo = new SPracticeLogo(); $sPracticeInfo->logo->preferrendLogo = intval($parameters["\x6c\x6f\147\157"]["\x70\162\145\146\x65\162\162\x65\x6e\144\x4c\x6f\147\157"]); $sPracticeInfo->logo->textLogo = $parameters["\x6c\157\x67\x6f"]["\x74\145\x78\x74\114\157\x67\157"]; $sPracticeInfo->logo->textLogoFontFamily = $parameters["\x6c\x6f\x67\157"]["\164\145\170\164\114\x6f\x67\157\x46\157\x6e\x74\x46\141\155\x69\154\171"]; $sPracticeInfo->logo->imageLogo = $parameters["\x6c\x6f\x67\157"]["\151\x6d\141\x67\145\114\157\147\x6f"]; $sPracticeInfo->clockType = intval($parameters["\x63\154\157\143\153\x54\171\x70\145"]); return $sPracticeInfo; } } class SPracticeLogo extends Struct { var $preferrendLogo; var $textLogo; var $textLogoFontFamily; var $imageLogo; } class SPractieHours extends Struct { var $clockType; var $practiceTimes; public static function constructWithRow($cloktype, $var) { $sPractieHours = new SPractieHours(); $sPractieHours->clockType = $cloktype; $sPractieHours->practiceTimes = array(); if (count($var) > 0) { foreach ($var as $row) { $sPractieHourInfo = SPractieHourInfo::constructWithRow($row); array_push($sPractieHours->practiceTimes, $sPractieHourInfo); } } return $sPractieHours; } public static function constructWithParameter($parameters) { if (!isset($parameters["\143\x6c\x6f\143\153\x54\171\160\x65"])) { vt_loge(__METHOD__ . "\72" . "\x63\x6c\157\143\153\124\x79\x70\x65\40\x69\x73\x20\x6e\x6f\164\40\163\x65\x74\56"); return; } $items = array(); if (isset($parameters["\x70\162\x61\x63\x74\x69\x63\x65\124\x69\155\x65\163"])) { foreach ($parameters["\x70\162\x61\143\x74\151\143\x65\x54\151\155\145\163"] as $info) { $sPractieHourInfo = SPractieHourInfo::constructWithParameter($info); if (!isset($sPractieHourInfo)) { vt_loge(__METHOD__ . "\156\157\40\160\x72\141\x63\164\151\x63\x65\x20\150\157\165\x72\40\151\156\146\x6f\x3a\40" . json_encode($info)); return; } array_push($items, $sPractieHourInfo); } } $sPractieHours = new SPractieHours(); $sPractieHours->clockType = intval($parameters["\143\154\157\x63\153\124\x79\x70\x65"]); $sPractieHours->practiceTimes = $items; return $sPractieHours; } } class SPractieHourInfo extends Struct { var $seqNo; var $days; var $startTime; var $endTime; public static function constructWithRow($var) { $sPractieHourInfo = new SPractieHourInfo(); $sPractieHourInfo->seqNo = intval($var["\157\x74\x68\137\160\162\x61\143\x74\151\143\x65\137\x68\x6f\165\162\137\151\x64"]); $sPractieHourInfo->days = $var["\x6f\164\x68\137\x70\162\x61\143\x74\x69\143\145\x5f\144\141\x79\x73"]; $sPractieHourInfo->startTime = isset($var["\x6f\x74\x68\137\x70\x72\x61\143\x74\x69\x63\145\137\x73\164\141\162\164\x74\151\155\145"]) ? currentDateFormat(DATEFORMAT_SCHEDULE, $var["\x6f\x74\x68\x5f\x70\162\x61\x63\x74\151\x63\x65\137\163\x74\141\x72\164\164\x69\155\x65"]) : ''; $sPractieHourInfo->endTime = isset($var["\x6f\164\150\x5f\x70\x72\x61\x63\x74\x69\143\145\x5f\145\156\144\164\x69\155\145"]) ? currentDateFormat(DATEFORMAT_SCHEDULE, $var["\157\164\x68\137\x70\162\x61\143\x74\x69\x63\145\x5f\x65\156\x64\164\151\155\145"]) : ''; return $sPractieHourInfo; } public static function constructWithParameter($parameters) { if (!isset($parameters["\163\145\161\x4e\157"])) { vt_loge(__METHOD__ . "\x3a" . "\163\145\161\116\157\x20\x69\x73\40\x6e\157\164\40\x73\x65\x74"); return; } if (isset($parameters["\163\x74\x61\162\164\124\x69\x6d\145"]) && empty(trim($parameters["\x73\164\x61\162\x74\124\x69\x6d\145"])) === FALSE) { $startTime = date_create($parameters["\163\164\141\x72\x74\x54\x69\x6d\x65"]); if ($startTime === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\x73\164\141\162\164\124\x69\x6d\145\40\151\x73\x20\x69\156\166\x61\154\x69\x64\x20\144\x61\164\145\x20\146\x6f\x72\x6d\x61\164\x2e"); return; } } if (isset($parameters["\x65\156\x64\124\x69\155\145"]) && empty(trim($parameters["\145\156\x64\124\x69\155\145"])) === FALSE) { $endTime = date_create($parameters["\145\156\x64\x54\151\x6d\x65"]); if ($endTime === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\x65\x6e\144\124\151\x6d\145\x20\151\163\40\151\156\166\141\x6c\151\144\40\144\x61\164\x65\40\x66\157\162\x6d\141\x74\x2e"); return; } } $sPractieHourInfo = new SPractieHourInfo(); $sPractieHourInfo->seqNo = intval($parameters["\x73\x65\161\116\x6f"]); if (isset($parameters["\144\x61\x79\163"])) { $sPractieHourInfo->days = $parameters["\144\x61\x79\163"]; } if (isset($startTime)) { $sPractieHourInfo->startTime = $startTime->format(DATAFORMAT[DATEFORMAT_SCHEDULE]); } if (isset($endTime)) { $sPractieHourInfo->endTime = $endTime->format(DATAFORMAT[DATEFORMAT_SCHEDULE]); } return $sPractieHourInfo; } } class SRecordsetInfo extends Struct { var $stage; var $createdDate; var $seqNo; var $dentalAge; var $classification; var $description; public function __construct($var) { $this->stage = $var["\x6f\164\150\137\x74\x72\145\x61\x74\155\x65\x6e\164\x5f\x73\164\141\147\145\x5f\x6e\x61\155\145"]; $this->createdDate = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\x74\x68\x5f\x72\x65\x63\157\x72\x64\x73\x65\x74\137\x63\162\145\141\x74\145\x64\x5f\x64\141\164\x65"]); $this->seqNo = intval($var["\x6f\164\x68\x5f\x72\x65\143\x6f\162\x64\x73\x65\x74\x5f\163\145\x71\x5f\156\x6f"]); $this->dentalAge = intval($var["\x6f\x74\x68\x5f\162\x65\x63\157\x72\144\163\x65\x74\x5f\144\145\x6e\164\x61\154\141\x67\145"]); $this->classification = $var["\x6f\x74\150\137\x63\154\x61\x73\163\x5f\x6e\x61\x6d\145"]; $this->description = $var["\x6f\x74\150\x5f\x72\145\143\157\162\x64\163\145\x74\137\x64\145\163\143\162\151\x70\164\x69\x6f\x6e"]; } } class SRecordsetParameterInfo extends Struct { var $chartNo; var $recordsetStage; var $createdDate; var $classification; var $dentalAge; var $description; var $seqNo; var $newRecordsetStage; var $newCreatedDate; var $newClassification; var $newDentalAge; var $newDescription; public static function constructWithPostParameter($parameters) { if (!isset($parameters["\x63\150\x61\162\x74\116\x6f"]) || empty(trim($parameters["\x63\150\141\162\x74\x4e\157"]))) { vt_loge(__METHOD__ . "\x3a" . "\143\x68\x61\x72\164\x4e\x6f\x20\x69\163\40\156\157\x74\40\163\x65\164\40\x6f\162\x20\x65\x6d\160\164\x79\56"); return; } if (!isset($parameters["\143\x72\x65\x61\x74\145\144\x44\x61\164\x65"]) || empty(trim($parameters["\143\x72\x65\x61\x74\x65\x64\104\x61\164\145"]))) { vt_loge(__METHOD__ . "\72" . "\143\162\x65\x61\x74\x65\144\104\141\x74\145\x20\x69\163\x20\156\157\x74\x20\x73\x65\164\40\x6f\162\40\x65\x6d\160\x74\x79\x2e"); return; } if (!isset($parameters["\143\x6c\141\x73\x73\x69\146\151\x63\141\164\x69\x6f\156"]) || empty(trim($parameters["\x63\x6c\141\x73\163\151\146\x69\143\x61\x74\151\157\x6e"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\154\141\163\163\151\146\x69\143\x61\x74\x69\157\156\x20\151\x73\x20\156\157\164\40\163\x65\x74\40\157\x72\x20\x65\x6d\160\x74\171\x2e"); return; } if (!isset($parameters["\144\145\156\x74\x61\154\101\x67\145"])) { vt_loge(__METHOD__ . "\72" . "\x64\145\x6e\164\141\x6c\101\x67\145\40\x69\163\40\156\x6f\x74\x20\163\145\164\x2e"); return; } $createdDate = date_create($parameters["\x63\162\145\141\164\145\x64\104\x61\x74\145"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\x63\162\x65\x61\164\145\144\x44\x61\x74\x65\x20\x69\x73\40\151\156\x76\x61\154\151\144\x20\x64\x61\x74\145\x20\x66\x6f\x72\x6d\141\x74\x2e"); return; } $sRecordsetParameterInfo = new SRecordsetParameterInfo(); $sRecordsetParameterInfo->chartNo = $parameters["\143\x68\x61\162\164\x4e\157"]; $sRecordsetParameterInfo->recordsetStage = $parameters["\162\x65\143\157\162\x64\163\145\164\x53\x74\141\x67\145"]; $sRecordsetParameterInfo->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); $sRecordsetParameterInfo->classification = $parameters["\143\x6c\x61\x73\163\151\146\x69\143\x61\164\x69\157\156"]; $sRecordsetParameterInfo->dentalAge = intval($parameters["\144\145\x6e\164\141\154\101\x67\x65"]); $sRecordsetParameterInfo->description = $parameters["\144\x65\x73\143\x72\x69\x70\x74\x69\157\x6e"]; return $sRecordsetParameterInfo; } public static function constructWithPutParameter($parameters) { if (!isset($parameters["\143\150\141\x72\164\x4e\x6f"]) || empty(trim($parameters["\143\x68\x61\x72\164\x4e\157"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\150\x61\x72\164\x4e\x6f\x20\151\x73\40\156\157\164\x20\x73\x65\164\x20\157\x72\x20\x65\x6d\x70\x74\x79\x2e"); return; } if (!isset($parameters["\143\x72\x65\x61\164\145\144\104\141\x74\145"]) || empty(trim($parameters["\143\162\x65\141\164\x65\144\104\x61\x74\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\143\x72\145\141\164\145\144\104\x61\x74\x65\40\151\x73\x20\x6e\157\x74\40\x73\145\x74\40\157\162\40\x65\155\160\x74\171\56"); return; } if (!isset($parameters["\x6e\x65\x77\103\162\x65\x61\x74\x65\144\104\141\x74\145"]) || empty(trim($parameters["\156\x65\x77\x43\x72\145\141\x74\145\144\104\x61\164\x65"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\145\x77\x43\x72\145\141\164\145\x64\x44\141\x74\x65\40\151\x73\40\x6e\x6f\x74\40\163\145\x74\x20\157\x72\x20\145\x6d\160\164\171\x2e"); return; } if (!isset($parameters["\156\145\x77\122\x65\x63\x6f\162\144\163\145\x74\x53\x74\141\147\145"]) || empty(trim($parameters["\156\145\x77\x52\145\143\x6f\x72\x64\163\x65\x74\x53\164\141\x67\x65"]))) { vt_loge(__METHOD__ . "\72" . "\x6e\x65\x77\122\145\x63\x6f\162\x64\163\x65\164\123\x74\141\147\145\x20\151\x73\40\x6e\x6f\x74\40\163\x65\164\40\x6f\162\40\145\x6d\x70\x74\171\x2e"); return; } if (!isset($parameters["\156\x65\167\x43\154\141\x73\x73\x69\x66\151\143\141\164\151\157\x6e"]) || empty(trim($parameters["\x6e\145\x77\103\x6c\141\x73\163\151\x66\x69\143\x61\164\151\x6f\x6e"]))) { vt_loge(__METHOD__ . "\x3a" . "\156\x65\x77\103\154\141\x73\x73\x69\x66\151\x63\x61\x74\151\x6f\156\40\x69\x73\x20\156\157\x74\40\x73\145\x74\x20\x6f\x72\x20\x65\x6d\x70\x74\x79\x2e"); return; } if (!isset($parameters["\x6e\145\x77\x44\x65\x6e\164\141\x6c\x41\x67\x65"])) { vt_loge(__METHOD__ . "\x3a" . "\x6e\x65\x77\104\145\x6e\x74\141\x6c\101\x67\x65\x20\x69\163\x20\x6e\157\164\40\163\x65\x74\x2e"); return; } $createdDate = date_create($parameters["\x63\162\145\141\164\145\x64\104\x61\x74\x65"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\72" . "\143\162\145\141\x74\145\x64\104\141\164\x65\40\151\163\x20\151\x6e\x76\x61\x6c\151\144\40\144\x61\x74\145\40\x66\157\162\155\x61\x74\56"); return; } $newCreatedDate = date_create($parameters["\x6e\145\x77\x43\x72\x65\x61\x74\145\144\x44\141\164\145"]); if ($newCreatedDate === FALSE) { vt_loge(__METHOD__ . "\72" . "\156\x65\x77\103\x72\145\141\x74\x65\144\104\x61\x74\145\x20\x69\163\40\151\x6e\x76\x61\x6c\151\144\x20\144\141\164\x65\x20\x66\157\x72\x6d\x61\x74\x2e"); return; } $sRecordsetParameterInfo = new SRecordsetParameterInfo(); $sRecordsetParameterInfo->chartNo = $parameters["\143\150\x61\162\x74\116\x6f"]; $sRecordsetParameterInfo->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); if (isset($parameters["\163\145\161\116\157"])) { $sRecordsetParameterInfo->seqNo = intval($parameters["\x73\145\161\116\x6f"]); } else { $sRecordsetParameterInfo->seqNo = 1; } $sRecordsetParameterInfo->newRecordsetStage = $parameters["\156\145\167\x52\145\143\x6f\x72\x64\163\x65\x74\x53\164\x61\x67\x65"]; $sRecordsetParameterInfo->newCreatedDate = $newCreatedDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); $sRecordsetParameterInfo->newClassification = $parameters["\x6e\145\167\103\154\x61\163\163\x69\146\151\x63\x61\x74\151\x6f\x6e"]; $sRecordsetParameterInfo->newDentalAge = intval($parameters["\x6e\145\167\x44\x65\156\x74\141\x6c\101\x67\x65"]); $sRecordsetParameterInfo->newDescription = $parameters["\156\x65\167\x44\145\x73\143\x72\151\160\x74\x69\x6f\x6e"]; return $sRecordsetParameterInfo; } } class SRecordsetImageInfo extends Struct { var $modality; var $importedDatetime; var $fileName; var $isTraced; var $tracedDateTime; var $registeredFileName; public function __construct($var) { $this->modality = $var["\x6f\164\x68\x5f\x69\155\147\137\155\x6f\144\141\154\151\x74\171\137\156\x61\155\x65"]; $this->importedDatetime = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\164\x68\137\x72\145\x63\x6f\x72\144\x73\145\x74\x5f\x69\155\147\137\x69\155\x70\x6f\x72\x74\145\144\x5f\144\x61\164\x65\164\x69\x6d\145"]); $this->fileName = $var["\x69\155\x67\x5f\x66\151\x6c\145\156\141\155\145"]; $this->isTraced = setBoolVal($var["\x6f\x74\150\x5f\x72\x65\143\157\x72\144\163\145\164\137\151\155\147\x5f\141\x6e\x61\154\x79\x7a\145\x64"]); $this->tracedDateTime = isset($var["\x6f\164\x68\x5f\x72\x65\143\157\x72\x64\163\x65\x74\x5f\151\155\x67\x5f\141\156\141\154\x79\172\145\x64\x5f\x64\x61\164\145\x74\x69\155\145"]) ? currentDateFormat(DATEFORMAT_ISO8601, $var["\157\164\150\x5f\162\x65\x63\157\x72\144\x73\x65\x74\x5f\x69\x6d\147\x5f\141\x6e\141\x6c\171\172\145\144\137\144\x61\x74\x65\164\151\155\145"]) : ''; $this->registeredFileName = $var["\x72\145\x67\x69\163\164\145\x72\145\x64\106\151\x6c\145\116\141\x6d\145"]; } } class SRecordsetImageParameterInfo extends Struct { var $chartNo; var $createdDate; var $seqNo; var $modality; var $fileName; var $registeredFileName; var $isTraced; public static function constructWithPostParameter($parameters) { if (!isset($parameters["\143\x68\141\162\164\x4e\157"]) || empty(trim($parameters["\x63\150\x61\162\x74\116\157"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\x68\141\x72\x74\x4e\157\40\151\x73\40\156\157\164\x20\163\x65\164\40\x6f\162\40\x65\155\x70\164\x79\56"); return; } if (!isset($parameters["\143\162\x65\141\x74\x65\144\104\141\x74\145"]) || empty(trim($parameters["\x63\162\x65\x61\164\x65\x64\104\141\x74\145"]))) { vt_loge(__METHOD__ . "\72" . "\x63\162\x65\x61\164\x65\x64\x44\141\164\145\x20\151\163\x20\156\157\x74\40\x73\145\164\40\x6f\x72\40\x65\x6d\x70\164\171\x2e"); return; } if (!isset($parameters["\155\157\x64\x61\154\151\x74\x79"]) || empty(trim($parameters["\x6d\x6f\144\141\154\151\164\x79"]))) { vt_loge(__METHOD__ . "\x3a" . "\155\x6f\144\141\154\151\164\x79\40\151\163\40\x6e\157\164\40\x73\145\164\40\x6f\162\40\145\x6d\160\x74\171\56"); return; } if (!isset($parameters["\146\151\154\145\116\141\x6d\145"]) || empty(trim($parameters["\x66\x69\154\x65\116\141\x6d\x65"]))) { vt_loge(__METHOD__ . "\72" . "\146\x69\154\x65\116\x61\155\x65\40\151\163\40\x6e\157\164\40\163\x65\x74\40\157\x72\x20\x65\x6d\x70\164\171\56"); return; } $createdDate = date_create($parameters["\x63\162\145\141\x74\x65\x64\104\141\164\x65"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\143\x72\145\x61\164\145\144\x44\141\164\x65\40\x69\x73\40\x69\x6e\166\141\x6c\x69\144\x20\x64\141\x74\145\40\x66\157\162\155\x61\x74\56"); return; } $sRecordsetImageParameterInfo = new SRecordsetImageParameterInfo(); $sRecordsetImageParameterInfo->chartNo = $parameters["\x63\x68\141\x72\164\116\157"]; $sRecordsetImageParameterInfo->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); if (isset($parameters["\163\x65\x71\116\157"])) { $sRecordsetImageParameterInfo->seqNo = intval($parameters["\x73\x65\x71\116\x6f"]); } else { $sRecordsetImageParameterInfo->seqNo = 1; } $sRecordsetImageParameterInfo->modality = $parameters["\x6d\157\x64\141\154\x69\164\171"]; $sRecordsetImageParameterInfo->fileName = $parameters["\x66\x69\154\x65\x4e\x61\x6d\145"]; return $sRecordsetImageParameterInfo; } public static function constructWithPutParameter($parameters) { if (!isset($parameters["\143\x68\141\162\x74\116\x6f"]) || empty(trim($parameters["\x63\150\141\162\164\x4e\157"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\150\x61\x72\164\x4e\157\40\151\163\40\x6e\x6f\164\40\x73\145\x74\x20\x6f\162\x20\145\x6d\160\164\x79\56"); return; } if (!isset($parameters["\143\162\x65\141\164\x65\144\104\x61\164\145"]) || empty(trim($parameters["\x63\162\145\x61\x74\x65\144\104\x61\x74\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\x72\x65\x61\x74\145\144\104\x61\164\x65\x20\151\163\40\156\157\x74\x20\163\x65\x74\x20\x6f\162\x20\145\155\x70\x74\x79\x2e"); return; } if (!isset($parameters["\146\151\154\145\116\x61\x6d\x65"]) || empty(trim($parameters["\146\x69\154\145\x4e\141\155\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\x66\151\154\145\x4e\141\155\145\40\x69\163\x20\156\x6f\164\40\x73\145\164\x20\157\x72\x20\x65\x6d\x70\x74\171\56"); return; } $createdDate = date_create($parameters["\143\x72\145\x61\164\x65\x64\104\x61\164\x65"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\72" . "\143\162\145\x61\x74\x65\x64\x44\141\164\x65\40\151\163\40\151\x6e\x76\x61\x6c\x69\x64\40\144\x61\x74\145\40\x66\157\162\x6d\x61\164\x2e"); return; } $sRecordsetImageParameterInfo = new SRecordsetImageParameterInfo(); $sRecordsetImageParameterInfo->chartNo = $parameters["\143\150\141\162\164\x4e\x6f"]; $sRecordsetImageParameterInfo->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); if (isset($parameters["\x73\x65\161\x4e\x6f"])) { $sRecordsetImageParameterInfo->seqNo = intval($parameters["\x73\145\161\x4e\x6f"]); } else { $sRecordsetImageParameterInfo->seqNo = 1; } $sRecordsetImageParameterInfo->fileName = $parameters["\146\151\x6c\145\x4e\141\155\145"]; if (isset($parameters["\162\145\x67\x69\163\x74\145\x72\x65\144\x46\x69\x6c\145\x4e\x61\155\x65"])) { $sRecordsetImageParameterInfo->registeredFileName = $parameters["\x72\x65\147\x69\x73\x74\x65\162\x65\x64\x46\x69\x6c\x65\x4e\141\x6d\145"]; } if (isset($parameters["\x69\x73\x54\162\x61\143\x65\x64"])) { $sRecordsetImageParameterInfo->isTraced = filter_var($parameters["\151\163\x54\162\141\143\x65\x64"], FILTER_VALIDATE_BOOLEAN); } return $sRecordsetImageParameterInfo; } } class SVTOSTOData extends Struct { var $chartNo; var $createdDate; var $seqNo; var $newName; var $oldName; public static function constructWithPostParameter($parameters) { if (!isset($parameters["\x63\150\141\162\164\116\x6f"]) || empty(trim($parameters["\143\x68\141\162\164\x4e\157"]))) { vt_loge(__METHOD__ . "\72" . "\143\x68\141\x72\x74\x4e\157\40\151\x73\x20\156\x6f\164\40\163\145\x74\x20\x6f\162\40\x65\x6d\x70\164\171\56"); return; } if (!isset($parameters["\x63\162\145\141\x74\x65\144\104\x61\164\145"]) || empty(trim($parameters["\143\162\x65\x61\x74\145\144\104\141\164\x65"]))) { vt_loge(__METHOD__ . "\x3a" . "\x63\x72\145\141\164\x65\144\x44\141\x74\145\40\151\x73\x20\x6e\x6f\x74\40\163\x65\164\40\157\162\x20\145\x6d\160\x74\x79\56"); return; } if (!isset($parameters["\x64\141\x74\141\x4e\141\x6d\145"]) || empty(trim($parameters["\x64\x61\164\x61\x4e\141\155\x65"]))) { vt_loge(__METHOD__ . "\x3a" . "\x64\x61\164\x61\116\141\155\145\40\151\x73\40\x6e\x6f\x74\40\x73\145\164\x20\157\x72\40\x65\155\160\164\x79\56"); return; } $createdDate = date_create($parameters["\x63\x72\145\141\164\x65\144\x44\x61\164\145"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\72" . "\x63\x72\145\x61\x74\x65\144\x44\x61\x74\x65\x20\x69\163\x20\151\x6e\x76\141\154\x69\144\40\144\141\164\x65\40\x66\157\162\155\141\x74\56"); return; } $sVTOSTOData = new SVTOSTOData(); $sVTOSTOData->chartNo = $parameters["\x63\x68\x61\x72\164\x4e\x6f"]; $sVTOSTOData->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); if (isset($parameters["\163\x65\x71\x4e\x6f"])) { $sVTOSTOData->seqNo = intval($parameters["\x73\145\161\116\x6f"]); } else { $sVTOSTOData->seqNo = 1; } $sVTOSTOData->newName = trim($parameters["\144\x61\x74\141\x4e\141\x6d\145"]); return $sVTOSTOData; } public static function constructWithPutParameter($parameters) { if (!isset($parameters["\x63\x68\141\x72\x74\x4e\x6f"]) || empty(trim($parameters["\x63\150\x61\x72\x74\116\x6f"]))) { vt_loge(__METHOD__ . "\72" . "\143\150\141\162\x74\x4e\157\40\x69\163\x20\156\x6f\x74\40\163\145\164\x20\157\162\x20\145\155\x70\x74\171\56"); return; } if (!isset($parameters["\143\x72\145\141\164\145\x64\x44\x61\164\145"]) || empty(trim($parameters["\x63\162\x65\x61\164\x65\144\x44\x61\164\x65"]))) { vt_loge(__METHOD__ . "\72" . "\143\162\x65\x61\164\145\x64\104\141\x74\x65\x20\151\163\40\x6e\x6f\164\x20\163\x65\x74\x20\x6f\162\40\145\155\160\164\x79\x2e"); return; } if (!isset($parameters["\x6f\154\144\116\141\155\x65"]) || empty(trim($parameters["\x6f\x6c\x64\x4e\x61\155\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\157\x6c\x64\116\x61\155\145\x20\x69\x73\x20\156\157\x74\x20\163\x65\x74\x20\x6f\162\40\x65\x6d\160\164\171\x2e"); return; } if (!isset($parameters["\156\x65\x77\x4e\x61\x6d\x65"]) || empty(trim($parameters["\x6e\145\167\116\141\x6d\145"]))) { vt_loge(__METHOD__ . "\x3a" . "\156\145\x77\116\x61\155\145\40\151\x73\x20\x6e\157\x74\40\x73\145\x74\x20\x6f\x72\x20\x65\x6d\x70\x74\171\x2e"); return; } $createdDate = date_create($parameters["\143\x72\x65\x61\164\145\x64\104\141\x74\145"]); if ($createdDate === FALSE) { vt_loge(__METHOD__ . "\72" . "\x63\162\145\x61\164\x65\144\x44\x61\x74\145\40\x69\x73\40\x69\156\x76\x61\x6c\x69\x64\40\144\141\164\145\x20\x66\x6f\x72\x6d\x61\164\56"); return; } $sVTOSTOData = new SVTOSTOData(); $sVTOSTOData->chartNo = $parameters["\x63\150\x61\162\164\116\x6f"]; $sVTOSTOData->createdDate = $createdDate->format(DATAFORMAT[DATEFORMAT_DATABASE]); if (isset($parameters["\x73\x65\161\x4e\x6f"])) { $sVTOSTOData->seqNo = intval($parameters["\x73\x65\x71\x4e\x6f"]); } else { $sVTOSTOData->seqNo = 1; } $sVTOSTOData->oldName = trim($parameters["\x6f\154\x64\116\x61\x6d\145"]); $sVTOSTOData->newName = trim($parameters["\x6e\x65\x77\116\x61\x6d\x65"]); return $sVTOSTOData; } } class SRecordsetModality extends Struct { var $name; var $label; public function __construct($var) { $this->name = $var["\157\x74\150\137\151\x6d\x67\x5f\155\x6f\x64\141\154\x69\x74\171\137\156\141\x6d\145"]; $this->label = $var["\157\164\x68\137\151\155\147\x5f\x6d\157\144\141\154\151\x74\x79\x5f\154\x61\142\x65\154"]; } } class SVTOSTOSimulationStep extends Struct { var $name; var $createdDateTime; var $updatedDateTime; public function __construct($var) { $this->name = $var["\x6f\x74\150\x5f\x76\164\x6f\163\164\157\x5f\x64\x61\x74\141\137\156\141\x6d\x65"]; $this->createdDateTime = currentDateFormat(DATEFORMAT_ISO8601, $var["\x6f\164\x68\137\166\164\157\x73\x74\x6f\x5f\144\141\x74\141\137\143\162\x65\x61\x74\x65\x64\137\x64\x61\x74\x65\x74\x69\x6d\145"]); $this->updatedDateTime = currentDateFormat(DATEFORMAT_ISO8601, $var["\157\x74\x68\x5f\166\x74\x6f\163\164\x6f\x5f\144\141\x74\x61\x5f\165\x70\144\x61\x74\x65\144\137\144\x61\x74\145\164\151\x6d\145"]); } } class SSettingsValues extends Struct { var $section; var $key; var $value; var $comment; var $created; var $updated; public static function createFromDBRecord($var) { $sSettingsValues = new SSettingsValues(); $sSettingsValues->section = $var["\163\164\137\163\x65\x63\x74\151\x6f\156"]; $sSettingsValues->key = $var["\163\x74\x5f\x6b\145\171"]; $sSettingsValues->value = $var["\163\164\x5f\x76\141\x6c\165\x65"]; $sSettingsValues->comment = $var["\x73\164\137\143\x6f\x6d\x6d\145\x6e\164"]; $sSettingsValues->created = $var["\x73\164\137\143\x72\x65\141\x74\x65\x64"]; $sSettingsValues->updated = isset($var["\x73\164\137\x75\x70\x64\141\x74\145\144"]) ? $var["\x73\164\x5f\165\160\144\x61\x74\x65\144"] : ''; return $sSettingsValues; } } class SEvents extends Struct { var $id; var $userName; var $appName; var $eventType; var $message; var $created; public static function constructWithPostParameter($var) { $sEvents = new SEvents(); $sEvents->id = $var["\141\x75\144\137\x69\x64"]; $sEvents->userName = $var["\x61\165\144\137\x75\x73\145\162\x5f\156\141\155\145"]; $sEvents->appName = $var["\141\x75\x64\137\x61\x70\160\137\x6e\x61\155\x65"]; $sEvents->eventType = isset($var["\x61\x75\144\x5f\145\x76\x65\156\x74\x5f\x74\171\x70\145"]) ? $var["\141\x75\144\x5f\145\166\x65\156\164\x5f\164\171\x70\145"] : ''; $sEvents->message = isset($var["\141\165\144\137\x6d\x65\163\x73\141\147\x65"]) ? $var["\141\x75\x64\137\155\x65\163\163\x61\147\x65"] : ''; $sEvents->created = isset($var["\141\165\x64\x5f\x63\x72\145\x61\164\145\144"]) ? currentDateFormat(DATEFORMAT_ISO8601, $var["\x61\x75\144\x5f\143\x72\x65\141\164\x65\144"]) : ''; return $sEvents; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/UserDateTimeFilter.php b/server/original/www/ezwebserver/src/application/libraries/UserDateTimeFilter.php index a145080..5b5c313 100644 --- a/server/original/www/ezwebserver/src/application/libraries/UserDateTimeFilter.php +++ b/server/original/www/ezwebserver/src/application/libraries/UserDateTimeFilter.php @@ -1,7 +1,7 @@ acqTime = $acqTime; } function filter(&$acquisitionTimestamp) { if (isset($this->acqTime) && $this->acqTime != '') { $newDatetime = new Datetime($this->acqTime); $acquisitionTimestamp = $newDatetime->getTimestamp(); } else { $acquisitionTimestamp = null; return false; } return true; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/VTCryptoWrapper.php b/server/original/www/ezwebserver/src/application/libraries/VTCryptoWrapper.php index eb934de..aee0dd3 100644 --- a/server/original/www/ezwebserver/src/application/libraries/VTCryptoWrapper.php +++ b/server/original/www/ezwebserver/src/application/libraries/VTCryptoWrapper.php @@ -1,7 +1,7 @@ text_file_to_lines($file_name); foreach ($lines as $line) { if (strpos($line, "\x3b") >= 0) { $trimmed_line = substr($line, strpos($line, "\73")); } else { $trimmed_line = $line; } if (strlen(trim($trimmed_line)) === 0) { $current_section["\x5d" . $num_unhandled] = $line; $sections[$current_section_name] = $current_section; $num_unhandled = $num_unhandled + 1; continue; } if (strpos($trimmed_line, "\x5b") === 0) { $current_section_name = substr($trimmed_line, strpos($trimmed_line, "\x5b") + 1, strpos($trimmed_line, "\135") - 1); if (array_key_exists($current_section_name, $sections)) { vt_logw(__METHOD__ . "\x3a" . "\144\165\x70\x6c\151\x63\141\x74\145\x64\40\163\x65\x63\x74\x69\x6f\156\x3a\40" . $current_section_name); } else { $sections[$current_section_name] = array(); } $current_section = $sections[$current_section_name]; } else { $handled = false; if ($current_section !== NULL) { $key = trim(substr($trimmed_line, 0, strpos($trimmed_line, "\75"))); $value = trim(substr($trimmed_line, strpos($trimmed_line, "\x3d") + 1)); if (strlen($key) > 0) { $current_section[$key] = $value; $sections[$current_section_name] = $current_section; $handled = true; } else { } } else { } if (!$handled) { $current_section["\135" . $num_unhandled] = $line; $sections[$current_section_name] = $current_section; $num_unhandled = $num_unhandled + 1; } } } $this->_sections = $sections; return $this->_sections; } public function save($file_name) { $lines = array(); foreach ($this->_sections as $section_name => $section) { if (strpos($section_name, "\135") === 0) { foreach ($section as $key => $value) { array_push($lines, $value); } } else { array_push($lines, "\133" . $section_name . "\135"); foreach ($section as $key => $value) { if (strpos($key, "\135") === 0) { array_push($lines, $value); } else { array_push($lines, $key . "\x3d" . $value); } } } } file_put_contents($file_name, implode("\15\xa", $lines)); } public function get($section, $key, $default_value = null) { $value = $default_value; if (array_key_exists($section, $this->_sections)) { $found_section = $this->_sections[$section]; if (array_key_exists($key, $found_section)) { $value = $found_section[$key]; } else { vt_logw(__METHOD__ . "\x3a" . "\156\x6f\x20\x6b\145\x79\40\x66\x6f\165\x6e\x64\x3a" . $key); } } else { vt_logw(__METHOD__ . "\x3a" . "\156\157\x20\163\145\x63\164\151\x6f\x6e\40\x66\157\x75\x6e\x64\72" . $section); } return $value; } public function set($section, $key, $value) { $sections = $this->_sections; if (array_key_exists($section, $sections)) { $found_section = $sections[$section]; $found_section[$key] = $value; $sections[$section] = $found_section; } else { $sections[$section] = array($key => $value); } $this->_sections = $sections; } } class VTIniFileFactory implements IIniFileFactory { public function create() { return new VTIniFile(); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/VTNginxPortConfFile.php b/server/original/www/ezwebserver/src/application/libraries/VTNginxPortConfFile.php index a758c23..f9dfdf4 100644 --- a/server/original/www/ezwebserver/src/application/libraries/VTNginxPortConfFile.php +++ b/server/original/www/ezwebserver/src/application/libraries/VTNginxPortConfFile.php @@ -1,7 +1,7 @@ _port; } public function set_port($port) { $this->_port = $port; } public function load($file_name) { $ret = TRUE; try { $conf_file = fopen($file_name, "\162"); if ($conf_file === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\106\x61\151\154\x65\144\x20\x74\157\40\157\x70\145\156\x20\145\x7a\x77\x65\142\163\145\x72\x76\x65\x72\40\160\x6f\162\164\x20\143\157\x6e\x66\x20\x66\x69\x6c\x65\x2e\40\146\x69\154\145\x20\x6e\x61\155\x65\x3d\133" . $file_name . "\x5d"); return FALSE; } $line = fread($conf_file, filesize($file_name)); if ($line !== FALSE) { preg_match("\x2f\x6c\151\163\164\x65\x6e\133\x20\135\53\x28\x5b\60\55\71\135\x2a\51\x3b\57", $line, $matches); if (count($matches) > 1) { $this->_port = (int) $matches[1]; } else { vt_loge(__METHOD__ . "\x3a" . "\116\157\40\x70\x6f\162\x74\40\144\x65\146\151\156\145\144\x2e"); $ret = FALSE; } } else { vt_loge(__METHOD__ . "\x3a" . "\106\141\151\x6c\x65\144\x20\164\x6f\x20\162\x65\x61\144\x20\145\172\167\145\x62\x73\x65\x72\x76\145\162\40\x70\x6f\162\x74\x20\x63\x6f\156\146\40\x66\x69\x6c\145\56"); $ret = FALSE; } } finally { if ($conf_file !== false) { fclose($conf_file); } } return $ret; } public function save($file_name) { $ret = TRUE; try { $conf_file = fopen($file_name, "\x77"); if ($conf_file === FALSE) { vt_loge(__METHOD__ . "\x3a" . "\x46\x61\x69\154\x65\144\40\164\157\40\x6f\x70\145\x6e\40\x65\x7a\x77\x65\x62\x73\x65\x72\166\145\162\x20\160\157\162\164\40\143\x6f\x6e\146\x20\146\151\154\x65\x2e"); return FALSE; } if (fwrite($conf_file, "\154\x69\x73\x74\x65\x6e\x20" . $this->_port . "\x3b") === FALSE) { vt_loge(__METHOD__ . "\72" . "\x46\x61\x69\154\x65\144\x20\164\157\x20\x77\162\x69\164\145\40\x65\172\x77\x65\142\163\x65\162\x76\145\x72\x20\x70\x6f\x72\164\40\143\157\156\x66\40\146\151\154\145\56"); $ret = FALSE; } } finally { fclose($conf_file); } return $ret; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/VTPhpseclibCryptoWrapper.php b/server/original/www/ezwebserver/src/application/libraries/VTPhpseclibCryptoWrapper.php index c3d39e6..3774c53 100644 --- a/server/original/www/ezwebserver/src/application/libraries/VTPhpseclibCryptoWrapper.php +++ b/server/original/www/ezwebserver/src/application/libraries/VTPhpseclibCryptoWrapper.php @@ -1,7 +1,7 @@ cipherMode == CipherMode::CBC) { if ($properties->keySize == ChunkSize::e128bits) { return new \phpseclib\Crypt\AES(); } else { if ($properties->keySize == ChunkSize::e256bits) { return new \phpseclib\Crypt\Rijndael(); } else { vt_loge("\x55\156\x73\x75\x70\160\x6f\x72\164\145\x64\40\143\x69\160\150\x65\x72\x20\155\157\x64\x65\72\x20" . $properties->cipherMode); throw new \InvalidArgumentException("\x55\156\163\165\x70\x70\157\x72\x74\145\x64\x20\143\151\x70\150\x65\162\x20\x6d\157\144\145\72\x20" . $properties->cipherMode); } } } else { vt_loge("\125\156\163\x75\160\160\157\162\164\145\144\x20\x63\151\x70\x68\x65\x72\x20\x6d\157\x64\145\x3a\40" . $properties->cipherMode); throw new \InvalidArgumentException("\x55\x6e\x73\165\x70\160\x6f\x72\x74\x65\x64\x20\143\x69\160\x68\x65\x72\40\155\157\x64\x65\72\x20" . $properties->cipherMode); } } public function decrypt($cipher, &$plain) { try { $cipher_mode = $this->getCipherMode($this->properties); $cipher_mode->setBlockLength($this->properties->blockSize); $cipher_mode->setKey($this->key); $cipher_mode->setIV($this->iv); $cipher_mode->disablePadding(); $plain = $cipher_mode->decrypt($cipher); $unpadded = CryptoUtils::unpad($plain, $this->properties->paddingMode, $this->properties->blockSize); $plain = $unpadded; } catch (Exception $e) { vt_loge("\x45\x72\162\157\x72\40\x69\x6e\40\x64\145\143\162\171\x70\164\72\x20" . $e); return VTCryptoError::VERR_CRYPTO_ERROR; } return VTCryptoError::VERR_CRYPTO_SUCCESS; } public function encrypt($plain, &$cipher) { $padded = CryptoUtils::pad($plain, $this->properties->paddingMode, $this->properties->blockSize); try { $cipher_mode = $this->getCipherMode($this->properties); $cipher_mode->setBlockLength($this->properties->blockSize); $cipher_mode->setKey($this->key); $cipher_mode->setIV($this->iv); $cipher_mode->disablePadding(); $cipher = $cipher_mode->encrypt($padded); } catch (Exception $e) { vt_loge("\x45\x72\162\157\162\40\x69\156\40\145\156\143\162\171\160\x74\72\40" . $e); return VTCryptoError::VERR_CRYPTO_ERROR; } return VTCryptoError::VERR_CRYPTO_SUCCESS; } public function setIV($iv) { $this->iv = $iv; } public function setKey($key) { $this->key = $key; } public function setProperties(AESProperties $properties) { $this->properties = $properties; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/VTServiceEnvironmentFile.php b/server/original/www/ezwebserver/src/application/libraries/VTServiceEnvironmentFile.php index 518cf4c..f6a3fd2 100644 --- a/server/original/www/ezwebserver/src/application/libraries/VTServiceEnvironmentFile.php +++ b/server/original/www/ezwebserver/src/application/libraries/VTServiceEnvironmentFile.php @@ -1,7 +1,7 @@ _ini_file = $_ini_file_factory->create(); } public function load($file_path) { $this->_ini_file->load($file_path); } public function save($file_path) { $this->_ini_file->save($file_path); } public function get_port() { return $this->_ini_file->get(self::SECTION_SERVER, self::KEY_PORT); } public function set_port($port) { return $this->_ini_file->set(self::SECTION_SERVER, self::KEY_PORT, $port); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/VTTextFile.php b/server/original/www/ezwebserver/src/application/libraries/VTTextFile.php index 0a90b18..0f1f2bd 100644 --- a/server/original/www/ezwebserver/src/application/libraries/VTTextFile.php +++ b/server/original/www/ezwebserver/src/application/libraries/VTTextFile.php @@ -1,7 +1,7 @@ open($zipFileName, ZipArchive::CREATE) === FALSE) { vt_loge("\132\x69\x70\123\x74\x72\x65\x61\x6d\x48\141\156\x64\154\145\162\x20\157\x70\x65\x6e\x20\x46\165\156\x63\164\x69\x6f\x6e\x2e\x20" . "\x5a\151\x70\x20\106\x69\154\x65\40\117\160\x65\x6e\40\105\x72\162\x6f\162\x2e"); return array("\145\x72\x72\157\162\x43\157\144\x65" => VERR_COMMON_IO); } else { return array("\x65\162\162\157\x72\103\x6f\144\x65" => VERR_COMMON_SUCCESS); } } function addFile(&$zip, $path, $name, $skipOnError) { $ret = $zip->addFile($path, $name); if ($ret === FALSE && $skipOnError === FALSE) { vt_loge("\132\151\160\x53\164\162\x65\x61\x6d\x48\141\156\x64\x6c\x65\162\40\101\x64\144\x46\x69\154\x65\40\106\x75\156\143\x74\151\157\x6e\56\x20" . "\106\x69\x6c\x65\40\x69\156\143\x6c\x75\x73\x69\x6f\x6e\x20\x45\162\162\x6f\162\56"); return array("\x65\162\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_IO); } else { return array("\145\162\x72\157\x72\103\157\144\145" => VERR_COMMON_SUCCESS); } } function addString(&$zip, $name, $string) { $ret = $zip->addFromString($name, $string); if ($ret === FALSE) { vt_loge("\132\151\x70\123\x74\x72\145\141\155\110\141\156\x64\154\145\x72\x20\141\144\144\123\x74\x72\x69\156\147\40\x46\165\x6e\143\164\x69\x6f\156\56\x20" . "\106\151\154\x65\40\151\x6e\143\x6c\165\163\x69\x6f\156\x20\105\162\162\x6f\162\x2e"); return array("\x65\162\162\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_IO); } else { return array("\145\x72\162\157\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS); } } function close(&$zip) { if ($zip->close() === FALSE) { vt_loge("\132\151\x70\x53\x74\162\145\x61\x6d\110\141\156\144\154\x65\x72\x20\x63\154\x6f\163\x65\x5a\x69\160\106\x69\154\145\x20\106\165\156\x63\x74\151\157\x6e\56\x20" . "\132\x69\x70\x20\x46\151\154\145\x20\x43\154\x6f\163\x65\x20\105\x72\x72\x6f\x72\56"); return array("\145\162\x72\x6f\162\x43\x6f\144\x65" => VERR_COMMON_IO); } else { return array("\145\162\162\157\162\103\157\144\145" => VERR_COMMON_SUCCESS); } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/ZipStreamHandler.php b/server/original/www/ezwebserver/src/application/libraries/ZipStreamHandler.php index 12e9793..76f8d73 100644 --- a/server/original/www/ezwebserver/src/application/libraries/ZipStreamHandler.php +++ b/server/original/www/ezwebserver/src/application/libraries/ZipStreamHandler.php @@ -1,7 +1,7 @@ fopen($zipFileName, "\167")); try { $zip = new ZipStream($zipFileName, $opt); return array("\145\162\x72\x6f\162\103\x6f\x64\x65" => VERR_COMMON_SUCCESS); } catch (\ZipStream\Exception $ex) { vt_loge("\132\x69\x70\123\164\x72\145\141\x6d\110\141\156\144\154\145\162\x20\x6f\x70\x65\156\x20\106\x75\x6e\143\x74\151\157\x6e\56\x20" . $ex); return array("\145\x72\162\157\162\103\157\x64\145" => VERR_COMMON_IO); } } function addFile(&$zip, $path, $name, $skipOnError) { try { $zip->addFileFromPath($name, $path); return array("\145\162\162\x6f\x72\x43\157\x64\145" => VERR_COMMON_SUCCESS); } catch (\ZipStream\Exception $ex) { if (!$skipOnError) { vt_loge("\x5a\x69\x70\123\x74\x72\x65\x61\155\110\x61\x6e\144\x6c\x65\162\40\x61\x64\144\106\x69\154\145\x20\106\x75\156\143\164\151\x6f\x6e\x2e\40" . $ex); return array("\145\162\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_IO); } } } function addString(&$zip, $name, $string) { try { $zip->addFile($name, $string); return array("\145\162\x72\157\162\x43\x6f\x64\x65" => VERR_COMMON_SUCCESS); } catch (\ZipStream\Exception $ex) { vt_loge("\x5a\151\160\x53\x74\x72\x65\141\x6d\110\141\156\x64\154\145\x72\40\141\x64\x64\x53\164\x72\x69\156\147\x20\106\165\x6e\x63\x74\x69\157\156\56\x20" . $ex); return array("\145\x72\x72\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_IO); } } function close(&$zip) { try { $zip->finish(); return array("\x65\x72\x72\157\162\103\x6f\144\x65" => VERR_COMMON_SUCCESS); } catch (\ZipStream\Exception $ex) { vt_loge("\x5a\x69\x70\x53\164\x72\145\141\155\x48\141\x6e\x64\154\x65\x72\x20\x63\154\157\x73\145\40\x46\x75\x6e\x63\x74\x69\x6f\x6e\x2e\40" . $ex); return array("\145\x72\162\x6f\x72\103\157\144\x65" => VERR_COMMON_IO); } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/ZipWrapper.php b/server/original/www/ezwebserver/src/application/libraries/ZipWrapper.php index 2822919..0adf210 100644 --- a/server/original/www/ezwebserver/src/application/libraries/ZipWrapper.php +++ b/server/original/www/ezwebserver/src/application/libraries/ZipWrapper.php @@ -1,7 +1,7 @@ zipHandler = new ZipStreamHandler(); } else { if ($handler == "\x61\162\x63\x68\x69\166\x65") { $this->zipHandler = new ZipArchiveHandler(); } } } function setZipFile($zipFileName) { return $this->zipHandler->open($this->zip, $zipFileName); } function addFile($path, $name, $skipOnError = FALSE) { return $this->zipHandler->addFile($this->zip, $path, $name, $skipOnError); } function addString($name, $string) { return $this->zipHandler->addString($this->zip, $name, $string); } function getZipFile() { return $this->zipHandler->close($this->zip); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/NanodicomCoreTest.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/NanodicomCoreTest.php index 5e64411..37c0816 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/NanodicomCoreTest.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/NanodicomCoreTest.php @@ -1,7 +1,7 @@ assertEquals($output, $expected); } public function provider() { $samples_dir = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "\x73\141\155\160\x6c\x65\x73" . DIRECTORY_SEPARATOR; $output_dir = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "\164\145\163\x74\163" . DIRECTORY_SEPARATOR; $files = array(); if ($handle = opendir($samples_dir)) { while (false !== ($file = readdir($handle))) { if ($file != "\56" && $file != "\56\56" && is_file($samples_dir . $file)) { $files[] = $file; } } closedir($handle); } $data = array(); foreach ($files as $file) { $filename = $samples_dir . $file; $dicom = Nanodicom::factory($filename); $data[] = array($dicom->summary(), file_get_contents($output_dir . $file . "\x2e\x73\165\155\155\x61\162\171\56\164\x78\x74")); unset($dicom); } return $data; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/example.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/example.php index c8add5b..eeb2a42 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/example.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/example.php @@ -1,7 +1,7 @@ parse()->profiler_diff("\160\x61\x72\163\x65") . "\12"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\154\x65\40\x66\x61\x69\x6c\x65\x64\56\x20" . $e->getMessage() . "\12"; } try { echo "\x32\51\40\x4c\x6f\x61\144\40\157\x6e\x6c\171\40\x67\151\166\x65\x6e\x20\164\141\147\163\x2e\x20\x49\164\40\167\x69\x6c\154\x20\163\x74\157\x70\x20\x6f\156\x63\x65\40\141\154\x6c\40\147\151\166\145\x6e\x20\164\x61\x67\163\40\x61\x72\145\x20\146\157\165\156\144\x2e\40\x46\141\163\164\145\x73\x74\41\xa"; $dicom = Nanodicom::factory($filename, "\163\151\x6d\160\154\145"); $dicom->parse(array(array(0x10, 0x10))); echo $dicom->profiler_diff("\x70\141\x72\163\x65") . "\xa"; echo "\120\141\x74\151\145\156\164\40\156\x61\x6d\145\40\x69\x66\x20\x65\x78\x69\x73\x74\x73\x3a\40" . $dicom->value(0x10, 0x10) . "\xa"; echo "\x50\x61\x74\151\x65\x6e\x74\x20\x6e\x61\155\x65\40\163\x68\x6f\x75\154\x64\x20\142\x65\x20\x65\155\x70\x74\171\x20\150\145\162\145\x3a\40" . $dicom->PatientName . "\12"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\154\145\x20\146\x61\151\154\x65\x64\56\x20" . $e->getMessage() . "\12"; } try { echo "\x33\x29\x20\114\x6f\141\144\40\x6f\x6e\x6c\171\40\147\x69\x76\x65\x6e\40\x74\141\x67\163\40\x62\171\x20\156\x61\155\145\56\40\123\164\157\x70\x73\x20\x6f\156\x63\145\x20\x61\154\154\40\164\x61\x67\x73\x20\141\x72\x65\40\146\157\165\156\144\56\40\116\x6f\x74\x20\163\157\x20\x66\x61\x73\x74\56\12"; $dicom = Nanodicom::factory($filename, "\x73\x69\x6d\x70\x6c\x65"); $dicom->parse(array("\120\x61\164\151\x65\156\x74\x4e\x61\x6d\x65")); echo $dicom->profiler_diff("\x70\x61\x72\x73\145") . "\xa"; echo "\x50\141\164\151\x65\x6e\164\40\x6e\x61\x6d\x65\40\151\146\40\145\170\x69\163\x74\x73\x3a\x20" . $dicom->value(0x10, 0x10) . "\12"; echo "\x50\141\x74\x69\x65\156\x74\40\156\x61\x6d\x65\x20\151\x66\x20\145\170\151\x73\164\163\x3a\40" . $dicom->PatientName . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\x6c\145\x20\x66\x61\x69\154\145\144\56\40" . $e->getMessage() . "\xa"; } try { echo "\64\x29\x20\114\x6f\141\x64\40\157\x6e\154\x79\x20\147\x69\166\145\x6e\x20\164\141\147\163\56\x20\x44\165\x6d\160\x20\151\x74\x20\x61\x6e\x64\x20\160\x72\x69\156\x74\x20\143\145\162\164\141\x69\x6e\x20\164\x61\147\163\x2e\x20\114\157\141\x64\x20\47\144\165\x6d\x70\145\162\x27\40\x64\151\x72\x65\x63\x74\154\x79\56\xa"; $dicom = Nanodicom::factory($filename, "\144\x75\x6d\160\x65\162"); $dicom->parse(array(array(0x10, 0x10))); echo $dicom->dump(); echo $dicom->profiler_diff("\160\x61\162\163\x65") . "\12"; echo "\123\x6f\x6d\145\x74\x68\151\x6e\147\40\x73\x68\157\x75\154\x64\40\x73\x68\x6f\x77\x20\151\x66\40\145\x6c\145\x6d\145\x6e\164\x20\x65\x78\x69\x73\164\163\x2e" . $dicom->value(0x10, 0x10) . "\12"; echo "\124\150\x69\x73\40\163\x68\157\165\154\144\x20\142\x65\x20\145\x6d\160\164\171\x2c\x20\156\x6f\x20\x64\x69\x63\164\151\x6f\x6e\x61\x72\151\145\163\x20\x6c\x6f\141\x64\x65\x64\56" . $dicom->PatientName . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\x6c\145\40\x66\x61\151\x6c\x65\x64\x2e\40" . $e->getMessage() . "\12"; } try { echo "\x35\x29\x20\114\x6f\x61\x64\x20\163\151\155\160\x6c\145\40\141\156\144\40\160\x72\151\156\x74\40\x63\x65\162\x74\x61\x69\x6e\x20\166\x61\154\x75\x65\12"; $dicom = Nanodicom::factory($filename); $dicom->parse(); echo $dicom->profiler_diff("\160\141\x72\x73\x65") . "\xa"; echo "\x50\x61\164\x69\x65\156\164\40\x4e\141\155\x65\x3a\40" . $dicom->value(0x10, 0x10) . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\x69\154\145\40\x66\x61\x69\x6c\x65\x64\x2e\40" . $e->getMessage() . "\xa"; } try { echo "\66\x29\x20\x4c\157\141\144\x20\x73\x69\x6d\160\x6c\x65\40\x61\x6e\144\x20\x65\170\164\x65\x6e\x64\40\151\164\x20\164\x6f\x20\47\x64\165\x6d\160\145\x72\x27\xa"; $dicom = Nanodicom::factory($filename); echo $dicom->parse()->extend("\x64\165\x6d\x70\x65\162")->dump(); echo $dicom->profiler_diff("\x70\x61\x72\x73\x65") . "\x20" . $dicom->profiler_diff("\144\x75\155\x70") . "\12"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\x69\x6c\145\x20\x66\x61\x69\154\145\144\x2e\40" . $e->getMessage() . "\xa"; } try { echo "\x37\x29\40\114\x6f\x61\144\x20\x73\151\155\160\x6c\145\40\x61\156\144\40\145\x78\x74\x65\x6e\x64\40\151\x74\40\164\x6f\40\x27\x64\165\x6d\x70\x65\162\x27\56\x20\x4e\x6f\40\x6e\x65\x65\144\40\x74\x6f\40\x70\x61\x72\163\x65\54\40\x64\165\x6d\x70\50\x29\x20\x64\x6f\x65\x73\40\x69\x74\56\40\120\x61\x72\163\151\x6e\147\40\x69\163\x20\x64\x6f\156\145\x20\157\x6e\154\x79\40\157\156\x63\x65\56\xa"; $dicom = Nanodicom::factory($filename); echo $dicom->extend("\x64\x75\155\x70\x65\162")->dump(); echo $dicom->profiler_diff("\x70\x61\162\x73\x65") . "\x20" . $dicom->profiler_diff("\x64\165\x6d\160") . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\154\x65\x20\146\141\x69\x6c\145\x64\56\40" . $e->getMessage() . "\xa"; } try { echo "\x38\51\40\114\x6f\x61\x64\x20\x27\144\165\x6d\160\145\x72\x27\x20\144\151\162\x65\x63\x74\x6c\171\x2e\x20\x44\x75\x6d\x70\x20\x6f\x75\164\160\165\x74\x20\151\163\x20\151\x6e\x20\x68\x74\155\154\x20\x66\157\162\155\x61\x74\x2e\xa"; $dicom = Nanodicom::factory($filename, "\144\x75\x6d\x70\x65\x72"); echo $dicom->parse()->dump("\x68\164\x6d\154"); echo $dicom->profiler_diff("\160\x61\x72\x73\145") . "\40" . $dicom->profiler_diff("\144\x75\155\x70") . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\x6c\145\40\x66\141\x69\154\145\144\x2e\x20" . $e->getMessage() . "\xa"; } try { echo "\x39\x29\x20\114\x6f\141\144\40\47\141\156\x6f\156\171\x6d\x69\172\x65\162\x27\x20\144\x69\162\x65\x63\164\x6c\x79\x2e\12"; $dicom = Nanodicom::factory($filename, "\141\x6e\157\156\171\155\151\x7a\x65\162"); file_put_contents($filename . "\56\145\170\71", $dicom->anonymize()); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\x69\154\x65\x20\146\141\151\x6c\x65\144\56\x20" . $e->getMessage() . "\12"; } try { echo "\x31\60\x29\40\105\x78\164\145\x6e\144\x20\47\x61\x6e\x6f\x6e\x79\155\151\x7a\x65\x72\x27\56\40\x4e\x6f\40\x6e\145\x65\144\40\164\x6f\x20\143\x61\154\154\x20\x70\141\162\x73\145\x28\x29\54\x20\141\x6e\x6f\156\171\155\x69\172\x65\50\x29\40\x77\151\x6c\154\x20\x64\x6f\x20\151\164\x2e\12"; $dicom = Nanodicom::factory($filename); file_put_contents($filename . "\56\145\x78\61\60", $dicom->extend("\x61\156\x6f\156\171\x6d\x69\x7a\145\x72")->anonymize()); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\x6c\x65\40\146\141\151\154\145\x64\56\40" . $e->getMessage() . "\xa"; } try { echo "\61\61\51\40\x44\157\x75\x62\x6c\145\x20\145\170\164\145\x6e\163\x69\x6f\156\40\50\x61\156\144\40\x70\x72\157\x62\141\x62\154\171\40\171\x6f\165\40\143\141\x6e\x20\147\157\40\x6f\156\40\x61\156\144\x20\157\156\x29\xa"; $dicom = Nanodicom::factory($filename); echo $dicom->extend("\x64\165\155\160\145\x72")->dump(); file_put_contents($filename . "\x2e\145\x78\61\x31", $dicom->extend("\141\156\x6f\156\x79\x6d\151\172\x65\x72")->anonymize()); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\154\x65\x20\x66\141\x69\x6c\x65\144\x2e\40" . $e->getMessage() . "\12"; } try { echo "\61\x32\51\x20\123\141\x76\x65\40\x66\x69\154\145\x20\x61\163\40\x45\170\160\x6c\x69\143\151\164\x20\x56\x52\40\x4c\151\x74\x74\x6c\x65\x20\105\x6e\144\x69\x61\x6e\12"; $dicom = Nanodicom::factory($filename); echo $dicom->parse()->profiler_diff("\x70\141\x72\163\x65") . "\xa"; $dicom->value(0x2, 0x10, Nanodicom::EXPLICIT_VR_LITTLE_ENDIAN); echo $dicom->write_file($filename . "\x2e\145\170\61\62")->profiler_diff("\167\162\151\164\x65") . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\x69\x6c\145\40\146\141\x69\x6c\145\144\56\40" . $e->getMessage() . "\12"; } try { echo "\61\63\51\x20\x50\141\x73\x73\40\146\151\154\145\x20\x63\x6f\156\x74\x65\156\x74\x73\x20\151\156\163\x74\x65\141\x64\x20\x6f\x66\x20\x66\151\x6c\145\x6e\141\x6d\x65\12"; $contents = file_get_contents($filename); $dicom = Nanodicom::factory($contents, "\144\x75\155\160\145\162", "\x62\x6c\x6f\142"); echo $dicom->dump(); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\x6c\x65\40\146\x61\x69\154\145\x64\56\x20" . $e->getMessage() . "\xa"; } try { echo "\61\64\51\x20\x43\x68\145\143\x6b\x20\x69\x66\x20\x66\151\154\x65\40\x68\141\163\40\x70\x72\145\x61\x6d\x62\154\145\x20\x61\x6e\x64\x20\104\111\x43\x4d\xa"; $dicom = Nanodicom::factory($filename); echo "\x49\163\x20\x44\111\103\117\x4d\x3f\x20" . $dicom->is_dicom() . "\xa"; unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\x6c\x65\x20\x66\x61\x69\x6c\145\x64\56\x20" . $e->getMessage() . "\12"; } try { echo "\61\x35\51\x20\101\x6e\157\x6e\171\155\151\172\x65\x20\141\x6e\x64\40\x73\x61\x76\x65\x20\x66\151\x6c\x65\x20\141\x73\40\x45\170\160\154\151\143\x69\x74\x20\x56\x52\40\114\151\x74\164\x6c\x65\40\105\x6e\144\151\x61\156\xa"; $dicom = Nanodicom::factory($filename); echo $dicom->parse()->profiler_diff("\x70\x61\162\x73\145") . "\12"; $dicom->value(0x2, 0x10, Nanodicom::EXPLICIT_VR_LITTLE_ENDIAN); file_put_contents($filename . "\x2e\x65\x78\x31\65", $dicom->extend("\x61\156\x6f\156\x79\155\x69\x7a\145\x72")->anonymize()); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\x69\154\145\x20\146\x61\151\154\145\144\x2e\40" . $e->getMessage() . "\xa"; } try { echo "\x31\66\x29\x20\120\162\157\166\x69\144\x65\40\x79\x6f\165\x72\40\157\x77\x6e\40\144\165\x6d\x70\145\x72\x20\x66\x6f\162\155\x61\x74\164\151\x6e\147\12"; $formatting = array("\144\x61\x74\141\163\x65\x74\x5f\x62\x65\147\x69\156" => '', "\x64\141\164\141\x73\x65\x74\x5f\145\156\144" => "\12", "\x69\x74\145\x6d\137\x62\145\147\x69\x6e" => "\102\x45\x47\111\x4e", "\151\x74\x65\x6d\x5f\145\156\144" => "\105\116\104", "\x73\160\141\x63\x65\162" => "\40", "\x74\145\170\164\137\142\x65\x67\151\156" => "\x54\105\130\124\x42\105\107\x49\x4e", "\x74\145\170\x74\137\145\x6e\x64" => "\x54\105\x58\124\105\x4e\104", "\x63\157\x6c\x75\155\156\163" => array("\157\x66\146" => array("\45\60\64\130", "\x20"), "\x67" => array("\x25\60\64\130", "\72"), "\x65" => array("\45\60\x34\x58", "\40"), "\x6e\141\155\145" => array("\45\55\61\x30\56\61\x30\163", "\x20"), "\166\162" => array("\x25\x32\163", "\x20"), "\x6c\x65\x6e" => array("\45\55\63\x64", "\x20"), "\x76\141\x6c" => array("\x5b\x25\x73\135", ''))); $dicom = Nanodicom::factory($filename, "\144\165\155\160\x65\162"); echo $dicom->dump($formatting); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\x6c\145\x20\x66\x61\151\x6c\145\x64\x2e\x20" . $e->getMessage() . "\12"; } try { echo "\61\x37\51\x20\x41\x6e\x6f\x6e\171\x6d\x69\172\145\x20\x6f\156\40\164\150\x65\x20\146\154\x79\40\141\156\144\x20\144\x75\x6d\160\x20\x74\150\x65\40\143\157\x6e\x74\145\156\x74\163\54\40\x64\x6f\x6e\47\x74\40\x73\x61\166\145\x20\x74\x6f\x20\x61\40\x66\x69\x6c\x65\12"; $dicom = Nanodicom::factory($filename, "\141\156\157\156\x79\x6d\151\x7a\145\x72"); $dicom1 = Nanodicom::factory($dicom->anonymize(), "\x64\165\x6d\x70\145\x72", "\x62\x6c\x6f\x62"); echo $dicom1->dump(); unset($dicom); unset($dicom1); } catch (Nanodicom_Exception $e) { echo "\106\x69\x6c\145\x20\146\x61\151\x6c\145\x64\x2e\x20" . $e->getMessage() . "\xa"; } try { echo "\61\70\x29\40\x50\141\163\x73\40\x79\x6f\165\162\x20\x6f\x77\156\40\x6c\151\163\164\x20\157\146\x20\145\x6c\145\155\145\x6e\x74\x73\40\x74\x6f\x20\141\x6e\x6f\156\x79\155\x69\172\145\x72\xa"; $tags = array(array(0x8, 0x20, "\173\144\141\x74\145\174\x59\155\144\175"), array(0x8, 0x21, "\x7b\144\141\164\145\174\x59\x6d\144\175"), array(0x8, 0x90, "\x70\150\171\x73\151\x63\x69\141\x6e\173\x72\x61\x6e\144\x6f\x6d\x7d"), array(0x10, 0x10, "\160\x61\x74\x69\x65\x6e\164\x7b\143\157\x6e\x73\x65\143\x75\164\151\166\x65\x7d"), array(0x10, 0x20, "\x69\x64\x7b\x63\157\x6e\x73\x65\143\165\x74\151\x76\x65\175"), array(0x10, 0x30, "\173\144\x61\164\145\x7c\131\155\x64\x7d")); $dicom = Nanodicom::factory($filename, "\x61\x6e\157\x6e\x79\x6d\x69\172\x65\x72"); $dicom1 = Nanodicom::factory($dicom->anonymize($tags), "\x64\x75\155\160\145\162", "\x62\x6c\x6f\x62"); echo $dicom1->dump(); unset($dicom); unset($dicom1); } catch (Nanodicom_Exception $e) { echo "\x46\x69\x6c\x65\x20\x66\x61\x69\154\145\x64\x2e\40" . $e->getMessage() . "\xa"; } try { echo "\61\71\51\x20\120\x61\163\163\x20\171\157\165\x72\40\x6f\167\x6e\40\x6c\x69\x73\x74\x20\x6f\146\40\155\x61\x70\x70\x69\156\x67\163\x20\x74\x6f\x20\141\x6e\x6f\x6e\x79\155\151\172\145\162\12"; $tags = array(array(0x8, 0x20, "\173\144\x61\x74\x65\x7c\131\x6d\x64\x7d"), array(0x8, 0x21, "\x7b\144\x61\164\x65\174\x59\155\144\175"), array(0x8, 0x90, "\160\x68\x79\x73\x69\143\151\x61\x6e\173\x72\141\x6e\144\x6f\155\175"), array(0x10, 0x10, "\160\141\164\151\x65\x6e\164\x7b\143\157\156\x73\x65\x63\x75\164\151\x76\x65\175"), array(0x10, 0x20, "\151\144\x7b\143\157\156\163\145\143\165\x74\151\x76\145\x7d"), array(0x10, 0x30, "\173\144\x61\164\145\x7c\x59\155\144\175")); $replacements = array(array(0x10, 0x10, "\x61\x6e\x6f\156\171\x6d\151\172\145\144", "\x4d\141\x70\x70\x65\x64")); $dicom = Nanodicom::factory($filename, "\x61\x6e\x6f\x6e\171\x6d\151\x7a\145\162"); $dicom1 = Nanodicom::factory($dicom->anonymize($tags, $replacements), "\144\165\155\x70\145\162", "\x62\x6c\x6f\142"); echo $dicom1->dump(); file_put_contents($filename . "\56\x65\x78\x31\x39", $dicom1->write()); unset($dicom); unset($dicom1); } catch (Nanodicom_Exception $e) { echo "\106\151\154\145\x20\x66\141\x69\x6c\x65\x64\x2e\x20" . $e->getMessage() . "\12"; } try { echo "\x32\x30\x29\40\x47\145\x74\163\40\x74\150\145\x20\x69\155\x61\x67\145\163\x20\146\162\157\155\x20\164\x68\x65\40\x64\151\143\x6f\155\40\x6f\142\152\145\143\164\40\151\x66\40\x74\150\x65\171\x20\x65\x78\x69\163\x74\x2e\40\x54\x68\x69\163\40\145\170\x61\155\160\x6c\x65\40\151\163\40\x66\157\162\40\147\x64\xa"; $dicom = Nanodicom::factory($filename, "\160\151\170\x65\x6c\145\x72"); if (!file_exists($filename . "\56\x30\x2e\152\x70\147")) { $images = $dicom->get_images(); if ($images !== FALSE) { foreach ($images as $index => $image) { $dicom->write_image($image, $dir . $file . "\56" . $index); } } else { echo "\x54\150\x65\162\145\x20\x61\x72\x65\40\156\x6f\40\x44\111\103\117\115\40\151\155\x61\x67\x65\x73\x20\157\162\x20\x74\162\x61\156\x73\146\145\x72\40\163\x79\156\164\141\170\x20\156\157\164\x20\163\x75\160\x70\x6f\162\x74\145\144\x20\171\145\x74\x2e\xa"; } $images = NULL; } else { echo "\111\x6d\x61\x67\x65\x20\x61\x6c\162\x65\141\x64\x79\40\x65\x78\151\163\x74\x73\xa"; } unset($dicom); } catch (Nanodicom_Exception $e) { echo "\x46\151\x6c\145\40\146\141\151\154\145\144\56\40" . $e->getMessage() . "\12"; } try { echo "\x32\x31\51\40\x50\x72\x69\156\x74\163\x20\163\165\x6d\155\141\162\171\40\162\x65\160\x6f\x72\164\xa"; $dicom = Nanodicom::factory($filename); echo $dicom->summary(); unset($dicom); } catch (Nanodicom_Exception $e) { echo "\106\151\154\x65\x20\146\x61\151\x6c\145\x64\x2e\x20" . $e->getMessage() . "\12"; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom.php index dc9c4d3..8e98680 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom.php @@ -1,7 +1,7 @@ array("\101\160\x70\154\x69\143\141\x74\151\157\x6e\40\x45\156\164\x69\164\x79", 16, 0), "\x41\123" => array("\101\147\145\x20\123\164\162\151\156\x67", 4, 1), "\101\124" => array("\x41\164\x74\162\x69\x62\x75\164\x65\40\124\141\x67", 4, 1), "\103\123" => array("\x43\157\144\x65\40\123\164\162\x69\156\x67", 16, 0), "\x44\x41" => array("\x44\141\164\x65", 8, 1), "\x44\x53" => array("\x44\x65\x63\x69\155\x61\x6c\40\x53\x74\x72\x69\156\x67", 16, 0), "\x44\124" => array("\104\x61\x74\145\40\x54\151\x6d\145", 26, 0), "\x46\114" => array("\106\154\157\141\164\x69\156\x67\x20\x50\157\x69\x6e\x74\40\x53\151\156\147\x6c\145", 4, 1), "\x46\x44" => array("\x46\x6c\x6f\x61\164\x69\156\147\x20\x50\x6f\x69\x6e\164\40\x44\x6f\165\x62\154\145", 8, 1), "\111\x53" => array("\111\156\x74\x65\x67\145\162\x20\123\x74\x72\151\x6e\147", 12, 0), "\x4c\117" => array("\114\157\x6e\x67\40\x53\164\x72\x69\156\147", 64, 0), "\x4c\x54" => array("\114\157\156\147\x20\x54\x65\170\164", 10240, 0), "\x4f\102" => array("\117\164\150\x65\162\40\102\171\x74\145\x20\123\164\x72\x69\x6e\147", 0, 0), "\117\106" => array("\117\x74\x68\145\162\x20\x46\154\157\141\x74\x20\123\x74\x72\x69\x6e\147", 4294967292.0, 0), "\117\130" => array("\115\151\x78\145\x64\56\40\117\x74\x68\x65\162\40\x7b\102\x79\164\145\174\127\x6f\162\144\175\40\x53\x74\x72\151\156\x67", 0, 0), "\x4f\x57" => array("\x4f\164\150\x65\x72\x20\x57\x6f\162\144\x20\123\x74\162\x69\x6e\x67", 0, 0), "\120\116" => array("\120\x65\x72\163\x6f\156\x20\x4e\141\x6d\145", 64, 0), "\123\x48" => array("\x53\x68\157\162\164\x20\x53\x74\x72\151\x6e\x67", 16, 0), "\123\114" => array("\x53\151\x67\x6e\145\x64\x20\114\157\156\x67", 4, 1), "\x53\121" => array("\x53\x65\x71\x75\145\156\x63\145\x20\157\146\x20\111\164\x65\155\x73", 0, 0), "\123\123" => array("\x53\x69\x67\x6e\x65\x64\x20\x53\150\157\162\x74", 2, 1), "\x53\124" => array("\x53\x68\x6f\162\164\x20\124\145\170\164", 1024, 0), "\x54\x4d" => array("\124\x69\155\145", 16, 0), "\125\111" => array("\x55\156\x69\x71\165\145\x20\x49\x64\145\x6e\x74\x69\146\151\145\162\40\x55\111\x44", 64, 0), "\125\x4c" => array("\x55\x6e\163\x69\x67\x6e\145\x64\40\114\x6f\x6e\x67", 4, 1), "\125\x4e" => array("\x55\156\153\x6e\157\x77\156", 0, 0), "\125\123" => array("\x55\x6e\x73\x69\147\x6e\x65\144\x20\x53\x68\x6f\162\164", 2, 1), "\x55\124" => array("\x55\156\x6c\151\155\151\x74\x65\x64\40\x54\145\170\164", 4294967294.0, 0)); public static function factory($location, $name = "\x73\151\155\160\154\145", $type = "\146\x69\x6c\x65") { $parts = explode("\137", $name); $directory = NANODICOMROOT . "\164\x6f\x6f\x6c\x73" . DIRECTORY_SEPARATOR; foreach ($parts as $part) { require_once $directory . strtolower($part) . "\x2e\x70\150\160"; $directory .= strtolower($part) . DIRECTORY_SEPARATOR; } $class = "\x44\151\143\x6f\x6d\137" . $name; return new $class($location, $name, $type); } public static function decode_transfer_syntax($transfer_syntax) { switch (trim($transfer_syntax)) { case self::IMPLICIT_VR_LITTLE_ENDIAN: $vr_mode = self::VR_MODE_IMPLICIT; $endian = self::LITTLE_ENDIAN; break; case self::EXPLICIT_VR_BIG_ENDIAN: $vr_mode = self::VR_MODE_EXPLICIT; $endian = self::BIG_ENDIAN; break; default: $vr_mode = self::VR_MODE_EXPLICIT; $endian = self::LITTLE_ENDIAN; break; } return array($vr_mode, $endian); } protected static $_read_int = "\137\x72\145\x61\x64\137\x69\x6e\164\137\63\62"; protected static $_write_int = "\137\167\162\x69\x74\145\x5f\151\156\x74\137\63\62"; protected $_force_load_dictionary = FALSE; protected $_dataset = array(); public $has_dicom_preamble = FALSE; public $profiler = array(); public $warnings = array(); public $errors = array(); public $status = self::INITIAL; protected $_is_parsed = FALSE; protected $_preamble; protected $_location; protected $_meta_group_last_byte = -1; protected $_file_length; protected $_current_pointer = 0; protected $_meta_information_group_length = NULL; protected $_vr_reading_list = array(); protected $_transfer_syntax = self::IMPLICIT_VR_LITTLE_ENDIAN; protected $_blob = ''; protected $_children; protected $_parent_vr; protected $_counted_elements = 0; protected $_found_group_8 = FALSE; protected $_check_list_function = "\137\x64\165\x6d\155\171"; protected $_check_deflate_function = "\137\143\150\145\x63\x6b\x5f\x64\145\x66\154\x61\164\145"; protected $_check_proper_endian_function = "\x5f\x63\150\x65\143\x6b\137\160\x72\x6f\160\x65\x72\137\x65\156\x64\151\x61\x6e"; protected $_oversize_retries = 0; public function __construct($location, $name, $type) { require_once NANODICOMCOREPATH . "\x65\170\143\145\x70\164\x69\157\x6e\x2e\x70\150\160"; require_once NANODICOMCOREPATH . "\x64\x69\143\164\x69\157\156\141\162\171\56\x70\150\160"; self::$_read_int = PHP_INT_SIZE > 4 ? "\x5f\162\x65\141\144\x5f\151\156\x74\x5f\x36\64" : "\x5f\x72\x65\141\144\137\151\156\164\x5f\x33\x32"; self::$_write_int = PHP_INT_SIZE > 4 ? "\137\167\162\151\x74\145\137\151\x6e\x74\137\66\64" : "\137\x77\x72\x69\164\x65\137\151\156\164\137\x33\62"; if ($type == "\146\151\x6c\x65") { $this->_location = $location; } elseif ($type == "\x62\154\x6f\x62") { $this->_location = "\x62\x6c\157\x62"; $this->_blob = $location; } $this->_children[$name] = TRUE; self::$is_cli = PHP_SAPI === "\143\154\x69"; self::$is_windows = DIRECTORY_SEPARATOR === "\x5c"; } public final function __toString() { return $this->_location; } public function __get($name) { return $this->value($name); } public function __set($name, $value) { $name = $this->_proper_name($name); if (isset(Nanodicom_Dictionary::$dict_by_name[$name])) { list($group, $element) = Nanodicom_Dictionary::$dict_by_name[$name]; $this->value($group, $element, $value); } return $this; } public function __unset($name) { $name = $this->_proper_name($name); if (isset(Nanodicom_Dictionary::$dict_by_name[$name])) { list($group, $element) = Nanodicom_Dictionary::$dict_by_name[$name]; if (isset($this->_dataset[$group][$element])) { unset($this->_dataset[$group][$element]); } $this->_update_group_length($this->_dataset, $group); } return $this; } public function __call($name, $args) { foreach ($this->_children as $child_name => $child_class) { if (method_exists($child_class, $name) and is_callable(array($child_class, $name), TRUE)) { return call_user_func_array(array($child_class, $name), $args); } } return FALSE; } public function extend($name) { if (isset($this->_children[$name])) { return $this; } $this->_children[$name] = $this->_location == "\x62\154\x6f\142" ? self::factory($this->_blob, $name, "\142\154\157\x62") : self::factory($this->_location, $name); $this->_children[$name]->_force_load_dictionary = $this->_force_load_dictionary; $this->_children[$name]->_dataset = $this->_dataset; $this->_children[$name]->has_dicom_preamble = $this->has_dicom_preamble; $this->_children[$name]->profiler = $this->profiler; $this->_children[$name]->errors = $this->errors; $this->_children[$name]->warnings = $this->warnings; $this->_children[$name]->status = $this->status; $this->_children[$name]->_check_proper_endian_function = $this->_check_proper_endian_function; $this->_children[$name]->_check_deflate_function = $this->_check_deflate_function; $this->_children[$name]->_is_parsed = $this->_is_parsed; $this->_children[$name]->_found_group_8 = $this->_found_group_8; $this->_children[$name]->_meta_group_last_byte = $this->_meta_group_last_byte; $this->_children[$name]->_current_pointer = 0; $this->_children[$name]->_meta_information_group_length = $this->_meta_information_group_length; $this->_children[$name]->_vr_reading_list = $this->_vr_reading_list; $this->_children[$name]->_transfer_syntax = $this->_transfer_syntax; $this->_children[$name]->_blob = $this->_blob; $this->_children[$name]->_parent_vr = $this->_parent_vr; $this->_children[$name]->_file_length = $this->_file_length; $this->_children[$name]->_preamble = $this->_preamble; return $this; } public function profiler_diff($name, $units = "\155\163") { $diff = 0; if (isset($this->profiler[$name]) and isset($this->profiler[$name]["\163\x74\x61\x72\164"]) and isset($this->profiler[$name]["\145\156\x64"])) { $diff = $this->profiler[$name]["\x65\x6e\x64"] - $this->profiler[$name]["\163\164\x61\162\x74"]; } else { foreach ($this->_children as $child_name => $child_class) { if (method_exists($child_class, $name) and is_callable(array($child_class, $name), TRUE)) { $diff = $this->_children[$child_name]->profiler[$name]["\145\156\144"] - $this->_children[$child_name]->profiler[$name]["\163\164\141\162\164"]; } } } switch ($units) { case "\x6d\163": return $diff * 1000; break; default: return $diff; break; } } public function last_error() { return !end($this->errors) ? end($this->errors) : FALSE; } public function is_dicom($allow_partial = FALSE) { $this->parse(); if ($allow_partial) { return in_array($this->status, array(self::SUCCESS, self::PARTIAL)); } return self::SUCCESS == $this->status; } public function get_transfer_syntax() { $this->parse(); return trim($this->_transfer_syntax); } public function flush() { $this->_force_load_dictionary = FALSE; $this->_dataset = array(); $this->has_dicom_preamble = FALSE; $this->profiler = array(); $this->errors = array(); $this->warnings = array(); $this->status = self::INITIAL; $this->_is_parsed = FALSE; $this->_meta_group_last_byte = -1; $this->_current_pointer = 0; $this->_meta_information_group_length = NULL; $this->_vr_reading_list = array(); $this->_transfer_syntax = self::EXPLICIT_VR_LITTLE_ENDIAN; $this->_blob = ''; $this->_parent_vr = ''; $this->_file_length = 0; $this->_check_proper_endian_function = "\137\x63\x68\145\x63\x6b\137\x70\x72\157\x70\145\x72\137\145\156\x64\151\x61\x6e"; return $this; } public function value($group = NULL, $element = NULL, $new_value = NULL, $binary = FALSE) { return $this->dataset_value($this->_dataset, $group, $element, $new_value, $binary); } public function delete($group, $element) { $group = is_string($group) ? hexdec($group) : $group; $element = is_string($element) ? hexdec($element) : $element; if (isset($this->_dataset[$group][$element])) { unset($this->_dataset[$group][$element]); } $this->_update_group_length($this->_dataset, $group); return $this; } public static function array_get($array, $index, $default = '') { if (isset($array[$index])) { return $array[$index]; } return $default; } public function summary($output = "\163\x74\x72\151\156\x67") { $this->parse(); $transfer_syntax = trim($this->get(0x2, 0x10, "\125\116")); $transfer_syntax .= ($transfer_syntax == "\x55\x4e" or !array_key_exists($transfer_syntax, Nanodicom_Dictionary::$transfer_syntaxes)) ? "\x20\x2d\40\x55\156\x6b\x6e\157\167" : "\x20\x2d\x20\120\x61\x72\x73\x65\144\x20\165\x73\151\156\x67\72\40" . Nanodicom_Dictionary::$transfer_syntaxes[$transfer_syntax][0]; if ($transfer_syntax == "\x55\x4e\x20\55\40\125\x6e\x6b\156\x6f\167") { $transfer_syntax .= "\x20\133\120\141\x72\x73\x65\x64\40\x55\x73\x69\x6e\x67\x3a\40" . $this->_transfer_syntax . "\x20\x2d\x20" . Nanodicom_Dictionary::$transfer_syntaxes[$this->_transfer_syntax][0] . "\x5d"; } $has_images = $this->get(0x28, 0x10, "\x4e\57\x41") != "\x4e\x2f\101" ? "\131\x45\123" : "\x4e\x4f"; $statuses = array("\116\x6f\164\x20\160\x61\162\x73\145\144\x20\171\x65\x74", "\x50\141\162\x74\x69\x61\154\x6c\171\x20\160\141\x72\x73\145\144\56\x20\123\x6f\155\145\40\x74\141\x67\x73\x20\167\x65\162\145\40\x66\x6f\x75\156\144", "\123\165\143\143\145\x73\x73\146\x75\154\154\171\x20\x70\x61\162\x73\145\144\x21", "\106\141\151\154\x65\144"); $values = array("\106\x69\154\x65\156\x61\x6d\x65\72\40\40\40\40\40\40\40\x20\x20\x20" => basename($this->_location), "\124\162\141\x6e\163\146\x65\162\40\123\171\x6e\164\x61\170\72\40\x20\x20" => $transfer_syntax, "\104\x49\x43\x4f\x4d\x20\x66\151\154\145\x3f\40\40\x20\x20\x20\40\40\x20" => $statuses[$this->status], "\x48\x61\x73\40\104\x43\115\x20\x70\162\x65\141\155\142\x6c\x65\77\40\x20" => $this->has_dicom_preamble === TRUE ? "\x59\105\x53" : "\x4e\x4f", "\x48\141\163\40\115\x65\x74\x61\144\141\x74\141\77\40\40\x20\x20\x20\40" => $this->get(0x2, 0x0, FALSE) ? "\x59\105\123" : "\116\x4f", "\115\x6f\x64\x61\x6c\x69\164\171\x3a\x20\x20\x20\x20\40\40\x20\x20\40\40" => $this->get(0x8, 0x60, "\125\116"), "\120\x61\x74\151\x65\156\x74\x20\x4e\x61\x6d\145\x3a\40\x20\x20\40\x20\40" => $this->get(0x10, 0x10, "\116\57\101"), "\x49\155\x61\x67\145\163\x3f\x20\40\40\x20\40\x20\x20\x20\x20\40\x20\x20" => $has_images); $pixel_representation = array("\60" => "\x55\156\x73\x69\147\156\x65\x64\x20\x49\x6e\164\145\x67\145\162\x2e\x20\x4f\x6e\154\x79\x20\x70\157\163\151\164\151\x76\x65\40\166\x61\154\x75\145\163\x20\x61\x6c\x6c\157\167\145\x64\56", "\x31" => "\x32\x27\x73\x20\143\x6f\x6d\x70\154\145\155\x65\156\x74\x2e\x20\116\x65\x67\141\x74\151\166\x65\x20\x61\156\144\x20\160\157\163\151\164\x69\x76\145\40\141\x6c\x6c\x6f\x77\x65\144\56", "\116\x2f\x41" => "\x4e\157\164\40\x61\x76\x61\151\154\141\142\154\x65"); $planar_configuration = array("\60" => "\x43\x6f\154\x6f\x72\55\x62\x79\55\160\x69\170\145\x6c\72\40\122\107\102\x2c\x20\x52\x47\102\x2c\40\x52\107\x42\56\56", "\x31" => "\103\x6f\x6c\x6f\162\55\142\171\x2d\x70\x6c\x61\x6e\x65\x3a\x20\x52\x52\122\56\56\x2e\54\x20\x47\107\x47\56\x2e\x2e\x2c\x20\102\x42\x42\x2e\x2e\56", "\116\x2f\x41" => "\x4e\x6f\164\40\x61\x76\x61\x69\154\141\142\x6c\145"); if ($has_images == "\131\105\x53") { $values = $values + array("\x52\x6f\167\x73\72\40\40\x20\x20\40\40\x20\40\x20\40\x20\x20\x20\x20" => $this->get(0x28, 0x10, "\x4e\x2f\x41"), "\103\x6f\154\x73\72\40\x20\40\x20\x20\40\40\40\x20\40\40\40\40\x20" => $this->get(0x28, 0x11, "\x4e\57\x41"), "\x53\141\x6d\x70\x6c\x65\163\40\160\145\x72\40\x70\x69\x78\145\154\x3a\40" => $this->get(0x28, 0x2, "\116\x2f\x41"), "\102\151\x74\x73\x20\x41\x6c\154\x6f\x63\141\164\145\x64\72\x20\40\x20\x20" => $this->get(0x28, 0x100, "\x4e\x2f\101"), "\x42\x69\164\163\x20\123\164\x6f\162\x65\x64\72\40\x20\x20\40\40\x20\40" => $this->get(0x28, 0x101, "\x4e\57\101"), "\110\x69\x67\150\40\142\151\164\x3a\x20\x20\x20\x20\40\40\40\40\x20\40" => $this->get(0x28, 0x102, "\x4e\x2f\x41"), "\104\157\163\x65\40\x73\143\141\x6c\151\x6e\147\x3a\40\x20\40\40\x20\x20" => $this->get(0x3004, 0xe, "\x4e\57\101"), "\127\151\x6e\x64\157\167\40\x57\x69\144\x74\150\72\x20\x20\40\x20\40\40" => $this->get(0x28, 0x1051, "\116\57\101"), "\x57\x69\x6e\144\157\167\40\103\145\x6e\x74\x65\162\x3a\40\x20\x20\40\40" => $this->get(0x28, 0x1050, "\x4e\x2f\x41"), "\122\145\x73\x63\x61\x6c\145\40\x69\156\164\145\x72\x63\145\160\164\x3a\x20" => $this->get(0x28, 0x1052, "\116\57\x41"), "\122\145\x73\x63\141\x6c\x65\x20\x73\154\x6f\x70\145\72\40\x20\40\40\40" => $this->get(0x28, 0x1053, "\x4e\57\101"), "\x4e\x75\x6d\142\145\162\40\157\146\40\106\x72\141\155\x65\163\x3a\x20\x20" => $this->get(0x28, 0x8, "\116\x2f\x41"), "\120\x68\157\164\157\x6d\x65\x74\162\151\x63\40\x49\156\164\x65\162\x3a\40" => $this->get(0x28, 0x4, "\116\57\101"), "\120\170\40\122\x65\160\x72\x65\163\145\x6e\x74\141\164\x69\157\156\72\40" => $this->get(0x28, 0x103, "\x4e\x2f\101") . "\x20\55\x20" . Nanodicom::array_get($pixel_representation, $this->get(0x28, 0x103, "\x4e\57\101"), "\127\162\157\156\147"), "\x50\154\x61\156\141\x72\40\x43\157\x6e\146\151\x67\72\40\x20\40\x20\x20" => $this->get(0x28, 0x6, "\x4e\57\x41") . "\40\x2d\40" . Nanodicom::array_get($planar_configuration, $this->get(0x28, 0x6, "\x4e\x2f\x41"), "\127\x72\x6f\156\x67")); } if ($output == "\163\x74\x72\x69\x6e\x67") { $output = ''; foreach ($values as $index => $value) { $output .= $index . "\x9" . $value . "\xa"; } $values = $output; } return $values; } public function get($group = NULL, $element = NULL, $default = NULL, $dataset = NULL) { $dataset = $dataset !== NULL ? $dataset : $this->_dataset; $value = $this->dataset_value($dataset, $group, $element); return ($value === FALSE or is_array($value) and empty($value) or is_string($value) and trim($value) == '' or $value === NULL) ? $default : $value; } public function read_sequence_items(&$dataset) { $group = 0xfffe; $element = 0xe000; if (isset($dataset[$group][$element])) { $total = count($dataset[$group][$element]); $results = array(); for ($i = 0; $i < $total; $i++) { if (!isset($dataset[$group][$element][$i]["\144\x6f\156\x65"])) { $this->_read_value_from_blob($dataset[$group][$element][$i], $group, $element); } $results[] = $dataset[$group][$element][$i]["\144\163"]; } return $results; } unset($group, $element); return FALSE; } public function dataset_value(&$dataset, $group = NULL, $element = NULL, $new_value = NULL, $binary = FALSE) { if ($group == NULL) { return FALSE; } if (is_string($group)) { $name = $this->_proper_name($group); $create = $new_value; $new_value = $element; if (isset(Nanodicom_Dictionary::$dict_by_name[$name])) { list($group, $element) = Nanodicom_Dictionary::$dict_by_name[$name]; } else { return FALSE; } } if ($new_value === NULL) { if (isset($dataset[$group][$element])) { if (!isset($dataset[$group][$element][0]["\144\157\156\x65"])) { $this->_read_value_from_blob($dataset[$group][$element][0], $group, $element); } return count($dataset[$group][$element][0]["\x64\163"]) == 0 ? $dataset[$group][$element][0]["\166\141\154"] : $dataset[$group][$element][0]["\144\163"]; } return FALSE; } $original_vr = ''; if (isset($dataset[$group][$element])) { if (!isset($dataset[$group][$element][0]["\144\157\x6e\x65"])) { $this->_read_value_from_blob($dataset[$group][$element][0], $group, $element); } $original_vr = $dataset[$group][$element][0]["\x5f\x76\x72"]; } Nanodicom_Dictionary::load_dictionary($group, TRUE); list($value_representation, $multiplicity, $name) = $this->_decode_vr($group, $element, $original_vr, 0); if (is_array($new_value)) { $value_representation = $new_value["\166\162"]; $new_value = $new_value["\x76\x61\x6c\165\x65"]; } if (self::$vr_array[$value_representation][2] == 0) { $new_value = strlen($new_value) % 2 == 0 ? $new_value : $new_value . chr(0); $length = sprintf("\x25\165", strlen($new_value)); } else { $length = self::$vr_array[$value_representation][1]; } if ($group == self::METADATA_GROUP and $element == 0x10) { $this->_transfer_syntax = trim($new_value); } if (isset($dataset[$group][$element])) { $dataset[$group][$element][0]["\144\157\156\145"] = TRUE; $dataset[$group][$element][0]["\166\141\154"] = $new_value; $dataset[$group][$element][0]["\154\145\x6e"] = $length; $dataset[$group][$element][0]["\166\x72"] = $value_representation; } else { $value = array("\154\145\x6e" => $length, "\x76\141\x6c" => $new_value, "\166\x72" => $value_representation, "\x5f\x76\162" => $value_representation, "\x62\151\156" => $binary, "\x6f\146\146" => 0, "\144\x73" => array(), "\x64\x6f\156\145" => TRUE); $dataset[(int) $group][(int) $element][0] = $value; } $this->_update_group_length($dataset, $group); unset($group, $element, $new_value); } public function parse($vr_reading_list = FALSE, $check_dicom_preamble = FALSE) { if ($this->_is_parsed) { return $this; } if (is_array($vr_reading_list)) { $this->set_vr_reading_list($vr_reading_list); $this->_check_list_function = count($vr_reading_list) == 0 ? "\137\144\x75\155\x6d\x79" : "\x5f\x63\x68\x65\x63\153\x5f\154\151\x73\x74"; } elseif (is_bool($vr_reading_list)) { $this->load_dictionaries($vr_reading_list); } return $this->_parse($check_dicom_preamble); } public function write_file($filename) { file_put_contents($filename, $this->write()); return $this; } public function load_dictionaries($value = FALSE) { $this->_force_load_dictionary = $value; return $this; } public function write() { if (sprintf("\45\165", strlen($this->_blob)) > 0) { $this->parse(); } $this->profiler["\x77\162\x69\x74\x65"]["\163\x74\141\x72\x74"] = microtime(TRUE); if ($this->has_dicom_preamble) { $buffer = $this->_preamble; } else { $buffer = ''; for ($i = 0; $i < 128; $i++) { $buffer .= 0x0; } } $buffer .= "\104\x49\103\x4d"; ksort($this->_dataset); foreach ($this->_dataset as $group => $elements) { ksort($elements); foreach ($elements as $element => $indexes) { foreach ($indexes as $data) { $buffer .= $this->_write($group, $element, $data); } unset($element, $data); } unset($group, $elements); } switch (trim($this->_transfer_syntax)) { case self::DEFLATE_TRANSFER_SYNTAX: $metadata_length = isset($this->_dataset[self::METADATA_GROUP][self::GROUP_LENGTH]) ? $this->_dataset[self::METADATA_GROUP][self::GROUP_LENGTH][0]["\x6f\x66\146"] + $this->_dataset[self::METADATA_GROUP][self::GROUP_LENGTH][0]["\166\x61\154"] + 12 : 0; $buffer = substr($buffer, 0, $metadata_length) . gzdeflate(substr($buffer, $metadata_length)); break; } $this->profiler["\167\162\151\164\x65"]["\145\x6e\x64"] = microtime(TRUE); return $buffer; } public function set_vr_reading_list($vr_reading_list) { $list = array(); foreach ($vr_reading_list as $tag) { if (is_array($tag)) { $list[] = sprintf("\x30\x78\45\60\x34\x58", $tag[0]) . "\x2e" . sprintf("\x30\x78\45\x30\64\x58", $tag[1]); } else { $this->_force_load_dictionary = TRUE; $list[] = $tag; } } $this->_vr_reading_list = $list; return $this; } protected function _dummy($arg1 = NULL, $arg2 = NULL, $arg3 = NULL, $arg4 = NULL, $arg5 = NULL, $arg6 = NULL) { } protected function _update_group_length(&$dataset, $group) { if ($this->dataset_value($dataset, $group, self::GROUP_LENGTH) !== FALSE) { $length = 0; foreach ($dataset[$group] as $element => $group_elements) { foreach ($group_elements as $index => $values) { if ($element == self::GROUP_LENGTH) { continue; } $length += $values["\154\x65\156"] + 8; } } $dataset[$group][self::GROUP_LENGTH][0]["\166\x61\x6c"] = $length; } } protected function _proper_name($name) { return strtolower(str_replace(array("\x5f", "\40"), '', $name)); } protected function _check_list($group, $element) { if (empty($this->_vr_reading_list)) { return FALSE; } if (in_array(sprintf("\60\x78\x25\60\64\130", $group) . "\x2e" . sprintf("\x30\x78\x25\60\x34\x58", $element), $this->_vr_reading_list) or isset(Nanodicom_Dictionary::$dict[$group][$element]) and in_array(Nanodicom_Dictionary::$dict[$group][$element][2], $this->_vr_reading_list)) { $this->_counted_elements++; } return $this->_counted_elements == count($this->_vr_reading_list) ? TRUE : FALSE; } protected function _check_proper_endian($group, $endian) { if (!$this->_found_group_8) { if ($group < self::GROUP_8) { return array($group, $endian); } $this->_found_group_8 = TRUE; $this->_check_proper_endian_function = "\137\143\150\145\143\x6b\x5f\x70\x72\157\160\x65\162\x5f\x65\x6e\x64\151\x61\156\137\163\141\155\x65"; if ($group > self::GROUP_8) { $this->_rewind(-2); $this->_transfer_syntax = self::EXPLICIT_VR_LITTLE_ENDIAN; $endian = self::LITTLE_ENDIAN; $group = $this->{self::$_read_int}(2, $endian, 2); } else { } } return array($group, $endian); } protected function _check_proper_endian_same($group, $endian) { return array($group, $endian); } protected function _decode_vr($group, $element, $vr, $length) { if (isset(Nanodicom_Dictionary::$dict[$group][$element])) { list($value_representation, $multiplicity, $name) = Nanodicom_Dictionary::$dict[$group][$element]; } else { list($value_representation, $multiplicity, $name) = self::$default_dictionary; $value_representation = (!in_array($vr, array('', "\125\116")) and array_key_exists($vr, self::$vr_array)) ? $vr : ($length == self::UNDEFINED_LENGTH ? self::SEQUENCE_VR : $value_representation); } return array($value_representation, $multiplicity, $name); } protected function _parse($check_preamble_only = FALSE) { $this->profiler["\x70\141\162\x73\x65"]["\163\164\141\162\164"] = microtime(TRUE); $this->status = self::FAILURE; if ($check_preamble_only) { try { $this->_read_file(0, 132); } catch (Nanodicom_Exception $e) { $this->errors[] = $e->getMessage(); return $this; } } else { try { $this->_read_file(); } catch (Nanodicom_Exception $e) { $this->errors[] = $e->getMessage(); return $this; } } try { $this->_preamble = $this->_read(128); } catch (Nanodicom_Exception $e) { $this->errors[] = $e->getMessage(); return $this; } try { $this->has_dicom_preamble = (bool) ($this->_read(4) == "\104\x49\x43\x4d"); } catch (Nanodicom_Exception $e) { $this->errors[] = $e->getMessage(); return $this; } if ($check_preamble_only) { return $this; } if (!$this->has_dicom_preamble) { $this->_rewind(); $this->_transfer_syntax = self::IMPLICIT_VR_LITTLE_ENDIAN; } while ($this->_read()) { try { $new_element = $this->_read_element(); } catch (Nanodicom_Exception $e) { $this->errors[] = $e->getMessage(); break; } $this->_dataset[$new_element[0]][$new_element[1]][] = $new_element[2]; $this->status = self::PARTIAL; if ($new_element[0] == self::METADATA_GROUP) { if ($new_element[1] == self::GROUP_LENGTH) { $this->_meta_information_group_length = $new_element[2]["\166\x61\154"]; if (!is_int($new_element[2]["\x76\141\154"])) { $this->errors[] = strtr("\x4d\145\x74\x61\40\151\x6e\146\x6f\40\147\x72\157\x75\x70\x20\154\145\x6e\x67\x74\150\x20\x6e\157\164\x20\141\x6e\40\x69\156\x74\145\x67\x65\162\x20\x66\x6f\x75\156\x64\x20\x69\156\40\x66\151\154\x65\x20\x3a\x66\151\x6c\145", array("\72\x66\x69\x6c\145" => $this->_location)); break; } $this->_meta_group_last_byte = $this->_current_pointer + $this->_meta_information_group_length; } if ($new_element[1] == 0x10) { $this->_transfer_syntax = trim($new_element[2]["\x76\x61\154"]); if ($this->_transfer_syntax !== self::DEFLATE_TRANSFER_SYNTAX) { $this->_check_deflate_function = "\137\x64\x75\155\155\x79"; } } } Nanodicom_Dictionary::load_dictionary($new_element[0], $this->_force_load_dictionary); if ($this->{$this->_check_list_function}($new_element[0], $new_element[1])) { break; } } unset($check_dicom_only, $new_element); $this->_is_parsed = TRUE; if (count($this->errors) == 0) { $this->status = self::SUCCESS; } $this->profiler["\160\141\x72\163\x65"]["\145\x6e\x64"] = microtime(TRUE); return $this; } protected function _read_element() { $allow_undefined_length = TRUE; $is_binary = FALSE; $value = ''; $vr = ''; $items = array(); $value_representation = "\125\x4e"; $offset = $this->_tell(); list($vr_mode, $endian) = ($this->_meta_group_last_byte != -1 and $offset >= $this->_meta_group_last_byte) ? self::decode_transfer_syntax($this->_transfer_syntax) : self::decode_transfer_syntax(self::EXPLICIT_VR_LITTLE_ENDIAN); $group = $this->{self::$_read_int}(2, $endian, 2); list($group, $endian) = $this->{$this->_check_proper_endian_function}($group, $endian); $element = $this->{self::$_read_int}(2, $endian, 2); if ($group == self::ITEMS_GROUP and in_array($element, self::$items_elements)) { $vr_mode = self::VR_MODE_IMPLICIT; } if ($vr_mode == self::VR_MODE_EXPLICIT or $group == self::METADATA_GROUP) { $vr = $this->_read(2); if (!array_key_exists($vr, self::$vr_array)) { $this->_rewind(-2); $vr = ''; $vr_mode = self::VR_MODE_IMPLICIT; } else { if (in_array($vr, self::$vr_explicit_4bytes)) { $this->_forward(2); $length = $this->{self::$_read_int}(4, $endian, 4); if ($vr == "\125\124") { $allow_undefined_length = FALSE; } } else { $length = $this->{self::$_read_int}(2, $endian, 2); $allow_undefined_length = FALSE; } } } if ($vr_mode == self::VR_MODE_IMPLICIT) { $length = $this->{self::$_read_int}(4, $endian, 4); } if (!$allow_undefined_length and $length == self::UNDEFINED_LENGTH) { throw new Nanodicom_Exception("\125\x6e\145\170\x70\x65\x63\164\x65\144\40\125\156\x64\145\146\151\x6e\x65\x64\x20\114\x65\156\x67\164\x68\x20\x66\x6f\x75\156\x64\40\x61\x74\x20\133\x3a\147\x72\157\165\160\135\133\x3a\x65\154\x65\155\145\x6e\164\x5d", array("\72\x67\162\157\165\x70" => $group, "\x3a\x65\154\x65\x6d\145\156\x74" => $element), 100); } if ($length > 0 and $length % 2 != 0) { $this->warnings[] = "\x46\x6f\165\156\144\40\x6f\x64\144\40\x6c\x65\x6e\x67\164\150\x20" . $length . "\40\x72\x65\141\x64\x69\156\147\x20\107\162\x6f\x75\160\x20" . $group . "\x20\141\x6e\x64\x20\105\154\x65\x6d\x65\x6e\x74\40" . $element; } if ($length >= 0 and $group != self::METADATA_GROUP) { $_offset = $this->_tell(); $bytes_forwarded = $this->_forward($length); if ($bytes_forwarded != $length) { $this->_rewind(-1 * $length); $length = $bytes_forwarded; } unset($endian, $vr_mode); return array($group, $element, array("\x6c\x65\156" => $length, "\x76\141\x6c" => $value, "\166\162" => $value_representation, "\137\166\162" => $vr, "\x62\x69\156" => $is_binary, "\x6f\146\146" => $offset, "\x5f\x6f\x66\146" => $_offset, "\x64\163" => $items)); } list($value_representation, $multiplicity, $name) = $this->_decode_vr($group, $element, $vr, $length); list($value, $value_representation, $is_binary, $items) = $this->_read_value($vr, $value_representation, $length, $vr_mode, $endian); unset($endian, $vr_mode, $multiplicity, $name, $current_pointer, $new_element); return array($group, $element, array("\x6c\x65\156" => $length, "\166\141\x6c" => $value, "\x76\162" => $value_representation, "\137\x76\162" => $vr, "\x62\x69\156" => $is_binary, "\x6f\146\x66" => $offset, "\x64\x73" => $items, "\x64\157\156\x65" => TRUE)); } protected function _read_value_from_blob(&$elem, $group, $element) { Nanodicom_Dictionary::load_dictionary($group, TRUE); $current_pointer = $this->_tell(); $this->_rewind($elem["\x5f\157\146\x66"]); list($elem["\166\x72"], $multiplicity, $name) = $this->_decode_vr($group, $element, $elem["\x5f\166\x72"], $elem["\154\145\x6e"]); list($elem["\166\x61\x6c"], $elem["\x76\x72"], $elem["\142\x69\156"], $elem["\x64\163"]) = $this->_read_value($elem["\137\166\x72"], $elem["\x76\x72"], $elem["\x6c\145\156"], $this->_transfer_syntax); $elem["\x64\157\156\145"] = TRUE; $this->_rewind($current_pointer); } protected function _read_value($vr, $value_representation, $length, $vr_mode, $endian = NULL) { $is_binary = FALSE; $value = ''; $items = array(); if ($endian == NULL) { list($vr_mode, $endian) = self::decode_transfer_syntax($this->_transfer_syntax); } switch ($value_representation) { case "\x41\124": $value = array(); for ($i = 0; $i < $length; $i = $i + 4) { $value[] = array($this->{self::$_read_int}(2, $endian, 2), $this->{self::$_read_int}(2, $endian, 2)); } break; case "\125\x4c": $value = $this->{self::$_read_int}(4, $endian, $length); break; case "\123\114": $value = $this->{self::$_read_int}(4, $endian, $length, self::SIGNED); break; case "\130\x53": case "\123\123": case "\x55\123": if ($vr == "\x55\x53") { $value = $this->{self::$_read_int}(2, $endian, $length); $value_representation = "\125\123"; } else { $value = $this->{self::$_read_int}(2, $endian, $length, self::SIGNED); $value_representation = "\123\123"; } break; case "\106\114": $value = $this->_read_float(4, $length); break; case "\106\104": $value = $this->_read_float(8, $length); break; case "\117\x58": if ($vr_mode == self::VR_MODE_IMPLICIT or $this->value(0x28, 0x100) > 8) { $value_representation = "\x4f\127"; } else { $value_representation = "\117\x42"; } case "\x4f\127": case "\x4f\102": switch ($length) { case 0: $value = ''; break; case self::UNDEFINED_LENGTH: while ($this->_read()) { $this->_parent_vr = $value_representation; $new_element = $this->_read_element(); $items[$new_element[0]][$new_element[1]][] = $new_element[2]; if ($new_element[0] == Nanodicom::ITEMS_GROUP and in_array($new_element[1], array(Nanodicom::ITEM_DELIMITER, Nanodicom::SEQUENCE_DELIMITER))) { break; } } break; default: $value = $this->_read($length); $is_binary = TRUE; break; } break; case "\x53\x51": case "\111\x54": case "\x44\111": switch ($length) { case 0: $value = ''; break; case self::UNDEFINED_LENGTH: while ($this->_read()) { $this->_parent_vr = $value_representation; $new_element = $this->_read_element(); $items[$new_element[0]][$new_element[1]][] = $new_element[2]; if ($new_element[0] == Nanodicom::ITEMS_GROUP and in_array($new_element[1], array(Nanodicom::ITEM_DELIMITER, Nanodicom::SEQUENCE_DELIMITER))) { break; } } break; default: if (in_array($this->_parent_vr, array("\117\x42", "\117\127", "\x4f\130"))) { $value = $this->_read($length); $is_binary = TRUE; } else { $current_pointer = $this->_tell(); while ($this->_read() and $this->_tell() < $current_pointer + $length) { $new_element = $this->_read_element(); $items[$new_element[0]][$new_element[1]][] = $new_element[2]; unset($new_element); } } break; } break; default: switch ($length) { case 0: $value = ''; break; case self::UNDEFINED_LENGTH: while ($this->_read()) { $this->_parent_vr = $value_representation; $new_element = $this->_read_element(); $items[$new_element[0]][$new_element[1]][] = $new_element[2]; if ($new_element[0] == Nanodicom::ITEMS_GROUP and in_array($new_element[1], array(Nanodicom::ITEM_DELIMITER, Nanodicom::SEQUENCE_DELIMITER))) { break; } } break; default: $value = $this->_read($length); break; } break; } return array($value, $value_representation, $is_binary, $items); } protected function _write($group, $element, $data) { $buffer = ''; list($vr_mode, $endian) = $group == self::METADATA_GROUP ? self::decode_transfer_syntax(self::EXPLICIT_VR_LITTLE_ENDIAN) : self::decode_transfer_syntax($this->_transfer_syntax); $buffer .= $this->{self::$_write_int}($group, 2, $endian, 2); $buffer .= $this->{self::$_write_int}($element, 2, $endian, 2); $vr_mode = ($group == self::ITEMS_GROUP and in_array($element, self::$items_elements)) ? self::VR_MODE_IMPLICIT : $vr_mode; if (!isset($data["\x64\x6f\156\145"])) { $this->_read_value_from_blob($data, $group, $element); } $bytes = 4; $vr_index = ($data["\x76\162"] != $data["\x5f\166\x72"] and !empty($data["\x5f\x76\162"])) ? "\x5f\x76\162" : "\x76\162"; if ($vr_mode == self::VR_MODE_EXPLICIT or $group == self::METADATA_GROUP) { $buffer .= $data[$vr_index]; if (in_array($data[$vr_index], self::$vr_explicit_4bytes)) { $buffer .= chr(0) . chr(0); } else { $bytes = 2; } } $buffer .= $this->{self::$_write_int}($data["\154\145\x6e"], $bytes, $endian, $bytes); switch ($data[$vr_index]) { case "\101\x54": for ($i = 0; $i < $data["\x6c\145\x6e"]; $i = $i + 4) { $index = (int) $i / 4; $buffer .= $this->{self::$_write_int}($data["\166\x61\154"][$index][0], 2, $endian, 2) . $this->{self::$_write_int}($data["\x76\x61\154"][$index][1], 2, $endian, 2); } break; case "\x55\x4c": $buffer .= $this->{self::$_write_int}($data["\166\141\154"], 4, $endian, $data["\x6c\x65\x6e"]); break; case "\x55\x53": $buffer .= $this->{self::$_write_int}($data["\166\141\x6c"], 2, $endian, $data["\154\145\156"]); break; case "\123\114": $buffer .= $this->{self::$_write_int}($data["\166\x61\x6c"], 4, $endian, $data["\154\x65\156"], self::SIGNED); break; case "\123\123": $buffer .= $this->{self::$_write_int}($data["\166\141\x6c"], 2, $endian, $data["\x6c\x65\156"], self::SIGNED); break; case "\106\114": $buffer .= $this->_write_float($data["\x76\x61\154"], 4, $data["\x6c\145\156"]); break; case "\x46\104": $buffer .= $this->_write_float($data["\x76\141\154"], 8, $data["\154\x65\x6e"]); break; case "\117\127": case "\x4f\x42": case "\117\130": switch ($data["\154\145\x6e"]) { case 0: break; case self::UNDEFINED_LENGTH: $this->_parent_vr = $data[$vr_index]; ksort($data["\x64\163"]); foreach ($data["\x64\x73"] as $ds_group => $ds_elements) { ksort($ds_elements); foreach ($ds_elements as $ds_element => $ds_indexes) { foreach ($ds_indexes as $ds_data) { $buffer .= $this->_write($ds_group, $ds_element, $ds_data); unset($ds_data); } unset($ds_element, $ds_indexes); } unset($ds_group, $ds_elements); } break; default: $buffer .= $data["\x76\x61\154"]; break; } break; case "\x53\121": case "\x49\124": case "\104\x49": switch ($data["\x6c\x65\156"]) { case 0: break; case self::UNDEFINED_LENGTH: $this->_parent_vr = $data[$vr_index]; ksort($data["\x64\163"]); foreach ($data["\144\163"] as $ds_group => $ds_elements) { ksort($ds_elements); foreach ($ds_elements as $ds_element => $ds_indexes) { foreach ($ds_indexes as $ds_data) { $buffer .= $this->_write($ds_group, $ds_element, $ds_data); unset($ds_data); } unset($ds_element, $ds_indexes); } unset($ds_group, $ds_elements); } break; default: if (count($data["\144\163"]) == 0) { $buffer .= $data["\166\141\x6c"]; } else { $new_length = 0; ksort($data["\x64\163"]); foreach ($data["\x64\x73"] as $ds_group => $ds_elements) { ksort($ds_elements); foreach ($ds_elements as $ds_element => $ds_indexes) { foreach ($ds_indexes as $ds_data) { $new_buffer = $this->_write($ds_group, $ds_element, $ds_data); $new_length += strlen($new_buffer); $buffer .= $new_buffer; unset($ds_data, $new_buffer); } unset($ds_element, $ds_indexes); } unset($ds_group, $ds_elements); } $length = $this->{self::$_write_int}($new_length, $bytes, $endian, $bytes); $buffer = substr($buffer, 0, -1 * $new_length - $bytes) . $length . substr($buffer, -1 * $new_length); } break; } break; default: $buffer .= $data["\166\141\154"]; break; } return $buffer; } protected function _read_int_64($bytes, $endian, $length, $sign = self::UNSIGNED, $data = NULL) { $values = $this->_read_int_32($bytes, $endian, $length, $sign, $data); if (!is_array($values)) { return $values > 2147483647 ? -1 : $values; } for ($i = 1, $count = count($values); $i <= $count; $i++) { $values["\x76\141\154" . $i] = $values["\166\x61\154" . $i] > 2147483647 ? -1 : $values["\x76\x61\154" . $i]; } return $values; } protected function _read_int_32($bytes, $endian, $length, $sign = self::UNSIGNED, $data = NULL) { $format = $sign == self::SIGNED ? $bytes == 2 ? "\163" : ($bytes == 4 ? "\x6c" : "\x63") : ($bytes == 2 ? $endian == self::BIG_ENDIAN ? "\x6e" : "\x76" : ($bytes == 4 ? $endian == self::BIG_ENDIAN ? "\116" : "\x56" : "\103")); $buffer = $data == NULL ? $this->_read($length) : $data; $format = $format . $length / $bytes . "\x76\141\154"; $values = unpack($format, $buffer); unset($format, $buffer); return $length == $bytes ? $values["\x76\141\154"] : $values; } protected function _write_int_64($value, $bytes, $endian, $length, $sign = self::UNSIGNED) { if ($value == -1) { return $bytes == 2 ? chr(0xff) . chr(0xff) : chr(0xff) . chr(0xff) . chr(0xff) . chr(0xff); } return $this->_write_int_32($value, $bytes, $endian, $length, $sign); } protected function _write_int_32($value, $bytes, $endian, $length, $sign = self::UNSIGNED) { if ($length == 0) { return ''; } $format = $sign == self::SIGNED ? $bytes == 2 ? "\163" : "\x6c" : ($bytes == 2 ? $endian == self::BIG_ENDIAN ? "\x6e" : "\166" : ($endian == self::BIG_ENDIAN ? "\116" : "\x56")); if (is_array($value)) { $result = ''; foreach ($value as $val) { $result .= pack($format, $val); } return $result; } else { return pack($format, $value); } } protected function _read_float($bytes, $length) { $format = $bytes == 4 ? "\x66" : "\144"; $buffer = $this->_read($length); $format = $format . $length / $bytes . "\166\141\x6c"; $values = unpack($format, $buffer); unset($format, $buffer); return $length == $bytes ? $values["\166\x61\154"] : $values; } protected function _write_float($value, $bytes, $length) { if ($length == 0) { return ''; } $format = $bytes == 4 ? "\x66" : "\x64"; if (is_array($value)) { $result = ''; foreach ($value as $val) { $result .= pack($format, $val); } return $result; } else { return pack($format, $value); } } protected function _rewind($position = 0) { if ($position < 0) { $this->_current_pointer += $position; } else { $this->_current_pointer = $position; } } protected function _forward($offset) { $increment = $offset; $offset = $this->_current_pointer + $offset; if ($offset > $this->_file_length) { if ($this->_oversize_retries > 0) { $missing_bytes = $offset - $this->_file_length; throw new Nanodicom_Exception("\x45\x6e\144\40\x6f\x66\x20\x66\x69\x6c\x65\x20\x3a\146\151\x6c\145\40\150\141\x73\x20\x62\x65\x65\x6e\40\x72\x65\x61\x63\150\x65\x64\x2e\40\x46\x69\x6c\x65\40\163\x69\x7a\x65\x20\151\163\40\72\x66\151\x6c\145\x73\151\x7a\x65\54\x20\x66\x61\151\154\x65\144\x20\x74\157\x20\141\x6c\154\x6f\143\x61\164\x65\x20\x3a\x6d\151\163\163\151\156\147\40\142\171\x74\x65\x73\x20\x61\164\40\142\x79\x74\145\40\x3a\x62\x79\x74\x65", array("\72\146\151\154\x65" => $this->_location, "\x3a\x66\x69\154\145\163\x69\x7a\145" => $this->_file_length, "\72\x6d\151\163\163\x69\x6e\147" => $missing_bytes, "\72\142\171\x74\x65" => sprintf("\60\170\x25\60\x34\x58", $this->_current_pointer)), 3); } else { $this->warnings[] = "\x52\145\164\162\171\40\x66\151\x6c\x65\x20\157\166\x65\x72\146\x6c\x6f\x77\x20\167\150\151\154\x65\x20\x66\x6f\x72\167\141\162\144\x69\x6e\x67\x20\x66\x69\154\145\40\x70\x6f\x69\156\x74\x65\162"; $this->_oversize_retries++; $increment = 0; } } $this->_current_pointer = $offset; return $increment; } protected function _tell() { return $this->_current_pointer; } protected function _read_file($starting_byte = 0, $length = NULL) { if ($this->_location == "\x62\154\157\142") { $this->_file_length = sprintf("\x25\165", strlen($this->_blob)); $length = $length === NULL ? $this->_file_length : $length; $this->_blob = substr($this->_blob, $starting_byte, $length); unset($length, $starting_byte); } else { if (!(file_exists($this->_location) and is_file($this->_location))) { throw new Nanodicom_Exception("\106\151\x6c\x65\40\72\146\151\154\145\40\x64\157\145\163\40\x6e\157\164\40\145\x78\151\163\x74", array("\72\x66\x69\154\145" => $this->_location), 0); } $file_handle = fopen($this->_location, "\x72\142"); if (!$file_handle) { throw new Nanodicom_Exception("\x46\x69\154\145\x20\72\146\151\154\x65\x20\x63\141\x6e\x6e\x6f\x74\40\x62\x65\40\157\160\x65\x6e\x65\144", array("\72\x66\151\x6c\x65" => $this->_location), 1); } $this->_file_length = sprintf("\45\x75", filesize($this->_location)); if ($starting_byte != 0) { fseek($file_handle, $starting_byte); } $length = $length === NULL ? $this->_file_length : $length; if ($length <= 0) { throw new Nanodicom_Exception("\114\x65\x6e\x67\164\150\40\72\x6c\x65\156\x67\x74\x68\40\x66\x6f\x75\156\x64\40\141\164\x20\x66\x69\154\x65\x20\72\146\151\x6c\x65\x20\141\x74\40\142\171\164\145\x20\72\x62\x79\164\x65", array("\72\154\145\x6e\147\164\150" => $length, "\x3a\x66\x69\x6c\x65" => $this->_location, "\72\x62\x79\x74\145" => sprintf("\60\170\45\60\x34\x58", $starting_byte)), 2); } try { $this->_blob = fread($file_handle, $length); } catch (Exception $e) { throw new Nanodicom_Exception("\105\162\162\157\162\x20\157\x63\x63\x75\162\x65\144\56\x20\122\145\x61\x64\151\156\x67\40\x3a\154\x65\x6e\x67\164\150\40\x66\162\x6f\x6d\40\x66\x69\154\145\40\x3a\146\x69\x6c\145\x20\141\164\40\x62\x79\x74\x65\x20\x3a\x62\x79\x74\x65\x20\x67\x6f\x74\x20\x61\156\x20\145\x72\162\x6f\162", array("\72\154\x65\156\147\164\x68" => $length, "\72\146\151\154\145" => $this->_location, "\x3a\x62\x79\x74\145" => sprintf("\60\170\45\x30\x34\130", $starting_byte)), 3); } fclose($file_handle); unset($file_handle, $length, $starting_byte); } } protected function _read($length = NULL) { if ($length === NULL) { return $this->_current_pointer >= $this->_file_length ? FALSE : TRUE; } $this->{$this->_check_deflate_function}(); $starting_byte = $this->_current_pointer; $this->_current_pointer += $length; if ($this->_current_pointer > $this->_file_length) { $missing_bytes = $this->_current_pointer - $this->_file_length; throw new Nanodicom_Exception("\105\x6e\x64\40\157\x66\40\x66\x69\x6c\x65\x20\72\x66\151\154\145\x20\x68\141\163\x20\x62\x65\145\156\x20\162\x65\x61\x63\x68\x65\x64\x2e\40\x46\x69\154\145\x20\163\x69\172\x65\40\x69\163\x20\x3a\x66\151\x6c\145\x73\x69\x7a\x65\54\x20\x66\141\151\x6c\x65\144\x20\164\x6f\x20\141\x6c\154\x6f\x63\141\164\145\x20\72\x6d\x69\163\x73\x69\x6e\147\x20\x62\171\x74\x65\163\40\x61\x74\40\x62\x79\164\x65\x20\72\x62\171\x74\x65", array("\72\146\151\154\x65" => $this->_location, "\x3a\x66\151\154\x65\x73\x69\172\145" => $this->_file_length, "\72\x6d\151\x73\163\x69\x6e\x67" => $missing_bytes, "\72\x62\x79\x74\145" => sprintf("\x30\170\x25\x30\x34\x58", $starting_byte)), 3); } if ($this->_current_pointer < 0) { throw new Nanodicom_Exception("\124\162\171\151\156\x67\40\164\157\40\x72\x65\141\x64\40\156\x65\x67\x61\x74\151\x76\145\40\x62\171\x74\x65\x73\x20\157\156\40\x66\151\154\x65\40\72\146\151\x6c\145", array("\72\x66\x69\154\x65" => $this->_location), 4); } return substr($this->_blob, $starting_byte, $length); } protected function _check_deflate() { if ($this->_meta_information_group_length !== NULL and $this->_current_pointer == $this->_meta_group_last_byte and $this->_transfer_syntax == self::DEFLATE_TRANSFER_SYNTAX) { $this->_original_blob = $this->_blob; $uncompressed = gzinflate(substr($this->_blob, $this->_current_pointer, $this->_file_length - $this->_current_pointer)); $this->_file_length = $this->_current_pointer + strlen($uncompressed); $this->_blob = substr($this->_blob, 0, $this->_current_pointer) . $uncompressed; $this->_check_deflate_function = "\137\x64\x75\155\155\171"; } } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0X300E.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0X300E.php index 50a4bf3..ac4c689 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0X300E.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/dict/0X300E.php @@ -1,7 +1,7 @@ array("\x49\x6d\160\154\151\143\x69\x74\x20\126\122\x20\114\x69\x74\x74\x6c\145\40\x45\156\x64\151\x61\x6e\x3a\x20\x44\x65\146\x61\165\x6c\164\40\124\162\141\x6e\x73\x66\x65\162\40\123\171\156\164\x61\x78\x20\x66\157\162\40\x44\111\x43\x4f\x4d"), "\61\x2e\62\x2e\x38\x34\x30\56\x31\x30\x30\x30\x38\56\61\x2e\62\x2e\x31" => array("\105\170\160\154\x69\x63\x69\x74\40\x56\122\x20\114\151\x74\164\154\145\40\x45\x6e\144\x69\141\x6e"), "\61\x2e\62\x2e\x38\x34\x30\56\x31\60\x30\x30\70\56\x31\x2e\x32\56\61\x2e\x39\x39" => array("\104\x65\146\x6c\141\164\145\144\40\x45\170\160\x6c\151\143\151\x74\x20\126\x52\x20\x4c\x69\164\x74\x6c\145\x20\105\x6e\144\151\141\x6e"), "\x31\56\62\56\70\64\60\56\x31\60\x30\60\70\56\x31\x2e\x32\56\x32" => array("\105\x78\x70\x6c\151\143\x69\164\40\126\122\40\x42\x69\x67\40\x45\156\x64\x69\x61\x6e"), "\61\x2e\x32\x2e\70\x34\60\56\x31\60\x30\60\x38\56\x31\56\x32\x2e\x34\x2e\x35\60" => array("\112\x50\105\x47\40\x42\141\x73\x65\154\x69\156\x65\40\x28\120\x72\157\x63\x65\163\x73\40\x31\x29\72\40\104\145\146\141\165\154\x74\x20\x54\162\x61\x6e\163\x66\x65\x72\40\123\x79\x6e\164\x61\x78\40\146\x6f\x72\x20\114\x6f\x73\x73\x79\40\x4a\x50\x45\107\40\70\40\x42\x69\x74\x20\x49\155\141\147\x65\40\103\157\155\x70\x72\145\x73\x73\151\157\x6e"), "\x31\56\62\x2e\70\64\x30\x2e\x31\60\60\x30\70\x2e\x31\56\x32\56\x34\x2e\65\61" => array("\x4a\x50\105\107\x20\x45\x78\164\145\x6e\144\145\144\x20\x28\x50\x72\x6f\143\145\x73\x73\x20\x32\40\46\x20\64\51\72\40\x44\x65\x66\x61\165\x6c\164\x20\124\162\141\x6e\163\x66\x65\162\40\x53\x79\156\x74\141\x78\x20\x66\x6f\x72\40\x4c\x6f\163\163\x79\x20\112\120\x45\x47\40\x31\x32\x20\x42\151\164\40\x49\x6d\x61\x67\145\40\x43\157\x6d\x70\162\145\x73\163\151\157\156\40\x28\x50\162\157\143\145\x73\163\40\x34\40\157\x6e\154\171\x29"), "\61\56\62\56\x38\64\60\x2e\61\x30\x30\60\x38\x2e\x31\56\x32\x2e\64\56\65\62" => array("\112\120\105\x47\x20\x45\x78\164\x65\156\144\145\x64\40\50\x50\162\x6f\143\145\x73\x73\x20\x33\40\46\x20\65\51"), "\61\56\62\x2e\x38\x34\x30\x2e\61\x30\60\60\x38\56\61\x2e\x32\x2e\x34\x2e\65\x33" => array("\112\120\x45\x47\40\123\x70\145\143\164\x72\x61\154\40\x53\145\x6c\145\143\x74\151\157\x6e\54\x20\x4e\157\156\55\110\151\x65\162\x61\x72\143\150\x69\143\x61\154\x20\x28\x50\x72\157\x63\x65\163\163\40\x36\40\x26\40\70\x29"), "\x31\x2e\62\56\70\x34\60\x2e\61\x30\60\x30\x38\x2e\61\56\x32\56\64\x2e\65\64" => array("\112\120\x45\x47\40\x53\160\145\x63\164\x72\141\154\x20\123\145\x6c\145\143\x74\151\157\156\54\40\x4e\x6f\x6e\55\x48\x69\145\x72\141\x72\x63\x68\x69\x63\141\154\x20\50\120\x72\157\x63\x65\163\x73\x20\x37\x20\x26\x20\71\51"), "\x31\56\x32\56\x38\64\60\56\61\x30\x30\x30\70\x2e\61\x2e\62\56\64\x2e\x35\65" => array("\112\120\x45\107\x20\x46\165\x6c\154\40\x50\162\157\x67\x72\x65\163\x73\x69\157\156\54\40\x4e\157\x6e\55\110\x69\145\x72\141\x72\x63\x68\151\143\x61\154\40\x28\120\162\x6f\143\145\x73\x73\40\61\60\x20\x26\40\x31\x32\x29"), "\x31\56\x32\56\x38\64\60\x2e\x31\60\60\60\x38\56\x31\x2e\62\56\x34\56\x35\x36" => array("\x4a\x50\105\x47\x20\106\165\x6c\x6c\x20\120\x72\157\147\x72\x65\163\163\x69\x6f\156\x2c\x20\x4e\157\x6e\x2d\110\151\145\x72\x61\x72\143\x68\151\143\x61\154\40\50\x50\162\157\x63\145\x73\163\40\x31\x31\x20\x26\40\61\63\51"), "\61\56\x32\x2e\70\x34\60\56\x31\x30\60\x30\x38\x2e\61\x2e\x32\56\64\56\65\67" => array("\x4a\x50\105\107\40\x4c\157\x73\163\154\x65\163\163\54\x20\x4e\x6f\156\x2d\110\151\145\162\141\162\x63\150\x69\x63\x61\x6c\x20\x28\x50\x72\157\x63\145\163\x73\x20\61\x34\51"), "\x31\x2e\x32\x2e\x38\x34\x30\56\61\x30\60\60\x38\x2e\61\x2e\x32\56\64\x2e\x35\70" => array("\x4a\x50\x45\107\x20\x4c\157\163\163\154\x65\163\163\x2c\40\116\x6f\156\x2d\x48\x69\145\x72\141\162\143\150\151\x63\x61\x6c\40\x28\x50\162\157\x63\x65\x73\163\x20\x31\x35\51"), "\61\56\62\56\70\64\x30\x2e\61\60\x30\x30\70\56\61\x2e\62\x2e\64\x2e\65\71" => array("\112\120\x45\x47\x20\105\x78\x74\x65\x6e\x64\x65\144\54\x20\110\151\x65\x72\x61\162\143\x68\151\143\x61\154\x20\50\x50\162\157\x63\145\x73\x73\40\x31\x36\x20\46\x20\x31\70\51"), "\61\56\62\x2e\70\64\x30\56\61\60\x30\x30\70\56\61\x2e\62\x2e\64\x2e\x36\x30" => array("\x4a\120\x45\107\40\x45\170\164\145\x6e\x64\145\x64\54\40\110\x69\x65\162\x61\162\x63\x68\151\143\x61\154\x20\x28\x50\x72\x6f\x63\x65\x73\163\x20\x31\x37\x20\46\40\61\x39\51"), "\x31\56\x32\x2e\70\x34\60\x2e\61\60\60\x30\x38\x2e\x31\x2e\62\56\x34\x2e\x36\61" => array("\x4a\120\x45\x47\x20\x53\x70\145\143\x74\162\x61\x6c\40\123\x65\154\x65\x63\x74\x69\x6f\x6e\54\x20\x48\x69\145\162\x61\162\143\x68\x69\x63\x61\x6c\40\x28\x50\162\157\143\x65\163\x73\40\62\x30\x20\46\x20\x32\x32\51"), "\61\x2e\x32\x2e\70\x34\x30\56\61\x30\x30\60\x38\56\x31\x2e\62\x2e\64\56\x36\x32" => array("\x4a\120\x45\107\40\123\160\x65\x63\x74\162\141\x6c\x20\x53\x65\154\x65\x63\164\151\x6f\x6e\x2c\40\x48\151\x65\162\141\162\143\150\151\x63\141\154\40\x28\x50\x72\157\143\145\x73\x73\x20\x32\x31\40\x26\40\62\63\51"), "\x31\56\x32\56\x38\x34\x30\x2e\61\x30\x30\x30\70\x2e\x31\56\x32\56\64\x2e\66\x33" => array("\x4a\120\x45\x47\40\x46\x75\154\x6c\40\x50\x72\x6f\147\x72\145\163\x73\151\x6f\x6e\54\40\x48\151\145\162\x61\162\143\x68\x69\143\141\x6c\x20\50\x50\162\157\x63\145\163\163\40\62\64\40\x26\x20\62\66\51"), "\61\x2e\62\x2e\70\64\x30\x2e\61\60\x30\x30\70\x2e\61\x2e\62\x2e\64\56\66\x34" => array("\x4a\120\x45\107\40\x46\165\154\154\x20\120\162\157\x67\x72\145\x73\x73\151\x6f\x6e\x2c\x20\110\151\145\x72\141\162\x63\150\151\x63\141\154\40\50\x50\162\157\143\145\163\163\40\62\65\40\46\40\x32\x37\51"), "\x31\56\x32\56\70\x34\60\56\61\60\60\x30\70\x2e\61\56\62\56\x34\x2e\66\65" => array("\x4a\x50\105\107\x20\114\x6f\163\x73\x6c\145\163\163\54\x20\110\151\x65\162\141\x72\x63\x68\151\143\x61\154\x20\50\120\x72\x6f\x63\145\x73\163\40\x32\x38\51"), "\x31\x2e\62\56\x38\x34\x30\56\x31\x30\x30\x30\x38\56\x31\x2e\62\x2e\x34\56\x36\x36" => array("\x4a\120\105\107\x20\x4c\x6f\x73\x73\x6c\145\x73\x73\x2c\40\x48\x69\145\162\x61\x72\x63\150\151\143\141\154\x20\50\120\x72\x6f\x63\x65\163\x73\40\x32\71\51"), "\61\x2e\62\x2e\x38\x34\60\56\x31\x30\x30\x30\70\x2e\x31\x2e\62\56\64\56\x37\x30" => array("\112\120\105\x47\x20\114\157\x73\163\x6c\145\x73\163\x2c\40\116\x6f\156\55\x48\x69\x65\162\x61\x72\143\x68\x69\x63\x61\x6c\54\x20\106\x69\x72\163\164\x2d\117\162\x64\x65\162\40\x50\x72\x65\144\x69\x63\164\151\x6f\156\x20\50\x50\162\157\x63\x65\x73\163\40\x31\x34\40\x61\162\162\141\171\50\x53\145\154\x65\x63\x74\x69\x6f\156\x20\x56\141\154\x75\145\x20\x31\51\51\x3a\x20\x44\145\x66\x61\165\154\x74\40\124\x72\x61\x6e\x73\x66\x65\162\x20\123\171\x6e\x74\141\170\x20\x66\x6f\x72\40\114\x6f\x73\x73\x6c\145\x73\163\40\x4a\120\105\107\40\111\x6d\x61\x67\145\40\103\157\x6d\160\x72\145\163\163\151\157\x6e"), "\x31\56\62\56\70\x34\x30\56\61\x30\60\60\x38\x2e\61\56\62\56\64\56\x38\60" => array("\112\120\105\x47\x2d\x4c\123\x20\114\x6f\x73\x73\154\145\x73\x73\x20\111\x6d\x61\147\145\40\x43\x6f\x6d\x70\162\x65\163\163\151\157\156"), "\61\x2e\62\56\70\64\60\x2e\x31\60\x30\60\x38\56\x31\56\62\56\x34\56\x38\x31" => array("\x4a\x50\105\107\55\114\123\x20\114\157\x73\163\171\x20\50\x4e\x65\x61\162\55\114\157\163\163\154\x65\163\x73\x29\x20\x49\x6d\141\147\x65\40\103\157\x6d\160\162\x65\163\163\151\x6f\x6e"), "\x31\56\62\56\70\x34\60\x2e\61\x30\x30\60\x38\56\x31\x2e\x32\56\x34\x2e\x39\60" => array("\x4a\x50\x45\107\40\62\x30\60\x30\40\111\155\141\147\145\40\103\157\x6d\160\x72\145\x73\x73\x69\157\x6e\40\50\x4c\x6f\163\163\x6c\x65\163\x73\40\117\x6e\154\171\x29"), "\61\56\62\x2e\70\x34\x30\x2e\61\60\x30\x30\70\x2e\61\56\x32\56\64\56\71\61" => array("\112\120\105\x47\40\62\60\60\60\40\111\x6d\x61\147\x65\x20\103\x6f\x6d\160\x72\x65\x73\x73\x69\x6f\156"), "\x31\x2e\x32\x2e\x38\x34\x30\56\x31\60\60\x30\70\x2e\61\56\62\56\x34\x2e\71\62" => array("\112\x50\x45\x47\x20\x32\60\60\x30\40\x50\141\162\164\40\62\x20\115\165\x6c\x74\x69\x2d\x63\157\x6d\160\x6f\156\x65\156\164\x20\x49\x6d\141\x67\145\40\x43\x6f\x6d\x70\162\145\x73\x73\151\x6f\x6e\40\50\x4c\x6f\x73\163\154\x65\163\x73\x20\117\156\154\x79\x29"), "\61\56\x32\56\70\64\60\56\x31\60\60\60\x38\56\61\56\62\56\64\56\71\63" => array("\112\120\105\107\x20\x32\x30\x30\60\x20\x50\141\162\x74\x20\62\x20\x4d\165\154\164\151\55\x63\157\155\160\x6f\x6e\145\x6e\164\x20\111\x6d\x61\x67\145\40\103\157\155\160\162\145\x73\x73\151\x6f\156"), "\x31\56\62\x2e\x38\x34\x30\56\61\60\60\60\70\x2e\61\x2e\x32\56\x34\x2e\71\x34" => array("\x4a\120\x49\x50\x20\x52\145\x66\145\162\x65\156\143\x65\x64"), "\61\56\62\56\70\64\60\56\x31\x30\x30\60\x38\56\x31\56\x32\x2e\x34\56\x39\65" => array("\x4a\120\x49\x50\40\x52\x65\146\145\162\145\156\x63\x65\144\x20\x44\145\x66\x6c\x61\x74\x65"), "\x31\56\62\56\x38\x34\60\x2e\x31\60\x30\x30\x38\56\61\x2e\62\56\x34\56\x31\x30\60" => array("\115\120\105\x47\62\40\115\141\151\156\x20\x50\162\x6f\x66\151\154\x65\40\x40\x20\x4d\x61\x69\156\x20\x4c\x65\166\145\154"), "\61\x2e\62\56\70\64\x30\56\x31\60\x30\x30\70\x2e\x31\x2e\x32\56\x34\x2e\61\60\61" => array("\x4d\120\105\x47\62\x20\115\x61\x69\x6e\40\120\x72\x6f\146\151\154\x65\x20\100\x20\110\x69\x67\150\x20\114\x65\x76\145\154"), "\61\56\62\x2e\70\x34\60\x2e\x31\x30\60\x30\70\x2e\x31\x2e\62\56\x35" => array("\x52\x4c\105\40\114\x6f\x73\x73\x6c\145\x73\163"), "\61\56\x32\x2e\x38\64\60\x2e\61\x30\60\60\x38\x2e\61\56\62\56\x36\56\x31" => array("\x52\x46\x43\40\x32\x35\x35\x37\40\x4d\x49\115\105\x20\x65\156\x63\x61\160\163\165\x6c\x61\164\151\x6f\x6e"), "\x31\x2e\62\56\x38\x34\x30\x2e\x31\60\x30\x30\70\x2e\x31\56\62\x2e\x36\56\x32" => array("\130\x4d\114\x20\x45\x6e\x63\x6f\144\x69\x6e\x67")); protected static $_loaded_dictionaries = array(); protected static $_loaded = FALSE; public static function load_dictionary($group, $force = FALSE) { if (!$force) { return; } if (!isset(self::$_loaded_dictionaries[$group]) and file_exists(NANODICOMROOT . DIRECTORY_SEPARATOR . "\x6e\x61\156\x6f\x64\151\143\157\155" . DIRECTORY_SEPARATOR . "\144\151\x63\164" . DIRECTORY_SEPARATOR . sprintf("\60\x78\x25\x30\64\x58", $group) . "\x2e\x70\x68\160")) { require_once NANODICOMROOT . DIRECTORY_SEPARATOR . "\x6e\141\x6e\x6f\144\151\x63\157\155" . DIRECTORY_SEPARATOR . "\x64\x69\143\164" . DIRECTORY_SEPARATOR . sprintf("\60\170\45\x30\x34\x58", $group) . "\56\x70\x68\x70"; if (isset(Nanodicom_Dictionary::$dict[$group]) and count(Nanodicom_Dictionary::$dict[$group]) > 0) { foreach (Nanodicom_Dictionary::$dict[$group] as $dict_element => $dict_data) { Nanodicom_Dictionary::$dict_by_name[strtolower($dict_data[2])] = array($group, $dict_element); unset($dict_element, $dict_data); } } self::$_loaded_dictionaries[$group] = TRUE; } } function __construct() { if (self::$_loaded) { return; } self::$_loaded = TRUE; Nanodicom_Dictionary::$dict[0x2][0x0] = array("\125\x4c", "\61", "\115\145\x74\141\x45\154\145\x6d\145\x6e\164\x47\162\x6f\x75\160\114\145\x6e\x67\164\150"); Nanodicom_Dictionary::$dict[0x2][0x1] = array("\x4f\102", "\x31", "\106\x69\x6c\145\115\x65\164\x61\x49\x6e\x66\157\x72\155\141\x74\151\x6f\x6e\x56\145\162\163\151\157\156"); Nanodicom_Dictionary::$dict[0x2][0x2] = array("\x55\111", "\x31", "\115\x65\x64\151\x61\123\164\x6f\162\x61\x67\145\123\x4f\x50\103\154\141\x73\163\x55\x49\104"); Nanodicom_Dictionary::$dict[0x2][0x3] = array("\x55\x49", "\x31", "\115\x65\144\x69\141\123\164\157\162\141\147\145\123\x4f\120\111\156\163\164\x61\x6e\x63\x65\x55\111\x44"); Nanodicom_Dictionary::$dict[0x2][0x10] = array("\125\x49", "\x31", "\x54\162\x61\x6e\x73\146\145\x72\x53\x79\156\164\141\x78\125\x49\x44"); Nanodicom_Dictionary::$dict[0x2][0x12] = array("\125\x49", "\61", "\x49\155\160\154\x65\x6d\x65\156\164\141\164\151\x6f\x6e\103\154\x61\163\x73\125\x49\104"); Nanodicom_Dictionary::$dict[0x2][0x13] = array("\x53\110", "\61", "\111\x6d\160\x6c\x65\x6d\x65\x6e\164\141\164\151\x6f\156\126\x65\162\x73\x69\x6f\x6e\116\x61\x6d\145"); Nanodicom_Dictionary::$dict[0x2][0x16] = array("\101\105", "\61", "\123\x6f\x75\x72\x63\x65\x41\160\x70\x6c\151\x63\x61\x74\151\157\x6e\x45\156\164\x69\164\x79\124\x69\x74\154\145"); Nanodicom_Dictionary::$dict[0x2][0x100] = array("\125\x49", "\x31", "\x50\x72\151\166\x61\x74\x65\x49\x6e\146\157\162\x6d\x61\164\x69\157\156\103\x72\x65\141\164\157\162\125\x49\104"); Nanodicom_Dictionary::$dict[0x2][0x102] = array("\117\102", "\x31", "\120\x72\151\x76\x61\x74\x65\x49\x6e\146\x6f\162\155\141\164\151\x6f\156"); Nanodicom_Dictionary::$dict[0xfffe][0xe000] = array("\111\124", "\61", "\x49\164\x65\x6d"); Nanodicom_Dictionary::$dict[0xfffe][0xe00d] = array("\104\x49", "\x31", "\x49\x74\x65\x6d\x44\x65\x6c\151\155\151\164\141\x74\151\157\x6e\111\x74\145\155"); Nanodicom_Dictionary::$dict[0xfffe][0xe0dd] = array("\104\x49", "\x31", "\x53\145\x71\165\145\x6e\143\x65\104\x65\x6c\151\x6d\x69\x74\141\x74\151\x6f\x6e\111\x74\145\155"); Nanodicom_Dictionary::$_loaded_dictionaries[0x2] = TRUE; Nanodicom_Dictionary::$_loaded_dictionaries[0xfffe] = TRUE; } } new Nanodicom_Dictionary(); diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/exception.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/exception.php index 359b98c..0ccb5ca 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/exception.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/nanodicom/exception.php @@ -1,7 +1,7 @@ getCode(), strip_tags($this->getMessage())); } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer.php index 3a89480..0a02d8e 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer.php @@ -1,7 +1,7 @@ parse(); $this->profiler["\141\x6e\157\x6e\171\x6d\x69\172\145"]["\163\x74\141\162\x74"] = microtime(TRUE); foreach ($tags as $entry) { list($group, $element, $replacement) = $entry; $this->_tags[$group][$element] = $replacement; } if ($map !== NULL) { foreach ($map as $entry) { list($group, $element, $value, $assignment) = $entry; $value = self::$case == "\x69\156\163\x65\156\163\x69\x74\x69\166\145" ? strtolower($value) : $value; $name = sprintf("\60\170\45\60\x34\130", $group) . "\56" . sprintf("\x30\x78\x25\x30\64\130", $element); $this->_map[$name][$value] = $assignment; } } $this->_anonymize($this->_dataset); switch ($mode) { case self::RETURN_BLOB: $blob = $this->write(); break; default: $blob = $this->write(); break; } $this->profiler["\x61\x6e\x6f\156\x79\x6d\151\172\145"]["\x65\156\144"] = microtime(TRUE); return $blob; } protected function _anonymize(&$dataset) { foreach ($dataset as $group => $elements) { foreach ($elements as $element => $indexes) { foreach ($indexes as $index => $values) { if (!isset($values["\144\157\x6e\145"])) { $this->_read_value_from_blob($dataset[$group][$element][$index], $group, $element); } $this->_replace($dataset, $group, $element); if (count($values["\x64\163"]) > 0) { $this->_anonymize($dataset[$group][$element][$index]["\x64\x73"]); } } unset($values); } unset($element, $indexes); } unset($group, $elements); } protected function _replace(&$dataset, $group, $element) { $original_value = $this->dataset_value($dataset, $group, $element); if (is_array($original_value)) { return FALSE; } $value = empty($original_value) ? "\156\x6f\156\145" : trim($original_value); $value = self::$case == "\x69\x6e\x73\x65\156\x73\x69\164\x69\166\x65" ? strtolower($value) : $value; $name = sprintf("\60\x78\45\60\x34\130", $group) . "\x2e" . sprintf("\60\x78\x25\x30\64\x58", $element); if (isset($this->_map[$name][$value])) { $this->dataset_value($dataset, $group, $element, $this->_map[$name][$value]); return TRUE; } if (!isset($this->_tags[$group][$element])) { return FALSE; } $replacement = $this->_tags[$group][$element]; if (preg_match("\x2f\x7b\x28\133\141\55\172\60\x2d\71\x5d\x2b\51\x28\x5c\x7c\50\x5b\141\55\172\60\x2d\71\x5d\x2b\x29\x29\77\175\x24\57\x69", $replacement, $matches)) { switch ($matches[1]) { case "\144\x61\x74\145": $replacement = $this->_map[$name][$value] = str_replace("\173\144\x61\164\x65\174" . $matches[3] . "\175", date($matches[3]), $replacement); break; case "\x63\157\156\163\145\143\165\x74\151\x76\x65": $count = isset($this->_map[$name]) ? count($this->_map[$name]) : 0; $replacement = $this->_map[$name][$value] = str_replace("\173\143\x6f\156\163\145\143\x75\164\151\166\145\175", $count, $replacement); break; case "\x72\x61\156\x64\x6f\155": $replacement = str_replace("\x7b\162\x61\x6e\144\x6f\155\x7d", sprintf("\x25\x30\x34\144", rand()), $replacement); break; } } else { $this->_map[$name][$value] = $replacement; } $this->dataset_value($dataset, $group, $element, $replacement); return TRUE; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer/clinicaltrial.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer/clinicaltrial.php index d15d2c9..673cc97 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer/clinicaltrial.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/anonymizer/clinicaltrial.php @@ -1,7 +1,7 @@ "\74\x75\154\x3e", "\x64\x61\164\141\x73\145\x74\137\145\156\x64" => "\x3c\x2f\165\154\76", "\151\x74\x65\155\137\142\x65\147\x69\x6e" => "\74\x6c\151\x3e", "\x69\x74\145\155\137\x65\x6e\x64" => "\x3c\57\154\x69\76", "\x73\160\x61\x63\x65\x72" => '', "\x74\x65\x78\x74\137\142\x65\x67\x69\156" => "\x3c\160\162\x65\76", "\164\145\170\x74\x5f\145\156\144" => "\x3c\x2f\160\x72\145\76", "\x63\x6f\x6c\x75\155\x6e\163" => array("\157\x66\x66" => array("\45\60\65\x58", "\x20"), "\147" => array("\60\x78\45\x30\x34\130", "\72"), "\x65" => array("\x30\x78\x25\60\x34\x58", "\x20"), "\x6e\x61\155\x65" => array("\x25\x2d\x33\60\x2e\63\x30\x73", "\x20"), "\x76\x72" => array("\45\x32\x73", "\40"), "\154\x65\156" => array("\45\55\63\144", "\40"), "\166\x61\x6c" => array("\x5b\45\163\x5d", ''))); protected $_output_echo = array("\144\x61\164\x61\163\x65\x74\137\x62\145\147\x69\x6e" => '', "\144\x61\164\x61\x73\x65\x74\137\145\156\x64" => '', "\151\164\x65\155\x5f\x62\145\x67\x69\x6e" => '', "\151\164\145\155\137\x65\x6e\x64" => "\12", "\x73\x70\141\143\x65\162" => "\40", "\164\x65\x78\164\x5f\x62\x65\147\x69\x6e" => '', "\x74\145\170\164\137\145\156\144" => '', "\x63\x6f\154\x75\155\x6e\x73" => array("\157\x66\146" => array("\45\60\65\x58", "\x20"), "\147" => array("\45\60\x34\x58", "\72"), "\145" => array("\x25\60\x34\130", "\x20"), "\156\141\155\145" => array("\45\55\63\60\x2e\x33\60\x73", "\40"), "\x76\x72" => array("\x25\x32\x73", "\40"), "\x6c\x65\156" => array("\x25\55\63\x64", "\x20"), "\x76\141\154" => array("\x5b\45\x73\135", ''))); protected $output = array(); protected $_out = ''; public function dump($output = "\x65\143\150\157") { $this->parse(); $this->profiler["\144\165\155\160"]["\163\164\141\x72\164"] = microtime(TRUE); if (is_array($output)) { $this->output = array_merge($this->_output_echo, $output); } else { $output = "\x5f\157\165\164\160\165\164\x5f" . $output; foreach ($this->{$output} as $var => $value) { $this->output[$var] = $value; } } $dump = $this->_dump($this->_dataset); $this->profiler["\x64\x75\x6d\160"]["\x65\156\x64"] = microtime(TRUE); return $dump; } protected function _dump($dataset, $spacer = '') { $out = ''; foreach ($dataset as $group => $elements) { Nanodicom_Dictionary::load_dictionary($group, TRUE); foreach ($elements as $element => $indexes) { foreach ($indexes as $values) { $elem = $values; $elem["\147"] = $group; $elem["\x65"] = $element; if (!isset($elem["\144\157\x6e\x65"])) { $this->_read_value_from_blob($elem, $group, $element); } if ($group == Nanodicom::ITEMS_GROUP and in_array($element, array(Nanodicom::ITEM_DELIMITER, Nanodicom::SEQUENCE_DELIMITER))) { $spacer = substr($spacer, 0, -1 * strlen($this->output["\163\160\x61\143\x65\162"])); } $out .= $this->output["\144\x61\x74\x61\163\145\x74\x5f\142\145\x67\151\x6e"] . $this->_dump_element($elem, $spacer); if (count($elem["\144\163"]) > 0) { $out .= $this->_dump($elem["\x64\x73"], $spacer . $this->output["\163\x70\141\143\145\162"]); } $out .= $this->output["\144\141\164\x61\163\145\164\137\x65\156\x64"]; } unset($values); } unset($element, $indexes); } unset($group, $elements); return $out; } protected function _dump_element($element, $space = '') { $row = $this->_print_element($element); return $this->output["\x69\x74\x65\155\137\142\x65\147\151\x6e"] . $this->output["\x74\x65\170\x74\x5f\142\145\147\x69\156"] . $space . $row . $this->output["\164\145\170\164\137\145\x6e\144"] . $this->output["\151\164\145\x6d\137\x65\156\x64"]; } protected function _print_element($element) { $out = ''; foreach ($this->output["\143\x6f\x6c\x75\x6d\156\163"] as $column => $values) { switch ($column) { case "\x6e\x61\155\145": $string = isset(Nanodicom_Dictionary::$dict[$element["\x67"]][$element["\145"]]) ? Nanodicom_Dictionary::$dict[$element["\147"]][$element["\x65"]][2] : "\x4e\101"; break; case "\166\141\x6c": if ($element["\x76\x72"] == "\x41\x54") { $elements = array(); for ($i = 0; $i < count($element["\166\x61\154"]); $i++) { $elements[] = "\x5b" . sprintf("\x30\x78\x25\x30\x34\x58", $element["\x76\x61\x6c"][$i][0]) . "\x2c" . sprintf("\60\170\45\60\64\x58", $element["\166\x61\154"][$i][1]) . "\x5d"; } $element["\166\141\154"] = $elements; } $string = $element["\x62\x69\156"] ? "\102\x49\116\101\x52\x59\56\x20\x45\154\145\155\x65\x6e\164\x20\163\164\x61\162\x74\x73\40\x61\x74\40" . $element["\x6f\146\x66"] : (is_array($element["\x76\x61\x6c"]) ? implode("\x2c", $element["\166\141\154"]) : (isset(Nanodicom_Dictionary::$dict[$element["\147"]][$element["\145"]]) ? trim($element["\x76\141\x6c"]) : "\x55\x4e\x4b\116\117\127\x4e")); break; case "\x76\162": $vr_index = ($element["\x76\162"] != $element["\x5f\166\x72"] and !empty($element["\137\166\162"])) ? "\137\166\x72" : "\166\x72"; $string = trim($element[$vr_index]); break; default: $string = trim($element[$column]); break; } $out .= sprintf($values[0], $string) . $values[1]; } return $out; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/getter.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/getter.php index b92fc28..bcc3086 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/getter.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/getter.php @@ -1,7 +1,7 @@ array("\x6e\x61\155\145" => "\x49\155\160\x6c\x69\x63\151\x74\40\126\x52\40\x4c\151\x74\164\x6c\x65\x20\105\x6e\144\151\x61\x6e"), Nanodicom::EXPLICIT_VR_LITTLE_ENDIAN => array("\x6e\x61\x6d\x65" => "\x45\x78\x70\154\x69\x63\151\x74\40\126\x52\40\114\x69\x74\164\154\145\x20\105\x6e\x64\x69\x61\x6e"), Nanodicom::EXPLICIT_VR_BIG_ENDIAN => array("\x6e\x61\155\145" => "\105\170\x70\154\151\x63\151\164\x20\x56\122\40\102\151\147\40\105\x6e\x64\x69\141\x6e"), "\x31\56\62\x2e\70\x34\60\56\x31\60\60\60\70\x2e\x31\56\62\56\61\x2e\71\71" => array("\156\x61\155\x65" => "\104\x49\103\117\115\x20\104\x65\146\x6c\x61\x74\x65\x64\40\x4c\x69\x74\164\154\145\40\105\x6e\144\x69\141\156\x20\50\105\x78\x70\154\151\143\151\164\x20\126\122\51"), "\61\x2e\x32\x2e\70\x34\60\56\x31\x30\60\60\70\56\61\56\62\x2e\x34\x2e\65\60" => array("\x6e\141\x6d\145" => "\x4a\160\145\147\40\x4c\157\x73\163\171\40\x42\141\163\145\154\x69\156\145\x20\50\x31\x29\40\55\x20\x38\40\142\151\164\x73"), "\x31\56\62\56\70\x34\x30\x2e\61\60\x30\60\70\56\61\56\62\x2e\65" => array("\156\141\155\145" => "\122\114\x45\x20\x2d\x20\x52\165\156\x20\114\145\x6e\x67\164\x68\40\x45\x6e\x63\157\x64\151\x6e\147\x2c\x20\114\157\x73\163\154\x65\163\163")); public function set_driver($driver) { self::$driver = $driver; return $this; } public function get_driver() { return self::$driver; } public function add_lossy_jpeg8($filename) { $dataset = array(); $blob = file_get_contents($filename); $value = array("\x6c\x65\x6e" => 0, "\x76\141\x6c" => '', "\x76\162" => "\x49\124", "\137\x76\x72" => "\x49\x54", "\x62\x69\x6e" => FALSE, "\157\x66\146" => 0, "\x64\x73" => array(), "\x64\157\x6e\x65" => TRUE); $dataset[0xfffe][0xe000][] = $value; $value = array("\154\x65\156" => sprintf("\x25\165", strlen($blob)), "\x76\x61\154" => $blob, "\166\x72" => "\x49\124", "\137\166\162" => "\111\x54", "\142\x69\x6e" => TRUE, "\x6f\x66\146" => 0, "\x64\163" => array(), "\x64\157\156\x65" => TRUE); $dataset[0xfffe][0xe000][] = $value; $value = array("\154\x65\156" => -1, "\166\141\154" => '', "\166\x72" => "\117\x42", "\x5f\166\x72" => "\x4f\102", "\x62\151\x6e" => FALSE, "\x6f\146\146" => 0, "\144\x73" => $dataset, "\x64\x6f\x6e\145" => TRUE); $this->_dataset[0x7fe0][0x10][0] = $value; $value = array("\154\145\x6e" => 0, "\x76\141\154" => '', "\x76\162" => "\x44\111", "\x5f\x76\162" => "\104\111", "\142\151\156" => FALSE, "\157\x66\x66" => 0, "\144\163" => array(), "\x64\x6f\156\145" => TRUE); $this->_dataset[0xfffe][0xe0dd][0] = $value; $info = getimagesize($filename); $this->value(0x28, 0x10, (int) $info[1]); $this->value(0x28, 0x11, (int) $info[0]); $this->value(0x28, 0x100, 8); $this->value(0x28, 0x101, 8); $this->value(0x28, 0x102, 7); $this->value(0x28, 0x2, 1); $this->value(0x28, 0x4, "\x4d\x4f\116\x4f\x43\110\122\117\115\x45\62"); $this->value(0x2, 0x10, "\61\56\62\x2e\70\x34\60\56\61\60\x30\60\70\x2e\x31\56\62\x2e\x34\x2e\65\60"); return $this; } public function get_images($width = NULL, $center = NULL) { $this->parse(); $this->profiler["\x70\x69\x78\145\154"]["\163\x74\x61\162\x74"] = microtime(TRUE); $return = $this->_check_driver(); if (!$return) { return FALSE; } if (!array_key_exists(trim($this->_transfer_syntax), self::$reading_image_transfer_syntaxes)) { throw new Nanodicom_Exception("\124\x72\x61\156\x73\146\x65\x72\x20\x73\171\156\164\141\x78\x20\42\72\163\x79\x6e\x74\x61\170\42\40\x6e\x6f\164\40\163\165\x70\160\157\162\x74\x65\x64", array("\72\x73\171\x6e\x74\x61\x78" => $this->_transfer_syntax), 300); } $rows = $this->get(0x28, 0x10); $cols = $this->get(0x28, 0x11); if ($rows == NULL or $cols === NULL) { throw new Nanodicom_Exception("\x54\x68\145\162\x65\x20\x69\x73\x20\x6e\157\40\x72\x6f\167\x73\54\40\x6e\x6f\x20\163\x61\155\160\154\145\x73\x20\x70\145\162\x20\160\151\170\x65\154\x2c\x20\x6e\x6f\x20\160\151\170\x65\x6c\40\x64\x61\x74\x61\x20\157\x72\x20\155\x61\154\x66\157\162\155\x65\144\40\144\151\x63\157\x6d\x20\x66\x69\x6c\145", NULL, 301); } $samples_per_pixel = $this->get(0x28, 0x2, 1); $bits_allocated = $this->get(0x28, 0x100); $bits_stored = $this->get(0x28, 0x101); $high_bit = $this->get(0x28, 0x102); $dose_scaling = $this->get(0x3004, 0xe, 1); $window_width = $width == NULL ? $this->get(0x28, 0x1051, 0) : $width; $window_center = $center == NULL ? $this->get(0x28, 0x1050, 0) : $center; $rescale_intercept = $this->get(0x28, 0x1052, 0); $rescale_slope = $this->get(0x28, 0x1053, 1); $number_of_frames = (int) $this->get(0x28, 0x8, 1); $pixel_representation = $this->get(0x28, 0x103); $photometric_interpretation = trim($this->get(0x28, 0x4, "\x4e\117\116\x45")); $planar_configuration = $this->get(0x28, 0x6, 0); $transfer_syntax_uid = trim($this->get(0x2, 0x10)); $blob = $this->get(0x7fe0, 0x10); $this->_rows = $rows; $this->_cols = $cols; $this->_dose_scaling = $dose_scaling; $this->_rescale_slope = $rescale_slope; $this->_rescale_intercept = $rescale_intercept; $this->_samples_per_pixel = $samples_per_pixel; $this->_pixel_representation = $pixel_representation; if (!(strpos($window_center, "\x5c") === FALSE)) { $temp = explode("\x5c", $window_center); $window_center = (int) $temp[0]; } if (!(strpos($window_width, "\x5c") === FALSE)) { $temp = explode("\x5c", $window_width); $window_width = (int) $temp[0]; } $images = array(); $max = array(); $min = array(); $current_position = $starting_position = 0; $current_image = 0; $bytes_to_read = (int) $bits_allocated / 8; $image_size = $cols * $rows * $samples_per_pixel * $bytes_to_read; list($vr_mode, $endian) = Nanodicom::decode_transfer_syntax($transfer_syntax_uid); $this->_vr_mode = $vr_mode; $this->_endian = $endian; if ($transfer_syntax_uid == "\x31\x2e\62\x2e\x38\64\60\56\61\x30\x30\x30\x38\56\61\56\62\x2e\64\x2e\65\x30") { $images = array(); $counter = 0; foreach ($blob as $group => $elements) { foreach ($elements as $element => $indexes) { if ($element == Nanodicom::SEQUENCE_DELIMITER) { continue; } foreach ($indexes as $values) { $data = $values; if ($counter == 0) { } else { if (!isset($data["\144\157\x6e\x65"])) { $this->_read_value_from_blob($data, $group, $element); } $images[] = $this->_read_image_blob($data["\x76\141\x6c"]); } $counter++; } } } return $images; } if ($transfer_syntax_uid == "\x31\x2e\x32\x2e\70\64\x30\x2e\x31\x30\x30\60\x38\56\x31\x2e\62\x2e\65") { $counter = 0; $temp = array(); foreach ($blob as $group => $elements) { foreach ($elements as $element => $indexes) { if ($element == Nanodicom::SEQUENCE_DELIMITER) { continue; } foreach ($indexes as $values) { $data = $values; $data["\x67"] = $group; $data["\145"] = $element; if ($counter == 0) { } else { $dir = realpath(dirname($this->_location)) . DIRECTORY_SEPARATOR; $file = basename($this->_location); if (!isset($data["\144\157\x6e\145"])) { $this->_read_value_from_blob($data, $group, $element); } $item = $data["\166\x61\154"]; $header = array(); for ($i = 0; $i <= 16; $i++) { $chunk = substr($item, 4 * $i, 4); $header[] = $this->{Nanodicom::$_read_int}(4, Nanodicom::LITTLE_ENDIAN, 4, Nanodicom::UNSIGNED, $chunk); } $total_segments = array_shift($header); $segment_index = 0; foreach ($header as $starting_byte_of_segment) { if ($starting_byte_of_segment == 0) { break; } $size_of_segment = $header[$segment_index + 1] == 0 ? strlen($item) - $starting_byte_of_segment : $header[$segment_index + 1] - $starting_byte_of_segment; $temp[$counter - 1][$segment_index] = ''; $expected_segment_size = $cols * $rows * $bytes_to_read / $total_segments; $bytes_count = $current_segment_size = 0; while ($bytes_count < $size_of_segment) { $tmp = $starting_byte_of_segment + $bytes_count; $n = substr($item, $starting_byte_of_segment + $bytes_count, 1); $n = $this->{Nanodicom::$_read_int}(1, Nanodicom::LITTLE_ENDIAN, 1, Nanodicom::SIGNED, $n); $bytes_count++; if ($n >= 0 and $n <= 127) { $temp[$counter - 1][$segment_index] .= substr($item, $starting_byte_of_segment + $bytes_count, $n + 1); $bytes_count = $bytes_count + $n + 1; $current_segment_size = $current_segment_size + $n + 1; } elseif ($n <= -1 and $n >= -127) { $byte = substr($item, $starting_byte_of_segment + $bytes_count, 1); $temp[$counter - 1][$segment_index] .= str_repeat($byte, -$n + 1); $bytes_count++; $current_segment_size = $current_segment_size - $n + 1; } else { } } $segment_index++; } } $counter++; } } } $counter--; $blob = ''; for ($count = 0; $count < $counter; $count++) { if ($photometric_interpretation == "\122\107\x42") { if ($planar_configuration == 1) { $blob .= implode('', $temp[$count]); } else { } } else { $dimension = $cols * $rows; for ($i = 0; $i < $dimension; $i++) { $part = ''; foreach ($temp[$count] as $segment) { $part = substr($segment, $i, 1) . $part; } $blob .= $part; } } } } if ($photometric_interpretation == "\x50\x41\x4c\105\x54\124\x45\40\x43\x4f\x4c\117\122") { $this->_samples_per_pixel = 3; $palettes = array(); $palettes["\122"] = array($this->get(0x28, 0x1101), $this->get(0x28, 0x1201)); $palettes["\x47"] = array($this->get(0x28, 0x1102), $this->get(0x28, 0x1202)); $palettes["\102"] = array($this->get(0x28, 0x1103), $this->get(0x28, 0x1203)); $palettes["\101"] = array($this->get(0x28, 0x1104), $this->get(0x28, 0x1204)); $entries = (int) $palettes["\x52"][0]["\x76\141\x6c\61"]; $entries = $entries == 0 ? pow(2, 16) : $entries; $first = $palettes["\122"][0]["\x76\141\154\x32"]; $size = $palettes["\122"][0]["\166\141\154\x33"]; $palette_byte_size = (int) $size / 8; $offset = 8; $current_position = 0; $colors = array("\x52", "\x47", "\102"); for ($index = 0; $index < $number_of_frames; $index++) { $image = self::create_image($cols, $rows); for ($y = 0; $y < $rows; $y++) { for ($x = 0; $x < $cols; $x++) { $rgb = array(); $value = $this->_read_gray($blob, $current_position, $bytes_to_read); $palette_index = $value <= $first ? $first : ($value > $first + $entries ? $first + $entries - 1 : $value); $current_position += $bytes_to_read; for ($sample = 0; $sample < 3; $sample++) { $tmp = $this->_read_gray($palettes[$colors[$sample]][1], $palette_byte_size * $palette_index, $palette_byte_size); $rgb[$sample] = $tmp >> 8; } $color = $this->_allocate_color_rgb($image, $rgb); $rgb = NULL; $this->_set_pixel($image, $x, $y, $color); $color = NULL; } } $images[] = $image; $image = NULL; } return $images; } else { if (($window_center == 0 or $window_width == 0) and $samples_per_pixel == 1) { $length = strlen($blob); while ($current_position < $starting_position + $length) { if ($current_position == $starting_position + $current_image * $image_size) { $x = 0; $y = 0; $max[$current_image] = -200000; $min[$current_image] = 200000; $current_image++; } $gray = $this->_read_gray($blob, $current_position, $bytes_to_read); $current_position += $bytes_to_read; if ($gray > $max[$current_image - 1]) { $max[$current_image - 1] = $gray; } if ($gray < $min[$current_image - 1]) { $min[$current_image - 1] = $gray; } $y++; if ($y == $cols) { $x++; $y = 0; } } } } $current_position = $starting_position = 0; for ($index = 0; $index < $number_of_frames; $index++) { if ($samples_per_pixel == 1) { $maximum = ($window_center != 0 and $window_width != 0) ? round($window_center + $window_width / 2) : $max[$index]; $minimum = ($window_center != 0 and $window_width != 0) ? round($window_center - $window_width / 2) : $min[$index]; $maximum = (!empty($window) and !empty($level)) ? round($level + $window / 2) : $maximum; $minimum = (!empty($window) and !empty($level)) ? round($level - $window / 2) : $minimum; if ($maximum == $minimum) { throw new Nanodicom_Exception("\104\151\x76\x69\163\x69\157\x6e\x20\142\171\x20\172\145\x72\x6f", NULL, 302); } } $image = self::create_image($cols, $rows); $pixels = array(); for ($y = 0; $y < $rows; $y++) { for ($x = 0; $x < $cols; $x++) { switch ($samples_per_pixel) { case 1: $gray = $this->_read_gray($blob, $current_position, $bytes_to_read); $current_position += $bytes_to_read; $gray = $gray > $maximum ? $maximum : $gray; $gray = $gray < $minimum ? $minimum : $gray; $gray = ($gray - $minimum) / ($maximum - $minimum) * 255; if ($photometric_interpretation == "\115\117\116\117\x43\x48\122\x4f\x4d\x45\x31") { $gray = 255 - $gray; } $color = $this->_allocate_color_gray($image, $gray); $gray = NULL; break; case 3: $rgb = array(); for ($sample = 0; $sample < $samples_per_pixel; $sample++) { $current_position = $planar_configuration == 0 ? $current_position : $sample * ($rows * $cols) + ($y * $cols + $x); $rgb[$sample] = $this->_read_gray($blob, $current_position, $bytes_to_read); $current_position += $bytes_to_read; } $color = $this->_allocate_color_rgb($image, $rgb); $rgb = NULL; break; default: break; } $this->_set_pixel($image, $x, $y, $color); $color = NULL; } } $images[] = $image; $image = NULL; } $this->profiler["\160\151\170\x65\x6c"]["\145\x6e\144"] = microtime(TRUE); return $images; } public function write_image($image, $location, $format = "\152\x70\x67") { switch (self::$driver) { case "\x67\x64": switch ($format) { case "\160\156\147": imagepng($image, $location . "\56\160\x6e\147"); break; case "\x67\x69\x66": imagegif($image, $location . "\x2e\x67\x69\146"); break; case "\x6a\160\x67": default: imagejpeg($image, $location . "\x2e\152\x70\147"); break; } break; case "\147\155\141\x67\x69\x63\x6b": case "\x69\155\141\x67\151\143\153": switch ($format) { case "\x70\156\x67": $format = "\160\x6e\147"; break; case "\x67\151\x66": $format = "\147\151\146"; break; default: $format = "\x6a\160\x67"; break; } $image->writeImage($location . "\56" . $format); break; } return TRUE; } protected function _read_image_blob($string) { switch (self::$driver) { case "\147\x64": return imagecreatefromstring($string); case "\147\x6d\x61\x67\151\143\x6b": case "\151\155\141\x67\151\x63\x6b": $image = new imagick(); $image->readImageBlob($string); return $image; } return FALSE; } protected function _allocate_color_rgb($image, $rgb) { switch (self::$driver) { case "\147\x64": return imagecolorallocate($image, $rgb[0], $rgb[1], $rgb[2]); case "\147\155\x61\x67\151\143\x6b": return new GmagickPixel("\162\147\x62\50" . $rgb[0] . "\54" . $rgb[1] . "\54" . $rgb[2] . "\x29"); case "\151\155\141\147\x69\x63\x6b": return new ImagickPixel("\162\x67\142\x28" . $rgb[0] . "\54" . $rgb[1] . "\54" . $rgb[2] . "\x29"); } return FALSE; } protected function _allocate_color_gray($image, $gray) { switch (self::$driver) { case "\x67\144": return imagecolorallocate($image, $gray, $gray, $gray); case "\147\155\x61\147\x69\x63\153": return new GmagickPixel("\x72\147\x62\50" . $gray . "\54" . $gray . "\x2c" . $gray . "\51"); case "\151\155\141\147\151\143\153": return new ImagickPixel("\162\147\142\50" . $gray . "\x2c" . $gray . "\54" . $gray . "\51"); } return FALSE; } protected function _set_pixel(&$image, $x, $y, $color) { switch (self::$driver) { case "\147\144": imagesetpixel($image, $x, $y, $color); return TRUE; case "\x67\155\141\x67\151\143\x6b": $draw = new GmagickDraw(); $draw->setFillColor($color); $draw->point($x, $y); $image->drawImage($draw); return TRUE; case "\151\155\x61\147\x69\x63\153": $draw = new ImagickDraw(); $draw->setFillColor($color); $draw->point($x, $y); $image->drawImage($draw); return TRUE; } return FALSE; } public static function create_image($cols, $rows) { switch (self::$driver) { case "\x67\144": return imagecreatetruecolor($cols, $rows); case "\x67\155\x61\x67\151\x63\x6b": $image = new Gmagick(); $image->newImage($cols, $rows, "\x6e\157\156\x65"); return $image; case "\x69\x6d\x61\147\x69\143\153": $image = new Imagick(); $image->newImage($cols, $rows, "\156\157\156\x65"); return $image; } return FALSE; } protected function _check_driver() { switch (self::$driver) { case "\x67\x64": return function_exists("\151\155\x61\x67\x65\143\162\145\x61\164\145\x74\162\165\145\143\157\x6c\157\x72"); case "\x67\x6d\141\x67\151\143\x6b": return class_exists("\107\155\141\147\x69\x63\x6b"); case "\151\155\x61\x67\151\143\153": return class_exists("\x49\155\x61\x67\x69\143\x6b"); } return FALSE; } protected function _read_gray($blob, $current_position, $bytes_to_read) { if ($this->_samples_per_pixel == 1) { $chunk = substr($blob, $current_position, $bytes_to_read); $gray = $this->{Nanodicom::$_read_int}($bytes_to_read, $this->_endian, $bytes_to_read, Nanodicom::UNSIGNED, $chunk); $chunk = NULL; $gray = $this->_pixel_representation ? self::complement2($gray, $this->_high_bit) : $gray; $gray = $gray * $this->_rescale_slope + $this->_rescale_intercept; return $gray * $this->_dose_scaling; } else { $chunk = substr($blob, $current_position, $bytes_to_read); return $this->{Nanodicom::$_read_int}($bytes_to_read, $this->_endian, $bytes_to_read, Nanodicom::UNSIGNED, $chunk); } } public static function complement2($number, $high_bit = 15) { $sign = $number >> $high_bit; if ($sign) { $number = -pow(2, $high_bit + 1) - $number; } return $number; } } diff --git a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/simple.php b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/simple.php index c15c6a2..85b6c00 100644 --- a/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/simple.php +++ b/server/original/www/ezwebserver/src/application/libraries/nanodicom/tools/simple.php @@ -1,7 +1,7 @@ modify($ago); $setDate = $date->format(DATAFORMAT[DATEFORMAT_DATABASE]); load_database($this, "\105\x32\x44\x42"); $this->db->set("\141\x63\x63\x5f\x70\141\x73\163\167\157\x72\x64\x5f\165\x70\x64\141\164\145\144", $setDate); $this->db->where("\x61\143\143\137\x75\x73\145\162\x6e\x61\155\145", $userName); $this->db->update("\145\x32\x5f\141\x63\x63"); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/AcqInformations_model.php b/server/original/www/ezwebserver/src/application/models/AcqInformations_model.php index b345fad..ed0f727 100644 --- a/server/original/www/ezwebserver/src/application/models/AcqInformations_model.php +++ b/server/original/www/ezwebserver/src/application/models/AcqInformations_model.php @@ -1,7 +1,7 @@ db->query($sql)->result_array(); $acqInfoList = array(); if (count($sqlResult) < 1) { return array("\145\162\x72\x6f\162\x43\x6f\x64\145" => VERR_DB_NOSUCHDATA, "\x61\143\x71\x49\x6e\146\x6f\x4c\x69\163\x74" => $acqInfoList); } foreach ($sqlResult as $row) { $patInfo = SPatientInfo::createFromDBRecord($row); $imgInfo = SImageInfo::createFromDBRecord($row); $socialIDProtector = new SocialIDProtector(); if ($socialIDProtector->is_encrypted($patInfo->strSocialID) && !empty($patInfo->strSocialID)) { $decrypt = $socialIDProtector->decrypt_data($patInfo->strSocialID); $patInfo->strSocialID = $decrypt["\x64\145\x63\162\171\x70\164\145\144\x44\x61\164\141"]; } $strDoctors = $this->AttendingDoctors_model->get_AttendingDoctorsForChartNo($patInfo->strChartNo)["\x64\x6f\x63\164\x6f\162\116\141\155\x65\x4c\x69\163\x74"]; $patInfo->strlDoctor = $strDoctors; array_push($acqInfoList, array("\x69\x6d\x67\x49\156\x66\157" => $imgInfo, "\x70\141\x74\x49\156\146\x6f" => $patInfo)); } return array("\x65\x72\162\x6f\162\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\141\x63\161\111\x6e\x66\x6f\114\x69\x73\164" => $acqInfoList); } } diff --git a/server/original/www/ezwebserver/src/application/models/Analyses_model.php b/server/original/www/ezwebserver/src/application/models/Analyses_model.php index aa042f7..fc8e327 100644 --- a/server/original/www/ezwebserver/src/application/models/Analyses_model.php +++ b/server/original/www/ezwebserver/src/application/models/Analyses_model.php @@ -1,7 +1,7 @@ db->select("\145\x32\137\x6f\x72\x74\x68\157\x5f\x61\x6e\141\x6c\x79\163\x65\x73\56\x6f\164\x68\137\x61\x6e\x61\154\171\x73\151\163\x5f\156\141\x6d\145\x20\141\163\40\156\141\155\145\x2c\x65\x32\x5f\157\162\x74\x68\157\137\x61\x6e\x61\x6c\x79\163\x65\163\56\157\164\150\x5f\x61\156\141\x6c\171\x73\151\x73\x5f\154\141\x62\145\154\40\x61\x73\40\x6c\141\142\145\x6c\x2c\x65\x32\137\x6f\162\x74\x68\157\137\141\x6e\141\x6c\x79\163\145\163\56\157\x74\150\137\x61\x6e\x61\154\171\163\x69\x73\x5f\165\x73\145\x72\137\x61\x64\x64\x65\144\x20\141\163\40\165\x73\x65\162\137\141\x64\x64\x65\x64\54\145\62\x5f\x6f\162\x74\x68\x6f\137\141\x6e\x61\154\x79\x73\145\x73\56\157\x74\x68\137\141\x6e\141\x6c\171\163\151\163\x5f\x64\151\x73\165\x73\145\144"); $this->db->from("\x65\62\x5f\x6f\x72\x74\150\x6f\x5f\x61\156\141\154\x79\x73\145\x73"); $this->db->join("\145\62\x5f\x6f\x72\164\150\x6f\137\x61\x6e\x61\154\171\163\x69\x73\x5f\x67\x75\151\144\145\x6c\x69\x6e\x65\x73", "\145\62\x5f\157\162\x74\x68\x6f\x5f\x61\x6e\x61\154\171\163\145\x73\56\157\164\150\x5f\x61\x6e\141\x6c\x79\163\151\x73\137\151\144\40\x3d\40\145\x32\x5f\157\162\x74\x68\157\137\x61\x6e\x61\154\171\x73\151\163\137\147\165\x69\x64\x65\x6c\x69\x6e\145\163\56\x6f\164\150\x5f\141\156\141\x6c\x79\163\x69\x73\x5f\151\x64"); $this->db->join("\145\62\137\157\x72\x74\x68\x6f\x5f\147\x75\151\144\145\x6c\x69\x6e\145\163", "\x65\x32\137\157\x72\164\150\x6f\x5f\147\x75\151\x64\x65\154\151\x6e\145\x73\x2e\157\x74\150\x5f\147\x75\x69\x64\145\x6c\151\156\x65\x5f\151\144\40\x3d\40\145\x32\x5f\157\162\164\150\x6f\137\141\156\141\154\171\x73\151\x73\x5f\147\165\151\144\x65\x6c\x69\156\x65\163\x2e\157\164\x68\x5f\x67\x75\151\x64\x65\154\151\156\x65\x5f\151\x64"); $this->db->join("\145\x32\x5f\x6f\162\x74\150\x6f\137\151\155\141\x67\x65\x5f\x6d\157\x64\x61\154\x69\164\151\145\163", "\145\62\x5f\157\x72\164\150\157\137\141\156\141\154\171\x73\145\x73\56\157\164\x68\137\151\x6d\147\x5f\x6d\x6f\x64\141\154\x69\164\x79\137\x69\144\40\x3d\x20\145\62\137\157\x72\164\150\x6f\137\151\x6d\141\147\x65\137\155\x6f\x64\x61\x6c\x69\x74\151\145\x73\56\157\164\x68\x5f\151\x6d\147\137\x6d\157\144\x61\154\151\164\x79\x5f\151\144"); $this->db->where("\145\x32\137\x6f\162\x74\150\157\x5f\151\x6d\141\147\145\137\x6d\157\144\x61\154\151\x74\151\x65\163\x2e\157\164\150\x5f\x69\x6d\147\137\x6d\x6f\x64\141\154\x69\164\171\x5f\156\x61\x6d\145", $modality); $this->db->where("\x65\x32\x5f\x6f\162\164\x68\x6f\137\x67\165\151\x64\145\154\151\156\x65\x73\56\x6f\x74\150\137\147\x75\151\x64\145\154\x69\x6e\145\x5f\156\x61\155\x65", $guidelinename); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sAnalyses = new SLabeledAnalysis($row); array_push($items, $sAnalyses); } return ["\145\162\x72\157\162\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\x61\156\141\x6c\171\x73\145\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_Analyses($analysisname, $modality) { $this->load->helper("\x76\x74\x5f\160\x67\137\152\163\x6f\156\137\150\145\154\x70\x65\x72"); load_database($this, "\x45\x32\104\x42"); $this->db->select("\x6f\x74\x68\137\141\x6e\x61\x6c\171\x73\x69\x73\137\x69\144\x2c\157\164\150\x5f\x61\156\141\x6c\x79\163\x69\x73\x5f\156\x61\x6d\145\54\x6f\164\x68\137\x61\156\141\154\x79\x73\x69\163\137\154\x61\x62\x65\154\54\157\x74\x68\137\141\156\141\x6c\x79\163\151\163\x5f\165\163\x65\x72\x5f\x61\144\144\x65\x64\x2c\145\62\137\157\x72\x74\x68\157\137\x61\156\x61\x6c\x79\163\145\x73\56\157\164\150\x5f\151\155\147\x5f\155\157\x64\x61\154\151\164\171\x5f\x69\144\54\x65\62\x5f\157\162\x74\150\x6f\x5f\x61\x6e\141\154\171\x73\x65\163\56\x6f\164\x68\x5f\141\156\x61\154\171\163\x69\163\137\x64\x69\x73\165\163\145\144"); $this->db->from("\145\62\x5f\157\x72\x74\150\x6f\x5f\141\x6e\x61\154\171\x73\x65\x73"); $this->db->join("\x65\62\137\x6f\162\164\x68\x6f\x5f\x69\x6d\141\147\145\137\155\x6f\x64\x61\x6c\151\164\x69\x65\x73", "\145\62\x5f\x6f\x72\x74\150\157\137\x61\156\141\x6c\x79\x73\145\x73\56\157\x74\150\x5f\x69\155\x67\137\155\x6f\x64\x61\154\151\x74\171\137\x69\144\40\75\x20\145\x32\x5f\157\162\164\x68\x6f\x5f\151\x6d\141\x67\x65\137\155\x6f\x64\141\154\x69\x74\x69\x65\x73\x2e\157\164\150\137\x69\155\x67\x5f\155\157\144\x61\154\151\164\x79\x5f\x69\x64"); $this->db->where("\145\x32\x5f\x6f\162\x74\150\157\x5f\x69\x6d\141\x67\x65\x5f\155\x6f\144\141\x6c\x69\164\151\145\163\x2e\157\x74\x68\137\151\x6d\147\x5f\x6d\x6f\x64\141\x6c\x69\x74\x79\x5f\156\x61\155\x65", $modality); $this->db->where("\x65\62\x5f\x6f\162\164\150\x6f\137\x61\x6e\141\x6c\x79\x73\x65\x73\x2e\157\164\x68\137\x61\156\x61\154\x79\x73\151\163\x5f\x6e\141\155\x65", $analysisname); $this->db->limit(1); $analyses_row = $this->db->get()->row(); if (isset($analyses_row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $analysis_id = intval($analyses_row->oth_analysis_id); $modality_id = intval($analyses_row->oth_img_modality_id); $sAnalysis = new SAnalysis($analyses_row); $landmarkNames = array(); $this->db->select("\145\x32\137\157\x72\164\150\x6f\x5f\x61\156\141\x6c\171\163\x69\x73\x5f\155\x65\x61\x73\x75\162\x65\x6d\145\156\x74\163\x2e\157\x74\150\x5f\x61\156\x61\x6c\171\163\151\163\x5f\x6d\x65\141\x73\x75\162\145\155\145\156\x74\137\147\x72\x6f\165\160\54\145\62\x5f\x6f\x72\x74\x68\x6f\x5f\141\156\141\x6c\x79\163\x69\163\x5f\155\145\141\163\165\x72\x65\155\x65\156\164\x73\x2e\157\164\x68\x5f\x61\x6e\x61\154\x79\x73\151\x73\137\x6d\145\x61\163\165\162\145\155\145\156\x74\137\x6f\162\144\x65\162\x2c\x65\x32\137\x6f\162\x74\x68\157\137\155\x65\141\x73\x75\x72\145\155\x65\156\x74\x73\x2e\x6f\164\x68\137\x6d\145\141\x73\x75\162\x65\x6d\x65\156\x74\137\156\x61\155\x65\40\141\x73\x20\156\x61\155\x65\54\145\62\137\x6f\x72\164\150\157\137\155\145\x61\x73\x75\162\x65\155\x65\x6e\x74\x73\56\x6f\164\150\x5f\x6d\x65\x61\x73\x75\162\x65\x6d\145\156\164\x5f\x6c\x61\x62\145\154\x20\x61\x73\40\154\141\x62\x65\x6c\x2c\x65\62\x5f\x6f\x72\x74\150\x6f\x5f\155\x65\x61\x73\x75\x72\145\x6d\x65\156\x74\x73\56\157\164\150\x5f\155\x65\x61\x73\x75\162\145\155\145\156\164\x5f\165\x73\145\162\x5f\141\x64\144\x65\x64\x20\141\163\x20\165\x73\x65\162\x5f\x61\x64\x64\x65\144\54\x65\62\137\x6f\162\164\150\x6f\137\155\x65\141\x73\165\162\x65\x6d\x65\x6e\164\163\56\157\164\150\x5f\x6d\x65\141\x73\165\162\x65\x6d\145\x6e\164\137\x70\x61\x72\141\155\x73\54\145\x32\x5f\157\162\x74\x68\x6f\x5f\x61\156\141\x6c\x79\x73\x69\x73\x5f\x6d\145\141\163\x75\x72\145\x6d\145\156\164\163\56\157\164\x68\137\141\156\x61\x6c\x79\163\151\x73\137\x6d\145\x61\163\165\x72\145\155\x65\x6e\164\137\x64\x69\163\x70\x6c\x61\x79"); $this->db->from("\145\62\137\x6f\x72\164\150\x6f\x5f\x6d\x65\141\163\165\x72\x65\155\145\x6e\164\163"); $this->db->join("\145\x32\137\157\162\x74\x68\x6f\137\141\156\x61\154\x79\x73\x69\x73\137\155\x65\x61\163\165\x72\145\x6d\145\x6e\164\x73", "\145\62\x5f\x6f\162\x74\150\157\137\x6d\x65\x61\163\x75\162\145\x6d\x65\x6e\164\163\56\x6f\x74\x68\x5f\155\145\x61\x73\x75\x72\145\x6d\145\156\x74\137\151\x64\x20\75\x20\145\62\x5f\157\162\x74\x68\x6f\137\x61\x6e\x61\154\x79\163\x69\x73\137\155\x65\x61\x73\165\162\145\155\145\x6e\x74\x73\56\x6f\164\150\x5f\x6d\145\141\163\x75\162\145\x6d\145\156\164\x5f\x69\144"); $this->db->where("\x65\x32\137\157\x72\x74\x68\x6f\137\141\x6e\141\154\171\x73\151\163\x5f\155\x65\141\163\165\162\x65\155\x65\156\x74\x73\x2e\157\x74\x68\x5f\141\x6e\x61\x6c\x79\163\151\x73\137\x69\x64", $analysis_id); $this->db->where("\145\x32\x5f\x6f\162\164\x68\157\137\155\x65\x61\163\165\162\x65\x6d\x65\x6e\x74\163\x2e\x6f\x74\150\137\151\155\x67\137\x6d\x6f\144\x61\x6c\151\x74\171\x5f\x69\x64", $modality_id); $this->db->order_by("\145\62\x5f\x6f\162\164\x68\x6f\137\x61\x6e\141\x6c\171\163\151\x73\x5f\155\x65\141\x73\x75\162\x65\x6d\145\156\164\x73\56\157\x74\x68\x5f\141\x6e\x61\x6c\x79\163\x69\163\137\x6d\145\x61\x73\x75\162\145\x6d\x65\156\164\137\147\162\x6f\165\160", "\101\123\103"); $this->db->order_by("\x65\x32\137\x6f\162\x74\x68\157\x5f\141\x6e\141\154\171\x73\151\x73\x5f\155\x65\141\163\165\x72\x65\155\145\156\x74\163\56\157\164\150\x5f\x61\x6e\x61\x6c\171\163\151\x73\x5f\155\x65\x61\163\x75\162\x65\155\145\x6e\x74\137\157\162\x64\145\162", "\101\x53\103"); $measurement_rows = $this->db->get()->result_array(); if (count($measurement_rows) > 0) { foreach ($measurement_rows as $row) { if (empty($groupname) || $groupname != $row["\157\x74\150\x5f\141\x6e\x61\x6c\x79\163\x69\163\137\x6d\145\x61\163\165\x72\x65\155\x65\x6e\x74\137\x67\162\x6f\x75\x70"]) { $groupname = $row["\x6f\164\150\x5f\x61\x6e\141\154\x79\x73\151\x73\137\155\x65\x61\163\x75\x72\145\155\145\x6e\164\137\147\162\x6f\x75\160"]; $sMeasurementGroup = new SMeasurementGroup($groupname); array_push($sAnalysis->measurementGroups, $sMeasurementGroup); } $sMeasurement = new SLabeledMeasurement($row); array_push($sMeasurementGroup->measurements, $sMeasurement); } $landmarkNames = array_merge($landmarkNames, getValuesInJsonParams($measurement_rows, "\x6f\164\x68\137\155\145\141\163\165\162\x65\155\x65\156\x74\x5f\x70\141\x72\141\x6d\x73", "\154\141\156\144\x6d\x61\x72\153")); } $this->db->select("\x65\62\x5f\x6f\x72\x74\150\x6f\137\x67\165\x69\144\x65\154\151\x6e\x65\163\56\x6f\164\150\x5f\147\165\x69\x64\x65\154\x69\156\145\137\156\141\155\x65\40\141\x73\40\156\x61\x6d\x65\x20\x2c\x65\62\137\157\162\164\x68\x6f\137\x67\x75\151\144\145\154\x69\156\x65\x73\x2e\x6f\164\150\137\147\x75\x69\x64\145\x6c\x69\x6e\x65\x5f\154\141\142\x65\x6c\40\x61\163\x20\x6c\141\142\x65\x6c\x2c\145\x32\137\x6f\x72\x74\x68\x6f\x5f\x67\x75\x69\x64\145\x6c\x69\x6e\x65\x73\x2e\157\164\x68\137\x67\165\x69\144\145\154\x69\x6e\145\137\165\163\x65\x72\137\x61\x64\x64\145\x64\x20\x61\163\x20\x75\163\x65\x72\x5f\x61\144\144\x65\144\x2c\145\x32\x5f\x6f\162\x74\x68\157\137\x67\x75\151\x64\x65\x6c\151\x6e\x65\163\56\x6f\164\150\x5f\x67\165\x69\x64\x65\x6c\151\156\145\137\160\141\162\x61\x6d\163"); $this->db->from("\x65\x32\137\157\x72\164\150\157\x5f\147\x75\151\144\145\x6c\151\156\x65\x73"); $this->db->join("\x65\62\x5f\x6f\162\164\x68\157\x5f\x61\x6e\x61\x6c\x79\163\x69\x73\x5f\x67\x75\x69\144\x65\154\x69\156\x65\x73", "\145\x32\x5f\x6f\162\x74\150\157\137\147\x75\x69\x64\145\x6c\151\x6e\x65\x73\x2e\x6f\164\x68\x5f\147\x75\151\144\x65\x6c\x69\156\x65\137\x69\x64\x20\x3d\x20\145\62\137\157\x72\x74\150\x6f\137\141\x6e\x61\154\171\163\x69\163\137\147\165\151\x64\x65\154\151\156\145\x73\56\157\164\150\x5f\x67\x75\x69\144\145\x6c\151\x6e\x65\x5f\151\x64"); $this->db->where("\145\x32\x5f\x6f\x72\164\x68\157\137\x61\x6e\x61\x6c\171\163\x69\x73\137\x67\x75\151\x64\145\154\x69\x6e\x65\x73\x2e\157\164\150\x5f\141\x6e\141\154\171\x73\x69\x73\137\151\144", $analysis_id); $this->db->where("\x65\x32\x5f\x6f\x72\x74\150\x6f\137\x67\x75\x69\144\145\x6c\151\x6e\x65\x73\x2e\x6f\x74\150\x5f\151\155\147\137\x6d\x6f\144\141\x6c\151\164\x79\137\x69\144", $modality_id); $guideline_rows = $this->db->get()->result_array(); if (count($guideline_rows) > 0) { foreach ($guideline_rows as $row) { $sGuideline = new SLabeledGuideline($row); array_push($sAnalysis->guidelines, $sGuideline); } $landmarkNames = array_merge($landmarkNames, getValuesInJsonParams($guideline_rows, "\x6f\164\x68\137\147\x75\x69\144\145\x6c\151\x6e\145\x5f\160\x61\162\x61\155\163", "\x6c\x61\156\x64\x6d\141\162\153")); } if (count($landmarkNames) > 0) { $landmarkNames = array_unique($landmarkNames); $this->db->select("\157\x74\150\137\154\x61\x6e\144\x6d\x61\162\x6b\x5f\x6e\141\x6d\145\x20\x61\x73\x20\156\141\155\x65\x2c\157\164\x68\x5f\154\x61\156\144\x6d\x61\162\x6b\137\x6c\x61\x62\x65\x6c\x20\x61\163\x20\x6c\x61\142\145\154\x2c\x6f\164\150\x5f\x6c\x61\x6e\x64\155\x61\162\x6b\x5f\165\x73\145\162\137\x61\144\144\145\144\x20\x61\163\40\x75\163\145\162\137\141\x64\144\145\x64\54\x6f\164\x68\137\x6c\141\156\144\155\141\x72\x6b\x5f\x74\x79\x70\x65\x20\x61\163\40\164\x79\160\x65"); $this->db->from("\145\x32\137\x6f\x72\x74\x68\x6f\x5f\x6c\141\156\x64\155\141\162\153\x73"); $this->db->where("\157\x74\150\x5f\x69\x6d\147\x5f\155\157\x64\x61\x6c\x69\164\171\137\151\144", $modality_id); $this->db->where_in("\x6f\x74\150\x5f\x6c\x61\x6e\x64\155\141\x72\153\137\x6e\141\155\145", $landmarkNames); $landmark_rows = $this->db->get()->result_array(); if (count($landmark_rows) > 0) { foreach ($landmark_rows as $row) { $sLandmark = new SLabeledLandmark($row); array_push($sAnalysis->landmarks, $sLandmark); } } } if (isset($sAnalysis)) { return ["\145\x72\x72\x6f\162\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\141\156\x61\x6c\171\x73\151\163\111\x6e\x66\x6f" => $sAnalysis]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function delete_Analyses($analysisname, $modality) { load_database($this, "\x45\x32\104\x42"); $this->db->where("\x6f\x74\150\x5f\x69\155\x67\137\155\x6f\144\x61\x6c\151\x74\171\137\156\x61\x6d\145", $modality); $this->db->where("\x65\x32\x5f\157\162\x74\x68\x6f\x5f\x69\155\x61\x67\x65\137\x6d\x6f\x64\141\154\151\x74\x69\x65\163\x2e\x6f\164\x68\x5f\151\155\147\137\x6d\157\144\141\154\x69\x74\x79\x5f\x69\144", "\x65\62\137\x6f\x72\164\150\157\x5f\x61\x6e\141\154\171\x73\x65\x73\x2e\x6f\164\150\137\x69\155\147\x5f\x6d\157\144\141\x6c\x69\x74\x79\x5f\x69\x64", FALSE); $select_modalityid = $this->db->get_compiled_select("\145\x32\x5f\157\x72\x74\x68\157\137\x69\155\x61\x67\145\x5f\155\x6f\144\141\x6c\151\x74\151\145\163"); $this->db->where("\x6f\x74\x68\137\141\156\141\154\171\163\x69\163\137\156\x61\x6d\x65", $analysisname); $this->db->where("\x65\170\x69\x73\164\163\x28{$select_modalityid}\51", NULL, FALSE); $this->db->delete("\145\62\137\157\162\x74\x68\x6f\137\x61\x6e\x61\x6c\171\163\145\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_AnalysesP3($landmarkname, $modality) { $this->load->helper("\166\164\137\160\147\137\152\x73\x6f\156\x5f\x68\145\x6c\160\145\x72"); load_database($this, "\x45\x32\x44\102"); $measureIds = getExistInJsonParams($this, "\145\62\x5f\157\x72\x74\x68\x6f\137\155\145\x61\163\x75\162\x65\155\145\x6e\x74\163", "\157\164\150\x5f\155\x65\x61\163\x75\162\145\x6d\x65\x6e\164\x5f\160\141\x72\141\155\x73", "\x6f\x74\150\x5f\x6d\145\x61\x73\165\162\145\155\145\x6e\x74\x5f\151\x64", "\x6c\141\156\144\x6d\141\x72\153", $landmarkname); $guidelineIds = getExistInJsonParams($this, "\x65\62\137\x6f\x72\x74\x68\157\x5f\147\x75\x69\x64\145\x6c\151\x6e\145\163", "\157\164\x68\137\x67\x75\151\x64\145\x6c\151\156\145\137\160\141\162\141\x6d\x73", "\x6f\x74\x68\x5f\x67\165\x69\144\145\x6c\151\x6e\145\x5f\x69\144", "\x6c\x61\x6e\x64\x6d\x61\x72\153", $landmarkname); if (count($measureIds) === 0 && count($guidelineIds) === 0) { return createResponse(VERR_DB_NOSUCHDATA); } if (count($measureIds) > 0) { $this->db->select("\145\x32\137\x6f\x72\164\x68\157\137\x61\156\141\x6c\171\163\x65\x73\x2e\x6f\164\150\137\141\x6e\141\154\171\x73\151\163\x5f\156\x61\x6d\x65\x20\141\x73\40\156\141\x6d\145\54\x65\x32\x5f\157\162\x74\x68\157\137\x61\x6e\141\x6c\x79\163\145\x73\56\157\x74\150\x5f\141\x6e\x61\x6c\171\163\151\x73\137\x6c\x61\142\x65\154\x20\x61\163\x20\154\141\142\x65\154\54\x65\62\x5f\x6f\x72\164\x68\157\137\x61\x6e\141\x6c\171\163\x65\x73\x2e\x6f\x74\x68\137\x61\x6e\141\x6c\171\x73\x69\x73\137\165\x73\x65\x72\137\141\144\x64\x65\144\x20\141\x73\x20\x75\x73\x65\162\137\141\144\x64\145\x64\x2c\x65\62\x5f\x6f\162\164\x68\157\137\x61\156\141\x6c\171\163\145\163\56\157\x74\x68\137\x61\x6e\141\x6c\171\x73\151\x73\x5f\x64\x69\x73\165\x73\145\x64"); $this->db->from("\x65\62\x5f\157\x72\x74\150\x6f\137\141\156\141\154\x79\163\145\163"); $this->db->join("\145\x32\x5f\x6f\162\164\x68\x6f\x5f\x61\x6e\141\154\x79\163\x69\163\137\x6d\145\x61\x73\x75\x72\145\x6d\x65\156\x74\163", "\x65\x32\x5f\157\162\164\x68\x6f\137\141\156\x61\154\x79\163\145\x73\x2e\157\164\x68\x5f\141\156\141\x6c\171\x73\x69\163\x5f\151\x64\40\75\40\145\x32\x5f\x6f\162\164\x68\x6f\137\x61\x6e\x61\154\x79\163\x69\x73\x5f\155\145\141\x73\x75\x72\145\x6d\x65\x6e\164\x73\x2e\x6f\164\150\137\x61\x6e\x61\154\171\x73\x69\163\x5f\151\x64"); $this->db->join("\x65\62\x5f\157\x72\x74\x68\157\x5f\x69\x6d\x61\x67\145\137\155\x6f\x64\141\154\x69\164\x69\x65\x73", "\145\62\x5f\157\x72\x74\x68\157\137\x61\156\141\x6c\x79\x73\145\163\56\157\x74\x68\137\151\155\x67\x5f\155\157\144\141\x6c\151\x74\171\x5f\x69\x64\40\x3d\x20\x65\62\137\x6f\162\x74\150\x6f\137\x69\x6d\x61\x67\x65\x5f\x6d\157\144\x61\154\151\x74\151\x65\163\56\157\164\150\137\151\x6d\147\x5f\155\157\x64\141\x6c\151\164\x79\x5f\151\144"); $this->db->where("\145\x32\x5f\x6f\x72\x74\150\157\x5f\151\x6d\141\147\145\137\155\157\x64\141\154\x69\164\x69\x65\x73\56\x6f\164\x68\137\x69\x6d\147\x5f\x6d\157\144\x61\x6c\x69\x74\x79\x5f\156\141\x6d\145", $modality); $this->db->where_in("\x65\x32\x5f\x6f\162\x74\150\157\137\141\x6e\x61\x6c\171\x73\151\x73\x5f\155\145\x61\163\x75\162\145\155\x65\x6e\x74\163\x2e\x6f\x74\x68\x5f\x6d\145\141\163\165\162\x65\155\x65\156\164\137\151\x64", $measureIds); $queryMeasure = $this->db->get_compiled_select(); } if (count($guidelineIds) > 0) { $this->db->select("\145\x32\x5f\157\162\164\150\x6f\x5f\x61\x6e\x61\154\x79\163\x65\163\x2e\157\x74\150\x5f\141\156\x61\x6c\x79\163\x69\163\137\156\x61\x6d\x65\40\x61\x73\x20\156\x61\x6d\x65\x2c\x65\62\137\x6f\162\164\150\157\x5f\141\156\141\154\x79\x73\145\x73\x2e\157\x74\x68\x5f\x61\156\x61\x6c\x79\163\x69\163\137\154\x61\142\x65\x6c\x20\x61\163\40\x6c\141\x62\145\154\54\145\x32\x5f\x6f\x72\x74\150\x6f\x5f\x61\156\x61\x6c\x79\163\x65\163\56\x6f\164\150\x5f\141\156\141\x6c\171\x73\x69\x73\137\x75\x73\145\x72\137\141\x64\x64\145\144\x20\165\163\145\162\x5f\x61\x64\x64\145\x64\x2c\145\x32\x5f\157\162\x74\150\x6f\x5f\x61\x6e\x61\x6c\x79\x73\x65\x73\56\157\164\150\137\x61\156\x61\x6c\171\163\x69\x73\137\x64\x69\163\165\163\x65\144"); $this->db->from("\145\x32\x5f\x6f\162\x74\150\157\x5f\x61\x6e\141\154\171\163\x65\163"); $this->db->join("\x65\x32\137\x6f\x72\164\x68\x6f\x5f\x61\x6e\x61\x6c\x79\163\151\x73\x5f\x67\x75\151\x64\145\x6c\x69\156\x65\x73", "\x65\x32\137\157\x72\x74\150\157\137\x61\x6e\x61\x6c\171\163\x65\163\x2e\157\164\150\137\141\x6e\x61\x6c\171\163\151\163\137\x69\x64\x20\x3d\x20\x65\x32\x5f\x6f\x72\164\150\x6f\137\x61\x6e\x61\154\171\163\x69\x73\x5f\147\x75\x69\x64\145\x6c\x69\156\145\x73\56\x6f\164\x68\137\x61\x6e\141\154\x79\163\151\163\x5f\x69\x64"); $this->db->join("\x65\62\137\x6f\162\164\150\x6f\x5f\x69\155\x61\147\x65\137\155\157\x64\x61\x6c\151\164\151\x65\163", "\x65\62\137\x6f\162\164\150\x6f\x5f\x61\156\141\x6c\171\163\145\163\x2e\157\164\150\137\151\x6d\147\137\155\x6f\x64\x61\154\x69\164\x79\137\x69\144\40\x3d\x20\145\62\137\x6f\x72\x74\150\x6f\137\x69\155\x61\x67\145\x5f\155\x6f\144\x61\154\151\x74\151\x65\163\x2e\157\164\x68\x5f\151\x6d\147\x5f\155\x6f\144\141\x6c\x69\164\171\137\151\144"); $this->db->where("\x65\62\x5f\157\x72\x74\150\157\137\x69\x6d\141\147\145\x5f\155\x6f\144\141\154\151\164\x69\x65\163\56\157\x74\150\137\151\155\x67\x5f\x6d\157\144\x61\154\151\164\171\137\156\141\x6d\x65", $modality); $this->db->where_in("\x65\x32\137\157\162\164\150\157\137\x61\156\x61\154\x79\163\151\163\137\x67\165\151\x64\x65\154\151\x6e\145\163\x2e\x6f\x74\x68\x5f\147\x75\151\x64\x65\x6c\151\x6e\x65\137\x69\144", $guidelineIds); $queryGuideline = $this->db->get_compiled_select(); } if (count($measureIds) > 0 && count($guidelineIds) > 0) { $result = $this->db->query($queryMeasure . "\x20\x55\x4e\x49\x4f\116\40" . $queryGuideline)->result_array(); } else { if (count($measureIds) > 0) { $result = $this->db->query($queryMeasure)->result_array(); } else { $result = $this->db->query($queryGuideline)->result_array(); } } $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sAnalyses = new SLabeledAnalysis($row); array_push($items, $sAnalyses); } return ["\x65\x72\x72\x6f\162\103\157\144\145" => VERR_COMMON_SUCCESS, "\141\156\x61\x6c\x79\163\145\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Analyses($analysisname, $label, $userAdded, $modality, $measureGroups, $guidelinesNames) { load_database($this, "\105\x32\x44\102"); $this->db->select("\x6f\164\150\137\x69\x6d\x67\x5f\155\157\x64\x61\154\x69\x74\x79\x5f\151\x64"); $this->db->from("\145\x32\137\157\x72\164\150\157\137\x69\x6d\x61\x67\x65\137\x6d\x6f\x64\141\154\x69\x74\x69\x65\163"); $this->db->where("\x6f\x74\150\137\x69\x6d\147\x5f\155\x6f\144\141\x6c\151\164\171\137\156\141\x6d\145", $modality); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { vt_loge(__METHOD__ . "\x3a" . "\155\x6f\x64\x61\154\151\164\171\40\x69\x73\x20\x69\x6e\x76\x61\x6c\151\144\40\144\141\x74\x61\56"); return VERR_DB_INVALIDDATA; } $modality_id = intval($row->oth_img_modality_id); $this->db->where("\157\164\150\x5f\x61\x6e\141\x6c\x79\163\x69\x73\137\156\x61\155\145", $analysisname); $this->db->where("\157\x74\x68\x5f\151\x6d\147\137\155\x6f\144\141\154\x69\x74\171\x5f\151\144", $modality_id); $q = $this->db->get("\x65\x32\x5f\x6f\162\164\x68\157\137\x61\x6e\141\154\171\x73\145\x73"); $this->db->reset_query(); if ($q->num_rows() > 0) { return VERR_DB_OVERLAP; } $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $data = array("\x6f\164\150\137\141\156\141\154\171\163\151\163\137\156\141\155\145" => $analysisname, "\157\x74\x68\x5f\x61\156\141\x6c\171\x73\151\163\x5f\x6c\x61\x62\145\x6c" => $label, "\157\164\x68\137\x61\156\x61\x6c\x79\x73\151\x73\137\x75\163\x65\x72\137\141\x64\x64\145\x64" => $userAdded, "\157\x74\150\x5f\151\155\147\x5f\x6d\x6f\x64\x61\154\x69\164\171\137\x69\144" => $modality_id); $this->db->insert("\x65\x32\137\157\x72\x74\x68\157\x5f\x61\x6e\141\x6c\x79\163\145\163", $data); $analysis_id = $this->db->insert_id(); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && empty($measureGroups) == FALSE) { $affected_row = $this->insert_AnalysesMeasuregroup($analysis_id, $modality_id, $measureGroups); } if ($affected_row > 0 && empty($guidelinesNames) == FALSE) { foreach ($guidelinesNames as $guidelineName) { $guideline_name = trim($guidelineName); if (empty($guideline_name) || $this->insert_AnalysesGuideline($analysis_id, $modality_id, $guideline_name) == 0) { $affected_row = 0; break; } } } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return VERR_COMMON_SUCCESS; } else { return VERR_DB_INVALIDDATA; } } public function put_Analyses($analysisname, $label, $modality, $measureGroups, $guidelinesNames, $userAdded) { load_database($this, "\x45\x32\x44\102"); $this->db->select("\x65\x32\x5f\x6f\162\164\x68\157\137\141\156\x61\154\171\x73\x65\163\56\157\164\150\x5f\x61\156\x61\x6c\x79\163\x69\163\x5f\151\x64\54\145\x32\137\x6f\162\164\150\157\x5f\x61\x6e\141\154\171\163\145\x73\56\x6f\164\x68\x5f\x69\x6d\x67\x5f\x6d\x6f\x64\x61\x6c\151\164\171\137\151\144"); $this->db->from("\145\x32\137\x6f\162\x74\150\157\x5f\x61\x6e\141\154\171\x73\x65\x73"); $this->db->join("\145\62\137\x6f\162\164\x68\157\137\x69\155\141\x67\145\137\155\157\x64\141\x6c\x69\x74\151\x65\163", "\145\x32\137\x6f\x72\164\150\x6f\137\x69\x6d\141\x67\145\x5f\155\157\144\x61\154\151\164\151\x65\x73\x2e\x6f\x74\150\x5f\151\x6d\147\137\155\157\144\141\x6c\151\164\171\x5f\151\144\x20\x3d\40\145\x32\137\157\162\x74\150\157\x5f\x61\x6e\x61\154\x79\x73\145\x73\56\x6f\x74\150\137\x69\155\x67\x5f\155\157\x64\x61\x6c\x69\x74\171\137\x69\x64"); $this->db->where("\x65\x32\137\157\x72\164\x68\157\x5f\151\155\141\x67\x65\137\155\x6f\144\141\x6c\151\x74\x69\x65\x73\56\157\x74\x68\137\x69\x6d\x67\137\x6d\x6f\x64\141\154\151\x74\x79\137\156\141\x6d\145", $modality); $this->db->where("\x65\62\x5f\157\162\x74\150\x6f\x5f\141\156\x61\x6c\171\x73\x65\x73\x2e\x6f\164\x68\137\x61\x6e\x61\x6c\x79\163\151\163\137\x6e\x61\x6d\145", $analysisname); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $analysis_id = intval($row->oth_analysis_id); $modality_id = intval($row->oth_img_modality_id); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $blUpdateStatus = TRUE; $affected_row = 0; $this->db->trans_begin(); if (isset($label) || isset($userAdded)) { if (isset($label)) { $this->db->set("\157\164\150\x5f\141\156\141\x6c\x79\163\151\x73\137\154\x61\x62\x65\154", $label); } if (isset($userAdded)) { $this->db->set("\157\164\150\137\141\x6e\x61\154\x79\x73\151\163\x5f\165\x73\x65\x72\x5f\141\x64\x64\x65\144", $userAdded); } $this->db->where("\157\x74\x68\137\141\x6e\141\154\171\163\151\x73\x5f\x69\x64", $analysis_id); $this->db->update("\x65\62\137\157\x72\164\150\x6f\137\x61\x6e\141\154\171\x73\x65\163"); $affected_row = $this->db->affected_rows(); $blUpdateStatus = $affected_row > 0; } if ($blUpdateStatus && empty($measureGroups) == FALSE) { $affected_row = $this->update_AnalysesMeasuregroup($analysis_id, $modality_id, $measureGroups); $blUpdateStatus = $affected_row > 0; } if ($blUpdateStatus && empty($guidelinesNames) == FALSE) { $affected_row = $this->update_AnalysesGuidelines($analysis_id, $modality_id, $guidelinesNames); $blUpdateStatus = $affected_row > 0; } if ($blUpdateStatus == FALSE || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_AnalysesP6($parameters) { $analysisname = trim($parameters["\x6e\141\x6d\145"]); $modality = trim($parameters["\155\x6f\x64\x61\x6c\x69\164\171"]); if (!isset($parameters["\156\x61\x6d\145"]) || empty($parameters["\x6e\141\155\x65"])) { vt_loge(__METHOD__ . "\x3a" . "\156\141\x6d\x65\x20\x69\x73\40\x6e\157\x74\x20\163\145\x74\x20\157\x72\40\x65\155\x70\164\171\56"); return VERR_COMMON_INVALID; } if (!isset($parameters["\x6d\x6f\x64\141\x6c\x69\x74\171"]) || empty($parameters["\x6d\157\x64\x61\x6c\x69\164\x79"])) { vt_loge(__METHOD__ . "\x3a" . "\155\x6f\144\141\x6c\x69\164\171\x20\151\163\40\x6e\157\x74\40\163\x65\x74\x20\x6f\x72\x20\x65\155\160\164\x79\56"); return VERR_COMMON_INVALID; } $disused = filter_var($parameters["\x64\x69\163\x75\163\x65\x64"], FILTER_VALIDATE_BOOLEAN); load_database($this, "\x45\62\104\x42"); $this->db->select("\x65\x32\x5f\157\162\164\150\157\x5f\141\156\x61\154\171\163\x65\163\56\157\164\150\x5f\141\x6e\141\154\x79\x73\x69\163\x5f\151\144\x2c\x65\x32\137\x6f\162\164\x68\x6f\x5f\x61\x6e\141\154\x79\x73\145\x73\x2e\157\x74\x68\x5f\x69\155\147\x5f\x6d\x6f\x64\141\x6c\151\164\171\x5f\151\144"); $this->db->from("\145\62\137\x6f\162\164\150\157\x5f\x61\x6e\141\x6c\171\163\x65\x73"); $this->db->join("\x65\62\137\x6f\162\x74\x68\x6f\x5f\151\155\141\147\x65\x5f\155\x6f\x64\141\x6c\151\x74\151\x65\163", "\145\62\x5f\x6f\162\164\150\x6f\x5f\151\155\141\x67\x65\x5f\x6d\157\144\141\x6c\x69\164\x69\145\x73\56\x6f\x74\x68\137\151\x6d\147\x5f\x6d\157\144\x61\x6c\x69\x74\171\137\151\x64\40\75\40\145\62\137\157\162\164\150\157\137\x61\156\x61\x6c\171\163\x65\x73\x2e\x6f\x74\150\x5f\x69\155\x67\137\x6d\x6f\x64\141\x6c\x69\x74\x79\x5f\x69\x64"); $this->db->where("\145\x32\x5f\x6f\x72\164\150\157\137\151\x6d\x61\x67\145\x5f\155\x6f\144\141\154\151\x74\151\x65\163\x2e\157\164\150\137\x69\x6d\x67\137\155\157\144\141\x6c\x69\164\171\x5f\x6e\x61\155\x65", $modality); $this->db->where("\x65\62\x5f\157\162\x74\150\157\x5f\x61\156\141\154\x79\x73\x65\163\56\x6f\164\x68\x5f\x61\156\x61\154\171\163\x69\x73\137\156\141\155\x65", $analysisname); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return VERR_DB_NOSUCHDATA; } $analysis_id = intval($row->oth_analysis_id); $this->db->set("\157\164\x68\137\141\x6e\x61\x6c\171\x73\x69\163\137\144\151\163\165\x73\x65\144", $disused); $this->db->where("\157\164\150\x5f\141\x6e\141\x6c\x79\163\151\x73\137\151\144", $analysis_id); $this->db->update("\x65\62\x5f\x6f\162\x74\150\157\x5f\141\156\141\x6c\x79\163\145\x73"); if ($this->db->affected_rows()) { return VERR_COMMON_SUCCESS; } else { return VERR_DB_INVALIDDATA; } } public function update_AnalysesGuidelines($analysis_id, $modality_id, $guidelinesNames) { $deletedGuidelines = $guidelinesNames["\144\145\154\145\164\145\144"]; $addedGuidelines = $guidelinesNames["\x61\144\144\145\144"]; foreach ($deletedGuidelines as $guidelineName) { $guideline_name = trim($guidelineName); if (empty($guideline_name) || $this->delete_AnalysesGuideline($analysis_id, $modality_id, $guideline_name) == 0) { return 0; } } foreach ($addedGuidelines as $guidelineName) { $guideline_name = trim($guidelineName); if (empty($guideline_name) || $this->insert_AnalysesGuideline($analysis_id, $modality_id, $guideline_name) == 0) { return 0; } } return 1; } public function insert_AnalysesGuideline($analysis_id, $modality_id, $guideline_name) { $this->db->select("\157\164\x68\137\x67\x75\x69\144\x65\154\x69\156\x65\x5f\x69\144"); $this->db->where("\157\164\150\137\151\x6d\147\x5f\155\157\x64\141\x6c\x69\164\171\137\x69\144", $modality_id); $this->db->where("\157\x74\150\137\147\165\x69\144\x65\154\151\x6e\145\137\156\x61\x6d\x65", $guideline_name); $this->db->limit(1); $select_guidelineid_sql = $this->db->get_compiled_select("\x65\62\x5f\x6f\x72\164\x68\157\x5f\x67\165\x69\144\145\x6c\151\x6e\x65\x73"); $this->db->set("\157\x74\150\137\x61\156\x61\154\171\163\151\x73\137\x69\x64", $analysis_id); $this->db->set("\157\x74\150\x5f\147\x75\151\x64\145\x6c\x69\156\145\x5f\x69\144", "\50{$select_guidelineid_sql}\x29", FALSE); $this->db->insert("\x65\62\x5f\157\x72\164\150\157\137\141\156\141\x6c\171\163\151\163\137\147\x75\151\144\145\154\x69\156\145\163"); return $this->db->affected_rows(); } public function delete_AnalysesGuideline($analysis_id, $modality_id, $guideline_name) { $this->db->where("\157\164\x68\x5f\x69\155\147\x5f\155\157\144\x61\x6c\x69\164\171\137\x69\144", $modality_id); $this->db->where("\157\164\x68\137\x67\x75\151\144\x65\154\x69\156\x65\x5f\x6e\x61\155\x65", $guideline_name); $this->db->where("\145\x32\x5f\157\x72\x74\150\x6f\137\x67\x75\151\x64\145\x6c\151\x6e\x65\163\56\157\164\150\137\x67\x75\151\144\145\154\x69\156\x65\137\x69\x64", "\145\x32\137\157\162\164\x68\x6f\137\x61\x6e\x61\x6c\x79\x73\151\163\137\147\x75\x69\x64\x65\x6c\151\x6e\x65\163\56\x6f\x74\x68\137\147\x75\x69\x64\145\154\x69\x6e\x65\x5f\x69\x64", FALSE); $select_guidelineid = $this->db->get_compiled_select("\145\x32\x5f\157\x72\164\x68\x6f\x5f\x67\x75\151\144\x65\154\151\x6e\145\x73"); $this->db->where("\x6f\164\150\x5f\x61\x6e\141\x6c\171\x73\151\163\137\x69\144", $analysis_id); $this->db->where("\145\170\x69\163\x74\x73\x28{$select_guidelineid}\x29", NULL, FALSE); $this->db->delete("\145\62\x5f\157\x72\164\x68\x6f\137\141\x6e\141\x6c\x79\163\151\163\137\147\x75\151\144\145\x6c\x69\x6e\x65\163"); return $this->db->affected_rows(); } public function insert_AnalysesMeasuregroup($analysis_id, $modality_id, $measureGroups) { foreach ($measureGroups as $measureGroup) { $groupName = trim($measureGroup["\x6e\141\155\x65"]); $measurements = $measureGroup["\x6d\145\x61\x73\x75\x72\145\155\x65\156\x74\163"]; if (empty($groupName) || empty($measurements)) { return 0; } foreach ($measurements as $measurement) { $measurement_name = trim($measurement["\156\x61\155\145"]); $displayedOrder = filter_var($measurement["\x64\x69\x73\160\154\141\x79\x65\144\x4f\162\x64\x65\162"], FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE); $displayInfo = $measurement["\144\x69\163\x70\154\x61\x79\111\156\x66\x6f"]; if (empty($measurement_name) || isset($displayedOrder) == FALSE || $this->insert_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurement_name, $displayedOrder, $displayInfo) == 0) { return 0; } } } return 1; } public function update_AnalysesMeasuregroup($analysis_id, $modality_id, $measureGroups) { $deletedMeasurements = $measureGroups["\x64\145\x6c\145\x74\x65\144\115\x65\141\163\165\x72\x65\155\145\156\164\163"]; $addedMeasurements = $measureGroups["\x61\144\144\145\x64\x4d\145\141\163\165\162\x65\x6d\145\156\x74\x73"]; $changedGroups = $measureGroups["\x63\x68\141\156\147\x65\x64\x47\162\157\165\x70\x73"]; foreach ($deletedMeasurements as $measureGroup) { $groupName = trim($measureGroup["\x67\x72\157\x75\x70\x4e\141\x6d\145"]); $measurementName = trim($measureGroup["\x6d\x65\x61\163\165\x72\x65\x6d\x65\x6e\164\116\x61\155\x65"]); if (empty($groupName) || empty($measurementName) || $this->delete_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName) == 0) { return 0; } } foreach ($addedMeasurements as $measureGroup) { $groupName = trim($measureGroup["\147\162\157\x75\x70\x4e\x61\155\145"]); $measurementName = trim($measureGroup["\x6d\145\141\x73\x75\162\145\x6d\x65\156\x74\116\x61\155\x65"]); $displayedOrder = filter_var($measureGroup["\x64\x69\x73\x70\154\x61\171\x65\144\117\162\x64\145\162"], FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE); $displayInfo = $measureGroup["\144\151\x73\160\154\x61\x79\111\156\146\157"]; if (empty($groupName) || empty($measurementName) || isset($displayedOrder) == FALSE || $this->insert_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName, $displayedOrder, $displayInfo) == 0) { return 0; } } foreach ($changedGroups as $measureGroup) { $groupName = trim($measureGroup["\147\162\157\x75\x70\x4e\x61\155\145"]); $measurementName = trim($measureGroup["\155\x65\141\163\165\162\x65\x6d\x65\x6e\164\x4e\141\155\x65"]); $displayedOrder = filter_var($measureGroup["\144\x69\163\160\154\x61\x79\x65\144\117\x72\144\x65\162"], FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE); $displayInfo = $measureGroup["\x64\151\x73\160\x6c\x61\171\x49\156\146\157"]; if (empty($groupName) || empty($measurementName) || isset($displayedOrder) == FALSE || $this->update_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName, $displayedOrder, $displayInfo) == 0) { return 0; } } return 1; } public function insert_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName, $displayedOrder, $displayInfo) { $this->db->select("\x6f\x74\x68\137\x6d\x65\x61\163\x75\162\x65\155\145\156\164\x5f\x69\144"); $this->db->where("\x6f\x74\150\137\151\x6d\147\137\155\x6f\144\141\154\151\164\x79\137\151\144", $modality_id); $this->db->where("\x6f\164\150\137\155\145\141\163\x75\162\x65\x6d\x65\x6e\164\137\156\141\x6d\x65", $measurementName); $this->db->limit(1); $select_measureid_sql = $this->db->get_compiled_select("\x65\62\137\x6f\x72\x74\x68\x6f\137\155\x65\141\163\165\162\145\155\x65\156\x74\163"); $this->db->set("\x6f\x74\x68\x5f\141\x6e\x61\x6c\171\x73\x69\x73\x5f\151\144", $analysis_id); $this->db->set("\x6f\164\x68\x5f\141\x6e\x61\x6c\171\x73\x69\x73\x5f\155\x65\141\x73\x75\162\145\155\145\156\x74\137\x67\x72\x6f\165\x70", $groupName); $this->db->set("\x6f\164\x68\x5f\141\156\141\x6c\171\x73\151\x73\137\155\145\141\163\x75\162\145\155\145\x6e\164\137\x6f\162\144\x65\162", $displayedOrder); $this->db->set("\x6f\164\150\137\155\145\x61\163\165\162\x65\155\x65\156\x74\x5f\151\144", "\50{$select_measureid_sql}\x29", FALSE); if (!empty($displayInfo)) { $this->db->set("\x6f\x74\x68\x5f\141\156\x61\x6c\171\x73\151\x73\137\155\145\141\x73\x75\x72\145\155\145\x6e\164\137\x64\x69\163\160\x6c\141\x79", json_encode($displayInfo)); } $this->db->insert("\x65\x32\x5f\x6f\x72\164\x68\157\137\141\156\141\154\171\x73\151\163\x5f\x6d\145\141\163\165\x72\145\155\145\156\164\x73"); return $this->db->affected_rows(); } public function delete_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName) { $this->db->where("\157\164\x68\x5f\151\x6d\147\x5f\x6d\157\x64\141\154\x69\164\171\137\151\x64", $modality_id); $this->db->where("\x6f\x74\x68\137\155\x65\141\x73\x75\x72\145\155\145\x6e\164\137\x6e\x61\155\x65", $measurementName); $this->db->where("\145\x32\137\157\162\164\x68\157\137\x6d\x65\141\x73\165\x72\x65\155\145\156\x74\163\x2e\157\x74\x68\x5f\x6d\x65\141\163\x75\162\145\155\x65\x6e\164\x5f\x69\144", "\145\x32\x5f\157\x72\164\x68\x6f\137\141\x6e\141\x6c\x79\x73\x69\163\x5f\x6d\x65\x61\163\165\x72\x65\155\x65\x6e\164\x73\x2e\157\164\150\137\155\x65\141\x73\165\x72\145\155\x65\156\164\137\x69\144", FALSE); $select_measureid = $this->db->get_compiled_select("\x65\x32\137\157\x72\164\x68\x6f\137\155\x65\141\x73\x75\162\x65\x6d\145\x6e\164\163"); $this->db->where("\x6f\x74\150\137\x61\156\141\154\x79\163\151\x73\x5f\x69\144", $analysis_id); $this->db->where("\157\164\x68\137\x61\156\141\x6c\171\163\151\x73\x5f\155\x65\141\163\165\162\145\x6d\145\x6e\x74\x5f\x67\162\x6f\165\160", $groupName); $this->db->where("\145\x78\x69\163\x74\163\x28{$select_measureid}\51", NULL, FALSE); $this->db->delete("\145\62\137\x6f\x72\164\x68\157\x5f\141\156\x61\x6c\171\163\x69\163\x5f\155\x65\141\163\165\162\x65\155\145\x6e\x74\x73"); return $this->db->affected_rows(); } public function update_AnalysesMeasurement($analysis_id, $modality_id, $groupName, $measurementName, $displayedOrder, $displayInfo) { $this->db->where("\x6f\x74\x68\137\x69\x6d\147\137\x6d\x6f\144\x61\154\x69\x74\x79\x5f\151\x64", $modality_id); $this->db->where("\157\x74\x68\137\155\145\141\163\x75\x72\x65\x6d\145\156\164\137\x6e\141\155\145", $measurementName); $this->db->where("\145\x32\x5f\x6f\x72\164\x68\157\137\x6d\x65\x61\163\165\162\145\155\145\x6e\x74\x73\56\x6f\x74\x68\x5f\155\x65\141\163\165\x72\145\155\x65\156\164\137\x69\144", "\x65\62\137\157\x72\164\x68\x6f\x5f\141\156\x61\x6c\171\163\151\163\137\155\145\x61\x73\x75\x72\145\155\145\156\x74\163\56\x6f\x74\x68\137\155\145\x61\163\x75\162\x65\155\x65\156\164\137\x69\x64", FALSE); $select_measureid = $this->db->get_compiled_select("\145\62\x5f\x6f\162\x74\150\x6f\x5f\x6d\x65\141\x73\x75\162\145\155\145\x6e\164\163"); $this->db->where("\157\164\x68\137\141\x6e\x61\154\x79\163\151\163\x5f\151\x64", $analysis_id); $this->db->where("\157\x74\150\x5f\x61\156\x61\154\x79\163\151\x73\x5f\155\145\x61\x73\x75\x72\x65\155\145\156\164\x5f\147\x72\x6f\165\160", $groupName); $this->db->where("\x65\x78\151\163\164\x73\50{$select_measureid}\x29", NULL, FALSE); $this->db->set("\157\x74\x68\137\x61\x6e\141\x6c\x79\163\151\x73\x5f\x6d\x65\x61\x73\x75\162\x65\x6d\x65\x6e\x74\137\157\x72\x64\145\162", $displayedOrder); if (!empty($displayInfo)) { $this->db->set("\157\x74\150\x5f\141\156\x61\x6c\x79\163\151\163\137\x6d\x65\141\x73\x75\162\x65\155\145\x6e\164\137\144\151\163\x70\x6c\141\171", json_encode($displayInfo)); } else { $this->db->set("\x6f\x74\x68\137\141\x6e\x61\154\x79\x73\151\x73\137\155\x65\x61\163\x75\x72\145\x6d\145\156\x74\x5f\144\x69\x73\160\154\141\x79", NULL); } $this->db->update("\145\62\137\x6f\x72\164\x68\x6f\x5f\141\156\141\x6c\171\x73\151\163\137\x6d\x65\141\163\x75\162\145\x6d\x65\156\164\163"); return $this->db->affected_rows(); } public function get_AnalysesP5($measurementname, $modality) { load_database($this, "\x45\x32\104\102"); $this->db->select("\x65\x32\137\x6f\162\164\x68\157\137\141\x6e\141\x6c\x79\163\145\x73\56\157\164\150\x5f\x61\x6e\x61\154\x79\163\x69\163\137\x6e\x61\x6d\x65\x20\141\163\40\x6e\141\155\145\x2c\145\62\137\157\162\x74\150\157\137\141\x6e\x61\154\171\x73\x65\163\56\x6f\164\x68\137\141\x6e\141\x6c\x79\x73\151\x73\x5f\154\x61\x62\145\x6c\x20\x61\163\x20\x6c\x61\142\145\154\54\145\x32\x5f\157\x72\164\x68\x6f\x5f\x61\156\141\154\171\x73\145\x73\x2e\157\x74\x68\137\x61\156\141\x6c\x79\163\151\x73\137\165\x73\x65\x72\137\x61\x64\144\145\144\x20\141\163\x20\x75\x73\x65\162\137\x61\x64\144\x65\144\x2c\145\x32\x5f\157\x72\x74\150\x6f\x5f\x61\156\141\154\171\x73\x65\163\x2e\x6f\x74\150\x5f\x61\x6e\141\154\171\163\151\x73\137\144\x69\x73\165\x73\x65\144"); $this->db->from("\x65\x32\137\x6f\x72\164\x68\157\137\x61\156\x61\x6c\171\163\x65\163"); $this->db->join("\x65\x32\137\157\162\164\x68\x6f\137\141\x6e\x61\154\x79\x73\151\x73\x5f\x6d\x65\x61\x73\x75\x72\145\x6d\145\156\x74\x73", "\x65\x32\x5f\157\x72\164\150\x6f\137\141\x6e\141\x6c\171\163\x65\x73\x2e\x6f\164\x68\137\141\156\x61\x6c\171\x73\151\163\137\151\144\x20\x3d\x20\145\62\137\x6f\162\x74\150\157\137\141\x6e\x61\x6c\171\x73\x69\x73\137\x6d\145\141\x73\x75\x72\x65\x6d\x65\156\x74\x73\x2e\x6f\164\150\x5f\x61\156\x61\x6c\x79\163\x69\x73\x5f\151\144"); $this->db->join("\145\62\137\x6f\162\164\150\157\137\155\x65\x61\x73\165\162\x65\155\x65\x6e\164\163", "\x65\x32\137\157\162\x74\x68\x6f\x5f\x6d\x65\x61\x73\x75\162\x65\155\x65\156\x74\x73\56\157\x74\150\137\155\x65\x61\x73\x75\162\x65\x6d\x65\x6e\x74\x5f\151\x64\40\x3d\40\x65\62\137\157\x72\x74\x68\157\137\x61\156\141\154\171\x73\x69\163\137\155\145\x61\163\165\x72\145\x6d\x65\156\164\163\x2e\x6f\x74\x68\x5f\155\x65\141\x73\165\162\145\155\x65\156\164\x5f\151\144"); $this->db->join("\145\x32\137\x6f\162\164\x68\157\x5f\x69\155\141\x67\x65\x5f\x6d\157\144\x61\x6c\x69\164\151\x65\x73", "\145\62\x5f\x6f\162\x74\x68\x6f\x5f\141\x6e\141\154\171\x73\145\x73\x2e\x6f\x74\150\x5f\151\155\147\x5f\x6d\157\144\x61\154\151\164\x79\137\x69\x64\x20\75\x20\145\x32\137\157\162\164\150\x6f\137\x69\x6d\141\x67\x65\x5f\155\x6f\x64\141\154\151\x74\151\x65\x73\56\x6f\164\x68\x5f\151\x6d\x67\x5f\x6d\157\x64\x61\x6c\151\164\x79\137\151\x64"); $this->db->where("\x65\x32\137\157\162\164\150\157\137\151\x6d\141\x67\x65\137\155\x6f\x64\x61\154\x69\x74\151\x65\163\x2e\157\x74\x68\x5f\x69\155\x67\137\x6d\x6f\144\x61\154\151\x74\171\137\156\x61\x6d\145", $modality); $this->db->where("\x65\62\x5f\157\x72\x74\150\x6f\x5f\155\x65\x61\x73\165\x72\145\155\145\x6e\164\163\56\157\x74\x68\x5f\x6d\x65\141\163\x75\x72\145\x6d\x65\156\164\137\156\141\x6d\145", $measurementname); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sAnalyses = new SLabeledAnalysis($row); array_push($items, $sAnalyses); } return ["\x65\162\x72\157\162\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\141\x6e\141\154\171\x73\x65\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_AnalysesP2($modality) { load_database($this, "\105\62\x44\102"); $this->db->select("\x6f\164\150\137\141\x6e\141\154\x79\x73\x69\163\137\156\141\155\x65\40\141\163\x20\156\x61\155\145\54\x6f\164\150\137\x61\x6e\141\154\x79\x73\x69\163\137\x6c\x61\142\145\x6c\x20\x61\x73\x20\x6c\141\142\x65\154\x2c\157\164\x68\137\141\x6e\x61\x6c\171\163\x69\163\x5f\x75\x73\145\x72\x5f\141\x64\x64\145\144\40\x61\163\x20\x75\x73\145\x72\x5f\x61\144\144\x65\144\54\x6f\164\150\137\x61\x6e\x61\154\171\163\x69\163\137\144\151\x73\x75\163\145\x64"); $this->db->from("\145\x32\137\x6f\x72\x74\x68\157\137\141\x6e\141\154\x79\x73\x65\x73"); $this->db->join("\145\62\x5f\157\x72\x74\150\157\137\x69\x6d\x61\x67\x65\x5f\155\157\x64\x61\x6c\x69\164\151\x65\x73", "\x65\62\137\157\x72\164\x68\157\137\141\156\141\154\x79\x73\145\163\x2e\157\164\150\x5f\x69\155\147\137\x6d\x6f\x64\141\x6c\x69\164\171\137\x69\x64\40\75\40\145\62\x5f\157\x72\164\150\157\137\151\155\141\147\x65\137\x6d\157\144\x61\x6c\x69\x74\151\145\163\x2e\157\x74\150\x5f\x69\x6d\x67\x5f\x6d\x6f\144\x61\154\151\x74\x79\137\151\x64"); $this->db->where("\145\62\x5f\x6f\x72\x74\150\x6f\x5f\x69\x6d\x61\147\145\137\155\157\144\x61\x6c\x69\164\x69\x65\163\56\157\x74\x68\x5f\151\155\x67\x5f\155\x6f\x64\141\154\x69\164\x79\137\x6e\141\x6d\x65", $modality); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sAnalyses = new SLabeledAnalysis($row); array_push($items, $sAnalyses); } return ["\145\162\162\157\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\141\156\141\x6c\171\x73\145\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/AttendingDoctors_model.php b/server/original/www/ezwebserver/src/application/models/AttendingDoctors_model.php index ab255a1..28a3b41 100644 --- a/server/original/www/ezwebserver/src/application/models/AttendingDoctors_model.php +++ b/server/original/www/ezwebserver/src/application/models/AttendingDoctors_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strChartNo))->result_array(); if (count($pat_id) < 1) { return array("\145\162\x72\157\x72\x43\x6f\x64\x65" => VERR_DB_INVALIDDATA, "\x64\x6f\x63\x74\x6f\162\116\x61\x6d\x65\x4c\151\x73\x74" => array()); } $nPatID = $pat_id[0]["\x70\x61\164\137\x69\x64"]; $sql = "\x53\x45\114\105\103\x54\x20\x44\x4f\x43\x5f\111\104\40\106\x52\117\x4d\x20\x45\x32\137\x41\124\x54\x45\116\x44\111\116\x47\x5f\x44\117\103\x20\127\110\x45\122\x45\x20\x50\101\x54\x5f\x49\104\x20\x3d\x20\x3f"; $DoctorIDs = $this->db->query($sql, array($nPatID))->result_array(); if (count($DoctorIDs) < 1) { return array("\145\x72\162\x6f\x72\x43\157\144\x65" => VERR_DB_NOSUCHDATA, "\x64\x6f\x63\164\157\162\x4e\141\155\x65\x4c\151\163\164" => array()); } $doctorNameList = array(); foreach ($DoctorIDs as $row) { $sql = "\x53\x45\114\105\x43\124\40\x44\117\x43\x5f\116\x41\115\x45\x20\106\122\117\115\40\105\x32\137\104\x4f\103\x20\x57\110\105\x52\x45\x20\x44\x4f\103\x5f\111\104\x20\75\40\77"; array_push($doctorNameList, $this->db->query($sql, $row["\x64\157\143\x5f\x69\x64"])->result_array()[0]["\144\x6f\x63\137\x6e\x61\x6d\x65"]); } return array("\x65\162\162\x6f\x72\103\157\144\145" => VERR_COMMON_SUCCESS, "\144\x6f\143\x74\157\x72\116\x61\x6d\145\114\151\x73\164" => $doctorNameList); } public function post_AttendingDoctorsForChartNo($strChartNo, $strlDoctorList) { $sql = "\x53\x45\x4c\105\x43\124\40\x50\x41\x54\137\111\104\40\x46\122\x4f\115\40\105\62\137\x50\x41\x54\40\x57\110\x45\122\x45\40\120\101\x54\137\x43\x48\x41\122\x54\116\117\40\75\40\x3f"; $pat_id = $this->db->query($sql, array($strChartNo))->result_array(); $strlAddedDoctorList = array(); if (count($pat_id) > 0) { $nPatID = $pat_id[0]["\x70\x61\164\x5f\151\144"]; } else { return VERR_DB_NOSUCHDATA; } $sql = "\123\105\x4c\x45\103\124\x20\103\117\125\116\x54\50\52\x29\40\x46\x52\117\x4d\x20\105\62\137\101\x54\x54\x45\x4e\104\111\x4e\x47\137\104\117\x43\x20\127\110\105\122\x45\x20\x50\101\x54\x5f\x49\x44\40\x3d\40\x3f"; $result_count = $this->db->query($sql, array($nPatID))->result_array(); if (count($result_count) > 0) { $nDoctorCount = $result_count[0]["\x63\157\165\156\x74"]; if ($nDoctorCount >= MAX_ATTENDING_DOCTOR_COUNT) { return VERR_DB_RANGE; } } foreach ($strlDoctorList as $row) { $sql = "\123\105\x4c\x45\x43\x54\40\x44\x4f\x43\137\111\104\x20\x46\122\117\x4d\x20\x45\x32\x5f\x44\117\103\x20\x57\110\105\x52\105\40\x44\x4f\x43\137\116\101\x4d\x45\x20\75\x20\x3f"; $doc_id_result = $this->db->query($sql, array($row))->result_array(); if (count($doc_id_result) > 0) { $strDoctorID = $doc_id_result[0]["\x64\x6f\x63\x5f\x69\144"]; $sql = "\111\116\x53\105\x52\x54\x20\x49\116\x54\x4f\x20\x45\x32\137\101\x54\x54\x45\x4e\104\111\x4e\107\x5f\104\117\x43\x20\50\x50\x41\x54\137\x49\x44\x2c\x20\x44\117\103\x5f\111\104\x29\40\126\101\x4c\125\x45\x53\40\x28\77\54\40\x3f\x29"; $added = $this->db->query($sql, array($nPatID, $strDoctorID)); if ($added) { $strlAddedDoctorList[] = $row; } } } return $strlAddedDoctorList; } public function put_AttendingDoctorsForChartNo($strChartNo, $strlDoctorList) { } public function delete_AttendingDoctorsForChartNo($strChartNo) { $sql = "\123\105\x4c\x45\x43\x54\x20\120\x41\124\x5f\111\x44\40\x46\x52\x4f\x4d\x20\x45\x32\x5f\120\x41\124\x20\x57\110\105\122\x45\x20\x50\101\124\137\x43\x48\x41\x52\124\x4e\x4f\x20\75\40\x3f"; $pat_id = $this->db->query($sql, array($strChartNo))->result_array(); if (count($pat_id) > 0) { $nPatID = $pat_id[0]["\x70\141\x74\x5f\x69\144"]; } else { return VERR_DB_INVALIDDATA; } $sql = "\x53\105\114\105\x43\x54\x20\x2a\x20\x46\x52\x4f\x6d\x20\145\62\x5f\x61\164\x74\x65\156\144\x69\x6e\147\x5f\144\x6f\143\40\127\110\x45\122\x45\x20\x70\141\164\137\151\x64\x20\75\40\77"; $ret = $this->db->query($sql, array($nPatID))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $sql = "\x44\x45\114\105\124\105\x20\106\x52\x4f\x4d\x20\105\62\137\x41\x54\124\105\x4e\x44\111\116\107\x5f\x44\x4f\x43\x20\x57\110\105\x52\105\x20\x50\x41\124\137\x49\104\x20\x3d\x20\x3f"; $this->db->query($sql, array($nPatID)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/AuthenticationHelper.php b/server/original/www/ezwebserver/src/application/models/AuthenticationHelper.php index c90bd54..1f4eb58 100644 --- a/server/original/www/ezwebserver/src/application/models/AuthenticationHelper.php +++ b/server/original/www/ezwebserver/src/application/models/AuthenticationHelper.php @@ -1,7 +1,7 @@ {"\166\145\162"}; $client = $data->{"\x63\154\x69\145\x6e\x74"}; $enc = $data->{"\141\165\164\150"}->{"\145\x6e\x63"}; $username = $data->{"\141\x75\x74\150"}->{"\x75\x73\162"}; $password = $data->{"\141\x75\164\x68"}->{"\163\x65\143"}; if ($enc === "\x62\x36\64") { $decoded_username = base64_decode($username); $decoded_password = base64_decode($password); } else { if ($enc === "\x68\x65\x78") { $decoded_username = hex2bin($username); $decoded_password = hex2bin($password); } else { $decoded_username = $username; $decoded_password = $password; } } $exp = $data->{"\141\x75\164\x68"}->{"\145\170\160"}; return ["\x76\x65\x72" => $ver, "\143\x6c\151\145\156\164" => $client, "\145\x6e\x63" => $enc, "\x75\x73\145\162\x6e\141\155\x65" => $username, "\144\145\143\157\x64\x65\x64\125\163\x65\162\x6e\x61\x6d\145" => $decoded_username, "\x70\x61\163\x73\167\x6f\162\x64" => $password, "\144\145\143\157\144\145\x64\120\141\x73\163\x77\157\x72\144" => $decoded_password, "\x65\170\160" => $exp]; } } diff --git a/server/original/www/ezwebserver/src/application/models/AuthenticationR2_model.php b/server/original/www/ezwebserver/src/application/models/AuthenticationR2_model.php index 75d30ad..73ef4f7 100644 --- a/server/original/www/ezwebserver/src/application/models/AuthenticationR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/AuthenticationR2_model.php @@ -1,7 +1,7 @@ Authentication_model->decrypt_data($parameters); if ($result_decrypted["\145\162\162\x6f\x72\x43\x6f\144\x65"] !== VERR_COMMON_SUCCESS) { vt_loge(__METHOD__ . "\72\40\106\141\x69\x6c\145\x64\40\164\x6f\40\x64\145\143\162\171\x70\164\40\154\157\147\x69\x6e\x20\x64\x61\164\x61\x2e"); return $result_decrypted; } $decrypted = $result_decrypted["\x64\145\x63\x72\x79\x70\164\145\x64\104\x61\x74\141"]; $decoded = AuthenticationHelper::decodeAuthData($decrypted); $username = $decoded["\165\163\x65\x72\156\x61\x6d\145"]; $decoded_username = $decoded["\x64\145\143\x6f\x64\145\144\x55\163\145\x72\x6e\x61\x6d\x65"]; $password = $decoded["\x70\x61\163\163\167\157\162\x64"]; if ($username === TEMP_USERNAME && $password === TEMP_PASSWORD) { $user_in_db = null; } else { $users = $this->UserAccounts_model->getUserAccount($decoded_username); if (count($users) === 0) { vt_loge(sprintf("\45\x73\72\40\x55\163\145\162\x20\x6e\157\x74\40\146\x6f\165\156\144\x3a\x20\x25\x73", __METHOD__, $decoded_username)); return array("\145\162\x72\x6f\x72\103\157\x64\x65" => VERR_AUTH_UNAUTHENTICATED, "\x65\x72\x72\157\162\115\x65\x73\163\x61\x67\x65" => "\111\156\166\141\154\x69\144\40\165\163\x65\x72\40\x6e\141\155\x65\x20\x6f\162\40\x70\x61\163\x73\x77\x6f\x72\144", "\141\x63\x63\x6f\165\156\164\114\x6f\x63\153\157\x75\x74\x54\x68\x72\x65\x73\150\157\x6c\144" => ACCOUNT_LOCKOUT_THRESHOLD, "\146\141\151\154\145\144\114\157\x67\x69\x6e\x43\157\165\x6e\164" => 0); } $user_in_db = $users[0]; if ($user_in_db["\x61\x63\143\137\x61\143\x63\157\165\156\164\137\163\164\141\164\x75\163"] === "\x65\114\x6f\143\153\145\x64") { vt_loge(sprintf("\x25\x73\x3a\40\141\x63\x63\x6f\165\x6e\164\x20\x6c\x6f\143\153\145\144\x3a\40\45\x73\x3a\x20\x25\x73", __METHOD__, $user_in_db["\x61\x63\143\x5f\146\141\151\x6c\x65\144\x5f\x6c\x6f\147\x69\156\x5f\143\157\165\156\x74"], $user_in_db["\141\x63\x63\x5f\165\x73\x65\162\x6e\141\155\x65"])); $failedLoginCount = $this->UserAccountsR2_model->add_login_failure($decoded_username); return array("\145\162\162\x6f\x72\103\157\x64\145" => VERR_AUTH_ACCOUNT_LOCKED, "\145\162\162\157\x72\x4d\x65\163\163\x61\147\145" => "\124\x68\145\x20\141\143\x63\x6f\165\156\x74\40\x69\x73\40\x6c\157\x63\x6b\145\x64", "\x61\143\x63\157\x75\x6e\x74\114\157\x63\x6b\x6f\165\x74\124\150\x72\145\163\150\x6f\154\x64" => ACCOUNT_LOCKOUT_THRESHOLD, "\146\x61\x69\154\x65\144\x4c\x6f\x67\151\156\103\157\165\x6e\164" => $failedLoginCount); } } $result_app_login = $this->Authentication_model->app_login($parameters, $user_in_db); if ($result_app_login["\145\162\x72\157\x72\x43\157\144\x65"] === VERR_COMMON_SUCCESS) { if ($username !== TEMP_USERNAME && $password !== TEMP_PASSWORD) { $this->UserAccountsR2_model->reset_login_failures($decoded_username); $passwordExpired = new PasswordExpired(); $passwordPolicy = $passwordExpired->load_settings(); $updatedPasswordDate = $passwordExpired->load_updated_password($decoded_username); $result = $passwordExpired->isExpired($updatedPasswordDate, $passwordPolicy); if ($result == VERR_AUTH_PASSWORD_EXPIRING) { $result_app_login["\x65\x72\x72\157\162\x43\157\x64\x65"] = VERR_AUTH_PASSWORD_EXPIRING; } else { if ($result == VERR_AUTH_PASSWORD_EXPIRED) { $result_app_login["\145\162\x72\x6f\162\x43\x6f\144\x65"] = VERR_AUTH_PASSWORD_EXPIRED; } } } } else { if ($username !== TEMP_USERNAME && $password !== TEMP_PASSWORD) { $failedLoginCount = $this->UserAccountsR2_model->add_login_failure($decoded_username); if ($failedLoginCount >= ACCOUNT_LOCKOUT_THRESHOLD) { vt_loge(__METHOD__ . "\72\40\114\157\x67\x69\x6e\40\146\x61\x69\x6c\145\144\x20\164\157\x20\x6d\x61\x78\x20\143\x6f\x75\x6e\x74\x3a\x20" . $decoded_username); return array("\x65\x72\162\157\x72\x43\157\144\145" => VERR_AUTH_ACCOUNT_LOCKED, "\145\x72\x72\x6f\x72\115\x65\x73\x73\141\x67\x65" => "\x54\150\x65\x20\141\x63\143\x6f\x75\x6e\x74\x20\x69\163\40\154\157\x63\x6b\x65\x64", "\x61\143\143\157\x75\156\164\114\x6f\x63\153\157\x75\164\124\x68\x72\x65\x73\150\157\x6c\x64" => ACCOUNT_LOCKOUT_THRESHOLD, "\146\x61\x69\154\145\x64\114\x6f\147\151\x6e\103\157\x75\156\x74" => $failedLoginCount); } vt_loge(__METHOD__ . "\x3a\40\114\x6f\147\151\x6e\x20\146\x61\151\154\145\144\40\x74\157\x20\x63\157\x75\156\x74\72\40" . $failedLoginCount); return array("\145\162\162\x6f\x72\103\x6f\x64\x65" => VERR_AUTH_UNAUTHENTICATED, "\145\x72\x72\x6f\x72\115\x65\163\x73\x61\147\x65" => "\111\156\x76\141\154\x69\144\x20\x75\x73\x65\x72\x20\x6e\141\x6d\145\40\x6f\x72\40\x70\141\x73\163\x77\x6f\x72\x64", "\x61\x63\143\157\165\x6e\x74\114\157\x63\153\157\x75\164\124\x68\162\x65\163\150\x6f\154\144" => ACCOUNT_LOCKOUT_THRESHOLD, "\x66\x61\151\154\145\144\114\x6f\147\151\x6e\103\157\x75\x6e\x74" => $failedLoginCount); } } return $result_app_login; } } diff --git a/server/original/www/ezwebserver/src/application/models/Authentication_model.php b/server/original/www/ezwebserver/src/application/models/Authentication_model.php index f7ac29e..a180f6e 100644 --- a/server/original/www/ezwebserver/src/application/models/Authentication_model.php +++ b/server/original/www/ezwebserver/src/application/models/Authentication_model.php @@ -1,7 +1,7 @@ factory = CryptoUtils::getCryptoClassFactory(CryptoUtils::PHPSECLIB); $this->engine = $this->factory->newAESEngine(); if ($this->config !== null) { $this->injectedConfig = $this->config; } } function setConfig($config) { $this->injectedConfig = $config; } public function post_LogIn($parameters) { if ($this->injectedConfig === null) { throw new \InvalidArgumentException("\x63\x6f\156\146\x69\147\165\162\x61\164\151\157\x6e\x20\x69\x73\40\x6e\157\x74\40\x73\145\164\56"); } if (!array_key_exists("\x64\x61\x74\x61", $parameters)) { vt_loge(__METHOD__ . "\x3a" . "\116\157\x20\144\x61\164\x61\x20\x70\x61\163\163\145\144\56"); return array("\x65\162\x72\x6f\x72\x43\x6f\144\145" => VERR_AUTH_UNAUTHENTICATED); } $Data = $parameters["\144\141\x74\141"]; try { $decoded = CryptoUtils::decrypt_aes_with_magic(base64_decode($Data), $this->injectedConfig->item("\152\x77\x74\x5f\x6b\x65\x79")); } catch (InvalidHeaderException $ex) { vt_loge($ex); return array("\x65\x72\162\157\x72\103\157\144\145" => VERR_AUTH_UNAUTHENTICATED); } $exploded = explode("\72", $decoded); $username = $exploded[0]; $password = $exploded[1]; $exp = $exploded[2]; if ($this->verifyUser($username, $password) === TRUE) { $jwt = $this->generateJwtToken($this->injectedConfig->item("\x6a\x77\164\137\153\x65\171"), $this->injectedConfig->item("\152\x77\164\137\141\154\147"), $exp); $this->log_login_event("\162\141\x77", $username); return array("\145\162\162\157\x72\103\157\144\145" => VERR_COMMON_SUCCESS, "\152\167\164" => $jwt); } vt_loge("\x41\x75\x74\x68\145\156\x74\151\143\x61\164\x69\157\156\40\146\141\151\x6c\x65\x64\56\x20\111\x6e\x76\141\154\x69\x64\x20\x75\163\145\x72\x2e"); return array("\145\x72\162\x6f\162\103\157\x64\145" => VERR_AUTH_UNAUTHENTICATED); } private function generateJwtToken($key, $alg, $exp, $enc = "\x72\141\167", $username = "\x68\x74\164\x70\x3a\57\57\x77\167\x77\56\x65\x77\x6f\x6f\163\x6f\x66\x74\56\143\x6f\155", $clientName = "\114\145\x67\x61\x63\171", $clientVersion = "\60\x2e\x30\56\60") { $token = array("\145\x6e\x63" => $enc, "\x69\163\163" => $username, "\141\x75\144" => "\150\x74\164\160\x3a\57\57\167\x77\x77\x2e\145\x77\157\x6f\163\157\x66\x74\56\x63\157\155", "\151\x61\164" => (new DateTime())->getTimestamp(), "\145\170\160" => intval($exp), "\143\154\x69\x65\x6e\164\x4e\x61\x6d\145" => $clientName, "\143\x6c\x69\x65\x6e\164\x56\145\x72\163\151\x6f\x6e" => $clientVersion); $jwt = JWT::encode($token, $key, $alg); saveTokenToSession($token); return $jwt; } private function verifyUser($username, $password, $user_in_db = null) { if ($username === base64_decode(TEMP_USERNAME) && $password === md5(base64_decode(TEMP_PASSWORD))) { return TRUE; } if ($user_in_db === null) { load_model($this, "\x55\163\x65\162\x41\x63\x63\x6f\165\x6e\164\163\137\155\157\x64\145\154"); $users = $this->UserAccounts_model->getUserAccount($username); if (count($users) === 0) { vt_loge(sprintf("\x25\163\x3a\40\x55\x73\x65\x72\40\x6e\157\164\40\146\x6f\x75\x6e\144\x3a\x20\45\163", __METHOD__, $username)); return false; } $user_in_db = $users[0]; } $password_verified = strcasecmp($password, $user_in_db["\x61\143\x63\x5f\160\141\x73\x73\x77\x6f\162\x64"]) === 0; if ($password_verified === false) { vt_loge(sprintf("\45\x73\x3a\40\111\x6e\143\x6f\162\x72\x65\143\164\40\160\141\163\163\x77\157\x72\x64\x3a\x20\45\x73", __METHOD__, $username)); } return $password_verified; } private function decrypt($plain) { $props = new AESProperties(); $props->cipherMode = CipherMode::CBC; $props->paddingMode = PaddingMode::OneAndZeros; $props->keySize = ChunkSize::e128bits; $props->blockSize = ChunkSize::e128bits; $this->engine->setProperties($props); $this->engine->setKey(base64_decode(Authentication_model::KEY)); $this->engine->setIV(base64_decode(Authentication_model::IV)); $ret = $this->engine->decrypt($plain, $cipher); return $cipher; } private function log_login_event($enc, $username) { $_SESSION["\x75\163\145\x72\156\x61\155\x65\x2e\x65\156\143"] = $enc; $_SESSION["\x75\x73\x65\x72\x6e\x61\x6d\x65"] = $username; load_model($this, "\126\145\x72\163\x69\157\156\163\x5f\x6d\157\144\x65\154"); $currentVersion = $this->Versions_model->getCurrentVersion(); $stageVersion = $this->Versions_model->getCurrentStageVersion(); $version = $currentVersion["\143\165\162\x72\x65\156\x74\x56\x65\162\x73\151\157\156\116\141\x6d\145"] . "\x2e" . $stageVersion["\x63\x75\x72\x72\145\x6e\x74\x53\x74\141\147\x65\126\145\162\x73\151\157\156\116\x61\x6d\x65"]; $serverName = $this->Versions_model->getServerName(); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eLoggedIn), "\114\x6f\147\151\x6e\x2e\x20" . "\x28" . $serverName . "\40\x76" . $version . "\x29"); } public function post_appLogin($parameters) { return $this->app_login($parameters); } public function get_Ping($parameters) { return []; } public function decrypt_data($parameters) { if (!array_key_exists("\x64\x61\164\x61", $parameters)) { vt_loge(__METHOD__ . "\x3a" . "\x64\x61\x74\x61\x20\x69\163\x20\156\157\164\x20\163\145\164\56"); return array("\x65\x72\x72\157\x72\x43\x6f\x64\145" => VERR_AUTH_UNAUTHENTICATED); } $Data = $parameters["\x64\141\164\141"]; try { $decoded = json_decode($this->decrypt(base64_decode($Data))); } catch (InvalidArgumentException $ex) { vt_loge($ex); return array("\145\x72\162\x6f\x72\x43\157\144\145" => VERR_AUTH_UNAUTHENTICATED); } catch (InvalidHeaderException $ex) { vt_loge($ex); return array("\145\162\162\x6f\162\x43\157\x64\x65" => VERR_AUTH_UNAUTHENTICATED); } return array("\145\x72\162\157\162\103\x6f\144\x65" => VERR_COMMON_SUCCESS, "\144\145\x63\x72\171\x70\x74\145\144\104\141\164\141" => $decoded); } public function app_login($parameters, $user_in_db = null) { if ($this->injectedConfig === null) { vt_loge(__METHOD__ . "\72\x20\x63\157\156\146\x69\147\165\x72\x61\164\x69\x6f\156\40\151\163\x20\156\157\164\40\163\x65\x74\56"); throw new \InvalidArgumentException("\x63\157\156\146\x69\x67\165\162\x61\164\151\x6f\x6e\x20\x69\163\40\156\157\164\40\x73\x65\x74\x2e"); } $result_decrypted = $this->decrypt_data($parameters); if ($result_decrypted["\145\162\x72\x6f\x72\103\157\144\145"] !== VERR_COMMON_SUCCESS) { vt_loge(__METHOD__ . "\72\40\106\141\151\x6c\145\144\x20\164\157\x20\x64\145\x63\162\x79\160\x74\40\154\157\147\151\156\40\x64\x61\164\141\56"); return $result_decrypted; } $decrypted = $result_decrypted["\144\x65\x63\x72\x79\160\x74\145\x64\x44\141\164\x61"]; if (empty($decrypted->{"\x76\145\162"}) || empty($decrypted->{"\143\x6c\151\145\x6e\x74"}) || empty($decrypted->{"\x61\x75\x74\150"})) { vt_loge(sprintf("\x25\163\x3a\40\124\150\x65\x72\x65\40\141\162\x65\40\x6d\x69\163\x73\x69\156\147\x20\146\x69\x65\154\x64\x73\x20\x69\156\40\154\x6f\x67\x69\156\x20\x64\x61\164\x61\72\x20\45\163", __METHOD__, json_encode($parameters))); return array("\x65\x72\x72\157\162\103\157\144\145" => VERR_AUTH_UNAUTHENTICATED); } $decoded = AuthenticationHelper::decodeAuthData($decrypted); $ver = $decoded["\166\x65\x72"]; if ($ver !== "\x31\x2e\x30\56\60") { vt_loge(__METHOD__ . "\x3a\40\x55\x6e\x73\x75\x70\x70\157\162\164\145\144\40\154\157\x67\x69\x6e\40\x64\141\164\141\x20\x76\145\162\x73\x69\x6f\x6e\x3a\40" . $ver); } $client = $decoded["\143\x6c\151\145\156\164"]; vt_logi(__METHOD__ . "\72\40\x41\160\160\x6c\x69\143\141\164\x69\x6f\x6e\40\x6c\x6f\x67\x69\x6e\72\x20\x63\154\x69\x65\156\164\72\40" . json_encode($client)); $enc = $decoded["\x65\156\x63"]; $username = $decoded["\x75\x73\x65\162\156\x61\155\x65"]; $decoded_username = $decoded["\144\145\143\x6f\x64\145\144\125\163\145\x72\x6e\141\x6d\145"]; $decoded_password = $decoded["\x64\x65\143\157\144\x65\x64\x50\x61\163\163\167\x6f\x72\144"]; $exp = $decoded["\145\x78\x70"]; if ($this->verifyUser($decoded_username, md5($decoded_password), $user_in_db) === TRUE) { $jwt = $this->generateJwtToken($this->injectedConfig->item("\x6a\167\x74\x5f\153\x65\171"), $this->injectedConfig->item("\x6a\x77\164\x5f\x61\154\147"), $exp, $enc, $username, $client->name, $client->ver); $this->log_login_event($enc, $username); return array("\x65\162\x72\x6f\x72\103\157\x64\145" => VERR_COMMON_SUCCESS, "\152\x77\x74" => $jwt); } vt_loge(__METHOD__ . "\72\x20\101\x70\x70\40\114\x6f\x67\151\x6e\40\x66\141\151\154\145\x64\x3a\40" . $decoded_username); return array("\145\x72\162\x6f\162\x43\x6f\144\x65" => VERR_AUTH_UNAUTHENTICATED); } } diff --git a/server/original/www/ezwebserver/src/application/models/CTFilesR2_model.php b/server/original/www/ezwebserver/src/application/models/CTFilesR2_model.php index ab8ea63..5c7939a 100644 --- a/server/original/www/ezwebserver/src/application/models/CTFilesR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/CTFilesR2_model.php @@ -1,7 +1,7 @@ Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTAG, $filePath); $ret_delete = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); if ($ret_delete === FALSE) { vt_loge(sprintf("\45\x73\72\40\x4e\157\x20\45\x73\x20\x66\151\x6c\x65\40\144\x65\x6c\145\164\145\x64\72\40\45\x73", __METHOD__, $type, $fileAbsFilePath)); } return $ret_delete; } public function delete_CTFilesByChartNoAndPathR2($parameters) { $chartNo = urldecode($parameters["\x63\x68\x61\162\164\x6e\157"]); $filePath = urldecode($parameters["\x70\141\164\x68"]); $force = filter_var(urldecode($parameters["\146\x6f\x72\x63\145"]), FILTER_VALIDATE_BOOLEAN); load_model($this, "\111\155\141\147\145\163\137\155\x6f\x64\145\x6c"); $ret_images_in_group = $this->Images_model->post_ImagesInGroup(["\x69\155\141\x67\145\x46\151\x6c\x65\x4e\141\155\x65\163" => [$filePath]]); if ($ret_images_in_group["\x65\x72\x72\x6f\x72\103\x6f\x64\145"] == VERR_DB_NOSUCHDATA) { return ["\145\162\162\157\162\x43\x6f\x64\145" => $ret_images_in_group["\x65\x72\162\157\x72\103\157\x64\145"], "\x65\162\162\x6f\x72\x4d\145\x73\163\x61\147\145" => "\x54\x68\145\40\151\x6d\141\147\145\40\x6e\157\x74\40\x66\x6f\165\x6e\x64\x2e"]; } if ($force === false && $ret_images_in_group["\151\155\141\147\145\106\x69\154\145\163"][0]["\x69\x73\x49\156\107\x72\x6f\x75\160"] === true) { vt_loge(sprintf("\45\163\72\40\x54\x68\145\40\x43\124\x20\146\x69\x6c\145\x20\x69\163\40\x69\x6e\x20\141\40\x67\x72\157\x75\160\72\x20\x25\163", __METHOD__, $filePath)); return ["\x65\162\x72\x6f\x72\x43\157\x64\145" => VERR_E2_IMAGE_IN_GROUP, "\x65\162\x72\157\162\x4d\x65\163\x73\141\x67\145" => "\124\x68\x65\40\x69\x6d\x61\x67\x65\40\x69\163\40\151\x6e\40\x61\x20\x67\162\x6f\165\x70"]; } $ret_delete_image = $this->Images_model->delete_ImagesByFileAndChartNo($filePath, $chartNo); if (!$ret_delete_image) { vt_loge(sprintf("\x25\163\x3a\x20\x69\155\x61\x67\x65\x20\151\x73\40\x6e\x6f\164\40\144\x65\154\x65\164\x65\x64\40\x66\x72\157\155\x20\104\102\x3a\40\x25\163\x3a\40\x25\163", __METHOD__, $filePath, $chartNo)); } if (isset($config) && array_key_exists("\144\145\x6c\x65\x74\x65\137\160\x61\164\x69\145\156\x74\x5f\x66\151\x6c\145\163", $config) && $config["\x64\145\x6c\145\164\145\x5f\160\141\x74\151\145\156\164\137\x66\151\x6c\145\163"]) { $dirAbsPath = $this->Datafile_model->getAbsCtDirPath($filePath, $chartNo); $ret_ct_dir = $this->Datafile_model->rmDirRecurMultiDrive($dirAbsPath); if ($ret_ct_dir === FALSE) { vt_loge(sprintf("\45\163\72\x20\116\x6f\x20\x43\x54\40\x64\x69\x72\40\x64\145\x6c\145\164\145\144\72\40\45\x73", __METHOD__, $dirAbsPath)); } $retTag = $this->deleteFile(FILETYPE_IMGTAG, $filePath); $retThumbnail = $this->deleteFile(FILETYPE_IMGTHM, $filePath); $retRaw = $this->deleteFile(FILETYPE_IMGRAW, $filePath); $dirPath = dirname($dirAbsPath); $dirFiles = scandir($dirPath); $retE3Prj = FALSE; foreach ($dirFiles as $dirFile) { if ($dirFile != "\56" && $dirFile != "\x2e\x2e") { if (strpos($dirFile, $filePath) !== FALSE) { $retE3Prj = unlink($dirPath . DIRECTORY_SEPARATOR . $dirFile); } } } if ($retE3Prj === FALSE) { vt_loge(sprintf("\x25\163\x3a\40\x4e\157\x20\105\63\x20\x70\162\x6f\x6a\x65\x63\x74\40\x66\151\x6c\x65\x20\x64\145\x6c\145\164\x65\x64\x3a\x20\x25\x73", __METHOD__, $dirPath . DIRECTORY_SEPARATOR . $dirFile)); } if ($ret_ct_dir !== FALSE || $retTag !== FALSE || $retThumbnail !== FALSE || $retRaw !== FALSE) { if (count(scandir($dirPath)) < 3) { rmdir($dirPath); } return array("\x65\162\x72\157\x72\x43\157\144\145" => VERR_COMMON_SUCCESS); } else { vt_loge(sprintf("\x25\x73\72\40\123\157\x6d\145\x20\x6f\146\x20\x66\x69\x6c\145\x73\40\141\x72\145\x20\156\x6f\164\40\x64\x65\x6c\x65\164\145\x64\56", __METHOD__)); return array("\x65\x72\x72\157\x72\103\x6f\144\145" => VERR_DB_NOSUCHDATA); } } else { return array("\145\x72\162\x6f\162\103\x6f\144\x65" => VERR_COMMON_SUCCESS); } } } diff --git a/server/original/www/ezwebserver/src/application/models/CTFiles_model.php b/server/original/www/ezwebserver/src/application/models/CTFiles_model.php index 31a4bd3..b2d3569 100644 --- a/server/original/www/ezwebserver/src/application/models/CTFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/CTFiles_model.php @@ -1,7 +1,7 @@ load->helper("\146\x73"); load_model($this, "\104\x61\164\x61\x66\151\x6c\145\x5f\155\x6f\144\145\154"); } public function post_CTFilesByChartNo($parameters, &$ctDirPath) { $ret = VSUCCESS; $chartNo = $parameters["\x63\x68\141\162\164\116\x6f"]; $attachedFileName = $parameters["\x61\x74\164\x61\143\x68\145\144\106\x69\154\x65\116\141\x6d\145"]; $eGroupingMode = $parameters["\145\x47\x72\x6f\x75\x70\151\x6e\147\115\157\144\x65"]; $eSourceType = EmodalityTransfer::SourceTypeToDatabaseString($parameters["\145\x53\x6f\x75\162\143\x65\124\x79\160\145"]); $acqDateTimeStr = ''; if (array_key_exists("\141\143\x71\x54\x69\x6d\145", $parameters)) { $acqDateTimeStr = $parameters["\141\x63\x71\x54\151\x6d\145"]; } $studyInstanceUID = $parameters["\x73\164\x75\144\x79\x49\156\x73\164\x61\x6e\x63\145\125\x49\x44"]; $systemCheck = serverEnviromentCheck(); if (!$systemCheck["\x70\x65\x72\x6d\x69\x73\163\151\x6f\156"]) { vt_loge(__METHOD__ . "\x3a\x20\x4e\x6f\40\160\x65\162\x6d\x69\163\163\151\x6f\156\40\x74\157\40\x72\x65\x61\144\x20\151\x6e\151\x20\x66\x69\154\x65\x2e"); return VERR_COMMON_ACCESS; } $thumbnailFilePath = ''; $tempDir = $this->Datafile_model->getTempDir(uniqid("\143\x74\x5f")); $tempCtFile = $tempDir . DIRECTORY_SEPARATOR . $attachedFileName; $path_info = pathinfo($tempCtFile); $bSmartPay = strtoupper($path_info["\x65\x78\x74\145\156\x73\151\157\x6e"]) == "\103\124\x58" ? TRUE : FALSE; $ret = checkPostUploadFile("\141\x74\164\141\x63\150\x65\144\x46\x69\x6c\145", $tempCtFile); if ($ret === false) { vt_loge(sprintf("\45\x73\x3a\40\x66\141\x69\154\145\144\x20\164\157\x20\165\160\x6c\157\x61\144\40\x43\124\40\x66\151\x6c\145\72\x20\45\x73", __METHOD__, $tempCtFile)); return VERR_COMMON_IO; } $dicomFilePath = extractOneFileFromCT($tempCtFile, $tempDir, 1); $dicom = readDicomHeader($dicomFilePath); $studyTimestamp = getAcquisitionTimestamp($dicom, $acqDateTimeStr); if ($studyTimestamp != null) { $acqTimestamp = $studyTimestamp; } else { vt_loge(__METHOD__ . "\x3a\40\x43\141\156\156\157\x74\40\x72\145\x61\144\40\x73\x74\165\144\x79\x20\x64\141\x74\x65\40\x61\156\x64\40\x74\151\x6d\145\x20\164\x61\147\40\166\x61\x6c\x75\x65\163\x20\146\x72\157\x6d\40\164\x68\x65\40\104\111\x43\x4f\x4d\x20\x66\x69\154\145\x2e\40\x43\165\x72\162\145\156\164\x20\x64\141\164\x65\40\x74\151\x6d\145\x20\x75\x73\145\144\x20\151\x6e\163\x74\145\x61\x64\x2e\40\x66\x69\x6c\x65\75\133" . $dicomFilePath . "\x5d"); } $this->Datafile_model->GetNewCtAndThumbnailPath($ctDirPath, $thumbnailFilePath, $acqTimestamp); makeDir($ctDirPath); $ret = rename($tempCtFile, $ctDirPath . DIRECTORY_SEPARATOR . $attachedFileName); if ($ret == FALSE) { vt_loge("\106\x61\x69\x6c\145\144\40\164\x6f\40\x72\145\x6e\141\155\145\x20\x66\162\157\155\40\133" . $tempCtFile . "\x5d\40\164\x6f\40\x5b" . $ctDirPath . "\x5d\x2e"); return VERR_COMMON_IO; } try { if (!isset($_FILES["\141\x74\164\x61\143\x68\x65\x64\106\151\154\145"])) { return VERR_COMMON_INVALID; } $ret = createThumbnailFileFromImage($thumbnailFilePath, $dicomFilePath); if ($ret != VSUCCESS) { return $ret; } $acqDateTime = date(DATAFORMAT[DATEFORMAT_DCM], $acqTimestamp); load_model($this, "\105\x32\151\155\x67\x5f\155\x6f\144\x65\154"); $ret = $this->E2img_model->insertCT($chartNo, basename($ctDirPath), $dicom, $acqDateTime, $studyInstanceUID, $eSourceType, $eGroupingMode, $bSmartPay); if ($ret === FALSE) { return VERR_COMMON_INVALID; } } finally { rmDirRecursive($tempDir); } return $ret; } public function get_CTFilesByChartNoAndPath($parameters) { $chartNo = $parameters["\143\x68\x61\x72\x74\116\157"]; $path = $parameters["\x70\141\x74\x68"]; return []; } public function delete_CTFilesByChartNoAndPath($chartNo, $filePath) { load_model($this, "\111\x6d\x61\147\x65\163\137\x6d\x6f\x64\x65\154"); $this->Images_model->delete_ImagesByFileAndChartNo($filePath, $chartNo); $dirAbsPath = $this->Datafile_model->getAbsCtDirPath($filePath, $chartNo); $ret = $this->Datafile_model->rmDirRecurMultiDrive($dirAbsPath); if ($ret === FALSE) { vt_loge(sprintf("\45\x73\72\40\x4e\157\x20\103\124\40\x64\151\x72\x20\144\145\x6c\145\164\145\144\72\40\x25\x73", __METHOD__, $dirAbsPath)); } $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTAG, $filePath); $retTag = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); if ($retTag === FALSE) { vt_loge(sprintf("\45\163\72\40\116\157\40\164\x61\147\x20\x66\x69\x6c\145\x20\144\x65\x6c\145\164\145\x64\x3a\x20\45\x73", __METHOD__, $fileAbsFilePath)); } $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTHM, $filePath); $retThumbnail = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); if ($retThumbnail === FALSE) { vt_loge(sprintf("\x25\163\x3a\x20\116\157\40\164\x68\165\155\142\x6e\141\151\154\x20\x66\x69\154\145\40\x64\x65\x6c\x65\164\x65\144\72\x20\x25\x73", __METHOD__, $fileAbsFilePath)); } $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); $retRaw = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); if ($retRaw === FALSE) { vt_loge(sprintf("\45\163\72\x20\116\x6f\x20\x72\x61\167\x20\146\x69\154\x65\x20\144\x65\154\145\x74\x65\x64\x3a\x20\x25\163", __METHOD__, $fileAbsFilePath)); } $dirPath = dirname($dirAbsPath); if (file_exists($dirPath)) { $dirFiles = scandir($dirPath); $retE3Prj = FALSE; foreach ($dirFiles as $dirFile) { if ($dirFile != "\x2e" && $dirFile != "\x2e\x2e") { if (strpos($dirFile, $filePath) !== FALSE) { $retE3Prj = unlink($dirPath . DIRECTORY_SEPARATOR . $dirFile); } } } if ($retE3Prj === FALSE) { vt_loge(sprintf("\45\163\72\40\x4e\x6f\40\x45\63\40\x70\162\157\152\145\x63\x74\x20\146\151\154\x65\x20\144\x65\x6c\x65\x74\x65\144\x3a\40\x25\163", __METHOD__, $dirPath)); } } else { vt_loge(sprintf("\45\163\72\x20\x43\x54\x20\144\151\162\40\156\157\164\x20\x66\157\165\x6e\144\72\x20\45\x73", __METHOD__, $dirPath)); } if ($ret !== FALSE || $retTag !== FALSE || $retThumbnail !== FALSE || $retRaw !== FALSE) { if (count(scandir($dirPath)) < 3) { rmdir($dirPath); } return array("\145\162\x72\157\162\x43\157\x64\145" => VERR_COMMON_SUCCESS); } else { vt_loge(sprintf("\45\163\72\40\123\157\155\145\40\x6f\146\x20\x66\x69\154\145\x73\x20\x61\162\145\40\x6e\x6f\164\40\x64\x65\154\x65\164\x65\144\56", __METHOD__)); return array("\x65\162\x72\x6f\x72\103\157\144\145" => VERR_DB_NOSUCHDATA); } } public function get_CTFilesByPath($parameters) { $path = $parameters["\160\x61\164\150"]; return []; } public function delete_CTFilesByPath($parameters) { $path = $parameters["\x70\x61\x74\150"]; return []; } public function get_CTFilesByChartNoAndPathForFirst($parameters) { $chartNo = $parameters["\143\x68\141\x72\164\x4e\157"]; $path = $parameters["\160\x61\164\150"]; return []; } } diff --git a/server/original/www/ezwebserver/src/application/models/CalibrationFileToZipVisitor.php b/server/original/www/ezwebserver/src/application/models/CalibrationFileToZipVisitor.php index 8c5d962..f500230 100644 --- a/server/original/www/ezwebserver/src/application/models/CalibrationFileToZipVisitor.php +++ b/server/original/www/ezwebserver/src/application/models/CalibrationFileToZipVisitor.php @@ -1,7 +1,7 @@ addFile($path . DIRECTORY_SEPARATOR . $file, $prefix . $file); if ($ret === FALSE) { vt_loge("\103\141\154\x69\x62\162\141\x74\151\x6f\x6e\106\x69\x6c\145\163\x49\x6e\132\151\160\106\x69\x6c\x65\102\x79\123\x65\162\151\x61\154\x4e\x75\155\142\145\x72\x5f\x67\x65\164\x20\x41\x70\151\x2e\40" . "\106\151\154\x65\40\151\156\x63\x6c\x75\163\x69\157\156\40\x45\x72\x72\157\162\56"); return array("\145\162\x72\157\162\x43\157\x64\145" => VERR_COMMON_IO); } } } diff --git a/server/original/www/ezwebserver/src/application/models/CalibrationFilesRepository.php b/server/original/www/ezwebserver/src/application/models/CalibrationFilesRepository.php index 082983b..49d1dd3 100644 --- a/server/original/www/ezwebserver/src/application/models/CalibrationFilesRepository.php +++ b/server/original/www/ezwebserver/src/application/models/CalibrationFilesRepository.php @@ -1,7 +1,7 @@ result = $default; } function travel($visitorClass, $serialNumber) { $visitor = new $visitorClass($visitorClass); $calibrationPath = getCalibarationFilePath($serialNumber); $fileList = scanDirSafe($calibrationPath); if (empty($fileList)) { vt_loge("\x43\x61\x6c\151\142\162\x61\x74\x69\157\156\x46\x69\x6c\145\x73\122\145\160\x6f\163\151\164\x6f\x72\x79\40\x43\154\141\163\163\56\40" . "\x4e\157\x20\123\x75\x63\x68\x20\x46\x69\x6c\x65\40\x45\162\x72\x6f\x72\56"); return array("\x65\x72\x72\157\162\103\157\x64\145" => VERR_COMMON_NOFILE); } $ret = $this->recursiveVisit($visitor, $calibrationPath, $fileList); if ($ret["\145\162\162\157\162\x43\157\x64\x65"] < 0) { return $ret; } else { return array("\145\162\x72\157\x72\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\x72\x65\x73\165\x6c\x74" => $this->result); } } function recursiveVisit($visitor, $path, $fileList, $prefix = '') { foreach ($fileList as $file) { if ($file !== "\56" and $file !== "\56\56") { if (is_dir($path . DIRECTORY_SEPARATOR . $file)) { $this->recursiveVisit($visitor, $path . DIRECTORY_SEPARATOR . $file, scanDirSafe($path . DIRECTORY_SEPARATOR . $file), $file . "\57"); } else { $ret = $visitor->visit($path, $file, $prefix, $this->result); if ($ret["\x65\x72\162\x6f\162\x43\157\x64\145"] == VERR_COMMON_IO) { return array("\x65\x72\162\157\x72\103\x6f\x64\145" => VERR_COMMON_IO); } } } } } } diff --git a/server/original/www/ezwebserver/src/application/models/CalibrationFilesToInfoVisitor.php b/server/original/www/ezwebserver/src/application/models/CalibrationFilesToInfoVisitor.php index ccb8114..5dc4abb 100644 --- a/server/original/www/ezwebserver/src/application/models/CalibrationFilesToInfoVisitor.php +++ b/server/original/www/ezwebserver/src/application/models/CalibrationFilesToInfoVisitor.php @@ -1,7 +1,7 @@ $prefix . $file, "\x73\x69\x7a\x65" => filesize($path . DIRECTORY_SEPARATOR . $file), "\x73\x68\x61\62\65\x36" => hash_file("\x73\150\141\62\65\66", $path . DIRECTORY_SEPARATOR . $file)); array_push($result, $data); } } diff --git a/server/original/www/ezwebserver/src/application/models/CalibrationFiles_model.php b/server/original/www/ezwebserver/src/application/models/CalibrationFiles_model.php index 38b21fe..f10f294 100644 --- a/server/original/www/ezwebserver/src/application/models/CalibrationFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/CalibrationFiles_model.php @@ -1,7 +1,7 @@ load->helper("\166\164\x5f\151\x6f\163\x65\156\163\157\162"); parent::__construct(); } public function get_CalibrationFilesInZipFileBySerialNumber($serialNumber) { require_once APPPATH . "\155\x6f\x64\145\154\x73\x2f\103\141\154\x69\142\x72\141\x74\x69\157\156\106\151\x6c\145\163\x52\x65\160\x6f\163\x69\164\x6f\162\x79\x2e\x70\x68\x70"; require_once APPPATH . "\155\x6f\144\145\x6c\163\x2f\x43\x61\x6c\151\142\x72\141\x74\x69\157\156\x46\x69\x6c\x65\124\x6f\132\151\x70\126\x69\163\151\164\157\162\x2e\160\x68\x70"; load_model($this, "\104\141\x74\x61\x66\x69\154\x65\x5f\155\157\x64\x65\x6c"); $zipFileName = tempnam($this->Datafile_model->getTempDir(), "\x5a\151\160"); $this->load->library("\172\151\x70\167\162\141\x70\160\145\x72"); $ret = $this->zipwrapper->setZipFile($zipFileName); if ($ret["\145\162\x72\157\162\103\x6f\144\145"] != VERR_COMMON_SUCCESS) { return $ret; } $repository = new CalibrationFilesRepository($this->zipwrapper); $ret = $repository->travel(new CalibrationFileToZipVisitor(), $serialNumber); if ($ret["\145\x72\x72\x6f\162\103\157\144\145"] != VERR_COMMON_SUCCESS) { return $ret; } $ret = $this->zipwrapper->getZipFile(); if ($ret["\x65\x72\162\x6f\x72\103\157\x64\x65"] == VERR_COMMON_SUCCESS) { return array("\x65\x72\162\x6f\162\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x66\x69\x6c\145\116\141\x6d\145" => $zipFileName); } else { return $ret; } } } diff --git a/server/original/www/ezwebserver/src/application/models/Captures_model.php b/server/original/www/ezwebserver/src/application/models/Captures_model.php index c38416d..7e74e0f 100644 --- a/server/original/www/ezwebserver/src/application/models/Captures_model.php +++ b/server/original/www/ezwebserver/src/application/models/Captures_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strChartNo))->result_array(); } public function get_CapturesByChartNoAndGroupList($strChartNo) { $sql = "\xa\x20\x20\40\x20\x20\40\40\x20\x20\40\40\x20\x53\105\114\105\x43\x54\x20\104\x49\123\124\111\x4e\x43\x54\40\x49\115\107\137\x43\x54\x5f\116\x41\115\x45\40\106\x52\x4f\x4d\40\x54\142\154\x5f\111\155\x61\x67\x65\xa\40\x20\x20\40\40\40\x20\40\40\x20\x20\40\127\110\x45\x52\x45\x20\111\115\107\137\x43\110\101\x52\124\x5f\x4e\x4f\x20\75\x20\x3f\12\40\40\40\40\x20\x20\x20\40\40\40\40\40\x4f\x52\104\x45\122\x20\102\131\x20\111\115\x47\x5f\103\x54\137\x4e\x41\x4d\105\x20\104\x45\123\x43"; return $this->db->query($sql, array($strChartNo))->result_array(); } public function put_Captures($sCaptureImage) { $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $sql = "\xa\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\111\116\123\105\122\124\x20\111\116\x54\117\40\124\102\114\x5f\x49\x6d\x61\x67\x65\50\12\x20\40\40\40\40\x20\40\40\x20\x20\40\40\x20\40\151\x6d\x67\137\x73\164\x75\x64\x79\x5f\x75\151\x64\54\xa\x20\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\x69\x6d\x67\137\143\x74\137\x6e\x61\x6d\145\54\12\x20\40\40\x20\40\40\x20\x20\40\x20\x20\40\x20\x20\x69\155\147\137\x66\151\x6c\145\x5f\156\x61\x6d\x65\54\12\40\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\x20\x69\155\x67\137\143\141\x70\x74\165\162\145\137\x64\x61\x74\x65\x2c\xa\40\40\x20\40\x20\40\x20\x20\40\x20\40\x20\40\x20\151\155\x67\x5f\x63\x68\x61\x72\x74\137\x6e\x6f\54\12\x20\x20\x20\40\40\40\x20\40\x20\40\x20\40\40\x20\151\x6d\x67\137\x72\145\163\x65\162\166\x65\x64\x31\x2c\12\x20\x20\40\x20\x20\40\40\x20\40\x20\x20\40\x20\40\151\155\x67\137\x63\157\x6d\x6d\145\x6e\164\x29\12\x20\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\126\101\x4c\125\x45\x53\x28\x3f\x2c\x20\x3f\54\40\x3f\x2c\40\x3f\54\40\77\54\x20\77\54\40\77\51"; $this->db->query($sql, array($sCaptureImage["\163\164\x72\123\164\x75\x64\x79\125\x49\x44"], $sCaptureImage["\x73\x74\x72\x43\x54\116\141\x6d\x65"], $sCaptureImage["\163\164\162\x46\x69\154\x65\116\141\155\x65"], $sCaptureImage["\x64\164\103\x61\x70\164\x75\x72\145\104\x61\x74\x65\x54\x69\155\x65"], $sCaptureImage["\163\164\x72\x43\150\141\162\164\116\x6f"], $sCaptureImage["\x73\x74\162\104\143\155\x46\x69\x6c\x65\x43\x6f\165\156\x74"], $sCaptureImage["\x73\164\x72\103\157\x6d\155\145\156\x74"])); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function delete_CapturesByFile($strDeleteFileName) { $sql = "\12\x20\x20\40\x20\40\40\40\40\40\x20\40\x20\x44\105\114\105\x54\x45\x20\x46\x52\117\x4d\x20\x54\x62\154\137\x49\155\x61\147\x65\12\x20\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\127\x48\x45\122\105\x20\x49\115\x47\137\x46\111\x4c\105\x5f\x4e\x41\x4d\x45\40\x3d\40\x3f"; $this->db->query($sql, array($strDeleteFileName)); return $this->db->affected_rows(); } public function get_CapturesByStudyUIDForGroup($strUID) { $sql = "\12\40\x20\40\40\40\x20\40\40\x20\x20\40\40\123\x45\x4c\x45\x43\x54\x20\x69\x6d\147\x5f\143\164\x5f\x6e\x61\155\x65\xa\40\40\x20\40\40\40\40\40\x20\40\x20\x20\106\x52\x4f\x4d\40\164\142\154\x5f\x49\155\141\147\145\12\40\x20\40\40\40\x20\40\40\x20\40\40\x20\x57\110\105\122\x45\x20\x69\155\147\137\163\x74\165\144\x79\x5f\x75\151\x64\40\x3d\77\12\40\40\x20\40\40\x20\x20\x20\x20\x20\40\40\117\122\x44\105\122\x20\x42\131\40\x69\x6d\x67\x5f\143\164\137\x6e\141\x6d\145\40\104\105\x53\103\40\114\111\x4d\111\124\x20\x31"; return $this->db->query($sql, array($strUID))->result_array(); } public function get_CapturesByChartNoAndGroup($strChartNo, $strGroupName) { $sql = "\xa\x20\40\x20\x20\x20\x20\x20\x20\40\40\x53\x45\x4c\x45\x43\x54\x20\52\40\x46\x52\x4f\x4d\40\x54\142\154\137\x49\155\141\147\x65\12\x20\x20\40\x20\40\x20\x20\40\x20\40\127\x48\x45\122\x45\40\x49\x4d\107\x5f\x43\x54\x5f\x4e\101\x4d\105\40\x3d\x20\77\x20\x61\x6e\144\40\x69\155\147\x5f\x63\150\x61\162\164\137\156\157\40\75\40\x3f"; return $this->db->query($sql, array($strGroupName, $strChartNo))->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/CartedCategories_model.php b/server/original/www/ezwebserver/src/application/models/CartedCategories_model.php index 15bf522..34abfc6 100644 --- a/server/original/www/ezwebserver/src/application/models/CartedCategories_model.php +++ b/server/original/www/ezwebserver/src/application/models/CartedCategories_model.php @@ -1,7 +1,7 @@ db->query($sql)->result_array(); } public function get_CartedCategoriesByLicense($strLicenseCondition) { $where = licenseConditionToIntArr($strLicenseCondition); if (empty($where[0])) { return VERR_COMMON_INVALID; } $sql = "\xa\40\40\x20\x20\x20\x20\x20\40\40\40\40\x20\x53\x45\x4c\x45\103\x54\40\52\xa\40\40\x20\x20\x20\x20\x20\40\x20\x20\x20\40\x46\x52\x4f\115\40\x53\103\x5f\103\x41\124\105\107\x4f\122\x59\40\x69\xa\40\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\127\110\x45\x52\x45\x20\x53\103\x5f\x43\101\124\x45\107\x4f\122\x59\x5f\124\131\x50\x45\x20\x49\x4e\40\x3f\x20\101\116\x44\x20\123\103\137\103\101\124\x45\x47\x4f\122\131\x5f\x43\101\x52\124\105\x44\40\x3d\x20\164\162\165\145\x20\101\116\104\40\x4e\x4f\x54\40\105\x58\x49\x53\124\123\x20\x28\xa\40\x20\40\x20\40\x20\x20\40\x20\x20\40\40\40\x20\x20\x20\123\x45\x4c\105\x43\124\x20\52\12\40\40\x20\x20\x20\x20\40\40\x20\x20\x20\x20\40\40\x20\40\106\122\117\115\40\123\x43\x5f\103\101\x54\x45\107\117\x52\131\x20\x65\xa\x20\40\x20\x20\40\40\x20\40\40\40\40\x20\x20\40\x20\40\x57\x48\105\122\x45\40\145\56\123\103\137\x43\101\x54\x45\x47\x4f\122\131\x5f\120\x41\122\105\x4e\x54\123\x5f\x49\x44\x20\x3d\x20\151\x2e\123\103\x5f\x43\101\x54\x45\x47\117\122\131\137\x49\x44\x29"; return $this->db->query($sql, array($where))->result_array(); } public function put_CartedCategoriesByIDAndIsCarted($nCategoryId) { $sql = "\12\x20\x20\x20\40\40\40\x20\40\40\x20\x20\40\x53\x45\x4c\105\103\124\x20\x53\103\137\x43\101\124\105\107\x4f\x52\x59\137\111\x44\xa\40\40\40\40\40\40\40\x20\x20\x20\x20\x20\x46\122\117\x4d\x20\x53\103\137\x43\x41\124\105\107\117\122\x59\12\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\x20\127\110\x45\122\x45\40\123\103\137\103\x41\124\x45\107\x4f\x52\131\x5f\x50\x41\x52\105\116\124\123\x5f\111\x44\x20\x3d\40\x3f"; return $this->db->query($sql, array($nCategoryId))->result_array(); } public function put_CartedCategoriesByIDAndIsCartedReturnIsEmptyFalse($nCategoryId, $bIsCarted) { $sql = "\12\40\40\40\40\40\40\x20\x20\x20\40\40\40\x55\x50\104\x41\124\x45\x20\x53\103\137\x43\101\x54\105\107\x4f\122\131\12\x20\40\40\40\x20\x20\40\40\40\40\40\x20\x53\105\x54\x20\x53\103\137\103\101\x54\105\107\117\122\131\x5f\103\x41\x52\124\105\104\40\x3d\40\77\12\x20\40\x20\40\40\40\40\x20\40\x20\40\40\x57\x48\x45\x52\x45\40\x53\103\x5f\x43\101\124\105\107\117\122\x59\137\111\104\40\x3d\40\x3f\x3b\12\x20\40\40\x20\x20\40\40\x20\x20\40\40\40\x55\x50\x44\x41\124\x45\40\123\x43\137\x43\101\x54\x45\x47\117\122\x59\xa\x20\40\40\x20\x20\x20\x20\40\40\x20\x20\x20\123\x45\124\x20\123\103\137\103\x41\124\105\107\x4f\x52\x59\137\103\101\122\124\x45\x44\x20\x3d\40\x3f\12\x20\x20\40\40\x20\40\x20\x20\40\40\40\40\127\x48\x45\x52\105\x20\123\103\137\x43\101\124\x45\107\117\122\131\x5f\x50\101\x52\105\116\x54\123\x5f\111\104\40\75\40\x3f"; $this->db->query($sql, array($bIsCarted, $nCategoryId, $bIsCarted, $nCategoryId)); return $this->db->affected_rows(); } public function put_CartedCategoriesByIDAndIsCartedReturnIsEmptyTrue($nCategoryId, $bIsCarted) { $sql = "\12\x20\x20\x20\x20\40\x20\40\40\40\x20\40\x20\125\120\x44\x41\x54\105\x20\123\103\137\x43\x41\124\105\107\x4f\122\x59\12\40\x20\40\40\x20\x20\40\40\x20\40\x20\40\x53\x45\x54\x20\x53\x43\137\103\x41\x54\x45\x47\x4f\122\x59\137\103\x41\x52\x54\x45\104\40\75\x20\77\12\x20\40\x20\40\40\x20\40\40\40\40\40\x20\x57\x48\x45\x52\x45\x20\x53\x43\137\103\101\124\x45\x47\117\x52\x59\x5f\x49\x44\x20\75\x20\x3f\12\x20\40\40\40\40\x20\40\40"; $this->db->query($sql, array($bIsCarted, $nCategoryId)); return $this->db->affected_rows(); } public function put_CartedCategoriesByIDAndIsCartedRecursively($nCategoryId, $bIsCarted) { $result = $this->put_CartedCategoriesByIDAndIsCartedReturnIsEmptyTrue($nCategoryId, $bIsCarted); $childs = $this->put_CartedCategoriesByIDAndIsCarted($nCategoryId); foreach ($childs as $childId) { $result += $this->put_CartedCategoriesByIDAndIsCartedRecursively($childId, $bIsCarted); } return $result; } } diff --git a/server/original/www/ezwebserver/src/application/models/Categories_model.php b/server/original/www/ezwebserver/src/application/models/Categories_model.php index fa37c6e..cc9b7cd 100644 --- a/server/original/www/ezwebserver/src/application/models/Categories_model.php +++ b/server/original/www/ezwebserver/src/application/models/Categories_model.php @@ -1,7 +1,7 @@ db->query($sql, array($nCategoryId))->result_array(); } public function delete_CategoriesByID($nCategoryId) { $sql = "\xa\40\x20\x20\40\40\40\40\x20\40\x20\x20\x20\104\105\x4c\x45\124\105\x20\x46\x52\117\115\40\123\x43\x5f\x43\x41\124\x45\x47\x4f\x52\x59\12\40\40\x20\40\x20\40\x20\x20\x20\40\x20\40\127\x48\x45\122\x45\x20\123\x43\137\103\x41\124\105\x47\x4f\x52\131\137\x49\104\x20\75\x20\77"; $this->db->query($sql, array($nCategoryId)); return $this->db->affected_rows(); } public function patch_CategoriesByIDAndNewName($nCategoryId, $strNewCategoryName) { $sql = "\12\40\x20\x20\x20\40\x20\40\x20\x20\40\x20\40\125\120\x44\x41\x54\x45\x20\x53\x43\x5f\103\101\124\105\x47\117\122\131\xa\40\40\x20\x20\x20\40\40\x20\40\40\x20\40\x53\x45\124\x20\123\103\x5f\x43\101\124\105\x47\x4f\122\131\x5f\x4e\101\115\x45\x20\75\x20\x3f\12\40\x20\40\x20\40\40\40\40\x20\x20\40\40\x57\110\x45\122\x45\x20\x53\103\137\103\101\x54\105\107\x4f\x52\x59\x5f\111\104\40\x3d\x20\x3f"; $this->db->query($sql, array($strNewCategoryName, $nCategoryId)); return $this->db->affected_rows(); } public function put_CategoriesByIDAndNewParent($nCategoryId, $nNewParentsId) { $sql = "\xa\40\x20\x20\40\40\40\40\40\x20\40\40\x20\x55\120\x44\x41\124\x45\40\123\103\137\x43\101\x54\105\107\x4f\122\x59\12\x20\40\40\40\x20\x20\x20\40\x20\x20\40\40\123\105\124\x20\x53\x43\137\103\101\x54\x45\107\x4f\x52\131\137\x50\101\x52\x45\116\x54\123\137\111\104\40\75\x20\x3f\12\x20\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\x57\x48\105\122\105\40\123\x43\137\x43\x41\x54\x45\x47\117\x52\131\137\111\104\40\x3d\x20\77"; $this->db->query($sql, array($nNewParentsId, $nCategoryId)); return $this->db->affected_rows(); } public function get_CategoriesByParentIdAndLicense($nParentID, $strLicenseCondition) { $where = licenseConditionToIntArr($strLicenseCondition); if (empty($where[0])) { return VERR_COMMON_INVALID; } if (intVal($nParentID) == -1) { $sql = "\12\x20\40\x20\40\40\x20\x20\40\40\x20\x20\40\40\x20\x20\x20\x53\105\x4c\105\x43\124\40\x2a\x20\106\x52\117\x4d\x20\123\103\137\x43\x41\124\x45\107\117\x52\x59\40\151\12\40\x20\40\x20\x20\40\40\40\x20\x20\40\x20\40\40\40\x20\127\110\105\122\x45\x20\x45\x58\111\x53\124\x53\x20\x28\x53\x45\114\105\x43\x54\x20\x2a\40\x46\122\x4f\x4d\x20\x53\x43\137\x43\x41\124\x45\x47\117\x52\131\x20\145\12\x20\x20\x20\40\40\x20\x20\40\x20\x20\40\40\40\x20\x20\x20\x57\x48\x45\x52\x45\x20\x28\x69\x2e\x53\103\x5f\x43\x41\x54\x45\107\x4f\122\131\137\120\x41\x52\105\x4e\124\123\137\111\104\x20\75\x20\63\x20\x41\116\104\40\151\56\123\x43\137\103\x41\x54\x45\x47\x4f\122\x59\x5f\124\x59\120\x45\x20\111\116\40\77\51\xa\x20\x20\40\40\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\117\x52\40\50\145\56\123\x43\x5f\x43\x41\x54\x45\107\x4f\x52\x59\x5f\120\101\x52\105\116\x54\123\137\x49\x44\40\75\x20\x69\56\123\103\x5f\103\101\124\105\x47\x4f\122\x59\137\111\104\x20\101\x4e\104\40\145\56\x53\x43\x5f\x43\x41\124\x45\107\117\x52\x59\x5f\x54\x59\120\105\x20\x49\116\40\x3f\51\51"; return $this->db->query($sql, array($where, $where))->result_array(); } else { $sql = "\xa\x20\40\40\x20\x20\x20\40\40\40\x20\x20\40\40\40\40\40\x53\105\114\x45\103\124\x20\x2a\x20\x46\122\117\115\40\x53\x43\137\x43\x41\x54\105\x47\x4f\122\x59\12\40\x20\x20\x20\x20\40\x20\40\40\x20\x20\x20\x20\x20\40\40\x57\x48\x45\x52\105\40\123\103\x5f\x43\101\x54\105\x47\x4f\x52\131\x5f\124\x59\x50\105\40\111\x4e\40\77\xa\40\40\40\x20\40\x20\x20\x20\40\x20\x20\40\40\x20\40\40\x41\x4e\x44\x20\x53\x43\x5f\103\x41\x54\x45\107\x4f\122\131\137\120\x41\122\x45\116\x54\x53\137\x49\104\x20\75\x20\x3f"; return $this->db->query($sql, array($where, $nParentID))->result_array(); } } public function get_CategoriesByName($strCategory) { $sql = "\12\40\x20\40\40\40\40\x20\40\x20\x20\40\40\40\x53\105\114\105\x43\x54\x20\52\xa\40\x20\40\x20\40\x20\40\40\40\x20\x20\x20\x20\x46\122\117\x4d\40\123\x43\137\103\101\124\105\107\x4f\x52\x59\12\x20\40\40\40\40\40\x20\x20\x20\x20\x20\40\40\x57\110\105\122\105\x20\123\x43\137\103\x41\x54\x45\107\x4f\122\x59\137\116\x41\115\105\x20\75\x20\x3f\xa\x20\x20\40\40\x20\x20\x20\x20"; return $this->db->query($sql, array($strCategory))->result_array(); } public function get_Categories() { $sql = "\xa\x20\40\x20\40\40\40\40\x20\x20\x20\40\x20\x53\x45\x4c\x45\x43\124\x20\x2a\xa\40\x20\x20\x20\x20\40\40\x20\x20\x20\40\x20\x46\122\x4f\x4d\40\x53\x43\137\x43\101\x54\x45\107\117\122\x59\xa\40\40\x20\x20\40\40\40\40\x20\40\x20\x20\157\x72\144\145\x72\40\142\x79\x20\x73\143\x5f\x63\x61\x74\145\x67\x6f\x72\171\137\160\x61\162\145\156\x74\163\137\151\x64\xa\x20\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\101\x53\x43\40\116\125\114\114\x53\x20\x46\151\162\x73\x74\x2c\40\x73\143\x5f\143\141\164\x65\147\x6f\162\x79\x5f\164\171\160\x65\54\x20\163\x63\x5f\x63\141\164\145\147\x6f\162\171\137\x69\144\40\101\123\103"; return $this->db->query($sql)->result_array(); } public function post_Categories($parameters) { $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $parameters["\156\120\x61\162\145\x6e\x74\x73\111\x64"] = NULL; $sql = "\12\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\111\x4e\x53\x45\122\124\40\x49\116\124\x4f\40\x53\x43\137\x43\x41\124\x45\107\x4f\x52\131\50\xa\40\x20\x20\x20\40\x20\40\x20\40\40\x20\40\40\x20\40\40\123\x43\x5f\x43\x41\x54\x45\x47\117\x52\131\x5f\116\101\115\105\54\xa\40\40\40\40\40\x20\x20\x20\x20\40\x20\40\40\40\40\40\123\x43\137\103\x41\124\x45\107\117\122\x59\137\120\x41\122\105\116\124\x53\137\111\104\x2c\12\x20\40\40\x20\40\40\40\40\x20\40\x20\40\x20\40\40\40\x53\103\137\x43\101\124\105\107\117\x52\131\137\117\122\x44\x45\x52\x5f\111\104\x2c\xa\x20\40\x20\40\x20\x20\40\40\40\40\x20\40\x20\x20\40\x20\123\x43\137\103\101\x54\105\107\x4f\x52\x59\137\x54\x59\120\x45\54\xa\x20\x20\x20\x20\40\40\40\x20\40\x20\40\40\40\40\40\x20\x53\103\137\103\x41\x54\x45\x47\117\x52\131\x5f\103\101\122\124\105\x44\x2c\xa\40\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\x20\x53\103\x5f\x43\101\124\x45\x47\x4f\x52\x59\x5f\x4c\x4f\x43\x4b\x45\x44\x29\xa\40\40\40\x20\40\x20\x20\40\40\x20\x20\40\x56\x41\x4c\125\105\x53\40\50\77\x2c\40\x3f\x2c\x20\77\54\40\77\x2c\x20\x3f\x2c\40\77\x29"; $ret = $this->db->query($sql, $parameters); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function post_CategoriesWithnParentsIdIsNotZero($parameters) { $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $sql = "\xa\40\x20\40\40\40\x20\40\x20\x20\x20\40\40\163\145\154\145\x63\164\40\x63\x6f\165\156\164\x28\52\x29\xa\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\40\x66\162\x6f\155\40\163\x63\137\x63\141\x74\145\147\x6f\162\x79\xa\40\x20\40\x20\40\40\x20\x20\40\x20\x20\40\167\x68\x65\x72\145\x20\x73\143\x5f\143\141\164\x65\x67\x6f\162\171\x5f\151\144\x20\x3d\x20\x3f"; $ret = $this->db->query($sql, array($parameters["\156\120\x61\x72\145\156\x74\x73\111\144"]))->result_array(); if (intval($ret[0]["\x63\157\165\x6e\x74"]) == 0) { return 0; } $sql = "\111\116\x53\x45\x52\x54\40\111\116\x54\x4f\40\x53\x43\x5f\x43\101\x54\x45\107\x4f\122\x59\50\12\x20\40\40\40\40\x20\x20\40\40\40\40\40\x53\x43\137\x43\101\x54\x45\x47\x4f\x52\x59\137\x4e\101\115\x45\54\xa\40\40\x20\40\x20\x20\40\40\40\40\40\x20\x53\x43\137\x43\x41\124\105\x47\x4f\x52\x59\137\x50\x41\x52\105\116\x54\123\137\111\104\54\12\x20\x20\40\x20\x20\x20\x20\x20\40\40\x20\x20\x53\x43\137\103\x41\124\105\x47\117\x52\131\x5f\117\122\104\x45\122\137\111\x44\x2c\xa\40\40\x20\40\x20\x20\x20\40\40\40\x20\40\x53\x43\x5f\103\x41\x54\105\107\x4f\122\x59\x5f\x54\x59\x50\105\x2c\xa\x20\40\40\40\40\40\x20\40\40\40\x20\x20\123\x43\137\103\101\x54\x45\x47\117\x52\x59\137\103\101\x52\x54\105\x44\54\xa\40\x20\x20\x20\40\40\40\x20\x20\40\40\x20\x53\103\137\103\x41\x54\105\107\x4f\122\131\x5f\114\x4f\x43\x4b\x45\104\51\12\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\40\126\x41\x4c\125\105\123\x20\50\x3f\x2c\40\77\x2c\40\77\54\40\x3f\x2c\x20\77\54\x20\x3f\x29"; $ret = $this->db->query($sql, $parameters); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function get_CategoriesByLicense($parameters) { $where = licenseConditionToIntArr($parameters); if (empty($where[0])) { return VERR_COMMON_INVALID; } $this->db->select("\x2a"); $this->db->from("\163\x63\x5f\x63\141\x74\x65\x67\157\x72\171"); $this->db->where_in("\x73\143\x5f\143\x61\164\x65\x67\157\162\x79\137\164\171\x70\x65", $where); return $this->db->get()->result_array(); } public function get_CategoriesByIdForLocale($parameters) { $sql = "\xa\x20\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\x53\x45\x4c\105\103\124\x20\x2a\x20\x46\122\x4f\115\x20\x53\103\x5f\103\x41\124\105\x47\x4f\x52\x59\x20\127\x48\x45\x52\x45\x20\x53\103\x5f\103\x41\124\105\107\117\x52\x59\137\111\104\40\75\x20\x3f\xa\40\x20\40\40\40\40\x20\x20"; $data = $this->db->query($sql, $parameters)->result_array(); if (count($data) > 0) { $category = new SConsultCategory(); $category->nCategoryId = intval($data[0]["\163\143\x5f\x63\x61\164\145\x67\157\x72\x79\x5f\151\x64"]); $category->strCategoryName = $data[0]["\x73\x63\x5f\143\141\x74\x65\147\157\162\x79\137\x6e\x61\x6d\x65"]; $category->nParentsId = intval($data[0]["\163\x63\137\143\x61\x74\145\147\157\162\171\137\160\x61\x72\x65\156\164\x73\x5f\x69\144"]); $category->nCategoryOrderNumber = intval($data[0]["\x73\143\x5f\143\141\164\x65\x67\x6f\162\171\137\x6f\162\144\145\162\x5f\x69\144"]); $category->bIsCarted = setBoolVal($data[0]["\163\143\137\x63\141\164\145\147\x6f\x72\171\x5f\x63\x61\x72\x74\x65\x64"]); $category->nCategoryType = intval($data[0]["\x73\x63\137\x63\x61\x74\x65\x67\157\x72\171\137\164\171\160\145"]); $category->bIsLocked = setBoolVal($data[0]["\x73\143\137\x63\141\x74\x65\x67\157\x72\x79\x5f\x6c\157\143\153\x65\x64"]); $categoryPassInfo = new SConsultCategoryPassInfo(); $categoryPassInfo->sConsultCategory = $category; $categoryPassInfo->strLocaledCategoryName = ''; return $categoryPassInfo; } return false; } public function post_CategoriesByLocale($parameters) { $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; if (intVal($parameters["\x73\103\x6f\x6e\x73\x75\x6c\x74\x43\x61\164\145\147\157\162\171"]["\x6e\x50\141\x72\145\156\164\x73\111\x64"]) == 0) { $sql = "\12\40\x20\x20\40\x20\40\x20\40\x20\x20\40\40\40\x20\x20\40\x49\116\123\x45\x52\x54\40\x49\x4e\124\117\40\123\x43\x5f\103\101\x54\105\107\117\x52\131\12\x20\x20\40\40\40\40\40\40\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\x20\50\x53\103\137\x43\x41\124\x45\107\x4f\122\131\x5f\116\x41\115\105\x2c\xa\x20\40\x20\40\40\x20\x20\x20\40\x20\x20\40\40\40\40\40\40\x20\x20\x20\123\x43\137\x43\101\x54\105\x47\117\122\131\x5f\x50\x41\x52\105\116\x54\x53\x5f\x49\104\54\xa\40\x20\40\40\40\40\40\40\40\x20\40\x20\x20\x20\40\x20\x20\40\x20\40\x53\x43\137\x43\101\124\x45\x47\117\x52\x59\x5f\117\x52\104\105\122\x5f\x49\104\x2c\xa\40\x20\x20\40\40\x20\40\40\x20\x20\40\40\40\40\x20\x20\x20\40\x20\40\123\x43\x5f\x43\101\124\105\x47\x4f\122\131\137\x54\x59\120\x45\54\xa\40\40\x20\40\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\x20\40\40\40\40\123\103\x5f\103\x41\x54\105\107\x4f\x52\131\137\x43\x41\x52\x54\x45\x44\x2c\xa\x20\x20\40\x20\40\x20\40\40\40\x20\40\40\x20\x20\x20\40\40\40\40\40\x53\x43\137\103\x41\124\105\107\x4f\x52\x59\x5f\x4c\117\103\x4b\x45\x44\x29\12\40\x20\x20\x20\40\40\40\x20\40\40\40\x20\40\x20\x20\x20\126\x41\114\x55\105\x53\40\50\77\x2c\x20\x4e\125\x4c\x4c\x2c\x20\77\x2c\x20\x3f\x2c\40\x3f\54\40\77\51"; $this->db->query($sql, array($parameters["\163\103\157\x6e\x73\165\x6c\x74\103\141\x74\x65\147\157\x72\171"]["\x73\x74\x72\x43\x61\x74\x65\x67\x6f\x72\171\x4e\141\155\x65"], $parameters["\x73\103\x6f\x6e\x73\x75\154\x74\x43\141\164\145\147\157\x72\x79"]["\x6e\x43\141\x74\145\147\x6f\162\x79\x4f\162\144\x65\162\x4e\x75\x6d\142\145\x72"], $parameters["\163\x43\157\x6e\163\165\154\x74\103\x61\164\145\x67\x6f\162\x79"]["\x6e\103\x61\164\x65\147\157\162\x79\x54\171\160\145"], $parameters["\x73\103\x6f\x6e\x73\x75\x6c\164\103\141\x74\145\x67\157\162\x79"]["\x62\111\x73\103\141\x72\164\x65\144"], $parameters["\163\103\157\x6e\x73\165\154\164\x43\x61\x74\145\x67\157\x72\171"]["\142\x49\163\114\x6f\143\153\145\x64"])); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } else { $sql = "\xa\x20\x20\x20\x20\x20\40\x20\40\40\40\x20\x20\x20\x20\40\40\x73\x65\154\x65\143\x74\x20\x63\157\x75\x6e\x74\50\52\x29\12\x20\x20\40\40\40\x20\40\40\x20\40\x20\x20\x20\40\x20\40\146\162\x6f\x6d\x20\x73\x63\x5f\143\141\164\x65\147\157\162\x79\xa\x20\40\x20\40\x20\x20\x20\40\40\40\40\x20\40\x20\40\x20\x77\150\145\162\145\40\x73\143\x5f\143\x61\164\145\x67\157\x72\x79\137\x69\x64\x20\x3d\x20\x3f"; $ret = $this->db->query($sql, array($parameters["\x73\103\157\x6e\x73\x75\x6c\x74\x43\x61\164\145\x67\x6f\162\171"]["\x6e\120\x61\162\145\x6e\164\163\111\144"]))->result_array(); if (intval($ret[0]["\143\x6f\x75\x6e\x74"]) == 0) { return 0; } $sql = "\xa\x20\40\40\40\40\40\40\x20\40\x20\40\x20\x20\40\40\x20\x49\116\x53\105\122\124\40\x49\x4e\x54\x4f\x20\123\103\137\x43\101\124\x45\107\x4f\x52\131\xa\40\x20\40\40\40\40\40\40\40\x20\40\40\40\x20\40\x20\40\40\40\40\x28\x53\x43\137\103\101\124\105\x47\117\x52\131\137\x4e\x41\x4d\105\x2c\12\40\x20\x20\40\40\40\40\x20\40\x20\x20\40\40\40\x20\40\x20\x20\40\x20\x53\x43\137\x43\x41\124\105\x47\x4f\x52\x59\x5f\x50\101\122\105\116\124\x53\x5f\x49\x44\x2c\xa\40\x20\40\x20\40\40\40\x20\40\x20\40\x20\x20\40\40\40\x20\40\40\40\x53\x43\x5f\x43\x41\x54\105\107\117\122\131\137\117\x52\x44\105\122\x5f\x49\104\54\12\x20\x20\40\x20\x20\40\40\40\x20\40\40\x20\x20\x20\40\40\40\40\x20\40\123\x43\137\103\x41\124\x45\x47\x4f\x52\131\x5f\124\131\120\x45\x2c\12\x20\40\x20\40\x20\40\x20\x20\40\x20\x20\x20\x20\x20\40\40\40\40\40\x20\123\103\137\103\x41\x54\105\x47\x4f\x52\x59\137\103\x41\122\124\105\104\x2c\xa\40\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\x20\x20\123\x43\137\x43\x41\x54\105\107\x4f\122\131\x5f\x4c\117\x43\x4b\105\104\51\xa\40\x20\x20\40\x20\40\x20\x20\40\40\x20\40\x20\x20\x20\x20\x56\101\x4c\x55\105\123\40\x28\77\54\x20\77\54\40\77\x2c\x20\77\54\x20\77\x2c\x20\77\51"; $this->db->query($sql, array($parameters["\x73\103\x6f\x6e\x73\x75\154\164\103\141\164\x65\147\x6f\162\x79"]["\163\x74\x72\103\141\x74\145\x67\157\x72\171\116\x61\x6d\x65"], $parameters["\x73\x43\x6f\x6e\x73\x75\154\x74\103\141\164\x65\x67\157\x72\x79"]["\156\x50\x61\x72\145\x6e\164\163\x49\144"], $parameters["\x73\103\x6f\156\x73\165\x6c\164\103\x61\164\145\x67\x6f\162\171"]["\156\x43\x61\x74\x65\x67\157\162\171\x4f\x72\x64\145\x72\116\x75\x6d\142\145\162"], $parameters["\x73\103\157\x6e\x73\165\x6c\x74\103\141\164\x65\x67\x6f\162\171"]["\156\103\141\164\x65\x67\x6f\162\171\x54\171\x70\145"], $parameters["\163\x43\157\156\163\165\154\164\x43\141\x74\x65\x67\157\x72\x79"]["\x62\111\163\x43\x61\162\x74\x65\144"], $parameters["\x73\103\x6f\x6e\163\165\x6c\164\103\x61\x74\145\147\x6f\x72\x79"]["\x62\x49\x73\114\x6f\143\x6b\145\x64"])); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } } public function get_CategoriesByRecentlyAccessedAndIsPremium($bIsPremium) { if ($bIsPremium) { $sql = "\xa\40\40\x20\x20\x20\40\40\x20\40\40\x20\40\40\x20\40\40\x53\x45\x4c\105\103\x54\x20\52\xa\40\40\x20\40\x20\40\x20\x20\x20\40\40\40\40\40\x20\40\106\122\x4f\x4d\x20\x20\123\103\x5f\103\x4f\x4e\124\105\116\x54\x20\x57\x48\105\x52\x45\40\x53\x43\x5f\x43\x4f\x4e\124\x45\116\124\137\114\x41\123\x54\x5f\101\x43\x43\x45\123\123\40\111\123\40\x4e\x4f\124\40\x4e\x55\114\114\12\40\x20\x20\x20\40\x20\x20\x20\40\x20\40\x20\x20\x20\40\40\117\122\x44\105\122\40\x42\131\x20\123\x43\x5f\103\x4f\x4e\124\105\x4e\x54\137\114\101\123\x54\x5f\101\103\x43\x45\123\123\40\104\105\x53\x43\12\40\x20\x20\40\x20\40\x20\x20\x20\x20\40\40\40\40\40\40\x4c\x49\115\x49\x54\40\x32\x30"; } else { $sql = "\12\x20\40\x20\x20\40\40\x20\40\x20\x20\40\40\x20\40\x20\x20\123\x45\x4c\105\103\x54\40\103\124\56\52\12\40\x20\x20\x20\40\40\40\40\x20\40\x20\40\40\40\x20\40\106\122\117\x4d\x20\123\x43\137\103\x41\124\105\107\x4f\122\131\40\x43\x47\x2c\40\x53\x43\137\103\117\x4e\124\105\116\124\x20\x43\124\12\40\40\x20\40\40\40\40\40\40\x20\x20\x20\x20\x20\x20\40\127\110\x45\x52\x45\40\103\107\x2e\x53\x43\137\x43\101\124\x45\107\x4f\x52\131\137\x54\131\120\x45\40\x21\x3d\40\44\x24\62\44\44\40\x41\x4e\104\40\x43\107\x2e\x53\x43\x5f\x43\x41\x54\105\x47\x4f\x52\x59\x5f\111\104\40\x3d\x20\103\124\x2e\x53\103\x5f\103\x41\124\105\107\117\122\131\137\111\x44\x20\x20\101\116\x44\x20\x43\x54\x2e\x53\103\x5f\103\117\x4e\124\x45\116\124\137\114\101\x53\124\x5f\101\103\103\105\123\x53\x20\x49\123\x20\x4e\x4f\x54\x20\x4e\125\114\x4c\xa\x20\40\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\x4f\122\x44\105\122\x20\x42\x59\x20\103\124\x2e\123\x43\137\x43\117\116\x54\105\x4e\124\x5f\x4c\x41\x53\124\x5f\x41\x43\x43\105\123\123\40\104\x45\123\x43\xa\x20\x20\40\x20\40\40\40\40\40\x20\40\40\40\x20\x20\40\114\111\115\111\124\40\62\60"; } return $this->db->query($sql)->result_array(); } public function get_ConsultContentByRecentlyAccessedAndIsPremium($bIsPremium) { $dbResult = $this->get_CategoriesByRecentlyAccessedAndIsPremium($bIsPremium); $vecRecentContents = array(); if (count($dbResult) > 0) { foreach ($dbResult as $row) { $content = new SConsultContent(); $content->nContentId = intval($row["\163\143\137\x63\x6f\156\x74\145\x6e\164\137\x69\144"]); $content->strContentName = $row["\163\x63\137\143\x6f\x6e\164\x65\156\x74\137\x6e\141\155\145"]; $content->strContentFilePath = $row["\163\x63\x5f\143\157\156\164\145\x6e\164\137\x66\151\154\x65\160\x61\x74\150"]; $content->nContentType = intval($row["\x73\x63\137\143\157\156\164\x65\156\x74\x5f\x74\171\x70\145"]); $content->dtLastAccessTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\163\x63\x5f\x63\157\x6e\164\145\x6e\x74\x5f\154\141\x73\x74\137\141\143\143\145\163\x73"]); $content->bFavorite = setBoolVal($row["\x73\143\137\x63\157\156\x74\145\x6e\164\137\x66\x61\166\x6f\x72\151\x74\145"]); $content->nCategoryId = intval($row["\x73\x63\137\143\141\x74\145\147\x6f\x72\x79\x5f\151\144"]); $content->dtRegisteredTime = currentDateFormat(DATEFORMAT_ISO8601, $row["\x73\143\137\x63\x6f\156\x74\x65\x6e\164\137\162\145\x67\x69\163\164\x65\x72\x65\144"]); array_push($vecRecentContents, $content); } } return $vecRecentContents; } } diff --git a/server/original/www/ezwebserver/src/application/models/Category.php b/server/original/www/ezwebserver/src/application/models/Category.php index ff1a7f0..3430d84 100644 --- a/server/original/www/ezwebserver/src/application/models/Category.php +++ b/server/original/www/ezwebserver/src/application/models/Category.php @@ -1,7 +1,7 @@ id = $id; $this->name = $name; } public function ok() { return "\x6f\153"; } } diff --git a/server/original/www/ezwebserver/src/application/models/Classifications_model.php b/server/original/www/ezwebserver/src/application/models/Classifications_model.php index e213289..f0e4bf7 100644 --- a/server/original/www/ezwebserver/src/application/models/Classifications_model.php +++ b/server/original/www/ezwebserver/src/application/models/Classifications_model.php @@ -1,7 +1,7 @@ db->select("\157\164\150\137\143\x6c\141\x73\163\137\x6e\141\x6d\145"); $this->db->from("\145\x32\137\157\x72\164\x68\157\137\x63\x6c\x61\163\x73\151\146\151\143\x61\x74\x69\x6f\156"); $result = $this->db->get()->result_array(); if (count($result) > 0) { return ["\145\162\x72\157\162\103\x6f\144\x65" => VERR_COMMON_SUCCESS, "\x63\x6c\x61\163\x73\151\x66\x69\x63\x61\x74\151\157\x6e\116\x61\x6d\x65\x73" => array_column($result, "\x6f\164\x68\137\x63\x6c\x61\x73\x73\137\156\141\x6d\145")]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Contents_model.php b/server/original/www/ezwebserver/src/application/models/Contents_model.php index 819ba86..c86d321 100644 --- a/server/original/www/ezwebserver/src/application/models/Contents_model.php +++ b/server/original/www/ezwebserver/src/application/models/Contents_model.php @@ -1,7 +1,7 @@ db->query($sql, array($nCategoryId))->result_array(); if (intval($ret[0]["\x63\157\x75\156\164"]) == 0) { return 0; } $sql = '' . "\111\116\x53\x45\x52\x54\x20\111\116\124\x4f\40\123\x43\x5f\103\x4f\116\x54\x45\x4e\x54\50" . "\x53\x43\137\103\x4f\x4e\x54\105\116\x54\x5f\x4e\x41\115\105\54\40" . "\123\103\x5f\x43\117\116\124\x45\116\x54\137\106\111\114\x45\x50\x41\x54\110\x2c\40" . "\x53\x43\x5f\x43\117\x4e\124\105\x4e\124\x5f\124\131\x50\105\54\x20" . "\x53\103\x5f\103\117\x4e\x54\x45\x4e\x54\x5f\x52\x45\107\x49\x53\x54\x45\122\105\x44\54\40" . "\123\103\137\103\117\x4e\124\105\116\124\137\114\101\123\x54\x5f\x41\x43\103\105\x53\x53\54\40" . "\123\x43\137\x43\x4f\116\x54\x45\116\124\x5f\x46\x41\126\x4f\x52\111\124\105\x2c\x20" . "\x53\103\x5f\x43\x41\x54\105\107\117\122\131\137\111\x44\x29\x20" . "\126\101\114\125\105\x53\50\x20\x3f\54\x20\77\x2c\40\77\54\40\x43\125\x52\x52\x45\x4e\124\137\x54\111\115\x45\123\x54\101\115\120\x2c\40\x4e\125\x4c\x4c\x2c\40\77\54\x20\77\51\x3b\12" . ''; $this->db->query($sql, array($strContentName, $strContentFilePath, $nContentType, $bFavorite, $nCategoryId)); return $this->db->affected_rows(); } public function get_ContentsByLicenseForRecently($strLicenseCondition) { $where = licenseConditionToIntArr($strLicenseCondition); if (empty($where[0])) { return VERR_COMMON_INVALID; } $sql = "\xa\x20\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\123\105\114\x45\x43\x54\40\103\x54\56\x2a\40\x46\x52\x4f\115\40\x28\x53\x43\x5f\x43\117\x4e\124\x45\116\124\40\x41\123\40\x43\x54\x20\x4a\117\x49\116\x20\123\103\x5f\x43\101\124\105\x47\x4f\122\131\x20\101\123\40\103\107\40\x4f\116\40\x43\124\56\x53\103\x5f\103\x41\x54\x45\107\x4f\x52\x59\137\x49\x44\40\75\40\103\107\x2e\x53\103\137\x43\x41\x54\x45\107\117\x52\131\x5f\x49\x44\x29\xa\x20\40\x20\x20\40\x20\40\x20\40\x20\x20\40\127\x48\105\x52\x45\40\50\103\124\x2e\123\103\x5f\x43\x4f\116\124\x45\x4e\x54\137\114\x41\x53\124\137\101\x43\103\105\123\123\x20\x49\x53\x20\x4e\x4f\124\40\x4e\x55\x4c\114\x20\101\116\104\x20\103\124\x2e\x53\103\137\103\x41\x54\105\107\x4f\x52\x59\x5f\111\x44\xa\40\x20\x20\40\40\40\40\x20\x20\40\x20\40\111\x4e\40\50\123\105\x4c\105\x43\x54\40\x53\x43\137\103\x41\x54\x45\107\117\x52\131\x5f\111\104\40\x46\122\x4f\x4d\x20\123\103\137\x43\x41\124\105\x47\117\122\x59\x20\x57\110\105\x52\x45\40\x53\103\137\103\101\124\105\x47\117\x52\x59\x5f\x54\x59\x50\x45\40\x49\x4e\40\x3f\xa\x20\40\x20\x20\x20\40\40\x20\40\x20\40\40\51\x29\x20\x4f\x52\x44\x45\122\40\102\131\x20\103\124\x2e\123\x43\x5f\103\117\x4e\x54\105\x4e\124\137\x4c\101\123\x54\x5f\x41\103\103\105\x53\123\x20\x44\105\x53\103\x20\114\x49\x4d\x49\124\x20\77"; return $this->db->query($sql, array($where, self::RECENT_CONTENT_NUM))->result_array(); } public function get_ContentsById($nContentId) { $sql = "\12\40\x20\x20\40\x20\x20\40\x20\40\x20\40\40\x53\x45\x4c\105\103\124\40\52\xa\40\x20\40\40\40\x20\x20\40\x20\40\x20\x20\106\122\x4f\x4d\x20\x53\103\137\x43\x4f\116\x54\x45\x4e\x54\xa\40\40\40\40\x20\40\x20\40\x20\x20\40\x20\x57\110\x45\122\105\x20\x53\x43\x5f\103\117\116\124\x45\116\x54\x5f\x49\104\x20\x3d\x20\x3f\12\x20\40\x20\40\40\x20\x20\40\40\x20\40\x20"; return $this->db->query($sql, array($nContentId))->result_array(); } public function delete_ContentsByID($nContentId) { $sql = "\12\40\x20\40\40\40\40\40\x20\x20\x20\x20\x20\104\105\x4c\x45\124\105\40\x46\122\x4f\115\40\x53\x43\x5f\x43\117\x4e\124\105\x4e\124\xa\x20\x20\x20\40\40\40\x20\x20\40\40\40\40\x57\110\x45\122\105\x20\x53\103\x5f\x43\x4f\x4e\x54\105\x4e\124\137\111\x44\40\75\x20\77"; $this->db->query($sql, array($nContentId)); return $this->db->affected_rows(); } public function patch_ContentsByIDAndNewName($nContentId, $strNewContentName) { $sql = "\12\x20\x20\40\x20\40\x20\40\40\x20\40\40\x20\125\120\x44\x41\x54\x45\40\123\103\x5f\103\117\116\x54\x45\116\124\xa\40\40\40\40\x20\x20\40\40\x20\x20\x20\x20\123\x45\x54\40\123\103\137\103\117\x4e\124\105\116\124\x5f\x4e\101\x4d\x45\x20\75\x20\77\xa\40\x20\x20\x20\40\40\40\40\40\40\x20\40\127\x48\105\x52\x45\40\123\103\x5f\103\117\x4e\x54\105\116\124\x5f\111\104\40\75\40\x3f"; $this->db->query($sql, array($strNewContentName, $nContentId)); return $this->db->affected_rows(); } public function post_ContentsByCategoryId($nCategoryId, $pageNum, $numItems) { $sql = "\xa\40\40\x20\40\x20\x20\40\x20\x20\40\x20\x20\x53\x45\114\x45\x43\x54\x20\x2a\12\40\40\40\x20\40\x20\40\40\40\40\40\40\106\x52\x4f\115\40\123\103\x5f\x43\117\x4e\x54\105\116\x54\12\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\x20\x57\110\x45\x52\x45\40\x53\103\137\x43\101\x54\105\x47\117\122\131\137\111\104\40\x3d\x20\77\12\40\40\x20\40\x20\x20\40\x20\x20\x20\x20\x20\x4f\x52\x44\x45\122\x20\x42\x59\40\123\x43\x5f\x43\117\116\124\105\116\124\137\x52\x45\107\x49\123\124\x45\x52\105\x44\x20\101\123\103\54\40\x53\x43\x5f\103\117\x4e\x54\105\x4e\x54\137\116\101\x4d\105\12\40\40\40\x20\40\x20\x20\40\x20\x20\40\40\x4c\111\115\x49\124\40\77\x20\117\x46\x46\123\x45\x54\40\77\xa\x20\x20\x20\40\x20\40\x20\40\40\40\40\40"; return $this->db->query($sql, array($nCategoryId, $numItems, get_offset($numItems, $pageNum)))->result_array(); } public function put_ContentsByIDForLastAccess($nContentId) { $sql = "\xa\40\x20\x20\x20\40\40\x20\40\40\40\x20\40\x55\120\104\101\124\105\x20\x53\103\x5f\x43\117\x4e\x54\105\116\x54\12\x20\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\123\105\x54\x20\123\103\137\x43\117\116\124\105\x4e\124\x5f\x4c\x41\x53\124\x5f\x41\x43\x43\105\123\x53\40\x3d\40\103\x55\x52\x52\105\116\x54\x5f\x54\x49\x4d\x45\x53\x54\x41\115\120\12\x20\x20\x20\x20\x20\x20\x20\x20\40\40\x20\40\x57\x48\105\122\105\40\123\x43\137\103\117\x4e\124\x45\x4e\x54\x5f\111\x44\40\75\x20\x3f"; $this->db->query($sql, array($nContentId)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/CopiedContents_model.php b/server/original/www/ezwebserver/src/application/models/CopiedContents_model.php index 611ea62..e38ee86 100644 --- a/server/original/www/ezwebserver/src/application/models/CopiedContents_model.php +++ b/server/original/www/ezwebserver/src/application/models/CopiedContents_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strlContentFilePath))->result_array(); } public function get_CopiedContentsById($nContentId) { $sql = "\12\40\40\x20\x20\x20\x20\x20\40\40\x20\x20\40\123\x45\x4c\x45\103\124\x20\x43\x4f\x55\116\x54\50\x53\103\137\x43\x4f\116\x54\105\x4e\x54\x5f\111\104\x29\xa\x20\40\x20\40\40\40\x20\x20\40\x20\40\x20\x46\122\117\115\x20\x53\103\x5f\x43\117\x4e\124\105\x4e\x54\xa\40\40\x20\x20\x20\40\x20\40\x20\40\40\x20\127\x48\105\x52\x45\40\123\x43\137\103\x4f\x4e\x54\x45\x4e\124\137\x49\104\x20\75\40\x3f"; return $this->db->query($sql, $nContentId)->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/DataGroupImages_model.php b/server/original/www/ezwebserver/src/application/models/DataGroupImages_model.php index b3f165c..14ae66a 100644 --- a/server/original/www/ezwebserver/src/application/models/DataGroupImages_model.php +++ b/server/original/www/ezwebserver/src/application/models/DataGroupImages_model.php @@ -1,7 +1,7 @@ db->query($sql)->result_array(); $items = array(); if ($ret > 0) { foreach ($ret as $row) { $dataGroupImageInfo = SDataGroupImageInfo::createFromDBRecord($row); array_push($items, $dataGroupImageInfo); } return array("\x65\162\162\157\162\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\166\145\143\x44\x61\164\141\107\162\x6f\165\160\x49\155\x61\x67\x65\x49\156\146\x6f" => $items); } else { return array("\x65\162\x72\157\x72\103\x6f\144\145" => VERR_DB_NOSUCHDATA, "\x76\x65\x63\104\x61\x74\141\107\x72\157\165\x70\x49\155\x61\147\145\x49\156\146\x6f" => $items); } } public function post_DataGroupImages($dataGroupImageInfo) { $nDataGroupID = 0; $nImageID = 0; $nDataGroupImageID = 0; $sql = "\x53\105\x4c\x45\x43\x54\x20\x47\x52\x4f\125\120\137\x49\104\x20\x46\122\x4f\x4d\x20\x45\62\137\104\101\x54\x41\137\107\x52\117\125\120\40\x57\110\105\x52\x45\x20\x47\122\117\x55\x50\137\116\x41\x4d\105\40\75\x20\x3f"; $query = $this->db->query($sql, array($dataGroupImageInfo["\x73\164\x72\x44\141\164\141\107\162\157\165\160\x4e\141\155\145"]))->result_array(); if (count($query) > 0) { $nDataGroupID = $query[0]["\x67\162\157\165\160\x5f\x69\144"]; } if ($nDataGroupID != 0) { $sql = "\123\105\114\x45\103\x54\x20\111\x4d\107\x5f\x49\x44\54\x20\111\x4d\x47\x5f\x4d\x4f\x44\x41\x4c\x49\x54\131\40\x46\x52\117\115\x20\x45\62\137\111\115\107\40\x57\110\105\x52\x45\40\111\x4d\x47\x5f\106\x49\x4c\105\x4e\101\x4d\x45\x20\75\x20\x3f"; $query = $this->db->query($sql, array($dataGroupImageInfo["\x73\x74\162\111\155\x61\147\x65\106\151\x6c\x65\x4e\141\x6d\145"]))->result_array(); if (count($query) > 0) { $nImageID = $query[0]["\151\x6d\147\x5f\x69\x64"]; $strImageModality = $query[0]["\151\155\147\137\155\x6f\144\141\154\151\164\171"]; } if ($nImageID != 0) { if (!isset($dataGroupImageInfo["\x64\164\111\x6d\141\147\x65\122\145\147\104\141\164\145\124\x69\155\x65"]) || empty($dataGroupImageInfo["\x64\x74\x49\x6d\141\x67\145\x52\x65\147\104\x61\164\x65\124\151\155\x65"])) { $strDataGroupImageRegisteredDateTime = currentDateFormat(DATEFORMAT_DATABASE); } else { $strDataGroupImageRegisteredDateTime = $dataGroupImageInfo["\144\x74\111\155\x61\x67\x65\122\145\x67\x44\x61\164\x65\x54\x69\155\x65"]; } $sql = "\123\105\x4c\x45\103\x54\40\107\x52\x4f\125\x50\137\x49\115\107\137\x49\x44\40\106\122\117\115\40\105\62\x5f\x44\x41\x54\101\x5f\x47\x52\x4f\x55\x50\137\x49\x4d\x47\40\127\110\105\x52\x45\x20\111\x4d\107\137\x49\x44\40\75\x20\77\40\101\x4e\x44\x20\107\122\x4f\125\x50\x5f\111\104\40\x3d\40\x3f"; $query = $this->db->query($sql, array($nImageID, $nDataGroupID))->result_array(); if (count($query) > 0) { vt_loge(sprintf("\45\163\x3a\40\x63\141\x6e\x27\164\40\143\x72\x65\141\164\145\40\144\141\164\141\x67\162\157\x75\x70\40\144\x75\x65\40\164\x6f\x20\x6f\x76\x65\162\154\141\x70\72\40\144\141\164\141\147\x72\157\165\160\x3d\x25\x73", __METHOD__, json_encode($dataGroupImageInfo))); return VERR_DB_OVERLAP; } $sql = "\111\x4e\x53\x45\x52\124\40\111\x4e\124\117\40\105\x32\x5f\x44\x41\x54\x41\x5f\107\x52\117\125\x50\137\x49\x4d\x47\40\50\107\122\x4f\125\120\x5f\x49\104\54\40\x47\122\x4f\x55\x50\137\x49\x4d\x47\x5f\x4d\117\x44\x41\114\111\124\131\54\40\x47\122\117\x55\x50\137\111\x4d\x47\137\x4d\x4f\104\x45\x2c\40" . "\107\122\x4f\x55\x50\137\111\115\107\137\x52\105\107\x5f\104\x41\x54\105\x54\x49\x4d\105\54\x20\111\x4d\x47\x5f\111\104\54\40\107\122\x4f\x55\x50\x5f\x49\115\107\137\101\125\x54\117\137\x52\105\x47\51\x20\x56\x41\114\125\105\x53\40\50\77\x2c\40\x3f\x2c\x20\77\x2c\40\77\54\x20\77\x2c\x20\x3f\x29\40\122\105\x54\125\x52\116\x49\116\x47\x20\107\122\x4f\125\120\137\111\115\x47\137\x49\x44"; $ret = $this->db->query($sql, array($nDataGroupID, $dataGroupImageInfo["\x65\111\x6d\x61\147\145\x4d\157\144\x61\154\x69\x74\x79"] == '' ? $strImageModality : modality_api_str_to_modality_db_str($dataGroupImageInfo["\x65\111\x6d\x61\x67\x65\115\157\x64\x61\154\x69\x74\x79"]), $dataGroupImageInfo["\163\x74\162\111\155\141\147\x65\x4d\157\144\x65"], $strDataGroupImageRegisteredDateTime, $nImageID, $dataGroupImageInfo["\x62\x49\x6d\x61\147\x65\x41\165\x74\157\122\x65\x67\151\x73\164\x65\162\x65\x64"]))->result_array(); if (count($ret) > 0) { $nDataGroupImageID = $ret[0]["\147\x72\x6f\165\x70\x5f\x69\155\x67\137\x69\144"]; return $nDataGroupImageID; } else { vt_loge(sprintf("\x25\163\72\x20\143\141\156\47\164\40\143\x72\145\141\164\x65\x20\x64\x61\164\141\x67\162\x6f\165\160\x20\x69\155\x61\x67\x65\x20\x64\165\145\x20\x74\x6f\40\165\x6e\153\156\x6f\x77\x6e\40\x65\x72\162\x6f\x72\72\x20\144\x61\164\141\147\162\157\x75\x70\75\x25\x73", __METHOD__, json_encode($dataGroupImageInfo))); return $nDataGroupImageID; } } else { vt_loge(sprintf("\45\x73\72\40\143\x61\156\47\164\x20\x63\162\x65\x61\164\145\x20\144\x61\164\x61\x67\162\x6f\x75\x70\x20\x69\155\x61\147\x65\40\144\165\145\40\x74\157\x20\x6e\x6f\x20\151\x6d\x61\x67\x65\x20\x66\157\165\x6e\x64\x3a\40\144\x61\164\x61\147\162\157\165\160\75\x25\163\x2c\x20\x69\x6d\x61\x67\145\x69\144\75\x25\x64", __METHOD__, json_encode($dataGroupImageInfo), $nImageID)); return VERR_DB_NOSUCHDATA; } } else { vt_loge(sprintf("\45\x73\x3a\40\x63\141\x6e\x27\164\40\143\162\x65\141\x74\x65\x20\x64\x61\164\141\147\x72\157\x75\160\x20\151\155\x61\x67\145\x20\x64\x75\x65\x20\164\x6f\x20\144\x61\164\x61\147\x72\157\x75\160\x20\x6e\157\164\40\146\x6f\x75\156\144\x3a\40\144\141\x74\141\x67\162\157\x75\160\75\x25\163\54\x20\x69\144\75\45\144", __METHOD__, json_encode($dataGroupImageInfo), $nDataGroupID)); return VERR_DB_NOSUCHDATA; } } public function put_DataGroupImages($dataGroupImageInfo) { $sql = "\x53\x45\x4c\x45\103\124\40\x49\115\107\x5f\x49\104\x20\106\122\x4f\x4d\40\105\x32\x5f\111\115\107\40\x57\x48\x45\122\105\x20\x49\115\107\x5f\106\x49\114\105\x4e\101\115\105\40\75\40\x3f"; $query = $this->db->query($sql, array($dataGroupImageInfo["\163\x74\x72\111\x6d\141\x67\x65\x46\151\x6c\x65\116\x61\155\x65"]))->result_array(); if (count($query) > 0) { foreach ($query as $row) { $nImageID = $row["\x69\155\147\137\151\x64"]; } if ($nImageID != 0) { $sql = "\x55\120\104\101\x54\105\40\105\x32\137\x44\x41\x54\x41\x5f\x47\x52\x4f\125\120\x5f\111\x4d\x47\x20\123\x45\x54\x20" . "\x47\x52\117\125\x50\x5f\111\x4d\x47\137\x4d\117\x44\x41\x4c\111\x54\131\x20\75\40\77\x2c\40" . "\107\122\117\x55\x50\137\x49\115\107\137\115\117\x44\105\40\x3d\x20\77\54\40" . "\x47\122\117\125\x50\137\111\115\107\x5f\101\125\124\x4f\137\122\x45\x47\x20\75\40\x3f\x2c\40" . "\x49\x4d\x47\137\111\104\40\75\x20\77\40" . "\127\x48\105\x52\105\x20\x47\x52\117\x55\x50\137\x49\x4d\x47\137\x49\104\40\75\x20\x3f"; $this->db->query($sql, array(modality_api_str_to_modality_db_str($dataGroupImageInfo["\145\111\155\x61\147\x65\x4d\157\144\x61\x6c\x69\164\171"]), $dataGroupImageInfo["\x73\164\x72\111\155\141\x67\x65\x4d\x6f\144\145"], $dataGroupImageInfo["\x62\x49\155\141\x67\145\x41\x75\x74\x6f\122\x65\x67\x69\x73\164\x65\x72\145\144"], $nImageID, $dataGroupImageInfo["\156\x47\162\157\165\160\111\155\141\x67\145\111\x44"])); return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } else { return VERR_DB_NOSUCHDATA; } } public function get_DataGroupImagesByName($strDataGroupName) { $sql = "\123\x45\x4c\105\103\x54\x20\107\x52\x4f\125\120\x5f\x49\x4d\x47\x5f\111\x44\54\x20\107\x52\117\x55\120\137\116\101\x4d\x45\54\40\x47\122\117\x55\120\x5f\x49\115\x47\x5f\115\x4f\x44\101\x4c\111\124\131\54\40\107\122\x4f\125\120\x5f\111\x4d\107\137\115\x4f\104\x45\x2c\x20\107\122\x4f\125\120\137\111\x4d\107\x5f\x52\105\x47\137\104\101\x54\105\124\111\115\x45\x2c\40\x47\122\117\125\x50\137\x49\115\107\137\x53\105\x4c\x45\103\x54\105\x44\54\40\111\x4d\107\x5f\106\x49\x4c\105\x4e\101\x4d\105\54\40\107\122\117\125\120\x5f\111\x4d\x47\x5f\101\125\x54\x4f\137\122\105\x47\54\40\x50\x41\124\137\103\x48\x41\122\x54\x4e\x4f\54\x20\x47\x52\117\x55\120\x5f\103\122\x45\124\x5f\x44\101\x54\105" . "\x20\x46\122\x4f\115\40\105\62\137\x44\x41\x54\x41\137\107\122\117\x55\120\137\x49\x4d\107\x20\144\x67\x69\54\x20\105\62\x5f\x44\101\x54\101\137\x47\122\x4f\x55\120\x20\x64\147\x2c\x20\105\62\137\111\x4d\107\40\x69\x6d\147" . "\40\x57\110\105\122\x45\x20\144\x67\x69\x2e\x47\122\117\x55\120\137\x49\104\x20\x3d\x20\144\147\56\x47\x52\117\x55\120\x5f\111\x44" . "\x20\101\116\x44\x20\x64\x67\151\x2e\111\x4d\x47\137\111\x44\40\x3d\40\x69\x6d\147\56\x49\x4d\x47\137\x49\104" . "\40\x41\116\104\x20\x47\x52\x4f\125\120\x5f\x4e\101\x4d\105\40\x3d\x20\77"; $ret = $this->db->query($sql, array($strDataGroupName))->result_array(); if (count($ret) > 0) { $items = array(); foreach ($ret as $row) { $dataGroupImageInfo = SDataGroupImageInfo::createFromDBRecord($row); array_push($items, $dataGroupImageInfo); } return array("\x65\162\x72\157\162\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\166\x65\x63\104\x61\x74\x61\x47\x72\157\165\x70\111\155\x61\147\145\x49\156\146\x6f" => $items); } else { return array("\x65\x72\162\x6f\x72\x43\x6f\x64\145" => VERR_DB_NOSUCHDATA, "\x76\145\143\104\141\164\x61\107\162\x6f\x75\160\111\155\x61\x67\x65\x49\156\x66\x6f" => array()); } } public function put_DataGroupImagesByID($nDataGroupImageID) { return $this->_dmsSetDataGroupImageSelected($nDataGroupImageID); } public function delete_DataGroupImagesByID($nDataGroupImageID) { $this->db->trans_start(); $sql = "\xa\40\40\x20\40\x20\40\x20\40\x20\40\x20\40\x44\105\114\105\x54\x45\x20\x46\x52\x4f\x4d\40\x45\x32\x5f\x44\x41\x54\101\x5f\107\122\x4f\125\120\x5f\111\115\x47\12\x20\40\x20\40\40\40\40\40\40\40\40\40\127\x48\105\122\x45\x20\x47\122\117\x55\x50\x5f\x49\x4d\107\137\x49\104\x20\x3d\x20\x3f"; $this->db->query($sql, array($nDataGroupImageID)); $returnCheck1 = $this->db->affected_rows(); $returnCheck2 = $this->_dmsSetDataGroupImageSelected($nDataGroupImageID); if ($returnCheck1 > 0 && $returnCheck2 >= 0) { $this->db->trans_commit(); return TRUE; } else { $this->db->trans_rollback(); return FALSE; } } public function _dmsSetDataGroupImageSelected($nDataGroupImageID) { $sql = "\12\x20\40\x20\40\40\40\40\x20\40\40\x20\40\x55\x50\x44\x41\x54\105\40\105\62\137\104\x41\x54\101\x5f\x47\122\117\125\120\137\111\115\x47\x20\115\101\x49\116\40\x53\x45\124\40\107\x52\x4f\x55\120\x5f\x49\x4d\107\x5f\x53\x45\x4c\x45\x43\124\x45\x44\x20\75\x20\50\x53\125\x42\x2e\116\125\x4d\x20\75\40\x31\51\xa\40\x20\40\x20\40\40\40\40\40\x20\40\40\x46\122\117\115\x20\50\123\x45\x4c\105\x43\x54\x20\50\122\117\127\x5f\116\125\115\102\105\122\50\51\40\117\126\x45\x52\x28\x29\x29\40\116\x55\115\54\x20\x47\122\x4f\x55\120\137\111\x4d\x47\137\x49\x44\x20\x46\x52\117\115\xa\40\x20\40\x20\40\40\40\40\x20\x20\40\40\x28\123\x45\x4c\105\103\x54\x20\104\x47\x49\x2e\52\x20\106\122\x4f\115\40\105\x32\x5f\x44\101\124\x41\137\x47\122\x4f\125\120\x5f\111\x4d\107\x20\104\x47\x49\x2c\x28\123\105\114\105\x43\124\40\x2a\x20\x46\122\x4f\x4d\40\105\62\x5f\x44\101\x54\101\x5f\x47\122\117\x55\x50\x5f\x49\x4d\107\40\x57\x48\105\x52\105\40\107\122\117\x55\x50\x5f\x49\115\x47\x5f\111\x44\x20\75\x20\x3f\x29\x20\x54\xa\x20\40\x20\40\x20\40\40\x20\40\x20\x20\x20\x57\110\105\x52\105\x20\x44\x47\111\56\x47\x52\117\x55\x50\137\x49\x4d\107\137\115\117\104\x41\x4c\x49\124\x59\40\x3d\40\x54\56\107\122\117\125\120\137\111\115\107\x5f\115\x4f\x44\x41\114\x49\x54\131\40\101\116\104\x20\x44\x47\x49\56\x47\122\x4f\x55\x50\x5f\x49\x44\40\75\40\x54\x2e\x47\122\x4f\x55\120\x5f\x49\104\xa\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\101\116\104\40\50\40\x54\x2e\x47\x52\117\x55\120\137\111\x4d\x47\137\x4d\x4f\104\101\114\111\124\131\x20\74\76\x20\x27\x49\x6d\x70\x72\145\x73\x73\x69\157\156\47\x20\117\122\x20\104\107\111\x2e\107\122\117\125\120\x5f\111\115\107\x5f\x4d\117\104\105\x20\75\x20\x54\x2e\x47\x52\x4f\x55\x50\137\x49\x4d\x47\137\115\117\104\x45\40\x29\12\40\40\x20\40\40\40\x20\x20\x20\x20\x20\x20\x4f\122\104\x45\x52\x20\x42\x59\x20\104\x47\x49\56\107\x52\x4f\x55\x50\137\x49\115\x47\137\x52\105\x47\137\104\101\124\x45\x54\x49\115\x45\40\x44\105\x53\103\x2c\40\104\107\x49\56\111\x4d\107\x5f\111\x44\40\x44\x45\x53\103\51\x20\141\x29\40\123\125\102\12\40\x20\x20\x20\x20\40\x20\40\x20\x20\40\x20\x57\110\105\x52\105\x20\x4d\x41\111\x4e\x2e\107\x52\x4f\125\x50\137\x49\x4d\107\137\x49\104\40\75\40\x53\x55\102\56\107\x52\x4f\125\x50\137\x49\115\107\137\111\104"; $this->db->query($sql, array($nDataGroupImageID)); return $this->db->affected_rows(); } public function CheckIfThirdPartyImageByID($imageID) { $sql = "\x53\105\x4c\x45\x43\x54\x20\107\122\x4f\x55\120\137\x49\x44\x20\x46\x52\117\x4d\40\x45\62\x5f\x44\101\124\x41\137\x47\x52\x4f\125\x50\x5f\x49\x4d\107\x20\x57\110\105\x52\105\40\111\115\107\x5f\111\104\40\75\40\x3f"; $selectedGroupIds = $this->db->query($sql, array($imageID))->result_array(); if (count($selectedGroupIds) > 0) { load_model($this, "\104\141\164\141\107\162\x6f\165\160\120\x72\157\152\x65\143\x74\163\x5f\x6d\x6f\x64\x65\154"); $firstItemID = $selectedGroupIds[0]["\x67\162\157\x75\160\137\x69\144"]; $selectedGroupProjects = $this->DataGroupProjects_model->GetItemsByGroupID($firstItemID); if (count($selectedGroupProjects) > 0) { return true; } } return false; } public function get_DataGroupImagesByImageNameForImageId($strImageName) { $sql = "\x53\105\114\105\x43\x54\40\x47\x52\x4f\x55\x50\137\x49\115\107\x5f\111\104\x20\106\x52\x4f\115\40\x45\62\137\x44\x41\124\101\x5f\x47\122\117\125\120\137\x49\x4d\107\40\x57\110\105\122\105\40\x49\115\107\137\111\104\40\x3d\x20\x28\x53\x45\x4c\105\x43\124\40\x49\x4d\107\x5f\x49\x44\x20\106\x52\117\x4d\x20\105\62\x5f\x49\x4d\x47\x20\x57\x48\x45\x52\105\x20\x49\115\x47\x5f\x46\x49\x4c\x45\116\x41\x4d\x45\x20\75\x20\x3f\40\x4c\x49\x4d\111\x54\40\61\51"; $selectedGroupImgIds = $this->db->query($sql, array($strImageName))->result_array(); if (count($selectedGroupImgIds) > 0) { return $selectedGroupImgIds[0]["\x67\x72\x6f\x75\x70\x5f\151\155\147\137\x69\x64"]; } return false; } } diff --git a/server/original/www/ezwebserver/src/application/models/DataGroupProjectImages_model.php b/server/original/www/ezwebserver/src/application/models/DataGroupProjectImages_model.php index 867155e..a2412e4 100644 --- a/server/original/www/ezwebserver/src/application/models/DataGroupProjectImages_model.php +++ b/server/original/www/ezwebserver/src/application/models/DataGroupProjectImages_model.php @@ -1,7 +1,7 @@ db->query($sql, array($imageId))->result_array(); } public function get_DataGroupProjectImagesByImageName($strImageName) { load_model($this, "\x44\x61\x74\141\x47\162\157\165\x70\x49\155\141\147\x65\163\x5f\155\x6f\144\145\x6c"); $imageId = $this->DataGroupImages_model->get_DataGroupImagesByImageNameForImageId($strImageName); if ($imageId != false) { $imageData = $this->GetE2DataProjectImageDataByImageId($imageId); if (count($imageData) > 0) { $data["\163\164\162\111\x6d\x61\x67\145\111\156\146\157"] = $imageData[0]["\x67\x72\x6f\165\x70\137\x70\162\157\x6a\137\151\155\x67\x5f\x69\x6e\x66\157"]; $projectId = $imageData[0]["\x67\x72\x6f\165\x70\x5f\x70\x72\157\x6a\x5f\x69\x64"]; load_model($this, "\x44\141\x74\141\x47\162\x6f\165\x70\x50\162\x6f\152\145\x63\x74\163\x5f\x6d\x6f\x64\x65\154"); $projectData = $this->DataGroupProjects_model->GetItemsByGroupProjectID($projectId); if (count($projectData) > 0) { $data["\163\164\x72\x50\x72\157\x6a\x65\x63\x74\x4e\141\155\145"] = $projectData[0]["\147\162\157\165\160\137\160\162\x6f\x6a\x5f\156\x61\155\x65"]; return $data; } } } return false; } public function post_DataGroupProjectImages($strProjectImageInformation, $strGroupName, $strImageName) { load_model($this, "\x44\141\x74\141\x47\162\x6f\165\160\120\x72\x6f\152\145\x63\164\x73\137\x6d\x6f\144\x65\154"); load_model($this, "\104\141\x74\x61\x47\162\x6f\165\160\111\155\x61\147\145\x73\137\155\157\x64\145\x6c"); $groupId = $this->DataGroupProjects_model->GetProjectGroupIdFromGroupName($strGroupName); $imageId = $this->DataGroupImages_model->get_DataGroupImagesByImageNameForImageId($strImageName); if ($groupId == false || $imageId == false) { return false; } $sql = "\111\116\123\105\x52\124\x20\x49\x4e\x54\x4f\40\145\62\137\144\141\x74\141\137\147\x72\x6f\165\160\x5f\160\x72\x6f\x6a\x5f\x69\x6d\x67\xa\x20\40\x20\x20\x20\40\40\x20\40\x20\x20\40\x20\x20\40\40\50\x47\x52\117\x55\120\x5f\x50\122\x4f\112\137\111\115\107\137\111\x4e\106\x4f\54\40\107\x52\x4f\125\120\137\120\x52\x4f\112\x5f\x49\x44\54\40\107\x52\x4f\x55\120\137\111\x4d\x47\137\111\104\51\40\126\x41\x4c\125\x45\x53\x20\x28\x3f\54\40\x3f\x2c\x20\x3f\51"; return $this->db->query($sql, array($strProjectImageInformation, $groupId, $imageId)); } } diff --git a/server/original/www/ezwebserver/src/application/models/DataGroupProjects_model.php b/server/original/www/ezwebserver/src/application/models/DataGroupProjects_model.php index 7e1ee20..66d2324 100644 --- a/server/original/www/ezwebserver/src/application/models/DataGroupProjects_model.php +++ b/server/original/www/ezwebserver/src/application/models/DataGroupProjects_model.php @@ -1,7 +1,7 @@ GetDataGroupIdFromGroupName($strGroupName); if ($groupId != VERR_DB_NOSUCHDATA) { $sql = "\111\116\123\x45\x52\x54\40\111\x4e\x54\117\x20\145\x32\x5f\x64\x61\164\x61\x5f\x67\162\157\165\x70\x5f\x70\162\x6f\x6a\12\40\40\40\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\x20\x20\40\40\x20\40\50\x47\x52\117\125\120\x5f\120\122\x4f\112\x5f\x4e\101\x4d\105\54\40\x47\122\117\125\120\x5f\x50\122\117\x4a\137\101\x50\120\x5f\116\101\115\x45\54\x20\107\122\x4f\x55\x50\137\x50\x52\x4f\x4a\x5f\x43\x4f\x4d\137\116\x41\115\105\54\x20\x47\122\117\125\120\137\x49\104\x2c\40\x47\122\117\125\120\137\120\122\x4f\x4a\137\x46\x49\x4c\x45\116\101\x4d\x45\51\12\40\40\x20\40\40\40\40\x20\x20\40\40\x20\40\x20\x20\40\x20\40\x20\40\x56\x41\114\x55\105\123\x20\50\77\54\40\77\x2c\x20\77\x2c\x20\x3f\54\x20\77\x29"; $this->db->query($sql, array($strProjectName, $strApplicationName, $strCompanyName, $groupId, $strServerFileName)); return array("\145\x72\x72\x6f\x72\103\157\144\x65" => VERR_COMMON_SUCCESS); } else { return array("\145\162\x72\x6f\162\x43\x6f\x64\145" => VERR_DB_NOSUCHDATA); } } public function GetDataGroupIdFromGroupName($strGroupName) { $sql = "\123\x45\114\105\x43\124\40\x47\x52\x4f\125\x50\x5f\111\104\40\x46\x52\x4f\115\40\x45\62\x5f\104\x41\x54\101\x5f\x47\x52\x4f\125\x50\x20\x57\x48\105\x52\105\x20\x47\x52\117\x55\x50\x5f\x4e\x41\x4d\105\x20\75\x20\77"; $ret = $this->db->query($sql, array($strGroupName))->result_array(); if (count($ret) > 0) { return $ret[0]["\x67\162\157\x75\x70\137\151\144"]; } else { vt_loge("\104\x61\x74\141\107\x72\x6f\x75\160\120\162\157\x6a\x65\143\x74\x73\137\x70\x6f\x73\x74\40\x41\160\151\x2e" . "\x4e\x6f\164\x20\x46\157\x75\x6e\144\40\x47\162\157\x75\x70\40\x49\x64"); return VERR_DB_NOSUCHDATA; } } public function GetItemsByGroupID($groupID) { $sql = "\x53\x45\x4c\x45\x43\x54\x20\x2a\x20\106\122\117\x4d\x20\105\x32\x5f\104\x41\x54\101\x5f\x47\x52\x4f\x55\120\137\x50\122\x4f\112\40\x57\110\105\122\x45\40\x47\122\117\x55\x50\x5f\111\x44\40\75\x20\77"; return $this->db->query($sql, array($groupID))->result_array(); } public function GetItemsByGroupProjectID($groupProjectID) { $sql = "\123\105\114\x45\103\124\x20\x2a\40\106\122\x4f\x4d\40\105\62\x5f\x44\x41\124\x41\137\x47\x52\117\x55\x50\137\120\x52\117\112\40\127\110\x45\122\x45\x20\x47\122\117\125\x50\x5f\x50\122\117\x4a\137\x49\104\40\75\40\77"; return $this->db->query($sql, array($groupProjectID))->result_array(); } public function GetProjectGroupIdFromGroupName($strGroupName) { load_model($this, "\x45\62\x44\x61\164\141\x47\162\157\x75\x70\x73\137\x6d\157\144\x65\x6c"); $groupData = $this->E2DataGroups_model->get_E2DataGroupsByName($strGroupName); if (count($groupData) > 0) { $iGroupID = $groupData[0]["\147\x72\x6f\165\160\x5f\x69\x64"]; $data = $this->GetItemsByGroupID($iGroupID); if (count($data) > 0) { $groupProjectId = $data[0]["\147\x72\x6f\x75\160\137\x70\x72\x6f\x6a\x5f\151\144"]; } else { return false; } return $groupProjectId; } return false; } } diff --git a/server/original/www/ezwebserver/src/application/models/DataGroups_model.php b/server/original/www/ezwebserver/src/application/models/DataGroups_model.php index da5b673..6acb4ad 100644 --- a/server/original/www/ezwebserver/src/application/models/DataGroups_model.php +++ b/server/original/www/ezwebserver/src/application/models/DataGroups_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strDataGroupName))->result_array(); } public function delete_DataGroupsByName($strDataGroupName) { $sql = "\xa\x20\40\x20\40\40\40\x20\x20\x20\40\40\40\x44\x45\x4c\105\x54\105\40\x46\122\x4f\115\x20\x48\62\137\104\x41\124\101\x5f\107\x52\117\x55\120\xa\40\x20\x20\x20\x20\40\40\x20\x20\x20\x20\x20\x57\110\x45\x52\105\40\x44\101\124\x41\x5f\107\122\120\137\116\x41\115\105\40\75\x20\x3f"; $this->db->query($sql, array($strDataGroupName)); return $this->db->affected_rows(); } public function put_DataGroupsByNameAndChartNo($strChartNo, $strDataGroupName) { $sql = "\xa\40\40\40\x20\40\40\40\x20\40\40\x20\x20\x53\x45\x4c\x45\x43\124\40\x50\x41\x54\x5f\111\x44\40\106\122\117\115\x20\x45\62\137\120\101\124\x20\127\110\x45\x52\x45\x20\x50\101\124\137\x43\110\x41\x52\x54\x4e\x4f\x20\x3d\40\x3f\x20\114\x49\x4d\x49\x54\x20\61"; $ret = $this->db->query($sql, array($strChartNo))->result_array(); if (count($ret) > 0) { $sql = "\12\x20\x20\40\x20\40\40\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\125\x50\x44\101\124\105\x20\110\x32\x5f\x44\x41\124\101\x5f\x47\122\x4f\125\120\xa\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\40\40\40\x20\123\x45\124\x20\120\x41\x54\137\111\x44\x20\75\x20\x3f\xa\x20\x20\x20\40\40\40\x20\40\x20\40\x20\x20\x20\40\x20\40\x57\110\105\x52\x45\40\x44\x41\x54\x41\x5f\x47\x52\x50\x5f\x4e\101\115\105\x20\x3d\x20\x3f"; $this->db->query($sql, array($ret[0]["\x70\x61\164\x5f\x69\144"], $strDataGroupName)); $returnCheck = $this->db->affected_rows(); return $returnCheck; } else { return VERR_DB_NOSUCHDATA; } } public function get_DataGroupsByChartNo($strChartNo) { $sql = "\x53\x45\x4c\105\103\x54\x20\120\x41\124\137\111\104\40\x46\122\x4f\x4d\40\105\62\137\x50\101\124\x20\x57\110\105\122\x45\x20\x50\101\x54\137\103\x48\x41\122\124\116\x4f\40\x3d\40\x3f"; $query = $this->db->query($sql, $strChartNo)->result_array(); if (count($query) > 0) { $nPatID = $query[0]["\x70\x61\164\x5f\151\144"]; $sql = "\x53\105\x4c\105\x43\x54\x20\52\x20\106\122\117\115\x20\110\62\x5f\104\x41\x54\101\x5f\x47\122\117\125\x50\x20\127\110\x45\x52\x45\40\x50\101\124\137\111\x44\x20\75\x20\77\x20\117\122\x44\x45\x52\x20\x42\x59\x20\x44\x41\124\x41\137\x47\122\x50\137\103\x52\105\124\137\104\101\x54\105\x20\101\x53\103"; return $this->db->query($sql, array($nPatID))->result_array(); } else { return $query; } } public function post_DataGroupsByChartNo($strChartNo, $dataGroupInfo) { $nCTID = 0; $n3DPID = 0; $nUSTLID = 0; $nLSTLID = 0; $nRealPanoID = 0; $nPatID = 0; $sql = "\123\x45\x4c\105\x43\x54\40\x50\x41\x54\x5f\111\104\40\x46\x52\117\115\40\105\x32\137\120\x41\124\x20\x57\110\105\122\105\40\x50\101\124\137\x43\x48\x41\122\x54\116\117\40\75\40\77"; $query = $this->db->query($sql, array($strChartNo))->result_array(); if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } if (isset($dataGroupInfo->strGroupCTFilename)) { $sql = "\x53\x45\114\105\x43\124\x20\111\115\107\x5f\x49\104\40\x46\x52\x4f\x4d\x20\x45\62\137\111\x4d\x47\40\127\110\105\x52\105\x20\x49\x4d\107\137\106\111\114\105\116\101\115\x45\x20\x3d\40\x3f"; $query = $this->db->query($sql, array($dataGroupInfo->strGroupCTFilename))->result_array(); if (count($query) > 0) { $nCTID = $query[0]["\151\155\147\x5f\x69\144"]; } } if (!empty($dataGroupInfo->strGroup3DPFilename)) { $sql = "\123\x45\114\105\x43\124\x20\111\115\x47\137\111\104\40\x46\x52\x4f\x4d\40\105\x32\x5f\111\x4d\x47\x20\127\x48\x45\x52\105\40\x49\x4d\107\x5f\106\x49\x4c\x45\x4e\101\x4d\105\x20\x3d\x20\x3f"; $query = $this->db->query($sql, array($dataGroupInfo->strGroup3DPFilename))->result_array(); if (count($query) > 0) { $n3DPID = $query[0]["\x69\x6d\x67\137\151\144"]; } } if (!empty($dataGroupInfo->strGroupUpperSTLFilename)) { $sql = "\x53\x45\x4c\105\103\124\x20\x49\115\x47\137\x49\x44\x20\x46\x52\117\x4d\40\105\62\137\x49\115\107\40\x57\x48\x45\122\105\x20\x49\x4d\107\x5f\106\111\x4c\105\x4e\x41\x4d\x45\40\75\x20\77"; $query = $this->db->query($sql, array($dataGroupInfo->strGroupUpperSTLFilename))->result_array(); if (count($query) > 0) { $nUSTLID = $query[0]["\151\155\147\x5f\151\x64"]; } } if (!empty($dataGroupInfo->strGroupLowerSTLFilename)) { $sql = "\x53\105\x4c\x45\x43\124\x20\111\x4d\107\x5f\x49\x44\x20\106\x52\x4f\x4d\40\105\x32\137\x49\115\107\x20\x57\x48\105\122\105\40\111\115\x47\x5f\106\x49\x4c\105\116\x41\115\x45\x20\x3d\40\x3f"; $query = $this->db->query($sql, array($dataGroupInfo->strGroupLowerSTLFilename))->result_array(); if (count($query) > 0) { $nLSTLID = $query[0]["\x69\x6d\x67\x5f\x69\x64"]; } } if (!empty($dataGroupInfo->strGroupRealPanoFilename)) { $sql = "\x53\x45\114\x45\103\124\40\111\115\x47\137\111\104\40\x46\122\x4f\115\40\x45\x32\x5f\x49\x4d\107\40\x57\110\x45\122\x45\40\x49\x4d\x47\137\x46\x49\114\105\x4e\x41\x4d\x45\x20\75\40\77"; $query = $this->db->query($sql, array($dataGroupInfo->strGroupRealPanoFilename))->result_array(); if (count($query) > 0) { $nRealPanoID = $query[0]["\151\x6d\x67\137\x69\x64"]; } } $sql = "\123\x45\x4c\x45\x43\x54\40\120\x41\x54\x5f\x49\x44\x20\106\x52\117\115\40\x45\x32\x5f\120\x41\124\40\127\110\x45\122\x45\x20\x50\101\124\137\103\110\x41\x52\124\x4e\117\x20\75\x20\x3f"; $query = $this->db->query($sql, array($strChartNo))->result_array(); $nPatID = $query[0]["\160\x61\x74\x5f\x69\x64"]; if ($nPatID != 0) { if (empty($dataGroupInfo->strDataGroupName)) { $strGroupname = "\104\141\x74\141\x47\162\x6f\165\x70\137" . currentDateFormat(DATEFORMAT_MAKE_GROUP_NAME) . "\x5f"; } else { $strGroupname = $dataGroupInfo->strDataGroupName; } if (!isset($dataGroupInfo->dtCreateDateTime)) { $strDataGroupCreatedDateTime = currentDateFormat(DATEFORMAT_DATABASE); } else { $strDataGroupCreatedDateTime = currentDateFormat(DATEFORMAT_DATABASE, $dataGroupInfo->dtCreateDateTime); } $strSetQuery = "\111\x4e\x53\105\122\x54\40\111\x4e\x54\x4f\40\x48\x32\x5f\x44\101\124\101\137\x47\x52\x4f\125\x50\x28\104\x41\124\101\x5f\107\122\120\x5f\x4e\x41\115\105\x2c\40\104\101\124\x41\137\x47\x52\120\137\x43\x52\x45\x54\137\x44\x41\124\x45"; $strValueQuery = "\x20\126\x41\x4c\125\x45\123\40\50\x3f\174\174\x54\x4f\x5f\103\x48\x41\122\50\x28\123\105\x4c\105\103\124\x20\x28\x43\117\125\x4e\124\x28\x2a\51\53\61\x29\40\106\122\x4f\x4d\x20\110\x32\137\x44\101\x54\x41\x5f\107\x52\117\125\x50\40\127\x48\x45\x52\105\40\104\101\124\101\137\107\122\120\x5f\x43\x52\105\124\x5f\x44\x41\x54\x45\x3d\77\51\x2c\47\106\115\71\71\x27\51\x2c\x20\77"; if ($nCTID != 0) { $strSetQuery .= "\x2c\x20\x44\101\x54\x41\137\x47\122\120\137\x43\x54\x5f\x49\x44\54\x20\104\x41\x54\x41\137\x47\122\x50\x5f\103\124\137\x46\111\114\x45\116\x41\x4d\x45"; $strValueQuery .= "\54\x20\47" . $nCTID . "\47\x2c\x20\47" . $dataGroupInfo->strGroupCTFilename . "\47"; } if ($n3DPID != 0) { $strSetQuery .= "\54\40\x44\101\x54\x41\x5f\x47\122\120\137\63\104\x50\x5f\111\104\54\x20\104\101\124\x41\137\x47\122\120\137\x33\104\120\x5f\x46\111\x4c\105\116\101\115\x45"; $strValueQuery .= "\54\x20\47" . $n3DPID . "\47\x2c\x20\47" . $dataGroupInfo->strGroup3DPFilename . "\47"; } if ($nUSTLID != 0) { $strSetQuery .= "\54\40\104\x41\124\101\137\107\122\120\x5f\125\x53\124\x4c\137\111\104\54\x20\104\101\124\x41\137\107\122\120\137\125\123\x54\114\x5f\106\111\114\x45\x4e\101\x4d\105"; $strValueQuery .= "\x2c\40\47" . $nUSTLID . "\47\x2c\x20\x27" . $dataGroupInfo->strGroupUpperSTLFilename . "\47"; } if ($nLSTLID != 0) { $strSetQuery .= "\54\x20\104\x41\x54\101\137\107\x52\120\137\114\x53\124\114\137\x49\104\54\x20\104\x41\124\x41\x5f\107\x52\x50\137\114\123\124\114\137\x46\x49\x4c\105\x4e\x41\115\x45"; $strValueQuery .= "\x2c\40\47" . $nLSTLID . "\47\54\40\47" . $dataGroupInfo->strGroupLowerSTLFilename . "\x27"; } if ($nRealPanoID != 0) { $strSetQuery .= "\54\40\104\101\124\x41\137\107\122\120\x5f\x52\105\101\x4c\120\101\x4e\x4f\x5f\111\x44\x2c\40\x44\101\124\101\x5f\x47\x52\x50\x5f\122\105\101\114\x50\101\x4e\117\137\106\111\x4c\x45\x4e\101\115\105"; $strValueQuery .= "\54\40\x27" . $nRealPanoID . "\47\x2c\x20\x27" . $dataGroupInfo->strGroupRealPanoFilename . "\x27"; } $strSetQuery .= "\54\x50\101\x54\x5f\111\x44\51"; $strValueQuery .= "\x2c\x3f\51\40\122\x45\x54\x55\x52\x4e\x49\x4e\x47\40\x44\101\x54\101\x5f\107\122\x50\137\116\x41\115\x45\73"; $sql = $strSetQuery . $strValueQuery; return $this->db->query($sql, array($strGroupname, $strDataGroupCreatedDateTime, $strDataGroupCreatedDateTime, $nPatID))->result_array(); } else { return $nPatID; } } public function get_DataGroupsByCTFileAndStudyUID($strCtFileName, $strStudyInstanceUID) { if (isset($strCtFileName)) { $sql = "\x53\105\x4c\105\x43\124\x20\52\40\x46\122\x4f\x4d\x20\110\62\137\x44\x41\x54\x41\x5f\107\122\x4f\125\120\x20\127\x48\105\122\105\x20\x44\x41\124\101\x5f\107\122\x50\137\103\124\137\106\x49\114\105\116\x41\x4d\105\x20\75\40\x27" . $strCtFileName . "\x27"; } else { $sql = "\x53\105\114\105\103\x54\x20\x2a\40\x46\122\x4f\x4d\40\110\x32\x5f\x44\101\124\x41\x5f\107\x52\117\125\120\x20\x57\x48\105\x52\105\x20\x44\101\x54\101\137\x47\x52\x50\137\103\x54\137\111\104\40\x3d\40\50\123\x45\x4c\x45\103\124\x20\x49\x4d\107\x5f\x49\x44\x20\x46\x52\117\x4d\40\105\62\x5f\x49\x4d\x47\x20\x57\110\x45\122\105\40\x49\x4d\107\x5f\x53\124\125\x44\x59\x5f\111\x4e\x53\124\x41\116\x43\105\137\x55\x49\104\40\x3d\x20\x27" . $strStudyInstanceUID . "\47\x20\x4c\x49\115\x49\x54\40\x31\x29"; } return $this->db->query($sql)->result_array(); } public function get_DataGroups() { $sql = "\123\x45\x4c\105\103\x54\x20\52\x20\x46\x52\117\115\x20\x48\62\x5f\x44\x41\124\101\x5f\107\x52\x4f\125\120"; return $this->db->query($sql)->result_array(); } public function put_DataGroups($dataGroupInfo) { $nCTID = 0; $n3DPID = 0; $nUSTLID = 0; $nLSTLID = 0; $nRealPanoID = 0; if (!empty($dataGroupInfo["\x73\164\162\107\x72\157\x75\x70\x43\x54\106\x69\x6c\145\156\x61\155\x65"])) { $sql = "\x53\105\x4c\105\103\124\x20\x49\x4d\x47\x5f\111\104\40\106\122\117\115\x20\105\62\137\111\115\107\x20\x57\x48\105\122\x45\40\x49\x4d\x47\x5f\x46\111\x4c\105\x4e\x41\x4d\105\40\x3d\x20\77"; $query = $this->db->query($sql, array($dataGroupInfo["\163\x74\x72\107\162\157\x75\x70\x43\x54\x46\151\154\x65\x6e\141\x6d\145"]))->result_array(); if (count($query) > 0) { $nCTID = $query[0]["\151\x6d\147\x5f\x69\x64"]; } else { return VERR_DB_NOSUCHDATA; } } if (!empty($dataGroupInfo["\163\x74\162\x47\x72\x6f\165\160\63\x44\x50\x46\151\x6c\x65\156\x61\155\145"])) { $sql = "\123\105\x4c\105\x43\x54\40\111\x4d\107\x5f\x49\x44\x20\x46\122\117\x4d\40\105\62\x5f\111\115\107\40\x57\x48\105\122\105\x20\x49\x4d\x47\137\x46\x49\114\105\x4e\x41\x4d\105\x20\x3d\40\77"; $query = $this->db->query($sql, array($dataGroupInfo["\163\164\162\107\162\x6f\x75\x70\x33\104\x50\106\x69\x6c\145\x6e\x61\x6d\x65"]))->result_array(); if (count($query) > 0) { $n3DPID = $query[0]["\151\155\x67\x5f\x69\x64"]; } else { return VERR_DB_NOSUCHDATA; } } if (!empty($dataGroupInfo["\x73\164\162\x47\x72\157\165\160\x55\160\160\145\162\123\x54\114\x46\151\154\x65\156\x61\155\145"])) { $sql = "\x53\x45\x4c\x45\103\124\x20\111\115\x47\x5f\111\104\40\106\x52\117\x4d\40\x45\62\137\111\x4d\x47\40\x57\110\105\122\x45\x20\111\115\x47\137\x46\111\114\105\x4e\101\x4d\x45\x20\x3d\40\77"; $query = $this->db->query($sql, array($dataGroupInfo["\x73\x74\162\107\162\x6f\165\x70\x55\160\160\145\162\x53\x54\x4c\106\151\154\x65\x6e\141\155\145"]))->result_array(); if (count($query) > 0) { $nUSTLID = $query[0]["\151\x6d\x67\x5f\x69\144"]; } else { return VERR_DB_NOSUCHDATA; } } if (!empty($dataGroupInfo["\x73\164\x72\107\162\157\x75\160\x4c\157\167\145\162\123\124\114\106\x69\x6c\x65\x6e\141\155\x65"])) { $sql = "\x53\x45\x4c\105\103\x54\x20\x49\x4d\x47\x5f\x49\x44\x20\x46\122\x4f\x4d\x20\105\x32\137\x49\115\107\40\x57\x48\x45\x52\x45\x20\111\115\107\137\x46\111\x4c\x45\116\101\x4d\x45\x20\x3d\40\77"; $query = $this->db->query($sql, array($dataGroupInfo["\x73\164\x72\107\162\157\165\160\x4c\x6f\167\145\162\123\x54\x4c\x46\151\154\x65\156\x61\x6d\145"]))->result_array(); if (count($query) > 0) { $nLSTLID = $query[0]["\x69\155\147\x5f\151\x64"]; } else { return VERR_DB_NOSUCHDATA; } } if (!empty($dataGroupInfo["\x73\x74\162\x47\162\x6f\x75\160\x52\145\141\154\120\x61\156\x6f\106\x69\154\145\x6e\x61\155\x65"])) { $sql = "\123\105\114\x45\103\124\40\111\115\107\137\111\x44\x20\x46\122\117\115\x20\x45\x32\137\111\115\107\40\127\x48\105\x52\x45\40\x49\115\x47\x5f\106\x49\114\105\116\101\x4d\105\x20\x3d\40\77"; $query = $this->db->query($sql, array($dataGroupInfo["\x73\164\162\107\x72\157\165\160\x52\x65\x61\154\x50\141\x6e\157\x46\151\154\x65\x6e\x61\155\x65"]))->result_array(); if (count($query) > 0) { $nRealPanoID = $query[0]["\x69\155\147\x5f\x69\x64"]; } else { return VERR_DB_NOSUCHDATA; } } $sql = "\x55\120\104\101\x54\x45\40\110\x32\137\x44\101\x54\x41\137\107\122\x4f\125\120\40\x53\x45\124"; if ($nCTID != 0) { $sql .= "\x20\104\101\124\x41\137\x47\x52\x50\x5f\103\x54\x5f\111\104\x20\75\x20\47" . $nCTID . "\x27\54\104\101\124\x41\x5f\107\x52\120\x5f\103\x54\137\106\x49\x4c\x45\116\x41\115\x45\x20\75\40\x27" . $dataGroupInfo["\163\164\x72\x47\162\x6f\165\160\103\124\106\x69\154\x65\x6e\141\155\145"] . "\x27"; } else { $sql .= "\40\104\x41\124\x41\x5f\107\122\120\x5f\103\x54\137\106\111\114\105\116\101\x4d\105\x20\75\40\47\47"; } if ($n3DPID != 0) { $sql .= "\54\104\x41\x54\x41\137\x47\122\120\137\63\104\120\137\111\104\40\75\x20\47" . $n3DPID . "\47\54\x44\101\124\101\137\x47\122\120\137\x33\x44\x50\x5f\x46\x49\114\105\116\x41\x4d\105\x20\x3d\40\47" . $dataGroupInfo["\x73\x74\162\107\162\157\165\x70\63\x44\x50\x46\x69\x6c\x65\156\141\x6d\145"] . "\x27"; } else { $sql .= "\54\104\x41\124\101\x5f\x47\x52\120\137\x33\104\120\x5f\106\x49\x4c\105\116\x41\x4d\105\x20\75\40\47\x27"; } if ($nUSTLID != 0) { $sql .= "\x2c\x44\x41\124\x41\137\x47\122\120\x5f\125\x53\124\114\137\x49\104\40\75\x20\x27" . $nUSTLID . "\x27\x2c\104\x41\124\101\x5f\107\122\120\137\125\x53\x54\x4c\x5f\106\111\114\105\116\101\x4d\105\40\75\40\x27" . $dataGroupInfo["\x73\164\162\107\162\x6f\165\160\x55\160\160\x65\162\x53\124\114\x46\151\x6c\145\x6e\141\x6d\x65"] . "\47"; } else { $sql .= "\54\x44\x41\x54\x41\x5f\x47\122\120\137\125\x53\x54\114\x5f\106\111\114\105\x4e\101\115\105\40\x3d\x20\47\47"; } if ($nLSTLID != 0) { $sql .= "\54\104\x41\x54\x41\x5f\x47\122\x50\137\x4c\123\124\114\137\x49\104\x20\x3d\40\x27" . $nLSTLID . "\x27\54\x44\101\124\101\137\x47\122\120\x5f\114\123\x54\x4c\137\x46\x49\x4c\x45\x4e\x41\115\x45\x20\x3d\x20\x27" . $dataGroupInfo["\163\x74\x72\107\162\x6f\x75\160\x4c\157\x77\x65\x72\123\x54\114\x46\x69\x6c\x65\156\141\x6d\x65"] . "\x27"; } else { $sql .= "\x2c\104\101\x54\x41\x5f\x47\122\x50\x5f\x4c\x53\124\x4c\137\x46\x49\114\105\116\x41\115\x45\40\x3d\40\47\x27"; } if ($nRealPanoID != 0) { $sql .= "\x2c\x44\101\x54\101\137\107\122\x50\x5f\122\x45\101\114\x50\x41\116\117\x5f\x49\x44\40\75\40\47" . $nRealPanoID . "\47\x2c\104\101\124\x41\137\x47\122\120\x5f\122\x45\x41\114\120\101\116\117\x5f\x46\x49\114\105\x4e\x41\115\105\x20\x3d\40\x27" . $dataGroupInfo["\x73\x74\162\x47\162\x6f\x75\160\122\x65\141\154\120\x61\x6e\157\x46\151\x6c\145\x6e\x61\155\145"] . "\47"; } else { $sql .= "\54\104\101\124\x41\137\x47\x52\x50\x5f\122\105\101\114\120\101\x4e\x4f\x5f\106\111\x4c\105\x4e\x41\115\105\40\75\x20\47\47"; } $sql .= "\54\104\x41\x54\x41\137\107\x52\x50\x5f\x55\123\x45\x52\137\x43\x4f\116\106\x49\122\115\x45\104\x20\x3d\x20\x3f\x20\127\110\x45\122\x45\x20\x44\101\x54\101\x5f\x47\x52\x50\137\116\x41\x4d\105\x20\75\40\77"; $this->db->query($sql, array($dataGroupInfo["\142\x55\163\x65\162\103\x6f\x6e\x66\x69\162\x6d"], $dataGroupInfo["\x73\164\162\x44\x61\x74\x61\107\162\x6f\x75\x70\x4e\141\155\145"])); return $this->db->affected_rows(); } public function InsertH2TypeGroupingData($chartNo, $filename, $studyInstanceUID, $modality) { if ($modality == "\x50\x61\156\157\x72\141\x6d\x61" || $modality == "\x54\150\x72\x65\145\x44\x50\150\157\x74\157") { load_model($this, "\111\155\141\x67\x65\163\x5f\x6d\x6f\144\145\x6c"); $ret = $this->Images_model->get_ImagesByStudyUID($studyInstanceUID); if (count($ret) > 0) { foreach ($ret as $row) { $imageModality = showDBModalityStringToEmodality($row["\151\155\147\x5f\155\157\x64\141\154\x69\x74\171"]); if ($imageModality == "\103\x54") { load_model($this, "\x44\x61\164\141\107\162\x6f\165\160\163\137\155\157\x64\x65\x6c"); $retImage = $this->DataGroups_model->get_DataGroupsByCTFileAndStudyUID($row["\x69\155\x67\137\146\151\x6c\x65\156\x61\155\x65"], $row["\x69\155\147\137\163\x74\165\144\171\x5f\151\156\x73\164\141\x6e\x63\145\137\165\x69\x64"]); if (count($retImage) > 0) { $dataGroupInfo = new SDataGroupInfo(); $dataGroupInfo->strDataGroupName = $retImage[0]["\144\141\x74\x61\x5f\x67\162\160\x5f\156\x61\155\145"]; $dataGroupInfo->dtCreateDateTime = currentDateFormat(DATEFORMAT_ISO8601, $retImage[0]["\144\x61\164\141\137\x67\162\160\137\x63\162\x65\x74\137\x64\x61\164\x65"]); $dataGroupInfo->strGroupCTFilename = $retImage[0]["\x64\141\x74\141\137\x67\x72\160\137\x63\164\x5f\x66\x69\154\x65\156\x61\155\x65"]; $dataGroupInfo->strGroup3DPFilename = $retImage[0]["\x64\x61\x74\141\137\x67\162\160\x5f\x33\x64\x70\137\x66\x69\x6c\x65\x6e\x61\155\145"]; $dataGroupInfo->strGroupUpperSTLFilename = $retImage[0]["\x64\x61\x74\x61\137\x67\x72\160\x5f\165\163\x74\x6c\x5f\x66\x69\x6c\x65\156\x61\155\145"]; $dataGroupInfo->strGroupLowerSTLFilename = $retImage[0]["\x64\x61\164\141\137\147\x72\160\x5f\x6c\x73\x74\x6c\x5f\146\x69\x6c\x65\x6e\x61\x6d\x65"]; $dataGroupInfo->strGroupRealPanoFilename = $retImage[0]["\144\x61\164\141\x5f\x67\x72\160\137\162\145\141\154\x70\141\156\x6f\x5f\x66\x69\154\x65\x6e\x61\155\145"]; $dataGroupInfo->bUserConfirm = setBoolVal($retImage[0]["\144\x61\x74\x61\x5f\x67\162\x70\137\165\x73\x65\x72\137\x63\x6f\x6e\146\151\x72\155\x65\144"]); if ($modality == "\x50\x61\x6e\x6f\x72\x61\155\x61") { $dataGroupInfo->strGroupRealPanoFilename = $filename; $this->put_DataGroups($dataGroupInfo); } else { if ($modality == "\124\150\162\x65\x65\x44\x50\150\x6f\164\157") { $dataGroupInfo->strGroup3DPFilename = $filename; $this->put_DataGroups($dataGroupInfo); } } } } } } } } } diff --git a/server/original/www/ezwebserver/src/application/models/Datafile_model.php b/server/original/www/ezwebserver/src/application/models/Datafile_model.php index d7fd6c3..85b2aea 100644 --- a/server/original/www/ezwebserver/src/application/models/Datafile_model.php +++ b/server/original/www/ezwebserver/src/application/models/Datafile_model.php @@ -1,7 +1,7 @@ array(FTEXT_IMG, FTNAM____, FILEPREFIX___, "\106\151\154\145\x73"), FILETYPE_IMGTAG => array(FTEXT_TAG, FTNAM____, FILEPREFIX___, "\106\x69\154\x65\x73"), FILETYPE_IMGTHM => array(FTEXT_THM, FTNAM____, FILEPREFIX___, "\106\151\154\x65\x73"), FILETYPE_IMGRAW => array(FTEXT_RAW, FTNAM____, FILEPREFIX___, "\x46\x69\x6c\145\163"), FILETYPE_REPORT => array(FTEXT_RPT, FTNAM____, FILEPREFIX_RT, "\122\x65\160\157\x72\164"), FILETYPE_RPTTHM => array(FTEXT_RTH, FTNAM____, FILEPREFIX_RT, "\x52\145\x70\157\x72\164"), FILETYPE_PHOTOID => array(FTEXT_PHI, FTNAM____, FILEPREFIX_PI, "\106\151\x6c\145\x73"), FILETYPE_THIRDPARTY => array(FTEXT_TPF, FTNAM____, FILEPREFIX___, "\124\150\151\162\x64\x50\141\162\164\171\x46\x69\x6c\x65\x73"), FILETYPE_PROJECT => array(FTEXT_PRJ, FTNAM____, FILEPREFIX___, "\106\151\154\x65\163"), FILETYPE_PRJTHM => array(FTEXT_PTH, FTNAM____, FILEPREFIX___, "\x46\x69\154\x65\x73"), FILETYPE_VPANO => array(FTEXT_25D, FTNAM____, FILEPREFIX___, "\106\x69\x6c\145\163"), FILETYPE_RESULT => array(FTEXT_RST, FTNAM____, FILEPREFIX___, "\124\122\122\x65\163\165\x6c\164"), FILETYPE_E3FILE => array(FTEXT_FIX, FTNAM____, FILEPREFIX___, "\x46\151\x78\145\x64"), FILETYPE_CHART => array(FTEXT_CHT, FTNAM____, FILEPREFIX_CH, "\103\x68\x61\162\x74"), FILETYPE_CHTTHM => array(FTEXT_CTH, FTNAM____, FILEPREFIX_CH, "\x43\x68\x61\162\164"), FILETYPE_OTHTAG => array(FTEXT_OTG, FTNAM____, FILEPREFIX___, "\x46\151\154\x65\x73"), FILETYPE_FGBPT => array(FTEXT_BPT, FTNAM____, FILEPREFIX___, "\106\x69\154\145\163"), FILETYPE_FFG => array(FTEXT_FFG, FTNAM____, FILEPREFIX___, "\106\151\154\145\x73")); var $SYSFILETYPE = array("\114\x41\x43" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\x4c\141\x79\157\x75\164\x2f\101\143\161\x75\151\x73\151\164\151\x6f\156"), "\x4c\126\x45" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\114\141\171\x6f\165\164\57\x56\x69\x65\x77\145\162"), "\x4c\103\x53" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\x4c\141\171\157\x75\x74\x2f\x43\x6f\156\x73\x75\x6c\x74"), "\114\x47\x59" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\114\x61\x79\157\165\x74\57\107\x61\x6c\154\145\162\x79"), "\114\122\124" => array(FTEXT_TPL, FTNAM____, FILEPREFIX___, "\114\141\171\x6f\x75\x74\57\122\145\x70\157\x72\x74"), "\114\101\116" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\114\141\x79\157\165\x74\x2f\101\156\x61\154\x79\163\x69\163"), "\x4c\x43\x54" => array(FTEXT_TPL, FTNAM____, FILEPREFIX___, "\114\x61\171\157\165\x74\x2f\x41\x6e\x61\154\x79\x73\x69\163\x43\x68\x61\162\x74"), "\x4c\x54\x41" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\x4c\141\171\157\x75\164\x2f\x41\143\x71\165\151\163\x69\x74\x69\157\x6e"), "\x4c\x54\126" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\114\x61\171\x6f\165\164\x2f\x56\x69\145\167\145\x72"), "\114\x54\x43" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\x4c\141\171\x6f\165\164\x2f\103\157\156\x73\165\154\164"), "\114\x54\107" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\114\141\x79\x6f\165\x74\57\107\141\x6c\x6c\145\162\x79"), "\114\x54\122" => array(FTEXT_TTH, FTNAM____, FILEPREFIX___, "\114\x61\171\157\165\x74\57\122\145\160\x6f\162\164"), "\114\x54\x4e" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\114\141\x79\157\x75\x74\57\x41\x6e\141\x6c\171\163\x69\163"), "\114\x54\120" => array(FTEXT_TTH, FTNAM____, FILEPREFIX___, "\114\141\x79\x6f\165\x74\57\101\x6e\x61\x6c\x79\163\151\163\103\x68\x61\x72\164"), "\x53\x46\x58" => array(FTEXT_SFX, FTNAM_SFX, FILEPREFIX___, "\x4c\x61\171\157\165\164\57\106\115\130\123\145\164\x2f\111\x4f\123\145\156\163\157\x72"), "\103\x46\130" => array(FTEXT_CFX, FTNAM_CFX, FILEPREFIX___, "\114\x61\171\x6f\165\164\57\106\x4d\x58\123\145\x74\x2f\x49\117\103\141\155\x65\162\x61"), "\106\111\130" => array(FTEXT_FIX, FTNAM____, FILEPREFIX___, "\106\151\x78\x65\x64"), "\107\101\114" => array(FTEXT_GAL, FTNAM____, FILEPREFIX_GA, "\x46\x69\x6c\x65\163"), "\x47\x54\110" => array(FTEXT_GTH, FTNAM____, FILEPREFIX_GA, "\106\x69\154\x65\163"), "\x53\x45\124" => array(FTEXT_SET, FTNAM____, FILEPREFIX___, "\123\145\x74\164\151\x6e\147"), "\x4c\x56\117" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\114\141\171\157\165\164\57\117\x72\164\150\x6f\126\x69\145\167\145\x72\57\104\145\146\141\165\154\x74"), "\x4c\124\117" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\x4c\x61\171\x6f\165\x74\x2f\117\162\164\150\157\x56\x69\x65\x77\x65\162\x2f\104\145\x66\x61\x75\x6c\164"), "\114\x50\x48" => array(FTEXT_TPL, FTNAM____, FILEPREFIX___, "\114\x61\171\157\x75\x74\57\x43\x68\141\x72\x74\57\110\x69\x73\164\157\x72\x79"), "\x4c\x50\124" => array(FTEXT_TPL, FTNAM____, FILEPREFIX___, "\x4c\x61\x79\x6f\x75\x74\x2f\x43\x68\x61\162\164\x2f\x54\x72\145\141\x74\155\x65\x6e\x74"), "\x4c\103\117" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\x4c\141\171\x6f\x75\164\57\117\162\164\150\x6f\103\157\x6e\163\165\154\164"), "\x4c\x43\x49" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\114\141\171\157\165\164\x2f\117\x72\164\150\x6f\103\157\156\163\x75\x6c\x74"), "\114\115\x4f" => array(FTEXT_LAY, FTNAM____, FILEPREFIX___, "\x4c\x61\171\x6f\x75\x74\57\x4f\x72\x74\150\x6f\x56\x69\145\x77\x65\162\x2f\x43\165\x73\164\157\155"), "\114\115\111" => array(FTEXT_LTH, FTNAM____, FILEPREFIX___, "\114\x61\x79\157\165\x74\57\x4f\162\164\x68\157\126\151\145\167\145\162\57\x43\x75\163\164\157\155")); var $SAMPLECASEFILETYPE = array("\x53\x43\120" => array(FTEXT_SCP, FTNAM____, FILEPREFIX_SC, "\123\x61\x6d\x70\x6c\145\x63\141\163\x65\x2f\x50\162\157\x76\151\144\145\x64", "\x53\x61\155\160\154\x65\x63\141\x73\145\57\125\x73\x65\x72"), "\x53\x54\110" => array(FTEXT_STH, FTNAM____, FILEPREFIX_SC, "\x53\x61\x6d\x70\154\145\x63\x61\163\145\x2f\120\162\x6f\x76\x69\x64\x65\x64", "\x53\141\155\160\154\x65\x63\x61\x73\145\57\125\163\145\162"), "\x53\103\125" => array(FTEXT_SCU, FTNAM____, FILEPREFIX_SC, "\123\x61\155\160\154\145\x63\141\163\145\x2f\125\163\145\x72", "\123\141\155\160\x6c\x65\143\141\x73\145\57\x50\x72\157\x76\x69\144\x65\144"), "\x55\x54\x48" => array(FTEXT_UTH, FTNAM____, FILEPREFIX_SC, "\x53\141\155\x70\x6c\x65\143\141\163\145\57\125\x73\x65\x72", "\x53\141\155\x70\x6c\x65\x63\141\163\145\x2f\x50\162\x6f\166\151\144\145\144")); var $FMXTYPE = array("\123\x41" => array(FTEXT_LAY, FTNAM_SSA, FILEPREFIX___, "\x4c\x61\171\x6f\x75\x74\x2f\x46\x4d\x58\x53\x65\x74\x2f\111\117\x53\145\x6e\x73\x6f\x72\57\123\145\164"), "\x53\x56" => array(FTEXT_LAY, FTNAM_SSV, FILEPREFIX___, "\x4c\x61\x79\x6f\165\x74\x2f\x46\x4d\x58\123\x65\x74\x2f\x49\117\123\x65\x6e\163\157\162\x2f\123\x65\x74"), "\123\x43" => array(FTEXT_LAY, FTNAM_SSC, FILEPREFIX___, "\114\x61\171\157\x75\x74\57\x46\115\130\123\x65\x74\x2f\x49\117\123\145\x6e\163\157\x72\x2f\123\x65\164"), "\x53\107" => array(FTEXT_LAY, FTNAM_SSG, FILEPREFIX___, "\114\141\x79\x6f\x75\164\x2f\x46\x4d\x58\x53\145\x74\57\111\117\x53\x65\x6e\x73\x6f\x72\57\123\145\x74"), "\x53\122" => array(FTEXT_TPL, FTNAM_SSR, FILEPREFIX___, "\x4c\141\x79\157\x75\164\x2f\106\x4d\x58\x53\145\x74\x2f\x49\117\123\x65\x6e\x73\157\x72\57\x53\145\164"), "\x53\116" => array(FTEXT_LAY, FTNAM_SAN, FILEPREFIX___, "\x4c\141\x79\157\165\x74\x2f\x46\x4d\130\123\x65\x74\57\111\117\x53\x65\x6e\x73\157\162\57\x53\x65\x74"), "\x53\x50" => array(FTEXT_TPL, FTNAM_SCT, FILEPREFIX___, "\114\141\171\157\165\x74\57\x46\115\x58\x53\x65\164\x2f\111\117\123\145\156\163\157\162\x2f\123\145\164"), "\x43\101" => array(FTEXT_LAY, FTNAM_CSA, FILEPREFIX___, "\x4c\x61\x79\x6f\165\164\x2f\x46\115\130\123\145\x74\57\x49\117\x43\x61\155\x65\162\x61\57\123\x65\x74"), "\x43\126" => array(FTEXT_LAY, FTNAM_CSV, FILEPREFIX___, "\x4c\x61\x79\157\165\x74\57\106\115\x58\123\145\x74\x2f\x49\x4f\103\x61\155\x65\162\141\x2f\123\145\x74"), "\103\103" => array(FTEXT_LAY, FTNAM_CSC, FILEPREFIX___, "\114\x61\x79\157\x75\164\57\x46\x4d\x58\123\x65\x74\57\x49\x4f\x43\141\x6d\145\162\x61\x2f\x53\x65\x74"), "\103\107" => array(FTEXT_LAY, FTNAM_CSG, FILEPREFIX___, "\114\141\171\157\x75\x74\x2f\x46\115\x58\123\x65\x74\57\111\117\x43\141\x6d\145\x72\x61\57\x53\145\x74"), "\103\x52" => array(FTEXT_TPL, FTNAM_CSR, FILEPREFIX___, "\x4c\141\171\157\x75\x74\x2f\x46\115\x58\123\145\164\57\x49\x4f\103\x61\x6d\145\x72\141\x2f\123\x65\164"), "\103\x4e" => array(FTEXT_LAY, FTNAM_CAN, FILEPREFIX___, "\114\x61\171\157\165\164\x2f\x46\x4d\x58\123\145\x74\x2f\x49\x4f\x43\141\x6d\145\162\141\x2f\x53\x65\x74"), "\x43\120" => array(FTEXT_TPL, FTNAM_CCT, FILEPREFIX___, "\114\x61\x79\x6f\165\164\x2f\x46\x4d\130\x53\145\164\x2f\x49\117\103\141\x6d\x65\162\x61\x2f\123\145\x74"), "\111\126" => array(FTEXT_LAY, FTNAM_ISV, FILEPREFIX___, "\x4c\x61\171\x6f\x75\x74\57\106\115\130\x53\145\164\x2f\111\x4f\x53\x49\117\103\57\x53\x65\x74"), "\124\101" => array(FTEXT_LTH, FTNAM_SSA, FILEPREFIX___, "\114\141\x79\x6f\x75\164\57\x46\115\130\123\x65\164\x2f\111\117\x53\145\x6e\x73\157\x72\x2f\x53\145\x74"), "\124\x56" => array(FTEXT_LTH, FTNAM_SSV, FILEPREFIX___, "\114\x61\171\157\165\x74\57\x46\115\130\x53\x65\164\x2f\x49\117\123\145\x6e\x73\157\x72\57\x53\x65\164"), "\x54\103" => array(FTEXT_LTH, FTNAM_SSC, FILEPREFIX___, "\x4c\x61\171\x6f\x75\164\x2f\x46\x4d\x58\x53\x65\164\x2f\111\x4f\x53\145\x6e\x73\x6f\162\x2f\123\145\x74"), "\x54\x47" => array(FTEXT_LTH, FTNAM_SSG, FILEPREFIX___, "\114\141\171\x6f\165\x74\x2f\106\115\130\123\x65\x74\x2f\111\117\x53\145\x6e\x73\157\162\57\123\x65\164"), "\x54\122" => array(FTEXT_TTH, FTNAM_SSR, FILEPREFIX___, "\114\x61\171\157\x75\x74\57\106\115\130\123\145\164\x2f\x49\117\x53\x65\x6e\x73\157\162\57\x53\145\x74"), "\x54\116" => array(FTEXT_LTH, FTNAM_SAN, FILEPREFIX___, "\x4c\141\x79\157\x75\164\x2f\x46\x4d\x58\x53\x65\x74\x2f\x49\x4f\x53\145\x6e\x73\x6f\162\57\x53\145\164"), "\x54\120" => array(FTEXT_TTH, FTNAM_SCT, FILEPREFIX___, "\x4c\141\171\157\165\x74\x2f\106\115\130\123\x65\x74\57\111\117\x53\145\x6e\x73\x6f\x72\x2f\123\145\164"), "\110\x41" => array(FTEXT_LTH, FTNAM_CSA, FILEPREFIX___, "\x4c\141\171\157\165\164\x2f\x46\115\130\123\145\164\57\111\117\x43\x61\x6d\x65\x72\141\57\123\x65\164"), "\110\x56" => array(FTEXT_LTH, FTNAM_CSV, FILEPREFIX___, "\x4c\x61\171\x6f\165\164\57\106\115\130\x53\145\164\x2f\111\117\103\141\x6d\x65\x72\141\x2f\x53\x65\164"), "\x48\x43" => array(FTEXT_LTH, FTNAM_CSC, FILEPREFIX___, "\x4c\x61\x79\157\165\x74\57\x46\x4d\x58\123\x65\164\x2f\x49\117\103\141\x6d\x65\x72\x61\57\123\x65\x74"), "\110\107" => array(FTEXT_LTH, FTNAM_CSG, FILEPREFIX___, "\x4c\x61\171\157\x75\x74\x2f\x46\x4d\130\123\145\x74\57\111\x4f\103\x61\x6d\x65\162\141\x2f\x53\145\x74"), "\x48\x52" => array(FTEXT_TTH, FTNAM_CSR, FILEPREFIX___, "\x4c\141\171\x6f\165\x74\57\106\x4d\130\x53\145\x74\x2f\111\x4f\103\x61\x6d\145\x72\x61\57\123\x65\164"), "\110\x4e" => array(FTEXT_LTH, FTNAM_CAN, FILEPREFIX___, "\x4c\141\x79\x6f\x75\x74\57\106\x4d\130\x53\145\x74\x2f\x49\x4f\103\141\x6d\x65\162\x61\x2f\123\145\x74"), "\110\x50" => array(FTEXT_TTH, FTNAM_CCT, FILEPREFIX___, "\114\x61\171\157\165\164\x2f\106\x4d\x58\x53\145\x74\57\x49\x4f\103\141\155\x65\x72\141\57\123\x65\164"), "\x55\126" => array(FTEXT_LTH, FTNAM_ISV, FILEPREFIX___, "\114\x61\171\157\165\x74\x2f\x46\x4d\x58\x53\x65\x74\x2f\x49\x4f\123\111\x4f\x43\x2f\x53\x65\164")); var $MODALITYTYPE = array("\120\141\x6e\157\x72\x61\155\141" => FILEPREFIX_PX, "\103\145\x70\x68\x61\154\157" => FILEPREFIX_DX, "\103\x54" => FILEPREFIX_CT, "\x49\x4f\x53\145\x6e\x73\x6f\x72" => FILEPREFIX_IS, "\x49\117\103\x61\155\145\162\141" => FILEPREFIX_IC, "\111\x4f\130\122\x61\x79" => FILEPREFIX_IX, "\x44\123\x4c\x52" => FILEPREFIX_DI, "\x54\x68\162\145\x65\x44\120\x68\x6f\x74\157" => FILEPREFIX_3I, "\x49\155\160\162\145\163\163\x69\x6f\x6e" => FILEPREFIX_II, "\111\x4f\123\x63\141\x6e\156\145\162" => FILEPREFIX_IA, "\103\x61\x70\164\165\162\x65" => FILEPREFIX_CI, "\117\x74\150\x65\162" => FILEPREFIX_OI, "\104\157\156\164\103\x61\x72\x65" => FILEPREFIX_DC, "\123\141\155\160\154\x65\143\x61\163\x65" => FILEPREFIX_SC, "\107\x61\154\x6c\145\162\171" => FILEPREFIX_GA, "\x52\x65\160\157\162\164" => FILEPREFIX_RT, "\120\150\157\164\157\x49\x44" => FILEPREFIX_PI, "\124\x68\151\162\x64\120\141\x72\x74\171" => FILEPREFIX___, "\124\150\x72\145\x65\x44\117\x62\152\145\x63\x74" => FILEPREFIX_3O, "\103\150\141\x72\x74" => FILEPREFIX_CH); var $RESULTTYPE = array("\x52\x65\x70\157\162\164" => FILEPREFIX_TRRT, "\x49\x6e\166\x6f\x69\x63\x65" => FILEPREFIX_TRIV, "\x4f\x74\x68\x65\162" => FILEPREFIX_OI); var $baseDir; var $subDirs; var $linkBaseDirs; public function __construct() { $ci =& get_instance(); $ci->load->helper("\146\151\x6c\145"); $ci->load->helper("\166\x74\137\x6c\151\156\x6b\x5f\146\x69\154\145\x5f\150\145\154\160\x65\x72"); $this->config = getConfigArray(); $this->fmTopDir = getConfigValue($this->config, CONF_FM_TOP_DIR); $this->subDirs = explode("\174", getConfigValue($this->config, CONF_SUB_DIRS)); $this->linkBaseDirs = explode("\174", getConfigValue($this->config, CONF_LINK_BASE_DIRS)); $this->fmTopDir = rtrim($this->fmTopDir, "\57"); if (is_array($this->subDirs)) { foreach ($this->subDirs as $name => $value) { $this->subDirs[$name] = rtrim($value, "\x2f"); } } else { } } public function getAbsFilePathByType($fileType, $filePath) { $fullPath = ''; $checkPath = ''; foreach ($this->FILETYPE as $key => $value) { if ($fileType == $key) { $checkPath = $this->_getAbsDirByType($fileType, $filePath); $fullPath = $checkPath . "\57" . $filePath; } else { } } if ($fullPath == '') { return FALSE; } $this->checkMultiDrive($fullPath); if (makeDir($checkPath) === false) { return false; } return $fullPath; } public function getSysFilePathByType($fileType, $filePath) { foreach ($this->SYSFILETYPE as $key => $value) { if ($fileType == $key) { return $this->_getAbsSysDirByType($fileType) . "\x2f" . $filePath; } else { } } foreach ($this->SAMPLECASEFILETYPE as $key => $value) { if ($fileType == $key) { $fullPath = $this->_getAbsSampleCaseDirByType($fileType, $filePath) . "\x2f" . $filePath; return $fullPath; } else { } } $fmxType = ''; if (preg_match("\57\136\133\101\55\x5a\x5d\x7b\62\175\x5b\61\x2d\71\135\173\x31\175\57", $fileType)) { $fmxType = substr($fileType, 0, 2); $fmxNumber = substr($fileType, 2); foreach ($this->FMXTYPE as $key => $value) { if ($fmxType == $key) { return $this->fmTopDir . "\x2f" . $value[sDirectory] . $fmxNumber . "\57" . $filePath; } else { } } } } public function getSysFilePathByType2($fileType, $filePath) { foreach ($this->SAMPLECASEFILETYPE as $key => $value) { if ($fileType == $key) { $fullPath = $this->_getAbsSampleCaseDirByType2($fileType, $filePath) . "\x2f" . $filePath; return $fullPath; } else { } } return null; } public function getSysFilePathByOnlyType($fileType, $filePath) { foreach ($this->SYSFILETYPE as $key => $value) { if ($fileType == $key) { $dir = $this->SYSFILETYPE[$fileType][sDirectory]; $fullPath = $this->fmTopDir . "\57" . $dir . "\57" . $filePath; return $fullPath; } } return null; } public function getNewSampleCaseUserContentFilePath($ext) { $baseUniqueName = $this->_getBaseUniqueName(); $index = $this->_getResourceUniqueIndex(); $fileName = "\x53\x43" . $baseUniqueName . "\137" . $index . "\56" . $ext; $absFilePath = $this->getSysFilePathByType("\x53\103\125", $fileName); $dirPath = dirname($absFilePath); $check = makeDir($dirPath); if ($check) { return $absFilePath; } else { return FALSE; } } public function getSampleCaserUserContentThumbnailFilePath($fileAbsFilePath) { return removeFileExtension($fileAbsFilePath) . "\137\164\56" . EXT_SAMPLECASETHM; } public function getAbsCtDirPath($filePath) { $fileName = basename($filePath); $subDir = "\123\x75\142" . substr($fileName, 3, 6); $ctDirPath = $this->fmTopDir . "\x2f\106\151\154\145\x73\57" . $subDir . "\x2f" . $fileName; $this->checkMultiDrive($ctDirPath); return $ctDirPath; } public function getAbsCtFilePath($filePath) { $ctDirPath = $this->getAbsCtDirPath($filePath); if (is_dir($ctDirPath)) { $firstFile = $this->_getFirstFileInDir($ctDirPath, "\57\x5c\56\50\103\124\174\x43\x54\x58\51\44\57\x69"); return $firstFile; } else { return $ctDirPath; } } public function GetNewCtAndThumbnailPath(&$ctDirPath, &$thumbnailFilePath, $acqTimestamp = null) { $baseUniqueName = $this->_getBaseUniqueName($acqTimestamp); $subDir = $this->_getSubDirName($baseUniqueName); $baseName = $this->_getPrefix("\x43\x54") . $baseUniqueName; $indexRes = $this->_getResourceUniqueIndex(); $ctDirPath = $this->fmTopDir . "\x2f\106\151\x6c\145\x73\57" . $subDir . "\57" . $baseName . "\137" . $indexRes; $thumbnailFilePath = $this->fmTopDir . "\57\x46\x69\154\x65\x73\x2f" . $subDir . "\57" . $baseName . "\164\137" . $indexRes . "\x2e" . EXT_IMGTHM; } public function GetNewResourcePath($fileType, $modality, $ext, $timeStamp = null) { if (empty($timeStamp)) { $baseUniqueName = getBaseUniqueName(); } else { $baseUniqueName = getBaseUniqueName($timeStamp); } $subDir = $this->_getSubDirName($baseUniqueName); if ($fileType === FILETYPE_RESULT) { $baseName = $this->_getResultFilePrefix($modality) . $baseUniqueName; } else { $baseName = $this->_getPrefix($modality) . $baseUniqueName; } $indexRes = $this->_getResourceUniqueIndex(); $baseDir = $this->_getBaseDirforFileType($fileType); $subDirPath = $this->fmTopDir . "\x2f" . $baseDir . "\57" . $subDir; $resFilePath = $subDirPath . "\x2f" . $baseName . "\137" . $indexRes . "\56" . $ext; makeDir($subDirPath); return $resFilePath; } public function getNewProjectFilePath($ctName, $fileExt) { $filesSubDir = $this->_getSubDirName(substr($ctName, 2)); $fileCatDir = $this->_getBaseDirforFileType(FILETYPE_PROJECT); $ctBaseDir = $this->fmTopDir . "\x2f" . $fileCatDir . "\x2f" . $filesSubDir; $projectFiles = glob($ctBaseDir . "\x2f" . $ctName . "\x5f\52" . $fileExt); if (count($projectFiles) > 0) { vt_loge(__METHOD__ . "\x3a\40\145\x33\x70\162\x6a\57\156\160\152\40\x66\151\x6c\x65\40\141\x6c\162\145\x61\144\171\x20\145\170\x69\x73\164\x73\x2e\x20\146\151\x6c\x65\40\x6e\141\155\x65\40\146\157\162\x6d\141\164\x3a\40" . $ctName . "\x5f\x2a" . $fileExt); return $projectFiles[0]; } $baseUniqueName = $this->_getBaseUniqueName(); $indexRes = $this->_getResourceUniqueIndex(); $filePath = $ctBaseDir . "\x2f" . $ctName . "\x5f" . $baseUniqueName . "\x5f" . $indexRes . "\x2e" . $fileExt; return $filePath; } public function getProjectFileList($ctName, $projectExt) { $subDir = $this->_getSubDirName(substr($ctName, 2)); $baseDir = $this->_getBaseDirforFileType(FILETYPE_PROJECT); $dirPath = $this->fmTopDir . "\x2f" . $baseDir . "\x2f" . $subDir; $patternList = array($ctName . "\x2a\56" . $projectExt); $files = $this->_getFileListRecursiveMultiDrive($dirPath, $patternList, false); return $files; } public function getE3FileList($fileName, $fileExt) { $baseDir = $this->_getBaseDirforFileType(FILETYPE_E3FILE); $dirPath = $this->fmTopDir . "\57" . $baseDir . "\x2f" . $fileName; if (!file_exists($dirPath)) { return VERR_DB_NOSUCHDATA; } $files = $this->_scanE3FileAndDir($dirPath, $fileExt); return $files; } private function _scanE3FileAndDir($dirPath, $prefix) { $dirPath = rtrim($dirPath, "\x5c\x2f"); $result = array(); $items = scanDirSafe($dirPath); foreach ($items as $file) { if ($file !== "\56" and $file !== "\x2e\56") { if (is_dir($dirPath . "\57" . $file)) { array_push($result, $prefix . $file); } else { array_push($result, $file); } } } return $result; } public function getSysFileList($fileType, $filePath = '') { $fileExts = ''; $filePrefixs = ''; $dirPath = ''; $notSupportedType = $this->_getSysFileExtsPrefixsAndDirFullPath($fileType, $fileExts, $filePrefixs, $dirPath); if ($notSupportedType === FALSE) { return FALSE; } if (strlen($filePath) > 0) { $dirPath = $dirPath . "\x2f" . $filePath; } $patternList = $this->_getFilePatternList($fileExts, $filePrefixs); $files = $this->_getFileListRecursiveMultiDrive($dirPath, $patternList, $fileType == "\x46\111\x58" ? false : true); return $files; } public function getSysDirList($fileType, $filePath = '') { $fileExts = ''; $filePrefixs = ''; $dirPath = ''; $this->_getSysFileExtsPrefixsAndDirFullPath($fileType, $fileExts, $filePrefixs, $dirPath); if (strlen($filePath) > 0) { $dirPath = $dirPath . "\x2f" . $filePath; } $dirs = $this->_getDirListMultiDrive($dirPath); return $dirs; } public function getResourceFilePath($fileType, $fileName) { if ($fileType === FILETYPE_RESULT) { $subDir = "\123\x75\x62" . substr($fileName, 5, 6); } else { $subDir = "\123\165\142" . substr($fileName, 3, 6); } $baseDir = $this->_getBaseDirforFileType($fileType); if (is_null($baseDir)) { throw new \InvalidArgumentException("\111\x6e\166\x61\x6c\x69\144\40\x66\x69\154\x65\124\171\x70\145\72\x20" . $fileType); } $subDirPath = $this->fmTopDir . "\57" . $baseDir . "\x2f" . $subDir; $filePath = $subDirPath . "\x2f" . $fileName; makeDir($subDirPath); return $filePath; } public function getResourceSysFilePath($fileType, $fileName) { $subDir = "\x53\165\142" . substr($fileName, 3, 6); $baseDir = $this->_getBaseDirforSysFileType($fileType); $subDirPath = $this->fmTopDir . "\x2f" . $baseDir . "\x2f" . $subDir; $filePath = $subDirPath . "\57" . $fileName; makeDir($subDirPath); return $filePath; } public function getAbsResourceFilePath($resourceFileType, $sourceFilePath) { $fileName = $this->_getResourceFileName($resourceFileType, $sourceFilePath); $filePath = $this->getResourceFilePath($resourceFileType, $fileName); $this->checkMultiDrive($filePath); return $filePath; } public function getThumbnailFileName($fileType, $fileName) { $fileName = removeFileExtension($fileName); if ($fileType == FILETYPE_IMGTHM) { $pos = strrpos($fileName, "\x5f"); $fileName = substr($fileName, 0, $pos) . "\164" . substr($fileName, $pos); } else { } return $fileName; } public function getProjectThumbnailFileExtension($fileExt) { if ($fileExt == EXT_E3PROJECT) { return EXT_E3PRJTHM; } else { return EXT_EZDPRJTHM; } } private function _getSubDirName($baseUniqueName) { $subDir = "\123\x75\x62" . substr($baseUniqueName, 1, 6); return $subDir; } private function _getBaseUniqueName($timestamp = null) { return getBaseUniqueName($timestamp); } private function _getResourceUniqueIndex() { return getResourceUniqueIndex(); } public function makeThumbnailFile($thumbnailFilePath, $fileName) { if (isCTPathName($fileName)) { $ctFileName = getCtNameFromThumbnailName(basename($thumbnailFilePath)); $ctFilePath = $this->getAbsCtFilePath($ctFileName); $ret = createThumbnailFileFromCT($thumbnailFilePath, $ctFilePath); if ($ret != VSUCCESS) { return $ret; } } else { $imageFilePath = $this->_findOrgImageFilePathFromThumbnailMultiDrive($thumbnailFilePath); if ($imageFilePath) { $ret = createThumbnailFileFromImage($thumbnailFilePath, $imageFilePath); if ($ret != VSUCCESS) { return $ret; } } else { } } return $thumbnailFilePath; } public function makeTagFile($filePath) { return $filePath; } public function DownloadFile($filePath) { if (!file_exists($filePath)) { return FALSE; } else { } $fileName = basename($filePath); $mimeType = get_mime_by_extension($fileName); if ($mimeType && substr_compare($mimeType, "\151\155\141\x67\x65\57", 0, 6) == 0) { $this->_viewImageFile($filePath, $fileName, $mimeType); } else { force_download($filePath, null); } exit; } public function getTempDir($path = null) { $dirPath = $this->fmTopDir . DIRECTORY_SEPARATOR . "\124\145\155\160"; if ($path !== null) { $dirPath .= DIRECTORY_SEPARATOR . $path; } makeDir($dirPath); return $dirPath; } private function _getBaseDirforFileType($fileType) { foreach ($this->FILETYPE as $key => $value) { if ($fileType == $key) { return $this->FILETYPE[$fileType][sDirectory]; } else { } } return null; } private function _getSubDirByType($fileType, $filePath) { $typeDir = $this->FILETYPE[$fileType][sDirectory]; switch ($fileType) { case FILETYPE_THIRDPARTY: $startIndex = 1; break; default: $startIndex = 3; break; } $subDir = "\123\165\x62" . substr($filePath, $startIndex, 6); return $typeDir . "\x2f" . $subDir; } private function _getAbsDirByType($fileType, $filePath) { return $this->fmTopDir . "\x2f" . $this->_getSubDirByType($fileType, $filePath); } private function _getAbsSysDirByType($fileType) { return $this->fmTopDir . "\57" . $this->SYSFILETYPE[$fileType][sDirectory]; } private function _getAbsSysDirByType2($fileType) { return $this->fmTopDir . "\x2f" . $this->SYSFILETYPE[$fileType][sDirectory2]; } private function _getAbsSampleCaseFullDir($dir, $filePath) { if ($dir == "\x53\x61\155\x70\154\x65\x63\x61\163\145\x2f\x55\163\145\x72") { $subDir = "\x53\165\x62" . substr($filePath, 3, 6); return $this->fmTopDir . "\57" . $dir . "\57" . $subDir; } else { return $this->fmTopDir . "\57" . $dir; } } private function _getAbsSampleCaseDirByType($fileType, $filePath) { $dir = $this->SAMPLECASEFILETYPE[$fileType][sDirectory]; return $this->_getAbsSampleCaseFullDir($dir, $filePath); } private function _getAbsSampleCaseDirByType2($fileType, $filePath) { $dir = $this->SAMPLECASEFILETYPE[$fileType][sDirectory2]; return $this->_getAbsSampleCaseFullDir($dir, $filePath); } private function _getPrefix($modality) { if (array_key_exists($modality, $this->MODALITYTYPE)) { return $this->MODALITYTYPE[$modality]; } else { return $this->MODALITYTYPE["\x4f\x74\150\x65\x72"]; } } private function _getResultFilePrefix($modality) { if (array_key_exists($modality, $this->RESULTTYPE)) { return $this->RESULTTYPE[$modality]; } else { return $this->RESULTTYPE["\x4f\x74\150\x65\x72"]; } } public function _getSysFileExtsPrefixsAndDirFullPath($fileType, &$fileExts, &$filePrefixs, &$dirPath) { foreach ($this->SYSFILETYPE as $key => $value) { if ($fileType == $key) { $fileExts = $value[strFiletypeext]; $filePrefixs = $value[strFiletypenam]; $dirPath = $this->fmTopDir . "\x2f" . $value[sDirectory]; return; } else { } } foreach ($this->SAMPLECASEFILETYPE as $key => $value) { if ($fileType == $key) { $fileExts = $value[strFiletypeext]; $filePrefixs = $value[strFiletypenam]; $dirPath = $this->fmTopDir . "\x2f" . $value[sDirectory]; return; } else { } } $fmxType = ''; if (preg_match("\57\136\x5b\x41\x2d\x5a\135\x7b\x32\175\133\x31\55\x39\135\x7b\x31\x7d\57", $fileType)) { $fmxType = substr($fileType, 0, 2); $fmxNumber = substr($fileType, 2); foreach ($this->FMXTYPE as $key => $value) { if ($fmxType == $key) { $fileExts = $value[strFiletypeext]; $filePrefixs = $value[strFiletypenam]; $dirPath = $this->fmTopDir . "\x2f" . $value[sDirectory] . $fmxNumber; return; } else { } } } else { } return FALSE; } private function _getFilePatternList($fileExts, $filePrefixs) { $arrExt = explode("\x2c", $fileExts); $arrPrefix = explode("\x2c", $filePrefixs); $patternList = array(); foreach ($arrExt as $ext) { foreach ($arrPrefix as $prefix) { array_push($patternList, $prefix . $ext); } } return $patternList; } public function getFilePatternList($fileExts, $filePrefixs) { return $this->_getFilePatternList($fileExts, $filePrefixs); } private function _scanDirRecursive($dirPath, $patternList, $recursive = true, $prefix = '') { $dirPath = rtrim($dirPath, "\134\57"); $result = array(); $items = scanDirSafe($dirPath); foreach ($items as $file) { if ($file !== "\56" and $file !== "\x2e\x2e") { if (is_dir($dirPath . "\57" . $file)) { if ($recursive) { $result = array_merge($result, $this->_scanDirRecursive($dirPath . "\x2f" . $file, $patternList, $recursive, $prefix . $file . "\57")); } else { } } else { foreach ($patternList as $patten) { if (fnmatch(strtoupper($patten), strtoupper($file))) { array_push($result, $prefix . $file); } } } } else { } } return $result; } private function _getFirstFileInDir($dirPath, $regex = "\56\53") { $items = scanDirSafe($dirPath); foreach ($items as $file) { if (!is_dir($file)) { if (preg_match($regex, $file)) { return $dirPath . "\57" . $file; } else { } } } return null; } public function _getResourceFileName($fileType, $fileName) { $fileOnlyName = removeFileExtension($fileName); $fileExt = getFileExtension($fileName); switch ($fileType) { case FILETYPE_IMGTHM: return $this->getThumbnailFileName($fileType, $fileOnlyName) . "\56" . EXT_IMGTHM; case FILETYPE_IMGTAG: return $fileOnlyName . "\x2e" . EXT_IMGTAG; case FILETYPE_IMGRAW: return $fileOnlyName . "\56" . EXT_IMGRAW; case FILETYPE_PRJTHM: if ($fileExt == EXT_EZDPROJECT) { return $fileOnlyName . "\56" . EXT_EZDPRJTHM; } else { return $fileOnlyName . "\56" . EXT_E3PRJTHM; } case FILETYPE_RPTTHM: return $fileOnlyName . "\x2e" . EXT_RPTTHM; case FILETYPE_OTHTAG: return $fileOnlyName . "\x2e" . EXT_OTHTAG; case FILETYPE_FGBPT: return $fileOnlyName . "\x2e" . EXT_FGBPT; case FILETYPE_FFG: return $fileOnlyName . "\x2e" . EXT_FFG; case FILETYPE_CHTTHM: return $fileOnlyName . "\56" . EXT_CHTTHM; default: vt_loge(__METHOD__ . "\x3a" . "\125\x6e\x73\x75\x70\x70\x6f\x72\164\x65\144\40\146\151\x6c\x65\40\x74\x79\160\x65\x3a\x20" . $fileType); throw new InvalidArgumentException("\125\156\163\x75\x70\160\157\x72\164\145\144\x20\146\x69\154\145\40\164\x79\x70\145\72\x20\44\146\x69\x6c\145\124\x79\x70\145"); } } private function _viewImageFile($filePath, $fileName, $mimeType) { header("\x45\170\160\151\162\145\x73\72\x20\60"); header("\x43\141\143\150\x65\55\x43\x6f\x6e\x74\x72\x6f\x6c\72\40\156\157\x2d\163\164\x6f\x72\145\x2c\x20\x6e\157\55\143\x61\143\150\145\x2c\40\155\165\163\164\x2d\x72\x65\x76\141\154\151\x64\141\x74\145\x2c\40\x70\157\163\x74\x2d\143\150\x65\x63\x6b\75\x30\54\x20\160\162\x65\55\x63\150\x65\143\x6b\75\x30"); header("\x43\157\156\164\145\156\x74\55\x54\171\x70\x65\x3a\40" . $mimeType); header("\x43\x6f\x6e\x74\x65\x6e\164\x2d\104\151\163\160\x6f\163\x69\164\151\157\156\x3a\40\151\156\154\x69\x6e\x65\73\40\x66\151\154\x65\156\141\155\x65\x3d\42" . basename($fileName) . "\42"); header("\x43\x6f\156\x74\145\156\x74\x2d\x54\162\141\156\x73\146\x65\x72\55\x45\x6e\143\157\144\151\x6e\147\72\x20\142\151\x6e\x61\x72\171"); header("\x43\x6f\156\164\145\x6e\x74\x2d\x4c\145\156\147\x74\150\x3a\x20" . filesize($filePath)); header("\103\x6f\156\156\x65\x63\x74\151\157\x6e\72\40\x63\x6c\157\x73\145"); readfile($filePath); } public function checkMultiDrive(&$param0 = null, &$param1 = null, &$param2 = null, &$param3 = null) { if (!is_array($this->subDirs) || count($this->subDirs) == 0) { return; } $argc = func_num_args(); $foundSubDir = null; for ($i = 0; $i < $argc; $i++) { $name = "\x70\141\162\141\155" . $i; $params[] =& ${$name}; if ($i == 0) { if (file_exists($params[0])) { return; } else { $srcFilePath = getSrcFilePathFromLinkFile($params[0], $this->linkBaseDirs); if ($srcFilePath != FALSE) { $params[0] = $srcFilePath; return; } foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $params[0]); if (file_exists($newPath)) { $foundSubDir = $value; $params[0] = $newPath; break; } else { $srcFilePath = getSrcFilePathFromLinkFile($newPath, $this->linkBaseDirs); if ($srcFilePath != FALSE) { $foundSubDir = $value; $params[0] = $srcFilePath; break; } } } if ($foundSubDir == null) { return; } } } else { $params[$i] = str_replace($this->fmTopDir, ${$foundSubDir}, $params[$i]); } } } public function deleteFileMultiDrive($filePath, $include1st = true) { if ($include1st) { $ret = deleteFileIfExist($filePath); } if (is_array($this->subDirs) && count($this->subDirs) > 0) { foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $filePath); $subRet = deleteFileIfExist($newPath); } } else { return FALSE; } if ($ret === true || $subRet === true) { return true; } else { return false; } } public function deleteFileSubDrive($filePath) { $this->deleteFileMultiDrive($filePath, false); } public function rmDirRecurMultiDrive($dirPath) { $isDeleted = 0; if (rmDirRecursive($dirPath)) { $isDeleted++; } if (is_array($this->subDirs) || count($this->subDirs) > 0) { foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $dirPath); if (rmDirRecursive($newPath)) { $isDeleted++; } } } if ($isDeleted > 0) { return TRUE; } else { return FALSE; } } private function _getDirListMultiDrive($dirPath) { $dirList = getDirList($dirPath); if (is_array($this->subDirs) && count($this->subDirs) > 0) { foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $dirPath); $dirList = array_merge($dirList, getDirList($newPath)); } } else { } return array_unique($dirList); } private function _getFileListRecursiveMultiDrive($dirPath, $patternList, $recursive = true) { $fileList = $this->_scanDirRecursive($dirPath, $patternList, $recursive); if (is_array($this->subDirs) && count($this->subDirs) > 0) { foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $dirPath); $fileList = array_merge($fileList, $this->_scanDirRecursive($newPath, $patternList, $recursive)); } } else { } return array_unique($fileList); } private function _findOrgImageFilePathFromThumbnailMultiDrive($thumbnailFilePath) { $dirPath = dirname($thumbnailFilePath); $fileName = basename($thumbnailFilePath); $fileName = str_replace("\164\x5f", "\x5f", $fileName); $fileName = removeFileExtension($fileName); $fileRegPattern = "\x2f" . $fileName . "\134\x2e\50" . IMG_EXT . "\x29\x2f\x69"; $firstFile = $this->_getFirstFileInDir($dirPath, $fileRegPattern); if ($firstFile) { return $firstFile; } if (is_array($this->subDirs) && count($this->subDirs) > 0) { foreach ($this->subDirs as $name => $value) { $newPath = str_replace($this->fmTopDir, $value, $dirPath); $firstFile = $this->_getFirstFileInDir($newPath, $fileRegPattern); if ($firstFile) { return $firstFile; } } } else { } return null; } private function _getBaseDirforSysFileType($fileType) { foreach ($this->SAMPLECASEFILETYPE as $key => $value) { if ($fileType == $key) { return $this->SAMPLECASEFILETYPE[$fileType][sDirectory]; } else { } } return null; } public function copySysDir($parameters) { $fileType = $parameters["\x74\x79\x70\145"]; $fromPath = $parameters["\160\x61\164\150"]; $toPath = $parameters["\x74\157"]; if (!isset($fileType) || !isset($fromPath) || !isset($toPath)) { return VERR_COMMON_INVALID; } $dirType = strtoupper($fileType); switch ($dirType) { case "\106\x49\x58": case "\x53\x46\x58": case "\x43\106\130": $fromPathCheck = checkDotDotInDirectory($fromPath); $toPathCheck = checkDotDotInDirectory($toPath); if ($fromPathCheck === false || $toPathCheck === false) { return VERR_COMMON_INVALID; } $absFromDirPath = $this->getSysFilePathByType($fileType, $fromPath); $absToDirPath = $this->getSysFilePathByType($fileType, $toPath); $this->checkMultiDrive($absFromDirPath, $absToDirPath); $ret = copyDir($absFromDirPath, $absToDirPath); if ($ret == true) { return VERR_COMMON_SUCCESS; } else { if ($ret == VERR_COMMON_IO) { return VERR_COMMON_IO; } else { return VERR_COMMON_INVALID; } } default: return VERR_COMMON_INVALID; } } public function moveSysDir($parameters) { $fileType = $parameters["\x74\171\x70\145"]; $fromPath = $parameters["\160\x61\x74\x68"]; $toPath = $parameters["\164\x6f"]; if (!isset($fileType) || !isset($fromPath) || !isset($toPath)) { return VERR_COMMON_INVALID; } $dirType = strtoupper($fileType); switch ($dirType) { case "\106\111\130": case "\123\106\x58": case "\x43\x46\x58": $fromPathCheck = checkDotDotInDirectory($fromPath); $toPathCheck = checkDotDotInDirectory($toPath); if ($fromPathCheck === false || $toPathCheck === false) { return VERR_COMMON_INVALID; } $absFromDirPath = $this->getSysFilePathByType($fileType, $fromPath); $absToDirPath = $this->getSysFilePathByType($fileType, $toPath); $this->checkMultiDrive($absFromDirPath, $absToDirPath); $ret = renameDir($absFromDirPath, $absToDirPath); if ($ret == VERR_COMMON_SUCCESS) { return VERR_COMMON_SUCCESS; } else { if ($ret == VERR_COMMON_IO) { return VERR_COMMON_IO; } else { if ($ret == VERR_DELIVERER_FILEMANAGER_FILE_EXISTS) { return VERR_DELIVERER_FILEMANAGER_FILE_EXISTS; } else { return VERR_COMMON_INVALID; } } } default: return VERR_COMMON_INVALID; } } public function saveChartFile($chartNo, $fileName) { $fileNames = explode("\x7c", $fileName); if (count($fileNames) > 1) { $chartFileName = $fileNames[0]; $chartType = $fileNames[1]; } else { $chartFileName = $fileName; $chartType = "\124\x72\x65\141\x74\x6d\145\156\164"; } if (empty($chartNo)) { $chartFilePath = $this->getAbsFilePathByType(FILETYPE_CHART, $chartFileName); checkPostUploadFile("\141\x74\164\141\x63\x68\x65\144\x46\x69\x6c\x65", $chartFilePath); } else { $chartFilePath = $this->GetNewResourcePath(FILETYPE_CHART, "\x43\150\141\162\164", EXT_CHART); checkPostUploadFile("\141\164\x74\141\x63\150\x65\x64\106\x69\154\145", $chartFilePath); load_model($this, "\x50\x61\164\x69\145\x6e\164\x43\x68\141\x72\164\163\137\x6d\157\144\x65\154"); $this->PatientCharts_model->insert_PatientChart($chartNo, basename($chartFilePath), $chartType); } $thumbnailFileName = $this->getThumbnailFileName(FILETYPE_CHTTHM, basename($chartFilePath)); $thumbnailFileExt = EXT_CHTTHM; $thmFilePath = $this->getResourceFilePath(FILETYPE_CHTTHM, $thumbnailFileName . "\x2e" . $thumbnailFileExt); checkPostUploadFile("\164\x68\x6d\106\x69\x6c\x65", $thmFilePath, false); return removeFileExtension(basename($chartFilePath)); } } diff --git a/server/original/www/ezwebserver/src/application/models/Doctors_model.php b/server/original/www/ezwebserver/src/application/models/Doctors_model.php index 9505f6b..e955fb9 100644 --- a/server/original/www/ezwebserver/src/application/models/Doctors_model.php +++ b/server/original/www/ezwebserver/src/application/models/Doctors_model.php @@ -1,7 +1,7 @@ db->query($sql, array($sAccountInfo["\x73\x74\162\101\x63\143\157\165\156\164\x4e\x61\155\x65"], $strDoctorName)); return $this->db->affected_rows(); } public function delete_DoctorsByName($strDoctorName) { $sql = "\x53\x45\114\x45\103\x54\x20\104\117\103\137\x49\x44\x20\106\122\x4f\x4d\40\105\x32\x5f\104\x4f\x43\40\x57\110\105\122\105\40\104\117\103\137\116\x41\x4d\x45\x20\x3d\40\77"; $query = $this->db->query($sql, array($strDoctorName)); if (count($query->result_array()) > 0) { $strDoctorID = $query->result_array()[0]["\x64\x6f\143\x5f\151\144"]; if (strlen($strDoctorID) > 0) { $sql = "\x44\105\114\x45\x54\105\x20\x46\x52\x4f\115\x20\105\x32\137\101\124\124\x45\116\x44\x49\116\x47\137\104\x4f\103\40\127\110\x45\x52\105\40\x44\117\x43\137\111\x44\40\75\x20\x3f"; $this->db->query($sql, array($strDoctorID)); if ($this->db->query($sql, array($strDoctorID)) == FALSE) { return $this->db->affected_rows(); } $sql_e2_doc = "\104\105\x4c\105\124\x45\x20\106\122\117\115\x20\x45\x32\x5f\104\117\103\40\x57\110\105\x52\105\x20\x44\x4f\103\137\116\101\115\105\40\x3d\x20\77"; $query = $this->db->query($sql_e2_doc, array($strDoctorName)); return $this->db->affected_rows(); } else { return strlen($strDoctorID); } } else { return VERR_DB_NOSUCHDATA; } } public function get_Doctors() { $sql = "\123\105\x4c\x45\103\124\x20\104\x4f\x43\x5f\x4e\x41\x4d\105\40\106\x52\117\x4d\x20\105\62\137\x44\117\103\40\x4f\x52\x44\105\x52\40\x42\x59\x20\x44\x4f\x43\137\x4e\101\x4d\x45\x20\101\x53\x43"; return $this->db->query($sql)->result_array(); } public function post_DoctorsByNameAndAccount($strDoctorName, $strAccountID) { $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $sql = "\x49\116\123\105\x52\x54\40\111\x4e\x54\117\40\x45\x32\x5f\104\x4f\x43\x20\x28\x44\x4f\x43\137\116\x41\x4d\x45\54\x20\104\x4f\103\137\114\x45\x56\x45\x4c\54\x20\x41\x43\103\x5f\101\103\103\x4f\125\116\x54\137\x49\104\51\40\126\101\114\x55\105\123\x20\x28\77\x2c\x20\x27\x44\x6f\143\x74\157\162\x27\x2c\x20\77\x29"; $this->db->query($sql, array($strDoctorName, (int) $strAccountID)); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/DownloadingChartThumbnailFilePathHandler.php b/server/original/www/ezwebserver/src/application/models/DownloadingChartThumbnailFilePathHandler.php index b91b8b0..483d7d4 100644 --- a/server/original/www/ezwebserver/src/application/models/DownloadingChartThumbnailFilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/DownloadingChartThumbnailFilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { $fileAbsFilePath = $this->_properties["\x6d\157\x64\x65\x6c"]->getAbsFilePathByType($fileType, combineFilePath(array($fileName))); if (file_exists($fileAbsFilePath) === FALSE) { vt_loge("\104\x6f\167\156\154\x6f\x61\x64\151\156\147\x43\150\141\162\164\124\x68\165\x6d\x62\156\x61\151\x6c\106\x69\x6c\145\x50\141\164\150\110\x61\x6e\x64\154\145\162\x2e\40" . "\x46\x69\x6c\145\x20\x6e\157\x20\x65\170\151\163\x74\56"); return VERR_COMMON_INVALID; } else { return $fileAbsFilePath; } } } diff --git a/server/original/www/ezwebserver/src/application/models/DownloadingDefaultFilePathHandler.php b/server/original/www/ezwebserver/src/application/models/DownloadingDefaultFilePathHandler.php index 650cc74..9538549 100644 --- a/server/original/www/ezwebserver/src/application/models/DownloadingDefaultFilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/DownloadingDefaultFilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { if (!$this->IsMulifileTransferSupportedSysType($fileType)) { vt_loge("\x44\157\167\x6e\154\157\141\144\x69\156\147\104\x65\x66\141\165\154\x74\106\x69\154\x65\120\x61\164\x68\x48\141\156\x64\154\x65\x72\x2e\x20" . "\125\x6e\x73\x75\x70\160\157\x72\164\x65\x64\40\164\171\160\x65\x2e"); return VERR_COMMON_INVALID; } $fileAbsFilePath = $this->_properties["\x6d\x6f\144\145\154"]->getSysFilePathByType($fileType, combineFilePath(array($fileName))); $this->_properties["\155\157\x64\145\154"]->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath) === FALSE) { if ($fileType === "\125\x54\x48") { $fileAbsFilePath = $this->_properties["\x6d\x6f\x64\x65\154"]->getSysFilePathByType("\x53\124\110", combineFilePath(array($fileName))); $this->_properties["\x6d\x6f\x64\x65\x6c"]->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath) === FALSE) { vt_loge("\x44\x6f\167\156\x6c\157\x61\x64\151\x6e\x67\104\x65\146\141\x75\154\164\x46\151\154\x65\120\x61\164\150\110\x61\156\144\154\x65\162\x2e\x20" . "\106\151\x6c\145\40\x6e\157\40\x65\170\x69\163\164\56"); return VERR_COMMON_INVALID; } else { return $fileAbsFilePath; } } else { vt_loge("\x44\157\167\156\x6c\x6f\x61\144\151\x6e\x67\x44\145\146\x61\165\154\164\106\x69\154\145\120\x61\164\x68\110\x61\156\x64\x6c\x65\x72\56\x20" . "\106\x69\154\145\x20\156\x6f\40\x65\170\x69\x73\164\56"); return VERR_COMMON_INVALID; } } else { return $fileAbsFilePath; } } private function IsLayoutFileType($fileType) { switch ($fileType) { case "\x4c\x41\103": case "\x4c\126\105": case "\114\103\x53": case "\114\x47\131": case "\114\x52\124": case "\114\101\x4e": case "\x4c\103\x54": return true; } return false; } private function IsLayoutThumbnailType($fileType) { switch ($fileType) { case "\114\x54\101": case "\114\x54\x56": case "\114\124\103": case "\x4c\124\107": case "\x4c\x54\122": case "\x4c\x54\x4e": case "\114\x54\120": case "\114\x54\117": return true; } return false; } private function CheckTypeAndNumberForFmx($type, $number) { switch ($type) { case "\101": case "\x56": case "\x43": case "\107": case "\x52": case "\116": case "\120": break; default: return false; } switch ($number) { case "\61": case "\x32": case "\x33": case "\64": case "\x35": case "\66": case "\67": case "\70": case "\x39": break; default: return false; } return true; } private function IsFmxLayoutFileType($fileType) { $fileTypeArray = str_split($fileType); $fileTypeHeader = $fileTypeArray[0]; $fileTypeKind = $fileTypeArray[1]; $fileTypeNumber = $fileTypeArray[2]; switch ($fileTypeHeader) { case "\123": case "\x43": case "\111": break; default: return false; } return $this->CheckTypeAndNumberForFmx($fileTypeKind, $fileTypeNumber); } private function IsFmxLayoutThumbnailType($fileType) { switch ($fileType) { case "\123\x46\130": case "\103\106\130": return true; } $fileTypeArray = str_split($fileType); $fileTypeHeader = $fileTypeArray[0]; $fileTypeKind = $fileTypeArray[1]; $fileTypeNumber = $fileTypeArray[2]; switch ($fileTypeHeader) { case "\124": case "\110": case "\x55": break; default: return false; } return $this->CheckTypeAndNumberForFmx($fileTypeKind, $fileTypeNumber); } private function IsSamplecaseThumbnailType($fileType) { switch ($fileType) { case "\x53\124\110": case "\125\124\110": return true; } return false; } private function IsMulifileTransferSupportedSysType($fileType) { return $this->IsSamplecaseThumbnailType($fileType) || $this->IsLayoutFileType($fileType) || $this->IsLayoutThumbnailType($fileType) || $this->IsFmxLayoutFileType($fileType) || $this->IsFmxLayoutThumbnailType($fileType); } } diff --git a/server/original/www/ezwebserver/src/application/models/DownloadingE3FilePathHandler.php b/server/original/www/ezwebserver/src/application/models/DownloadingE3FilePathHandler.php index 3e61946..7019a85 100644 --- a/server/original/www/ezwebserver/src/application/models/DownloadingE3FilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/DownloadingE3FilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { $fileAbsFilePath = $this->_properties["\x6d\157\144\145\x6c"]->getSysFilePathByType(FILETYPE_E3FILE, urldecode($fileName)); $this->_properties["\155\x6f\144\x65\x6c"]->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath) === FALSE) { vt_loge("\104\157\167\156\x6c\157\141\144\x69\x6e\147\x45\63\106\x69\x6c\145\x50\x61\x74\x68\110\141\156\144\154\x65\162\56\x20" . "\x46\x69\x6c\x65\40\156\x6f\x20\145\170\151\x73\x74\56"); return VERR_COMMON_INVALID; } else { return $fileAbsFilePath; } } } diff --git a/server/original/www/ezwebserver/src/application/models/DownloadingImageThumbnailFilePathHandler.php b/server/original/www/ezwebserver/src/application/models/DownloadingImageThumbnailFilePathHandler.php index 59541d9..82b984f 100644 --- a/server/original/www/ezwebserver/src/application/models/DownloadingImageThumbnailFilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/DownloadingImageThumbnailFilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { $fileAbsFilePath = $this->_properties["\155\157\144\x65\x6c"]->getAbsFilePathByType($fileType, combineFilePath(array($fileName))); $this->_properties["\x6d\157\x64\x65\154"]->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath) === FALSE) { $ret = $this->_properties["\x6d\x6f\x64\x65\x6c"]->makeThumbnailFile($fileAbsFilePath, combineFilePath(array($fileName))); if ($ret != VSUCCESS) { vt_loge("\x44\157\167\x6e\x6c\x6f\x61\144\151\x6e\147\111\x6d\141\147\145\x54\x68\165\x6d\142\x6e\x61\x69\154\106\151\x6c\x65\x50\x61\164\x68\110\141\156\144\154\x65\162\x2e\40" . "\x46\x69\154\145\40\x6e\157\40\x65\170\x69\163\x74\56"); return VERR_COMMON_INVALID; } else { return $ret; } } else { return $fileAbsFilePath; } } } diff --git a/server/original/www/ezwebserver/src/application/models/DownloadingReportThumbnailFilePathHandler.php b/server/original/www/ezwebserver/src/application/models/DownloadingReportThumbnailFilePathHandler.php index d2dadbd..77ad36b 100644 --- a/server/original/www/ezwebserver/src/application/models/DownloadingReportThumbnailFilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/DownloadingReportThumbnailFilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { $fileAbsFilePath = $this->_properties["\x6d\x6f\144\x65\154"]->getAbsFilePathByType($fileType, combineFilePath(array($fileName))); $this->_properties["\x6d\x6f\x64\x65\x6c"]->checkMultiDrive($fileAbsFilePath); if (file_exists($fileAbsFilePath) === FALSE) { vt_loge("\x44\157\x77\x6e\x6c\x6f\141\144\x69\x6e\x67\x52\x65\160\x6f\162\164\x54\x68\x75\x6d\142\x6e\141\151\154\x46\x69\x6c\x65\120\141\164\x68\110\x61\156\144\x6c\x65\162\x2e\40" . "\106\151\154\x65\40\x6e\x6f\40\x65\x78\151\x73\164\56"); return VERR_COMMON_INVALID; } else { return $fileAbsFilePath; } } } diff --git a/server/original/www/ezwebserver/src/application/models/E2DB_model.php b/server/original/www/ezwebserver/src/application/models/E2DB_model.php index 55f9530..298f6e0 100644 --- a/server/original/www/ezwebserver/src/application/models/E2DB_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2DB_model.php @@ -1,7 +1,7 @@ db->query($sql, array("\160\165\142\x6c\x69\x63", "\x6e\145\167\x5f\144\x62\137\166\145\x72\x73\151\157\156"))->result_array()[0]["\143\157\x75\156\164"]; } public function get_E2DBForVersion_New_Version() { $sql = "\x73\145\x6c\x65\x63\x74\40\x2a\40\146\162\x6f\155\40\x6e\145\167\x5f\x64\142\137\166\145\x72\x73\151\157\156\x20\157\162\144\x65\x72\40\x62\x79\x20\x76\145\x72\137\x69\144\40\144\145\163\143"; return $this->db->query($sql)->result_array(); } public function get_E2DBForConnection() { return $this->db->query("\123\x45\114\105\x43\x54\x20\164\162\165\145\40\x41\123\40\162\145\163\x75\154\x74")->result_array()[0]["\162\145\x73\x75\x6c\x74"]; } } diff --git a/server/original/www/ezwebserver/src/application/models/E2DataGroupDB_model.php b/server/original/www/ezwebserver/src/application/models/E2DataGroupDB_model.php index fe7d119..98129fe 100644 --- a/server/original/www/ezwebserver/src/application/models/E2DataGroupDB_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2DataGroupDB_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strChartNo))->result_array(); if (count($query) > 0) { $nPatID = $query[0]["\160\x61\164\137\x69\144"]; if (isset($dataGroupInfo["\x64\x74\x43\x72\x65\x61\164\x65\104\141\164\145\124\151\x6d\145"]) && !empty($dataGroupInfo["\144\164\103\162\x65\141\x74\145\104\x61\x74\145\x54\x69\x6d\145"])) { $dtCreateDateTime = $dataGroupInfo["\144\164\103\x72\145\x61\164\x65\104\x61\x74\145\124\151\155\145"]; } else { $dtCreateDateTime = date("\171\55\155\x2d\144"); } if (isset($dataGroupInfo["\163\x74\x72\104\141\164\x61\x47\x72\x6f\x75\x70\x4e\x61\155\145"]) && !empty($dataGroupInfo["\163\x74\162\104\141\164\141\x47\162\157\165\x70\x4e\141\x6d\x65"])) { $strGroupname = $dataGroupInfo["\163\x74\162\x44\x61\x74\x61\107\162\x6f\165\160\116\141\155\145"]; } else { $strGroupname = "\x44\x61\x74\x61\x47\162\x6f\165\x70\137" . currentDateFormat(DATEFORMAT_MAKE_GROUP_NAME, $dtCreateDateTime) . "\137"; } $strDataGroupCreatedDateTime = currentDateFormat(DATEFORMAT_DATABASE, $dtCreateDateTime); $sql = "\x49\116\123\x45\x52\124\x20\111\116\124\x4f\40\105\62\x5f\104\x41\124\101\137\107\122\117\125\x50\50\107\x52\x4f\x55\120\x5f\116\101\x4d\x45\x2c\x20\107\122\117\125\x50\137\x43\122\x45\x54\x5f\x44\x41\x54\105\54\40\x50\x41\124\137\x49\x44\54\x20\107\122\x4f\125\120\x5f\x41\125\x54\x4f\137\x43\122\x45\x41\124\105\x44\51\x20" . "\x56\x41\114\x55\x45\x53\x20\x28\77\x7c\x7c\124\117\x5f\x43\110\101\122\50\50\123\x45\114\x45\x43\x54\x20\50\x43\x4f\125\116\x54\50\52\51\x2b\x31\x29\x20\x46\122\117\115\x20\x45\62\137\x44\x41\x54\x41\x5f\x47\x52\117\x55\120\40\127\x48\x45\122\105\x20\107\122\117\x55\x50\x5f\103\122\x45\x54\x5f\x44\101\124\105\75\x3f\x29\54\47\x46\115\x39\71\47\51\54\x20\77\x2c\40\77\54\40\x3f\51\40\x52\105\x54\x55\122\116\x49\116\x47\40\107\122\117\x55\120\x5f\x4e\x41\x4d\105"; $this->db->query($sql, array($strGroupname, $strDataGroupCreatedDateTime, $strDataGroupCreatedDateTime, $nPatID, $dataGroupInfo["\142\x41\x75\164\x6f\103\162\145\x61\164\x65\x64"])); $answer = $this->db->affected_rows(); $insertedId = $this->db->insert_id(); $sql = "\123\x45\x4c\105\x43\124\x20\107\122\x4f\125\x50\x5f\116\101\x4d\105\40\106\122\x4f\115\x20\105\62\137\104\101\x54\x41\137\107\x52\x4f\125\120\x20\x57\x48\x45\122\105\40\x47\122\x4f\x55\x50\137\111\x44\40\75\40\77"; $query = $this->db->query($sql, array($insertedId))->row(); $groupname = $query->group_name; return $answer; } else { return VERR_DB_NOSUCHDATA; } } public function get_E2DataGroupsByCTFileandStudyUID($strCtFileName, $strStudyInstanceUID) { $this->db->join("\145\x32\x5f\x69\155\x67", "\145\62\x5f\x64\x61\164\x61\137\147\x72\157\x75\160\x5f\x69\x6d\147\56\151\155\x67\137\x69\144\40\x3d\40\x65\x32\x5f\151\x6d\147\x2e\x69\155\147\x5f\x69\x64"); if (empty($strCtFileName) === FALSE) { $this->db->where("\151\x6d\x67\137\146\151\x6c\145\x6e\x61\x6d\x65", $strCtFileName); $this->db->where("\x67\162\x6f\x75\160\x5f\x69\x6d\x67\137\141\x75\x74\157\x5f\162\x65\x67", "\164\162\165\x65", FALSE); } else { $this->db->where("\x69\x6d\147\137\x73\x74\x75\x64\171\137\x69\x6e\163\x74\x61\x6e\143\145\137\165\151\144", $strStudyInstanceUID); } $this->db->where("\x69\155\x67\137\x6d\x6f\x64\141\154\x69\x74\x79", modality_api_str_to_modality_db_str("\145\x43\x54")); $this->db->where("\145\62\137\144\141\164\141\137\x67\162\x6f\x75\x70\56\147\x72\x6f\x75\x70\x5f\x69\x64", "\x65\x32\137\144\141\x74\141\x5f\147\x72\x6f\165\x70\x5f\x69\155\147\56\x67\162\157\x75\160\137\151\144", FALSE); $sub_query = $this->db->get_compiled_select("\x65\62\137\x64\141\164\x61\x5f\147\x72\x6f\x75\160\137\x69\x6d\x67"); $this->db->select("\145\62\137\144\141\x74\141\x5f\147\162\x6f\165\160\x2e\x67\x72\x6f\165\x70\137\x6e\141\x6d\x65\54\x65\x32\137\x64\141\x74\141\x5f\147\162\157\x75\160\x2e\x67\162\157\165\x70\137\x63\162\x65\164\137\144\141\164\x65\54\x65\x32\x5f\144\141\x74\141\137\x67\162\157\165\x70\x2e\x67\x72\x6f\165\160\x5f\141\x75\164\157\x5f\143\x72\145\141\164\x65\x64"); $this->db->where("\145\170\151\163\x74\163\x28{$sub_query}\x29", NULL, FALSE); $this->db->order_by("\x65\x32\137\x64\141\x74\x61\137\x67\162\x6f\x75\160\x2e\147\x72\x6f\x75\x70\137\x63\x72\145\x74\137\144\141\164\x65", "\144\145\x73\143"); $this->db->limit(1); return $this->db->get("\x65\62\x5f\144\141\x74\141\x5f\x67\162\x6f\x75\x70")->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/E2DataGroups_model.php b/server/original/www/ezwebserver/src/application/models/E2DataGroups_model.php index bda8ad1..35438b8 100644 --- a/server/original/www/ezwebserver/src/application/models/E2DataGroups_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2DataGroups_model.php @@ -1,7 +1,7 @@ db->query($sql, $strDataGroupName)->result_array(); } public function delete_E2DataGroupsByName($strDataGroupName) { $nDataGroup = 0; $sql = "\x53\105\x4c\105\103\124\x20\107\x52\117\x55\120\137\x49\104\x20\x46\122\117\115\40\105\x32\137\x44\101\x54\101\x5f\x47\x52\x4f\125\120\40\127\x48\x45\122\x45\x20\107\x52\117\x55\x50\137\x4e\x41\x4d\x45\40\x3d\x20\x3f"; $query = $this->db->query($sql, $strDataGroupName)->result_array(); if (count($query) > 0) { $nDataGroup = $query[0]["\147\162\x6f\165\160\137\151\x64"]; if ($nDataGroup != 0) { $sql = "\104\105\x4c\x45\124\x45\40\x46\x52\117\115\x20\105\x32\x5f\104\x41\x54\101\137\x47\122\x4f\125\120\137\111\115\107\x20\127\x48\x45\122\105\x20\107\122\117\125\120\x5f\111\x44\40\75\40\77\x3b" . "\40\x44\105\114\x45\124\105\40\106\x52\x4f\115\40\x45\x32\137\x44\101\124\x41\x5f\107\x52\x4f\x55\120\40\x57\x48\x45\122\105\x20\107\122\x4f\x55\120\x5f\x49\x44\x20\75\40\77"; $this->db->query($sql, array($nDataGroup, $nDataGroup)); return $this->db->affected_rows(); } else { return $nDataGroup; } } else { return VERR_DB_NOSUCHDATA; } } public function get_E2DataGroupsByChartNo($strChartNo) { $sql = "\x53\105\x4c\x45\103\x54\40\x44\x49\123\124\x49\116\103\x54\40\x67\162\x6f\165\x70\137\156\141\x6d\x65\54\40\147\x72\157\165\160\137\x63\162\x65\164\137\x64\141\x74\145\54\x67\162\x6f\x75\x70\x5f\x61\x75\x74\157\137\143\162\145\x61\x74\x65\144\40" . "\x46\122\117\x4d\x20\x28\123\x45\114\x45\103\x54\x20\147\162\157\x75\x70\x5f\156\141\x6d\145\54\40\147\162\157\x75\160\x5f\x63\x72\145\164\x5f\x64\141\x74\145\x2c\x67\162\x6f\x75\160\x5f\x61\165\164\157\x5f\143\162\x65\141\164\x65\144\40" . "\106\122\117\115\x20\x28\123\x45\x4c\x45\x43\124\40\x61\x61\x2e\x2a\x2c\162\141\156\153\50\51\x20\157\166\145\x72\40\50\40\x70\141\x72\x74\151\164\x69\157\156\40\x62\171\x20\151\155\147\137\x69\144\11\x6f\x72\x64\145\x72\40\142\x79\40\147\162\x6f\165\x70\137\143\162\145\x74\137\144\x61\x74\145\x20\144\x65\x73\x63\x29\40" . "\106\x52\117\115\x20\50\x53\105\114\x45\x43\124\x20\x65\x32\x64\147\56\147\x72\x6f\x75\x70\x5f\x69\x64\54\x20\x67\x72\x6f\x75\x70\137\156\x61\155\x65\x2c\40\147\162\x6f\165\160\137\143\x72\145\164\x5f\144\x61\164\145\x2c\x67\x72\x6f\165\160\x5f\x61\x75\164\x6f\137\x63\162\x65\x61\164\145\x64\x2c\151\x6d\x67\137\x69\x64\x20" . "\106\122\x4f\115\x20\x45\62\137\104\101\x54\x41\137\107\x52\x4f\x55\120\40\x65\x32\144\x67\x20\x20\x6a\x6f\x69\x6e\x20\145\62\137\144\x61\164\141\137\x67\162\157\165\x70\x5f\x69\155\x67\40\x65\x32\144\x67\x69\x6d\x67\40\x6f\156\x20\145\x32\x64\x67\56\147\x72\x6f\165\x70\137\151\144\x20\75\40\x65\62\x64\x67\151\155\x67\x2e\147\x72\157\165\160\x5f\x69\x64\40" . "\x57\110\x45\122\105\40\x45\130\111\x53\x54\x53\40\x28\x53\x45\x4c\x45\x43\x54\40\52\40\x46\x52\117\115\x20\x45\x32\137\120\101\124\40\x65\62\x70\141\x74\x20\127\110\105\122\105\x20\120\101\x54\137\x43\110\101\x52\124\116\117\x20\x3d\x3f\40\x41\x4e\x44\40\x65\62\x70\x61\x74\x2e\120\101\124\137\x49\104\40\75\40\x65\x32\x64\147\56\120\101\x54\137\x49\104\x29\x20" . "\x41\x4e\x44\x20\x67\x72\157\165\160\x5f\x69\x6d\x67\137\x6d\157\x64\x61\154\151\164\171\40\x3d\40\47\x43\x54\47\x20\x41\116\104\40\147\162\157\x75\160\137\x69\155\x67\x5f\141\165\x74\157\x5f\x72\145\x67\x20\75\x20\x54\x52\125\x45\x29\x20\141\x61\x29\x20\x69\164\145\x6d\163\40\x57\x48\x45\122\105\40\151\x74\145\x6d\163\56\x72\141\156\153\x20\x3d\40\61\x20" . "\125\116\x49\x4f\x4e\x20\x41\x4c\114\40" . "\123\105\114\x45\103\x54\40\147\x72\x6f\165\160\137\156\141\x6d\145\x2c\x20\x67\162\157\x75\x70\137\x63\162\x65\x74\137\x64\141\x74\x65\x2c\x67\x72\x6f\165\160\137\x61\x75\x74\x6f\137\143\162\x65\141\x74\x65\144\x20" . "\106\122\117\115\x20\x45\62\137\104\x41\x54\x41\137\107\122\x4f\125\120\x20\145\x32\144\x67\x20\40\152\157\x69\x6e\40\145\62\137\144\141\164\x61\x5f\147\x72\x6f\165\x70\137\151\x6d\x67\x20\x65\62\x64\147\x69\x6d\x67\40\x6f\156\x20\145\x32\x64\147\x2e\x67\x72\x6f\x75\x70\x5f\x69\144\40\75\x20\145\62\x64\147\x69\155\x67\x2e\147\x72\157\165\160\137\151\x64\x20" . "\x57\x48\x45\x52\x45\x20\105\130\x49\x53\124\x53\40\x28\123\x45\114\x45\x43\124\x20\x2a\x20\106\122\x4f\115\x20\x45\62\x5f\x50\x41\124\40\x65\x32\160\141\164\40\127\x48\x45\x52\105\40\x50\x41\124\137\103\x48\101\122\x54\116\117\x20\x3d\x3f\40\x41\116\104\x20\x65\x32\160\x61\x74\56\120\101\x54\137\111\x44\40\x3d\x20\x65\x32\x64\147\56\120\101\124\137\x49\x44\51\40" . "\x41\116\104\x20\x28\x67\162\157\165\x70\x5f\151\x6d\x67\137\x6d\x6f\x64\x61\x6c\151\x74\x79\x20\74\76\40\47\x43\124\x27\x20\117\122\x20\x67\x72\157\x75\160\137\151\155\147\x5f\x61\165\164\x6f\x5f\162\x65\x67\x20\75\40\106\101\x4c\123\x45\x29\x29\x20\141\163\x20\x64\141\x74\x61\x5f\147\162\157\165\160\x73\40\x6f\162\144\x65\x72\x20\142\171\x20\x67\162\157\x75\160\x5f\143\162\145\164\x5f\144\141\x74\x65\x20\x64\145\x73\143"; return $this->db->query($sql, array($strChartNo, $strChartNo))->result_array(); } public function post_E2DataGroupsByChartNo($strChartNo, $dataGroupInfo) { $sql = "\123\105\114\x45\x43\x54\x20\120\x41\x54\x5f\111\104\x20\x46\x52\117\115\40\x45\62\x5f\x50\101\124\x20\x57\110\x45\122\x45\40\120\101\x54\137\103\x48\101\122\x54\116\x4f\x20\x3d\x20\77"; $query = $this->db->query($sql, array($strChartNo))->result_array(); if (count($query) > 0) { $nPatID = $query[0]["\160\x61\x74\137\151\144"]; if (isset($dataGroupInfo["\x64\x74\103\x72\x65\141\x74\145\x44\141\x74\145\x54\151\155\145"]) && !empty($dataGroupInfo["\144\x74\x43\x72\145\x61\164\x65\x44\x61\164\x65\124\151\155\x65"])) { $dtCreateDateTime = $dataGroupInfo["\144\164\103\x72\145\x61\x74\x65\x44\141\x74\x65\124\151\x6d\145"]; } else { $dtCreateDateTime = currentDateFormat(DATEFORMAT_DATABASE); } $bAutoCreated = $dataGroupInfo["\x62\x41\x75\x74\157\103\x72\145\x61\x74\x65\144"]; if (isset($dataGroupInfo["\163\164\162\x44\x61\164\141\107\162\157\x75\160\116\141\x6d\145"]) && !empty($dataGroupInfo["\x73\164\162\x44\x61\164\x61\107\162\157\165\x70\x4e\x61\x6d\x65"])) { $strGroupname = $dataGroupInfo["\163\164\x72\x44\x61\x74\x61\x47\162\x6f\x75\160\116\141\155\145"]; } else { $strGroupname = "\104\x61\164\141\x47\162\x6f\165\160\x5f" . currentDateFormat(DATEFORMAT_MAKE_GROUP_NAME, $dtCreateDateTime) . "\137"; } $strDataGroupCreatedDateTime = currentDateFormat(DATEFORMAT_DATABASE, $dtCreateDateTime); $sql = "\x49\116\123\105\x52\124\x20\x49\116\x54\117\x20\x45\62\x5f\x44\101\124\101\x5f\107\x52\117\125\120\50\107\122\x4f\125\x50\137\x4e\x41\115\105\54\40\107\122\x4f\125\120\137\x43\122\105\124\137\x44\101\x54\105\54\40\x50\x41\124\137\111\104\54\x20\x47\122\x4f\x55\120\137\101\125\x54\x4f\x5f\103\122\105\101\x54\x45\104\51\40" . "\126\101\114\125\x45\123\40\x28\77\x7c\x7c\x54\117\x5f\103\x48\101\122\50\50\123\105\x4c\105\x43\x54\x20\50\x43\117\125\116\124\50\52\x29\x2b\61\51\40\106\x52\x4f\x4d\40\105\62\137\x44\x41\x54\101\137\107\x52\117\x55\x50\40\127\x48\105\x52\x45\40\x47\122\117\x55\x50\137\x43\x52\x45\x54\137\x44\x41\124\105\75\77\51\54\47\x46\x4d\x39\x39\47\x29\54\x20\77\x2c\x20\x3f\x2c\40\x3f\x29\x20\122\x45\x54\125\122\x4e\111\x4e\x47\x20\107\x52\x4f\125\x50\x5f\x4e\101\115\105"; $sqlDataArray = array($strGroupname, $strDataGroupCreatedDateTime, $strDataGroupCreatedDateTime, $nPatID, $bAutoCreated); $result = $this->db->query($sql, $sqlDataArray)->result_array(); if (count($result) === 1) { return array("\145\x72\x72\157\x72\x43\157\144\x65" => VERR_COMMON_SUCCESS, "\x73\164\162\107\162\x6f\165\x70\x44\x61\x74\x61\116\141\155\x65" => $result[0]["\x67\162\157\165\x70\137\x6e\x61\x6d\x65"]); } return array("\x65\162\162\157\162\x43\x6f\144\145" => VERR_DB_ERROR); } else { return array("\145\x72\162\x6f\x72\x43\x6f\144\145" => VERR_DB_NOSUCHDATA); } } public function put_E2DataGroupsByChartNo($strChartNo, $strDataGroupName) { $sql = "\x53\x45\x4c\x45\103\x54\40\x50\x41\x54\137\111\x44\x20\x46\122\117\x4d\x20\x45\62\137\x50\101\124\x20\127\x48\x45\122\x45\40\x50\x41\124\x5f\x43\110\x41\122\x54\x4e\117\x20\75\x20\77"; $query = $this->db->query($sql, array($strChartNo))->result_array(); if (count($query) > 0) { $nPatID = $query[0]["\160\141\164\137\x69\x64"]; $sql = "\125\x50\104\x41\x54\x45\x20\x45\62\x5f\x44\x41\x54\x41\x5f\x47\x52\117\x55\x50\40\x53\x45\124\40\120\101\x54\x5f\x49\x44\x20\75\x20\77\x20\127\110\x45\x52\x45\40\107\x52\117\125\120\137\116\x41\x4d\x45\x20\x3d\x20\x3f"; $this->db->query($sql, array($nPatID, $strDataGroupName)); return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } public function get_E2DataGroups() { $sql = "\x53\105\x4c\105\x43\124\40\x2a\x20\106\x52\x4f\115\40\x45\x32\137\x44\101\x54\x41\137\107\122\x4f\125\x50"; return $this->db->query($sql)->result_array(); } public function ProcessToMakeGroupData($savingImageInfo) { load_model($this, "\111\155\x61\147\145\163\137\x6d\x6f\x64\x65\x6c"); load_model($this, "\104\x61\164\141\107\162\157\165\160\x49\x6d\141\x67\145\163\137\x6d\157\x64\x65\154"); switch ($savingImageInfo["\x69\155\x67\x5f\x6d\157\144\141\154\x69\164\x79"]) { case "\x43\124": load_model($this, "\x45\62\104\141\x74\x61\x47\x72\157\x75\x70\104\102\137\x6d\157\x64\x65\154"); $groupName = ''; $savingImageInfo["\x62\101\x75\x74\x6f\103\162\145\x61\x74\x65\144"] = true; $savedGroupCount = $this->E2DataGroupDB_model->post_E2DataGroupsByChartNo_GetGroupName($savingImageInfo["\160\141\164\137\143\x68\x61\x72\x74\156\157"], $savingImageInfo, $groupName); if ($savedGroupCount > 0) { $dataGroupImageInfo = $this->MakeDataGroupImageInfoFromImageInfo($savingImageInfo, $groupName); $dataGroupImageInfo["\156\x47\x72\157\165\160\111\155\x61\x67\x65\111\104"] = $this->DataGroupImages_model->post_DataGroupImages($dataGroupImageInfo); if ($dataGroupImageInfo["\x6e\x47\x72\x6f\x75\160\111\155\141\147\145\x49\104"] > 0) { $images = $this->Images_model->get_ImagesByStudyUID($savingImageInfo["\151\155\x67\x5f\x73\x74\165\144\x79\137\x69\x6e\163\164\x61\x6e\x63\145\137\165\x69\144"]); if (count($images) > 0) { foreach ($images as $image) { if ($image["\x70\141\164\137\x63\x68\141\x72\164\x6e\x6f"] === $savingImageInfo["\x70\x61\x74\137\x63\x68\x61\x72\x74\156\157"] && in_array($image["\x69\155\147\x5f\155\x6f\x64\141\154\151\x74\x79"], ["\x50\141\x6e\157\162\x61\x6d\x61", "\103\145\160\150\141\x6c\157"])) { $dataGroupImageInfo = $this->MakeDataGroupImageInfoFromImageInfo($image, $groupName); $this->DataGroupImages_model->post_DataGroupImages($dataGroupImageInfo); } } } return true; } } return false; case "\x50\x61\156\x6f\162\141\155\141": case "\x43\x65\160\150\141\154\x6f": if (isset($savingImageInfo["\151\x6d\x67\137\x73\164\165\144\x79\x5f\151\x6e\163\164\141\156\143\x65\x5f\x75\x69\x64"]) && !empty($savingImageInfo["\x69\x6d\x67\137\163\x74\165\x64\171\x5f\x69\156\163\x74\141\156\x63\145\137\165\151\x64"])) { $images = $this->Images_model->get_ImagesByStudyUID($savingImageInfo["\x69\155\147\x5f\163\x74\x75\x64\171\x5f\x69\x6e\x73\164\141\x6e\x63\x65\137\x75\x69\144"]); if (count($images) > 0) { foreach ($images as $image) { if ($image["\x69\155\147\x5f\155\157\144\141\x6c\x69\x74\171"] === "\103\124") { return $this->add_image_to_datagroup_by_ct_filename($savingImageInfo, $image["\151\155\147\137\146\x69\154\145\x6e\x61\155\145"]); } } } else { return false; } return true; } else { vt_loge(sprintf("\45\x73\x3a\40\x6e\x6f\40\163\164\x75\144\x79\40\151\156\163\164\x61\x6e\x63\145\40\165\x69\144\x20\x66\x6f\x75\156\x64\x3a\40\151\x6d\x61\147\145\75\x25\x73", __METHOD__, json_encode($savingImageInfo))); } return false; default: } return true; } private function add_image_to_datagroup_by_ct_filename($image, $ct_filename) { $ret = $this->get_E2DataGroupsByCTFileOrStudyUID(["\x6e\x61\x6d\x65" => "\x63\164\146\x69\154\145", "\x63\x74\146\151\x6c\145\157\x72\163\164\x75\x64\x79\x75\151\144" => $ct_filename]); if ($ret["\x65\162\162\x6f\162\x43\157\144\145"] == VERR_COMMON_SUCCESS) { $groupName = $ret["\145\x32\x44\141\x74\x61\x47\x72\157\x75\160\x49\156\x66\x6f"]->strDataGroupName; $dataGroupImageInfo = $this->MakeDataGroupImageInfoFromImageInfo($image, $groupName); return $this->DataGroupImages_model->post_DataGroupImages($dataGroupImageInfo); } else { vt_loge(sprintf("\x25\x73\x3a\40\156\157\40\x64\x61\164\x61\x67\x72\x6f\x75\160\x20\146\x6f\165\x6e\x64\72\40\143\x74\146\151\x6c\145\x3d\x5b\45\x73\135", __METHOD__, $ct_filename)); } return false; } private function MakeDataGroupImageInfoFromImageInfo($savingImageInfo, $groupName) { $sDataGroupImageInfo["\x64\164\x49\155\x61\147\145\122\145\147\104\141\x74\x65\x54\x69\155\x65"] = $savingImageInfo["\151\x6d\147\x5f\165\x70\x64\x61\x74\x65\137\x64\141\164\145\164\x69\x6d\145"]; $sDataGroupImageInfo["\x65\111\155\141\147\x65\115\157\x64\141\x6c\151\164\171"] = dbModalityStringToEmodality($savingImageInfo["\x69\155\147\x5f\155\x6f\x64\141\x6c\x69\164\x79"]); $sDataGroupImageInfo["\163\164\x72\104\141\164\141\x47\x72\x6f\x75\x70\116\x61\155\145"] = $groupName; $sDataGroupImageInfo["\163\164\162\x49\x6d\141\147\x65\x46\151\x6c\145\x4e\x61\x6d\x65"] = $savingImageInfo["\151\155\147\x5f\146\x69\154\x65\x6e\x61\155\x65"]; $sDataGroupImageInfo["\x73\164\162\111\155\x61\147\145\115\157\144\x65"] = $savingImageInfo["\151\155\x67\x5f\155\157\144\145"]; $sDataGroupImageInfo["\163\x74\x72\103\150\141\162\164\x4e\157"] = $savingImageInfo["\x70\141\x74\x5f\x63\150\141\162\x74\x6e\157"]; $sDataGroupImageInfo["\142\x49\155\x61\147\x65\101\165\164\157\122\x65\x67\x69\163\x74\x65\162\x65\144"] = true; return $sDataGroupImageInfo; } public function MakeE2TypeGroupingDataAutoAdd($chartNo, $fileName, $studyInstanceUID, $acqMode, $saveFileName = '') { load_model($this, "\x49\x6d\x61\x67\x65\x73\x5f\x6d\x6f\144\145\x6c"); load_model($this, "\x44\141\164\x61\x47\x72\157\x75\160\111\155\141\x67\x65\x73\137\x6d\x6f\144\145\154"); load_model($this, "\x45\62\x44\x61\164\x61\107\x72\157\x75\x70\x44\x42\x5f\155\157\x64\x65\x6c"); $ret = $this->E2DataGroupDB_model->get_E2DataGroupsByCTFileandStudyUID($fileName, $studyInstanceUID); if (count($ret) > 0) { $dataGroupImageInfo = array(); $dataGroupImageInfo["\x6e\x47\x72\x6f\x75\x70\111\x6d\141\x67\x65\111\104"] = 0; $dataGroupImageInfo["\163\164\x72\x44\141\164\141\x47\162\157\x75\x70\x4e\141\x6d\x65"] = $ret[0]["\147\x72\157\x75\160\137\x6e\x61\x6d\x65"]; $dataGroupImageInfo["\145\111\155\x61\147\x65\x4d\157\144\x61\154\x69\164\x79"] = ''; $dataGroupImageInfo["\163\164\162\x49\x6d\141\147\x65\x4d\157\x64\145"] = $acqMode; $dataGroupImageInfo["\x73\x74\x72\111\x6d\141\147\145\x46\x69\154\145\x4e\x61\x6d\x65"] = $saveFileName; $dataGroupImageInfo["\142\111\x6d\141\x67\x65\x41\x75\164\x6f\122\x65\147\151\163\x74\x65\162\x65\x64"] = true; return $this->DataGroupImages_model->post_DataGroupImages($dataGroupImageInfo); } else { $retImageInfos = $this->Images_model->get_ImagesByStudyUID($studyInstanceUID); if (count($retImageInfos) > 0) { $dataGroupInfo["\163\164\x72\104\141\x74\141\x47\x72\157\x75\x70\x4e\x61\155\145"] = ''; $dataGroupInfo["\144\164\x43\162\x65\x61\x74\145\104\x61\164\x65\124\x69\155\x65"] = ''; $dataGroupInfo["\142\101\x75\164\157\x43\x72\x65\x61\164\145\x64"] = true; $groupName = ''; $retAddE2Group = $this->E2DataGroupDB_model->post_E2DataGroupsByChartNo_GetGroupName($chartNo, $dataGroupInfo, $groupName); if ($retAddE2Group != false) { foreach ($retImageInfos as $imageInfo) { $imageDataGroupImageInfo = array(); $imageDataGroupImageInfo["\x6e\107\162\157\165\160\111\x6d\x61\x67\145\111\104"] = 0; $imageDataGroupImageInfo["\163\164\x72\x44\x61\164\x61\x47\162\157\x75\160\x4e\141\x6d\145"] = $groupName; $imageDataGroupImageInfo["\x65\x49\x6d\x61\x67\x65\115\x6f\144\141\154\151\x74\171"] = showDBModalityStringToEmodality($imageInfo["\151\155\x67\x5f\155\x6f\x64\x61\x6c\x69\x74\171"]); $imageDataGroupImageInfo["\163\164\162\x49\x6d\x61\x67\x65\115\x6f\144\x65"] = $imageInfo["\x69\155\147\137\x6d\157\144\145"]; $imageDataGroupImageInfo["\x73\164\x72\111\x6d\x61\x67\145\x46\151\154\145\x4e\141\x6d\145"] = $imageInfo["\151\x6d\147\x5f\x66\151\154\x65\156\141\155\x65"]; $imageDataGroupImageInfo["\142\x49\x6d\141\147\145\x41\x75\x74\157\x52\145\x67\151\163\x74\x65\x72\x65\144"] = true; return $this->DataGroupImages_model->post_DataGroupImages($imageDataGroupImageInfo); } } } } } public function get_E2DataGroupsByCTFileOrStudyUID($parameters) { $name = $parameters["\x6e\x61\155\145"]; $ctfileorstudyuid = $parameters["\143\164\x66\151\154\145\x6f\162\x73\x74\165\x64\x79\x75\151\x64"]; if (!in_array($name, ["\143\164\x66\151\154\x65", "\163\x74\165\x64\x79\165\x69\x64"])) { vt_loge(sprintf("\45\x73\x3a\x20\x69\156\x76\x61\x6c\151\144\40\x70\141\x72\141\155\x65\164\x65\162\x3a\40\156\141\x6d\145\x3d\133\x25\x73\135", __METHOD__, $name)); return ["\x65\x72\162\x6f\162\x43\157\144\x65" => VERR_COMMON_INVALID, "\145\162\x72\x6f\x72\x4d\x65\x73\163\x61\147\x65" => sprintf("\111\156\x76\141\154\x69\144\x20\160\x61\162\141\155\x65\x74\x65\162\x3a\40\156\x61\x6d\145\x3d\133\45\163\135", $name)]; } load_model($this, "\x45\x32\x44\x61\164\141\107\162\157\165\x70\x44\102\137\155\157\144\145\x6c"); if ($name === "\143\164\x66\151\x6c\145") { $ret = $this->E2DataGroupDB_model->get_E2DataGroupsByCTFileandStudyUID($ctfileorstudyuid, null); } else { $ret = $this->E2DataGroupDB_model->get_E2DataGroupsByCTFileandStudyUID(null, $ctfileorstudyuid); } if (count($ret) == 0) { vt_loge(sprintf("\x25\x73\72\x20\156\x6f\40\x64\x61\x74\141\x67\x72\157\x75\x70\x20\x66\x6f\x75\156\x64\x3a\40\x25\x73\x3d\45\x73", __METHOD__, $name, $ctfileorstudyuid)); return ["\145\x72\x72\157\162\x43\x6f\x64\x65" => VERR_DB_NOSUCHDATA, "\145\162\162\x6f\x72\x4d\145\163\163\x67\x61\x65" => "\x4e\x6f\x20\x64\x61\164\141\147\x72\157\165\x70\40\146\157\x75\156\x64\56"]; } return ["\145\x72\162\x6f\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\145\62\104\x61\164\141\x47\x72\x6f\x75\x70\x49\x6e\146\157" => SE2DataGroupInfo::createFromDBRecord($ret[0])]; } } diff --git a/server/original/www/ezwebserver/src/application/models/E2acc_dummy_model.php b/server/original/www/ezwebserver/src/application/models/E2acc_dummy_model.php index cab7373..5dea73b 100644 --- a/server/original/www/ezwebserver/src/application/models/E2acc_dummy_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2acc_dummy_model.php @@ -1,7 +1,7 @@ arr, $item1); array_push($this->arr, $item2); array_push($this->arr, $item3); array_push($this->arr, $item4); } public function getAccountList() { return $this->arr; } public function getAccount($strName) { $accountinfo = ''; foreach ((array) $this->arr as $item) { if ($item["\x73\x74\x72\101\143\143\x6f\165\156\164\116\141\x6d\x65"] == $strName) { $accountinfo = $item; break; } } return $accountinfo; } public function getPassword($strName) { $account = $this->getAccount($strName); return $account["\x73\x74\x72\x41\143\143\x6f\165\x6e\164\x50\141\x73\163\167\x64"]; } public function getAccountNameList() { $arrAccountName = array(); foreach ((array) $this->arr as $item) { array_push($arrAccountName, $item["\x73\x74\162\101\143\143\x6f\x75\x6e\x74\116\141\x6d\145"]); } return $arrAccountName; } } diff --git a/server/original/www/ezwebserver/src/application/models/E2acc_model.php b/server/original/www/ezwebserver/src/application/models/E2acc_model.php index 35e8a01..c815e6d 100644 --- a/server/original/www/ezwebserver/src/application/models/E2acc_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2acc_model.php @@ -1,7 +1,7 @@ db->get_where("\145\x32\137\x61\143\143", array("\141\x63\x63\137\x75\163\145\162\x6e\141\x6d\x65" => $name)); $result = $query->result(); if (count($result) > 0) { return array_values($result)[0]; } else { return false; } } public function getAccountList() { $this->db->from("\x65\x32\x5f\x61\x63\x63"); $this->db->order_by("\141\143\143\137\x61\x63\x63\x6f\x75\x6e\164\137\x69\144", "\141\x73\x63"); $query = $this->db->get(); $arr = array(); foreach ($query->result() as $row) { $item = array(); $item["\163\164\162\101\x63\x63\157\x75\156\x74\116\x61\155\145"] = $row->acc_username; $item["\x73\164\162\x41\x63\143\x6f\x75\156\x74\x50\141\x73\x73\x77\x64"] = $row->acc_password; $item["\163\164\162\x47\x72\x61\144\x65"] = $row->acc_level; $item["\142\x44\x61\164\x61\x44\x65\x6c"] = $row->acc_data_del === "\x74"; $item["\x62\x44\x61\x74\x61\x54\x72\141\156\163\x66\x65\162"] = $row->acc_data_transfer === "\164"; $item["\142\104\141\x74\x61\x45\x78\x70\157\162\x74"] = $row->acc_data_export === "\x74"; array_push($arr, $item); } return $arr; } } diff --git a/server/original/www/ezwebserver/src/application/models/E2img_model.php b/server/original/www/ezwebserver/src/application/models/E2img_model.php index d448ada..12aec94 100644 --- a/server/original/www/ezwebserver/src/application/models/E2img_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2img_model.php @@ -1,7 +1,7 @@ db->query("\xa\x20\40\40\40\x20\40\40\40\40\123\x45\114\105\x43\124\40\x50\x41\x54\137\111\104\xa\x20\x20\40\40\x20\40\x20\x20\x20\x46\122\x4f\x4d\x20\x45\62\x5f\x49\115\107\xa\x20\x20\x20\x20\x20\40\x20\x20\40\x57\110\x45\x52\105\x20\x50\x41\x54\137\x49\104\40\111\123\40\116\117\124\x20\x4e\x55\x4c\114\xa\x20\x20\40\x20\40\x20\x20\40\x20\x41\116\x44\x20\111\115\107\137\101\x43\121\125\111\123\111\124\111\117\116\137\x44\x41\124\105\124\x49\x4d\x45\x20\x49\123\x20\116\x4f\x54\40\116\x55\114\x4c\12\x20\x20\x20\40\40\x20\40\x20\40\107\x52\x4f\x55\x50\40\x42\x59\x20\120\101\124\137\111\104\xa\40\x20\40\x20\40\x20\x20\x20\40\x4f\x52\104\105\122\x20\102\131\x20\115\x41\130\50\x49\115\x47\137\101\103\x51\x55\111\x53\x49\124\111\117\x4e\137\104\x41\124\x45\124\111\x4d\105\x29\40\x44\x45\x53\x43\x3b\12\40\x20\x20\40\40\x20"); return $query->result(); } public function getPatient($patientId) { $query = $this->db->query("\xa\40\40\x20\40\40\40\40\40\40\x53\105\114\105\103\x54\40\120\101\124\x5f\x43\110\x41\122\124\x4e\x4f\x2c\xa\x20\x20\x20\40\40\x20\x20\40\40\x50\101\124\137\114\x41\x53\124\116\101\115\x45\54\40\x50\101\124\x5f\x46\x49\122\x53\124\x4e\x41\x4d\x45\x2c\xa\40\40\x20\x20\40\40\x20\x20\x20\120\101\x54\x5f\x4d\111\104\x44\x4c\x45\116\101\115\x45\x2c\40\x50\x41\124\137\102\111\x52\124\110\x44\x41\124\105\xa\x20\40\40\40\x20\x20\40\x20\40\x46\122\117\x4d\40\x45\62\137\x50\x41\124\12\40\x20\x20\x20\40\x20\x20\40\40\127\x48\x45\122\105\x20\120\x41\124\x5f\x49\x44\40\x3d\40" . $patientId); sendSuccessAndDie(array("\x70\x61\x74\151\x65\156\164" => $query->result())); } public function getChartList() { $query = $this->db->query("\12\x20\x20\40\x20\40\x20\x20\x20\40\x53\x45\114\105\103\x54\40\120\x41\x54\137\x43\x48\101\x52\124\x4e\117\xa\x20\x20\x20\40\x20\40\40\x20\x20\x46\122\x4f\115\40\x45\x32\137\x49\x4d\107\12\x20\40\x20\x20\x20\40\40\40\40\x57\x48\x45\x52\x45\40\x50\x41\124\137\x49\104\x20\x49\x53\x20\x4e\x4f\x54\40\x4e\x55\x4c\x4c\12\40\x20\x20\40\40\x20\40\40\40\101\x4e\x44\x20\111\x4d\107\137\101\103\121\125\111\123\x49\124\x49\117\x4e\137\104\x41\124\x45\124\x49\115\x45\x20\x49\x53\40\x4e\117\124\40\x4e\125\x4c\114\12\x20\40\x20\x20\40\40\x20\x20\40\x47\122\x4f\125\120\x20\x42\x59\40\x50\x41\124\137\x43\x48\101\x52\x54\116\117\xa\x20\x20\x20\x20\x20\x20\40\40\x20\x4f\x52\104\x45\122\x20\102\x59\x20\x4d\101\130\x28\x49\x4d\x47\x5f\x41\x43\121\x55\111\x53\x49\124\x49\117\116\x5f\x44\101\x54\x45\x54\111\115\x45\x29\40\104\105\123\x43\73\12\40\x20\x20\40\40\x20"); return $query->result(); } public function getChart($chartNo) { $query = $this->db->query("\xa\40\40\x20\x20\x20\x20\40\x20\40\x53\x45\x4c\105\103\124\x20\x50\101\x54\137\103\110\101\122\124\x4e\117\x2c\12\40\40\40\40\x20\x20\40\40\x20\120\101\124\x5f\114\101\x53\x54\x4e\x41\115\x45\x2c\40\120\101\124\137\106\111\122\x53\124\116\101\115\x45\x2c\12\x20\x20\40\40\40\40\x20\x20\x20\x50\x41\x54\x5f\115\111\x44\x44\x4c\x45\x4e\x41\x4d\105\x2c\40\x50\101\x54\x5f\102\x49\x52\124\110\104\101\124\105\xa\x20\40\40\40\x20\40\40\x20\40\x46\x52\117\115\40\x45\62\137\x50\101\x54\12\40\x20\40\x20\x20\40\40\x20\x20\x57\110\105\x52\x45\x20\x50\x41\x54\137\x43\110\101\x52\124\116\x4f\40\x3d\x20\x27" . $chartNo . "\47"); return $query->result(); } public function getImageList($chartNo) { $query = $this->db->query("\xa\40\x20\x20\40\40\x20\40\x20\x20\x53\x45\114\x45\x43\x54\40\x2a\12\40\x20\40\x20\x20\x20\40\40\40\x46\x52\117\x4d\40\105\x32\137\111\115\x47\12\40\x20\40\40\40\40\x20\x20\x20\127\110\x45\x52\105\40\x50\101\124\x5f\111\x44\x20\x3d\40\50\xa\x20\40\40\x20\40\40\x20\x20\40\x20\40\40\x53\x45\114\x45\103\x54\x20\x50\101\124\137\x49\104\12\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\106\x52\117\x4d\x20\105\62\137\120\101\124\12\x20\40\x20\40\40\40\x20\x20\x20\40\40\x20\127\x48\105\122\105\40\x50\101\124\x5f\103\110\x41\122\124\x4e\x4f\40\75\x20\x27" . $chartNo . "\47\xa\x20\40\x20\40\40\40\x20\x20\40\x29\12\x20\40\40\40\40\40\x20\x20\x20\117\x52\x44\x45\122\x20\102\131\40\111\x4d\x47\x5f\x41\103\x51\x55\111\123\111\124\x49\117\x4e\137\104\x41\124\x45\x54\x49\x4d\105\x20\x44\105\x53\103\x2c\xa\40\x20\x20\x20\40\40\40\40\x20\x49\115\x47\x5f\106\111\x4c\x45\116\101\115\x45\x20\104\105\x53\x43\x3b\xa\40\40\x20\x20\x20\x20"); return $query->result(); } public function getImage($imgId) { $query = $this->db->query("\xa\x20\40\40\40\x20\40\x20\40\x20\123\x45\x4c\105\x43\124\40\x2a\12\40\40\40\x20\40\40\x20\x20\x20\x46\x52\x4f\x4d\40\105\x32\x5f\x49\x4d\107\12\40\40\x20\40\x20\40\x20\x20\x20\127\x48\x45\122\105\40\111\x4d\107\x5f\111\x44\40\x3d\x20" . $imgId . "\xa\40\x20\x20\x20\40\40"); return $query->result(); } public function insertCT($chartNo, $fileName, $dicom, $acqTime = '', $studyInstanceUID = '', $sourceType = "\125\x6e\153\156\x6f\x77\x6e", $groupType = "\145\125\156\153\156\157\167\156\x47\x72\157\165\x70\151\156\147\115\157\144\x65", $bSmartPay = false) { load_model($this, "\x45\x32\104\141\164\x61\107\x72\157\165\160\163\137\x6d\157\144\x65\154"); load_model($this, "\x45\170\x74\x72\141\x4f\x72\x61\x6c\x44\x65\x76\151\143\145\x73\x5f\x6d\157\144\x65\x6c"); load_model($this, "\x53\155\141\162\164\120\141\171\x49\155\x61\x67\x65\163\137\x6d\157\x64\x65\x6c"); $modality = "\103\x54"; $isImported = FALSE; if (isset($acqTime) && $acqTime != '') { $acqTime = currentDateFormat(DATEFORMAT_DATABASE, $acqTime); } else { $acqTime = currentDateFormat(DATEFORMAT_DATABASE); } if ($dicom) { $dicomData = $this->setDicom($dicom, $acqTime, $modality, $studyInstanceUID, $sourceType); $checkMode = array(); $checkMode["\164\x61\x67\124\157\157\164\150\111\156\x64\145\170"] = $dicom->getTagValue(tagToothIndex); $checkMode["\164\x61\x67\x56\x65\x72\164\151\143\x61\x6c\x4d\x6f\x64\x65"] = $dicom->getTagValue(tagVerticalMode); $checkMode["\164\141\x67\110\157\162\151\172\x6f\x6e\x74\141\154\x4d\157\x64\145"] = $dicom->getTagValue(tagHorizontalMode); $checkMode["\x74\x61\147\106\117\x56\x53\151\172\145"] = $dicom->getTagValue(tagFOVSize); $this->setAcqMode($modality, $checkMode, $acqMode); } else { $acqMode = "\116\x6f\x6e\145"; } $imageInfo = new SImageInfo(); $imageInfo->strImgFileName = $fileName; $imageInfo->modality = $modality; $imageInfo->strAcqMode = $acqMode; $imageInfo->bIsImported = $isImported; $imageInfo->strChartNo = $chartNo; $imageInfo->strStudyInstanceUID = $studyInstanceUID; $imageInfo->eSourceType = $sourceType; load_model($this, "\120\141\x74\x69\145\x6e\164\x73\x5f\x6d\157\x64\x65\154"); $pat = $this->Patients_model->getPatientIdByChartNo($chartNo); $patID = count($pat) > 0 ? $pat[0]["\x70\141\164\x5f\151\144"] : 0; if ((int) $patID > 0) { $imageInfo->nPatID = $patID; } $this->db->insert("\x65\62\137\151\x6d\147", $imageInfo->createDBRecord($dicomData)); if ($bSmartPay) { $sDeviceInfo = new SExtraOralDeviceInfo(); $this->ExtraOralDevices_model->get_ExtraOralDevicesByImageFile($fileName, $sDeviceInfo); if ($sDeviceInfo->eDeviceSalesType == enumToString(new eDeviceSalesType(), (new eDeviceSalesType())->eSmartPayDevice)) { $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType); if ($sDeviceInfo->eDevicePayStatus == enumToString(new eDevicePayStatus(), (new eDevicePayStatus())->eDevicePaid)) { if ($sDeviceInfo->eDevicePayType == enumToString(new eDevicePayType(), (new eDevicePayType())->eDeviceMonthlyFlatA)) { $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatA); } else { if ($sDeviceInfo->eDevicePayType == enumToString(new eDevicePayType(), (new eDevicePayType())->eDeviceMonthlyFlatB)) { $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatB); } } } $smartPayData = array("\x73\164\162\111\155\147\106\x69\154\x65\116\x61\x6d\145" => $fileName, "\x65\111\x6d\141\147\145\x50\141\171\x54\171\x70\145" => $eImagePayType, "\163\164\162\x55\156\x61\x76\x61\151\154\141\142\x6c\x65\106\x65\x61\x74\x75\x72\x65\x73" => $sDeviceInfo->strUnavailableFeatures); $this->SmartPayImages_model->post_SmartPayImages($smartPayData); } } $savingImageInfo["\151\155\x67\137\x6d\x6f\x64\141\x6c\151\x74\171"] = $modality; $savingImageInfo["\160\x61\164\137\143\x68\x61\162\164\156\x6f"] = $chartNo; $savingImageInfo["\x69\155\147\x5f\163\x74\x75\x64\171\137\x69\156\x73\164\x61\156\x63\x65\x5f\165\x69\144"] = $studyInstanceUID; $savingImageInfo["\x69\155\147\137\146\151\x6c\x65\156\x61\x6d\145"] = $fileName; $savingImageInfo["\x69\x6d\x67\x5f\155\157\144\x65"] = $acqMode; $savingImageInfo["\x69\x6d\147\x5f\x75\x70\x64\x61\164\x65\x5f\144\x61\164\145\x74\x69\155\x65"] = $dicomData["\x61\143\161\x75\x69\163\151\x74\151\157\156\x44\x61\164\145\x54\x69\x6d\x65"]; $savingImageInfo["\x69\155\x67\137\141\x63\161\x75\x69\163\x69\164\151\157\156\x5f\144\141\x74\145\164\151\155\x65"] = $dicomData["\141\143\161\x75\151\163\x69\164\151\157\x6e\x44\x61\164\145\124\x69\155\x65"]; $this->E2DataGroups_model->ProcessToMakeGroupData($savingImageInfo); } public function insertImage($chartNo, $fileName, $modality, $acqMode, $isImported, $dicom, $acqTime, $studyInstanceUID, $sourceType, $groupType, $rawFileName, $deviceInfo, $modelName) { load_model($this, "\x45\x32\104\141\x74\x61\107\162\x6f\165\x70\x73\137\x6d\x6f\144\x65\154"); if (isset($acqTime) && $acqTime != '') { $acqTime = currentDateFormat(DATEFORMAT_DATABASE, $acqTime); } else { $acqTime = currentDateFormat(DATEFORMAT_DATABASE); } $dicomData = array(); if ($dicom) { $dicomData = $this->setDicom($dicom, $acqTime, $modality, $studyInstanceUID, $sourceType); $checkMode = array(); switch ($modality) { case "\x50\x61\x6e\x6f\x72\x61\155\141": $checkMode["\x74\x61\x67\x53\x65\x67\x6d\145\x6e\x74\x4d\157\144\x65"] = $dicom->getTagValue(tagSegmentMode); $checkMode["\x74\x61\147\106\157\x72\155\115\x6f\x64\145"] = $dicom->getTagValue(tagFormMode); break; case "\103\145\160\150\141\x6c\x6f": $checkMode["\164\x61\x67\106\157\162\x6d\115\157\x64\145"] = $dicom->getTagValue(tagFormMode); break; case "\103\124": $checkMode["\x74\141\147\x54\157\157\x74\x68\x49\156\x64\x65\x78"] = $dicom->getTagValue(tagToothIndex); $checkMode["\164\141\x67\126\145\162\x74\151\x63\x61\154\x4d\157\x64\x65"] = $dicom->getTagValue(tagVerticalMode); $checkMode["\164\x61\x67\x48\157\x72\x69\x7a\157\x6e\164\141\x6c\x4d\x6f\144\145"] = $dicom->getTagValue(tagHorizontalMode); $checkMode["\x74\141\147\x46\117\126\x53\x69\172\x65"] = $dicom->getTagValue(tagFOVSize); break; } $this->setAcqMode($modality, $checkMode, $acqMode); $acqTime = $dicomData["\141\143\x71\x75\151\163\151\x74\151\x6f\x6e\104\x61\x74\145\x54\x69\x6d\145"]; } if (!isset($acqMode) || $acqMode == '') { $acqMode = "\x4e\157\156\145"; } $imageInfo = new SImageInfo(); $imageInfo->strImgFileName = $fileName; $imageInfo->modality = $modality; $imageInfo->strAcqMode = $acqMode; $imageInfo->dtAcqTime = $acqTime; $imageInfo->bIsImported = $isImported; $imageInfo->dtUpdateDateTime = $acqTime; $imageInfo->strRawFileName = $rawFileName; $imageInfo->strModelName = $modelName; $imageInfo->strDeviceInfo = $deviceInfo; $imageInfo->strChartNo = $chartNo; $imageInfo->strStudyInstanceUID = $studyInstanceUID; $imageInfo->eSourceType = $sourceType; load_model($this, "\x50\141\x74\x69\145\x6e\164\x73\x5f\155\157\x64\145\x6c"); $pat = $this->Patients_model->getPatientIdByChartNo($chartNo); $patID = count($pat) > 0 ? $pat[0]["\160\141\164\137\x69\x64"] : 0; if ((int) $patID > 0) { $imageInfo->nPatID = $patID; } $this->db->insert("\145\x32\137\151\155\x67", $imageInfo->createDBRecord($dicomData)); $savingImageInfo["\x69\155\x67\137\155\x6f\144\141\154\x69\164\x79"] = $modality; $savingImageInfo["\160\x61\x74\137\x63\x68\141\162\164\156\157"] = $chartNo; $savingImageInfo["\x69\155\147\137\x73\x74\x75\144\171\137\151\x6e\163\x74\x61\156\143\x65\x5f\165\151\x64"] = $studyInstanceUID; $savingImageInfo["\x69\x6d\147\x5f\146\151\154\x65\x6e\141\155\145"] = $fileName; $savingImageInfo["\x69\x6d\x67\137\155\x6f\x64\x65"] = $acqMode; $savingImageInfo["\x69\x6d\x67\137\165\160\144\x61\x74\x65\137\144\x61\164\145\164\151\155\x65"] = $acqTime; if ($dicom) { $savingImageInfo["\x69\155\147\137\141\143\x71\165\x69\163\151\x74\151\x6f\x6e\137\144\141\164\x65\164\x69\x6d\145"] = $dicomData["\141\x63\x71\x75\x69\163\x69\x74\151\157\156\104\x61\164\145\x54\151\x6d\145"]; } else { $savingImageInfo["\x69\155\147\x5f\141\x63\161\x75\x69\x73\151\164\151\157\156\x5f\x64\x61\164\x65\x74\x69\155\x65"] = $acqTime; } $this->E2DataGroups_model->ProcessToMakeGroupData($savingImageInfo); } public function setDicom($dicom, $acqTime, &$modality, &$studyInstanceUID, &$sourceType) { $dicomData = array(); if ($acqTime == '') { $studyDate = $dicom->getTagValue(tagStudyDate); $studyTime = $dicom->getTagValue(tagStudyTime); $dicomData["\141\x63\161\165\151\163\x69\164\x69\x6f\x6e\x44\141\164\x65\x54\151\155\x65"] = currentDateFormat(DATEFORMAT_DATABASE, $studyDate . "\40" . $studyTime); } else { $dicomData["\141\143\161\x75\x69\163\151\164\x69\157\156\x44\141\164\x65\124\x69\x6d\145"] = $acqTime; } $dicomData["\145\170\160\157\163\x75\x72\x65\x54\x69\x6d\145"] = $dicom->getTagValue(tagExposureTime); $dicomData["\x64\145\166\151\x63\x65\x53\145\x72\x69\x61\x6c\116\165\155\x62\145\x72"] = $dicom->getTagValue(tagDeviceSerialNumber); if ($studyInstanceUID == '') { $studyInstanceUID = $dicom->getTagValue(tagStudyInstanceUID); } if ($modality == '') { $modality = $dicom->getTagValue(tagModality); } $dicomData["\x6b\126\x70"] = $dicom->getTagValue(tagkVp); $uA = (float) $dicom->getTagValue(taguA) / 1000.0; $dicomData["\155\101"] = $dicom->getTagValue(tagmA); $dicomData["\x64\x6f\163\145"] = $dicom->getTagValue(tagDAP); if ($uA != 0) { $dicomData["\155\x41"] = $uA; } $dicomData["\153\x56\x70"] = $dicomData["\153\126\160"] ? $dicomData["\x6b\126\x70"] : 0; $dicomData["\x64\157\163\x65"] = $dicomData["\144\x6f\163\145"] ? $dicomData["\x64\157\163\x65"] : 0; $dicomData["\155\101"] = $dicomData["\155\x41"] ? $dicomData["\155\101"] : 0; if ($studyInstanceUID == false) { $studyInstanceUID = ''; } if (!isset($sourceType) || $sourceType == '') { $sourceType = "\x55\156\153\x6e\157\x77\x6e"; } if (!isset($dicomData["\x65\x78\160\157\x73\x75\x72\x65\x54\151\x6d\145"]) || $dicomData["\x65\170\160\157\163\165\x72\145\124\x69\155\x65"] == false) { $dicomData["\x65\170\160\x6f\163\165\x72\x65\x54\x69\x6d\145"] = null; } if (!isset($dicomData["\144\x65\x76\151\x63\x65\123\145\162\151\x61\154\116\165\155\142\x65\162"]) || $dicomData["\144\145\x76\x69\143\145\x53\145\162\151\x61\154\x4e\165\x6d\142\x65\x72"] == false) { $dicomData["\144\x65\x76\151\143\x65\x53\145\x72\151\141\154\116\165\155\x62\x65\x72"] = ''; } return $dicomData; } public function setAcqMode($modality, $checkMode, &$acqMode) { $listMode = array(); $PanoTagSegmentMode = array("\123\164\x61\156\x64\x61\162\144", "\122\x69\147\150\x74", "\x46\162\x6f\156\164", "\x4c\145\146\x74", "\102\151\x74\x65\167\151\x6e\x67", "\102\x69\x74\145\x77\x69\156\x67\40\122\x69\x67\150\164", "\x42\151\x74\x65\x77\151\156\147\40\111\156\143\x69\x73\x6f\x72", "\102\x69\x74\145\167\151\156\147\x20\x4c\145\146\164"); $PanoTagFormMode = array("\x54\x4d\x4a\x20\114\x61\x74\145\162\x61\x6c", "\x54\115\x4a\40\114\x61\x74\145\162\141\x6c", "\124\x4d\112\40\x50\101", "\124\115\x4a\40\120\x41", "\x53\151\156\165\x73\x20\114\x61\164\145\162\x61\154", "\123\151\156\x75\x73\40\120\101"); $CephTagFormMode = array("\114\141\164\145\x72\141\154", "\114\141\x74\145\x72\141\x6c", "\x50\x41", "\123\115\126", "\x57\141\x74\145\x72\x27\163\x20\x56\x69\145\167", "\x43\x61\162\x70\x75\x73"); $CtTagVerticalMode = array("\115\x61\x6e\x64\151\142\154\145", "\x4f\x63\x63\154\x75\163\151\x6f\156", "\x4d\x61\x78\151\154\154\x61", "\124\x4d\112"); $CtTagHorizontalMode = array("\x52\151\x67\x68\x74", "\103\x65\156\164\x65\x72", "\114\x65\146\164"); switch ($modality) { case "\x50\x61\156\157\x72\x61\155\x61": if (isset($checkMode["\164\x61\147\123\145\147\155\145\156\x74\x4d\157\x64\x65"]) && $checkMode["\x74\x61\147\x53\145\x67\x6d\x65\156\x74\x4d\157\144\x65"] !== false && array_key_exists(intval($checkMode["\164\141\x67\x53\145\x67\x6d\x65\156\164\x4d\x6f\144\x65"]), $PanoTagSegmentMode)) { $listMode[] = $PanoTagSegmentMode[intval($checkMode["\164\141\x67\123\145\x67\x6d\145\156\x74\115\157\144\145"])]; } if (isset($checkMode["\164\x61\147\x46\x6f\162\x6d\115\157\144\x65"]) && $checkMode["\164\x61\147\x46\x6f\162\155\x4d\x6f\x64\145"] !== false && array_key_exists(intval($checkMode["\164\x61\x67\106\x6f\162\x6d\x4d\157\x64\x65"]), $PanoTagFormMode)) { $listMode[] = $PanoTagFormMode[intval($checkMode["\x74\141\x67\106\157\162\x6d\x4d\157\144\145"])]; } break; case "\x43\145\x70\150\x61\154\x6f": if (isset($checkMode["\x74\141\x67\x46\x6f\x72\x6d\x4d\x6f\x64\x65"]) && $checkMode["\x74\141\147\106\x6f\162\155\115\x6f\x64\x65"] !== false && array_key_exists(intval($checkMode["\x74\x61\147\x46\157\162\155\x4d\x6f\144\x65"]), $PanoTagFormMode)) { $listMode[] = $CephTagFormMode[intval($checkMode["\164\141\x67\106\157\162\155\x4d\x6f\x64\x65"])]; } break; case "\103\124": if (isset($checkMode["\164\141\x67\x54\157\x6f\164\x68\x49\156\x64\x65\170"]) && $checkMode["\x74\141\x67\x54\157\157\x74\x68\x49\x6e\x64\145\170"] !== false && intval($checkMode["\164\141\147\124\x6f\x6f\x74\150\x49\x6e\144\145\170"]) > 0) { $listMode[] = $checkMode["\164\x61\147\124\157\x6f\164\150\x49\156\144\145\170"]; } if (isset($checkMode["\164\141\x67\x56\145\162\164\x69\143\141\154\115\x6f\x64\145"]) && $checkMode["\x74\x61\147\126\145\x72\x74\x69\143\x61\x6c\x4d\x6f\144\145"] !== false && array_key_exists(intval($checkMode["\164\141\x67\x56\x65\162\164\x69\143\141\154\115\x6f\x64\x65"]), $CtTagVerticalMode)) { $listMode[] = $CtTagVerticalMode[intval($checkMode["\x74\x61\x67\x56\145\x72\x74\151\x63\141\154\115\x6f\x64\145"])]; } if (isset($checkMode["\164\141\147\110\x6f\x72\x69\x7a\157\x6e\164\141\x6c\115\x6f\x64\145"]) && $checkMode["\x74\141\x67\110\157\162\151\172\x6f\x6e\164\x61\x6c\x4d\x6f\144\145"] !== false && array_key_exists(intval($checkMode["\164\x61\147\110\x6f\162\151\x7a\x6f\156\164\141\x6c\115\x6f\144\x65"]), $CtTagHorizontalMode)) { $listMode[] = $CtTagHorizontalMode[intval($checkMode["\x74\141\x67\110\x6f\x72\x69\x7a\157\156\x74\141\154\x4d\x6f\x64\x65"])]; } if (!empty($checkMode["\x74\x61\147\x46\117\126\x53\151\x7a\145"])) { $listMode[] = $checkMode["\x74\x61\147\106\117\126\x53\x69\x7a\145"]; } break; case "\111\117\x53\145\156\x73\157\x72": $listMode[] = $acqMode; break; } if (count($listMode) > 0) { $acqMode = implode("\x20", $listMode); } else { $acqMode = "\116\x6f\156\145"; } } public function updateVPanoImage($chartNo, $fileName, $vpanoFileName, $modelName) { $this->db->set("\151\x6d\147\x5f\x6d\x6f\144\145\x6c\x6e\141\x6d\145", $modelName); $this->db->set("\151\x6d\x67\x5f\x75\163\x65\162\x5f\144\x65\146\151\156\x65\x64\137\x31\x31", $vpanoFileName); $this->db->where("\x69\x6d\x67\x5f\146\x69\x6c\x65\156\x61\x6d\x65", $fileName); $this->db->where("\160\141\x74\137\143\150\x61\x72\164\x6e\157", $chartNo); $this->db->update("\145\x32\x5f\151\155\x67"); return $this->db->affected_rows(); } public function delete($filename) { $this->db->delete("\x65\62\x5f\151\155\x67", array("\x69\x6d\x67\137\x66\151\154\x65\156\x61\155\x65" => $filename)); } } diff --git a/server/original/www/ezwebserver/src/application/models/E2rpt_model.php b/server/original/www/ezwebserver/src/application/models/E2rpt_model.php index 079b517..cbc93c3 100644 --- a/server/original/www/ezwebserver/src/application/models/E2rpt_model.php +++ b/server/original/www/ezwebserver/src/application/models/E2rpt_model.php @@ -1,7 +1,7 @@ $reportName, "\162\x70\x74\x5f\x66\151\x6c\x65\x6e\x61\x6d\145" => $fileName, "\x72\160\164\x5f\143\157\x6d\155\145\156\x74" => $comment, "\162\160\164\x5f\143\162\145\x61\x74\x65\x64\x5f\144\x61\x74\145\x74\x69\x6d\x65" => $nowTime, "\160\x61\x74\137\x63\150\x61\x72\164\x6e\157" => $chartNo); load_model($this, "\x50\x61\x74\x69\x65\156\x74\x73\x5f\155\x6f\x64\145\154"); $patIDs = $this->Patients_model->getPatientIdByChartNo($chartNo); if (count($patIDs) > 0) { $data["\x70\x61\164\x5f\x69\x64"] = $patIDs[0]["\160\141\164\x5f\151\x64"]; $this->db->insert("\x65\x32\x5f\x72\x70\x74", $data); } return false; } public function get_ReportsByChartNo($strChartNo) { $sql = "\x53\105\x4c\105\x43\x54\x20\52\15\xa\x20\x20\x20\x20\40\40\40\40\40\40\40\40\x20\40\x20\40\106\x52\x4f\115\x20\145\x32\x5f\162\x70\164\xd\12\x20\x20\x20\40\40\40\x20\40\x20\x20\40\x20\40\x20\x20\40\127\110\x45\122\x45\x20\160\x61\164\137\143\x68\x61\162\164\x6e\157\x20\75\x20\x3f\15\12\x20\x20\40\x20\40\40\40\40\x20\40\40\40\x20\x20\40\40\x4f\x52\x44\105\x52\x20\x42\131\x20\162\x70\x74\x5f\x63\162\x65\x61\164\145\144\x5f\144\141\164\145\x74\x69\x6d\x65\40\104\105\x53\103"; return $this->db->query($sql, array($strChartNo))->result_array(); } public function deleteReportByFileName($filename) { $this->db->delete("\x65\62\x5f\x72\x70\164", array("\162\x70\x74\137\x66\151\x6c\x65\x6e\141\x6d\145" => $filename)); } } diff --git a/server/original/www/ezwebserver/src/application/models/E3PresetComments_model.php b/server/original/www/ezwebserver/src/application/models/E3PresetComments_model.php index 7a2e051..857c5a0 100644 --- a/server/original/www/ezwebserver/src/application/models/E3PresetComments_model.php +++ b/server/original/www/ezwebserver/src/application/models/E3PresetComments_model.php @@ -1,7 +1,7 @@ $nIndex); $this->db->delete("\x74\x62\154\137\x72\143\162\145\x70\x6f\162\164\160\162\x65\163\x65\x74\143\157\x6d\155\x65\156\164", $data); return $this->db->affected_rows(); } public function get_E3PresetComments() { $this->db->select("\x72\x70\164\x70\143\x6d\137\151\156\x64\145\170\54\40\x72\x70\x74\160\143\x6d\137\164\x69\x74\x6c\x65\54\40\162\x70\164\160\x63\155\137\143\157\x6d\x6d\x65\156\x74\54\40\x72\160\164\x70\x63\x6d\x5f\143\162\x65\x61\x74\145\144\x2c\x20\x72\160\x74\160\143\x6d\137\154\141\x73\164\x5f\x6d\x6f\144\x69\146\151\145\x64"); $this->db->from("\164\x62\x6c\137\x72\143\162\x65\160\x6f\162\164\160\x72\x65\163\145\x74\143\x6f\x6d\155\x65\156\x74"); $this->db->order_by("\162\x70\164\x70\x63\155\x5f\151\156\144\x65\x78", "\101\123\x43"); $sE3DBPresetComments = $this->db->get()->result_array(); $vecPresetComment = array(); if (count($sE3DBPresetComments) > 0) { foreach ($sE3DBPresetComments as $sE3DBPresetComment) { array_push($vecPresetComment, new SE3DBPresetComment($sE3DBPresetComment)); } return $vecPresetComment; } else { return VERR_DB_NOSUCHDATA; } } public function post_E3PresetComments($SE3DBPresetComment) { $data = array("\162\160\164\x70\143\155\x5f\164\x69\164\154\145" => $SE3DBPresetComment["\x73\x74\x72\x54\x69\x74\154\145"], "\162\x70\164\x70\143\x6d\137\x63\x6f\x6d\155\x65\x6e\x74" => $SE3DBPresetComment["\x73\x74\162\103\x6f\x6d\155\145\156\164"], "\162\160\164\x70\x63\155\137\x63\162\x65\x61\164\x65\144" => empty($SE3DBPresetComment["\144\164\x43\x72\145\141\x74\145\144"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBPresetComment["\144\164\103\162\x65\x61\164\145\144"]), "\162\x70\164\x70\143\155\x5f\154\x61\163\x74\137\155\157\144\151\x66\151\145\144" => empty($SE3DBPresetComment["\x64\x74\115\x6f\144\x69\146\151\145\144"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBPresetComment["\x64\164\x4d\157\144\x69\146\151\145\x64"])); $this->db->insert("\164\x62\154\x5f\162\x63\162\x65\x70\x6f\x72\164\160\162\x65\x73\145\x74\x63\157\x6d\x6d\x65\x6e\164", $data); return $this->db->affected_rows(); } public function put_E3PresetComments($SE3DBPresetComment) { $data = array("\162\x70\x74\160\143\x6d\137\x74\x69\164\154\145" => $SE3DBPresetComment["\x73\x74\x72\124\151\164\154\x65"], "\162\x70\x74\x70\143\155\x5f\x63\x6f\x6d\x6d\145\x6e\164" => $SE3DBPresetComment["\x73\164\x72\103\157\155\155\145\x6e\164"], "\x72\x70\164\x70\x63\x6d\137\x6c\x61\163\x74\x5f\x6d\x6f\x64\151\146\151\x65\x64" => empty($SE3DBPresetComment["\144\x74\x4d\x6f\144\x69\146\x69\145\x64"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBPresetComment["\144\164\x4d\157\x64\x69\x66\x69\145\144"])); $this->db->where("\162\160\164\160\x63\155\x5f\151\x6e\144\145\x78", $SE3DBPresetComment["\x6e\x49\156\144\145\x78"]); $this->db->update("\x74\x62\154\x5f\162\x63\162\145\160\157\162\164\x70\162\x65\163\x65\x74\143\157\155\155\145\156\x74", $data); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/E3ReportSettings_model.php b/server/original/www/ezwebserver/src/application/models/E3ReportSettings_model.php index f0c4fa4..a0c8af1 100644 --- a/server/original/www/ezwebserver/src/application/models/E3ReportSettings_model.php +++ b/server/original/www/ezwebserver/src/application/models/E3ReportSettings_model.php @@ -1,7 +1,7 @@ db->select("\162\160\164\x73\145\164\137\x69\156\x64\145\x78\x2c\40\162\160\x74\163\145\164\x5f\x76\x65\162\x73\151\x6f\x6e\54\x20\162\160\x74\163\x65\x74\137\x64\145\x66\141\x75\x6c\164\x5f\164\145\x6d\x70\x6c\x61\x74\145"); $this->db->from("\x74\x62\154\137\x72\x63\162\145\x70\157\162\x74\x73\x65\x74\164\151\156\x67"); $sE3DBReportSetting = $this->db->get()->result_array(); if (count($sE3DBReportSetting) > 0) { return new SE3DBReportSetting($sE3DBReportSetting[0]); } else { return VERR_DB_NOSUCHDATA; } } public function get_E3ReportSettingsForDefaultTemplate() { $this->db->select("\162\x70\164\163\145\x74\137\144\x65\x66\141\x75\x6c\x74\x5f\x74\x65\155\x70\x6c\141\x74\145"); $this->db->from("\x74\x62\x6c\x5f\x72\143\x72\x65\160\157\x72\x74\163\145\x74\x74\151\x6e\x67"); $sE3DBReportSetting = $this->db->get()->result_array(); if (count($sE3DBReportSetting) > 0) { $strDefaultTemplateFilename = $sE3DBReportSetting[0]["\x72\160\164\x73\x65\x74\137\x64\x65\146\x61\x75\x6c\164\137\164\x65\x6d\x70\154\x61\x74\x65"]; return $strDefaultTemplateFilename; } return VERR_DB_NOSUCHDATA; } public function put_E3ReportSettingsForDefaultTemplate($SE3DBReportSetting) { $data = array("\x72\160\x74\x73\x65\164\x5f\x76\x65\x72\x73\151\157\156" => $SE3DBReportSetting["\x73\164\x72\123\145\x74\164\151\156\x67\126\x65\x72\163\151\x6f\156"], "\162\160\164\x73\x65\x74\x5f\144\x65\146\141\165\154\x74\137\x74\x65\155\x70\154\141\164\145" => $SE3DBReportSetting["\163\x74\162\x44\x65\146\141\x75\154\x74\124\x65\x6d\x70\154\141\x74\x65\106\151\154\x65\156\x61\155\x65"]); $this->db->update("\164\142\x6c\137\x72\x63\x72\x65\160\157\162\164\163\x65\x74\x74\x69\x6e\x67", $data); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/E3ReportTemplateEditStates_model.php b/server/original/www/ezwebserver/src/application/models/E3ReportTemplateEditStates_model.php index 8987ca7..155214c 100644 --- a/server/original/www/ezwebserver/src/application/models/E3ReportTemplateEditStates_model.php +++ b/server/original/www/ezwebserver/src/application/models/E3ReportTemplateEditStates_model.php @@ -1,7 +1,7 @@ db->get("\164\x62\x6c\x5f\162\x63\x72\x65\x70\157\x72\164\x74\x65\155\160\x6c\x61\164\145\145\x64\x69\x74\x73\x74\x61\164\145"); if (count($query) > 0) { $sTemplateEditState = array("\x6e\x49\x6e\x64\145\170" => $query->row()->rpttes_index, "\142\x45\x64\x69\164\x69\x6e\x67" => setBoolVal($query->row()->rpttes_editing), "\163\164\162\111\x50\x41\144\x64\162\x65\163\163" => $query->row()->rpttes_ip_addres, "\x64\x74\125\160\144\141\x74\145\144" => currentDateFormat(DATEFORMAT_ISO8601, $query->row()->rpttes_last_updated)); return array("\x65\162\162\x6f\x72\x43\x6f\144\145" => VERR_COMMON_SUCCESS, "\x73\x54\145\x6d\x70\x6c\141\164\145\105\x64\151\164\x53\164\141\x74\x65" => $sTemplateEditState); } else { vt_loge("\147\145\164\x5f\x45\63\122\145\160\x6f\x72\164\124\x65\x6d\160\x6c\141\164\145\x45\x64\151\x74\123\x74\x61\164\x65\163\40\x41\x70\x69\x2e\x20" . "\x4e\x6f\164\40\x46\x6f\x75\x6e\144\40\104\141\164\141\56"); return array("\145\162\162\157\162\103\157\144\x65" => VERR_DB_NOSUCHDATA); } } public function put_E3ReportTemplateEditStates($sTemplateEditState) { $this->db->set("\162\x70\x74\x74\145\x73\137\x65\x64\x69\164\x69\x6e\x67", $sTemplateEditState["\x62\x45\x64\x69\x74\151\156\x67"]); $this->db->set("\162\160\164\x74\145\x73\x5f\151\160\137\141\x64\x64\162\x65\163", $sTemplateEditState["\x73\x74\162\111\120\x41\144\144\162\145\163\163"]); $this->db->set("\162\x70\x74\x74\x65\x73\137\154\x61\x73\x74\137\165\x70\x64\x61\x74\145\144", $sTemplateEditState["\144\x74\125\x70\144\141\164\145\144"]); $this->db->update("\x74\x62\154\x5f\162\143\x72\x65\x70\157\162\164\x74\x65\x6d\160\154\x61\x74\145\145\144\151\x74\x73\x74\141\164\x65"); if ($this->db->affected_rows() > 0) { return array("\145\x72\x72\157\x72\103\x6f\x64\145" => VERR_COMMON_SUCCESS); } else { vt_loge("\x70\x75\x74\137\105\x33\x52\145\160\157\162\164\124\145\x6d\160\x6c\x61\x74\x65\105\x64\x69\x74\123\x74\x61\164\x65\163\40\x41\160\151\56\x20" . "\x4e\x6f\164\40\106\x6f\165\x6e\144\x20\x44\x61\164\x61\x2e"); return array("\145\162\x72\x6f\x72\x43\157\x64\x65" => VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/E3ReportTemplates_model.php b/server/original/www/ezwebserver/src/application/models/E3ReportTemplates_model.php index 272afa5..aa37cd0 100644 --- a/server/original/www/ezwebserver/src/application/models/E3ReportTemplates_model.php +++ b/server/original/www/ezwebserver/src/application/models/E3ReportTemplates_model.php @@ -1,7 +1,7 @@ $nIndex); $this->db->delete("\x74\x62\154\137\162\143\x72\145\x70\x6f\162\164\164\x65\155\x70\154\x61\164\145", $data); return $this->db->affected_rows(); } public function get_E3ReportTemplates() { $this->db->select("\162\160\164\164\x6d\x70\137\151\156\x64\x65\x78\x2c\x20\162\x70\x74\164\x6d\160\x5f\x66\151\154\145\x5f\x6e\x61\155\x65\x2c\40\x72\x70\164\x74\155\160\x5f\156\141\x6d\x65\54\x20\162\x70\x74\164\155\x70\137\143\162\145\141\x74\145\144\x2c\x20\162\x70\164\164\x6d\160\x5f\x6c\x61\163\x74\x5f\155\x6f\144\x69\146\151\x65\x64\54\x20" . "\x72\x70\x74\164\155\160\x5f\x61\144\x64\145\144\x5f\142\x79\137\x75\x73\x65\162\54\40\x72\160\x74\x74\155\160\137\166\151\163\x69\142\x6c\x65\x5f\x69\x6e\x5f\154\151\x73\x74\x2c\40\162\160\x74\x74\x6d\x70\x5f\x70\x61\147\145\x5f\143\x6f\165\156\164\54\40\x72\x70\x74\x74\155\x70\137\160\x61\x70\145\x72\x5f\x73\x69\172\x65"); $this->db->from("\x74\x62\154\137\x72\143\162\x65\160\x6f\162\x74\x74\145\x6d\x70\154\x61\x74\x65"); $this->db->order_by("\x72\160\x74\x74\x6d\160\137\151\156\144\145\x78", "\101\x53\x43"); $sE3DBReportTemplates = $this->db->get()->result_array(); $vecReportTemplate = array(); if (count($sE3DBReportTemplates) > 0) { foreach ($sE3DBReportTemplates as $sE3DBReportTemplate) { array_push($vecReportTemplate, new SE3DBReportTemplate($sE3DBReportTemplate)); } return $vecReportTemplate; } else { return VERR_DB_NOSUCHDATA; } } public function post_E3ReportTemplates($SE3DBReportTemplate) { $data = array("\x72\x70\x74\x74\x6d\160\137\x66\x69\x6c\145\137\x6e\141\155\145" => $SE3DBReportTemplate["\163\164\x72\x46\151\154\145\x4e\x61\x6d\x65"], "\x72\160\x74\164\155\160\x5f\156\141\155\x65" => $SE3DBReportTemplate["\163\x74\x72\116\141\x6d\x65"], "\162\x70\164\x74\x6d\x70\x5f\x63\x72\x65\141\x74\x65\x64" => empty($SE3DBReportTemplate["\144\x74\103\162\x65\141\x74\145\x64"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBReportTemplate["\144\164\103\162\x65\x61\164\145\x64"]), "\x72\160\x74\x74\155\160\137\x6c\x61\x73\x74\137\x6d\157\x64\151\x66\x69\x65\144" => empty($SE3DBReportTemplate["\144\x74\x4d\x6f\144\151\x66\x69\145\144"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBReportTemplate["\x64\x74\115\157\x64\x69\146\151\145\x64"]), "\162\160\x74\164\155\x70\x5f\141\x64\x64\x65\144\137\142\171\x5f\x75\x73\145\162" => $SE3DBReportTemplate["\142\x55\x73\x65\x72\x41\x64\144\x65\x64"], "\162\160\x74\164\x6d\160\x5f\x76\151\x73\151\142\x6c\x65\137\151\x6e\137\154\151\x73\x74" => $SE3DBReportTemplate["\142\126\x69\x73\151\142\x6c\145"], "\x72\x70\x74\164\155\x70\137\160\141\x67\145\137\x63\x6f\x75\156\164" => $SE3DBReportTemplate["\156\x50\141\147\x65\103\157\x75\156\x74"], "\162\x70\x74\x74\x6d\x70\x5f\160\141\x70\145\162\137\x73\x69\x7a\x65" => $SE3DBReportTemplate["\163\x74\162\120\x61\160\145\162\123\x69\x7a\x65"]); $this->db->insert("\x74\142\x6c\x5f\162\x63\x72\145\x70\x6f\162\x74\x74\x65\155\x70\x6c\x61\x74\x65", $data); return $this->db->affected_rows(); } public function put_E3ReportTemplates($SE3DBReportTemplate) { $data = array("\x72\160\164\x74\155\160\137\x66\x69\154\x65\x5f\156\x61\x6d\145" => $SE3DBReportTemplate["\x73\164\162\x46\x69\x6c\x65\116\141\x6d\145"], "\162\160\164\164\x6d\160\x5f\x6e\141\x6d\x65" => $SE3DBReportTemplate["\163\164\162\x4e\141\155\145"], "\162\160\164\164\x6d\x70\137\154\141\x73\x74\137\155\x6f\144\151\x66\x69\x65\144" => empty($SE3DBReportTemplate["\144\164\115\157\144\151\146\151\x65\144"]) == true ? currentDateFormat(DATEFORMAT_DATABASE) : currentDateFormat(DATEFORMAT_DATABASE, $SE3DBReportTemplate["\x64\x74\115\157\x64\x69\x66\x69\145\x64"]), "\x72\x70\x74\164\x6d\160\137\166\151\x73\x69\142\x6c\145\137\x69\156\x5f\154\x69\x73\x74" => $SE3DBReportTemplate["\x62\126\x69\x73\x69\142\154\x65"], "\x72\x70\164\164\x6d\x70\x5f\160\x61\x67\x65\x5f\143\157\x75\156\164" => $SE3DBReportTemplate["\156\x50\141\147\145\x43\157\x75\x6e\x74"], "\x72\x70\164\x74\x6d\160\x5f\x70\x61\160\x65\x72\x5f\x73\x69\x7a\145" => $SE3DBReportTemplate["\x73\x74\162\x50\x61\160\x65\162\123\x69\172\x65"]); $this->db->where("\x72\x70\x74\164\x6d\x70\x5f\151\x6e\x64\x65\170", $SE3DBReportTemplate["\x6e\111\156\x64\145\170"]); $this->db->update("\164\142\x6c\x5f\x72\143\162\145\x70\157\162\x74\x74\x65\155\x70\154\141\x74\x65", $data); return $this->db->affected_rows(); } public function get_E3ReportTemplatesByFile($strFileName) { $this->db->select("\x72\x70\x74\x74\x6d\x70\137\151\156\144\x65\170\x2c\40\x72\x70\164\164\x6d\x70\137\x66\151\154\x65\x5f\156\x61\155\x65\54\40\162\x70\164\x74\x6d\160\x5f\156\x61\155\x65\x2c\40\x72\x70\x74\x74\x6d\160\x5f\x63\x72\x65\141\164\x65\x64\x2c\40\162\x70\x74\x74\x6d\x70\137\154\x61\x73\x74\x5f\155\157\144\x69\146\151\145\x64\54\x20" . "\162\x70\164\164\x6d\x70\x5f\141\144\x64\145\x64\137\142\171\x5f\x75\x73\145\162\54\40\162\x70\x74\x74\155\x70\137\166\x69\163\151\142\x6c\145\137\151\156\x5f\x6c\151\x73\164\54\x20\162\x70\164\x74\155\x70\x5f\160\141\147\x65\137\143\157\165\x6e\164\x2c\40\162\x70\164\164\x6d\x70\x5f\x70\141\160\x65\162\137\x73\151\x7a\145"); $this->db->from("\x74\142\x6c\x5f\162\143\162\x65\x70\157\x72\164\x74\x65\x6d\x70\x6c\141\164\x65"); $this->db->where("\162\x70\x74\164\155\x70\x5f\146\151\154\145\x5f\156\141\155\x65", $strFileName); $sE3DBReportTemplate = $this->db->get()->result_array(); if (count($sE3DBReportTemplate) > 0) { return new SE3DBReportTemplate($sE3DBReportTemplate[0]); } else { return VERR_DB_NOSUCHDATA; } } public function put_E3ReportTemplatesByIndexForVisibe($SE3DBReportTemplate) { $data = array("\x72\160\x74\164\x6d\160\137\166\151\163\x69\x62\x6c\x65\x5f\151\x6e\x5f\x6c\151\163\164" => $SE3DBReportTemplate["\142\x56\x69\163\x69\x62\x6c\x65"]); $this->db->where("\162\160\164\x74\155\x70\x5f\151\x6e\x64\x65\170", $SE3DBReportTemplate["\x6e\111\156\x64\145\x78"]); $this->db->update("\164\142\154\x5f\x72\x63\162\x65\160\x6f\162\164\x74\145\x6d\160\154\x61\x74\145", $data); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/E3Reports_model.php b/server/original/www/ezwebserver/src/application/models/E3Reports_model.php index 9d265ca..c856cbc 100644 --- a/server/original/www/ezwebserver/src/application/models/E3Reports_model.php +++ b/server/original/www/ezwebserver/src/application/models/E3Reports_model.php @@ -1,7 +1,7 @@ db->db_debug; $this->db->db_debug = false; $sql = "\xa\40\40\40\40\40\40\x20\40\40\40\x20\40\111\x4e\x53\x45\122\124\40\x49\116\124\x4f\40\x74\142\154\137\x72\x65\x70\157\162\164\x28\xa\x20\x20\40\x20\x20\40\x20\x20\x20\40\x20\40\162\x70\164\137\x63\x68\x61\x72\164\137\156\x6f\54\40\162\160\x74\x5f\164\151\x74\154\x65\x2c\x20\x72\160\x74\x5f\146\x69\154\x65\x5f\x6e\141\x6d\145\54\40\x72\x70\164\137\x63\x6f\155\x6d\145\x6e\164\x2c\40\x72\160\164\137\143\162\145\141\x74\x69\x6f\x6e\137\144\x61\x74\145\x29\12\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\x20\126\x41\x4c\125\x45\123\40\x28\77\x2c\x20\x3f\x2c\x20\77\54\40\x3f\54\x20\x3f\x29"; $this->db->query($sql, array($sE3DBReport["\163\164\162\x43\150\141\162\x74\x4e\x6f"], $sE3DBReport["\x73\x74\x72\124\x69\x74\154\x65"], $sE3DBReport["\x73\x74\162\x46\151\154\x65\116\x61\155\145"], $sE3DBReport["\x73\x74\x72\x43\x6f\155\x6d\x65\156\164"], $sE3DBReport["\164\x69\155\x65\x43\162\145\x61\x74\151\x6f\x6e"])); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function put_E3Reports($sE3DBReport) { $sql = "\12\40\40\40\40\40\40\x20\40\40\40\x20\x20\125\x50\x44\x41\124\x45\40\164\x62\154\137\162\x65\160\x6f\x72\164\xa\40\40\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\x53\105\124\12\x20\40\x20\40\40\x20\40\40\x20\40\40\40\x20\40\x20\x20\x72\160\164\x5f\x74\151\x74\x6c\145\x20\x3d\x20\x3f\x2c\12\x20\40\x20\x20\40\40\x20\40\40\40\40\x20\x20\x20\x20\40\162\x70\x74\137\146\151\154\x65\x5f\156\x61\x6d\x65\40\75\x20\x3f\x2c\12\x20\40\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\x20\x72\160\x74\137\x63\157\x6d\x6d\145\x6e\164\40\75\x20\x3f\xa\40\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\x57\110\105\122\105\x20\x72\160\x74\x5f\151\x6e\144\x65\x78\x20\x3d\40\x3f"; $this->db->query($sql, array($sE3DBReport["\x73\x74\x72\x54\151\x74\x6c\x65"], $sE3DBReport["\x73\x74\x72\x46\x69\154\145\116\141\x6d\145"], $sE3DBReport["\x73\164\162\x43\x6f\x6d\x6d\x65\x6e\x74"], $sE3DBReport["\156\111\x6e\x64\145\170"])); return $this->db->affected_rows(); } public function delete_E3ReportsByIndex($nIndex) { $db_debug = $this->db->db_debug; $this->db->db_debug = false; $sql = "\xa\x20\x20\x20\40\x20\40\x20\x20\x20\40\x20\x20\x44\105\x4c\105\124\105\40\106\x52\x4f\x4d\x20\164\x62\x6c\137\x72\x65\160\x6f\x72\164\xa\40\x20\x20\x20\40\40\40\40\40\x20\x20\40\127\x48\105\122\x45\x20\162\160\164\137\x69\x6e\144\145\170\40\75\40\x3f"; $this->db->query($sql, array($nIndex)); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function get_E3ReportsByChartNo($strChartNo) { $sql = "\xa\x20\x20\40\40\40\x20\x20\x20\40\40\x20\40\x53\x45\114\x45\x43\x54\x20\162\x70\164\x5f\151\156\x64\x65\x78\x2c\40\162\160\x74\x5f\x63\x68\x61\x72\164\x5f\x6e\x6f\54\40\x72\x70\164\137\x74\x69\164\154\145\54\x20\162\160\x74\x5f\146\x69\x6c\145\x5f\x6e\141\155\145\54\x20\162\160\x74\137\x63\157\155\x6d\145\156\x74\x2c\x20\162\160\x74\137\143\x72\x65\x61\164\151\157\156\x5f\x64\x61\x74\x65\12\40\40\x20\40\x20\40\x20\x20\40\x20\x20\x20\106\x52\117\x4d\40\x74\142\x6c\x5f\162\x65\160\157\162\164\12\x20\x20\x20\40\40\x20\40\40\40\40\x20\40\127\x48\x45\x52\x45\x20\162\x70\164\137\143\x68\141\162\x74\x5f\x6e\x6f\x20\x3d\x20\x3f\xa\40\x20\40\x20\40\x20\40\40\40\40\40\40\x4f\x52\x44\105\x52\40\102\x59\40\162\x70\x74\x5f\x63\162\145\x61\x74\151\157\156\x5f\x64\141\x74\145\40\104\x45\x53\x43"; return $this->db->query($sql, array($strChartNo))->result_array(); } public function get_E3ReportsByFile($strFileName) { $sql = "\xa\x20\x20\40\40\40\40\x20\40\40\x20\x20\x20\x53\x45\x4c\x45\x43\x54\x20\162\160\x74\137\x69\156\x64\145\170\54\x20\162\160\164\137\143\x68\x61\162\164\137\x6e\x6f\54\40\x72\x70\164\x5f\164\151\x74\x6c\x65\54\x20\162\x70\164\x5f\x66\x69\x6c\x65\x5f\156\141\x6d\145\x2c\x20\162\160\164\137\143\157\x6d\155\145\156\x74\54\40\x72\x70\x74\x5f\x63\x72\x65\141\x74\x69\x6f\156\137\144\141\164\x65\12\x20\x20\x20\x20\40\x20\x20\40\40\40\40\x20\106\x52\117\115\40\164\x62\x6c\x5f\x72\145\160\x6f\x72\164\xa\x20\x20\40\40\x20\40\40\40\40\40\40\40\127\x48\105\x52\x45\40\x72\160\164\x5f\146\x69\x6c\x65\x5f\156\141\155\145\x20\75\40\x3f"; return $this->db->query($sql, array($strFileName))->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/EventsR2_model.php b/server/original/www/ezwebserver/src/application/models/EventsR2_model.php index 57c086e..26bf8fa 100644 --- a/server/original/www/ezwebserver/src/application/models/EventsR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/EventsR2_model.php @@ -1,7 +1,7 @@ load->enum(); if (EEventLogType::isValidType($eventType) === FALSE) { vt_logw(__METHOD__ . "\x20\47{$eventType}\x27\x20\x69\163\40\x61\40\x69\156\166\141\x6c\151\x64\x20\x65\x76\x65\156\164\x20\154\157\x67\x20\164\x79\160\x65\56"); } load_database($this, "\114\117\x47"); $sql = "\x49\x4e\123\x45\122\124\40\111\x4e\x54\117\40\154\x6f\x67\x5f\x61\165\144\x69\164\163\50\141\x75\x64\x5f\x65\x76\145\156\164\x5f\164\171\160\145\x2c\40\x61\x75\x64\x5f\x61\160\x70\x5f\x6e\141\155\145\54\40\x61\x75\144\137\165\163\145\162\x5f\156\x61\155\145\x2c\x20\141\165\x64\137\x6d\145\x73\x73\x61\x67\145\54\40\x61\165\x64\x5f\143\x72\145\141\x74\x65\144\x29\x20\126\101\114\125\x45\123\x20\50\x3f\x2c\x20\77\54\x20\x3f\54\40\x3f\x2c\40\156\157\x77\x28\51\51"; $this->db->query($sql, array($eventType, $appName, $userName, $message)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/Events_model.php b/server/original/www/ezwebserver/src/application/models/Events_model.php index dd1d825..231aff6 100644 --- a/server/original/www/ezwebserver/src/application/models/Events_model.php +++ b/server/original/www/ezwebserver/src/application/models/Events_model.php @@ -1,7 +1,7 @@ load->enum(); if (EEventLogType::isValidType($eventType) === FALSE) { vt_logw("\145\x76\x65\x6e\x74\x73\x5f\160\x6f\x73\164\40\x41\x70\x69\56\40" . "\x27{$eventType}\47\x20\x69\163\x20\x61\40\151\x6e\166\141\x6c\151\x64\x20\145\166\x65\x6e\164\40\154\157\147\40\164\x79\x70\145\56"); } vt_log_evt(get_called_class(), $eventType, $message); return; } public function post_EventsForSearch($parameters) { $total = $this->getLogAuditsResult($parameters, false); $var = $this->getLogAuditsResult($parameters, true); for ($i = 0; $i < count($var); $i++) { $result[$i] = SEvents::constructWithPostParameter($var[$i]); } if ($total == 0) { return ["\x65\x72\162\x6f\162\x43\x6f\x64\x65" => VERR_DB_NOSUCHDATA]; } return ["\145\x72\162\x6f\162\103\157\x64\145" => VERR_COMMON_SUCCESS, "\x6e\165\x6d\x54\157\x74\141\154\x45\166\x65\x6e\164\x73" => $total, "\x70\141\147\x65\144\105\166\x65\x6e\x74\x73" => $result]; } private function getLogAuditsResult($parameters, $useLimit) { if (array_key_exists("\x65\166\x65\x6e\164\124\x79\160\145", $parameters)) { $eventType = $parameters["\145\x76\145\x6e\x74\x54\171\x70\145"]; } if (array_key_exists("\x61\x70\x70\x4e\141\155\x65", $parameters)) { $appName = $parameters["\x61\160\160\116\x61\x6d\x65"]; } if (array_key_exists("\165\163\145\162\116\x61\155\145", $parameters)) { $userName = $parameters["\x75\x73\x65\162\116\x61\x6d\x65"]; } if (array_key_exists("\x73\164\x61\162\x74\x44\x61\x74\145", $parameters)) { $startDate = currentDateFormat(DATEFORMAT_DATABASE, $parameters["\x73\164\x61\162\x74\x44\141\164\145"]); } if (array_key_exists("\x65\156\x64\104\x61\164\x65", $parameters)) { $endDate = currentDateFormat(DATEFORMAT_DATABASE, $parameters["\145\x6e\x64\x44\x61\164\145"]); } $pageNum = !isset($parameters["\x70\x61\x67\145\116\x75\155"]) || empty($parameters["\160\141\147\x65\x4e\165\x6d"]) ? PAGE_NUM : $parameters["\x70\141\147\x65\116\165\x6d"]; $numRows = !isset($parameters["\156\165\155\122\x6f\167\163"]) || empty($parameters["\x6e\165\x6d\122\x6f\x77\x73"]) ? NUM_ITEMS : $parameters["\x6e\x75\x6d\122\157\x77\163"]; load_database($this, "\114\117\107"); if (isset($appName) && !empty($appName)) { $this->db->where("\141\x75\144\137\x61\x70\x70\x5f\x6e\x61\x6d\x65", $appName); } if (isset($eventType) && !empty($eventType)) { $this->db->where("\x61\x75\x64\137\x65\166\145\x6e\164\x5f\164\x79\x70\145", $eventType); } if (isset($userName) && !empty($userName)) { $this->db->where("\141\x75\144\x5f\165\x73\145\162\137\156\x61\155\145", $userName); } if (isset($appName) && !empty($appName)) { $this->db->where("\141\165\144\137\141\x70\160\x5f\156\x61\x6d\x65", $appName); } if (isset($startDate) && !empty($startDate)) { $this->db->where("\x61\x75\x64\x5f\143\x72\145\x61\164\145\144\x20\76\x3d", $startDate); } if (isset($endDate) && !empty($endDate)) { $this->db->where("\x61\165\x64\137\143\162\145\141\x74\145\144\40\74\75", $endDate); } if ($useLimit === true) { $this->db->select("\52"); $this->db->from("\154\x6f\x67\137\141\165\x64\x69\x74\163"); $this->db->order_by("\141\x75\144\x5f\143\162\145\x61\x74\x65\x64", "\x64\x65\163\143"); $this->db->limit($numRows, $pageNum * $numRows); return $this->db->get()->result_array(); } else { return $this->db->count_all_results("\154\157\147\x5f\141\165\x64\x69\x74\x73"); } } } diff --git a/server/original/www/ezwebserver/src/application/models/ExtraOralDevices_model.php b/server/original/www/ezwebserver/src/application/models/ExtraOralDevices_model.php index 97ff0bd..ddb685e 100644 --- a/server/original/www/ezwebserver/src/application/models/ExtraOralDevices_model.php +++ b/server/original/www/ezwebserver/src/application/models/ExtraOralDevices_model.php @@ -1,7 +1,7 @@ db->query($strQuery, array($strImgFileName))->result_array(); return $this->DBMGetExtraOralDeviceInfoQuery($ret, $sDeviceInfo); } public function DBMGetExtraOralDeviceInfoQuery($ret, &$sDeviceInfo) { if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } $sDeviceInfo = SExtraOralDeviceInfo::constructWithParameter($ret[0]); $strQuery = ''; $strCheckSum = getSmartPayCheckSum($ret, "\144\145\166\x5f\x63\150\x65\143\x6b\x73\165\155", "\144\x65\x76\137\165\163\x65\162\137\144\145\x66\x69\x6e\145\144\137\x34"); if (trim($sDeviceInfo->strCheckSum) != $strCheckSum) { vt_logw("\x44\151\x66\x66\x65\162\145\156\164\40\143\x68\145\143\153\163\x75\x6d\x20\x2e\56\x2e\40\104\145\x76\151\143\145\x20\111\x6e\x66\157\40\x3a\40" . $sDeviceInfo->strDeviceSerialNumber); $sDeviceInfo->eDeviceSalesType = enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice); $sDeviceInfo->eDevicePayStatus = enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); $sDeviceInfo->strUnavailableFeatures = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; $sql = "\12\40\40\40\x20\x20\40\40\x20\40\x20\x20\x20\40\x20\40\x20\125\x50\104\101\124\105\40\x65\62\x5f\x64\145\x76\x69\143\x65\137\151\x6e\x66\x6f\xa\x20\40\40\40\x20\40\40\x20\x20\40\x20\x20\x20\40\40\40\x53\x45\124\x20\144\145\166\x5f\163\141\x6c\x65\x73\x5f\x74\x79\160\x65\40\x3d\x20\x3f\54\xa\x20\40\x20\40\40\x20\40\x20\x20\x20\40\x20\40\x20\40\x20\x64\x65\166\137\163\160\137\x73\x74\141\x74\x75\x73\40\x3d\x20\x3f\x2c\12\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\x64\145\166\137\x73\x70\137\165\156\141\x76\141\151\x6c\141\142\x6c\x65\x5f\146\145\x61\x74\165\x72\x65\x73\40\75\x20\x3f\xa\x20\40\40\x20\x20\x20\x20\x20\40\40\x20\40\x20\x20\40\x20\127\x48\x45\x52\x45\40\144\x65\166\x5f\x73\145\x72\x69\x61\154\137\156\x75\155\40\75\40\x3f"; $this->db->query($sql, array(DeviceSalesTypeToString($sDeviceInfo->eDeviceSalesType), DevicePayStatusToString($sDeviceInfo->eDevicePayStatus), $sDeviceInfo->strUnavailableFeatures, $sDeviceInfo->strDeviceSerialNumber)); $strCheckSum = ''; $ret = $this->DBMGetExtraOralDeviceInfoCheckSum($sDeviceInfo->strDeviceSerialNumber, $strCheckSum, TRUE); } return TRUE; } public function get_ExtraOralDevicesBySNAndChecksumAndUpdate($strDeviceSerialNumber, $strCheckSum, $bUpdateData) { return $this->DBMgetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, $bUpdateData); } public function post_ExtraOralDevicesForCount($eDeviceSalesType) { $sql = "\xa\x20\x20\40\40\40\x20\x20\x20\40\x20\40\40\123\x45\x4c\x45\103\x54\x20\143\x6f\165\x6e\x74\x28\x2a\x29\12\x20\x20\x20\x20\x20\40\x20\x20\x20\40\x20\40\x46\122\x4f\115\x20\x65\x32\x5f\144\145\166\x69\143\x65\x5f\x69\156\146\157\12\40\40\40\40\x20\x20\x20\x20\40\x20\40\x20\x57\x48\105\122\105\x20\144\x65\166\x5f\163\141\154\145\x73\137\x74\x79\160\x65\40\75\x20\77"; return $this->db->query($sql, array(DeviceSalesTypeToString($eDeviceSalesType["\x65\x44\145\x76\151\x63\x65\x53\141\154\x65\x73\124\x79\x70\x65"])))->result_array(); } public function post_ExtraOralDevicesForInfo($sExtraOralDeviceInfo, $bUpdateDeviceInfo, $bCheckSum) { $sql = "\xa\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\x53\x45\114\x45\x43\124\x20\x2a\12\40\x20\40\x20\40\40\40\x20\x20\x20\x20\x20\x46\122\117\x4d\x20\x65\x32\137\x64\145\166\151\143\145\x5f\x69\x6e\x66\157\12\40\40\40\40\40\x20\x20\x20\x20\x20\x20\40\x57\x48\x45\x52\105\x20\144\x65\x76\137\x73\145\x72\x69\141\154\137\x6e\x75\x6d\40\75\40\77\xa\x20\40\40\40\40\x20\40\40\40\x20\x20\x20\x4c\x49\x4d\x49\124\40\61"; $ret = $this->db->query($sql, array($sExtraOralDeviceInfo["\163\164\162\x44\145\166\x69\143\x65\123\145\x72\x69\141\154\116\x75\155\142\145\x72"]))->result_array(); if (count($ret) == 0) { $strFieldList = ''; $strValueList = ''; $strCheckSum = ''; if ($sExtraOralDeviceInfo["\142\x55\160\144\x61\164\x65\x45\170\x70\151\x72\x65\144\104\141\164\145"] === true) { $strFieldList .= "\x2c\x20\x64\x65\166\137\163\x70\137\x65\x78\160\151\162\145\x64\137\x64\x61\x74\145\164\x69\x6d\x65"; $tempString = isset($sExtraOralDeviceInfo["\144\164\x50\x61\171\105\x78\160\151\162\145\144\x44\x61\164\145"]) == false ? "\156\x75\x6c\154" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\x74\120\x61\x79\105\x78\x70\151\x72\145\144\104\141\164\x65"]); $strValueList .= "\54\x20\x27" . $tempString . "\47"; } if ($sExtraOralDeviceInfo["\x62\125\160\x64\x61\164\145\x43\141\156\x63\x65\x6c\145\144\x44\x61\164\x65"] === true) { $strFieldList .= "\x2c\x20\x64\145\x76\137\x73\160\137\x63\141\x6e\x63\145\x6c\x65\144\x5f\144\x61\x74\145\x74\x69\155\145"; $tempString = isset($sExtraOralDeviceInfo["\144\164\x50\x61\171\x43\141\x6e\x63\145\x6c\145\144\x44\141\x74\145"]) == false ? "\x6e\x75\x6c\154" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\x64\x74\x50\x61\x79\x43\141\156\x63\145\x6c\145\144\104\x61\x74\x65"]); $strValueList .= "\54\40\47" . $tempString . "\47"; } $sql = "\xa\40\40\x20\40\x20\x20\40\40\40\40\x20\40\x20\x20\x20\40\x49\116\123\105\x52\x54\x20\111\116\x54\117\40\145\62\x5f\144\145\166\151\143\x65\137\x69\156\x66\157\x28\xa\x20\x20\x20\x20\40\x20\x20\x20\40\40\40\40\x20\40\x20\40\x20\40\x20\x20\144\x65\166\137\163\145\x72\x69\x61\154\x5f\x6e\x75\155\x2c\12\40\x20\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\40\x20\40\144\x65\x76\x5f\x73\x61\x6c\x65\x73\137\164\171\x70\x65\x2c\12\40\40\x20\40\x20\40\40\40\x20\40\40\40\40\x20\x20\x20\40\40\40\40\144\x65\x76\x5f\163\160\137\160\141\x79\137\x63\x6f\x75\156\x74\54\12\40\40\40\40\40\x20\x20\40\x20\x20\x20\40\40\x20\40\x20\x20\x20\40\x20\x64\x65\166\137\x73\160\x5f\164\x79\x70\x65\x2c\40\x64\x65\x76\137\x73\160\137\163\x74\x61\x74\x75\163\54\xa\x20\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\x20\x20\40\x20\40\x20\x20\x64\145\166\137\x73\160\137\x75\x6e\141\x76\141\x69\x6c\141\142\154\145\x5f\146\145\x61\164\165\162\145\x73\54\12\40\40\x20\x20\40\x20\40\40\40\40\x20\x20\40\x20\40\40\40\x20\x20\x20\144\x65\x76\137\x73\160\137\154\141\163\164\137\144\141\164\145\164\151\x6d\x65\54\12\40\x20\40\40\x20\x20\40\40\40\40\x20\40\x20\40\40\40\40\40\x20\x20\144\x65\x76\137\x73\x70\137\160\x61\x79\x5f\155\x61\x78\54\12\40\40\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\40\40\40\x20\40\40\144\145\x76\x5f\143\150\145\x63\x6b\163\165\x6d\x2c\xa\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\40\40\40\40\x64\x65\x76\137\x73\x70\137\165\x70\x64\141\x74\145\137\144\x61\164\145\x74\x69\155\145\x2c\12\40\40\40\x20\x20\x20\40\x20\40\x20\x20\x20\40\x20\40\40\40\40\40\40\x73\x70\137\x61\143\x63\x5f\x75\163\x65\162\156\x61\155\x65" . $strFieldList . "\51\xa\40\x20\40\40\x20\40\40\x20\x20\40\40\x20\40\x20\x20\40\x56\x41\x4c\125\105\123\x20\x28\x3f\54\x20\77\x2c\x20\x27\60\x27\54\40\x3f\54\40\x3f\54\40\77\54\40\x3f\54\40\x3f\54\40\77\54\x20\156\x6f\167\x28\x29\54\x20\77{$strValueList}\51"; $this->db->query($sql, array($sExtraOralDeviceInfo["\x73\x74\162\104\x65\166\x69\143\145\x53\x65\162\x69\141\154\116\165\x6d\142\x65\162"], DeviceSalesTypeToString($sExtraOralDeviceInfo["\145\x44\145\166\151\x63\x65\x53\x61\154\x65\163\x54\x79\160\145"]), DevicePayTypeToString($sExtraOralDeviceInfo["\145\x44\145\x76\151\x63\145\120\x61\171\x54\x79\x70\x65"]), DevicePayStatusToString($sExtraOralDeviceInfo["\x65\x44\x65\166\x69\143\145\120\x61\171\x53\x74\141\x74\x75\163"]), $sExtraOralDeviceInfo["\163\164\x72\x55\x6e\141\x76\x61\x69\x6c\141\142\154\145\106\x65\x61\164\x75\x72\x65\163"], isset($sExtraOralDeviceInfo["\x64\164\x50\141\171\x4c\141\163\x74\x44\x61\x74\145"]) == false ? "\156\x75\x6c\154" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\x74\x50\x61\x79\x4c\141\163\164\104\141\x74\145"]), intval($sExtraOralDeviceInfo["\156\115\141\x78\120\x61\171\x49\x6d\141\147\145"]), $strCheckSum, isset($sExtraOralDeviceInfo["\163\x74\162\123\155\x61\x72\x74\120\141\x79\125\163\x65\162\x49\x44"]) == false ? "\156\x75\x6c\154" : $sExtraOralDeviceInfo["\x73\164\x72\x53\155\141\x72\164\x50\x61\171\x55\x73\145\162\x49\x44"])); $this->DBMgetExtraOralDeviceInfoCheckSum($sExtraOralDeviceInfo["\163\164\x72\x44\145\x76\x69\143\145\x53\145\x72\x69\141\x6c\116\165\155\142\145\162"], $strCheckSum, TRUE); } else { if ($bUpdateDeviceInfo == true) { if ($bCheckSum == true) { $strDBCheckSum = trim($ret[0]["\x64\145\x76\137\x63\150\145\143\x6b\163\x75\155"]); $strCheckSum = ''; getSmartPayCheckSum($ret, "\x64\145\166\137\143\x68\x65\x63\153\163\165\x6d", "\144\145\x76\137\165\x73\145\162\137\x64\x65\x66\x69\x6e\x65\144\137\x34"); if ($strDBCheckSum != $strCheckSum) { $sExtraOralDeviceInfo["\163\164\162\125\156\141\x76\x61\151\x6c\x61\142\154\145\x46\x65\x61\x74\165\162\145\x73"] = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; } } $ret = $this->DBMUpdateExtraOralDeviceInfo($sExtraOralDeviceInfo["\x73\164\162\104\145\x76\151\x63\145\123\x65\x72\151\x61\x6c\116\165\155\x62\x65\162"], null, $sExtraOralDeviceInfo); return $ret; } else { return VERR_DB_OVERLAP; } } return TRUE; } public function put_ExtraOralDevicesBySNForStatus($strDeviceSerialNumber, $parameters) { $sql = "\12\40\x20\x20\40\x20\x20\40\40\x20\40\x20\40\125\120\x44\x41\124\x45\40\145\x32\137\x64\x65\166\151\x63\145\137\x69\x6e\146\x6f\12\40\40\x20\40\x20\x20\x20\40\40\40\x20\40\123\x45\124\12\40\x20\x20\x20\40\40\x20\x20\40\40\x20\40\x20\40\x20\x20\x64\x65\x76\x5f\x73\x70\x5f\x74\x79\x70\x65\x20\x3d\40\77\54\12\x20\40\x20\40\40\40\40\x20\40\x20\40\x20\40\x20\40\x20\144\x65\166\137\163\x70\x5f\163\x74\x61\x74\x75\163\40\75\40\x3f\54\12\40\x20\x20\x20\x20\x20\40\40\x20\x20\x20\x20\x20\40\40\40\144\x65\x76\137\163\x70\137\165\x70\144\x61\164\145\x5f\x64\x61\x74\145\x74\151\155\145\40\75\40\x6e\157\x77\50\51\54\xa\x20\x20\40\x20\40\40\x20\x20\x20\40\40\40\x20\40\40\x20\x73\x70\137\x61\143\143\x5f\x75\163\x65\162\x6e\x61\155\145\40\75\x20\x3f\12\x20\40\40\40\x20\40\x20\x20\x20\40\x20\40\127\x48\105\122\x45\x20\x64\x65\x76\x5f\163\145\162\151\x61\154\137\156\x75\155\x20\x3d\40\x3f\x20\x61\x6e\144\x20\144\145\166\137\x73\x61\x6c\145\x73\137\164\171\x70\x65\40\x3d\40\77"; $this->db->query($sql, array(DevicePayTypeToString(enumToString(new EDevicePayType(), (new EDevicePayType())->eDevicePayPerView)), DevicePayStatusToString($parameters["\x45\104\145\x76\x69\x63\145\120\141\171\123\x74\141\164\x75\163"]), empty($parameters["\x73\164\x72\123\x6d\141\162\164\x50\x61\x79\125\163\145\x72\111\x44"]) == true ? "\156\x75\154\x6c" : $parameters["\163\x74\x72\x53\x6d\x61\x72\x74\x50\x61\x79\x55\163\145\162\x49\x44"], $strDeviceSerialNumber, DeviceSalesTypeToString(enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice)))); $strCheckSum = ''; $ret = $this->DBMGetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, TRUE); return $ret; } public function get_ExtraOralDevicesByChecksumAndImageFileAndUpdate($strImgFileName, $strCheckSum, $bUpdateData) { $strCheckSum = ''; $sql = "\12\x20\x20\x20\40\40\40\40\x20\40\x20\40\x20\123\105\x4c\x45\x43\124\x20\x2a\40\106\122\117\115\40\145\x32\137\144\x65\x76\151\x63\145\137\x69\156\146\x6f"; if (empty($strImgFileName) == false) { $sql .= "\40\127\110\105\122\x45\x20\x64\x65\166\137\163\145\162\151\141\154\137\x6e\x75\x6d\x20\75\x20\50\xa\40\40\40\x20\40\x20\40\40\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\163\x65\x6c\x65\143\164\40\164\162\x69\155\50\144\x65\166\137\x73\145\162\x69\x61\x6c\137\x6e\x75\x6d\51\xa\x20\x20\x20\x20\x20\40\x20\40\40\x20\x20\x20\40\40\x20\40\x20\40\40\x20\x20\40\40\x20\x66\162\157\x6d\x20\x65\62\137\151\155\x67\xa\40\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\40\x20\x20\x77\x68\145\162\x65\x20\151\x6d\147\137\146\x69\x6c\145\x6e\x61\x6d\x65\x20\75\40\x3f\51"; } $ret = $this->db->query($sql, array($strImgFileName))->result_array(); if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } foreach ($ret as $row) { $strCheckSum = getSmartPayCheckSum($row, "\x64\x65\x76\x5f\x63\x68\145\x63\x6b\x73\x75\x6d", "\144\x65\x76\x5f\x75\x73\145\x72\137\x64\x65\x66\151\156\145\x64\x5f\x34"); if ($bUpdateData == TRUE) { $sql = "\12\x20\40\x20\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\x20\40\x20\40\x20\125\120\104\101\x54\x45\40\145\x32\137\x64\145\166\x69\x63\145\x5f\x69\156\x66\x6f\xa\x20\40\40\40\40\40\x20\x20\x20\x20\40\x20\40\40\40\40\x20\40\x20\x20\123\105\124\40\x64\145\x76\137\x63\150\145\x63\x6b\163\165\155\x20\x3d\x20\x3f\xa\x20\40\x20\40\40\x20\x20\x20\40\40\x20\x20\40\40\x20\40\x20\x20\40\40\127\110\105\x52\105\x20\x64\x65\166\x5f\163\145\162\151\141\x6c\x5f\x6e\x75\155\x20\75\40\77"; $this->db->query($sql, array($strCheckSum, $row["\144\145\x76\x5f\x73\145\x72\x69\141\154\137\x6e\x75\x6d"])); } } return TRUE; } public function get_ExtraOralDevices() { $sql = "\123\105\x4c\x45\103\x54\x20\52\x20\x46\122\x4f\x4d\x20\x65\x32\x5f\x64\x65\166\151\143\145\x5f\x69\x6e\146\157\x20\x4f\x52\104\105\x52\x20\102\131\x20\x64\145\166\x5f\x73\x65\x72\151\141\x6c\137\x6e\165\155"; return $this->db->query($sql)->result_array(); } public function put_ExtraOralDevices($sExtraOralDeviceInfo) { $this->db->set("\x64\x65\166\x5f\x73\x70\x5f\x70\141\171\137\x63\x6f\165\156\x74", 0); $this->db->where("\x64\145\x76\137\163\x65\162\x69\x61\x6c\137\x6e\x75\x6d", $sExtraOralDeviceInfo["\163\164\162\104\145\x76\151\143\x65\123\x65\x72\151\x61\154\x4e\165\x6d\142\145\162"]); $this->db->where("\144\x65\166\x5f\x73\x70\137\154\141\x73\x74\x5f\144\141\x74\x65\x74\x69\155\x65\x20\41\x3d", empty($sExtraOralDeviceInfo["\144\164\x50\x61\x79\x4c\x61\163\x74\x44\141\164\145"]) ? null : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\164\120\141\171\x4c\141\163\x74\104\141\164\145"])); $this->db->update("\x65\x32\137\144\x65\x76\151\143\145\137\x69\x6e\x66\x6f"); $data = array("\x64\145\x76\x5f\x73\141\154\x65\x73\137\x74\x79\160\x65" => DeviceSalesTypeToString($sExtraOralDeviceInfo["\145\104\145\x76\151\143\145\x53\141\x6c\145\163\x54\x79\160\145"]), "\144\145\166\137\163\160\x5f\x74\171\x70\145" => DevicePayTypeToString($sExtraOralDeviceInfo["\x65\x44\145\166\151\x63\145\x50\x61\x79\124\171\160\145"]), "\x64\145\166\x5f\x73\160\137\163\x74\141\x74\x75\x73" => DevicePayStatusToString($sExtraOralDeviceInfo["\145\x44\x65\x76\151\143\x65\x50\x61\171\123\x74\x61\164\x75\x73"]), "\144\145\166\137\x73\x70\x5f\165\156\141\166\141\151\154\141\142\x6c\x65\x5f\146\x65\141\x74\165\x72\x65\163" => $sExtraOralDeviceInfo["\163\x74\162\125\156\x61\166\x61\151\x6c\x61\x62\x6c\145\x46\x65\x61\164\165\162\x65\x73"], "\x64\x65\x76\137\163\160\137\x6c\x61\x73\x74\137\x64\141\164\x65\164\151\155\145" => empty($sExtraOralDeviceInfo["\144\x74\120\x61\171\x4c\x61\163\x74\104\141\164\145"]) ? null : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\x64\x74\x50\x61\x79\114\x61\163\x74\x44\141\x74\x65"]), "\144\145\166\137\x73\160\137\160\141\x79\137\155\141\170" => intval($sExtraOralDeviceInfo["\x6e\x4d\141\170\120\x61\171\111\x6d\141\x67\145"]), "\144\x65\x76\x5f\x73\160\x5f\165\160\x64\141\x74\x65\137\x64\141\x74\x65\x74\151\x6d\x65" => "\156\157\x77\50\51", "\163\160\x5f\x61\x63\x63\x5f\165\163\145\162\x6e\141\x6d\x65" => empty($sExtraOralDeviceInfo["\x73\x74\x72\123\x6d\141\x72\x74\x50\141\171\x55\x73\145\x72\x49\104"]) ? null : $sExtraOralDeviceInfo["\163\x74\x72\123\155\141\162\x74\120\x61\171\125\163\145\162\x49\104"]); if ($sExtraOralDeviceInfo["\142\125\160\x64\141\x74\145\x50\141\151\x64\x49\155\x61\x67\145\x43\157\165\x6e\x74"] == true) { $data["\x64\x65\x76\137\163\x70\x5f\x70\141\x79\137\143\x6f\x75\x6e\x74"] = intval($sExtraOralDeviceInfo["\x6e\120\x61\171\111\155\x61\147\145\x43\x6f\165\156\x74"]); } if ($sExtraOralDeviceInfo["\x62\x55\160\144\141\x74\x65\x45\x78\x70\151\x72\x65\144\x44\x61\164\145"] == true) { $data["\x64\145\x76\137\163\x70\x5f\145\170\x70\x69\x72\145\144\137\x64\141\164\x65\x74\x69\155\x65"] = empty($sExtraOralDeviceInfo["\144\164\120\x61\x79\105\170\x70\x69\162\145\x64\x44\x61\164\145"]) ? null : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\x64\x74\120\x61\171\x45\170\x70\151\x72\x65\x64\104\x61\x74\145"]); } if ($sExtraOralDeviceInfo["\x62\x55\160\x64\x61\x74\x65\x43\141\x6e\143\145\154\145\144\104\141\164\145"] == true) { $data["\x64\x65\x76\137\x73\160\137\143\x61\x6e\x63\x65\x6c\x65\x64\137\x64\x61\164\145\x74\x69\155\x65"] = empty($sExtraOralDeviceInfo["\144\x74\120\x61\x79\103\x61\x6e\143\x65\154\145\144\104\x61\164\x65"]) ? null : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\x64\164\120\141\x79\x43\x61\156\143\145\154\x65\144\x44\141\x74\x65"]); } $this->db->where("\x64\x65\166\137\163\145\162\151\x61\x6c\137\156\165\155", $sExtraOralDeviceInfo["\x73\x74\x72\104\145\166\151\143\x65\123\x65\x72\x69\x61\154\116\x75\155\142\x65\x72"]); $this->db->update("\145\x32\x5f\x64\145\x76\x69\x63\145\x5f\151\156\x66\x6f", $data); $ret = $this->DBMGetExtraOralDeviceInfoCheckSum($sExtraOralDeviceInfo["\x73\x74\x72\104\x65\166\151\143\145\123\x65\x72\x69\141\x6c\116\x75\x6d\x62\145\162"], '', TRUE); if ($ret) { return array("\145\162\x72\x6f\162\103\157\x64\145" => VERR_COMMON_SUCCESS); } else { return array("\145\162\162\157\x72\x43\157\x64\x65" => VERR_DB_NOSUCHDATA); } } public function put_ExtraOralDevicesForChecksum($strCondition, $strUpdateValue, $bVerifyCheckSum, $bUpdateData) { return $this->DBMUpdateExtraOralDeviceInfoCheckSum($strCondition, $strUpdateValue, $bVerifyCheckSum, $bUpdateData); } public function get_ExtraOralDevicesBySN($strDeviceSerialNumber) { $sql = "\x53\x45\x4c\x45\103\x54\40\x2a\x20\x46\x52\117\115\40\145\x32\x5f\144\145\166\x69\x63\145\x5f\x69\156\146\x6f\x20\127\x48\x45\x52\105\40\144\x65\x76\137\x73\145\162\151\141\154\x5f\156\165\x6d\40\75\x20\x3f"; return $this->db->query($sql, array($strDeviceSerialNumber))->result_array(); } public function post_ExtraOralDevicesBySN($strDeviceSerialNumber, $eDeviceSalesType) { $eDevicePayType = enumToString(new EDevicePayType(), (new EDevicePayType())->eDevicePayPerView); $eDevicePayStatus = enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); $sql = "\xa\x20\40\x20\40\x20\40\x20\x20\x20\40\40\x20\123\105\114\105\103\124\x20\x2a\12\40\40\x20\x20\40\x20\x20\40\x20\40\40\x20\106\x52\117\115\40\145\62\x5f\144\x65\166\151\143\145\137\151\156\146\157\12\40\40\x20\x20\x20\40\40\40\x20\x20\x20\40\127\110\105\122\105\x20\144\145\x76\137\163\145\162\x69\x61\154\137\x6e\x75\155\x20\75\40\x3f\12\x20\40\x20\40\40\40\x20\x20\x20\40\x20\40\x4c\x49\x4d\x49\124\x20\61"; $ret = $this->db->query($sql, array($strDeviceSerialNumber))->result_array(); if (count($ret) == 0) { $strSalesType = DeviceSalesTypeToString($eDeviceSalesType); $sql = "\xa\40\40\x20\x20\40\40\x20\40\40\40\40\40\40\x20\40\x20\x49\116\123\x45\x52\x54\40\x49\x4e\x54\x4f\40\145\62\137\x64\145\166\x69\143\145\x5f\151\x6e\146\157\40\50\12\40\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\x64\x65\166\x5f\163\145\x72\151\141\x6c\x5f\156\x75\x6d\x2c\xa\x20\40\x20\40\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\40\40\x20\x20\40\x64\x65\166\x5f\x73\141\154\x65\163\x5f\x74\171\x70\145\54\12\x20\x20\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\40\40\x20\40\x20\x20\x20\144\x65\166\x5f\163\x70\137\160\141\171\137\143\x6f\165\x6e\x74\51\xa\40\x20\x20\40\40\x20\x20\40\40\40\40\x20\x20\x20\x20\x20\x56\101\x4c\x55\x45\123\40\x28\x3f\x2c\x20\77\x2c\40\x27\60\47\x29"; $this->db->query($sql, array($strDeviceSerialNumber, $strSalesType)); $strCheckSum = ''; $ret = $this->DBMGetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, TRUE); } else { $eDevicePayType = stringToDevicePayType(trim($ret[0]["\144\x65\x76\x5f\163\x70\x5f\x74\x79\160\145"])); $eDevicePayStatus = stringToDevicePayStatus(trim($ret[0]["\144\x65\166\137\x73\160\x5f\163\164\x61\x74\x75\163"])); $strDBCheckSum = trim($ret[0]["\144\145\166\x5f\x63\x68\x65\143\153\x73\x75\x6d"]); $strCheckSum = getSmartPayCheckSum($ret, "\x64\x65\x76\x5f\x63\x68\x65\x63\153\163\165\x6d", "\x64\x65\x76\x5f\165\163\145\x72\x5f\x64\x65\146\x69\x6e\145\x64\x5f\x34"); if ($strDBCheckSum != $strCheckSum) { $eDevicePayStatus = enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); $sql = "\xa\x20\40\x20\x20\x20\x20\x20\x20\40\40\40\x20\40\40\x20\40\40\40\40\x20\125\120\x44\x41\x54\x45\x20\145\x32\x5f\144\145\x76\x69\143\145\x5f\151\x6e\x66\x6f\xa\x20\x20\40\x20\40\x20\x20\x20\x20\x20\40\x20\40\40\x20\x20\x20\40\x20\x20\123\105\124\12\40\40\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\x20\40\144\x65\166\x5f\163\141\154\145\163\x5f\164\x79\160\x65\x20\x3d\40\77\54\12\x20\x20\x20\x20\40\40\40\x20\40\x20\40\x20\x20\40\40\x20\40\40\x20\x20\x20\40\x20\x20\144\145\166\x5f\x73\x70\x5f\x73\164\141\x74\165\163\x20\75\40\77\x2c\12\x20\x20\40\x20\x20\40\x20\40\40\x20\40\x20\x20\40\40\40\40\x20\40\40\x20\x20\40\40\x64\x65\166\137\163\x70\137\165\156\x61\166\141\x69\x6c\x61\142\x6c\x65\x5f\146\145\x61\x74\165\162\x65\163\x20\75\40\x3f\12\40\x20\x20\x20\40\x20\40\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\40\127\x48\105\x52\x45\40\144\145\166\x5f\163\x65\x72\151\x61\154\137\156\x75\x6d\40\x3d\40\x3f"; $this->db->query($sql, array(DeviceSalesTypeToString(enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice)), DevicePayStatusToString($eDevicePayStatus), SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES, $strDeviceSerialNumber)); $strCheckSum = ''; $ret = $this->DBMGetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, TRUE); } $ret = $this->DBMUpdateExtraOralDeviceInfo($strDeviceSerialNumber, $eDeviceSalesType, null); } return $ret; } public function put_ExtraOralDevicesBySN($strDeviceSerialNumber, $eDeviceSalesType) { return $this->DBMUpdateExtraOralDeviceInfo($strDeviceSerialNumber, $eDeviceSalesType, null); } public function DBMgetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, $bUpdateData) { $sql = "\12\x20\x20\40\x20\40\x20\x20\40\x20\40\40\40\x53\x45\114\105\x43\x54\40\52\xa\x20\x20\x20\40\40\x20\40\40\x20\40\x20\40\106\x52\117\115\x20\145\62\x5f\x64\145\x76\x69\143\145\137\151\x6e\x66\x6f"; if (!empty($strDeviceSerialNumber)) { $sql .= "\40\x57\110\105\x52\105\x20\x64\x65\166\x5f\x73\145\162\x69\x61\154\x5f\x6e\165\155\x20\x3d\40\77"; } $ret = $this->db->query($sql, array($strDeviceSerialNumber))->result_array(); if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } foreach ($ret as $row) { $strCheckSum = getSmartPayCheckSum($ret, "\x64\x65\166\x5f\x63\150\x65\x63\x6b\x73\165\155", "\x64\x65\166\137\x75\x73\145\162\137\x64\145\146\x69\x6e\145\144\137\x34"); if ($bUpdateData === TRUE) { $sql = "\12\x20\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\40\x20\x20\40\x20\x20\40\x20\x55\x50\x44\101\124\105\40\x65\62\x5f\144\145\166\151\143\145\x5f\151\156\146\157\12\x20\40\40\40\40\40\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\123\x45\x54\40\144\145\x76\137\x63\x68\145\x63\153\163\165\155\40\x3d\40\77\12\40\x20\40\40\x20\40\40\x20\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\127\x48\105\122\x45\40\144\145\166\x5f\x73\x65\162\x69\x61\154\137\156\165\155\40\x3d\x20\x3f"; $this->db->query($sql, array(trim($strCheckSum), $row["\x64\x65\166\137\163\145\162\151\141\154\x5f\156\x75\x6d"])); } } return TRUE; } public function DBMUpdateExtraOralDeviceInfo($strDeviceSerialNumber, $eDeviceSalesType, $sExtraOralDeviceInfo) { if (isset($eDeviceSalesType)) { $strSalesType = DeviceSalesTypeToString($eDeviceSalesType); $sql = "\xa\40\x20\x20\40\40\40\40\40\40\x20\x20\40\125\120\x44\x41\124\105\40\145\62\137\144\x65\166\x69\143\x65\x5f\x69\x6e\x66\157\xa\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\40\x53\105\x54\40\x64\x65\x76\x5f\x73\x61\x6c\145\163\137\164\171\x70\x65\40\x3d\40\x3f\xa\40\x20\40\40\40\40\x20\x20\40\40\x20\x20\127\110\x45\122\x45\x20\144\145\x76\137\163\145\162\x69\141\x6c\x5f\156\165\155\x20\x3d\40\77"; $this->db->query($sql, array($strSalesType, $strDeviceSerialNumber)); $strCheckSum = ''; $ret = $this->DBMgetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, TRUE); } else { $strExtraUpdateValue = ''; $sql = "\xa\40\x20\40\40\40\x20\40\x20\40\x20\40\x20\125\x50\104\x41\x54\x45\x20\x65\62\x5f\144\x65\166\x69\143\145\137\x69\156\x66\x6f\12\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\40\x53\105\124\x20\x64\x65\166\137\163\x70\137\x70\x61\171\x5f\143\157\165\x6e\164\x20\x3d\40\60\xa\x20\x20\x20\40\40\x20\40\40\x20\40\40\x20\x57\110\x45\x52\x45\x20\x64\x65\x76\x5f\163\145\x72\x69\141\x6c\x5f\156\x75\155\40\x3d\40\77\x20\141\x6e\144\x20\144\x65\x76\x5f\x73\160\x5f\154\141\x73\x74\x5f\144\141\164\145\164\x69\155\x65\x20\x21\75\40\x3f"; $this->db->query($sql, array($sExtraOralDeviceInfo["\163\164\x72\x44\x65\x76\151\143\145\123\x65\x72\x69\141\154\x4e\165\155\x62\145\162"], isset($sExtraOralDeviceInfo["\144\x74\x50\x61\x79\x4c\x61\x73\x74\x44\141\164\145"]) == false ? null : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\164\x50\141\171\x4c\x61\x73\x74\104\141\164\x65"]))); if ($sExtraOralDeviceInfo["\x62\125\x70\x64\x61\x74\145\120\141\x69\144\x49\x6d\x61\x67\x65\x43\157\165\156\164"] == true) { $strExtraUpdateValue .= "\54\40\144\x65\166\137\x73\160\137\160\141\171\x5f\x63\157\165\x6e\164\40\x3d\x20" . $this->db->escape($sExtraOralDeviceInfo["\x6e\x50\x61\x79\111\x6d\x61\147\x65\103\157\x75\156\x74"]); } if ($sExtraOralDeviceInfo["\142\125\160\x64\x61\x74\145\x45\x78\x70\151\162\x65\x64\x44\141\164\x65"] == true) { $tempString = isset($sExtraOralDeviceInfo["\144\x74\x50\x61\171\x45\170\x70\x69\x72\145\144\104\141\164\145"]) == false ? "\x6e\x75\154\x6c" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\x64\164\x50\x61\171\x45\x78\160\x69\162\145\144\x44\x61\x74\x65"]); $strExtraUpdateValue .= "\54\40\144\145\x76\137\x73\x70\x5f\145\x78\160\151\162\x65\x64\137\x64\x61\164\x65\164\151\x6d\x65\x20\75\x20\x27" . $tempString . "\47"; } if ($sExtraOralDeviceInfo["\142\x55\x70\x64\x61\164\145\x43\141\156\x63\x65\x6c\145\144\104\141\x74\x65"] == true) { $tempString = isset($sExtraOralDeviceInfo["\144\x74\120\141\171\103\x61\156\x63\x65\x6c\145\144\104\x61\x74\x65"]) == false ? "\x6e\x75\x6c\154" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\164\120\x61\x79\103\x61\156\143\x65\154\x65\144\104\141\x74\145"]); $strExtraUpdateValue .= "\x2c\40\x64\x65\166\x5f\x73\160\137\x63\141\x6e\x63\145\154\x65\144\137\144\141\164\x65\164\x69\x6d\145\x20\75\40\47" . $tempString . "\47"; } $sql = "\12\x20\x20\x20\40\40\x20\x20\x20\40\x20\x20\x20\40\40\40\x20\x55\120\x44\101\124\x45\40\145\62\x5f\144\145\x76\x69\x63\145\x5f\x69\156\146\x6f\xa\40\x20\x20\x20\x20\40\x20\40\40\40\40\40\x20\40\40\40\x53\x45\x54\12\40\x20\x20\40\x20\40\x20\40\40\40\x20\40\40\40\40\x20\40\40\x20\x20\x64\145\166\137\x73\x61\154\145\x73\x5f\164\x79\x70\x65\40\75\40\77\x2c\xa\40\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\x20\x20\x20\40\x20\40\40\x64\145\x76\137\x73\x70\x5f\164\x79\x70\145\40\75\x20\x3f\54\12\x20\x20\40\40\x20\x20\40\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\40\144\x65\x76\x5f\163\x70\137\x73\164\141\164\165\163\x20\x3d\40\x3f\54\12\40\40\x20\x20\40\x20\40\x20\x20\x20\40\40\x20\40\40\40\40\40\40\40\x64\x65\x76\x5f\x73\x70\137\165\x6e\x61\x76\x61\151\x6c\x61\142\154\145\x5f\x66\145\141\x74\x75\x72\145\163\40\75\40\77\x2c\xa\x20\40\x20\x20\40\x20\40\40\40\x20\40\x20\x20\x20\x20\40\40\40\40\x20\x64\145\166\137\163\160\x5f\x6c\x61\x73\x74\x5f\144\x61\164\145\x74\x69\155\x65\x20\x3d\x20\x3f\x2c\xa\x20\x20\40\40\x20\40\40\40\40\x20\40\40\x20\40\40\x20\x20\40\40\x20\144\145\x76\x5f\163\x70\137\x70\x61\x79\x5f\155\141\170\x20\75\x20\x3f\54\12\40\x20\x20\40\40\40\40\x20\40\x20\40\40\40\40\40\x20\40\x20\x20\40\x64\x65\x76\137\x73\160\137\165\x70\x64\x61\x74\x65\137\x64\x61\164\x65\x74\151\x6d\145\40\x3d\x20\156\x6f\167\x28\51\54\xa\x20\40\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\40\x20\x20\40\40\x20\x20\163\x70\x5f\x61\143\143\137\x75\x73\x65\x72\156\x61\155\x65\x20\75\40\77{$strExtraUpdateValue}\12\40\x20\40\40\40\40\40\x20\x20\x20\40\x20\x20\40\40\x20\x57\x48\105\122\105\40\144\145\x76\137\163\145\162\151\141\154\x5f\156\165\x6d\40\75\x20\x3f"; $this->db->query($sql, array(DeviceSalesTypeToString($sExtraOralDeviceInfo["\x65\104\145\166\x69\143\145\x53\141\x6c\145\x73\124\171\x70\145"]), DevicePayTypeToString($sExtraOralDeviceInfo["\145\104\145\166\151\x63\145\x50\141\x79\124\x79\160\x65"]), DevicePayStatusToString($sExtraOralDeviceInfo["\x65\104\145\x76\x69\x63\145\x50\x61\171\x53\164\x61\164\165\x73"]), $sExtraOralDeviceInfo["\163\164\x72\125\156\x61\166\141\151\x6c\x61\x62\154\x65\x46\x65\x61\x74\165\x72\x65\x73"], isset($sExtraOralDeviceInfo["\x64\164\120\141\x79\x4c\141\x73\164\x44\x61\x74\x65"]) == false ? "\x6e\165\154\154" : currentDateFormat(DATEFORMAT_DATABASE, $sExtraOralDeviceInfo["\144\164\x50\141\171\x4c\x61\x73\x74\104\141\164\145"]), intval($sExtraOralDeviceInfo["\x6e\115\x61\x78\120\141\171\x49\x6d\141\147\145"]), isset($sExtraOralDeviceInfo["\163\164\x72\x53\x6d\141\162\164\120\141\x79\125\x73\145\162\x49\104"]) == false ? "\x6e\x75\154\x6c" : $sExtraOralDeviceInfo["\163\164\x72\123\x6d\x61\x72\164\120\141\x79\125\x73\x65\x72\x49\104"], $sExtraOralDeviceInfo["\x73\x74\162\x44\145\x76\x69\143\145\x53\145\x72\x69\141\x6c\x4e\x75\x6d\x62\x65\x72"])); $strCheckSum = ''; $ret = $this->DBMgetExtraOralDeviceInfoCheckSum($sExtraOralDeviceInfo["\x73\x74\162\104\x65\x76\x69\143\145\x53\x65\162\x69\x61\154\116\x75\155\142\x65\x72"], $strCheckSum, TRUE); } return $ret; } public function DBMUpdateExtraOralDeviceInfoCheckSum($strCondition, $strUpdateValue, $bVerifyCheckSum, $bUpdateData) { $strCheckSum = ''; $sql = "\xa\x20\40\x20\40\x20\x20\40\40\x20\40\x20\40\x53\x45\114\x45\x43\x54\x20\x2a\xa\x20\40\x20\40\x20\x20\x20\x20\40\x20\x20\x20\106\122\117\115\40\x65\x32\x5f\x64\x65\x76\x69\x63\145\137\x69\156\x66\x6f"; if (!empty($strCondition)) { if (strpos($strCondition, "\x57\110\105\x52\105") === false) { $sql .= "\40\127\110\x45\122\x45"; } $sql .= "\40{$strCondition}"; } $ret = $this->db->query($sql)->result_array(); if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } foreach ($ret as $row) { $strCheckSum = getSmartPayCheckSum($row, "\144\x65\166\x5f\x63\150\145\143\153\163\165\155", "\x64\x65\166\137\165\x73\x65\162\137\x64\145\x66\x69\156\145\x64\137\64"); $strUpdateQuery = $strUpdateValue; $eDevicePayStatus = enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); $strDeviceSerialNumber = trim($row["\x64\x65\166\137\163\x65\x72\x69\x61\154\137\156\165\155"]); $eDevicePayStatus = stringToDevicePayStatus(trim($row["\144\145\166\137\163\160\x5f\x73\x74\x61\x74\x75\163"])); if ($bVerifyCheckSum == true) { $strDBCheckSum = trim($row["\x64\145\x76\x5f\x63\150\145\143\153\163\x75\155"]); if ($strDBCheckSum != $strCheckSum) { $eDevicePayStatus = enumToString(new EDevicePayStatus(), (new EDevicePayStatus())->eDeviceUnpaid); if (empty($strUpdateQuery) == false) { $strUpdateQuery .= "\54"; } $tempParam1 = DeviceSalesTypeToString(enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice)); $tempParam2 = DevicePayStatusToString($eDevicePayStatus); $strUpdateQuery .= "\x64\x65\x76\x5f\163\x61\154\145\163\x5f\x74\171\x70\145\x20\x3d\x20\x27" . $tempParam1 . "\47\x2c\x20\x64\x65\166\x5f\x73\x70\x5f\163\x74\x61\164\x75\163\x20\x3d\x20\x27" . $tempParam2 . "\x27"; $bUpdateData = TRUE; } } if ($bUpdateData == TRUE && empty($strUpdateValue) == FALSE) { $sql = "\xa\40\40\40\40\x20\40\x20\x20\40\40\x20\x20\40\x20\40\x20\40\40\40\40\125\x50\104\101\124\105\x20\145\62\x5f\x64\145\x76\151\143\145\137\x69\156\146\157\12\40\x20\40\40\40\40\40\40\40\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\123\x45\124\40" . $strUpdateQuery . "\x20\127\110\105\122\x45\x20\144\x65\x76\137\x73\145\x72\x69\141\x6c\137\156\165\x6d\40\x3d\40\77"; $this->db->query($sql, array($strDeviceSerialNumber)); $strCheckSum = ''; $this->DBMGetExtraOralDeviceInfoCheckSum($strDeviceSerialNumber, $strCheckSum, TRUE); } } return VERR_COMMON_SUCCESS; } } diff --git a/server/original/www/ezwebserver/src/application/models/FavoritedCategories_model.php b/server/original/www/ezwebserver/src/application/models/FavoritedCategories_model.php index b80bd9a..f58dbd5 100644 --- a/server/original/www/ezwebserver/src/application/models/FavoritedCategories_model.php +++ b/server/original/www/ezwebserver/src/application/models/FavoritedCategories_model.php @@ -1,7 +1,7 @@ db->query($sql, array($nContentId))->row_array(); } public function put_FavoritedCategoriesByContentIDAndIsFavoriteUpdate($nContentId, $bIsFavorite) { $sql = "\12\40\40\x20\40\x20\x20\x20\x20\40\40\x20\40\x55\120\104\x41\124\105\40\x53\103\x5f\103\117\116\124\x45\x4e\124\12\40\x20\40\x20\x20\x20\x20\40\x20\40\40\40\123\105\124\x20\123\103\x5f\103\117\116\124\x45\116\x54\137\106\x41\126\x4f\122\x49\124\105\40\75\x20\x3f\12\x20\x20\x20\x20\40\x20\x20\40\x20\40\x20\40\x57\x48\x45\x52\x45\40\123\x43\x5f\103\x4f\116\x54\x45\x4e\124\137\111\x44\x20\75\40\77\12\40\x20\x20\40\40\x20\x20\40\40\40\x20\x20"; $this->db->query($sql, array($bIsFavorite, $nContentId)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/FavoritedContents_model.php b/server/original/www/ezwebserver/src/application/models/FavoritedContents_model.php index 466c082..01a8817 100644 --- a/server/original/www/ezwebserver/src/application/models/FavoritedContents_model.php +++ b/server/original/www/ezwebserver/src/application/models/FavoritedContents_model.php @@ -1,7 +1,7 @@ db->query($sql, array($where))->result_array(); } public function get_FavoritedContents() { $sql = "\xa\x20\40\40\x20\x20\x20\40\40\40\40\x20\x20\123\105\114\105\x43\x54\40\x2a\12\x20\x20\40\40\40\x20\x20\40\40\40\40\x20\x46\x52\117\x4d\x20\123\103\137\103\x4f\116\x54\x45\116\124\40\101\123\40\103\117\116\12\x20\40\40\40\40\40\40\40\40\x20\x20\40\x4a\x4f\x49\116\x20\x53\103\137\x43\x41\124\x45\x47\117\122\x59\x20\x41\x53\x20\103\x41\x20\117\x4e\x20\x43\x4f\116\56\x73\x63\137\143\141\x74\145\147\157\x72\x79\137\151\144\x20\x3d\x20\x43\101\x2e\163\x63\137\x63\141\x74\x65\147\157\162\x79\137\151\144\12\40\40\x20\40\x20\40\x20\40\40\x20\40\x20\127\110\x45\x52\105\40\103\117\x4e\x2e\x73\x63\137\x63\157\x6e\x74\x65\156\164\x5f\146\x61\166\x6f\x72\x69\164\145\75\40\x74\x72\165\x65"; return $this->db->query($sql)->result_array(); } public function get_FavoritedContentsByIsPremium($bIsPremium) { if ($bIsPremium) { $sql = "\xa\40\40\x20\40\40\x20\40\40\40\40\x20\x20\40\40\40\40\x53\x45\114\105\103\x54\40\x2a\xa\x20\40\x20\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\x20\106\x52\117\x4d\x20\x20\x53\x43\x5f\103\x4f\x4e\124\105\116\x54\40\101\123\x20\143\x6f\156\x74\145\156\x74\40\112\x4f\x49\116\x20\x73\x63\x5f\x63\x61\164\145\x67\x6f\162\x79\x20\101\123\x20\x63\141\x74\145\x67\157\x72\x79\40\117\x4e\x20\143\157\x6e\x74\145\156\164\56\x73\143\x5f\x63\x61\164\145\147\157\162\x79\x5f\151\144\x20\75\40\x63\141\x74\145\147\157\162\x79\x2e\x73\x63\x5f\143\x61\164\x65\147\x6f\162\x79\137\x69\144\xa\x20\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\x20\40\40\x20\127\x48\105\122\x45\x20\143\x6f\156\164\x65\156\x74\x2e\x73\143\x5f\143\157\x6e\164\145\x6e\164\x5f\146\141\x76\157\162\151\x74\145\75\x74\x72\x75\x65"; } else { $sql = "\12\x20\x20\40\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\40\40\123\x45\x4c\105\x43\x54\40\x2a\40\106\122\x4f\115\40\123\x43\137\x43\101\x54\105\x47\117\x52\x59\x20\103\x47\54\40\123\x43\x5f\103\x4f\x4e\x54\x45\x4e\124\x20\103\124\12\x20\x20\x20\40\x20\x20\40\x20\x20\40\40\40\x20\40\x20\40\x57\x48\105\122\105\x20\x43\x47\56\x53\x43\x5f\103\101\124\x45\x47\117\122\x59\137\x54\131\120\105\x20\41\75\40\x32\x20\101\x4e\x44\40\x43\107\56\x53\x43\137\103\101\124\105\x47\117\x52\x59\137\x49\104\40\75\x20\x43\x54\56\x53\x43\x5f\x43\101\x54\x45\107\117\x52\x59\x5f\x49\x44\x20\x20\101\x4e\104\x20\x43\124\56\123\x43\x5f\x43\x4f\x4e\124\x45\x4e\124\137\106\x41\x56\117\122\111\x54\105\x3d\x20\x74\162\x75\x65"; } return $this->db->query($sql)->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/FilePathFinder.php b/server/original/www/ezwebserver/src/application/models/FilePathFinder.php index ffdd17c..5e0e999 100644 --- a/server/original/www/ezwebserver/src/application/models/FilePathFinder.php +++ b/server/original/www/ezwebserver/src/application/models/FilePathFinder.php @@ -1,7 +1,7 @@ _properties = $properties; } function addHandler($handler) { $this->_handler[$handler->getFileType()] = $handler; $this->_handler[$handler->getFileType()]->setProperties($this->_properties); } function setDefaultHandler($handler) { $this->_defaultHandler = $handler; $this->_defaultHandler->setProperties($this->_properties); } function find($fileType, $fileName) { if (array_key_exists($fileType, $this->_handler)) { return $this->_handler[$fileType]->getFilePath($fileType, $fileName); } else { return $this->_defaultHandler->getFilePath($fileType, $fileName); } } } diff --git a/server/original/www/ezwebserver/src/application/models/FilesR2_model.php b/server/original/www/ezwebserver/src/application/models/FilesR2_model.php index 06125c8..fe86766 100644 --- a/server/original/www/ezwebserver/src/application/models/FilesR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/FilesR2_model.php @@ -1,7 +1,7 @@ containsDatagroupOrRecordesetImages($filePath)) { vt_loge(sprintf("\x25\163\x3a\x20\45\163\40\x66\151\x6c\145\40\155\141\171\x20\x62\x65\x6c\x6f\156\147\x20\164\157\x20\x61\x20\144\141\x74\141\x67\162\x6f\165\160\40\157\x72\40\141\40\162\145\143\x6f\162\x64\x73\x65\164\x20\151\x6d\141\x67\x65\x73\x2e", __METHOD__, $filePath)); return createResponse(VERR_E2_IMAGE_IN_GROUP); } load_model($this, "\104\141\x74\141\x66\x69\x6c\145\x5f\155\157\144\145\x6c"); $deleteMainFile = true; if ($fileType === FILETYPE_IMAGE) { if (isset($config) && array_key_exists("\x64\x65\x6c\x65\164\x65\137\160\x61\164\x69\145\x6e\164\x5f\x66\151\154\x65\x73", $config) && $config["\144\x65\154\145\164\145\x5f\x70\141\x74\151\145\156\x74\x5f\x66\151\x6c\x65\x73"]) { } else { $deleteMainFile = false; vt_logi(sprintf("\x25\163\72\x20\x53\x6b\x69\x70\x20\164\x6f\x20\144\x65\154\145\x74\x65\x20\x70\x61\x74\151\x65\x6e\164\40\x69\155\x61\147\145\x20\146\151\x6c\145\163\x3a\40\x25\163\56", __METHOD__, $filePath)); } } if ($deleteMainFile) { $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType($fileType, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); } switch ($fileType) { case FILETYPE_IMAGE: load_model($this, "\x45\62\x69\x6d\x67\137\155\x6f\144\145\x6c"); $this->E2img_model->delete($filePath); if (isset($config) && array_key_exists("\144\x65\x6c\145\x74\x65\137\x70\x61\x74\151\x65\156\164\137\x66\151\154\x65\x73", $config) && $config["\x64\145\x6c\145\164\x65\137\x70\141\x74\x69\x65\156\x74\137\x66\151\x6c\145\x73"]) { $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGTAG, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\x54\x68\x65\x20\x69\x6d\x61\147\x65\40{$filePath}\40\x68\x61\x73\40\x62\145\145\x6e\x20\x64\x65\154\x65\x74\145\x64\x20\146\157\162\x6d\40\x64\141\164\x61\142\x61\x73\x65\56"); } else { vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\124\150\145\x20\x69\155\141\x67\145\40{$filePath}\x20\150\141\163\x20\x62\x65\145\x6e\40\x64\x65\154\x65\164\x65\x64\40\146\x6f\162\x6d\40\144\141\x74\x61\142\141\x73\x65\56" . "\x20\x42\165\x74\40\163\x74\151\154\154\40\x72\x65\x6d\x61\x69\x6e\x73\x20\x69\156\40\x66\151\154\145\x20\x73\x79\x73\x74\145\x6d\x2e"); } $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_FGBPT, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_FFG, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_PROJECT: $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_PRJTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_REPORT: load_model($this, "\x45\x32\162\x70\x74\137\155\x6f\x64\145\154"); $this->E2rpt_model->deleteReportByFileName($filePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_RPTTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; case FILETYPE_IMGRAW: $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_IMGRAW, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataDeleted), "\124\x68\145\x20\151\x6d\x61\147\145\x20{$filePath}\x20\x68\141\x73\40\142\145\x65\x6e\40\144\x65\x6c\145\164\x65\144\40\146\157\162\155\40\x64\x61\164\x61\x62\x61\x73\145\x2e"); break; case FILETYPE_CHART: load_model($this, "\x50\141\x74\x69\145\x6e\164\x43\x68\141\x72\x74\163\137\x6d\157\x64\x65\154"); $this->PatientCharts_model->delete_PatientChartByFileName($filePath); $fileAbsFilePath = $this->Datafile_model->getAbsResourceFilePath(FILETYPE_CHTTHM, $filePath); $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); break; } return createResponse(VERR_COMMON_SUCCESS); } public function containsDatagroupOrRecordesetImages($filePath) { load_database($this, "\105\62\104\x42"); $this->db->where("\145\62\x5f\x69\155\x67\x2e\x69\x6d\x67\137\146\x69\154\145\156\x61\155\145", $filePath); $this->db->where("\50\145\x78\x69\x73\164\163\50\x73\x65\x6c\145\143\x74\40\52\40\146\162\x6f\155\40\145\62\137\144\141\164\141\137\147\162\x6f\165\160\137\151\155\147\x20\167\x68\x65\x72\145\x20\145\62\x5f\144\141\x74\141\x5f\147\x72\x6f\165\x70\x5f\151\x6d\x67\x2e\151\x6d\147\x5f\x69\144\x20\75\x20\x65\62\x5f\x69\x6d\147\x2e\151\155\147\137\151\144\51", NULL, FALSE); $this->db->or_where("\145\x78\x69\x73\164\x73\x28\163\x65\x6c\145\x63\x74\40\x2a\x20\146\x72\157\155\40\x65\62\x5f\x6f\162\164\x68\157\137\x72\x65\143\157\162\x64\163\x65\164\137\151\x6d\141\x67\145\x73\x20\x77\150\145\x72\x65\x20\x65\x32\x5f\157\x72\x74\x68\x6f\x5f\x72\145\143\x6f\162\x64\x73\145\x74\137\151\x6d\x61\147\145\x73\56\x69\x6d\x67\x5f\x69\144\40\x3d\40\x65\62\137\151\x6d\x67\x2e\x69\x6d\147\x5f\x69\x64\51\x29", NULL, FALSE); return $this->db->count_all_results("\145\x32\x5f\x69\155\147") > 0; } } diff --git a/server/original/www/ezwebserver/src/application/models/Files_model.php b/server/original/www/ezwebserver/src/application/models/Files_model.php index 4410cb2..1d0e126 100644 --- a/server/original/www/ezwebserver/src/application/models/Files_model.php +++ b/server/original/www/ezwebserver/src/application/models/Files_model.php @@ -1,7 +1,7 @@ Datafile_model->getAbsFilePathByType($fileType, $fileName); if (!file_exists($panoFilePath)) { return VERR_COMMON_INVALID; } $vpanoFileName = pathinfo($fileName, PATHINFO_FILENAME) . "\56" . EXT_VPANO; $filePath = $this->Datafile_model->getAbsFilePathByType($fileType, $vpanoFileName); checkPostUploadFile("\141\164\x74\141\x63\150\x65\144\x46\151\x6c\x65", $filePath); load_model($this, "\105\x32\151\155\147\137\155\x6f\144\145\x6c"); $ret = $this->E2img_model->updateVPanoImage($chartNo, $fileName, $vpanoFileName, DB_SAVE_VPANO); if ($ret > 0) { return $filePath; } else { return VERR_DB_NOSUCHDATA; } } } diff --git a/server/original/www/ezwebserver/src/application/models/Formulas_model.php b/server/original/www/ezwebserver/src/application/models/Formulas_model.php index 01a2724..64ce74e 100644 --- a/server/original/www/ezwebserver/src/application/models/Formulas_model.php +++ b/server/original/www/ezwebserver/src/application/models/Formulas_model.php @@ -1,7 +1,7 @@ db->select("\157\x74\150\x5f\x66\157\x72\x6d\x75\154\141\137\156\141\155\145\x2c\x6f\164\150\x5f\146\157\x72\155\165\154\x61\137\x69\156\160\x75\x74\137\x74\171\x70\145\x2c\157\x74\x68\x5f\x66\157\x72\x6d\x75\x6c\141\137\157\x75\164\x70\x75\164\137\164\171\x70\145\54\x6f\164\x68\137\x66\157\162\155\x75\x6c\141\137\x69\156\x70\165\164\137\x6e\165\155\x2c\x6f\164\150\137\x66\157\x72\x6d\x75\154\141\x5f\157\x75\164\x70\165\164\x5f\165\156\x69\164\137\164\x79\x70\145\54\157\164\150\137\x66\x6f\162\155\x75\154\141\137\x66\165\156\x63\137\156\141\x6d\145\x2c\x6f\x74\150\137\146\x6f\162\x6d\x75\154\x61\137\144\x65\163\x63\162\x69\160\164\151\157\x6e"); $this->db->from("\145\x32\137\x6f\x72\x74\x68\157\137\x66\157\x72\155\x75\154\x61\x73"); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sFormula = new SFormula($row); array_push($items, $sFormula); } return ["\x65\x72\x72\157\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\146\157\162\155\x75\x6c\x61\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Guidelines_model.php b/server/original/www/ezwebserver/src/application/models/Guidelines_model.php index 2613d79..7a29a88 100644 --- a/server/original/www/ezwebserver/src/application/models/Guidelines_model.php +++ b/server/original/www/ezwebserver/src/application/models/Guidelines_model.php @@ -1,7 +1,7 @@ db->join("\145\x32\x5f\x6f\162\164\x68\x6f\x5f\x69\155\x61\147\x65\x5f\155\x6f\x64\141\x6c\x69\164\x69\x65\x73", "\x65\62\x5f\157\x72\x74\x68\157\137\x67\x75\x69\x64\x65\154\x69\x6e\145\163\x2e\157\164\150\x5f\x69\155\x67\x5f\155\x6f\144\141\x6c\x69\x74\x79\137\151\144\40\x3d\40\145\x32\x5f\157\162\x74\150\157\137\x69\x6d\141\x67\x65\137\x6d\157\x64\141\x6c\151\164\151\145\163\x2e\x6f\164\x68\x5f\151\x6d\x67\137\155\x6f\144\141\x6c\151\x74\x79\x5f\151\144"); $this->db->where("\145\62\137\x6f\x72\x74\x68\x6f\x5f\151\155\141\147\x65\137\155\x6f\x64\141\154\x69\164\x69\x65\163\x2e\x6f\x74\x68\x5f\151\155\x67\x5f\x6d\157\x64\141\x6c\151\x74\x79\137\x6e\141\x6d\x65", $sGuidelineInfoParameter->modality); $this->db->where("\145\x32\137\x6f\x72\164\x68\157\x5f\x67\x75\x69\144\x65\x6c\x69\x6e\145\x73\56\x6f\164\150\137\147\165\151\144\145\154\151\x6e\145\137\156\141\x6d\145", $sGuidelineInfoParameter->name); $q = $this->db->get("\x65\x32\137\x6f\x72\164\150\157\x5f\x67\x75\151\144\x65\x6c\x69\156\145\163"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $this->db->select("\157\x74\150\137\151\x6d\x67\x5f\155\x6f\144\141\154\x69\x74\x79\137\151\x64"); $this->db->where("\157\x74\150\137\x69\x6d\147\x5f\155\x6f\x64\x61\x6c\151\164\171\x5f\x6e\x61\155\145", $sGuidelineInfoParameter->modality); $this->db->limit(1); $select_modalityid = $this->db->get_compiled_select("\145\62\137\157\x72\x74\150\157\x5f\151\x6d\x61\147\x65\x5f\155\157\144\x61\x6c\151\164\x69\x65\x73"); if (!isset($sGuidelineInfoParameter->label) || empty(trim($sGuidelineInfoParameter->label))) { $label = $sGuidelineInfoParameter->name; } else { $label = $sGuidelineInfoParameter->label; } $data = array("\x6f\x74\150\x5f\x67\165\151\144\x65\154\x69\156\x65\137\156\x61\155\145" => $sGuidelineInfoParameter->name, "\157\164\x68\137\x67\165\x69\x64\x65\154\151\x6e\x65\x5f\154\141\142\145\x6c" => $label, "\x6f\x74\x68\x5f\x67\x75\x69\x64\145\154\x69\x6e\145\x5f\x74\x79\x70\145" => $sGuidelineInfoParameter->type, "\157\x74\150\x5f\147\165\x69\x64\145\x6c\151\156\x65\137\165\x73\x65\162\x5f\141\x64\144\145\144" => boolval($sGuidelineInfoParameter->userAdded)); $this->db->set($data); if (isset($sGuidelineInfoParameter->description)) { $this->db->set("\157\x74\150\x5f\147\165\x69\x64\145\154\151\x6e\x65\x5f\x64\x65\x73\143\162\151\160\164\151\x6f\x6e", $sGuidelineInfoParameter->description); } if (isset($sGuidelineInfoParameter->descriptionImage)) { $this->db->set("\x6f\164\x68\x5f\x67\165\151\x64\145\154\x69\x6e\145\x5f\144\x65\163\x63\162\x69\160\x74\x69\157\156\137\x69\x6d\x61\x67\145", "\144\145\143\x6f\144\x65\x28\x27{$sGuidelineInfoParameter->descriptionImage}\x27\x2c\47\x62\x61\163\145\66\x34\x27\x29", FALSE); } if (isset($sGuidelineInfoParameter->starting)) { $this->db->set("\157\164\150\x5f\147\x75\151\x64\x65\x6c\151\156\145\x5f\x73\x74\141\162\x74\151\x6e\147", $sGuidelineInfoParameter->starting); } if (isset($sGuidelineInfoParameter->ending)) { $this->db->set("\x6f\164\x68\137\147\x75\x69\144\x65\154\151\156\x65\x5f\145\x6e\144\x69\x6e\x67", $sGuidelineInfoParameter->ending); } if (isset($sGuidelineInfoParameter->params)) { $this->db->set("\157\164\150\x5f\147\165\151\144\x65\x6c\151\156\145\137\160\x61\162\141\x6d\163", $sGuidelineInfoParameter->params); } $this->db->set("\157\x74\x68\x5f\151\x6d\x67\137\x6d\157\x64\141\x6c\151\x74\171\x5f\x69\x64", "\50{$select_modalityid}\51", FALSE); $this->db->insert("\145\62\137\157\x72\x74\150\x6f\137\x67\x75\x69\144\x65\154\151\156\x65\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_Guidelines($sGuidelineInfoParameter) { load_database($this, "\105\62\x44\102"); $this->db->select("\x65\x32\x5f\x6f\x72\x74\x68\157\137\x67\x75\151\144\145\154\151\x6e\145\x73\x2e\157\164\150\x5f\x67\165\x69\144\145\x6c\151\x6e\145\x5f\x69\x64"); $this->db->from("\145\62\x5f\157\162\164\x68\157\x5f\147\x75\151\144\x65\154\151\156\145\x73"); $this->db->join("\x65\62\137\157\162\164\x68\157\x5f\x69\x6d\141\147\145\137\x6d\157\x64\x61\x6c\x69\164\151\x65\x73", "\x65\x32\137\x6f\162\164\150\x6f\137\x69\155\141\147\x65\x5f\x6d\157\144\141\154\151\x74\x69\x65\x73\56\x6f\164\150\x5f\151\155\147\x5f\155\157\144\x61\154\151\x74\x79\137\151\x64\40\x3d\x20\x65\x32\x5f\157\162\x74\x68\x6f\x5f\x67\165\151\144\x65\x6c\151\x6e\145\x73\x2e\157\164\x68\137\151\155\147\137\x6d\x6f\x64\x61\154\x69\164\x79\x5f\151\x64"); $this->db->where("\x65\x32\x5f\x6f\162\x74\150\157\137\151\155\141\147\145\137\x6d\157\144\x61\x6c\x69\164\151\x65\163\56\x6f\164\x68\x5f\151\155\x67\x5f\x6d\157\x64\141\154\x69\164\171\137\156\141\x6d\145", $sGuidelineInfoParameter->modality); $this->db->where("\145\x32\x5f\157\162\164\x68\x6f\x5f\x67\x75\x69\144\x65\x6c\x69\156\145\x73\56\x6f\x74\x68\137\147\165\x69\144\145\154\151\x6e\x65\x5f\x6e\x61\x6d\145", $sGuidelineInfoParameter->name); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $guideline_id = intval($row->oth_guideline_id); if (isset($sGuidelineInfoParameter->label)) { $this->db->set("\x6f\x74\x68\137\x67\x75\151\x64\x65\154\151\156\145\137\154\141\x62\x65\x6c", $sGuidelineInfoParameter->label); } if (isset($sGuidelineInfoParameter->userAdded)) { $this->db->set("\x6f\x74\150\137\x67\165\x69\x64\145\154\x69\156\145\137\x75\163\x65\162\137\141\144\144\x65\144", boolval($sGuidelineInfoParameter->userAdded)); } if (isset($sGuidelineInfoParameter->type)) { $this->db->set("\x6f\164\150\137\147\165\x69\144\145\x6c\x69\x6e\145\x5f\164\x79\x70\145", $sGuidelineInfoParameter->type); } if (isset($sGuidelineInfoParameter->description)) { $this->db->set("\157\x74\150\137\147\x75\151\144\x65\154\151\x6e\145\x5f\144\x65\163\143\162\x69\x70\164\151\157\156", $sGuidelineInfoParameter->description); } if (isset($sGuidelineInfoParameter->descriptionImage)) { $this->db->set("\157\164\150\x5f\x67\165\x69\x64\x65\x6c\151\156\145\137\x64\145\x73\143\162\151\x70\164\151\x6f\156\137\151\155\141\x67\x65", "\x64\145\x63\x6f\144\x65\x28\x27{$sGuidelineInfoParameter->descriptionImage}\x27\54\47\142\141\163\145\66\x34\47\x29", FALSE); } if (isset($sGuidelineInfoParameter->starting)) { $this->db->set("\x6f\164\150\137\x67\x75\x69\x64\145\x6c\151\x6e\145\137\x73\164\141\162\164\x69\156\x67", $sGuidelineInfoParameter->starting); } if (isset($sGuidelineInfoParameter->ending)) { $this->db->set("\157\164\x68\x5f\x67\x75\151\x64\x65\x6c\151\x6e\145\x5f\145\x6e\144\151\156\x67", $sGuidelineInfoParameter->ending); } if (isset($sGuidelineInfoParameter->params)) { $this->db->set("\x6f\x74\x68\x5f\x67\x75\x69\x64\x65\154\151\x6e\145\137\x70\141\162\141\x6d\163", $sGuidelineInfoParameter->params); } $this->db->where("\x6f\164\x68\137\147\x75\x69\x64\145\x6c\x69\x6e\145\x5f\x69\x64", $guideline_id); $this->db->update("\x65\x32\137\x6f\162\164\150\x6f\137\x67\x75\x69\144\145\154\x69\x6e\145\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function get_GuidelinesP2($modality) { load_database($this, "\x45\62\104\102"); $this->db->select("\x6f\164\150\x5f\x67\165\x69\x64\x65\154\x69\x6e\x65\x5f\156\141\x6d\x65\40\141\x73\x20\156\x61\x6d\x65\x2c\157\164\x68\137\x67\165\x69\144\x65\154\151\156\x65\x5f\154\x61\142\x65\x6c\x20\x61\x73\40\x6c\x61\x62\x65\x6c\54\x6f\164\150\x5f\147\165\151\x64\x65\x6c\151\156\x65\x5f\x75\163\145\162\137\x61\x64\144\145\x64\40\x61\x73\40\165\x73\x65\x72\137\141\x64\x64\145\x64"); $this->db->from("\x65\62\x5f\x6f\162\164\x68\157\137\x67\165\x69\x64\145\x6c\x69\x6e\x65\x73"); $this->db->join("\x65\62\x5f\x6f\162\x74\x68\157\x5f\x69\155\x61\x67\145\137\x6d\157\144\141\x6c\x69\164\x69\145\163", "\145\62\137\x6f\162\164\150\157\137\147\165\x69\144\x65\154\151\x6e\x65\x73\56\157\164\150\x5f\151\155\147\x5f\x6d\x6f\x64\x61\x6c\151\164\171\x5f\151\144\x20\x3d\x20\145\x32\137\x6f\x72\164\x68\x6f\137\151\x6d\x61\x67\145\137\155\x6f\x64\141\x6c\x69\x74\151\145\163\56\157\x74\150\137\x69\155\x67\x5f\155\157\144\141\154\x69\x74\171\x5f\x69\144"); $this->db->where("\x65\62\137\x6f\162\x74\x68\157\x5f\151\x6d\x61\147\145\x5f\155\x6f\144\x61\154\151\164\x69\145\163\x2e\157\x74\x68\x5f\x69\155\x67\137\155\157\144\x61\154\x69\x74\x79\137\x6e\141\x6d\145", $modality); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sGuideline = new SLabeledGuideline($row); array_push($items, $sGuideline); } return ["\x65\x72\162\157\162\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x67\165\151\x64\145\x6c\151\156\x65\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_Guidelines($guidelinename, $modality) { load_database($this, "\x45\x32\x44\x42"); $this->db->select("\x65\62\137\x6f\162\164\150\157\137\147\x75\151\x64\145\154\x69\x6e\145\x73\x2e\x6f\164\150\x5f\147\x75\x69\144\145\154\x69\x6e\145\137\151\144"); $this->db->select("\x65\62\x5f\x6f\x72\164\150\157\137\x67\x75\151\x64\x65\x6c\151\156\145\x73\56\x6f\x74\150\137\147\165\x69\x64\x65\x6c\x69\156\145\x5f\x6e\x61\155\145"); $this->db->select("\x65\62\x5f\x6f\x72\x74\150\157\x5f\x67\165\x69\144\x65\154\151\156\145\163\x2e\157\x74\150\137\147\165\151\x64\145\154\x69\156\x65\x5f\x6c\x61\x62\x65\x6c"); $this->db->select("\x65\62\x5f\157\162\164\150\157\137\147\165\151\x64\x65\154\151\x6e\x65\163\x2e\157\164\150\137\x67\x75\151\144\x65\x6c\151\x6e\x65\x5f\144\145\163\x63\x72\151\x70\x74\x69\x6f\x6e"); $this->db->select("\145\62\x5f\x6f\x72\x74\x68\x6f\137\147\165\151\x64\145\154\x69\156\x65\x73\56\157\x74\150\137\147\x75\x69\x64\x65\x6c\151\x6e\x65\137\164\x79\160\145"); $this->db->select("\x65\62\137\x6f\x72\x74\150\157\137\x67\165\151\144\x65\x6c\151\156\x65\x73\56\157\x74\150\x5f\x67\165\151\x64\x65\154\151\x6e\145\137\165\x73\x65\162\137\x61\x64\144\145\144"); $this->db->select("\145\x32\x5f\x6f\x72\x74\150\x6f\137\x67\x75\151\x64\145\154\151\x6e\x65\x73\x2e\x6f\x74\150\x5f\x67\165\151\144\x65\154\151\156\x65\x5f\x70\x61\x72\x61\155\163"); $this->db->select("\145\62\x5f\157\162\164\150\157\x5f\147\x75\x69\144\x65\x6c\151\156\x65\163\x2e\157\164\x68\x5f\147\x75\x69\144\145\x6c\151\x6e\x65\137\163\x74\141\x72\x74\151\x6e\x67"); $this->db->select("\x65\x32\x5f\x6f\x72\164\x68\157\x5f\x67\x75\x69\x64\x65\154\x69\x6e\x65\x73\56\x6f\164\150\137\147\165\x69\x64\x65\154\x69\x6e\145\137\145\x6e\144\151\156\147"); $this->db->select("\x65\x6e\143\157\x64\145\x28\x65\62\137\x6f\x72\164\x68\x6f\137\147\x75\x69\x64\x65\x6c\151\156\x65\163\56\157\164\x68\x5f\x67\x75\x69\144\x65\x6c\x69\156\x65\x5f\x64\x65\163\x63\162\151\x70\x74\x69\x6f\x6e\137\151\155\x61\147\145\x2c\x20\x27\142\x61\163\x65\66\64\x27\51\x20\x61\x73\40\x6f\164\150\x5f\x67\165\x69\144\145\x6c\x69\x6e\145\137\144\x65\163\143\162\151\x70\164\151\x6f\156\137\151\x6d\141\147\145"); $this->db->from("\x65\x32\137\157\162\164\x68\x6f\x5f\x67\x75\x69\x64\145\x6c\x69\x6e\145\x73"); $this->db->join("\145\62\137\157\162\164\x68\157\x5f\x69\x6d\141\x67\145\x5f\x6d\157\144\x61\154\151\x74\151\x65\163", "\x65\x32\x5f\x6f\162\x74\x68\157\x5f\x67\165\x69\x64\145\x6c\151\x6e\x65\163\x2e\x6f\x74\150\137\151\155\147\x5f\155\x6f\144\141\x6c\x69\164\171\137\151\144\x20\75\x20\x65\62\x5f\157\x72\x74\150\157\x5f\x69\x6d\x61\147\x65\x5f\155\157\144\x61\x6c\x69\x74\151\145\x73\56\x6f\x74\150\137\151\x6d\147\137\155\x6f\x64\141\154\x69\x74\171\137\x69\144"); $this->db->where("\x65\62\x5f\157\x72\x74\150\157\137\x69\155\141\x67\x65\137\155\x6f\x64\x61\154\x69\164\151\x65\x73\56\157\x74\150\137\151\x6d\147\137\x6d\x6f\144\x61\154\x69\164\x79\137\156\x61\x6d\145", $modality); $this->db->where("\x65\62\137\x6f\x72\x74\150\157\x5f\x67\x75\151\x64\x65\154\x69\156\145\x73\56\157\164\150\137\147\165\151\144\145\x6c\151\x6e\x65\x5f\156\x61\x6d\145", $guidelinename); $this->db->limit(1); $guideline_row = $this->db->get()->row(); if (isset($guideline_row)) { $this->db->select("\145\62\137\157\x72\x74\x68\157\x5f\x61\x6e\x61\154\171\x73\x65\163\x2e\157\x74\150\137\141\x6e\x61\154\171\x73\x69\163\x5f\154\141\142\x65\x6c"); $this->db->from("\145\x32\x5f\x6f\x72\164\x68\157\137\x61\x6e\141\x6c\171\x73\145\163"); $this->db->join("\x65\x32\x5f\x6f\162\164\150\x6f\x5f\141\156\141\154\x79\163\151\163\137\147\165\151\144\145\x6c\x69\x6e\x65\163", "\x65\x32\x5f\x6f\x72\164\x68\157\x5f\x61\x6e\141\154\x79\x73\145\x73\x2e\157\164\150\137\x61\156\141\x6c\x79\x73\x69\163\137\151\144\40\x3d\x20\x65\62\137\x6f\x72\x74\x68\x6f\x5f\x61\156\x61\x6c\x79\x73\x69\x73\x5f\x67\x75\151\144\x65\154\x69\156\x65\163\x2e\157\x74\x68\x5f\x61\x6e\141\x6c\x79\163\x69\163\x5f\x69\144"); $this->db->where("\x65\62\137\157\x72\x74\x68\157\x5f\141\156\x61\x6c\171\163\x69\163\137\x67\165\x69\x64\x65\x6c\151\156\145\163\56\157\164\x68\x5f\x67\x75\151\x64\145\154\x69\156\145\x5f\151\144", $guideline_row->oth_guideline_id); $ret = $this->db->get()->result_array(); $sGuidelineInfo = SGuidelineInfo::constructWithRow($guideline_row, array_column($ret, "\157\x74\150\x5f\x61\x6e\141\x6c\x79\x73\151\163\137\154\141\142\145\x6c")); return ["\x65\162\x72\157\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\147\165\x69\144\x65\x6c\x69\156\145\x49\x6e\x66\x6f" => $sGuidelineInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function delete_Guidelines($guidelinename, $modality) { load_database($this, "\105\62\x44\x42"); $this->db->where("\x6f\x74\150\137\151\155\147\137\155\x6f\x64\141\154\x69\164\x79\137\156\x61\x6d\x65", $modality); $this->db->where("\145\x32\137\x6f\x72\164\150\157\137\x69\x6d\141\x67\145\137\155\157\144\141\154\x69\164\x69\145\x73\x2e\x6f\x74\x68\137\x69\155\x67\137\155\157\x64\141\154\151\164\171\x5f\x69\x64", "\145\62\x5f\x6f\x72\x74\150\157\x5f\147\x75\151\144\145\x6c\151\156\x65\x73\x2e\157\x74\x68\137\x69\x6d\147\x5f\155\x6f\144\141\x6c\x69\164\x79\x5f\151\x64", FALSE); $select_modalityid = $this->db->get_compiled_select("\145\62\x5f\x6f\x72\x74\150\157\x5f\151\x6d\141\x67\x65\x5f\155\157\x64\x61\x6c\x69\x74\x69\145\163"); $this->db->where("\x65\x32\x5f\x6f\162\164\x68\157\137\147\x75\x69\x64\x65\154\x69\156\145\x73\56\x6f\x74\150\x5f\147\x75\151\x64\x65\x6c\x69\156\145\137\156\141\x6d\x65", $guidelinename); $this->db->where("\145\170\151\x73\164\x73\50{$select_modalityid}\x29", NULL, FALSE); $this->db->delete("\145\x32\x5f\157\x72\x74\150\x6f\x5f\x67\165\151\144\145\154\x69\x6e\145\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/ICalibrationFileVisitor.php b/server/original/www/ezwebserver/src/application/models/ICalibrationFileVisitor.php index 1ec7d15..f0cc125 100644 --- a/server/original/www/ezwebserver/src/application/models/ICalibrationFileVisitor.php +++ b/server/original/www/ezwebserver/src/application/models/ICalibrationFileVisitor.php @@ -1,7 +1,7 @@ DataGroupImages_model->get_DataGroupImagesByImageNameForImageId($strImageName); if ($imageId != false) { load_model($this, "\x44\x61\x74\x61\x47\162\x6f\165\x70\120\162\157\x6a\145\143\x74\111\x6d\141\147\145\163\137\155\x6f\x64\145\154"); $imageData = $this->DataGroupProjectImages_model->GetE2DataProjectImageDataByImageId($imageId); if (count($imageData) > 0) { $projectId = $imageData[0]["\x67\x72\x6f\165\160\x5f\160\162\x6f\152\137\151\x64"]; load_model($this, "\x44\x61\x74\x61\107\162\157\x75\160\x50\162\x6f\x6a\x65\143\x74\x73\x5f\x6d\157\144\x65\154"); $projectData = $this->DataGroupProjects_model->GetItemsByGroupProjectID($projectId); if (count($projectData) > 0) { $data["\163\x74\x72\120\162\x6f\x6a\145\143\164\x4e\141\x6d\145"] = $projectData[0]["\x67\162\x6f\165\160\137\x70\162\x6f\152\x5f\x6e\141\155\145"]; $data["\163\x74\x72\103\x6f\x6d\160\x61\156\x79\116\x61\x6d\145"] = $projectData[0]["\147\x72\157\165\x70\x5f\x70\x72\x6f\x6a\137\143\x6f\155\137\156\141\155\x65"]; $data["\x73\164\162\x41\160\160\x6c\151\x63\141\164\x69\157\x6e\116\x61\155\x65"] = $projectData[0]["\x67\x72\x6f\x75\160\137\x70\162\157\152\x5f\x61\160\160\137\156\x61\x6d\145"]; $data3rd["\163\164\162\123\145\x72\166\x65\x72\x46\151\x6c\x65\x4e\x61\x6d\145"] = $projectData[0]["\147\162\157\x75\x70\137\160\x72\157\x6a\x5f\x66\x69\154\x65\156\x61\x6d\145"]; $groupId = $projectData[0]["\147\162\x6f\165\x70\137\151\x64"]; $listFullPath = array(); $sql = "\123\x45\114\x45\x43\124\x20\111\x4d\107\x5f\x46\x49\x4c\x45\x4e\x41\115\x45\x20\106\x52\117\x4d\xa\x20\40\40\x20\40\40\40\x20\x20\40\x20\40\40\x20\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\40\40\40\x20\x20\x20\x20\40\x20\x45\62\137\111\x4d\x47\x20\111\116\x4e\x45\122\40\112\117\111\116\x20\105\62\x5f\104\101\124\101\137\107\122\x4f\125\120\137\x49\x4d\x47\x20\x4f\116\40\x45\62\x5f\x49\x4d\107\x2e\111\115\x47\x5f\111\x44\75\105\x32\137\104\101\124\x41\137\x47\122\x4f\125\120\137\111\115\107\x2e\111\x4d\107\137\111\104\12\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\40\40\x20\40\x20\40\x20\40\x20\40\x20\40\40\40\x20\40\40\40\x20\x20\40\40\x20\x20\127\x48\105\122\x45\40\105\x32\x5f\104\x41\124\x41\x5f\x47\122\117\125\120\137\111\x4d\107\x2e\x47\122\x4f\125\x50\x5f\111\x44\40\75\40\x3f"; $groupImages = $this->db->query($sql, array($groupId))->result_array(); if (count($groupImages) > 0) { foreach ($groupImages as $groupImage) { $listFullPath[] = $groupImage["\151\x6d\147\137\x66\151\154\145\x6e\x61\155\145"]; } } $data["\154\151\163\x74\x46\165\154\154\x50\x61\164\150"] = $listFullPath; $data3rd["\144\141\x74\x61"] = $data; return $data3rd; } } } return false; } } diff --git a/server/original/www/ezwebserver/src/application/models/IOSensors_model.php b/server/original/www/ezwebserver/src/application/models/IOSensors_model.php index 6a2ce54..313e32f 100644 --- a/server/original/www/ezwebserver/src/application/models/IOSensors_model.php +++ b/server/original/www/ezwebserver/src/application/models/IOSensors_model.php @@ -1,7 +1,7 @@ load->helper("\x76\164\137\151\157\163\145\x6e\x73\157\162"); } public function get_IOSensorsBySerialNumber($serialNumber) { require_once APPPATH . "\x6d\x6f\144\145\154\163\57\103\141\154\151\x62\x72\141\164\151\157\156\x46\x69\x6c\x65\x73\122\x65\160\x6f\x73\151\164\157\162\x79\x2e\x70\x68\160"; require_once APPPATH . "\x6d\x6f\x64\145\154\163\57\x43\141\154\x69\x62\x72\141\164\x69\x6f\156\x46\x69\154\145\x73\124\157\111\156\x66\x6f\x56\151\163\151\x74\157\x72\x2e\x70\x68\160"; $result = array(); $repository = new CalibrationFilesRepository($result); $ret = $repository->travel(new CalibrationFilesToInfoVisitor(), $serialNumber); if ($ret["\x65\162\162\x6f\162\x43\157\x64\x65"] == VERR_COMMON_SUCCESS) { return array("\x65\162\x72\157\162\103\157\144\145" => VERR_COMMON_SUCCESS, "\143\141\154\151\142\162\x61\164\151\x6f\156\106\x69\154\x65\x73" => $ret["\x72\145\x73\x75\x6c\x74"]); } else { return $ret; } } } diff --git a/server/original/www/ezwebserver/src/application/models/ImageFileInfos_model.php b/server/original/www/ezwebserver/src/application/models/ImageFileInfos_model.php index 6500869..8455e8e 100644 --- a/server/original/www/ezwebserver/src/application/models/ImageFileInfos_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImageFileInfos_model.php @@ -1,7 +1,7 @@ Datafile_model->getAbsFilePathByType(FILETYPE_IMAGE, combineFilePath(array($strServerFilePath))); if ($fileAbsFilePath === false) { $data["\x62\105\170\151\163\164\163"] = false; $data["\x6e\x46\151\154\145\123\x69\x7a\x65"] = 0; $data["\163\164\162\x46\x69\154\x65\x50\141\x74\x68"] = $strServerFilePath; } else { $data["\x62\105\x78\x69\163\164\x73"] = true; $data["\x6e\x46\x69\x6c\145\x53\x69\172\145"] = filesize($fileAbsFilePath); $data["\163\164\162\x46\x69\x6c\x65\120\x61\164\x68"] = basename($fileAbsFilePath); } return $data; } } diff --git a/server/original/www/ezwebserver/src/application/models/ImagesR2_model.php b/server/original/www/ezwebserver/src/application/models/ImagesR2_model.php index 8091f42..9ba8ac8 100644 --- a/server/original/www/ezwebserver/src/application/models/ImagesR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImagesR2_model.php @@ -1,7 +1,7 @@ Images_model->post_ImagesInGroup(["\x69\155\141\x67\x65\x46\151\154\x65\x4e\141\x6d\145\163" => $imageFileNames]); $images_in_group_at_least = false; foreach ($ret_images_in_group["\151\155\141\147\x65\106\x69\154\145\163"] as $imageFile) { if ($imageFile["\151\163\x49\156\x47\162\157\165\160"] === true) { $images_in_group_at_least = true; break; } } if ($force === false && $images_in_group_at_least === true) { return ["\145\x72\x72\157\162\103\x6f\144\x65" => VERR_E2_IMAGE_IN_GROUP, "\151\x6d\141\x67\145\106\x69\154\145\163" => $ret_images_in_group["\151\x6d\141\147\145\106\x69\154\x65\163"]]; } $sql = "\x53\x45\x4c\x45\103\124\x20\120\101\124\137\x49\104\40\x46\122\117\115\x20\x45\x32\137\120\x41\x54\x20\127\x48\105\122\105\x20\x50\101\124\137\103\110\101\x52\124\x4e\117\40\75\x20\x3f"; $query = $this->db->query($sql, array($targetChartNo))->result_array(); if (count($query) > 0) { foreach ($query as $row) { $nPatID = $row["\160\x61\164\x5f\151\x64"]; } $image_ids_datagroups = $this->getImageIdsInDataGroups($imageFileNames); if (count($image_ids_datagroups) === 0) { vt_loge(sprintf("\45\x73\72\x20\116\157\x20\151\155\x61\147\x65\163\x20\151\156\40\x64\141\x74\x61\147\x72\157\165\x70\163\40\164\x6f\40\164\x72\141\x6e\146\x65\x72\72\x20\45\x73", __METHOD__, json_encode($imageFileNames))); } $this->db->select("\151\x6d\x67\x5f\151\x64"); $this->db->where_in("\x69\x6d\147\x5f\146\151\154\145\x6e\x61\155\145", $imageFileNames); $query_select_image_ids = $this->db->get_compiled_select("\x65\62\x5f\151\155\x67"); $primary_ct_images_datagroup_ids = $this->getDataGroupIdsOfPrimaryCTImages($imageFileNames, $query_select_image_ids); if (count($primary_ct_images_datagroup_ids) === 0) { vt_loge(sprintf("\45\x73\72\x20\116\157\x20\160\x72\151\x6d\x61\x72\171\x20\x43\x54\x20\151\155\x61\147\x65\163\40\x66\x6f\x75\x6e\144\72\40\45\163", __METHOD__, json_encode($imageFileNames))); } $this->db->trans_start(); foreach ($imageFileNames as $row) { $sql = "\x55\120\104\101\x54\105\40\x45\62\137\x49\115\107\x20\123\105\x54\40\x50\x41\x54\137\111\104\x20\x3d\40\77\54\120\101\x54\x5f\103\x48\101\x52\x54\116\117\40\x3d\x20\x3f\40\x57\x48\105\122\x45\40\111\x4d\107\x5f\x46\111\114\105\x4e\x41\115\x45\40\x3d\40\x3f"; $this->db->query($sql, array($nPatID, $targetChartNo, $row)); $jsonEncode = json_encode($imageFileNames); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataTransfered), "\x54\x72\x61\156\x73\x66\x65\162\x72\x65\x64\x20\151\155\x61\147\145\x2e\40\x43\x68\x61\162\x74\40\156\157\x20\x3a\40{$targetChartNo}\54\40\x46\x69\x6c\145\x20\156\x61\155\145\x20\72\x20{$jsonEncode}"); } if ($images_in_group_at_least === true) { $this->deleteDataGroups($query_select_image_ids); $this->deleteRecordsets($query_select_image_ids); $this->db->select("\147\56\147\162\x6f\165\x70\137\151\x64\x20\147\x72\157\x75\x70\x5f\x69\x64\x2c\40\143\157\165\156\164\x28\x2a\51\40\x6e\x75\x6d\142\145\162\x5f\157\x66\x5f\151\155\x61\147\x65\x73"); $this->db->from("\145\x32\137\x64\x61\164\141\137\147\162\157\x75\160\x20\x67"); $this->db->join("\x65\62\x5f\144\x61\164\141\137\147\x72\157\x75\160\x5f\x69\x6d\x67\40\151", "\x67\x2e\x67\162\x6f\x75\160\137\151\x64\x20\75\x20\x69\x2e\147\162\157\165\160\x5f\151\x64"); $this->db->group_by("\147\56\x67\x72\x6f\165\160\x5f\x69\x64"); $count_images_in_datagroups = $this->db->get()->result_array(); foreach ($count_images_in_datagroups as &$row) { if ($row["\x6e\x75\x6d\x62\145\x72\137\157\x66\x5f\151\x6d\x61\x67\x65\163"] === 0) { $this->db->where("\147\162\x6f\165\x70\x5f\x69\144", $row["\x67\162\157\165\x70\137\151\x64"]); $this->db->delete("\x65\62\137\x64\141\x74\x61\137\x67\x72\157\x75\x70"); if ($this->db->affected_rows() === 0) { vt_loge(sprintf("\x25\x73\72\40\116\157\x20\144\x61\x74\141\x20\147\x72\x6f\165\160\40\144\145\154\x65\x74\145\x64\72\40\x25\163", __METHOD__, $row["\147\x72\157\165\160\x5f\151\144"])); } } } if (count($primary_ct_images_datagroup_ids) > 0) { $this->db->where_in("\x67\162\157\165\160\137\x69\144", $primary_ct_images_datagroup_ids); $this->db->delete("\145\62\137\x64\141\164\x61\x5f\147\162\157\x75\160"); } } $this->db->trans_complete(); if ($this->db->trans_status() === false) { vt_loge(sprintf("\45\163\x3a\x20\106\x61\151\154\x65\144\x20\x74\157\x20\164\162\x61\x6e\x73\x66\145\x72\40\151\155\141\x67\x65\72\x20\x74\x72\141\156\163\141\x63\x74\x69\x6f\x6e\x20\146\x61\151\154", __METHOD__)); } return ["\x65\162\x72\x6f\x72\103\157\x64\x65" => VERR_COMMON_SUCCESS, "\x69\155\141\x67\x65\x46\x69\x6c\145\x73" => $ret_images_in_group["\151\x6d\x61\x67\x65\106\151\x6c\145\x73"]]; } else { return ["\145\162\162\x6f\x72\x43\157\x64\x65" => VERR_DB_INVALIDDATA]; } } public function getImageIdsInDataGroups($imageFileNames) { $this->db->where_in("\x69\x6d\147\137\146\x69\x6c\x65\x6e\x61\155\145", $imageFileNames); $query_select_images = $this->db->get_compiled_select("\x65\x32\137\151\x6d\x67"); $this->db->select("\x67\162\x6f\165\x70\x5f\151\155\x67\137\151\144\x2c\40\147\x72\x6f\x75\160\x5f\x69\x64\x2c\40\x69\x6d\x67\137\151\144", $query_select_images); $this->db->from("\x65\x32\x5f\x64\141\164\x61\x5f\147\x72\157\165\x70\137\x69\x6d\x67"); $image_ids_datagroups = $this->db->get()->result_array(); return $image_ids_datagroups; } public function getDataGroupIdsOfPrimaryCTImages($imageFileNames, $query_select_image_ids) { $this->db->select("\147\162\157\165\x70\x5f\x69\x64"); $this->db->from("\x65\x32\137\144\141\164\141\x5f\147\162\x6f\165\x70\137\151\x6d\147"); $this->db->where("\147\162\x6f\165\160\137\151\x6d\147\137\x61\165\x74\157\137\162\x65\x67", true); $this->db->where("\147\x72\157\165\x70\x5f\151\x6d\x67\x5f\x6d\157\144\x61\154\x69\x74\171", "\x43\124"); $this->db->where("\x69\x6d\147\137\151\x64\40\111\116\x20\50{$query_select_image_ids}\51", NULL, FALSE); $primary_ct_images_datagroup_ids = array_values($this->db->get()->result_array()); $datagroup_ids = []; foreach ($primary_ct_images_datagroup_ids as $id) { array_push($datagroup_ids, $id["\x67\162\157\x75\160\x5f\151\x64"]); } return $datagroup_ids; } public function deleteDataGroups($query_select_image_ids) { $this->db->where("\x69\155\x67\137\x69\x64\x20\x49\116\x20\50{$query_select_image_ids}\x29", NULL, FALSE); $this->db->delete("\145\62\137\144\x61\x74\x61\137\x67\162\x6f\x75\x70\x5f\x69\x6d\x67"); } public function deleteRecordsets($query_select_image_ids) { $this->db->where("\151\155\147\x5f\151\x64\x20\x49\x4e\x20\50{$query_select_image_ids}\x29", NULL, FALSE); $this->db->delete("\x65\62\137\157\162\164\150\157\x5f\x72\x65\143\x6f\162\x64\163\x65\x74\137\x69\x6d\141\147\x65\163"); } public function getGroupImageIDs($chartNo) { load_database($this, "\x45\x32\104\x42"); $sql = "\123\x45\114\x45\103\124\x20\x67\162\157\165\160\137\151\x6d\x67\x5f\x69\x64\40\106\x52\x4f\x4d\40\x65\62\137\144\x61\x74\141\x5f\x67\x72\157\x75\x70\x5f\151\x6d\x67\40\127\110\105\x52\105\x20\147\162\x6f\x75\160\137\x69\144\x20\75\x20" . "\50\123\105\114\x45\103\124\x20\147\x72\x6f\165\160\x5f\151\x64\x20\106\x52\117\115\40\x65\x32\137\x64\x61\164\x61\x5f\147\x72\157\165\160\x20\127\x48\105\122\x45\x20\160\141\x74\x5f\x69\x64\40\75\40" . "\x28\x53\105\x4c\x45\103\124\40\160\x61\x74\x5f\x69\x64\x20\x46\x52\117\115\40\145\x32\x5f\x70\141\164\40\127\110\x45\122\105\x20\x70\141\164\137\x63\x68\x61\162\x74\x6e\157\x20\x3d\x20\77\x29\51"; return $this->db->query($sql, array($chartNo))->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/Images_model.php b/server/original/www/ezwebserver/src/application/models/Images_model.php index 5833bb8..a75e4f7 100644 --- a/server/original/www/ezwebserver/src/application/models/Images_model.php +++ b/server/original/www/ezwebserver/src/application/models/Images_model.php @@ -1,7 +1,7 @@ db->count_all($tableName); } public function get_ImagesByFileForId($strImgFileName) { $sql = "\123\x45\114\x45\103\124\x20\x49\115\x47\x5f\111\104\x20\x46\122\x4f\115\x20\x45\62\x5f\111\115\107\40\127\110\105\122\105\x20\x49\x4d\x47\137\x46\x49\114\105\116\101\115\x45\x20\75\x20\77"; return $this->db->query($sql, array($strImgFileName))->result_array(); } public function get_ImagesByFile($parameters) { $sql = "\x53\105\114\105\103\124\x20\105\x32\137\x49\115\107\x2e\x2a\54\50\x53\x45\x4c\x45\x43\x54\40\x73\x70\137\x69\155\147\x5f\160\x61\x79\x5f\163\164\141\x74\x75\163\x20\106\122\117\x4d\40\x65\62\137\163\x6d\141\162\164\160\x61\x79\137\151\155\x61\x67\145\40\127\x48\x45\x52\105\40\151\155\x67\x5f\x69\144\x20\x3d\40\x45\62\x5f\111\x4d\x47\56\151\x6d\147\x5f\x69\x64\51\40\x46\x52\117\115\x20\105\x32\x5f\x49\x4d\107\x20\127\x48\105\x52\x45\40\111\x4d\x47\x5f\106\111\114\105\x4e\x41\115\105\40\x3d\40\x3f"; return $this->db->query($sql, $parameters)->result_array(); } public function put_ImagesByFile($strImgFileName, $imgInfo) { $sql = "\12\40\40\x20\x20\x20\40\x20\x20\x20\40\40\40\x55\120\x44\x41\x54\105\x20\x45\x32\137\111\115\x47\12\40\x20\40\x20\40\x20\x20\40\x20\x20\40\40\x53\105\x54\12\x20\40\x20\x20\x20\40\40\40\x20\x20\40\40\x20\40\x20\x20\x49\115\x47\137\x41\103\x51\x55\111\123\111\124\x49\117\116\x5f\x44\x41\x54\105\x54\x49\115\105\40\x3d\40\x3f\x2c\xa\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\40\x20\x20\40\x49\115\x47\x5f\x4b\126\x50\x20\x3d\40\77\x2c\xa\x20\40\40\40\x20\x20\x20\40\40\40\40\40\40\40\40\x20\111\115\x47\137\115\101\x20\x3d\40\x3f\54\xa\40\40\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\40\40\x20\111\x4d\x47\x5f\104\117\123\105\x20\75\40\x3f\xa\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\x57\110\105\x52\105\x20\111\115\107\137\106\111\x4c\105\x4e\101\115\x45\40\x3d\x20\77"; $this->db->query($sql, array($imgInfo["\x64\164\x41\143\x71\124\151\155\x65"], $imgInfo["\x66\x4b\x76\160"], $imgInfo["\146\x4d\141"], $imgInfo["\x66\x44\x6f\163\x65"], $strImgFileName)); return $this->db->affected_rows(); } public function put_ImagesByFileForModality($strImgFileName, $modality) { $sql = "\xa\x20\x20\40\40\x20\40\x20\x20\40\40\x20\40\x55\x50\104\101\124\105\40\x45\x32\x5f\111\115\x47\xa\40\40\40\40\x20\x20\40\40\40\40\40\x20\123\x45\x54\40\x49\x4d\107\x5f\115\x4f\x44\101\114\x49\x54\x59\x20\x3d\40\77\12\x20\x20\x20\40\40\40\40\40\x20\40\40\x20\x57\x48\x45\x52\105\x20\x49\x4d\x47\x5f\x46\111\x4c\x45\116\x41\x4d\x45\40\x3d\x20\x3f"; $this->db->query($sql, array($modality, $strImgFileName)); return $this->db->affected_rows(); } public function put_ImagesByFileForAcqMode($strImgFileName, $strAcqMode) { $sql = "\12\40\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\x55\x50\104\x41\124\x45\x20\x45\x32\137\x49\x4d\x47\xa\x20\40\40\x20\x20\40\40\40\40\40\x20\x20\x53\x45\x54\x20\111\x4d\x47\x5f\x4d\117\104\105\40\x3d\x20\77\xa\x20\x20\40\40\40\x20\40\x20\40\x20\40\40\x57\x48\105\122\x45\40\x49\x4d\x47\137\x46\x49\x4c\105\x4e\x41\x4d\105\40\x3d\x20\77"; $this->db->query($sql, array($strAcqMode, $strImgFileName)); return $this->db->affected_rows(); } public function post_ImagesForSourceID($strNode) { $nStartPos = strrpos($strNode, "\x3c\x4d\107\x3e"); $eEndPos = strrpos($strNode, "\x3c\x2f\x4d\107\x3e"); if ($nStartPos === false || $eEndPos === false) { return false; } else { return substr($strNode, $nStartPos, $eEndPos - $nStartPos); } } public function put_ImagesForSourceID($imageInfo, $nSourceID) { $nImgID = 0; $nPatID = 0; $bSmartPayImage = false; $sql = "\123\105\114\105\x43\124\x20\x69\x6d\x67\137\x69\144\x20\x46\122\x4f\115\40\x65\62\x5f\x69\x6d\x67\x20\127\x48\x45\122\x45\40\151\x6d\147\137\x66\x69\x6c\x65\x6e\x61\155\145\x20\x3d\40\77"; $query = $this->db->query($sql, array($imageInfo["\x73\164\x72\111\x6d\147\x46\x69\154\145\116\x61\155\x65"]))->result_array(); foreach ($query as $row) { $nImgID = $row["\151\x6d\x67\x5f\151\x64"]; } if ($nImgID == 0) { $sql = "\x53\105\114\105\103\124\40\x70\141\164\x5f\x69\x64\40\106\122\117\x4d\x20\x65\x32\137\x70\141\164\x20\127\x48\105\x52\x45\40\160\x61\x74\x5f\143\x68\x61\x72\x74\x6e\157\40\75\x20\x3f"; $query = $this->db->query($sql, array($imageInfo["\163\164\x72\103\150\141\x72\164\116\157"]))->result_array(); if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } foreach ($query as $row) { $nPatID = $row["\160\141\164\x5f\151\144"]; } if ($nPatID == 0) { $sql = "\111\x4e\123\x45\x52\124\x20\x49\116\x54\117\40\x45\62\x5f\111\x4d\x47\x20\x28\x49\x4d\107\x5f\106\111\114\x45\x4e\x41\115\105\54\40" . "\111\115\x47\x5f\x4d\x4f\104\101\x4c\x49\x54\x59\54\40" . "\x49\x4d\x47\137\x4d\117\x44\x45\x2c" . "\111\x4d\107\x5f\x41\103\121\125\111\123\x49\124\x49\117\x4e\x5f\x44\x41\124\105\124\111\x4d\105\54\x20" . "\x49\x4d\x47\x5f\x49\x4d\120\x4f\x52\124\105\x44\x2c\x20" . "\x49\115\107\x5f\113\x56\x50\54\x20" . "\x49\x4d\107\137\115\x41\x2c\x20" . "\x49\115\x47\137\104\x4f\x53\x45\54\40" . "\111\x4d\x47\x5f\x45\130\x50\x4f\123\125\122\105\137\x54\x49\115\105\x2c\40" . "\x49\x4d\x47\x5f\x52\x41\x57\x5f\106\111\x4c\105\x4e\x41\115\x45\54\40" . "\x49\x4d\x47\x5f\125\120\104\101\124\105\x5f\104\x41\x54\105\x54\x49\x4d\105\54\x20" . "\x49\115\107\137\x4d\x4f\104\105\x4c\116\101\115\x45\x2c\40" . "\111\115\107\x5f\x4e\x4f\124\105\54\x20" . "\120\x41\x54\137\x43\110\101\122\x54\116\117\54\x20" . "\x49\115\x47\x5f\x53\x54\x55\104\131\x5f\111\x4e\x53\x54\101\116\103\x45\137\x55\x49\104\x2c\40" . "\111\x4d\x47\137\125\123\x45\x52\x5f\104\x45\x46\111\x4e\105\x44\x5f\x39\54\40" . "\144\x65\166\x5f\163\145\x72\x69\x61\x6c\x5f\156\x75\x6d\54\x20" . "\111\x4d\x47\137\x55\123\x45\122\x5f\104\x45\x46\111\x4e\105\x44\137\x31\x31\54\x20" . "\111\x4d\107\137\x53\x4f\x55\x52\103\x45\137\x54\x59\x50\105\51\40\x56\x41\x4c\125\x45\x53\40\x28\77\x2c\77\x2c\77\54\x3f\54\77\54\77\54\77\x2c\77\54\77\x2c\x3f\x2c\x3f\54\77\54\77\54\x3f\54\77\x2c\77\54\x3f\x2c\x3f\54\x3f\x29"; $this->db->query($sql, array($imageInfo["\x73\164\162\x49\155\x67\x46\151\x6c\145\x4e\x61\x6d\x65"], modality_api_str_to_modality_db_str($imageInfo["\155\157\144\x61\x6c\x69\x74\x79"]), $imageInfo["\x73\x74\x72\101\143\x71\x4d\x6f\144\x65"], currentDateFormat(DATEFORMAT_DATABASE, $imageInfo["\x64\x74\x41\x63\x71\124\151\155\145"]), $imageInfo["\x62\111\163\x49\x6d\x70\x6f\x72\x74\145\144"], $imageInfo["\x66\113\x76\x70"], $imageInfo["\146\x4d\x61"], $imageInfo["\146\104\x6f\163\145"], $imageInfo["\x66\x45\170\160\157\163\x75\162\145\124\x69\155\x65"], $imageInfo["\x73\x74\162\x52\141\167\x46\x69\x6c\145\116\x61\155\x65"], currentDateFormat(DATEFORMAT_DATABASE, $imageInfo["\x64\164\x55\x70\x64\141\x74\x65\104\x61\164\x65\124\x69\155\x65"]), $imageInfo["\163\164\x72\x4d\157\144\145\x6c\116\141\155\x65"], $imageInfo["\x73\164\x72\116\x6f\x74\x65"], $nPatID, $imageInfo["\163\x74\162\103\150\x61\162\164\116\x6f"], $imageInfo["\x73\x74\x72\123\164\165\x64\171\111\x6e\163\164\141\x6e\143\x65\x55\111\x44"], $imageInfo["\163\164\x72\104\145\166\x69\x63\x65\x49\x6e\146\x6f"], $imageInfo["\163\x74\162\x44\145\166\x69\143\145\123\x65\162\151\x61\154\x4e\x75\x6d\142\x65\x72"], $imageInfo["\x73\164\x72\x56\x50\x61\x6e\x6f\x46\151\x6c\x65\x4e\141\x6d\145"], sourceTypeEnum2String($imageInfo["\145\x53\x6f\165\x72\x63\x65\124\x79\x70\145"]))); } else { $sql = "\x49\116\x53\105\122\x54\40\x49\116\124\117\x20\105\x32\x5f\111\x4d\x47\40" . "\x28\111\x4d\x47\137\106\x49\x4c\105\x4e\101\115\x45\x2c\x20" . "\111\x4d\x47\137\115\x4f\x44\x41\x4c\111\124\x59\x2c\x20" . "\x49\x4d\x47\137\115\x4f\x44\x45\x2c" . "\x49\x4d\107\x5f\x41\103\121\125\x49\x53\x49\x54\x49\117\x4e\137\x44\x41\x54\105\124\111\115\x45\54\x20" . "\111\115\x47\137\x49\x4d\x50\x4f\122\124\105\104\x2c\x20" . "\111\x4d\x47\x5f\x4b\x56\120\x2c\40" . "\111\115\x47\x5f\x4d\x41\x2c\x20" . "\x49\x4d\x47\137\104\x4f\x53\105\x2c\40" . "\x49\115\107\x5f\x45\x58\120\117\123\125\122\x45\x5f\x54\x49\x4d\105\54\40" . "\111\115\x47\137\x52\x41\x57\x5f\106\x49\x4c\x45\x4e\x41\x4d\105\54\x20" . "\x49\115\x47\x5f\125\120\x44\101\x54\105\x5f\x44\101\x54\105\x54\x49\115\x45\54\x20" . "\111\x4d\107\137\x4d\117\x44\x45\x4c\x4e\101\115\105\x2c\x20" . "\111\115\107\137\116\117\124\x45\54\40" . "\120\x41\124\137\x49\104\x2c\x20" . "\120\x41\x54\137\x43\x48\101\122\124\x4e\117\x2c\40" . "\111\115\x47\137\x53\124\125\x44\131\137\x49\x4e\x53\124\x41\116\103\x45\x5f\x55\111\x44\54\40" . "\x49\115\107\x5f\x55\x53\105\x52\x5f\x44\105\106\x49\116\x45\x44\x5f\71\54\40" . "\x64\145\x76\x5f\163\145\162\x69\141\x6c\137\156\165\155\x2c\40" . "\111\115\x47\x5f\x55\x53\x45\x52\137\x44\105\106\111\116\105\x44\137\61\x31\54\x20" . "\111\115\107\137\x53\x4f\x55\122\103\x45\x5f\124\131\120\105\51\x20" . "\x56\101\114\x55\105\x53\40\50\x3f\54\x3f\54\x3f\x2c\x3f\54\77\54\x3f\x2c\77\54\x3f\x2c\77\x2c\x3f\x2c\x3f\x2c\x3f\54\x3f\54\77\x2c\x3f\54\x3f\54\77\x2c\x3f\x2c\77\54\x3f\51"; $this->db->query($sql, array($imageInfo["\163\164\162\x49\155\147\x46\x69\154\x65\x4e\x61\x6d\145"], modality_api_str_to_modality_db_str($imageInfo["\x6d\157\x64\x61\154\x69\164\171"]), $imageInfo["\163\x74\162\101\143\161\115\x6f\x64\145"], currentDateFormat(DATEFORMAT_DATABASE, $imageInfo["\x64\x74\101\143\161\124\x69\155\145"]), $imageInfo["\x62\x49\163\111\155\x70\x6f\162\x74\145\x64"], $imageInfo["\146\x4b\166\x70"], $imageInfo["\146\x4d\x61"], $imageInfo["\146\104\157\x73\x65"], $imageInfo["\x66\105\170\160\x6f\x73\x75\162\145\124\151\x6d\x65"], $imageInfo["\163\164\x72\122\141\167\106\151\154\x65\116\x61\155\x65"], currentDateFormat(DATEFORMAT_DATABASE, $imageInfo["\144\x74\x55\160\144\141\164\x65\x44\x61\x74\145\x54\151\x6d\145"]), $imageInfo["\163\164\162\115\157\144\x65\x6c\x4e\141\155\145"], $imageInfo["\163\x74\162\x4e\x6f\164\145"], $nPatID, $imageInfo["\x73\164\x72\x43\150\141\162\x74\x4e\157"], $imageInfo["\163\x74\162\123\x74\x75\144\x79\x49\156\x73\164\141\x6e\x63\145\125\x49\x44"], $imageInfo["\163\164\162\104\145\x76\151\143\x65\111\156\x66\157"], $imageInfo["\163\x74\x72\x44\145\x76\151\143\145\x53\x65\162\x69\141\154\x4e\x75\155\x62\145\162"], $imageInfo["\163\x74\162\x56\x50\x61\x6e\157\x46\151\x6c\145\116\x61\155\x65"], sourceTypeEnum2String($imageInfo["\x65\123\157\x75\x72\143\x65\124\171\x70\145"]))); } $ret = $this->db->affected_rows(); return $ret; } else { return VERR_DB_OVERLAP; } } public function get_ImagesByFileAndChartNo($parameters) { $strImgFileName = $parameters["\x73\164\x72\111\155\141\x67\106\x69\154\x65\116\141\x6d\145"]; $strChartNo = $parameters["\x73\x74\x72\103\x68\x61\162\x74\116\x6f"]; $sql = "\x53\105\114\105\103\124\40\105\x32\x5f\111\x4d\107\x2e\52\x2c\x28\x53\x45\x4c\x45\103\x54\x20\163\160\137\x69\x6d\147\137\x70\141\171\137\163\164\141\x74\x75\x73\x20" . "\x46\x52\117\x4d\x20\x65\62\137\163\155\141\162\x74\x70\x61\171\137\151\x6d\141\x67\145\40" . "\127\110\x45\x52\105\x20\x69\x6d\147\137\151\144\x20\75\40\x45\x32\x5f\111\115\x47\x2e\151\155\x67\x5f\x69\x64\x29\40" . "\106\122\117\115\x20\x45\62\x5f\x49\115\x47\40\x57\110\x45\x52\x45\40\120\101\x54\137\x49\104\40\75\40" . "\50\x53\105\x4c\x45\x43\124\40\x50\x41\124\x5f\111\104\x20\x46\x52\x4f\x4d\40\105\62\137\120\x41\124\x20" . "\127\x48\x45\122\x45\40\x50\101\124\137\103\110\x41\x52\124\x4e\117\x20\75\40\x3f\x29\x20\x41\116\x44\x20\x49\x4d\107\137\x46\111\114\105\x4e\x41\115\105\40\x3d\40\x3f\x3b"; return $this->db->query($sql, array($strChartNo, $strImgFileName))->result_array(); } public function delete_ImagesByFileAndChartNo($strImgFileName, $strChartNo) { $sql = "\xa\40\x20\x20\40\40\x20\40\40\40\x20\x20\40\x53\105\114\x45\x43\x54\x20\111\x4d\x47\137\123\124\x55\x44\x59\137\x49\116\x53\x54\x41\116\x43\x45\x5f\x55\111\104\54\x20\x49\x4d\107\137\x4d\x4f\104\x41\x4c\111\x54\131\54\40\x49\x4d\107\x5f\x49\104\xa\x20\40\x20\40\x20\x20\x20\x20\x20\x20\40\x20\106\x52\x4f\115\x20\x45\x32\x5f\111\115\x47\xa\40\x20\x20\40\40\x20\x20\x20\x20\x20\40\x20\x57\x48\x45\122\105\40\x49\x4d\107\137\x46\111\114\x45\x4e\101\x4d\105\40\x3d\40\x3f\12\40\40\x20\x20\40\40\40\40\x20\x20\x20\40\x4c\111\x4d\111\124\x20\x31"; $ret = $this->db->query($sql, array($strImgFileName))->result_array(); if (count($ret) < 1) { vt_loge(sprintf("\45\x73\x3a\x20\151\x6d\141\147\145\x20\146\x69\154\x65\40\156\141\x6d\x65\40\x6e\x6f\164\x20\146\x6f\165\156\144\40\x69\156\x20\x44\x42\x3a\x20\45\x73", __METHOD__, $strImgFileName)); return VERR_DB_NOSUCHDATA; } $strStudyUID = $ret[0]["\x69\x6d\x67\137\x73\164\165\144\x79\137\151\156\x73\164\x61\x6e\143\145\x5f\165\151\x64"]; $strModality = $ret[0]["\x69\x6d\x67\x5f\x6d\157\144\141\154\x69\x74\171"]; $iImg_id = intval($ret[0]["\x69\x6d\x67\137\x69\144"]); $result = 0; $this->db->trans_start(); if ($strModality == "\103\124") { $sql = "\xa\x20\40\x20\x20\x20\x20\x20\x20\x20\40\40\x20\40\40\x20\x20\x53\105\x4c\x45\x43\x54\x20\111\115\107\137\x49\x44\xa\40\x20\x20\x20\40\40\40\40\x20\x20\x20\40\40\40\40\x20\106\x52\x4f\115\x20\105\x32\137\111\115\x47\12\40\40\x20\x20\x20\x20\x20\40\x20\x20\40\40\40\x20\x20\x20\x57\110\x45\x52\105\40\111\x4d\x47\137\x53\124\125\x44\x59\x5f\x49\x4e\123\124\x41\116\x43\105\137\x55\111\104\40\75\40\77\xa\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\40\x20\40\40\x20\x20\40\x20\x41\x4e\104\x20\111\x4d\107\137\123\124\x55\x44\131\x5f\111\x4e\123\x54\x41\x4e\x43\x45\x5f\125\x49\104\x20\x49\123\x20\x4e\x4f\124\x20\x4e\125\114\114"; $ret = $this->db->query($sql, array($strStudyUID))->result_array(); if (count($ret) > 0) { foreach ($ret as $row) { $sql = "\12\40\x20\x20\40\40\x20\40\x20\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\125\120\x44\x41\x54\105\x20\105\x32\137\111\115\x47\xa\x20\40\40\x20\40\40\40\40\x20\40\40\40\40\40\x20\40\x20\40\40\40\123\x45\x54\40\111\x4d\x47\137\123\124\125\104\131\x5f\x49\x4e\123\124\x41\116\103\105\x5f\125\111\104\x20\x3d\x20\47\x27\12\x20\40\40\40\x20\x20\x20\40\40\x20\x20\40\x20\40\x20\40\x20\40\x20\40\x57\x48\x45\122\105\40\x49\115\x47\x5f\x49\104\x20\75\40\77"; $this->db->query($sql, array(intval($row["\151\155\147\137\151\144"]))); } } $sql = "\12\x20\x20\x20\40\40\x20\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\40\x20\40\x44\105\x4c\105\x54\x45\x20\106\x52\117\x4d\x20\145\x32\137\163\x6d\x61\x72\x74\x70\141\171\137\x69\x6d\141\147\x65\xa\x20\40\40\x20\40\40\x20\40\40\x20\40\40\x20\40\40\x20\x20\40\x20\40\x57\x48\105\x52\105\x20\x69\x6d\x67\137\151\x64\40\75\40\x3f"; $this->db->query($sql, array($iImg_id)); $result += $this->db->affected_rows(); $sql = "\xa\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\x20\40\40\40\x20\40\40\40\x20\x53\x45\114\105\103\124\40\x67\162\157\165\x70\137\151\144\40\x46\122\x4f\115\x20\x45\62\x5f\104\x41\x54\x41\137\x47\x52\x4f\x55\x50\x5f\111\115\x47\40\127\110\105\x52\105\40\x49\x4d\x47\x5f\x49\x44\x20\75\40\77\40\101\x4e\x44\40\147\162\x6f\x75\160\137\151\155\x67\137\x61\165\164\157\x5f\x72\x65\x67\x20\x3d\x20\124\x52\125\105"; $ret = $this->db->query($sql, array($iImg_id))->result_array(); if (count($ret) > 0) { $sql = "\12\x20\40\40\40\40\40\x20\x20\40\x20\40\x20\40\x20\x20\x20\40\40\40\x20\104\x45\114\x45\x54\x45\40\106\x52\117\x4d\40\105\62\x5f\x44\x41\124\101\137\x47\x52\117\x55\120\x20\x57\110\105\122\105\x20\107\122\117\125\120\137\x49\104\x20\75\x20\x3f"; $this->db->query($sql, array(intval($ret[0]["\147\x72\157\165\x70\137\x69\x64"]))); $result += $this->db->affected_rows(); } } $sql = "\xa\40\x20\x20\40\x20\x20\40\40\40\40\x20\40\104\105\114\x45\124\x45\x20\x46\x52\117\x4d\x20\x45\62\x5f\111\x4d\107\xa\40\40\40\x20\x20\40\40\40\x20\40\x20\x20\x57\110\x45\x52\105\x20\111\x4d\x47\137\x49\x44\40\75\40\x3f"; $this->db->query($sql, array($iImg_id)); $result += $this->db->affected_rows(); if ($this->db->trans_status() === false) { $this->db->trans_rollback(); vt_loge(sprintf("\x25\163\72\40\x66\x61\x69\x6c\x65\x64\x20\x74\x6f\40\x64\145\x6c\x65\164\145\x20\151\x6d\x61\x67\145\x3a\x20\151\x64\x3d\45\163", __METHOD__, $iImg_id)); return VERR_DB_INVALIDDATA; } else { $this->db->trans_complete(); return $result; } } public function post_ImagesBySourceIDForID($nMGSourceID, $imageInfo, &$strImgFileName) { $nImgID = -1; $strImgFileName = ''; $sql = "\123\x45\x4c\x45\103\x54\40\x2a\40\x46\x52\x4f\115\40\x45\x32\137\111\115\107\40\x57\110\105\x52\x45\40\111\115\107\x5f\x4e\x4f\x54\105\x20\x3d\x20\47" . $nMGSourceID . "\x27"; $query = $this->db->query($sql)->result_array(); if (count($query) > 0) { foreach ($query as $row) { $nImgID2 = intval($row["\x69\x6d\x67\x5f\151\x64"]); $strChartNo = $row["\x70\x61\x74\x5f\143\x68\x61\162\x74\156\x6f"]; $strImgfileName2 = $row["\x69\x6d\x67\137\x66\x69\154\x65\x6e\141\155\x65"]; $modality = dbModalityStringToEmodality($row["\x69\155\x67\137\155\x6f\x64\141\x6c\x69\164\x79"]); $dtAcqTime = currentDateFormat($row["\x69\x6d\147\137\x61\143\x71\x75\151\163\151\164\x69\x6f\x6e\x5f\x64\x61\164\x65\164\x69\155\145"]); $strImgFileName = $strImgfileName2; if ($strChartNo == $imageInfo["\163\164\162\103\150\x61\162\164\x4e\x6f"] && $strImgfileName2 == $imageInfo["\163\x74\162\x49\155\x67\106\151\x6c\145\116\x61\155\x65"] && $modality == $imageInfo["\155\x6f\x64\141\x6c\151\164\171"] && $dtAcqTime == $imageInfo["\144\x74\101\143\x71\x54\151\x6d\145"]) { $nImgID = $nImgID2; return $nImgID; } else { $sql = "\125\120\x44\101\124\105\40\105\62\x5f\x49\x4d\107\40\x53\x45\x54\40\x49\x4d\x47\137\116\117\x54\x45\40\x3d\40\x27\47\40\127\x48\105\x52\x45\40\x49\115\x47\x5f\x49\104\40\x3d\x20\77"; $this->db->query($sql, array($nImgID2)); if ($this->db->affected_rows() > 0) { $nImgID = $nImgID2; return $nImgID; } else { return $this->db->affected_rows(); } } } } else { return VERR_DB_NOSUCHDATA; } } public function put_Images($savingImageInfo, $bSmartPayImage) { $nImgID = 0; $nPatID = 0; $sql = "\x53\105\x4c\x45\x43\x54\x20\111\115\107\137\111\104\x20\x46\x52\x4f\x4d\40\105\x32\137\x49\x4d\107\x20\x57\x48\x45\122\x45\x20\x49\115\x47\x5f\x46\x49\114\105\x4e\x41\x4d\x45\x20\x3d\x20\77"; $query = $this->db->query($sql, array($savingImageInfo["\163\164\x72\x49\155\x67\106\151\x6c\x65\116\x61\x6d\x65"]))->result_array(); foreach ($query as $row) { $nImgID = $row["\151\x6d\x67\x5f\x69\x64"]; } if ($nImgID > 0) { return VERR_DB_OVERLAP; } $sql = "\x53\105\x4c\x45\x43\x54\40\120\x41\x54\137\x49\104\x20\x46\122\117\x4d\40\105\x32\x5f\x50\101\124\x20\x57\110\105\x52\x45\x20\x50\101\124\137\103\x48\x41\122\x54\x4e\117\x20\75\40\77"; $query = $this->db->query($sql, array($savingImageInfo["\163\x74\x72\x43\150\x61\x72\x74\116\x6f"]))->result_array(); foreach ($query as $row) { $nPatID = $row["\x70\141\x74\x5f\x69\x64"]; } if ($nPatID == 0) { $sql = "\111\116\123\105\122\x54\40\x49\116\x54\117\40\105\62\137\111\115\x47\x20" . "\x28\111\x4d\107\137\x46\x49\114\x45\x4e\101\x4d\x45\54\40\111\115\x47\137\115\x4f\104\101\114\111\124\x59\x2c\x20\x49\x4d\107\x5f\x4d\x4f\x44\x45\54\x49\115\107\x5f\101\103\121\125\x49\x53\x49\124\111\x4f\x4e\137\104\x41\x54\x45\124\111\x4d\105\x2c\40" . "\111\115\x47\137\x49\x4d\x50\117\122\124\105\104\54\40\111\x4d\107\x5f\113\x56\x50\x2c\x20\x49\115\107\137\x4d\101\54\x20\111\x4d\x47\137\x44\117\123\105\54\x20" . "\x49\x4d\x47\137\x45\130\x50\x4f\x53\x55\122\105\x5f\124\111\x4d\105\x2c\x20\111\115\x47\x5f\122\101\x57\x5f\106\111\114\105\x4e\101\115\105\x2c\40" . "\x49\x4d\x47\x5f\125\120\x44\x41\x54\105\x5f\104\x41\124\105\x54\111\x4d\x45\54\x20\111\x4d\x47\137\115\x4f\x44\105\x4c\x4e\101\115\x45\54\x20" . "\x49\115\107\137\116\x4f\124\105\54\40\120\101\124\137\x43\110\101\x52\x54\x4e\x4f\x2c\40\111\115\x47\137\123\124\125\x44\x59\137\x49\116\x53\x54\x41\x4e\x43\105\137\125\x49\104\x2c\40" . "\111\x4d\x47\x5f\125\x53\105\122\x5f\104\105\x46\x49\x4e\105\x44\137\71\54\x20\144\145\166\x5f\x73\x65\x72\151\x61\154\x5f\x6e\165\x6d\54\40" . "\111\115\107\x5f\125\123\105\x52\x5f\104\x45\x46\111\116\x45\x44\137\61\x31\54\x20\111\115\107\x5f\x53\117\x55\x52\x43\x45\137\124\x59\x50\x45\51\x20" . "\x56\101\x4c\x55\x45\123\x20\x28\77\54\40\77\54\x20\77\x2c\40\x3f\x2c\40\77\54\x20\x3f\x2c\40\x3f\x2c\40\77\54\40\x3f\x2c\40\x3f\x2c\40\77\54\40\77\54\x20\x3f\54\40\x3f\54\x20\x3f\54\x20\x3f\x2c\x20\x3f\x2c\x20\77\x2c\40\x3f\51"; $this->db->query($sql, array($savingImageInfo["\x73\x74\x72\x49\155\147\106\x69\x6c\145\116\x61\155\145"], modality_api_str_to_modality_db_str($savingImageInfo["\155\157\x64\141\154\151\164\x79"]), $savingImageInfo["\x73\164\x72\x41\143\161\115\x6f\x64\x65"], currentDateFormat(DATEFORMAT_DATABASE, $savingImageInfo["\144\164\101\x63\x71\x54\x69\x6d\145"]), $savingImageInfo["\x62\x49\163\111\x6d\x70\x6f\x72\164\x65\144"], $savingImageInfo["\x66\113\x76\160"], $savingImageInfo["\146\x4d\x61"], $savingImageInfo["\146\x44\x6f\x73\x65"], $savingImageInfo["\146\x45\x78\x70\157\163\165\162\x65\x54\151\155\145"], $savingImageInfo["\163\164\x72\x52\141\x77\x46\151\x6c\x65\116\141\x6d\145"], currentDateFormat(DATEFORMAT_DATABASE, $savingImageInfo["\x64\164\125\x70\x64\x61\x74\145\x44\141\164\x65\x54\x69\155\145"]), $savingImageInfo["\x73\x74\162\115\157\144\145\x6c\x4e\141\x6d\145"], $savingImageInfo["\163\x74\162\x4e\157\x74\145"], $savingImageInfo["\x73\x74\x72\103\x68\141\162\x74\x4e\x6f"], $savingImageInfo["\163\164\162\123\x74\x75\x64\171\111\156\163\x74\x61\x6e\143\145\x55\x49\x44"], $savingImageInfo["\163\x74\x72\x44\x65\166\x69\x63\x65\x49\x6e\146\x6f"], $savingImageInfo["\x73\x74\162\x44\x65\x76\x69\143\145\123\145\x72\x69\x61\x6c\x4e\x75\x6d\x62\145\162"], $savingImageInfo["\x73\164\162\126\120\x61\x6e\x6f\106\x69\154\x65\116\x61\155\145"], sourceTypeEnum2String($savingImageInfo["\x65\123\157\165\162\x63\x65\x54\171\160\145"]))); } else { $sql = "\111\x4e\x53\105\122\x54\x20\x49\116\124\117\40\x45\62\x5f\111\115\x47\x20" . "\x28\111\x4d\x47\x5f\106\111\114\105\116\x41\115\105\54\x20\x49\x4d\107\137\115\117\x44\x41\114\111\x54\x59\x2c\x20\x49\x4d\107\137\115\x4f\104\x45\x2c\x49\x4d\107\x5f\x41\103\x51\125\x49\x53\x49\124\x49\117\116\x5f\104\101\124\x45\124\x49\x4d\105\x2c\40" . "\111\x4d\x47\x5f\111\x4d\120\117\x52\124\105\104\x2c\x20\x49\115\107\137\x4b\x56\x50\x2c\40\x49\115\x47\137\115\x41\54\40\111\115\107\137\104\x4f\x53\105\x2c\40\x49\x4d\107\x5f\105\130\x50\x4f\x53\125\122\105\x5f\124\111\x4d\x45\54\40" . "\111\115\x47\137\x52\101\127\137\x46\111\x4c\x45\116\x41\x4d\105\54\x20\111\x4d\x47\137\x55\x50\104\101\124\x45\137\x44\x41\124\105\x54\111\115\x45\54\x20\x49\x4d\x47\137\115\x4f\x44\105\x4c\116\101\x4d\105\x2c\40" . "\111\x4d\107\137\x4e\x4f\124\105\x2c\x20\120\x41\x54\137\111\x44\x2c\40\x50\101\124\137\x43\110\101\122\124\116\x4f\x2c\40\111\115\107\x5f\x53\124\125\104\131\x5f\x49\x4e\x53\x54\101\116\103\x45\x5f\x55\111\104\x2c\x20" . "\111\x4d\x47\137\x55\x53\105\x52\x5f\x44\x45\x46\x49\116\x45\x44\x5f\71\x2c\x20" . "\144\x65\x76\137\163\x65\x72\x69\141\x6c\137\x6e\165\x6d\54\40\x49\x4d\x47\x5f\x55\123\x45\122\x5f\x44\x45\106\111\116\x45\104\x5f\61\61\54\40" . "\111\x4d\107\137\x53\x4f\x55\122\103\105\x5f\x54\131\x50\105\x29\40" . "\x56\101\x4c\125\x45\x53\x20\50\x3f\x2c\x20\77\54\x20\77\54\x20\77\x2c\x20\77\54\x20\77\x2c\x20\x3f\54\40\77\x2c\x20\x3f\x2c\x20\x3f\x2c\40\77\x2c\40\77\x2c\40\x3f\54\x20\77\54\x20\x3f\54\40\x3f\54\40\x3f\x2c\x20\x3f\x2c\40\x3f\54\x20\77\x29"; $this->db->query($sql, array($savingImageInfo["\x73\x74\162\111\x6d\147\106\x69\x6c\145\x4e\x61\x6d\145"], modality_api_str_to_modality_db_str($savingImageInfo["\155\x6f\144\141\x6c\151\x74\x79"]), $savingImageInfo["\163\164\162\101\143\x71\115\157\x64\145"], currentDateFormat(DATEFORMAT_DATABASE, $savingImageInfo["\144\164\x41\143\x71\124\x69\x6d\145"]), $savingImageInfo["\142\x49\163\x49\155\160\x6f\x72\164\145\x64"], $savingImageInfo["\146\x4b\x76\160"], $savingImageInfo["\x66\x4d\141"], $savingImageInfo["\146\104\157\x73\x65"], $savingImageInfo["\146\x45\170\160\157\x73\x75\x72\145\124\151\155\x65"], $savingImageInfo["\163\x74\x72\x52\141\x77\x46\x69\154\145\x4e\x61\x6d\x65"], currentDateFormat(DATEFORMAT_DATABASE, $savingImageInfo["\x64\164\x55\160\x64\x61\x74\145\104\141\x74\145\x54\151\155\x65"]), $savingImageInfo["\163\164\162\x4d\x6f\x64\x65\154\116\141\155\145"], $savingImageInfo["\x73\x74\x72\x4e\157\164\145"], $nPatID, $savingImageInfo["\163\x74\x72\x43\x68\x61\162\164\x4e\157"], $savingImageInfo["\x73\x74\x72\123\164\165\144\x79\x49\156\x73\x74\x61\156\143\x65\125\x49\104"], $savingImageInfo["\x73\164\162\104\x65\x76\151\x63\x65\111\156\x66\157"], $savingImageInfo["\x73\x74\162\x44\145\166\x69\x63\x65\123\145\x72\151\x61\x6c\116\165\x6d\142\145\162"], $savingImageInfo["\x73\164\x72\x56\x50\141\x6e\x6f\x46\x69\x6c\x65\116\141\155\x65"], sourceTypeEnum2String($savingImageInfo["\x65\123\x6f\x75\162\143\x65\124\x79\160\145"]))); } if ($this->db->affected_rows() > 0 && $savingImageInfo["\x6d\157\144\141\x6c\151\164\x79"] == "\145\103\x54" && $savingImageInfo["\142\111\x73\x49\155\x70\x6f\x72\164\145\x64"] != true && $bSmartPayImage == true) { $sql = "\123\105\x4c\105\103\x54\x20\52\40\x46\x52\x4f\115\40\x65\x32\x5f\x64\x65\166\151\143\x65\x5f\151\156\x66\157\x20\127\110\x45\122\105\x20\x64\145\166\x5f\163\x65\x72\151\x61\x6c\x5f\156\x75\155\40\x3d\x20\x3f"; $sDeviceInfo = new SExtraOralDeviceInfo(); $resultArr = $this->db->query($sql, array($savingImageInfo["\163\164\x72\x44\x65\x76\x69\x63\x65\x53\145\x72\151\141\154\116\165\155\142\x65\162"]))->result_array(); load_model($this, "\105\170\164\x72\x61\117\162\141\154\x44\x65\x76\151\x63\x65\x73\137\x6d\x6f\x64\145\154"); $ret = $this->ExtraOralDevices_model->DBMGetExtraOralDeviceInfoQuery($resultArr, $sDeviceInfo); if ($ret === true) { if ($sDeviceInfo->eDeviceSalesType === enumToString(new EDeviceSalesType(), (new EDeviceSalesType())->eSmartPayDevice)) { $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType); if ($bSmartPayImage === true && $sDeviceInfo->eDevicePayStatus == enumToString(new eDevicePayStatus(), (new eDevicePayStatus())->eDevicePaid)) { switch ($sDeviceInfo->EDevicePayStatus) { case enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatA): $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatA); break; case enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatB): $eImagePayType = enumToString(new EImagePayType(), (new EImagePayType())->eImageMonthlyFlatB); break; default: break; } } $strImgFilename = $savingImageInfo["\163\164\x72\111\155\x67\106\151\154\145\x4e\x61\x6d\145"]; $strUnavailableFeatures = $sDeviceInfo->strUnavailableFeatures; $nImageID = 0; $sql = "\123\105\114\105\x43\124\40\111\x4d\x47\137\x49\x44\x20\106\122\117\x4d\40\105\x32\137\x49\115\x47\x20\127\x48\x45\x52\105\40\111\115\x47\137\x46\111\x4c\105\116\101\x4d\x45\40\75\40\77"; $ret = $this->db->query($sql, array($strImgFilename))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $nImageID = $ret[0]["\151\155\147\x5f\x69\x64"]; if ($eImagePayType == enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType)) { if (empty($strUnavailableFeatures)) { $strUnavailableFeatures = "\x55\106\60\x30\x30\x30"; } $sql = "\111\116\123\105\122\124\x20\111\x4e\124\x4f\x20\145\x32\137\163\x6d\141\162\x74\160\141\x79\137\151\155\x61\147\x65\40\50\151\x6d\x67\137\151\x64\54\x73\x70\137\x69\x6d\x67\137\165\x6e\141\x76\x61\151\x6c\141\x62\154\145\137\x66\x65\141\x74\165\x72\x65\163\x29\40\x56\101\114\x55\105\123\40\x28\77\x2c\x20\x3f\51"; $ret = $this->db->query($sql, array($nImageID, $strUnavailableFeatures)); } else { $sql = "\111\116\x53\105\x52\124\x20\111\x4e\124\x4f\40\145\62\x5f\163\155\x61\x72\x74\160\141\171\x5f\151\155\141\x67\x65\x20\50\x69\155\147\x5f\x69\x64\54\x73\x70\x5f\x69\155\147\137\160\x61\171\x5f\x73\164\x61\x74\x75\163\x2c\163\x70\137\x69\155\147\137\160\x61\x79\x5f\x64\x61\x74\x65\x74\x69\x6d\x65\x2c\x73\x70\137\151\155\x67\137\x70\x61\x79\137\x74\171\x70\x65\x2c\163\160\137\151\x6d\x67\137\x75\x6e\141\x76\141\151\x6c\x61\x62\154\145\x5f\x66\145\x61\164\165\162\x65\x73\x29\40\126\101\114\x55\105\x53\x20\x28\77\x2c\40\77\x2c\x6e\157\x77\50\51\x2c\40\x3f\54\x20\77\x29"; $ret = $this->db->query($sql, array($nImageID, ImagePayStatusToString(enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus)), ImagePayTypeToString($eImagePayType), $strUnavailableFeatures)); } if ($ret == 0) { return VERR_DB_INVALIDDATA; } $strCheckSum = ''; load_model($this, "\123\x6d\141\162\164\x50\141\x79\x49\155\x61\147\145\x73\137\155\157\x64\x65\154"); $ret = $this->SmartPayImages_model->get_SmartPayImagesForChecksum($strImgFilename, $strCheckSum, true); if ($ret < 1) { return $ret; } if ($eImagePayType != enumToString(new EImagePayType(), (new EImagePayType())->eImageUnpaidType)) { $ret = $this->ExtraOralDevices_model->DBMUpdateExtraOralDeviceInfoCheckSum("\127\x48\x45\122\105\40\144\145\166\x5f\163\145\162\x69\x61\x6c\137\x6e\165\x6d\x20\x3d\x20\50\x73\145\x6c\x65\x63\164\40\144\145\x76\x5f\x73\x65\x72\x69\141\x6c\x5f\156\x75\x6d\40\146\162\x6f\155\40\145\62\137\x69\x6d\147\40\x77\x68\x65\x72\145\x20\151\155\147\137\x66\x69\154\145\156\x61\x6d\145\40\x3d\40" . $this->db->escape($strImgFilename) . "\51", "\144\x65\x76\137\x73\160\x5f\x70\x61\x79\x5f\x63\x6f\x75\x6e\x74\75\x64\x65\x76\x5f\163\160\137\160\141\x79\137\143\x6f\165\156\x74\x2b\61", true, true); } return $ret; } } } return $this->db->affected_rows(); } public function post_ImagesByLimitForSearch($searchCondition, $nLimit, &$bExistSmartPayImage) { $nRepeat = 0; $strConditionQuery = ''; $sql = "\123\x45\114\105\x43\124\40\103\117\125\x4e\x54\50\x2a\x29\x20\x46\122\117\115\x20\x65\x32\137\163\155\141\x72\164\160\141\x79\x5f\x69\x6d\x61\x67\x65"; $query = $this->db->query($sql)->result_array(); if (count($query) > 0) { $nCount = $query[0]["\143\157\x75\x6e\x74"]; if ($nCount > 0) { $bExistSmartPayImage = true; } } if ($bExistSmartPayImage == false) { $sql = "\123\x45\x4c\x45\103\x54\x20\x2a\40\106\x52\x4f\115\40\x45\62\137\x49\x4d\x47"; } else { $sql = "\123\105\x4c\105\x43\x54\40\x45\x32\137\x49\115\x47\56\x2a\x2c\x28\123\x45\114\x45\x43\x54\40\163\x70\137\151\155\147\137\160\x61\x79\137\163\x74\x61\164\165\163\40\x46\x52\x4f\115\x20\x65\62\x5f\163\155\x61\162\x74\160\141\x79\137\151\x6d\141\147\x65\x20\127\110\x45\122\x45\x20\151\x6d\147\137\151\144\40\x3d\40\105\x32\137\111\x4d\x47\x2e\x69\x6d\x67\137\x69\144\x29\40\106\122\x4f\115\x20\105\x32\x5f\x49\115\107"; } if (!empty($searchCondition["\163\164\x72\x43\x6f\156\x64\151\164\151\x6f\156"])) { if (!empty($strConditionQuery)) { $strConditionQuery .= "\x20\x41\x4e\x44"; } $strConditionQuery .= "\40\120\x41\124\137\103\x48\101\x52\x54\x4e\117\x20\x49\x4e\x20\50\x27" . $searchCondition["\163\x74\x72\x43\x6f\156\x64\151\164\x69\157\156"] . "\47\51"; } if ($searchCondition["\x65\115\x6f\144\141\154\x69\x74\171"] == "\x65\x4f\164\x68\145\x72") { if (!empty($strConditionQuery)) { $strConditionQuery .= "\x20\x41\116\x44"; } $strConditionQuery .= "\x20\x28\111\x4d\107\x5f\x4d\117\x44\x41\114\x49\x54\131\40\75\40\47" . modality_api_str_to_modality_db_str("\145\x49\155\x70\162\145\163\163\151\x6f\x6e") . "\47" . "\x4f\122\40\111\x4d\107\137\115\117\x44\x41\114\x49\124\x59\x20\x3d\x20\47" . modality_api_str_to_modality_db_str("\145\103\x61\x70\x74\x75\162\x65") . "\47\40" . "\x4f\x52\40\x49\115\107\x5f\x4d\x4f\104\101\x4c\x49\124\131\x20\75\40\47" . modality_api_str_to_modality_db_str("\x65\117\164\150\145\162") . "\47\40" . "\x4f\122\x20\x49\x4d\x47\137\x4d\x4f\x44\101\x4c\111\124\131\40\75\x20\x27" . modality_api_str_to_modality_db_str("\145\124\x68\162\145\145\x44\120\x68\x6f\164\157") . "\x27\40" . "\117\x52\40\x49\x4d\x47\137\115\x4f\104\x41\114\111\x54\x59\40\x3d\x20\47" . modality_api_str_to_modality_db_str("\x65\106\x69\x6c\145") . "\47\40" . "\x4f\x52\40\111\115\107\137\x4d\x4f\104\101\114\111\x54\x59\40\x3d\40\47" . modality_api_str_to_modality_db_str("\x65\104\157\x6e\x74\103\141\x72\x65") . "\x27\51"; } if ($searchCondition["\145\115\157\x64\x61\154\151\x74\x79"] == "\x65\101\x6e\x79\x4d\x6f\144\x61\154\x69\x74\171") { if (!empty($strConditionQuery)) { $strConditionQuery .= "\x20\x41\x4e\104"; } $strConditionQuery .= "\40\111\115\107\137\x4d\117\104\101\x4c\111\x54\x59\x20\75\x20\47" . modality_api_str_to_modality_db_str($searchCondition["\x65\x4d\x6f\x64\x61\154\x69\164\x79"]) . "\47"; } if (!isset($searchCondition["\x64\164\101\x63\x71\165\x69\x73\151\164\151\x6f\156\x54\x69\155\145"])) { if (!empty($strConditionQuery)) { $strConditionQuery .= "\x20\x41\x4e\x44"; } $strConditionQuery .= "\40\50\x49\115\x47\137\101\103\x51\x55\111\123\x49\x54\x49\x4f\116\137\x44\x41\124\105\x54\111\115\x45\x20\102\105\x54\x57\x45\x45\116\40\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\x64\164\x41\143\x71\165\151\163\x69\x74\151\x6f\x6e\124\x69\x6d\145"]) . "\47\40" . "\x41\x4e\x44\x20\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\x74\124\157\101\143\161\x54\x69\x6d\x65"]) . "\x27\51"; } if (!empty($strConditionQuery)) { $sql .= "\40\127\110\105\x52\x45" . $strConditionQuery; } $sql .= "\x20\117\122\104\105\x52\40\102\131\40\120\x41\x54\x5f\103\x48\x41\122\124\x4e\x4f\40\x44\x45\123\x43\54\x20\x49\115\107\x5f\x41\x43\121\x55\x49\x53\111\x54\x49\x4f\x4e\137\x44\101\124\x45\x54\x49\115\x45"; $sql .= "\40\x4c\111\x4d\111\x54\x20" . $nLimit . "\40\x4f\106\x46\x53\x45\x54\40" . $nRepeat * $nLimit; return $this->db->query($sql)->result_array(); } public function get_ImagesForAcqDateDup() { $sql = "\x53\x45\114\x45\x43\x54\x20\111\x4d\x47\x5f\115\x4f\104\101\114\x49\124\131\x2c\40" . "\x49\x4d\107\137\101\103\x51\x55\111\123\111\124\111\117\116\x5f\104\x41\x54\x45\124\x49\x4d\105\x20" . "\x46\x52\117\115\40\105\x32\x5f\111\x4d\x47\x20\107\122\x4f\x55\120\40\102\x59\x20\111\115\107\137\115\x4f\x44\x41\x4c\111\124\x59\54\x20" . "\111\x4d\x47\x5f\101\103\121\125\111\123\111\124\111\117\x4e\x5f\x44\x41\x54\x45\124\x49\x4d\x45\x20\110\x41\x56\111\x4e\x47\x20\x43\117\x55\x4e\124\50\52\51\40\76\40\x31\x20" . "\x4f\x52\x44\x45\122\x20\102\x59\x20\x49\115\107\x5f\x4d\x4f\x44\101\114\111\x54\x59\x2c\x20\x49\115\x47\137\x41\x43\x51\x55\x49\123\x49\124\x49\117\x4e\x5f\x44\101\x54\105\124\x49\115\x45"; $query = $this->db->query($sql)->result_array(); if (count($query) > 0) { $item = array(); foreach ($query as $row) { $eModality = dbModalityStringToEmodality($row["\x69\x6d\147\x5f\155\157\x64\141\154\x69\164\x79"]); $dtAcqTIme = currentDateFormat(DATEFORMAT_DATABASE, $row["\x69\x6d\x67\137\x61\143\x71\x75\151\x73\x69\164\151\x6f\156\x5f\144\x61\x74\x65\x74\151\x6d\145"]); $sql = "\x53\x45\x4c\105\103\124\x20\x2a\40\x46\122\117\115\x20\105\x32\x5f\x49\115\x47\x20\127\x48\x45\122\105\x20\111\115\107\x5f\x4d\x4f\104\101\x4c\x49\x54\131\40\75\40\77\x20\101\x4e\x44\40\111\115\x47\x5f\x41\x43\121\x55\111\x53\111\x54\x49\x4f\116\137\x44\101\124\x45\124\111\x4d\x45\40\75\40\77\40\x4f\x52\104\x45\122\x20\x42\x59\x20\x49\x4d\107\x5f\111\x44"; $query = $this->db->query($sql, array(modality_api_str_to_modality_db_str($eModality), $dtAcqTIme))->result_array(); if (count($query) > 0) { array_push($item, $query); } else { return $query; } } return $item; } else { return $query; } } public function put_ImagesForChartNo($parametersOfPutImagesForChartNo) { $strlImgFileNames = $parametersOfPutImagesForChartNo["\163\x74\x72\154\111\155\147\x46\151\154\145\116\141\x6d\145\x73"]; $strChartNo = $parametersOfPutImagesForChartNo["\163\164\162\x43\x68\141\162\164\116\x6f"]; $sql = "\x53\105\114\105\x43\124\40\x50\x41\x54\x5f\x49\104\x20\106\122\117\x4d\40\x45\62\137\x50\x41\124\40\127\110\105\x52\105\x20\120\101\x54\x5f\x43\110\x41\x52\x54\116\117\40\75\40\x3f"; $query = $this->db->query($sql, array($strChartNo))->result_array(); if (count($query) > 0) { foreach ($query as $row) { $nPatID = $row["\x70\141\x74\137\x69\x64"]; } foreach ($strlImgFileNames as $row) { $sql = "\125\120\x44\101\x54\105\x20\x45\62\137\x49\x4d\107\40\x53\x45\x54\x20\120\x41\x54\137\111\x44\40\x3d\40\77\54\120\101\x54\x5f\x43\110\x41\x52\124\x4e\117\x20\75\x20\x3f\40\x57\x48\x45\x52\x45\x20\x49\x4d\x47\x5f\106\x49\x4c\105\116\101\115\105\40\x3d\40\77"; $this->db->query($sql, array($nPatID, $strChartNo, $row)); } $jsonEncode = json_encode($strlImgFileNames); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eDataTransfered), "\x54\162\x61\156\163\146\x65\162\x72\x65\x64\40\x69\x6d\x61\x67\145\x2e\x20\x43\x68\x61\162\164\40\156\x6f\x20\x3a\40{$strChartNo}\x2c\40\x46\151\154\x65\x20\156\x61\155\145\40\72\40{$jsonEncode}"); return $this->db->affected_rows(); } else { return VERR_DB_INVALIDDATA; } } public function put_ImagesByFileForDateTime($dtUpdateDateTime, $strImgFileName) { $sql = "\x55\x50\x44\101\124\x45\x20\x45\x32\137\x49\x4d\x47\x20\x53\x45\x54\x20\111\x4d\107\137\x55\x50\104\101\x54\x45\137\x44\x41\124\x45\124\111\x4d\105\x20\x3d\x20\77\40\127\110\x45\122\x45\40\111\x4d\107\x5f\x46\x49\x4c\x45\x4e\x41\x4d\x45\40\x3d\40\x3f"; $this->db->query($sql, array(currentDateFormat(DATEFORMAT_DATABASE, $dtUpdateDateTime), $strImgFileName)); return $this->db->affected_rows(); } public function get_ImagesByFileForStudyUID($strImgFileName) { $sql = "\x53\x45\114\x45\103\124\x20\x49\115\107\x5f\123\124\125\x44\131\137\x49\116\123\x54\101\116\x43\x45\x5f\125\x49\x44\40\x46\x52\117\115\x20\x45\x32\x5f\x49\115\x47\40\127\110\x45\x52\x45\40\x49\x4d\x47\x5f\x46\x49\x4c\x45\116\x41\x4d\x45\40\x3d\40\x3f"; return $this->db->query($sql, array($strImgFileName))->result_array(); } public function put_ImagesByFileForStudyUID($strImgFileName, $strStudyInstanceUID) { $sql = "\xa\40\40\40\x20\40\40\x20\x20\40\x20\40\x20\x55\x50\x44\x41\x54\x45\x20\x45\62\x5f\x49\x4d\x47\xa\x20\40\40\x20\40\x20\x20\x20\x20\x20\40\x20\x53\x45\124\x20\111\x4d\107\x5f\123\x54\125\x44\131\137\x49\x4e\x53\124\101\116\x43\105\137\125\111\x44\x20\75\x20\77\xa\x20\x20\40\40\x20\x20\x20\x20\40\40\x20\40\x57\x48\105\122\x45\x20\111\x4d\107\137\106\111\114\x45\x4e\101\115\105\40\75\40\77"; $this->db->query($sql, array($strStudyInstanceUID, $strImgFileName)); return $this->db->affected_rows(); } public function get_ImagesByChartNo() { $sql = "\123\105\x4c\105\x43\x54\40\x43\x4f\125\x4e\124\50\x2a\x29\40\x46\122\117\x4d\x20\x65\62\137\x73\155\141\x72\x74\x70\x61\x79\137\x69\155\x61\147\x65"; return $this->db->query($sql); } public function post_ImagesByChartNo_False($strChartNo, $pageNum, $numItems) { $sql = "\xa\40\40\40\x20\x20\40\40\40\x20\40\x20\x20\x53\105\114\105\103\x54\40\52\40\x46\x52\x4f\115\x20\x45\62\x5f\111\x4d\x47\40\127\110\105\122\x45\40\120\x41\124\137\x49\x44\40\x3d\12\40\x20\x20\x20\x20\40\40\x20\x20\x20\40\x20\40\x20\40\x20\50\123\x45\x4c\x45\x43\x54\x20\x50\101\x54\137\x49\104\x20\106\122\x4f\115\x20\105\62\137\120\x41\x54\x20\127\x48\105\122\105\x20\120\x41\124\x5f\x43\110\101\122\124\x4e\x4f\x20\x3d\40\77\51\xa\x20\40\x20\x20\40\40\x20\x20\x20\40\40\40\x4f\122\104\105\122\x20\102\131\40\x49\115\107\137\101\x43\x51\x55\x49\123\111\x54\x49\117\116\137\x44\101\x54\105\x54\111\x4d\x45\40\x44\105\123\x43\x2c\x20\111\x4d\107\x5f\x46\x49\x4c\105\116\101\115\105\40\x44\x45\123\x43\xa\40\x20\x20\x20\x20\40\40\40\40\40\40\40\114\111\x4d\x49\124\40\77\x20\x4f\x46\x46\123\105\124\x20\77\xa\x20\x20\40\40\x20\40\x20\40"; return $this->db->query($sql, array($strChartNo, $numItems, get_offset($numItems, $pageNum)))->result_array(); } public function post_ImagesByChartNo_True($strChartNo, $pageNum, $numItems) { $sql = "\xa\40\x20\40\x20\40\40\40\40\x20\x20\x20\40\123\x45\114\105\103\124\40\105\62\x5f\x49\115\107\56\x2a\54\50\x53\105\x4c\x45\x43\124\40\x73\160\x5f\x69\155\147\x5f\x70\141\x79\137\163\164\141\x74\x75\x73\xa\40\x20\x20\x20\x20\x20\x20\40\40\x20\40\40\x46\122\x4f\115\40\145\62\x5f\163\x6d\x61\x72\164\160\141\x79\x5f\x69\155\x61\x67\145\12\x20\40\x20\x20\x20\40\x20\40\x20\x20\40\40\x57\110\x45\122\105\40\151\155\x67\137\151\144\x20\75\x20\105\x32\x5f\111\x4d\107\x2e\151\155\147\137\151\x64\x29\xa\x20\40\x20\x20\40\x20\x20\x20\x20\x20\40\40\106\x52\x4f\115\40\105\x32\x5f\x49\x4d\107\xa\40\40\x20\x20\x20\40\40\x20\x20\x20\x20\x20\127\110\x45\122\x45\x20\120\101\x54\x5f\x49\x44\40\75\40\50\x53\x45\114\x45\x43\x54\x20\x50\101\x54\137\x49\104\40\106\122\117\115\x20\x45\x32\137\120\101\x54\x20\127\110\105\x52\105\x20\x50\101\124\x5f\103\110\101\122\124\116\117\40\75\40\77\51\12\40\40\x20\40\x20\40\x20\x20\40\x20\40\40\117\x52\x44\x45\x52\40\x42\131\x20\x49\115\107\x5f\101\x43\121\125\111\123\111\124\111\x4f\116\137\104\101\124\105\124\111\115\105\x20\x44\105\x53\x43\x2c\x20\111\x4d\x47\x5f\x46\x49\114\105\x4e\101\115\x45\x20\104\x45\x53\103\12\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\x20\114\x49\x4d\x49\124\40\77\x20\x4f\x46\x46\123\105\x54\x20\x3f"; return $this->db->query($sql, array($strChartNo, $numItems, get_offset($numItems, $pageNum)))->result_array(); } public function put_ImagesForRaw($Parameters) { $sql = "\125\x50\104\101\x54\105\40\105\62\x5f\111\115\x47\x20\123\105\124\40\111\x4d\x47\137\x52\x41\127\x5f\x46\111\x4c\x45\x4e\x41\115\x45\40\75\x20\x3f\x2c\x20\111\x4d\x47\x5f\x55\x50\x44\x41\124\x45\137\104\x41\x54\105\x54\x49\x4d\x45\x20\x3d\x20\x3f\54\40\x49\115\x47\x5f\115\117\x44\105\114\116\x41\x4d\x45\x20\75\x20\x3f\x20\127\x48\x45\x52\x45\x20\x49\115\x47\137\106\111\114\x45\116\101\115\105\x20\75\40\77"; $this->db->query($sql, array($Parameters["\x73\x74\162\122\x61\x77\x46\x69\154\x65\x4e\x61\x6d\x65"], currentDateFormat(DATEFORMAT_DATABASE, $Parameters["\144\x74\x55\160\x64\141\x74\x65\104\141\164\x65\x54\151\x6d\145"]), $Parameters["\163\x74\x72\115\x6f\x64\x65\x6c\116\141\155\145"], $Parameters["\x73\x74\162\x49\x6d\x67\x46\x69\154\x65\x4e\141\155\x65"])); return $this->db->affected_rows(); } public function get_ImagesByStudyUID($strStudyInstanceUID) { $sql = "\x53\x45\114\105\103\x54\x20\x2a\x20\x46\122\117\115\x20\105\62\137\111\115\107\40\127\110\x45\122\105\40\x49\115\107\x5f\x53\x54\125\x44\x59\x5f\111\116\x53\124\101\x4e\103\105\137\125\x49\x44\40\x3d\40\x3f"; return $this->db->query($sql, array($strStudyInstanceUID))->result_array(); } public function get_ImagesByFileForLastFilter($strImgFileName) { $sql = "\x53\105\114\x45\x43\124\40\x49\115\x47\137\125\x53\x45\x52\137\x44\105\x46\111\x4e\x45\104\x5f\x31\x30\x20\x46\122\117\x4d\x20\x65\x32\137\151\x6d\147\40\127\x48\x45\x52\x45\40\x69\155\147\x5f\x66\151\154\x65\x6e\141\155\145\x20\x3d\40\77"; return $this->db->query($sql, array($strImgFileName))->result_array(); } public function put_ImagesByFileForLastFilter($strImgFileName, $strLastFilter) { $sql = "\xa\x20\40\x20\40\40\x20\x20\40\x20\40\40\40\125\x50\104\101\124\x45\x20\145\62\x5f\151\x6d\x67\xa\x20\x20\x20\x20\x20\40\x20\x20\x20\40\40\x20\x53\x45\124\x20\151\x6d\x67\x5f\x75\163\145\x72\x5f\144\145\x66\x69\156\145\x64\137\x31\x30\40\75\x20\x3f\12\40\40\x20\40\x20\x20\40\x20\x20\40\x20\x20\x57\110\x45\122\x45\40\x69\155\x67\x5f\146\151\154\145\156\x61\155\x65\40\x3d\40\x3f"; $this->db->query($sql, array($strLastFilter, $strImgFileName)); return $this->db->affected_rows(); } public function post_ImagesInGroup($parameters) { if (!array_key_exists("\x69\155\141\147\145\106\x69\154\x65\116\141\x6d\145\163", $parameters)) { vt_loge(__METHOD__ . "\72\40\x41\x72\147\x75\x6d\145\156\x74\40\156\157\164\x20\146\x6f\165\156\x64\x3a\40\x69\155\x61\147\x65\106\151\154\x65\x4e\x61\155\145\163"); return ["\145\162\162\x6f\x72\103\157\x64\145" => VERR_COMMON_INVALID, "\x41\162\147\x75\x6d\x65\x6e\x74\40\156\157\164\x20\146\x6f\165\156\144\72\x20\x69\x6d\x61\x67\x65\x46\x69\x6c\x65\x4e\x61\155\x65\x73"]; } $imageFileNames = $parameters["\x69\x6d\141\x67\x65\x46\151\154\x65\116\141\155\x65\x73"]; $sql = "\x53\x45\x4c\x45\x43\x54\x20\x69\x6d\x67\x5f\146\151\154\145\x6e\x61\x6d\145\40\x41\123\40\x22\146\x69\154\x65\x4e\x61\x6d\x65\x22\54\12\x20\40\40\40\x20\x20\40\40\40\x20\103\x41\x53\105\12\x20\40\40\x20\x20\40\x20\40\x20\40\x57\110\105\x4e\12\x20\x20\40\x20\40\40\40\40\x20\40\50\123\x45\x4c\x45\103\124\40\x43\x4f\125\116\x54\x28\52\x29\xa\x20\40\x20\40\x20\40\x20\x20\40\x20\x46\x52\117\115\x20\x65\x32\137\x64\141\164\141\x5f\147\x72\157\165\x70\x5f\x69\155\147\x20\147\x72\x70\12\x20\40\x20\40\40\x20\40\x20\x20\40\127\110\105\122\105\40\x67\x72\160\56\151\x6d\x67\x5f\151\x64\x20\x3d\40\151\x6d\147\x2e\x69\155\x67\137\x69\x64\x29\xa\40\x20\x20\x20\40\x20\x20\x20\53\xa\x20\x20\40\40\x20\x20\x20\40\50\x53\x45\114\105\103\x54\x20\103\117\125\116\x54\x28\52\51\12\x20\40\x20\x20\40\x20\40\40\x20\x20\40\40\x20\40\40\40\x46\x52\117\x4d\x20\x65\62\x5f\x6f\162\x74\x68\x6f\x5f\x72\145\143\x6f\162\144\163\145\x74\137\x69\x6d\141\x67\145\163\x20\162\x65\143\12\x20\40\x20\x20\40\x20\40\40\40\40\x20\x20\x20\40\x20\x20\127\110\105\x52\105\40\162\145\x63\56\x69\x6d\147\x5f\x69\144\x20\75\x20\x69\155\147\56\151\155\147\137\x69\x64\x29\xa\x20\x20\x20\x20\40\40\x20\40\x20\40\76\40\60\xa\40\40\x20\40\40\x20\40\x20\40\40\x54\110\x45\x4e\x20\164\x72\165\x65\xa\40\x20\x20\x20\40\x20\40\40\x20\x20\105\114\x53\105\40\146\x61\154\163\145\xa\x20\40\x20\x20\40\40\40\x20\x20\40\x45\116\104\x20\101\x53\40\42\x69\x73\x49\156\x47\162\157\165\160\x22\12\x20\x20\x20\x20\40\x20\x20\40\x20\x20\106\x52\117\x4d\x20\x65\x32\137\151\x6d\147\x20\x69\x6d\x67\xa\40\x20\x20\x20\40\40\40\x20\40\40\127\110\105\122\105\40\x69\x6d\x67\x5f\x66\151\154\x65\156\x61\155\x65\12\x20\40\40\x20\x20\40\x20\40\x20\40\111\x4e\x20\77"; $ret = $this->db->query($sql, array($imageFileNames))->result_array(); if (count($ret) === 0) { vt_loge(sprintf("\x25\x73\72\40\x49\x6d\141\x67\x65\x20\x66\x69\154\145\x73\x20\156\x6f\164\x20\146\157\x75\156\144\72\x20\45\x73", __METHOD__, json_encode($imageFileNames))); return ["\x65\162\x72\x6f\x72\x43\x6f\144\145" => VERR_DB_NOSUCHDATA, "\x65\162\162\x6f\162\x4d\x65\x73\x73\x61\x67\x65" => "\111\155\x61\147\145\40\146\x69\154\x65\163\40\x6e\157\x74\40\x66\x6f\x75\156\x64\56"]; } else { $converted_ret = array_map([$this, "\x63\157\156\166\x65\162\x74\x5f\x73\x74\x72\151\x6e\x67\137\164\x6f\x5f\x62\157\x6f\154\145\141\x6e\137\x63\141\x6c\154\x62\141\143\153"], $ret); return ["\145\162\162\157\162\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\151\x6d\x61\147\145\x46\x69\x6c\145\163" => $converted_ret]; } } private function convert_string_to_boolean_callback($item) { $item["\x69\163\111\156\x47\x72\x6f\165\160"] = $item["\x69\163\111\x6e\107\162\x6f\165\x70"] === "\x74"; return $item; } } diff --git a/server/original/www/ezwebserver/src/application/models/ImplantCompanies_model.php b/server/original/www/ezwebserver/src/application/models/ImplantCompanies_model.php index b818830..e0ae64b 100644 --- a/server/original/www/ezwebserver/src/application/models/ImplantCompanies_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImplantCompanies_model.php @@ -1,7 +1,7 @@ db->query($sql)->result_array(); } public function put_ImplantCompanies($parametersOfPutImplantCompanies) { $sql = "\125\x50\104\x41\x54\105\40\x69\x6d\x70\x5f\143\x6f\155\x20\123\105\x54\x20" . "\x63\x6f\155\x5f\x73\x79\x6e\x63\40\75\x20\77\x2c\40" . "\x63\157\155\x5f\x75\x73\145\x72\137\141\144\144\145\144\x20\75\x20\77\x2c\x20" . "\x63\x6f\155\137\165\x73\x65\x72\137\144\145\x66\151\156\145\144\137\x31\40\x3d\x20\77\x2c\x20" . "\143\157\x6d\x5f\165\163\x65\x72\x5f\x64\x65\146\x69\x6e\145\144\137\x32\40\x3d\40\x3f\40" . "\127\110\x45\x52\x45\40\114\x4f\127\105\122\50\x63\157\x6d\x5f\156\141\155\145\51\x20\x3d\x20\114\x4f\127\105\x52\x28\x3f\x29"; $this->db->query($sql, array($parametersOfPutImplantCompanies["\142\x53\171\x6e\x63"], $parametersOfPutImplantCompanies["\x62\125\163\x65\162\101\144\144\145\x64"], $parametersOfPutImplantCompanies["\x62\x52\145\163\x65\162\166\145\144\61"], $parametersOfPutImplantCompanies["\163\x74\162\x56\x65\162\x73\x69\157\156"], $parametersOfPutImplantCompanies["\x73\x74\162\103\157\x6d\116\x61\155\145"])); return $this->db->affected_rows(); } public function get_ImplantCompaniesByNameForId($parameters) { $sql = "\123\x45\x4c\x45\x43\x54\40\143\157\155\x5f\x69\x64\40" . "\x46\x52\x4f\115\x20\151\155\x70\x5f\x63\x6f\x6d\x20" . "\x57\x48\105\122\x45\40\114\117\127\105\x52\50\x63\157\x6d\x5f\156\x61\x6d\145\x29\40\x3d\40\114\x4f\x57\105\x52\50\x3f\x29"; return $this->db->query($sql, array($parameters))->result_array(); } public function post_ImplantCompaniesByNameList($strlComName) { $ret = -1; foreach ($strlComName as $row) { $sql = "\x53\x45\114\x45\x43\124\40\x63\157\155\137\151\144\40\x46\x52\x4f\x4d\40\151\155\160\137\143\157\x6d\40\127\110\x45\x52\105\x20\x4c\x4f\x57\105\x52\x28\143\157\x6d\x5f\x6e\141\155\145\x29\40\x3d\40\114\x4f\x57\x45\x52\50\77\51"; $query = $this->db->query($sql, $row)->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } $sql = "\111\116\123\105\122\124\40\111\x4e\x54\x4f\40\151\x6d\160\x5f\143\157\x6d\x28\143\x6f\155\137\156\141\155\x65\51\x20\x56\x41\114\125\105\x53\x20\x28\77\x29"; $this->db->query($sql, $row); $ret = $this->db->affected_rows(); } return $ret; } public function patch_ImplantCompaniesByNameAndNew($strComName, $strNewComName) { $sql = "\125\120\104\x41\124\105\x20\x69\x6d\160\x5f\143\157\155\40\x53\x45\124\x20\143\x6f\x6d\137\x6e\141\155\145\40\x3d\40\x3f\40\x57\x48\105\x52\105\x20\x4c\x4f\x57\105\x52\x28\143\157\x6d\x5f\x6e\141\155\x65\51\40\x3d\40\114\117\x57\x45\x52\50\77\x29"; $this->db->query($sql, array($strNewComName, $strComName)); return $this->db->affected_rows(); } public function get_ImplantCompaniesByName($parameters) { $sql = "\x53\x45\114\105\x43\x54\x20\143\x6f\155\137\x73\x79\x6e\x63\54\x20\x63\157\155\137\x75\163\145\x72\x5f\141\144\x64\x65\x64\x2c\40\143\x6f\155\x5f\x75\163\x65\x72\x5f\x64\x65\146\x69\156\145\x64\x5f\61\54\x20\x63\x6f\155\137\165\x73\145\x72\137\x64\145\x66\x69\156\145\144\137\62\x20" . "\x46\122\117\115\x20\151\155\x70\137\x63\x6f\155\x20" . "\x57\110\x45\x52\x45\40\x4c\x4f\127\105\122\x28\143\157\x6d\x5f\x6e\141\155\145\x29\40\x3d\x20\x4c\117\127\105\122\50\x3f\x29"; return $this->db->query($sql, array($parameters))->result_array(); } public function post_ImplantCompaniesByName($strComName) { $sql = "\x53\105\114\x45\103\x54\40\143\x6f\x6d\x5f\151\x64\40\106\122\x4f\115\40\x69\x6d\160\x5f\x63\157\x6d\x20\x57\x48\105\122\105\40\114\117\127\105\x52\x28\x63\x6f\155\137\156\141\155\145\51\40\75\x20\x4c\117\x57\x45\122\50\x3f\51"; $query = $this->db->query($sql, array($strComName))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } $sql = "\111\116\123\105\122\124\x20\111\116\x54\x4f\40\x69\x6d\x70\x5f\143\157\155\x28\143\x6f\x6d\x5f\x6e\x61\155\x65\x29\x20\126\101\114\x55\105\123\40\x28\77\x29"; $this->db->query($sql, array($strComName)); return $this->db->affected_rows(); } public function delete_ImplantCompaniesByName($strComName) { $sql = "\104\x45\x4c\x45\124\x45\x20\106\x52\117\115\x20\151\x6d\160\x5f\x63\x6f\155\40\127\x48\105\122\105\x20\x4c\x4f\x57\x45\122\x28\143\157\x6d\137\x6e\141\155\145\x29\40\75\40\x3f"; $this->db->query($sql, $strComName); return $this->db->affected_rows(); } public function get_ImplantCompaniesByIsShown($bIsShown) { $this->db->select("\151\x6d\x70\x5f\x63\x6f\x6d\x2e\x63\x6f\x6d\137\x6e\141\x6d\x65"); $this->db->from("\x69\x6d\160\x5f\143\157\x6d"); $this->db->join("\151\155\x70\x5f\x6c\156\x75\x70", "\151\155\x70\137\x63\x6f\155\x2e\x63\x6f\x6d\x5f\x69\x64\40\75\40\x69\x6d\x70\x5f\x6c\156\165\160\56\x63\157\155\137\x69\x64"); $this->db->group_by(array("\151\x6d\160\137\143\157\155\x2e\x63\157\x6d\x5f\x6e\x61\155\x65", "\151\x6d\x70\137\154\x6e\165\x70\x2e\x6c\x6e\x75\x70\137\x75\163\145\162\137\x64\145\x66\x69\x6e\x65\x64\x5f\61")); $this->db->having("\151\155\x70\137\154\x6e\165\160\x2e\x6c\x6e\165\160\137\x75\163\145\x72\x5f\x64\145\x66\x69\156\145\144\x5f\x31", $bIsShown); if ($bIsShown === true) { $this->db->or_having("\x69\x6d\160\x5f\x6c\x6e\x75\x70\56\154\156\x75\x70\137\x75\163\x65\162\x5f\144\x65\x66\x69\x6e\145\x64\137\61\x20\151\x73\40\156\165\x6c\154"); } $this->db->order_by("\x69\155\x70\x5f\x63\x6f\155\x2e\143\x6f\155\x5f\156\141\x6d\145", "\x41\123\x43"); $query = $this->db->get()->result_array(); $items = array(); if (count($query) > 0) { foreach ($query as $row) { array_push($items, $row["\143\157\155\137\x6e\x61\x6d\145"]); } return array("\x65\x72\162\x6f\162\x43\157\144\145" => VERR_COMMON_SUCCESS, "\163\164\x72\x6c\103\x6f\155\x4e\141\155\x65" => $items); } else { return array("\145\162\x72\157\x72\103\x6f\144\x65" => VERR_DB_NOSUCHDATA, "\163\x74\162\154\x43\x6f\x6d\116\141\155\x65" => $items); } } } diff --git a/server/original/www/ezwebserver/src/application/models/ImplantLineups_model.php b/server/original/www/ezwebserver/src/application/models/ImplantLineups_model.php index 16892fd..9a45668 100644 --- a/server/original/www/ezwebserver/src/application/models/ImplantLineups_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImplantLineups_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strLineupName, $strComName))->result_array(); } public function post_ImplantLineupsByCompanyAndName($strComName, $strLineupName) { $sql = "\x53\x45\114\x45\x43\124\x20\x63\157\x6d\x5f\x69\x64\x20\x46\x52\117\x4d\40\x69\155\x70\137\x63\157\155\40\x57\110\105\x52\x45\x20\114\x4f\127\105\x52\x28\143\157\x6d\x5f\x6e\141\155\x65\x29\x20\75\40\114\117\x57\x45\x52\50\x3f\51"; $query = $this->db->query($sql, array($strComName))->result_array(); if (count($query) > 0) { $nComID = $query[0]["\x63\157\155\x5f\x69\144"]; $sql = "\x53\x45\x4c\105\103\x54\x20\x6c\156\x75\x70\x5f\151\x64\x20\x46\122\x4f\x4d\40\x69\x6d\x70\x5f\x6c\156\165\160\x20\127\x48\x45\x52\x45\x20\114\117\x57\105\x52\x28\154\156\x75\x70\137\x6e\141\155\x65\51\40\x3d\40\x4c\x4f\x57\x45\x52\x28\77\x29\x20\x41\116\104\x20\x63\157\155\137\151\144\x20\x3d\40\77"; $query = $this->db->query($sql, array($strLineupName, $nComID))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } else { $sql = "\x49\116\x53\105\122\124\40\111\116\x54\117\x20\151\155\160\137\154\156\x75\x70\x28\154\x6e\x75\x70\137\156\x61\x6d\145\54\x20\x63\157\155\x5f\151\x64\51\40\126\101\114\x55\x45\x53\40\50\x3f\54\x20\77\x29"; $this->db->query($sql, array($strLineupName, $nComID)); return $this->db->affected_rows(); } } else { return count($query); } } public function put_ImplantLineupsByCompanyAndName($strComName, $strLineupName, $Parameters) { $sql = "\x55\120\104\101\x54\105\40\x69\x6d\160\x5f\x6c\156\x75\160\40" . "\123\105\124\40\154\156\x75\x70\x5f\156\x61\155\x65\75\x20\x3f\x2c\x20\154\156\165\160\x5f\x73\x79\x6e\143\75\x3f\x20\x2c\40\x6c\x6e\x75\160\137\x75\x73\145\x72\137\x61\144\144\x65\144\x3d\77\x2c\40\154\x6e\165\160\137\165\x73\145\162\x5f\144\145\x66\x69\156\x65\x64\137\61\75\77\x2c\40\x6c\x6e\x75\x70\137\165\163\145\162\x5f\x64\145\146\x69\156\145\144\x5f\x32\x3d\x3f\40" . "\x57\x48\x45\122\105\40\114\117\x57\105\122\50\154\156\x75\x70\137\156\141\x6d\x65\x29\40\x3d\40\x4c\117\127\x45\x52\50\x3f\x29\x20" . "\x41\116\x44\x20\143\157\x6d\x5f\x69\x64\40\x3d\x20\x28" . "\123\x45\114\105\x43\124\x20\x63\157\x6d\x5f\151\x64\40" . "\x46\122\x4f\115\x20\151\x6d\160\x5f\143\x6f\155\40" . "\x57\110\x45\x52\105\x20\x4c\117\127\105\x52\x28\143\x6f\155\x5f\156\x61\155\145\51\40\75\40\x4c\117\127\x45\x52\50\x3f\x29\x29"; $this->db->query($sql, array($strLineupName, $Parameters["\x62\x53\171\x6e\143"], $Parameters["\x62\x55\163\145\162\101\x64\144\145\144"], $Parameters["\142\x53\150\157\167\110\151\x64\145"], $Parameters["\x73\164\162\x52\x65\x73\145\162\166\x65\x64\x32"], $strLineupName, $strComName)); return $this->db->affected_rows(); } public function delete_ImplantLineupsByCompanyAndName($strComName, $strLineupName) { $sql = "\104\105\x4c\x45\124\x45\40\106\x52\117\x4d\x20\151\155\160\x5f\154\x6e\x75\x70\x20" . "\x57\x48\x45\122\105\40\114\117\x57\105\122\x28\x6c\x6e\165\x70\137\156\x61\155\145\51\40\x3d\x20\114\117\127\105\122\50\77\x29\40" . "\101\x4e\104\40\143\157\155\x5f\151\x64\40\75\40\x28" . "\123\x45\114\105\103\124\40\x63\157\155\x5f\x69\x64\x20" . "\106\122\117\x4d\x20\x69\155\160\x5f\x63\x6f\x6d\x20" . "\127\x48\105\x52\x45\x20\114\x4f\127\x45\x52\50\143\x6f\155\x5f\x6e\141\x6d\x65\51\40\x3d\40\114\117\127\x45\x52\50\x3f\51\x29"; $this->db->query($sql, array($strLineupName, $strComName)); return $this->db->affected_rows(); } public function get_ImplantLineupsByCompany($parameters) { $sql = "\123\x45\x4c\105\103\x54\40\x6c\156\165\x70\137\x6e\141\x6d\x65\54\x20\154\x6e\165\160\x5f\x75\x73\x65\x72\x5f\144\x65\146\151\x6e\x65\144\137\61\40" . "\x46\122\117\x4d\40\x69\x6d\160\x5f\154\156\x75\x70\40" . "\x57\x48\105\122\x45\40\143\157\155\137\151\144\40\75\x20\50" . "\x53\x45\x4c\105\103\x54\40\x63\x6f\155\x5f\151\x64\40" . "\106\122\117\x4d\x20\x69\155\x70\137\x63\157\x6d\40" . "\127\x48\105\x52\105\x20\x4c\x4f\x57\x45\122\x28\x63\x6f\x6d\137\x6e\x61\x6d\x65\x29\x20\75\x20\x4c\117\127\105\x52\50\77\51\51\x20" . "\x4f\122\x44\105\122\x20\x42\x59\40\x6c\156\165\160\137\156\x61\x6d\145\x20\101\x53\103"; return $this->db->query($sql, array($parameters))->result_array(); } public function post_ImplantLineupsByCompany($strComName, $strLineupName) { $sql = "\123\105\x4c\x45\103\x54\x20\x63\x6f\155\x5f\x69\144\x20\x46\122\x4f\x4d\x20\x69\155\160\137\143\x6f\155\40\x57\x48\x45\122\x45\x20\114\x4f\x57\105\122\50\143\157\155\x5f\156\x61\x6d\145\51\40\x3d\40\114\117\x57\x45\x52\50\x3f\51"; $query = $this->db->query($sql, array($strComName))->result_array(); if (count($query) > 0) { $nComID = $query[0]["\x63\157\x6d\x5f\x69\x64"]; $lowerLineupNames = array(); foreach ($strLineupName as $row) { $lowerLineupName = strtolower($row); array_push($lowerLineupNames, $lowerLineupName); } $sql = "\x53\105\x4c\x45\x43\124\x20\x6c\x6e\x75\x70\137\151\x64\40\x46\122\x4f\115\40\151\x6d\x70\x5f\x6c\156\165\160\40\x57\x48\105\x52\105\40\x63\x6f\x6d\x5f\x69\x64\x20\75\x20\x3f\x20\101\x4e\x44\40\114\117\127\105\122\x28\154\156\x75\x70\x5f\156\141\x6d\145\x29\x20\111\x4e\40\77"; $query = $this->db->query($sql, array($nComID, $lowerLineupNames))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } else { foreach ($strLineupName as $row) { $sql = "\x49\x4e\123\105\x52\x54\40\111\x4e\124\x4f\x20\151\x6d\160\x5f\154\156\165\160\x28\154\x6e\x75\160\137\156\x61\155\x65\x2c\40\x63\x6f\x6d\x5f\x69\144\x29\40\x56\101\114\x55\105\x53\40\x28\x3f\x2c\x20\x3f\x29"; $this->db->query($sql, array($row, $nComID)); } return $this->db->affected_rows(); } } else { return count($query); } } public function patch_ImplantLineupsByCompanyAndNameAndNew($strComName, $strLineupName, $strNewLineupName) { $sql = "\125\120\104\101\124\x45\40\x69\x6d\x70\137\154\x6e\165\x70\x20" . "\x53\105\x54\40\x6c\156\165\x70\x5f\156\141\x6d\145\x20\x3d\x20\x3f\40" . "\127\110\x45\x52\105\40\x4c\117\127\105\122\x28\154\156\165\160\137\x6e\x61\x6d\145\51\x20\x3d\x20\114\117\127\x45\122\50\x3f\x29\x20" . "\x41\116\x44\x20\143\157\x6d\137\x69\x64\40\75\x20\x28" . "\x53\105\114\x45\x43\124\x20\x63\x6f\x6d\x5f\151\x64\x20" . "\x46\x52\x4f\115\40\x69\155\160\x5f\x63\x6f\x6d\x20" . "\127\110\105\122\105\40\114\117\x57\x45\122\x28\x63\x6f\155\x5f\x6e\x61\x6d\x65\51\40\x3d\x20\x4c\117\x57\105\122\x28\77\x29\51"; $this->db->query($sql, array($strNewLineupName, $strLineupName, $strComName)); return $this->db->affected_rows(); } public function get_ImplantLineupsByCompanyAndNameForId($strComName, $strLineupName) { $sql = "\x53\x45\x4c\x45\103\124\x20\x6c\x6e\x75\x70\137\151\144\40" . "\106\122\117\115\40\151\155\160\137\154\x6e\x75\160\40" . "\127\x48\x45\122\105\40\x4c\117\x57\105\x52\x28\154\x6e\x75\x70\x5f\156\141\155\145\x29\x20\75\x20\x4c\117\127\x45\122\x28\77\51\40" . "\x41\x4e\104\x20\143\x6f\x6d\x5f\151\144\40\x3d\40\x28" . "\x53\105\x4c\105\103\124\x20\x63\157\x6d\x5f\x69\144\40\106\x52\x4f\115\40\x69\155\160\137\143\157\155\40" . "\x57\x48\x45\122\105\40\x4c\x4f\127\105\122\x28\143\157\155\x5f\x6e\x61\155\x65\51\40\x3d\40\114\117\127\105\122\50\x3f\x29\x29"; return $this->db->query($sql, array($strLineupName, $strComName))->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/ImplantModels_model.php b/server/original/www/ezwebserver/src/application/models/ImplantModels_model.php index 4dd192b..8fb0c57 100644 --- a/server/original/www/ezwebserver/src/application/models/ImplantModels_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImplantModels_model.php @@ -1,7 +1,7 @@ db->query($sql, array($implantInfo["\163\x74\x72\x43\157\x6d\160\x61\x6e\171"]))->result_array(); if (count($query) == 0) { $sql = "\x49\116\123\105\122\124\40\111\116\124\x4f\40\x69\x6d\160\137\143\157\x6d\x28\143\x6f\x6d\137\x69\144\54\40\143\x6f\155\137\156\141\155\145\51\40\x56\x41\x4c\x55\105\x53\x28\x3f\x2c\x20\x3f\x29"; $this->db->query($sql, array($nComID, $implantInfo["\x73\164\x72\103\157\x6d\x70\141\156\171"])); if ($this->db->affected_rows() == 0) { return $this->db->affected_rows(); } } $sql = "\123\x45\114\x45\x43\124\40\154\x6e\165\160\137\x69\x64\x20\106\x52\117\115\40\x69\155\x70\x5f\x6c\156\165\x70\x20\127\110\x45\122\105\40\114\117\x57\105\x52\50\154\156\165\160\137\156\141\155\145\51\x20\x3d\x4c\117\127\x45\x52\x28\x3f\x29\40" . "\x41\116\104\40\x63\x6f\155\x5f\x69\144\x20\x3d\40\x28\x53\105\x4c\105\103\124\x20\143\157\x6d\137\x69\144\x20\106\x52\117\115\x20\x69\x6d\160\x5f\143\157\155\x20\x57\x48\105\122\x45\x20\114\x4f\x57\105\122\50\x63\x6f\155\x5f\156\x61\155\145\51\x20\x3d\x20\114\x4f\127\x45\122\x28\77\x29\x29"; $query = $this->db->query($sql, array($implantInfo["\163\164\x72\x4c\151\156\145\x75\x70"], $implantInfo["\x73\x74\x72\x43\x6f\155\x70\x61\156\171"]))->result_array(); if (count($query) == 0) { $sql = "\111\x4e\123\x45\122\x54\40\111\116\x54\117\40\151\x6d\x70\137\154\x6e\x75\160\50\x6c\x6e\x75\x70\137\151\x64\54\x20\154\156\x75\x70\137\156\141\x6d\145\54\40\x63\157\155\x5f\151\144\51\40" . "\x56\101\x4c\x55\x45\x53\x28\77\x2c\x20\77\54\x20\50\123\105\x4c\x45\x43\x54\x20\143\157\155\137\151\144\x20\106\122\117\115\40\151\x6d\160\137\143\157\x6d\x20\127\110\105\x52\105\x20\114\x4f\127\x45\x52\x28\143\157\x6d\x5f\156\x61\155\145\51\40\x3d\40\x4c\117\127\105\x52\50\x3f\51\51\x29"; $this->db->query($sql, array($nLnupID, $implantInfo["\x73\164\162\114\x69\x6e\x65\x75\160"], $implantInfo["\x73\x74\162\103\x6f\x6d\160\x61\156\171"])); if ($this->db->affected_rows() == 0) { return $this->db->affected_rows(); } } $sql = "\x53\x45\114\x45\103\x54\x20\x6d\x6f\x64\145\x6c\x5f\151\x64\x20\106\x52\x4f\x4d\x20\x69\155\160\x5f\155\157\x64\x65\x6c\x20\x57\x48\x45\x52\x45\x20\x4c\x4f\x57\x45\x52\50\x6d\157\x64\x65\154\x5f\x6e\141\x6d\145\51\x20\x3d\40\114\x4f\x57\x45\122\50\x3f\x29\40" . "\x41\x4e\104\40\154\x6e\165\160\137\151\144\40\x3d\x20\50\x53\x45\x4c\x45\x43\124\40\x6c\156\165\160\x5f\151\x64\40\x46\x52\x4f\x4d\40\x69\155\x70\137\x6c\x6e\165\x70\40\127\x48\105\122\x45\x20\114\x4f\127\x45\x52\50\x6c\156\165\160\x5f\x6e\x61\155\x65\51\x20\75\x20\x4c\117\x57\105\122\50\77\51\51"; $query = $this->db->query($sql, array($implantInfo["\x73\x74\x72\115\157\x64\x65\154\116\141\155\145"], $implantInfo["\163\x74\162\114\151\x6e\145\165\x70"]))->result_array(); if (count($query) == 0) { $sql = "\111\x4e\123\105\x52\124\40\111\x4e\x54\x4f\40\x69\155\160\137\x6d\x6f\144\x65\154\x28\155\157\x64\x65\154\x5f\x69\x64\54\x20\155\x6f\144\x65\x6c\x5f\156\141\155\x65\54\x20" . "\x6d\x6f\144\145\154\x5f\x6c\145\156\147\x74\150\x2c\x20\155\157\144\145\x6c\x5f\x74\x6f\x74\141\x6c\154\x65\x6e\x67\x74\x68\54\155\x6f\x64\x65\x6c\x5f\157\x63\143\154\x75\163\x61\154\54\x20" . "\155\x6f\x64\145\x6c\137\x61\160\x69\x63\x61\x6c\54\x20\155\x6f\x64\x65\154\x5f\x73\164\x6c\x5f\151\155\x67\x2c\x20\x6d\x6f\144\145\x6c\137\x70\156\147\x5f\x69\x6d\x67\54\x20\154\156\x75\160\137\151\x64\x29\40" . "\126\x41\114\125\x45\x53\50\x3f\x2c\40\77\x2c\40\77\x2c\40\x3f\54\40\77\54\40\77\54\x20\x3f\54\x20\x3f\x2c\40" . "\x28\123\105\x4c\x45\x43\124\x20\154\x6e\165\x70\137\x69\144\40\106\122\117\115\x20\x69\x6d\x70\137\x6c\156\x75\x70\x20\127\110\105\x52\x45\x20\114\117\x57\105\x52\50\154\156\165\x70\137\x6e\141\155\145\51\40\x3d\x20\114\x4f\127\x45\x52\x28\77\51\51\51"; $this->db->query($sql, array($nModelID, $implantInfo["\x73\x74\x72\115\157\x64\145\x6c\116\141\x6d\x65"], $implantInfo["\144\x4c\145\x6e\147\164\x68"], $implantInfo["\x64\x54\x6f\164\141\x6c\114\x65\156\147\x74\150"], $implantInfo["\x64\x4f\143\x63\154\x75\x73\141\154"], $implantInfo["\144\x41\x70\151\x63\x61\154"], $implantInfo["\151\x6d\147\123\x54\x4c"], $implantInfo["\151\x6d\147\120\116\x47"], $implantInfo["\163\x74\x72\114\151\156\145\x75\160"])); return $this->db->affected_rows(); } else { return VERR_DB_OVERLAP; } } public function put_ImplantModelsByDetail($parameters) { $sql = "\x53\x45\x4c\105\x43\124\x20\154\156\165\160\137\151\x64\40\x46\x52\x4f\115\x20\x69\155\160\137\154\156\x75\160\x20\x20" . "\x57\110\x45\x52\x45\x20\143\157\155\x5f\151\144\40\75\40" . "\50\123\x45\114\x45\103\124\40\143\157\155\x5f\x69\144\x20\x46\122\117\x4d\x20\151\x6d\x70\x5f\x63\157\x6d\x20\127\110\x45\x52\x45\x20\x4c\117\127\x45\x52\50\143\157\155\x5f\156\x61\155\145\x29\40\75\40\x4c\117\127\105\122\x28\x3f\51\40\51" . "\x41\116\x44\40\x4c\x4f\x57\x45\x52\50\x6c\x6e\165\x70\x5f\x6e\x61\x6d\145\x29\x20\x3d\40\114\x4f\x57\x45\122\50\77\x29"; return $this->db->query($sql, array($parameters["\x69\155\x70\x6c\x61\156\x74\111\156\146\x6f"]["\x73\x74\x72\x43\157\x6d\160\x61\156\x79"], $parameters["\151\x6d\160\154\141\156\x74\111\x6e\146\x6f"]["\x73\164\162\114\151\x6e\x65\x75\160"]))->result_array(); } public function put_ImplantModelsByDetail_Success($parameters, $nLnupID) { $sql = "\x55\x50\x44\101\124\105\40\x69\155\x70\x5f\155\157\144\x65\x6c\40" . "\x53\105\124\x20\155\157\x64\145\154\137\154\x65\x6e\x67\164\x68\40\75\40\x3f" . "\x2c\x20\155\157\144\x65\x6c\137\164\157\x74\x61\x6c\154\x65\156\147\164\150\x20\x3d\40\x3f" . "\x2c\40\155\x6f\x64\145\154\137\x6f\143\x63\x6c\165\163\141\154\x20\75\x20\x3f" . "\x2c\x20\155\x6f\x64\x65\154\x5f\x61\160\151\x63\141\x6c\x20\75\40\x3f" . "\x2c\40\x6d\157\x64\x65\x6c\x5f\x73\x74\154\137\x69\x6d\x67\x20\75\x20\x3f" . "\x2c\x20\x6d\157\x64\x65\x6c\137\x70\x6e\x67\x5f\x69\x6d\147\x20\x3d\x20\77\40" . "\127\x48\x45\122\105\x20\x4c\x4f\127\x45\122\x28\x6d\x6f\x64\145\x6c\137\156\141\155\x65\51\x20\75\40\x4c\117\x57\105\x52\50\x3f\x29\40" . "\101\x4e\104\40\x6c\x6e\165\160\137\x69\x64\x20\75\40\x3f"; $this->db->query($sql, array($parameters["\151\155\160\154\141\x6e\x74\111\x6e\146\157"]["\x64\x4c\x65\x6e\x67\x74\x68"], $parameters["\x69\x6d\160\154\x61\x6e\164\x49\156\x66\x6f"]["\x64\124\x6f\x74\x61\154\114\x65\156\x67\x74\150"], $parameters["\x69\155\x70\154\141\x6e\x74\111\x6e\146\x6f"]["\144\x4f\x63\x63\154\x75\x73\x61\x6c"], $parameters["\x69\x6d\160\154\141\x6e\x74\x49\156\x66\x6f"]["\x64\101\160\151\143\x61\154"], $parameters["\x69\x6d\160\154\141\x6e\164\111\x6e\x66\x6f"]["\x69\155\x67\123\x54\114"], $parameters["\151\x6d\160\x6c\x61\156\x74\111\x6e\x66\x6f"]["\151\155\147\x50\116\x47"], $parameters["\x69\x6d\160\154\x61\x6e\164\111\x6e\x66\x6f"]["\x73\x74\162\115\x6f\x64\145\x6c\116\x61\x6d\145"], $nLnupID)); return $this->db->affected_rows(); } public function get_ImplantModelsByCompanyAndLineupAndNameAndContainsSTL($strComName, $strLineupName, $strModelName, $bContainSTLFile) { if ($bContainSTLFile === FALSE) { $sql = "\123\x45\x4c\x45\103\124\40\155\157\x64\x65\x6c\x5f\x69\x64\x2c\x20\155\x6f\x64\145\x6c\137\156\141\155\145\54\40\x6d\x6f\x64\145\x6c\x5f\x6c\145\x6e\x67\x74\x68\54\x20\155\x6f\144\x65\154\137\x74\x6f\x74\x61\154\x6c\145\x6e\147\164\x68\x2c\12\40\x20\x20\40\40\40\x20\x20\x20\x20\40\40\x20\40\40\x20\x6d\157\x64\x65\x6c\137\x6f\x63\x63\x6c\165\x73\x61\154\54\x20\155\x6f\x64\145\x6c\137\x61\x70\151\x63\x61\154\54\xa\40\40\40\40\x20\40\40\x20\40\x20\x20\x20\40\x20\x20\x20\155\x6f\144\145\x6c\x5f\160\156\147\x5f\151\155\147\54\x20\x6d\x6f\x64\145\x6c\x5f\163\x79\156\143\54\40\x6d\157\144\x65\x6c\x5f\x63\157\154\x6f\x72\x2c\xa\40\40\x20\x20\40\40\x20\40\x20\40\40\40\x20\x20\40\40\x6d\x6f\x64\x65\154\137\165\163\145\162\x5f\x61\144\144\x65\144\x2c\x20\x6d\157\144\145\154\137\165\x73\x65\162\137\144\x65\x66\x69\156\x65\144\x5f\61\54\12\40\40\x20\40\40\x20\x20\x20\x20\40\40\x20\x20\40\40\x20\x6d\157\144\x65\154\137\x75\163\x65\162\x5f\x64\145\146\151\x6e\x65\144\137\x32\xa\x20\40\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\x20\106\122\117\x4d\x20\151\155\x70\137\x6d\157\x64\145\154\xa\x20\40\x20\40\40\x20\40\40\x20\x20\40\40\40\x20\x20\40\127\x48\105\122\105\40\155\157\144\145\x6c\137\x69\x64\x20\75\40\x28\123\105\x4c\105\x43\124\x20\155\x6f\x64\x65\x6c\x5f\x69\x64\40\x46\122\x4f\115\40\x69\x6d\x70\137\155\157\x64\x65\x6c\x20\x57\110\105\122\x45\x20\114\117\127\x45\x52\x28\155\157\x64\145\x6c\137\x6e\141\x6d\x65\x29\40\x3d\40\114\117\127\x45\x52\x28\x3f\x29\12\40\40\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\40\40\x20\101\x4e\x44\x20\x6c\x6e\x75\160\x5f\151\x64\40\75\x20\x28\x53\x45\114\105\103\x54\40\154\x6e\165\160\x5f\x69\x64\x20\106\x52\x4f\x4d\40\151\155\x70\x5f\x6c\156\x75\x70\40\x57\x48\x45\122\105\x20\x4c\117\x57\105\122\50\x6c\x6e\165\160\x5f\156\x61\155\145\x29\x20\75\x20\114\x4f\127\105\x52\x28\77\51\xa\x20\x20\x20\x20\40\40\40\40\x20\x20\40\40\x20\x20\40\40\x41\x4e\x44\x20\143\157\x6d\x5f\x69\144\x20\75\40\x28\123\x45\x4c\x45\x43\x54\40\143\157\155\137\x69\x64\x20\106\122\x4f\115\40\x69\x6d\x70\x5f\143\157\155\x20\x57\110\x45\x52\x45\40\114\x4f\x57\x45\x52\50\x63\x6f\155\x5f\x6e\141\155\145\51\40\75\x20\114\x4f\127\105\122\x28\77\51\x29\x29\x29"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } else { $sql = "\123\x45\x4c\105\103\124\x20\155\x6f\144\x65\154\x5f\151\144\x2c\40\155\157\144\145\154\x5f\x6e\141\155\x65\54\x20\155\x6f\144\x65\154\137\x6c\145\x6e\147\x74\x68\x2c\40\155\x6f\144\x65\x6c\137\x74\x6f\x74\x61\154\x6c\145\156\147\164\x68\54\12\x20\40\40\40\x20\40\40\x20\x20\40\40\40\40\40\40\x20\155\x6f\x64\145\x6c\137\x6f\143\143\154\x75\x73\x61\x6c\x2c\40\155\157\144\x65\154\x5f\141\160\x69\x63\x61\154\x2c\x20\x6d\x6f\144\x65\x6c\x5f\163\x74\x6c\137\x69\155\x67\x2c\12\x20\40\40\x20\40\x20\40\40\40\x20\x20\x20\40\40\x20\x20\155\157\x64\x65\154\137\160\x6e\x67\137\x69\x6d\147\54\40\155\157\144\145\154\137\163\x79\x6e\x63\54\x20\155\x6f\x64\145\154\x5f\143\157\154\157\162\54\12\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\40\x20\40\x20\x20\155\157\144\145\x6c\137\165\x73\145\162\x5f\141\x64\144\145\144\x2c\40\155\x6f\144\145\154\x5f\165\163\x65\162\137\x64\145\146\151\156\145\144\x5f\61\x2c\12\40\40\40\40\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\155\157\144\x65\154\137\165\x73\x65\x72\x5f\x64\x65\x66\151\156\145\144\x5f\x32\xa\40\40\x20\40\x20\40\x20\x20\40\40\x20\x20\x20\x20\x20\40\106\122\117\x4d\40\x69\155\x70\137\x6d\157\144\x65\x6c\xa\x20\x20\x20\40\x20\40\x20\40\40\x20\40\x20\40\40\x20\40\127\x48\105\122\105\40\155\x6f\x64\x65\154\137\151\x64\x20\x3d\x20\50\x53\x45\114\105\x43\124\40\155\157\x64\145\x6c\137\151\x64\40\x46\122\x4f\115\x20\x69\x6d\160\x5f\155\157\x64\145\154\40\x57\x48\105\x52\x45\40\x4c\x4f\127\105\x52\50\155\x6f\x64\x65\154\137\x6e\x61\155\x65\51\x20\75\40\114\x4f\x57\105\x52\50\x3f\51\xa\40\40\40\40\x20\x20\40\x20\x20\40\x20\x20\40\40\40\40\x41\116\x44\x20\154\x6e\165\x70\137\151\144\x20\75\x20\x28\123\105\114\x45\x43\x54\x20\x6c\156\x75\x70\x5f\151\x64\40\x46\x52\x4f\x4d\x20\151\155\x70\x5f\154\x6e\165\160\40\127\x48\105\122\x45\x20\114\117\127\x45\122\x28\x6c\156\165\x70\x5f\156\141\155\145\x29\x20\75\x20\x4c\117\127\x45\122\x28\x3f\x29\12\x20\40\x20\40\40\x20\40\x20\40\x20\x20\40\x20\40\40\40\x41\116\104\40\x63\x6f\x6d\137\151\x64\40\75\x20\x28\x53\x45\x4c\x45\103\124\x20\x63\x6f\155\x5f\x69\x64\40\106\x52\x4f\x4d\x20\151\155\x70\137\x63\157\155\x20\127\x48\105\x52\x45\40\x4c\117\x57\105\122\50\x63\x6f\x6d\137\x6e\141\155\145\51\x20\x3d\40\x4c\117\x57\105\122\50\x3f\51\51\51\x29"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } } public function get_ImplantModelsByCompanyAndLineupForNameList($parameters) { $strComName = $parameters["\x73\164\x72\103\157\x6d\116\141\x6d\145"]; $strLineupName = $parameters["\x73\x74\162\114\151\x6e\x65\165\160\x4e\x61\155\x65"]; $sql = "\x53\105\114\105\103\x54\40\x6d\x6f\144\x65\x6c\x5f\156\x61\155\x65\x20" . "\x46\122\x4f\x4d\x20\x69\x6d\160\x5f\155\157\x64\145\x6c\40" . "\x57\110\x45\x52\x45\40\154\x6e\165\x70\x5f\x69\x64\40\75\x20\50" . "\123\105\x4c\x45\103\124\40\154\x6e\x75\x70\x5f\151\144\40" . "\106\122\117\115\x20\x69\155\160\137\154\156\x75\x70\40" . "\127\110\105\122\105\x20\114\x4f\127\105\122\50\154\x6e\165\x70\137\156\141\x6d\145\x29\x20\x3d\40\114\x4f\x57\x45\x52\x28\77\51\40" . "\x41\116\x44\x20\x63\157\155\137\x69\x64\40\75\x20\x28" . "\123\105\x4c\x45\103\124\x20\143\x6f\155\137\151\x64\x20" . "\106\122\x4f\115\x20\151\x6d\160\x5f\x63\157\x6d\40" . "\x57\110\x45\122\105\x20\x4c\117\x57\x45\x52\50\143\157\x6d\137\156\x61\155\x65\51\x20\75\40\x4c\x4f\127\105\122\x28\x3f\x29\x29\x29"; return $this->db->query($sql, array($strLineupName, $strComName))->result_array(); } public function get_ImplantModelsByCompanyAndLineupAndNameForDetail($strComName, $strLineupName, $strModelName) { $sql = "\123\105\x4c\105\x43\x54\x20\155\x6f\x64\x65\154\137\151\x64\x2c\40\x6d\x6f\144\x65\154\137\x6e\141\155\x65\54\40\155\x6f\144\145\x6c\x5f\x6c\145\156\147\164\x68\x2c\x20\155\157\x64\x65\154\x5f\164\x6f\x74\x61\154\x6c\145\x6e\147\x74\x68\54\xa\x20\40\40\40\x20\40\x20\40\x20\40\40\40\40\40\x20\x20\155\x6f\x64\x65\x6c\137\x6f\x63\x63\x6c\165\x73\141\154\x2c\x20\155\x6f\x64\x65\154\137\x61\x70\x69\x63\141\x6c\54\40\x6d\x6f\144\145\x6c\137\x73\164\x6c\137\x69\x6d\x67\x2c\12\x20\x20\40\40\40\40\x20\40\x20\x20\x20\x20\x20\40\x20\x20\155\157\144\x65\154\x5f\160\156\x67\137\x69\155\x67\x2c\x20\x6d\x6f\144\145\154\x5f\163\x79\x6e\143\x2c\40\x6d\157\x64\145\x6c\x5f\143\x6f\154\x6f\162\x2c\xa\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\40\40\40\x20\40\x6d\x6f\x64\145\x6c\137\x75\x73\145\162\137\x61\144\x64\145\144\54\x20\155\x6f\144\145\154\137\x75\x73\145\x72\x5f\x64\x65\146\x69\x6e\145\144\137\x31\54\xa\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\40\x20\x20\x20\x20\155\x6f\x64\145\154\137\165\x73\145\162\x5f\144\x65\146\x69\x6e\x65\x64\137\x32\xa\40\40\40\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\40\x46\x52\117\115\40\151\x6d\x70\137\x6d\x6f\x64\145\154\xa\40\x20\x20\x20\x20\40\x20\x20\x20\x20\40\x20\x20\x20\40\40\x57\x48\x45\122\105\x20\155\157\x64\x65\154\x5f\151\144\40\x3d\40\x28\123\105\114\x45\103\x54\40\155\x6f\x64\145\154\x5f\x69\x64\x20\x46\122\x4f\x4d\x20\151\155\160\x5f\155\x6f\144\145\x6c\40\x57\110\x45\122\105\x20\114\x4f\127\105\122\x28\155\x6f\x64\145\154\x5f\156\141\x6d\145\51\40\75\x20\x4c\117\127\x45\122\x28\x3f\x29\12\40\x20\40\40\40\40\40\x20\x20\40\40\40\x20\40\x20\x20\x41\116\104\40\154\156\165\160\x5f\151\x64\40\x3d\x20\x28\x53\105\x4c\105\103\x54\x20\154\x6e\165\160\x5f\151\x64\x20\106\x52\x4f\x4d\x20\x69\155\x70\137\x6c\156\x75\160\40\x57\x48\x45\x52\105\x20\114\x4f\x57\105\x52\50\x6c\x6e\x75\x70\137\x6e\x61\155\145\x29\x20\x3d\40\114\x4f\127\x45\122\50\77\51\xa\40\x20\x20\40\40\40\x20\x20\x20\40\40\40\40\x20\40\x20\x41\x4e\x44\40\143\157\155\x5f\151\144\40\75\40\50\123\105\x4c\105\x43\124\40\143\157\155\137\x69\x64\x20\106\x52\x4f\x4d\40\151\155\160\137\x63\x6f\155\x20\127\110\105\x52\x45\x20\x4c\117\127\x45\122\x28\143\x6f\x6d\137\x6e\141\155\145\x29\x20\x3d\x20\114\x4f\x57\x45\x52\x28\x3f\51\x29\51\51"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } public function post_ImplantModels($implantInfo) { $sql = "\123\x45\114\105\x43\x54\x20\155\157\144\145\154\x5f\151\x64\40" . "\x46\x52\x4f\x4d\40\151\155\x70\x5f\155\157\x64\x65\154\x20" . "\x57\110\x45\x52\105\x20\x4c\117\x57\x45\122\50\x6d\157\x64\145\x6c\137\x6e\x61\155\x65\x29\40\x3d\x20\114\x4f\x57\x45\122\x28\x3f\x29\40" . "\101\x4e\104\40\x6c\x6e\x75\160\x5f\x69\x64\x20\75\40\x28" . "\x53\x45\x4c\x45\103\124\x20\x6c\156\x75\160\137\x69\144\40" . "\106\122\x4f\x4d\40\x69\x6d\x70\x5f\x6c\x6e\x75\160\40" . "\127\110\x45\x52\x45\x20\114\x4f\127\x45\122\50\x6c\156\165\x70\137\x6e\141\155\x65\51\40\75\40\x4c\x4f\x57\105\122\50\x3f\x29\40" . "\101\116\104\x20\143\157\x6d\137\151\144\40\75\x20\50" . "\x53\x45\114\105\103\124\40\143\x6f\155\x5f\x69\x64\40" . "\x46\x52\117\x4d\40\x69\x6d\x70\137\143\x6f\x6d\x20" . "\x57\110\105\122\x45\40\114\x4f\127\105\122\x28\x63\x6f\155\x5f\x6e\141\x6d\145\51\x20\75\40\114\117\127\x45\x52\50\x3f\x29\x29\51"; $query = $this->db->query($sql, array($implantInfo["\163\x74\162\x4d\x6f\144\145\x6c\116\x61\155\145"], $implantInfo["\x73\164\162\114\x69\x6e\x65\x75\160"], $implantInfo["\x73\x74\162\103\x6f\155\x70\x61\x6e\x79"]))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } else { $sql = "\x53\x45\x4c\x45\103\124\40\154\x6e\165\160\137\x69\144\40" . "\106\x52\117\x4d\x20\x69\155\160\x5f\x6c\x6e\x75\160\x20" . "\127\110\105\122\x45\x20\114\117\127\105\x52\50\x6c\x6e\165\x70\x5f\156\141\155\x65\51\x20\75\40\x4c\117\127\105\122\50\x3f\x29\40" . "\x41\x4e\x44\40\143\157\x6d\137\151\144\x20\x3d\40\x28" . "\123\x45\x4c\x45\103\x54\x20\143\157\x6d\137\151\144\40\106\x52\117\115\40\x69\x6d\160\x5f\x63\x6f\155\x20" . "\127\110\x45\122\105\x20\x4c\x4f\x57\x45\122\x28\x63\157\x6d\137\156\x61\x6d\145\51\40\x3d\40\114\117\x57\x45\x52\x28\x3f\x29\51"; $query = $this->db->query($sql, array($implantInfo["\163\x74\x72\114\x69\x6e\x65\x75\160"], $implantInfo["\163\164\x72\103\157\x6d\160\141\x6e\171"]))->result_array(); if (count($query) == 0) { $sql = "\123\x45\x4c\105\x43\124\x20\143\x6f\x6d\x5f\x69\144\40\x46\x52\x4f\x4d\x20\151\x6d\x70\137\143\157\155\x20\x57\110\x45\x52\105\x20\114\117\x57\x45\x52\50\143\x6f\x6d\x5f\156\141\155\145\51\x20\x3d\40\114\x4f\127\105\122\50\x3f\x29"; $query = $this->db->query($sql, array($implantInfo["\163\164\x72\103\x6f\155\160\x61\156\171"]))->result_array(); if (count($query) == 0) { $sql = "\111\x4e\123\x45\x52\x54\40\111\x4e\x54\x4f\x20\151\x6d\160\137\x63\157\155\50\x63\157\x6d\137\x6e\x61\x6d\x65\x29\x20\x56\101\114\x55\105\123\x20\50\77\x29\x20\x52\105\124\x55\x52\116\111\116\x47\x20\x63\x6f\x6d\137\151\144"; $this->db->query($sql, array($implantInfo["\x73\164\x72\103\157\155\x70\141\156\x79"])); $sql = "\123\x45\114\x45\103\x54\40\x63\x6f\x6d\137\x69\144\x20\x46\122\117\x4d\x20\151\155\160\137\x63\157\x6d\x20\127\x48\x45\x52\105\x20\114\117\x57\105\122\50\143\157\155\x5f\x6e\141\x6d\145\51\x20\75\x20\114\x4f\x57\x45\x52\50\x3f\51"; $query = $this->db->query($sql, array($implantInfo["\x73\x74\162\x43\x6f\x6d\x70\141\156\171"]))->result_array(); } $nComID = $query[0]["\143\157\155\137\151\144"]; $sql = "\x49\x4e\x53\105\x52\124\40\x49\x4e\124\x4f\40\151\x6d\x70\x5f\x6c\x6e\165\x70\x28\154\156\x75\160\x5f\x6e\141\x6d\145\x2c\40\x63\x6f\x6d\x5f\151\x64\x29\x20\126\x41\114\x55\105\123\x20\50\77\54\40\77\51"; $this->db->query($sql, array($implantInfo["\x73\164\x72\114\151\156\x65\x75\x70"], $nComID)); $sql = "\x53\105\x4c\x45\x43\124\40\x6c\x6e\165\160\137\151\x64\x20" . "\x46\122\117\x4d\40\x69\x6d\x70\x5f\x6c\x6e\x75\x70\40" . "\127\110\105\x52\x45\40\x4c\x4f\x57\x45\122\50\154\156\165\x70\137\x6e\141\155\x65\51\x20\75\40\x4c\x4f\x57\x45\x52\50\x3f\51\40" . "\101\116\104\x20\143\157\x6d\x5f\151\x64\40\x3d\x20\50" . "\x53\x45\x4c\105\103\124\40\x63\x6f\x6d\137\151\144\40\x46\122\117\x4d\40\x69\x6d\x70\137\x63\x6f\155\x20" . "\x57\110\105\x52\x45\40\114\117\127\x45\x52\50\x63\157\x6d\137\156\x61\x6d\x65\51\40\x3d\40\x4c\x4f\x57\x45\x52\x28\x3f\51\51"; $query = $this->db->query($sql, array($implantInfo["\x73\x74\x72\x4c\x69\x6e\145\165\x70"], $implantInfo["\163\164\x72\x43\157\x6d\x70\x61\x6e\171"]))->result_array(); } $nLineupID = $query[0]["\154\x6e\x75\x70\137\151\x64"]; $sql = "\x49\116\x53\x45\122\x54\40\x49\x4e\124\117\x20\151\155\160\137\x6d\157\x64\145\x6c\x28\x6d\157\x64\145\154\137\x6e\141\x6d\x65\x2c\40" . "\x6d\157\144\x65\154\x5f\x6c\145\156\147\x74\150\x2c\40\155\x6f\x64\145\154\x5f\164\x6f\164\141\x6c\154\145\156\x67\164\150\54\40" . "\155\x6f\x64\145\154\x5f\x6f\x63\143\x6c\x75\163\141\x6c\x2c\x20\155\x6f\144\145\x6c\x5f\141\160\151\x63\141\154\x2c\x20\x6c\x6e\165\160\137\x69\x64\54\40" . "\x6d\x6f\144\145\154\137\x73\x74\x6c\137\x69\x6d\147\x2c\40\155\157\144\x65\x6c\137\x70\x6e\147\x5f\x69\155\147\51\x20" . "\x56\x41\x4c\125\x45\123\50\x3f\x2c\x20\77\x2c\x20\77\x2c\x20\x3f\x2c\40\x3f\54\40\x3f\54\x20\x3f\x2c\40\x3f\x29"; $this->db->query($sql, array($implantInfo["\163\164\162\115\157\144\x65\x6c\x4e\x61\x6d\x65"], $implantInfo["\x64\x4c\x65\x6e\x67\x74\150"], $implantInfo["\x64\x54\x6f\x74\x61\154\114\x65\156\147\164\x68"], $implantInfo["\x64\x4f\x63\x63\x6c\165\163\141\154"], $implantInfo["\x64\101\160\x69\x63\x61\154"], $nLineupID, $implantInfo["\x69\x6d\147\x53\124\x4c"], $implantInfo["\x69\155\147\120\x4e\107"])); return $this->db->affected_rows(); } } public function put_ImplantModels($implantInfo) { $sql = "\123\105\114\105\103\x54\40\x6c\x6e\x75\x70\x5f\x69\x64\x20\x46\x52\117\x4d\40\x69\155\x70\137\154\156\x75\x70\40\x57\110\x45\122\x45\40\143\x6f\x6d\x5f\151\144\40\75\x20\50\123\x45\x4c\105\x43\124\40\x63\157\x6d\x5f\x69\x64\40\106\x52\x4f\115\40\151\x6d\160\137\x63\x6f\155\x20\127\x48\x45\122\105\x20\x4c\x4f\127\x45\x52\x28\143\x6f\x6d\137\156\x61\155\145\x29\x20\x3d\40\114\x4f\127\105\122\50\77\51\x29\x20" . "\101\x4e\x44\x20\114\x4f\127\x45\122\x28\x6c\x6e\x75\x70\x5f\x6e\141\155\x65\51\x20\75\x20\114\x4f\x57\x45\122\50\77\x29"; $query = $this->db->query($sql, array($implantInfo["\163\x74\x72\103\x6f\155\x70\x61\156\x79"], $implantInfo["\163\x74\162\x4c\x69\x6e\x65\x75\x70"]))->result_array(); if (count($query) > 0) { $nLnupID = $query[0]["\x6c\x6e\x75\x70\137\x69\144"]; $sql = "\125\120\x44\101\x54\x45\x20\151\x6d\160\137\155\x6f\x64\x65\x6c\x20" . "\123\x45\x54\x20\155\157\144\x65\x6c\137\154\x65\156\x67\164\150\40\x3d\x20\77\x2c\40" . "\x6d\x6f\x64\x65\154\x5f\x74\x6f\164\141\x6c\x6c\x65\156\x67\164\x68\x20\75\40\77\x2c\40" . "\155\x6f\x64\x65\x6c\x5f\157\143\x63\154\165\x73\141\154\x20\x3d\x20\x3f\54\x20" . "\x6d\x6f\x64\145\154\137\141\160\151\x63\x61\x6c\40\x3d\40\x3f\x2c\40" . "\155\x6f\144\145\154\137\x73\164\x6c\137\x69\x6d\147\x20\75\x20\x3f\x2c\x20" . "\155\x6f\144\x65\154\137\x70\156\x67\137\x69\155\147\40\75\x20\x3f" . "\127\110\x45\x52\x45\40\x4c\117\127\105\122\50\155\157\144\145\154\137\x6e\x61\x6d\145\51\x20\x3d\40\x4c\x4f\127\105\122\50\x3f\51\x20" . "\x41\x4e\x44\40\x6c\x6e\165\x70\x5f\151\x64\40\x3d\x20\77"; $this->db->query($sql, array($implantInfo["\144\114\145\156\x67\164\x68"], $implantInfo["\x64\124\x6f\x74\141\x6c\114\x65\x6e\x67\x74\x68"], $implantInfo["\x64\117\143\x63\x6c\165\x73\x61\x6c"], $implantInfo["\144\101\x70\151\x63\141\x6c"], $implantInfo["\151\x6d\147\123\x54\x4c"], $implantInfo["\x69\155\x67\120\x4e\x47"], $implantInfo["\x73\x74\x72\115\157\x64\145\154\116\x61\x6d\x65"], $nLnupID)); return $this->db->affected_rows(); } else { return count($query); } } public function get_ImplantModelsByCompanyAndLineupAndName($strComName, $strLineupName, $strModelName) { $sql = "\x53\105\x4c\x45\103\x54\40\155\x6f\x64\145\154\137\151\144\54\x20\x6d\157\144\x65\x6c\x5f\x6e\141\155\145\54\x20\155\157\x64\x65\154\137\x6c\145\x6e\x67\x74\x68\54" . "\40\155\x6f\x64\x65\x6c\137\x74\x6f\164\x61\x6c\154\x65\x6e\147\164\150\54\40\155\157\144\145\154\x5f\x6f\143\x63\x6c\x75\x73\x61\x6c\x2c" . "\40\x6d\x6f\x64\145\154\x5f\x61\x70\151\143\141\154\54\40\155\x6f\144\x65\x6c\x5f\160\156\x67\137\151\x6d\147\54" . "\x20\155\x6f\144\145\154\x5f\x73\171\156\x63\54\40\x6d\157\x64\145\154\x5f\143\x6f\154\157\162\54\x20\155\x6f\x64\x65\x6c\137\x75\163\145\x72\x5f\141\144\144\x65\x64\x2c" . "\40\x6d\157\144\x65\154\x5f\165\163\x65\x72\137\144\x65\x66\x69\x6e\x65\144\137\x31\54" . "\40\x6d\x6f\144\x65\154\x5f\x75\x73\x65\162\x5f\144\x65\x66\151\x6e\x65\x64\137\62\40" . "\106\x52\x4f\x4d\x20\x69\155\x70\137\155\157\144\145\x6c" . "\40\127\x48\105\x52\x45\x20\155\x6f\x64\x65\154\x5f\151\x64\x20\x3d\x20" . "\x28\123\x45\x4c\x45\x43\124\x20\155\x6f\x64\x65\154\x5f\x69\x64\x20" . "\x46\122\x4f\115\x20\x69\x6d\160\137\155\x6f\144\145\154\40" . "\x57\x48\105\x52\105\x20\114\x4f\x57\105\x52\x28\155\157\x64\x65\154\x5f\x6e\x61\155\145\x29\x20\x3d\x20\x4c\117\127\x45\122\50\77\x29\40" . "\101\116\x44\x20\154\156\x75\x70\137\151\144\x20\x3d\40" . "\x28\x53\105\114\105\103\x54\40\154\x6e\165\160\x5f\151\144\x20" . "\106\x52\x4f\115\40\x69\x6d\x70\137\154\x6e\x75\160\x20" . "\127\x48\105\122\105\x20\x4c\x4f\127\105\122\x28\154\156\x75\160\137\156\x61\155\x65\51\x20\75\40\114\x4f\x57\x45\122\x28\77\x29\40" . "\101\x4e\x44\40\x63\157\155\137\151\144\40\x3d\x20" . "\50\x53\x45\114\105\103\124\x20\x63\157\x6d\x5f\151\x64\x20\x46\x52\x4f\115\40\x69\x6d\160\x5f\143\157\x6d\x20\x57\x48\105\122\x45\x20\114\x4f\127\x45\x52\x28\143\157\155\137\156\x61\x6d\145\x29\x20\x3d\40\x4c\117\127\x45\122\x28\77\x29\x29\x29\51"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } public function delete_ImplantModelsByCompanyAndLineupAndName($strComName, $strLineupName, $strModelName) { $sql = "\x53\105\114\x45\103\x54\x20\154\156\x75\x70\137\x69\144\x20\106\122\x4f\115\40\x69\155\x70\137\154\x6e\x75\x70\40\x57\110\105\122\x45\40\x63\x6f\x6d\137\x69\x64\40\75\x20\50\123\105\x4c\105\x43\124\x20\143\157\x6d\137\151\144\x20\106\x52\x4f\x4d\40\151\155\160\137\143\x6f\155\x20\x57\110\x45\122\x45\40\x4c\117\x57\x45\x52\x28\143\157\x6d\x5f\156\141\155\x65\x29\x20\x3d\40\114\x4f\x57\x45\122\x28\77\x29\51\x20" . "\x41\x4e\x44\40\x4c\117\127\105\x52\50\154\156\x75\160\137\156\141\155\x65\x29\40\75\x20\x4c\117\x57\x45\x52\x28\x3f\51"; $query = $this->db->query($sql, array($strComName, $strLineupName))->result_array(); if (count($query) > 0) { $nLnupID = $query[0]["\x6c\156\x75\160\x5f\x69\144"]; $sql = "\104\x45\114\x45\x54\105\x20\106\122\x4f\115\40\151\x6d\160\x5f\x6d\x6f\144\x65\154\x20\127\110\x45\x52\105\x20\114\117\127\x45\x52\50\x6d\x6f\x64\x65\154\137\x6e\141\x6d\145\x29\x20\x3d\x20\114\117\x57\x45\x52\x28\77\x29\40\101\116\x44\x20\154\156\x75\160\137\x69\x64\x20\75\40\77"; $this->db->query($sql, array($strModelName, $nLnupID)); return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } public function get_ImplantModelsByCompanyAndLineupForE3($strComName, $strLineupName) { $sql = "\123\x45\114\x45\103\x54\40\155\x6f\144\x65\154\x5f\151\144\54\40\x6d\x6f\x64\x65\154\137\x6e\141\155\x65\54\40\155\x6f\144\x65\154\137\154\145\x6e\x67\x74\x68\54\x20\x6d\x6f\144\145\x6c\x5f\164\157\164\x61\154\x6c\x65\156\147\164\x68\54\x20\155\x6f\144\x65\154\x5f\157\x63\143\x6c\x75\163\x61\x6c\54\40\155\x6f\x64\145\154\137\x61\x70\151\143\141\154\40" . "\x46\x52\x4f\x4d\40\151\155\160\x5f\x6d\157\x64\145\x6c\x20" . "\127\110\105\x52\105\x20\x6c\156\165\x70\x5f\151\x64\x20\x3d\x20" . "\x28\123\105\114\105\x43\124\x20\x6c\x6e\x75\x70\137\151\x64\x20\106\x52\x4f\x4d\40\151\x6d\160\x5f\154\156\x75\x70\40\x57\x48\x45\x52\105\x20\x4c\117\127\x45\122\x28\x6c\156\165\160\x5f\156\x61\x6d\145\51\x20\75\x20\114\x4f\x57\x45\122\x28\x3f\51\x20" . "\101\116\x44\40\x63\x6f\155\137\x69\144\x20\75\40\x28\x53\105\x4c\105\103\x54\x20\x63\x6f\x6d\x5f\x69\144\40\x46\x52\117\115\x20\x69\x6d\x70\137\143\x6f\x6d\40\x57\x48\105\x52\105\40\114\x4f\127\105\x52\x28\x63\x6f\155\137\156\141\x6d\x65\51\x20\x3d\40\114\x4f\127\105\x52\50\x3f\51\51\51"; return $this->db->query($sql, array($strLineupName, $strComName))->result_array(); } public function get_ImplantModelsByCompanyAndLineupAndNameForId($strComName, $strLineupName, $strModelName) { $sql = "\x53\105\114\x45\103\124\40\155\157\144\x65\154\x5f\151\x64\x20" . "\106\x52\117\x4d\40\151\155\160\x5f\x6d\x6f\144\145\x6c\40" . "\127\110\105\x52\105\40\x4c\x4f\127\105\x52\50\155\x6f\x64\x65\154\137\x6e\x61\x6d\145\51\x20\75\x20\114\x4f\127\x45\122\50\77\x29\40" . "\101\x4e\104\x20\x6c\x6e\x75\160\x5f\x69\144\x20\x3d\40\50" . "\123\105\114\x45\x43\x54\x20\154\x6e\x75\160\137\151\x64\x20" . "\106\x52\x4f\115\x20\151\x6d\x70\137\x6c\x6e\x75\160\x20" . "\127\110\105\122\105\x20\114\117\x57\105\122\x28\x6c\156\165\160\137\x6e\141\155\x65\51\40\75\40\x4c\x4f\x57\105\x52\50\x3f\51\x20" . "\101\116\104\x20\143\157\155\137\151\x64\40\x3d\x20\x28" . "\123\x45\x4c\x45\x43\x54\x20\x63\157\155\137\151\144\40" . "\x46\122\117\115\x20\x69\155\x70\137\143\157\155\40" . "\127\x48\105\x52\105\x20\114\x4f\127\x45\122\x28\143\x6f\155\137\x6e\x61\x6d\x65\x29\x20\75\x20\x4c\117\x57\105\x52\50\77\51\x29\51"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } public function patch_ImplantModelsByCompanyAndLineupAndNameAndNew($strComName, $strLineupName, $strModelName, $strNewModelName) { $sql = "\123\105\114\105\x43\x54\40\154\x6e\x75\160\137\151\144\40\106\122\117\x4d\40\x69\155\160\137\154\x6e\x75\160\x20\127\110\x45\x52\105\40\143\x6f\x6d\137\151\x64\x20\x3d\x20\x28\x53\x45\x4c\105\103\124\40\x63\x6f\155\137\151\x64\40\106\x52\117\x4d\x20\151\x6d\x70\137\143\157\x6d\40\127\x48\105\x52\x45\x20\x4c\x4f\127\105\x52\50\143\x6f\155\137\156\141\155\145\x29\x20\75\x20\x4c\x4f\127\x45\122\50\77\x29\51\x20" . "\101\x4e\x44\40\114\117\x57\x45\122\50\x6c\156\165\160\x5f\x6e\x61\155\145\51\40\75\x20\x4c\x4f\x57\x45\x52\50\77\x29"; $query = $this->db->query($sql, array($strComName, $strLineupName))->result_array(); if (count($query) > 0) { $nLnupID = $query[0]["\154\156\x75\x70\x5f\x69\x64"]; $sql = "\x55\120\x44\x41\x54\105\x20\151\155\160\x5f\x6d\x6f\x64\x65\154\40" . "\123\x45\124\x20\x6d\157\144\x65\x6c\137\156\141\x6d\145\40\75\40\77\40" . "\127\x48\105\122\105\40\x4c\117\x57\x45\122\x28\155\x6f\x64\145\154\x5f\156\141\x6d\145\51\x20\x3d\40\114\117\x57\105\x52\x28\77\x29\x20" . "\101\x4e\104\40\x6c\156\165\160\137\151\x64\40\75\x20\x3f"; $this->db->query($sql, array($strNewModelName, $strModelName, $nLnupID)); return $this->db->affected_rows(); } else { return count($query); } } public function get_ImplantModelsByCompanyAndLineupWithoutFiles($strComName, $strLineupName) { $sql = "\123\105\114\x45\x43\124\x20\x6d\157\x64\x65\154\x5f\151\x64\x2c\x20\155\157\x64\x65\154\x5f\156\x61\155\145\54\x20\155\x6f\x64\145\x6c\137\154\145\x6e\x67\164\x68\54\x20\155\x6f\x64\x65\x6c\x5f\164\x6f\164\141\154\154\x65\156\x67\164\x68\x2c\x20\x6d\157\144\x65\154\137\x6f\x63\x63\154\165\x73\141\154\x2c\40\x6d\x6f\144\x65\154\137\x61\x70\x69\x63\x61\x6c\40" . "\106\x52\x4f\x4d\x20\151\x6d\160\137\x6d\x6f\144\145\154\x20" . "\x57\x48\105\122\x45\x20\154\156\x75\160\137\151\144\40\x3d\40" . "\x28\123\105\x4c\x45\x43\x54\x20\x6c\156\x75\x70\137\151\x64\40\x46\122\x4f\x4d\40\151\155\x70\x5f\154\156\x75\x70\40\x57\110\105\x52\105\x20\x4c\117\x57\x45\122\50\154\x6e\165\x70\137\x6e\x61\x6d\x65\51\40\x3d\40\x4c\117\x57\x45\x52\50\77\51\x20" . "\x41\x4e\104\40\143\x6f\155\137\151\144\x20\x3d\40\x28\x53\105\114\105\x43\124\x20\143\157\155\137\x69\144\40\x46\x52\117\x4d\40\151\x6d\x70\x5f\x63\157\155\x20\x57\x48\105\x52\105\x20\114\117\x57\x45\122\x28\x63\157\x6d\137\156\141\x6d\x65\x29\40\75\x20\114\117\x57\x45\122\50\x3f\x29\51\51"; return $this->db->query($sql, array($strLineupName, $strComName))->result_array(); } public function post_ImplantModelsByModelsWithoutStl($vecImplantModels, $fileEncoding) { $items = array(); $returncolumn = array("\x6c\x6e\165\x70\137\156\x61\x6d\145", "\x6d\157\x64\145\x6c\x5f\x69\x64", "\x6d\157\144\145\x6c\137\x6e\141\155\145", "\155\x6f\144\145\154\x5f\x6c\x65\x6e\x67\164\x68", "\x6d\157\x64\x65\x6c\x5f\x74\157\x74\141\x6c\154\145\156\147\164\150", "\x6d\x6f\x64\145\x6c\137\157\143\143\x6c\165\163\x61\x6c", "\x6d\157\x64\x65\154\137\141\160\x69\143\x61\x6c"); foreach ($vecImplantModels as $vecImplantModel) { if ($vecImplantModel["\142\x43\157\x6e\x74\141\x69\x6e\120\116\x47\x46\151\154\145"] === true || !isset($vecImplantModel["\x62\103\157\156\x74\141\151\156\x50\x4e\x47\106\x69\154\145"])) { array_push($returncolumn, "\x6d\157\144\x65\154\x5f\160\156\x67\137\x69\155\x67"); } if (empty($vecImplantModel["\163\164\x72\115\x6f\144\145\x6c\x4e\141\155\145"]) && empty($vecImplantModel["\163\164\x72\x4c\x69\156\145\165\160"])) { $this->db->select($returncolumn); $this->db->from("\x69\x6d\x70\x5f\x6d\157\x64\145\x6c"); $this->db->join("\x69\x6d\160\x5f\x6c\x6e\165\x70", "\151\155\160\x5f\155\157\144\x65\154\x2e\x6c\x6e\165\x70\x5f\151\x64\x20\75\40\x69\155\x70\x5f\154\x6e\165\160\x2e\x6c\x6e\165\160\137\x69\x64"); $subQuery = "\50\x53\105\114\x45\x43\x54\40\143\157\155\137\151\144\x20\x46\x52\117\x4d\40\151\x6d\160\x5f\x63\157\155\40\x57\x48\x45\x52\x45\x20\114\x4f\127\x45\x52\50\x63\x6f\x6d\137\156\141\155\x65\51\x20\75\40\x4c\117\127\105\x52\x28\x27" . $vecImplantModel["\x73\x74\162\103\157\155\x70\x61\156\171"] . "\47\x29\51"; $this->db->where("\x63\x6f\x6d\137\151\x64\40\111\116\x20\x28{$subQuery}\51", NULL, false); $query = $this->db->get()->result_array(); } else { $this->db->select(array_diff($returncolumn, ["\154\156\x75\x70\x5f\156\x61\155\x65"])); $this->db->from("\151\x6d\160\x5f\x6d\157\144\145\x6c"); $subQuery = "\50\123\105\x4c\x45\103\x54\40\x6d\157\144\x65\154\x5f\151\x64\40\x46\122\x4f\115\40\x69\x6d\160\137\x6d\157\x64\145\x6c\x20\x57\110\x45\x52\x45\40\114\117\127\x45\x52\x28\155\x6f\144\145\x6c\137\156\141\x6d\145\x29\40\x3d\x20\x4c\x4f\127\x45\122\x28\47" . $vecImplantModel["\x73\x74\162\115\x6f\x64\x65\154\x4e\x61\x6d\x65"] . "\x27\x29\12\40\40\x20\40\40\x20\x20\40\x20\40\x20\40\x20\x20\40\x20\40\x20\x20\x20\x41\116\104\x20\x6c\156\x75\160\137\x69\x64\x20\x3d\40\50\123\x45\114\x45\103\x54\40\154\x6e\x75\x70\x5f\151\x64\x20\106\122\x4f\115\40\x69\x6d\x70\x5f\154\156\x75\x70\40\x57\x48\x45\x52\x45\40\114\117\x57\105\x52\x28\154\156\165\160\137\x6e\141\155\x65\x29\x20\75\x20\x4c\117\x57\x45\122\x28\x27" . $vecImplantModel["\x73\164\x72\x4c\151\x6e\x65\x75\x70"] . "\x27\x29\12\x20\x20\x20\40\x20\40\40\x20\40\40\40\40\x20\40\40\40\40\40\x20\40\101\116\x44\40\x63\x6f\x6d\x5f\151\x64\x20\75\x20\x28\x53\x45\114\105\103\124\x20\143\157\x6d\x5f\x69\144\x20\x46\x52\117\115\40\x69\x6d\160\x5f\x63\157\x6d\40\127\110\x45\122\x45\x20\x4c\x4f\127\x45\122\50\x63\x6f\155\137\156\x61\x6d\145\51\x20\x3d\40\x4c\x4f\x57\105\x52\50\47" . $vecImplantModel["\x73\x74\x72\x43\157\x6d\x70\x61\156\171"] . "\x27\x29\51\x29\x29"; $this->db->where("\x6d\x6f\x64\145\154\137\151\144\40\111\116\40\50{$subQuery}\x29", NULL, false); $query = $this->db->get()->result_array(); } if (count($query) > 0) { foreach ($query as $row) { $row["\x63\x6f\155\137\x6e\141\x6d\145"] = $vecImplantModel["\x73\x74\x72\103\157\x6d\160\141\156\x79"]; if (empty($row["\x6c\x6e\165\x70\x5f\156\141\x6d\x65"])) { $row["\x6c\156\x75\x70\137\156\141\155\x65"] = $vecImplantModel["\x73\x74\x72\114\151\x6e\x65\165\x70"]; } $sImplantInfo = SImplantInfo::constructWithParameter($row, $fileEncoding); if ($sImplantInfo == VERR_COMMON_INVALID) { vt_loge("\x49\x6d\160\154\141\156\x74\x4d\x6f\x64\x65\154\x73\x42\171\115\157\x64\145\154\x73\127\151\164\150\157\x75\x74\x53\164\x6c\137\120\x6f\x73\x74\40\x41\x70\x69\x2e\40" . "\111\156\x76\x61\154\x69\x64\40\x45\156\143\x6f\x64\151\x6e\147\40\120\x61\x72\141\x6d\145\164\x65\x72\40\105\162\x72\157\x72\x2e"); return returnSetResponse(VERR_COMMON_INVALID); } array_push($items, $sImplantInfo); } } if ($vecImplantModel["\142\103\x6f\156\x74\x61\x69\156\x50\116\x47\x46\x69\x6c\145"]) { array_pop($returncolumn); } } if (count($items) > 0) { return array("\145\162\x72\157\162\x43\157\144\x65" => VERR_COMMON_SUCCESS, "\x76\145\143\111\155\x70\154\x61\156\164\111\x6e\x66\157" => $items); } else { return array("\145\x72\x72\157\x72\103\x6f\144\x65" => VERR_DB_NOSUCHDATA, "\x76\145\143\111\155\x70\x6c\x61\x6e\x74\x49\x6e\x66\157" => $items); } } public function get_ImplantModelsByCompanyAndLineupAndFileEncodingWithoutStl($strLineupName, $strComName, $fileEncoding) { $sql = "\x53\105\114\x45\103\x54\x20\155\x6f\144\145\154\x5f\x6e\x61\x6d\145\54\x20\155\x6f\144\145\x6c\137\x6c\145\156\x67\x74\x68\x2c\x20\x6d\157\144\145\154\x5f\164\157\x74\x61\154\154\145\156\147\x74\150\54\40\x6d\157\144\145\154\137\157\143\143\154\165\x73\x61\x6c\54\40\x6d\x6f\144\x65\154\137\x61\x70\x69\143\x61\154\x2c\x20\x6d\157\144\145\x6c\137\160\156\x67\x5f\x69\155\147\40" . "\106\122\117\x4d\x20\x69\155\x70\x5f\155\157\144\145\154\40" . "\127\110\x45\122\x45\40\154\x6e\x75\x70\137\x69\x64\x20\75\40" . "\50\x53\105\114\x45\x43\x54\x20\154\x6e\x75\160\137\x69\x64\x20\x46\122\x4f\x4d\40\x69\155\x70\137\154\x6e\x75\x70\40\127\x48\x45\122\105\40\114\117\127\105\x52\x28\154\x6e\x75\160\x5f\156\141\155\x65\51\x20\x3d\x20\114\x4f\x57\105\x52\x28\77\51\40" . "\x41\116\x44\x20\x63\157\x6d\137\x69\x64\x20\x3d\x20\x28\x53\105\x4c\x45\103\124\40\x63\x6f\x6d\137\x69\x64\40\x46\122\x4f\115\40\151\x6d\x70\x5f\x63\x6f\x6d\40\127\110\x45\x52\x45\40\114\117\x57\105\122\50\x63\x6f\155\x5f\x6e\x61\x6d\145\x29\x20\x3d\40\114\x4f\127\105\x52\x28\77\x29\51\51"; $query = $this->db->query($sql, array($strLineupName, $strComName))->result_array(); $items = array(); if (count($query) > 0) { foreach ($query as $row) { $row["\143\157\x6d\x5f\x6e\x61\155\145"] = $strComName; $row["\154\156\165\160\137\156\141\155\145"] = $strLineupName; $sImplantInfo = SImplantInfo::constructWithParameter($row, $fileEncoding); if ($sImplantInfo == VERR_COMMON_INVALID) { return returnSetResponse(VERR_COMMON_INVALID); } array_push($items, $sImplantInfo); } return array("\145\x72\x72\157\x72\103\x6f\144\x65" => VERR_COMMON_SUCCESS, "\166\x65\143\111\x6d\x70\x6c\141\x6e\x74\111\156\x66\x6f" => $items); } else { return array("\x65\162\x72\x6f\x72\x43\157\x64\x65" => VERR_DB_NOSUCHDATA, "\166\145\x63\111\x6d\160\154\x61\x6e\x74\x49\x6e\146\x6f" => $items); } } } diff --git a/server/original/www/ezwebserver/src/application/models/ImplantSTLFiles_model.php b/server/original/www/ezwebserver/src/application/models/ImplantSTLFiles_model.php index 2a3528c..facbefd 100644 --- a/server/original/www/ezwebserver/src/application/models/ImplantSTLFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImplantSTLFiles_model.php @@ -1,7 +1,7 @@ $row) { $nIdArr[$key] = $row["\x6e\115\157\144\145\154\x49\104"]; } array_multisort($nIdArr, SORT_ASC, $vecImplantModels); $this->db->select("\155\157\144\145\154\137\x73\164\x6c\137\x69\x6d\147"); $this->db->from("\151\155\160\137\155\157\144\145\154"); $this->db->where_in("\x6d\x6f\x64\145\x6c\x5f\151\x64", $nIdArr); $this->db->order_by("\155\157\144\x65\154\x5f\151\144", "\x41\123\103"); $implantSTLArr = $this->db->get()->result_array(); if (count($nIdArr) != count($implantSTLArr)) { vt_loge("\x49\155\160\x6c\x61\156\164\123\124\114\106\151\154\x65\163\x49\x6e\132\x69\x70\106\151\154\145\137\x70\157\x73\164\40\x41\x70\151\x2e\x20" . "\x49\x6e\x76\x61\x6c\x69\144\40\x4d\157\144\x65\x6c\40\x49\x44\56"); return array("\x65\x72\x72\157\x72\103\157\x64\145" => VERR_COMMON_INVALID); } load_model($this, Datafile_model); $zipFileName = tempnam($this->Datafile_model->getTempDir(), "\x5a\x69\x70"); $this->load->library("\x7a\151\160\x77\162\x61\x70\160\x65\162"); $this->zipwrapper->setZipFile($zipFileName); if ($ret["\145\x72\x72\157\x72\x43\x6f\144\145"] != VERR_COMMON_SUCCESS) { return $ret; } $idx = 0; foreach ($implantSTLArr as $implantSTL) { $ret = $this->zipwrapper->addString($vecImplantModels[$idx]["\163\164\x72\x46\151\154\145\x4e\x61\x6d\145"], ltrim(pack("\x48\x2a", $implantSTL["\155\x6f\x64\x65\x6c\x5f\x73\164\154\137\151\155\x67"]))); if ($ret["\x65\162\162\157\162\x43\x6f\x64\145"] != VERR_COMMON_SUCCESS) { return $ret; } $idx++; } $this->zipwrapper->getZipFile(); if ($ret["\145\162\162\157\162\x43\x6f\x64\x65"] == VERR_COMMON_SUCCESS) { return array("\x65\x72\162\x6f\x72\x43\157\144\145" => VERR_COMMON_SUCCESS, "\x66\x69\x6c\x65\x4e\x61\155\145" => $zipFileName); } else { return $ret; } } } diff --git a/server/original/www/ezwebserver/src/application/models/ImplantTable_model.php b/server/original/www/ezwebserver/src/application/models/ImplantTable_model.php index 46e06c1..ce07fd2 100644 --- a/server/original/www/ezwebserver/src/application/models/ImplantTable_model.php +++ b/server/original/www/ezwebserver/src/application/models/ImplantTable_model.php @@ -1,7 +1,7 @@ db_table_exists("\156\x65\167\x5f\144\142\x5f\x76\x65\162\163\x69\157\156"); if ($ret === FALSE) { $sql = "\x43\122\105\x41\124\x45\x20\124\x41\102\114\x45\x20\x6e\145\x77\x5f\x64\142\x5f\x76\145\162\163\151\x6f\156\50" . "\x76\145\162\x5f\151\144\x20\163\145\x72\151\x61\154\x20\116\117\124\x20\116\x55\x4c\x4c\x2c" . "\x76\x65\x72\x5f\143\165\162\x72\x65\156\x74\x5f\166\x65\162\x73\151\x6f\x6e\40\x69\156\164\x65\147\x65\162\x20\116\117\124\40\116\x55\114\114\x2c" . "\166\x65\x72\137\x72\145\154\x65\141\163\x65\x5f\x64\x61\x74\145\40\x64\x61\164\145\x2c" . "\x76\145\162\137\144\145\163\x63\x72\151\160\164\x69\x6f\x6e\x20\x74\145\x78\164\x2c" . "\166\145\162\x5f\x75\x73\145\x72\137\x64\145\146\151\x6e\x65\x64\137\61\x20\164\x65\x78\164\54" . "\x43\x4f\x4e\x53\x54\x52\x41\x49\x4e\124\x20\156\145\x77\137\x64\142\137\x76\145\162\x73\x69\x6f\156\x5f\160\153\x65\x79\40\120\122\111\x4d\x41\x52\x59\40\x4b\105\131\40\x28\166\x65\162\137\x69\x64\51\54" . "\x43\117\116\x53\x54\122\101\x49\x4e\124\40\x6e\x65\167\137\x64\x62\137\166\145\x72\163\151\157\156\x5f\x76\145\x72\137\x63\165\162\x72\x65\x6e\x74\137\166\145\162\163\151\x6f\156\x5f\x6b\x65\171\40\x55\x4e\x49\121\x55\105\40\50\x76\x65\x72\137\143\x75\162\162\145\x6e\x74\x5f\x76\x65\x72\163\x69\157\x6e\51\x29"; $this->db->query($sql); return TRUE; } else { return FALSE; } } public function post_ImplantTableForSurgicalKit() { $ret = $this->db_table_exists("\x73\165\x72\147\151\x63\141\154\137\153\x69\x74"); if ($ret === FALSE) { $sql = "\x43\122\105\101\124\105\40\124\101\102\114\x45\40\123\125\x52\x47\111\103\x41\x4c\x5f\113\111\124\50" . "\x63\x6f\x6d\137\151\x64\x20\151\156\x74\145\147\145\x72\x2c" . "\154\156\165\160\x5f\151\144\x20\151\x6e\164\x65\x67\145\162\54" . "\x6d\x6f\144\x65\x6c\137\x69\144\40\151\x6e\x74\145\x67\145\162\54" . "\163\165\162\x67\151\x63\x61\x6c\x5f\x6b\151\x74\x5f\156\x61\x6d\145\40\143\150\141\162\x61\x63\x74\x65\162\x20\x76\x61\x72\171\x69\x6e\x67\x28\62\65\x35\x29\x2c" . "\103\x4f\x4e\x53\x54\122\101\111\x4e\124\x20\x73\165\162\147\151\x63\141\x6c\137\x6b\151\x74\x5f\x63\157\x6d\x5f\151\144\x5f\146\153\145\171\40\106\117\x52\105\111\107\116\x20\x4b\105\x59\40\50\x63\x6f\x6d\137\151\144\51\40" . "\122\105\x46\105\122\105\x4e\103\105\123\x20\151\x6d\160\137\x63\x6f\x6d\x20\x28\143\x6f\x6d\137\x69\x64\51\x20\115\101\x54\x43\110\x20\123\111\x4d\120\x4c\x45\40" . "\117\116\40\125\x50\x44\x41\x54\105\x20\103\101\x53\x43\101\104\105\40\117\116\x20\104\x45\114\105\124\105\40\103\101\x53\x43\x41\104\105\54" . "\103\117\x4e\123\124\122\x41\111\x4e\124\40\163\165\x72\x67\x69\x63\x61\154\x5f\153\x69\164\137\154\x6e\165\160\137\x69\144\137\146\x6b\145\171\x20\106\117\x52\105\111\107\116\x20\113\x45\x59\40\x28\x6c\156\x75\160\137\x69\144\51\40" . "\x52\x45\x46\105\x52\x45\116\x43\x45\x53\40\x69\x6d\x70\x5f\154\x6e\x75\x70\40\50\x6c\x6e\165\x70\137\151\144\51\x20\x4d\x41\124\x43\x48\x20\x53\111\115\120\114\x45\40" . "\x4f\x4e\x20\x55\120\x44\x41\x54\x45\x20\103\x41\x53\x43\x41\104\x45\40\117\116\40\104\x45\114\105\x54\x45\40\x43\101\x53\103\101\104\105\x2c" . "\x43\117\x4e\123\124\122\x41\x49\x4e\124\x20\163\165\162\147\151\x63\x61\154\x5f\x6b\151\x74\137\155\157\x64\x65\154\137\151\x64\x5f\x66\x6b\x65\x79\40\106\117\x52\105\111\x47\116\40\113\x45\x59\40\x28\155\x6f\x64\145\154\x5f\x69\x64\x29\40" . "\x52\105\106\x45\122\x45\116\103\x45\123\x20\151\x6d\x70\137\x6d\157\144\145\154\x20\50\155\157\x64\x65\x6c\x5f\x69\144\51\x20\x4d\x41\x54\103\x48\x20\123\x49\x4d\120\x4c\x45\x20" . "\117\116\x20\x55\x50\x44\x41\x54\x45\x20\103\101\x53\103\101\x44\105\x20\117\116\40\x44\x45\114\x45\124\x45\x20\103\101\123\103\x41\x44\x45\x29"; $this->db->query($sql); return TRUE; } else { return FALSE; } } public function post_ImplantTableForCompany() { $ret = $this->db_table_exists("\x69\x6d\160\137\x63\x6f\x6d"); if ($ret === FALSE) { $sql = "\103\x52\x45\101\x54\x45\x20\x54\101\102\114\x45\40\111\115\120\x5f\x43\117\x4d\50" . "\143\x6f\155\137\x69\144\40\x73\145\x72\x69\141\154\x20\x4e\117\x54\40\x4e\x55\114\114\54\40" . "\x63\x6f\x6d\x5f\156\141\155\x65\40\x63\x68\141\162\x61\143\x74\145\x72\40\x76\x61\x72\x79\151\x6e\147\x28\x32\65\x35\51\40\116\x4f\x54\40\116\125\114\114\54\40" . "\143\x6f\x6d\x5f\x73\171\156\x63\x20\x62\157\157\x6c\145\141\156\x20\104\x45\106\x41\x55\x4c\x54\x20\146\141\x6c\163\145\x2c\x20" . "\x63\157\x6d\x5f\x75\x73\145\162\137\141\x64\x64\x65\x64\40\142\157\157\154\145\141\156\40\104\x45\106\x41\x55\114\124\x20\146\x61\154\163\145\x2c\x20" . "\143\157\x6d\x5f\165\163\x65\162\137\144\x65\x66\x69\156\145\144\137\61\x20\142\157\157\x6c\x65\x61\156\40\54\x20" . "\143\x6f\x6d\137\165\x73\145\162\137\x64\x65\x66\151\x6e\x65\144\137\x32\40\x74\145\170\164\x2c\40" . "\103\x4f\116\x53\124\122\101\111\x4e\x54\40\x69\155\160\137\x63\157\155\137\160\x6b\x65\x79\40\120\122\111\x4d\x41\122\131\40\x4b\x45\x59\x20\x28\143\157\155\137\151\144\x29\54\40" . "\x43\117\x4e\x53\x54\122\x41\111\x4e\x54\x20\151\x6d\160\137\x63\157\155\x5f\143\x6f\x6d\x5f\x6e\x61\155\x65\137\153\145\x79\x20\125\116\x49\x51\125\105\x20\50\x63\157\155\x5f\x6e\141\x6d\x65\51\x29"; $this->db->query($sql); return TRUE; } else { return FALSE; } } function db_table_exists($tablename) { $sql = "\123\105\x4c\x45\103\x54\x20\105\x58\111\123\124\123\40\x28\12\x20\x20\40\x20\x20\x20\40\40\x20\x20\x20\x20\40\x20\40\40\40\40\40\x20\x53\x45\x4c\105\x43\124\x20\61\xa\x20\x20\40\40\x20\40\40\40\x20\40\40\x20\x20\x20\40\40\40\40\x20\x20\106\x52\x4f\x4d\40\x49\x6e\146\157\x72\155\141\164\151\x6f\156\x5f\163\143\150\x65\x6d\x61\x2e\x74\141\142\154\145\163\xa\x20\40\40\x20\x20\x20\40\40\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\127\110\x45\x52\105\x20\x74\141\x62\x6c\x65\137\156\141\155\145\x20\x3d\x20\77\12\40\40\x20\40\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\x29\40\x41\123\x20\x66\154\141\x67"; $ret = $this->db->query($sql, array($tablename))->result_array(); if ($ret[0]["\146\154\x61\x67"] == "\164") { return TRUE; } else { return FALSE; } } public function post_ImplantTableForLineup() { $ret = $this->db_table_exists("\151\155\160\137\154\x6e\165\x70"); if ($ret === FALSE) { $sql = "\103\x52\x45\x41\x54\105\x20\124\x41\102\114\105\x20\111\115\120\137\114\116\125\x50\50" . "\154\x6e\x75\160\x5f\x69\x64\40\163\145\x72\151\x61\x6c\x20\x4e\117\124\x20\x4e\x55\114\x4c\x2c" . "\154\156\165\160\x5f\156\x61\155\x65\x20\143\150\141\x72\141\x63\164\x65\162\40\x76\141\x72\x79\151\x6e\147\50\x32\x35\x35\51\x20\116\117\x54\40\116\125\114\x4c\x2c" . "\x63\157\x6d\137\x69\x64\x20\151\156\164\145\x67\145\x72\x2c" . "\154\156\165\160\137\x73\171\x6e\x63\40\142\x6f\x6f\x6c\x65\x61\156\40\104\105\x46\x41\125\x4c\x54\40\146\141\154\163\x65\54" . "\x6c\x6e\165\160\137\x75\x73\x65\162\x5f\x61\x64\x64\145\x64\40\142\157\x6f\x6c\x65\x61\x6e\40\x44\x45\x46\101\125\x4c\124\40\146\141\x6c\x73\x65\x2c" . "\154\x6e\165\160\137\x75\163\145\162\x5f\144\145\146\x69\156\x65\144\x5f\x31\40\x62\157\157\x6c\x65\141\156\x2c" . "\x6c\156\165\x70\137\x75\163\145\x72\137\x64\145\146\151\x6e\145\144\x5f\x32\x20\164\145\x78\x74\x2c" . "\x43\117\116\123\124\x52\101\111\116\x54\40\x69\155\x70\137\154\156\165\x70\137\x70\153\x65\171\x20\120\x52\111\115\x41\x52\131\40\113\x45\x59\40\x28\x6c\156\165\160\x5f\151\x64\51\x2c\40" . "\103\x4f\116\x53\x54\122\x41\111\116\124\40\151\x6d\x70\137\x6c\x6e\x75\160\x5f\143\157\x6d\137\x69\144\x5f\146\153\x65\171\40\106\117\122\105\111\107\116\x20\x4b\105\x59\40\x28\143\157\155\x5f\151\144\x29\x20" . "\122\105\106\x45\122\x45\x4e\103\x45\x53\40\151\x6d\160\137\x63\x6f\155\x20\x28\x63\157\x6d\x5f\151\x64\51\x20\115\101\124\x43\x48\x20\123\x49\115\x50\114\105\40" . "\117\116\40\x55\120\104\101\x54\105\40\103\x41\x53\103\101\x44\105\40\117\116\40\104\x45\x4c\105\124\105\x20\x43\101\123\103\x41\x44\x45\54\x20" . "\x43\x4f\x4e\123\x54\x52\101\x49\116\x54\x20\151\155\x70\x5f\154\156\x75\x70\x5f\x75\156\151\161\x75\145\40\x55\116\111\121\x55\x45\40\x28\x6c\156\165\x70\137\156\141\155\x65\54\40\143\157\155\x5f\151\144\x29\x29"; $this->db->query($sql); return TRUE; } else { return FALSE; } } public function post_ImplantTableForModel() { $ret = $this->db_table_exists("\151\155\160\137\155\x6f\x64\145\154"); if ($ret === FALSE) { $sql = "\103\x52\x45\101\x54\x45\40\124\x41\102\114\x45\x20\x49\x4d\x50\x5f\115\x4f\104\105\114\x28" . "\x6d\x6f\x64\145\154\137\151\144\x20\x73\x65\x72\151\x61\x6c\40\116\x4f\124\x20\116\x55\x4c\114\x2c" . "\155\157\144\x65\154\137\x6e\x61\x6d\x65\40\143\x68\x61\162\x61\x63\x74\x65\x72\x20\166\x61\x72\x79\x69\156\x67\x28\62\65\65\51\x20\x4e\117\x54\x20\116\x55\114\114\54" . "\x6d\x6f\144\x65\154\x5f\154\x65\156\147\164\x68\x20\144\157\165\142\x6c\145\40\x70\x72\x65\x63\x69\163\x69\x6f\156\54" . "\155\157\x64\145\154\x5f\164\157\164\141\x6c\x6c\145\156\147\164\x68\x20\144\157\x75\142\x6c\x65\x20\160\x72\x65\x63\151\163\x69\x6f\x6e\x2c" . "\155\157\x64\145\154\x5f\x6f\143\143\154\x75\x73\x61\x6c\40\144\x6f\x75\142\x6c\x65\40\160\162\145\x63\151\x73\x69\x6f\x6e\x2c" . "\x6d\x6f\x64\x65\154\137\141\x70\151\143\141\x6c\x20\144\157\165\x62\154\145\x20\160\162\145\143\151\163\x69\157\x6e\x2c" . "\x6d\157\x64\x65\x6c\x5f\163\164\x6c\x5f\151\x6d\147\40\142\171\164\145\141\54" . "\x6d\157\x64\x65\x6c\x5f\x70\156\147\x5f\151\x6d\147\x20\x62\171\x74\145\141\x2c" . "\154\156\x75\160\137\x69\x64\40\151\x6e\x74\145\147\145\162\x2c" . "\155\157\144\x65\x6c\137\x73\171\x6e\143\40\142\x6f\x6f\x6c\x65\x61\156\x20\104\105\106\x41\x55\x4c\x54\40\146\x61\154\x73\145\54" . "\x6d\x6f\x64\x65\x6c\137\x63\157\x6c\157\x72\40\x62\151\147\x69\x6e\164\x2c" . "\x6d\x6f\144\145\154\137\x75\163\145\162\137\x61\144\144\145\144\x20\142\x6f\x6f\x6c\x65\x61\156\40\104\x45\106\x41\x55\114\x54\x20\x66\x61\154\163\x65\54" . "\155\x6f\x64\145\x6c\x5f\x75\163\145\x72\137\x64\145\x66\151\156\145\144\x5f\61\x20\x62\x6f\157\154\x65\x61\156\x2c" . "\155\157\x64\x65\x6c\x5f\x75\x73\145\x72\x5f\x64\145\x66\151\x6e\145\144\137\x32\x20\x74\145\170\164\54" . "\103\117\x4e\123\124\122\x41\111\x4e\x54\x20\151\155\160\x5f\155\x6f\144\x65\x6c\x5f\x70\153\x65\x79\x20\x50\x52\111\115\101\x52\131\x20\x4b\x45\131\x20\50\x6d\157\144\145\x6c\x5f\151\144\x29\x2c" . "\103\117\116\123\x54\x52\101\x49\x4e\x54\x20\x69\x6d\160\x5f\x6d\x6f\144\x65\154\137\154\x6e\165\x70\137\151\144\137\146\153\x65\171\40\x46\117\x52\x45\111\107\x4e\x20\113\x45\x59\x20\50\154\156\165\160\137\151\x64\x29\40" . "\122\105\x46\105\122\105\116\x43\105\x53\x20\151\x6d\160\x5f\154\x6e\x75\160\40\x28\154\x6e\165\160\137\x69\144\51\x20\115\101\124\103\x48\40\123\111\115\x50\114\105\x20" . "\x4f\116\40\125\120\104\101\124\105\x20\x43\101\123\x43\x41\104\105\x20\117\x4e\x20\104\x45\114\105\x54\x45\40\x43\101\123\103\x41\x44\105\x2c" . "\x43\x4f\x4e\123\x54\122\101\x49\116\x54\x20\151\x6d\160\137\155\157\x64\x65\154\x5f\x75\156\x69\161\165\145\40\125\116\111\121\125\105\40\50\155\157\144\145\154\137\x6e\x61\x6d\145\54\x20\154\x6e\x75\160\x5f\151\x64\51\x29"; $this->db->query($sql); return TRUE; } else { return FALSE; } } } diff --git a/server/original/www/ezwebserver/src/application/models/Landmarks_model.php b/server/original/www/ezwebserver/src/application/models/Landmarks_model.php index fa78f29..928fe50 100644 --- a/server/original/www/ezwebserver/src/application/models/Landmarks_model.php +++ b/server/original/www/ezwebserver/src/application/models/Landmarks_model.php @@ -1,7 +1,7 @@ db->select("\x6f\x74\150\137\154\141\x6e\x64\155\141\162\x6b\x5f\156\141\x6d\x65\40\141\163\x20\156\x61\x6d\145\54\x6f\x74\150\x5f\154\x61\x6e\x64\155\x61\x72\x6b\x5f\x6c\x61\142\145\154\x20\141\163\40\154\x61\x62\x65\154\54\157\x74\150\137\154\141\x6e\144\x6d\x61\162\x6b\137\165\x73\x65\x72\x5f\141\144\x64\145\144\x20\141\x73\40\x75\x73\145\x72\x5f\x61\144\144\145\x64\x2c\x6f\164\x68\137\x6c\x61\156\x64\x6d\141\x72\x6b\137\164\171\160\x65\x20\x61\x73\x20\x74\x79\x70\145"); $this->db->from("\x65\62\137\157\x72\164\150\157\137\154\141\156\144\x6d\141\162\153\163"); $this->db->join("\x65\62\x5f\x6f\162\164\x68\x6f\137\151\155\x61\147\x65\x5f\155\157\144\141\x6c\151\164\x69\145\x73", "\x65\62\137\x6f\x72\164\x68\157\x5f\154\x61\156\144\x6d\x61\x72\x6b\x73\56\x6f\164\x68\x5f\151\x6d\147\x5f\155\157\x64\x61\x6c\x69\x74\171\x5f\x69\x64\40\x3d\40\145\x32\x5f\157\162\164\x68\157\137\151\x6d\141\x67\x65\x5f\x6d\x6f\144\x61\x6c\x69\x74\x69\145\163\56\x6f\x74\150\137\x69\155\x67\137\x6d\x6f\144\141\x6c\151\x74\x79\x5f\x69\144"); $this->db->where("\x65\x32\x5f\x6f\162\x74\150\157\x5f\151\x6d\141\x67\x65\137\155\x6f\x64\x61\154\151\x74\151\145\163\56\157\164\x68\x5f\x69\x6d\x67\x5f\x6d\x6f\144\141\154\151\x74\171\x5f\x6e\141\x6d\x65", $modality); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sLandmark = new SLabeledLandmark($row); array_push($items, $sLandmark); } return ["\x65\162\162\x6f\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\154\141\156\x64\x6d\141\162\153\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Landmarks($sLandmarkInfoParameter) { load_database($this, "\x45\x32\104\102"); $this->db->join("\145\x32\137\x6f\162\164\x68\157\x5f\151\155\141\147\x65\137\x6d\157\144\x61\154\x69\164\x69\x65\163", "\x65\62\x5f\x6f\162\x74\x68\x6f\137\x6c\x61\156\x64\155\141\x72\x6b\163\56\157\x74\x68\x5f\x69\155\x67\x5f\x6d\157\x64\141\x6c\x69\164\x79\137\x69\x64\x20\75\x20\145\62\137\157\x72\164\x68\x6f\137\151\155\x61\147\145\x5f\x6d\157\x64\x61\154\151\164\x69\x65\163\56\x6f\164\x68\137\151\x6d\147\x5f\x6d\x6f\x64\141\x6c\151\x74\171\137\x69\144"); $this->db->where("\145\62\137\157\x72\164\x68\157\x5f\151\155\141\147\x65\137\x6d\x6f\x64\x61\x6c\151\x74\x69\145\x73\56\x6f\164\x68\137\x69\155\x67\x5f\x6d\x6f\x64\x61\154\151\x74\x79\137\156\141\155\145", $sLandmarkInfoParameter->modality); $this->db->where("\145\x32\137\157\162\164\150\157\137\154\141\x6e\144\x6d\x61\162\x6b\x73\x2e\157\164\x68\137\154\141\x6e\144\x6d\141\x72\153\137\156\141\x6d\145", $sLandmarkInfoParameter->name); $q = $this->db->get("\x65\62\137\x6f\162\164\150\x6f\x5f\x6c\x61\156\x64\155\x61\x72\153\x73"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $this->db->select("\x6f\164\150\137\x69\155\147\x5f\155\157\x64\141\154\151\164\x79\x5f\x69\x64"); $this->db->where("\157\x74\x68\137\x69\x6d\147\137\155\157\x64\141\154\151\164\171\x5f\156\x61\155\x65", $sLandmarkInfoParameter->modality); $this->db->limit(1); $select_modalityid = $this->db->get_compiled_select("\x65\x32\137\x6f\162\164\150\157\x5f\151\155\141\x67\145\x5f\x6d\157\144\x61\x6c\151\164\x69\x65\163"); if (isset($sLandmarkInfoParameter->formulaName)) { $this->db->select("\x6f\x74\x68\x5f\146\157\x72\155\x75\154\x61\x5f\151\144"); $this->db->where("\157\x74\x68\137\146\157\162\x6d\165\x6c\x61\x5f\156\141\155\145", $sLandmarkInfoParameter->formulaName); $this->db->limit(1); $select_formulaid = $this->db->get_compiled_select("\145\x32\x5f\x6f\x72\x74\150\157\137\x66\x6f\x72\155\165\154\141\163"); } if (!isset($sLandmarkInfoParameter->label) || empty(trim($sLandmarkInfoParameter->label))) { $label = $sLandmarkInfoParameter->name; } else { $label = $sLandmarkInfoParameter->label; } $data = array("\x6f\x74\150\137\x6c\x61\x6e\x64\x6d\141\162\x6b\x5f\x6e\141\155\x65" => $sLandmarkInfoParameter->name, "\157\x74\150\x5f\154\141\156\x64\x6d\x61\162\153\x5f\x6c\x61\x62\x65\154" => $label, "\157\164\150\137\x6c\141\156\144\x6d\x61\x72\153\x5f\x74\x79\x70\x65" => $sLandmarkInfoParameter->type, "\x6f\x74\x68\137\154\141\x6e\144\155\141\162\x6b\137\x75\163\x65\x72\137\x61\x64\x64\x65\x64" => boolval($sLandmarkInfoParameter->userAdded)); $this->db->set($data); if (isset($sLandmarkInfoParameter->description)) { $this->db->set("\x6f\x74\x68\137\x6c\x61\156\x64\x6d\x61\x72\153\137\x64\x65\x73\143\162\151\160\164\x69\157\x6e", $sLandmarkInfoParameter->description); } if (isset($sLandmarkInfoParameter->descriptionImage)) { $this->db->set("\x6f\x74\x68\137\154\x61\x6e\144\x6d\x61\x72\x6b\x5f\x64\145\x73\143\162\151\x70\164\151\x6f\156\137\x69\x6d\x61\147\x65", "\x64\x65\143\x6f\x64\x65\50\47{$sLandmarkInfoParameter->descriptionImage}\47\x2c\x27\x62\141\x73\145\x36\x34\47\51", FALSE); } if (isset($sLandmarkInfoParameter->shortName)) { $this->db->set("\x6f\164\150\x5f\x6c\x61\156\144\155\141\162\x6b\x5f\163\150\157\162\x74\156\141\155\x65", $sLandmarkInfoParameter->shortName); } if (isset($sLandmarkInfoParameter->params)) { $this->db->set("\157\x74\x68\x5f\x6c\141\156\144\155\141\162\153\137\160\141\162\141\x6d\163", $sLandmarkInfoParameter->params); } if (isset($sLandmarkInfoParameter->formulaName)) { $this->db->set("\157\x74\150\x5f\x66\x6f\162\155\165\154\141\x5f\151\x64", "\x28{$select_formulaid}\x29", FALSE); } $this->db->set("\x6f\164\150\x5f\151\155\147\137\155\x6f\x64\141\x6c\x69\164\171\137\151\x64", "\50{$select_modalityid}\x29", FALSE); $this->db->insert("\x65\x32\137\x6f\162\x74\150\157\x5f\x6c\141\156\144\155\141\162\x6b\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_Landmarks($sLandmarkInfoParameter) { load_database($this, "\x45\x32\x44\102"); $this->db->select("\x65\62\137\x6f\162\164\x68\x6f\x5f\154\141\x6e\144\x6d\141\162\x6b\163\x2e\157\164\x68\137\x6c\141\x6e\144\x6d\141\x72\153\137\151\144"); $this->db->from("\145\x32\137\x6f\162\x74\x68\157\x5f\154\141\x6e\x64\155\141\x72\x6b\163"); $this->db->join("\145\x32\x5f\x6f\x72\x74\x68\x6f\x5f\x69\155\x61\x67\x65\x5f\x6d\157\x64\141\154\x69\164\151\145\163", "\x65\62\137\x6f\x72\164\150\157\137\151\x6d\141\147\x65\137\155\157\144\141\154\151\x74\151\145\x73\56\x6f\x74\150\137\x69\x6d\x67\137\155\x6f\x64\x61\x6c\151\164\171\x5f\151\144\x20\x3d\40\145\62\137\x6f\162\x74\x68\x6f\x5f\x6c\x61\x6e\144\155\141\162\153\163\56\x6f\x74\x68\x5f\x69\155\147\137\x6d\157\144\x61\154\151\164\171\x5f\151\144"); $this->db->where("\145\62\137\157\x72\164\150\x6f\137\x69\x6d\141\x67\145\x5f\x6d\157\144\x61\x6c\151\164\x69\x65\163\56\157\x74\x68\x5f\151\155\x67\x5f\x6d\x6f\x64\141\x6c\151\164\171\137\x6e\141\x6d\145", $sLandmarkInfoParameter->modality); $this->db->where("\145\62\x5f\157\x72\x74\x68\x6f\137\x6c\141\x6e\x64\155\x61\162\153\163\x2e\157\x74\150\x5f\154\141\x6e\x64\x6d\141\x72\x6b\137\156\141\x6d\x65", $sLandmarkInfoParameter->name); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $landmark_id = intval($row->oth_landmark_id); if (isset($sLandmarkInfoParameter->formulaName)) { $this->db->select("\157\x74\x68\x5f\146\157\x72\155\x75\154\x61\137\x69\x64"); $this->db->where("\157\x74\150\137\146\157\162\x6d\x75\154\x61\x5f\x6e\x61\x6d\x65", $sLandmarkInfoParameter->formulaName); $this->db->limit(1); $select_formulaid = $this->db->get_compiled_select("\145\x32\x5f\157\x72\164\x68\157\x5f\x66\x6f\162\x6d\165\x6c\141\x73"); } if (isset($sLandmarkInfoParameter->label)) { $this->db->set("\x6f\164\150\x5f\x6c\x61\156\144\x6d\141\x72\153\x5f\x6c\141\x62\x65\x6c", $sLandmarkInfoParameter->label); } if (isset($sLandmarkInfoParameter->userAdded)) { $this->db->set("\x6f\164\150\x5f\154\x61\156\x64\x6d\x61\162\x6b\137\x75\163\145\162\137\x61\144\144\x65\144", boolval($sLandmarkInfoParameter->userAdded)); } if (isset($sLandmarkInfoParameter->type)) { $this->db->set("\x6f\164\x68\137\154\141\x6e\144\155\141\x72\x6b\137\x74\171\x70\145", $sLandmarkInfoParameter->type); } if (isset($sLandmarkInfoParameter->description)) { $this->db->set("\x6f\x74\150\x5f\154\141\x6e\x64\x6d\x61\x72\153\x5f\144\x65\x73\143\x72\151\160\164\x69\x6f\x6e", $sLandmarkInfoParameter->description); } if (isset($sLandmarkInfoParameter->descriptionImage)) { $this->db->set("\x6f\164\x68\x5f\x6c\141\156\144\155\x61\x72\153\x5f\x64\x65\x73\x63\162\151\160\x74\x69\x6f\x6e\x5f\x69\x6d\x61\147\145", "\144\x65\x63\157\144\145\x28\47{$sLandmarkInfoParameter->descriptionImage}\47\54\47\x62\x61\x73\x65\66\x34\x27\x29", FALSE); } if (isset($sLandmarkInfoParameter->shortName)) { $this->db->set("\157\x74\x68\x5f\154\x61\156\144\155\141\162\x6b\137\x73\x68\157\x72\164\156\x61\x6d\145", $sLandmarkInfoParameter->shortName); } if (isset($sLandmarkInfoParameter->formulaName)) { $this->db->set("\x6f\x74\x68\137\x66\x6f\x72\155\x75\154\x61\x5f\x69\144", "\50{$select_formulaid}\51", FALSE); } if (isset($sLandmarkInfoParameter->params)) { $this->db->set("\157\164\x68\137\154\x61\156\144\155\x61\162\x6b\x5f\x70\x61\x72\x61\155\x73", $sLandmarkInfoParameter->params); } $this->db->where("\x6f\x74\150\137\x6c\x61\156\x64\155\141\162\x6b\137\151\144", $landmark_id); $this->db->update("\145\62\137\x6f\162\164\x68\x6f\x5f\x6c\141\x6e\x64\155\141\x72\153\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function get_Landmarks($landmarkname, $modality) { load_database($this, "\105\x32\104\x42"); $item = array(); $this->db->select("\145\x32\x5f\x6f\162\164\x68\157\137\154\x61\156\144\155\x61\x72\153\163\x2e\x6f\x74\x68\x5f\154\x61\x6e\x64\x6d\141\162\153\137\x6e\x61\x6d\x65"); $this->db->select("\145\62\137\157\x72\164\x68\157\x5f\154\x61\156\x64\155\x61\x72\x6b\163\x2e\x6f\164\x68\137\154\x61\156\144\155\x61\162\x6b\x5f\154\141\x62\x65\x6c"); $this->db->select("\x65\x32\137\x6f\162\164\150\x6f\137\x6c\x61\156\144\155\x61\x72\x6b\163\x2e\x6f\164\x68\137\x6c\141\156\144\155\141\162\153\x5f\163\150\157\162\164\x6e\x61\x6d\x65"); $this->db->select("\145\62\x5f\x6f\162\164\x68\x6f\137\154\x61\156\144\155\141\x72\153\163\x2e\x6f\164\x68\x5f\x6c\x61\156\x64\155\141\x72\x6b\x5f\142\151\x74\155\141\x73\x6b"); $this->db->select("\145\x32\x5f\x6f\x72\x74\x68\157\x5f\154\x61\156\144\155\141\x72\x6b\163\x2e\x6f\x74\150\137\x6c\141\156\144\x6d\141\162\153\137\144\145\163\x63\x72\151\x70\x74\151\x6f\x6e"); $this->db->select("\145\62\x5f\x6f\162\164\150\157\x5f\x6c\141\x6e\x64\x6d\141\x72\x6b\x73\x2e\157\164\x68\137\154\x61\156\x64\155\141\162\x6b\137\x74\171\160\x65"); $this->db->select("\145\x32\137\x6f\162\164\150\157\137\154\x61\156\x64\x6d\141\x72\153\x73\x2e\157\164\150\137\x6c\x61\156\x64\155\141\x72\153\x5f\165\163\x65\x72\x5f\x61\x64\144\x65\x64"); $this->db->select("\145\62\x5f\x6f\162\x74\150\157\137\154\x61\x6e\144\x6d\141\x72\153\163\x2e\x6f\x74\150\x5f\x6c\141\156\x64\x6d\x61\x72\x6b\137\x70\x61\x72\141\155\x73"); $this->db->select("\145\62\137\x6f\x72\x74\150\x6f\x5f\x6c\x61\x6e\144\155\141\162\x6b\163\x2e\157\x74\150\137\x69\x6d\147\x5f\155\157\144\x61\154\151\x74\171\137\151\x64"); $this->db->select("\x65\156\143\x6f\x64\x65\x28\145\x32\137\x6f\x72\x74\150\x6f\x5f\154\141\156\144\155\141\x72\153\163\x2e\157\164\x68\x5f\154\x61\156\144\155\x61\162\x6b\137\x64\x65\163\143\x72\151\x70\x74\x69\x6f\x6e\x5f\x69\x6d\141\x67\x65\x2c\x20\x27\x62\141\x73\x65\66\x34\x27\51\x20\141\x73\40\x6f\164\x68\137\154\x61\156\144\x6d\x61\x72\153\x5f\x64\x65\163\143\162\151\x70\164\x69\x6f\x6e\137\x69\x6d\141\x67\145"); $this->db->select("\x65\x32\x5f\x6f\x72\164\x68\157\137\x66\x6f\162\x6d\x75\x6c\x61\163\56\x6f\x74\150\x5f\x66\x6f\x72\155\x75\154\x61\x5f\156\x61\155\145"); $this->db->from("\145\62\137\x6f\162\164\150\x6f\137\x6c\x61\156\x64\155\x61\x72\153\163"); $this->db->join("\x65\62\137\x6f\x72\164\x68\157\x5f\151\155\141\x67\x65\137\155\x6f\x64\141\x6c\151\x74\x69\x65\163", "\x65\62\137\x6f\x72\x74\x68\x6f\137\x6c\141\156\144\155\x61\x72\x6b\x73\x2e\x6f\x74\150\x5f\151\x6d\x67\137\155\x6f\x64\141\x6c\151\x74\x79\137\151\144\40\75\40\145\62\x5f\157\162\x74\x68\157\137\151\155\x61\147\145\x5f\155\157\144\x61\x6c\x69\x74\x69\145\163\56\x6f\x74\150\x5f\x69\155\x67\x5f\155\157\x64\141\154\x69\x74\171\137\151\x64"); $this->db->join("\x65\x32\137\x6f\162\x74\150\157\x5f\146\x6f\162\x6d\165\154\141\163", "\145\62\137\x6f\162\x74\150\157\x5f\154\x61\156\x64\x6d\141\x72\x6b\163\56\x6f\164\150\x5f\x66\x6f\162\x6d\165\154\141\x5f\x69\x64\x20\75\x20\145\x32\137\x6f\x72\x74\150\157\137\x66\157\x72\x6d\x75\x6c\x61\x73\x2e\157\164\150\137\146\x6f\162\x6d\165\x6c\x61\x5f\x69\x64", "\x6c\145\x66\164"); $this->db->where("\x65\x32\137\x6f\162\164\x68\157\x5f\151\155\141\x67\x65\137\155\x6f\x64\141\154\x69\x74\151\145\x73\56\x6f\164\x68\x5f\x69\155\x67\x5f\155\157\144\x61\154\151\x74\x79\x5f\156\x61\x6d\145", $modality); $this->db->where("\145\62\x5f\x6f\162\x74\x68\x6f\x5f\154\141\x6e\144\x6d\141\162\x6b\163\x2e\x6f\x74\x68\x5f\x6c\141\x6e\x64\x6d\141\162\x6b\x5f\156\x61\x6d\145", $landmarkname); $this->db->limit(1); $landmark_row = $this->db->get()->row(); if (isset($landmark_row)) { $ret = $this->get_AnalysesLabelsByLandmarkNameAndModality($landmarkname, $landmark_row->oth_img_modality_id); $sLandmarkInfo = SLandmarkInfo::constructWithRow($landmark_row, array_column($ret, "\157\x74\150\137\x61\x6e\x61\154\171\163\151\163\x5f\x6c\x61\x62\145\154")); return ["\x65\162\x72\x6f\162\103\x6f\144\145" => VERR_COMMON_SUCCESS, "\x6c\x61\156\x64\155\141\x72\x6b\111\x6e\x66\157" => $sLandmarkInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_AnalysesLabelsByLandmarkNameAndModality($landmarkname, $modalityid) { $this->load->helper("\166\164\137\160\147\137\152\163\157\156\137\150\145\154\x70\x65\162"); $measureIds = getExistInJsonParams($this, "\145\x32\x5f\x6f\x72\164\x68\157\x5f\155\x65\141\163\x75\x72\145\x6d\x65\156\x74\163", "\x6f\x74\x68\137\155\145\x61\x73\165\162\145\x6d\x65\x6e\x74\137\160\141\162\141\155\163", "\157\x74\150\137\155\x65\141\x73\165\x72\x65\x6d\x65\156\x74\137\x69\144", "\x6c\x61\x6e\x64\x6d\141\x72\x6b", $landmarkname); $guidelineIds = getExistInJsonParams($this, "\145\62\x5f\x6f\x72\x74\x68\157\x5f\147\165\151\x64\145\154\151\156\x65\x73", "\157\164\150\137\x67\x75\151\x64\x65\154\x69\x6e\145\x5f\x70\x61\162\x61\155\x73", "\157\164\150\x5f\147\x75\x69\x64\145\154\151\156\x65\x5f\x69\144", "\154\x61\x6e\144\155\141\162\153", $landmarkname); if (count($measureIds) === 0 && count($guidelineIds) === 0) { return array(); } if (count($measureIds) > 0) { $this->db->select("\x6f\164\150\137\141\156\141\154\171\x73\151\163\137\x69\x64"); $this->db->where_in("\157\x74\x68\137\155\x65\141\x73\x75\x72\x65\x6d\145\156\164\137\x69\x64", $measureIds); $subquery = $this->db->get_compiled_select("\x65\x32\x5f\157\x72\x74\150\x6f\x5f\x61\x6e\141\x6c\x79\163\x69\x73\x5f\155\x65\x61\x73\x75\x72\x65\155\x65\156\164\163"); } if (count($guidelineIds) > 0) { if (isset($subquery)) { $subquery = $subquery . "\40\x55\x4e\x49\117\116\x20\101\x4c\x4c\40"; } else { $subquery = ''; } $this->db->select("\x6f\x74\x68\137\x61\x6e\x61\x6c\171\x73\151\x73\x5f\151\x64"); $this->db->where_in("\x6f\x74\150\x5f\x67\165\x69\x64\145\154\x69\156\145\137\x69\x64", $guidelineIds); $subquery = $subquery . $this->db->get_compiled_select("\145\62\137\x6f\162\x74\x68\x6f\137\x61\x6e\x61\x6c\x79\x73\x69\163\x5f\x67\165\151\144\145\x6c\151\156\145\163"); } $this->db->select("\x6f\164\150\137\141\x6e\x61\x6c\171\x73\x69\163\137\154\141\142\145\x6c"); $this->db->where("\157\x74\150\x5f\151\x6d\x67\137\x6d\157\144\x61\154\x69\164\x79\x5f\151\x64", $modalityid); $this->db->where_in("\157\164\x68\137\141\x6e\x61\x6c\x79\163\151\x73\137\x69\144", $subquery, FALSE); return $this->db->get("\145\62\x5f\157\x72\164\150\157\x5f\x61\156\x61\x6c\171\163\x65\163")->result_array(); } public function delete_Landmarks($landmarkname, $modality) { load_database($this, "\x45\62\104\x42"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $this->db->where("\157\x74\150\x5f\151\x6d\x67\137\155\x6f\x64\x61\154\x69\164\x79\x5f\156\141\155\x65", $modality); $this->db->where("\x65\62\137\x6f\x72\164\x68\x6f\x5f\151\x6d\x61\147\145\137\155\x6f\x64\141\154\x69\x74\151\x65\x73\x2e\157\164\150\137\151\x6d\x67\137\155\157\x64\141\154\151\164\171\137\x69\x64", "\x65\62\137\157\x72\x74\150\157\x5f\x6c\x61\x6e\144\155\x61\x72\x6b\x73\56\157\164\x68\137\151\155\147\137\155\x6f\x64\x61\x6c\151\164\171\137\x69\x64", FALSE); $select_modalityid = $this->db->get_compiled_select("\145\62\137\157\x72\x74\150\x6f\x5f\151\x6d\141\147\x65\137\x6d\157\144\x61\x6c\151\x74\151\145\163"); $this->db->where("\x65\x32\137\157\x72\x74\x68\x6f\x5f\154\141\156\x64\x6d\141\162\x6b\163\56\x6f\164\x68\x5f\x6c\141\x6e\x64\x6d\141\162\153\x5f\x6e\141\x6d\145", $landmarkname); $this->db->where("\x65\x78\151\163\x74\x73\50{$select_modalityid}\51", NULL, FALSE); $this->db->delete("\145\x32\x5f\x6f\162\164\150\157\137\x6c\x61\x6e\144\155\141\162\153\163"); $affected_row = $this->db->affected_rows(); if ($affected_row > 0) { $this->load->helper("\x76\x74\x5f\160\147\137\x6a\x73\157\x6e\x5f\x68\145\154\x70\x65\162"); removeFromJsonParams($this, "\x65\x32\137\157\x72\164\x68\157\137\147\x75\x69\x64\145\154\x69\x6e\145\x73", "\157\164\150\137\x67\x75\151\144\145\x6c\x69\x6e\x65\x5f\x70\x61\162\141\155\163", "\x6f\x74\150\137\x67\x75\151\144\145\x6c\151\156\x65\x5f\151\144", "\x6c\141\x6e\144\x6d\141\x72\153", $landmarkname); removeFromJsonParams($this, "\x65\x32\x5f\x6f\162\164\150\x6f\137\155\x65\141\x73\x75\162\x65\155\145\x6e\164\163", "\157\x74\150\137\x6d\145\x61\x73\x75\162\145\155\145\156\164\x5f\x70\141\x72\x61\155\x73", "\157\164\150\x5f\155\x65\x61\163\x75\162\145\155\145\156\164\x5f\x69\x64", "\x6c\141\x6e\x64\x6d\141\x72\x6b", $landmarkname); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_LandmarksP3($landmarktype, $modality) { load_database($this, "\105\x32\x44\x42"); $this->db->select("\157\x74\x68\137\x6c\x61\x6e\144\155\x61\x72\153\x5f\156\x61\155\145\x20\x61\163\x20\x6e\141\x6d\145\54\x6f\x74\150\137\x6c\141\156\144\155\141\162\153\x5f\154\141\x62\x65\x6c\x20\141\163\40\x6c\141\142\145\154\54\x6f\x74\x68\137\154\x61\156\x64\x6d\x61\162\x6b\x5f\165\163\145\162\137\141\x64\144\x65\144\x20\141\x73\40\165\163\x65\x72\x5f\x61\x64\144\145\x64\x2c\157\164\150\137\154\x61\x6e\144\x6d\x61\x72\x6b\137\x74\171\160\x65\40\x61\163\x20\164\171\160\x65"); $this->db->from("\145\62\137\x6f\x72\x74\150\157\137\x6c\x61\x6e\144\x6d\x61\162\153\x73"); $this->db->join("\x65\62\x5f\x6f\x72\164\x68\157\x5f\151\155\141\147\x65\x5f\155\x6f\x64\x61\154\151\x74\151\145\163", "\145\62\x5f\x6f\x72\x74\150\x6f\x5f\154\x61\156\x64\155\x61\x72\x6b\163\x2e\x6f\164\x68\137\151\155\x67\x5f\155\157\x64\141\x6c\151\164\x79\137\151\144\x20\75\x20\145\62\x5f\157\x72\x74\x68\157\x5f\x69\x6d\141\x67\145\137\155\157\144\141\x6c\x69\164\x69\145\x73\x2e\157\x74\x68\137\x69\155\147\x5f\x6d\157\x64\141\x6c\151\x74\171\x5f\151\x64"); $this->db->where("\145\x32\137\157\162\x74\150\x6f\137\151\x6d\x61\147\x65\137\155\x6f\144\x61\154\151\164\151\x65\x73\56\157\x74\150\x5f\151\x6d\147\x5f\x6d\157\x64\x61\x6c\x69\x74\x79\137\156\x61\155\x65", $modality); if (strcasecmp($landmarktype, "\x41\x6c\x6c") != 0) { $this->db->where("\x6f\x74\x68\x5f\154\141\x6e\x64\x6d\x61\162\x6b\x5f\x74\171\x70\x65", strtoupper($landmarktype)); } $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sLandmark = new SLabeledLandmark($row); array_push($items, $sLandmark); } return ["\x65\162\162\157\162\x43\x6f\144\145" => VERR_COMMON_SUCCESS, "\x6c\141\156\x64\155\x61\162\x6b\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_LandmarksP4($simulationname) { load_database($this, "\x45\62\x44\x42"); $this->db->select("\157\164\150\137\154\x61\x6e\x64\x6d\141\162\x6b\137\156\141\155\145\54\157\x74\x68\137\154\x61\156\144\x6d\x61\x72\x6b\137\x6c\x61\142\145\x6c\54\157\164\150\x5f\163\151\x6d\165\154\x61\x74\151\x6f\x6e\x5f\164\171\x70\x65"); $this->db->from("\145\x32\x5f\x6f\162\x74\x68\x6f\x5f\154\141\x6e\144\x6d\141\162\x6b\163"); $this->db->join("\x65\x32\137\x6f\x72\x74\x68\157\x5f\163\151\x6d\165\154\x61\164\151\157\156\137\x6c\141\156\x64\x6d\x61\162\153\x73", "\145\x32\x5f\x6f\162\164\x68\x6f\x5f\x6c\141\x6e\x64\x6d\141\162\x6b\163\56\157\x74\150\137\x6c\x61\156\x64\155\x61\162\153\137\x69\x64\40\75\x20\x65\x32\137\x6f\x72\x74\x68\157\x5f\163\151\x6d\x75\x6c\141\164\x69\x6f\x6e\x5f\x6c\141\156\x64\155\141\162\x6b\163\56\x6f\164\x68\x5f\154\141\x6e\144\x6d\141\162\x6b\x5f\x69\x64"); if (strcasecmp($simulationname, "\x56\x54\x4f\x53\x54\117") === 0) { $this->db->where("\157\x74\150\137\x73\x69\x6d\165\x6c\x61\x74\x69\157\x6e\137\x74\x79\160\x65", 0); } else { if (strcasecmp($simulationname, "\x50\162\157\146\151\154\x6f\x67\162\x61\155") === 0) { $this->db->where("\x6f\x74\150\x5f\163\x69\x6d\x75\154\x61\x74\151\157\156\137\x74\171\160\145", 1); } } $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sLandmarkSimulationName = new SLandmarkSimulationName($row); array_push($items, $sLandmarkSimulationName); } return ["\145\x72\162\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\154\x61\156\x64\155\x61\x72\x6b\x73" => $items]; } return createResponse(VERR_DB_NOSUCHDATA); } } diff --git a/server/original/www/ezwebserver/src/application/models/Measurements_model.php b/server/original/www/ezwebserver/src/application/models/Measurements_model.php index 18521fa..46da72b 100644 --- a/server/original/www/ezwebserver/src/application/models/Measurements_model.php +++ b/server/original/www/ezwebserver/src/application/models/Measurements_model.php @@ -1,7 +1,7 @@ db->select("\145\x32\x5f\157\x72\x74\x68\157\x5f\x6d\145\141\163\x75\x72\x65\x6d\x65\x6e\x74\163\56\x6f\164\150\x5f\x6d\x65\x61\163\165\x72\145\155\145\x6e\164\x5f\151\x64"); $this->db->select("\x65\x32\137\x6f\x72\164\150\x6f\x5f\155\145\x61\163\x75\x72\x65\155\145\x6e\x74\x73\x2e\157\164\x68\x5f\x6d\145\141\163\x75\x72\145\x6d\x65\x6e\164\x5f\156\x61\155\x65"); $this->db->select("\145\62\137\157\x72\x74\150\157\137\155\145\141\x73\165\x72\145\155\x65\156\x74\x73\x2e\157\x74\x68\x5f\x6d\x65\141\163\x75\162\x65\155\145\x6e\164\137\154\x61\x62\x65\154"); $this->db->select("\145\x32\x5f\157\162\x74\150\x6f\137\155\145\x61\163\x75\162\x65\x6d\145\x6e\164\x73\x2e\x6f\164\150\137\x6d\x65\x61\163\x75\162\x65\155\145\156\164\137\x73\x68\157\162\x74\156\141\155\x65"); $this->db->select("\145\x32\x5f\x6f\162\164\150\157\137\155\x65\141\163\x75\162\145\155\x65\x6e\164\x73\56\x6f\164\150\137\155\x65\141\x73\165\162\145\x6d\x65\156\164\137\x64\x65\x73\x63\162\x69\160\x74\x69\x6f\156"); $this->db->select("\145\x32\137\x6f\162\164\x68\x6f\137\155\145\x61\163\165\162\145\155\x65\156\x74\163\56\157\x74\150\137\155\145\x61\x73\x75\x72\x65\x6d\x65\156\164\x5f\x75\x73\x65\x72\x5f\x61\x64\x64\145\x64"); $this->db->select("\x65\x32\x5f\157\162\164\150\157\x5f\x6d\x65\141\x73\165\162\x65\155\x65\156\164\x73\56\x6f\x74\150\137\155\x65\x61\x73\165\x72\145\x6d\145\156\164\137\x70\x61\x72\141\x6d\x73"); $this->db->select("\145\x32\137\x6f\162\164\150\157\137\x6d\145\141\163\x75\x72\x65\x6d\145\x6e\164\x73\56\x6f\x74\x68\137\x69\x6d\x67\x5f\155\x6f\144\141\154\151\164\x79\x5f\x69\x64"); $this->db->select("\x65\x6e\143\157\144\x65\50\x65\x32\x5f\x6f\x72\164\x68\x6f\x5f\155\x65\x61\x73\165\162\145\155\145\156\x74\x73\56\x6f\164\150\137\x6d\x65\x61\163\x75\162\x65\x6d\x65\156\x74\137\144\x65\x73\143\x72\151\x70\x74\151\x6f\156\137\x69\155\x61\x67\145\54\40\47\x62\x61\163\x65\x36\64\x27\x29\40\x61\163\40\x6f\164\150\x5f\155\x65\141\163\x75\x72\145\155\x65\156\x74\137\x64\145\x73\x63\x72\151\x70\164\151\x6f\x6e\x5f\151\x6d\x61\147\145"); $this->db->select("\x65\62\137\x6f\162\164\150\x6f\x5f\146\157\x72\155\165\154\141\x73\x2e\x6f\164\150\137\x66\x6f\x72\155\165\x6c\141\137\x6e\141\155\x65"); $this->db->from("\x65\x32\137\157\162\x74\150\157\x5f\x6d\145\141\x73\165\x72\145\x6d\x65\156\x74\x73"); $this->db->join("\145\62\x5f\x6f\162\164\x68\157\x5f\151\155\141\147\x65\137\x6d\x6f\x64\x61\154\x69\164\151\x65\163", "\x65\62\137\x6f\162\x74\x68\157\137\x6d\145\x61\x73\165\162\x65\x6d\x65\x6e\x74\163\56\x6f\164\150\137\x69\x6d\x67\137\x6d\157\144\141\154\151\164\x79\137\x69\144\x20\75\40\x65\62\x5f\x6f\162\x74\150\x6f\137\x69\155\x61\x67\145\137\x6d\157\144\x61\x6c\151\x74\151\145\x73\x2e\x6f\x74\x68\x5f\x69\x6d\x67\137\x6d\157\144\x61\154\x69\164\171\x5f\x69\144"); $this->db->join("\x65\x32\x5f\157\x72\x74\150\157\137\146\157\x72\x6d\165\154\x61\x73", "\145\x32\x5f\157\162\164\x68\157\x5f\155\145\141\x73\165\162\145\155\x65\156\164\x73\x2e\157\x74\x68\x5f\x66\x6f\162\x6d\165\154\x61\137\151\144\x20\75\x20\145\x32\x5f\157\x72\x74\x68\157\137\146\157\162\x6d\165\x6c\x61\x73\x2e\x6f\x74\150\137\x66\x6f\162\155\x75\154\141\137\x69\x64", "\154\x65\x66\x74"); $this->db->where("\x65\62\137\157\x72\164\150\157\137\x69\x6d\141\x67\145\x5f\x6d\x6f\144\141\154\x69\x74\x69\x65\x73\x2e\157\x74\150\x5f\151\x6d\147\x5f\155\x6f\144\141\x6c\151\164\x79\x5f\156\141\155\x65", $modality); $this->db->where("\145\x32\137\157\162\x74\150\157\137\x6d\145\141\163\x75\x72\145\155\145\x6e\164\x73\56\157\x74\x68\x5f\155\145\x61\x73\x75\162\x65\x6d\x65\156\x74\137\x6e\x61\155\x65", $measurementname); $this->db->limit(1); $measure_row = $this->db->get()->row(); if (isset($measure_row)) { $analysisNames = $this->get_AnalysesLabelsByMeasurementNameAndModality($measurementname, $measure_row->oth_measurement_id, $measure_row->oth_img_modality_id); $this->db->select("\x65\62\137\x6f\x72\x74\x68\x6f\137\x73\x74\141\x6e\x64\141\x72\x64\x5f\144\141\x74\x61\56\52\x2c\x65\62\x5f\x6f\x72\164\x68\157\137\162\141\143\145\x2e\x6f\164\150\137\x72\141\x63\145\x5f\156\141\155\145\x2c\145\62\x5f\x6f\162\164\x68\157\x5f\x61\x6e\x61\x6c\171\163\145\x73\56\157\x74\150\x5f\141\x6e\141\x6c\171\163\151\x73\137\156\x61\155\145"); $this->db->join("\x65\x32\137\157\x72\x74\150\157\137\x72\141\143\145", "\145\x32\137\157\x72\x74\x68\x6f\x5f\162\141\143\145\56\157\164\x68\137\x72\x61\143\145\x5f\x69\x64\x20\x3d\x20\145\x32\x5f\x6f\x72\164\x68\x6f\x5f\x73\x74\x61\x6e\144\141\x72\x64\x5f\144\141\164\141\56\x6f\164\x68\137\x72\141\x63\145\x5f\x69\144"); $this->db->join("\x65\x32\137\x6f\x72\164\150\x6f\x5f\141\x6e\141\154\171\163\x65\163", "\145\x32\137\157\x72\x74\150\x6f\137\141\x6e\x61\x6c\x79\163\145\x73\x2e\x6f\x74\x68\137\x61\x6e\x61\x6c\x79\x73\151\x73\137\x69\x64\40\x3d\x20\145\62\137\157\x72\x74\x68\x6f\137\163\164\x61\x6e\x64\x61\x72\x64\137\x64\141\x74\141\56\157\x74\x68\x5f\141\156\x61\154\x79\x73\x69\163\137\151\144", "\154\145\146\x74"); $this->db->where("\145\62\137\x6f\162\x74\x68\x6f\137\163\164\x61\x6e\144\x61\162\144\137\x64\x61\x74\x61\56\x6f\164\x68\x5f\155\145\141\x73\165\162\x65\x6d\145\x6e\164\137\x69\144", $measure_row->oth_measurement_id); $standardDatas = $this->db->get("\x65\x32\x5f\157\162\x74\150\x6f\x5f\x73\x74\141\x6e\x64\x61\162\144\137\x64\x61\x74\141")->result_array(); $sMeasurementInfo = SMeasurementInfo::constructWithRow($measure_row, array_column($analysisNames, "\157\164\x68\x5f\x61\156\x61\x6c\x79\163\151\163\x5f\x6c\141\142\145\x6c"), $standardDatas); return ["\x65\x72\x72\x6f\x72\x43\x6f\144\x65" => VERR_COMMON_SUCCESS, "\155\x65\141\x73\x75\x72\145\155\145\x6e\164\x49\156\146\157" => $sMeasurementInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_AnalysesLabelsByMeasurementNameAndModality($measurementname, $measurementid, $modalityid) { $this->load->helper("\x76\164\137\x70\x67\x5f\x6a\163\157\x6e\x5f\150\145\154\160\x65\162"); $measureIds = getExistInJsonParams($this, "\x65\x32\137\x6f\162\164\x68\157\137\x6d\x65\141\x73\165\162\145\155\145\156\x74\163", "\x6f\x74\150\x5f\x6d\145\141\163\165\x72\x65\x6d\x65\156\164\x5f\x70\141\x72\141\155\x73", "\157\x74\150\137\x6d\x65\141\163\165\162\x65\155\x65\156\x74\137\151\144", "\155\x65\141\x73\165\162\x65\x6d\x65\156\164", $measurementname); $guidelineIds = getExistInJsonParams($this, "\x65\x32\137\157\162\x74\x68\157\137\x67\x75\x69\144\145\x6c\x69\x6e\145\x73", "\157\164\x68\x5f\147\165\x69\x64\x65\x6c\x69\156\x65\137\160\x61\162\x61\155\163", "\x6f\164\x68\x5f\x67\x75\151\x64\145\154\x69\x6e\145\x5f\x69\x64", "\x6d\x65\x61\x73\x75\162\x65\155\145\x6e\x74", $measurementname); array_push($measureIds, $measurementid); $this->db->select("\x6f\164\x68\137\x61\x6e\x61\154\171\163\151\x73\x5f\151\144"); $this->db->where_in("\157\x74\x68\137\x6d\x65\141\x73\165\162\145\x6d\145\156\164\137\x69\144", $measureIds); $subquery = $this->db->get_compiled_select("\x65\x32\x5f\x6f\x72\164\150\157\x5f\x61\156\141\154\x79\163\x69\163\x5f\x6d\x65\x61\163\x75\x72\145\155\x65\156\x74\x73"); if (count($guidelineIds) > 0) { if (isset($subquery)) { $subquery = $subquery . "\x20\x55\116\111\117\116\40\x41\x4c\114\40"; } $this->db->select("\157\164\150\x5f\141\156\x61\154\x79\163\x69\x73\x5f\x69\x64"); $this->db->where_in("\157\164\150\x5f\147\x75\151\144\x65\x6c\151\156\x65\x5f\x69\144", $guidelineIds); $subquery = $subquery . $this->db->get_compiled_select("\x65\62\x5f\x6f\162\164\x68\157\137\x61\156\141\154\171\x73\151\163\x5f\147\165\151\x64\145\154\151\x6e\145\x73"); } $this->db->select("\x6f\164\x68\x5f\x61\x6e\x61\x6c\171\163\x69\163\x5f\154\x61\142\145\154"); $this->db->where("\x6f\x74\150\x5f\151\155\147\x5f\155\x6f\x64\141\x6c\x69\164\171\x5f\151\x64", $modalityid); $this->db->where_in("\x6f\x74\150\x5f\x61\156\141\x6c\x79\163\x69\163\x5f\x69\x64", $subquery, FALSE); return $this->db->get("\145\62\137\x6f\162\164\150\x6f\x5f\141\x6e\141\154\x79\x73\x65\x73")->result_array(); } public function delete_Measurements($measurementname, $modality) { load_database($this, "\x45\62\x44\102"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $this->db->where("\157\164\150\137\x69\155\x67\x5f\155\157\144\141\x6c\x69\164\x79\137\x6e\x61\x6d\145", $modality); $this->db->where("\x65\62\137\x6f\162\164\x68\x6f\x5f\x69\x6d\x61\147\x65\x5f\x6d\x6f\x64\141\154\x69\x74\151\x65\163\56\x6f\164\150\x5f\x69\x6d\x67\137\x6d\x6f\144\x61\x6c\x69\164\x79\x5f\151\144", "\145\62\137\157\162\x74\150\x6f\137\x6d\x65\141\163\165\162\145\155\145\x6e\x74\163\56\157\164\x68\137\x69\155\147\137\155\x6f\144\x61\x6c\x69\x74\x79\x5f\151\x64", FALSE); $select_modalityid = $this->db->get_compiled_select("\145\62\x5f\157\x72\164\150\157\137\151\155\141\147\145\x5f\155\x6f\x64\x61\154\x69\x74\x69\x65\x73"); $this->db->where("\x65\x32\x5f\157\162\164\150\x6f\137\x6d\145\x61\163\165\x72\x65\155\x65\156\x74\163\x2e\157\164\x68\x5f\155\145\x61\163\165\162\x65\x6d\145\x6e\164\137\156\141\x6d\x65", $measurementname); $this->db->where("\x65\x78\x69\x73\x74\163\50{$select_modalityid}\x29", NULL, FALSE); $this->db->delete("\145\x32\137\x6f\x72\164\x68\157\x5f\155\x65\x61\163\x75\x72\145\155\145\x6e\164\163"); $affected_row = $this->db->affected_rows(); if ($affected_row > 0) { $this->load->helper("\166\x74\137\160\x67\x5f\x6a\x73\x6f\156\x5f\x68\x65\x6c\160\x65\x72"); removeFromJsonParams($this, "\x65\62\137\x6f\x72\x74\150\157\x5f\147\165\x69\144\145\154\151\156\145\x73", "\157\164\x68\x5f\x67\x75\151\x64\145\154\x69\156\145\x5f\160\x61\x72\141\155\x73", "\x6f\164\150\137\147\x75\151\144\145\x6c\151\x6e\145\x5f\x69\x64", "\x6d\x65\141\163\x75\162\145\x6d\x65\156\x74", $measurementname); removeFromJsonParams($this, "\145\x32\137\157\x72\x74\x68\157\x5f\155\145\x61\163\x75\162\x65\155\x65\x6e\x74\163", "\157\164\150\x5f\x6d\145\141\163\x75\162\145\x6d\x65\x6e\x74\137\160\x61\x72\141\x6d\x73", "\x6f\x74\150\x5f\155\145\141\163\165\x72\x65\x6d\x65\156\164\137\151\144", "\155\145\x61\163\165\x72\145\x6d\145\156\164", $measurementname); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Measurements($sMeasurementInfoParameter) { load_database($this, "\105\x32\x44\x42"); $this->db->join("\145\x32\137\157\162\164\x68\x6f\137\151\x6d\x61\x67\145\137\155\x6f\144\141\154\151\x74\151\x65\163", "\145\x32\137\157\162\164\x68\157\137\155\x65\x61\x73\x75\162\x65\x6d\145\x6e\164\x73\x2e\157\164\150\137\x69\x6d\x67\137\155\x6f\144\x61\x6c\151\x74\171\x5f\151\x64\x20\x3d\40\x65\62\x5f\157\x72\164\x68\157\137\x69\155\x61\x67\145\x5f\155\x6f\144\141\x6c\151\x74\x69\x65\x73\x2e\x6f\164\x68\x5f\x69\155\x67\137\x6d\157\144\141\x6c\x69\x74\171\x5f\x69\144"); $this->db->where("\x65\62\137\x6f\162\x74\x68\157\x5f\x69\x6d\141\147\x65\137\x6d\157\x64\141\154\x69\x74\x69\145\x73\56\x6f\x74\x68\x5f\151\155\147\137\x6d\x6f\144\141\154\x69\164\171\137\x6e\x61\x6d\145", $sMeasurementInfoParameter->modality); $this->db->where("\x65\x32\x5f\157\x72\x74\150\157\137\x6d\145\141\x73\x75\162\x65\x6d\x65\x6e\164\x73\56\157\x74\150\x5f\x6d\x65\x61\x73\165\x72\x65\155\x65\x6e\x74\137\x6e\x61\155\x65", $sMeasurementInfoParameter->name); $q = $this->db->get("\145\x32\x5f\157\162\x74\x68\157\137\155\145\x61\163\x75\162\145\155\x65\156\x74\163"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $this->db->select("\157\x74\150\137\151\155\147\x5f\x6d\157\x64\x61\x6c\151\x74\171\137\x69\x64"); $this->db->where("\x6f\x74\150\x5f\x69\x6d\147\137\155\x6f\x64\141\x6c\151\164\171\137\156\141\x6d\145", $sMeasurementInfoParameter->modality); $this->db->limit(1); $select_modalityid = $this->db->get_compiled_select("\145\x32\x5f\x6f\162\164\150\x6f\137\151\155\x61\x67\x65\x5f\x6d\157\144\x61\x6c\151\164\151\x65\163"); if (isset($sMeasurementInfoParameter->formulaName)) { $this->db->select("\x6f\164\150\x5f\x66\157\x72\155\165\154\141\137\151\144"); $this->db->where("\157\164\x68\137\146\x6f\162\x6d\x75\154\x61\137\156\x61\x6d\145", $sMeasurementInfoParameter->formulaName); $this->db->limit(1); $select_formulaid = $this->db->get_compiled_select("\145\62\137\157\x72\x74\150\157\137\146\x6f\162\x6d\165\154\141\163"); } if (!isset($sMeasurementInfoParameter->label) || empty(trim($sMeasurementInfoParameter->label))) { $label = $sMeasurementInfoParameter->name; } else { $label = $sMeasurementInfoParameter->label; } $data = array("\x6f\164\150\x5f\x6d\x65\141\163\165\x72\145\155\145\x6e\164\x5f\156\x61\x6d\x65" => $sMeasurementInfoParameter->name, "\x6f\x74\x68\137\155\145\141\x73\165\162\x65\x6d\x65\156\164\137\154\141\142\145\x6c" => $label, "\157\164\150\x5f\x6d\x65\x61\x73\165\162\145\x6d\x65\156\164\x5f\165\x73\145\162\x5f\x61\144\x64\x65\144" => boolval($sMeasurementInfoParameter->userAdded)); $this->db->set($data); if (isset($sMeasurementInfoParameter->description)) { $this->db->set("\157\164\x68\x5f\155\145\x61\x73\165\162\x65\155\145\156\x74\137\x64\x65\x73\143\x72\151\160\x74\x69\157\x6e", $sMeasurementInfoParameter->description); } if (isset($sMeasurementInfoParameter->descriptionImage)) { $this->db->set("\x6f\x74\150\x5f\155\x65\x61\x73\x75\162\145\x6d\145\156\164\x5f\x64\x65\163\x63\162\x69\x70\164\151\x6f\x6e\137\x69\155\141\x67\145", "\x64\145\143\157\144\x65\x28\x27{$sMeasurementInfoParameter->descriptionImage}\47\x2c\x27\x62\141\163\x65\66\64\x27\x29", FALSE); } if (isset($sMeasurementInfoParameter->shortName)) { $this->db->set("\x6f\x74\150\137\x6d\x65\x61\163\x75\x72\x65\155\x65\156\x74\x5f\163\x68\157\x72\x74\x6e\141\155\x65", $sMeasurementInfoParameter->shortName); } if (isset($sMeasurementInfoParameter->params)) { $this->db->set("\x6f\164\150\x5f\155\x65\x61\163\x75\162\145\x6d\x65\156\x74\x5f\160\x61\162\x61\155\x73", $sMeasurementInfoParameter->params); } if (isset($sMeasurementInfoParameter->formulaName)) { $this->db->set("\157\x74\x68\137\146\x6f\162\x6d\165\154\141\137\x69\x64", "\50{$select_formulaid}\51", FALSE); } $this->db->set("\x6f\164\x68\137\151\155\147\x5f\155\157\144\x61\154\151\x74\x79\x5f\x69\x64", "\x28{$select_modalityid}\x29", FALSE); $this->db->insert("\x65\62\137\x6f\x72\164\150\x6f\137\155\x65\141\x73\x75\x72\x65\x6d\145\156\x74\163"); $measurement_id = $this->db->insert_id(); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && count($sMeasurementInfoParameter->standardData) > 0) { $affected_row = $this->insert_StandardData($measurement_id, $sMeasurementInfoParameter->standardData); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_Measurements($sMeasurementInfoParameter) { load_database($this, "\105\62\104\x42"); $this->db->select("\145\62\x5f\157\162\164\150\x6f\x5f\x6d\x65\x61\163\165\162\x65\x6d\145\156\x74\x73\x2e\157\x74\x68\x5f\155\x65\141\x73\x75\162\x65\x6d\x65\x6e\x74\x5f\151\x64"); $this->db->join("\145\x32\x5f\x6f\162\x74\150\157\137\x69\x6d\x61\x67\x65\x5f\155\x6f\x64\x61\154\x69\x74\x69\x65\x73", "\145\62\x5f\x6f\x72\x74\x68\157\137\x6d\145\x61\163\x75\x72\x65\x6d\145\156\164\x73\56\157\164\150\137\x69\x6d\147\137\x6d\x6f\144\x61\x6c\151\x74\171\137\x69\144\40\75\x20\x65\62\137\157\162\x74\x68\157\x5f\x69\x6d\141\147\145\x5f\155\x6f\x64\x61\x6c\151\x74\x69\145\163\56\157\164\x68\137\151\x6d\147\137\x6d\157\x64\x61\154\151\x74\171\x5f\151\x64"); $this->db->where("\x65\62\x5f\157\x72\164\150\x6f\x5f\151\155\x61\147\145\x5f\155\157\144\141\154\x69\x74\x69\x65\163\56\x6f\164\150\137\151\155\x67\137\x6d\157\144\141\154\x69\164\171\x5f\x6e\x61\155\145", $sMeasurementInfoParameter->modality); $this->db->where("\145\62\137\x6f\x72\x74\150\157\x5f\155\x65\141\x73\165\x72\145\155\x65\156\x74\x73\56\x6f\x74\150\x5f\x6d\145\x61\x73\x75\x72\x65\x6d\x65\156\164\x5f\x6e\x61\x6d\x65", $sMeasurementInfoParameter->name); $this->db->limit(1); $row = $this->db->get("\145\x32\137\x6f\x72\164\x68\x6f\137\x6d\145\141\x73\x75\x72\145\155\145\156\x74\x73")->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $measurement_id = intval($row->oth_measurement_id); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); if (isset($sMeasurementInfoParameter->formulaName)) { $this->db->select("\157\x74\x68\x5f\x66\x6f\162\x6d\165\x6c\141\x5f\151\144"); $this->db->where("\x6f\164\x68\x5f\x66\x6f\x72\x6d\x75\154\x61\137\156\141\x6d\145", $sMeasurementInfoParameter->formulaName); $this->db->limit(1); $select_formulaid = $this->db->get_compiled_select("\145\x32\x5f\x6f\x72\164\x68\x6f\137\x66\x6f\162\155\x75\x6c\141\163"); } if (isset($sMeasurementInfoParameter->label)) { $this->db->set("\157\164\x68\137\x6d\145\x61\x73\x75\x72\145\x6d\x65\x6e\x74\x5f\x6c\x61\142\145\154", $sMeasurementInfoParameter->label); } if (isset($sMeasurementInfoParameter->userAdded)) { $this->db->set("\x6f\164\150\x5f\155\145\x61\163\x75\162\x65\x6d\x65\156\164\137\x75\x73\145\162\137\x61\144\144\x65\144", boolval($sMeasurementInfoParameter->userAdded)); } if (isset($sMeasurementInfoParameter->description)) { $this->db->set("\x6f\x74\150\137\x6d\x65\141\x73\165\162\145\x6d\x65\156\164\x5f\144\145\x73\x63\x72\x69\x70\164\x69\x6f\156", $sMeasurementInfoParameter->description); } if (isset($sMeasurementInfoParameter->descriptionImage)) { $this->db->set("\x6f\164\x68\137\155\x65\x61\163\x75\x72\x65\x6d\145\156\x74\x5f\144\x65\x73\x63\x72\151\x70\x74\x69\157\156\137\151\x6d\141\x67\145", "\x64\x65\x63\157\x64\x65\x28\x27{$sMeasurementInfoParameter->descriptionImage}\47\x2c\x27\142\x61\163\x65\66\64\x27\51", FALSE); } if (isset($sMeasurementInfoParameter->shortName)) { $this->db->set("\157\x74\x68\137\155\x65\x61\163\x75\x72\x65\x6d\145\156\164\137\x73\150\157\162\164\156\141\155\145", $sMeasurementInfoParameter->shortName); } if (isset($sMeasurementInfoParameter->formulaName)) { $this->db->set("\x6f\x74\150\137\146\157\162\155\165\154\141\x5f\151\x64", "\x28{$select_formulaid}\51", FALSE); } if (isset($sMeasurementInfoParameter->params)) { $this->db->set("\x6f\x74\150\137\x6d\145\141\x73\165\x72\x65\x6d\x65\156\x74\137\x70\141\x72\141\x6d\163", $sMeasurementInfoParameter->params); } $this->db->where("\157\x74\150\x5f\155\x65\x61\x73\165\162\145\x6d\x65\x6e\x74\x5f\151\144", $measurement_id); $this->db->update("\x65\x32\x5f\x6f\162\x74\x68\x6f\x5f\x6d\x65\141\x73\x75\x72\145\155\x65\x6e\164\163"); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && count($sMeasurementInfoParameter->standardData) > 0) { $affected_row = $this->update_StandardData($measurement_id, $sMeasurementInfoParameter->standardData); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function insert_StandardData($measurement_id, $standardData_list) { foreach ($standardData_list as $standardData) { $this->db->select("\x6f\x74\x68\137\162\141\143\x65\137\151\x64"); $this->db->where("\157\x74\x68\137\x72\141\143\x65\137\x6e\x61\x6d\145", $standardData->race); $this->db->limit(1); $select_raceid = $this->db->get_compiled_select("\x65\62\x5f\x6f\162\x74\150\157\137\162\141\x63\145"); if (isset($standardData->analysisName)) { $this->db->select("\157\x74\150\137\141\x6e\141\x6c\171\163\x69\163\137\151\x64"); $this->db->where("\157\x74\x68\x5f\x61\156\141\x6c\x79\163\151\x73\x5f\156\141\155\x65", $standardData->analysisName); $this->db->limit(1); $select_analysisid = $this->db->get_compiled_select("\145\x32\137\x6f\x72\164\x68\x6f\137\141\x6e\141\x6c\171\163\x65\163"); } $data = array("\157\x74\150\x5f\x6d\145\x61\x73\x75\162\145\x6d\145\156\164\137\151\x64" => $measurement_id, "\157\x74\150\x5f\163\x74\x64\137\144\x61\164\141\x5f\144\145\x6e\x74\141\154\x61\147\145\137\x74\171\160\x65" => $standardData->dentalAgeType, "\157\x74\x68\x5f\x73\x74\144\x5f\144\x61\x74\141\137\x67\145\156\144\145\x72" => $standardData->gender, "\x6f\164\x68\137\163\x74\x64\x5f\144\x61\164\x61\x5f\155\145\x61\156" => $standardData->mean, "\x6f\x74\x68\x5f\163\164\144\137\144\x61\164\x61\137\x73\144" => $standardData->SD); $this->db->set($data); $this->db->set("\157\164\x68\137\x72\141\143\145\x5f\x69\144\x20", "\x28{$select_raceid}\x29", FALSE); if (isset($select_analysisid)) { $this->db->set("\157\164\150\x5f\x61\156\x61\154\x79\x73\x69\163\x5f\x69\x64\x20", "\x28{$select_analysisid}\x29", FALSE); } $this->db->insert("\x65\62\x5f\157\162\164\x68\x6f\137\163\x74\141\x6e\144\141\x72\144\137\x64\141\164\141"); if ($this->db->affected_rows() == 0) { return 0; } } return 1; } public function update_StandardData($measurement_id, $standardData_list) { foreach ($standardData_list as $standardData) { if (isset($standardData->analysisName)) { $this->db->select("\157\x74\150\x5f\x61\156\141\154\x79\163\x69\x73\x5f\151\144"); $this->db->where("\157\164\150\137\141\x6e\141\x6c\171\x73\x69\x73\137\x6e\141\x6d\x65", $standardData->analysisName); $this->db->limit(1); $select_analysisid = $this->db->get_compiled_select("\145\62\x5f\157\x72\x74\150\x6f\x5f\x61\156\141\x6c\x79\163\x65\x73"); } $this->db->select("\157\164\x68\x5f\162\x61\x63\x65\x5f\x69\x64"); $this->db->where("\x6f\x74\150\137\x72\141\143\x65\x5f\156\141\x6d\x65", $standardData->race); $this->db->limit(1); $select_raceid = $this->db->get_compiled_select("\x65\62\x5f\x6f\x72\x74\x68\157\x5f\x72\141\143\x65"); $this->db->set("\157\164\x68\137\163\164\144\137\x64\x61\164\x61\x5f\155\145\141\156\x20", $standardData->mean); $this->db->set("\x6f\x74\150\x5f\x73\x74\144\137\x64\x61\164\x61\x5f\x73\144\x20", $standardData->SD); $this->db->set("\157\x74\x68\x5f\163\164\144\x5f\144\141\164\141\x5f\x75\x73\145\162\x5f\x75\x70\x64\141\x74\145\x64", true); $this->db->where("\x6f\x74\x68\137\155\x65\x61\163\165\x72\x65\x6d\145\156\164\x5f\x69\144", $measurement_id); $this->db->where("\157\164\x68\x5f\x73\164\x64\x5f\144\x61\x74\x61\137\x64\x65\x6e\x74\141\154\x61\147\145\137\x74\x79\160\x65", $standardData->dentalAgeType); $this->db->where("\x6f\164\150\137\163\x74\144\137\144\x61\164\141\x5f\147\x65\x6e\x64\145\162", $standardData->gender); $this->db->where("\157\x74\150\137\x72\141\143\145\137\x69\x64", "\50{$select_raceid}\x29", FALSE); if (isset($standardData->analysisName)) { $this->db->where("\157\x74\150\x5f\x61\x6e\141\154\171\x73\151\x73\137\151\x64\40", "\x28{$select_analysisid}\51", FALSE); } else { $this->db->where("\x6f\164\150\x5f\x61\156\x61\154\171\163\x69\x73\137\151\x64\x20", null); } $this->db->update("\145\62\137\x6f\x72\164\150\x6f\x5f\x73\x74\141\156\x64\x61\162\144\137\144\x61\164\x61"); if ($this->db->affected_rows() > 0) { continue; } $data = array("\157\x74\150\137\155\x65\x61\x73\x75\162\x65\155\145\x6e\164\137\151\x64" => $measurement_id, "\x6f\164\150\x5f\163\x74\x64\x5f\x64\x61\164\141\137\x64\x65\x6e\x74\x61\154\141\147\x65\137\x74\171\x70\145" => $standardData->dentalAgeType, "\157\x74\150\137\x73\x74\144\x5f\144\141\164\141\137\x67\x65\x6e\144\145\x72" => $standardData->gender, "\157\x74\x68\137\163\164\x64\137\144\141\164\141\137\155\145\141\156" => $standardData->mean, "\157\164\150\x5f\163\x74\144\x5f\144\141\x74\141\137\x73\144" => $standardData->SD); $this->db->set($data); $this->db->set("\157\164\150\x5f\x72\141\143\145\137\x69\144\40", "\x28{$select_raceid}\x29", FALSE); if (isset($select_analysisid)) { $this->db->set("\157\164\x68\x5f\141\x6e\141\x6c\171\x73\151\163\x5f\151\x64\40", "\50{$select_analysisid}\x29", FALSE); } $this->db->insert("\145\x32\137\x6f\x72\164\x68\157\x5f\x73\164\141\156\x64\x61\162\144\x5f\x64\141\164\x61"); if ($this->db->affected_rows() == 0) { return 0; } } return 1; } public function get_MeasurementsP2($modality, $searchjson) { load_database($this, "\x45\62\104\102"); $this->db->select("\157\164\x68\137\155\x65\141\x73\x75\162\x65\155\145\x6e\x74\137\156\x61\155\145\40\x61\x73\40\x6e\x61\x6d\145\54\157\164\150\137\x6d\x65\x61\163\165\162\145\155\145\x6e\164\x5f\x6c\141\x62\x65\154\40\x61\x73\x20\154\x61\142\x65\154\54\x6f\164\150\x5f\x6d\x65\141\163\x75\162\145\x6d\x65\x6e\164\x5f\165\x73\x65\x72\137\141\144\144\x65\144\x20\x61\163\40\165\163\x65\x72\x5f\x61\x64\144\145\x64"); $this->db->from("\145\62\x5f\x6f\162\x74\x68\x6f\137\155\x65\x61\x73\x75\x72\x65\155\x65\156\x74\x73"); $this->db->join("\x65\x32\137\157\x72\x74\x68\x6f\137\x69\x6d\x61\x67\x65\137\x6d\x6f\x64\x61\x6c\151\x74\x69\145\163", "\145\x32\x5f\157\x72\164\x68\157\x5f\155\145\141\163\165\162\145\155\x65\x6e\x74\x73\x2e\x6f\164\150\x5f\151\155\147\x5f\x6d\x6f\144\141\154\x69\x74\171\137\x69\x64\x20\75\x20\145\62\137\x6f\162\x74\150\157\137\x69\155\x61\x67\145\x5f\155\x6f\x64\x61\x6c\151\x74\151\145\163\56\x6f\x74\150\137\x69\155\147\x5f\x6d\157\x64\141\154\151\164\x79\137\151\144"); $this->db->where("\x65\x32\137\157\162\164\150\x6f\137\151\155\x61\x67\145\137\155\x6f\144\x61\x6c\151\x74\151\145\163\56\x6f\x74\150\x5f\x69\x6d\x67\137\x6d\x6f\x64\x61\x6c\x69\x74\171\x5f\x6e\x61\155\145", $modality); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sMeasureInfo = SMeasurementWithCalculation::constructWithRow($row); array_push($items, $sMeasureInfo); } if ($searchjson === TRUE) { $this->load->helper("\166\164\x5f\160\x67\137\x6a\163\157\x6e\x5f\x68\145\x6c\x70\145\x72"); $calculationNames = getValuesInTableJsonParams($this, "\145\x32\x5f\157\x72\x74\x68\157\137\x6d\145\x61\163\x75\x72\x65\155\145\156\164\x73", "\x6f\164\x68\137\155\x65\141\163\165\x72\145\x6d\x65\156\164\137\x70\141\x72\x61\155\x73", "\x63\x61\154\143\165\154\x61\x74\151\157\156"); if (count($calculationNames) > 0) { foreach ($calculationNames as $cName) { $sMeasureInfo = SMeasurementWithCalculation::constructWithName($cName); array_push($items, $sMeasureInfo); } } } return ["\145\162\162\x6f\162\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x6d\x65\x61\163\x75\x72\145\155\145\156\164\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/MultiFiles_model.php b/server/original/www/ezwebserver/src/application/models/MultiFiles_model.php index bd29075..aaec7c3 100644 --- a/server/original/www/ezwebserver/src/application/models/MultiFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/MultiFiles_model.php @@ -1,7 +1,7 @@ Datafile_model->getTempDir(), "\x5a\151\160"); $this->load->library("\172\x69\160\x77\x72\141\160\x70\145\x72"); $ret = $this->zipwrapper->setZipFile($zipFileName); if ($ret["\145\162\162\x6f\162\x43\157\144\145"] != VERR_COMMON_SUCCESS) { return $ret; } $properties = array("\x6d\157\x64\x65\154" => $this->Datafile_model); $filepath = new FilePathFinder($properties); $filepath->addHandler(new DownloadingE3FilePathHandler()); $filepath->addHandler(new DownloadingImageThumbnailFilePathHandler()); $filepath->addHandler(new DownloadingReportThumbnailFilePathHandler()); $filepath->addHandler(new DownloadingChartThumbnailFilePathHandler()); $filepath->setDefaultHandler(new DownloadingDefaultFilePathHandler()); $itemCount = 0; foreach ($fileList as $fileName) { $fileType = strtoupper($typeList[$itemCount]); $itemCount++; $fileAbsFilePath = $filepath->find($fileType, $fileName); if ($fileAbsFilePath == VERR_COMMON_INVALID && $skipOnError === FALSE) { return array("\145\x72\x72\157\162\103\x6f\x64\145" => VERR_COMMON_INVALID); } $ret = $this->zipwrapper->addFile($fileAbsFilePath, basename(dirname($fileAbsFilePath)) . DIRECTORY_SEPARATOR . basename($fileAbsFilePath), $skipOnError); if ($ret["\145\162\x72\x6f\162\x43\157\x64\145"] != VERR_COMMON_SUCCESS) { return $ret; } } $ret = $this->zipwrapper->getZipFile(); if ($ret["\x65\162\x72\x6f\162\103\x6f\144\145"] == VERR_COMMON_SUCCESS) { return array("\145\162\x72\157\162\103\157\x64\x65" => VERR_COMMON_SUCCESS, "\x66\151\154\145\116\141\155\x65" => $zipFileName); } else { return $ret; } } public function post_MultiFilesInOneForUpload($fileInfoList) { require_once APPPATH . "\155\x6f\x64\x65\154\163\x2f\125\160\x6c\157\141\x64\x69\156\147\x45\63\x46\x69\154\x65\x50\x61\164\150\110\141\156\144\x6c\145\x72\x2e\160\x68\160"; require_once APPPATH . "\x6d\157\144\x65\x6c\x73\57\x55\x70\154\x6f\x61\144\x69\x6e\147\104\145\146\141\165\x6c\x74\x46\151\154\x65\x50\x61\164\x68\x48\141\156\144\x6c\145\162\56\160\150\160"; $zipPath = $_FILES["\x61\164\x74\141\143\x68\145\x64\x46\151\154\145"]["\x74\155\160\x5f\156\x61\155\x65"]; $zip = new ZipArchive(); if ($zip->open($zipPath) === FALSE) { vt_loge("\x4d\165\154\x74\151\x46\x69\x6c\x65\x73\x49\156\117\156\x65\106\x6f\162\125\x70\x6c\157\141\x64\x5f\160\x6f\x73\164\40\101\160\x69\x2e\x20" . "\132\151\x70\40\x46\x69\154\x65\40\x4f\x70\145\156\x20\x45\162\x72\157\162\56"); return array("\145\x72\x72\x6f\x72\103\x6f\144\x65" => VERR_COMMON_IO); } $updateFileList = array(); $properties = array("\x6d\x6f\x64\145\154" => $this->Datafile_model); $filepath = new FilePathFinder($properties); $filepath->addHandler(new UploadingE3FilePathHandler()); $filepath->setDefaultHandler(new UploadingDefaultFilePathHandler()); for ($i = 0; $i < $zip->numFiles; $i++) { $fileAbsFilePath = $filepath->find($fileInfoList->{$i}->type, urldecode($fileInfoList->{$i}->fileName)); if ($fileAbsFilePath == VERR_COMMON_INVALID) { $updateFileList = array(); break; } makeDir(dirname($fileAbsFilePath)); copy("\x7a\151\x70\72\57\57" . $zipPath . "\x23" . basename($fileInfoList->{$i}->fileName), $fileAbsFilePath); array_push($updateFileList, array("\x75\160\x64\x61\x74\x65\144\x46\x69\154\x65\124\x79\x70\x65" => $fileInfoList->{$i}->type, "\x75\x70\x64\x61\x74\x65\144\x46\x69\x6c\145\x4e\141\155\145" => basename(urldecode($fileInfoList->{$i}->fileName)))); } $zip->close(); if (count($updateFileList) > 0) { return array("\145\162\162\x6f\x72\x43\x6f\144\145" => VERR_COMMON_SUCCESS, "\165\160\144\x61\x74\x65\x46\x69\154\145\114\151\163\164" => $updateFileList); } else { vt_loge("\x4d\x75\154\164\151\106\151\x6c\x65\163\x49\156\117\156\x65\x46\x6f\162\125\160\x6c\x6f\x61\x64\x5f\x70\157\x73\x74\x20\x41\x70\151\x2e\40" . "\111\x6e\166\x61\154\x69\144\x20\x54\x79\160\x65\40\105\162\x72\157\x72\x2e"); return array("\145\162\162\x6f\x72\103\157\144\x65" => VERR_COMMON_INVALID); } } } diff --git a/server/original/www/ezwebserver/src/application/models/OrthoDataVersions.php b/server/original/www/ezwebserver/src/application/models/OrthoDataVersions.php index 5da6aa9..ad0958b 100644 --- a/server/original/www/ezwebserver/src/application/models/OrthoDataVersions.php +++ b/server/original/www/ezwebserver/src/application/models/OrthoDataVersions.php @@ -1,7 +1,7 @@ intval($parameters->number), "\x6f\x74\x68\x5f\144\141\x74\141\x5f\x76\145\x72\x5f\x64\141\164\x65" => $parameters->date, "\x6f\x74\150\x5f\144\141\x74\141\x5f\166\x65\162\x5f\x64\145\163\143\x72\151\x70\164\151\x6f\156" => $parameters->description, "\157\164\150\x5f\x64\x61\x74\x61\x5f\155\151\147\162\x61\x74\x65\x64" => $parameters->migrated); return $convertArray; } public static function createFromDBRecord($parameters) { $sOrthoDataVersions = new SOrthoDataVersions(); $sOrthoDataVersions->number = intval($parameters["\x6f\164\x68\137\144\x61\164\x61\x5f\166\145\x72\137\x6e\165\x6d"]); $sOrthoDataVersions->date = isset($parameters["\x6f\x74\x68\x5f\x64\x61\x74\141\x5f\x76\145\x72\x5f\x64\141\164\145"]) ? currentDateFormat(DATEFORMAT_ISO8601, $parameters["\157\164\150\137\144\x61\x74\141\137\x76\x65\162\137\x64\141\x74\x65"]) : ''; $sOrthoDataVersions->description = $parameters["\157\164\x68\137\x64\141\x74\141\137\166\145\162\x5f\x64\x65\163\143\162\151\160\x74\x69\x6f\x6e"]; $sOrthoDataVersions->migrated = $parameters["\x6f\x74\150\137\144\141\x74\141\x5f\x6d\x69\x67\162\x61\x74\145\x64"] === "\x74" ? true : false; return $sOrthoDataVersions; } } diff --git a/server/original/www/ezwebserver/src/application/models/OrthoDataVersions_model.php b/server/original/www/ezwebserver/src/application/models/OrthoDataVersions_model.php index d4a4703..1910b44 100644 --- a/server/original/www/ezwebserver/src/application/models/OrthoDataVersions_model.php +++ b/server/original/www/ezwebserver/src/application/models/OrthoDataVersions_model.php @@ -1,7 +1,7 @@ db->set("\x6f\164\150\137\x64\x61\x74\141\x5f\166\x65\162\x5f\x6e\x75\x6d", $parameters["\157\x74\x68\x5f\144\141\164\141\x5f\x76\145\x72\x5f\x6e\165\155"]); if (isset($parameters["\157\x74\150\137\144\141\x74\x61\x5f\x76\145\162\137\144\x61\x74\145"]) && !empty($parameters["\x6f\164\150\x5f\144\x61\164\141\x5f\166\x65\162\137\144\x61\x74\145"])) { $this->db->set("\157\x74\150\x5f\144\141\164\141\x5f\x76\x65\x72\x5f\x64\141\164\145", $parameters["\157\x74\x68\137\144\141\164\x61\x5f\166\145\x72\137\144\x61\x74\x65"]); } if (isset($parameters["\x6f\x74\x68\137\144\x61\164\141\x5f\x76\x65\x72\x5f\144\x65\163\x63\x72\151\x70\164\x69\157\x6e"]) && !empty($parameters["\x6f\x74\150\x5f\144\x61\164\x61\137\166\x65\x72\137\x64\x65\163\x63\162\151\160\x74\151\157\x6e"])) { $this->db->set("\x6f\164\x68\137\x64\141\164\x61\x5f\166\145\162\x5f\x64\x65\x73\143\x72\x69\160\164\x69\x6f\156", $parameters["\157\164\150\x5f\x64\x61\x74\141\137\166\x65\162\137\144\x65\x73\x63\162\x69\x70\164\x69\x6f\x6e"]); } $this->db->set("\x6f\x74\150\137\144\x61\164\x61\x5f\x6d\151\x67\162\141\x74\x65\144", $parameters["\157\x74\150\x5f\144\x61\x74\141\137\x6d\151\147\x72\x61\164\x65\x64"]); $this->db->insert("\145\62\137\x6f\162\164\150\157\x5f\x64\x61\x74\141\x5f\x76\145\162\163\151\x6f\x6e"); } public function deleteAllOrthoDataVersion() { load_database($this, "\x45\62\104\102"); $this->db->empty_table("\x65\62\x5f\157\162\164\150\x6f\137\x64\x61\164\141\137\x76\x65\x72\x73\x69\157\156"); } public function get_OrthoDataVersions() { load_database($this, "\x45\62\104\x42"); $this->db->select("\157\164\150\x5f\144\x61\164\141\x5f\x76\145\162\x5f\x6e\165\x6d\x2c\x20\x6f\x74\150\x5f\144\x61\x74\x61\x5f\166\145\162\x5f\144\141\x74\x65\54\x20\x6f\164\x68\x5f\x64\141\x74\x61\137\166\x65\x72\137\x64\x65\x73\x63\162\151\x70\x74\151\157\x6e\54\x20\157\x74\x68\x5f\x64\141\x74\141\x5f\155\x69\x67\x72\x61\x74\145\x64"); $this->db->from("\145\62\x5f\x6f\x72\164\150\x6f\x5f\144\141\x74\141\x5f\166\145\162\x73\151\x6f\156"); $this->db->order_by("\157\x74\x68\137\x64\x61\x74\x61\x5f\x76\x65\x72\137\156\165\x6d", "\x61\x73\143"); $ret = $this->db->get()->result_array(); $structArray = array(); for ($i = 0; $i < count($ret); $i++) { $sOrthoDataVersions = SOrthoDataVersions::createFromDBRecord($ret[$i]); array_push($structArray, $sOrthoDataVersions); } if (count($structArray) > 0) { return ["\145\162\x72\x6f\x72\103\157\144\x65" => VERR_COMMON_SUCCESS, "\x6f\x72\164\x68\x6f\104\x61\x74\141\x56\x65\x72\163\x69\x6f\x6e\x73" => $structArray]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_OrthoDataVersions() { load_database($this, "\105\x32\x44\102"); $this->db->select_max("\157\164\150\137\x64\141\164\x61\x5f\x76\x65\162\x5f\156\165\x6d"); $this->db->from("\x65\x32\x5f\x6f\162\164\x68\157\137\x64\x61\164\x61\x5f\166\145\162\163\151\157\156"); $ret = $this->db->get()->row(); $this->db->set("\x6f\x74\150\137\x64\141\x74\141\137\155\151\x67\162\x61\x74\x65\144", true); $this->db->where("\157\x74\x68\x5f\144\x61\164\x61\137\x76\145\x72\137\156\x75\x6d", $ret->oth_data_ver_num); $this->db->update("\x65\62\137\157\x72\164\x68\157\137\144\141\x74\x61\x5f\166\x65\x72\x73\151\157\156"); if (isset($ret->oth_data_ver_num) && !empty($ret->oth_data_ver_num)) { return ["\x65\162\162\157\162\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\x6d\x69\147\162\x61\x74\145\x64\117\x72\x74\150\x6f\x44\141\x74\x61\x56\145\x72\163\151\157\x6e" => intval($ret->oth_data_ver_num)]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/PatientCharts_model.php b/server/original/www/ezwebserver/src/application/models/PatientCharts_model.php index c126b58..cd2c773 100644 --- a/server/original/www/ezwebserver/src/application/models/PatientCharts_model.php +++ b/server/original/www/ezwebserver/src/application/models/PatientCharts_model.php @@ -1,7 +1,7 @@ db->where("\157\x74\x68\137\143\x68\x61\x72\164\137\146\x69\154\x65\156\141\x6d\x65", $fileName); $this->db->delete("\x65\62\137\157\x72\x74\150\x6f\x5f\x63\150\x61\x72\x74\x73"); return $this->db->affected_rows(); } public function insert_PatientChart($chartNo, $fileName, $chartType) { load_database($this, "\x45\62\104\102"); $this->db->select("\160\x61\x74\x5f\151\144"); $this->db->where("\x70\x61\164\137\x63\x68\141\x72\164\x6e\x6f", $chartNo); $this->db->limit(1); $row = $this->db->get("\x65\62\137\x70\141\x74")->row(); if (isset($row) == FALSE) { return false; } $pat_id = intval($row->pat_id); $now = currentDateFormat(DATEFORMAT_DATABASE); $data = array("\160\141\x74\x5f\151\x64" => $pat_id, "\157\164\150\137\x63\x68\x61\x72\164\x5f\143\162\x65\x61\x74\145\x64" => $now, "\157\x74\150\x5f\143\150\x61\x72\x74\137\165\x70\x64\x61\164\x65\144" => $now, "\157\164\x68\137\x63\150\141\x72\x74\x5f\x74\x79\160\x65" => strcasecmp($chartType, "\110\151\x73\x74\157\162\171") == 0 ? 1 : 0, "\157\x74\150\137\143\x68\141\x72\164\137\146\151\x6c\x65\x6e\141\x6d\145" => $fileName); $this->db->set($data); $this->db->insert("\x65\62\x5f\x6f\162\x74\150\157\x5f\x63\x68\141\162\x74\163"); return $this->db->affected_rows() > 0; } public function put_PatientCharts($sPatientCharts) { load_database($this, "\105\x32\x44\102"); $this->db->select("\160\x61\x74\137\151\x64"); $this->db->where("\160\x61\x74\x5f\x63\150\x61\162\x74\x6e\157", $sPatientCharts->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\62\137\x70\x61\164"); $this->db->set("\x6f\164\x68\137\143\150\x61\162\164\137\165\160\x64\141\x74\145\144", $sPatientCharts->updatedDateTime); $this->db->where("\157\164\x68\137\143\150\141\162\x74\x5f\x66\151\x6c\145\156\141\155\x65", $sPatientCharts->chartFileName); $this->db->where("\x70\141\164\x5f\x69\x64", "\x28{$select_patid}\x29", FALSE); $this->db->update("\x65\62\x5f\x6f\x72\164\150\x6f\x5f\x63\150\x61\x72\x74\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_PatientChartsP2($sPatientCharts) { load_database($this, "\x45\x32\x44\x42"); $this->db->select("\x70\x61\164\137\151\x64"); $this->db->where("\160\x61\x74\137\143\150\141\x72\x74\x6e\157", $sPatientCharts->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\62\137\x70\x61\164"); $this->db->set("\x6f\164\x68\137\x63\150\x61\x72\x74\137\165\x70\144\x61\164\145\144", $sPatientCharts->updatedDateTime); if (isset($sPatientCharts->createdDateTime) && !empty($sPatientCharts->createdDateTime)) { $this->db->set("\x6f\164\x68\137\143\150\x61\x72\x74\137\x63\162\145\141\164\x65\144", $sPatientCharts->createdDateTime); } if (isset($sPatientCharts->chartType) && !empty($sPatientCharts->chartType)) { if ($sPatientCharts->chartType == 0 || $sPatientCharts->chartType == 1) { $this->db->set("\x6f\164\150\137\x63\150\141\x72\x74\137\x74\x79\160\145", $sPatientCharts->chartType); } else { vt_loge(__METHOD__ . "\72" . "\124\x68\x65\40\143\x68\x61\x72\x74\x54\x79\x70\x65\x20\x69\x73\40\x69\x6e\x76\x61\x6c\x69\x64\40\141\x72\x67\x75\x6d\x65\156\x74\40\x3a\40" . $sPatientCharts->chartType); return createResponse(VERR_COMMON_INVALID); } } $this->db->where("\157\x74\150\x5f\143\x68\141\162\x74\x5f\x66\151\154\145\156\141\155\145", $sPatientCharts->chartFileName); $this->db->where("\160\x61\164\x5f\151\144", "\50{$select_patid}\51", FALSE); $this->db->update("\145\62\137\x6f\162\x74\x68\x6f\137\x63\150\x61\162\164\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_PatientCharts($chartno) { load_database($this, "\x45\62\x44\x42"); $this->db->select("\x6f\164\150\x5f\143\x68\x61\x72\164\137\x63\162\x65\141\164\x65\x64\54\x6f\x74\150\x5f\143\x68\141\162\x74\137\165\x70\144\x61\x74\145\144\54\x6f\164\x68\x5f\x63\x68\x61\x72\x74\x5f\x74\171\160\x65\x2c\x6f\x74\x68\x5f\x63\150\141\x72\164\137\146\x69\154\145\156\141\155\145"); $this->db->from("\x65\x32\x5f\157\x72\164\150\157\x5f\143\150\141\162\x74\163"); $this->db->join("\x65\x32\137\x70\x61\x74", "\x65\62\x5f\160\141\x74\x2e\160\x61\x74\x5f\151\x64\40\x3d\40\x65\62\137\157\162\164\150\157\137\143\x68\141\x72\164\163\x2e\160\x61\x74\137\151\x64"); $this->db->where("\x65\62\x5f\160\141\x74\56\160\141\164\x5f\143\x68\141\162\x74\x6e\x6f", $chartno); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sPatientChartInfo = new SPatientChartInfo($row); array_push($items, $sPatientChartInfo); } return ["\x65\162\x72\x6f\x72\103\157\144\145" => VERR_COMMON_SUCCESS, "\x70\141\x74\x69\x65\x6e\x74\x43\x68\x61\162\164\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function getPatientChartFileNameByChartNo($chartNo) { load_database($this, "\105\62\104\x42"); $this->db->select("\x6f\164\x68\137\143\150\x61\162\x74\137\x66\x69\x6c\145\156\x61\x6d\145"); $this->db->from("\x65\62\x5f\157\162\164\x68\x6f\137\143\x68\141\x72\x74\x73"); $this->db->join("\145\x32\137\x70\x61\164", "\145\x32\x5f\x70\x61\164\56\x70\x61\x74\137\x69\144\x20\75\40\x65\x32\137\157\162\164\x68\x6f\x5f\143\x68\x61\162\x74\163\56\160\141\x74\x5f\151\144"); $this->db->where("\x65\x32\137\160\141\x74\56\x70\141\x74\x5f\143\150\x61\x72\x74\x6e\x6f", $chartNo); return $this->db->get()->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/PatientFilesR2_model.php b/server/original/www/ezwebserver/src/application/models/PatientFilesR2_model.php index bdd103e..4186064 100644 --- a/server/original/www/ezwebserver/src/application/models/PatientFilesR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/PatientFilesR2_model.php @@ -1,7 +1,7 @@ Patients_model->getPatientIdByChartNo($chartNo); if (count($patientId) < 1) { vt_loge(__METHOD__ . "\x3a" . "\143\x68\141\x72\116\157\40\151\163\x20\111\156\x56\141\x6c\151\144\40\x44\x61\x74\141\x2e"); return createResponse(VERR_COMMON_INVALID); } $force = filter_var($parameters["\x66\x6f\162\143\145"], FILTER_VALIDATE_BOOLEAN); if ($force === false && $this->containsDatagroupOrRecordesetImages($patientId[0]["\x70\x61\x74\x5f\x69\x64"])) { vt_loge(sprintf("\x25\x73\72\40\x54\150\x65\x20\160\141\x74\151\145\156\x74\x28\45\163\x29\40\151\x6d\141\147\145\163\x20\x6d\141\171\40\142\x65\154\157\x6e\x67\40\x74\157\x20\x61\40\144\141\x74\x61\147\162\157\165\160\40\157\162\x20\141\40\162\145\143\x6f\x72\x64\x73\145\x74\40\151\x6d\x61\x67\x65\163\x2e", __METHOD__, $chartNo)); return createResponse(VERR_E2_IMAGE_IN_GROUP); } $deletedFiles = 0; $undeletedFiles = 0; $deletedDbRows = 0; load_model($this, "\x45\x32\151\x6d\147\x5f\x6d\157\144\x65\154"); load_model($this, "\x45\x32\162\160\x74\x5f\155\x6f\x64\145\154"); load_model($this, "\111\155\x61\x67\145\x73\x5f\x6d\x6f\x64\x65\154"); load_model($this, "\x44\141\164\141\x66\151\x6c\145\137\155\157\144\x65\x6c"); $imageList = $this->E2img_model->getImageList($chartNo); foreach ($imageList as $imageData) { $ret = $this->Images_model->delete_ImagesByFileAndChartNo($imageData->img_filename, $chartNo); if ($ret > 0) { $deletedDbRows += $ret; } $this->_deletePatientFiles(FILETYPE_FGBPT, $imageData->img_filename, $deletedFiles, $undeletedFiles); $this->_deletePatientFiles(FILETYPE_FFG, $imageData->img_filename, $deletedFiles, $undeletedFiles); } $reportList = $this->E2rpt_model->get_ReportsByChartNo($chartNo); foreach ($reportList as $reportData) { $this->_deletePatientFiles(FILETYPE_REPORT, $reportData["\x72\160\164\x5f\x66\x69\x6c\145\x6e\x61\x6d\x65"], $deletedFiles, $undeletedFiles); $this->_deletePatientFiles(FILETYPE_RPTTHM, $reportData["\x72\x70\164\x5f\x66\151\x6c\145\156\141\x6d\x65"], $deletedFiles, $undeletedFiles); } load_model($this, "\101\164\164\145\x6e\x64\151\x6e\147\x44\157\x63\164\x6f\x72\163\x5f\155\157\x64\x65\154"); $ret = $this->AttendingDoctors_model->delete_AttendingDoctorsForChartNo($chartNo); if ($ret > 0) { $deletedDbRows += $ret; } $ret = $this->Patients_model->delete_PatientsByChartNo($chartNo); if ($ret === false) { vt_loge("\120\141\164\x69\x65\x6e\164\106\151\x6c\145\x73\102\171\x43\x68\x61\162\x74\116\157\x5f\144\x65\154\x65\x74\x65\x20\x41\x70\x69\x2e\x20" . "\120\x61\x74\x69\145\x6e\164\x20\x44\x61\164\x61\40\x44\x65\x6c\x65\x74\151\x6f\156\x20\x45\x72\x72\x6f\162\x2e"); return array("\x65\162\x72\157\x72\103\157\144\145" => VERR_E2_PATIENT_DELETE); } else { $deletedDbRows += $ret; } return array("\145\x72\162\157\162\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x72\145\163\x75\x6c\x74" => array("\144\145\154\x65\x74\x65\x64\106\151\154\x65\x73" => $deletedFiles, "\165\x6e\x64\x65\x6c\x65\164\x65\144\x46\151\x6c\145\x73" => $undeletedFiles, "\x64\145\154\145\164\x65\x64\104\142\x52\157\x77\x73" => $deletedDbRows)); } private function _deletePatientFiles($type, $filename, &$deletedFiles, &$undeletedFiles) { if ($type == FILETYPE_IMGTHM) { $filename = $this->Datafile_model->getThumbnailFileName(FILETYPE_IMGTHM, $filename) . "\x2e" . EXT_IMGTHM; } else { if ($type == FILETYPE_IMGTAG) { $filename = removeFileExtension($filename) . "\x2e" . EXT_IMGTAG; } else { if ($type == FILETYPE_RPTTHM) { $filename = removeFileExtension($filename) . "\56" . EXT_RPTTHM; } else { if ($type == FILETYPE_OTHTAG) { $filename = removeFileExtension($filename) . "\x2e" . EXT_OTHTAG; } else { if ($type == FILETYPE_FGBPT) { $filename = removeFileExtension($filename) . "\x2e\142\x70\x74\56" . EXT_FGBPT; } else { if ($type == FILETYPE_FFG) { $filename = removeFileExtension($filename) . "\56" . EXT_FFG; } } } } } } $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType($type, $filename); $dirPath = dirname($fileAbsFilePath); if (is_dir($fileAbsFilePath)) { $ret = $this->Datafile_model->rmDirRecurMultiDrive($fileAbsFilePath); $dirFiles = scandir($dirPath); foreach ($dirFiles as $dirFile) { if ($dirFile != "\56" && $dirFile != "\56\56") { if (strpos($dirFile, $filename) !== false) { unlink($dirPath . DIRECTORY_SEPARATOR . $dirFile); } } } } else { $ret = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); } if ($ret) { $deletedFiles += 1; if (count(scandir($dirPath)) < 3) { rmdir($dirPath); } } else { $undeletedFiles += 1; } } public function containsDatagroupOrRecordesetImages($pat_id) { load_database($this, "\x45\x32\x44\102"); $this->db->where("\145\62\x5f\151\155\147\56\160\x61\164\x5f\x69\x64", $pat_id); $this->db->where("\50\145\170\x69\163\x74\x73\x28\163\x65\x6c\145\x63\x74\x20\x2a\40\x66\162\x6f\x6d\40\x65\x32\x5f\144\x61\x74\141\137\147\162\157\165\x70\x5f\151\155\x67\40\167\150\x65\x72\x65\40\145\62\137\144\x61\164\x61\137\x67\x72\x6f\x75\160\137\x69\155\147\x2e\151\x6d\x67\137\151\144\x20\75\x20\145\x32\x5f\151\155\x67\x2e\x69\155\x67\137\151\144\x29", NULL, FALSE); $this->db->or_where("\145\x78\151\x73\x74\163\50\163\145\154\145\x63\x74\40\52\40\x66\162\157\155\x20\x65\62\x5f\157\x72\164\x68\x6f\137\x72\x65\143\157\162\x64\163\x65\164\x5f\x69\x6d\141\147\145\163\40\x77\150\x65\162\145\40\x65\x32\137\x6f\x72\x74\x68\x6f\x5f\x72\145\x63\x6f\x72\144\x73\x65\x74\137\151\155\x61\x67\145\163\x2e\x69\155\x67\x5f\151\x64\40\75\40\145\62\x5f\151\155\x67\x2e\151\155\147\137\151\144\x29\x29", NULL, FALSE); $cnt = $this->db->count_all_results("\x65\x32\x5f\151\155\x67"); return $cnt > 0; } } diff --git a/server/original/www/ezwebserver/src/application/models/PatientFiles_model.php b/server/original/www/ezwebserver/src/application/models/PatientFiles_model.php index 22d63fe..750d7d6 100644 --- a/server/original/www/ezwebserver/src/application/models/PatientFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/PatientFiles_model.php @@ -1,7 +1,7 @@ Datafile_model->getThumbnailFileName(FILETYPE_IMGTHM, $filename) . "\56" . EXT_IMGTHM; } else { if ($type == FILETYPE_IMGTAG) { $filename = removeFileExtension($filename) . "\56" . EXT_IMGTAG; } else { if ($type == FILETYPE_RPTTHM) { $filename = removeFileExtension($filename) . "\56" . EXT_RPTTHM; } else { if ($type == FILETYPE_OTHTAG) { $filename = removeFileExtension($filename) . "\x2e" . EXT_OTHTAG; } else { if ($type == FILETYPE_FGBPT) { $filename = removeFileExtension($filename) . "\56\x62\160\x74\x2e" . EXT_FGBPT; } else { if ($type == FILETYPE_FFG) { $filename = removeFileExtension($filename) . "\x2e" . EXT_FFG; } } } } } } $fileAbsFilePath = $this->Datafile_model->getAbsFilePathByType($type, $filename); $dirPath = dirname($fileAbsFilePath); if (is_dir($fileAbsFilePath)) { $ret = $this->Datafile_model->rmDirRecurMultiDrive($fileAbsFilePath); $dirFiles = scandir($dirPath); foreach ($dirFiles as $dirFile) { if ($dirFile != "\56" && $dirFile != "\x2e\56") { if (strpos($dirFile, $filename) !== false) { unlink($dirPath . DIRECTORY_SEPARATOR . $dirFile); } } } } else { $ret = $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); } if ($ret) { $deletedFiles += 1; if (count(scandir($dirPath)) < 3) { rmdir($dirPath); } } else { $undeletedFiles += 1; } } public function delete_PatientFilesByChartNo($chartNo) { $deletedFiles = 0; $undeletedFiles = 0; $deletedDbRows = 0; load_model($this, "\120\x61\164\x69\145\x6e\164\x73\x5f\155\157\144\145\154"); $patientId = $this->Patients_model->getPatientIdByChartNo($chartNo); if (count($patientId) < 1) { vt_loge("\120\x61\x74\151\145\x6e\164\106\151\x6c\x65\163\102\171\103\150\141\x72\164\x4e\157\x5f\144\145\154\x65\x74\145\x20\x41\x70\x69\x2e\x20" . "\x63\150\x61\162\x74\116\157\40\x69\163\x20\111\x6e\x56\141\154\151\144\40\x44\141\x74\x61\x2e"); return array("\x65\162\x72\x6f\x72\103\x6f\x64\x65" => VERR_DB_INVALIDDATA); } load_model($this, "\120\x61\164\151\x65\156\164\x46\151\154\x65\163\x52\x32\137\x6d\157\144\x65\154"); if ($this->PatientFilesR2_model->containsDatagroupOrRecordesetImages($patientId[0]["\160\141\x74\x5f\151\x64"])) { vt_loge(sprintf("\x25\x73\x3a\x20\x53\153\151\160\x20\x74\x6f\x20\144\x65\154\145\x74\145\x20\x65\166\x65\x6e\x20\x74\150\145\40\160\x61\164\x69\x65\x6e\x74\50\45\x73\x29\40\151\x6d\141\147\x65\163\40\x6d\x61\171\40\x62\x65\x6c\x6f\156\147\40\164\157\x20\x61\40\x64\141\x74\141\147\162\157\x75\160\40\x6f\x72\x20\x61\40\x72\145\143\x6f\162\144\163\145\164\40\151\155\141\147\145\x73\56", __METHOD__, $chartNo)); } load_model($this, "\x45\62\151\155\147\137\x6d\x6f\144\x65\154"); load_model($this, "\x45\62\x72\160\x74\x5f\155\157\x64\145\154"); load_model($this, "\111\x6d\141\147\x65\x73\x5f\x6d\157\x64\x65\154"); load_model($this, "\x44\x61\x74\x61\x66\151\x6c\145\x5f\155\157\x64\145\154"); $imageList = $this->E2img_model->getImageList($chartNo); foreach ($imageList as $imageData) { $ret = $this->Images_model->delete_ImagesByFileAndChartNo($imageData->img_filename, $chartNo); if ($ret > 0) { $deletedDbRows += $ret; } $this->_deletePatientFiles(FILETYPE_FGBPT, $imageData->img_filename, $deletedFiles, $undeletedFiles); $this->_deletePatientFiles(FILETYPE_FFG, $imageData->img_filename, $deletedFiles, $undeletedFiles); } $reportList = $this->E2rpt_model->get_ReportsByChartNo($chartNo); foreach ($reportList as $reportData) { $this->_deletePatientFiles(FILETYPE_REPORT, $reportData["\x72\160\x74\137\146\x69\154\145\156\x61\155\145"], $deletedFiles, $undeletedFiles); $this->_deletePatientFiles(FILETYPE_RPTTHM, $reportData["\x72\160\x74\137\146\151\x6c\145\x6e\x61\155\x65"], $deletedFiles, $undeletedFiles); } load_model($this, "\101\x74\x74\145\x6e\144\151\x6e\x67\x44\157\143\164\x6f\x72\163\x5f\x6d\x6f\144\x65\154"); $ret = $this->AttendingDoctors_model->delete_AttendingDoctorsForChartNo($chartNo); if ($ret > 0) { $deletedDbRows += $ret; } $ret = $this->Patients_model->delete_PatientsByChartNo($chartNo); if ($ret === false) { vt_loge("\120\x61\164\x69\x65\156\164\x46\151\x6c\145\x73\x42\x79\103\150\141\162\x74\116\x6f\137\x64\145\154\145\164\x65\40\101\x70\151\56\x20" . "\x50\141\x74\151\145\156\164\40\104\x61\x74\x61\40\104\x65\x6c\145\x74\x69\x6f\156\40\105\x72\162\157\162\56"); return array("\x65\162\x72\x6f\x72\x43\157\144\x65" => VERR_E2_PATIENT_DELETE); } else { $deletedDbRows += $ret; } return array("\x65\x72\162\x6f\162\103\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\x72\145\163\x75\x6c\x74" => array("\x64\145\x6c\145\x74\145\144\106\x69\x6c\x65\163" => $deletedFiles, "\165\156\x64\x65\x6c\x65\x74\x65\144\106\151\x6c\145\163" => $undeletedFiles, "\144\x65\x6c\x65\x74\145\x64\104\142\122\157\167\x73" => $deletedDbRows)); } } diff --git a/server/original/www/ezwebserver/src/application/models/PatientsR2_model.php b/server/original/www/ezwebserver/src/application/models/PatientsR2_model.php index c488807..0c2abac 100644 --- a/server/original/www/ezwebserver/src/application/models/PatientsR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/PatientsR2_model.php @@ -1,7 +1,7 @@ "\120\x72\157\x74\x65\x63\x74\120\x61\164\151\x65\156\164\x53\x6f\x63\x69\x61\x6c\111\x44\163", "\x6b\x65\x79" => "\151\x73\105\156\x61\x62\154\x65\x64"); $this->load->model("\x53\x65\164\164\x69\x6e\147\x56\x61\154\165\145\x73\137\x6d\157\x64\145\154"); $getResult = $this->SettingValues_model->get_SettingValuesP2($getParameters); $isEnabled = $getResult[0]->value; load_database($this, "\105\x32\104\102"); $this->db->select("\160\141\x74\x5f\x69\x64"); $this->db->where("\160\141\x74\137\143\150\141\x72\x74\x6e\x6f", $sPatientInfo->strChartNo); $q = $this->db->get("\x65\62\137\160\x61\x74"); if ($q->num_rows() > 0) { return returnSetResponse(VERR_DB_OVERLAP); } $this->db->reset_query(); if (!empty($sPatientInfo->strRace)) { $this->db->select("\157\164\x68\x5f\x72\x61\x63\145\137\151\144"); $this->db->where("\x6c\157\x77\145\162\50\x6f\x74\150\137\162\x61\143\x65\137\156\x61\x6d\145\x29", strtolower($sPatientInfo->strRace)); $this->db->limit(1); $select_raceid = $this->db->get_compiled_select("\145\x32\x5f\157\162\164\150\157\x5f\x72\x61\x63\x65"); } if (!empty($sPatientInfo->strClassification)) { $this->db->select("\x6f\164\150\137\143\154\x61\x73\x73\137\151\x64"); $this->db->where("\154\x6f\x77\145\162\50\157\164\x68\x5f\143\154\141\163\x73\137\x6e\141\x6d\x65\x29", strtolower($sPatientInfo->strClassification)); $this->db->limit(1); $select_classid = $this->db->get_compiled_select("\x65\62\137\x6f\x72\x74\x68\x6f\x5f\143\x6c\141\x73\163\151\x66\x69\143\141\164\151\x6f\x6e"); } if (($isEnabled == "\164\162\165\x65" || $isEnabled == "\124\x72\165\x65") && !empty($sPatientInfo->strSocialID)) { $encrypt = $socialIDProtector->encrypt_data($sPatientInfo->strSocialID); $sPatientInfo->strSocialID = $encrypt["\145\x6e\143\162\171\x70\x74\145\x64\104\x61\x74\141"]; } $data = array("\x70\141\164\137\x63\x68\141\x72\x74\156\157" => $sPatientInfo->strChartNo, "\x70\141\164\x5f\154\141\163\164\156\141\x6d\145" => $sPatientInfo->strLastName, "\x70\141\164\137\x66\151\162\163\164\156\x61\x6d\145" => $sPatientInfo->strFirstName, "\160\141\164\137\155\x69\x64\x64\x6c\145\156\x61\x6d\x65" => $sPatientInfo->strMiddleName, "\160\141\164\x5f\147\145\156\144\145\162" => $sPatientInfo->strGender, "\160\141\x74\137\142\x69\162\x74\x68\x64\x61\164\x65" => $sPatientInfo->dtBirthdate, "\160\x61\164\137\x65\x6d\141\x69\x6c" => $sPatientInfo->strEmail, "\160\x61\x74\137\x73\x6f\143\x69\141\x6c\x69\x64" => $sPatientInfo->strSocialID, "\160\141\164\x5f\x72\x65\147\x69\163\x74\145\162\x65\x64\x5f\144\x61\x74\x65\x74\151\155\145" => $sPatientInfo->dtRegisteredDateTime, "\160\x61\164\x5f\160\x68\x6f\164\x6f\137\x66\151\x6c\x65\156\x61\155\145" => $sPatientInfo->strPhotoIDName, "\x70\x61\164\x5f\160\x68\157\156\x65" => $sPatientInfo->strPhone, "\160\x61\x74\x5f\x6d\157\x62\x69\154\145" => $sPatientInfo->strMobile, "\160\x61\x74\x5f\x7a\x69\x70\143\x6f\x64\145" => $sPatientInfo->strZipCode, "\x70\141\164\137\141\144\144\162\x65\x73\163" => $sPatientInfo->strAddress, "\160\141\164\x5f\163\157\x75\162\143\x65\x5f\x74\171\x70\x65\x20" => $sPatientInfo->eSourceType, "\160\x61\164\x5f\143\150\x6f\x73\x75\x6e\x67" => getChosung($sPatientInfo->strLastName), "\x70\141\164\137\152\157\142" => $sPatientInfo->strJob, "\x70\141\x74\137\x6c\x61\163\164\137\x75\x70\144\141\x74\145\x64" => currentDateByFormat(DATEFORMAT_DATABASE)); $this->db->set($data); if (isset($select_raceid)) { $this->db->set("\157\x74\150\x5f\162\x61\x63\145\137\x69\144", "\x28{$select_raceid}\x29", FALSE); } if (isset($select_classid)) { $this->db->set("\x6f\x74\x68\x5f\x63\154\x61\x73\x73\x5f\x69\x64", "\50{$select_classid}\x29", FALSE); } $this->db->insert("\145\x32\x5f\160\x61\x74"); $pat_id = $this->db->insert_id(); if ($this->db->affected_rows() > 0) { if (count($sPatientInfo->strlDoctor) > 0) { $this->db->select("{$pat_id}\x2c\x64\x6f\143\x5f\x69\x64"); $this->db->where_in("\x64\157\143\137\156\141\155\145", $sPatientInfo->strlDoctor); $select_docid = $this->db->get_compiled_select("\x65\x32\137\x64\157\x63"); $this->db->query("\x69\x6e\163\145\162\x74\40\x69\x6e\x74\x6f\x20\145\62\x5f\141\164\164\145\156\x64\151\156\147\137\144\x6f\143\50\x70\141\x74\137\x69\144\54\144\157\x63\137\x69\144\x29\40" . $select_docid); } vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->ePatientModified), "\x41\x64\x64\145\144\x20\x70\141\164\151\145\x6e\164\x20\x69\x6e\x66\x6f\162\155\141\164\x69\157\x6e\x2e\40\103\150\x61\162\164\40\x6e\x6f\x20\x3a\40{$sPatientInfo->strChartNo}"); return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function get_PatientsByChartNoR2($strChartNo) { load_database($this, "\105\x32\104\x42"); $this->db->select("\145\62\137\x70\x61\164\56\52\x2c\x65\62\x5f\157\x72\164\150\157\x5f\162\141\143\145\x2e\x6f\164\x68\x5f\162\141\143\x65\137\156\141\155\x65\54\x65\62\x5f\157\x72\164\150\x6f\x5f\143\x6c\x61\163\x73\x69\146\151\143\x61\x74\x69\157\x6e\x2e\157\164\x68\x5f\143\x6c\x61\163\x73\x5f\156\x61\x6d\x65"); $this->db->from("\x65\62\137\x70\x61\x74"); $this->db->join("\145\62\x5f\x6f\x72\x74\150\x6f\137\x72\141\143\145", "\x65\x32\137\160\141\x74\56\x6f\164\x68\x5f\x72\141\x63\x65\x5f\151\144\x20\x3d\40\145\62\137\157\x72\164\150\157\x5f\162\141\x63\x65\56\157\164\150\137\x72\141\x63\x65\x5f\x69\x64", "\154\x65\x66\164"); $this->db->join("\145\x32\x5f\157\162\x74\150\157\137\x63\154\x61\163\x73\x69\146\x69\x63\x61\164\x69\x6f\156", "\145\62\x5f\x70\141\x74\56\157\164\150\x5f\143\154\141\163\x73\x5f\151\x64\x20\x3d\x20\x65\62\x5f\x6f\162\x74\x68\x6f\137\143\x6c\141\163\x73\151\146\x69\x63\141\x74\151\157\156\x2e\157\x74\x68\137\x63\x6c\141\163\x73\137\151\x64", "\154\x65\x66\164"); $this->db->where("\145\62\137\160\141\x74\x2e\x70\x61\164\137\143\150\141\162\x74\x6e\x6f", $strChartNo); $ret = $this->db->get()->result_array(); if (count($ret) > 0) { $row = $ret[0]; $sPatientInfo = SPatientInfo::createFromDBRecord($row); $socialIDProtector = new SocialIDProtector(); if ($socialIDProtector->is_encrypted($sPatientInfo->strSocialID) && !empty($sPatientInfo->strSocialID)) { $decrypt = $socialIDProtector->decrypt_data($sPatientInfo->strSocialID); $sPatientInfo->strSocialID = $decrypt["\x64\x65\x63\x72\171\x70\x74\x65\x64\x44\x61\x74\x61"]; } $this->db->select("\x65\x32\x5f\x64\x6f\143\x2e\x64\x6f\143\137\x6e\x61\x6d\x65"); $this->db->from("\x65\62\137\141\164\x74\145\156\144\x69\156\147\x5f\x64\157\x63"); $this->db->join("\x65\62\137\x64\x6f\143", "\145\62\x5f\x64\157\143\56\x64\157\x63\x5f\151\144\x20\x3d\x20\145\62\137\x61\x74\x74\x65\156\144\x69\x6e\x67\x5f\x64\x6f\143\x2e\144\x6f\x63\137\151\x64"); $this->db->where("\x65\x32\137\x61\x74\x74\145\156\144\151\x6e\147\x5f\x64\x6f\x63\x2e\160\141\x74\137\x69\x64", $row["\x70\x61\164\137\x69\144"]); $ret = $this->db->get()->result_array(); if (count($ret) > 0) { foreach ($ret as $row) { array_push($sPatientInfo->strlDoctor, $row["\144\x6f\x63\137\156\141\155\x65"]); } } return ["\145\x72\162\x6f\162\x43\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\160\141\x74\151\x65\156\x74\x49\156\x66\157" => $sPatientInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_PatientsByChartNoR2($strChartNo, $sPatientInfo) { $socialIDProtector = new SocialIDProtector(); $getParameters = array("\163\x65\143\x74\x69\x6f\156" => "\120\162\x6f\x74\145\x63\164\x50\141\x74\x69\x65\x6e\x74\x53\157\143\151\141\x6c\x49\104\x73", "\x6b\145\x79" => "\151\163\105\x6e\141\x62\154\x65\x64"); $this->load->model("\123\145\164\x74\x69\156\x67\126\141\x6c\165\145\163\137\155\157\144\x65\x6c"); $getResult = $this->SettingValues_model->get_SettingValuesP2($getParameters); $isEnabled = $getResult[0]->value; load_database($this, "\x45\62\104\102"); $sql = "\x53\x45\114\x45\x43\x54\40\52\x20\106\x52\117\x4d\x20\145\62\137\x70\141\x74\x20\127\110\105\122\x45\x20\x70\141\164\137\143\150\141\x72\164\x6e\157\x20\x3d\x20\77"; $ret = $this->db->query($sql, array($strChartNo))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $pat_id = $ret[0]["\x70\141\164\x5f\x69\x64"]; if ($strChartNo != $sPatientInfo->strChartNo && $this->db->where("\160\x61\x74\x5f\143\150\141\162\164\156\157", $sPatientInfo->strChartNo)->count_all_results("\145\62\137\160\141\x74") > 0) { return VERR_DB_OVERLAP; } if (!empty($sPatientInfo->strRace)) { $this->db->select("\x6f\164\150\x5f\x72\141\143\x65\x5f\x69\x64"); $this->db->where("\x6c\157\x77\145\162\x28\x6f\x74\150\x5f\x72\141\143\145\x5f\156\141\155\145\51", strtolower($sPatientInfo->strRace)); $this->db->limit(1); $select_raceid = $this->db->get_compiled_select("\x65\62\137\x6f\162\164\x68\157\137\x72\141\143\x65"); } if (!empty($sPatientInfo->strClassification)) { $this->db->select("\x6f\164\x68\x5f\143\154\141\163\163\x5f\x69\x64"); $this->db->where("\154\157\167\x65\162\x28\157\x74\150\137\x63\x6c\x61\x73\x73\x5f\156\x61\155\x65\x29", strtolower($sPatientInfo->strClassification)); $this->db->limit(1); $select_classid = $this->db->get_compiled_select("\145\x32\x5f\x6f\162\x74\x68\157\137\x63\154\141\163\x73\151\146\x69\x63\141\x74\x69\x6f\x6e"); } if (strtolower($isEnabled == "\164\x72\x75\145") && !empty($sPatientInfo->strSocialID)) { $encrypt = $socialIDProtector->encrypt_data($sPatientInfo->strSocialID); $sPatientInfo->strSocialID = $encrypt["\x65\156\x63\x72\171\x70\164\x65\x64\x44\x61\x74\141"]; } $data = array("\x70\141\164\x5f\x63\150\141\162\x74\x6e\x6f" => $sPatientInfo->strChartNo, "\160\x61\x74\x5f\x6c\141\x73\x74\x6e\141\155\x65" => $sPatientInfo->strLastName, "\160\x61\164\137\146\151\162\163\x74\156\x61\x6d\x65" => $sPatientInfo->strFirstName, "\160\x61\164\x5f\155\151\x64\144\x6c\x65\156\141\x6d\x65" => $sPatientInfo->strMiddleName, "\160\141\x74\137\147\145\156\144\x65\162" => $sPatientInfo->strGender, "\x70\x61\164\x5f\142\x69\x72\164\150\144\141\x74\x65" => currentDateFormat(DATEFORMAT_SEARCH_DB, $sPatientInfo->dtBirthdate), "\160\x61\164\137\145\155\x61\151\154" => $sPatientInfo->strEmail, "\x70\141\x74\x5f\x73\157\x63\151\x61\x6c\151\x64" => $sPatientInfo->strSocialID, "\x70\141\164\x5f\x70\x68\x6f\x74\x6f\137\x66\x69\154\145\156\x61\155\x65" => $sPatientInfo->strPhotoIDName, "\x70\141\x74\137\160\150\x6f\x6e\x65" => $sPatientInfo->strPhone, "\x70\x61\164\x5f\155\157\x62\x69\154\145" => $sPatientInfo->strMobile, "\160\141\x74\x5f\172\151\160\143\x6f\144\145" => $sPatientInfo->strZipCode, "\160\x61\164\137\141\144\x64\162\145\163\163" => $sPatientInfo->strAddress, "\160\141\x74\137\x73\x6f\x75\162\x63\145\137\164\171\160\145\x20" => $sPatientInfo->eSourceType, "\x70\x61\x74\x5f\143\x68\157\163\165\x6e\x67" => getChosung($sPatientInfo->strLastName), "\160\x61\x74\137\x6a\157\142" => $sPatientInfo->strJob, "\160\141\164\137\154\141\x73\164\x5f\165\x70\144\141\x74\x65\x64" => currentDateByFormat(DATEFORMAT_DATABASE)); $this->db->set($data); if (isset($select_raceid)) { $this->db->set("\x6f\x74\150\x5f\x72\141\143\x65\x5f\x69\x64", "\50{$select_raceid}\x29", FALSE); } else { $this->db->set("\157\x74\x68\x5f\162\x61\x63\145\137\151\144", null); } if (isset($select_classid)) { $this->db->set("\x6f\x74\x68\137\143\x6c\141\x73\x73\137\151\x64", "\50{$select_classid}\51", FALSE); } else { $this->db->set("\x6f\164\150\137\143\154\x61\163\x73\x5f\151\x64", null); } $this->db->where("\x70\x61\164\x5f\151\x64", $pat_id); $this->db->update("\145\x32\137\x70\x61\x74"); try { if ($this->db->affected_rows() > 0) { if ($strChartNo != $sPatientInfo->strChartNo) { $this->db->set("\x70\x61\164\x5f\x63\150\x61\162\164\156\157", $sPatientInfo->strChartNo); $this->db->where("\x70\141\164\137\151\144", $pat_id); $this->db->update("\x65\62\137\151\155\x67"); } $this->db->where("\x70\141\x74\137\151\144", $pat_id); $this->db->delete("\145\62\x5f\141\164\164\x65\156\x64\x69\x6e\x67\x5f\144\157\x63"); if (count($sPatientInfo->strlDoctor) > 0) { $this->db->select("{$pat_id}\x2c\x64\157\143\x5f\x69\x64"); $this->db->where_in("\x64\157\x63\x5f\156\141\155\x65", $sPatientInfo->strlDoctor); $select_docid = $this->db->get_compiled_select("\x65\x32\137\144\157\x63"); $this->db->query("\x69\x6e\x73\145\x72\164\40\151\156\x74\157\40\x65\x32\x5f\141\164\x74\x65\x6e\x64\x69\156\147\137\x64\x6f\x63\x28\x70\141\x74\x5f\151\144\x2c\144\x6f\143\x5f\151\x64\51\40" . $select_docid); } return $this->db->affected_rows(); } else { return $this->db->affected_rows(); } } finally { vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->ePatientModified), "\x4d\x6f\x64\x69\146\151\x65\144\x20\160\141\x74\151\145\156\164\x20\151\156\x66\x6f\162\155\141\164\x69\x6f\x6e\56\40\x43\x68\x61\x72\164\40\156\157\x20\72\x20{$strChartNo}"); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Patients_model.php b/server/original/www/ezwebserver/src/application/models/Patients_model.php index 4733318..287193d 100644 --- a/server/original/www/ezwebserver/src/application/models/Patients_model.php +++ b/server/original/www/ezwebserver/src/application/models/Patients_model.php @@ -1,7 +1,7 @@ db->select("\160\141\164\137\x73\157\x63\x69\141\x6c\x69\x64"); $this->db->from("\x65\x32\x5f\160\141\x74"); $this->db->where("\160\x61\x74\x5f\x63\x68\x61\x72\x74\x6e\157", $strChartNo); return $this->db->get()->result_array(); } public function post_Patients($parameters) { $socialIDProtector = new SocialIDProtector(); $getParameters = array("\x73\145\x63\164\151\157\x6e" => "\x50\162\157\x74\x65\143\x74\x50\141\x74\x69\x65\156\x74\x53\x6f\143\x69\141\154\111\104\x73", "\153\145\x79" => "\151\163\105\156\x61\142\x6c\145\x64"); $this->load->model("\123\145\x74\x74\151\156\147\x56\141\154\165\x65\x73\137\x6d\x6f\x64\145\154"); $getResult = $this->SettingValues_model->get_SettingValuesP2($getParameters); $isEnabled = $getResult[0]->value; $query = "\111\x4e\123\105\122\x54\x20\111\116\x54\x4f\40\x45\62\x5f\x50\x41\124\12\x20\x20\x20\x20\40\x20\x20\40\40\40\x20\40\40\x20\40\x20\x20\40\x20\40\40\x20\40\x20\x28\40\x20\x20\x50\x41\124\x5f\103\110\x41\122\x54\x4e\117\x2c\xa\x20\x20\40\40\40\x20\40\x20\40\40\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\40\40\40\40\x20\x20\40\120\x41\x54\137\x4c\101\x53\124\x4e\x41\x4d\x45\x2c\12\40\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\40\x20\40\40\40\40\40\x20\40\x20\40\x20\40\40\x20\x50\x41\124\x5f\x46\111\x52\123\x54\116\101\115\105\x2c\12\40\x20\40\40\40\x20\40\x20\40\40\40\x20\x20\x20\40\40\x20\40\40\x20\x20\40\x20\x20\x20\40\x20\40\x50\x41\x54\x5f\115\x49\x44\x44\114\x45\x4e\x41\115\x45\x2c\12\40\x20\40\x20\40\40\x20\40\40\40\x20\40\40\40\x20\x20\x20\x20\40\40\40\40\x20\40\40\x20\x20\40\120\101\x54\x5f\x47\105\116\104\105\x52\x2c\12\40\40\x20\40\x20\40\40\x20\x20\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\40\x50\101\124\x5f\x42\x49\122\x54\x48\x44\x41\x54\105\x2c\12\x20\x20\40\40\x20\40\x20\40\40\x20\40\40\40\x20\x20\40\x20\40\x20\40\40\x20\40\x20\x20\x20\x20\x20\120\101\x54\137\105\115\x41\x49\x4c\x2c\12\40\x20\40\x20\40\x20\x20\x20\40\40\x20\40\40\x20\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\x20\40\x20\120\101\x54\137\123\x4f\103\x49\101\x4c\x49\104\x2c\12\x20\40\40\x20\x20\x20\40\x20\40\40\x20\40\40\x20\40\x20\40\40\x20\40\40\x20\40\40\40\x20\40\40\120\101\x54\x5f\120\110\117\x4e\105\54\xa\x20\x20\x20\x20\x20\40\40\40\x20\40\x20\40\x20\40\x20\x20\40\40\40\40\x20\x20\x20\40\40\x20\x20\x20\120\x41\124\x5f\x4d\117\102\x49\114\x45\x2c\xa\x20\40\40\40\40\40\40\40\40\40\x20\x20\40\40\40\40\x20\x20\40\40\40\40\40\x20\x20\x20\x20\x20\120\101\124\x5f\x5a\111\120\103\117\104\x45\x2c\12\40\x20\40\40\40\40\40\40\x20\x20\x20\40\x20\40\40\x20\x20\x20\x20\x20\40\40\40\40\40\x20\x20\40\120\x41\x54\137\101\x44\x44\x52\105\x53\123\54\12\40\x20\40\40\40\x20\x20\40\40\x20\40\40\x20\40\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\x20\40\x20\x50\x41\x54\x5f\x52\105\x47\x49\123\x54\105\122\105\104\137\x44\101\x54\x45\x54\111\x4d\x45\54\xa\40\x20\x20\x20\40\x20\40\40\40\x20\40\x20\40\x20\x20\x20\40\40\40\40\40\x20\x20\40\40\x20\40\40\120\x41\x54\137\120\110\x4f\x54\x4f\x5f\x46\x49\x4c\105\x4e\x41\115\105\x2c\12\x20\40\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x20\40\x20\x20\40\40\40\x20\40\x20\40\x20\x20\x20\40\x50\x41\x54\x5f\x43\x48\117\123\x55\x4e\x47\x2c\xa\x20\x20\x20\40\x20\x20\x20\x20\40\40\40\40\40\40\x20\x20\x20\40\x20\x20\40\40\40\x20\40\x20\40\x20\120\101\124\x5f\x4e\117\x54\105\54\xa\40\x20\40\x20\40\40\x20\x20\x20\40\x20\40\x20\x20\40\40\x20\40\40\x20\40\x20\40\40\x20\40\40\x20\120\x41\x54\137\x53\x4f\x55\x52\x43\105\137\x54\131\120\105\54\xa\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\40\40\x20\40\x20\x20\40\x20\40\40\40\40\40\x20\40\x20\x50\101\x54\x5f\114\101\x53\x54\137\x55\120\104\101\124\105\x44\x29\xa\xa\x20\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\40\40\x20\x20\x20\x20\x20\40\x56\x41\114\x55\105\x53\40\50\x20\77\54\40\77\54\40\77\x2c\x20\77\54\x20\x3f\54\x20\77\54\x20\77\54\x20\x3f\x2c\x20\x3f\x2c\40\77\54\x20\x3f\54\x20\77\54\x20\x3f\54\x20\77\54\40\77\x2c\x20\47\x27\54\x20\77\x2c\x20\77\51\73"; if (($isEnabled == "\164\162\165\x65" || $isEnabled == "\x54\x72\x75\145") && !empty($parameters["\67"])) { $encrypt = $socialIDProtector->encrypt_data($parameters["\x37"]); $parameters["\67"] = $encrypt["\x65\156\143\162\x79\x70\x74\145\x64\104\x61\x74\141"]; } $parameters["\x31\66"] = currentDateByFormat(DATEFORMAT_DATABASE); $this->db->query($query, $parameters); $count = $this->db->affected_rows(); if ($count > 0) { $strChartNo = $parameters[0]; vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->ePatientAdded), "\x41\x64\x64\x65\x64\x20\160\141\164\x69\145\156\x74\x20\151\x6e\146\157\162\x6d\x61\x74\x69\157\x6e\x2e\40\x43\150\141\162\x74\x20\156\157\40\72\40{$strChartNo}"); } return $count; } public function get_PatientsByChartNo($parameters) { $sql = "\123\105\x4c\105\103\124\x20\x50\101\124\137\111\x44\x2c\40\120\x41\124\x5f\103\x48\101\x52\124\116\x4f\54\x20\x50\101\124\137\114\101\x53\x54\x4e\x41\x4d\x45" . "\54\x20\x50\101\124\x5f\x46\x49\122\x53\124\x4e\x41\x4d\x45\x2c\120\x41\124\x5f\x4d\x49\104\x44\114\105\116\x41\115\x45\54\x50\101\x54\x5f\107\x45\x4e\104\x45\x52" . "\54\x20\x50\x41\124\137\x42\x49\122\124\x48\104\101\x54\x45\54\x20\x50\x41\x54\x5f\105\x4d\x41\111\114\x2c\40\x50\101\124\x5f\x53\x4f\103\x49\x41\x4c\x49\104" . "\x2c\x20\x50\101\x54\x5f\x50\110\x4f\x4e\105\x2c\x20\x50\x41\124\137\115\x4f\x42\x49\114\105\54\x20\120\101\x54\x5f\x5a\x49\120\x43\x4f\104\105\x2c\40\x50\x41\x54\x5f\x41\x44\x44\122\x45\x53\123" . "\54\x20\120\x41\124\x5f\x52\105\107\111\123\x54\105\122\x45\x44\137\104\x41\124\105\124\111\x4d\x45\x2c\40\120\x41\x54\137\x50\x48\x4f\124\x4f\137\106\111\x4c\x45\116\x41\x4d\105" . "\54\40\120\x41\x54\137\116\x4f\x54\105\54\40\120\101\124\137\123\117\125\x52\x43\x45\x5f\124\x59\120\x45\40\106\122\117\x4d\40\x45\x32\137\x50\101\x54" . "\40\127\110\105\x52\x45\40\x50\101\124\x5f\103\110\101\122\x54\116\117\40\x3d\x20\x3f"; $ret = $this->db->query($sql, array($parameters))->result_array(); if (count($ret) == 0) { return array("\145\162\x72\157\x72\103\157\144\145" => returnSetResponse(VERR_DB_NOSUCHDATA)["\145\x72\162\157\x72\x43\157\144\145"], "\x70\141\x74\151\145\x6e\164\111\156\146\157" => array()); } else { $ret = $ret[0]; $sPatientInfo = SPatientInfo::createFromDBRecord($ret); $socialIDProtector = new SocialIDProtector(); if ($socialIDProtector->is_encrypted($sPatientInfo->strSocialID) && !empty($sPatientInfo->strSocialID)) { $decrypt = $socialIDProtector->decrypt_data($sPatientInfo->strSocialID); $sPatientInfo->strSocialID = $decrypt["\144\145\143\x72\x79\x70\x74\145\x64\104\141\x74\x61"]; } return array("\x65\162\x72\x6f\162\103\157\144\x65" => returnSetResponse(VERR_COMMON_SUCCESS)["\145\162\x72\x6f\x72\x43\157\144\145"], "\x70\141\164\151\x65\x6e\x74\111\x6e\x66\x6f" => $sPatientInfo); } } public function delete_PatientsByChartNo($strChartNo) { $sql = "\xa\x20\40\40\x20\x20\x20\x20\40\x20\40\x20\40\x53\105\114\x45\x43\124\x20\120\101\x54\x5f\111\104\12\x20\x20\x20\x20\x20\x20\40\40\40\x20\40\40\106\x52\x4f\115\x20\x45\62\x5f\120\x41\124\12\x20\40\x20\40\x20\40\40\x20\40\40\40\40\127\x48\x45\122\x45\x20\x50\101\124\x5f\103\110\101\x52\124\116\x4f\x20\75\40\x3f\12\x20\40\x20\x20\40\40\x20\40\40\40\x20\x20\114\111\115\111\x54\x20\61"; $ret = $this->db->query($sql, array($strChartNo))->result_array(); if (count($ret) < 1) { return FALSE; } $nPatID = intval($ret[0]["\160\x61\x74\137\x69\144"]); $sql = "\12\x20\40\x20\40\40\40\x20\40\40\40\40\40\x53\105\114\x45\x43\124\x20\x49\x4d\107\137\111\104\40\x46\x52\117\x4d\x20\105\62\x5f\111\x4d\x47\x20\x57\110\x45\x52\105\x20\120\x41\124\x5f\111\x44\x20\75\x20\77"; $this->db->query($sql, array($nPatID))->result_array(); $sql = "\xa\x20\40\x20\40\x20\x20\40\40\40\x20\x20\40\104\105\x4c\105\x54\105\40\106\x52\x4f\115\x20\105\x32\x5f\x50\101\x54\40\x57\x48\105\x52\x45\40\120\101\124\x5f\x43\x48\101\122\124\x4e\117\40\75\x20\x3f"; $this->db->query($sql, array($strChartNo)); $ret = $this->db->affected_rows(); if ($ret < 1) { return FALSE; } vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->ePatientDeleted), "\x44\x65\x6c\145\164\x65\144\x20\x70\x61\164\151\x65\156\x74\40\151\x6e\x66\x6f\x72\x6d\141\164\151\157\x6e\56\40\103\150\141\x72\164\x20\156\x6f\40\x3a\40{$strChartNo}"); return $ret; } public function put_PatientsByChartNo($strChartNo, $savingData) { $socialIDProtector = new SocialIDProtector(); $getParameters = array("\x73\x65\x63\164\x69\x6f\156" => "\x50\162\x6f\164\x65\143\164\x50\141\x74\151\x65\x6e\x74\123\157\x63\151\141\x6c\111\104\163", "\153\145\171" => "\x69\163\105\x6e\x61\142\154\145\x64"); $this->load->model("\123\x65\x74\x74\x69\156\x67\126\141\x6c\x75\145\x73\137\x6d\157\144\x65\154"); $getResult = $this->SettingValues_model->get_SettingValuesP2($getParameters); $isEnabled = $getResult[0]->value; $sql = "\x53\x45\114\105\103\124\x20\x2a\40\106\122\117\115\x20\x65\62\x5f\x70\x61\164\x20\x57\x48\105\x52\x45\x20\160\x61\x74\137\143\x68\141\162\x74\x6e\157\40\75\40\x3f"; $ret = $this->db->query($sql, array($strChartNo))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $sql = "\123\x45\x4c\x45\103\x54\x20\160\141\164\137\151\144\40\106\x52\x4f\x4d\x20\x65\62\x5f\160\141\x74\x20\127\x48\105\122\x45\40\160\x61\164\x5f\x63\x68\141\162\x74\x6e\x6f\x20\75\x20\x3f"; $query = $this->db->query($sql, array($savingData["\x73\164\162\103\x68\x61\162\164\116\157"]))->result_array(); if (count($query) > 0) { if ($strChartNo != $savingData["\x73\164\x72\103\x68\141\x72\164\116\x6f"]) { return VERR_DB_OVERLAP; } } $dtPatBirthDate = $savingData["\144\x74\102\151\162\x74\x68\144\x61\164\x65"]; if (($isEnabled == "\164\162\x75\x65" || $isEnabled == "\124\x72\165\x65") && !empty($savingData["\x73\x74\162\x53\x6f\143\151\141\154\111\104"])) { $encrypt = $socialIDProtector->encrypt_data($savingData["\163\x74\162\x53\x6f\143\x69\141\x6c\111\x44"]); $savingData["\x73\164\x72\123\157\143\151\x61\154\x49\x44"] = $encrypt["\x65\156\143\x72\x79\x70\164\x65\144\104\x61\164\141"]; } if (empty($savingData["\163\164\162\x47\145\156\144\145\x72"])) { $strGender = "\x30"; } else { $strGender = strtoupper(substr($savingData["\x73\x74\x72\107\x65\156\144\x65\162"], 0, 1)); } $strPatChosung = getChoSung($savingData["\163\x74\162\114\x61\x73\x74\116\141\155\145"]); if (!empty($strPatChosung)) { $sql = "\x55\120\x44\101\124\105\x20\105\x32\x5f\x50\101\x54\x20\123\105\x54\40\120\101\124\137\x4c\101\x53\x54\116\101\x4d\105\x20\x3d\40\x3f\x2c\40\x50\101\124\x5f\x46\x49\x52\x53\124\116\x41\115\x45\40\75\40\77\54\40" . "\x50\x41\124\137\x4d\x49\104\104\x4c\x45\116\x41\115\x45\40\x3d\x20\77\x2c\120\101\124\x5f\x47\105\116\x44\105\x52\40\x3d\x20\77\54\40\x50\101\x54\x5f\105\x4d\101\x49\114\40\x3d\x20\77\x2c\x20" . "\120\x41\124\137\123\x4f\103\x49\x41\x4c\111\104\40\75\40\77\x2c\x20\120\101\124\x5f\120\x48\117\x4e\x45\x20\x3d\x20\77\x20\x2c\x20\120\x41\124\137\115\117\102\111\114\105\40\75\40\x3f\40\54\40" . "\x50\x41\124\x5f\132\x49\120\103\117\x44\105\x20\75\x20\x3f\40\x2c\40\x50\101\x54\x5f\x41\104\104\122\x45\123\x53\40\x3d\x20\x3f\54\x20\120\x41\124\x5f\120\x48\x4f\x54\117\137\106\111\114\x45\116\x41\115\x45\40\75\x20\x3f\40\x2c\40" . "\x50\101\124\137\x43\x48\x4f\x53\x55\116\107\40\75\40\x3f\54\x20\120\101\x54\x5f\x43\x48\x41\122\124\116\x4f\x20\x3d\40\77\x2c\40\120\x41\124\137\102\111\122\124\110\104\101\124\x45\x20\75\40\x3f\40\x2c\40\x50\x41\124\137\114\x41\x53\x54\x5f\125\120\x44\101\x54\x45\104\x20\x3d\40\x3f" . "\x20\x57\x48\x45\x52\105\40\120\x41\124\137\x43\x48\x41\x52\124\116\x4f\x20\75\40\77"; $this->db->query($sql, array($savingData["\163\164\x72\x4c\x61\163\164\x4e\x61\x6d\145"], $savingData["\163\x74\162\x46\x69\x72\163\164\116\141\x6d\x65"], $savingData["\x73\x74\x72\115\151\144\x64\154\x65\x4e\141\155\145"], $strGender, $savingData["\x73\164\x72\105\x6d\141\x69\154"], $savingData["\163\164\x72\x53\157\x63\x69\141\x6c\111\104"], $savingData["\163\164\162\120\150\x6f\x6e\145"], $savingData["\163\x74\x72\115\x6f\142\151\x6c\x65"], $savingData["\163\x74\x72\x5a\x69\160\103\x6f\x64\145"], $savingData["\x73\x74\x72\101\144\x64\162\145\x73\163"], $savingData["\163\x74\x72\120\x68\157\164\x6f\111\104\116\x61\155\x65"], $strPatChosung, $savingData["\163\x74\x72\x43\150\141\162\164\x4e\x6f"], currentDateFormat(DATEFORMAT_SEARCH_DB, $dtPatBirthDate), currentDateByFormat(DATEFORMAT_DATABASE), $strChartNo)); } else { $sql = "\x55\x50\104\101\x54\105\x20\105\x32\x5f\120\x41\124\40\x53\x45\x54\x20\120\x41\x54\x5f\x4c\101\123\x54\116\x41\115\x45\40\x3d\x20\x3f\54\40\x50\x41\x54\137\106\111\122\123\124\116\101\x4d\x45\x20\x3d\x20\77\x2c\x20" . "\x50\101\x54\x5f\115\111\104\x44\114\x45\x4e\x41\x4d\x45\x20\75\40\77\x2c\x20\x50\x41\x54\x5f\107\105\x4e\104\x45\122\40\x3d\40\x3f\x2c\x20\x50\101\124\x5f\105\115\x41\111\114\x20\75\x20\x3f\54\40" . "\x50\x41\124\137\x53\x4f\103\x49\101\x4c\111\x44\40\75\40\77\x2c\40\x50\101\124\137\x50\x48\117\x4e\105\x20\x3d\40\77\54\x20\x50\x41\124\137\x4d\x4f\x42\x49\114\105\40\x3d\x20\x3f\x2c\x20" . "\120\101\x54\x5f\132\x49\x50\103\x4f\x44\105\40\x3d\x20\77\54\x20\x50\101\x54\x5f\101\x44\x44\122\x45\123\x53\x20\75\x20\77\x2c\x20\120\x41\x54\x5f\x50\x48\x4f\x54\x4f\x5f\106\111\x4c\105\116\x41\x4d\105\40\75\x20\77\54\x20" . "\x50\x41\x54\137\103\110\101\x52\x54\x4e\117\x20\75\40\77\54\x20\x50\101\x54\x5f\x42\111\122\124\110\104\101\124\x45\40\x3d\40\x3f\x20\x2c\x20\x50\101\x54\137\x4c\101\123\x54\x5f\x55\x50\x44\x41\124\105\x44\40\75\40\x3f\x20\x57\x48\105\x52\105\x20\120\x41\x54\x5f\103\x48\x41\x52\124\x4e\x4f\40\x3d\40\x3f\40"; $this->db->query($sql, array($savingData["\x73\164\x72\114\141\x73\164\116\x61\155\x65"], $savingData["\163\x74\162\x46\151\162\163\164\116\x61\155\145"], $savingData["\163\x74\x72\115\151\144\144\154\x65\x4e\x61\x6d\x65"], $strGender, $savingData["\163\164\x72\105\x6d\141\x69\154"], $savingData["\163\x74\x72\x53\157\x63\151\141\154\111\x44"], $savingData["\163\164\x72\120\x68\x6f\x6e\145"], $savingData["\x73\164\162\x4d\157\142\x69\154\145"], $savingData["\163\x74\162\132\x69\x70\x43\x6f\144\x65"], $savingData["\x73\x74\162\x41\x64\x64\x72\145\x73\163"], $savingData["\163\x74\x72\120\150\x6f\x74\x6f\111\104\x4e\141\155\x65"], $savingData["\163\x74\x72\103\x68\x61\x72\x74\116\157"], currentDateFormat(DATEFORMAT_SEARCH_DB, $dtPatBirthDate), currentDateByFormat(DATEFORMAT_DATABASE), $strChartNo)); } try { if ($this->db->affected_rows() > 0) { if ($strChartNo != $savingData["\x73\164\162\x43\150\x61\x72\164\116\x6f"]) { $sql = "\x55\x50\x44\101\x54\105\40\105\x32\x5f\x49\x4d\x47\x20\x53\x45\x54\x20\120\x41\x54\x5f\103\x48\101\x52\x54\x4e\117\40\x3d\40\77\40\127\x48\105\x52\x45\40\x50\101\124\x5f\x49\x44\x20\75\40\x28\x53\105\x4c\105\103\x54\x20\x50\x41\x54\x5f\111\104\x20\x46\122\117\115\40\105\62\x5f\x50\101\124\x20\x57\110\x45\x52\105\x20\120\101\x54\x5f\103\110\x41\122\x54\116\x4f\x20\x3d\x20\77\x29"; $this->db->query($sql, array($savingData["\163\164\162\103\150\141\x72\164\x4e\x6f"], $savingData["\163\x74\162\103\x68\141\162\x74\116\157"])); return $this->db->affected_rows(); } return $this->db->affected_rows(); } else { return $this->db->affected_rows(); } } finally { vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->ePatientModified), "\x4d\x6f\x64\x69\146\x69\145\144\x20\160\x61\164\x69\145\156\164\40\151\x6e\x66\x6f\162\x6d\x61\164\151\157\156\x2e\x20\x43\x68\141\x72\x74\x20\x6e\157\x20\72\40{$strChartNo}"); } } public function get_PatientsByChartNoForID($strChartNo) { $sql = "\x53\x45\x4c\105\x43\124\x20\120\x41\124\x5f\x49\x44\x20\106\x52\x4f\x4d\x20\x45\x32\137\x50\101\x54\40\127\110\105\122\x45\x20\x50\x41\124\137\x43\x48\x41\x52\124\116\117\x20\75\40\77"; return $this->db->query($sql, array($strChartNo))->result_array(); } public function post_PatientsForCondition($parameters, $pageNum, $numItems) { $searchCondition = $parameters["\x73\145\x61\x72\143\150\103\x6f\x6e\x64\151\164\x69\157\156"]; $pairDoctorType = $parameters["\160\x61\x69\162\x44\157\143\164\157\x72\124\171\160\x65"]; if (!empty($searchCondition["\x73\x74\162\103\x6f\x6e\144\151\164\x69\x6f\156"])) { $strCondition = $searchCondition["\x73\x74\x72\103\x6f\x6e\x64\x69\164\x69\157\156"]; if (strpos($strCondition, "\54") == TRUE && count(explode("\54", $strCondition)) == COMMA_SPLIT_COUNT) { $strName = explode("\54", $strCondition); $strFirstName = trim($strName[0]); $strSecondName = trim($strName[1]); if (empty($strFirstName)) { if (empty($strSecondName)) { return VERR_DB_NOSUCHDATA; } else { $strSecondName .= "\x25"; $sql = "\xa\40\x20\40\40\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\x20\40\40\40\x20\x20\40\x20\x20\40\40\40\x20\x53\x45\x4c\x45\x43\124\40\52\x20\x46\x52\x4f\115\40\x45\x32\137\120\101\124\xa\40\x20\40\40\x20\x20\40\x20\40\40\x20\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x20\x20\40\x20\x20\40\127\x48\105\x52\x45\x20\50\120\101\124\x5f\x46\111\122\123\x54\x4e\101\115\105\x20\111\x4c\x49\x4b\105\x20\77\x20\117\122\x20\x28\x50\x41\124\x5f\x4c\x41\x53\124\x4e\x41\115\x45\40\x49\x4c\x49\113\105\40\x3f\x29\51\xa\x20\40\40\x20\x20\40\40\40\40\40\x20\x20\x20\x20\40\40\40\40\x20\40\40\40\x20\x20\40\x20\x20\x20\x4c\111\x4d\x49\x54\x20\x3f\x20\117\106\106\x53\105\x54\x20\x3f"; $query = $this->db->query($sql, array($strSecondName, $strSecondName, $numItems, get_offset($numItems, $pageNum)))->result_array(); } } else { if (empty($strSecondName)) { $strFirstName = $strFirstName . "\45"; $sql = "\xa\40\x20\x20\40\x20\40\x20\x20\x20\40\40\40\40\x20\x20\40\40\40\40\x20\x20\40\40\x20\x53\105\x4c\x45\103\124\x20\52\x20\106\x52\117\115\x20\x45\x32\x5f\120\x41\124\12\x20\40\40\x20\40\x20\x20\40\40\x20\40\40\40\40\40\x20\40\40\x20\x20\40\x20\x20\x20\x57\110\105\x52\105\40\x28\x50\x41\x54\137\x46\111\122\x53\124\x4e\x41\x4d\105\x20\111\114\111\113\105\x20\x3f\40\117\122\x20\50\x50\101\x54\137\x4c\x41\123\124\116\x41\115\105\x20\x49\x4c\111\113\x45\x20\77\51\51\xa\40\40\x20\40\40\40\x20\x20\x20\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\x20\40\x20\40\x4c\x49\x4d\x49\x54\x20\77\40\117\106\x46\123\x45\x54\40\77"; $query = $this->db->query($sql, array($strFirstName, $strFirstName, $numItems, get_offset($numItems, $pageNum)))->result_array(); } else { $strFirstName = $strFirstName . "\x25"; $strSecondName = $strSecondName . "\x25"; $sql = "\12\x20\x20\x20\40\40\x20\40\40\40\x20\x20\40\x20\40\40\x20\x20\x20\x20\40\40\40\x20\x20\x53\x45\x4c\105\x43\x54\40\x2a\x20\106\122\x4f\x4d\x20\105\x32\137\120\101\x54\xa\x20\40\x20\x20\x20\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\x20\40\40\40\40\40\40\x57\110\x45\122\x45\x20\x28\x50\x41\124\x5f\114\101\123\124\116\101\115\x45\40\x49\x4c\x49\113\x45\x20\77\40\x41\116\104\40\120\101\124\x5f\106\x49\122\123\124\116\101\115\x45\x20\x49\114\111\113\105\40\x3f\x29\xa\40\40\40\40\40\x20\x20\40\x20\40\40\40\40\x20\x20\40\x20\40\x20\x20\x20\40\x20\x20\x4f\x52\x20\50\120\101\124\137\x46\x49\x52\x53\x54\x4e\101\x4d\105\x20\111\x4c\111\113\105\x20\x3f\x20\101\116\104\x20\120\x41\124\137\x4c\101\x53\x54\116\101\x4d\x45\40\x49\114\111\x4b\105\x20\x3f\x29\xa\40\x20\x20\40\40\40\x20\x20\40\40\40\40\40\40\x20\40\40\x20\40\x20\x20\x20\40\x20\x4c\x49\x4d\111\x54\40\x3f\40\117\x46\106\123\105\x54\40\x3f"; $query = $this->db->query($sql, array($strFirstName, $strSecondName, $strFirstName, $strSecondName, $numItems, get_offset($numItems, $pageNum)))->result_array(); } } } else { if ($strCondition == SEARCH_ALL_KEYWORD) { $strCondition = ''; } $strCondition = str_replace("\x5f", "\134\x5f", $strCondition); $sql = "\x53\105\x4c\x45\103\124\x20\x50\x41\124\x2e\x50\x41\124\137\x43\x48\101\122\x54\x4e\x4f\x2c\x20" . "\120\101\x54\x2e\x50\101\124\137\x4c\x41\x53\124\x4e\101\115\x45\x2c\40" . "\120\x41\124\56\120\x41\124\x5f\106\x49\x52\x53\124\116\101\115\105\54\40" . "\x50\101\124\x2e\x50\101\x54\137\x4d\x49\x44\104\114\105\x4e\101\115\105\x2c\40\120\101\124\56\120\x41\124\137\x42\x49\122\124\x48\104\101\x54\105\x2c\40\x50\x41\124\56\120\101\124\137\x47\105\x4e\104\x45\x52\54\x20" . "\x28\x43\x41\123\x45\40\127\x48\x45\x4e\x20\x49\115\107\x5f\x41\103\121\125\x49\x53\111\x54\111\117\x4e\137\104\101\124\105\124\111\115\x45\40\111\x53\40\x4e\x55\114\x4c\x20\124\110\105\x4e\40\47\61\60\60\60\x2d\60\61\x2d\x30\x31\x27\40" . "\x45\114\123\105\40\111\x4d\107\137\x41\x43\121\x55\111\x53\x49\124\111\117\x4e\137\104\101\124\105\124\x49\115\105\x20\x45\116\104\x29\x20" . "\x61\163\x20\x49\x4d\107\x5f\101\103\x51\x55\111\123\111\124\x49\117\116\x5f\x44\x41\x54\x45\124\x49\115\x45\x2c\x20" . "\x28\x43\x41\x53\105\40\127\110\x45\116\40\x50\101\124\56\120\101\124\137\x43\x48\x41\x52\x54\x4e\x4f\x20\75\40\77\40\124\110\x45\x4e\x20\60\x20\x45\114\x53\x45\x20\x31\x20\105\x4e\x44\51\40\141\163\x20\x4f\122\104\40\x46\122\x4f\115\x20" . "\50\123\105\x4c\105\x43\124\40\120\x41\x54\x5f\x49\104\x2c\x50\x41\124\137\103\x48\x41\x52\124\116\117\x2c\40\x50\101\124\x5f\x4c\101\x53\124\116\x41\115\105\54\40" . "\120\101\x54\x5f\106\111\122\123\x54\x4e\x41\x4d\x45\54\x20\x50\101\x54\x5f\x4d\x49\x44\104\114\105\x4e\101\x4d\105\54\40" . "\x50\101\124\137\x42\x49\122\x54\110\x44\101\124\105\x2c\x20\120\x41\124\137\x47\x45\116\104\x45\122\x20\106\x52\x4f\115\x20\x45\x32\x5f\120\101\124\40\127\x48\105\x52\x45\x20\120\x41\124\137\103\110\x41\x52\x54\116\117\x20" . "\x49\114\x49\113\x45\x20\77\x20\117\x52\x20\120\x41\x54\x5f\x4c\101\123\x54\116\x41\115\x45\x20" . "\x49\x4c\x49\x4b\x45\x20\x3f\40\117\x52\x20\x50\x41\x54\x5f\x46\x49\x52\123\x54\116\101\115\x45\x20" . "\x49\x4c\x49\x4b\x45\x20\x3f\40\x4f\x52\40\x50\101\124\137\115\x49\x44\x44\114\105\116\101\115\x45\40" . "\111\x4c\111\x4b\x45\x20\77\x20\117\x52\x20\120\x41\x54\137\103\110\x4f\123\125\116\107\40" . "\x49\x4c\111\x4b\x45\x20\77\40\x4f\x52\x20\120\x41\x54\137\x4c\x41\123\124\x4e\x41\115\x45\x7c\x7c\x27\x20\47\x7c\x7c\120\101\x54\137\x46\x49\x52\123\x54\x4e\101\115\x45\40" . "\111\114\111\x4b\x45\40\77\x20\x4f\x52\40\x50\x41\124\x5f\x46\x49\x52\x53\x54\116\101\115\x45\174\x7c\x27\x20\47\x7c\x7c\x50\101\124\137\114\x41\x53\124\116\x41\x4d\x45\40" . "\x49\x4c\111\113\x45\40\x3f\x20\117\x52\40\120\101\x54\137\114\x41\x53\x54\116\101\115\x45\x7c\174\120\x41\x54\x5f\106\x49\122\123\124\116\101\115\x45\x20" . "\111\114\x49\x4b\x45\x20\x3f\x20\x4f\x52\40\x50\101\x54\137\106\x49\122\123\124\x4e\x41\x4d\105\174\174\x50\101\x54\137\114\x41\x53\x54\116\x41\115\x45\x20" . "\x49\x4c\111\113\105\40\x3f\x20" . "\x41\x4e\104\x20\120\x41\x54\137\x43\x48\x41\x52\x54\x4e\117\40\x3c\x3e\x20\77\x29\x20" . "\x61\x73\40\120\x41\124\40\114\105\x46\x54\40\x4f\125\x54\x45\x52\x20\x4a\x4f\111\116\40" . "\x28\x53\x45\x4c\105\x43\124\40\120\101\124\x5f\111\104\54\x20\115\x41\130\50\x49\x4d\107\137\101\103\x51\x55\x49\x53\111\124\x49\x4f\x4e\137\x44\x41\124\105\124\111\x4d\x45\x29\x20" . "\141\163\40\x49\115\x47\x5f\x41\x43\121\x55\111\123\x49\x54\111\x4f\x4e\137\x44\x41\x54\105\x54\x49\x4d\x45\x20" . "\x46\x52\117\115\40\105\x32\137\111\x4d\107\x20\107\x52\117\x55\x50\x20\102\131\x20\x50\101\124\x5f\111\x44\x20\x29\141\163\x20" . "\x49\115\x47\40\x4f\x4e\40\120\x41\124\x2e\120\101\124\137\x49\104\x20\75\x20\111\x4d\x47\56\120\x41\124\x5f\111\x44\40\117\122\104\105\122\x20\102\x59\40\x4f\x52\104\x2c\x49\115\107\137\101\103\x51\125\x49\x53\111\x54\111\117\116\x5f\104\101\x54\x45\124\x49\x4d\105\x20\104\x45\123\103\40" . "\114\x49\x4d\x49\x54\40\x3f\x20\x4f\106\106\x53\x45\124\40\77"; $query = $this->db->query($sql, array($strCondition, "\45" . $strCondition . "\45", "\x25" . $strCondition . "\x25", "\x25" . $strCondition . "\x25", "\x25" . $strCondition . "\45", "\x25" . $strCondition . "\x25", "\45" . $strCondition . "\x25", "\x25" . $strCondition . "\x25", "\45" . $strCondition . "\x25", "\x25" . $strCondition . "\x25", $strCondition, $numItems, get_offset($numItems, $pageNum)))->result_array(); } } else { $sql = "\123\x45\114\105\x43\x54\x20\x50\x41\x54\56\x50\x41\124\137\103\110\101\x52\x54\x4e\117\54\40\x50\101\x54\56\x50\x41\x54\x5f\x4c\101\x53\124\116\x41\115\105" . "\54\x20\x50\101\124\56\120\101\x54\x5f\x46\111\122\123\124\x4e\x41\115\x45\54\40\120\101\x54\56\x50\101\124\137\x4d\111\x44\104\x4c\105\116\101\x4d\105\x2c\40\x50\101\x54\56\120\101\124\x5f\102\x49\122\124\x48\104\x41\124\105\x2c\x20\120\x41\124\x2e\x50\x41\124\x5f\x47\x45\x4e\104\x45\x52\x20\106\x52\x4f\115\40"; if ($searchCondition["\x65\115\x6f\x64\x61\x6c\151\x74\x79"] == dbModalityStringToEmodality("\101\156\171\115\157\x64\141\154\151\164\171") && $searchCondition["\x64\x74\x41\x63\x71\165\151\163\151\x74\151\157\156\x54\x69\x6d\145"] == '') { $sql = $sql . "\50\x53\105\x4c\x45\103\x54\40\104\111\x53\124\x49\x4e\x43\x54\40\x65\x2e\x50\x41\124\137\111\x44\x2c\x20\145\56\120\101\x54\137\x43\x48\x41\x52\x54\116\117" . "\54\x20\145\x2e\x50\x41\x54\137\114\101\123\x54\x4e\x41\115\105\x2c\40\145\x2e\x50\x41\124\x5f\106\111\122\x53\124\x4e\101\x4d\x45\40" . "\54\40\145\x2e\120\101\124\137\x4d\x49\104\104\x4c\105\116\101\115\105\x2c\x65\56\120\101\x54\x5f\102\x49\122\x54\x48\104\101\124\105\x2c\40\145\56\x50\x41\124\137\107\x45\116\104\x45\x52\x20\x46\x52\117\115\x20\105\x32\137\120\x41\x54\40\x65" . "\54\40\x45\62\137\111\x4d\x47\40\151\40\x57\x48\105\x52\x45\x20\145\x2e\x50\x41\x54\x5f\x49\x44\x20\x3d\40\x69\x2e\120\101\x54\x5f\111\104\51"; } else { if ($searchCondition["\x65\x4d\x6f\x64\141\x6c\x69\x74\171"] != dbModalityStringToEmodality("\x41\x6e\x79\x4d\157\144\141\x6c\151\164\x79") && $searchCondition["\x64\x74\x41\x63\161\165\151\x73\x69\164\151\x6f\156\x54\x69\x6d\145"] == '') { if ($searchCondition["\145\115\157\144\141\154\151\x74\x79"] == dbModalityStringToEmodality("\117\x74\x68\145\x72")) { $sql = $sql . "\x28\123\105\x4c\x45\x43\x54\40\x44\x49\123\124\x49\116\103\x54\40\145\x2e\x50\x41\124\137\x49\x44\54\40\145\56\120\101\x54\x5f\103\110\101\x52\124\x4e\x4f" . "\x2c\x20\145\x2e\120\101\124\x5f\x4c\x41\123\124\116\x41\x4d\x45\54\x20\x65\x2e\x50\x41\124\137\106\x49\x52\x53\124\116\101\115\105\40" . "\x2c\40\x65\56\120\x41\124\x5f\115\111\104\104\114\x45\x4e\x41\115\x45\54\x65\x2e\120\x41\124\x5f\102\x49\122\124\x48\x44\101\124\105\x2c\40\145\56\x50\x41\x54\x5f\x47\x45\116\x44\x45\x52\40" . "\106\122\x4f\x4d\40\105\x32\x5f\x50\101\124\40\145\54\40\105\62\x5f\111\x4d\107\x20\151\40" . "\x57\x48\x45\x52\x45\x20\x65\56\120\x41\124\x5f\111\104\40\75\40\x69\56\x50\101\124\137\111\104\40" . "\101\x4e\104\x20\x28\151\56\111\115\107\x5f\x4d\x4f\104\x41\114\x49\124\x59\x20\75\40\47" . modality_api_str_to_modality_db_str("\145\x44\123\114\x52") . "\x27\x20" . "\x4f\122\x20\151\56\x49\x4d\x47\x5f\115\117\104\101\x4c\111\x54\131\40\75\40\x27" . modality_api_str_to_modality_db_str("\145\x49\117\x58\122\141\171") . "\x27\x20" . "\117\x52\40\x69\56\x49\x4d\x47\x5f\x4d\x4f\104\x41\114\111\124\x59\40\x3d\x20\x27" . modality_api_str_to_modality_db_str("\145\x54\x68\x72\145\x65\104\120\x68\x6f\x74\x6f") . "\47\40" . "\117\122\40\x69\56\111\x4d\x47\x5f\x4d\117\x44\x41\114\111\x54\x59\40\75\40\47" . modality_api_str_to_modality_db_str("\x65\x49\x6d\160\x72\x65\163\163\151\x6f\156") . "\x27\40" . "\117\122\x20\x69\56\111\x4d\107\x5f\x4d\117\104\x41\x4c\x49\124\x59\x20\x3d\40\47" . modality_api_str_to_modality_db_str("\x65\111\x4f\123\143\x61\x6e\156\145\162") . "\x27\40" . "\x4f\122\40\x69\56\111\115\x47\137\115\x4f\104\x41\114\x49\124\x59\x20\75\x20\x27" . modality_api_str_to_modality_db_str("\x65\103\x61\x70\x74\x75\x72\145") . "\x27\x20" . "\x4f\x52\40\151\x2e\x49\x4d\107\x5f\x4d\117\104\x41\x4c\x49\x54\131\40\x3d\x20\x27" . modality_api_str_to_modality_db_str("\x65\x4f\164\150\x65\x72") . "\47\x20" . "\x4f\x52\40\x69\56\x49\115\107\137\115\117\x44\101\114\x49\x54\131\x20\75\x20\x27" . modality_api_str_to_modality_db_str("\x65\106\x69\154\145") . "\47\x20" . "\x4f\x52\40\151\56\x49\x4d\107\137\115\117\104\101\114\x49\x54\131\x20\x3d\40\x27" . modality_api_str_to_modality_db_str("\x65\124\x68\162\x65\x65\104\x4f\x62\152\145\x63\x74") . "\47\40" . "\x4f\x52\40\x69\56\x49\115\x47\137\x4d\117\104\x41\x4c\x49\x54\131\x20\x3d\40\47" . modality_api_str_to_modality_db_str("\x65\x44\x6f\156\x74\103\141\162\145") . "\47\x29\x29"; } else { $sql = $sql . "\x28\123\105\x4c\105\x43\124\40\104\111\123\124\x49\x4e\x43\124\40\x65\x2e\120\101\124\x5f\x49\104\54\x20" . "\x65\x2e\x50\101\124\x5f\x43\110\101\x52\124\x4e\117\54\x20\x65\x2e\120\101\124\137\x4c\101\x53\124\116\x41\x4d\x45\54\x20" . "\145\56\x50\x41\124\137\x46\x49\x52\x53\x54\x4e\101\115\105\x20\x2c\40\145\x2e\120\101\x54\x5f\x4d\111\x44\x44\114\x45\116\101\x4d\x45\54" . "\145\x2e\120\101\124\137\x42\x49\122\124\110\104\101\124\105\x2c\x20\145\56\120\101\x54\137\x47\105\x4e\x44\105\x52\40" . "\x46\122\117\115\40\x45\62\x5f\120\101\124\x20\145\x2c\x20\105\62\x5f\x49\x4d\x47\x20\x69\40" . "\x57\110\x45\x52\x45\x20\x65\56\x50\101\124\x5f\111\x44\x20\x3d\x20\x69\56\120\x41\x54\x5f\111\104\40" . "\x41\116\104\40\x28\151\x2e\x49\x4d\x47\137\115\x4f\104\101\x4c\x49\124\x59\x20\75\x20\47" . modality_api_str_to_modality_db_str($searchCondition["\x65\115\157\x64\x61\154\x69\164\171"]) . "\x27\51\x29"; } } else { if ($searchCondition["\x65\115\x6f\x64\141\x6c\x69\x74\171"] == dbModalityStringToEmodality("\x41\x6e\171\x4d\157\144\141\x6c\151\164\171") && isset($searchCondition["\x64\x74\101\x63\161\165\x69\x73\x69\164\151\x6f\156\x54\x69\155\x65"])) { $sql = $sql . "\x28\123\105\114\105\103\124\x20\x44\x49\x53\x54\x49\116\103\x54\x20\x65\x2e\x50\101\x54\137\111\x44\54\x20\x65\56\120\101\x54\x5f\x43\110\101\122\x54\x4e\x4f\x2c\40" . "\x65\x2e\120\x41\124\137\114\101\x53\124\x4e\101\x4d\x45\x2c\x20\145\x2e\x50\x41\x54\x5f\x46\x49\122\x53\x54\x4e\101\x4d\x45\40\54\x20" . "\x65\56\x50\101\x54\x5f\115\x49\104\104\114\105\116\x41\115\x45\x2c\x65\56\x50\x41\x54\x5f\x42\111\122\x54\110\104\x41\x54\x45\54\x20\x65\x2e\120\x41\124\x5f\x47\105\x4e\x44\105\x52\x20" . "\x46\x52\117\115\x20\x45\62\137\120\101\124\x20\145\x2c\40\105\x32\137\x49\115\107\40\x69\x20" . "\x57\110\x45\122\105\x20\145\x2e\x50\x41\124\x5f\111\104\x20\x3d\x20\x69\x2e\x50\x41\x54\137\x49\104\x20" . "\101\x4e\x44\x20\x28\151\x2e\111\115\107\x5f\101\x43\x51\125\111\123\x49\x54\x49\117\x4e\x5f\104\101\x54\105\x54\x49\x4d\x45\x20" . "\x42\x45\x54\127\x45\x45\116\40\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\x74\101\143\x71\165\151\163\151\164\x69\157\156\124\151\155\x65"]) . "\x27\x20" . "\x41\x4e\104\40\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\x74\x54\x6f\101\x63\x71\x54\x69\155\145"]) . "\x27\x29\x29"; } else { if ($searchCondition["\145\x4d\157\144\141\154\x69\164\171"] == dbModalityStringToEmodality("\x4f\164\150\145\162")) { $sql = $sql . "\50\x53\105\114\x45\x43\124\40\x44\111\123\x54\111\116\103\124\40\145\56\x50\x41\x54\137\x49\x44\x2c\40\x65\56\120\x41\x54\x5f\103\110\x41\122\124\x4e\117\54\x20" . "\145\x2e\x50\x41\x54\137\x4c\101\123\x54\116\x41\115\105\54\x20\x65\56\x50\x41\x54\x5f\106\x49\x52\123\x54\116\x41\x4d\x45\40\54\x20" . "\x65\56\x50\101\124\x5f\x4d\111\x44\x44\114\x45\116\101\115\x45\54\145\56\120\x41\124\137\102\x49\x52\x54\x48\104\101\x54\105\x2c\40\145\56\x50\101\x54\137\x47\x45\116\x44\x45\122\x20" . "\106\x52\x4f\x4d\40\105\62\x5f\x50\x41\x54\40\145\x2c\40\105\x32\x5f\111\115\x47\x20\151\40" . "\x57\110\x45\122\x45\x20\x65\x2e\120\101\124\x5f\111\104\40\75\40\x69\56\120\101\124\x5f\x49\104\x20" . "\x41\x4e\104\x20\50\x69\56\111\x4d\x47\x5f\x4d\x4f\x44\x41\114\x49\124\x59\40\x3d\40\47" . modality_api_str_to_modality_db_str("\145\x44\x53\114\122") . "\x27\x20" . "\117\x52\x20\151\x2e\x49\115\x47\x5f\115\117\104\x41\114\x49\x54\131\40\75\40\x27" . modality_api_str_to_modality_db_str("\x65\x49\117\130\122\141\x79") . "\x27\x20" . "\117\122\x20\x69\56\111\115\x47\x5f\115\117\x44\x41\x4c\111\124\131\x20\x3d\40\47" . modality_api_str_to_modality_db_str("\145\x54\150\x72\x65\x65\104\120\150\x6f\x74\x6f") . "\x27\40" . "\117\x52\x20\x69\x2e\111\115\107\137\x4d\117\x44\x41\x4c\111\x54\x59\40\x3d\x20\x27" . modality_api_str_to_modality_db_str("\x65\111\x6d\160\162\x65\163\163\x69\x6f\x6e") . "\47\40" . "\117\122\x20\151\x2e\111\x4d\107\x5f\115\117\104\x41\114\x49\x54\131\x20\75\40\47" . modality_api_str_to_modality_db_str("\x65\x49\117\123\143\141\156\156\145\162") . "\47\x20" . "\117\x52\x20\151\x2e\x49\115\x47\137\115\117\x44\x41\114\x49\124\131\x20\75\40\x27" . modality_api_str_to_modality_db_str("\x65\x43\x61\160\164\x75\162\x65") . "\47\x20" . "\x4f\122\40\151\x2e\x49\x4d\107\137\x4d\117\x44\101\x4c\x49\124\131\40\x3d\x20\x27" . modality_api_str_to_modality_db_str("\145\x4f\x74\150\x65\162") . "\x27\x20" . "\117\122\40\151\56\x49\115\x47\x5f\115\117\104\101\x4c\x49\124\x59\x20\x3d\40\47" . modality_api_str_to_modality_db_str("\x65\x46\151\x6c\145") . "\47\x20" . "\117\x52\x20\x69\x2e\x49\x4d\107\x5f\x4d\117\104\101\114\x49\124\131\40\x3d\40\47" . modality_api_str_to_modality_db_str("\145\x54\150\162\145\145\x44\x4f\x62\152\x65\143\x74") . "\47\x20" . "\117\122\x20\151\56\x49\x4d\x47\137\x4d\x4f\x44\101\114\111\x54\131\40\x3d\40\x27" . modality_api_str_to_modality_db_str("\145\104\157\156\x74\x43\x61\x72\145") . "\47\x29\40" . "\101\x4e\104\x20\50\151\x2e\111\115\x47\x5f\x41\x43\x51\125\111\123\111\x54\111\117\x4e\137\x44\x41\x54\105\124\111\115\x45\x20" . "\x42\x45\x54\127\105\x45\116\x20\47" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\164\101\143\x71\x75\x69\163\x69\164\x69\x6f\x6e\x54\151\155\145"]) . "\47\40" . "\101\x4e\104\x20\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\164\124\157\101\143\161\124\151\155\145"]) . "\x27\x29\51"; } else { $sql = $sql . "\x28\123\x45\x4c\105\x43\124\40\104\x49\x53\x54\x49\x4e\x43\x54\40\145\56\120\x41\124\x5f\111\104\x2c\x20\x65\x2e\x50\x41\124\x5f\103\110\x41\x52\x54\116\117\54\x20" . "\x65\x2e\x50\x41\x54\x5f\114\x41\123\124\x4e\x41\x4d\105\54\x20\145\x2e\x50\x41\124\137\106\111\x52\x53\124\116\101\115\105\40\x2c\x20" . "\145\x2e\x50\x41\x54\137\115\x49\104\x44\x4c\105\116\101\115\105\54\145\56\120\x41\x54\x5f\102\111\x52\124\110\104\101\124\x45\x2c\x20\145\56\120\101\124\x5f\x47\105\116\x44\x45\122\x20" . "\x46\x52\x4f\115\x20\x45\62\137\x50\x41\x54\x20\145\54\x20\105\x32\137\111\x4d\x47\40\x69\40" . "\x57\x48\105\122\105\x20\145\56\120\x41\x54\x5f\111\104\x20\x3d\x20\x69\x2e\x50\x41\124\x5f\111\x44\40" . "\x41\x4e\104\x20\151\56\111\x4d\107\137\115\x4f\104\101\114\x49\x54\131\x20\x3d\x20\x27" . modality_api_str_to_modality_db_str($searchCondition["\145\x4d\x6f\144\141\154\151\164\x79"]) . "\47\x20" . "\x41\x4e\x44\x20\50\151\56\x49\115\107\137\x41\103\121\125\x49\x53\111\x54\111\117\x4e\x5f\x44\101\x54\x45\124\x49\x4d\105\x20" . "\102\105\x54\x57\105\105\116\x20\x27" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\x64\164\x41\x63\161\165\x69\163\151\x74\x69\157\x6e\124\x69\155\x65"]) . "\x27\40" . "\x41\x4e\x44\40\47" . currentDateFormat(DATEFORMAT_SEARCH_DB, $searchCondition["\144\x74\x54\x6f\x41\x63\x71\124\x69\x6d\145"]) . "\47\51\51"; } } } } $sql = $sql . "\x20\x61\163\40\120\101\124\x20\x4c\x45\x46\124\40\x4f\x55\124\105\122\x20\x4a\x4f\111\x4e\x20" . "\x28\x53\x45\114\105\x43\124\x20\x50\101\124\137\x49\x44\54\40\115\x41\130\50\x49\x4d\x47\137\101\x43\x51\125\x49\123\x49\x54\111\117\x4e\137\x44\x41\124\x45\x54\111\x4d\x45\51\40" . "\141\x73\40\111\x4d\107\137\x41\x43\x51\125\x49\123\x49\124\x49\117\x4e\x5f\104\101\x54\x45\x54\x49\x4d\x45\40\x20" . "\106\122\117\115\40\x45\62\137\x49\x4d\107\40\107\x52\x4f\125\x50\40\x42\131\40\120\101\124\x5f\x49\x44\x20\x29\101\x53\x20\111\115\x47\40\40\117\116\x20\120\101\124\x2e\x50\101\124\x5f\111\x44\40\75\x20\x49\115\x47\56\x50\x41\x54\x5f\x49\x44\x20\x20" . "\x4f\x52\x44\x45\x52\x20\x42\x59\x20\111\x4d\x47\137\101\x43\121\125\x49\123\111\x54\x49\x4f\x4e\x5f\x44\101\x54\105\124\111\115\x45\40\x44\x45\123\103\x20" . "\114\x49\115\x49\x54\x20\x3f\x20\x4f\x46\x46\x53\105\124\x20\x3f"; $query = $this->db->query($sql, array($numItems, get_offset($numItems, $pageNum)))->result_array(); } if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } if ($pairDoctorType["\x73\x65\x63\x6f\156\x64"] == "\x65\x44\157\143\164\157\x72\x41\143\143\x6f\x75\x6e\x74\101\x6c\x6c") { $patients = $query; } elseif ($pairDoctorType["\163\145\143\157\156\x64"] == "\145\x44\x6f\x63\164\157\162\x41\x63\143\x6f\165\x6e\x74\x4e\157\x6e\x65") { $sql = "\x53\x45\114\105\103\x54\40\160\141\164\137\x69\x64\40\106\x52\117\x4d\x20\x65\62\x5f\x61\164\164\145\156\144\x69\156\147\137\x64\157\x63"; $strlPatientID = $this->db->query($sql)->result_array(); if (count($strlPatientID) == 0) { return VERR_DB_NOSUCHDATA; } $strlPatientChartNo = array(); foreach ($strlPatientID as $row) { $sql = "\x53\105\x4c\x45\x43\124\x20\x70\141\x74\137\143\x68\141\x72\x74\156\x6f\x20\106\122\117\x4d\40\145\62\137\160\141\164\x20\127\110\105\122\105\x20\x70\x61\164\x5f\x69\x64\40\x3d\x20\77"; $strPatientChartNo = $this->db->query($sql, array($row["\160\141\x74\x5f\151\x64"]))->result_array(); if (count($strPatientChartNo) > 0) { array_push($strlPatientChartNo, $strPatientChartNo[0]["\x70\141\164\x5f\x63\x68\x61\162\164\156\157"]); } } $patients = array(); foreach ($query as $sSearchPatient) { if (!in_array($sSearchPatient["\160\141\164\137\143\x68\141\162\164\156\x6f"], $strlPatientChartNo)) { array_push($patients, $sSearchPatient); } } } else { $sql = "\x53\105\114\105\103\x54\40\x41\124\124\137\104\x4f\103\x2e\x44\117\103\x5f\111\x44\x2c\101\x54\124\x5f\x44\117\103\56\x50\x41\124\137\111\x44\54\105\62\137\104\117\103\56\104\x4f\x43\137\116\x41\115\x45\x2c\105\62\137\x50\101\124\x2e\120\101\x54\137\103\x48\x41\122\x54\x4e\x4f\x20\106\x52\x4f\115\40\105\62\137\x41\x54\124\105\x4e\104\111\x4e\x47\137\104\117\103\x20\x41\124\x54\x5f\x44\117\103\54\40\105\62\x5f\x44\x4f\x43\x2c\x20\105\62\x5f\x50\101\124" . "\x20\127\110\105\122\105\x20\x41\x54\x54\137\104\117\x43\x2e\104\117\x43\137\x49\104\x20\x3d\x20\x45\x32\137\x44\x4f\x43\x2e\x44\x4f\103\137\x49\x44\x20\x41\x4e\x44\x20\101\124\124\x5f\x44\117\x43\x2e\120\x41\x54\x5f\111\x44\40\x3d\x20\105\62\137\120\101\124\x2e\x50\101\x54\x5f\x49\x44" . "\40\101\116\x44\40\105\x32\137\x44\x4f\103\x2e\x44\117\103\x5f\x4e\x41\x4d\x45\x20\x3d\x20\x3f\x20\117\122\104\x45\x52\40\102\x59\40\105\62\137\x50\101\124\56\120\101\x54\x5f\103\110\x41\x52\x54\x4e\x4f\54\40\x41\x54\124\137\104\x4f\103\56\101\124\x54\137\111\104"; $strlPatientList = $this->db->query($sql, array($pairDoctorType["\x66\x69\162\x73\x74"]))->result_array(); $patients = array(); foreach ($query as $sSearchPatient) { foreach ($strlPatientList as $strPatient) { if ($sSearchPatient["\160\x61\164\137\143\x68\141\x72\164\156\157"] == $strPatient["\x70\x61\164\x5f\x63\x68\141\162\x74\156\x6f"]) { array_push($patients, $sSearchPatient); } } } } return $patients; } public function post_PatientsForConditionP2($parameters) { $pageNum = $parameters["\x70\141\147\x65\x4e\x75\x6d"]; $numItems = $parameters["\156\x75\x6d\x49\164\x65\155\x73"]; $doctors = $parameters["\x64\157\x63\164\157\162\163"]; $search = $parameters["\x73\x65\x61\162\143\x68"]; if (!isset($doctors)) { vt_loge(__METHOD__ . "\x3a" . "\x64\157\143\x74\157\x72\163\40\x69\163\x20\156\x6f\x74\40\163\x65\164\40\x6f\162\40\x65\155\160\x74\171\x2e"); return createResponse(VERR_COMMON_INVALID); } if (!isset($search)) { vt_loge(__METHOD__ . "\x3a" . "\x73\145\141\162\143\150\x20\151\163\x20\x6e\x6f\164\x20\163\x65\x74\40\157\x72\40\145\155\x70\164\x79\x2e"); return createResponse(VERR_COMMON_INVALID); } $doctorSelect = $doctors["\163\145\x6c\x65\x63\164"]; $doctorName = $doctors["\141\143\143\x6f\x75\x6e\164\116\141\155\145"]; if ($doctorSelect == "\x65\104\x6f\x63\164\x6f\162\x41\143\143\x6f\x75\x6e\x74\x4e\141\155\x65" && empty($doctorName)) { vt_loge(__METHOD__ . "\x3a" . "\x61\143\143\x6f\165\x6e\164\116\x61\155\145\x20\151\x73\x20\x6e\x6f\164\40\163\x65\x74\40\x6f\162\x20\x65\155\x70\164\x79\x2e"); return createResponse(VERR_COMMON_INVALID); } $searchMethod = $search["\155\x65\x74\150\x6f\x64"]; $rsCreateTimeFrom = $search["\x72\x65\x63\157\162\x64\x73\145\164\103\162\x65\141\164\145\x64\124\x69\x6d\x65\106\162\x6f\155"]; $rsCreateTimeTo = $search["\162\145\x63\x6f\x72\x64\163\x65\164\x43\x72\145\x61\x74\x65\144\124\151\155\145\x54\x6f"]; $searchKeyword = $search["\x6b\145\x79\167\x6f\x72\144"]; if ($searchMethod == "\145\x42\x79\x52\145\143\x6f\162\x64\163\145\164\x43\x72\x65\141\164\x65\x64\124\151\155\145" && (empty($rsCreateTimeFrom) || empty($rsCreateTimeTo))) { vt_loge(__METHOD__ . "\72" . "\x72\145\143\157\x72\144\163\x65\x74\103\x72\145\x61\164\145\144\x54\x69\155\x65\40\151\x73\x20\x6e\157\x74\40\163\x65\164\x20\157\x72\x20\x65\155\160\x74\x79\x2e"); return createResponse(VERR_COMMON_INVALID); } if ($searchMethod == "\145\x42\171\x4b\x65\x79\x77\x6f\x72\144" && empty($searchKeyword)) { vt_loge(__METHOD__ . "\72" . "\153\145\171\x77\x6f\x72\x64\40\151\163\40\x6e\157\x74\40\163\145\x74\x20\x6f\162\40\145\x6d\x70\164\171\x2e"); return createResponse(VERR_COMMON_INVALID); } $pageNum = !isset($pageNum) ? PAGE_NUM : $pageNum; $numItems = !isset($numItems) ? NUM_ITEMS : $numItems; $param = array(); $sql = "\163\145\x6c\x65\143\x74\40\144\x69\163\x74\x69\x6e\x63\164\40\145\62\137\160\141\x74\x2e\x2a\40\146\x72\157\x6d\x20\145\x32\137\x70\x61\x74\x20"; if ($searchMethod == "\x65\102\x79\122\145\143\157\162\144\163\x65\164\x43\x72\x65\141\x74\x65\x64\x54\x69\155\145") { $sql = $sql . "\40\152\157\151\156\x20\x65\x32\x5f\x6f\x72\164\150\157\137\x72\x65\x63\157\162\x64\163\145\x74\163\40\157\x6e\x20\145\x32\x5f\160\x61\164\x2e\160\141\x74\137\151\x64\x3d\x65\x32\137\x6f\162\x74\x68\x6f\x5f\x72\x65\143\157\x72\x64\x73\145\x74\163\x2e\x70\141\x74\137\x69\x64"; $sql = $sql . "\40\167\x68\x65\162\x65\40\x65\62\x5f\157\x72\x74\150\x6f\x5f\x72\145\x63\157\162\x64\x73\145\x74\163\56\x6f\x74\x68\x5f\x72\x65\x63\x6f\x72\x64\163\x65\164\137\143\162\145\141\x74\145\144\137\x64\141\x74\x65\x20\x3e\75\x3f"; $sql = $sql . "\x20\x61\x6e\x64\40\145\62\137\x6f\x72\x74\x68\x6f\137\162\x65\x63\x6f\x72\x64\x73\x65\x74\163\56\157\x74\150\137\162\x65\143\157\x72\x64\x73\x65\164\137\x63\162\x65\x61\x74\145\x64\137\144\x61\164\x65\x20\x3c\75\77"; array_push($param, currentDateFormat(DATEFORMAT_DATABASE, $rsCreateTimeFrom)); array_push($param, currentDateFormat(DATEFORMAT_DATABASE, $rsCreateTimeTo)); } else { if ($searchKeyword != "\40") { $sql = $sql . "\x20\x77\150\145\162\x65\40\x28\160\141\x74\x5f\143\x68\141\162\164\156\x6f\40\x69\154\151\153\145\x20\x3f\x20\157\x72\40" . "\x70\x61\164\x5f\154\x61\x73\x74\x6e\x61\x6d\145\x20\151\154\151\153\145\40\77\x20\157\x72\40" . "\x70\141\x74\137\x66\151\x72\x73\164\x6e\x61\155\x65\x20\151\x6c\151\x6b\x65\40\x3f\40\157\162\x20" . "\x70\141\164\137\x6d\151\144\x64\x6c\145\156\x61\155\x65\x20\151\x6c\x69\153\x65\x20\77\40\157\x72\x20" . "\160\141\x74\137\x63\150\x6f\163\165\156\147\40\x69\154\151\153\x65\x20\x3f\x20\157\x72\x20" . "\160\x61\x74\x5f\154\141\163\164\156\x61\155\145\174\x7c\x27\x20\47\x7c\x7c\160\141\164\x5f\146\x69\x72\x73\x74\156\141\155\145\x20\x69\154\x69\153\145\x20\x3f\40\x6f\162\x20" . "\x70\x61\x74\x5f\146\x69\x72\163\x74\156\x61\155\145\x7c\174\x27\40\x27\x7c\174\160\141\x74\137\x6c\x61\163\164\156\x61\x6d\x65\x20\151\154\151\x6b\145\x20\x3f\x20\x6f\162\x20" . "\x70\141\x74\137\154\141\163\164\x6e\x61\x6d\x65\174\174\160\141\x74\137\x66\151\x72\163\164\x6e\141\155\145\x20\151\x6c\151\x6b\145\40\77\x20\x6f\162\40" . "\x70\x61\x74\x5f\x66\x69\162\x73\x74\x6e\141\155\x65\174\x7c\160\x61\164\x5f\x6c\x61\163\164\x6e\141\155\145\40\151\x6c\151\153\145\40\77\51\x20"; array_push($param, "\45" . $searchKeyword . "\x25"); array_push($param, "\45" . $searchKeyword . "\x25"); array_push($param, "\45" . $searchKeyword . "\x25"); array_push($param, "\45" . $searchKeyword . "\45"); array_push($param, "\45" . $searchKeyword . "\45"); array_push($param, "\45" . $searchKeyword . "\45"); array_push($param, "\x25" . $searchKeyword . "\x25"); array_push($param, "\45" . $searchKeyword . "\x25"); array_push($param, "\x25" . $searchKeyword . "\45"); } } if ($doctorSelect != "\x65\104\157\143\164\x6f\x72\x41\143\143\x6f\165\x6e\164\x41\154\x6c") { if ($searchMethod == "\145\102\x79\122\x65\x63\x6f\x72\144\163\145\x74\103\x72\x65\x61\x74\x65\x64\124\x69\x6d\145" || $searchKeyword != "\40") { $sql = $sql . "\40\141\156\144\40"; } else { $sql = $sql . "\x20\x77\x68\x65\x72\145\40"; } $doctorSubquery = "\x73\x65\x6c\x65\143\x74\x20\160\141\x74\137\x69\x64\x20\x66\162\x6f\x6d\x20\145\x32\137\x61\164\164\x65\156\x64\151\x6e\147\137\x64\x6f\143"; if ($doctorSelect == "\x65\104\157\143\164\157\162\x41\x63\x63\x6f\165\156\164\116\141\x6d\x65") { $doctorSubquery = $doctorSubquery . "\40\x6a\x6f\151\156\40\x65\62\137\144\157\143\x20\157\x6e\40\145\x32\137\141\x74\x74\145\156\x64\151\x6e\147\137\x64\157\143\56\x64\x6f\x63\x5f\151\x64\75\x65\x32\x5f\144\157\x63\x2e\x64\157\143\x5f\151\144" . "\x20\167\x68\145\x72\x65\x20\145\x32\x5f\x64\x6f\143\x2e\x64\157\143\137\x6e\141\x6d\145\40\x69\x6c\151\153\145\40\77\x20"; array_push($param, "\45" . $doctorName . "\x25"); } if ($doctorSelect == "\x65\104\x6f\x63\164\157\x72\101\x63\x63\x6f\165\156\x74\116\157\x6e\145") { $sql = $sql . "\40\x65\x32\x5f\160\x61\164\56\x70\x61\x74\x5f\x69\144\x20\156\157\x74\40\151\x6e\40\50" . $doctorSubquery . "\51\x20"; } else { $sql = $sql . "\40\145\x32\137\x70\141\164\56\x70\x61\x74\x5f\x69\x64\40\x20\x69\x6e\40\50" . $doctorSubquery . "\51\x20"; } } $sql = $sql . "\40\x6c\151\155\151\164\x20\77\40\157\146\146\163\x65\x74\x20\77"; array_push($param, $numItems); array_push($param, get_offset($numItems, $pageNum)); $result = $this->db->query($sql, $param)->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $patInfo = new SSearchedPatient($row); array_push($items, $patInfo); } return ["\145\162\x72\157\x72\103\x6f\144\x65" => VERR_COMMON_SUCCESS, "\x73\145\141\x72\x63\150\145\144\x50\x61\164\x69\x65\156\164\114\151\x73\x74" => $items, "\156\x43\156\x74" => count($result)]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_PatientsForNameOpOr($parameters) { $result = array(); $sql = "\123\x45\114\105\103\x54\x20\120\101\124\x5f\x43\110\101\x52\x54\x4e\x4f" . "\54\x20\x50\x41\x54\137\x4c\x41\123\124\x4e\x41\x4d\x45" . "\54\40\x50\x41\x54\137\x46\111\x52\123\x54\x4e\101\115\x45" . "\x2c\x20\x50\101\124\x5f\x4d\111\104\x44\114\x45\x4e\x41\115\105" . "\54\x20\x50\101\x54\x5f\107\x45\x4e\104\x45\122" . "\54\x20\120\x41\x54\x5f\x42\x49\122\x54\x48\104\x41\124\x45" . "\54\40\120\101\x54\x5f\105\x4d\101\111\114" . "\54\40\120\101\124\137\123\117\x43\111\101\x4c\x49\104" . "\54\40\120\x41\x54\137\120\x48\x4f\x4e\105" . "\x2c\x20\120\101\x54\137\115\117\x42\111\114\x45" . "\54\40\120\101\124\x5f\x5a\111\120\103\117\x44\105" . "\54\40\x50\101\124\x5f\x41\104\104\x52\105\x53\123" . "\54\x20\x50\x41\124\x5f\122\x45\x47\x49\123\124\x45\122\105\104\x5f\104\x41\124\x45\x54\111\115\105" . "\54\40\120\x41\x54\137\120\110\117\124\117\x5f\106\x49\x4c\x45\x4e\x41\x4d\x45" . "\x2c\x20\x50\x41\x54\137\116\117\x54\x45\x20\106\122\x4f\115\x20\105\62\x5f\x50\101\x54\40"; if ($parameters["\142\x49\x73\x45\x78\x61\143\x74\x6c\x79"] == TRUE) { $sql = $sql . "\x57\110\105\x52\x45\40\120\101\124\137\x4c\x41\123\x54\x4e\x41\x4d\105\40\75\x20\x3f\40\117\122\40\x50\101\124\x5f\106\111\x52\x53\124\x4e\x41\x4d\x45\40\75\x20\77\x20\117\122\40\120\101\x54\x5f\x4d\111\x44\x44\x4c\105\x4e\101\115\x45\x20\75\40\x3f"; $result = $this->db->query($sql, array($parameters["\x73\164\x72\x4c\x61\163\164\x4e\141\155\x65"], $parameters["\x73\164\162\106\151\162\163\164\x4e\x61\155\x65"], $parameters["\163\x74\x72\115\151\x64\144\154\145\116\x61\x6d\145"]))->result_array(); } else { $sql = "\x53\105\x4c\x45\x43\x54\40\120\101\x54\x5f\x43\110\101\x52\x54\x4e\x4f\12\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\x20\40\x20\x20\40\x2c\40\x50\101\124\137\114\101\123\x54\116\x41\x4d\x45\xa\40\40\40\x20\x20\40\x20\x20\x20\x20\x20\40\x20\40\40\x20\x2c\x20\x50\101\x54\137\x46\x49\x52\x53\x54\116\101\x4d\105\12\40\40\x20\x20\x20\40\x20\40\40\x20\x20\x20\x20\40\40\40\x2c\x20\120\101\124\x5f\x4d\x49\104\104\114\105\x4e\x41\x4d\105\xa\40\x20\40\x20\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\54\40\x50\x41\124\137\107\105\x4e\x44\105\x52\12\40\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\40\x20\x20\x20\54\x20\x50\x41\124\137\x42\x49\x52\124\110\x44\x41\124\x45\xa\x20\40\x20\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\x2c\40\120\x41\x54\137\105\x4d\101\x49\x4c\xa\40\40\x20\40\40\x20\x20\x20\40\40\40\x20\40\40\x20\40\x2c\x20\x50\x41\x54\137\123\x4f\103\111\x41\x4c\x49\x44\12\x20\40\40\40\x20\40\x20\40\40\40\40\40\x20\40\x20\x20\x2c\x20\120\x41\x54\x5f\x50\x48\x4f\x4e\x45\xa\x20\40\x20\x20\x20\x20\40\40\x20\40\40\40\40\x20\40\x20\54\x20\120\x41\124\137\x4d\117\102\x49\x4c\105\12\40\40\40\40\x20\x20\40\40\40\x20\40\40\x20\x20\x20\40\54\40\x50\x41\x54\x5f\x5a\111\120\x43\117\104\105\12\40\x20\40\x20\40\40\x20\x20\40\40\x20\x20\40\40\x20\40\54\40\x50\x41\x54\137\x41\104\104\x52\105\123\123\xa\x20\40\x20\40\40\40\40\40\40\x20\x20\x20\x20\40\x20\40\54\40\120\101\124\x5f\122\105\x47\111\123\x54\x45\122\105\104\137\104\x41\124\105\x54\x49\x4d\x45\xa\x20\40\40\40\40\x20\40\40\x20\x20\x20\x20\40\40\x20\40\x2c\40\x50\x41\124\137\x50\110\117\x54\117\x5f\x46\111\x4c\105\116\x41\x4d\x45\xa\x20\40\x20\40\x20\40\40\x20\x20\40\x20\40\40\40\40\40\x2c\x20\x50\x41\124\137\116\117\124\105\40\106\122\117\x4d\x20\105\x32\x5f\120\101\x54\12\x20\x20\x20\40\40\40\x20\40\x20\x20\40\x20\x20\40\x20\40\127\110\x45\122\105\40\x50\x41\x54\137\114\x41\x53\124\x4e\101\x4d\x45\40\111\x4c\x49\113\105\x20\105\x3f" . "\117\122\x20\x50\x41\124\x5f\x46\x49\122\123\124\116\101\115\x45\40\111\114\x49\113\x45\40\x45\x3f" . "\117\122\40\120\x41\x54\x5f\x4d\x49\x44\x44\x4c\x45\x4e\101\115\105\40\111\114\x49\113\x45\x20\x45\77"; $result = $this->db->query($sql, array("\45" . $parameters["\x73\x74\x72\x4c\x61\x73\164\x4e\141\155\145"] . "\x25", "\x25" . $parameters["\x73\164\x72\x46\x69\162\x73\164\116\x61\155\145"] . "\x25", "\x25" . $parameters["\163\x74\162\115\151\144\144\154\x65\116\x61\155\x65"] . "\x25"))->result_array(); } $socialIDProtector = new SocialIDProtector(); for ($i = 0; $i < count($result); $i++) { if ($socialIDProtector->is_encrypted($result[$i]["\x70\x61\x74\x5f\x73\x6f\143\151\141\x6c\x69\144"])) { $result[$i]["\x70\x61\164\x5f\x73\157\143\151\x61\154\x69\x64"] = $socialIDProtector->decrypt_data($result[$i]["\160\x61\x74\x5f\x73\x6f\143\x69\x61\154\151\144"])["\x64\x65\143\x72\171\x70\164\145\144\x44\x61\164\x61"]; } } return $result; } public function post_PatientsForNameOpAnd($parameters) { $sql = "\123\105\x4c\105\103\x54\x20\x50\101\x54\137\x43\110\101\122\x54\116\117" . "\x2c\x20\120\x41\124\137\x4c\x41\x53\x54\116\x41\115\105" . "\54\40\120\101\x54\x5f\106\111\x52\123\124\116\101\115\105" . "\54\120\x41\x54\x5f\x4d\x49\104\104\x4c\105\x4e\101\115\x45" . "\54\120\101\x54\x5f\x47\105\x4e\104\105\x52" . "\54\40\x50\101\124\x5f\x42\111\122\x54\x48\x44\x41\x54\105" . "\x2c\40\120\x41\x54\137\105\115\x41\111\x4c" . "\x2c\x20\120\101\x54\137\x53\x4f\x43\x49\101\114\111\x44" . "\x2c\40\120\101\124\137\x50\110\x4f\x4e\x45\54\40\120\101\x54\x5f\115\x4f\102\111\x4c\105" . "\54\40\120\x41\x54\x5f\132\111\120\103\117\x44\x45" . "\54\40\120\101\124\137\x41\104\104\122\105\123\x53" . "\x2c\x20\x50\x41\124\x5f\x52\105\107\111\x53\124\x45\122\x45\104\x5f\x44\x41\x54\105\x54\111\x4d\x45" . "\54\40\x50\x41\x54\137\120\110\x4f\x54\x4f\137\106\111\114\105\x4e\x41\x4d\105" . "\54\40\120\x41\124\137\x4e\117\x54\105\x20\106\122\117\115\40\x45\x32\x5f\x50\101\x54\40"; if ($parameters["\142\111\163\105\x78\x61\143\x74\154\171"] == TRUE) { $sql = $sql . "\x57\x48\105\122\x45\40\x50\101\124\x5f\x4c\101\x53\x54\x4e\x41\x4d\105\x20\x3d\x20\x3f\40\101\116\x44\40\120\x41\x54\137\106\x49\122\x53\x54\x4e\x41\x4d\x45\x20\x3d\40\77\x20\101\x4e\x44\x20\x50\101\x54\x5f\115\x49\x44\104\114\x45\x4e\101\115\x45\x20\75\x20\77"; $result = $this->db->query($sql, array($parameters["\163\164\162\x4c\141\x73\x74\x4e\141\155\145"], $parameters["\163\164\162\x46\151\x72\x73\x74\116\141\x6d\x65"], $parameters["\x73\164\x72\x4d\x69\x64\x64\154\145\x4e\141\x6d\145"]))->result_array(); } else { $sql = "\123\x45\x4c\x45\x43\x54\x20\120\101\124\137\x43\x48\101\x52\124\x4e\x4f\12\40\40\x20\40\40\40\40\40\x20\40\40\x20\x20\40\40\x20\x2c\x20\120\101\124\137\x4c\101\x53\124\x4e\x41\x4d\x45\12\x20\40\x20\x20\x20\x20\40\40\x20\40\40\40\40\40\40\40\54\40\x50\101\x54\137\x46\x49\122\x53\124\116\101\x4d\105\12\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\40\x20\40\40\x20\x2c\120\x41\124\x5f\115\111\x44\x44\114\x45\116\101\x4d\105\xa\40\x20\x20\40\40\40\40\x20\40\40\x20\x20\x20\40\40\40\x2c\120\101\124\x5f\x47\x45\x4e\104\x45\122\12\40\x20\40\40\x20\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\54\40\120\x41\124\137\x42\111\122\x54\x48\x44\x41\124\x45\xa\40\40\x20\40\40\40\40\x20\40\x20\40\40\x20\40\x20\40\54\40\120\x41\124\x5f\x45\x4d\x41\111\114\xa\x20\40\x20\x20\40\40\40\40\x20\x20\40\x20\x20\x20\x20\x20\54\x20\x50\101\x54\x5f\x53\117\103\111\x41\114\x49\104\xa\x20\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\40\x20\x20\40\54\x20\x50\101\x54\x5f\x50\x48\117\116\105\xa\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\40\40\40\x20\x20\54\40\120\101\x54\137\x4d\x4f\102\111\114\105\xa\x20\40\x20\x20\40\x20\x20\40\x20\x20\40\40\40\40\x20\x20\x2c\x20\x50\x41\124\137\132\x49\120\x43\117\x44\105\xa\40\40\40\40\40\40\x20\40\40\40\40\40\x20\x20\x20\40\x2c\x20\x50\x41\x54\137\101\x44\104\122\105\x53\x53\12\x20\x20\40\x20\x20\40\x20\40\40\40\40\40\x20\40\x20\40\x2c\40\120\x41\124\137\122\x45\x47\x49\123\124\x45\122\105\x44\137\104\x41\124\x45\124\111\x4d\105\x2c\40\x50\x41\124\137\x50\x48\117\x54\117\137\106\111\x4c\105\116\101\x4d\x45\54\40\120\101\124\x5f\116\117\x54\105\40\x46\122\x4f\115\40\x45\x32\137\120\101\124\xa\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\40\x20\x20\40\127\110\x45\122\105\40\120\x41\124\x5f\x4c\101\123\124\x4e\101\115\x45\x20\x49\114\111\113\105\x20\105\77" . "\x41\116\x44\40\x50\101\124\137\x46\x49\x52\x53\124\x4e\x41\115\105\40\x49\x4c\111\113\x45\40\x45\77" . "\101\x4e\104\x20\120\x41\x54\x5f\115\x49\x44\104\114\x45\x4e\x41\x4d\105\40\x49\x4c\x49\x4b\x45\40\105\x3f"; $result = $this->db->query($sql, array("\45" . $parameters["\x73\x74\162\x4c\141\x73\164\x4e\x61\155\x65"] . "\x25", "\45" . $parameters["\x73\x74\162\x46\x69\x72\x73\164\x4e\x61\x6d\x65"] . "\x25", "\45" . $parameters["\163\164\x72\115\x69\144\144\x6c\145\x4e\141\155\x65"] . "\45"))->result_array(); } $socialIDProtector = new SocialIDProtector(); for ($i = 0; $i < count($result); $i++) { if ($socialIDProtector->is_encrypted($result[$i]["\160\x61\164\137\x73\x6f\143\151\141\x6c\x69\144"])) { $result[$i]["\160\x61\x74\x5f\163\x6f\143\151\x61\154\x69\x64"] = $socialIDProtector->decrypt_data($result[$i]["\x70\141\x74\137\163\x6f\143\x69\x61\154\151\144"])["\x64\x65\x63\162\171\160\164\x65\144\104\x61\164\x61"]; } } return $result; } public function post_PatientsForChartNoList($strChartNoList) { $sql = "\123\105\x4c\105\x43\124\x20\120\101\124\137\x49\104\x2c\x20\120\x41\124\x5f\103\110\101\122\x54\116\x4f\54\40\120\101\124\x5f\x4c\x41\x53\124\x4e\x41\115\105\54\40\x50\x41\124\x5f\x46\111\122\123\124\116\x41\115\x45\54\40\x50\101\124\137\x4d\111\104\104\114\x45\x4e\101\115\105\54\40\x50\x41\x54\x5f\102\x49\x52\124\110\x44\x41\124\x45\x20\x46\122\x4f\x4d\40\x45\62\137\120\101\x54"; if (!empty($strChartNoList)) { $sql .= "\40\127\x48\105\x52\x45\40\x50\x41\124\x5f\103\x48\101\122\x54\x4e\117\x20\111\116\x3f"; } return $this->db->query($sql, array($strChartNoList))->result_array(); } public function post_PatientsForChartNoListP2($parameters) { $this->db->select("\x65\62\137\x70\x61\x74\x2e\52\x2c\145\62\x5f\x6f\162\164\150\157\137\162\141\x63\x65\56\157\164\x68\x5f\162\141\x63\145\137\x6e\141\155\145\x2c\x65\x32\137\157\162\x74\150\x6f\x5f\x63\154\141\x73\163\x69\x66\151\x63\141\164\151\157\x6e\x2e\x6f\164\x68\x5f\x63\x6c\x61\x73\x73\x5f\x6e\141\x6d\x65"); $this->db->from("\x65\x32\137\x70\x61\164"); $this->db->join("\x65\62\x5f\x6f\x72\164\150\x6f\137\x72\141\x63\145", "\145\62\137\x70\x61\164\x2e\157\164\150\137\162\x61\143\x65\x5f\151\x64\40\75\x20\x65\x32\137\157\x72\x74\x68\157\137\x72\x61\x63\x65\56\157\164\x68\x5f\x72\141\x63\145\137\x69\x64", "\x6c\145\146\164"); $this->db->join("\x65\x32\x5f\x6f\x72\164\x68\x6f\x5f\x63\154\x61\x73\x73\x69\x66\151\143\141\x74\x69\x6f\x6e", "\145\62\x5f\160\x61\164\x2e\157\164\x68\x5f\x63\x6c\x61\163\163\137\x69\x64\x20\75\x20\145\x32\x5f\157\162\x74\x68\x6f\x5f\x63\x6c\x61\163\x73\151\x66\151\143\141\164\x69\157\156\x2e\157\x74\150\137\143\x6c\141\163\x73\x5f\151\x64", "\x6c\145\x66\164"); $this->db->where_in("\145\x32\x5f\x70\x61\164\56\160\141\164\137\143\x68\x61\162\x74\156\x6f", $parameters); $ret = $this->db->get()->result_array(); if (count($ret) > 0) { $items = array(); foreach ($ret as $row) { $sPatientInfo = SPatientInfo::createFromDBRecord($row); array_push($items, $sPatientInfo); } return ["\145\x72\162\157\162\103\157\144\145" => VERR_COMMON_SUCCESS, "\163\x65\141\x72\x63\150\145\144\x50\141\x74\151\x65\156\x74\114\x69\x73\164" => $items, "\x6e\103\x6e\x74" => count($ret)]; } else { return ["\145\162\162\157\x72\x43\x6f\144\145" => VERR_DB_NOSUCHDATA]; } } public function post_PatientsByChartNoForImage($strChartNo) { $sql = "\12\x20\x20\40\x20\40\40\x20\40\40\40\40\x20\x53\105\x4c\105\103\x54\x20\111\x4d\107\x5f\x46\x49\114\105\116\x41\115\x45\x20\x46\x52\117\x4d\40\105\62\137\111\x4d\x47\x20\x57\x48\105\122\105\x20\x50\x41\x54\137\103\x48\101\122\124\x4e\117\x20\x3d\40\77"; $ret = $this->db->query($sql, array($strChartNo))->result_array(); if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } $sql = "\12\x20\40\40\40\40\x20\x20\40\x20\40\x20\x20\x53\x45\114\105\103\124\x20\x49\115\107\137\x49\104\xa\40\x20\x20\40\x20\x20\40\40\x20\x20\x20\x20\x46\122\x4f\x4d\x20\x45\x32\x5f\111\x4d\x47\12\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\x20\x57\x48\105\x52\105\x20\x50\101\124\137\x43\x48\101\122\124\x4e\x4f\40\x3d\x20\x3f\xa\40\40\40\40\40\x20\x20\x20\40\40\x20\x20\40\40\x20\x20\x41\116\104\x20\x28\x50\101\124\x5f\x49\x44\x20\111\123\40\116\125\x4c\x4c\40\117\122\40\120\x41\x54\137\x49\104\x20\41\75\xa\x20\40\40\40\x20\x20\40\x20\40\40\40\40\x20\40\x20\40\40\40\40\x20\50\x53\x45\x4c\105\103\x54\x20\x50\101\124\137\x49\x44\12\x20\40\x20\40\40\40\x20\40\40\x20\x20\x20\x20\40\x20\40\40\40\40\x20\x46\x52\117\115\x20\105\62\x5f\x50\x41\124\xa\x20\x20\40\x20\x20\x20\x20\x20\40\x20\40\x20\40\40\x20\40\40\x20\x20\x20\x57\x48\105\x52\105\40\x50\101\x54\137\x43\110\101\122\x54\116\x4f\x20\75\40\77\51\x29"; $ret = $this->db->query($sql, array($strChartNo, $strChartNo))->result_array(); if (count($ret) > 0) { $sql = "\12\x20\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\125\x50\x44\x41\124\x45\x20\105\62\137\x49\x4d\x47\xa\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\123\x45\x54\x20\x50\x41\x54\x5f\x49\104\x20\x3d\x20\x28\12\40\x20\x20\x20\40\40\x20\40\x20\40\40\x20\40\40\x20\x20\123\x45\114\105\103\124\40\x50\x41\124\x5f\x49\x44\xa\40\40\40\x20\40\x20\x20\40\40\40\40\40\x20\40\x20\x20\x46\x52\x4f\x4d\40\x45\62\x5f\120\x41\124\12\x20\40\x20\40\40\40\40\x20\x20\40\40\40\40\x20\x20\x20\x57\110\x45\122\105\40\120\101\x54\x5f\103\x48\101\x52\x54\x4e\x4f\40\x3d\40\x3f\x29\12\x20\40\x20\x20\40\40\40\x20\40\40\40\40\x57\110\105\x52\x45\40\x50\101\124\x5f\x43\110\x41\x52\x54\x4e\117\x20\75\40\77"; $ret = $this->db->query($sql, array($strChartNo, $strChartNo)); if ($ret > 0) { return VERR_DB_PATIDTOIMG; } } return VSUCCESS; } public function post_PatientsForAttendingDoctor($parametersOfPostPatientsForAttendingDoctor) { $sql = "\x53\x45\x4c\x45\x43\x54\40\104\x4f\103\x5f\x49\104\x20\x46\x52\117\115\x20\x45\62\x5f\104\117\x43\x20\127\110\105\122\105\x20\x44\x4f\103\137\x4e\101\x4d\105\40\75\x20\x3f"; $query = $this->db->query($sql, array($parametersOfPostPatientsForAttendingDoctor["\x73\x74\162\x44\157\143\x74\x6f\x72\116\141\155\145"]))->result_array(); if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } $strDoctorID = trim($query[0]["\x64\x6f\x63\137\x69\x64"]); foreach ($parametersOfPostPatientsForAttendingDoctor["\x73\164\x72\120\x61\164\x69\145\x6e\x74\114\151\163\x74"] as $strChartNo) { $sql = "\123\105\114\x45\x43\x54\40\103\117\125\116\124\x28\52\x29\x20\x46\x52\x4f\115\40\x45\x32\137\x41\x54\x54\x45\x4e\x44\111\x4e\107\137\x44\117\103\40\127\110\105\x52\105\x20\x50\x41\124\137\x49\104\40\75\x20\50\x53\105\114\105\103\124\40\120\101\x54\137\111\104\40\x46\122\117\x4d\x20\x45\62\137\x50\x41\x54\x20\x57\x48\x45\x52\x45\x20\x45\x32\137\x50\x41\124\56\x50\101\124\137\x43\x48\101\122\x54\116\x4f\40\x3d\40\77\x29"; $query = $this->db->query($sql, array($strChartNo))->result_array(); if (count($query) > 0) { $nDoctorCount = $query[0]["\143\x6f\165\x6e\x74"]; if ($nDoctorCount < MAX_ATTENDING_DOCTOR_COUNT) { $sql = "\x49\x4e\x53\105\x52\124\x20\x49\116\124\117\x20\x45\62\137\101\124\124\105\x4e\104\111\x4e\x47\x5f\104\117\x43\40\x28\104\117\103\x5f\111\x44\54\40\120\x41\124\137\111\104\51\x20\x56\101\114\x55\x45\123\40\x28\x3f\x2c\x28\123\105\x4c\105\x43\124\40\120\x41\x54\x5f\x49\x44\40\x46\122\x4f\x4d\x20\105\62\x5f\120\x41\124\40\127\110\x45\122\105\x20\x45\62\137\120\x41\124\x2e\x50\x41\x54\137\103\x48\x41\122\x54\116\x4f\40\x3d\x20\77\51\51"; $this->db->query($sql, array($strDoctorID, $strChartNo)); if ($this->db->affected_rows() == 0) { return VERR_DB_INVALIDDATA; } } } } return $this->db->affected_rows(); } public function get_PatientsByDoctorNameForAttendingDoctor($strDoctorName) { $sql = "\x53\105\x4c\x45\x43\124\x20\x41\x54\124\x5f\104\117\x43\x2e\x44\117\x43\x5f\x49\104\54\x41\124\x54\137\104\x4f\103\56\120\x41\x54\x5f\x49\x44\54\x45\x32\137\x44\117\x43\56\x44\117\x43\x5f\x4e\101\x4d\x45\54\105\x32\137\x50\x41\x54\56\120\101\124\137\103\110\x41\x52\x54\x4e\117\x20\x46\x52\x4f\x4d\40\x45\x32\137\x41\124\124\105\x4e\x44\x49\x4e\107\137\104\x4f\x43\40\x41\124\124\x5f\x44\117\x43\54\40\x45\x32\x5f\x44\x4f\103\54\x20\105\x32\137\x50\x41\124" . "\x20\127\110\x45\122\x45\x20\x41\124\x54\137\104\117\103\56\x44\117\103\137\x49\104\x20\75\x20\x45\62\137\104\117\103\x2e\x44\117\103\x5f\x49\x44\x20\x41\x4e\x44\x20\101\x54\124\137\104\117\x43\56\x50\101\x54\137\x49\x44\40\75\x20\x45\62\x5f\120\101\x54\x2e\x50\101\x54\x5f\111\x44" . "\40\101\116\x44\x20\x45\x32\x5f\104\117\x43\56\104\x4f\103\x5f\x4e\x41\x4d\x45\40\75\40\77\x20\x4f\122\x44\105\x52\x20\102\x59\40\x45\x32\x5f\x50\x41\x54\56\120\x41\x54\x5f\103\110\101\122\124\x4e\x4f\x2c\x20\101\x54\124\137\x44\117\103\x2e\x41\x54\x54\137\111\104"; return $this->db->query($sql, array($strDoctorName))->result_array(); } public function put_PatientsForChartNo($strNewChartNo, $strExistChartNo) { if (empty($strNewChartNo)) { $strNewChartNo = $strExistChartNo . "\137" . currentDateFormat(DATEFORMAT_SMARTPAY_REPORT); } $sql = "\x53\105\x4c\105\103\x54\x20\120\x41\x54\137\111\x44\40\106\122\x4f\x4d\x20\x45\x32\x5f\x50\101\124\40\x57\x48\105\x52\105\40\120\x41\124\137\x43\x48\101\x52\124\116\x4f\40\x3d\x20\x3f"; $query = $this->db->query($sql, $strExistChartNo)->result_array(); if (count($query) > 0) { $sql = "\x55\x50\104\x41\124\x45\40\105\x32\x5f\120\x41\124\x20\x53\x45\124\40\x50\x41\x54\x5f\x43\x48\101\122\124\116\x4f\40\75\x20\77\54\x20\120\x41\x54\x5f\114\x41\123\x54\x5f\x55\120\104\101\x54\105\x44\x20\75\x20\77\x20\127\x48\105\x52\105\40\120\101\x54\x5f\103\x48\x41\x52\x54\116\117\x20\75\x20\x3f"; $this->db->query($sql, array($strNewChartNo, currentDateByFormat(DATEFORMAT_DATABASE), $strExistChartNo)); $ret = $this->db->affected_rows(); if ($ret > 0) { $sql = "\x55\120\104\x41\x54\105\x20\x45\x32\137\x49\115\107\40\x53\x45\x54\40\x50\x41\x54\137\103\110\x41\122\124\116\x4f\40\x3d\40\77\40\x57\110\x45\122\x45\x20\120\101\x54\x5f\103\110\101\122\x54\x4e\x4f\40\x3d\40\x3f"; $this->db->query($sql, array($strNewChartNo, $strExistChartNo)); return $ret; } else { return VERR_DB_INVALIDDATA; } } else { return VERR_DB_NOSUCHDATA; } } public function put_PatientsByChartNoForRecentlyViewed($parameters) { $sql = "\125\x50\x44\101\124\105\40\105\x32\137\120\101\124\x20\123\x45\x54\40\x50\101\x54\137\114\101\x53\124\x5f\x41\x43\103\105\123\123\x20\75\x20\77\x20\x57\x48\x45\122\x45\40\x50\x41\x54\x5f\x43\x48\x41\x52\124\116\117\x20\x3d\x20\x3f"; $strDateTime = currentDateFormat(DATEFORMAT_DATABASE); $this->db->query($sql, array($strDateTime, $parameters)); return $this->db->affected_rows(); } public function post_PatientsByNumListForRecentlyViewed($parameters) { $parametersOfPostPatientsByNumList = $parameters["\x70\141\162\141\x6d\145\x74\x65\x72\x73\x4f\146\x50\157\x73\x74\x50\x61\x74\151\x65\x6e\x74\163\102\171\x4e\x75\155\x4c\151\x73\x74"]; return []; } public function post_PatientsByNumListForRecentlyAcquired($parameters) { $parametersOfPostPatientsByNumList = $parameters["\x70\141\162\141\155\145\x74\145\x72\x73\117\x66\120\x6f\x73\x74\x50\141\164\151\145\x6e\x74\163\102\x79\116\165\155\x4c\151\x73\164"]; return []; } public function post_PatientsByNumListForRecentlyScheduled($docName, $accountType, $pageNum, $numItems) { if ($accountType === "\x65\104\157\x63\x74\x6f\x72\101\x63\x63\x6f\x75\x6e\164\116\141\155\145") { $this->db->select("\x61\x74\x74\137\x69\x64"); $this->db->join("\145\62\x5f\x64\157\x63", "\145\x32\137\x64\157\x63\x2e\144\157\143\x5f\x69\144\40\75\40\x65\x32\x5f\141\x74\164\145\156\x64\151\156\x67\x5f\144\x6f\143\56\x64\x6f\143\x5f\x69\144"); $this->db->where("\145\x32\137\144\x6f\x63\x2e\144\157\143\137\156\141\155\145", $docName); $this->db->where("\x65\x32\x5f\x61\x74\x74\145\156\144\151\156\147\x5f\144\x6f\143\x2e\160\141\x74\137\x69\x64", "\145\62\x5f\160\141\164\x2e\160\141\164\x5f\151\144", FALSE); $subquery = "\145\170\151\163\164\x73\50" . $this->db->get_compiled_select("\145\x32\137\141\x74\164\145\x6e\x64\x69\156\x67\x5f\x64\x6f\x63") . "\x29"; } else { if ($accountType === "\x65\104\x6f\x63\164\x6f\162\101\x63\143\157\x75\x6e\x74\x4e\157\x6e\x65") { $this->db->select("\x61\x74\164\137\x69\x64"); $this->db->where("\x65\62\x5f\x61\x74\164\145\x6e\144\x69\156\147\x5f\144\157\x63\56\x70\x61\164\137\x69\144", "\x65\62\x5f\x70\x61\164\56\160\x61\164\137\151\x64", FALSE); $subquery = "\156\x6f\164\40\145\x78\151\163\164\x73\x28" . $this->db->get_compiled_select("\x65\x32\x5f\141\x74\x74\145\156\x64\x69\x6e\147\x5f\x64\x6f\143") . "\x29"; } } $this->db->select("\145\62\137\160\x61\164\56\x70\x61\164\137\x69\144\54\x20\145\x32\137\x70\x61\164\x2e\160\x61\x74\x5f\x63\x68\141\x72\164\156\x6f\x2c\x20\x65\x32\x5f\x70\x61\164\56\x70\141\164\x5f\x6c\141\x73\x74\x6e\x61\x6d\145\x2c\x20\x65\x32\x5f\160\141\x74\x2e\x70\141\x74\137\x66\151\x72\163\x74\x6e\x61\155\145\x2c\40\x65\x32\137\x70\x61\x74\56\160\141\164\137\155\x69\x64\144\x6c\145\156\x61\x6d\x65\x2c\x20\x65\x32\x5f\x70\141\164\x2e\x70\x61\164\x5f\x62\x69\x72\164\150\144\141\x74\x65\x2c\x20\x65\x32\137\x70\141\x74\x2e\160\x61\x74\137\147\145\156\144\145\162"); $this->db->from("\145\62\x5f\x70\141\164"); $this->db->join("\x65\62\x5f\x6f\162\x74\150\157\137\160\x72\141\x63\164\x69\x63\x65\137\x73\143\x68\145\144\165\x6c\x65", "\145\x32\x5f\x6f\x72\164\x68\x6f\137\x70\162\141\143\164\151\143\145\137\163\x63\150\145\x64\165\154\145\x2e\160\141\164\x5f\x69\x64\x20\75\x20\145\x32\x5f\160\x61\x74\56\x70\x61\x74\x5f\151\144"); if (isset($subquery)) { $this->db->where($subquery, NULL, FALSE); } $this->db->group_by(array("\145\62\x5f\160\141\x74\56\x70\x61\164\137\x69\x64", "\145\x32\137\160\141\164\x2e\160\141\164\137\x63\x68\141\x72\x74\156\157", "\x65\62\x5f\160\141\x74\56\x70\141\x74\x5f\x6c\x61\x73\164\156\x61\x6d\x65", "\145\62\137\x70\141\164\56\x70\141\x74\137\x66\x69\x72\163\x74\156\x61\155\145", "\x65\62\137\x70\x61\x74\56\160\141\164\x5f\155\151\x64\144\x6c\145\x6e\141\155\x65", "\x65\x32\x5f\160\x61\164\56\x70\x61\x74\137\x62\151\162\x74\x68\x64\x61\x74\x65", "\x65\62\x5f\160\141\164\56\x70\141\164\x5f\x67\x65\156\x64\x65\x72")); $this->db->order_by("\155\141\170\50\145\62\137\157\162\164\150\157\x5f\x70\162\x61\143\x74\x69\143\145\x5f\163\x63\150\x65\x64\x75\154\145\56\157\164\x68\x5f\160\x72\x61\143\164\x69\143\x65\137\163\143\x68\145\x64\165\x6c\x65\137\163\164\x61\162\x74\x74\x69\155\x65\x29", "\144\x65\163\x63"); $this->db->limit($numItems, $pageNum * $numItems); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $searchPatient = new SSearchedPatient($row); array_push($items, $searchPatient); } return ["\145\162\162\157\162\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\163\x65\x61\x72\143\x68\145\144\120\x61\164\x69\x65\156\x74\114\151\x73\x74" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_PatientsByRecentlyAdded($docName, $accountType, $pageNum, $numItems) { if ($accountType === "\145\x44\157\143\x74\157\162\101\x63\143\x6f\x75\156\x74\116\141\x6d\x65") { $this->db->select("\x61\164\x74\x5f\151\144"); $this->db->join("\145\x32\137\x64\x6f\143", "\145\x32\137\x64\157\143\x2e\x64\x6f\x63\137\x69\x64\x20\75\x20\145\x32\137\x61\x74\164\145\156\x64\151\156\x67\x5f\x64\x6f\143\x2e\x64\157\x63\x5f\151\144"); $this->db->where("\145\62\x5f\144\157\x63\56\144\157\x63\137\156\x61\155\145", $docName); $this->db->where("\x65\62\137\x61\x74\164\x65\x6e\x64\151\x6e\x67\137\x64\x6f\143\x2e\x70\141\x74\137\151\144", "\x65\62\x5f\x70\141\164\56\x70\x61\164\137\x69\x64", FALSE); $subquery = "\145\170\x69\163\164\x73\x28" . $this->db->get_compiled_select("\145\62\x5f\141\164\164\145\156\x64\151\x6e\x67\x5f\x64\157\143") . "\51"; } else { if ($accountType === "\x65\104\x6f\143\x74\157\162\x41\143\x63\x6f\165\x6e\x74\x4e\157\156\145") { $this->db->select("\x61\x74\164\x5f\x69\x64"); $this->db->where("\145\62\x5f\x61\x74\164\x65\x6e\144\x69\x6e\x67\x5f\144\x6f\x63\x2e\x70\x61\164\137\x69\x64", "\145\62\137\160\141\x74\56\160\x61\x74\x5f\151\x64", FALSE); $subquery = "\x6e\157\x74\40\145\x78\151\163\x74\163\50" . $this->db->get_compiled_select("\145\x32\137\x61\164\164\145\156\x64\151\156\147\137\144\x6f\x63") . "\51"; } } $this->db->select("\x65\x32\137\x70\141\164\x2e\160\141\x74\137\x69\x64\x2c\40\145\62\137\160\141\164\x2e\x70\x61\164\137\x63\150\141\162\164\156\x6f\x2c\x20\145\62\x5f\x70\141\x74\x2e\x70\141\164\x5f\154\141\x73\164\x6e\141\155\x65\54\40\145\x32\137\x70\141\x74\x2e\160\x61\164\x5f\x66\x69\x72\x73\164\156\x61\155\x65\x2c\40\145\x32\x5f\x70\x61\164\56\160\x61\164\137\x6d\151\144\x64\154\145\x6e\x61\155\x65\54\40\x65\62\137\x70\141\164\x2e\160\x61\164\137\142\151\162\x74\150\x64\141\164\145\x2c\x20\x65\x32\x5f\160\x61\x74\56\160\x61\x74\x5f\x67\x65\156\144\x65\x72"); $this->db->from("\x65\x32\137\160\141\x74"); if (isset($subquery)) { $this->db->where($subquery, NULL, FALSE); } $this->db->group_by(array("\145\62\x5f\x70\x61\x74\x2e\x70\x61\x74\x5f\151\x64", "\145\x32\137\160\141\164\56\x70\141\x74\137\143\x68\x61\x72\164\x6e\x6f", "\x65\x32\x5f\x70\141\x74\56\160\x61\164\137\x6c\141\x73\164\156\141\155\145", "\145\x32\x5f\160\141\x74\x2e\x70\141\164\137\146\x69\162\x73\x74\x6e\x61\x6d\x65", "\x65\x32\x5f\x70\141\164\x2e\x70\x61\164\137\x6d\x69\x64\x64\154\145\156\141\x6d\x65", "\x65\x32\137\x70\141\x74\x2e\160\141\x74\x5f\x62\x69\162\x74\150\144\141\x74\145", "\x65\62\137\160\141\x74\x2e\x70\x61\164\x5f\x67\145\x6e\144\x65\x72")); $this->db->order_by("\x65\x32\137\x70\141\x74\x2e\x70\x61\164\x5f\162\x65\147\x69\163\164\145\x72\x65\x64\137\144\x61\x74\x65\x74\x69\155\x65", "\144\145\x73\x63"); $this->db->limit($numItems, $pageNum * $numItems); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $searchPatient = new SSearchedPatient($row); array_push($items, $searchPatient); } return ["\145\162\162\157\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\163\x65\x61\x72\143\x68\145\x64\x50\141\x74\151\145\156\x74\114\151\163\x74" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_PatientsForLastUpdated($strChartNo) { $query = "\x53\105\x4c\105\x43\x54\x20\x50\101\x54\137\x4c\x41\x53\124\137\125\120\x44\x41\124\x45\104\40\x46\122\117\115\40\x45\x32\x5f\120\x41\x54\x20\127\x48\x45\122\105\40\x50\101\124\137\x43\x48\x41\122\x54\x4e\x4f\x20\75\x20\x3f"; $ret = $this->db->query($query, $strChartNo)->result_array(); if (count($ret) > 0) { return ["\x65\162\162\x6f\x72\x43\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\x6c\x61\163\164\125\x70\x64\141\164\x65\144" => currentDateFormat(DATEFORMAT_ISO8601, $ret[0]["\x70\x61\x74\x5f\x6c\141\x73\x74\x5f\x75\160\144\x61\x74\145\x64"])]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function getPatientIdByChartNo($chartNo) { $query = "\123\105\114\105\103\124\x20\x50\101\124\x5f\x49\x44\x20\106\x52\117\x4d\40\105\x32\x5f\120\101\124\40\x57\110\105\x52\x45\x20\x50\x41\124\137\x43\x48\101\122\x54\x4e\x4f\40\x3d\x20\77"; return $this->db->query($query, array($chartNo))->result_array(); } public function post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientAll(&$searchedPatientList, $pageNum, $numItems) { $sql = "\xa\40\x20\x20\40\40\x20\x20\40\40\40\x20\40\x53\x45\114\105\x43\x54\x20\120\101\x54\137\x43\110\x41\122\x54\116\x4f\x2c\40\x50\101\x54\x5f\x4c\x41\x53\124\116\x41\x4d\105\54\x20\120\x41\x54\137\106\111\122\123\124\116\x41\115\x45\54\40\120\x41\124\x5f\115\x49\x44\x44\114\x45\x4e\x41\x4d\x45\x2c\x20\x50\101\124\137\x42\x49\x52\124\110\104\101\x54\105\x2c\x20\120\x41\x54\137\x47\105\116\x44\105\122\xa\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\x46\122\x4f\115\x20\x45\62\x5f\120\101\124\xa\40\x20\40\40\x20\x20\x20\40\x20\x20\40\x20\127\x48\105\x52\105\40\x50\x41\x54\x5f\x49\x44\40\111\x53\40\116\117\x54\40\x4e\125\114\114\40\101\116\104\x20\120\101\x54\137\x4c\101\x53\124\137\101\x43\x43\105\123\123\x20\111\123\x20\116\117\124\40\116\x55\x4c\114\12\40\40\x20\x20\x20\40\40\x20\x20\40\40\40\x47\x52\117\125\120\40\102\131\x20\x50\x41\x54\x5f\103\110\101\122\124\x4e\117\54\x20\120\x41\124\137\114\101\x53\124\x4e\101\115\x45\x2c\40\x50\x41\x54\x5f\x46\x49\122\x53\124\x4e\x41\115\105\x2c\x20\x50\x41\124\x5f\x4d\111\104\x44\x4c\105\116\101\x4d\105\x2c\40\x50\x41\124\137\102\x49\122\124\x48\104\x41\x54\x45\x2c\x20\x50\x41\x54\137\107\105\x4e\x44\105\122\12\x20\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\117\122\104\x45\x52\40\102\x59\40\x4d\101\x58\50\120\x41\x54\x5f\114\101\x53\x54\137\101\x43\x43\105\123\x53\x29\40\x44\105\x53\103\12\x20\x20\40\40\x20\40\40\40\x20\x20\x20\x20"; $vecRecordAccessPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAccessPatient) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $count = 0; foreach ($vecRecordAccessPatient as $qSqlRecord) { $searchPatient = new SSearchedPatient($qSqlRecord); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { return $ret; } } $count++; } return $ret; } public function post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientNone(&$searchedPatientList, $pageNum, $numItems) { $sql = "\xa\x20\x20\x20\40\40\40\x20\x20\x20\40\x20\40\x53\x45\114\105\x43\124\x20\120\x41\124\137\x49\x44\x2c\x20\120\101\x54\137\x43\110\x41\122\124\x4e\117\x2c\x20\x50\101\124\137\114\101\123\124\x4e\101\x4d\x45\x2c\x20\x50\x41\124\137\106\x49\x52\123\124\x4e\x41\115\105\54\x20\120\x41\x54\137\115\x49\x44\104\114\105\116\101\115\x45\x2c\40\x50\x41\x54\137\102\111\x52\124\110\x44\101\x54\105\x2c\40\120\x41\x54\137\107\105\116\x44\x45\122\xa\40\x20\40\x20\40\40\40\40\40\40\x20\40\106\x52\x4f\115\x20\105\x32\137\120\101\x54\12\x20\40\x20\40\40\x20\40\x20\x20\40\x20\x20\x57\x48\x45\122\x45\40\x50\x41\x54\x5f\111\104\40\x49\123\x20\x4e\x4f\x54\40\x4e\x55\x4c\x4c\40\101\x4e\104\x20\120\x41\124\x5f\x4c\x41\x53\124\137\101\103\x43\105\123\x53\40\x49\x53\40\116\117\124\x20\x4e\125\x4c\114\12\x20\40\x20\40\x20\x20\40\x20\40\40\x20\x20\107\122\117\x55\120\40\x42\x59\x20\x50\x41\124\x5f\103\x48\101\122\124\116\117\54\x20\x50\x41\124\x5f\114\101\123\x54\x4e\101\x4d\105\54\x20\120\101\124\137\106\x49\122\123\124\116\101\115\105\54\40\x50\x41\124\x5f\115\x49\x44\x44\x4c\105\116\101\x4d\105\x2c\40\120\x41\124\137\102\x49\122\124\x48\104\101\124\105\x2c\40\x50\101\x54\x5f\x47\105\x4e\104\x45\x52\x2c\x20\x50\101\x54\137\111\x44\12\40\40\40\x20\x20\40\x20\40\x20\40\x20\40\117\x52\104\105\x52\40\102\x59\x20\x4d\x41\130\x28\120\101\124\x5f\x4c\x41\123\124\x5f\x41\x43\103\105\123\x53\51\40\104\105\123\x43\xa\x20\x20\x20\40\40\40\40\40\40\x20\40\x20"; $vecRecordAccessPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAccessPatient) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $strlPatientID = array(); $this->_getAllAttendingPatientList($strlPatientID); $count = 0; foreach ($vecRecordAccessPatient as $qSqlRecord) { $strAcqPatientID = $qSqlRecord["\x70\141\x74\137\151\144"]; $bExist = FALSE; foreach ($strlPatientID as $strPatientID) { if ($strAcqPatientID === $strPatientID) { $bExist = TRUE; } } if ($bExist != TRUE) { $searchPatient = new SSearchedPatient($qSqlRecord); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { return $ret; } } $count++; } } return $ret; } public function post_PatientsByNumListForRecentlyViewedGetRecentViewingPatientDoctor(&$searchedPatientList, $strDoctor, $pageNum, $numItems) { $sql = "\12\40\40\x20\x20\40\40\40\x20\x20\x20\x20\x20\x53\x45\114\x45\x43\124\40\x50\x41\124\137\111\104\x2c\x20\x50\101\x54\x5f\x43\x48\101\x52\x54\x4e\x4f\54\40\120\x41\124\x5f\114\101\123\124\x4e\101\x4d\105\54\x20\x50\x41\124\137\106\111\122\123\124\x4e\x41\x4d\x45\54\40\x50\101\x54\x5f\x4d\x49\x44\x44\114\x45\x4e\101\x4d\105\54\x20\x50\x41\x54\x5f\102\111\x52\x54\x48\104\101\x54\105\x2c\40\120\x41\124\x5f\x47\105\116\104\105\122\xa\x20\x20\40\40\x20\x20\x20\x20\x20\40\40\40\106\x52\117\115\x20\x45\x32\x5f\x50\x41\124\xa\40\x20\40\x20\x20\x20\40\x20\x20\40\40\40\127\x48\105\x52\105\40\x50\101\x54\137\x49\104\40\111\x53\x20\x4e\117\x54\40\x4e\x55\x4c\114\40\101\116\104\x20\120\101\124\x5f\x4c\101\123\124\x5f\101\x43\103\105\123\x53\x20\x49\123\40\x4e\117\124\40\x4e\x55\114\x4c\12\40\x20\x20\x20\40\x20\x20\x20\40\40\x20\x20\107\122\x4f\125\x50\40\x42\x59\x20\120\x41\x54\x5f\103\x48\101\122\124\x4e\117\x2c\x20\x50\x41\124\x5f\114\x41\123\x54\116\101\115\105\x2c\x20\120\101\124\137\106\111\x52\x53\124\x4e\x41\x4d\x45\54\40\x50\x41\124\x5f\115\111\x44\x44\114\x45\x4e\x41\115\105\54\40\120\101\x54\x5f\x42\x49\122\x54\x48\x44\101\x54\x45\x2c\40\120\101\124\137\x47\x45\x4e\x44\x45\x52\x2c\40\120\x41\x54\137\111\x44\xa\40\x20\40\x20\40\40\x20\x20\40\40\x20\40\x4f\122\104\105\122\x20\x42\131\x20\x4d\x41\x58\50\x50\101\x54\137\114\x41\x53\x54\137\101\103\103\105\123\x53\51\40\x44\x45\123\103\12\40\40\x20\x20\40\x20\x20\40\40\x20\40\40"; $vecRecordAccessPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAccessPatient) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $strlChartNo = array(); $ret = $this->_getAttendingPatientList($strDoctor, $strlChartNo); if (VSUCCESS != $ret) { return $ret; } $strlPatientID = array(); foreach ($strlChartNo as $strChartNo) { $ret = $this->_dbmGetPatientID($strChartNo, $nPatientID); if (VSUCCESS != $ret) { return $ret; } array_push($strlPatientID, $nPatientID); } $count = 0; foreach ($vecRecordAccessPatient as $qSqlRecord) { $strAcqPatientID = intval(trim($qSqlRecord["\160\141\164\137\151\x64"])); $bExist = FALSE; foreach ($strlPatientID as $strPatientID) { if ($strAcqPatientID === $strPatientID) { $bExist = TRUE; } } if ($bExist == TRUE) { $searchPatient = new SSearchedPatient($qSqlRecord); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { return $ret; } } $count++; } } return $ret; } public function post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientAll(&$searchedPatientList, $pageNum, $numItems) { $ret = VSUCCESS; $sql = "\12\40\40\40\x20\x20\x20\40\40\40\x20\x20\x20\123\x45\x4c\x45\103\x54\40\x50\101\124\x5f\111\x44\12\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\40\x46\x52\117\115\40\105\x32\137\x49\115\107\12\40\40\x20\40\40\40\40\x20\40\x20\40\40\127\110\x45\122\x45\x20\120\101\x54\x5f\x49\104\x20\x49\x53\x20\x4e\117\124\x20\x4e\125\114\x4c\x20\x41\116\x44\x20\111\115\107\137\101\x43\x51\x55\x49\123\x49\124\111\x4f\x4e\x5f\104\x41\x54\x45\124\111\115\x45\40\x49\x53\40\116\117\124\x20\116\125\114\114\xa\40\x20\40\x20\x20\x20\40\x20\x20\40\40\40\107\122\x4f\125\x50\x20\x42\131\x20\120\x41\x54\137\x49\x44\40\117\x52\104\105\122\x20\102\131\x20\115\101\130\50\111\115\107\x5f\x41\x43\x51\x55\x49\x53\x49\124\111\x4f\x4e\137\x44\x41\x54\x45\x54\111\115\x45\51\x20\x44\x45\123\x43\xa\x20\x20\x20\x20\x20\x20\40\x20\40\x20\40\x20"; $vecRecordAcqPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAcqPatient) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $vecRecordResult = array(); $count = 0; foreach ($vecRecordAcqPatient as $qSqlRecord) { $ret = $this->_getPatientInformation($qSqlRecord["\x70\141\164\x5f\151\x64"], $vecRecordResult); if ($ret == VSUCCESS) { $searchPatient = new SSearchedPatient($vecRecordResult); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { return $ret; } } $count++; } } return $ret; } private function _getPatientInformation(&$strPatientID, &$vecPatient) { $ret = VFAILURE; if (TRUE == empty($strPatientID)) { return $ret; } $vecPatient = array(); $sql = "\12\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\40\123\x45\x4c\105\x43\124\40\120\x41\x54\137\103\x48\101\122\124\x4e\117\54\x20\120\x41\124\137\114\101\x53\124\x4e\x41\115\x45\x2c\40\120\x41\x54\x5f\x46\x49\122\123\124\x4e\x41\x4d\105\54\x20\x50\x41\x54\x5f\x4d\111\x44\x44\x4c\105\x4e\101\x4d\x45\x2c\40\120\101\x54\137\x42\111\x52\124\110\104\x41\x54\105\54\40\120\x41\x54\x5f\x47\x45\116\x44\x45\x52\12\40\x20\x20\x20\x20\x20\40\x20\x20\40\40\x20\x46\122\117\115\40\x45\62\137\x50\101\x54\xa\40\x20\40\40\x20\x20\40\40\40\x20\x20\40\x57\110\x45\122\x45\x20\x50\x41\124\x5f\x49\x44\40\x3d\40\77\xa\x20\40\40\40\x20\x20\x20\x20\40\x20\x20\x20"; $vecPatient = $this->db->query($sql, array($strPatientID))->row_array(); $ret = count($vecPatient) > 0 ? VSUCCESS : VFAILURE; return $ret; } public function post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientNone(&$searchedPatientList, $pageNum, $numItems) { $ret = VSUCCESS; $sql = "\12\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x53\x45\x4c\105\103\x54\x20\x50\101\x54\x5f\111\104\xa\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\40\40\106\122\117\x4d\40\105\x32\137\111\x4d\x47\xa\40\40\40\x20\40\40\40\40\40\40\40\x20\127\110\105\x52\x45\x20\x50\x41\124\x5f\x49\x44\40\111\123\x20\x4e\117\124\40\x4e\125\x4c\x4c\40\101\116\x44\x20\x49\x4d\107\137\x41\x43\x51\125\111\x53\x49\124\x49\117\116\137\104\101\x54\105\124\111\x4d\105\x20\111\123\40\116\117\x54\40\x4e\125\114\114\12\x20\x20\40\40\x20\x20\40\x20\40\40\x20\40\107\122\x4f\x55\120\40\102\131\x20\x50\x41\x54\x5f\111\104\40\x4f\x52\104\105\122\x20\x42\131\40\115\101\130\50\x49\115\107\x5f\x41\103\x51\x55\x49\123\111\124\111\117\116\137\104\x41\124\x45\x54\x49\115\x45\51\40\104\x45\123\103\12\40\x20\40\40\40\x20\40\40\x20\x20\40\x20"; $vecRecordAcqPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAcqPatient) ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $strlPatientID = array(); $this->_getAllAttendingPatientList($strlPatientID); $vecRecordResult = array(); $count = 0; foreach ($vecRecordAcqPatient as $qSqlRecord) { $strAcqPatientID = $qSqlRecord["\x70\141\x74\137\x69\x64"]; $bExist = FALSE; foreach ($strlPatientID as $strPatientID) { if ($strAcqPatientID === $strPatientID) { $bExist = TRUE; } } if ($bExist != TRUE) { $ret = $this->_getPatientInformation($strAcqPatientID, $vecRecordResult); if ($ret == VSUCCESS) { $searchPatient = new SSearchedPatient($vecRecordResult); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { return $ret; } } $count++; } } } return $ret; } private function _getAllAttendingPatientList(&$strlPatientID) { $ret = VFAILURE; $sql = "\xa\40\40\40\40\x20\40\x20\x20\40\x20\40\x20\123\x45\x4c\x45\x43\x54\x20\x50\x41\x54\137\x49\x44\12\40\40\40\40\40\40\40\x20\40\40\40\40\x46\122\x4f\115\x20\105\x32\x5f\x41\x54\124\x45\116\x44\111\116\x47\137\x44\117\103\xa\40\x20\40\40\x20\40\40\x20\40\40\40\40"; $vecRecord = $this->db->query($sql)->result_array(); $ret = count($vecRecord) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } foreach ($vecRecord as $qSqlRecord) { $strPatientID = $qSqlRecord["\160\141\x74\137\151\x64"]; array_push($strlPatientID, $strPatientID); } return $ret; } public function post_PatientsByNumListForRecentlyAcquiredGetRecentlyAcquisitionPatientDoctor(&$searchedPatientList, $strDoctor, $pageNum, $numItems) { $ret = VSUCCESS; $sql = "\12\40\40\40\40\40\40\x20\40\x20\40\x20\40\123\105\x4c\105\x43\124\x20\x50\101\124\137\x49\104\12\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x46\122\x4f\x4d\x20\x45\x32\137\111\115\x47\12\40\x20\40\40\40\x20\40\40\x20\40\40\40\127\x48\105\x52\x45\40\x50\x41\124\x5f\x49\x44\x20\111\123\x20\x4e\x4f\x54\40\116\x55\x4c\x4c\40\101\116\104\40\111\115\x47\137\x41\x43\121\x55\x49\x53\111\x54\x49\x4f\x4e\137\x44\x41\124\105\x54\111\x4d\x45\40\x49\123\x20\116\117\x54\40\116\x55\114\114\xa\x20\40\40\40\40\x20\x20\x20\40\x20\40\40\107\x52\117\x55\x50\40\x42\x59\x20\120\101\x54\137\111\x44\40\x4f\122\104\105\122\40\102\131\40\x4d\x41\130\50\x49\115\107\137\101\x43\x51\125\x49\x53\x49\124\111\x4f\x4e\x5f\x44\x41\x54\x45\124\111\x4d\x45\x29\x20\104\105\x53\103\12\x20\40\40\40\x20\x20\40\40\x20\x20\40\40"; $vecRecordAcqPatient = $this->db->query($sql)->result_array(); $ret = count($vecRecordAcqPatient) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } $strlChartNo = array(); $ret = $this->_getAttendingPatientList($strDoctor, $strlChartNo); if (VSUCCESS != $ret) { return $ret; } $strlPatientID = array(); foreach ($strlChartNo as $strChartNo) { $ret = $this->_dbmGetPatientID($strChartNo, $nPatientID); if (VSUCCESS != $ret) { return $ret; } array_push($strlPatientID, $nPatientID); } $searchedPatientList = array(); $count = 0; foreach ($vecRecordAcqPatient as $qRecordAcqPatient) { $strAcqPatientID = intval(trim($qRecordAcqPatient["\x70\x61\x74\137\x69\x64"])); foreach ($strlPatientID as $strPatientID) { if ($strPatientID === $strAcqPatientID) { $vecRecordResult = array(); $ret = $this->_getPatientInformation($strPatientID, $vecRecordResult); if ($ret == VSUCCESS) { $searchPatient = new SSearchedPatient($vecRecordResult); if ($pageNum * $numItems <= $count && $count < ($pageNum + 1) * $numItems) { array_push($searchedPatientList, $searchPatient); } else { if (($pageNum + 1) * $numItems <= $count) { break; } } $count++; } } } } return $ret; } private function _getAttendingPatientList(&$strDoctor, &$strlPatient) { $ret = VFAILURE; $sql = "\xa\x20\40\40\x20\x20\40\40\40\40\x20\x20\40\x53\x45\x4c\105\103\x54\40\x44\117\x43\x5f\111\104\12\40\40\40\x20\x20\40\40\40\40\40\x20\x20\x46\x52\117\115\x20\105\x32\137\104\117\x43\12\40\x20\x20\40\40\x20\x20\40\40\x20\40\x20\127\x48\105\122\105\40\104\x4f\x43\137\x4e\x41\115\105\x20\75\40\x3f\xa\x20\40\x20\x20\x20\40\x20\40\40\x20\x20\40"; $vecRecord = $this->db->query($sql, array($strDoctor))->row_array(); $ret = count($vecRecord) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } if (TRUE != empty($vecRecord)) { $strDoctorID = $vecRecord["\x64\x6f\143\137\x69\x64"]; $vecRecord = array(); $sql = "\12\x20\x20\x20\x20\40\x20\40\40\x20\40\x20\40\x20\x20\x20\40\x53\x45\x4c\105\103\124\x20\x50\x41\124\137\x49\x44\12\40\40\40\x20\x20\40\40\x20\40\x20\40\40\x20\x20\40\x20\106\x52\117\115\x20\x45\62\x5f\101\x54\x54\105\x4e\x44\x49\116\x47\137\x44\117\103\xa\x20\x20\x20\40\x20\x20\40\x20\40\x20\40\40\40\x20\x20\40\x57\x48\105\122\105\x20\104\117\103\x5f\x49\104\x20\75\40\x3f\12\40\40\x20\x20\x20\40\40\40\40\40\x20\x20\x20\x20\40\x20"; $vecRecord = $this->db->query($sql, array($strDoctorID))->result_array(); $ret = count($vecRecord) > 0 ? VSUCCESS : VFAILURE; if ($success != $ret) { return $ret; } foreach ($vecRecord as $qSqlRecord) { $strPatientID = $qSqlRecord["\160\141\164\137\151\x64"]; $sql = "\xa\x20\x20\x20\40\x20\40\40\40\40\40\x20\x20\x20\40\40\40\40\x20\x20\x20\x53\105\x4c\x45\103\124\40\120\101\x54\x5f\x43\110\x41\x52\124\116\x4f\xa\40\x20\40\x20\x20\40\40\x20\x20\x20\40\40\40\40\40\x20\40\40\40\40\x46\x52\x4f\115\x20\105\62\137\120\x41\x54\xa\x20\x20\x20\40\40\x20\40\40\x20\x20\x20\40\40\40\x20\40\40\40\40\40\x57\110\105\122\105\x20\120\x41\x54\x5f\111\104\40\75\40\77\12\x20\x20\40\40\40\40\x20\x20\40\x20\40\x20\40\40\x20\x20"; $vecRecordPatientID = $this->db->query($sql, array($strPatientID))->row_array(); $ret = count($vecRecordPatientID) > 0 ? VSUCCESS : VFAILURE; if (VSUCCESS != $ret) { return $ret; } if (TRUE != empty($vecRecordPatientID)) { array_push($strlPatient, $vecRecordPatientID["\x70\x61\x74\x5f\143\x68\x61\x72\164\156\x6f"]); } } } return $ret; } private function _dbmGetPatientID($strChartNo, &$nPatID) { $ret = VSUCCESS; $nPatID = VFAILURE; $sql = "\12\40\40\x20\40\x20\40\40\x20\40\40\40\x20\40\40\40\x20\123\105\x4c\x45\103\124\x20\x50\101\124\x5f\x49\x44\12\40\40\40\40\40\x20\40\x20\x20\x20\40\40\x20\40\40\x20\x46\122\x4f\x4d\40\105\x32\137\120\101\124\12\x20\x20\x20\40\40\40\40\40\x20\x20\40\x20\40\40\x20\x20\x57\x48\105\122\x45\40\120\101\x54\137\103\x48\x41\x52\x54\116\117\x20\75\x20\77\xa\40\x20\x20\40\40\40\x20\40\40\40\40\40\x20\x20\40\x20"; $vecRec = $this->db->query($sql, array($strChartNo))->result_array(); $ret = count($vecRec) > 0 ? VSUCCESS : VFAILURE; if ($ret != VSUCCESS) { return $ret; } if (count($vecRec) > 0) { $nPatID = intval($vecRec[0]["\x70\x61\x74\x5f\151\144"]); } else { $nPatID = VSUCCESS; return $ret = VFAILURE; } return $ret; } public function get_PatientSocialIDs() { load_database($this, "\x45\62\x44\102"); $this->db->select("\160\x61\164\137\x73\x6f\143\151\141\x6c\151\144"); $this->db->from("\145\62\137\x70\x61\164"); $this->db->like("\160\x61\164\137\163\x6f\143\151\141\154\151\144", "\x24\x25\x24", "\x61\x66\x74\145\x72"); $retProtect = $this->db->get()->result_array(); $this->db->select("\x70\141\164\137\x73\x6f\143\151\141\x6c\151\x64"); $this->db->from("\x65\62\x5f\x70\141\164"); $this->db->where("\x70\x61\x74\137\163\x6f\143\151\141\x6c\151\144\x20\x21\x3d\40\x27\x27"); $this->db->not_like("\160\x61\x74\x5f\163\x6f\143\151\x61\154\x69\x64", "\x24\45\x24", "\x61\x66\164\x65\162"); $retUnprotect = $this->db->get()->result_array(); return ["\x70\162\157\x74\x65\x63\164\145\144\x53\x6f\x63\151\141\x6c\x49\104\x73" => count($retProtect), "\x75\x6e\x70\162\157\x74\145\143\x74\x65\x64\123\x6f\x63\x69\x61\x6c\111\104\163" => count($retUnprotect)]; } public function put_PatientSocialIDs($parameters) { $action = strtolower($parameters["\141\x63\164\151\x6f\156"]); load_database($this, "\105\x32\104\x42"); $socialIDProtector = new SocialIDProtector(); if ($action == "\x70\162\157\x74\x65\x63\x74") { $this->db->select("\160\141\x74\x5f\x63\x68\141\x72\164\x6e\x6f\x2c\x20\160\x61\164\137\163\157\143\x69\x61\154\x69\144"); $this->db->from("\145\x32\x5f\x70\141\164"); $this->db->where("\160\141\x74\137\x73\157\x63\151\141\x6c\151\x64\40\41\x3d\40\x27\47"); $this->db->not_like("\160\x61\164\x5f\x73\x6f\x63\151\x61\154\151\144", "\x24\x25\44", "\141\x66\164\x65\162"); $retUnprotected = $this->db->get()->result_array(); $this->db->trans_start(); for ($i = 0; $i < count($retUnprotected); $i++) { $retUnprotected[$i]["\160\141\x74\137\x73\x6f\143\151\x61\154\151\x64"] = $socialIDProtector->encrypt_data($retUnprotected[$i]["\160\141\x74\137\163\157\143\151\x61\x6c\x69\x64"])["\x65\156\x63\162\x79\160\164\x65\144\x44\x61\164\x61"]; $this->db->set("\160\x61\x74\137\163\x6f\x63\x69\x61\154\151\x64", $retUnprotected[$i]["\x70\x61\x74\x5f\163\x6f\143\151\x61\x6c\151\x64"]); $this->db->where("\160\141\164\x5f\x63\x68\141\162\164\156\x6f", $retUnprotected[$i]["\160\141\x74\x5f\x63\150\141\x72\164\x6e\157"]); $this->db->update("\x65\x32\x5f\160\x61\164"); } $this->db->trans_complete(); } else { if ($action == "\x75\x6e\x70\x72\x6f\164\145\143\164") { $this->db->select("\160\141\x74\137\x63\x68\141\x72\164\x6e\157\x2c\x20\x70\141\164\137\163\157\x63\x69\x61\x6c\151\144"); $this->db->from("\x65\x32\137\160\141\164"); $this->db->like("\x70\141\164\x5f\163\x6f\143\151\141\x6c\151\x64", "\x24\x25\x24", "\141\146\164\x65\162"); $retProtected = $this->db->get()->result_array(); $this->db->trans_start(); for ($i = 0; $i < count($retProtected); $i++) { if ($socialIDProtector->is_encrypted($retProtected[$i]["\x70\x61\164\x5f\x73\x6f\143\151\x61\x6c\151\144"])) { $retProtected[$i]["\x70\141\164\137\163\x6f\143\x69\141\x6c\151\x64"] = $socialIDProtector->decrypt_data($retProtected[$i]["\160\141\x74\x5f\x73\157\x63\x69\141\154\x69\144"])["\144\x65\x63\162\171\160\x74\145\x64\x44\x61\164\141"]; } $this->db->set("\x70\141\x74\x5f\x73\x6f\143\151\141\x6c\x69\144", $retProtected[$i]["\x70\x61\x74\137\x73\157\143\151\x61\x6c\151\144"]); $this->db->where("\160\x61\x74\137\143\x68\141\x72\x74\156\157", $retProtected[$i]["\160\x61\164\137\x63\150\141\162\x74\x6e\x6f"]); $this->db->update("\145\62\137\160\x61\164"); } $this->db->trans_complete(); } } return $this->get_PatientSocialIDs(); } } diff --git a/server/original/www/ezwebserver/src/application/models/Post_model.php b/server/original/www/ezwebserver/src/application/models/Post_model.php index 8023137..ee6fe25 100644 --- a/server/original/www/ezwebserver/src/application/models/Post_model.php +++ b/server/original/www/ezwebserver/src/application/models/Post_model.php @@ -1,7 +1,7 @@ db->select("\x6f\164\150\x5f\x63\x68\x61\x69\x72\137\x69\144"); $this->db->where("\50\157\x74\150\137\x70\162\141\x63\164\x69\143\x65\x5f\x73\143\x68\x65\x64\x75\x6c\145\x5f\163\x74\x61\x72\164\x74\x69\x6d\145\x2c\40\157\x74\150\137\160\162\141\143\164\151\143\145\137\163\143\150\145\144\165\x6c\145\137\145\x6e\x64\164\151\155\145\x29\40\117\126\105\122\114\101\120\123\40\x20\50\47{$schedule_starttimestamp}\47\x2c\x27{$schedule_endtimestamp}\47\x29", NULL, FALSE); $this->db->where("\x6f\x74\150\x5f\x63\x68\x61\151\162\137\151\x64\40\111\x53\40\x4e\x4f\x54\40\x4e\125\114\114", NULL, FALSE); $select_schedule = $this->db->get_compiled_select("\145\x32\x5f\x6f\x72\164\150\x6f\x5f\160\x72\x61\x63\x74\151\143\x65\137\x73\x63\150\145\x64\165\154\145"); $this->db->select("\157\x74\x68\x5f\143\150\141\x69\x72\137\156\141\x6d\x65"); $this->db->from("\x65\x32\x5f\157\162\x74\x68\x6f\137\160\162\x61\x63\x74\x69\x63\x65\137\143\150\141\x69\x72\163"); $this->db->where_not_in("\157\x74\x68\137\x63\x68\141\151\x72\x5f\x69\144", $select_schedule, FALSE); $result = $this->db->get()->result_array(); if (count($result) > 0) { return ["\x65\x72\x72\157\162\103\157\x64\145" => VERR_COMMON_SUCCESS, "\143\x68\x61\x69\x72\x4e\141\155\x65\x73" => array_column($result, "\x6f\x74\x68\137\143\150\141\x69\x72\137\156\141\155\145")]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_PracticeChairs() { load_database($this, "\105\x32\x44\102"); $this->db->select("\x6f\x74\x68\137\x63\150\x61\x69\162\x5f\163\145\161\156\x6f\54\157\x74\x68\x5f\x63\x68\x61\x69\162\137\156\141\x6d\145"); $this->db->from("\145\62\x5f\x6f\162\x74\x68\157\x5f\160\162\141\x63\x74\151\x63\x65\x5f\x63\x68\x61\x69\x72\163"); $result = $this->db->get()->result_array(); $items = array(); foreach ($result as $row) { $sPracticeChair = SPracticeChair::constructWithRow($row); array_push($items, $sPracticeChair); } return ["\x65\162\x72\157\162\x43\157\144\145" => VERR_COMMON_SUCCESS, "\x63\x68\x61\151\162\163" => $items]; } public function put_PracticeChairs($chairs) { load_database($this, "\105\62\104\102"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $affected_row = 0; $this->db->select("\x6f\x74\150\x5f\143\x68\x61\151\162\x5f\163\145\x71\156\x6f"); $this->db->from("\x65\62\x5f\157\162\x74\150\157\x5f\160\x72\141\x63\x74\151\143\145\x5f\x63\150\141\x69\x72\163"); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array_column($result, "\x6f\164\x68\x5f\143\x68\141\151\x72\137\x73\145\161\156\157"); $maxSeqNo = max($items); $new_maxSeqNo = count($chairs) > 0 ? max(array_column($chairs, "\163\145\161\116\x6f")) : 0; if ($maxSeqNo > $new_maxSeqNo) { $this->db->where("\157\164\x68\x5f\143\x68\x61\151\x72\x5f\163\x65\161\x6e\157\x20\x3e", $new_maxSeqNo); $this->db->delete("\145\x32\137\x6f\x72\164\150\157\x5f\x70\162\x61\143\164\151\143\x65\x5f\143\x68\141\x69\x72\163"); $affected_row = $this->db->affected_rows(); } foreach ($chairs as $chair) { if (in_array($chair->seqNo, $items)) { $this->db->set("\x6f\164\x68\x5f\143\150\x61\x69\162\x5f\x6e\141\x6d\145", $chair->name); $this->db->where("\x6f\164\150\x5f\143\150\x61\x69\x72\x5f\163\x65\x71\x6e\x6f", $chair->seqNo); $this->db->update("\145\x32\137\x6f\162\x74\150\x6f\137\160\x72\141\143\164\151\143\145\137\x63\150\x61\151\162\x73"); } else { $this->db->set("\x6f\164\150\x5f\x63\x68\141\x69\x72\137\163\145\x71\156\157", $chair->seqNo); $this->db->set("\x6f\164\150\x5f\143\x68\141\151\x72\x5f\x6e\x61\155\x65", $chair->name); $this->db->insert("\145\62\x5f\x6f\x72\164\150\157\x5f\x70\x72\x61\x63\x74\151\x63\145\x5f\x63\150\141\x69\162\x73"); } $affected_row = $this->db->affected_rows(); if ($affected_row == 0) { break; } } } else { foreach ($chairs as $chair) { $this->db->set("\x6f\x74\x68\x5f\143\150\141\x69\162\137\x73\145\x71\156\x6f", $chair->seqNo); $this->db->set("\x6f\x74\150\x5f\x63\x68\x61\x69\162\x5f\156\x61\155\145", $chair->name); $this->db->insert("\145\x32\x5f\x6f\x72\x74\x68\157\137\x70\x72\141\143\164\x69\x63\x65\x5f\143\150\x61\151\162\x73"); $affected_row = $this->db->affected_rows(); if ($affected_row == 0) { break; } } } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/PracticeHours_model.php b/server/original/www/ezwebserver/src/application/models/PracticeHours_model.php index 8647e6c..85a2ffc 100644 --- a/server/original/www/ezwebserver/src/application/models/PracticeHours_model.php +++ b/server/original/www/ezwebserver/src/application/models/PracticeHours_model.php @@ -1,7 +1,7 @@ db->select("\x6f\164\150\137\x70\x72\x61\x63\x74\151\143\x65\x5f\x63\154\157\143\x6b\137\164\171\x70\145"); $this->db->from("\x65\62\137\157\x72\x74\150\157\137\x70\x72\141\143\164\151\143\x65\137\151\156\x66\x6f"); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row)) { $clockType = intval($row->oth_practice_clock_type); $this->db->select("\157\x74\x68\x5f\160\162\x61\x63\164\151\143\x65\137\x68\x6f\165\x72\137\151\144\54\157\x74\150\x5f\160\162\x61\143\x74\151\143\145\137\x64\x61\171\x73\54\157\164\150\137\160\x72\x61\143\164\x69\x63\145\x5f\163\x74\x61\x72\164\164\151\155\x65\x2c\x6f\x74\150\x5f\160\162\x61\143\164\151\x63\145\137\145\x6e\x64\x74\151\x6d\145"); $this->db->from("\145\62\137\157\x72\x74\x68\157\x5f\x70\x72\x61\x63\164\x69\143\x65\x5f\x68\x6f\165\162"); $this->db->order_by("\x6f\x74\x68\137\160\x72\141\x63\x74\x69\143\145\x5f\150\x6f\x75\x72\137\x69\144", "\x41\x53\x43"); $result = $this->db->get()->result_array(); $sPractieHours = SPractieHours::constructWithRow($clockType, $result); return ["\x65\x72\162\157\x72\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\160\162\141\143\x74\x69\143\145\x48\x6f\165\162" => $sPractieHours]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_PracticeHours($sPractieHours) { load_database($this, "\105\62\104\102"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $this->db->select("\x6f\x74\150\x5f\x70\x72\x61\143\164\151\x63\x65\137\x69\x64"); $this->db->limit(1); $row = $this->db->get("\145\x32\137\x6f\162\164\x68\x6f\137\160\x72\141\143\164\x69\x63\145\137\x69\x6e\x66\157")->row(); if (isset($row) == FALSE) { vt_loge(__METHOD__ . "\72\x20\x6e\157\x20\x70\162\141\143\x74\x69\x63\145\x20\151\156\x66\157\40\x66\x6f\165\x6e\x64\56\40\x70\x6c\x65\141\x73\145\x20\x69\x6e\163\x65\x72\164\40\160\x72\141\x63\164\x69\143\x65\40\x69\156\x66\157\x20\x66\x69\162\x73\x74\x2e"); return createResponse(VERR_DB_NOSUCHDATA); } $practice_id = $row->oth_practice_id; $this->db->set("\x6f\164\150\137\160\x72\x61\143\164\x69\x63\145\137\143\x6c\x6f\x63\x6b\x5f\164\171\160\x65", $sPractieHours->clockType); $this->db->update("\x65\x32\x5f\x6f\x72\164\x68\x6f\137\160\x72\x61\143\164\151\x63\x65\137\x69\156\x66\157"); $this->db->empty_table("\x65\62\x5f\157\x72\164\150\157\137\160\x72\141\143\164\x69\143\145\137\x68\x6f\165\162"); foreach ($sPractieHours->practiceTimes as $item) { $data[] = array("\157\164\150\137\x70\162\141\x63\x74\151\x63\145\x5f\x68\157\165\x72\x5f\151\x64" => $item->seqNo, "\157\164\150\x5f\x70\162\x61\143\164\x69\x63\145\x5f\151\144" => $practice_id, "\x6f\164\150\137\160\162\141\143\x74\x69\x63\145\x5f\144\141\x79\163" => $item->days, "\x6f\164\150\137\x70\162\x61\143\x74\x69\143\145\137\x73\164\x61\162\x74\x74\x69\x6d\145" => $item->startTime, "\x6f\164\x68\137\x70\x72\141\143\x74\151\x63\145\137\145\156\x64\164\151\x6d\x65" => $item->endTime); } $this->db->insert_batch("\x65\x32\x5f\157\x72\x74\x68\x6f\137\x70\162\141\143\164\x69\x63\x65\x5f\150\157\x75\x72", $data); if ($this->db->trans_status() === FALSE) { $this->db->trans_rollback(); $response = createResponse(VERR_DB_INVALIDDATA); } else { $this->db->trans_commit(); $response = createResponse(VERR_COMMON_SUCCESS); } $this->db->db_debug = $db_debug; return $response; } } diff --git a/server/original/www/ezwebserver/src/application/models/Practices_model.php b/server/original/www/ezwebserver/src/application/models/Practices_model.php index 0af670b..b441420 100644 --- a/server/original/www/ezwebserver/src/application/models/Practices_model.php +++ b/server/original/www/ezwebserver/src/application/models/Practices_model.php @@ -1,7 +1,7 @@ db->select("\x6f\164\150\x5f\x70\x72\141\x63\164\x69\143\x65\137\x6e\141\155\145"); $this->db->select("\x6f\x74\x68\137\160\162\141\x63\x74\151\x63\x65\x5f\x77\145\x62\x5f\x61\144\x64\162\145\163\163"); $this->db->select("\x6f\x74\150\137\160\x72\141\143\x74\151\x63\145\x5f\160\150\157\156\x65\x5f\x6e\165\x6d"); $this->db->select("\x6f\x74\x68\x5f\x70\162\141\143\164\151\143\x65\x5f\x66\141\x78\x5f\156\165\155"); $this->db->select("\157\x74\x68\x5f\160\162\141\x63\x74\x69\143\145\x5f\x61\x64\144\162\145\x73\163"); $this->db->select("\157\x74\150\x5f\x70\x72\141\143\x74\x69\143\145\137\x73\164\x61\164\x65"); $this->db->select("\x6f\164\150\x5f\160\162\141\x63\x74\151\143\145\x5f\x63\157\165\156\164\162\171"); $this->db->select("\x6f\x74\150\137\x70\x72\141\x63\x74\x69\x63\x65\137\172\151\x70\143\x6f\x64\145"); $this->db->select("\x6f\x74\150\137\x70\162\141\143\x74\x69\x63\145\137\160\x72\x65\146\x65\162\x72\x65\144\x5f\154\157\x67\x6f"); $this->db->select("\x6f\x74\150\x5f\160\162\141\143\x74\x69\143\x65\x5f\x74\145\170\x74\137\x6c\157\147\157"); $this->db->select("\x6f\x74\x68\x5f\x70\162\x61\143\x74\x69\x63\x65\137\x74\145\170\x74\137\154\157\147\x6f\x5f\146\x6f\156\x74\137\146\x61\x6d\x69\x6c\x79"); $this->db->select("\157\x74\x68\137\x70\162\141\x63\164\151\143\145\137\x69\155\141\147\145\x5f\x6c\x6f\147\157"); $this->db->select("\145\156\143\x6f\x64\x65\50\x6f\x74\150\x5f\x70\162\x61\143\164\151\x63\145\x5f\x69\x6d\x61\x67\x65\137\154\x6f\147\157\x2c\x20\x27\142\141\163\145\x36\64\x27\x29\x20\x61\163\x20\157\164\150\137\160\162\x61\x63\x74\x69\x63\145\x5f\x69\155\x61\147\145\137\154\x6f\x67\157"); $this->db->select("\x6f\164\x68\x5f\x70\162\x61\x63\164\151\143\x65\137\x63\x6c\x6f\x63\x6b\137\164\x79\x70\x65"); $this->db->from("\x65\x32\137\x6f\x72\164\x68\157\137\160\162\x61\x63\x74\151\x63\145\x5f\x69\156\146\157"); $this->db->order_by("\157\x74\150\x5f\160\x72\141\143\164\x69\143\145\x5f\x69\144", "\144\145\x73\x63"); $this->db->limit(1); $practice_row = $this->db->get()->row(); if (isset($practice_row)) { $sPracticeInfo = SPracticeInfo::constructWithRow($practice_row); return ["\x65\x72\x72\157\x72\103\157\144\x65" => VERR_COMMON_SUCCESS, "\160\162\141\x63\x74\151\143\x65" => $sPracticeInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_Practices($sPracticeInfo) { load_database($this, "\x45\62\104\x42"); $data = array("\157\164\x68\x5f\160\x72\x61\x63\164\151\x63\x65\137\156\x61\155\145" => $sPracticeInfo->name, "\157\x74\x68\x5f\160\x72\141\143\164\151\x63\x65\x5f\x77\x65\x62\137\141\144\144\x72\x65\163\x73" => $sPracticeInfo->web, "\157\164\150\x5f\160\x72\x61\143\x74\x69\143\145\x5f\160\x68\x6f\x6e\145\137\156\x75\x6d" => $sPracticeInfo->phone, "\157\x74\x68\x5f\160\162\x61\143\x74\151\143\x65\137\146\x61\x78\x5f\x6e\x75\155" => $sPracticeInfo->fax, "\157\x74\150\137\160\x72\141\143\x74\151\x63\x65\137\x61\x64\144\x72\145\163\x73" => $sPracticeInfo->address, "\157\x74\150\137\x70\x72\141\143\x74\x69\x63\145\x5f\x73\164\141\x74\x65" => $sPracticeInfo->state, "\x6f\x74\x68\137\160\162\141\143\x74\x69\x63\145\137\143\x6f\x75\x6e\164\162\x79" => $sPracticeInfo->country, "\x6f\164\x68\137\160\x72\141\143\x74\151\143\x65\x5f\172\151\x70\x63\x6f\x64\x65" => $sPracticeInfo->zipcode, "\157\164\150\137\160\162\141\x63\x74\151\143\x65\x5f\x70\162\x65\146\145\x72\x72\x65\x64\x5f\154\x6f\147\157" => $sPracticeInfo->logo->preferrendLogo, "\x6f\164\150\x5f\x70\162\141\143\x74\151\143\x65\x5f\164\x65\x78\164\x5f\154\x6f\147\157" => $sPracticeInfo->logo->textLogo, "\157\164\150\x5f\x70\162\x61\x63\x74\x69\143\145\137\x74\145\170\x74\x5f\x6c\157\147\157\137\146\157\x6e\164\x5f\146\x61\x6d\151\x6c\171" => $sPracticeInfo->logo->textLogoFontFamily, "\x6f\164\x68\x5f\x70\162\x61\143\164\x69\143\145\137\143\154\157\x63\153\137\x74\x79\160\145" => $sPracticeInfo->clockType); $this->db->select("\x6f\164\150\x5f\160\162\x61\143\164\151\x63\145\x5f\151\144"); $this->db->limit(1); $practice_row = $this->db->get("\x65\x32\x5f\x6f\x72\x74\150\157\x5f\x70\162\141\x63\x74\151\x63\145\x5f\151\156\146\157")->row(); $this->db->set("\x6f\x74\150\x5f\x70\x72\141\143\x74\151\x63\145\x5f\x69\x6d\141\x67\145\137\154\157\x67\x6f", "\x64\145\143\x6f\x64\x65\50\47{$sPracticeInfo->logo->imageLogo}\x27\54\47\142\141\x73\x65\66\64\x27\51", FALSE); if (isset($practice_row)) { $this->db->where("\157\x74\x68\137\x70\x72\x61\x63\164\x69\x63\145\137\x69\x64", $practice_row->oth_practice_id); $this->db->update("\x65\62\x5f\x6f\162\164\150\157\x5f\x70\x72\141\x63\x74\x69\143\x65\x5f\x69\x6e\146\x6f", $data); } else { $this->db->set($data); $this->db->insert("\145\62\x5f\x6f\162\164\150\x6f\x5f\x70\162\x61\x63\x74\151\143\145\x5f\x69\x6e\146\x6f"); } if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function deletePractices() { load_database($this, "\x45\62\104\x42"); $this->db->empty_table("\145\62\x5f\x6f\x72\164\150\157\137\160\162\x61\x63\x74\x69\143\x65\137\151\156\146\x6f"); } } diff --git a/server/original/www/ezwebserver/src/application/models/ProfilogramNormalData_model.php b/server/original/www/ezwebserver/src/application/models/ProfilogramNormalData_model.php index 0aa52b1..c6ad5cb 100644 --- a/server/original/www/ezwebserver/src/application/models/ProfilogramNormalData_model.php +++ b/server/original/www/ezwebserver/src/application/models/ProfilogramNormalData_model.php @@ -1,7 +1,7 @@ db->select("\160\56\157\164\x68\x5f\x70\146\x67\x5f\x6e\x6f\162\x6d\141\154\x5f\144\141\164\x61\137\x67\x65\156\x64\x65\x72\x20\x67\x65\x6e\144\145\162\x2c\40\160\x2e\x6f\164\150\137\x70\x66\147\137\156\x6f\x72\155\141\154\x5f\x64\141\164\141\x5f\141\x67\x65\x20\141\147\x65\x2c\40\154\x2e\157\164\x68\x5f\x6c\141\156\144\155\141\162\x6b\x5f\156\x61\155\x65\x20\154\141\x6e\144\155\x61\x72\153\x4e\x61\155\x65\54\12\x20\x20\40\x20\40\x20\40\x20\40\x20\160\56\x6f\x74\150\x5f\x70\x66\x67\137\156\157\x72\x6d\x61\154\137\x64\141\x74\141\137\160\157\x73\137\x78\40\160\157\163\x58\54\40\160\56\157\164\x68\137\x70\146\x67\x5f\156\157\162\x6d\141\154\x5f\x64\x61\164\141\x5f\160\x6f\x73\137\171\x20\x70\x6f\163\x59"); $this->db->from("\x65\x32\x5f\x6f\162\164\150\157\x5f\x70\x72\157\x66\x69\x6c\157\x67\162\x61\x6d\x5f\156\157\x72\x6d\x61\154\x5f\x64\141\x74\x61\40\x70"); $this->db->join("\x65\x32\x5f\x6f\x72\x74\150\x6f\x5f\154\x61\156\x64\155\x61\x72\153\163\40\154", "\154\x2e\157\x74\x68\137\154\x61\156\x64\155\141\x72\x6b\x5f\151\x64\x20\x3d\x20\x70\x2e\x6f\x74\150\x5f\x6c\141\x6e\x64\x6d\141\162\x6b\x5f\151\x64"); $this->db->order_by("\160\x2e\157\x74\x68\x5f\160\x66\x67\x5f\x6e\x6f\x72\155\141\154\x5f\144\141\164\x61\137\x69\x64"); $rows = $this->db->get()->result_array(); if (count($rows) > 0) { $items = array(); foreach ($rows as $row) { array_push($items, SProfilogramNormalDataItem::createFromDBRecord($row)); } return ["\x65\x72\x72\x6f\162\x43\157\144\x65" => VERR_COMMON_SUCCESS, "\x6e\157\x72\155\141\154\x44\x61\164\x61" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Races_model.php b/server/original/www/ezwebserver/src/application/models/Races_model.php index c96f9a5..11557b0 100644 --- a/server/original/www/ezwebserver/src/application/models/Races_model.php +++ b/server/original/www/ezwebserver/src/application/models/Races_model.php @@ -1,7 +1,7 @@ db->select("\x6f\x74\150\x5f\x72\141\143\145\x5f\156\141\155\145\x20\141\163\x20\156\x61\x6d\x65\x2c\x6f\x74\150\137\x72\x61\143\x65\x5f\154\141\x62\x65\x6c\x20\x61\163\x20\154\141\x62\145\154\x2c\157\x74\x68\137\x72\x61\x63\145\137\x75\163\x65\x72\x5f\141\144\144\x65\x64\x20\141\x73\x20\x75\163\x65\x72\137\x61\144\x64\145\144"); $result = $this->db->get("\145\62\x5f\x6f\162\164\x68\x6f\137\x72\141\143\x65")->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $sRace = new LabeledRace($row); array_push($items, $sRace); } return ["\x65\x72\x72\157\x72\x43\157\144\145" => VERR_COMMON_SUCCESS, "\x72\141\x63\x65\114\151\163\164" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Races($racename, $label, $userAdded) { load_database($this, "\105\62\104\x42"); $this->db->where("\x6c\x6f\x77\x65\x72\x28\157\x74\x68\137\x72\141\143\145\137\x6e\141\155\x65\x29", strtolower($racename)); $q = $this->db->get("\x65\62\x5f\x6f\162\164\x68\x6f\137\x72\x61\x63\x65"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $data = array("\x6f\164\150\137\x72\141\143\x65\137\156\x61\x6d\x65" => $racename, "\x6f\164\x68\x5f\x72\x61\143\x65\x5f\154\141\x62\145\x6c" => $label, "\157\164\x68\137\x72\141\143\145\x5f\x75\163\145\x72\137\141\x64\144\145\x64" => $userAdded); $this->db->insert("\145\62\x5f\x6f\x72\x74\150\157\x5f\162\141\143\145", $data); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_Races($racename, $label) { load_database($this, "\x45\62\104\102"); $this->db->select("\157\x74\150\137\162\141\143\145\137\151\x64"); $this->db->from("\145\x32\x5f\157\162\164\x68\x6f\137\x72\x61\x63\145"); $this->db->where("\x6c\x6f\x77\x65\x72\x28\157\x74\x68\137\x72\141\143\145\137\x6e\x61\155\145\51", strtolower($racename)); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $this->db->set("\157\x74\x68\137\162\x61\143\145\x5f\154\x61\x62\x65\x6c", $label); $this->db->where("\x6f\x74\150\x5f\162\x61\x63\145\x5f\x69\x64", intval($row->oth_race_id)); $this->db->update("\x65\62\137\157\x72\x74\x68\x6f\137\162\x61\143\x65"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function delete_Races($racename) { load_database($this, "\x45\62\104\102"); $this->db->where("\154\x6f\167\x65\162\50\157\x74\150\137\x72\x61\143\x65\137\x6e\141\x6d\145\51", strtolower($racename)); $this->db->delete("\145\62\x5f\x6f\162\x74\x68\157\137\162\x61\143\145"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/RecordsetImages_model.php b/server/original/www/ezwebserver/src/application/models/RecordsetImages_model.php index 9687ea1..8f2cc69 100644 --- a/server/original/www/ezwebserver/src/application/models/RecordsetImages_model.php +++ b/server/original/www/ezwebserver/src/application/models/RecordsetImages_model.php @@ -1,7 +1,7 @@ db->select("\x69\x6d\147\137\151\144"); $this->db->where("\154\157\167\145\x72\50\x69\155\147\137\x66\x69\x6c\x65\156\141\155\x65\51", strtolower($filename)); $this->db->limit(1); $select_imgid = $this->db->get_compiled_select("\145\x32\x5f\x69\x6d\x67"); $this->db->select("\x6f\x74\x68\137\x72\x65\143\x6f\x72\144\x73\145\x74\137\x69\144"); $this->db->join("\145\62\x5f\160\141\164", "\145\62\137\x70\x61\164\x2e\x70\x61\x74\137\151\x64\x3d\145\62\137\x6f\x72\164\x68\157\x5f\162\x65\x63\157\162\144\163\x65\x74\x73\56\160\x61\164\x5f\151\144"); $this->db->where("\x65\62\x5f\160\141\164\x2e\x70\x61\164\x5f\143\150\141\162\x74\156\x6f", $chartno); $this->db->where("\157\x74\150\137\162\x65\143\x6f\162\x64\x73\x65\164\137\x63\162\145\141\164\x65\144\137\144\x61\x74\x65", $recordsetCreatedDate); $this->db->where("\x6f\x74\150\137\162\x65\x63\157\162\x64\x73\145\164\x5f\x73\145\161\x5f\x6e\x6f", intval($seqno)); $this->db->limit(1); $select_recordsetid = $this->db->get_compiled_select("\x65\x32\137\157\x72\164\150\157\x5f\x72\x65\x63\x6f\x72\144\163\x65\x74\163"); $this->db->where("\x6f\164\x68\x5f\x72\145\143\157\162\x64\163\145\x74\137\x69\x64", "\50{$select_recordsetid}\51", FALSE); $this->db->where("\151\155\147\x5f\151\144", "\x28{$select_imgid}\51", FALSE); $this->db->delete("\145\62\x5f\157\162\x74\150\x6f\x5f\162\x65\143\157\162\x64\x73\x65\164\x5f\151\155\141\147\x65\163"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_RecordsetImages($sRecordsetImageParameterInfo) { load_database($this, "\x45\x32\104\x42"); $this->db->join("\145\x32\x5f\x6f\162\x74\x68\157\x5f\x69\x6d\x61\147\145\137\155\x6f\144\141\154\151\x74\x69\145\163", "\x65\x32\137\x6f\162\x74\150\157\x5f\151\x6d\x61\x67\145\x5f\155\x6f\144\141\x6c\x69\x74\x69\x65\x73\56\157\x74\x68\x5f\x69\155\x67\137\x6d\x6f\x64\x61\154\x69\x74\x79\137\151\144\x20\x3d\x20\145\x32\x5f\x6f\162\x74\x68\157\137\162\145\143\157\x72\x64\163\145\x74\137\151\x6d\141\147\145\163\x2e\157\x74\150\x5f\x69\x6d\x67\x5f\x6d\x6f\x64\x61\154\151\x74\x79\137\151\144"); $this->db->join("\x65\x32\137\x6f\162\164\150\x6f\x5f\162\x65\143\157\162\x64\163\145\x74\163", "\x65\62\137\157\162\164\x68\157\137\x72\x65\143\157\x72\x64\163\x65\164\163\x2e\157\164\150\137\162\145\x63\157\162\x64\x73\x65\x74\137\151\x64\40\x3d\40\145\x32\x5f\157\162\x74\150\x6f\x5f\x72\145\x63\x6f\162\x64\x73\x65\x74\137\x69\x6d\x61\x67\x65\163\56\x6f\x74\x68\x5f\162\x65\143\x6f\162\144\x73\145\164\x5f\x69\x64"); $this->db->join("\x65\62\137\160\141\x74", "\x65\x32\x5f\160\x61\x74\56\x70\141\164\x5f\151\144\x20\x3d\40\145\62\x5f\x6f\162\x74\x68\157\137\x72\145\143\x6f\162\144\163\x65\x74\163\56\x70\141\164\137\151\x64"); $this->db->join("\x65\x32\137\x69\155\147", "\145\62\137\151\155\x67\56\x69\155\147\137\x69\x64\x20\x3d\x20\145\62\x5f\x6f\162\164\150\157\137\x72\x65\143\x6f\162\x64\163\x65\x74\x5f\x69\155\x61\x67\x65\x73\x2e\151\155\147\x5f\x69\x64"); $this->db->where("\154\x6f\x77\145\x72\50\145\x32\137\157\162\x74\x68\x6f\137\x69\155\x61\x67\145\137\x6d\157\144\141\x6c\x69\x74\x69\145\x73\x2e\157\164\x68\137\x69\x6d\147\x5f\x6d\157\144\x61\154\x69\x74\x79\137\x6e\141\155\145\x29", strtolower($sRecordsetImageParameterInfo->modality)); $this->db->where("\154\157\x77\145\x72\50\x65\62\x5f\151\155\x67\x2e\151\155\x67\137\x66\x69\154\145\x6e\141\155\x65\51", strtolower($sRecordsetImageParameterInfo->fileName)); $this->db->where("\145\x32\x5f\x70\141\164\56\x70\x61\x74\x5f\143\x68\141\162\x74\156\x6f", $sRecordsetImageParameterInfo->chartNo); $this->db->where("\145\62\137\x6f\x72\164\150\157\137\162\145\x63\157\162\x64\x73\x65\164\x73\x2e\157\164\x68\x5f\x72\x65\x63\157\162\144\163\x65\164\137\x63\x72\x65\x61\164\145\144\x5f\x64\x61\164\145", $sRecordsetImageParameterInfo->createdDate); $this->db->where("\x65\62\x5f\x6f\162\x74\150\157\x5f\162\145\143\157\x72\144\x73\x65\x74\163\x2e\x6f\x74\150\x5f\x72\x65\x63\x6f\162\144\x73\x65\164\137\x73\145\161\x5f\x6e\157", $sRecordsetImageParameterInfo->seqNo); $q = $this->db->get("\145\62\x5f\x6f\x72\164\150\157\137\x72\x65\x63\157\x72\144\163\x65\164\137\x69\155\141\x67\145\163"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $this->db->select("\x69\155\147\x5f\151\144"); $this->db->where("\154\x6f\x77\x65\x72\50\x69\x6d\x67\137\146\x69\x6c\145\156\x61\x6d\145\x29", strtolower($sRecordsetImageParameterInfo->fileName)); $this->db->limit(1); $row = $this->db->get("\145\x32\x5f\151\x6d\x67")->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $select_imgid = $row->img_id; $this->db->select("\x6f\164\x68\137\x69\155\147\137\x6d\x6f\144\141\154\151\x74\x79\137\151\144"); $this->db->where("\154\157\167\145\x72\50\x6f\x74\150\x5f\x69\155\x67\137\x6d\x6f\x64\x61\154\151\x74\x79\137\156\x61\x6d\145\51", strtolower($sRecordsetImageParameterInfo->modality)); $this->db->limit(1); $select_modalityid = $this->db->get_compiled_select("\x65\62\x5f\x6f\162\x74\150\157\x5f\151\155\x61\x67\145\137\x6d\157\144\x61\x6c\x69\164\151\145\x73"); $this->db->select("\x6f\x74\x68\137\x72\145\x63\x6f\x72\x64\163\x65\164\137\x69\x64"); $this->db->join("\x65\62\x5f\160\141\x74", "\145\62\137\x70\x61\x74\56\160\x61\164\137\151\x64\x3d\145\62\x5f\x6f\162\164\150\x6f\137\162\145\143\157\x72\144\163\x65\x74\163\x2e\x70\x61\x74\137\151\x64"); $this->db->where("\145\62\x5f\160\x61\164\56\160\141\x74\x5f\143\x68\x61\162\164\x6e\157", $sRecordsetImageParameterInfo->chartNo); $this->db->where("\157\x74\x68\x5f\x72\x65\x63\157\162\x64\163\145\x74\x5f\143\x72\145\141\164\145\144\x5f\144\141\164\x65", $sRecordsetImageParameterInfo->createdDate); $this->db->where("\x6f\x74\x68\x5f\162\x65\x63\157\162\x64\x73\x65\x74\137\x73\145\x71\137\x6e\x6f", $sRecordsetImageParameterInfo->seqNo); $this->db->limit(1); $row = $this->db->get("\x65\62\x5f\x6f\162\164\x68\x6f\137\x72\145\x63\157\162\x64\163\x65\164\x73")->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $select_recordsetid = $row->oth_recordset_id; $this->db->set("\x69\x6d\147\x5f\151\144", $select_imgid); $this->db->set("\157\x74\x68\137\x69\x6d\147\x5f\x6d\157\x64\x61\154\151\164\171\137\x69\x64", "\x28{$select_modalityid}\51", FALSE); $this->db->set("\157\164\150\x5f\162\x65\143\x6f\x72\x64\x73\145\164\137\x69\144", "\x28{$select_recordsetid}\x29", FALSE); $this->db->set("\x6f\164\150\137\x72\145\x63\157\x72\144\x73\145\164\137\x69\x6d\x67\x5f\x69\155\160\x6f\x72\164\x65\144\x5f\x64\141\164\145\164\x69\155\145", currentDateFormat(DATEFORMAT_DATABASE)); $this->db->insert("\x65\62\137\x6f\x72\164\150\x6f\137\x72\145\143\157\x72\x64\x73\145\x74\137\151\155\141\x67\145\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_RecordsetImages($sRecordsetImageParameterInfo) { load_database($this, "\105\x32\104\102"); $this->db->select("\145\62\x5f\x6f\x72\x74\150\157\137\x72\x65\x63\x6f\162\144\x73\x65\164\x5f\x69\x6d\x61\147\145\163\x2e\157\x74\x68\137\x72\145\x63\x6f\162\x64\163\x65\164\x5f\151\155\x61\x67\x65\137\x69\x64\54\x65\62\x5f\157\162\x74\150\157\137\162\145\x63\157\162\x64\x73\145\x74\x5f\151\155\x61\x67\x65\163\x2e\x6f\x74\150\x5f\162\x65\x63\157\162\x64\163\145\x74\x5f\x69\144\x2c\145\x32\137\x6f\162\x74\150\157\x5f\162\x65\143\x6f\162\144\x73\145\164\137\x69\155\x61\147\145\163\56\x6f\164\150\x5f\151\x6d\x67\x5f\155\157\x64\x61\x6c\x69\x74\171\137\151\x64"); $this->db->join("\145\x32\137\x6f\x72\x74\x68\157\x5f\162\145\143\157\x72\144\x73\145\x74\163", "\x65\62\137\x6f\162\x74\150\x6f\x5f\162\x65\x63\157\x72\x64\163\145\164\x73\56\157\x74\x68\137\x72\145\143\157\162\144\x73\x65\164\137\x69\x64\x20\75\40\x65\x32\137\157\x72\164\150\157\137\x72\x65\143\x6f\x72\x64\163\x65\x74\x5f\x69\x6d\141\x67\145\x73\x2e\x6f\x74\150\137\x72\x65\143\157\x72\144\x73\x65\x74\x5f\x69\x64"); $this->db->join("\145\x32\137\160\x61\164", "\x65\62\137\160\141\164\x2e\160\141\164\x5f\151\144\40\75\40\x65\x32\x5f\x6f\162\164\x68\x6f\137\162\145\x63\x6f\162\144\x73\145\x74\x73\x2e\x70\x61\164\x5f\151\144"); $this->db->join("\145\62\137\x69\x6d\147", "\145\62\137\x69\155\x67\56\x69\x6d\x67\137\151\144\x20\x3d\40\145\x32\137\x6f\x72\x74\x68\x6f\137\x72\145\x63\157\162\144\x73\145\164\137\x69\155\141\147\x65\163\x2e\151\155\147\137\x69\144"); $this->db->where("\x6c\157\x77\145\x72\50\x65\x32\137\151\x6d\147\x2e\x69\x6d\x67\x5f\x66\151\154\x65\x6e\141\155\145\51", strtolower($sRecordsetImageParameterInfo->fileName)); $this->db->where("\x65\x32\x5f\x70\141\164\56\160\141\164\x5f\x63\150\141\162\164\156\x6f", $sRecordsetImageParameterInfo->chartNo); $this->db->where("\x65\x32\137\x6f\162\x74\x68\x6f\137\x72\145\x63\157\x72\x64\163\x65\x74\x73\56\x6f\x74\150\x5f\x72\145\x63\157\162\144\x73\145\x74\137\143\162\145\141\x74\x65\144\137\144\x61\x74\145", $sRecordsetImageParameterInfo->createdDate); $this->db->where("\145\62\137\157\162\x74\x68\x6f\x5f\x72\x65\x63\157\162\144\163\x65\x74\163\56\157\164\150\137\x72\x65\143\157\x72\144\163\145\x74\137\163\x65\161\x5f\x6e\x6f", $sRecordsetImageParameterInfo->seqNo); $row = $this->db->get("\x65\62\137\x6f\x72\164\x68\x6f\137\x72\145\x63\157\162\144\x73\x65\164\137\x69\x6d\x61\147\145\163")->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $recordset_image_id = $row->oth_recordset_image_id; if (isset($sRecordsetImageParameterInfo->registeredFileName)) { $recordset_id = $row->oth_recordset_id; $this->db->select("\x65\62\x5f\157\x72\164\150\157\137\x72\145\143\x6f\x72\144\163\x65\x74\137\x69\155\x61\147\145\x73\56\x6f\x74\x68\x5f\162\x65\x63\157\162\x64\163\145\x74\137\151\155\x61\147\145\137\x69\144"); $this->db->join("\x65\62\x5f\151\155\147", "\145\x32\x5f\151\155\x67\56\x69\155\147\x5f\151\144\40\75\40\x65\62\137\x6f\162\x74\150\x6f\137\x72\145\x63\x6f\162\x64\x73\145\x74\x5f\x69\155\x61\147\x65\163\56\x69\155\x67\x5f\x69\144"); $this->db->where("\154\157\x77\x65\162\50\145\x32\137\151\155\147\56\151\x6d\x67\137\x66\x69\154\145\156\141\x6d\145\51", strtolower($sRecordsetImageParameterInfo->registeredFileName)); $this->db->where("\145\62\137\157\162\x74\150\x6f\137\x72\145\143\157\x72\x64\x73\x65\164\137\151\x6d\141\147\x65\163\x2e\x6f\164\x68\x5f\162\x65\x63\157\162\x64\x73\x65\164\137\151\144", $recordset_id); $this->db->limit(1); $registered_recordset_image_id = $this->db->get_compiled_select("\x65\62\x5f\157\x72\x74\150\157\x5f\x72\x65\x63\x6f\162\144\163\145\164\137\151\x6d\141\147\x65\x73"); $this->db->set("\x6f\164\x68\x5f\162\145\x63\157\x72\x64\163\x65\x74\137\x72\x65\147\151\x73\164\145\162\x65\144\137\x69\x6d\147\x5f\151\x64", "\x28{$registered_recordset_image_id}\x29", FALSE); } if (isset($sRecordsetImageParameterInfo->isTraced)) { $this->db->set("\x6f\x74\150\x5f\x72\145\143\x6f\x72\144\163\x65\164\137\x69\x6d\147\137\141\x6e\141\x6c\171\x7a\145\x64", $sRecordsetImageParameterInfo->isTraced); $this->db->set("\157\x74\x68\x5f\162\x65\x63\157\162\144\x73\145\164\x5f\151\x6d\147\137\141\x6e\x61\x6c\171\172\x65\144\137\144\x61\x74\145\x74\x69\155\145", currentDateFormat(DATEFORMAT_DATABASE)); } $this->db->where("\x6f\x74\150\x5f\x72\145\143\157\x72\x64\163\145\164\137\x69\x6d\141\147\x65\x5f\x69\x64", $recordset_image_id); $this->db->update("\145\62\x5f\x6f\x72\164\150\x6f\x5f\x72\145\x63\x6f\162\x64\x73\145\164\137\151\x6d\x61\147\x65\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function get_RecordsetImages($chartno, $createdDate, $seqno) { load_database($this, "\105\x32\x44\x42"); $recordsetCreatedDate = currentDateFormat(DATEFORMAT_DATABASE, $createdDate); $this->db->select("\145\x32\137\157\162\164\150\x6f\x5f\151\x6d\141\x67\145\x5f\x6d\x6f\144\141\x6c\x69\164\x69\x65\163\x2e\157\x74\x68\x5f\x69\155\147\137\155\x6f\x64\141\x6c\x69\164\171\x5f\x6e\x61\155\x65\x2c\x65\62\x5f\157\x72\x74\x68\x6f\x5f\162\x65\143\157\x72\144\163\145\x74\x5f\151\155\x61\147\145\x73\56\157\164\x68\x5f\x72\x65\143\157\x72\144\x73\x65\x74\x5f\151\x6d\147\137\151\155\x70\x6f\162\x74\145\144\x5f\144\x61\x74\145\x74\x69\155\x65\54\145\62\137\151\155\147\56\151\155\x67\137\146\x69\154\145\156\141\x6d\145\54\145\x32\137\x6f\x72\x74\x68\157\137\162\145\143\157\x72\144\163\145\164\137\x69\155\x61\x67\x65\x73\x2e\157\164\x68\137\162\145\143\x6f\x72\x64\163\145\164\x5f\x69\x6d\147\x5f\141\156\141\154\x79\x7a\x65\x64\54\x65\x32\137\157\162\x74\150\x6f\x5f\x72\x65\143\157\162\x64\x73\x65\164\x5f\x69\x6d\141\x67\145\163\56\x6f\x74\150\x5f\x72\x65\143\x6f\162\x64\163\x65\164\137\x69\x6d\147\137\x61\156\141\154\171\172\145\144\137\x64\141\x74\x65\x74\151\155\145\54\162\145\x67\137\151\x6d\147\56\151\155\x67\137\x66\x69\x6c\x65\156\141\155\x65\x20\141\x73\40\x72\145\147\x69\163\x74\145\162\x65\144\x46\151\154\145\116\x61\x6d\145"); $this->db->from("\145\x32\x5f\x6f\x72\x74\150\157\x5f\x72\145\143\x6f\162\x64\163\145\x74\137\x69\155\141\147\145\x73"); $this->db->join("\x65\x32\137\x6f\162\x74\150\x6f\x5f\151\x6d\x61\x67\x65\x5f\x6d\157\144\141\154\151\x74\x69\x65\163", "\145\x32\137\x6f\x72\164\150\x6f\137\x69\155\x61\147\x65\137\x6d\157\144\x61\154\x69\164\151\x65\163\x2e\157\164\150\x5f\x69\155\x67\137\x6d\x6f\144\x61\x6c\151\x74\x79\137\151\144\40\75\40\145\x32\x5f\x6f\x72\x74\x68\x6f\137\x72\x65\143\157\x72\x64\x73\145\x74\x5f\x69\155\x61\x67\145\163\x2e\157\x74\150\x5f\x69\x6d\x67\137\155\157\144\x61\154\151\164\x79\x5f\151\x64"); $this->db->join("\145\x32\137\x6f\x72\164\150\x6f\x5f\x72\145\x63\157\x72\x64\163\145\164\x73", "\145\62\x5f\157\162\x74\x68\x6f\137\162\145\143\x6f\162\x64\163\145\x74\163\56\157\x74\150\137\162\145\143\x6f\162\x64\163\145\x74\137\x69\x64\40\75\x20\145\x32\137\157\x72\164\150\x6f\x5f\162\x65\143\x6f\x72\x64\x73\145\x74\137\x69\155\141\x67\x65\x73\x2e\x6f\x74\x68\137\x72\145\143\157\x72\144\x73\x65\164\x5f\x69\144"); $this->db->join("\145\62\x5f\x70\x61\x74", "\145\62\137\x70\141\x74\56\160\x61\164\137\151\x64\x20\75\x20\145\62\137\157\x72\x74\150\157\x5f\162\x65\x63\x6f\162\144\163\145\x74\x73\x2e\160\141\164\x5f\x69\144"); $this->db->join("\x65\62\x5f\x69\155\x67", "\145\62\137\x69\x6d\x67\56\x69\x6d\x67\x5f\x69\x64\x20\x3d\40\145\62\x5f\x6f\x72\164\150\x6f\x5f\x72\x65\143\x6f\x72\x64\163\x65\x74\x5f\x69\155\141\147\145\163\x2e\151\x6d\147\137\x69\144"); $this->db->join("\x65\x32\x5f\157\x72\x74\150\x6f\137\162\145\143\x6f\x72\144\163\145\164\137\151\x6d\141\x67\x65\163\x20\141\163\x20\162\x65\x67\137\162\x65\x63\x6f\162\x64\x73\145\164\x5f\x69\155\x67", "\x72\145\x67\137\x72\x65\x63\157\162\144\x73\145\x74\137\151\155\x67\x2e\x6f\164\150\x5f\x72\x65\x63\157\x72\144\163\145\164\137\151\x6d\x61\x67\x65\x5f\x69\x64\40\x3d\40\145\62\137\x6f\162\164\150\x6f\137\162\x65\x63\157\x72\x64\x73\145\x74\x5f\x69\x6d\x61\x67\145\x73\x2e\157\164\x68\x5f\162\145\x63\157\x72\144\x73\x65\164\x5f\162\145\x67\151\163\164\x65\x72\145\x64\x5f\x69\x6d\x67\137\151\144", "\154\145\146\x74"); $this->db->join("\x65\62\137\x69\x6d\x67\40\141\x73\x20\x72\145\147\x5f\151\x6d\147", "\x72\x65\147\137\x69\x6d\x67\56\x69\155\x67\137\151\144\40\x3d\40\x72\145\147\137\x72\x65\x63\x6f\x72\144\163\145\x74\x5f\x69\x6d\147\56\x69\155\x67\x5f\151\144", "\x6c\145\146\164"); $this->db->where("\x65\62\x5f\x70\141\x74\56\x70\141\164\x5f\x63\150\x61\x72\x74\156\x6f", $chartno); $this->db->where("\x65\62\x5f\157\162\164\150\157\x5f\162\x65\143\x6f\162\144\163\145\164\x73\56\x6f\x74\x68\137\x72\145\x63\x6f\x72\144\163\x65\x74\137\143\162\x65\x61\164\x65\144\x5f\144\141\164\x65", $recordsetCreatedDate); $this->db->where("\145\62\137\x6f\x72\164\150\x6f\137\x72\145\x63\157\162\x64\x73\x65\164\163\x2e\157\x74\150\137\x72\145\143\157\162\x64\x73\x65\x74\137\x73\x65\x71\137\x6e\157", intval($seqno)); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sRecordsetImageInfo = new SRecordsetImageInfo($row); array_push($items, $sRecordsetImageInfo); } return ["\145\162\162\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\162\145\x63\x6f\162\144\x73\145\x74\111\x6d\x61\147\145\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function insertE2ImageForModelUnitTest($img_fileName) { load_database($this, "\105\x32\x44\x42"); $this->db->set("\151\155\147\x5f\x66\151\154\145\156\141\x6d\145", $img_fileName); $this->db->insert("\145\62\137\x69\x6d\147"); } public function deleteE2ImageForModelUnitTest($img_fileName) { load_database($this, "\105\62\x44\102"); $this->db->where("\151\155\x67\x5f\x66\x69\x6c\x65\x6e\141\155\145", $img_fileName); $this->db->delete("\x65\62\x5f\x69\x6d\147"); } } diff --git a/server/original/www/ezwebserver/src/application/models/RecordsetModalities_model.php b/server/original/www/ezwebserver/src/application/models/RecordsetModalities_model.php index c33287c..8977cf2 100644 --- a/server/original/www/ezwebserver/src/application/models/RecordsetModalities_model.php +++ b/server/original/www/ezwebserver/src/application/models/RecordsetModalities_model.php @@ -1,7 +1,7 @@ db->select("\157\164\150\137\151\x6d\147\137\x6d\157\144\141\x6c\x69\164\171\137\x6e\141\155\145\54\x6f\164\150\137\151\x6d\x67\137\155\x6f\x64\141\x6c\x69\x74\171\x5f\x6c\141\142\145\154"); $this->db->from("\145\x32\137\157\x72\164\x68\x6f\137\x69\x6d\141\x67\145\x5f\x6d\x6f\144\141\154\x69\164\151\145\163"); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sRecordsetModality = new SRecordsetModality($row); array_push($items, $sRecordsetModality); } return ["\x65\162\x72\x6f\x72\x43\x6f\144\x65" => VERR_COMMON_SUCCESS, "\155\x6f\144\x61\x6c\x69\164\151\145\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_RecordsetModalitiesP2() { load_database($this, "\105\62\x44\102"); $modalityNames = array("\103\145\x70\x68\x61\154\x6f\137\x50\x41", "\x43\145\x70\x68\141\154\157\137\x4c\141\x74\x65\x72\141\154", "\x43\x65\x70\150\141\x6c\x6f\137\123\115\126", "\x4d\x6f\x64\x65\x6c\120\x68\157\164\x6f"); $this->db->select("\x6f\x74\150\x5f\151\x6d\x67\137\x6d\x6f\x64\x61\154\x69\x74\x79\x5f\156\141\x6d\x65\x2c\157\x74\x68\x5f\151\155\147\x5f\155\157\144\x61\154\x69\x74\171\x5f\154\x61\142\145\x6c"); $this->db->from("\x65\x32\x5f\157\162\x74\x68\157\137\151\x6d\141\147\145\137\x6d\x6f\x64\141\x6c\151\164\x69\145\x73"); $this->db->where_in("\157\164\x68\137\151\155\147\x5f\x6d\x6f\144\x61\154\x69\164\x79\137\156\141\155\x65", $modalityNames); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sRecordsetModality = new SRecordsetModality($row); array_push($items, $sRecordsetModality); } return ["\x65\162\162\157\162\103\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\155\157\x64\x61\154\151\164\x69\145\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/RecordsetStages_model.php b/server/original/www/ezwebserver/src/application/models/RecordsetStages_model.php index 5ed1651..f09761d 100644 --- a/server/original/www/ezwebserver/src/application/models/RecordsetStages_model.php +++ b/server/original/www/ezwebserver/src/application/models/RecordsetStages_model.php @@ -1,7 +1,7 @@ db->select("\x6f\164\x68\x5f\164\x72\x65\141\x74\155\x65\x6e\x74\137\163\164\141\147\145\137\156\141\155\x65"); $this->db->from("\x65\x32\x5f\157\x72\x74\x68\157\137\164\x72\145\x61\x74\155\x65\156\x74\x5f\x73\x74\141\147\x65\163"); $result = $this->db->get()->result_array(); if (count($result) > 0) { return ["\x65\162\162\x6f\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x72\x65\x63\157\162\144\x73\x65\164\123\x74\x61\x67\145\x4e\141\x6d\x65\163" => array_column($result, "\x6f\x74\150\x5f\164\x72\x65\x61\164\x6d\x65\156\164\137\x73\164\141\147\x65\x5f\156\141\x6d\x65")]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Recordsets_model.php b/server/original/www/ezwebserver/src/application/models/Recordsets_model.php index c1ef569..42f37a4 100644 --- a/server/original/www/ezwebserver/src/application/models/Recordsets_model.php +++ b/server/original/www/ezwebserver/src/application/models/Recordsets_model.php @@ -1,7 +1,7 @@ db->select("\x65\x32\137\x6f\162\164\150\x6f\137\162\x65\x63\x6f\x72\x64\163\x65\x74\163\x2e\157\x74\x68\137\162\x65\143\157\x72\x64\163\x65\164\x5f\143\x72\x65\x61\164\145\144\137\x64\x61\164\145\x2c\145\62\137\157\x72\164\150\x6f\137\x72\145\x63\157\x72\144\x73\x65\x74\x73\x2e\x6f\164\x68\137\x72\x65\x63\157\x72\144\x73\145\x74\x5f\x73\x65\161\x5f\156\x6f\54\x65\x32\x5f\x6f\162\164\x68\157\x5f\164\x72\x65\x61\164\x6d\145\156\x74\137\163\164\141\x67\145\x73\56\x6f\164\150\137\164\x72\x65\x61\164\x6d\145\x6e\x74\137\163\x74\x61\147\x65\137\x6e\141\155\x65\x2c\x65\x32\137\157\162\x74\x68\157\x5f\x72\145\x63\157\162\x64\x73\x65\x74\x73\x2e\157\x74\150\137\x72\145\x63\x6f\162\144\163\145\164\x5f\x64\x65\x6e\x74\141\154\x61\147\145\x2c\145\62\x5f\x6f\162\x74\x68\x6f\x5f\162\x65\x63\x6f\162\144\163\x65\x74\163\56\x6f\x74\150\137\x72\x65\x63\157\162\x64\x73\145\164\137\144\145\x73\x63\162\x69\x70\x74\x69\x6f\x6e\54\145\x32\137\x6f\x72\x74\150\x6f\137\143\x6c\x61\163\163\x69\146\x69\143\141\x74\x69\157\x6e\56\x6f\x74\x68\x5f\143\154\x61\163\x73\x5f\156\141\155\145"); $this->db->from("\145\x32\137\x6f\162\x74\150\x6f\x5f\x72\x65\143\157\x72\x64\163\145\164\163"); $this->db->join("\x65\62\x5f\160\141\x74", "\x65\62\137\157\x72\x74\x68\x6f\137\162\x65\x63\x6f\162\144\x73\x65\164\163\56\160\141\164\x5f\151\x64\75\x65\62\137\x70\141\x74\x2e\160\141\164\x5f\151\144"); $this->db->join("\x65\x32\x5f\157\x72\164\150\157\137\164\x72\145\x61\164\155\145\156\164\x5f\163\x74\x61\147\x65\163", "\145\62\137\157\x72\164\150\x6f\x5f\x72\x65\143\x6f\x72\x64\x73\x65\x74\x73\56\157\x74\150\x5f\164\x72\145\141\x74\x6d\145\156\164\137\163\164\x61\x67\x65\x5f\151\144\75\145\62\137\157\x72\164\x68\x6f\137\164\x72\x65\x61\164\x6d\145\x6e\x74\x5f\163\164\141\x67\145\x73\x2e\x6f\164\150\x5f\164\x72\145\141\164\155\145\x6e\x74\x5f\x73\164\x61\147\x65\137\x69\144", "\x6c\x65\x66\x74"); $this->db->join("\x65\62\137\157\x72\x74\x68\157\137\143\154\x61\163\x73\151\146\x69\143\141\164\151\x6f\156", "\x65\x32\x5f\157\162\164\x68\x6f\x5f\x72\x65\143\x6f\162\144\163\x65\x74\x73\x2e\157\x74\x68\x5f\143\x6c\x61\x73\163\137\x69\x64\x3d\145\x32\137\x6f\162\x74\150\x6f\137\143\x6c\x61\163\x73\x69\x66\x69\x63\141\x74\151\x6f\x6e\x2e\157\164\x68\x5f\x63\x6c\141\163\x73\137\x69\x64", "\154\x65\146\164"); $this->db->where("\145\x32\137\160\141\x74\56\x70\x61\164\x5f\143\150\x61\162\164\x6e\157", $chartno); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sRecordsetInfo = new SRecordsetInfo($row); array_push($items, $sRecordsetInfo); } return ["\x65\162\x72\157\162\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\x72\145\143\x6f\x72\144\163\x65\x74\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function delete_Recordsets($chartno, $createddate, $seqno) { load_database($this, "\105\x32\x44\102"); $recordsetCreateddate = currentDateFormat(DATEFORMAT_DATABASE, $createddate); $this->db->select("\x70\x61\x74\x5f\x69\x64"); $this->db->where("\x70\141\164\x5f\143\x68\141\162\x74\156\157", $chartno); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\x32\137\x70\141\164"); $this->db->where("\x6f\x74\x68\137\162\x65\x63\x6f\x72\144\x73\x65\164\x5f\143\x72\x65\x61\164\x65\144\137\144\x61\x74\145", $recordsetCreateddate); $this->db->where("\157\164\150\137\162\x65\x63\157\x72\144\x73\x65\x74\x5f\x73\x65\x71\x5f\156\157", intval($seqno)); $this->db->where("\x70\x61\x74\x5f\151\144", "\50{$select_patid}\x29", FALSE); $this->db->delete("\145\x32\x5f\x6f\x72\x74\x68\157\x5f\x72\145\x63\x6f\x72\144\x73\145\164\x73"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Recordsets($sRecordsetParameterInfo) { load_database($this, "\x45\62\104\x42"); $this->db->trans_begin(); $this->db->select("\160\141\164\x5f\x69\144"); $this->db->where("\160\141\x74\137\143\x68\x61\x72\x74\156\157", $sRecordsetParameterInfo->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\62\137\x70\x61\x74"); $this->db->select("\x43\x4f\x41\114\x45\x53\x43\105\50\x4d\x41\x58\x28\x6f\x74\150\137\x72\145\x63\157\x72\x64\x73\x65\164\137\163\x65\x71\137\156\157\x29\54\x20\60\51\40\53\x20\x31\40\x61\163\40\x73\145\x71\x5f\x6e\x6f"); $this->db->from("\145\62\137\157\x72\x74\150\157\x5f\162\145\x63\x6f\162\144\x73\145\164\163"); $this->db->where("\157\x74\x68\137\x72\x65\143\157\162\x64\x73\x65\164\x5f\143\162\145\x61\164\x65\x64\x5f\x64\141\164\x65", $sRecordsetParameterInfo->createdDate); $this->db->where("\160\141\x74\137\151\144", "\50{$select_patid}\51", FALSE); $resultSeqNo = $this->db->get()->row(); if ($resultSeqNo === false || !isset($resultSeqNo)) { vt_loge(__METHOD__ . "\72\40\x46\141\x69\x6c\145\x64\40\164\x6f\40\x67\x65\164\40\163\x65\x71\116\157\x2e\40\104\145\x66\x61\165\154\164\40\166\141\x6c\165\145\x28\61\51\40\x69\x73\40\x75\163\x65\x64\40\x69\156\163\x74\x65\141\x64\56"); $seqNo = 1; } else { $seqNo = (int) $resultSeqNo->seq_no; } $this->db->select("\x6f\164\x68\x5f\x74\x72\x65\x61\164\x6d\145\156\x74\137\163\164\x61\x67\x65\x5f\151\144"); $this->db->where("\154\157\x77\x65\162\50\157\164\150\137\x74\x72\x65\x61\x74\155\145\x6e\164\x5f\163\164\141\x67\x65\x5f\156\x61\x6d\145\x29", strtolower($sRecordsetParameterInfo->recordsetStage)); $this->db->limit(1); $select_stageid = $this->db->get_compiled_select("\145\62\137\157\162\164\x68\157\x5f\164\x72\x65\x61\164\155\x65\156\x74\x5f\x73\164\141\x67\x65\163"); $this->db->select("\x6f\x74\150\137\143\x6c\141\x73\x73\x5f\x69\x64"); $this->db->where("\154\x6f\167\145\x72\50\x6f\164\x68\137\x63\154\x61\163\163\x5f\156\141\155\x65\51", strtolower($sRecordsetParameterInfo->classification)); $this->db->limit(1); $select_classid = $this->db->get_compiled_select("\x65\62\137\x6f\x72\x74\150\157\137\143\154\x61\x73\163\151\146\x69\x63\141\x74\151\157\x6e"); $this->db->set("\157\164\x68\x5f\x72\145\143\157\x72\x64\x73\x65\164\x5f\x63\x72\x65\x61\164\x65\144\137\x64\x61\x74\x65", $sRecordsetParameterInfo->createdDate); $this->db->set("\x6f\164\x68\x5f\162\145\x63\157\162\144\163\145\164\x5f\x64\x65\156\164\x61\154\x61\147\145", $sRecordsetParameterInfo->dentalAge); $this->db->set("\x6f\164\x68\137\x72\145\143\x6f\162\x64\163\145\164\137\x64\145\x73\143\162\151\x70\x74\151\157\x6e", $sRecordsetParameterInfo->description); $this->db->set("\x6f\x74\150\x5f\x72\145\x63\157\162\x64\163\145\x74\137\x73\x65\161\137\156\157", $seqNo); $this->db->set("\x70\x61\x74\x5f\x69\x64", "\50{$select_patid}\x29", FALSE); $this->db->set("\x6f\164\x68\x5f\x74\x72\x65\141\x74\x6d\145\x6e\x74\137\x73\x74\x61\147\145\137\x69\x64", "\50{$select_stageid}\51", FALSE); $this->db->set("\157\164\x68\x5f\143\x6c\x61\x73\x73\137\151\x64", "\50{$select_classid}\x29", FALSE); $this->db->insert("\x65\62\x5f\x6f\162\164\x68\x6f\137\x72\x65\x63\x6f\162\x64\x73\145\x74\163"); if ($this->db->affected_rows() > 0) { $this->db->trans_commit(); $response = array("\x65\x72\x72\x6f\x72\103\157\x64\145" => VERR_COMMON_SUCCESS, "\163\145\161\x4e\157" => $seqNo); } else { $this->db->trans_rollback(); vt_loge(__METHOD__ . "\72\x20\x46\x61\151\154\145\144\x20\x74\x6f\40\x61\144\x64\x20\156\x65\x77\40\x72\x65\x63\157\x72\x64\163\145\164\56\40\x73\145\161\x4e\157\x3a\40" . $seqNo . "\x2c\x20\162\x65\x63\157\x72\144\x73\x65\164\x3a\40" . json_encode($sRecordsetParameterInfo)); $response = createResponse(VERR_DB_INVALIDDATA); } return $response; } public function put_Recordsets($sRecordsetParameterInfo) { load_database($this, "\105\62\x44\x42"); $this->db->select("\x65\x32\137\157\x72\164\150\157\137\x72\x65\x63\157\x72\144\163\145\x74\x73\56\157\x74\x68\x5f\x72\x65\143\x6f\x72\144\163\x65\164\x5f\x69\x64\54\145\62\137\157\162\164\150\x6f\137\x72\145\x63\157\162\x64\x73\145\164\x73\56\160\x61\x74\137\151\144"); $this->db->from("\145\62\x5f\157\162\164\x68\x6f\137\162\x65\x63\157\x72\144\163\145\164\x73"); $this->db->join("\145\62\x5f\x70\x61\x74", "\x65\62\137\160\141\x74\56\160\141\x74\137\151\144\40\75\40\145\62\137\157\162\164\150\157\x5f\162\x65\143\157\x72\144\x73\x65\164\x73\56\160\141\164\137\151\x64"); $this->db->where("\145\x32\x5f\x70\x61\164\x2e\x70\x61\164\137\143\150\141\x72\x74\x6e\x6f", $sRecordsetParameterInfo->chartNo); $this->db->where("\x65\62\x5f\157\162\164\150\x6f\x5f\x72\145\143\x6f\162\144\x73\145\164\163\56\157\x74\x68\137\x72\x65\x63\157\x72\144\163\x65\164\x5f\143\x72\145\141\164\x65\x64\x5f\x64\141\x74\145", $sRecordsetParameterInfo->createdDate); $this->db->where("\145\62\x5f\157\162\x74\x68\x6f\x5f\162\x65\143\x6f\162\x64\163\x65\164\163\56\x6f\164\150\x5f\x72\x65\143\157\x72\144\163\145\164\137\x73\x65\161\x5f\x6e\157", $sRecordsetParameterInfo->seqNo); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $recordset_id = intval($row->oth_recordset_id); $pat_id = intval($row->pat_id); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $this->db->select("\x6f\164\150\137\164\x72\145\141\164\155\145\x6e\x74\137\163\x74\x61\x67\145\137\x69\x64"); $this->db->where("\154\x6f\x77\145\162\x28\x6f\x74\150\137\164\x72\145\141\x74\155\x65\x6e\x74\x5f\x73\x74\141\x67\145\x5f\156\x61\155\x65\x29", strtolower($sRecordsetParameterInfo->newRecordsetStage)); $this->db->limit(1); $select_stageid = $this->db->get_compiled_select("\x65\x32\137\157\x72\x74\150\x6f\x5f\x74\x72\145\x61\x74\x6d\x65\156\164\x5f\x73\x74\x61\147\145\x73"); $this->db->select("\x6f\x74\150\x5f\143\154\141\x73\x73\x5f\x69\144"); $this->db->where("\x6c\x6f\167\145\162\x28\x6f\164\150\137\143\x6c\141\x73\163\x5f\156\141\x6d\x65\51", strtolower($sRecordsetParameterInfo->newClassification)); $this->db->limit(1); $select_classid = $this->db->get_compiled_select("\145\62\x5f\157\x72\164\x68\157\x5f\x63\154\141\x73\163\151\146\x69\143\x61\164\x69\157\x6e"); if ($sRecordsetParameterInfo->createdDate != $sRecordsetParameterInfo->newCreatedDate) { $this->db->select("\x43\117\101\x4c\105\123\103\x45\50\115\x41\x58\50\157\164\150\x5f\x72\145\143\157\162\144\163\145\x74\137\163\x65\161\x5f\x6e\x6f\51\54\40\60\51\40\x2b\40\x31"); $this->db->where("\157\x74\x68\137\162\145\x63\x6f\162\x64\x73\x65\164\x5f\143\162\x65\x61\164\145\x64\x5f\x64\141\164\x65", $sRecordsetParameterInfo->newCreatedDate); $select_seqno = $this->db->get_compiled_select("\x65\62\x5f\x6f\162\x74\150\x6f\137\162\x65\x63\157\x72\144\x73\145\x74\163"); $this->db->set("\x6f\164\x68\137\162\145\143\157\162\x64\163\x65\164\137\x73\145\x71\137\x6e\157", "\50{$select_seqno}\x29", FALSE); $this->db->set("\157\x74\x68\x5f\162\x65\143\157\x72\144\x73\x65\x74\x5f\x63\162\x65\141\x74\145\144\x5f\144\141\164\x65", $sRecordsetParameterInfo->newCreatedDate); } $this->db->set("\157\164\150\x5f\x72\145\143\x6f\x72\x64\x73\145\x74\137\x64\x65\x6e\164\x61\154\x61\147\x65", $sRecordsetParameterInfo->newDentalAge); $this->db->set("\x6f\164\x68\137\x72\x65\x63\x6f\162\x64\x73\x65\x74\137\144\x65\x73\x63\162\151\160\164\151\x6f\156", $sRecordsetParameterInfo->newDescription); $this->db->set("\x6f\x74\150\137\164\162\x65\x61\x74\155\145\x6e\164\137\x73\164\141\147\x65\137\151\144", "\x28{$select_stageid}\x29", FALSE); $this->db->set("\x6f\164\150\137\143\x6c\x61\163\163\x5f\x69\x64", "\x28{$select_classid}\x29", FALSE); $this->db->where("\157\164\150\137\162\145\x63\157\x72\x64\x73\x65\164\x5f\x69\144", $recordset_id); $this->db->update("\x65\62\137\157\162\x74\150\157\137\162\x65\x63\157\x72\144\x73\x65\x74\163"); if ($this->db->trans_status() === FALSE || $this->db->affected_rows() === 0) { $this->db->trans_rollback(); $response = createResponse(VERR_DB_NOSUCHDATA); } else { $this->db->trans_commit(); $response = createResponse(VERR_COMMON_SUCCESS); } $this->db->db_debug = $db_debug; return $response; } } diff --git a/server/original/www/ezwebserver/src/application/models/Reports_model.php b/server/original/www/ezwebserver/src/application/models/Reports_model.php index 978aa81..ad874ac 100644 --- a/server/original/www/ezwebserver/src/application/models/Reports_model.php +++ b/server/original/www/ezwebserver/src/application/models/Reports_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strFileName))->result_array(); } public function get_ReportsByChartNo($strChartNo) { load_database($this, "\x45\x33\x44\x42"); $sql = "\xa\x20\x20\40\x20\40\40\40\40\40\40\x20\x20\123\x45\114\105\x43\x54\x20\162\x70\x74\137\x69\x6e\144\x65\x78\x2c\40\162\x70\164\137\143\x68\x61\x72\x74\x5f\x6e\157\x2c\40\x72\x70\x74\137\x74\x69\164\154\x65\x2c\40\x72\x70\164\x5f\146\151\x6c\x65\x5f\x6e\141\155\x65\x2c\40\x72\x70\164\137\143\157\155\155\x65\156\164\x2c\40\162\x70\164\137\x63\x72\x65\x61\x74\151\157\x6e\137\x64\141\x74\x65\12\40\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\106\x52\117\x4d\40\164\142\154\x5f\x72\145\x70\x6f\x72\x74\xa\40\x20\x20\40\40\x20\40\x20\x20\40\40\40\x57\110\x45\x52\105\x20\162\x70\164\137\143\150\141\x72\164\x5f\156\x6f\x20\75\40\x3f\12\40\40\x20\x20\x20\x20\40\40\40\x20\x20\x20\x4f\x52\104\105\122\x20\102\x59\40\162\160\x74\137\x63\162\x65\141\164\151\x6f\156\x5f\144\141\x74\x65\40\104\x45\123\103"; return $this->db->query($sql, array($strChartNo))->result_array(); } public function post_ReportsByChartNo($strCharNo, $report) { load_database($this, "\x45\62\x44\102"); $nRptID = 0; $sql = "\12\40\x20\40\x20\x20\40\x20\x20\40\x20\40\40\x53\105\114\105\103\124\x20\x52\x50\x54\137\x49\x44\12\x20\40\40\40\x20\x20\40\x20\40\40\40\x20\x46\122\x4f\115\40\105\62\x5f\122\120\x54\xa\40\40\x20\40\40\40\40\40\40\40\40\x20\x57\110\105\x52\x45\x20\x50\101\124\x5f\x43\110\101\122\x54\x4e\x4f\40\75\40\x3f\x20\x41\116\x44\40\x52\120\124\x5f\x46\111\x4c\x45\116\101\x4d\105\40\x3d\x20\77\12\x20\x20\x20\40\40\40\40\40\40\x20\40\40\114\x49\115\x49\124\x20\x31"; $ret = $this->db->query($sql, array($strCharNo, $report["\x73\x74\x72\122\x70\x74\x46\x69\x6c\145\116\141\155\x65"]))->result_array(); if (count($ret) > 0) { $nRptID = intval($ret[0]["\162\160\164\137\151\x64"]); } if ($nRptID == 0) { $sql = "\xa\x20\40\40\40\x20\x20\40\40\x20\40\40\x20\40\40\40\40\111\116\123\105\x52\x54\x20\x49\116\x54\x4f\x20\105\62\x5f\122\x50\124\x28\12\x20\40\40\40\40\x20\x20\x20\40\x20\x20\40\40\40\40\40\40\40\40\40\122\x50\x54\137\116\x41\x4d\105\54\x20\122\x50\124\137\x46\111\114\x45\116\101\115\105\x2c\40\x52\120\x54\x5f\103\x4f\x4d\115\x45\x4e\x54\54\xa\x20\40\x20\40\x20\x20\x20\x20\40\x20\x20\40\x20\40\40\x20\x20\x20\40\x20\x52\120\x54\137\x43\122\105\x41\124\x45\104\137\104\101\124\105\124\111\x4d\x45\54\120\x41\x54\x5f\111\x44\x2c\120\101\124\137\103\110\x41\x52\124\116\x4f\51\12\x20\x20\x20\40\x20\x20\40\40\40\x20\40\40\x20\x20\x20\x20\126\x41\114\x55\105\123\x28\x3f\54\x3f\x2c\77\54\x3f\x2c\50\123\105\x4c\x45\103\x54\40\x50\101\124\x5f\111\x44\40\106\x52\117\x4d\x20\105\x32\x5f\120\x41\x54\40\x57\x48\105\x52\x45\40\x50\101\124\137\103\x48\x41\122\124\x4e\x4f\40\x3d\40\77\51\x2c\x3f\51"; $this->db->query($sql, array($report["\163\164\x72\122\145\x70\157\162\164\x4e\141\x6d\x65"], $report["\x73\164\x72\122\x70\x74\106\x69\154\x65\x4e\x61\x6d\x65"], $report["\x73\164\x72\103\157\x6d\x6d\145\156\x74"], currentDateFormat(DATEFORMAT_DATABASE, $report["\x64\164\x43\162\145\x61\164\x65\144\x52\160\x74\x54\151\x6d\x65"]), $strCharNo, $strCharNo)); $ret = $this->db->affected_rows(); return $ret; } else { return VERR_DB_OVERLAP; } } public function put_ReportsByChartNo($strChartNo, $report) { load_database($this, "\x45\62\x44\102"); $sql = "\xa\40\40\x20\40\x20\40\40\40\40\x20\x20\40\125\120\x44\x41\x54\x45\x20\105\62\x5f\x52\x50\124\xa\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\x20\123\x45\x54\xa\x20\40\40\x20\40\40\x20\40\40\x20\40\40\x20\40\40\x20\162\160\x74\x5f\x63\157\x6d\x6d\x65\x6e\x74\x20\75\x20\x3f\54\12\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\40\40\x20\40\162\160\164\x5f\143\x72\x65\141\164\x65\x64\x5f\x64\141\x74\145\164\x69\155\x65\40\x3d\x20\x3f\12\40\x20\x20\40\x20\40\40\40\40\40\40\x20\127\x48\105\122\105\40\x70\x61\164\x5f\x63\x68\141\x72\164\156\157\x20\x3d\x20\77\x20\x41\116\104\x20\162\x70\164\x5f\156\141\155\x65\40\75\40\77"; $this->db->query($sql, array($report["\x73\164\162\103\x6f\155\155\145\156\x74"], currentDateFormat(DATEFORMAT_DATABASE, $report["\144\x74\103\162\x65\141\164\145\x64\x52\160\164\x54\151\x6d\x65"]), $strChartNo, $report["\x73\x74\162\x52\145\160\157\x72\x74\116\141\155\x65"])); return $this->db->affected_rows(); } public function delete_ReportsByIndex($nIndex) { load_database($this, "\x45\x33\x44\102"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $sql = "\xa\x20\40\40\40\x20\x20\x20\x20\x20\x20\40\40\104\x45\x4c\105\124\105\x20\106\122\x4f\x4d\40\164\x62\154\137\162\145\x70\157\162\164\12\x20\x20\40\40\x20\x20\40\40\40\x20\40\40\127\x48\105\122\105\40\162\160\x74\x5f\x69\156\144\x65\170\x20\x3d\40\x3f"; $this->db->query($sql, array($nIndex)); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function post_Reports($sE3DBReport) { load_database($this, "\105\63\104\102"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $sql = "\12\40\40\40\40\40\40\40\40\x20\40\40\40\x49\x4e\123\105\122\124\x20\x49\x4e\124\117\x20\x74\x62\x6c\x5f\x72\145\160\x6f\162\x74\50\12\x20\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\x72\160\164\x5f\x63\150\x61\x72\x74\137\x6e\x6f\x2c\40\162\x70\x74\137\x74\x69\x74\x6c\x65\54\x20\x72\160\x74\x5f\146\x69\x6c\x65\x5f\x6e\141\155\145\x2c\x20\x72\x70\164\137\143\x6f\x6d\x6d\145\156\164\x2c\40\x72\x70\164\137\x63\x72\x65\141\x74\151\157\156\137\x64\x61\164\145\51\12\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\x20\x56\x41\114\x55\x45\x53\x20\50\77\x2c\x20\77\x2c\40\x3f\x2c\x20\77\x2c\40\x3f\51"; $this->db->query($sql, array($sE3DBReport["\x73\164\x72\103\150\141\x72\164\116\x6f"], $sE3DBReport["\x73\164\162\x54\151\x74\154\x65"], $sE3DBReport["\x73\164\x72\106\x69\154\145\116\141\155\x65"], $sE3DBReport["\x73\164\x72\x43\x6f\x6d\x6d\145\x6e\x74"], $sE3DBReport["\x74\x69\155\x65\103\162\145\141\x74\151\157\156"])); $this->db->db_debug = $db_debug; return $this->db->affected_rows(); } public function put_Reports($sE3DBReport) { load_database($this, "\105\x33\x44\x42"); $sql = "\12\40\x20\40\x20\x20\40\x20\x20\40\x20\x20\40\x55\x50\x44\x41\x54\x45\x20\x74\x62\154\x5f\x72\x65\x70\157\x72\x74\xa\40\40\x20\x20\40\40\40\40\x20\x20\x20\x20\123\105\x54\12\x20\x20\40\x20\x20\40\x20\40\x20\40\x20\40\x20\x20\40\x20\162\x70\164\x5f\x74\x69\x74\x6c\145\40\75\40\77\54\xa\40\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\40\40\x20\x20\162\160\x74\x5f\146\x69\154\145\137\156\141\155\x65\40\x3d\40\x3f\x2c\12\x20\40\40\x20\40\x20\40\x20\40\x20\40\40\40\x20\x20\x20\x72\160\x74\137\143\x6f\155\x6d\145\x6e\164\x20\x3d\40\77\xa\x20\40\x20\x20\x20\40\x20\40\x20\x20\x20\x20\127\x48\105\122\105\40\x72\160\x74\x5f\151\156\x64\x65\170\40\75\40\x3f"; $this->db->query($sql, array($sE3DBReport["\x73\164\162\x54\x69\x74\154\x65"], $sE3DBReport["\x73\164\x72\106\151\x6c\145\116\141\155\x65"], $sE3DBReport["\x73\164\162\103\157\x6d\155\x65\156\x74"], $sE3DBReport["\156\111\156\x64\145\170"])); return $this->db->affected_rows(); } public function get_ReportsForTemplate() { load_database($this, "\x45\x33\104\102"); $sql = "\xa\x20\x20\40\40\x20\40\40\x20\40\40\40\x20\123\x45\x4c\105\103\124\40\52\xa\x20\40\40\40\x20\x20\x20\40\40\40\x20\x20\106\x52\117\x4d\x20\x74\x62\154\x5f\x72\x65\x70\x6f\x72\164\x74\145\x6d\x70\x6c\x61\x74\x65\xa\40\40\x20\40\x20\x20\x20\40\x20\40\x20\x20\117\122\x44\105\122\40\x42\x59\x20\162\x70\164\x74\155\x70\x5f\151\x6e\x64\145\x78\40\101\x53\x43"; return $this->db->query($sql)->result_array(); } public function delete_ReportsByChartNoAndName($strChartNo, $strReportName) { load_database($this, "\105\x32\104\102"); $sql = "\12\40\x20\x20\x20\40\40\x20\40\40\40\40\x20\x44\105\x4c\105\124\x45\x20\x46\x52\117\x4d\x20\105\x32\137\x52\x50\124\12\40\x20\40\40\40\x20\40\x20\x20\x20\40\x20\x57\110\x45\x52\x45\40\x70\x61\x74\137\143\x68\x61\x72\164\156\157\x20\x3d\x20\77\x20\101\116\x44\40\x72\160\164\137\146\151\154\x65\156\141\155\145\40\x3d\x20\x3f"; $this->db->query($sql, array($strChartNo, $strReportName)); return $this->db->affected_rows(); } public function put_ReportsByChartNoForComment($strChartNo, $parametersOfPutReportsByChartNoForComment) { load_database($this, "\x45\62\104\x42"); $sql = "\xa\x20\40\40\x20\40\x20\x20\40\40\x20\40\x20\x55\120\104\101\124\x45\x20\x65\x32\137\162\160\x74\xa\x20\x20\40\x20\x20\40\x20\x20\40\x20\x20\40\x53\x45\x54\40\162\160\164\x5f\x63\x6f\x6d\155\145\x6e\164\x20\75\x20\77\12\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\x20\x57\110\x45\122\x45\40\160\141\x74\x5f\143\150\141\x72\x74\x6e\157\40\x3d\x20\77\40\x41\116\x44\x20\x72\x70\164\x5f\146\x69\154\x65\x6e\141\155\145\40\x3d\x20\x3f"; $this->db->query($sql, array($parametersOfPutReportsByChartNoForComment["\163\164\162\103\157\x6d\x6d\x65\156\x74"], $strChartNo, $parametersOfPutReportsByChartNoForComment["\163\x74\162\122\145\160\x6f\x72\x74\x46\x69\x6c\145\116\141\x6d\x65"])); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/SAccountInfoR2.php b/server/original/www/ezwebserver/src/application/models/SAccountInfoR2.php index 6a7cf97..ad38c08 100644 --- a/server/original/www/ezwebserver/src/application/models/SAccountInfoR2.php +++ b/server/original/www/ezwebserver/src/application/models/SAccountInfoR2.php @@ -1,7 +1,7 @@ strAccountName = trim($parameters["\163\x74\162\x41\143\x63\157\165\x6e\x74\x4e\141\x6d\145"]); if (array_key_exists("\x73\x74\162\101\x63\143\157\165\156\x74\120\141\163\x73\167\x64", $parameters)) { $accInfo->strAccountPasswd = $parameters["\x73\164\x72\x41\x63\x63\157\165\x6e\x74\120\x61\163\x73\x77\x64"]; } if (array_key_exists("\x73\164\162\x47\x72\x61\x64\145", $parameters)) { $accInfo->strGrade = $parameters["\163\164\162\107\x72\141\x64\x65"]; } if (array_key_exists("\142\x44\141\164\x61\104\145\154", $parameters)) { $accInfo->bDataDel = filter_var($parameters["\x62\x44\141\164\x61\x44\x65\154"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\x62\x44\141\164\141\x54\x72\x61\156\x73\x66\145\x72", $parameters)) { $accInfo->bDataTransfer = filter_var($parameters["\142\x44\x61\164\141\x54\162\x61\156\x73\146\145\x72"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\x62\104\x61\x74\141\105\x78\x70\157\162\x74", $parameters)) { $accInfo->bDataExport = filter_var($parameters["\x62\104\x61\164\x61\105\170\160\x6f\x72\164"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\x62\x44\x61\x74\141\101\144\144\x4d\157\x64\x69\x66\x79", $parameters)) { $accInfo->bDataAddModify = filter_var($parameters["\142\104\141\x74\x61\101\144\144\x4d\x6f\144\x69\x66\171"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\142\120\x61\164\x69\x65\156\x74\101\x64\144\x4d\x6f\144\x69\x66\x79", $parameters)) { $accInfo->bPatientAddModify = filter_var($parameters["\142\120\141\164\x69\145\156\x74\101\x64\x64\115\157\x64\x69\x66\171"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\142\125\163\145\162\101\x63\143\x6f\165\156\164\x45\144\x69\164", $parameters)) { $accInfo->bUserAccountEdit = filter_var($parameters["\142\125\x73\x65\162\x41\143\143\157\165\156\x74\x45\x64\151\x74"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\142\123\x68\141\162\145\x64\103\x6f\156\164\145\156\164\x73\105\144\x69\x74", $parameters)) { $accInfo->bSharedContentsEdit = filter_var($parameters["\142\123\x68\141\162\x65\144\103\x6f\156\164\x65\156\x74\163\105\144\151\x74"], FILTER_VALIDATE_BOOLEAN); } if (array_key_exists("\x73\x74\162\101\x63\x63\157\165\x6e\164\x53\x74\141\164\x75\x73", $parameters)) { $accInfo->strAccountStatus = $parameters["\x73\x74\x72\101\x63\143\157\x75\x6e\164\123\x74\x61\x74\165\x73"]; } if (array_key_exists("\x24\x6e\106\x61\x69\x6c\145\144\x4c\x6f\x67\x69\x6e\103\157\165\x6e\x74", $parameters)) { $accInfo->nFailedLoginCount = $parameters["\156\106\x61\x69\154\145\x64\x4c\157\147\151\156\103\x6f\165\156\x74"]; } return $accInfo; } public static function constructWithRow($row) { $accInfo = new SAccountInfoR2(); $accInfo->nAccountId = $row["\141\143\143\x5f\x61\143\143\157\x75\x6e\x74\x5f\x69\x64"]; $accInfo->strAccountName = $row["\141\143\143\137\x75\x73\145\x72\156\x61\155\145"]; $accInfo->strAccountPasswd = strval($row["\x61\143\143\137\x70\141\163\x73\167\157\162\144"]); $accInfo->strGrade = strval($row["\141\143\x63\x5f\x6c\x65\x76\x65\x6c"]); $accInfo->bDataDel = setBoolVal($row["\x61\143\143\137\x64\x61\x74\141\x5f\x64\x65\154"]); $accInfo->bDataTransfer = setBoolVal($row["\141\x63\x63\137\x64\x61\164\141\x5f\164\162\141\x6e\163\146\x65\x72"]); $accInfo->bDataExport = setBoolVal($row["\x61\x63\143\x5f\144\141\164\141\137\145\170\x70\x6f\162\x74"]); $accInfo->bDataAddModify = setBoolVal($row["\141\x63\143\x5f\x64\x61\x74\141\x5f\x61\144\144\x5f\155\157\x64\x69\x66\171"]); $accInfo->bPatientAddModify = setBoolVal($row["\141\143\x63\x5f\160\141\164\151\145\x6e\164\x5f\x61\x64\144\x5f\155\157\144\x69\x66\171"]); $accInfo->bUserAccountEdit = setBoolVal($row["\141\143\x63\137\165\163\145\x72\x5f\141\x63\x63\x6f\165\x6e\164\x5f\x65\x64\151\x74"]); $accInfo->bSharedContentsEdit = setBoolVal($row["\141\143\x63\x5f\163\150\x61\x72\x65\144\x5f\x63\157\x6e\164\145\x6e\164\x73\x5f\x65\x64\151\x74"]); $accInfo->strAccountStatus = $row["\141\143\143\x5f\x61\143\143\157\x75\x6e\164\x5f\x73\x74\141\x74\x75\163"]; $accInfo->nFailedLoginCount = (int) $row["\x61\x63\x63\x5f\x66\x61\x69\x6c\145\144\x5f\154\157\147\151\x6e\x5f\x63\157\x75\156\164"]; $date = new DateTime($row["\x61\143\x63\x5f\x70\141\x73\x73\x77\x6f\x72\x64\137\165\x70\x64\x61\x74\x65\144"]); $accInfo->dtPasswordUpdated = $date->format(DATAFORMAT[DATEFORMAT_ISO8601]); return $accInfo; } public static function getDefaultAccountPermissions($accountGrade) { $permissionsMap = ["\115" => ["\142\104\141\164\141\x44\x65\154" => true, "\x62\x44\x61\164\141\124\x72\x61\156\163\146\145\x72" => true, "\142\x44\x61\164\x61\105\170\x70\x6f\x72\164" => true, "\x62\104\141\164\141\x41\x64\144\x4d\x6f\144\151\146\171" => true, "\x62\x50\x61\164\151\145\156\x74\x41\x64\x64\x4d\x6f\x64\151\x66\171" => true, "\142\x55\x73\x65\x72\x41\x63\143\x6f\x75\x6e\x74\105\144\151\164" => true, "\x62\123\150\x61\162\x65\x64\103\157\156\x74\x65\x6e\x74\x73\105\144\x69\x74" => true], "\101" => ["\142\x44\x61\x74\x61\104\x65\154" => true, "\x62\x44\141\x74\141\124\162\141\156\x73\146\145\x72" => true, "\x62\x44\141\x74\x61\x45\x78\x70\x6f\x72\x74" => true, "\x62\x44\x61\164\x61\x41\144\x64\x4d\x6f\x64\151\146\171" => true, "\x62\x50\141\x74\x69\x65\x6e\x74\101\x64\x64\115\157\144\151\146\171" => true, "\142\125\x73\x65\162\x41\143\143\157\165\x6e\164\x45\144\151\164" => true, "\142\123\x68\x61\x72\145\x64\x43\157\x6e\x74\145\156\x74\x73\105\144\x69\x74" => true], "\x44" => ["\x62\x44\141\x74\x61\104\145\x6c" => false, "\x62\x44\x61\164\141\x54\x72\141\x6e\x73\146\x65\x72" => true, "\x62\104\141\x74\141\105\170\160\157\x72\164" => true, "\142\x44\x61\x74\x61\101\x64\144\x4d\x6f\144\151\x66\171" => true, "\x62\120\141\x74\151\x65\156\164\101\144\144\115\157\144\151\x66\171" => true, "\x62\125\x73\145\162\101\x63\143\157\165\x6e\164\105\x64\x69\x74" => false, "\142\x53\150\x61\162\x65\144\103\x6f\x6e\164\145\x6e\164\x73\105\x64\x69\x74" => false], "\x53" => ["\x62\104\141\164\141\104\145\154" => false, "\x62\104\x61\x74\x61\124\x72\x61\156\163\146\145\x72" => false, "\142\104\141\x74\141\x45\x78\160\157\x72\164" => false, "\x62\x44\141\164\x61\x41\x64\x64\115\x6f\x64\x69\146\x79" => false, "\x62\120\x61\164\151\145\x6e\x74\x41\144\x64\x4d\157\x64\x69\146\171" => true, "\142\125\163\145\162\x41\x63\143\157\165\x6e\x74\105\144\x69\164" => false, "\x62\123\150\x61\x72\x65\144\x43\157\x6e\x74\145\x6e\164\x73\105\144\x69\x74" => false]]; if (array_key_exists($accountGrade, $permissionsMap)) { return $permissionsMap[$accountGrade]; } else { vt_loge(__METHOD__ . "\x3a\40\125\x6e\x6b\x6e\157\167\156\40\x61\143\x63\x6f\165\156\164\x20\147\162\x61\x64\145\x20\x28" . $accountGrade . "\51\56\40\x52\145\x74\165\x72\x6e\x20\123\x74\x61\x66\x66\x27\163\40\x70\145\162\155\x69\163\x73\x69\157\156\x73\x20\151\156\163\x74\145\x61\144\x2e"); return $permissionsMap["\x53"]; } } } diff --git a/server/original/www/ezwebserver/src/application/models/SProfilogramNormalDataItem.php b/server/original/www/ezwebserver/src/application/models/SProfilogramNormalDataItem.php index 1da4d32..312855f 100644 --- a/server/original/www/ezwebserver/src/application/models/SProfilogramNormalDataItem.php +++ b/server/original/www/ezwebserver/src/application/models/SProfilogramNormalDataItem.php @@ -1,7 +1,7 @@ gender = trim($row["\147\145\x6e\x64\145\162"]); $obj->age = floatval($row["\x61\x67\145"]); $obj->landmarkName = $row["\x6c\141\156\x64\155\x61\162\x6b\x4e\141\x6d\x65"]; $obj->posX = doubleval($row["\x70\x6f\163\x58"]); $obj->posY = doubleval($row["\x70\x6f\163\x59"]); return $obj; } } diff --git a/server/original/www/ezwebserver/src/application/models/Sccontent_model.php b/server/original/www/ezwebserver/src/application/models/Sccontent_model.php index 06628ea..480c7d4 100644 --- a/server/original/www/ezwebserver/src/application/models/Sccontent_model.php +++ b/server/original/www/ezwebserver/src/application/models/Sccontent_model.php @@ -1,7 +1,7 @@ $contentName, "\163\143\x5f\143\x6f\156\164\145\156\164\137\146\x69\x6c\x65\160\141\164\x68" => $filePath, "\163\143\x5f\143\157\156\x74\145\x6e\x74\x5f\164\171\160\145" => $contentType, "\x73\143\137\x63\157\x6e\164\x65\x6e\x74\x5f\162\145\x67\151\163\164\x65\x72\x65\x64" => $nowTime, "\x73\143\x5f\x63\157\x6e\164\145\156\164\x5f\146\x61\x76\x6f\x72\x69\164\x65" => $favorite, "\163\x63\137\x63\141\164\x65\x67\157\x72\171\137\x69\144" => $categoryId); $this->db->insert("\x73\x63\x5f\143\x6f\156\164\145\x6e\x74", $data); } public function deleteUserContent($contentID) { $this->db->delete("\163\143\137\x63\x6f\156\x74\145\x6e\164", array("\163\143\137\143\157\156\x74\x65\x6e\164\137\151\x64" => $contentID)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/Schedules_model.php b/server/original/www/ezwebserver/src/application/models/Schedules_model.php index 89dfb75..d2714f4 100644 --- a/server/original/www/ezwebserver/src/application/models/Schedules_model.php +++ b/server/original/www/ezwebserver/src/application/models/Schedules_model.php @@ -1,7 +1,7 @@ db->select("\x65\x32\x5f\x6f\x72\164\150\x6f\x5f\x70\162\141\143\x74\151\x63\145\x5f\x73\143\150\145\x64\165\x6c\145\x2e\x6f\x74\x68\137\160\x72\141\x63\164\x69\x63\x65\137\163\143\150\145\144\165\154\x65\x5f\162\145\x67\151\x73\x74\x65\x72\x65\x64\x74\x69\x6d\145\54\x65\x32\137\157\x72\164\150\157\137\x70\x72\x61\x63\164\x69\143\145\x5f\163\x63\x68\x65\144\165\154\145\56\157\164\x68\x5f\x70\162\141\x63\164\x69\x63\x65\137\163\x63\150\145\x64\x75\154\x65\x5f\x73\164\x61\x72\164\164\151\x6d\145\x2c\x65\x32\137\157\162\164\150\157\x5f\x70\x72\141\143\164\151\x63\x65\x5f\163\143\150\x65\x64\x75\x6c\x65\56\157\x74\150\137\x70\x72\x61\x63\164\x69\x63\x65\137\163\143\150\145\x64\x75\x6c\x65\x5f\145\x6e\x64\164\151\x6d\145\x2c\145\62\137\157\x72\x74\x68\157\137\160\x72\141\143\x74\x69\143\x65\x5f\x73\x63\150\145\144\x75\154\x65\56\x6f\x74\150\137\160\162\x61\143\x74\151\x63\x65\x5f\163\x63\150\145\144\x75\x6c\x65\x5f\164\x79\x70\145\x2c\x65\x32\x5f\x6f\x72\164\150\157\137\x70\162\141\143\x74\x69\143\x65\x5f\163\143\x68\x65\x64\x75\154\145\x2e\x6f\x74\150\x5f\x70\x72\x61\x63\x74\x69\x63\x65\137\163\143\x68\145\x64\165\154\x65\137\x64\145\163\x63\x2c\145\62\x5f\160\x61\164\x2e\x70\x61\x74\x5f\143\x68\x61\x72\x74\x6e\x6f\x2c\145\62\137\160\x61\164\56\160\x61\164\x5f\x6c\x61\x73\x74\156\x61\x6d\145\x2c\x65\x32\x5f\x70\141\164\56\160\141\x74\x5f\146\151\x72\163\164\156\x61\155\145\54\x65\x32\x5f\144\x6f\x63\x2e\144\157\143\137\x6e\x61\155\x65\x2c\x65\62\x5f\157\162\x74\x68\x6f\x5f\160\162\141\143\x74\x69\143\x65\x5f\x63\x68\141\151\162\163\x2e\157\x74\150\x5f\143\150\141\151\162\x5f\156\x61\155\145"); $this->db->from("\145\x32\137\x6f\162\x74\150\157\x5f\x70\x72\x61\143\164\x69\x63\x65\137\163\143\150\x65\144\165\x6c\x65"); $this->db->join("\145\x32\x5f\x70\141\x74", "\x65\62\137\x6f\x72\x74\x68\157\x5f\160\x72\141\x63\x74\151\143\x65\137\x73\143\x68\145\x64\x75\x6c\x65\56\x70\x61\164\x5f\151\x64\40\x3d\40\x65\x32\137\x70\141\x74\56\160\x61\164\137\x69\144", "\154\x65\146\x74"); $this->db->join("\145\x32\137\x64\157\x63", "\145\62\x5f\157\x72\x74\x68\x6f\137\160\x72\141\143\x74\151\x63\x65\x5f\x73\143\x68\145\144\x75\154\x65\56\x64\157\x63\137\x69\144\40\75\40\145\x32\137\144\x6f\x63\56\144\157\143\137\x69\x64", "\154\145\x66\164"); $this->db->join("\145\x32\x5f\157\x72\164\x68\157\137\160\162\141\x63\x74\x69\x63\145\x5f\x63\150\141\x69\162\163", "\x65\62\137\157\x72\x74\150\x6f\137\160\162\141\x63\164\x69\143\x65\137\163\143\x68\x65\144\x75\x6c\x65\56\157\x74\x68\x5f\143\x68\141\x69\x72\x5f\x69\144\x20\75\x20\145\62\x5f\157\162\164\150\157\x5f\x70\162\141\143\164\151\143\145\137\143\x68\141\x69\162\163\x2e\x6f\x74\150\137\143\x68\141\151\x72\x5f\x69\144", "\154\x65\146\164"); $this->db->group_start(); $this->db->where("\157\164\150\x5f\x70\162\x61\x63\x74\151\143\x65\x5f\163\143\150\145\144\x75\154\x65\137\x73\164\141\162\164\x74\151\x6d\145\x3e\75", $scheduleStarttime); $this->db->where("\157\164\x68\137\x70\162\x61\143\164\x69\x63\145\137\163\143\x68\x65\x64\x75\x6c\x65\137\163\x74\x61\162\164\x74\x69\x6d\145\74", $scheduleEndtime); $this->db->group_end(); $this->db->or_group_start(); $this->db->where("\x6f\164\x68\x5f\160\162\x61\x63\164\x69\143\145\x5f\x73\143\x68\145\144\165\154\x65\x5f\x65\156\144\164\x69\155\145\76", $scheduleStarttime); $this->db->where("\x6f\164\x68\137\x70\x72\141\x63\164\x69\x63\x65\x5f\x73\143\x68\x65\144\165\x6c\x65\x5f\145\x6e\144\164\151\155\145\74\x3d", $scheduleEndtime); $this->db->group_end(); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sScheduleInfo = SScheduleInfo::constructWithRow($row); array_push($items, $sScheduleInfo); } return ["\145\162\162\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x73\143\x68\145\144\165\154\x65\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Schedules($sScheduleInfo) { load_database($this, "\105\x32\104\102"); $scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $sScheduleInfo->startTimestamp); $scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $sScheduleInfo->endTimestamp); $this->db->join("\x65\62\137\x64\157\x63", "\x65\62\137\144\157\143\x2e\144\157\143\x5f\x69\144\40\75\40\145\62\x5f\x6f\162\164\150\x6f\137\x70\162\141\143\x74\151\x63\145\137\x73\x63\x68\x65\x64\x75\154\x65\x2e\x64\x6f\143\x5f\151\x64"); $this->db->where("\154\157\x77\x65\162\x28\x65\62\x5f\x64\x6f\x63\56\144\x6f\x63\137\x6e\x61\155\x65\x29", strtolower($sScheduleInfo->docName)); $this->db->where("\x65\62\x5f\x6f\162\164\x68\x6f\x5f\160\162\x61\x63\x74\151\143\145\x5f\x73\143\x68\145\x64\165\154\145\56\157\x74\150\x5f\x70\162\x61\143\164\x69\143\x65\x5f\x73\x63\x68\145\x64\165\154\x65\137\x74\x79\160\x65", $sScheduleInfo->type); $this->db->where("\145\62\137\x6f\x72\x74\x68\x6f\x5f\160\x72\141\x63\164\x69\143\x65\137\x73\x63\x68\145\144\165\x6c\145\56\x6f\164\150\137\160\x72\141\x63\x74\x69\x63\145\137\x73\143\150\x65\144\165\x6c\145\137\x73\x74\141\162\164\x74\x69\x6d\145", $scheduleStarttime); $this->db->where("\x65\x32\137\157\x72\164\x68\x6f\x5f\x70\162\x61\143\x74\x69\143\145\x5f\163\x63\x68\145\144\165\x6c\145\x2e\157\x74\x68\137\x70\x72\x61\x63\x74\151\x63\x65\x5f\x73\x63\x68\x65\x64\165\154\x65\x5f\145\156\144\164\151\155\x65", $scheduleEndtime); $q = $this->db->get("\x65\62\x5f\157\162\x74\150\157\137\160\x72\141\x63\x74\151\x63\145\137\x73\143\150\145\x64\165\x6c\145"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $this->db->select("\x64\x6f\143\137\x69\x64"); $this->db->where("\154\157\167\x65\x72\x28\144\x6f\143\137\x6e\x61\155\145\x29", strtolower($sScheduleInfo->docName)); $this->db->limit(1); $select_docid = $this->db->get_compiled_select("\x65\x32\137\144\157\143"); if (isset($sScheduleInfo->chartNo)) { $this->db->select("\160\x61\164\137\151\144"); $this->db->where("\x70\141\x74\137\143\150\141\162\x74\156\x6f", $sScheduleInfo->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\62\x5f\160\x61\164"); } if (isset($sScheduleInfo->chairName)) { $this->db->select("\157\164\x68\x5f\x63\150\141\151\162\x5f\151\144"); $this->db->where("\x6c\x6f\x77\x65\162\50\x6f\164\150\x5f\143\x68\x61\x69\x72\137\x6e\141\155\x65\51", strtolower($sScheduleInfo->chairName)); $this->db->limit(1); $select_chairid = $this->db->get_compiled_select("\145\62\137\157\x72\164\x68\157\137\x70\x72\x61\x63\x74\151\x63\145\x5f\143\x68\x61\151\x72\x73"); } $this->db->set("\x6f\164\150\137\160\x72\x61\143\x74\x69\143\145\x5f\163\x63\150\145\x64\165\x6c\145\x5f\x74\x79\x70\145", $sScheduleInfo->type); $this->db->set("\x6f\164\x68\137\x70\x72\x61\143\164\x69\x63\x65\x5f\x73\x63\150\145\x64\x75\x6c\x65\x5f\x72\x65\147\151\x73\164\145\x72\x65\144\x74\x69\x6d\x65", currentDateFormat(DATEFORMAT_DATABASE)); $this->db->set("\x6f\x74\150\137\160\162\x61\x63\x74\151\x63\145\137\163\143\150\145\x64\165\154\145\137\163\x74\x61\162\x74\164\x69\x6d\x65", $sScheduleInfo->startTimestamp); $this->db->set("\x6f\164\150\137\x70\162\x61\143\164\x69\x63\145\137\x73\143\150\145\x64\x75\154\145\137\x65\x6e\x64\164\151\x6d\145", $sScheduleInfo->endTimestamp); $this->db->set("\x6f\164\150\x5f\160\x72\141\x63\164\151\143\x65\x5f\x73\143\150\x65\x64\165\x6c\x65\137\144\x65\x73\x63", $sScheduleInfo->description); $this->db->set("\x64\x6f\x63\x5f\x69\x64", "\x28{$select_docid}\x29", FALSE); if (isset($sScheduleInfo->chartNo)) { $this->db->set("\x70\141\164\137\151\144", "\x28{$select_patid}\x29", FALSE); } if (isset($sScheduleInfo->chairName)) { $this->db->set("\x6f\x74\150\137\x63\150\x61\151\162\x5f\151\144", "\x28{$select_chairid}\x29", FALSE); } $this->db->insert("\145\x32\x5f\157\162\164\150\x6f\x5f\160\162\141\143\x74\x69\143\x65\137\163\x63\x68\x65\x64\x75\x6c\145"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_Schedules($oldSchedule, $newSchedule) { load_database($this, "\105\62\104\102"); $old_scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $oldSchedule->startTimestamp); $old_scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $oldSchedule->endTimestamp); $this->db->select("\145\x32\137\x6f\162\164\x68\157\x5f\160\x72\x61\143\164\x69\x63\145\137\163\143\x68\x65\144\x75\154\145\x2e\x6f\164\150\137\160\162\x61\143\164\x69\x63\145\137\x73\143\150\x65\x64\x75\x6c\145\x5f\151\x64"); $this->db->from("\145\x32\x5f\x6f\162\164\x68\x6f\137\160\x72\141\143\164\x69\x63\145\137\163\143\150\145\144\165\x6c\x65"); $this->db->join("\145\62\x5f\x64\x6f\143", "\145\x32\x5f\x64\157\x63\x2e\x64\157\x63\x5f\x69\144\40\75\x20\145\62\137\x6f\162\164\x68\x6f\137\160\162\141\x63\x74\x69\x63\145\x5f\x73\143\150\x65\144\165\154\x65\56\x64\x6f\143\137\151\x64"); $this->db->where("\x6c\x6f\167\145\162\x28\x65\x32\x5f\x64\157\143\56\x64\x6f\x63\x5f\x6e\141\155\145\x29", strtolower($oldSchedule->docName)); $this->db->where("\x65\62\137\x6f\x72\164\x68\x6f\x5f\x70\162\x61\x63\x74\151\143\145\137\163\x63\x68\x65\x64\x75\x6c\145\x2e\157\x74\x68\137\160\162\141\143\164\x69\x63\x65\137\163\x63\x68\145\x64\x75\154\145\x5f\x74\171\x70\145", $oldSchedule->type); $this->db->where("\145\62\x5f\157\162\x74\150\x6f\137\160\x72\141\x63\164\x69\x63\145\137\x73\143\150\x65\x64\165\x6c\x65\56\x6f\x74\x68\137\160\162\141\x63\164\151\x63\145\137\163\x63\150\x65\144\x75\x6c\145\137\x73\x74\x61\162\164\164\151\155\145", $old_scheduleStarttime); $this->db->where("\145\x32\x5f\x6f\162\164\x68\x6f\x5f\x70\162\x61\143\x74\151\x63\145\x5f\x73\x63\x68\145\x64\165\154\145\56\157\x74\150\x5f\x70\162\x61\143\x74\151\143\x65\137\x73\x63\x68\x65\144\165\154\x65\x5f\x65\156\x64\164\x69\155\x65", $old_scheduleEndtime); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $schedule_id = intval($row->oth_practice_schedule_id); $this->db->select("\144\x6f\143\x5f\x69\144"); $this->db->where("\x6c\157\167\x65\162\x28\144\157\143\137\x6e\x61\155\x65\x29", strtolower($newSchedule->docName)); $this->db->limit(1); $select_docid = $this->db->get_compiled_select("\x65\62\x5f\144\157\x63"); if (isset($newSchedule->chartNo)) { $this->db->select("\x70\141\x74\137\151\144"); $this->db->where("\x70\141\164\137\143\x68\141\x72\x74\x6e\157", $newSchedule->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\145\62\x5f\160\x61\164"); } if (isset($newSchedule->chairName)) { $this->db->select("\x6f\164\x68\x5f\143\x68\141\x69\x72\x5f\x69\x64"); $this->db->where("\154\x6f\167\145\x72\50\157\x74\x68\137\x63\150\x61\x69\x72\137\156\x61\155\145\51", strtolower($newSchedule->chairName)); $this->db->limit(1); $select_chairid = $this->db->get_compiled_select("\x65\x32\x5f\x6f\162\x74\150\157\137\160\162\x61\143\x74\x69\143\145\x5f\143\x68\141\151\162\163"); } $new_scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $newSchedule->startTimestamp); $new_scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $newSchedule->endTimestamp); $this->db->set("\157\x74\150\x5f\160\162\141\143\164\151\143\x65\137\x73\143\x68\x65\144\x75\154\x65\x5f\164\x79\160\x65", $newSchedule->type); $this->db->set("\x6f\x74\x68\x5f\x70\162\x61\143\164\151\x63\145\x5f\163\x63\x68\145\x64\165\154\145\137\163\x74\x61\162\x74\x74\151\x6d\x65", $new_scheduleStarttime); $this->db->set("\x6f\x74\x68\137\160\x72\141\143\164\151\x63\145\x5f\x73\143\x68\x65\144\x75\154\145\x5f\145\156\144\x74\151\x6d\145", $new_scheduleEndtime); $this->db->set("\157\164\x68\137\160\x72\141\143\x74\151\143\145\137\163\143\x68\145\x64\x75\x6c\x65\x5f\144\145\x73\x63", $newSchedule->description); $this->db->set("\x64\x6f\x63\137\151\144", "\50{$select_docid}\51", FALSE); if (isset($newSchedule->chartNo)) { $this->db->set("\x70\x61\164\137\151\144", "\x28{$select_patid}\x29", FALSE); } else { $this->db->set("\x70\141\164\137\x69\144"); } if (isset($newSchedule->chairName)) { $this->db->set("\157\x74\150\137\143\x68\x61\x69\162\x5f\151\144", "\50{$select_chairid}\51", FALSE); } else { $this->db->set("\x6f\x74\150\137\143\150\141\151\162\x5f\x69\x64"); } $this->db->where("\x65\x32\x5f\x6f\162\164\x68\x6f\137\x70\162\141\x63\164\x69\x63\145\137\163\x63\150\145\144\165\154\145\x2e\157\164\x68\137\160\162\x61\x63\x74\151\143\145\x5f\163\143\150\145\144\x75\x6c\145\x5f\151\x64", $schedule_id); $this->db->update("\145\62\x5f\x6f\162\164\x68\157\137\x70\x72\141\x63\x74\x69\143\x65\x5f\163\x63\x68\x65\x64\165\x6c\145"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function delete_Schedules($doctor, $starttimestamp, $endtimestamp, $chartno) { load_database($this, "\x45\x32\104\102"); $scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $starttimestamp); $scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $endtimestamp); if ($chartno != "\x4e\x2f\101") { $this->db->select("\x70\x61\x74\x5f\151\x64"); $this->db->where("\160\141\164\137\x63\150\141\x72\164\x6e\157", $chartno); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\145\62\137\x70\141\x74"); } $this->db->select("\144\157\x63\137\x69\144"); $this->db->where("\154\157\167\145\x72\x28\144\x6f\143\137\x6e\x61\x6d\145\x29", strtolower($doctor)); $this->db->limit(1); $select_docid = $this->db->get_compiled_select("\x65\62\137\x64\x6f\x63"); if (isset($select_patid)) { $this->db->where("\x70\141\x74\x5f\x69\x64", "\50{$select_patid}\x29", FALSE); } $this->db->where("\144\157\x63\137\151\144", "\x28{$select_docid}\x29", FALSE); $this->db->where("\x6f\x74\150\x5f\x70\x72\141\x63\164\x69\x63\x65\x5f\163\x63\x68\x65\144\165\x6c\145\137\163\164\x61\162\164\164\151\155\x65", $scheduleStarttime); $this->db->where("\157\164\150\x5f\x70\x72\x61\143\x74\x69\x63\145\137\163\143\x68\145\144\165\x6c\145\137\145\156\144\164\151\x6d\x65", $scheduleEndtime); $this->db->delete("\145\62\x5f\x6f\x72\164\150\x6f\x5f\x70\x72\x61\143\164\151\x63\145\137\x73\143\x68\x65\x64\x75\x6c\x65"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function get_SchedulesR2($starttimestamp, $endtimestamp) { load_database($this, "\x45\62\x44\102"); $scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $starttimestamp); $scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $endtimestamp); $this->db->select("\x65\x32\x5f\x6f\162\x74\x68\157\137\160\x72\x61\x63\x74\x69\143\x65\x5f\x73\x63\150\x65\x64\165\x6c\145\x2e\157\x74\x68\137\160\162\141\143\x74\x69\143\x65\x5f\163\x63\150\x65\144\165\154\145\x5f\151\x64\x2c\145\62\x5f\x6f\x72\164\x68\x6f\x5f\x70\x72\x61\x63\164\151\x63\145\137\x73\143\x68\145\144\x75\x6c\145\56\157\x74\150\137\x70\x72\141\x63\164\151\x63\145\137\163\x63\150\145\x64\165\154\x65\x5f\x72\145\147\151\x73\164\x65\162\x65\x64\164\151\155\x65\x2c\145\62\x5f\157\x72\x74\x68\157\x5f\160\162\x61\x63\164\x69\143\x65\137\163\143\x68\x65\144\x75\x6c\x65\56\x6f\x74\x68\x5f\x70\x72\141\143\x74\x69\x63\x65\x5f\163\143\150\x65\x64\165\x6c\x65\x5f\x73\164\x61\162\x74\164\151\155\x65\x2c\x65\62\x5f\157\x72\164\x68\x6f\137\160\x72\x61\x63\x74\151\x63\145\x5f\163\x63\x68\x65\144\165\154\x65\56\x6f\x74\150\137\x70\x72\141\x63\x74\151\x63\145\x5f\x73\143\150\145\x64\165\154\145\x5f\145\x6e\144\164\151\x6d\145\54\x65\x32\137\x6f\162\x74\150\x6f\x5f\x70\x72\x61\143\x74\151\143\145\137\163\x63\150\145\x64\165\154\x65\56\x6f\x74\x68\x5f\x70\x72\x61\143\164\151\x63\145\x5f\x73\x63\x68\x65\x64\165\154\x65\137\x74\171\160\x65\54\145\62\137\157\x72\x74\x68\157\137\x70\162\x61\x63\164\151\143\x65\137\163\x63\x68\x65\144\165\154\145\x2e\157\x74\150\x5f\160\162\141\x63\164\x69\x63\145\137\163\143\150\x65\144\165\154\145\x5f\144\x65\163\143\54\x65\62\x5f\160\141\164\x2e\x70\x61\x74\x5f\143\x68\141\x72\x74\x6e\x6f\x2c\145\x32\x5f\160\141\164\x2e\160\x61\164\137\x6c\141\x73\164\x6e\141\x6d\145\54\145\62\x5f\160\141\x74\56\x70\141\164\x5f\x66\x69\x72\x73\x74\x6e\x61\x6d\x65\x2c\145\x32\137\144\157\143\x2e\144\157\x63\137\156\x61\155\x65\x2c\x65\62\137\x6f\162\x74\150\157\x5f\160\162\141\143\x74\x69\x63\145\x5f\x63\x68\141\151\x72\x73\56\x6f\164\x68\x5f\143\x68\141\151\162\x5f\156\141\155\x65"); $this->db->from("\145\62\137\x6f\162\x74\150\157\x5f\x70\162\141\143\x74\151\x63\145\x5f\163\x63\x68\x65\144\165\x6c\145"); $this->db->join("\145\62\137\160\x61\x74", "\145\62\137\157\x72\164\x68\157\x5f\160\x72\141\143\x74\x69\143\145\x5f\x73\143\150\145\x64\165\x6c\145\56\160\x61\164\x5f\151\144\40\x3d\x20\145\x32\137\160\x61\164\56\x70\x61\164\x5f\151\x64", "\x6c\145\146\x74"); $this->db->join("\x65\x32\x5f\144\157\143", "\x65\62\x5f\x6f\x72\164\x68\157\137\160\162\141\143\164\151\143\x65\137\x73\x63\x68\145\x64\165\154\145\x2e\x64\x6f\143\x5f\151\144\x20\75\40\x65\x32\x5f\x64\x6f\143\56\x64\157\143\137\151\144", "\x6c\x65\146\164"); $this->db->join("\145\62\137\x6f\x72\164\x68\x6f\137\x70\162\x61\143\164\151\143\145\x5f\x63\150\x61\151\162\163", "\x65\x32\x5f\157\x72\x74\150\157\137\160\162\141\143\164\x69\x63\x65\137\163\143\150\x65\x64\165\154\x65\x2e\157\164\x68\x5f\x63\x68\x61\151\x72\137\x69\144\40\x3d\x20\145\x32\137\157\162\164\150\x6f\x5f\160\x72\141\x63\x74\x69\x63\x65\x5f\143\150\x61\151\x72\163\x2e\157\x74\x68\x5f\x63\x68\141\x69\162\x5f\151\x64", "\154\145\x66\164"); $this->db->group_start(); $this->db->where("\157\164\x68\137\x70\x72\x61\143\x74\x69\x63\x65\x5f\x73\x63\150\x65\x64\x75\x6c\x65\x5f\163\x74\x61\x72\164\x74\x69\155\145\x3e\x3d", $scheduleStarttime); $this->db->where("\x6f\164\x68\x5f\160\x72\x61\143\x74\151\x63\x65\137\x73\x63\150\x65\x64\x75\x6c\x65\x5f\163\x74\141\x72\164\x74\151\155\145\x3c", $scheduleEndtime); $this->db->group_end(); $this->db->or_group_start(); $this->db->where("\x6f\164\150\x5f\160\162\x61\x63\164\151\143\145\137\x73\x63\x68\145\x64\x75\154\145\137\x65\156\x64\x74\151\x6d\145\x3e", $scheduleStarttime); $this->db->where("\157\x74\x68\x5f\x70\162\x61\143\164\x69\x63\145\137\163\x63\150\x65\144\165\154\x65\137\x65\x6e\x64\164\x69\x6d\145\74\75", $scheduleEndtime); $this->db->group_end(); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sScheduleInfoWithId = SScheduleInfoWithId::constructWithRow($row); array_push($items, $sScheduleInfoWithId); } return ["\145\x72\162\157\162\103\157\144\145" => VERR_COMMON_SUCCESS, "\163\143\x68\145\x64\165\x6c\x65\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_SchedulesR2($sScheduleInfo) { load_database($this, "\x45\62\x44\102"); $scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $sScheduleInfo->startTimestamp); $scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $sScheduleInfo->endTimestamp); $this->db->join("\x65\x32\x5f\144\x6f\143", "\x65\62\x5f\x64\x6f\x63\x2e\x64\x6f\143\137\x69\x64\40\75\x20\145\x32\137\x6f\x72\164\150\157\137\x70\x72\x61\143\164\x69\143\x65\x5f\x73\x63\150\145\x64\x75\x6c\x65\56\x64\x6f\143\137\151\144"); if (isset($sScheduleInfo->docName)) { $this->db->where("\154\157\x77\145\x72\50\145\x32\x5f\x64\x6f\x63\x2e\x64\157\143\137\156\x61\x6d\x65\x29", strtolower($sScheduleInfo->docName)); } $this->db->where("\145\62\137\157\x72\164\150\x6f\137\x70\x72\x61\x63\164\151\143\145\137\163\x63\x68\x65\144\165\154\x65\x2e\x6f\164\x68\137\160\x72\x61\143\x74\x69\143\145\x5f\x73\x63\150\145\144\x75\154\145\137\164\x79\160\x65", $sScheduleInfo->type); $this->db->where("\145\x32\137\157\x72\x74\x68\157\x5f\160\162\x61\x63\164\x69\143\145\x5f\163\143\x68\145\144\165\x6c\x65\x2e\x6f\164\x68\137\160\162\x61\143\164\x69\143\x65\137\x73\x63\150\x65\x64\165\x6c\145\x5f\163\164\141\162\164\164\151\155\145", $scheduleStarttime); $this->db->where("\x65\62\137\157\x72\x74\150\x6f\x5f\160\162\x61\143\x74\151\x63\145\x5f\x73\x63\150\x65\144\165\154\145\x2e\157\x74\x68\x5f\x70\162\x61\x63\x74\151\x63\145\x5f\x73\x63\150\x65\144\x75\x6c\145\x5f\145\x6e\x64\x74\151\155\x65", $scheduleEndtime); $q = $this->db->get("\145\62\137\157\162\x74\150\x6f\137\x70\162\x61\x63\164\151\143\145\137\x73\143\x68\145\x64\165\x6c\x65"); $this->db->reset_query(); if (isset($sScheduleInfo->docName)) { $this->db->select("\x64\x6f\x63\x5f\x69\144"); $this->db->where("\154\157\x77\x65\x72\50\x64\157\x63\137\x6e\x61\155\145\x29", strtolower($sScheduleInfo->docName)); $this->db->limit(1); $select_docid = $this->db->get_compiled_select("\145\x32\x5f\x64\157\143"); } if (isset($sScheduleInfo->chartNo)) { $this->db->select("\x70\x61\x74\137\151\x64"); $this->db->where("\160\x61\164\x5f\143\150\x61\162\164\156\x6f", $sScheduleInfo->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\62\137\160\141\164"); } if (isset($sScheduleInfo->chairName)) { $this->db->select("\x6f\164\x68\137\143\x68\x61\151\x72\137\151\144"); $this->db->where("\154\157\167\x65\x72\x28\x6f\164\150\x5f\143\150\141\151\x72\x5f\156\141\x6d\x65\51", strtolower($sScheduleInfo->chairName)); $this->db->limit(1); $select_chairid = $this->db->get_compiled_select("\x65\x32\x5f\x6f\x72\164\x68\x6f\x5f\160\x72\x61\143\x74\x69\x63\x65\x5f\x63\150\x61\151\x72\x73"); } $this->db->set("\x6f\164\150\x5f\160\162\x61\143\164\x69\143\145\137\163\143\150\x65\144\x75\154\145\x5f\164\x79\x70\x65", $sScheduleInfo->type); $this->db->set("\157\x74\x68\137\160\162\141\143\164\151\143\145\x5f\163\x63\x68\x65\144\165\x6c\145\137\162\x65\x67\151\x73\164\x65\x72\145\x64\x74\x69\155\145", currentDateFormat(DATEFORMAT_DATABASE)); $this->db->set("\x6f\x74\x68\x5f\x70\x72\141\x63\164\x69\143\145\x5f\x73\x63\x68\x65\144\165\x6c\x65\x5f\x73\164\x61\x72\164\x74\x69\155\x65", $sScheduleInfo->startTimestamp); $this->db->set("\x6f\164\150\x5f\160\162\x61\143\x74\151\143\145\137\x73\x63\150\x65\x64\165\x6c\145\137\145\x6e\144\164\x69\155\x65", $sScheduleInfo->endTimestamp); $this->db->set("\x6f\x74\x68\137\160\162\x61\143\x74\x69\143\145\137\163\143\150\x65\144\165\x6c\145\137\x64\x65\x73\x63", $sScheduleInfo->description); if (isset($sScheduleInfo->docName) && !empty($sScheduleInfo->docName)) { $this->db->set("\144\x6f\143\x5f\151\x64", "\x28{$select_docid}\x29", FALSE); } else { $this->db->set("\x64\157\143\x5f\x69\144", null); } if (isset($sScheduleInfo->chartNo) && !empty($sScheduleInfo->chartNo)) { $this->db->set("\160\x61\164\x5f\151\x64", "\50{$select_patid}\x29", FALSE); } else { $this->db->set("\160\x61\164\137\151\x64", null); } if (isset($sScheduleInfo->chairName) && !empty($sScheduleInfo->chairName)) { $this->db->set("\157\x74\x68\137\143\x68\141\151\x72\x5f\x69\144", "\x28{$select_chairid}\x29", FALSE); } else { $this->db->set("\157\x74\x68\137\143\150\x61\x69\x72\137\x69\x64", null); } $this->db->insert("\x65\x32\137\157\162\164\150\157\137\160\x72\141\x63\x74\x69\143\145\x5f\x73\143\x68\x65\144\165\154\x65"); $id = $this->db->insert_id(); if ($this->db->affected_rows() > 0) { return array("\x65\x72\x72\157\162\103\157\144\x65" => VERR_COMMON_SUCCESS, "\x69\x64" => $id); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_SchedulesR2($oldScheduleId, $newSchedule) { load_database($this, "\x45\x32\x44\x42"); if (isset($newSchedule->docName) && !empty($newSchedule->docName)) { $this->db->select("\144\157\x63\137\151\x64"); $this->db->where("\154\x6f\x77\x65\x72\x28\x64\157\143\137\156\x61\155\x65\x29", strtolower($newSchedule->docName)); $this->db->limit(1); $select_docid = $this->db->get_compiled_select("\145\62\x5f\144\x6f\x63"); } if (isset($newSchedule->chartNo) && !empty($newSchedule->chartNo)) { $this->db->select("\x70\x61\164\x5f\151\144"); $this->db->where("\160\x61\164\x5f\143\150\141\x72\x74\x6e\x6f", $newSchedule->chartNo); $this->db->limit(1); $select_patid = $this->db->get_compiled_select("\x65\x32\137\160\x61\164"); } if (isset($newSchedule->chairName) && !empty($newSchedule->chairName)) { $this->db->select("\157\164\x68\137\143\150\x61\x69\x72\137\151\144"); $this->db->where("\x6c\157\x77\145\x72\50\x6f\x74\x68\x5f\143\150\x61\151\162\137\x6e\141\155\145\51", strtolower($newSchedule->chairName)); $this->db->limit(1); $select_chairid = $this->db->get_compiled_select("\145\x32\x5f\157\x72\x74\x68\x6f\137\x70\x72\141\x63\164\x69\x63\x65\x5f\143\x68\141\151\162\163"); } $new_scheduleStarttime = currentDateFormat(DATEFORMAT_DATABASE, $newSchedule->startTimestamp); $new_scheduleEndtime = currentDateFormat(DATEFORMAT_DATABASE, $newSchedule->endTimestamp); $this->db->set("\x6f\x74\x68\x5f\160\162\141\143\164\151\x63\145\137\x73\143\150\145\x64\x75\x6c\145\137\x74\171\x70\145", $newSchedule->type); $this->db->set("\x6f\x74\150\x5f\x70\x72\x61\143\x74\x69\143\x65\x5f\x73\143\150\145\x64\165\x6c\145\137\163\x74\141\x72\164\164\x69\x6d\145", $new_scheduleStarttime); $this->db->set("\157\x74\x68\x5f\160\162\x61\143\164\151\143\x65\x5f\163\x63\x68\x65\x64\x75\154\145\137\145\x6e\144\x74\x69\155\145", $new_scheduleEndtime); $this->db->set("\x6f\164\150\x5f\x70\162\x61\143\x74\151\x63\x65\137\163\143\x68\145\144\x75\x6c\x65\x5f\144\145\x73\x63", $newSchedule->description); if (isset($newSchedule->docName) && !empty($newSchedule->docName)) { $this->db->set("\144\157\x63\137\151\x64", "\50{$select_docid}\51", FALSE); } else { $this->db->set("\144\x6f\x63\x5f\151\x64", null); } if (isset($newSchedule->chartNo) && !empty($newSchedule->chartNo)) { $this->db->set("\x70\x61\x74\x5f\151\x64", "\x28{$select_patid}\51", FALSE); } else { $this->db->set("\160\141\164\x5f\151\144", null); } if (isset($newSchedule->chairName) && !empty($newSchedule->chairName)) { $this->db->set("\157\x74\x68\137\143\150\141\x69\162\x5f\x69\x64", "\50{$select_chairid}\x29", FALSE); } else { $this->db->set("\x6f\x74\150\137\143\150\x61\x69\162\137\151\144", null); } $this->db->where("\145\x32\137\x6f\162\x74\150\157\137\160\162\x61\x63\164\151\x63\x65\137\163\143\x68\x65\144\165\x6c\145\x2e\157\x74\150\x5f\160\x72\141\x63\164\x69\x63\145\137\x73\143\x68\145\x64\165\x6c\x65\x5f\151\x64", (string) $oldScheduleId); $this->db->update("\x65\62\137\x6f\162\x74\150\x6f\x5f\x70\162\x61\143\x74\x69\x63\145\x5f\163\143\150\145\144\x75\x6c\x65"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function delete_SchedulesR2($id) { load_database($this, "\x45\x32\x44\102"); $this->db->where("\157\x74\x68\137\160\x72\x61\143\x74\151\143\x65\137\x73\x63\150\145\x64\165\154\145\x5f\151\x64", $id); $this->db->delete("\145\x32\x5f\x6f\x72\x74\150\x6f\x5f\x70\162\141\143\164\x69\143\145\137\163\x63\x68\x65\144\165\x6c\145"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/ServerPorts_model.php b/server/original/www/ezwebserver/src/application/models/ServerPorts_model.php index 20984b3..da06624 100644 --- a/server/original/www/ezwebserver/src/application/models/ServerPorts_model.php +++ b/server/original/www/ezwebserver/src/application/models/ServerPorts_model.php @@ -1,7 +1,7 @@ load->library("\x56\x54\116\x67\x69\x6e\170\120\x6f\162\x74\103\x6f\x6e\x66\x46\151\154\145"); $result = NULL; $conf_file = new VTNginxPortConfFile(); if ($conf_file->load($this->config->item(self::NGINX_CONF_FILE_KEY)) === false) { vt_loge(__METHOD__ . "\x3a" . "\106\141\x69\154\145\144\x20\x74\157\x20\154\x6f\x61\x64\40\156\147\151\x6e\170\x20\143\157\x6e\146\x20\x66\151\x6c\x65\56\x20\x66\x69\154\x65\x6e\x61\155\145\x3a" . $this->config->item(self::NGINX_CONF_FILE_KEY)); $result = array(self::FIELD_ERROR_CODE => VERR_COMMON_IO, "\x46\x61\151\154\145\144\x20\x74\x6f\x20\x6c\157\x61\x64\40\x6e\147\x69\x6e\170\x20\x63\157\156\x66\40\x66\151\154\x65\56"); } else { $result = array(self::FIELD_ERROR_CODE => VERR_COMMON_SUCCESS, self::FIELD_PORT => $conf_file->get_port()); } return $result; } public function put_serverPorts($parameters) { $result = NULL; $this->load->library("\x56\124\116\147\151\x6e\170\x50\157\162\x74\103\157\x6e\146\x46\151\x6c\x65"); $this->load->library("\x56\124\123\145\162\x76\x69\143\145\105\x6e\x76\151\162\157\x6e\x6d\145\156\x74\x46\151\x6c\145"); $port = $parameters["\160\x6f\x72\164"]; for (;;) { $nginx_conf_file = new VTNginxPortConfFile(); $nginx_conf_file->set_port($port); $result_save_conf_file = $nginx_conf_file->save($this->config->item(self::NGINX_CONF_FILE_KEY)); if ($result_save_conf_file === false) { $result = array(self::FILED_ERROR_CODE => VERR_COMMON_IO, "\106\x61\x69\x6c\x65\x64\x20\164\x6f\x20\163\x61\x76\145\x20\x6e\x67\151\x6e\x78\40\143\157\156\146\x20\146\151\x6c\145\56"); break; } else { } $service_env_file = new VTServiceEnvironmentFile(); $result_load = $service_env_file->load($this->config->item(self::SERVICE_ENV_INI_FILE_KEY)); if ($result_load === false) { $result = array(self::FILED_ERROR_CODE => VERR_COMMON_IO, "\106\x61\x69\154\145\x64\40\164\x6f\x20\x6c\x6f\141\144\40\163\x65\x72\x76\151\x63\x65\40\x65\x6e\x76\x20\x66\151\154\145\x2e"); break; } else { } $service_env_file->set_port($port); $result_save_env_file = $service_env_file->save($this->config->item(self::SERVICE_ENV_INI_FILE_KEY)); if ($result_save_env_file === false) { $result = array(self::FILED_ERROR_CODE => VERR_COMMON_IO, "\x46\x61\x69\154\x65\x64\40\x74\157\x20\163\x61\166\x65\40\x73\x65\162\x76\151\143\145\40\145\x6e\x76\x20\x66\151\154\145\56"); break; } else { } $result = array(self::FIELD_ERROR_CODE => VERR_COMMON_SUCCESS); break; } return $result; } } diff --git a/server/original/www/ezwebserver/src/application/models/SettingValues_model.php b/server/original/www/ezwebserver/src/application/models/SettingValues_model.php index d956e57..1812100 100644 --- a/server/original/www/ezwebserver/src/application/models/SettingValues_model.php +++ b/server/original/www/ezwebserver/src/application/models/SettingValues_model.php @@ -1,7 +1,7 @@ db->query($sql, $section)->result_array(); $structArray = array(); for ($i = 0; $i < count($ret); $i++) { $sSettingsValue = SSettingsValues::createFromDBRecord($ret[$i]); array_push($structArray, $sSettingsValue); } return $structArray; } public function get_SettingValuesP2($parameters) { load_database($this, "\123\x45\124\x54\x49\x4e\107"); $section = $parameters["\x73\145\143\x74\151\157\x6e"]; $key = $parameters["\x6b\x65\x79"]; $sql = "\123\x45\114\x45\103\x54\40\x2a\40\x46\x52\117\x4d\40\x53\124\x5f\123\x45\x54\124\111\116\x47\x53" . "\x20\x57\110\x45\122\105\40\x53\x54\137\x53\x45\103\x54\111\x4f\116\40\x3d\x20\x3f" . "\40\x41\116\104\x20\123\x54\x5f\113\105\x59\x20\75\40\77"; $ret = $this->db->query($sql, array($section, $key))->result_array(); $structArray = array(); for ($i = 0; $i < count($ret); $i++) { $sSettingsValue = SSettingsValues::createFromDBRecord($ret[$i]); array_push($structArray, $sSettingsValue); } return $structArray; } public function post_SettingValues($data) { load_database($this, "\123\105\124\x54\111\x4e\x47"); for ($i = 0; $i < count($data["\144\x61\x74\141"]); $i++) { $parameters = $data["\144\x61\164\x61"][$i]; if (!isset($parameters["\163\x65\x63\x74\151\x6f\156"]) || empty($parameters["\x73\x65\143\x74\x69\157\156"])) { vt_loge(__METHOD__ . "\x3a" . "\x54\x68\x65\x20\x73\145\143\x74\151\x6f\x6e\x20\160\x61\x72\141\155\145\x74\145\x72\40\151\163\x20\x65\155\160\164\x79\40\x6f\x72\40\x75\156\x73\145\164\x2e"); return VERR_COMMON_INVALID; } if (!isset($parameters["\153\145\x79"]) || empty($parameters["\x6b\145\171"])) { vt_loge(__METHOD__ . "\72" . "\124\x68\145\x20\153\x65\171\x20\160\141\x72\x61\x6d\x65\x74\x65\x72\40\151\x73\40\145\155\x70\x74\x79\x20\x6f\x72\x20\165\x6e\163\x65\x74\x2e"); return VERR_COMMON_INVALID; } if (isset($parameters["\x76\x61\x6c\165\x65"]) && !empty($parameters["\166\141\x6c\x75\x65"])) { $stValue = $parameters["\x76\x61\x6c\x75\145"]; } else { $stValue = ''; } $this->db->select("\x73\164\137\x73\145\x63\x74\x69\157\156\54\x73\x74\137\153\145\x79"); $this->db->from("\163\x74\137\163\x65\x74\x74\151\x6e\147\x73"); $this->db->where_in("\163\164\137\163\145\x63\164\151\157\x6e", $parameters["\163\x65\143\x74\x69\157\156"]); $this->db->where_in("\163\x74\x5f\x6b\x65\x79", $parameters["\153\145\171"]); $result = $this->db->get()->result_array(); $column = array("\163\x74\x5f\163\x65\143\164\x69\x6f\x6e" => $parameters["\163\x65\143\164\x69\x6f\156"], "\163\x74\x5f\x6b\x65\x79" => $parameters["\x6b\x65\x79"], "\x73\164\x5f\x76\141\x6c\165\145" => $stValue); if (isset($parameters["\143\157\x6d\155\145\156\x74"]) && !empty($parameters["\x63\x6f\x6d\x6d\x65\x6e\x74"])) { $column["\163\164\x5f\143\x6f\155\155\145\x6e\x74"] = $parameters["\x63\x6f\x6d\x6d\x65\156\x74"]; } if (count($result) > 0) { $this->db->where("\163\164\x5f\163\x65\143\164\x69\157\x6e", $parameters["\x73\x65\x63\164\x69\x6f\156"]); $this->db->where("\x73\x74\x5f\x6b\x65\x79", $parameters["\x6b\145\171"]); $this->db->set("\163\164\137\x75\x70\144\x61\x74\145\144", "\x6e\157\x77\x28\x29", false); $this->db->update("\163\164\137\x73\145\164\x74\151\156\147\x73", $column); } else { $this->db->set("\x73\164\137\x63\162\145\141\x74\145\144", "\x6e\157\167\x28\51", false); $this->db->insert("\163\164\137\x73\145\164\164\x69\156\x67\163", $column); } } return VERR_COMMON_SUCCESS; } } diff --git a/server/original/www/ezwebserver/src/application/models/Settings_model.php b/server/original/www/ezwebserver/src/application/models/Settings_model.php index dd432a4..eef397c 100644 --- a/server/original/www/ezwebserver/src/application/models/Settings_model.php +++ b/server/original/www/ezwebserver/src/application/models/Settings_model.php @@ -1,7 +1,7 @@ $fm_top_dir, "\x73\165\142\104\141\x74\141\106\151\x6c\x65\120\141\x74\150" => $sub_dirs, "\154\x69\x6e\x6b\x46\x69\154\145\x50\x61\164\x68" => $link_base_dirs, "\151\157\123\145\x6e\x73\x6f\x72\x46\151\154\x65\x50\141\164\150" => $iosensor_file_path, "\165\163\145\x46\151\154\145\115\x61\x6e\x61\147\x65\162\x53\145\164\x74\151\x6e\147\163" => $use_file_manager_settings); } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\72\40" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\x3a\40\x55\156\x6b\x6e\157\x77\156\x20\145\170\x63\145\x70\x74\x69\x6f\156\56\x20" . VERR_COMMON_INVALID . "\40\54\x20\x49\x6e\x69\x20\146\x69\154\x65\40\x70\x61\x74\x68\72\x20" . $ini_load); return VERR_COMMON_INVALID; } } public function post_fileServerSettings($settingValueList) { $ini_load = APPPATH . INI_CONFIG_PATH; try { set_ini($ini_load, $settingValueList); return VERR_COMMON_SUCCESS; } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\x3a\x20" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\x3a\x20\x55\x6e\153\156\x6f\x77\156\x20\x65\170\x63\145\160\x74\151\x6f\x6e\56\x20" . VERR_COMMON_INVALID . "\40\x2c\x20\111\156\x70\165\x74\x20\x70\141\162\141\155\145\x74\x65\162\x73\x3a\40" . json_encode($settingValueList) . "\40\54\x20\x49\156\x69\40\146\x69\154\145\x20\160\x61\164\x68\x3a\40" . $ini_load); return VERR_COMMON_INVALID; } } public function put_FileServerSettings($settingValueList) { $ini_load = APPPATH . INI_CONFIG_PATH; try { $settingArr = get_ini_array($ini_load); $settingArr[CONF_EZWEBSERVER][INI_KEY_USE_FILE_MANAGER_SETTINGS] = $settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_USE_FILE_MANAGER_SETTINGS] === true ? "\164\x72\x75\145" : "\x66\141\x6c\x73\145"; $settingArr[CONF_EZWEBSERVER][INI_KEY_FM_TOP_DIR] = $settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_FM_TOP_DIR]; $subDirs = array(); if (isset($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS]) && count($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS]) > 0) { for ($i = 0; $i < count($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS]); $i++) { $subDirs[$i] = $settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS][$i]; } } $settingArr[CONF_EZWEBSERVER][INI_KEY_SUB_DIRS] = implode("\174", $subDirs); if (isset($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS]) && empty($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_SUB_DIRS][0])) { $settingArr[CONF_EZWEBSERVER][INI_KEY_SUB_DIRS] = ''; } $linkBaseDirs = array(); if (isset($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS]) && count($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS]) > 0) { for ($i = 0; $i < count($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS]); $i++) { $linkBaseDirs[$i] = $settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS][$i]; } } $settingArr[CONF_EZWEBSERVER][INI_KEY_LINK_BASE_DIRS] = implode("\174", $linkBaseDirs); if (isset($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS]) && empty($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_LINK_BASE_DIRS][0])) { $settingArr[CONF_EZWEBSERVER][INI_KEY_LINK_BASE_DIRS] = ''; } if (!empty($settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_IOSENSOR_FILE_PATH])) { $settingArr[CONF_EZWEBSERVER][INI_KEY_IOSENSOR_FILE_PATH] = $settingValueList[JSON_KEY_FM_SETTINGS][JSON_KEY_IOSENSOR_FILE_PATH]; } else { $settingArr[CONF_EZWEBSERVER][INI_KEY_IOSENSOR_FILE_PATH] = ''; } save_ini($ini_load, $settingArr); return VERR_COMMON_SUCCESS; } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\72\40" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\x3a\x20" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\72\40\125\156\153\x6e\157\167\x6e\40\x65\x78\x63\145\x70\164\151\157\156\x2e\x20" . VERR_COMMON_INVALID . "\x20\x2c\40\111\x6e\x70\x75\x74\40\160\x61\162\141\x6d\x65\x74\x65\x72\x73\x3a\40" . json_encode($settingValueList) . "\x20\54\40\x49\156\x69\x20\146\151\x6c\145\x20\160\141\x74\x68\x3a\40" . $ini_load); return VERR_COMMON_INVALID; } } public function post_DirsForAccessible($parameters) { $dirs = $parameters["\x64\151\x72\163"]; for ($i = 0; $i < count($dirs); $i++) { $errorCode = $this->check_file_exist_and_writable($dirs[$i]["\144\151\162"]); $errorResponse = createResponse($errorCode); $dirs[$i]["\145\x72\162\x6f\162\x43\x6f\144\145"] = $errorResponse["\x65\162\162\x6f\162\x43\157\x64\x65"]; $dirs[$i]["\145\162\162\157\162\115\x65\163\163\141\x67\145"] = $errorResponse["\145\x72\x72\157\162\x4d\145\163\163\x61\x67\145"]; } return $dirs; } private function check_file_exist_and_writable($dir) { if (!file_exists($dir)) { $errorCode = VERR_COMMON_NOFILE; } else { if (!is_writable($dir)) { $errorCode = VERR_COMMON_PERMMITTED; } else { $errorCode = VERR_COMMON_SUCCESS; } } return $errorCode; } public function get_dbServerSettings() { $ini_load = APPPATH . INI_DBCONFIG_PATH; try { $hostname = get_ini($ini_load, "\105\62\104\102", "\150\157\163\x74\x6e\141\155\145"); $port = get_ini($ini_load, "\x45\x32\x44\102", "\x70\157\x72\x74"); return array("\150\x6f\163\164\156\141\155\x65" => $hostname, "\160\x6f\x72\x74" => $port); } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\x3a\x20" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\72\x20\x55\x6e\x6b\x6e\157\x77\156\40\x65\170\143\145\x70\x74\x69\x6f\156\56\x20" . VERR_COMMON_INVALID . "\x20\54\x20\x49\x6e\151\x20\x66\151\x6c\145\x20\160\141\164\150\72\x20" . $ini_load); return VERR_COMMON_INVALID; } } public function post_dbServerSettings($parameters) { $dbServerSettings = $parameters["\x64\142\x53\145\162\166\x65\x72\123\x65\x74\x74\151\x6e\147\x73"]; $hostname = $dbServerSettings["\x68\x6f\163\x74\156\141\x6d\145"]; $port = $dbServerSettings["\160\x6f\162\x74"]; $ini_load = APPPATH . INI_DBCONFIG_PATH; try { $settingArr = get_ini_array($ini_load); $settingValueList = array(); foreach ($settingArr as $key => $val) { array_push($settingValueList, ["\163\145\143\164\x69\157\x6e" => $key, "\153\x65\171" => "\x68\x6f\x73\x74\x6e\x61\x6d\145", "\x76\141\154\x75\145" => $hostname]); array_push($settingValueList, ["\x73\145\x63\164\x69\x6f\x6e" => $key, "\153\x65\171" => "\x70\157\162\164", "\166\141\154\165\145" => $port]); } vt_logd("\x6c\x65\x6e\x20\x3d\x20" . sizeof($settingValueList)); set_ini($ini_load, $settingValueList); return VERR_COMMON_SUCCESS; } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\x3a\40" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\72\40\x55\156\153\156\x6f\167\x6e\40\x65\170\x63\x65\x70\x74\151\157\x6e\56\x20" . VERR_COMMON_INVALID . "\x20\54\x20\x49\x6e\x70\165\x74\x20\160\141\x72\141\155\145\164\145\162\163\72\40" . json_encode($parameters) . "\x20\x2c\x20\x49\x6e\151\x20\x66\x69\154\x65\40\160\141\164\150\x3a\40" . $ini_load); return VERR_COMMON_INVALID; } } public function put_DBServerSettings($parameters) { $hostname = $parameters["\150\x6f\x73\164\x6e\141\155\145"]; $port = $parameters["\x70\x6f\162\164"]; $ini_load = APPPATH . INI_DBCONFIG_PATH; try { $settingArr = get_ini_array($ini_load); $settingValueList = array(); foreach ($settingArr as $key => $val) { array_push($settingValueList, ["\x73\145\x63\164\x69\157\x6e" => $key, "\153\145\x79" => "\x68\157\163\x74\156\141\155\x65", "\x76\x61\154\x75\145" => $hostname]); array_push($settingValueList, ["\163\x65\x63\164\x69\x6f\156" => $key, "\x6b\145\171" => "\x70\x6f\162\x74", "\166\141\154\165\145" => $port]); } set_ini($ini_load, $settingValueList); return array("\145\x72\162\157\x72\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x64\141\x74\x61" => $parameters); } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\x3a\x20" . $ex->getMessage()); return array("\x65\x72\162\x6f\162\x43\x6f\x64\145" => VERR_INI_INVALID_SECTION); } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return array("\x65\x72\x72\157\162\x43\x6f\x64\145" => VERR_INI_INVALID_PATH); } catch (Exception $ex) { vt_loge(__METHOD__ . "\x3a\40\x55\156\x6b\156\157\x77\x6e\40\145\170\x63\145\160\x74\x69\x6f\156\x2e\40" . VERR_COMMON_INVALID . "\40\54\40\x49\156\160\x75\x74\40\x70\141\x72\x61\155\145\164\x65\x72\163\x3a\x20" . json_encode($parameters) . "\40\x2c\x20\111\156\x69\40\x66\151\154\x65\40\160\x61\164\150\x4c\x20" . $ini_load); return array("\145\162\x72\157\162\103\x6f\x64\x65" => VERR_COMMON_INVALID); } } private function _checkDir($dirName, $path, &$result) { if (is_array($path)) { $check = true; foreach ($path as $val) { if (!file_exists($path)) { $check = false; break; } } } else { $check = file_exists($path); } array_push($result, ["\x64\x69\x72\x4e\141\x6d\x65" => $dirName, "\x63\150\145\143\153" => $check]); } public function post_checkExistDirectory($parameters) { $result = array(); $this->_checkDir("\x64\141\164\141\x46\151\154\x65\x50\141\164\150", $parameters["\x64\x61\x74\141\x46\x69\x6c\145\120\141\x74\150"], $result); if (!empty($parameters["\x73\165\142\x44\x61\164\141\106\x69\x6c\x65\120\141\164\x68"])) { $this->_checkDir("\163\x75\142\x44\x61\164\x61\x46\151\154\145\x50\x61\164\x68", $parameters["\x73\165\142\104\x61\164\x61\106\151\x6c\x65\120\x61\164\150"], $result); } if (!empty($parameters["\154\x69\x6e\153\x46\x69\154\x65\x50\x61\164\150"])) { $this->_checkDir("\x6c\151\156\153\106\x69\x6c\145\120\141\x74\x68", $parameters["\154\x69\x6e\x6b\x46\x69\x6c\145\120\141\x74\150"], $result); } if (!empty($parameters["\151\157\x53\x65\156\163\x6f\162\106\151\x6c\145\x50\141\x74\x68"])) { $this->_checkDir("\151\x6f\123\x65\156\x73\x6f\162\106\x69\154\145\120\x61\x74\150", $parameters["\151\x6f\x53\x65\156\163\157\x72\x46\x69\154\x65\x50\141\164\150"], $result); } return $result; } public function post_checkValidDBConnection($parameters) { $hostname = $parameters["\x68\x6f\163\x74\156\141\x6d\145"]; $port = $parameters["\160\x6f\x72\164"]; $ini_load = APPPATH . INI_DBCONFIG_PATH; try { $username = CryptoUtils::xor_string(base64_decode(get_ini($ini_load, "\x45\62\x44\102", "\x75\x73\x65\162\x6e\x61\155\145")), DB_KEY); $password = CryptoUtils::xor_string(base64_decode(get_ini($ini_load, "\105\x32\104\x42", "\x70\x61\163\163\x77\x6f\162\x64")), DB_KEY); $dbname = get_ini($ini_load, "\x45\62\104\x42", "\144\141\x74\x61\x62\141\x73\145"); $dbconn = pg_connect("\x68\157\x73\x74\75{$hostname}\40\x70\157\162\x74\x3d{$port}\x20\x64\142\156\x61\155\x65\75{$dbname}\x20\x75\163\x65\162\75{$username}\x20\160\x61\x73\163\167\x6f\162\x64\x3d{$password}"); $stat = pg_connection_status($dbconn); if ($stat === PGSQL_CONNECTION_OK) { return true; } return false; } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { vt_loge(__METHOD__ . "\72\x20" . $ex->getMessage()); return VERR_INI_INVALID_SECTION; } catch (\Retrinko\Ini\Exceptions\FileException $ex) { vt_loge(__METHOD__ . "\72\40" . $ex->getMessage()); return VERR_INI_INVALID_PATH; } catch (Exception $ex) { vt_loge(__METHOD__ . "\72\40\x55\156\153\156\157\167\156\40\145\x78\x63\x65\x70\x74\151\157\156\56\x20" . VERR_COMMON_INVALID . "\x20\54\40\111\156\160\165\x74\40\x70\x61\162\141\x6d\x65\x74\145\162\x73\72\x20" . json_encode($parameters) . "\x20\x2c\x20\x49\156\x69\x20\146\151\154\145\40\160\141\164\x68\114\x20" . $ini_load); return VERR_COMMON_INVALID; } } } diff --git a/server/original/www/ezwebserver/src/application/models/SmartPayAccounts_model.php b/server/original/www/ezwebserver/src/application/models/SmartPayAccounts_model.php index 1fbbbbc..7b3ef0c 100644 --- a/server/original/www/ezwebserver/src/application/models/SmartPayAccounts_model.php +++ b/server/original/www/ezwebserver/src/application/models/SmartPayAccounts_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strUserID))->result_array(); } public function put_SmartPayAccounts($strUserID, $strPassword, $bQueryUserID) { $sql = "\x53\x45\114\105\103\x54\40\x73\160\137\141\x63\x63\x5f\165\x73\x65\162\156\141\155\145\x2c\x20\163\160\x5f\x61\x63\143\x5f\160\x61\163\163\x77\157\162\144\x20\x46\122\x4f\115\40\x65\x32\x5f\163\x6d\141\162\164\x70\141\171\x5f\x61\x63\x63\157\165\x6e\164\40"; $query = $this->db->query($sql, array($strUserID))->result_array(); if (count($query) > 0) { $strPrevUserId = $query[0]["\163\x70\x5f\x61\143\143\x5f\x75\163\x65\x72\x6e\141\155\x65"]; if (!empty($strPrevUserId) && $strPrevUserId != $strUserID) { $this->delete_SmartPayAccounts($strPrevUserId, TRUE); } else { $sql = "\x55\120\104\x41\x54\105\x20\x65\62\x5f\x73\x6d\x61\x72\x74\x70\141\171\x5f\x61\x63\143\157\x75\x6e\164\40\x53\105\x54\x20\163\160\137\x61\143\x63\x5f\160\x61\163\163\x77\x6f\162\x64\x20\x3d\x20\77\40\127\110\105\122\x45\40\163\160\137\141\143\x63\137\165\x73\145\x72\x6e\x61\155\145\40\x3d\40\x3f"; $this->db->query($sql, array($strPassword, $strUserID)); return $this->db->affected_rows(); } } $sql = "\111\x4e\x53\x45\122\124\40\x49\x4e\x54\x4f\x20\x65\62\x5f\163\x6d\141\162\x74\x70\141\171\137\x61\x63\143\157\165\x6e\164\40\x28\163\x70\x5f\141\143\x63\x5f\x75\x73\145\x72\x6e\141\x6d\x65\x2c\x20\x73\160\137\x61\143\143\137\x70\x61\163\163\x77\x6f\162\144\51\40\126\101\x4c\x55\x45\x53\x20\50\77\x2c\40\77\x29"; $this->db->query($sql, array($strUserID, $strPassword)); return $this->db->affected_rows(); } public function delete_SmartPayAccounts($strUserID, $bQueryUserID) { if ($bQueryUserID == TRUE) { if (!isset($strUserID) || empty($strUserID)) { return VERR_COMMON_INVALID; } $sql = "\40\x57\x48\x45\122\x45\40\x73\x70\x5f\x61\143\143\x5f\165\x73\145\x72\x6e\x61\x6d\x65\x20\x3d\40" . $this->db->escape($strUserID); } else { $sql = "\40\127\110\x45\x52\105\40\x73\160\137\x61\x63\143\137\165\163\145\x72\156\x61\x6d\x65\x20\75\40\x28\x73\145\x6c\145\143\x74\x20\163\160\137\141\x63\143\137\165\163\145\x72\156\x61\x6d\x65\40\146\162\157\x6d\x20\145\62\137\x73\155\x61\x72\164\160\x61\171\x5f\x61\x63\143\x6f\165\156\x74\x20\154\151\155\151\x74\x20\x31\51"; } load_model($this, "\x45\x78\x74\x72\141\117\162\141\154\x44\145\x76\151\x63\145\163\x5f\x6d\x6f\144\x65\154"); $this->ExtraOralDevices_model->DBMUpdateExtraOralDeviceInfoCheckSum($sql, "\163\x70\x5f\x61\143\x63\x5f\165\x73\x65\162\156\141\155\x65\x20\75\x20\x6e\165\154\154", TRUE, TRUE); $sql = "\104\x45\114\x45\x54\x45\x20\106\122\117\x4d\x20\145\62\137\163\155\x61\x72\x74\x70\x61\x79\137\x61\143\x63\x6f\x75\156\164"; if ($bQueryUserID == TRUE) { $sql .= "\40\127\110\x45\x52\105\40\163\160\137\141\143\143\137\x75\163\145\162\x6e\141\x6d\145\x20\75\x20\x3f"; } $this->db->query($sql, array($strUserID)); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/SmartPayCheckSums_model.php b/server/original/www/ezwebserver/src/application/models/SmartPayCheckSums_model.php index a828d9c..c4fa7ac 100644 --- a/server/original/www/ezwebserver/src/application/models/SmartPayCheckSums_model.php +++ b/server/original/www/ezwebserver/src/application/models/SmartPayCheckSums_model.php @@ -1,7 +1,7 @@ db->query($sql)->result_array(); if (count($query) > 0) { foreach ($query as $row) { $strcCheckSum = getSmartPayCheckSum($row, "\x73\x70\x5f\x63\146\147\x5f\143\150\145\143\153\163\165\x6d", "\x73\160\x5f\143\146\x67\137\163\x65\x72\x5f\x64\145\146\x69\156\145\x64\137\64"); $sql = "\125\120\104\101\124\x45\40\145\x32\137\x73\x6d\141\162\164\x70\x61\171\x5f\143\157\156\146\x69\147\40\123\x45\x54\40\163\160\137\x63\146\147\137\143\x68\x65\x63\x6b\163\165\155\x20\x3d\x20\77"; $this->db->query($sql, array($strcCheckSum)); } if ($this->db->affected_rows() > 0) { return $strcCheckSum; } else { return VERR_DB_INVALIDDATA; } } else { return VERR_DB_NOSUCHDATA; } } public function put_SmartPayConfigsForE3Version($strE3Version) { $sql = "\12\x20\x20\40\x20\40\x20\40\40\40\x20\40\x20\125\x50\x44\x41\124\x45\40\x65\x32\x5f\x73\x6d\141\x72\x74\x70\x61\171\x5f\x63\x6f\x6e\x66\x69\x67\x20\x53\105\x54\40\163\160\137\x63\146\147\137\145\x33\x5f\x76\x65\x72\x73\x69\x6f\x6e\40\75\40\x3f"; $this->db->query($sql, array($strE3Version)); return $this->db->affected_rows(); } public function get_SmartPayConfigs() { $sql = "\12\40\x20\x20\40\40\x20\x20\x20\40\40\40\x20\123\105\114\x45\x43\x54\40\x2a\x20\106\x52\117\115\x20\x65\62\x5f\163\x6d\x61\x72\x74\x70\x61\171\x5f\143\x6f\x6e\146\151\x67\x20\x4c\111\115\x49\124\40\61"; return $this->db->query($sql)->result_array(); } } diff --git a/server/original/www/ezwebserver/src/application/models/SmartPayImages_model.php b/server/original/www/ezwebserver/src/application/models/SmartPayImages_model.php index d3f0bb1..5befd5c 100644 --- a/server/original/www/ezwebserver/src/application/models/SmartPayImages_model.php +++ b/server/original/www/ezwebserver/src/application/models/SmartPayImages_model.php @@ -1,7 +1,7 @@ db->query($sql, array($nImageID)); return $this->db->affected_rows(); } public function put_SmartPayImagesByFileForPaid($strImgFileName) { $sql = "\x53\105\114\105\x43\x54\x20\52\40\106\122\117\115\40\x65\62\x5f\x73\155\x61\x72\x74\x70\x61\171\137\x69\x6d\x61\147\x65\x20\127\110\x45\122\105\x20\151\x6d\147\x5f\x69\x64\40\75\x20\50\x53\105\x4c\105\103\124\x20\111\x4d\x47\x5f\x49\104\40\106\122\117\x4d\x20\105\x32\x5f\x49\115\107\x20\x57\110\105\x52\105\x20\111\x4d\x47\137\x46\x49\x4c\x45\x4e\101\x4d\105\40\75\40\77\x29"; $query = $this->db->query($sql, array($strImgFileName))->result_array(); if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } $sql = "\125\120\x44\x41\x54\105\40\x65\62\137\x73\x6d\141\x72\x74\x70\x61\x79\x5f\x69\155\141\x67\145\40\x53\105\x54\x20\x73\160\x5f\x69\x6d\147\137\160\x61\171\x5f\x73\x74\141\164\x75\163\40\75\x20\x3f\x2c\x20" . "\163\x70\137\x69\x6d\x67\x5f\160\141\171\x5f\x64\141\x74\145\164\151\x6d\x65\40\x3d\x20\156\x6f\167\x28\51\40\x57\110\x45\x52\105\x20\x69\155\147\x5f\x69\x64\40\75\40\50\x53\x45\114\105\x43\124\40\x49\x4d\107\137\111\104\40\x46\122\117\115\x20\x45\x32\137\x49\x4d\107\40\127\110\105\122\105\40\x49\x4d\x47\137\106\x49\x4c\105\116\x41\x4d\105\40\75\40\x3f\x29"; $this->db->query($sql, array(ImagePayStatusToString("\x65\111\x6d\141\147\x65\120\x61\151\x64\x53\x74\x61\164\x75\163"), $strImgFileName)); if ($this->db->affected_rows() == 0) { return VERR_DB_INVALIDDATA; } $strCheckSum = ''; $ret = $this->get_SmartPayImagesForChecksum($strImgFileName, $strCheckSum, TRUE); if ($ret > 0) { load_model($this, "\105\x78\164\x72\x61\x4f\162\x61\x6c\104\x65\x76\151\x63\x65\x73\137\155\x6f\x64\145\154"); $extraOralCheckSum = $this->ExtraOralDevices_model->DBMUpdateExtraOralDeviceInfoCheckSum("\127\x48\105\x52\x45\40\x64\145\166\137\x73\x65\x72\x69\x61\x6c\x5f\x6e\x75\x6d\x20\75\40\50\x73\145\x6c\x65\x63\164\x20\144\x65\166\x5f\x73\x65\x72\x69\141\154\137\x6e\x75\155\x20\146\162\157\x6d\40\145\x32\x5f\151\x6d\147\40\167\150\x65\162\x65\40\151\155\x67\x5f\146\x69\x6c\145\156\x61\155\x65\x20\75\40" . $this->db->escape($strImgFileName) . "\x29", "\x64\145\166\x5f\163\160\137\x70\x61\171\137\x63\157\x75\156\164\75\144\x65\166\x5f\163\x70\137\160\x61\x79\x5f\x63\x6f\x75\x6e\164\53\61", TRUE, TRUE); if ($extraOralCheckSum == VERR_DB_NOSUCHDATA) { return VERR_DB_NOSUCHDATA; } return $ret; } else { return $ret; } } public function get_SmartPayImagesByFile($strImgFileName) { $sql = "\123\x45\114\x45\103\x54\40\x2a\40\x46\x52\117\x4d\40\145\62\137\163\x6d\x61\162\164\x70\x61\x79\137\x69\155\141\x67\x65\x20\127\110\x45\122\105\40\151\x6d\147\137\x69\144\40\x3d\x20\50\x53\105\x4c\x45\103\x54\40\x69\155\x67\x5f\x69\144\40\106\122\117\115\x20\145\62\x5f\x69\x6d\147\x20\x57\110\105\x52\105\40\x69\x6d\147\x5f\x66\x69\x6c\x65\x6e\141\155\x65\x20\75\40\77\x29"; $query = $this->db->query($sql, array($strImgFileName))->result_array(); return $query; } public function get_SmartPayImagesByFile_UpdateSmartPayImage($parameters) { $sql = "\125\120\104\101\124\x45\40\145\x32\x5f\163\x6d\x61\162\164\x70\x61\171\137\x69\x6d\x61\x67\x65\40\123\x45\x54\x20\x73\160\137\x69\x6d\147\x5f\160\141\x79\137\163\x74\141\x74\165\x73\x20\x3d\40\77\54\40\x73\160\137\x69\155\x67\x5f\160\x61\x79\137\x74\171\160\x65\40\x3d\40\77\x2c\40\163\160\137\151\155\147\x5f\165\156\141\x76\141\151\x6c\x61\142\154\x65\x5f\146\145\x61\x74\165\x72\x65\x73\x20\75\x20\77\x20\127\x48\x45\x52\x45\40\151\155\x67\x5f\x69\x64\40\x3d\40\40\77"; $this->db->query($sql, $parameters); return $this->db->affected_rows(); } public function post_SmartPayImagesByFile($strImgFileName, $sSmartPayImage) { $sql = "\123\105\114\105\x43\x54\40\151\x6d\x67\x5f\x69\x64\x20\106\x52\117\115\x20\x65\62\137\151\x6d\147\x20\x57\x48\105\x52\105\x20\151\x6d\147\137\x66\x69\154\145\x6e\x61\155\145\40\75\x20\77"; $query = $this->db->query($sql, array($strImgFileName))->result_array(); if (count($query) == 0) { return VERR_DB_NOSUCHDATA; } $nImageID = $query[0]["\151\155\147\x5f\x69\x64"]; $sql = "\x53\105\x4c\x45\103\124\x20\151\x6d\147\x5f\x69\x64\40\106\122\x4f\115\x20\x65\x32\x5f\163\x6d\141\x72\164\160\141\x79\x5f\x69\x6d\141\147\145\40\127\x48\x45\122\105\40\x69\155\147\137\x69\144\40\75\40\77"; $query = $this->db->query($sql, array($nImageID))->result_array(); if (count($query) == 0) { $sql = "\x49\116\123\x45\122\124\x20\111\x4e\x54\x4f\40\145\62\137\x73\x6d\141\162\x74\160\x61\x79\x5f\x69\x6d\x61\147\145\x20" . "\50\x69\x6d\147\137\x69\144\x2c\x73\x70\x5f\151\155\x67\137\160\x61\171\137\x73\x74\141\164\x75\163\54\163\160\x5f\x69\155\147\x5f\160\x61\171\137\144\141\x74\145\164\151\155\145\54" . "\163\160\x5f\x69\155\x67\x5f\x72\145\160\157\162\164\x5f\163\x74\x61\164\165\163\54\x73\160\137\x69\x6d\x67\x5f\162\x65\160\157\162\x74\137\x64\x61\164\x65\164\x69\155\x65\54" . "\x73\160\x5f\151\x6d\x67\x5f\x70\141\x79\x5f\x74\171\160\x65\x2c\x73\160\x5f\151\155\x67\x5f\165\x6e\x61\x76\x61\151\x6c\141\142\x6c\x65\137\x66\x65\x61\164\x75\x72\x65\163\x2c\163\x70\137\x69\155\x67\137\143\150\x65\143\153\163\x75\155\x29\x20\x56\x41\114\x55\105\123\40\50\77\54\x3f\54\x3f\54\x3f\54\x3f\54\77\54\x3f\x2c\77\x29"; $this->db->query($sql, array($nImageID, ImagePayStatusToString($sSmartPayImage["\x65\111\x6d\141\x67\145\x50\x61\171\x53\164\x61\164\x75\x73"]), currentDateFormat(DATEFORMAT_DATABASE_DETAIL, $sSmartPayImage["\144\164\x49\155\x61\x67\145\x50\141\x79\124\151\x6d\145"]), ImageReportStatusToString($sSmartPayImage["\x65\111\155\141\x67\x65\x52\x65\160\157\x72\x74\123\x74\141\x74\165\x73"]), currentDateFormat(DATEFORMAT_DATABASE_DETAIL, $sSmartPayImage["\x64\x74\111\x6d\141\x67\145\122\x65\x70\x6f\162\x74\x54\151\x6d\145"]), ImagePayTypeToString($sSmartPayImage["\x65\111\x6d\141\x67\x65\120\x61\171\124\171\x70\x65"]), $sSmartPayImage["\x73\164\162\125\156\x61\166\x61\151\154\x61\x62\154\145\106\145\141\164\165\x72\x65\163"], $sSmartPayImage["\163\164\162\x43\150\x65\143\x6b\123\165\155"])); } else { $sql = "\x55\x50\104\101\x54\105\x20\145\62\137\163\155\x61\x72\164\x70\141\171\137\151\155\x61\x67\145\x20\123\105\x54\40" . "\x73\160\137\151\155\x67\x5f\160\x61\x79\137\163\164\141\x74\165\163\x20\x3d\40\x3f\x2c\40\163\x70\x5f\151\155\147\x5f\160\x61\x79\137\144\x61\x74\145\x74\x69\x6d\x65\x20\75\x3f\x2c" . "\x73\x70\137\151\155\147\137\x72\x65\x70\x6f\x72\164\x5f\163\x74\141\164\x75\163\40\x3d\40\x3f\x2c\40\163\160\137\x69\x6d\147\137\x72\x65\x70\x6f\162\x74\x5f\144\141\x74\145\164\151\x6d\145\x20\x3d\40\77\54" . "\x73\160\137\151\x6d\x67\137\x70\141\171\137\x74\171\160\145\40\x3d\x20\x3f\x2c\163\x70\137\151\x6d\147\137\x75\156\141\x76\x61\151\154\x61\142\x6c\145\x5f\x66\x65\x61\x74\x75\162\145\x73\40\75\x20\x3f\54\x20\163\x70\137\x69\x6d\147\137\143\150\145\x63\153\163\x75\x6d\x20\75\x3f\x20\127\x48\105\x52\x45\x20\x69\155\x67\137\x69\x64\40\x3d\x20\x3f"; $this->db->query($sql, array(ImagePayStatusToString($sSmartPayImage["\145\x49\155\x61\x67\145\x50\x61\171\x53\x74\141\x74\165\x73"]), currentDateFormat(DATEFORMAT_DATABASE_DETAIL, $sSmartPayImage["\144\x74\x49\155\141\x67\145\x50\141\171\124\151\x6d\145"]), ImageReportStatusToString($sSmartPayImage["\145\111\x6d\x61\x67\145\x52\x65\x70\157\162\x74\x53\164\141\x74\165\x73"]), currentDateFormat(DATEFORMAT_DATABASE_DETAIL, $sSmartPayImage["\144\x74\x49\x6d\141\x67\145\122\x65\160\157\162\x74\x54\151\155\x65"]), ImagePayTypeToString($sSmartPayImage["\x65\x49\155\141\147\x65\x50\141\171\x54\x79\160\x65"]), $sSmartPayImage["\163\x74\162\125\x6e\141\x76\x61\x69\154\x61\142\154\145\106\x65\x61\164\165\x72\145\x73"], $sSmartPayImage["\x73\x74\162\103\x68\x65\143\153\123\x75\x6d"], $nImageID)); } if ($this->db->affected_rows() > 0) { $strCheckSum = ''; $ret = $this->get_SmartPayImagesForChecksum($strImgFileName, $strCheckSum, TRUE); if ($sSmartPayImage["\x65\111\155\x61\x67\x65\x50\141\171\x54\x79\x70\145"] != "\145\x49\155\141\x67\145\x55\156\x70\x61\151\x64\124\171\x70\x65") { load_model($this, "\x45\170\164\x72\141\x4f\162\141\x6c\104\145\x76\x69\143\x65\x73\x5f\x6d\157\x64\x65\x6c"); $extraOralCheckSum = $this->ExtraOralDevices_model->DBMUpdateExtraOralDeviceInfoCheckSum("\127\x48\x45\122\x45\x20\144\145\166\137\163\x65\162\151\x61\x6c\137\x6e\x75\x6d\40\x3d\40\50\x73\x65\x6c\x65\x63\164\40\144\145\166\137\x73\145\162\151\x61\x6c\x5f\156\x75\x6d\x20\146\x72\x6f\x6d\x20\x65\62\137\x69\x6d\147\40\167\x68\x65\x72\145\x20\x69\x6d\x67\137\x66\151\x6c\145\156\141\x6d\145\x20\75\x20" . $this->db->escape($strImgFileName) . "\51", "\x64\x65\166\137\163\160\137\160\141\171\x5f\143\x6f\165\x6e\x74\x3d\144\145\x76\x5f\x73\x70\x5f\x70\x61\x79\137\143\x6f\x75\156\x74\x2b\61", TRUE, TRUE); if ($extraOralCheckSum === VERR_DB_NOSUCHDATA) { return VERR_DB_NOSUCHDATA; } } return $ret; } else { return VERR_DB_INVALIDDATA; } } public function delete_SmartPayImagesByFile($strImgFileName) { $sql = "\123\x45\114\105\x43\x54\40\111\115\107\x5f\x49\x44\x20\106\122\x4f\115\40\x45\62\x5f\x49\x4d\107\x20\x57\110\x45\122\105\x20\x49\x4d\x47\137\x46\x49\x4c\x45\x4e\101\115\105\x20\75\x20\77"; $ret = $this->db->query($sql, array($strImgFileName))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $sql = "\12\x20\x20\x20\40\x20\x20\40\40\40\40\40\40\104\105\x4c\105\124\105\x20\106\122\117\x4d\x20\x65\62\137\163\x6d\141\162\164\x70\141\171\x5f\x69\155\141\147\145\xa\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\127\x48\105\x52\105\40\151\x6d\x67\137\x69\x64\x20\x3d\x20\50\x53\105\114\x45\x43\x54\40\x49\115\107\x5f\111\x44\x20\x46\x52\x4f\x4d\40\105\x32\137\x49\x4d\x47\x20\x57\x48\x45\x52\x45\40\111\115\107\x5f\x46\x49\114\x45\x4e\101\115\105\40\75\40\77\x29"; $this->db->query($sql, array($strImgFileName)); return $this->db->affected_rows(); } public function get_SmartPayImagesForChecksum($strimgFileName, $strCheckSum, $bUpdateData) { if ($bUpdateData == TRUE) { $sql = "\x53\105\114\x45\103\124\x20\x2a\40\106\122\117\x4d\x20\x65\62\137\163\x6d\x61\x72\x74\160\x61\x79\137\x69\155\141\x67\145"; if (!empty($strimgFileName)) { $sql .= "\x20\x57\110\105\122\x45\x20\151\x6d\147\x5f\x69\x64\x20\75\40\x28\x53\105\114\105\103\x54\x20\x49\x4d\x47\137\x49\x44\x20\x46\x52\x4f\x4d\x20\x45\62\137\111\x4d\107\40\x57\110\105\x52\105\40\x49\x4d\x47\137\x46\x49\x4c\105\x4e\x41\x4d\x45\x20\75\x20\x3f\x29"; $query = $this->db->query($sql, array($strimgFileName))->result_array(); } else { $query = $this->db->query($sql)->result_array(); } if (count($query) > 0) { foreach ($query as $row) { $strCheckSum = getSmartPayCheckSum($row, "\163\x70\137\151\x6d\147\137\x63\x68\145\143\x6b\x73\x75\155", "\163\160\137\151\155\x67\x5f\165\163\145\162\x5f\x64\145\146\151\156\x65\x64\x5f\64"); $sql = "\x55\x50\104\x41\124\x45\x20\x65\62\137\163\x6d\141\x72\164\160\x61\x79\137\151\155\x61\147\145\40\x53\x45\124\40\x73\160\x5f\151\155\147\137\143\x68\x65\x63\x6b\x73\165\x6d\x20\x3d\x20\x3f\40\127\x48\x45\122\105\40\151\155\147\137\151\144\40\x3d\40\77"; $this->db->query($sql, array($strCheckSum, $row["\151\x6d\x67\x5f\151\144"])); } return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } else { return VERR_DB_NOSUCHDATA; } } public function get_SmartPayImagesForNotReported() { $sql = "\x53\105\114\105\103\x54\x20\x65\62\137\x73\x6d\x61\162\x74\x70\x61\x79\137\151\x6d\141\x67\x65\x2e\x2a\x2c\x65\x32\137\x69\155\x67\56\151\x6d\147\x5f\x66\151\x6c\x65\156\141\x6d\x65\x2c\145\62\137\151\x6d\x67\x2e\x70\141\x74\x5f\x63\x68\141\x72\x74\156\x6f\54\145\62\137\151\155\x67\x2e\x64\145\166\x5f\x73\x65\x72\151\x61\154\x5f\156\x75\x6d\x20\x46\122\117\x4d\x20\145\62\x5f\151\155\x67\x2c\x65\62\x5f\x73\155\x61\162\x74\160\141\171\137\151\155\x61\147\x65\x20\x57\110\105\122\105\x20\145\62\x5f\151\155\147\x2e\x69\155\x67\137\151\144\x20\x3d\x20\145\62\x5f\163\x6d\x61\x72\x74\x70\141\171\x5f\x69\x6d\141\147\x65\56\151\x6d\x67\137\x69\144" . "\x20\101\116\x44\x20\x73\x70\x5f\x69\x6d\147\x5f\160\141\x79\x5f\163\x74\141\164\x75\163\40\x3d\x20\47\x50\141\x69\x64\x27\40\x41\116\x44\40\x73\x70\137\x69\155\147\x5f\162\x65\x70\x6f\162\x74\x5f\163\164\141\x74\x75\x73\x20\75\x20\47\116\157\164\x52\145\160\x6f\162\164\145\144\47" . "\40\x4f\122\x44\105\122\x20\102\x59\x20\x65\x32\x5f\x69\x6d\x67\56\144\x65\166\137\x73\145\x72\151\141\154\137\156\165\x6d\54\x69\x6d\147\137\x69\x64"; return $this->db->query($sql)->result_array(); } public function put_SmartPayImagesByFileForReportStatus($strImgFileName, $eImageReportStatus) { $sql = "\x55\x50\x44\x41\124\105\40\145\x32\137\163\155\141\x72\x74\160\141\x79\137\x69\x6d\x61\147\145\x20" . "\123\105\x54\40\163\160\x5f\151\x6d\147\x5f\162\145\160\157\162\x74\x5f\163\164\141\x74\x75\163\x20\75\40\x3f\54\x20\x73\160\137\151\x6d\147\137\x72\145\160\157\x72\x74\x5f\144\141\164\x65\164\x69\x6d\x65\x20\x3d\40\x6e\157\167\x28\51\40" . "\x57\x48\x45\x52\x45\40\x69\x6d\x67\x5f\x69\144\x20\75\x20\x28\x53\x45\114\x45\x43\124\40\111\115\x47\137\x49\104\x20\x46\x52\117\x4d\x20\105\62\137\x49\x4d\107\x20\x57\110\x45\x52\x45\40\111\x4d\107\x5f\x46\x49\114\x45\116\101\x4d\105\x20\x3d\x20\77\x29"; $this->db->query($sql, array(ImageReportStatusToString($eImageReportStatus), $strImgFileName)); if ($this->db->affected_rows() == 0) { return VERR_DB_INVALIDDATA; } $strCheckSum = ''; $ret = $this->get_SmartPayImagesForChecksum($strImgFileName, $strCheckSum, TRUE); return $ret; } public function post_SmartPayImages($parametersWithSmartPayImage) { $sql = "\xa\40\x20\x20\x20\40\40\x20\x20\40\40\x20\x20\x53\105\x4c\x45\103\124\x20\x49\x4d\107\x5f\x49\x44\xa\x20\x20\40\40\40\40\x20\x20\x20\40\40\x20\106\x52\x4f\x4d\x20\105\62\137\111\x4d\x47\40\x57\110\105\x52\x45\40\x49\115\x47\137\106\111\114\105\x4e\x41\x4d\x45\40\x3d\40\x3f\xa\x20\x20\40\x20\40\x20\40\40\40\x20\40\x20\x4c\111\x4d\111\x54\40\x31"; $ret = $this->db->query($sql, array($parametersWithSmartPayImage["\x73\164\162\x49\x6d\147\106\x69\x6c\x65\x4e\141\155\145"]))->result_array(); if (count($ret) < 1) { return VERR_DB_NOSUCHDATA; } $nImageID = intval($ret[0]["\x69\x6d\147\137\151\x64"]); if ($parametersWithSmartPayImage["\x65\111\155\x61\x67\x65\x50\141\x79\x54\171\160\145"] == "\145\x49\x6d\x61\147\145\x55\156\160\x61\151\144\x54\171\160\x65") { $strUnavailableFeatures_ = trim($parametersWithSmartPayImage["\x73\x74\162\x55\x6e\x61\166\x61\151\154\141\x62\154\x65\x46\x65\141\x74\165\x72\145\x73"]); if (empty($strUnavailableFeatures_) == TRUE) { $strUnavailableFeatures_ = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; } $sql = "\xa\x20\40\x20\x20\40\40\x20\40\40\40\x20\x20\40\40\x20\40\x49\x4e\123\x45\122\x54\40\x49\116\x54\x4f\40\x65\62\137\x73\x6d\x61\x72\164\x70\141\171\x5f\x69\x6d\x61\x67\145\40\50\12\40\x20\40\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\x20\40\40\40\40\151\155\x67\x5f\x69\144\54\40\x73\160\x5f\151\155\147\x5f\x75\156\x61\166\141\x69\x6c\141\x62\x6c\x65\x5f\x66\145\x61\164\x75\162\145\163\x29\xa\40\x20\40\x20\40\x20\40\40\40\x20\40\40\x20\x20\40\x20\126\101\x4c\125\105\123\40\50\77\54\40\x3f\x29"; $this->db->query($sql, array($nImageID, $strUnavailableFeatures_)); $ret = $this->db->affected_rows(); } else { $sql = "\xa\x20\40\40\x20\40\40\40\x20\40\40\40\40\40\x20\40\40\x49\116\x53\x45\x52\x54\40\x49\116\124\x4f\x20\145\62\x5f\x73\155\x61\x72\164\x70\x61\171\x5f\x69\x6d\141\x67\x65\x20\50\xa\x20\40\40\x20\x20\40\40\40\40\x20\x20\x20\x20\x20\x20\x20\40\40\40\x20\x69\x6d\147\x5f\x69\144\54\x73\160\137\151\155\x67\137\x70\x61\171\x5f\163\164\x61\x74\165\163\x2c\163\160\x5f\x69\x6d\x67\x5f\160\141\171\137\144\141\x74\x65\164\151\155\x65\54\163\x70\x5f\x69\x6d\147\x5f\x70\x61\x79\137\164\x79\x70\145\x2c\x73\160\137\x69\x6d\147\137\x75\x6e\x61\x76\141\x69\154\x61\142\154\145\137\146\x65\x61\x74\x75\x72\145\163\51\xa\x20\40\40\x20\x20\40\x20\40\40\x20\x20\x20\x20\40\x20\40\x56\101\114\x55\105\x53\40\x28\77\54\x20\x3f\54\x20\x6e\157\x77\x28\51\x2c\x20\77\54\40\x3f\x29"; $this->db->query($sql, array($nImageID, ImagePayStatusToString(enumToString(new EImagePayStatus(), (new EImagePayStatus())->eImagePaidStatus)), ImagePayTypeToString($parametersWithSmartPayImage["\x65\x49\x6d\x61\147\145\x50\x61\x79\124\x79\160\145"]), $parametersWithSmartPayImage["\x73\x74\162\x55\x6e\x61\166\141\x69\x6c\x61\142\x6c\145\x46\145\x61\x74\165\x72\145\x73"])); $ret = $this->db->affected_rows(); } if ($ret > 0) { $strCheckSum = ''; $ret = $this->get_SmartPayImagesForChecksum($parametersWithSmartPayImage["\x73\x74\162\x49\x6d\x67\x46\151\x6c\x65\x4e\x61\x6d\x65"], $strCheckSum, TRUE); if ($parametersWithSmartPayImage["\145\x49\x6d\x61\147\145\x50\141\171\x54\x79\160\x65"] != "\x65\111\155\141\147\x65\125\x6e\160\141\x69\144\124\x79\160\145") { load_model($this, "\x45\x78\164\162\141\x4f\x72\x61\154\x44\x65\166\x69\x63\x65\x73\137\x6d\157\x64\145\x6c"); $extraOralCheckSum = $this->ExtraOralDevices_model->DBMUpdateExtraOralDeviceInfoCheckSum("\x57\110\105\x52\105\40\x64\145\x76\137\163\x65\162\151\x61\x6c\x5f\x6e\165\x6d\x20\x3d\40\50\163\x65\154\x65\143\x74\40\x64\145\166\x5f\x73\x65\162\x69\141\154\137\x6e\165\x6d\x20\x66\162\157\x6d\x20\145\62\137\151\155\147\x20\x77\150\x65\x72\145\40\x69\155\147\x5f\146\151\x6c\x65\156\141\155\x65\40\x3d\40" . $this->db->escape($parametersWithSmartPayImage["\163\164\x72\111\x6d\x67\106\x69\154\x65\x4e\x61\x6d\145"]) . "\51", "\144\x65\166\137\163\x70\x5f\160\141\x79\137\x63\157\165\x6e\x74\75\x64\x65\x76\137\x73\x70\137\160\141\171\137\143\x6f\165\156\x74\53\61", TRUE, TRUE); if ($extraOralCheckSum === VERR_DB_NOSUCHDATA) { return VERR_DB_NOSUCHDATA; } } return $ret; } else { vt_logw("\x44\141\x74\141\40\167\x61\163\x20\156\157\164\x20\x69\x6e\163\145\162\164\145\144\x20\151\156\x74\157\40\x74\150\145\40\145\62\x5f\163\155\x61\x72\x74\x70\141\171\137\x69\155\141\x67\145\40\x74\x61\142\154\x65\56"); return VERR_DB_INVALIDDATA; } } public function _isImg_id($nImageID) { $sql = "\xa\x20\x20\x20\40\40\40\x20\40\40\x20\x20\40\40\x20\40\40\123\105\x4c\x45\103\124\40\x63\x6f\165\156\x74\x28\x2a\x29\xa\40\x20\40\40\x20\40\40\x20\x20\40\x20\40\x20\40\x20\x20\106\x52\x4f\x4d\40\x65\x32\x5f\163\155\x61\162\164\160\x61\x79\x5f\151\x6d\141\x67\x65\12\40\x20\x20\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\x20\40\x57\x48\x45\122\105\40\x69\x6d\147\137\151\144\x20\x3d\x20\77"; $ret = $this->db->query($sql, array($nImageID))->result_array(); if ($ret[0]["\143\x6f\x75\x6e\164"] > 0) { return TRUE; } return FALSE; } public function put_SmartPayImages($parametersWithSmartPayImage) { $strUnavailableFeatures_ = trim($parametersWithSmartPayImage["\163\164\162\x55\156\141\x76\x61\x69\x6c\x61\142\154\x65\x46\x65\x61\x74\165\162\145\x73"]); if ($parametersWithSmartPayImage["\x65\111\x6d\x61\147\x65\120\x61\x79\124\171\160\x65"] == "\145\x49\x6d\x61\147\x65\125\x6e\160\x61\151\144\x54\x79\x70\145" && empty($strUnavailableFeatures_)) { $strUnavailableFeatures_ = SMARTPAY_DEFAULT_UNAVAILABLE_FEATURES; } $sql = "\123\x45\114\x45\103\x54\40\52\40\x46\122\117\115\40\x65\x32\x5f\163\x6d\141\x72\x74\x70\141\171\137\151\155\x61\x67\x65\40\127\110\x45\x52\x45\x20\x69\x6d\x67\137\x69\144\40\x3d\x20\x28\x53\x45\x4c\105\x43\124\x20\111\115\x47\x5f\x49\x44\40\x46\x52\117\x4d\x20\x45\62\137\x49\115\x47\40\x57\110\105\122\x45\40\111\x4d\x47\x5f\x46\x49\x4c\x45\116\101\x4d\105\x20\75\40\77\x29"; $ret = $this->db->query($sql, array($parametersWithSmartPayImage["\163\164\x72\111\x6d\x67\106\151\154\x65\116\x61\x6d\x65"]))->result_array(); if (count($ret) == 0) { return VERR_DB_NOSUCHDATA; } $sql = "\12\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\x20\x55\120\104\101\124\105\x20\x65\62\x5f\163\x6d\x61\x72\x74\x70\x61\171\137\151\x6d\x61\x67\145\xa\40\40\x20\40\x20\40\40\40\40\x20\40\x20\x53\105\x54\x20\x73\x70\x5f\x69\155\147\137\x70\141\x79\x5f\164\171\160\x65\40\75\40\77\54\40\x73\160\x5f\151\155\147\x5f\x75\x6e\x61\x76\x61\x69\154\141\142\x6c\145\x5f\146\145\x61\x74\165\162\145\x73\x20\x3d\x20\x3f\12\x20\40\40\40\40\x20\x20\x20\40\40\x20\40\127\x48\x45\x52\105\x20\151\x6d\x67\x5f\151\x64\x20\75\40\50\123\x45\x4c\105\103\124\40\x49\115\107\x5f\111\x44\40\x46\122\117\x4d\40\x45\x32\x5f\x49\115\107\40\127\x48\105\122\x45\40\111\x4d\107\137\106\x49\114\105\116\101\x4d\105\x20\x3d\40\x3f\51"; $this->db->query($sql, array(ImagePayTypeToString($parametersWithSmartPayImage["\x65\111\155\x61\147\x65\120\x61\x79\x54\x79\x70\x65"]), $strUnavailableFeatures_, $parametersWithSmartPayImage["\163\x74\x72\111\x6d\x67\106\151\154\x65\116\141\155\145"])); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/SocialIDProtector.php b/server/original/www/ezwebserver/src/application/models/SocialIDProtector.php index e738427..3447adf 100644 --- a/server/original/www/ezwebserver/src/application/models/SocialIDProtector.php +++ b/server/original/www/ezwebserver/src/application/models/SocialIDProtector.php @@ -1,7 +1,7 @@ factory = CryptoUtils::getCryptoClassFactory(CryptoUtils::PHPSECLIB); $this->engine = $this->factory->newAESEngine(); } public function encrypt_data($plain) { try { $props = new AESProperties(); $props->cipherMode = CipherMode::CBC; $props->paddingMode = PaddingMode::PKCS7; $props->keySize = ChunkSize::e128bits; $props->blockSize = ChunkSize::e128bits; $this->engine->setProperties($props); $this->engine->setKey(base64_decode(SocialIDProtector::KEY)); $this->engine->setIV(base64_decode(SocialIDProtector::IV)); $this->engine->encrypt($plain, $cipher); $encoded = base64_encode($cipher); } catch (InvalidArgumentException $ex) { vt_loge(sprintf("\x25\x73\72\40\111\156\166\x61\154\x69\x64\x20\x61\162\x67\165\x6d\145\x6e\x74\x20\145\x78\143\x65\x70\164\151\157\x6e\40\75\x20\45\163", __METHOD__, $ex)); return array("\x65\162\x72\157\162\103\157\144\145" => VERR_AUTH_UNAUTHENTICATED); } catch (InvalidHeaderException $ex) { vt_loge(sprintf("\45\163\x3a\x20\111\156\166\x61\154\151\144\x20\x68\145\x61\x64\x65\162\40\145\170\x63\x65\x70\x74\x69\157\x6e\40\75\x20\x25\x73", __METHOD__, $ex)); return array("\145\x72\162\157\x72\x43\157\x64\145" => VERR_AUTH_UNAUTHENTICATED); } $prefix = "\44\45\x24"; $prefix_encoded = $prefix . $encoded; return array("\x65\162\162\157\x72\103\157\144\145" => VERR_COMMON_SUCCESS, "\x65\156\143\x72\x79\x70\164\145\x64\104\141\164\141" => $prefix_encoded); } public function decrypt_data($cipher) { $prefix = "\44\45\x24"; $cipher = substr($cipher, strlen($prefix)); try { $props = new AESProperties(); $props->cipherMode = CipherMode::CBC; $props->paddingMode = PaddingMode::PKCS7; $props->keySize = ChunkSize::e128bits; $props->blockSize = ChunkSize::e128bits; $this->engine->setProperties($props); $this->engine->setKey(base64_decode(SocialIDProtector::KEY)); $this->engine->setIV(base64_decode(SocialIDProtector::IV)); $this->engine->decrypt(base64_decode($cipher), $decoded); } catch (InvalidArgumentException $ex) { vt_loge($ex); return array("\x65\x72\x72\x6f\x72\x43\x6f\144\145" => VERR_AUTH_UNAUTHENTICATED); } catch (InvalidHeaderException $ex) { vt_loge($ex); return array("\145\x72\x72\157\162\x43\157\144\145" => VERR_AUTH_UNAUTHENTICATED); } return array("\145\x72\x72\x6f\x72\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\144\x65\143\x72\171\x70\164\x65\x64\x44\141\164\141" => $decoded); } public function is_encrypted(&$cipher) { $prefix = "\44\45\x24"; if (substr($cipher, 0, strlen($prefix)) == $prefix) { return true; } return false; } } diff --git a/server/original/www/ezwebserver/src/application/models/StandardData_model.php b/server/original/www/ezwebserver/src/application/models/StandardData_model.php index 46c92e8..7a79a19 100644 --- a/server/original/www/ezwebserver/src/application/models/StandardData_model.php +++ b/server/original/www/ezwebserver/src/application/models/StandardData_model.php @@ -1,7 +1,7 @@ db->query($sql, array($raceName))->result_array(); } public function getStandardDataFromRaceId($raceId) { load_database($this, "\105\x32\104\102"); $sql = "\x53\105\x4c\105\103\x54\x20\x2a\x20\106\x52\x4f\x4d\x20\x65\62\137\157\x72\164\x68\157\137\163\x74\x61\156\144\x61\x72\144\137\144\141\164\141\40\x57\x48\x45\x52\x45\40\157\164\x68\137\x72\x61\x63\145\x5f\x69\144\x20\75\x20\77"; return $this->db->query($sql, array($raceId))->result_array(); } public function deleteStandardData($raceId) { load_database($this, "\105\x32\x44\102"); $sql = "\104\x45\x4c\105\124\105\x20\106\x52\117\115\40\145\62\x5f\157\x72\164\x68\157\x5f\163\164\x61\156\x64\141\162\144\x5f\144\x61\x74\141\40\x57\x48\x45\x52\x45\40\157\x74\x68\137\162\x61\x63\x65\x5f\151\144\40\75\x20\x3f"; return $this->db->query($sql, array($raceId)); } public function post_StandardData($raceName, $standardDataItems) { load_database($this, "\x45\x32\x44\x42"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->select("\x6f\x74\x68\x5f\162\141\143\x65\x5f\151\x64"); $this->db->from("\145\62\x5f\157\162\x74\x68\157\137\x72\x61\143\x65"); $this->db->where("\157\164\x68\x5f\162\141\x63\145\x5f\x6e\x61\x6d\145", $raceName); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_INVALIDDATA); } $race_id = intval($row->oth_race_id); $affected_row = 0; $this->db->trans_begin(); foreach ($standardDataItems as $standardDataItem) { $select_measureid_sql = $this->db->select("\157\164\150\x5f\x6d\145\141\163\x75\x72\x65\x6d\145\x6e\x74\137\x69\144")->where("\x6f\x74\x68\x5f\155\x65\141\x73\x75\162\145\155\145\156\164\137\x6e\141\155\x65", $standardDataItem->measurementName)->limit(1)->get_compiled_select("\145\62\x5f\x6f\162\164\x68\x6f\137\x6d\x65\x61\x73\x75\x72\145\155\145\x6e\164\x73"); $this->db->where("\x6f\164\150\x5f\162\x61\x63\x65\x5f\x69\144", $race_id); $this->db->where("\x6f\x74\x68\137\155\x65\x61\163\x75\162\x65\155\145\x6e\164\x5f\x69\x64", "\x28{$select_measureid_sql}\x29", FALSE); $this->db->where("\157\x74\150\x5f\163\164\144\137\x64\x61\164\141\x5f\x64\x65\x6e\x74\141\x6c\x61\x67\145\x5f\164\171\x70\x65", $standardDataItem->dentalAgeType); $this->db->where("\157\x74\x68\137\163\164\x64\137\144\x61\164\x61\x5f\147\145\x6e\144\145\x72", $standardDataItem->gender); $q = $this->db->get("\x65\x32\x5f\157\162\164\150\157\137\163\164\141\x6e\144\141\x72\x64\137\x64\141\x74\x61"); $this->db->reset_query(); if ($q->num_rows() > 0) { $affected_row = 0; break; } $data = array("\x6f\164\x68\x5f\x72\141\143\145\137\x69\x64" => $race_id, "\157\x74\x68\x5f\163\x74\144\137\x64\141\x74\141\x5f\144\x65\x6e\x74\141\154\x61\x67\145\137\164\171\160\145" => $standardDataItem->dentalAgeType, "\157\x74\150\x5f\163\164\144\x5f\x64\141\x74\x61\x5f\147\145\x6e\x64\145\162" => $standardDataItem->gender, "\x6f\x74\150\137\163\164\144\x5f\144\x61\164\x61\x5f\155\145\141\156" => $standardDataItem->mean, "\x6f\x74\x68\x5f\x73\x74\144\137\144\141\164\x61\x5f\163\x64" => $standardDataItem->SD, "\x6f\164\150\137\163\164\x64\x5f\144\141\x74\x61\137\x75\x73\145\162\x5f\x75\160\x64\141\x74\x65\x64" => filter_var($standardDataItem->userUpdated, FILTER_VALIDATE_BOOLEAN)); $this->db->set($data); $this->db->set("\x6f\x74\x68\x5f\155\145\x61\163\x75\x72\x65\155\x65\156\164\x5f\x69\144", "\50{$select_measureid_sql}\51", FALSE); $this->db->insert("\145\x32\137\x6f\162\164\150\x6f\x5f\x73\164\x61\x6e\144\x61\x72\x64\x5f\x64\x61\164\141"); $affected_row = $this->db->affected_rows(); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function post_StandardDataCopyByRace($sourceRaceName, $targetRaceName) { load_database($this, "\105\x32\x44\102"); $this->db->select("\x6f\x74\150\x5f\x72\141\x63\x65\137\x69\x64"); $this->db->from("\x65\x32\x5f\x6f\x72\x74\x68\x6f\137\x72\x61\143\145"); $this->db->where("\x6f\164\x68\x5f\162\x61\x63\145\x5f\156\x61\155\145", $sourceRaceName); $this->db->limit(1); $source = $this->db->get()->row(); if (!isset($source) || empty($source)) { vt_loge(__METHOD__ . "\72" . "\123\157\x75\162\143\145\x20\162\141\143\x65\x20\156\x61\x6d\145\40\151\x73\x20\x6e\157\x74\x20\163\x65\x74\x20\157\x72\40\145\155\x70\164\171\x3a\40" . $sourceRaceName); return createResponse(VERR_DB_NOSUCHDATA); } $this->db->select("\157\164\150\x5f\x72\x61\x63\x65\137\x69\x64"); $this->db->from("\145\62\137\157\x72\x74\150\x6f\x5f\162\141\x63\145"); $this->db->where("\x6f\x74\150\137\x72\x61\143\x65\137\156\141\155\x65", $targetRaceName); $this->db->limit(1); $target = $this->db->get()->row(); if (!isset($target) || empty($target)) { vt_loge(__METHOD__ . "\72" . "\x54\x61\x72\x67\x65\164\x20\162\141\143\x65\40\156\141\x6d\145\x20\151\163\40\156\x6f\x74\x20\163\x65\164\40\157\162\40\145\155\x70\164\x79\72\40" . $targetRaceName); return createResponse(VERR_DB_NOSUCHDATA); } $sql = "\12\x20\x20\x20\x20\x20\x20\40\40\40\40\x20\x20\x69\x6e\163\145\162\164\40\151\x6e\x74\157\40\x65\x32\x5f\x6f\162\164\x68\157\137\163\164\x61\x6e\144\x61\162\144\x5f\144\141\x74\x61\xa\40\40\40\x20\40\40\x20\40\40\x20\40\x20\x20\40\x20\40\x28\157\164\150\137\155\145\141\163\165\x72\x65\x6d\x65\156\x74\137\x69\144\54\x20\x6f\x74\x68\x5f\162\141\143\x65\x5f\x69\x64\54\x20\157\x74\150\137\141\x6e\x61\154\x79\163\151\163\x5f\x69\x64\x2c\x20\x6f\164\150\x5f\x73\x74\144\x5f\x64\141\x74\141\137\144\145\x6e\x74\141\x6c\141\x67\x65\x5f\164\171\x70\x65\54\12\40\x20\x20\40\40\40\x20\x20\x20\40\40\40\40\40\40\x20\x6f\164\x68\x5f\x73\164\144\137\x64\141\x74\141\137\x67\145\x6e\144\145\x72\x2c\x20\x6f\x74\x68\x5f\x73\x74\x64\x5f\144\141\164\141\137\x6d\145\x61\x6e\x2c\x20\x6f\x74\x68\x5f\163\x74\x64\x5f\144\141\164\141\137\x73\x64\54\x20\157\x74\x68\x5f\163\x74\x64\x5f\144\141\164\141\137\x75\163\x65\x72\137\165\x70\x64\141\x74\x65\x64\x29\12\40\40\x20\x20\40\40\40\x20\40\40\40\40\163\145\x6c\x65\143\164\x20\x6f\164\x68\x5f\155\145\x61\163\x75\x72\x65\155\145\x6e\164\137\x69\x64\x2c\12\40\x20\x20\x20\40\40\x20\x20\x20\40\x20\x20\40\40\40\x20\50\x73\145\x6c\x65\x63\164\40\157\164\150\137\x72\141\x63\x65\x5f\151\x64\40\146\x72\x6f\155\40\145\x32\137\157\162\x74\x68\157\137\162\x61\x63\145\40\167\x68\145\x72\x65\x20\157\x74\150\137\x72\x61\143\145\137\x6e\x61\x6d\145\40\x3d\x20\x3f\51\12\40\x20\40\x20\x20\x20\40\x20\40\40\40\40\x20\40\40\40\x6f\x74\150\137\162\141\143\145\x5f\151\x64\x2c\40\x6f\x74\x68\137\141\x6e\x61\x6c\171\163\x69\x73\137\x69\144\x2c\40\x6f\164\150\137\163\164\x64\137\144\141\x74\141\x5f\x64\x65\x6e\x74\x61\154\141\147\145\x5f\164\x79\x70\x65\54\x20\x6f\164\150\x5f\163\164\x64\x5f\x64\x61\164\141\x5f\147\x65\x6e\x64\x65\162\x2c\xa\40\40\x20\x20\40\x20\x20\40\x20\40\40\40\x20\x20\40\x20\x6f\164\x68\137\163\x74\x64\137\x64\x61\x74\141\137\x6d\145\x61\x6e\54\x20\x6f\164\x68\137\163\x74\x64\137\144\x61\x74\x61\137\163\144\x2c\x20\157\164\150\x5f\x73\x74\144\137\x64\141\x74\x61\137\165\163\x65\162\137\x75\x70\144\x61\x74\145\144\xa\x20\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x66\x72\x6f\x6d\40\145\x32\137\157\x72\164\x68\157\x5f\x73\x74\141\156\x64\141\x72\144\137\x64\x61\164\141\xa\40\40\x20\40\40\40\x20\40\40\x20\x20\x20\x77\x68\145\162\x65\x20\x6f\x74\150\x5f\162\141\143\x65\x5f\x69\x64\x20\x3d\40\x28\x73\x65\x6c\145\143\164\40\157\164\x68\x5f\162\x61\x63\x65\137\151\x64\x20\x66\x72\x6f\x6d\x20\145\x32\137\157\162\164\150\x6f\137\162\x61\x63\145\40\x77\x68\145\x72\x65\40\157\164\150\x5f\x72\141\143\x65\x5f\156\x61\155\145\40\75\40\77\x29"; $result = $this->db->query($sql, array($targetRaceName, $sourceRaceName)); if ($result == true) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Superimpositions_model.php b/server/original/www/ezwebserver/src/application/models/Superimpositions_model.php index 372c4ae..f5e9e89 100644 --- a/server/original/www/ezwebserver/src/application/models/Superimpositions_model.php +++ b/server/original/www/ezwebserver/src/application/models/Superimpositions_model.php @@ -1,7 +1,7 @@ db->select("\x6f\164\150\137\151\x6d\x67\137\155\157\x64\141\154\151\164\171\x5f\151\144"); $this->db->from("\x65\x32\137\x6f\x72\164\x68\157\x5f\x69\155\141\x67\145\x5f\155\157\144\141\x6c\151\164\x69\x65\163"); $this->db->where("\x6f\164\x68\137\151\155\147\x5f\155\x6f\x64\141\154\x69\x74\171\137\156\141\x6d\x65", $oth_img_modality_name); $result = $this->db->get()->result_array(); return $result[0]["\x6f\164\x68\x5f\x69\x6d\x67\x5f\155\157\144\141\154\x69\x74\x79\x5f\x69\x64"]; } public function get_SuperimpositionsP2() { load_database($this, "\x45\x32\104\x42"); $this->db->select("\x6f\164\150\x5f\163\x75\160\145\x72\x69\155\160\x6f\163\151\x74\x69\157\156\x5f\156\141\155\145\40\141\x73\40\156\141\155\x65\54\157\164\x68\137\163\x75\x70\x65\162\151\155\160\157\163\151\x74\x69\x6f\156\137\154\x61\142\145\154\40\141\163\40\x6c\141\x62\x65\154\54\157\164\150\x5f\163\165\160\145\x72\151\x6d\160\157\x73\151\x74\x69\157\156\137\165\163\145\x72\137\141\x64\x64\x65\x64\40\x61\x73\x20\x75\x73\145\162\x5f\x61\144\x64\x65\144"); $result = $this->db->get("\x65\x32\137\157\x72\x74\x68\157\x5f\x73\x75\160\x65\x72\x69\155\x70\x6f\163\151\x74\151\x6f\156\x5f\x6c\x69\163\164")->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { array_push($items, new SLabeledSuperimposition($row)); } return ["\145\162\x72\157\162\x43\157\144\145" => VERR_COMMON_SUCCESS, "\163\165\160\x65\x72\x69\x6d\160\x6f\163\151\164\151\x6f\x6e\163" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_Superimpositions($sSuperimpositionInfo) { load_database($this, "\105\x32\x44\x42"); $this->db->where("\x6f\164\150\137\163\x75\x70\x65\x72\151\155\160\157\163\151\164\x69\x6f\156\137\156\141\155\x65", $sSuperimpositionInfo->name); $q = $this->db->get("\x65\x32\137\157\162\164\150\x6f\x5f\163\165\160\145\162\x69\x6d\x70\157\x73\151\164\151\x6f\156\137\154\x69\163\164"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $select_img_modality_sql = $this->getOrthoImageModalityID("\103\x65\160\x68\141\154\157\x5f\114\141\164\x65\162\x61\154"); $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); if (isset($sSuperimpositionInfo->origin)) { $this->db->select("\x6f\x74\150\137\154\x61\x6e\144\x6d\x61\162\x6b\x5f\x69\x64"); $this->db->where("\157\164\x68\137\x6c\141\156\144\155\141\162\153\x5f\156\x61\155\x65", $sSuperimpositionInfo->origin); $this->db->where("\157\x74\150\137\151\x6d\x67\x5f\155\157\x64\141\154\151\x74\171\x5f\151\x64", $select_img_modality_sql); $this->db->limit(1); $select_originid_sql = $this->db->get_compiled_select("\x65\x32\137\x6f\x72\x74\150\157\x5f\154\x61\x6e\x64\155\x61\162\153\163"); } if (isset($sSuperimpositionInfo->pointA)) { $this->db->select("\x6f\164\x68\x5f\x6c\141\x6e\144\x6d\141\x72\153\137\151\144"); $this->db->where("\x6f\x74\x68\x5f\154\x61\156\x64\155\141\x72\153\137\x6e\x61\x6d\145", $sSuperimpositionInfo->pointA); $this->db->where("\x6f\x74\x68\137\x69\155\x67\137\155\x6f\144\x61\x6c\x69\164\171\137\x69\144", $select_img_modality_sql); $this->db->limit(1); $select_pointAid_sql = $this->db->get_compiled_select("\x65\x32\x5f\157\x72\164\150\x6f\137\154\141\156\x64\155\141\162\153\163"); } if (isset($sSuperimpositionInfo->pointB)) { $this->db->select("\x6f\164\150\137\154\141\156\144\x6d\x61\162\153\137\151\x64"); $this->db->where("\x6f\164\150\137\154\141\156\x64\x6d\141\162\x6b\137\x6e\x61\155\x65", $sSuperimpositionInfo->pointB); $this->db->where("\x6f\164\150\x5f\151\155\147\137\155\x6f\144\x61\x6c\x69\164\171\137\x69\144", $select_img_modality_sql); $this->db->limit(1); $select_pointBid_sql = $this->db->get_compiled_select("\x65\x32\137\157\x72\x74\x68\x6f\137\x6c\141\x6e\x64\x6d\141\x72\153\163"); } $data = array("\157\x74\150\x5f\163\x75\x70\145\x72\x69\x6d\160\x6f\163\x69\x74\151\x6f\x6e\137\x6e\x61\155\145" => $sSuperimpositionInfo->name, "\x6f\x74\150\x5f\163\165\x70\145\x72\x69\155\160\157\x73\x69\x74\x69\x6f\156\137\x6c\141\142\x65\154" => $sSuperimpositionInfo->label, "\157\x74\150\x5f\x73\165\x70\145\162\x69\x6d\x70\x6f\x73\151\x74\x69\157\156\137\x64\x69\163\160\154\141\171\x65\144\137\x6f\162\x64\x65\x72" => $sSuperimpositionInfo->order, "\x6f\x74\x68\x5f\x73\165\x70\x65\162\151\x6d\160\157\x73\x69\x74\151\157\x6e\137\x75\x73\145\162\137\x61\144\144\145\x64" => $sSuperimpositionInfo->userAdded); $this->db->set($data); if (isset($sSuperimpositionInfo->origin)) { $this->db->set("\157\164\x68\137\157\162\x69\147\151\x6e\x5f\160\157\x69\x6e\164\x5f\x6c\x61\x6e\x64\x6d\141\162\153\x5f\151\x64", "\50{$select_originid_sql}\51", FALSE); } if (isset($sSuperimpositionInfo->pointA)) { $this->db->set("\x6f\164\x68\x5f\x70\157\x69\156\164\x5f\x61\x5f\x6c\141\x6e\x64\155\141\162\x6b\x5f\151\144", "\x28{$select_pointAid_sql}\51", FALSE); } if (isset($sSuperimpositionInfo->pointB)) { $this->db->set("\157\x74\x68\137\x70\x6f\151\x6e\164\137\142\x5f\154\x61\156\x64\155\x61\162\153\137\151\144", "\50{$select_pointBid_sql}\51", FALSE); } $this->db->insert("\x65\62\137\x6f\162\x74\150\157\137\163\x75\160\145\162\x69\155\160\x6f\163\151\164\151\x6f\x6e\x5f\x6c\x69\x73\164"); $superimposition_id = $this->db->insert_id(); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && isset($sSuperimpositionInfo->guidelines) && !empty($sSuperimpositionInfo->guidelines)) { foreach ($sSuperimpositionInfo->guidelines as $guideline_name) { if ($this->insert_SuperimpositionGuideline($superimposition_id, $guideline_name) == 0) { $affected_row = 0; break; } } } if ($affected_row > 0 && isset($sSuperimpositionInfo->interestingLandmarks) && !empty($sSuperimpositionInfo->interestingLandmarks)) { foreach ($sSuperimpositionInfo->interestingLandmarks as $landmark_name) { if ($this->insert_SuperimpositionInterestingParts($superimposition_id, $landmark_name) == 0) { $affected_row = 0; break; } } } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function insert_SuperimpositionGuideline($superimposition_id, $guideline_name) { $select_img_modality_sql = $this->getOrthoImageModalityID("\x43\x65\x70\150\x61\x6c\157\137\114\x61\164\145\x72\x61\x6c"); $this->db->select("\157\164\150\x5f\147\x75\x69\144\145\x6c\x69\156\145\x5f\151\x64"); $this->db->where("\x6f\x74\x68\x5f\151\155\147\x5f\155\x6f\144\141\154\151\164\171\137\x69\144", $select_img_modality_sql); $this->db->where("\x6f\164\x68\x5f\147\165\x69\x64\145\154\x69\x6e\145\137\156\x61\x6d\x65", $guideline_name); $this->db->limit(1); $select_guidelineid_sql = $this->db->get_compiled_select("\x65\x32\x5f\x6f\x72\164\150\157\137\147\x75\x69\144\x65\154\x69\x6e\145\x73"); $this->db->set("\157\x74\x68\x5f\x73\165\x70\x65\x72\151\155\x70\157\x73\151\x74\x69\157\156\137\x69\144", $superimposition_id); $this->db->set("\x6f\x74\x68\137\147\x75\151\144\x65\154\x69\156\145\x5f\x69\144", "\50{$select_guidelineid_sql}\x29", FALSE); $this->db->insert("\x65\62\x5f\157\162\x74\x68\157\137\x73\x75\160\x65\162\151\x6d\x70\x6f\x73\x69\x74\x69\x6f\156\x5f\147\x75\x69\x64\x65\x6c\151\x6e\x65\x73"); return $this->db->affected_rows(); } public function insert_SuperimpositionInterestingParts($superimposition_id, $landmark_name) { $select_img_modality_sql = $this->getOrthoImageModalityID("\x43\145\x70\x68\141\x6c\157\137\114\x61\164\145\162\x61\154"); $this->db->select("\x6f\164\x68\137\x6c\141\156\144\155\x61\162\x6b\137\151\144"); $this->db->where("\x6f\x74\150\x5f\x69\x6d\147\x5f\155\x6f\144\141\x6c\x69\164\171\137\151\x64", $select_img_modality_sql); $this->db->where("\x6f\164\150\137\154\x61\x6e\x64\x6d\141\162\153\137\x6e\141\155\145", $landmark_name); $this->db->limit(1); $select_landmarkid_sql = $this->db->get_compiled_select("\x65\62\x5f\x6f\162\164\150\x6f\x5f\x6c\x61\x6e\144\155\141\162\x6b\x73"); $this->db->set("\157\164\x68\137\163\165\160\145\162\151\155\x70\x6f\163\151\164\x69\157\156\137\x69\x64", $superimposition_id); $this->db->set("\x6f\x74\150\x5f\x6c\x61\156\x64\x6d\x61\162\x6b\137\x69\144", "\x28{$select_landmarkid_sql}\51", FALSE); $this->db->insert("\145\62\x5f\x6f\x72\164\x68\x6f\x5f\163\x75\x70\x65\162\x69\x6d\x70\x6f\163\151\x74\x69\157\x6e\137\151\x6e\x74\x65\x72\x65\163\x74\x69\x6e\x67\x5f\x70\x61\x72\x74\x73"); return $this->db->affected_rows(); } public function delete_SuperimpositionGuideline($superimposition_id) { $this->db->where("\157\164\150\137\x73\x75\x70\x65\162\x69\155\160\x6f\163\x69\x74\x69\157\156\137\151\144", $superimposition_id); $this->db->delete("\x65\62\x5f\x6f\162\x74\x68\157\137\x73\165\x70\145\162\151\x6d\160\x6f\x73\x69\x74\x69\x6f\156\x5f\147\165\x69\x64\x65\154\151\156\145\163"); } public function delete_SuperimpositionInterestingParts($superimposition_id) { $this->db->where("\x6f\164\150\137\x73\x75\160\x65\x72\x69\x6d\160\x6f\163\x69\164\151\157\156\x5f\x69\x64", $superimposition_id); $this->db->delete("\145\x32\x5f\x6f\162\x74\x68\x6f\137\163\x75\x70\x65\x72\x69\155\160\157\163\151\x74\x69\157\x6e\x5f\x69\156\164\145\162\145\163\164\x69\156\x67\x5f\x70\141\x72\x74\x73"); } public function put_Superimpositions($sSuperimpositionInfo) { load_database($this, "\105\x32\x44\x42"); $this->db->select("\157\164\x68\137\x73\x75\x70\145\x72\151\x6d\x70\x6f\x73\151\x74\151\x6f\x6e\x5f\151\144"); $this->db->from("\145\62\x5f\157\162\x74\x68\157\x5f\163\x75\160\x65\162\x69\155\160\157\x73\x69\x74\x69\157\156\137\154\x69\x73\164"); $this->db->where("\x6c\157\x77\145\x72\50\x6f\x74\150\137\163\x75\160\x65\162\x69\x6d\x70\x6f\163\151\x74\151\157\156\137\x6e\141\155\145\x29", strtolower($sSuperimpositionInfo->name)); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return array("\145\162\162\x6f\x72\x43\x6f\144\x65" => VERR_DB_NOSUCHDATA); } $superimposition_id = $row->oth_superimposition_id; $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $select_img_modality_sql = $this->getOrthoImageModalityID("\103\145\160\x68\x61\154\157\137\114\141\x74\x65\162\141\154"); if (isset($sSuperimpositionInfo->origin)) { $this->db->select("\x6f\x74\150\137\x6c\141\156\144\x6d\x61\x72\x6b\137\151\144"); $this->db->where("\157\x74\150\137\154\x61\x6e\144\x6d\141\x72\x6b\x5f\x6e\141\x6d\145", $sSuperimpositionInfo->origin); $this->db->where("\x6f\x74\x68\137\151\x6d\147\137\155\x6f\144\x61\x6c\151\164\x79\x5f\x69\144", $select_img_modality_sql); $this->db->limit(1); $select_originid_sql = $this->db->get_compiled_select("\145\x32\137\x6f\x72\164\x68\x6f\137\154\141\x6e\x64\155\x61\x72\153\163"); } if (isset($sSuperimpositionInfo->pointA)) { $this->db->select("\157\x74\x68\x5f\154\141\156\144\155\141\162\x6b\137\x69\144"); $this->db->where("\x6f\x74\x68\137\154\x61\x6e\144\x6d\141\x72\x6b\137\x6e\141\x6d\x65", $sSuperimpositionInfo->pointA); $this->db->where("\x6f\x74\150\x5f\x69\155\x67\x5f\x6d\x6f\x64\141\154\x69\164\171\137\151\144", $select_img_modality_sql); $this->db->limit(1); $select_pointAid_sql = $this->db->get_compiled_select("\x65\x32\x5f\x6f\162\164\x68\157\137\x6c\141\156\x64\x6d\x61\162\x6b\x73"); } if (isset($sSuperimpositionInfo->pointB)) { $this->db->select("\x6f\x74\150\137\154\141\156\x64\x6d\141\x72\153\x5f\151\144"); $this->db->where("\157\x74\x68\137\154\x61\156\x64\155\x61\x72\153\137\156\141\x6d\145", $sSuperimpositionInfo->pointB); $this->db->where("\157\x74\150\x5f\151\x6d\x67\x5f\155\157\x64\141\154\151\x74\x79\x5f\151\144", $select_img_modality_sql); $this->db->limit(1); $select_pointBid_sql = $this->db->get_compiled_select("\145\62\x5f\x6f\162\164\x68\157\x5f\x6c\141\156\144\155\x61\x72\x6b\x73"); } $this->db->set("\157\164\x68\x5f\x73\x75\160\145\x72\151\155\160\x6f\x73\151\x74\x69\157\156\x5f\x6c\x61\142\145\x6c", $sSuperimpositionInfo->label); $this->db->set("\157\164\150\137\163\x75\160\145\162\x69\155\x70\157\x73\151\x74\x69\157\156\137\x64\x69\163\x70\x6c\x61\x79\145\x64\x5f\x6f\162\x64\x65\x72", $sSuperimpositionInfo->order); if (isset($sSuperimpositionInfo->origin)) { $this->db->set("\x6f\x74\150\x5f\x6f\x72\x69\x67\x69\156\x5f\x70\x6f\x69\x6e\164\137\154\141\156\x64\155\x61\x72\x6b\x5f\151\x64", "\50{$select_originid_sql}\x29", FALSE); } if (isset($sSuperimpositionInfo->pointA)) { $this->db->set("\157\164\150\x5f\160\x6f\151\x6e\x74\x5f\x61\137\154\x61\x6e\144\x6d\141\162\153\137\x69\144", "\x28{$select_pointAid_sql}\51", FALSE); } if (isset($sSuperimpositionInfo->pointB)) { $this->db->set("\x6f\x74\x68\x5f\x70\x6f\x69\x6e\164\x5f\x62\137\x6c\141\156\144\155\x61\162\153\x5f\151\x64", "\x28{$select_pointBid_sql}\x29", FALSE); } $this->db->where("\x6f\164\x68\137\163\x75\x70\145\162\x69\x6d\160\x6f\163\x69\x74\x69\x6f\156\x5f\x69\144", $superimposition_id); $this->db->update("\145\x32\x5f\x6f\x72\x74\x68\157\x5f\x73\165\x70\145\x72\x69\x6d\x70\x6f\163\151\x74\x69\157\x6e\x5f\154\151\163\164"); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && isset($sSuperimpositionInfo->guidelines) && !empty($sSuperimpositionInfo->guidelines)) { $this->delete_SuperimpositionGuideline($superimposition_id); foreach ($sSuperimpositionInfo->guidelines as $guideline_name) { if ($this->insert_SuperimpositionGuideline($superimposition_id, $guideline_name) == 0) { $affected_row = 0; break; } } } if ($affected_row > 0 && isset($sSuperimpositionInfo->interestingLandmarks) && !empty($sSuperimpositionInfo->interestingLandmarks)) { $this->delete_SuperimpositionInterestingParts($superimposition_id); foreach ($sSuperimpositionInfo->interestingLandmarks as $landmark_name) { if ($this->insert_SuperimpositionInterestingParts($superimposition_id, $landmark_name) == 0) { $affected_row = 0; break; } } } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function get_Superimpositions($superimpositionname) { load_database($this, "\105\x32\x44\102"); $this->db->select("\157\x74\150\x5f\163\165\160\x65\162\x69\x6d\160\157\x73\151\164\x69\x6f\156\x5f\151\x64\x2c\x6f\164\x68\137\163\165\160\x65\162\x69\x6d\x70\157\163\x69\x74\151\x6f\x6e\x5f\x6e\141\155\145\54\157\x74\150\137\163\165\160\145\162\x69\x6d\160\157\x73\151\x74\151\157\156\x5f\x6c\x61\x62\145\x6c\54\x6f\x74\x68\x5f\163\165\160\145\162\151\x6d\x70\157\x73\x69\164\x69\157\x6e\x5f\144\x69\163\x70\154\x61\171\x65\144\137\157\x72\x64\145\162\x2c\x6f\164\x68\137\x73\165\160\145\162\x69\x6d\160\x6f\163\151\x74\151\157\156\137\165\x73\145\x72\x5f\x61\x64\144\145\144\x2c\x6f\162\x69\x67\x69\x6e\x5f\x6c\x61\156\x64\x6d\141\162\x6b\163\x2e\157\164\x68\137\154\141\156\x64\x6d\141\x72\x6b\137\x6e\x61\x6d\x65\x20\141\x73\40\x6f\162\147\151\156\54\160\157\151\156\164\x41\137\154\x61\x6e\144\x6d\x61\x72\x6b\163\x2e\x6f\164\150\x5f\154\x61\156\144\x6d\141\162\x6b\137\156\x61\x6d\145\x20\x61\163\40\x70\157\x69\156\x74\101\54\160\157\151\x6e\164\x42\137\154\141\x6e\x64\155\141\162\153\x73\56\x6f\x74\x68\x5f\x6c\141\x6e\144\x6d\x61\162\x6b\x5f\x6e\x61\155\x65\40\x61\x73\40\160\157\151\156\164\102"); $this->db->where("\x6f\164\x68\137\x73\x75\160\145\x72\x69\x6d\x70\157\x73\151\x74\x69\x6f\x6e\137\156\141\155\x65", $superimpositionname); $this->db->join("\145\62\x5f\157\x72\x74\x68\x6f\137\154\141\x6e\x64\x6d\141\x72\153\x73\x20\x6f\162\x69\147\x69\x6e\x5f\x6c\x61\156\x64\155\x61\162\x6b\163", "\x6f\162\x69\147\151\x6e\137\x6c\x61\156\x64\155\141\x72\153\163\x2e\157\x74\150\x5f\154\x61\156\x64\155\x61\x72\x6b\137\x69\x64\x20\75\40\145\x32\137\157\x72\x74\150\157\137\163\165\x70\145\x72\x69\x6d\x70\157\x73\151\x74\151\157\x6e\137\x6c\151\163\x74\56\x6f\x74\x68\x5f\x6f\x72\x69\x67\x69\156\x5f\160\x6f\x69\x6e\164\137\x6c\x61\x6e\144\155\x61\x72\153\x5f\x69\144", "\x6c\145\x66\164"); $this->db->join("\145\x32\x5f\157\162\164\x68\x6f\137\x6c\x61\156\x64\x6d\141\162\153\163\40\x70\157\151\x6e\164\x41\137\154\141\156\x64\x6d\141\x72\x6b\163", "\x70\x6f\151\x6e\164\x41\137\154\141\156\144\155\x61\162\x6b\163\56\x6f\164\150\137\154\x61\x6e\144\x6d\141\x72\x6b\137\x69\144\40\x3d\40\x65\62\x5f\157\x72\164\150\157\137\x73\165\160\x65\x72\x69\155\160\x6f\x73\x69\x74\x69\157\x6e\x5f\x6c\151\163\x74\x2e\x6f\x74\x68\137\x70\x6f\151\x6e\x74\x5f\x61\137\154\x61\x6e\144\x6d\141\x72\153\137\151\144", "\x6c\x65\x66\x74"); $this->db->join("\x65\62\137\157\162\164\x68\157\137\154\141\156\x64\155\141\162\x6b\163\40\160\x6f\x69\156\x74\x42\137\x6c\141\x6e\144\155\141\x72\153\163", "\x70\157\x69\x6e\x74\102\x5f\154\141\x6e\144\x6d\x61\162\153\x73\x2e\x6f\x74\150\x5f\x6c\x61\156\x64\155\141\x72\x6b\137\151\144\40\75\40\x65\x32\x5f\x6f\x72\x74\150\157\137\163\x75\160\145\162\x69\155\160\x6f\x73\151\x74\151\x6f\156\137\x6c\x69\163\x74\x2e\x6f\164\x68\x5f\x70\157\151\156\164\x5f\142\137\x6c\141\156\144\x6d\141\x72\x6b\x5f\x69\144", "\x6c\145\146\164"); $this->db->limit(1); $superimposition_row = $this->db->get("\145\x32\137\x6f\x72\164\x68\157\137\x73\x75\160\x65\162\151\155\x70\x6f\163\151\164\x69\157\x6e\x5f\x6c\x69\163\x74")->row(); if (isset($superimposition_row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $superimposition_id = $superimposition_row->oth_superimposition_id; $this->db->select("\x6f\x74\x68\137\x6c\141\x6e\x64\x6d\x61\162\x6b\137\156\141\x6d\x65"); $this->db->where("\157\164\x68\x5f\x73\x75\x70\145\x72\151\x6d\x70\x6f\163\x69\164\x69\x6f\156\137\x69\144", $superimposition_id); $this->db->join("\145\62\137\x6f\162\164\x68\157\x5f\x6c\141\x6e\x64\x6d\141\x72\x6b\163", "\x65\62\137\157\x72\164\x68\157\137\154\141\156\144\155\x61\x72\x6b\x73\56\x6f\x74\x68\137\154\141\156\144\x6d\x61\162\x6b\x5f\x69\x64\40\x3d\40\x65\x32\137\157\x72\164\x68\x6f\137\163\x75\160\x65\162\151\x6d\160\157\163\x69\164\151\157\x6e\137\151\156\164\145\162\145\x73\164\151\156\x67\137\160\x61\x72\164\163\x2e\157\x74\x68\x5f\x6c\x61\156\x64\x6d\x61\162\153\137\x69\x64"); $interestingParts = $this->db->get("\145\x32\137\157\162\164\150\157\x5f\163\x75\160\x65\x72\x69\155\160\157\x73\151\x74\151\157\156\137\x69\x6e\x74\x65\x72\145\163\x74\x69\156\147\137\x70\141\162\x74\x73")->result_array(); $this->db->select("\157\x74\x68\137\x67\165\151\x64\145\x6c\x69\x6e\145\137\156\x61\x6d\x65"); $this->db->where("\x6f\x74\150\x5f\163\165\160\x65\162\x69\x6d\x70\157\x73\x69\164\151\157\156\x5f\151\144", $superimposition_id); $this->db->join("\x65\62\x5f\x6f\x72\164\150\157\137\147\x75\151\x64\145\x6c\151\x6e\145\x73", "\x65\62\137\x6f\x72\164\x68\x6f\x5f\x67\165\x69\x64\145\154\151\156\x65\x73\56\157\x74\150\x5f\147\x75\151\x64\x65\154\x69\x6e\145\x5f\151\144\x20\x3d\x20\x65\62\137\x6f\162\164\150\x6f\x5f\163\x75\160\145\162\x69\x6d\x70\x6f\163\x69\x74\x69\x6f\x6e\x5f\147\x75\151\x64\x65\154\151\156\x65\x73\x2e\x6f\164\150\x5f\147\165\151\144\145\154\x69\156\x65\x5f\x69\144"); $guidelines = $this->db->get("\x65\x32\137\x6f\162\164\x68\x6f\137\163\x75\160\145\x72\x69\x6d\160\x6f\163\x69\164\x69\x6f\156\137\x67\165\151\144\x65\x6c\151\156\x65\x73")->result_array(); $sSuperimpositionInfo = SSuperimpositionInfo::constructWithRow($superimposition_row); $sSuperimpositionInfo->interestingLandmarks = array_column($interestingParts, "\x6f\164\x68\137\x6c\141\x6e\144\155\141\x72\x6b\x5f\156\141\x6d\145"); $sSuperimpositionInfo->guidelines = array_column($guidelines, "\x6f\164\x68\137\x67\165\151\144\x65\154\x69\156\145\137\156\x61\155\x65"); if (isset($sSuperimpositionInfo)) { return ["\x65\x72\x72\x6f\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x73\x75\x70\x65\162\151\x6d\x70\157\x73\151\x74\x69\x6f\156" => $sSuperimpositionInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function delete_Superimpositions($superimpositionname) { load_database($this, "\105\62\x44\x42"); $this->db->where("\157\x74\150\137\163\165\160\145\x72\x69\x6d\160\157\x73\151\164\x69\x6f\156\137\156\x61\155\145", $superimpositionname); $this->db->delete("\x65\62\137\x6f\x72\x74\150\x6f\137\163\x75\160\x65\x72\x69\155\160\157\163\x69\x74\x69\x6f\x6e\x5f\x6c\x69\163\x74"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/SurgicalKits_model.php b/server/original/www/ezwebserver/src/application/models/SurgicalKits_model.php index 6862304..c628906 100644 --- a/server/original/www/ezwebserver/src/application/models/SurgicalKits_model.php +++ b/server/original/www/ezwebserver/src/application/models/SurgicalKits_model.php @@ -1,7 +1,7 @@ db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } public function post_SurgicalKitsByCompanyAndLineupAndModel($strComName, $strLineupName, $strModelName, $strlSurgicalKit) { $sql = "\123\x45\114\x45\x43\x54\x20\151\x6d\x70\x5f\x63\x6f\x6d\56\x63\157\x6d\137\151\x64\x2c\x20\151\155\160\137\154\x6e\165\x70\56\154\x6e\x75\x70\x5f\x69\x64\x2c\x20\x69\155\x70\137\155\157\144\x65\x6c\x2e\155\157\144\x65\x6c\x5f\x69\x64\40" . "\106\122\117\x4d\40\x69\x6d\160\x5f\x63\157\155\x20" . "\x4a\117\x49\x4e\40\x69\x6d\x70\x5f\x6c\x6e\x75\x70\x20" . "\117\x4e\40\x69\x6d\x70\137\143\x6f\x6d\56\x63\157\155\137\151\144\40\x3d\40\x69\x6d\160\x5f\x6c\156\165\x70\56\x63\x6f\x6d\x5f\x69\x64\40" . "\112\117\x49\116\40\151\155\160\137\155\x6f\144\x65\x6c\40" . "\x4f\116\40\x69\155\160\137\x6c\156\x75\160\x2e\154\156\x75\160\x5f\151\144\x20\x3d\40\x69\x6d\x70\x5f\x6d\x6f\144\145\x6c\56\154\x6e\165\x70\137\x69\x64\x20" . "\x57\x48\105\122\x45\40\114\x4f\127\105\x52\x28\x69\x6d\160\x5f\x63\157\155\x2e\x63\x6f\155\x5f\156\141\155\145\x29\x20\75\40\x4c\x4f\127\x45\x52\50\77\x29\40" . "\101\116\104\x20\x4c\x4f\127\x45\x52\50\151\155\160\137\x6c\156\165\160\x2e\154\x6e\x75\160\137\x6e\x61\155\145\x29\40\x3d\40\114\x4f\x57\x45\122\50\77\51\40" . "\101\x4e\104\40\114\117\x57\x45\122\50\x69\155\x70\137\155\157\x64\x65\x6c\56\x6d\157\x64\145\154\x5f\156\x61\155\145\51\x20\x3d\40\114\117\127\105\x52\50\x3f\51"; $query = $this->db->query($sql, array($strComName, $strLineupName, $strModelName))->result_array(); if (count($query) > 0) { $nCompanyID = $query[0]["\x63\x6f\155\x5f\151\x64"]; $nLineupID = $query[0]["\154\x6e\165\160\x5f\x69\144"]; $nModelID = $query[0]["\155\157\x64\x65\x6c\x5f\151\x64"]; foreach ($strlSurgicalKit as $row) { $sql = "\x53\105\114\x45\103\124\x20\x73\165\x72\147\x69\143\x61\154\137\x6b\x69\x74\x5f\x6e\141\x6d\x65\x20\x46\122\117\115\x20\x73\x75\x72\147\x69\143\141\154\137\153\151\164\40" . "\127\x48\105\x52\105\40\x63\x6f\x6d\137\151\x64\x20\75\x20\x3f\40" . "\101\116\x44\x20\x6c\156\x75\x70\x5f\x69\x64\x20\75\x20\77\40" . "\x41\x4e\x44\40\x6d\157\144\145\x6c\137\151\x64\40\x3d\x20\x3f\40" . "\x41\x4e\x44\x20\x4c\x4f\127\x45\122\50\x73\x75\x72\147\x69\x63\141\154\137\153\x69\x74\x5f\x6e\x61\155\x65\x29\x20\75\40\x4c\117\x57\105\122\50\x3f\51\40"; $query = $this->db->query($sql, array($nCompanyID, $nLineupID, $nModelID, $row))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } } foreach ($strlSurgicalKit as $row) { $sql = "\111\116\x53\105\122\124\x20\x49\x4e\x54\x4f\x20\163\165\162\x67\151\143\141\154\x5f\153\x69\164\50\143\x6f\155\137\151\x64\54\40\x6c\156\165\160\137\x69\144\54\x20\155\157\144\x65\x6c\x5f\x69\144\54\x20\163\165\x72\147\151\x63\x61\x6c\x5f\153\x69\164\137\x6e\x61\x6d\x65\51\x20" . "\x56\x41\x4c\125\105\x53\x20\x28\77\54\x20\77\x2c\40\77\54\40\x3f\x29"; $this->db->query($sql, array($nCompanyID, $nLineupID, $nModelID, $row)); } return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } public function put_SurgicalKitsByImplant($implantInfo) { $strModelName = $implantInfo["\x73\164\162\115\157\x64\145\154\x4e\141\x6d\145"]; $strLineupName = $implantInfo["\163\x74\162\114\151\156\145\165\160"]; $strComName = $implantInfo["\x73\x74\162\103\x6f\x6d\160\141\x6e\171"]; $sql = "\x53\x45\x4c\105\103\124\x20\163\165\x72\147\x69\143\x61\x6c\x5f\153\x69\164\137\x6e\141\x6d\145\40\106\x52\117\115\40\x73\165\162\x67\151\143\141\x6c\137\153\x69\x74\40" . "\127\110\105\122\x45\40\155\157\x64\x65\154\x5f\x69\144\40\75\50\x53\105\x4c\x45\x43\124\40\155\157\x64\145\154\x5f\x69\x64\x20\106\x52\x4f\x4d\x20\x69\155\x70\137\x6d\157\144\145\154\x20\127\110\x45\x52\105\x20\114\x4f\x57\105\x52\x28\x6d\157\x64\145\x6c\x5f\x6e\141\x6d\145\51\x20\x3d\40\114\x4f\x57\105\122\50\x3f\51" . "\101\x4e\x44\x20\x6c\x6e\x75\x70\x5f\151\x64\40\x3d\40\50\x53\105\x4c\x45\103\124\40\x6c\x6e\x75\160\137\151\144\x20\x20\x46\x52\x4f\115\40\x69\x6d\160\x5f\154\156\x75\160\40\127\110\105\122\105\x20\x4c\117\x57\x45\x52\50\154\156\165\160\137\x6e\141\x6d\145\x29\x20\75\40\x4c\x4f\x57\x45\122\50\x3f\x29" . "\101\x4e\104\x20\143\157\x6d\x5f\x69\x64\x20\75\x20\50\x53\x45\114\x45\x43\x54\x20\x63\x6f\155\x5f\151\x64\40\x46\122\x4f\115\40\x69\x6d\160\137\x63\x6f\155\x20\127\110\105\x52\105\x20\114\117\x57\105\x52\x28\143\157\x6d\137\x6e\x61\x6d\x65\51\40\x3d\x20\114\117\x57\105\x52\50\x3f\51\x29\51\x29"; return $this->db->query($sql, array($strModelName, $strLineupName, $strComName))->result_array(); } public function post_SurgicalKitsByImplant($parameters) { $strComName = $parameters["\x69\155\x70\154\x61\x6e\x74\111\x6e\146\157"]["\x73\x74\x72\103\x6f\x6d\160\x61\x6e\x79"]; $strLineupName = $parameters["\151\155\160\154\x61\x6e\164\111\x6e\x66\x6f"]["\163\x74\x72\114\x69\156\x65\165\160"]; $strModelName = $parameters["\x69\155\160\x6c\141\x6e\x74\111\156\x66\157"]["\163\164\x72\115\157\x64\x65\x6c\116\141\x6d\145"]; $strlSurgicalKit = $parameters["\x73\164\x72\154\x53\x75\x72\147\151\143\x61\154\113\151\164"]; $sql = "\123\105\114\x45\103\x54\40\x69\155\160\x5f\143\157\155\x2e\143\x6f\x6d\x5f\x69\144\54\40\x69\x6d\160\x5f\x6c\x6e\165\160\56\x6c\156\165\x70\137\151\x64\x2c\x20\151\x6d\160\137\x6d\157\144\x65\154\x2e\x6d\157\144\x65\x6c\x5f\151\x64\x20" . "\106\122\117\x4d\40\151\x6d\160\137\x63\157\x6d\40" . "\112\x4f\x49\116\40\x69\x6d\160\x5f\154\x6e\165\160\40" . "\x4f\116\x20\x69\155\160\x5f\x63\157\155\x2e\x63\157\155\x5f\151\144\40\x3d\x20\151\155\160\137\154\156\165\x70\56\143\157\x6d\137\x69\x64\40" . "\112\x4f\x49\116\40\x69\x6d\x70\x5f\x6d\157\144\x65\154\40" . "\x4f\116\40\x69\155\160\x5f\x6c\156\x75\160\x2e\154\156\165\x70\x5f\151\x64\40\x3d\40\x69\155\160\x5f\x6d\x6f\144\x65\x6c\x2e\x6c\156\x75\x70\137\x69\x64\40" . "\x57\110\x45\x52\105\40\114\x4f\x57\x45\122\x28\151\x6d\160\137\x63\157\155\56\143\x6f\155\137\156\141\x6d\145\51\x20\x3d\40\114\x4f\x57\x45\x52\x28\x3f\x29\x20" . "\x41\116\x44\x20\x4c\x4f\127\105\x52\50\151\x6d\160\x5f\154\x6e\x75\x70\56\154\156\165\160\137\156\x61\x6d\145\x29\40\x3d\x20\114\117\x57\x45\x52\x28\77\51\x20" . "\101\x4e\104\x20\x4c\117\127\105\122\x28\x69\155\160\x5f\x6d\157\x64\x65\154\56\x6d\x6f\144\145\154\x5f\156\141\155\145\51\x20\75\40\114\117\x57\105\x52\50\x3f\51"; $query = $this->db->query($sql, array($strComName, $strLineupName, $strModelName))->result_array(); if (count($query) > 0) { $nCompanyID = $query[0]["\x63\157\155\x5f\x69\x64"]; $nLineupID = $query[0]["\154\x6e\x75\160\137\151\144"]; $nModelID = $query[0]["\155\x6f\144\x65\154\x5f\x69\144"]; foreach ($strlSurgicalKit as $row) { $sql = "\123\105\x4c\x45\x43\x54\40\163\165\x72\x67\151\x63\141\x6c\x5f\x6b\151\164\137\x6e\x61\x6d\x65\40\106\x52\117\x4d\40\x73\165\x72\x67\151\143\x61\x6c\x5f\153\151\x74\x20" . "\x57\110\105\x52\x45\x20\x63\x6f\x6d\x5f\x69\x64\40\x3d\x20\x3f\x20" . "\101\116\104\40\x6c\156\165\160\137\151\144\40\75\x20\x3f\x20" . "\101\x4e\x44\x20\x6d\x6f\144\x65\154\137\151\x64\40\75\40\x3f\40" . "\x41\116\x44\x20\114\117\127\x45\x52\50\163\x75\162\x67\x69\143\141\154\x5f\x6b\x69\x74\137\156\141\x6d\x65\51\40\75\x20\114\x4f\127\x45\x52\50\77\51\x20"; $query = $this->db->query($sql, array($nCompanyID, $nLineupID, $nModelID, $row))->result_array(); if (count($query) > 0) { return VERR_DB_OVERLAP; } } foreach ($strlSurgicalKit as $row) { $sql = "\x49\116\123\105\x52\124\x20\111\116\124\117\40\163\x75\162\147\x69\143\141\154\137\x6b\x69\x74\50\x63\157\155\x5f\151\144\54\x20\x6c\x6e\x75\x70\x5f\151\144\x2c\x20\x6d\157\144\x65\x6c\x5f\151\x64\x2c\x20\x73\165\162\147\x69\143\x61\x6c\137\153\151\x74\x5f\156\141\155\x65\51\x20" . "\x56\101\114\x55\105\x53\40\x28\x3f\54\x20\77\54\40\77\x2c\x20\x3f\x29"; $this->db->query($sql, array($nCompanyID, $nLineupID, $nModelID, $row)); } return $this->db->affected_rows(); } else { return VERR_DB_NOSUCHDATA; } } } diff --git a/server/original/www/ezwebserver/src/application/models/SysFiles_model.php b/server/original/www/ezwebserver/src/application/models/SysFiles_model.php index 34a7412..5718c3f 100644 --- a/server/original/www/ezwebserver/src/application/models/SysFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/SysFiles_model.php @@ -1,7 +1,7 @@ load->helper("\x66\x73"); } public function get_SysfilesForThumbnailByTypeAndName($type, $fullName) { $path_info = pathinfo($fullName); $fileName = $path_info["\146\151\x6c\145\156\x61\155\x65"]; $fileExt = $path_info["\x65\x78\164\x65\x6e\163\151\157\x6e"]; $scuImgType = array("\104\x43\115", "\x50\116\107", "\124\111\x46", "\x54\111\106\x46", "\x4a\120\107", "\x4a\120\x45\x47", "\x42\x4d\x50"); if (!in_array(strtoupper($fileExt), $scuImgType)) { return VERR_COMMON_INVALID; } $thmfileName = $fileName . "\137\x74\56" . EXT_SAMPLECASETHM; $fileAbsFilePath = $this->Datafile_model->getSysFilePathByType($type, $fullName); $fileAbsThmFilePath = $this->Datafile_model->getSysFilePathByType($type, $thmfileName); if (!file_exists($fileAbsFilePath)) { return VERR_COMMON_INVALID; } $ret = createThumbnailFileFromImage($fileAbsThmFilePath, $fileAbsFilePath); return $ret; } } diff --git a/server/original/www/ezwebserver/src/application/models/SysInfo_model.php b/server/original/www/ezwebserver/src/application/models/SysInfo_model.php index 11805ff..019a0d9 100644 --- a/server/original/www/ezwebserver/src/application/models/SysInfo_model.php +++ b/server/original/www/ezwebserver/src/application/models/SysInfo_model.php @@ -1,7 +1,7 @@ db->select("\x74\x72\x5f\x6f\x72\x64\x72\137\151\x64")->where("\164\162\x5f\157\162\144\162\137\143\x61\x73\145\x5f\156\141\x6d\145", $caseName)->get("\x65\62\137\x74\x72\137\157\x72\x64\145\x72\x73"); $data = array("\164\x72\x5f\x6f\162\144\162\x5f\151\144" => $select->row()->tr_ordr_id); if ($select->num_rows() > 0) { $this->db->delete("\x65\x32\137\164\162\137\x6f\156\x67\157\x69\x6e\x67\x5f\x6f\162\x64\145\162\x73", $data); } return $this->db->affected_rows(); } public function put_trOrderByCaseNameForStatus($caseName, $orderStatus) { $this->db->set("\164\x72\x5f\157\x72\144\x72\x5f\163\164\141\164\165\x73", $orderStatus); $this->db->where("\164\x72\137\157\162\x64\x72\137\x63\141\x73\145\x5f\156\x61\x6d\145", $caseName); $this->db->update("\x65\62\137\164\162\137\x6f\x72\x64\145\x72\163"); return $this->db->affected_rows(); } private function _saveOngoingOrder($caseName) { $select = $this->db->select("\164\162\x5f\157\162\144\162\137\x69\x64")->where("\x74\162\x5f\x6f\x72\x64\162\x5f\143\x61\163\145\137\156\x61\155\145", $caseName)->get("\x65\62\x5f\164\162\137\157\x72\x64\x65\162\163"); $data = array("\164\162\x5f\157\x72\144\x72\x5f\151\144" => $select->row()->tr_ordr_id); if ($select->num_rows() > 0) { $this->db->insert("\145\62\137\x74\162\137\x6f\x6e\147\157\151\156\x67\x5f\157\x72\144\145\162\x73", $data); } } public function post_trOrderByCaseName($orderByCaseName) { $select = $this->db->select("\164\162\x5f\141\143\143\137\151\144")->where("\x74\x72\x5f\x61\x63\143\x5f\165\x73\x65\162\156\141\155\x65", $orderByCaseName["\x61\x63\x63\x4e\x61\155\145"])->get("\145\62\x5f\x74\162\137\x75\x73\145\162\x5f\141\x63\x63\157\165\156\164\163"); $accoutId = $select->row()->tr_acc_id; $data = array("\x74\x72\x5f\x61\143\143\137\x69\144" => $accoutId, "\164\x72\137\157\x72\144\162\137\164\x79\160\145" => $orderByCaseName["\157\162\x64\145\162\124\x79\x70\145"], "\x74\x72\x5f\157\x72\x64\x72\x5f\143\145\x6e\164\x65\162\x5f\156\141\x6d\x65" => $orderByCaseName["\143\145\156\x74\x65\x72\x4e\141\x6d\145"], "\164\x72\x5f\157\x72\x64\162\137\x63\x6c\x69\156\x69\143\137\x6e\x61\155\145" => $orderByCaseName["\x63\154\151\x6e\x69\143\116\x61\155\145"], "\x74\x72\x5f\x6f\x72\144\162\x5f\144\x6f\x63\x74\157\162\137\x6e\141\155\145" => $orderByCaseName["\144\x6f\x63\x74\x6f\x72\x4e\x61\x6d\145"], "\x74\x72\137\x6f\162\x64\x72\137\x70\150\x6f\x6e\x65\61" => $orderByCaseName["\143\154\x69\156\x69\x63\120\150\157\x6e\x65\x31"], "\164\162\x5f\157\162\x64\162\x5f\160\x68\157\156\145\62" => $orderByCaseName["\143\x6c\151\156\x69\x63\120\x68\x6f\x6e\x65\62"], "\164\162\137\x6f\x72\144\x72\x5f\143\x6c\151\156\151\x63\x5f\141\x64\x64\x72\145\163\x73" => $orderByCaseName["\143\x6c\x69\156\151\143\101\144\x64\162\x65\x73\x73"], "\164\x72\x5f\x6f\162\144\162\137\145\155\141\x69\x6c" => $orderByCaseName["\x63\154\151\x6e\x69\143\105\155\x61\151\x6c"], "\x74\162\137\157\162\x64\162\x5f\x70\141\164\x5f\156\141\155\x65" => $orderByCaseName["\160\x61\x74\151\145\x6e\x74\116\x61\x6d\x65"], "\164\162\137\x6f\x72\144\x72\137\160\141\x74\x5f\x64\141\x74\145\x5f\x6f\x66\137\x62\x69\x72\164\150" => $orderByCaseName["\x70\x61\164\151\x65\156\164\x42\x69\162\164\150\x64\141\171"], "\x74\162\x5f\x6f\x72\x64\162\x5f\160\141\x74\137\143\x68\x61\x72\164\156\157" => $orderByCaseName["\160\141\x74\151\145\x6e\164\103\150\141\x72\164\x4e\x6f"], "\x74\x72\x5f\157\162\x64\x72\x5f\160\141\164\x5f\x67\145\156\x64\x65\x72" => $orderByCaseName["\x70\141\x74\151\145\x6e\164\x47\x65\x6e\x64\x65\x72"], "\x74\x72\137\x6f\x72\144\x72\137\160\x61\x74\x5f\141\x67\145" => $orderByCaseName["\x70\x61\164\151\x65\x6e\164\x41\x67\x65"], "\164\x72\137\x6f\162\144\162\137\x63\157\x6d\155\145\x6e\164" => $orderByCaseName["\157\162\144\145\162\x43\157\155\155\x65\156\164"], "\164\x72\137\157\162\144\162\137\x75\x72\147\145\156\164" => $orderByCaseName["\x6f\x72\x64\145\x72\x55\x72\x67\x65\156\164"], "\164\162\x5f\x6f\162\x64\162\x5f\143\141\x73\x65\x5f\156\x61\155\x65" => $orderByCaseName["\x63\x61\x73\145\116\x61\155\x65"], "\x74\162\x5f\157\162\144\x72\137\144\x61\x74\x65\x74\151\x6d\x65" => currentDateFormat()); $this->db->insert("\145\x32\x5f\164\x72\x5f\157\x72\x64\x65\162\x73", $data); $this->_saveOngoingOrder($orderByCaseName["\x63\x61\163\x65\x4e\141\x6d\x65"]); return $this->db->affected_rows(); } public function Get_trOngoingOrders() { $this->db->select("\145\x32\x5f\164\x72\x5f\x6f\x72\144\145\x72\163\56\164\x72\137\157\162\x64\162\x5f\143\x61\163\x65\137\156\141\x6d\145"); $this->db->from("\145\x32\x5f\164\162\x5f\x6f\x72\x64\145\x72\163"); $this->db->join("\x65\x32\x5f\x74\162\137\x6f\156\x67\x6f\151\156\x67\137\157\x72\x64\x65\x72\x73", "\x65\x32\x5f\164\x72\137\157\x72\144\x65\162\x73\x2e\x74\162\x5f\157\162\x64\162\x5f\151\x64\x20\75\40\x65\62\137\x74\162\137\x6f\x6e\147\157\151\x6e\147\137\x6f\x72\144\145\x72\163\x2e\x74\x72\137\157\x72\144\x72\x5f\x69\144"); return $this->db->get()->result_array(); } private function _getGroupId($imageFileName) { $this->db->select("\145\x32\x5f\x64\x61\x74\x61\x5f\147\162\x6f\x75\160\137\151\x6d\x67\x2e\147\162\157\x75\x70\137\x69\144"); $this->db->from("\145\62\137\x64\x61\x74\x61\137\147\162\157\165\x70\x5f\x69\155\147"); $this->db->join("\x65\62\137\151\x6d\x67", "\145\62\x5f\144\141\x74\x61\137\147\x72\x6f\x75\x70\x5f\151\x6d\x67\56\x69\155\x67\137\x69\144\x20\75\x20\x65\x32\x5f\x69\155\x67\x2e\x69\x6d\147\x5f\151\144"); $this->db->where("\145\x32\137\151\155\147\x2e\x69\155\147\137\x66\151\154\145\156\x61\155\145", $imageFileName); $this->db->limit(1); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { return $row->group_id; } return false; } public function get_dataGroupProjectImagesByImageFile($imageFileName) { $groupId = $this->_getGroupId($imageFileName); if ($groupId != false) { $listFileName = array(); $this->db->select("\x65\62\137\151\x6d\x67\56\151\155\147\x5f\146\x69\x6c\145\156\141\155\x65"); $this->db->from("\145\62\137\x69\155\x67"); $this->db->join("\145\x32\x5f\144\141\x74\x61\137\x67\162\x6f\165\x70\x5f\151\155\147", "\x65\62\137\151\155\x67\x2e\151\x6d\x67\x5f\151\144\x20\x3d\x20\x65\62\137\144\141\164\141\137\x67\162\157\165\x70\x5f\x69\155\147\x2e\x69\155\x67\137\x69\x64"); $this->db->where("\x65\x32\x5f\144\x61\x74\x61\137\147\x72\157\x75\x70\x5f\151\155\x67\56\147\162\x6f\x75\x70\137\151\144", $groupId); $groupImages = $this->db->get()->result_array(); if (count($groupImages) > 0) { foreach ($groupImages as $groupImage) { $listFileName[] = $groupImage["\x69\155\147\137\x66\151\154\x65\x6e\x61\x6d\145"]; } return $listFileName; } return false; } return false; } public function get_trUserAccounts() { $trUserAccounts = array(); $this->db->select("\x74\x72\137\x61\x63\143\x5f\157\x72\x67\x5f\145\x6d\x61\x69\154\x2c\x20\x74\x72\x5f\x61\x63\x63\x5f\157\x72\x67\x5f\143\157\144\145\54\x20\164\x72\x5f\x61\143\143\137\x75\x73\145\x72\x6e\141\x6d\x65"); $this->db->from("\x65\x32\137\x74\x72\x5f\165\x73\x65\x72\137\141\143\x63\157\x75\x6e\164\x73"); $userAccounts = $this->db->get()->result_array(); if (count($userAccounts) > 0) { foreach ($userAccounts as $userAccount) { $trUserAccounts[] = ["\145\155\141\x69\154\101\x64\x64\x72\x65\163\163" => $userAccount["\x74\x72\x5f\141\143\143\137\x6f\x72\147\137\x65\155\x61\x69\x6c"], "\x6f\x72\x67\x61\156\151\172\x61\x74\151\157\156\103\x6f\x64\x65" => $userAccount["\164\x72\137\x61\143\x63\x5f\157\162\x67\137\x63\157\144\x65"], "\x75\163\x65\x72\101\x63\143\157\x75\x6e\x74\x4e\x61\x6d\x65" => $userAccount["\x74\162\137\141\143\x63\137\165\x73\145\162\156\x61\x6d\x65"]]; } return $trUserAccounts; } else { return false; } } public function post_trUserAccount($userAccount) { $data = array("\x74\162\137\x61\x63\x63\x5f\x6f\x72\x67\x5f\145\x6d\x61\x69\x6c" => $userAccount["\x65\155\x61\x69\x6c\101\x64\x64\162\145\x73\x73"], "\x74\x72\137\141\143\x63\x5f\x6f\162\147\137\x63\x6f\144\145" => $userAccount["\x6f\x72\147\141\156\151\172\x61\164\x69\x6f\156\x43\157\144\x65"], "\164\162\x5f\x61\143\x63\x5f\x75\x73\145\162\156\141\x6d\x65" => $userAccount["\165\163\x65\162\x41\x63\143\x6f\165\156\164\116\141\x6d\x65"]); if (!$this->db->insert("\145\62\x5f\164\x72\137\165\163\145\162\137\x61\x63\x63\157\x75\156\164\163", $data)) { if (strpos($this->db->error()["\x6d\x65\163\x73\141\147\x65"], "\144\x75\160\154\151\143\141\164\145\x20\153\145\171\40\166\141\x6c\165\145\x20\166\x69\157\x6c\141\164\145\x73\40\x75\156\151\161\165\x65\40\x63\x6f\156\163\164\162\141\151\156\164") !== FALSE) { vt_logw("\104\165\160\x6c\151\143\141\164\x65\40\x6b\145\171\40\x76\x61\x6c\165\145\40\x76\151\157\154\x61\x74\145\x73\x20\165\x6e\151\x71\165\x65\x20\143\157\x6e\x73\164\x72\x61\151\x6e\164\x2e"); return VERR_DB_CONSTRAINT; } } else { return $this->db->affected_rows(); } } private function _getOrderId($caseName) { $this->db->select("\x74\162\x5f\157\x72\x64\162\137\151\x64"); $this->db->from("\x65\x32\x5f\x74\x72\x5f\x6f\162\x64\x65\162\163"); $this->db->where("\x74\162\x5f\157\162\x64\162\137\x63\x61\x73\x65\x5f\x6e\x61\155\145", $caseName); $this->db->limit(1); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { return $row->tr_ordr_id; } return false; } public function post_trResultByCaseNameAndResultFileNumAndResultComment($parameters) { $orderId = $this->_getOrderId($parameters["\143\141\x73\145\x4e\141\155\145"]); if ($orderId != false) { $data = array("\164\x72\x5f\162\163\x74\137\146\151\154\145\137\156\165\155" => $parameters["\x6e\x75\155\x52\145\163\x75\154\x74\106\151\x6c\x65\163"], "\164\162\137\162\x73\x74\x5f\x63\157\155\x6d\145\156\x74" => $parameters["\162\x65\163\x75\x6c\164\x43\157\155\x6d\145\156\x74"], "\164\x72\x5f\157\162\144\162\137\151\144" => $orderId); $this->db->insert("\x65\62\x5f\164\x72\x5f\x72\x65\x73\x75\x6c\164\163", $data); return $this->db->affected_rows(); } return false; } public function get_trResultByCaseName($caseName) { $orderId = $this->_getOrderId($caseName); if ($orderId != false) { $this->db->select("\164\162\x5f\x72\x73\164\x5f\x69\144\54\x20\x74\x72\x5f\x72\x73\164\x5f\143\x6f\x6d\155\145\156\164"); $this->db->from("\145\62\x5f\x74\162\x5f\162\145\163\165\154\164\x73"); $this->db->where("\x74\162\x5f\x6f\x72\x64\x72\137\151\x64", $orderId); $this->db->limit(1); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { $resultId = $row->tr_rst_id; $resultComment = $row->tr_rst_comment; } } else { return false; } if ($resultId != false) { $this->db->select("\x74\162\x5f\x72\x73\164\x5f\x66\x69\x6c\x65\x5f\x74\x79\160\x65\x2c\x20\164\162\x5f\162\x73\x74\x5f\x66\151\x6c\x65\156\x61\x6d\145\137\x69\x6e\x5f\x74\162\167\x65\x62"); $this->db->from("\x65\62\x5f\x74\x72\x5f\x72\145\x73\165\x6c\164\137\x66\x69\154\x65\163"); $this->db->where("\164\162\137\162\x73\x74\x5f\x69\144", $resultId); $resultFiles = $this->db->get()->result_array(); if (count($resultFiles) > 0) { foreach ($resultFiles as $resultFile) { $data[] = ["\162\145\x73\165\x6c\x74\x43\157\155\155\145\x6e\164" => $resultComment, "\x72\145\163\165\154\164\x46\x69\154\145\x73" => ["\162\x65\163\x75\154\x74\x54\171\x70\145" => $resultFile["\164\162\x5f\x72\x73\164\x5f\x66\x69\x6c\145\137\x74\171\x70\x65"], "\x66\x69\x6c\145\116\x61\x6d\145" => $resultFile["\164\162\x5f\162\x73\x74\137\x66\x69\x6c\145\x6e\x61\x6d\x65\x5f\151\156\137\164\162\x77\x65\x62"]]]; } return $data; } } return false; } public function delete_trResultByCaseName($caseName) { $orderId = $this->_getOrderId($caseName); if ($orderId != false) { $select = $this->db->select("\x74\x72\x5f\162\163\x74\x5f\x69\x64")->where("\x74\x72\137\x6f\162\144\162\137\151\x64", $orderId)->get("\145\62\x5f\x74\x72\137\162\x65\163\x75\154\x74\x73"); $data = array("\164\x72\137\x72\163\x74\x5f\x69\x64" => $select->row()->tr_rst_id); if ($select->num_rows() > 0) { $this->db->delete("\145\x32\x5f\164\x72\x5f\162\x65\x73\165\x6c\x74\x73", $data); } return $this->db->affected_rows(); } return false; } public function get_trResultByChartNo($strChartNo) { $this->db->select("\145\62\x5f\164\x72\x5f\x6f\162\144\x65\162\163\56\x74\x72\x5f\x6f\162\144\162\x5f\x63\141\x73\x65\137\x6e\x61\155\x65\54\x20\145\x32\x5f\x74\x72\x5f\162\145\163\x75\x6c\164\x73\56\164\x72\x5f\x72\163\x74\137\143\157\155\155\x65\156\x74\x2c\40\x65\x32\137\x74\x72\137\x72\x65\163\165\154\x74\137\146\151\x6c\145\x73\x2e\164\x72\x5f\x72\163\x74\137\146\x69\x6c\145\137\x74\x79\160\145\54\x20\145\x32\137\x74\x72\x5f\162\145\163\x75\x6c\164\137\146\x69\154\145\x73\x2e\x74\162\x5f\x72\163\x74\137\x66\151\x6c\x65\x6e\141\155\x65\x2c\x20\x65\x32\137\x74\x72\x5f\x72\145\x73\165\x6c\x74\x5f\146\x69\x6c\x65\x73\56\x74\162\x5f\x72\x73\164\x5f\x66\x69\x6c\145\x6e\x61\155\x65\x5f\151\x6e\x5f\164\162\167\x65\142"); $this->db->from("\145\x32\137\x74\162\x5f\x6f\162\x64\x65\162\x73"); $this->db->join("\145\x32\137\x74\x72\137\x72\x65\x73\165\154\164\163", "\145\x32\x5f\164\x72\x5f\x6f\x72\x64\145\162\163\x2e\164\162\x5f\157\162\x64\x72\137\x69\x64\x20\x3d\40\145\62\137\x74\x72\x5f\162\145\x73\165\154\x74\x73\x2e\x74\162\137\x6f\162\144\162\137\x69\144"); $this->db->join("\145\62\137\x74\x72\x5f\162\145\x73\x75\154\164\x5f\x66\151\x6c\145\163", "\x65\62\x5f\x74\x72\137\162\x65\x73\165\154\x74\163\x2e\x74\162\137\x72\x73\x74\137\151\144\x20\x3d\40\145\x32\x5f\164\x72\137\x72\x65\x73\x75\x6c\x74\137\x66\x69\154\x65\x73\56\x74\x72\137\x72\x73\164\137\151\144"); $this->db->where("\x65\62\137\x74\162\x5f\157\162\x64\145\162\x73\x2e\x74\x72\137\157\162\144\162\x5f\x70\141\x74\x5f\x63\x68\x61\162\x74\156\x6f", $strChartNo); $typeArr = array("\122\145\160\157\x72\x74", "\111\156\x76\x6f\151\x63\145"); $this->db->where_in("\145\x32\137\164\x72\x5f\x72\145\x73\165\154\164\137\146\151\154\x65\163\56\x74\162\137\x72\163\x74\137\x66\151\154\x65\137\164\x79\160\145", $typeArr); $this->db->like("\x65\x32\137\x74\x72\137\x72\145\163\165\154\164\137\146\151\x6c\145\x73\x2e\164\162\137\x72\163\x74\x5f\x66\151\154\145\156\x61\x6d\145\x5f\x69\x6e\x5f\164\162\x77\x65\x62", "\x2e\x70\x64\146", "\142\145\146\x6f\162\x65"); $this->db->order_by("\145\62\137\x74\162\137\157\162\x64\x65\162\x73\56\x74\162\137\157\x72\x64\x72\x5f\x69\144", "\x41\x53\103"); $resultFiles = $this->db->get()->result_array(); $returnArr = array(); $returnSubArr = array(); $caseName = ''; $first = true; if (count($resultFiles) > 0) { foreach ($resultFiles as $resultFile) { if ($caseName != $resultFile["\164\162\137\157\x72\144\162\137\143\141\x73\145\x5f\156\141\x6d\x65"]) { if (!$first) { array_push($returnArr, $returnSubArr); $returnSubArr = array(); } $caseName = $resultFile["\164\x72\x5f\x6f\x72\x64\x72\137\143\x61\163\x65\x5f\x6e\141\x6d\x65"]; $returnSubArr["\143\x61\163\145\116\141\155\x65"] = $resultFile["\x74\162\137\157\x72\x64\162\137\x63\141\x73\x65\137\x6e\x61\x6d\x65"]; $returnSubArr["\x63\157\155\x6d\145\156\164"] = $resultFile["\x74\162\x5f\162\x73\x74\137\143\157\x6d\155\145\156\164"]; $returnSubArr["\x72\145\x73\165\x6c\164\106\x69\x6c\145\163"] = array(); } $data = array("\162\145\163\165\154\x74\124\171\x70\x65" => $resultFile["\x74\x72\137\162\163\x74\x5f\x66\151\x6c\x65\x5f\164\171\160\x65"], "\x66\x69\x6c\x65\116\x61\155\x65" => $resultFile["\164\162\x5f\162\163\164\137\146\x69\154\145\156\x61\x6d\x65\x5f\151\x6e\137\164\x72\x77\145\x62"], "\x73\x65\162\x76\x65\x72\x46\151\154\x65\x4e\x61\x6d\145" => $resultFile["\164\162\137\x72\x73\164\137\146\x69\154\x65\x6e\141\155\145"]); array_push($returnSubArr["\x72\x65\x73\165\x6c\x74\106\x69\x6c\145\163"], $data); $first = false; } array_push($returnArr, $returnSubArr); return array("\145\x72\x72\x6f\x72\x43\157\x64\145" => VERR_COMMON_SUCCESS, "\x72\145\163\165\154\x74\163" => $returnArr); } else { return array("\145\162\x72\x6f\x72\x43\x6f\144\145" => VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/TeleradiologyFileService_model.php b/server/original/www/ezwebserver/src/application/models/TeleradiologyFileService_model.php index 922a953..1677542 100644 --- a/server/original/www/ezwebserver/src/application/models/TeleradiologyFileService_model.php +++ b/server/original/www/ezwebserver/src/application/models/TeleradiologyFileService_model.php @@ -1,7 +1,7 @@ db->select("\x65\x32\137\164\x72\x5f\162\145\163\x75\x6c\x74\163\x2e\x74\162\137\x72\163\x74\137\151\x64"); $this->db->from("\145\62\x5f\x74\x72\x5f\x6f\x72\144\145\162\163"); $this->db->join("\145\62\137\x74\x72\x5f\162\145\x73\165\x6c\164\x73", "\x65\62\137\x74\x72\137\157\x72\144\145\162\163\56\x74\162\137\x6f\x72\144\x72\137\x69\144\40\x3d\40\x65\62\137\x74\162\x5f\162\145\163\x75\x6c\x74\163\56\164\x72\x5f\x6f\x72\144\162\137\x69\x64"); $this->db->where("\145\62\137\164\162\x5f\x6f\162\x64\145\162\163\56\x74\162\137\x6f\162\144\162\x5f\143\x61\163\145\137\x6e\141\x6d\145", $caseName); $this->db->limit(1); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { return $row->tr_rst_id; } return false; } private function _getResultIdAndChartNo($caseName) { $this->db->select(array("\145\x32\x5f\x74\x72\137\162\x65\163\x75\154\x74\163\56\164\x72\x5f\162\163\164\x5f\151\x64", "\x65\x32\137\164\x72\137\x6f\x72\144\x65\x72\x73\x2e\x74\162\x5f\157\x72\x64\x72\137\x70\141\x74\x5f\x63\150\x61\x72\x74\156\x6f", "\145\62\x5f\160\x61\164\x2e\x70\141\x74\137\151\x64")); $this->db->from("\145\62\137\164\162\x5f\x6f\x72\144\145\162\163"); $this->db->join("\x65\62\137\x74\x72\x5f\x72\x65\x73\165\x6c\164\163", "\145\x32\x5f\164\162\x5f\x6f\162\144\x65\162\163\x2e\164\x72\137\x6f\x72\x64\x72\137\151\144\40\75\40\x65\62\137\164\x72\137\162\145\x73\165\154\x74\x73\x2e\x74\162\137\157\162\144\x72\x5f\x69\x64"); $this->db->join("\145\62\x5f\160\141\164", "\145\x32\137\x74\162\137\x6f\162\x64\145\162\x73\56\164\x72\x5f\157\x72\144\162\x5f\x70\x61\164\137\x63\150\x61\162\164\x6e\157\40\75\40\x65\x32\x5f\160\141\x74\x2e\160\x61\164\137\143\x68\141\x72\164\156\157"); $this->db->where("\x65\x32\137\x74\x72\137\x6f\x72\x64\x65\x72\163\56\164\162\137\x6f\162\x64\162\x5f\143\x61\x73\x65\137\x6e\x61\155\145", $caseName); $this->db->limit(1); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { return $row; } return VERR_COMMON_INVALID; } private function _setE2Img($fileName, $chartNo, $patId) { $nowTime = currentDateFormat(); $data = array("\x69\x6d\147\137\x66\151\x6c\145\156\x61\155\145" => $fileName, "\160\x61\x74\x5f\143\150\141\162\x74\x6e\x6f" => $chartNo, "\160\x61\x74\x5f\151\144" => $patId, "\151\x6d\147\137\x6d\x6f\144\141\x6c\151\164\171" => RESULTTYPE_3D_OBJECT, "\x69\x6d\x67\137\163\157\165\162\143\145\x5f\164\x79\160\145" => EmodalityTransfer::SourceTypeToDatabaseString(EmodalityTransfer::SourceTypeToString(ESourceType::eDentalServiceWebSourceType)), "\x69\155\147\137\x61\x63\x71\x75\151\x73\x69\164\151\x6f\x6e\137\x64\x61\x74\145\x74\x69\x6d\145" => $nowTime, "\x69\x6d\x67\x5f\x75\x70\x64\141\x74\145\137\x64\141\x74\x65\164\151\155\x65" => $nowTime); $this->db->insert("\145\x32\x5f\151\155\147", $data); return $this->db->insert_id(); } public function post_trResultFileByCaseNameAndResultTypeAndFileName($parameters) { $fileCheck = checkPostUploadFile("\141\164\164\141\143\x68\x65\x64\106\151\154\145", $parameters["\151\x6d\141\147\x65\x46\x69\154\145\x50\x61\x74\x68"]); $fileName = basename($parameters["\x69\155\141\x67\x65\106\x69\x6c\x65\120\141\164\150"]); if (!$fileCheck) { vt_loge("\124\x72\x52\x65\163\x75\154\164\106\x69\x6c\145\x42\x79\x43\141\x73\x65\x4e\141\x6d\x65\101\x6e\144\x52\145\x73\x75\154\164\124\171\160\145\x41\156\x64\106\151\x6c\x65\116\141\x6d\x65\137\x50\x6f\x73\x74\40\x41\160\151\x2e\40" . "\111\156\x76\141\154\151\x64\40\106\151\x6c\145\x20\x45\x72\162\x6f\x72\x2e"); return createResponse(VERR_COMMON_INVALID); } $result = $this->_getResultIdAndChartNo($parameters["\x63\141\163\x65\x4e\141\x6d\x65"]); if ($result != VERR_COMMON_INVALID) { $data = array("\x74\x72\137\x72\x73\x74\137\x66\x69\154\x65\x5f\164\171\x70\x65" => $parameters["\x72\x65\x73\165\x6c\x74\124\x79\x70\x65"], "\164\x72\x5f\x72\x73\x74\137\x66\x69\x6c\145\x6e\x61\x6d\x65" => $fileName, "\x74\162\x5f\x72\x73\164\137\146\x69\x6c\x65\x6e\x61\155\145\137\x69\x6e\x5f\164\x72\167\x65\x62" => $parameters["\x77\145\142\x46\151\x6c\x65\x4e\141\155\x65"], "\x74\x72\x5f\162\x73\164\x5f\151\x64" => $result->tr_rst_id); if ($parameters["\162\x65\163\165\x6c\164\124\x79\160\x65"] === RESULTTYPE_3D_OBJECT) { $imgId = $this->_setE2Img($fileName, $result->tr_ordr_pat_chartno, $result->pat_id); } $data["\x69\x6d\x67\x5f\x69\144"] = $imgId; $this->db->insert("\x65\62\137\164\162\137\x72\145\163\x75\154\x74\x5f\146\x69\x6c\145\x73", $data); return array("\x65\162\162\157\162\x43\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x75\x70\144\141\x74\x65\144\106\151\154\x65\x4e\141\155\145" => $fileName); } vt_loge("\124\x72\x52\x65\x73\165\x6c\164\x46\x69\x6c\145\x42\171\x43\x61\x73\145\116\141\155\145\101\x6e\144\122\145\163\x75\x6c\x74\x54\x79\160\x65\x41\156\x64\106\151\x6c\x65\116\x61\x6d\x65\x5f\x50\157\x73\164\40\x41\160\151\56\40" . "\x49\x6e\166\141\x6c\151\x64\x20\103\x61\x73\145\116\x61\155\x65\x20\105\x72\x72\157\x72\56"); return createResponse(VERR_COMMON_INVALID); } public function get_trResultFileByCaseNameAndResultTypeAndFileName($parameters) { $resultId = $this->_getResultId($parameters["\143\x61\163\x65\x4e\141\x6d\x65"]); if ($resultId === false) { return false; } $this->db->select("\164\162\137\162\163\164\x5f\x66\x69\x6c\145\156\141\x6d\x65"); $this->db->from("\x65\62\x5f\x74\162\137\162\x65\x73\x75\154\164\137\x66\x69\154\x65\163"); $this->db->where("\164\162\137\162\x73\164\137\x66\x69\x6c\x65\137\164\171\160\x65", urldecode($parameters["\x72\145\x73\165\154\164\x54\171\160\x65"])); $this->db->where("\164\162\x5f\162\163\164\137\146\151\x6c\145\156\141\155\x65\137\151\x6e\x5f\x74\x72\x77\x65\142", urldecode($parameters["\146\x69\x6c\x65\x4e\x61\155\x65"])); $this->db->where("\x74\162\x5f\x72\x73\x74\137\151\144", $resultId); $query = $this->db->get(); $row = $query->row(); if (isset($row)) { vt_logi("\x74\x72\137\x72\x73\x74\x5f\146\151\x6c\x65\156\141\155\145\72\40" . $row->tr_rst_filename); return $row->tr_rst_filename; } vt_loge(__METHOD__ . "\72\40\143\141\163\145\40\x6e\x6f\x74\40\x66\157\x75\x6e\144\56"); return false; } private function _deleteResultFile($parameters) { $filename = $this->get_trResultFileByCaseNameAndResultTypeAndFileName($parameters); load_model($this, "\x44\x61\164\x61\146\x69\154\145\137\x6d\x6f\x64\x65\154"); if (urldecode($parameters["\x72\145\x73\165\x6c\x74\x54\x79\160\145"]) === RESULTTYPE_3D_OBJECT) { $fileAbsFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_IMAGE, $filename); } else { $fileAbsFilePath = $this->Datafile_model->getResourceFilePath(FILETYPE_RESULT, $filename); } return $this->Datafile_model->deleteFileMultiDrive($fileAbsFilePath); } public function delete_trResultFileByCaseNameAndResultTypeAndFileName($parameters) { $deleteFile = $this->_deleteResultFile($parameters); if (!$deleteFile) { return VERR_COMMON_NOFILE; } $resultId = $this->_getResultId($parameters["\143\x61\x73\145\116\x61\x6d\x65"]); if (urldecode($parameters["\x72\x65\x73\165\154\164\124\171\160\x65"]) === RESULTTYPE_3D_OBJECT) { $this->db->select("\x69\x6d\x67\137\151\144"); $this->db->from("\x65\x32\x5f\x74\162\x5f\x72\x65\163\165\154\164\x5f\146\151\x6c\145\x73"); $this->db->where("\x74\162\137\162\x73\x74\x5f\x66\x69\x6c\145\x5f\164\171\160\145", urldecode($parameters["\162\145\x73\165\154\164\x54\x79\x70\145"])); $this->db->where("\x74\x72\x5f\162\163\164\x5f\x66\151\x6c\145\156\141\x6d\x65\x5f\x69\x6e\x5f\x74\x72\167\x65\x62", urldecode($parameters["\x66\x69\154\x65\116\x61\155\x65"])); $this->db->where("\x74\x72\137\162\163\x74\x5f\x69\144", $resultId); $select = $this->db->get(); $data = array("\151\155\x67\x5f\x69\x64" => $select->row()->img_id); if ($select->num_rows() > 0) { $this->db->delete("\x65\62\137\x69\155\147", $data); } return $this->db->affected_rows(); } $this->db->where("\x74\x72\137\x72\x73\x74\x5f\146\151\154\145\x5f\x74\171\x70\x65", urldecode($parameters["\x72\x65\x73\x75\154\x74\124\x79\x70\x65"])); $this->db->where("\x74\162\x5f\x72\163\x74\x5f\146\x69\x6c\x65\x6e\141\x6d\145\x5f\151\x6e\x5f\x74\x72\x77\145\x62", urldecode($parameters["\x66\x69\154\145\x4e\141\155\x65"])); $this->db->where("\x74\162\x5f\x72\x73\x74\x5f\151\x64", $resultId); $this->db->delete("\145\62\x5f\164\x72\137\x72\x65\x73\x75\x6c\x74\x5f\146\x69\x6c\x65\163"); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/ThirdPartyFiles_model.php b/server/original/www/ezwebserver/src/application/models/ThirdPartyFiles_model.php index 64f7b55..4686724 100644 --- a/server/original/www/ezwebserver/src/application/models/ThirdPartyFiles_model.php +++ b/server/original/www/ezwebserver/src/application/models/ThirdPartyFiles_model.php @@ -1,7 +1,7 @@ db->select("\103\x4f\101\114\105\123\103\x45\x28\157\164\150\137\164\x72\x65\141\164\155\145\156\x74\x5f\x70\141\x72\145\x6e\164\x5f\x63\141\x74\145\x67\157\162\171\x5f\151\x64\54\x30\51\40\x61\163\x20\x70\x61\x72\x65\x6e\164\137\143\141\164\145\147\x6f\x72\x79\137\151\144\x2c\x6f\164\x68\x5f\x74\x72\145\x61\x74\x6d\x65\x6e\164\x5f\x63\141\164\x65\x67\x6f\162\x79\x5f\151\144\x2c\x6f\x74\150\137\x74\x72\x65\x61\x74\155\145\x6e\164\x5f\143\141\164\x65\147\x6f\162\x79\137\156\x61\155\x65\x2c\157\x74\150\x5f\x74\x72\145\x61\164\155\x65\156\164\137\x63\x61\164\x65\147\157\162\171\137\166\151\x73\151\x62\154\x65\x2c\x6f\x74\x68\137\164\x72\x65\x61\164\155\x65\x6e\164\137\164\162\x65\145\137\165\x73\145\162\137\x61\144\x64\145\144"); $this->db->from("\x65\x32\137\157\162\x74\x68\157\137\164\x72\x65\141\x74\x6d\x65\x6e\x74\x5f\143\141\x74\145\x67\157\x72\151\x65\x73"); $this->db->order_by("\160\141\162\x65\156\x74\x5f\x63\x61\x74\x65\147\157\x72\x79\137\151\144\54\x6f\x74\150\x5f\164\x72\145\141\x74\x6d\145\156\x74\x5f\143\x61\164\x65\x67\157\162\171\x5f\151\144"); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { if ($row["\160\x61\162\x65\x6e\x74\137\143\x61\164\145\x67\x6f\x72\x79\x5f\x69\144"] == 0) { $sCategory = STreatmentCategory::constructWithRow($result, $row); array_push($items, $sCategory); } } return ["\145\162\x72\x6f\162\x43\x6f\144\145" => VERR_COMMON_SUCCESS, "\x63\141\164\x65\x67\157\x72\151\x65\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_TreatmentCategories($sCategoryArray) { load_database($this, "\105\62\104\102"); $this->db->empty_table("\145\62\x5f\157\x72\x74\150\x6f\137\x74\162\x65\x61\x74\x6d\x65\x6e\x74\x5f\x63\x61\164\145\x67\x6f\x72\151\x65\163"); if (isset($sCategoryArray)) { foreach ($sCategoryArray as $sCategory) { $this->insertTreatmentCategory($sCategory, null); } } if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function insertTreatmentCategory($sCategory, $parentId) { $data = array("\x6f\164\150\x5f\x74\x72\145\x61\164\155\x65\156\164\137\x63\x61\x74\x65\147\x6f\162\171\x5f\x6e\x61\155\145" => $sCategory->name, "\x6f\164\150\137\x74\x72\x65\141\x74\x6d\145\x6e\x74\x5f\143\141\x74\145\x67\x6f\x72\171\137\166\151\163\151\142\x6c\x65" => $sCategory->visible, "\157\164\x68\137\164\162\145\141\164\155\x65\x6e\x74\x5f\x74\x72\x65\x65\137\165\x73\145\x72\x5f\x61\144\144\x65\x64" => $sCategory->userAdded, "\x6f\x74\150\x5f\164\162\145\141\x74\x6d\x65\156\x74\x5f\x70\x61\x72\145\156\164\137\x63\141\164\145\x67\157\162\171\137\x69\x64" => $parentId); $this->db->set($data); $this->db->insert("\x65\62\x5f\x6f\162\x74\150\157\x5f\x74\162\145\141\164\x6d\x65\156\164\137\x63\141\x74\145\x67\157\162\x69\145\x73", $data); $categoryId = $this->db->insert_id(); if (isset($sCategory->children)) { foreach ($sCategory->children as $childCategory) { $this->insertTreatmentCategory($childCategory, $categoryId); } } } } diff --git a/server/original/www/ezwebserver/src/application/models/UploadingDefaultFilePathHandler.php b/server/original/www/ezwebserver/src/application/models/UploadingDefaultFilePathHandler.php index 42d2aad..564ee1d 100644 --- a/server/original/www/ezwebserver/src/application/models/UploadingDefaultFilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/UploadingDefaultFilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { if ($fileType == FILETYPE_CHTTHM) { return $this->_properties["\x6d\157\x64\145\154"]->getAbsFilePathByType($fileType, urldecode($fileName)); } else { if ($fileType == FILETYPE_LTO) { return $this->_properties["\x6d\x6f\144\145\x6c"]->getSysFilePathByType($fileType, urldecode($fileName)); } else { vt_loge("\125\160\154\157\141\x64\x69\156\x67\x44\145\x66\141\165\154\164\106\x69\x6c\145\120\141\x74\150\x48\141\156\x64\154\x65\x72\x2e\x20" . "\125\156\x73\x75\160\x70\157\162\164\145\x64\x20\x74\171\160\145\56"); return VERR_COMMON_INVALID; } } } } diff --git a/server/original/www/ezwebserver/src/application/models/UploadingE3FilePathHandler.php b/server/original/www/ezwebserver/src/application/models/UploadingE3FilePathHandler.php index 76b216b..b9a5063 100644 --- a/server/original/www/ezwebserver/src/application/models/UploadingE3FilePathHandler.php +++ b/server/original/www/ezwebserver/src/application/models/UploadingE3FilePathHandler.php @@ -1,7 +1,7 @@ _properties = $properties; } function getFilePath($fileType, $fileName) { return $this->_properties["\x6d\157\x64\x65\x6c"]->getSysFilePathByType(FILETYPE_E3FILE, urldecode($fileName)); } } diff --git a/server/original/www/ezwebserver/src/application/models/UserAccountsR2_model.php b/server/original/www/ezwebserver/src/application/models/UserAccountsR2_model.php index 544d2ad..f2e30d1 100644 --- a/server/original/www/ezwebserver/src/application/models/UserAccountsR2_model.php +++ b/server/original/www/ezwebserver/src/application/models/UserAccountsR2_model.php @@ -1,7 +1,7 @@ db->trans_start(); $this->db->set("\x61\x63\143\x5f\x66\141\x69\x6c\145\x64\x5f\x6c\x6f\147\x69\x6e\x5f\143\x6f\x75\156\x74", "\x61\143\143\x5f\146\141\x69\154\145\x64\137\x6c\157\x67\x69\156\x5f\143\x6f\x75\156\164\53\61", FALSE); $this->db->where("\x61\143\x63\x5f\165\163\x65\x72\156\141\155\145", $username); $this->db->update("\145\x32\x5f\x61\x63\143"); $data = array("\x61\143\x63\137\141\143\143\x6f\165\x6e\164\x5f\163\164\141\x74\165\x73" => "\145\x4c\x6f\143\x6b\x65\x64"); $this->db->where("\141\143\143\x5f\x66\141\x69\154\x65\x64\x5f\x6c\157\x67\x69\x6e\x5f\x63\157\x75\156\164\40\x3e\75", ACCOUNT_LOCKOUT_THRESHOLD); $this->db->where("\141\143\143\137\x75\163\x65\162\x6e\141\155\x65", $username); $this->db->update("\x65\x32\137\x61\x63\x63", $data); $this->db->trans_complete(); $this->db->select("\x61\143\x63\x5f\146\141\151\154\x65\144\137\154\x6f\x67\x69\156\137\x63\x6f\x75\x6e\x74"); $this->db->from("\x65\62\137\x61\x63\x63"); $this->db->where_in("\141\x63\143\x5f\x75\163\145\x72\156\141\155\x65", $username); $result = $this->db->get()->result_array(); if (count($result) > 0) { return (int) $result[0]["\141\143\x63\137\146\141\x69\154\145\144\x5f\x6c\x6f\x67\151\x6e\x5f\143\157\165\156\164"]; } else { vt_loge(__METHOD__ . "\72\40\106\x61\x69\154\145\x64\x20\164\157\40\147\145\x74\40\154\157\x67\x69\156\40\143\x6f\165\x6e\164\72\x20" . $username); return 0; } } public function reset_login_failures($userName) { load_database($this, "\105\x32\104\x42"); $data = array("\x61\143\x63\137\146\141\151\x6c\x65\144\137\154\x6f\147\151\x6e\137\x63\x6f\x75\156\x74" => 0, "\141\143\143\x5f\x61\x63\x63\x6f\x75\x6e\x74\137\x73\164\141\x74\165\x73" => "\x65\x41\143\164\x69\x76\145"); $this->db->where("\141\x63\x63\137\x75\x73\145\162\x6e\141\x6d\145", $userName); $this->db->update("\x65\x32\137\x61\x63\143", $data); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/UserAccounts_model.php b/server/original/www/ezwebserver/src/application/models/UserAccounts_model.php index ce1d683..69bf3e6 100644 --- a/server/original/www/ezwebserver/src/application/models/UserAccounts_model.php +++ b/server/original/www/ezwebserver/src/application/models/UserAccounts_model.php @@ -1,7 +1,7 @@ "\x61\143\143\137\144\x61\x74\141\x5f\144\x65\154", "\x62\104\x61\164\x61\x54\x72\141\x6e\x73\146\145\x72" => "\141\143\143\137\144\141\x74\x61\137\164\162\141\156\x73\x66\145\x72", "\x62\104\141\x74\x61\x45\170\x70\157\x72\x74" => "\141\x63\x63\137\x64\x61\x74\141\x5f\145\170\160\x6f\162\164", "\142\x44\x61\x74\x61\101\x64\144\115\x6f\144\x69\x66\171" => "\141\x63\143\x5f\144\141\x74\x61\137\x61\144\144\137\155\157\144\151\146\x79", "\x62\120\141\164\x69\x65\156\164\101\x64\144\x4d\157\x64\151\146\171" => "\x61\143\143\x5f\x70\141\x74\151\x65\x6e\x74\x5f\x61\144\144\137\x6d\x6f\x64\151\x66\171", "\142\x55\x73\145\162\101\143\143\157\165\156\164\105\x64\x69\x74" => "\141\143\143\137\165\x73\145\162\137\141\x63\x63\157\x75\156\x74\137\x65\x64\x69\164", "\x62\x53\x68\141\x72\x65\144\103\x6f\156\x74\145\x6e\164\163\105\144\x69\164" => "\x61\x63\143\137\x73\x68\x61\162\145\x64\137\143\x6f\x6e\164\145\x6e\164\163\x5f\x65\144\151\x74"); private $reqParamDbFieldMap = array("\x73\x74\x72\x41\x63\x63\157\165\x6e\164\x4e\141\155\145" => "\x61\143\x63\137\x75\x73\145\162\156\x61\155\145", "\x73\x74\162\x41\x63\x63\157\x75\x6e\164\x50\x61\163\163\167\144" => "\x61\x63\x63\x5f\160\141\163\x73\167\x6f\x72\x64", "\163\x74\x72\x47\162\x61\144\145" => "\141\143\x63\137\154\x65\x76\x65\154", "\x62\104\x61\164\x61\x44\145\154" => "\x61\x63\143\x5f\144\141\x74\x61\x5f\144\145\154", "\x62\104\141\x74\141\x54\x72\x61\156\163\146\x65\x72" => "\x61\x63\x63\137\144\x61\164\141\x5f\164\x72\141\156\163\x66\x65\x72", "\142\104\141\x74\141\105\170\160\157\x72\x74" => "\141\x63\143\x5f\144\x61\164\x61\137\x65\x78\x70\157\162\164", "\x62\104\x61\x74\141\101\x64\144\115\x6f\144\151\146\171" => "\x61\x63\143\x5f\144\141\164\141\137\x61\x64\144\x5f\155\x6f\144\x69\146\x79", "\142\120\x61\164\151\x65\156\164\x41\144\144\115\x6f\x64\x69\146\171" => "\x61\143\143\137\x70\141\x74\x69\x65\156\x74\137\x61\x64\x64\x5f\155\x6f\x64\151\146\171", "\x62\x55\163\x65\x72\101\143\143\x6f\165\x6e\164\105\144\x69\164" => "\141\x63\143\137\x75\163\x65\162\137\x61\x63\x63\157\165\156\164\137\145\x64\x69\x74", "\142\123\x68\141\x72\x65\144\x43\157\156\x74\145\156\x74\x73\x45\144\151\x74" => "\x61\x63\143\x5f\x73\x68\x61\162\145\144\137\x63\x6f\x6e\164\x65\156\164\x73\x5f\145\x64\151\164", "\163\164\162\x41\143\x63\157\x75\156\164\x53\164\141\164\165\163" => "\x61\x63\x63\x5f\x61\x63\143\157\165\x6e\164\137\163\164\x61\x74\x75\163", "\x6e\x46\141\151\x6c\145\144\114\x6f\147\x69\156\x43\157\165\x6e\164" => "\x61\x63\143\137\x66\x61\x69\x6c\145\x64\x5f\154\157\x67\151\156\x5f\143\x6f\165\156\x74"); public function get_UserAccounts($parameters) { $sql = "\xa\40\x20\x20\x20\x20\x20\40\40\x20\40\x20\40\x53\x45\x4c\105\103\124\x20\x2a\xa\x20\40\40\40\40\40\x20\x20\x20\x20\40\40\x46\122\x4f\x4d\x20\105\x32\x5f\101\x43\x43\12\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\40\117\122\104\105\x52\x20\x42\131\40\x41\103\103\x5f\x41\103\x43\117\125\x4e\x54\137\111\104\40\x41\123\103"; return $this->db->query($sql)->result_array(); } public function post_UserAccounts($accountInfo) { $sql = "\123\x45\114\x45\103\124\x20\101\103\103\x5f\101\103\x43\117\x55\116\x54\x5f\x49\104\x20\x46\122\117\115\x20\105\x32\137\x41\x43\103\40\127\110\105\122\105\x20\x41\103\x43\137\x55\x53\x45\x52\116\101\115\105\40\75\x20\77"; $query = $this->db->query($sql, array($accountInfo["\163\164\x72\101\143\143\x6f\x75\156\x74\116\x61\x6d\x65"]))->result_array(); $nAccID = 0; foreach ($query as $row) { $nAccID = $row["\141\x63\143\137\141\x63\x63\157\165\156\x74\x5f\151\144"]; } $defaultPermissions = SAccountInfoR2::getDefaultAccountPermissions($accountInfo["\x73\x74\162\107\162\x61\144\x65"]); if ($nAccID == 0) { $data = []; $this->setDbBooleanFieldsWithFilter($defaultPermissions, $data); if (array_key_exists("\163\x74\162\101\143\143\157\x75\x6e\x74\x4e\x61\155\x65", $accountInfo)) { $data["\141\143\x63\x5f\x75\163\x65\162\x6e\x61\x6d\145"] = $accountInfo["\163\164\162\101\x63\143\x6f\x75\x6e\x74\116\141\x6d\x65"]; } if (array_key_exists("\163\x74\162\101\x63\x63\x6f\165\156\x74\120\x61\163\163\x77\x64", $accountInfo)) { $data["\x61\143\143\137\x70\141\163\x73\167\x6f\x72\144"] = $accountInfo["\x73\x74\162\x41\x63\143\157\165\156\164\120\141\163\x73\x77\x64"]; } if (array_key_exists("\163\x74\x72\107\x72\x61\x64\145", $accountInfo)) { $data["\x61\143\x63\x5f\154\x65\x76\x65\x6c"] = $accountInfo["\163\164\162\107\162\x61\144\x65"]; } if (array_key_exists("\163\164\x72\x41\143\143\x6f\165\x6e\164\x53\164\x61\164\165\x73", $accountInfo)) { $data["\141\x63\143\137\x61\143\x63\x6f\165\x6e\164\137\163\164\141\164\165\x73"] = $accountInfo["\163\164\162\101\143\143\157\x75\x6e\x74\x53\x74\141\164\x75\163"]; } if (array_key_exists("\156\x46\x61\x69\154\145\144\x4c\157\147\x69\156\x43\x6f\x75\156\x74", $accountInfo)) { if (filter_var($accountInfo["\156\106\x61\x69\x6c\x65\144\x4c\157\x67\151\x6e\x43\157\165\x6e\x74"], FILTER_VALIDATE_INT) == true) { $data["\141\143\x63\137\146\x61\x69\x6c\145\144\137\x6c\x6f\147\x69\x6e\x5f\143\x6f\x75\x6e\x74"] = $accountInfo["\x6e\x46\141\x69\154\x65\x64\114\x6f\x67\151\156\x43\157\165\156\164"]; } else { vt_loge(__METHOD__ . "\x3a" . "\107\x65\x74\x20\x77\x72\x6f\x6e\147\40\164\171\160\145\x20\146\x72\x6f\155\40\x6e\x46\x61\151\x6c\145\144\x4c\x6f\x67\x69\x6e\103\x6f\165\156\x74\75" . $accountInfo["\x6e\x46\141\151\x6c\x65\x64\x4c\157\x67\x69\x6e\x43\157\165\x6e\x74"]); return VERR_DB_MISMATCH; } } $this->db->insert("\145\x32\137\141\143\143", $data); } else { return VERR_DB_OVERLAP; } vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eUserAdded), "\x41\144\144\145\144\x20\x55\163\x65\162\40\x69\156\146\x6f\x72\x6d\x61\164\151\x6f\x6e\56\40\x55\x73\145\162\x20\x6e\141\x6d\x65\x20\x3a\40{$accountInfo["\163\x74\162\101\143\x63\x6f\x75\x6e\164\x4e\x61\155\145"]}"); if ($this->db->affected_rows() == 0) { return $this->db->affected_rows(); } if ($accountInfo["\163\164\x72\x47\162\x61\144\145"] == "\x44") { $sql = "\x53\x45\114\x45\x43\x54\x20\x41\x43\x43\x5f\101\103\103\117\125\116\x54\x5f\x49\104\40\x46\x52\117\x4d\40\105\62\137\x41\x43\x43\x20\127\x48\105\x52\105\x20\x41\103\x43\137\x55\x53\x45\x52\116\x41\115\x45\x20\75\x20\x3f"; $query = $this->db->query($sql, array($accountInfo["\163\164\162\x41\x63\143\x6f\x75\x6e\x74\x4e\x61\x6d\145"]))->result_array(); if (count($query) > 0) { $strAccountID = $query[0]["\x61\143\x63\137\x61\x63\143\157\x75\x6e\x74\137\x69\144"]; $sql = "\x49\x4e\x53\x45\122\x54\40\111\x4e\124\x4f\40\x45\62\137\104\x4f\103\x20\50\104\117\103\x5f\116\101\x4d\x45\x2c\x20\x44\x4f\x43\x5f\114\105\x56\105\x4c\54\40\101\103\x43\x5f\101\x43\x43\x4f\125\116\x54\137\111\x44\51\x20\126\101\x4c\x55\x45\x53\x20\x28\x3f\x20\x2c\77\x20\54\x3f\51"; $this->db->query($sql, array($accountInfo["\163\x74\x72\x41\x63\x63\x6f\x75\156\164\116\x61\155\145"], "\104\157\x63\x74\x6f\162", $strAccountID)); return $this->db->affected_rows(); } else { return count($query); } } else { return $this->db->affected_rows(); } } private function setDbBooleanFieldsWithFilter($defaultPermissions, &$data) { foreach ($this->reqParamDbFieldMapForPermission as $key => $value) { if (array_key_exists($key, $defaultPermissions)) { $data[$value] = filter_var($defaultPermissions[$key], FILTER_VALIDATE_BOOLEAN); } } } public function get_UserAccountsR2() { $this->db->select("\52"); $this->db->from("\145\62\137\x61\143\143"); $this->db->order_by("\141\143\143\x5f\x61\143\143\x6f\165\156\x74\x5f\151\x64", "\141\163\x63"); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { $accInfo = SAccountInfoR2::constructWithRow($row); array_push($items, $accInfo); } return ["\145\162\x72\157\x72\103\x6f\144\x65" => VERR_COMMON_SUCCESS, "\141\143\143\157\165\x6e\164\111\x6e\146\157\114\x69\x73\164" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function post_UserAccountsR2($accountInfo) { $this->db->select("\x61\143\x63\137\141\x63\x63\157\x75\156\x74\x5f\x69\144"); $this->db->where("\x61\x63\x63\137\x75\x73\145\162\x6e\x61\x6d\145", $accountInfo->strAccountName); $this->db->limit(1); $q = $this->db->get("\x65\62\x5f\141\x63\143"); $this->db->reset_query(); if ($q->num_rows() > 0) { return returnSetResponse(VERR_DB_OVERLAP); } $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $this->db->trans_begin(); $data = array(); $this->setDbFields($accountInfo, $data); if (isset($accountInfo->strAccountPasswd) && !empty($accountInfo->strAccountPasswd) || isset($accountInfo->dtPasswordUpdated) && !empty($accountInfo->dtPasswordUpdated)) { $data["\141\143\143\x5f\x70\x61\x73\163\167\x6f\x72\144\x5f\165\x70\144\x61\x74\145\144"] = currentDateByFormat(DATEFORMAT_DATABASE); } $this->db->set($data); $this->db->insert("\145\62\x5f\x61\x63\x63"); $account_id = $this->db->insert_id(); $affected_row = $this->db->affected_rows(); if ($affected_row > 0 && strcasecmp($accountInfo->strGrade, "\x44") == 0) { $data = array("\x64\x6f\143\137\x6e\141\155\x65" => $accountInfo->strAccountName, "\141\143\143\x5f\x61\x63\143\x6f\165\156\x74\137\x69\x64" => $account_id); $this->db->set($data); $this->db->insert("\x65\62\x5f\144\157\x63"); $affected_row = $this->db->affected_rows(); } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $response = createResponse(VERR_DB_INVALIDDATA); $this->db->trans_rollback(); } else { $response = createResponse(VERR_COMMON_SUCCESS); $this->db->trans_commit(); } $this->db->db_debug = $db_debug; vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eUserAdded), "\101\144\144\x65\x64\x20\x55\x73\x65\162\x20\x69\156\146\157\162\x6d\141\x74\x69\x6f\156\x2e\40\x55\163\x65\x72\x20\x6e\x61\x6d\145\x20\72\x20{$accountInfo->strAccountName}"); return $response; } private function setDbFields($accountInfo, &$data) { foreach ($this->reqParamDbFieldMap as $key => $value) { if (property_exists($accountInfo, $key)) { $data[$value] = $accountInfo->{$key}; } } } public function get_UserAccountsForNames($parameters) { $sql = "\123\x45\114\x45\x43\124\40\x41\103\103\137\125\123\x45\x52\x4e\x41\115\105\x20\106\122\x4f\x4d\x20\x45\62\137\x41\x43\103\x20\117\x52\104\x45\122\x20\x42\x59\40\101\103\x43\137\101\x43\x43\x4f\125\116\x54\137\111\x44\40\101\x53\103"; return $this->db->query($sql)->result_array(); } public function get_UserAccountsByName($parameters) { return $this->getUserAccount($parameters); } public function getUserAccount($username) { $sql = "\123\105\x4c\105\x43\124\40\52\x20\x46\x52\117\x4d\40\145\x32\x5f\x61\143\x63\x20\127\x48\105\x52\105\40\x61\143\x63\137\x75\x73\145\162\x6e\141\x6d\x65\x20\75\x20\77"; $ret = $this->db->query($sql, array($username))->result_array(); return $ret; } public function updateUserAccount($username, $accountInfo) { $sql = "\125\x50\x44\x41\x54\105\x20\x65\x32\x5f\141\143\143\40\x53\105\124\x20\x61\x63\143\x5f\x75\x73\145\162\x6e\141\155\145\x20\75\x20\77\54\40" . "\141\x63\x63\x5f\x6c\x65\x76\145\154\40\75\x20\77\x2c\40\x61\x63\143\137\144\x61\164\141\137\x64\145\x6c\40\75\40\x3f\x2c\x20\x61\x63\143\137\x64\141\x74\x61\137\x74\162\x61\x6e\x73\x66\145\162\40\75\40\x3f\54\40" . "\x61\x63\143\137\144\141\164\x61\x5f\145\x78\160\x6f\x72\x74\40\75\40\77\x20\127\x48\105\x52\105\40\x61\x63\x63\137\165\163\x65\x72\x6e\x61\155\145\x20\x3d\40\77"; $this->db->query($sql, array($accountInfo["\163\x74\162\101\x63\143\x6f\165\156\x74\116\141\155\145"], $accountInfo["\x73\164\162\x47\x72\x61\x64\x65"], $accountInfo["\142\x44\x61\x74\141\x44\145\x6c"], $accountInfo["\142\x44\x61\164\141\x54\162\141\156\163\146\x65\x72"], $accountInfo["\142\104\141\x74\x61\105\170\x70\x6f\162\x74"], $username)); return $this->db->affected_rows(); } public function updateUserAccountR2($username, $accountInfo) { $data = array(); $this->updateDbFields($accountInfo, $data); if (isset($accountInfo["\x73\x74\x72\101\143\x63\157\x75\156\x74\120\x61\163\163\x77\x64"]) && !empty($accountInfo["\163\164\x72\x41\x63\143\157\165\156\164\120\141\163\163\167\x64"])) { if (!isset($accountInfo["\144\164\x50\141\x73\163\167\x6f\162\x64\125\160\144\141\x74\145\x64"]) || empty($accountInfo["\x64\164\x50\141\x73\x73\167\157\x72\x64\x55\160\144\x61\164\145\x64"])) { $data["\141\143\x63\137\160\141\163\x73\x77\x6f\162\x64\x5f\165\160\144\141\x74\145\144"] = currentDateByFormat(DATEFORMAT_DATABASE); } else { $dateTime = strtotime($accountInfo["\144\x74\120\141\163\163\167\157\x72\144\125\x70\x64\141\164\145\x64"]); $data["\x61\143\x63\137\160\141\163\x73\167\157\x72\144\x5f\x75\160\x64\x61\164\x65\144"] = date(DATAFORMAT[DATEFORMAT_DATABASE], $dateTime); } } else { } $this->db->set($data); $this->db->where("\x61\143\x63\x5f\165\163\x65\x72\x6e\x61\x6d\x65", $username); $this->db->update("\145\x32\x5f\x61\x63\x63"); return $this->db->affected_rows(); } private function updateDbFields($accountInfo, &$data) { foreach ($this->reqParamDbFieldMap as $key => $value) { if (array_key_exists($key, $accountInfo)) { $data[$value] = $accountInfo[$key]; } } } public function getDoctor($userId) { $sql = "\123\105\x4c\105\x43\x54\40\x2a\40\106\122\x4f\115\40\x65\62\x5f\x64\157\x63\x20\127\110\105\x52\105\40\141\143\143\137\141\x63\x63\x6f\165\156\x74\x5f\x69\144\x20\x3d\x20\77"; $ret = $this->db->query($sql, array($userId))->result_array(); return $ret; } public function deleteDoctor($userId, $doctorId) { $sql = "\104\105\x4c\x45\124\x45\x20\106\122\117\115\40\145\62\137\141\x74\x74\145\156\144\x69\156\147\x5f\x64\157\x63\40\127\110\105\x52\x45\40\x64\x6f\143\x5f\151\x64\40\x3d\40\x3f"; $this->db->query($sql, array($doctorId)); $affectedRowDeleteAttendingDoc = $this->db->affected_rows(); if ($affectedRowDeleteAttendingDoc === 0) { vt_logw(__METHOD__ . "\x3a" . "\x4e\x6f\40\141\164\x74\145\156\144\x69\156\x67\x20\x64\x6f\x63\164\157\162\40\x64\x65\154\145\164\145\144\x3a\x20\144\x6f\x63\x5f\x69\144\x3d" . $doctorId); } else { vt_logd(__METHOD__ . "\x3a" . "\x41\164\164\x65\x6e\144\x69\156\147\x20\x64\x6f\143\164\x6f\x72\x20\144\x65\154\x65\x74\145\144\72\x20\x64\x6f\143\x5f\151\144\x3d" . $doctorId); } $sql = "\104\x45\x4c\105\x54\x45\40\106\122\117\x4d\x20\x65\x32\137\x64\x6f\x63\40\127\x48\x45\x52\105\x20\x61\143\143\137\141\143\143\157\165\156\164\x5f\x69\x64\40\x3d\x20\x3f"; $this->db->query($sql, array($userId)); $affectedRowDeleteDoc = $this->db->affected_rows(); if ($affectedRowDeleteDoc === 0) { vt_logw(__METHOD__ . "\72" . "\x4e\x6f\x20\x64\157\143\164\157\162\x20\144\145\x6c\145\164\145\144\72\x20\x61\143\143\137\x61\143\x63\157\165\x6e\x74\x5f\x69\144\x3d" . $userId); } else { vt_logd(__METHOD__ . "\72" . "\x44\157\x63\164\157\162\40\144\x65\x6c\145\164\145\144\x3a\40\165\163\x65\162\x69\144\75" . $userId); } return $affectedRowDeleteAttendingDoc + $affectedRowDeleteDoc; } public function insertDoctor($username, $userId) { $sql = "\111\116\x53\x45\122\124\40\x49\x4e\124\117\40\145\x32\137\x64\157\x63\40\50\x64\x6f\143\137\156\x61\155\145\54\x20\x61\x63\x63\137\141\143\x63\x6f\165\156\164\137\151\144\54\40\144\157\143\137\154\x65\166\145\x6c\x29\40\126\101\x4c\125\105\123\x20\x28\77\54\x20\77\x20\x2c\77\51"; $this->db->query($sql, array($username, $userId, "\104\157\143\x74\x6f\162")); return $this->db->affected_rows(); } public function updateDoctor($username, $userId) { if (empty($username) || empty($userId)) { vt_logw(__METHOD__ . "\x3a" . "\x4e\157\40\165\x73\145\162\x6e\141\155\x65\40\x6f\162\40\x75\163\x65\x72\x49\144\72\40" . $username . "\54" . $userId); return 0; } $sql = "\125\120\104\x41\x54\x45\x20\145\x32\137\x64\157\x63\x20\x53\x45\x54\40\144\x6f\143\137\x6e\x61\155\x65\x20\x3d\40\77\54\x20\144\157\143\x5f\154\145\x76\145\154\40\75\x20\x3f\40\x57\x48\x45\122\105\x20\x61\143\143\137\x61\143\143\x6f\x75\156\164\137\151\x64\40\x3d\40\77"; $this->db->query($sql, array($username, "\x44\157\143\164\157\x72", $userId)); return $this->db->affected_rows(); } public function deleteUser($userId) { $sql = "\104\x45\x4c\105\x54\105\x20\106\x52\x4f\115\40\x65\62\137\141\x63\x63\40\x57\x48\x45\122\105\40\x61\143\x63\137\x61\143\143\157\165\x6e\x74\x5f\151\x64\x20\x3d\40\x3f"; $this->db->query($sql, array($userId)); return $this->db->affected_rows(); } public function put_UserAccountsByName($strPrevAccountName, $accountInfo) { return $this->updateUserAccountsByName($strPrevAccountName, $accountInfo, [$this, "\x75\160\144\141\x74\145\x55\x73\x65\162\101\x63\x63\157\165\x6e\x74"]); } public function get_UserAccountsByNameR2($strAccountName) { $this->db->select("\x2a"); $this->db->from("\x65\x32\x5f\x61\x63\143"); $this->db->where("\x61\143\x63\137\165\x73\145\x72\x6e\x61\155\145", $strAccountName); $this->db->limit(1); $result = $this->db->get()->result_array(); if (count($result) > 0) { $accInfo = SAccountInfoR2::constructWithRow($result[0]); return ["\145\162\162\157\x72\103\157\x64\145" => VERR_COMMON_SUCCESS, "\x61\x63\x63\157\165\x6e\164\x49\156\146\157" => $accInfo]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function put_UserAccountsByNameR2($strPrevAccountName, $accountInfo) { return $this->updateUserAccountsByName($strPrevAccountName, $accountInfo, [$this, "\165\x70\x64\141\164\145\125\163\x65\162\101\143\x63\157\165\x6e\x74\122\62"]); } public function updateUserAccountsByName($strPrevAccountName, $accountInfo, $updateUserAccountFunc) { $ret = VERR_COMMON_SUCCESS; $affectedRows = 0; if (strlen($accountInfo["\x73\164\162\101\143\x63\x6f\165\156\x74\116\x61\x6d\145"]) > 255) { return array("\145\162\x72\157\x72\x43\157\x64\x65" => VERR_DB_INVALIDDATA, "\145\x72\162\x6f\x72\x4d\145\x73\163\x61\x67\x65" => "\124\150\x65\40\x6c\145\156\147\164\x68\x20\x6f\146\40\165\x73\145\x72\x20\x6e\141\x6d\145\x20\x73\x68\x6f\x75\154\x64\x20\x62\x65\40\x65\161\165\141\154\40\x6f\162\x20\x73\150\157\162\164\145\162\x20\x74\150\x61\x6e\x20\62\65\65\x20\x6c\x65\164\164\145\x72\x73\x2e", "\x61\146\146\145\x63\x74\x65\x64\x52\157\x77\163" => 0); } if ($accountInfo["\163\164\x72\x41\143\143\157\x75\x6e\164\116\x61\155\145"] != $strPrevAccountName) { $retGetNewUser = $this->getUserAccount($accountInfo["\163\x74\x72\101\x63\x63\x6f\x75\156\164\116\x61\x6d\145"]); if (count($retGetNewUser) > 0) { vt_loge(__METHOD__ . "\72" . "\125\163\145\x72\x20\x61\x6c\x72\x65\141\144\171\x20\145\170\x69\163\x74\x73\x3a\x20" . $accountInfo["\x73\164\x72\x41\x63\x63\157\165\x6e\164\116\141\155\x65"]); $ret = VERR_DB_OVERLAP; return array("\145\x72\162\157\x72\x43\157\144\x65" => $ret, "\x61\146\x66\x65\143\164\145\x64\x52\157\167\x73" => $affectedRows); } } else { } $retGetUser = $this->getUserAccount($strPrevAccountName); if (count($retGetUser) === 0) { vt_loge(__METHOD__ . "\72" . "\x4e\157\x20\x75\163\145\x72\x20\x61\143\x63\157\x75\156\164\40\146\157\x75\x6e\x64\x3a\x20" . $strPrevAccountName); $ret = VERR_DB_NOSUCHDATA; return array("\145\162\162\x6f\x72\103\157\144\145" => $ret, "\141\x66\146\145\143\x74\145\144\122\x6f\x77\163" => $affectedRows); } $oldAccount = $retGetUser[0]; $this->db->trans_start(); $retUpdateUser = $updateUserAccountFunc($strPrevAccountName, $accountInfo); if ($retUpdateUser === 0) { vt_loge(__METHOD__ . "\72" . "\116\x6f\40\x75\x73\x65\162\x20\x61\x63\x63\x6f\165\156\x74\40\165\x70\144\x61\x74\x65\x64\72\40\141\143\143\x6f\x75\x6e\40\x6e\x61\x6d\145\75" . $accountInfo["\163\164\x72\x41\x63\143\157\x75\156\164\x4e\141\155\x65"]); } $affectedRows = $affectedRows + $retUpdateUser; if ($oldAccount["\x61\x63\x63\x5f\x6c\x65\166\145\x6c"] === "\104") { if ($accountInfo["\163\164\x72\x47\x72\141\x64\145"] === "\x44") { $retUpdateDoctor = $this->updateDoctor($accountInfo["\163\x74\162\101\x63\143\x6f\165\156\164\116\x61\x6d\x65"], $oldAccount["\x61\x63\143\137\x61\143\143\157\x75\156\x74\137\x69\x64"]); if ($retUpdateDoctor === 0) { vt_loge(__METHOD__ . "\x3a" . "\116\157\40\144\x6f\x63\164\x6f\x72\40\x75\x70\x64\141\x74\x65\144\72\x20\x61\x63\x63\137\141\143\143\x6f\x75\156\x74\137\151\x64\75" . $oldAccount["\x61\x63\143\x5f\141\x63\x63\x6f\165\x6e\x74\137\151\x64"]); } $affectedRows = $affectedRows + $retUpdateDoctor; } else { $retGetDoctor = $this->getDoctor($oldAccount["\x61\143\x63\137\141\143\143\x6f\x75\x6e\164\137\x69\144"]); if (count($retGetDoctor) === 0) { vt_logd(__METHOD__ . "\72" . "\116\x6f\x20\x64\157\x63\164\157\162\40\141\143\143\157\x75\156\x74\x20\146\157\165\x6e\x64\x20\x74\x6f\40\x62\x65\x20\x64\145\154\x65\164\145\x64\72\x20\x61\x63\x63\137\x61\x63\143\x6f\165\156\x74\x5f\151\x64\75" . $oldAccount["\x61\x63\143\x5f\141\143\x63\157\x75\156\x74\x5f\151\144"]); } else { $doctor = $retGetDoctor[0]; $retDeleteDoctor = $this->deleteDoctor($oldAccount["\141\x63\143\137\141\143\143\x6f\165\x6e\x74\137\151\x64"], $doctor["\x64\x6f\x63\x5f\151\144"]); if ($retDeleteDoctor === 0) { vt_loge(__METHOD__ . "\72" . "\116\157\40\144\x6f\x63\164\x6f\162\x20\141\x63\x63\x6f\x75\156\x74\40\144\145\x6c\x65\164\x65\144\x3a\x20\144\x6f\143\x5f\x69\x64\x3d" . $doctor["\144\157\x63\x5f\151\x64"]); } else { vt_logw(__METHOD__ . "\x3a" . "\104\x6f\143\x74\157\162\40\x69\156\146\157\162\x6d\x61\x74\x69\157\x6e\40\144\x65\x6c\145\x74\x65\144\x20\144\165\145\x20\x74\x6f\40\141\143\x63\x6f\165\156\x74\40\x67\162\141\x64\x65\x20\143\150\x61\x6e\x67\x65\72\40\x75\163\x65\x72\x6e\141\155\x65\75" . $accountInfo["\x73\x74\x72\101\143\143\157\165\156\x74\116\x61\155\145"]); } $affectedRows = $affectedRows + $retDeleteDoctor; } } } else { if ($accountInfo["\x73\x74\162\107\x72\141\x64\x65"] === "\104") { $retGetDoctor = $this->getDoctor($oldAccount["\141\143\x63\x5f\141\143\143\x6f\x75\x6e\164\137\151\144"]); if (count($retGetDoctor) === 0) { } else { $doctor = $retGetDoctor[0]; $retDeleteDoctor = $this->deleteDoctor($oldAccount["\x61\x63\x63\137\141\x63\143\157\x75\x6e\x74\x5f\151\144"], $doctor["\144\x6f\143\x5f\x69\x64"]); if ($retDeleteDoctor === 0) { vt_logd(__METHOD__ . "\x3a" . "\x4e\157\40\x64\x6f\x63\x74\x6f\x72\40\144\x65\x6c\145\x74\x65\144\72\x20" . $oldAccount["\141\x63\143\x5f\x61\x63\x63\x6f\x75\x6e\164\x5f\x69\x64"]); } $affectedRows = $affectedRows + $retDeleteDoctor; } $retInsertDoctor = $this->insertDoctor($accountInfo["\x73\x74\162\101\x63\x63\x6f\x75\156\164\x4e\141\155\x65"], $oldAccount["\x61\143\143\x5f\141\x63\143\x6f\165\x6e\x74\137\x69\144"]); if ($retInsertDoctor === 0) { vt_loge(__METHOD__ . "\x3a" . "\116\x6f\40\x64\157\x63\164\157\162\x20\151\x6e\x73\145\x72\164\x65\144\72\x20" . $oldAccount["\141\143\143\137\x61\143\143\x6f\165\156\164\x5f\151\144"]); $ret = VERR_DB_QUERY_EXEC_ERROR; } $affectedRows = $affectedRows + $retInsertDoctor; } else { } } $this->db->trans_complete(); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eUserModified), "\115\157\x64\x69\146\x69\x65\x64\x20\125\x73\x65\x72\40\x69\156\x66\x6f\162\155\x61\x74\x69\157\156\56\40\x55\x73\x65\162\40\156\x61\x6d\145\40\x3a\40{$accountInfo["\163\164\x72\x41\143\x63\157\165\156\x74\x4e\141\155\145"]}"); return array("\145\x72\162\157\162\103\x6f\144\x65" => $ret, "\x61\146\x66\145\143\x74\145\144\122\x6f\x77\x73" => $affectedRows); } public function delete_UserAccountsByName($strAccountName) { $sql = "\104\x45\114\105\124\x45\x20\106\x52\x4f\115\40\145\62\137\x61\143\143\x20\x57\x48\105\122\x45\40\x61\143\x63\x5f\x75\x73\145\162\x6e\141\x6d\x65\x20\x3d\40\x3f"; $this->db->query($sql, array($strAccountName)); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eUserDeleted), "\104\x65\x6c\x65\164\x65\x64\40\x55\163\x65\x72\40\x69\156\146\157\x72\x6d\141\164\151\157\156\x2e\40\125\x73\x65\162\40\x6e\141\x6d\x65\x20\x3a\40{$strAccountName}"); return $this->db->affected_rows(); } public function get_UserAccountsByNameForPassword($parameters) { $sql = "\123\x45\x4c\x45\x43\124\40\101\x43\103\137\x50\101\x53\123\x57\117\122\104\x20\106\122\x4f\x4d\x20\105\62\x5f\x41\103\x43\40\x57\110\105\122\x45\x20\x41\x43\x43\x5f\x55\123\105\x52\116\x41\x4d\x45\x20\x3d\x20\x3f"; return $this->db->query($sql, array($parameters))->result_array(); } public function put_UserAccountsByNameForPassword($strAccountName, $strEditPassword) { $sql = "\x55\x50\x44\101\x54\x45\x20\x65\x32\x5f\x61\143\143\40\123\105\x54\40\x61\143\143\x5f\x70\141\x73\x73\167\157\162\x64\40\x3d\x20\x3f\x2c\40\141\x63\x63\137\x70\x61\163\x73\x77\157\162\x64\137\x75\160\x64\141\x74\x65\144\x20\75\x20\77\x20\x57\110\105\122\105\x20\141\x63\x63\x5f\165\163\x65\x72\x6e\x61\x6d\145\40\75\x20\77"; $this->db->query($sql, array($strEditPassword, currentDateByFormat(DATEFORMAT_DATABASE), $strAccountName)); vt_log_evt(get_called_class(), EEventLogType::getTypeString((new EEventLogType())->eUserModified), "\x4d\x6f\144\x69\x66\x69\x65\144\40\125\x73\x65\162\40\x69\x6e\146\157\x72\x6d\141\x74\x69\x6f\156\x2e\40\125\x73\145\162\40\x6e\x61\x6d\x65\x20\72\x20{$strAccountName}"); return $this->db->affected_rows(); } } diff --git a/server/original/www/ezwebserver/src/application/models/VTOSTOControlPoints_model.php b/server/original/www/ezwebserver/src/application/models/VTOSTOControlPoints_model.php index 227a14d..711743b 100644 --- a/server/original/www/ezwebserver/src/application/models/VTOSTOControlPoints_model.php +++ b/server/original/www/ezwebserver/src/application/models/VTOSTOControlPoints_model.php @@ -1,7 +1,7 @@ db->select("\x65\62\x5f\x6f\x72\x74\150\x6f\x5f\x76\164\157\163\x74\157\x5f\x63\157\x6e\164\x72\x6f\x6c\x5f\160\157\151\156\164\163\56\157\164\150\137\x76\164\157\163\164\157\x5f\143\x6f\156\164\x72\157\154\137\160\157\x69\156\x74\137\x69\144\54\x6c\x61\156\144\x74\x62\154\x31\56\x6f\x74\150\137\154\141\x6e\x64\155\x61\x72\x6b\x5f\x6e\x61\155\x65\x20\143\x6f\x6e\164\162\157\x6c\156\141\155\145\54\x6c\141\156\144\164\x62\x6c\62\56\x6f\164\x68\137\154\x61\x6e\144\155\141\162\153\137\x6e\141\155\x65\x20\x72\157\x74\141\164\x65\156\x61\155\145\x2c\x6c\x61\x6e\144\x74\x62\154\x33\x2e\157\x74\x68\x5f\154\141\x6e\144\x6d\141\x72\x6b\137\x6e\x61\x6d\145\x20\141\x73\x20\141\x66\x66\x65\x63\145\144\x74\145\144\x5f\156\x61\155\x65\x2c\40\x65\62\137\x6f\x72\x74\150\157\x5f\166\164\x6f\x73\164\157\x5f\141\146\x66\145\143\x74\x65\144\x5f\x6c\141\x6e\144\x6d\141\x72\x6b\163\x2e\157\164\x68\137\166\164\x6f\x73\164\157\x5f\141\146\146\145\x63\x74\145\x64\x5f\x74\171\160\x65\x2c\145\x32\x5f\x6f\162\164\x68\x6f\x5f\166\x74\x6f\163\x74\x6f\x5f\141\x66\146\145\143\x74\x65\144\137\x6c\x61\x6e\x64\x6d\x61\162\x6b\x73\56\157\164\x68\137\x76\x74\157\x73\x74\157\137\x61\146\146\x65\x63\164\x65\144\137\x70\141\x72\x74"); $this->db->from("\145\x32\137\157\162\164\x68\x6f\x5f\x76\x74\x6f\163\164\157\137\143\x6f\156\164\162\x6f\x6c\x5f\x70\157\151\156\x74\163"); $this->db->join("\145\62\137\157\162\x74\150\x6f\137\x6c\x61\x6e\144\155\141\x72\x6b\163\40\x6c\x61\x6e\x64\x74\142\x6c\x31", "\145\62\137\157\x72\164\150\x6f\137\x76\x74\157\163\x74\x6f\x5f\x63\x6f\x6e\164\162\157\154\x5f\160\157\x69\156\x74\163\x2e\157\x74\x68\x5f\x76\164\157\x73\x74\x6f\137\x63\157\x6e\x74\x72\x6f\154\x5f\154\141\x6e\144\155\141\162\153\x5f\x69\144\x20\75\40\x6c\141\156\x64\x74\142\x6c\x31\x2e\157\164\x68\137\x6c\x61\156\144\x6d\x61\x72\153\137\x69\x64"); $this->db->join("\x65\62\137\157\162\x74\150\x6f\x5f\x6c\x61\x6e\x64\155\141\x72\x6b\x73\x20\154\x61\x6e\144\164\142\x6c\x32", "\145\x32\x5f\x6f\x72\164\x68\157\137\166\164\x6f\x73\x74\157\137\x63\x6f\x6e\164\162\x6f\x6c\137\x70\x6f\x69\x6e\x74\163\56\157\x74\150\x5f\166\164\x6f\163\x74\157\137\162\157\x74\141\164\145\137\143\x65\x6e\164\145\x72\137\x6c\x61\156\144\155\141\162\153\137\x69\144\40\x3d\40\154\x61\x6e\144\164\142\x6c\x32\56\157\x74\x68\137\x6c\141\x6e\x64\x6d\x61\162\153\x5f\151\x64"); $this->db->join("\x65\62\137\x6f\x72\x74\150\x6f\x5f\x76\x74\x6f\x73\x74\x6f\137\141\146\146\145\143\x74\145\144\137\154\x61\156\144\x6d\x61\162\153\x73", "\145\62\137\x6f\x72\164\x68\157\137\166\164\157\163\x74\x6f\137\143\157\156\x74\x72\x6f\154\137\x70\157\151\156\x74\x73\56\x6f\164\150\137\166\x74\x6f\x73\164\x6f\x5f\x63\157\x6e\164\x72\157\x6c\137\x70\x6f\151\x6e\x74\x5f\x69\144\40\x3d\x20\145\x32\x5f\x6f\162\164\x68\157\x5f\166\164\x6f\163\164\x6f\x5f\x61\x66\146\x65\x63\x74\145\x64\137\x6c\x61\156\x64\155\x61\162\153\163\x2e\157\x74\x68\137\x76\164\x6f\163\x74\157\x5f\x63\157\156\164\x72\157\x6c\137\x70\x6f\151\156\164\137\151\144", "\154\145\x66\x74"); $this->db->join("\x65\x32\137\x6f\162\x74\150\x6f\137\x6c\x61\156\x64\x6d\141\x72\x6b\163\x20\154\x61\156\144\x74\142\x6c\x33", "\145\x32\137\x6f\162\x74\150\x6f\137\x76\x74\x6f\163\164\x6f\137\x61\x66\x66\x65\x63\164\x65\144\137\x6c\141\156\144\x6d\141\162\x6b\x73\x2e\x6f\x74\150\x5f\x6c\x61\156\144\x6d\x61\x72\x6b\x5f\151\144\x20\75\x20\x6c\x61\156\x64\x74\142\x6c\x33\56\157\x74\150\137\154\141\156\144\x6d\141\162\153\137\x69\144"); $this->db->order_by("\145\62\137\157\162\164\x68\x6f\137\x76\164\157\x73\164\157\x5f\143\x6f\x6e\164\x72\157\154\x5f\160\x6f\151\156\x74\163\56\157\164\x68\137\x76\164\x6f\163\164\x6f\137\x63\x6f\x6e\164\x72\157\x6c\x5f\160\157\x69\156\164\137\x69\144", "\101\x53\x43"); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { if ($point_id !== $row["\157\x74\150\x5f\166\x74\157\x73\164\x6f\137\143\157\156\164\x72\157\154\137\x70\x6f\x69\156\x74\137\151\144"]) { $point_id = $row["\157\x74\x68\x5f\166\x74\x6f\x73\164\157\x5f\x63\x6f\x6e\x74\162\x6f\x6c\137\160\157\151\x6e\164\137\151\x64"]; $sVTOSTOControlPoints = new SVTOSTOControlPoints($row); array_push($items, $sVTOSTOControlPoints); } $sAffectedLandmark = new SAffectedLandmark($row); array_push($sVTOSTOControlPoints->affectedLandmarks, $sAffectedLandmark); } return ["\x65\162\x72\x6f\162\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x76\164\x6f\163\164\x6f\x43\157\x6e\164\162\157\x6c\x50\x6f\x69\156\x74\x73" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/VTOSTOData_model.php b/server/original/www/ezwebserver/src/application/models/VTOSTOData_model.php index 0988eab..b545143 100644 --- a/server/original/www/ezwebserver/src/application/models/VTOSTOData_model.php +++ b/server/original/www/ezwebserver/src/application/models/VTOSTOData_model.php @@ -1,7 +1,7 @@ load->model("\x53\165\x70\145\162\x69\155\x70\157\x73\151\x74\151\157\156\163\x5f\155\157\x64\x65\x6c"); $select_img_modality_sql = $this->Superimpositions_model->getOrthoImageModalityID("\x43\x65\160\150\x61\154\x6f\x5f\114\141\164\145\x72\x61\x6c"); load_database($this, "\x45\62\x44\102"); $this->db->join("\145\x32\137\x6f\162\x74\150\x6f\137\162\145\x63\x6f\x72\144\x73\145\164\x5f\x69\x6d\x61\x67\145\163", "\145\x32\x5f\x6f\x72\x74\x68\x6f\137\x76\x74\x6f\x73\x74\x6f\x5f\144\141\x74\x61\x2e\157\x74\x68\137\162\x65\143\157\162\x64\163\145\x74\x5f\x69\155\147\137\x69\x64\40\x3d\x20\145\x32\x5f\157\162\164\150\157\x5f\x72\145\x63\x6f\x72\144\163\x65\164\137\151\x6d\141\x67\145\163\56\x6f\x74\150\137\x72\x65\x63\157\x72\x64\x73\x65\164\137\151\x6d\141\x67\145\137\x69\144"); $this->db->join("\145\x32\137\157\162\x74\x68\157\x5f\x72\145\143\157\x72\144\x73\145\x74\163", "\145\62\137\157\x72\164\150\x6f\x5f\162\x65\143\157\162\144\x73\145\164\x73\x2e\x6f\164\150\137\162\x65\143\x6f\x72\x64\163\145\x74\137\x69\x64\x20\75\x20\x65\62\x5f\x6f\x72\164\150\x6f\137\x72\145\x63\157\x72\x64\163\x65\x74\x5f\151\x6d\x61\147\x65\163\x2e\157\164\150\137\x72\x65\143\157\x72\x64\x73\x65\164\137\x69\144"); $this->db->join("\145\x32\137\x70\x61\164", "\145\62\137\x70\x61\164\56\x70\141\164\x5f\x69\x64\40\x3d\x20\145\62\137\157\x72\164\150\157\137\162\x65\x63\x6f\162\x64\x73\145\164\x73\x2e\160\x61\x74\x5f\x69\144"); $this->db->where("\145\62\x5f\x6f\162\164\x68\157\137\x72\x65\x63\x6f\x72\x64\163\145\x74\137\151\155\141\147\145\163\x2e\157\x74\x68\137\x69\x6d\x67\x5f\155\157\x64\141\x6c\151\x74\x79\137\151\144", $select_img_modality_sql); $this->db->where("\x65\x32\x5f\x70\141\164\x2e\x70\x61\164\x5f\x63\x68\141\162\x74\156\x6f", $sVTOSTOData->chartNo); $this->db->where("\x65\x32\x5f\x6f\x72\x74\x68\x6f\137\x72\145\143\157\x72\144\x73\x65\x74\x73\56\157\164\150\137\162\145\x63\157\x72\144\x73\x65\164\137\x63\162\x65\141\164\145\144\137\x64\141\x74\145", $sVTOSTOData->createdDate); $this->db->where("\x65\62\x5f\x6f\162\164\x68\x6f\137\162\x65\143\157\162\x64\163\x65\x74\163\x2e\x6f\x74\150\137\x72\x65\x63\157\x72\144\163\145\164\x5f\x73\x65\x71\x5f\x6e\x6f", $sVTOSTOData->seqNo); $this->db->where("\x65\x32\x5f\157\x72\164\x68\x6f\x5f\x76\164\x6f\x73\x74\x6f\137\x64\141\x74\x61\x2e\x6f\x74\150\137\166\164\x6f\163\164\157\137\144\141\164\x61\x5f\156\141\x6d\x65", $sVTOSTOData->newName); $q = $this->db->get("\145\62\x5f\x6f\162\x74\x68\x6f\137\166\164\x6f\163\x74\157\x5f\x64\141\164\141"); $this->db->reset_query(); if ($q->num_rows() > 0) { return createResponse(VERR_DB_OVERLAP); } $this->db->select("\157\x74\150\137\x72\145\143\x6f\x72\x64\163\x65\164\x5f\151\x6d\141\x67\145\137\151\144"); $this->db->join("\145\62\x5f\157\162\x74\150\157\137\x72\145\143\157\x72\x64\163\x65\x74\x73", "\x65\62\x5f\x6f\162\x74\x68\x6f\x5f\162\145\x63\x6f\x72\x64\163\145\x74\163\x2e\157\x74\x68\137\162\145\143\157\162\x64\163\x65\x74\137\x69\x64\40\x3d\x20\x65\62\x5f\x6f\x72\x74\150\157\137\162\145\143\157\162\x64\x73\x65\164\137\151\x6d\141\x67\x65\x73\x2e\157\164\x68\x5f\162\x65\143\157\162\144\x73\x65\164\137\151\144"); $this->db->join("\x65\x32\137\x70\141\164", "\145\x32\x5f\x70\x61\x74\56\x70\x61\x74\x5f\151\x64\x3d\x65\62\x5f\x6f\x72\x74\x68\157\x5f\x72\x65\x63\157\162\144\163\x65\x74\x73\56\x70\141\x74\x5f\151\x64"); $this->db->where("\x65\x32\137\x6f\x72\x74\x68\157\137\x72\x65\x63\x6f\x72\144\163\145\164\x5f\x69\155\141\x67\x65\163\56\x6f\164\150\x5f\x69\x6d\147\x5f\x6d\x6f\144\141\154\151\164\x79\x5f\151\x64", $select_img_modality_sql); $this->db->where("\145\x32\x5f\x70\x61\164\56\160\141\164\x5f\x63\x68\x61\x72\164\x6e\x6f", $sVTOSTOData->chartNo); $this->db->where("\x6f\x74\150\137\x72\x65\143\x6f\162\144\x73\x65\x74\x5f\143\x72\145\141\x74\x65\144\137\x64\x61\x74\145", $sVTOSTOData->createdDate); $this->db->where("\157\x74\x68\x5f\162\x65\143\x6f\162\x64\x73\x65\x74\137\163\145\161\137\x6e\157", $sVTOSTOData->seqNo); $select_recordsetimgid = $this->db->get_compiled_select("\145\62\137\x6f\162\164\x68\157\x5f\162\145\x63\157\162\144\163\145\x74\137\151\155\x61\147\x65\163"); $current_date = currentDateFormat(DATEFORMAT_DATABASE); $this->db->set("\x6f\164\x68\137\x72\145\x63\x6f\162\144\x73\x65\x74\x5f\151\x6d\x67\137\x69\x64", "\50{$select_recordsetimgid}\x29", FALSE); $this->db->set("\x6f\164\150\137\166\x74\157\x73\164\157\137\x64\141\164\x61\x5f\x6e\141\x6d\x65", $sVTOSTOData->newName); $this->db->set("\x6f\164\x68\137\x76\164\157\x73\164\157\137\144\141\164\141\137\x63\162\145\141\x74\x65\x64\x5f\x64\x61\x74\x65\x74\x69\x6d\145", $sVTOSTOData->createdDate); $this->db->set("\157\164\x68\x5f\166\164\157\x73\164\x6f\x5f\144\141\x74\x61\x5f\x75\160\144\x61\164\145\x64\137\x64\141\x74\145\x74\151\155\145", $current_date); $this->db->insert("\145\62\x5f\x6f\162\x74\150\157\137\166\164\157\x73\164\x6f\x5f\144\141\164\x61"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_INVALIDDATA); } } public function put_VTOSTOData($sVTOSTOData) { load_database($this, "\x45\62\x44\x42"); $this->db->select("\x6f\x74\x68\137\162\145\143\x6f\162\144\163\x65\x74\137\x69\x6d\x61\147\x65\137\x69\144"); $this->db->join("\x65\x32\x5f\157\162\164\150\157\x5f\162\x65\x63\x6f\x72\144\163\145\x74\163", "\x65\62\137\x6f\162\x74\150\x6f\137\162\145\x63\157\x72\144\x73\x65\x74\163\x2e\x6f\164\x68\x5f\162\x65\143\x6f\162\x64\163\x65\x74\137\x69\x64\40\75\40\145\62\137\x6f\x72\164\150\157\x5f\x72\x65\143\157\162\x64\163\145\x74\x5f\151\x6d\141\147\x65\x73\x2e\x6f\x74\150\x5f\x72\x65\143\157\162\144\163\145\164\137\x69\144"); $this->db->join("\145\62\137\160\x61\164", "\x65\62\137\160\x61\x74\56\x70\141\164\x5f\x69\144\75\x65\x32\137\157\x72\164\150\157\137\162\145\x63\157\162\x64\163\x65\x74\x73\x2e\160\141\x74\137\x69\144"); $this->db->join("\x65\x32\137\x6f\162\x74\150\157\x5f\151\155\141\147\x65\x5f\155\x6f\x64\141\154\x69\x74\151\145\x73", "\x65\62\137\157\x72\x74\150\x6f\x5f\x69\x6d\x61\147\145\x5f\x6d\157\144\x61\x6c\x69\164\x69\145\163\x2e\x6f\164\x68\137\x69\x6d\x67\x5f\x6d\157\x64\141\x6c\151\164\171\x5f\151\x64\40\x3d\40\145\x32\x5f\x6f\162\164\x68\x6f\x5f\162\145\143\x6f\x72\x64\x73\x65\164\137\x69\155\141\147\x65\x73\56\157\164\150\137\x69\155\x67\x5f\x6d\x6f\x64\x61\154\151\164\171\x5f\x69\x64"); $this->db->where("\145\x32\137\x70\141\x74\x2e\160\x61\164\x5f\x63\150\x61\162\x74\156\x6f", $sVTOSTOData->chartNo); $this->db->where("\x6f\164\x68\x5f\x72\x65\x63\x6f\162\144\x73\x65\164\x5f\143\162\x65\x61\x74\145\144\137\144\x61\x74\145", $sVTOSTOData->createdDate); $this->db->where("\x6f\164\x68\137\x72\145\143\157\x72\144\163\145\164\137\x73\145\161\137\x6e\x6f", $sVTOSTOData->seqNo); $select_recordsetimgid = $this->db->get_compiled_select("\x65\62\x5f\157\x72\164\150\157\137\x72\145\x63\x6f\162\144\163\145\x74\x5f\x69\x6d\x61\x67\145\163"); $this->db->set("\157\164\150\137\166\x74\157\x73\x74\157\137\144\x61\x74\141\x5f\x6e\141\x6d\145", $sVTOSTOData->newName); $this->db->set("\x6f\164\150\x5f\x76\164\x6f\x73\x74\157\x5f\144\141\x74\141\x5f\165\x70\144\x61\x74\x65\144\137\x64\x61\164\x65\x74\151\x6d\x65", currentDateFormat(DATEFORMAT_DATABASE)); $this->db->where_in("\157\164\x68\x5f\162\x65\143\x6f\x72\x64\163\x65\x74\137\151\155\147\137\151\144", $select_recordsetimgid, FALSE); $this->db->where("\157\164\150\x5f\x76\164\157\163\164\157\137\x64\141\164\x61\x5f\156\141\x6d\x65", $sVTOSTOData->oldName); $this->db->update("\x65\x32\137\157\162\x74\x68\157\137\166\x74\157\163\164\x6f\x5f\x64\x61\x74\x61"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } public function delete_VTOSTOData($chartno, $createddate, $seqno, $dataname) { load_database($this, "\105\x32\x44\x42"); $recordsetCreateddate = currentDateFormat(DATEFORMAT_DATABASE, $createddate); $this->db->select("\157\x74\x68\137\162\145\143\157\x72\144\163\x65\164\137\x69\155\x61\x67\x65\137\x69\x64"); $this->db->join("\x65\x32\137\157\x72\164\x68\x6f\137\x72\145\x63\x6f\x72\144\163\145\x74\x73", "\145\62\137\157\162\164\150\x6f\x5f\x72\x65\x63\157\162\x64\x73\x65\164\163\56\x6f\x74\x68\x5f\x72\x65\143\157\x72\x64\x73\145\164\x5f\151\144\40\75\x20\145\x32\x5f\157\162\164\x68\x6f\x5f\162\x65\143\157\162\x64\x73\145\164\137\151\x6d\141\x67\x65\x73\x2e\x6f\x74\x68\x5f\x72\x65\x63\x6f\162\x64\163\x65\164\x5f\x69\144"); $this->db->join("\145\62\137\160\141\164", "\x65\x32\137\160\141\x74\x2e\160\141\164\x5f\151\x64\x3d\145\x32\x5f\x6f\162\x74\150\x6f\x5f\x72\145\x63\x6f\162\x64\x73\145\x74\x73\x2e\160\141\x74\x5f\151\144"); $this->db->join("\145\62\137\x6f\162\x74\150\x6f\137\x69\x6d\x61\147\x65\137\x6d\x6f\x64\x61\x6c\151\164\151\x65\163", "\145\x32\137\157\x72\x74\x68\157\x5f\151\155\x61\147\x65\137\x6d\x6f\x64\x61\154\x69\x74\151\x65\x73\56\x6f\x74\x68\x5f\x69\155\x67\137\x6d\157\x64\141\x6c\151\x74\x79\x5f\151\x64\40\x3d\x20\x65\62\137\x6f\162\164\150\x6f\x5f\x72\145\x63\157\x72\x64\163\145\x74\x5f\151\155\141\x67\x65\x73\x2e\157\164\x68\137\x69\155\x67\137\x6d\157\x64\x61\x6c\151\x74\171\137\x69\x64"); $this->db->where("\145\62\137\x70\x61\164\x2e\160\141\164\x5f\x63\150\141\162\x74\156\157", $chartno); $this->db->where("\x6f\x74\150\x5f\x72\145\143\157\162\x64\x73\x65\x74\137\143\x72\x65\x61\164\145\144\x5f\x64\x61\164\145", $recordsetCreateddate); $this->db->where("\x6f\x74\150\137\x72\x65\x63\x6f\x72\144\163\145\164\137\x73\x65\161\x5f\156\x6f", $seqno); $select_recordsetimgid = $this->db->get_compiled_select("\145\x32\x5f\x6f\x72\164\x68\x6f\x5f\x72\x65\x63\x6f\x72\144\x73\145\164\137\x69\155\x61\x67\145\163"); $this->db->where_in("\157\x74\x68\137\162\x65\x63\157\x72\x64\163\x65\164\137\151\x6d\x67\137\x69\144", "\x28{$select_recordsetimgid}\x29", FALSE); $this->db->where("\157\x74\x68\137\166\164\157\x73\164\x6f\137\144\141\x74\x61\137\156\x61\x6d\145", $dataname); $this->db->delete("\145\62\137\x6f\x72\x74\150\157\x5f\x76\164\157\x73\x74\157\x5f\144\x61\164\x61"); if ($this->db->affected_rows() > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { vt_loge(__METHOD__ . "\72" . "\116\x6f\x20\x56\124\117\x53\x54\x4f\40\104\x61\164\x61\x20\144\x65\x6c\x65\164\145\144\x3a\x20\x63\x68\141\x72\x74\x6e\157\x3d" . $chartno . "\x2c\163\145\x71\156\157\75" . $seqno . "\54\144\x61\x74\141\x6e\x61\x6d\145\75" . $dataname . "\54\x63\x72\145\x61\164\145\x64\141\x74\145\75" . $createddate); return createResponse(VERR_DB_NOSUCHDATA); } } public function get_VTOSTOData($chartno, $createddate, $seqno) { load_database($this, "\x45\x32\x44\x42"); $recordsetCreateddate = currentDateFormat(DATEFORMAT_DATABASE, $createddate); $this->db->distinct(); $this->db->select("\145\x32\137\x6f\162\164\150\157\x5f\166\x74\x6f\x73\164\157\137\x64\x61\x74\141\56\157\164\150\x5f\x76\x74\x6f\163\164\157\137\144\141\x74\141\137\156\x61\155\145\x2c\x65\x32\137\x6f\x72\x74\150\x6f\137\x76\164\157\163\x74\x6f\x5f\x64\x61\164\141\56\157\x74\x68\137\166\164\x6f\163\164\x6f\x5f\144\141\x74\x61\137\x63\x72\145\x61\x74\145\x64\x5f\144\x61\x74\145\x74\x69\155\x65\x2c\x65\x32\x5f\157\x72\164\150\x6f\x5f\x76\164\157\163\164\157\137\144\x61\x74\x61\x2e\x6f\x74\x68\137\x76\x74\x6f\x73\x74\x6f\x5f\x64\x61\164\x61\137\x75\x70\144\141\164\145\x64\x5f\144\141\x74\x65\x74\151\x6d\145"); $this->db->from("\x65\62\x5f\157\162\164\150\x6f\137\166\164\157\x73\164\157\x5f\x64\x61\x74\141"); $this->db->join("\145\62\x5f\x6f\162\x74\x68\157\x5f\x72\145\x63\x6f\x72\144\163\145\x74\x5f\151\x6d\x61\x67\145\163", "\145\62\137\x6f\162\164\150\x6f\137\x76\164\x6f\x73\164\x6f\x5f\144\x61\164\141\x2e\157\164\x68\137\162\x65\x63\157\x72\x64\x73\x65\164\x5f\151\x6d\x67\137\151\x64\x20\x3d\x20\145\62\x5f\157\162\164\150\157\x5f\x72\145\143\157\x72\x64\x73\x65\x74\x5f\151\x6d\x61\x67\145\163\x2e\157\x74\150\137\162\x65\143\157\x72\x64\x73\145\x74\137\x69\x6d\141\147\145\137\x69\x64"); $this->db->join("\x65\x32\x5f\x6f\162\164\x68\x6f\137\162\145\143\x6f\x72\144\x73\x65\164\x73", "\x65\x32\x5f\x6f\x72\x74\x68\157\137\x72\145\143\x6f\162\144\x73\x65\x74\163\x2e\157\x74\150\137\x72\x65\x63\157\x72\x64\163\145\164\x5f\151\144\x20\x3d\x20\x65\62\137\157\162\164\x68\x6f\x5f\162\145\143\x6f\162\x64\x73\145\x74\x5f\x69\155\141\x67\145\x73\x2e\157\x74\x68\x5f\162\145\143\x6f\162\144\163\145\x74\x5f\151\x64"); $this->db->join("\x65\x32\x5f\160\x61\x74", "\145\x32\137\160\x61\164\x2e\x70\141\164\x5f\151\x64\40\x3d\x20\x65\62\137\x6f\162\x74\150\x6f\x5f\x72\145\143\157\162\x64\163\145\164\163\x2e\160\x61\x74\x5f\x69\144"); $this->db->where("\145\62\137\x70\141\164\x2e\x70\x61\x74\x5f\x63\x68\x61\x72\x74\x6e\157", $chartno); $this->db->where("\145\62\x5f\157\162\164\150\x6f\x5f\x72\145\143\x6f\x72\x64\x73\x65\x74\x73\x2e\x6f\x74\x68\x5f\162\145\143\x6f\162\144\163\145\x74\x5f\x63\162\x65\x61\164\x65\x64\137\144\x61\164\x65", $recordsetCreateddate); $this->db->where("\x65\x32\137\x6f\162\164\150\157\137\162\145\x63\157\162\144\163\x65\164\163\56\x6f\x74\150\137\x72\x65\143\x6f\x72\144\x73\145\x74\x5f\x73\145\x71\x5f\x6e\157", $seqno); $result = $this->db->get()->result_array(); if (count($result) > 0) { $items = array(); foreach ($result as $row) { $sVTOSTOSimulationStep = new SVTOSTOSimulationStep($row); array_push($items, $sVTOSTOSimulationStep); } return ["\145\x72\x72\x6f\x72\x43\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\166\164\157\163\164\157\x44\x61\164\x61" => $items]; } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/VTOSTOSettings_model.php b/server/original/www/ezwebserver/src/application/models/VTOSTOSettings_model.php index 72f6619..9454ca4 100644 --- a/server/original/www/ezwebserver/src/application/models/VTOSTOSettings_model.php +++ b/server/original/www/ezwebserver/src/application/models/VTOSTOSettings_model.php @@ -1,7 +1,7 @@ db->select("\x65\x32\x5f\x6f\x72\164\150\x6f\137\x72\x61\143\x65\x2e\x6f\x74\x68\137\x72\x61\x63\x65\137\156\141\x6d\145\54\x65\62\x5f\157\x72\x74\150\157\137\162\x61\143\x65\x2e\157\x74\150\x5f\162\x61\x63\x65\137\x6c\141\142\x65\154\x2c\x6f\x74\150\137\x63\154\x61\163\163\x5f\x6e\x61\155\x65\x2c\145\x32\x5f\157\162\x74\150\x6f\137\154\141\x6e\x64\155\x61\162\153\163\56\x6f\164\150\x5f\x6c\x61\156\x64\x6d\x61\162\x6b\x5f\x6e\141\155\145\54\145\62\137\157\x72\164\150\157\x5f\x6c\x61\156\144\x6d\x61\162\153\x73\x2e\157\164\150\x5f\x6c\x61\156\x64\155\x61\162\153\x5f\154\x61\x62\x65\x6c\x2c\x73\146\154\141\156\144\x6d\141\x72\x6b\x73\x2e\x6f\x74\x68\x5f\x6c\x61\x6e\144\x6d\x61\162\x6b\137\x6e\x61\155\x65\40\141\x73\40\x73\146\x74\114\x61\156\144\155\141\x72\x6b\116\141\x6d\x65\x2c\x73\x66\x6c\141\x6e\x64\155\x61\162\153\x73\56\x6f\x74\150\137\154\141\156\x64\155\141\162\153\137\154\x61\142\145\154\40\141\163\40\x73\x66\x74\114\x61\x6e\x64\155\141\x72\x6b\114\x61\x62\x65\x6c\40\54\157\x74\150\x5f\163\157\x66\164\x74\x69\163\x73\x75\145\137\x6d\x6f\166\145\x6d\145\156\164\137\170\54\157\x74\150\x5f\163\157\x66\164\164\x69\163\163\165\145\137\155\157\166\145\155\x65\x6e\164\x5f\x79\x2c\x6f\164\x68\x5f\163\x6f\x66\164\x74\x69\163\163\x75\x65\x5f\x6d\x6f\166\x65\x6d\x65\x6e\164\x5f\x75\163\145\x72\x5f\165\x70\x64\x61\164\145\144"); $this->db->from("\145\62\x5f\157\162\x74\x68\x6f\x5f\163\x6f\x66\164\x74\x69\163\x73\x75\x65\137\155\x6f\166\145\x6d\145\156\164\x5f\x73\x65\x74\164\151\156\x67\163"); $this->db->join("\x65\x32\x5f\x6f\162\x74\x68\157\137\x72\x61\x63\145", "\x65\x32\137\157\162\x74\x68\x6f\137\162\141\143\145\x2e\x6f\164\150\137\162\x61\143\x65\x5f\x69\x64\x20\75\x20\145\62\137\x6f\162\164\150\157\137\x73\157\146\164\164\151\163\163\165\145\137\x6d\157\166\145\155\x65\156\164\137\163\x65\x74\164\x69\x6e\x67\163\56\x6f\x74\150\137\162\141\143\145\x5f\x69\144", "\x6c\x65\x66\164"); $this->db->join("\145\62\x5f\x6f\x72\164\x68\157\137\x63\154\141\163\x73\x69\146\x69\x63\x61\164\x69\157\x6e", "\145\x32\137\x6f\x72\x74\150\157\x5f\143\x6c\x61\x73\163\x69\x66\151\x63\141\164\151\x6f\156\56\x6f\164\x68\x5f\143\154\141\163\x73\137\x69\144\40\75\40\145\62\x5f\x6f\162\x74\x68\x6f\137\x73\x6f\146\164\x74\151\x73\163\x75\145\x5f\x6d\x6f\166\145\155\145\x6e\164\x5f\163\145\x74\x74\151\156\x67\163\x2e\157\164\x68\137\x63\154\141\163\163\137\x69\x64"); $this->db->join("\145\x32\x5f\157\162\x74\150\157\137\166\x74\x6f\x73\164\x6f\137\143\x6f\156\x74\162\x6f\154\137\160\157\x69\x6e\x74\x73", "\x65\62\x5f\x6f\x72\164\150\157\x5f\x76\164\x6f\163\x74\x6f\137\x63\x6f\x6e\x74\162\x6f\154\x5f\160\x6f\x69\156\x74\x73\x2e\157\164\x68\137\166\x74\x6f\163\164\157\x5f\143\x6f\x6e\x74\x72\x6f\x6c\x5f\x70\157\151\156\164\x5f\151\x64\x20\75\x20\145\x32\137\x6f\162\164\150\x6f\x5f\x73\x6f\146\x74\x74\x69\163\163\165\x65\x5f\155\157\166\x65\155\x65\x6e\164\x5f\x73\x65\x74\x74\151\156\x67\163\x2e\157\164\150\137\x76\164\x6f\x73\164\157\x5f\x63\157\156\x74\x72\x6f\x6c\137\x70\157\x69\x6e\164\x5f\x69\144"); $this->db->join("\x65\62\x5f\157\162\164\150\x6f\x5f\154\141\x6e\144\x6d\x61\162\153\163", "\x65\62\x5f\157\x72\164\x68\157\x5f\x6c\141\156\x64\155\141\x72\x6b\163\56\157\x74\150\137\154\141\156\144\155\x61\x72\x6b\137\151\144\x20\x3d\x20\x65\x32\137\157\x72\x74\150\x6f\x5f\x76\164\157\163\x74\x6f\x5f\x63\x6f\156\x74\x72\157\x6c\137\x70\x6f\x69\x6e\x74\x73\56\157\164\150\137\166\164\157\x73\x74\157\x5f\x63\157\156\164\162\157\x6c\x5f\x6c\141\x6e\x64\x6d\x61\x72\153\x5f\151\x64"); $this->db->join("\145\x32\137\157\x72\164\x68\157\x5f\154\141\156\x64\x6d\141\x72\153\163\x20\163\146\154\141\x6e\x64\x6d\x61\x72\x6b\163", "\x73\x66\154\x61\x6e\x64\x6d\x61\x72\153\x73\56\157\x74\150\137\x6c\141\156\x64\155\141\x72\153\137\151\144\40\x3d\x20\145\x32\x5f\157\162\x74\150\x6f\x5f\163\x6f\146\x74\x74\x69\x73\163\x75\145\137\x6d\157\x76\x65\155\145\x6e\164\137\x73\x65\164\x74\x69\x6e\x67\163\56\x6f\164\x68\137\x73\157\x66\x74\164\151\163\163\165\145\137\x6c\x61\156\144\155\x61\x72\x6b\x5f\x69\x64"); $this->db->order_by("\145\x32\x5f\x6f\162\164\x68\x6f\137\x73\x6f\146\x74\x74\151\x73\x73\165\x65\137\155\157\x76\x65\155\145\x6e\164\137\x73\x65\164\164\x69\x6e\147\163\56\x6f\x74\150\x5f\x63\154\x61\163\x73\137\x69\144\x20\x41\123\x43\x2c\x20\145\x32\x5f\x6f\162\x74\150\157\137\x73\157\x66\164\x74\x69\x73\163\x75\x65\137\x6d\157\x76\x65\155\145\156\x74\x5f\163\x65\164\164\x69\156\147\163\56\157\164\150\x5f\166\x74\157\163\164\157\137\x63\157\156\164\162\x6f\x6c\137\160\157\x69\x6e\x74\x5f\151\x64\x20\101\123\x43\x20\54\40\163\146\154\141\156\x64\x6d\x61\162\x6b\163\56\157\x74\x68\x5f\154\141\x6e\x64\155\x61\x72\x6b\137\151\144\40\x41\123\x43"); $result = $this->db->get()->result_array(); $items = array(); if (count($result) > 0) { foreach ($result as $row) { if (!isset($sVTOSTOSetting) || $sVTOSTOSetting->raceName != strval($row["\x6f\164\150\x5f\x72\x61\143\145\x5f\x6e\141\155\145"]) || $sVTOSTOSetting->className != $row["\x6f\164\150\137\x63\154\x61\x73\163\x5f\x6e\x61\155\x65"] || $sVTOSTOSetting->landmarkName != $row["\x6f\x74\150\137\154\141\x6e\x64\x6d\x61\x72\153\x5f\x6e\x61\x6d\145"]) { $sVTOSTOSetting = SVTOSTOSetting::createFromDBRecord($row); array_push($items, $sVTOSTOSetting); } $sSoftTissueLandmarkMovements = SSoftTissueLandmarkMovements::createFromDBRecord($row); array_push($sVTOSTOSetting->softTissueLandmarkMovements, $sSoftTissueLandmarkMovements); } return ["\x65\x72\x72\x6f\x72\x43\157\x64\x65" => VERR_COMMON_SUCCESS, "\x76\x74\157\x73\x74\x6f\123\145\x74\x74\x69\156\x67\x73" => $items]; } return createResponse(VERR_DB_NOSUCHDATA); } public function put_VTOSTOSettings($raceName, $className, $landmarkName, $softTissueLandmarkMovements) { load_database($this, "\105\62\x44\x42"); $this->db->select("\145\62\x5f\157\162\x74\150\x6f\x5f\163\157\146\x74\164\151\x73\163\165\x65\137\x6d\157\x76\x65\x6d\145\x6e\x74\137\163\x65\x74\164\x69\156\147\163\56\157\x74\x68\x5f\x72\x61\143\x65\137\x69\144\54\x65\x32\137\157\x72\164\x68\157\137\x73\157\146\164\x74\151\x73\x73\x75\145\x5f\155\157\166\145\x6d\x65\x6e\164\137\x73\x65\164\164\x69\x6e\147\x73\x2e\x6f\x74\x68\137\143\154\x61\163\163\x5f\x69\x64\54\x65\62\137\157\x72\164\x68\x6f\x5f\163\x6f\146\x74\164\151\163\x73\165\145\x5f\x6d\x6f\x76\145\155\145\156\x74\x5f\x73\x65\164\164\151\156\147\x73\56\x6f\164\x68\137\166\x74\157\163\164\157\x5f\x63\x6f\156\x74\x72\x6f\x6c\x5f\x70\x6f\151\x6e\x74\x5f\x69\144"); $this->db->from("\x65\x32\137\157\x72\x74\x68\157\137\x73\x6f\146\164\164\151\x73\x73\165\x65\137\x6d\157\166\x65\155\x65\156\164\137\163\145\x74\x74\151\x6e\x67\x73"); $this->db->join("\145\62\x5f\x6f\162\x74\x68\157\137\143\154\x61\x73\x73\x69\146\151\143\x61\x74\151\157\156", "\145\62\137\157\x72\164\x68\x6f\137\143\154\x61\x73\163\151\146\x69\143\x61\164\151\x6f\156\x2e\157\164\150\137\x63\x6c\141\x73\163\x5f\151\x64\40\x3d\x20\x65\62\x5f\x6f\x72\164\150\x6f\x5f\163\x6f\x66\164\x74\x69\x73\x73\x75\x65\x5f\155\x6f\x76\x65\x6d\x65\156\x74\137\x73\145\164\x74\x69\x6e\147\x73\x2e\x6f\x74\150\137\x63\x6c\x61\x73\x73\137\151\144"); $this->db->join("\145\x32\x5f\x6f\x72\x74\x68\157\137\166\x74\x6f\x73\164\x6f\x5f\x63\x6f\x6e\x74\162\157\x6c\x5f\x70\x6f\151\156\164\x73", "\145\62\137\x6f\x72\164\150\x6f\137\x76\164\157\163\164\x6f\137\143\157\156\x74\162\x6f\x6c\137\160\157\151\x6e\164\x73\56\x6f\164\x68\x5f\x76\x74\x6f\x73\164\x6f\137\143\157\156\x74\x72\157\x6c\137\x70\x6f\x69\x6e\x74\137\x69\144\40\x3d\x20\x65\x32\x5f\157\162\164\x68\x6f\x5f\163\157\146\164\164\151\163\163\x75\x65\x5f\x6d\x6f\x76\145\x6d\145\x6e\164\137\163\x65\x74\x74\151\x6e\x67\x73\56\x6f\164\x68\x5f\166\x74\157\163\164\157\137\x63\x6f\x6e\x74\x72\x6f\x6c\x5f\x70\x6f\151\156\164\137\151\x64"); $this->db->join("\x65\x32\x5f\x6f\162\x74\150\157\137\x6c\141\x6e\144\155\141\162\153\x73", "\x65\x32\137\157\162\x74\x68\157\137\154\x61\156\144\155\141\x72\x6b\163\x2e\x6f\164\150\137\154\x61\156\144\155\x61\162\x6b\x5f\x69\144\x20\75\x20\145\62\137\x6f\162\x74\x68\x6f\137\166\x74\157\163\164\x6f\137\x63\157\x6e\x74\x72\x6f\154\x5f\x70\157\x69\x6e\164\x73\x2e\157\164\x68\137\166\x74\157\x73\164\157\137\x63\x6f\156\164\162\x6f\x6c\137\x6c\x61\x6e\x64\155\141\x72\x6b\137\151\144"); if (isset($raceName) && !empty($raceName)) { $this->db->join("\x65\62\137\157\162\164\x68\x6f\137\162\141\143\x65", "\145\x32\x5f\x6f\162\164\x68\x6f\x5f\162\141\143\145\56\x6f\164\150\137\x72\141\x63\145\x5f\151\144\x20\75\x20\145\62\x5f\157\x72\164\x68\x6f\137\163\157\146\x74\x74\151\x73\163\165\145\137\155\x6f\x76\145\155\x65\156\x74\x5f\x73\145\164\164\x69\156\x67\163\56\157\x74\150\x5f\x72\x61\143\x65\137\x69\144", "\154\145\x66\164"); $this->db->where("\x6c\x6f\167\x65\162\50\145\x32\137\x6f\162\164\x68\x6f\137\162\x61\x63\x65\x2e\157\164\x68\137\162\x61\x63\145\137\x6e\x61\155\145\x29", strtolower($raceName)); } else { $this->db->where("\x65\x32\137\x6f\162\x74\x68\157\137\163\x6f\x66\164\164\x69\x73\x73\165\145\137\155\x6f\166\145\x6d\145\156\164\137\163\145\164\x74\x69\156\147\x73\x2e\x6f\x74\150\x5f\x72\x61\143\145\137\151\144"); } $this->db->where("\154\x6f\167\145\x72\x28\x65\x32\x5f\157\x72\164\x68\x6f\x5f\x63\x6c\141\163\163\151\x66\151\143\141\x74\151\x6f\156\56\157\x74\150\x5f\143\154\x61\x73\163\x5f\x6e\141\x6d\145\x29", strtolower($className)); $this->db->where("\x6c\157\167\145\x72\50\145\62\137\x6f\162\164\150\157\x5f\x6c\141\156\x64\155\141\162\153\x73\x2e\x6f\x74\x68\137\x6c\x61\156\144\x6d\141\162\x6b\x5f\156\141\x6d\x65\51", strtolower($landmarkName)); $this->db->limit(1); $row = $this->db->get()->row(); if (isset($row) == FALSE) { return createResponse(VERR_DB_NOSUCHDATA); } $race_id = $row->oth_race_id; $class_id = $row->oth_class_id; $vtosto_control_point_id = $row->oth_vtosto_control_point_id; $db_debug = $this->db->db_debug; $this->db->db_debug = FALSE; $affected_row = 0; $this->db->trans_begin(); foreach ($softTissueLandmarkMovements as $data) { $sftLandmarkName = $data["\x6e\141\155\x65"]; if (isset($sftLandmarkName)) { $this->db->where("\154\157\167\x65\162\x28\157\164\x68\x5f\154\x61\x6e\x64\x6d\x61\162\153\137\156\x61\x6d\x65\x29", strtolower($sftLandmarkName)); $this->db->where("\157\x74\150\x5f\x73\157\x66\x74\x74\x69\x73\163\x75\145\x5f\154\x61\156\x64\155\x61\162\153\x5f\151\144", "\157\x74\150\x5f\x6c\x61\156\x64\155\x61\x72\x6b\x5f\151\x64", FALSE); $select_sftLandmarkid = $this->db->get_compiled_select("\x65\x32\137\x6f\x72\164\150\157\x5f\154\141\x6e\x64\155\141\x72\x6b\163"); $X = doubleval($data["\x78"]); $Y = doubleval($data["\171"]); $this->db->set("\157\164\x68\137\163\x6f\146\x74\x74\151\163\163\x75\x65\137\x6d\x6f\166\x65\x6d\145\x6e\164\x5f\170", $X); $this->db->set("\157\x74\x68\x5f\x73\157\x66\164\164\151\163\163\x75\145\x5f\155\157\166\145\155\145\156\164\x5f\x79", $Y); if (!isset($data["\165\x73\145\x72\125\160\144\x61\164\145\144"]) || empty($data["\x75\163\145\x72\125\x70\144\x61\164\145\144"]) && $data["\x75\163\145\162\125\160\144\141\164\x65\x64"] != false) { $userUpdated = true; } else { $userUpdated = $data["\165\163\x65\162\x55\x70\x64\141\x74\145\x64"]; } $this->db->set("\157\x74\x68\137\x73\x6f\146\x74\x74\x69\x73\x73\x75\145\137\x6d\157\x76\145\x6d\145\x6e\x74\137\x75\163\145\162\x5f\x75\160\x64\x61\x74\145\144", $userUpdated); if (isset($race_id)) { $this->db->where("\x6f\x74\x68\x5f\162\141\x63\x65\x5f\x69\144", $race_id); } else { $this->db->where("\157\164\x68\x5f\162\141\143\x65\x5f\x69\144"); } $this->db->where("\157\x74\150\x5f\143\x6c\x61\163\163\137\151\144", $class_id); $this->db->where("\157\x74\x68\137\166\164\157\x73\164\157\x5f\x63\x6f\156\x74\x72\x6f\154\x5f\160\x6f\151\x6e\x74\137\151\x64", $vtosto_control_point_id); $this->db->where("\145\170\151\x73\164\163\x28{$select_sftLandmarkid}\x29", NULL, FALSE); $this->db->update("\x65\x32\x5f\157\162\x74\x68\x6f\137\163\x6f\x66\x74\164\151\x73\x73\x75\x65\137\x6d\157\x76\145\155\x65\156\164\x5f\163\x65\x74\x74\x69\x6e\x67\x73"); $affected_row = $this->db->affected_rows(); if ($affected_row == 0) { break; } } else { $affected_row = 0; break; } } if ($affected_row == 0 || $this->db->trans_status() == FALSE) { $affected_row = 0; $this->db->trans_rollback(); } else { $this->db->trans_commit(); } $this->db->db_debug = $db_debug; if ($affected_row > 0) { return createResponse(VERR_COMMON_SUCCESS); } else { return createResponse(VERR_DB_NOSUCHDATA); } } } diff --git a/server/original/www/ezwebserver/src/application/models/Version.php b/server/original/www/ezwebserver/src/application/models/Version.php index fe13313..a3ab2c2 100644 --- a/server/original/www/ezwebserver/src/application/models/Version.php +++ b/server/original/www/ezwebserver/src/application/models/Version.php @@ -1,7 +1,7 @@ name = $name; $this->url = $url; $this->supportStatus = $supportStatus; } } diff --git a/server/original/www/ezwebserver/src/application/models/Versions_model.php b/server/original/www/ezwebserver/src/application/models/Versions_model.php index 7cf7cd0..55041c5 100644 --- a/server/original/www/ezwebserver/src/application/models/Versions_model.php +++ b/server/original/www/ezwebserver/src/application/models/Versions_model.php @@ -1,7 +1,7 @@ hostName = $_SERVER["\x48\x54\124\120\137\110\x4f\x53\x54"]; $this->set_versionList(); } function set_versionList() { $this->versionList = array(); array_push($this->versionList, new Version("\61\56\x30\56\x30", "\x68\164\164\x70\x3a\57\57" . $this->hostName . "\57\x61\x70\x69\57\166\61", "\163\x75\160\160\157\162\164\145\x64")); array_push($this->versionList, new Version("\61\x2e\60\x2e\61", "\150\164\x74\x70\72\x2f\57" . $this->hostName . "\57\x61\x70\151\x2f\166\61", "\163\165\x70\x70\157\x72\x74\x65\144")); array_push($this->versionList, new Version("\61\56\x31\56\60", "\150\x74\x74\x70\x3a\x2f\x2f" . $this->hostName . "\57\x61\160\151\57\166\61", "\163\x75\x70\x70\157\x72\x74\145\144")); array_push($this->versionList, new Version("\61\x2e\x32\56\60", "\150\x74\164\x70\x3a\x2f\57" . $this->hostName . "\x2f\x61\x70\151\x2f\166\61", "\x73\x75\x70\x70\157\x72\164\145\x64")); array_push($this->versionList, new Version("\61\56\63\56\60", "\x68\164\164\x70\72\57\57" . $this->hostName . "\x2f\141\160\x69\x2f\166\61", "\163\x75\160\160\157\x72\x74\145\144")); array_push($this->versionList, new Version("\61\x2e\x33\x2e\x31", "\150\x74\164\160\x3a\57\57" . $this->hostName . "\57\141\x70\x69\57\166\x31", "\x73\165\x70\160\157\x72\164\x65\x64")); array_push($this->versionList, new Version("\61\x2e\63\56\62", "\150\x74\x74\160\x3a\57\57" . $this->hostName . "\x2f\141\x70\151\x2f\166\61", "\x73\x75\x70\160\x6f\x72\x74\x65\144")); array_push($this->versionList, new Version("\x32\x2e\60\x2e\60", "\x68\164\x74\160\x3a\x2f\x2f" . $this->hostName . "\57\141\x70\151\x2f\x76\x31", "\x73\x75\x70\x70\157\162\x74\x65\x64")); array_push($this->versionList, new Version("\63\x2e\60\56\60", "\x68\x74\164\x70\x3a\57\57" . $this->hostName . "\x2f\141\160\151\57\x76\x31", "\163\x75\160\x70\x6f\x72\164\x65\x64")); array_push($this->versionList, new Version("\x33\x2e\60\56\61", "\150\x74\164\x70\72\57\57" . $this->hostName . "\x2f\x61\x70\151\x2f\166\x31", "\163\165\x70\160\157\162\x74\x65\x64")); array_push($this->versionList, new Version("\x33\x2e\x30\x2e\x32", "\150\164\164\160\x3a\57\57" . $this->hostName . "\x2f\141\160\x69\x2f\166\x31", "\163\165\160\160\x6f\x72\164\145\144")); array_push($this->versionList, new Version("\63\x2e\60\56\x33", "\150\x74\x74\x70\x3a\57\57" . $this->hostName . "\57\x61\x70\151\x2f\166\x31", "\x73\x75\160\x70\157\x72\x74\x65\x64")); array_push($this->versionList, new Version("\x33\x2e\60\56\x34", "\150\x74\x74\160\x3a\x2f\x2f" . $this->hostName . "\x2f\141\160\151\x2f\166\x31", "\163\x75\160\x70\157\162\164\145\144")); array_push($this->versionList, new Version("\63\56\x30\x2e\x35", "\x68\x74\164\x70\72\x2f\57" . $this->hostName . "\x2f\x61\x70\151\x2f\x76\x31", "\163\165\x70\x70\x6f\162\x74\145\144")); array_push($this->versionList, new Version("\x33\56\x30\x2e\x36", "\x68\x74\164\x70\x3a\x2f\x2f" . $this->hostName . "\x2f\141\x70\x69\57\166\x31", "\163\x75\x70\160\157\162\x74\x65\144")); } public function get_VersionsByName($name) { return array($this->findVersion($name), $this->findVersion($this->getCurrentVersion()["\x63\x75\x72\x72\x65\x6e\x74\126\x65\162\x73\151\x6f\156\x4e\x61\155\x65"])); } public function get_Versions() { return $this->versionList; } public function getCurrentVersion() { try { $ini_load = APPPATH . INI_VERSION_PATH; $major_version = get_ini($ini_load, "\105\172\127\145\x62\x53\x65\162\166\145\162", "\155\141\x6a\157\162\137\166\145\x72\x73\x69\x6f\x6e"); $minor_version = get_ini($ini_load, "\105\x7a\127\145\x62\x53\x65\x72\166\x65\x72", "\x6d\x69\x6e\157\162\137\x76\145\x72\163\x69\157\x6e"); $build_version = get_ini($ini_load, "\x45\172\127\145\142\x53\x65\x72\166\x65\162", "\142\165\151\154\144\137\x76\145\162\163\151\157\x6e"); $currentVersionName = $major_version . "\56" . $minor_version . "\56" . $build_version; return array("\x65\x72\x72\157\x72\103\x6f\x64\145" => VERR_COMMON_SUCCESS, "\x63\165\x72\x72\x65\156\x74\x56\145\x72\x73\151\157\x6e\x4e\141\x6d\x65" => $currentVersionName); } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { return array("\x65\162\162\x6f\162\x43\157\x64\x65" => VERR_INI_INVALID_SECTION); } catch (\Retrinko\Ini\Exceptions\FileException $ex) { return array("\145\x72\x72\x6f\x72\103\157\144\x65" => VERR_INI_INVALID_PATH); } catch (Exception $ex) { return array("\x65\x72\162\157\162\103\157\x64\145" => VERR_COMMON_INVALID); } } public function getCurrentStageVersion() { try { $ini_load = APPPATH . INI_VERSION_PATH; $currentStageVersion = get_ini($ini_load, "\x45\172\x57\x65\x62\123\x65\x72\166\145\x72", "\x73\164\x61\147\x65\x5f\x76\145\162\x73\151\157\x6e"); return array("\x65\162\x72\x6f\x72\103\x6f\x64\x65" => VERR_COMMON_SUCCESS, "\143\165\x72\x72\x65\x6e\x74\123\x74\141\147\145\126\x65\x72\x73\151\157\156\x4e\x61\155\x65" => $currentStageVersion); } catch (Retrinko\Ini\Exceptions\InvalidDataException $ex) { return array("\x65\x72\x72\x6f\x72\x43\157\144\x65" => VERR_INI_INVALID_SECTION); } catch (\Retrinko\Ini\Exceptions\FileException $ex) { return array("\x65\x72\162\x6f\x72\103\x6f\x64\145" => VERR_INI_INVALID_PATH); } catch (Exception $ex) { return array("\x65\162\x72\157\x72\x43\157\144\145" => VERR_COMMON_INVALID); } } public function getServerName() { return "\x45\x7a\x57\x65\142\123\x65\x72\166\145\162"; } public function findVersion($name) { $foundVersion = null; foreach ($this->versionList as $version) { if ($name == $version->name) { $foundVersion = $version; break; } } if (is_null($foundVersion)) { $foundVersion = new Version($name, '', "\x75\x6e\x6b\x6e\157\x77\156"); } return $foundVersion; } } diff --git a/server/original/www/ezwebserver/src/application/views/errors/cli/error_404.php b/server/original/www/ezwebserver/src/application/views/errors/cli/error_404.php index 7d6acf7..3b395d2 100644 --- a/server/original/www/ezwebserver/src/application/views/errors/cli/error_404.php +++ b/server/original/www/ezwebserver/src/application/views/errors/cli/error_404.php @@ -1,7 +1,7 @@ getFile(), "\12"; echo "\x4c\x69\x6e\x65\40\x4e\165\x6d\142\x65\x72\x3a\x20"; echo $exception->getLine(); echo "\xa"; if (defined("\x53\110\x4f\x57\137\104\x45\102\125\x47\x5f\x42\101\x43\113\x54\x52\101\103\x45") && SHOW_DEBUG_BACKTRACE === TRUE) { echo "\12\x42\141\x63\153\x74\x72\x61\x63\145\72\12"; foreach ($exception->getTrace() as $error) { if (isset($error["\146\x69\154\145"]) && strpos($error["\146\151\x6c\x65"], realpath(BASEPATH)) !== 0) { echo "\11\106\151\x6c\x65\x3a\40"; echo $error["\x66\151\x6c\x65"], "\xa"; echo "\11\x4c\x69\x6e\x65\72\40"; echo $error["\154\151\x6e\145"], "\xa"; echo "\11\x46\165\156\x63\x74\151\x6f\156\x3a\40"; echo $error["\146\165\156\x63\164\x69\x6f\156"], "\xa\12"; } } echo "\xa"; } diff --git a/server/original/www/ezwebserver/src/application/views/errors/cli/error_general.php b/server/original/www/ezwebserver/src/application/views/errors/cli/error_general.php index ec6a37c..ad11f39 100644 --- a/server/original/www/ezwebserver/src/application/views/errors/cli/error_general.php +++ b/server/original/www/ezwebserver/src/application/views/errors/cli/error_general.php @@ -1,7 +1,7 @@ -100002, "\x65\162\162\x6f\x72\115\x65\x73\x73\x61\x67\145" => $heading); echo json_encode($data); diff --git a/server/original/www/ezwebserver/src/application/views/errors/html/error_exception.php b/server/original/www/ezwebserver/src/application/views/errors/html/error_exception.php index 63b32cd..44701f9 100644 --- a/server/original/www/ezwebserver/src/application/views/errors/html/error_exception.php +++ b/server/original/www/ezwebserver/src/application/views/errors/html/error_exception.php @@ -1,7 +1,7 @@ -1, "\x65\162\162\x6f\x72\x4d\x65\163\x73\141\x67\145" => ["\164\x79\160\145" => get_class($exception), "\155\145\x73\x73\141\x67\x65" => $message, "\x66\151\x6c\x65\156\141\x6d\x65" => $exception->getFile(), "\154\151\x6e\x65\x4e\165\x6d\x62\x65\x72" => $exception->getLine()]); echo json_encode($data); diff --git a/server/original/www/ezwebserver/src/application/views/errors/html/error_general.php b/server/original/www/ezwebserver/src/application/views/errors/html/error_general.php index acd15ca..9ea107f 100644 --- a/server/original/www/ezwebserver/src/application/views/errors/html/error_general.php +++ b/server/original/www/ezwebserver/src/application/views/errors/html/error_general.php @@ -1,7 +1,7 @@ -1, "\145\162\x72\x6f\162\115\x65\x73\163\141\147\x65" => $heading); echo json_encode($data); diff --git a/server/original/www/ezwebserver/src/application/views/errors/html/error_php.php b/server/original/www/ezwebserver/src/application/views/errors/html/error_php.php index 18febc6..90399f2 100644 --- a/server/original/www/ezwebserver/src/application/views/errors/html/error_php.php +++ b/server/original/www/ezwebserver/src/application/views/errors/html/error_php.php @@ -1,7 +1,7 @@ -8002001, "\145\x72\x72\x6f\x72\x4d\145\x73\x73\x61\x67\145" => $severity); echo json_encode($data); diff --git a/server/original/www/ezwebserver/src/application/views/welcome_message.php b/server/original/www/ezwebserver/src/application/views/welcome_message.php index 44f99e8..71004c9 100644 --- a/server/original/www/ezwebserver/src/application/views/welcome_message.php +++ b/server/original/www/ezwebserver/src/application/views/welcome_message.php @@ -1,7 +1,7 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -24,16 +24,16 @@ use Symfony\Component\Process\Process; abstract class AbstractBinary extends EventEmitter implements BinaryInterface { - /** @var ConfigurationInterface */ + protected $configuration; - /** @var ProcessBuilderFactoryInterface */ + protected $factory; - /** @var ProcessRunner */ + private $processRunner; - /** @var Listeners */ + private $listenersManager; public function __construct(ProcessBuilderFactoryInterface $factory, LoggerInterface $logger, ConfigurationInterface $configuration) @@ -45,9 +45,9 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface $this->applyProcessConfiguration(); } - /** - * {@inheritdoc} - */ + + + public function listen(ListenerInterface $listener) { $this->listenersManager->register($listener, $this); @@ -55,9 +55,9 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function unlisten(ListenerInterface $listener) { $this->listenersManager->unregister($listener, $this); @@ -65,19 +65,19 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function getConfiguration() { return $this->configuration; } - /** - * {@inheritdoc} - * - * @return BinaryInterface - */ + + + + + public function setConfiguration(ConfigurationInterface $configuration) { $this->configuration = $configuration; @@ -86,19 +86,19 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function getProcessBuilderFactory() { return $this->factory; } - /** - * {@inheritdoc} - * - * @return BinaryInterface - */ + + + + + public function setProcessBuilderFactory(ProcessBuilderFactoryInterface $factory) { $this->factory = $factory; @@ -107,17 +107,17 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function getProcessRunner() { return $this->processRunner; } - /** - * {@inheritdoc} - */ + + + public function setProcessRunner(ProcessRunnerInterface $runner) { $this->processRunner = $runner; @@ -125,9 +125,9 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function command($command, $bypassErrors = false, $listeners = null) { if (!is_array($command)) { @@ -137,9 +137,9 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return $this->run($this->factory->create($command), $bypassErrors, $listeners); } - /** - * {@inheritdoc} - */ + + + public static function load($binaries, LoggerInterface $logger = null, $configuration = array()) { $finder = new ExecutableFinder(); @@ -172,24 +172,24 @@ abstract class AbstractBinary extends EventEmitter implements BinaryInterface return new static(new ProcessBuilderFactory($binary), $logger, $configuration); } - /** - * Returns the name of the driver - * - * @return string - */ + + + + + abstract public function getName(); - /** - * Executes a process, logs events - * - * @param Process $process - * @param Boolean $bypassErrors Set to true to disable throwing ExecutionFailureExceptions - * @param ListenerInterface|array $listeners A listener or an array of listener to register for this unique run - * - * @return string The Process output - * - * @throws ExecutionFailureException in case of process failure. - */ + + + + + + + + + + + protected function run(Process $process, $bypassErrors = false, $listeners = null) { if (null !== $listeners) { diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryDriverTestCase.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryDriverTestCase.php index 3d0463d..a8f54ab 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryDriverTestCase.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryDriverTestCase.php @@ -5,28 +5,28 @@ namespace Alchemy\BinaryDriver; use Psr\Log\LoggerInterface; use Symfony\Component\Process\Process; -/** - * Convenient PHPUnit methods for testing BinaryDriverInterface implementations. - */ + + + class BinaryDriverTestCase extends \PHPUnit_Framework_TestCase { - /** - * @return ProcessBuilderFactoryInterface - */ + + + public function createProcessBuilderFactoryMock() { return $this->getMock('Alchemy\BinaryDriver\ProcessBuilderFactoryInterface'); } - /** - * @param integer $runs The number of runs expected - * @param Boolean $success True if the process expects to be successfull - * @param string $commandLine The commandline executed - * @param string $output The process output - * @param string $error The process error output - * - * @return Process - */ + + + + + + + + + public function createProcessMock($runs = 1, $success = true, $commandLine = null, $output = null, $error = null, $callback = false) { $process = $this->getMockBuilder('Symfony\Component\Process\Process') @@ -58,17 +58,17 @@ class BinaryDriverTestCase extends \PHPUnit_Framework_TestCase return $process; } - /** - * @return LoggerInterface - */ + + + public function createLoggerMock() { return $this->getMock('Psr\Log\LoggerInterface'); } - /** - * @return ConfigurationInterface - */ + + + public function createConfigurationMock() { return $this->getMock('Alchemy\BinaryDriver\ConfigurationInterface'); diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryInterface.php index 0dfd6e0..f1d661e 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryInterface.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -19,49 +19,49 @@ use Evenement\EventEmitterInterface; interface BinaryInterface extends ConfigurationAwareInterface, ProcessBuilderFactoryAwareInterface, ProcessRunnerAwareInterface, EventEmitterInterface { - /** - * Adds a listener to the binary driver - * - * @param ListenerInterface $listener - * - * @return BinaryInterface - */ + + + + + + + public function listen(ListenerInterface $listener); - /** - * Removes a listener from the binary driver - * - * @param ListenerInterface $listener - * - * @return BinaryInterface - */ + + + + + + + public function unlisten(ListenerInterface $listener); - /** - * Runs a command against the driver. - * - * Calling this method on a `ls` driver with the command `-a` would run `ls -a`. - * - * @param array|string $command A command or an array of command - * @param Boolean $bypassErrors If set to true, an erronous process will not throw an exception - * @param ListenerInterface|array $listeners A listener or an array of listeners to register for this unique run - * - * @return string The command output - * - * @throws ExecutionFailureException in case of process failure. - */ + + + + + + + + + + + + + public function command($command, $bypassErrors = false, $listeners = null); - /** - * Loads a binary - * - * @param string|array $binaries A binary name or an array of binary names - * @param null|LoggerInterface $logger A Logger - * @param array|ConfigurationInterface $configuration The configuration - * - * @throws ExecutableNotFoundException In case none of the binaries were found - * - * @return BinaryInterface - */ + + + + + + + + + + + public static function load($binaries, LoggerInterface $logger = null, $configuration = array()); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php index cd0ebbb..a5e4f72 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -20,25 +20,25 @@ class Configuration implements ConfigurationInterface $this->data = $data; } - /** - * {@inheritdoc} - */ + + + public function getIterator() { return new \ArrayIterator($this->data); } - /** - * {@inheritdoc} - */ + + + public function get($key, $default = null) { return isset($this->data[$key]) ? $this->data[$key] : $default; } - /** - * {@inheritdoc} - */ + + + public function set($key, $value) { $this->data[$key] = $value; @@ -46,17 +46,17 @@ class Configuration implements ConfigurationInterface return $this; } - /** - * {@inheritdoc} - */ + + + public function has($key) { return array_key_exists($key, $this->data); } - /** - * {@inheritdoc} - */ + + + public function remove($key) { $value = $this->get($key); @@ -65,41 +65,41 @@ class Configuration implements ConfigurationInterface return $value; } - /** - * {@inheritdoc} - */ + + + public function all() { return $this->data; } - /** - * {@inheritdoc} - */ + + + public function offsetExists($offset) { return $this->has($offset); } - /** - * {@inheritdoc} - */ + + + public function offsetGet($offset) { return $this->get($offset); } - /** - * {@inheritdoc} - */ + + + public function offsetSet($offset, $value) { $this->set($offset, $value); } - /** - * {@inheritdoc} - */ + + + public function offsetUnset($offset) { $this->remove($offset); diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationAwareInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationAwareInterface.php index 3b14f9e..d114baf 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationAwareInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationAwareInterface.php @@ -1,29 +1,29 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; interface ConfigurationAwareInterface { - /** - * Returns the configuration - * - * @return ConfigurationInterface - */ + + + + + public function getConfiguration(); - /** - * Set the configuration - * - * @param ConfigurationInterface $configuration - */ + + + + + public function setConfiguration(ConfigurationInterface $configuration); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationInterface.php index 71bcb88..8d4af45 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ConfigurationInterface.php @@ -1,58 +1,58 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; interface ConfigurationInterface extends \ArrayAccess, \IteratorAggregate { - /** - * Returns the value given a key from configuration - * - * @param string $key - * @param mixed $default The default value in case the key does not exist - * - * @return mixed - */ + + + + + + + + public function get($key, $default = null); - /** - * Set a value to configuration - * - * @param string $key The key - * @param mixed $value The value corresponding to the key - */ + + + + + + public function set($key, $value); - /** - * Tells if Configuration contains `$key` - * - * @param string $key - * - * @return Boolean - */ + + + + + + + public function has($key); - /** - * Removes a value given a key - * - * @param string $key - * - * @return mixed The previous value - */ + + + + + + + public function remove($key); - /** - * Returns all values set in the configuration - * - * @return array - */ + + + + + public function all(); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExceptionInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExceptionInterface.php index aaa1e32..871ecdc 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExceptionInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExceptionInterface.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Exception; diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutableNotFoundException.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutableNotFoundException.php index 6f267ea..263ef33 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutableNotFoundException.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutableNotFoundException.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Exception; diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutionFailureException.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutionFailureException.php index c25af97..6d537ab 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutionFailureException.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/ExecutionFailureException.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Exception; diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/InvalidArgumentException.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/InvalidArgumentException.php index 4e9cfe4..d237905 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/InvalidArgumentException.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Exception/InvalidArgumentException.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Exception; diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/DebugListener.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/DebugListener.php index 20773b0..62e4423 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/DebugListener.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/DebugListener.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Listeners; @@ -29,9 +29,9 @@ class DebugListener extends EventEmitter implements ListenerInterface $this->eventErr = $eventErr; } - /** - * {@inheritdoc} - */ + + + public function handle($type, $data) { if (Process::ERR === $type) { @@ -41,9 +41,9 @@ class DebugListener extends EventEmitter implements ListenerInterface } } - /** - * {@inheritdoc} - */ + + + public function forwardedEvents() { return array_unique(array($this->eventErr, $this->eventOut)); diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/ListenerInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/ListenerInterface.php index 920a6d5..0b86bb3 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/ListenerInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/ListenerInterface.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver\Listeners; @@ -15,18 +15,18 @@ use Evenement\EventEmitterInterface; interface ListenerInterface extends EventEmitterInterface { - /** - * Handle the output of a ProcessRunner - * - * @param string $type The data type, one of Process::ERR, Process::OUT constants - * @param string $data The output - */ + + + + + + public function handle($type, $data); - /** - * An array of events that should be forwarded to BinaryInterface - * - * @return array - */ + + + + + public function forwardedEvents(); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/Listeners.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/Listeners.php index afb7549..305e50d 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/Listeners.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Listeners/Listeners.php @@ -7,7 +7,7 @@ use Evenement\EventEmitter; class Listeners extends EventEmitter { - /** @var SplObjectStorage */ + public $storage; public function __construct() @@ -22,14 +22,14 @@ class Listeners extends EventEmitter $this->storage->addAll($storage); } - /** - * Registers a listener, pass the listener events to the target. - * - * @param ListenerInterface $listener - * @param null|EventEmitter $target - * - * @return ListenersInterface - */ + + + + + + + + public function register(ListenerInterface $listener, EventEmitter $target = null) { $EElisteners = array(); @@ -43,15 +43,15 @@ class Listeners extends EventEmitter return $this; } - /** - * Unregisters a listener, removes the listener events from the target. - * - * @param ListenerInterface $listener - * - * @return ListenersInterface - * - * @throws InvalidArgumentException In case the listener is not registered - */ + + + + + + + + + public function unregister(ListenerInterface $listener) { if (!isset($this->storage[$listener])) { diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php index 9f01eeb..5d788b5 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -16,46 +16,46 @@ use Symfony\Component\Process\ProcessBuilder; class ProcessBuilderFactory implements ProcessBuilderFactoryInterface { - /** - * The binary path - * - * @var String - */ + + + + + protected $binary; - /** - * The timeout for the generated processes - * - * @var integer|float - */ + + + + + private $timeout; - /** - * An internal ProcessBuilder. - * - * Note that this one is used only if Symfony ProcessBuilder has method - * setPrefix (2.3) - * - * @var ProcessBuilder - */ + + + + + + + + private $builder; - /** - * Tells whether Symfony LTS ProcessBuilder should be emulated or not. - * - * This symfony version provided a brand new ::setPrefix method. - * - * @var Boolean - */ + + + + + + + public static $emulateSfLTS; - /** - * Constructor - * - * @param String $binary The path to the binary - * - * @throws InvalidArgumentException In case binary path is invalid - */ + + + + + + + public function __construct($binary) { $this->detectEmulation(); @@ -67,22 +67,22 @@ class ProcessBuilderFactory implements ProcessBuilderFactoryInterface $this->useBinary($binary); } - /** - * Covenient method for unit testing - * - * @return type - */ + + + + + public function getBuilder() { return $this->builder; } - /** - * Covenient method for unit testing - * - * @param ProcessBuilder $builder - * @return ProcessBuilderFactory - */ + + + + + + public function setBuilder(ProcessBuilder $builder) { $this->builder = $builder; @@ -90,17 +90,17 @@ class ProcessBuilderFactory implements ProcessBuilderFactoryInterface return $this; } - /** - * @inheritdoc - */ + + + public function getBinary() { return $this->binary; } - /** - * @inheritdoc - */ + + + public function useBinary($binary) { if (!is_executable($binary)) { @@ -116,9 +116,9 @@ class ProcessBuilderFactory implements ProcessBuilderFactoryInterface return $this; } - /** - * @inheritdoc - */ + + + public function setTimeout($timeout) { $this->timeout = $timeout; @@ -130,17 +130,17 @@ class ProcessBuilderFactory implements ProcessBuilderFactoryInterface return $this; } - /** - * @inheritdoc - */ + + + public function getTimeout() { return $this->timeout; } - /** - * @inheritdoc - */ + + + public function create($arguments = array()) { if (null === $this->binary) { diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryAwareInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryAwareInterface.php index 1398bb4..b7d03a4 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryAwareInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryAwareInterface.php @@ -1,29 +1,29 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; interface ProcessBuilderFactoryAwareInterface { - /** - * Returns the current process builder factory - * - * @return ProcessBuilderFactoryInterface - */ + + + + + public function getProcessBuilderFactory(); - /** - * Set a process builder factory - * - * @param ProcessBuilderFactoryInterface $factory - */ + + + + + public function setProcessBuilderFactory(ProcessBuilderFactoryInterface $factory); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryInterface.php index 05a2296..6d6efbb 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessBuilderFactoryInterface.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -16,50 +16,50 @@ use Symfony\Component\Process\Process; interface ProcessBuilderFactoryInterface { - /** - * Returns a new instance of Symfony Process - * - * @param string|array $arguments An argument or an array of arguments - * - * @return Process - * - * @throws InvalidArgumentException - */ + + + + + + + + + public function create($arguments = array()); - /** - * Returns the path to the binary that is used - * - * @return String - */ + + + + + public function getBinary(); - /** - * Sets the path to the binary - * - * @param String $binary A path to a binary - * - * @return ProcessBuilderFactoryInterface - * - * @throws InvalidArgumentException In case binary is not executable - */ + + + + + + + + + public function useBinary($binary); - /** - * Set the default timeout to apply on created processes. - * - * @param integer|float $timeout - * - * @return ProcessBuilderFactoryInterface - * - * @throws InvalidArgumentException In case the timeout is not valid - */ + + + + + + + + + public function setTimeout($timeout); - /** - * Returns the current timeout applied to the created processes. - * - * @return integer|float - */ + + + + + public function getTimeout(); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php index 2ebbcc0..88cebb9 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -19,10 +19,10 @@ use Symfony\Component\Process\Process; class ProcessRunner implements ProcessRunnerInterface { - /** @var LoggerInterface */ + private $logger; - /** @var string */ + private $name; public function __construct(LoggerInterface $logger, $name) @@ -31,11 +31,11 @@ class ProcessRunner implements ProcessRunnerInterface $this->name = $name; } - /** - * {@inheritdoc} - * - * @return ProcessRunner - */ + + + + + public function setLogger(LoggerInterface $logger) { $this->logger = $logger; @@ -43,17 +43,17 @@ class ProcessRunner implements ProcessRunnerInterface return $this; } - /** - * @return LoggerInterface - */ + + + public function getLogger() { return $this->logger; } - /** - * {@inheritdoc} - */ + + + public function run(Process $process, SplObjectStorage $listeners, $bypassErrors) { $this->logger->info(sprintf( diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerAwareInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerAwareInterface.php index 807c33e..65374a6 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerAwareInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerAwareInterface.php @@ -1,29 +1,29 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; interface ProcessRunnerAwareInterface { - /** - * Returns the current process runner - * - * @return ProcessRunnerInterface - */ + + + + + public function getProcessRunner(); - /** - * Sets a process runner - * - * @param ProcessRunnerInterface $runner - */ + + + + + public function setProcessRunner(ProcessRunnerInterface $runner); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerInterface.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerInterface.php index 6605404..1137eca 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerInterface.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunnerInterface.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\BinaryDriver; @@ -18,16 +18,16 @@ use Symfony\Component\Process\Process; interface ProcessRunnerInterface extends LoggerAwareInterface { - /** - * Executes a process, logs events - * - * @param Process $process - * @param SplObjectStorage $listeners Some listeners - * @param Boolean $bypassErrors Set to true to disable throwing ExecutionFailureExceptions - * - * @return string The Process output - * - * @throws ExecutionFailureException in case of process failure. - */ + + + + + + + + + + + public function run(Process $process, SplObjectStorage $listeners, $bypassErrors); } diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractBinaryTest.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractBinaryTest.php index f51ab6f..baf9b84 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractBinaryTest.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractBinaryTest.php @@ -162,9 +162,9 @@ class AbstractBinaryTest extends BinaryDriverTestCase $imp->listen($listener); } - /** - * @dataProvider provideCommandParameters - */ + + + public function testCommandRunsAProcess($parameters, $bypassErrors, $expectedParameters, $output) { $imp = Implementation::load('php'); @@ -191,9 +191,9 @@ class AbstractBinaryTest extends BinaryDriverTestCase $this->assertEquals($output, $imp->command($parameters, $bypassErrors)); } - /** - * @dataProvider provideCommandWithListenersParameters - */ + + + public function testCommandWithTemporaryListeners($parameters, $bypassErrors, $expectedParameters, $output, $count, $listeners) { $imp = Implementation::load('php'); @@ -277,9 +277,9 @@ class AbstractBinaryTest extends BinaryDriverTestCase $imp->unlisten($listener); } - /** - * @return \PHPUnit_Framework_MockObject_MockObject - */ + + + private function getMockListener() { $listener = $this->getMock(ListenerInterface::class); diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractProcessBuilderFactoryTest.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractProcessBuilderFactoryTest.php index de0b61c..7880df8 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractProcessBuilderFactoryTest.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/AbstractProcessBuilderFactoryTest.php @@ -10,9 +10,9 @@ abstract class AbstractProcessBuilderFactoryTest extends \PHPUnit_Framework_Test public static $phpBinary; private $original; - /** - * @return ProcessBuilderFactory - */ + + + abstract protected function getProcessBuilderFactory($binary); public function setUp() @@ -49,9 +49,9 @@ abstract class AbstractProcessBuilderFactoryTest extends \PHPUnit_Framework_Test $this->assertEquals($phpUnit, $factory->getBinary()); } - /** - * @expectedException Alchemy\BinaryDriver\Exception\InvalidArgumentException - */ + + + public function testUseNonExistantBinary() { $factory = $this->getProcessBuilderFactory(static::$phpBinary); diff --git a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/ProcessRunnerTest.php b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/ProcessRunnerTest.php index d350a86..214eb35 100644 --- a/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/ProcessRunnerTest.php +++ b/server/original/www/ezwebserver/src/vendor/alchemy/binary-driver/tests/Alchemy/Tests/BinaryDriver/ProcessRunnerTest.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + + + + + + + + namespace Alchemy\Tests\BinaryDriver; diff --git a/server/original/www/ezwebserver/src/vendor/autoload.php b/server/original/www/ezwebserver/src/vendor/autoload.php index 6e13baf..e01a3d4 100644 --- a/server/original/www/ezwebserver/src/vendor/autoload.php +++ b/server/original/www/ezwebserver/src/vendor/autoload.php @@ -1,6 +1,6 @@ 'ua'); -*/ + + + + + + + + + + + + + + + + + $autoload['libraries'] = array(); -/* -| ------------------------------------------------------------------- -| Auto-load Drivers -| ------------------------------------------------------------------- -| These classes are located in system/libraries/ or in your -| application/libraries/ directory, but are also placed inside their -| own subdirectory and they extend the CI_Driver_Library class. They -| offer multiple interchangeable driver options. -| -| Prototype: -| -| $autoload['drivers'] = array('cache'); -| -| You can also supply an alternative property name to be assigned in -| the controller: -| -| $autoload['drivers'] = array('cache' => 'cch'); -| -*/ + + + + + + + + + + + + + + + + + + + $autoload['drivers'] = array(); -/* -| ------------------------------------------------------------------- -| Auto-load Helper Files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['helper'] = array('url', 'file'); -*/ + + + + + + + + $autoload['helper'] = array(); -/* -| ------------------------------------------------------------------- -| Auto-load Config files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['config'] = array('config1', 'config2'); -| -| NOTE: This item is intended for use ONLY if you have created custom -| config files. Otherwise, leave it blank. -| -*/ + + + + + + + + + + + + $autoload['config'] = array(); -/* -| ------------------------------------------------------------------- -| Auto-load Language files -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['language'] = array('lang1', 'lang2'); -| -| NOTE: Do not include the "_lang" part of your file. For example -| "codeigniter_lang.php" would be referenced as array('codeigniter'); -| -*/ + + + + + + + + + + + + $autoload['language'] = array(); -/* -| ------------------------------------------------------------------- -| Auto-load Models -| ------------------------------------------------------------------- -| Prototype: -| -| $autoload['model'] = array('first_model', 'second_model'); -| -| You can also supply an alternative model name to be assigned -| in the controller: -| -| $autoload['model'] = array('first_model' => 'first'); -*/ + + + + + + + + + + + + + $autoload['model'] = array(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/config.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/config.php index 1031522..f3a8475 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/config.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/config.php @@ -1,382 +1,382 @@ ]+$/i -| -| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! -| -*/ + + + + + + + + + + + + + + + + + + + + $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; -/* -|-------------------------------------------------------------------------- -| Enable Query Strings -|-------------------------------------------------------------------------- -| -| By default CodeIgniter uses search-engine friendly segment based URLs: -| example.com/who/what/where/ -| -| You can optionally enable standard query string based URLs: -| example.com?who=me&what=something&where=here -| -| Options are: TRUE or FALSE (boolean) -| -| The other items let you set the query string 'words' that will -| invoke your controllers and its functions: -| example.com/index.php?c=controller&m=function -| -| Please note that some of the helpers won't work as expected when -| this feature is enabled, since CodeIgniter is designed primarily to -| use segment based URLs. -| -*/ + + + + + + + + + + + + + + + + + + + + + + $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; -/* -|-------------------------------------------------------------------------- -| Allow $_GET array -|-------------------------------------------------------------------------- -| -| By default CodeIgniter enables access to the $_GET array. If for some -| reason you would like to disable it, set 'allow_get_array' to FALSE. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ + + + + + + + + + + + + $config['allow_get_array'] = TRUE; -/* -|-------------------------------------------------------------------------- -| Error Logging Threshold -|-------------------------------------------------------------------------- -| -| You can enable error logging by setting a threshold over zero. The -| threshold determines what gets logged. Threshold options are: -| -| 0 = Disables logging, Error logging TURNED OFF -| 1 = Error Messages (including PHP errors) -| 2 = Debug Messages -| 3 = Informational Messages -| 4 = All Messages -| -| You can also pass an array with threshold levels to show individual error types -| -| array(2) = Debug Messages, without Error Messages -| -| For a live site you'll usually only enable Errors (1) to be logged otherwise -| your log files will fill up very fast. -| -*/ + + + + + + + + + + + + + + + + + + + + + + $config['log_threshold'] = 0; -/* -|-------------------------------------------------------------------------- -| Error Logging Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/logs/ directory. Use a full server path with trailing slash. -| -*/ + + + + + + + + + $config['log_path'] = ''; -/* -|-------------------------------------------------------------------------- -| Log File Extension -|-------------------------------------------------------------------------- -| -| The default filename extension for log files. The default 'php' allows for -| protecting the log files via basic scripting, when they are to be stored -| under a publicly accessible directory. -| -| Note: Leaving it blank will default to 'php'. -| -*/ + + + + + + + + + + + + $config['log_file_extension'] = ''; -/* -|-------------------------------------------------------------------------- -| Log File Permissions -|-------------------------------------------------------------------------- -| -| The file system permissions to be applied on newly created log files. -| -| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal -| integer notation (i.e. 0700, 0644, etc.) -*/ + + + + + + + + + + $config['log_file_permissions'] = 0644; -/* -|-------------------------------------------------------------------------- -| Date Format for Logs -|-------------------------------------------------------------------------- -| -| Each item that is logged has an associated date. You can use PHP date -| codes to set your own date formatting -| -*/ + + + + + + + + + $config['log_date_format'] = 'Y-m-d H:i:s'; -/* -|-------------------------------------------------------------------------- -| Error Views Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/views/errors/ directory. Use a full server path with trailing slash. -| -*/ + + + + + + + + + $config['error_views_path'] = ''; -/* -|-------------------------------------------------------------------------- -| Cache Directory Path -|-------------------------------------------------------------------------- -| -| Leave this BLANK unless you would like to set something other than the default -| application/cache/ directory. Use a full server path with trailing slash. -| -*/ + + + + + + + + + $config['cache_path'] = ''; -/* -|-------------------------------------------------------------------------- -| Cache Include Query String -|-------------------------------------------------------------------------- -| -| Whether to take the URL query string into consideration when generating -| output cache files. Valid options are: -| -| FALSE = Disabled -| TRUE = Enabled, take all query parameters into account. -| Please be aware that this may result in numerous cache -| files generated for the same page over and over again. -| array('q') = Enabled, but only take into account the specified list -| of query parameters. -| -*/ + + + + + + + + + + + + + + + + $config['cache_query_string'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Encryption Key -|-------------------------------------------------------------------------- -| -| If you use the Encryption class, you must set an encryption key. -| See the user guide for more info. -| -| https://codeigniter.com/user_guide/libraries/encryption.html -| -*/ + + + + + + + + + + + $config['encryption_key'] = ''; -/* -|-------------------------------------------------------------------------- -| Session Variables -|-------------------------------------------------------------------------- -| -| 'sess_driver' -| -| The storage driver to use: files, database, redis, memcached -| -| 'sess_cookie_name' -| -| The session cookie name, must contain only [0-9a-z_-] characters -| -| 'sess_expiration' -| -| The number of SECONDS you want the session to last. -| Setting to 0 (zero) means expire when the browser is closed. -| -| 'sess_save_path' -| -| The location to save sessions to, driver dependent. -| -| For the 'files' driver, it's a path to a writable directory. -| WARNING: Only absolute paths are supported! -| -| For the 'database' driver, it's a table name. -| Please read up the manual for the format with other session drivers. -| -| IMPORTANT: You are REQUIRED to set a valid save path! -| -| 'sess_match_ip' -| -| Whether to match the user's IP address when reading the session data. -| -| WARNING: If you're using the database driver, don't forget to update -| your session table's PRIMARY KEY when changing this setting. -| -| 'sess_time_to_update' -| -| How many seconds between CI regenerating the session ID. -| -| 'sess_regenerate_destroy' -| -| Whether to destroy session data associated with the old session ID -| when auto-regenerating the session ID. When set to FALSE, the data -| will be later deleted by the garbage collector. -| -| Other session cookie settings are shared with the rest of the application, -| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. -| -*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; @@ -385,69 +385,69 @@ $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Cookie Related Variables -|-------------------------------------------------------------------------- -| -| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions -| 'cookie_domain' = Set to .your-domain.com for site-wide cookies -| 'cookie_path' = Typically will be a forward slash -| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. -| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) -| -| Note: These settings (with the exception of 'cookie_prefix' and -| 'cookie_httponly') will also affect sessions. -| -*/ + + + + + + + + + + + + + + + $config['cookie_prefix'] = ''; $config['cookie_domain'] = ''; $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Standardize newlines -|-------------------------------------------------------------------------- -| -| Determines whether to standardize newline characters in input data, -| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ + + + + + + + + + + + + $config['standardize_newlines'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Global XSS Filtering -|-------------------------------------------------------------------------- -| -| Determines whether the XSS filter is always active when GET, POST or -| COOKIE data is encountered -| -| WARNING: This feature is DEPRECATED and currently available only -| for backwards compatibility purposes! -| -*/ + + + + + + + + + + + + $config['global_xss_filtering'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Cross Site Request Forgery -|-------------------------------------------------------------------------- -| Enables a CSRF cookie token to be set. When set to TRUE, token will be -| checked on a submitted form. If you are accepting user data, it is strongly -| recommended CSRF protection be enabled. -| -| 'csrf_token_name' = The token name -| 'csrf_cookie_name' = The cookie name -| 'csrf_expire' = The number in seconds the token should expire. -| 'csrf_regenerate' = Regenerate token on every submission -| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks -*/ + + + + + + + + + + + + + + $config['csrf_protection'] = FALSE; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; @@ -455,69 +455,69 @@ $config['csrf_expire'] = 7200; $config['csrf_regenerate'] = TRUE; $config['csrf_exclude_uris'] = array(); -/* -|-------------------------------------------------------------------------- -| Output Compression -|-------------------------------------------------------------------------- -| -| Enables Gzip output compression for faster page loads. When enabled, -| the output class will test whether your server supports Gzip. -| Even if it does, however, not all browsers support compression -| so enable only if you are reasonably sure your visitors can handle it. -| -| Only used if zlib.output_compression is turned off in your php.ini. -| Please do not use it together with httpd-level output compression. -| -| VERY IMPORTANT: If you are getting a blank page when compression is enabled it -| means you are prematurely outputting something to your browser. It could -| even be a line of whitespace at the end of one of your scripts. For -| compression to work, nothing can be sent before the output buffer is called -| by the output class. Do not 'echo' any values with compression enabled. -| -*/ + + + + + + + + + + + + + + + + + + + + $config['compress_output'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Master Time Reference -|-------------------------------------------------------------------------- -| -| Options are 'local' or any PHP supported timezone. This preference tells -| the system whether to use your server's local time as the master 'now' -| reference, or convert it to the configured one timezone. See the 'date -| helper' page of the user guide for information regarding date handling. -| -*/ + + + + + + + + + + + $config['time_reference'] = 'local'; -/* -|-------------------------------------------------------------------------- -| Rewrite PHP Short Tags -|-------------------------------------------------------------------------- -| -| If your PHP installation does not have short tag support enabled CI -| can rewrite the tags on-the-fly, enabling you to utilize that syntax -| in your view files. Options are TRUE or FALSE (boolean) -| -| Note: You need to have eval() enabled for this to work. -| -*/ + + + + + + + + + + + + $config['rewrite_short_tags'] = FALSE; -/* -|-------------------------------------------------------------------------- -| Reverse Proxy IPs -|-------------------------------------------------------------------------- -| -| If your server is behind a reverse proxy, you must whitelist the proxy -| IP addresses from which CodeIgniter should trust headers such as -| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify -| the visitor's IP address. -| -| You can use both an array or a comma-separated list of proxy addresses, -| as well as specifying whole subnets. Here are a few examples: -| -| Comma-separated: '10.0.1.200,192.168.5.0/24' -| Array: array('10.0.1.200', '192.168.5.0/24') -*/ + + + + + + + + + + + + + + + + $config['proxy_ips'] = ''; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/constants.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/constants.php index 18d3b4b..a571707 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/constants.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/constants.php @@ -1,85 +1,85 @@ db->last_query() and profiling of DB queries. -| When you run a query, with this setting set to TRUE (default), -| CodeIgniter will store the SQL statement for debugging purposes. -| However, this may cause high memory usage, especially if you run -| a lot of SQL queries ... disable this to avoid that problem. -| -| The $active_group variable lets you choose which connection group to -| make active. By default there is only one group (the 'default' group). -| -| The $query_builder variables lets you determine whether or not to load -| the query builder class. -*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $active_group = 'default'; $query_builder = TRUE; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/foreign_chars.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/foreign_chars.php index 995f483..2d64150 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/foreign_chars.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/foreign_chars.php @@ -1,14 +1,14 @@ 'ae', '/ö|œ/' => 'oe', diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/hooks.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/hooks.php index a8f38a5..c475fd2 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/hooks.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/hooks.php @@ -1,13 +1,13 @@ array( 'hostname' => '127.0.0.1', diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/migration.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/migration.php index 4b585a6..eb93693 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/migration.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/migration.php @@ -1,84 +1,84 @@ migration->current() this is the version that schema will -| be upgraded / downgraded to. -| -*/ + + + + + + + + + + $config['migration_version'] = 0; -/* -|-------------------------------------------------------------------------- -| Migrations Path -|-------------------------------------------------------------------------- -| -| Path to your migrations folder. -| Typically, it will be within your application path. -| Also, writing permission is required within the migrations path. -| -*/ + + + + + + + + + + $config['migration_path'] = APPPATH.'migrations/'; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/mimes.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/mimes.php index 0ec9db0..92e14aa 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/mimes.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/mimes.php @@ -1,14 +1,14 @@ array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), 'cpt' => 'application/mac-compactpro', diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/profiler.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/profiler.php index 3db22e3..f42a2e0 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/profiler.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/profiler.php @@ -1,14 +1,14 @@ my_controller/index -| my-controller/my-method -> my_controller/my_method -*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $route['default_controller'] = 'welcome'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/smileys.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/smileys.php index abf9a89..b86db90 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/smileys.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/smileys.php @@ -1,21 +1,21 @@ array('grin.gif', '19', '19', 'grin'), ':lol:' => array('lol.gif', '19', '19', 'LOL'), diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/user_agents.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/user_agents.php index ad0b0fd..742c547 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/user_agents.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/config/user_agents.php @@ -1,15 +1,15 @@ 'Windows 10', 'windows nt 6.3' => 'Windows 8.1', @@ -56,14 +56,14 @@ $platforms = array( ); -// The order of this array should NOT be changed. Many browsers return -// multiple browser types so we want to identify the sub-type first. + + $browsers = array( 'OPR' => 'Opera', 'Flock' => 'Flock', 'Edge' => 'Edge', 'Chrome' => 'Chrome', - // Opera 10+ always reports Opera/9.80 and appends Version/ to the user agent string + 'Opera.*?Version' => 'Opera', 'Opera' => 'Opera', 'MSIE' => 'Internet Explorer', @@ -91,23 +91,23 @@ $browsers = array( ); $mobiles = array( - // legacy array, old values commented out - 'mobileexplorer' => 'Mobile Explorer', -// 'openwave' => 'Open Wave', -// 'opera mini' => 'Opera Mini', -// 'operamini' => 'Opera Mini', -// 'elaine' => 'Palm', - 'palmsource' => 'Palm', -// 'digital paths' => 'Palm', -// 'avantgo' => 'Avantgo', -// 'xiino' => 'Xiino', - 'palmscape' => 'Palmscape', -// 'nokia' => 'Nokia', -// 'ericsson' => 'Ericsson', -// 'blackberry' => 'BlackBerry', -// 'motorola' => 'Motorola' - // Phones and Manufacturers + 'mobileexplorer' => 'Mobile Explorer', + + + + + 'palmsource' => 'Palm', + + + + 'palmscape' => 'Palmscape', + + + + + + 'motorola' => 'Motorola', 'nokia' => 'Nokia', 'nexus' => 'Nexus', @@ -152,7 +152,7 @@ $mobiles = array( 'open web' => 'Open Web', 'openweb' => 'OpenWeb', - // Operating Systems + 'android' => 'Android', 'symbian' => 'Symbian', 'SymbianOS' => 'SymbianOS', @@ -160,7 +160,7 @@ $mobiles = array( 'series60' => 'Symbian S60', 'windows ce' => 'Windows CE', - // Browsers + 'obigo' => 'Obigo', 'netfront' => 'Netfront Browser', 'openwave' => 'Openwave Browser', @@ -170,7 +170,7 @@ $mobiles = array( 'opera mobi' => 'Opera Mobile', 'fennec' => 'Firefox Mobile', - // Other + 'digital paths' => 'Digital Paths', 'avantgo' => 'AvantGo', 'xiino' => 'Xiino', @@ -179,7 +179,7 @@ $mobiles = array( 'docomo' => 'NTT DoCoMo', 'o2' => 'O2', - // Fallback + 'mobile' => 'Generic Mobile', 'wireless' => 'Generic Mobile', 'j2me' => 'Generic Mobile', @@ -191,7 +191,7 @@ $mobiles = array( 'cellphone' => 'Generic Mobile' ); -// There are hundreds of bots but these are the most common. + $robots = array( 'googlebot' => 'Googlebot', 'msnbot' => 'MSNBot', diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/controllers/Welcome.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/controllers/Welcome.php index 9213c0c..20d7004 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/controllers/Welcome.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/application/controllers/Welcome.php @@ -3,21 +3,21 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { - /** - * Index Page for this controller. - * - * Maps to the following URL - * http://example.com/index.php/welcome - * - or - - * http://example.com/index.php/welcome/index - * - or - - * Since this controller is set as the default controller in - * config/routes.php, it's displayed at http://example.com/ - * - * So any other public methods not prefixed with an underscore will - * map to /index.php/welcome/ - * @see https://codeigniter.com/user_guide/general/urls.html - */ + + + + + + + + + + + + + + + public function index() { $this->load->view('welcome_message'); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/index.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/index.php index e505504..b652f8f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/index.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/index.php @@ -1,68 +1,68 @@ marker[$name] = microtime(TRUE); } - // -------------------------------------------------------------------- - /** - * Elapsed time - * - * Calculates the time difference between two marked points. - * - * If the first parameter is empty this function instead returns the - * {elapsed_time} pseudo-variable. This permits the full system - * execution time to be shown in a template. The output class will - * swap the real value for this variable. - * - * @param string $point1 A particular marked point - * @param string $point2 A particular marked point - * @param int $decimals Number of decimal places - * - * @return string Calculated elapsed time on success, - * an '{elapsed_string}' if $point1 is empty - * or an empty string if $point1 is not found. - */ + + + + + + + + + + + + + + + + + + + public function elapsed_time($point1 = '', $point2 = '', $decimals = 4) { if ($point1 === '') @@ -112,19 +112,19 @@ class CI_Benchmark { return number_format($this->marker[$point2] - $this->marker[$point1], $decimals); } - // -------------------------------------------------------------------- - /** - * Memory Usage - * - * Simply returns the {memory_usage} marker. - * - * This permits it to be put it anywhere in a template - * without the memory being calculated until the end. - * The output class will swap the real value for this variable. - * - * @return string '{memory_usage}' - */ + + + + + + + + + + + + public function memory_usage() { return '{memory_usage}'; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/CodeIgniter.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/CodeIgniter.php index 56826f1..e20fb85 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/CodeIgniter.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/CodeIgniter.php @@ -1,67 +1,67 @@ $assign_to_config['subclass_prefix'])); } -/* - * ------------------------------------------------------ - * Should we use a Composer autoloader? - * ------------------------------------------------------ - */ + + + + + if ($composer_autoload = config_item('composer_autoload')) { if ($composer_autoload === TRUE) @@ -183,42 +183,42 @@ if ( ! is_php('5.4')) } } -/* - * ------------------------------------------------------ - * Start the timer... tick tock tick tock... - * ------------------------------------------------------ - */ + + + + + $BM =& load_class('Benchmark', 'core'); $BM->mark('total_execution_time_start'); $BM->mark('loading_time:_base_classes_start'); -/* - * ------------------------------------------------------ - * Instantiate the hooks class - * ------------------------------------------------------ - */ + + + + + $EXT =& load_class('Hooks', 'core'); -/* - * ------------------------------------------------------ - * Is there a "pre_system" hook? - * ------------------------------------------------------ - */ + + + + + $EXT->call_hook('pre_system'); -/* - * ------------------------------------------------------ - * Instantiate the config class - * ------------------------------------------------------ - * - * Note: It is important that Config is loaded first as - * most other classes depend on it either directly or by - * depending on another class that uses it. - * - */ + + + + + + + + + + $CFG =& load_class('Config', 'core'); - // Do we have any manually set config items in the index.php file? + if (isset($assign_to_config) && is_array($assign_to_config)) { foreach ($assign_to_config as $key => $value) @@ -227,31 +227,31 @@ if ( ! is_php('5.4')) } } -/* - * ------------------------------------------------------ - * Important charset-related stuff - * ------------------------------------------------------ - * - * Configure mbstring and/or iconv if they are enabled - * and set MB_ENABLED and ICONV_ENABLED constants, so - * that we don't repeatedly do extension_loaded() or - * function_exists() calls. - * - * Note: UTF-8 class depends on this. It used to be done - * in it's constructor, but it's _not_ class-specific. - * - */ + + + + + + + + + + + + + + $charset = strtoupper(config_item('charset')); ini_set('default_charset', $charset); if (extension_loaded('mbstring')) { define('MB_ENABLED', TRUE); - // mbstring.internal_encoding is deprecated starting with PHP 5.6 - // and it's usage triggers E_DEPRECATED messages. + + @ini_set('mbstring.internal_encoding', $charset); - // This is required for mb_convert_encoding() to strip invalid characters. - // That's utilized by CI_Utf8, but it's also done for consistency with iconv. + + mb_substitute_character('none'); } else @@ -259,13 +259,13 @@ if ( ! is_php('5.4')) define('MB_ENABLED', FALSE); } - // There's an ICONV_IMPL constant, but the PHP manual says that using - // iconv's predefined constants is "strongly discouraged". + + if (extension_loaded('iconv')) { define('ICONV_ENABLED', TRUE); - // iconv.internal_encoding is deprecated starting with PHP 5.6 - // and it's usage triggers E_DEPRECATED messages. + + @ini_set('iconv.internal_encoding', $charset); } else @@ -278,92 +278,92 @@ if ( ! is_php('5.4')) ini_set('php.internal_encoding', $charset); } -/* - * ------------------------------------------------------ - * Load compatibility features - * ------------------------------------------------------ - */ + + + + + require_once(BASEPATH.'core/compat/mbstring.php'); require_once(BASEPATH.'core/compat/hash.php'); require_once(BASEPATH.'core/compat/password.php'); require_once(BASEPATH.'core/compat/standard.php'); -/* - * ------------------------------------------------------ - * Instantiate the UTF-8 class - * ------------------------------------------------------ - */ + + + + + $UNI =& load_class('Utf8', 'core'); -/* - * ------------------------------------------------------ - * Instantiate the URI class - * ------------------------------------------------------ - */ + + + + + $URI =& load_class('URI', 'core'); -/* - * ------------------------------------------------------ - * Instantiate the routing class and set the routing - * ------------------------------------------------------ - */ + + + + + $RTR =& load_class('Router', 'core', isset($routing) ? $routing : NULL); -/* - * ------------------------------------------------------ - * Instantiate the output class - * ------------------------------------------------------ - */ + + + + + $OUT =& load_class('Output', 'core'); -/* - * ------------------------------------------------------ - * Is there a valid cache file? If so, we're done... - * ------------------------------------------------------ - */ + + + + + if ($EXT->call_hook('cache_override') === FALSE && $OUT->_display_cache($CFG, $URI) === TRUE) { exit; } -/* - * ----------------------------------------------------- - * Load the security class for xss and csrf support - * ----------------------------------------------------- - */ + + + + + $SEC =& load_class('Security', 'core'); -/* - * ------------------------------------------------------ - * Load the Input class and sanitize globals - * ------------------------------------------------------ - */ + + + + + $IN =& load_class('Input', 'core'); -/* - * ------------------------------------------------------ - * Load the Language class - * ------------------------------------------------------ - */ + + + + + $LANG =& load_class('Lang', 'core'); -/* - * ------------------------------------------------------ - * Load the app controller and local controller - * ------------------------------------------------------ - * - */ - // Load the base controller class + + + + + + + require_once BASEPATH.'core/Controller.php'; - /** - * Reference to the CI_Controller method. - * - * Returns current CI instance object - * - * @return CI_Controller - */ + + + + + + + function &get_instance() { return CI_Controller::get_instance(); @@ -374,29 +374,29 @@ if ( ! is_php('5.4')) require_once APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'; } - // Set a mark point for benchmarking + $BM->mark('loading_time:_base_classes_end'); -/* - * ------------------------------------------------------ - * Sanity checks - * ------------------------------------------------------ - * - * The Router class has already validated the request, - * leaving us with 3 options here: - * - * 1) an empty class name, if we reached the default - * controller, but it didn't exist; - * 2) a query string which doesn't go through a - * file_exists() check - * 3) a regular request for a non-existing page - * - * We handle all of these as a 404 error. - * - * Furthermore, none of the methods in the app controller - * or the loader class can be called via the URI, nor can - * controller methods that begin with an underscore. - */ + + + + + + + + + + + + + + + + + + + + $e404 = FALSE; $class = ucfirst($RTR->class); @@ -423,17 +423,17 @@ if ( ! is_php('5.4')) { $e404 = TRUE; } - /** - * DO NOT CHANGE THIS, NOTHING ELSE WORKS! - * - * - method_exists() returns true for non-public methods, which passes the previous elseif - * - is_callable() returns false for PHP 4-style constructors, even if there's a __construct() - * - method_exists($class, '__construct') won't work because CI_Controller::__construct() is inherited - * - People will only complain if this doesn't work, even though it is documented that it shouldn't. - * - * ReflectionMethod::isConstructor() is the ONLY reliable check, - * knowing which method will be executed as a constructor. - */ + + + + + + + + + + + elseif ( ! is_callable(array($class, $method))) { $reflection = new ReflectionMethod($class, $method); @@ -462,7 +462,7 @@ if ( ! is_php('5.4')) require_once(APPPATH.'controllers/'.$RTR->directory.$error_class.'.php'); $e404 = ! class_exists($error_class, FALSE); } - // Were we in a directory? If so, check for a global override + elseif ( ! empty($RTR->directory) && file_exists(APPPATH.'controllers/'.$error_class.'.php')) { require_once(APPPATH.'controllers/'.$error_class.'.php'); @@ -478,7 +478,7 @@ if ( ! is_php('5.4')) } } - // Did we reset the $e404 flag? If so, set the rsegments, starting from index 1 + if ( ! $e404) { $class = $error_class; @@ -500,60 +500,60 @@ if ( ! is_php('5.4')) $params = array_slice($URI->rsegments, 2); } -/* - * ------------------------------------------------------ - * Is there a "pre_controller" hook? - * ------------------------------------------------------ - */ + + + + + $EXT->call_hook('pre_controller'); -/* - * ------------------------------------------------------ - * Instantiate the requested controller - * ------------------------------------------------------ - */ - // Mark a start point so we can benchmark the controller + + + + + + $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); $CI = new $class(); -/* - * ------------------------------------------------------ - * Is there a "post_controller_constructor" hook? - * ------------------------------------------------------ - */ + + + + + $EXT->call_hook('post_controller_constructor'); -/* - * ------------------------------------------------------ - * Call the requested method - * ------------------------------------------------------ - */ + + + + + call_user_func_array(array(&$CI, $method), $params); - // Mark a benchmark end point + $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); -/* - * ------------------------------------------------------ - * Is there a "post_controller" hook? - * ------------------------------------------------------ - */ + + + + + $EXT->call_hook('post_controller'); -/* - * ------------------------------------------------------ - * Send the final rendered output to the browser - * ------------------------------------------------------ - */ + + + + + if ($EXT->call_hook('display_override') === FALSE) { $OUT->_display(); } -/* - * ------------------------------------------------------ - * Is there a "post_system" hook? - * ------------------------------------------------------ - */ + + + + + $EXT->call_hook('post_system'); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Common.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Common.php index 624b5a9..61f4af3 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Common.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Common.php @@ -1,64 +1,64 @@ $val) { $config[$key] = $val; @@ -280,23 +280,23 @@ if ( ! function_exists('get_config')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('config_item')) { - /** - * Returns the specified config item - * - * @param string - * @return mixed - */ + + + + + + function config_item($item) { static $_config; if (empty($_config)) { - // references cannot be directly assigned to static variables, so we use an array + $_config[0] =& get_config(); } @@ -304,15 +304,15 @@ if ( ! function_exists('config_item')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('get_mimes')) { - /** - * Returns the MIME types array from config/mimes.php - * - * @return array - */ + + + + + function &get_mimes() { static $_mimes; @@ -333,18 +333,18 @@ if ( ! function_exists('get_mimes')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('is_https')) { - /** - * Is HTTPS? - * - * Determines if the application is accessed via an encrypted - * (HTTPS) connection. - * - * @return bool - */ + + + + + + + + function is_https() { if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') @@ -364,53 +364,53 @@ if ( ! function_exists('is_https')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('is_cli')) { - /** - * Is CLI? - * - * Test to see if a request was made from the command line. - * - * @return bool - */ + + + + + + + function is_cli() { return (PHP_SAPI === 'cli' OR defined('STDIN')); } } -// ------------------------------------------------------------------------ + if ( ! function_exists('show_error')) { - /** - * Error Handler - * - * This function lets us invoke the exception class and - * display errors using the standard error template located - * in application/views/errors/error_general.php - * This function will send the error page directly to the - * browser and exit. - * - * @param string - * @param int - * @param string - * @return void - */ + + + + + + + + + + + + + + function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered') { $status_code = abs($status_code); if ($status_code < 100) { - $exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN + $exit_status = $status_code + 9; $status_code = 500; } else { - $exit_status = 1; // EXIT_ERROR + $exit_status = 1; } $_error =& load_class('Exceptions', 'core'); @@ -419,50 +419,50 @@ if ( ! function_exists('show_error')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('show_404')) { - /** - * 404 Page Handler - * - * This function is similar to the show_error() function above - * However, instead of the standard error template it displays - * 404 errors. - * - * @param string - * @param bool - * @return void - */ + + + + + + + + + + + function show_404($page = '', $log_error = TRUE) { $_error =& load_class('Exceptions', 'core'); $_error->show_404($page, $log_error); - exit(4); // EXIT_UNKNOWN_FILE + exit(4); } } -// ------------------------------------------------------------------------ + if ( ! function_exists('log_message')) { - /** - * Error Logging Interface - * - * We use this as a simple mechanism to access the logging - * class and send messages to be logged. - * - * @param string the error level: 'error', 'debug' or 'info' - * @param string the error message - * @return void - */ + + + + + + + + + + function log_message($level, $message) { static $_log; if ($_log === NULL) { - // references cannot be directly assigned to static variables, so we use an array + $_log[0] =& load_class('Log', 'core'); } @@ -470,17 +470,17 @@ if ( ! function_exists('log_message')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('set_status_header')) { - /** - * Set HTTP Status Header - * - * @param int the status code - * @param string - * @return void - */ + + + + + + + function set_status_header($code = 200, $text = '') { if (is_cli()) @@ -571,44 +571,44 @@ if ( ! function_exists('set_status_header')) } } -// -------------------------------------------------------------------- + if ( ! function_exists('_error_handler')) { - /** - * Error Handler - * - * This is the custom error handler that is declared at the (relative) - * top of CodeIgniter.php. The main reason we use this is to permit - * PHP errors to be logged in our own log files since the user may - * not have access to server logs. Since this function effectively - * intercepts PHP errors, however, we also need to display errors - * based on the current error_reporting level. - * We do that with the use of a PHP error template. - * - * @param int $severity - * @param string $message - * @param string $filepath - * @param int $line - * @return void - */ + + + + + + + + + + + + + + + + + function _error_handler($severity, $message, $filepath, $line) { $is_error = (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); - // When an error occurred, set the status header to '500 Internal Server Error' - // to indicate to the client something went wrong. - // This can't be done within the $_error->show_php_error method because - // it is only called when the display_errors flag is set (which isn't usually - // the case in a production environment) or when errors are ignored because - // they are above the error_reporting threshold. + + + + + + if ($is_error) { set_status_header(500); } - // Should we ignore the error? We'll get the current error_reporting - // level and add its bits with the severity bits to find out. + + if (($severity & error_reporting()) !== $severity) { return; @@ -617,69 +617,69 @@ if ( ! function_exists('_error_handler')) $_error =& load_class('Exceptions', 'core'); $_error->log_exception($severity, $message, $filepath, $line); - // Should we display the error? + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_php_error($severity, $message, $filepath, $line); } - // If the error is fatal, the execution of the script should be stopped because - // errors can't be recovered from. Halting the script conforms with PHP's - // default error handling. See http://www.php.net/manual/en/errorfunc.constants.php + + + if ($is_error) { - exit(1); // EXIT_ERROR + exit(1); } } } -// ------------------------------------------------------------------------ + if ( ! function_exists('_exception_handler')) { - /** - * Exception Handler - * - * Sends uncaught exceptions to the logger and displays them - * only if display_errors is On so that they don't show up in - * production environments. - * - * @param Exception $exception - * @return void - */ + + + + + + + + + + function _exception_handler($exception) { $_error =& load_class('Exceptions', 'core'); $_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine()); is_cli() OR set_status_header(500); - // Should we display the error? + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_exception($exception); } - exit(1); // EXIT_ERROR + exit(1); } } -// ------------------------------------------------------------------------ + if ( ! function_exists('_shutdown_handler')) { - /** - * Shutdown Handler - * - * This is the shutdown handler that is declared at the top - * of CodeIgniter.php. The main reason we use this is to simulate - * a complete custom exception handler. - * - * E_STRICT is purposively neglected because such events may have - * been caught. Duplication or none? None is preferred for now. - * - * @link http://insomanic.me.uk/post/229851073/php-trick-catching-fatal-errors-e-error-with-a - * @return void - */ + + + + + + + + + + + + + function _shutdown_handler() { $last_error = error_get_last(); @@ -691,34 +691,34 @@ if ( ! function_exists('_shutdown_handler')) } } -// -------------------------------------------------------------------- + if ( ! function_exists('remove_invisible_characters')) { - /** - * Remove Invisible Characters - * - * This prevents sandwiching null characters - * between ascii characters, like Java\0script. - * - * @param string - * @param bool - * @return string - */ + + + + + + + + + + function remove_invisible_characters($str, $url_encoded = TRUE) { $non_displayables = array(); - // every control character except newline (dec 10), - // carriage return (dec 13) and horizontal tab (dec 09) + + if ($url_encoded) { - $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15 - $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31 - $non_displayables[] = '/%7f/i'; // url encoded 127 + $non_displayables[] = '/%0[0-8bcef]/i'; + $non_displayables[] = '/%1[0-9a-f]/i'; + $non_displayables[] = '/%7f/i'; } - $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 + $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; do { @@ -730,17 +730,17 @@ if ( ! function_exists('remove_invisible_characters')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('html_escape')) { - /** - * Returns HTML escaped variable. - * - * @param mixed $var The input string or array of strings to be escaped. - * @param bool $double_encode $double_encode set to FALSE prevents escaping twice. - * @return mixed The escaped string or array of strings as a result. - */ + + + + + + + function html_escape($var, $double_encode = TRUE) { if (empty($var)) @@ -762,20 +762,20 @@ if ( ! function_exists('html_escape')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('_stringify_attributes')) { - /** - * Stringify attributes for use in HTML tags. - * - * Helper function used to convert a string, array, or object - * of attributes to a string. - * - * @param mixed string, array, object - * @param bool - * @return string - */ + + + + + + + + + + function _stringify_attributes($attributes, $js = FALSE) { $atts = NULL; @@ -801,33 +801,33 @@ if ( ! function_exists('_stringify_attributes')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('function_usable')) { - /** - * Function usable - * - * Executes a function_exists() check, and if the Suhosin PHP - * extension is loaded - checks whether the function that is - * checked might be disabled in there as well. - * - * This is useful as function_exists() will return FALSE for - * functions disabled via the *disable_functions* php.ini - * setting, but not for *suhosin.executor.func.blacklist* and - * *suhosin.executor.disable_eval*. These settings will just - * terminate script execution if a disabled function is executed. - * - * The above described behavior turned out to be a bug in Suhosin, - * but even though a fix was committed for 0.9.34 on 2012-02-12, - * that version is yet to be released. This function will therefore - * be just temporary, but would probably be kept for a few years. - * - * @link http://www.hardened-php.net/suhosin/ - * @param string $function_name Function to check for - * @return bool TRUE if the function exists and is safe to call, - * FALSE otherwise. - */ + + + + + + + + + + + + + + + + + + + + + + + function function_usable($function_name) { static $_suhosin_func_blacklist; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Config.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Config.php index fc6c30f..7fa62ed 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Config.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Config.php @@ -1,91 +1,91 @@ config =& get_config(); - // Set the base_url automatically if none was provided + if (empty($this->config['base_url'])) { if (isset($_SERVER['SERVER_ADDR'])) @@ -113,16 +113,16 @@ class CI_Config { log_message('info', 'Config Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Load Config File - * - * @param string $file Configuration file name - * @param bool $use_sections Whether configuration values should be loaded into their own section - * @param bool $fail_gracefully Whether to just return FALSE or display an error message - * @return bool TRUE if the file was loaded correctly or FALSE on failure - */ + + + + + + + + + public function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE) { $file = ($file === '') ? 'config' : str_replace('.php', '', $file); @@ -185,15 +185,15 @@ class CI_Config { show_error('The configuration file '.$file.'.php does not exist.'); } - // -------------------------------------------------------------------- - /** - * Fetch a config file item - * - * @param string $item Config item name - * @param string $index Index name - * @return string|null The configuration item or NULL if the item doesn't exist - */ + + + + + + + + public function item($item, $index = '') { if ($index == '') @@ -204,14 +204,14 @@ class CI_Config { return isset($this->config[$index], $this->config[$index][$item]) ? $this->config[$index][$item] : NULL; } - // -------------------------------------------------------------------- - /** - * Fetch a config file item with slash appended (if not empty) - * - * @param string $item Config item name - * @return string|null The configuration item or NULL if the item doesn't exist - */ + + + + + + + public function slash_item($item) { if ( ! isset($this->config[$item])) @@ -226,26 +226,26 @@ class CI_Config { return rtrim($this->config[$item], '/').'/'; } - // -------------------------------------------------------------------- - /** - * Site URL - * - * Returns base_url . index_page [. uri_string] - * - * @uses CI_Config::_uri_string() - * - * @param string|string[] $uri URI string or an array of segments - * @param string $protocol - * @return string - */ + + + + + + + + + + + + public function site_url($uri = '', $protocol = NULL) { $base_url = $this->slash_item('base_url'); if (isset($protocol)) { - // For protocol-relative links + if ($protocol === '') { $base_url = substr($base_url, strpos($base_url, '//')); @@ -289,26 +289,26 @@ class CI_Config { return $base_url.$this->item('index_page').$uri; } - // ------------------------------------------------------------- - /** - * Base URL - * - * Returns base_url [. uri_string] - * - * @uses CI_Config::_uri_string() - * - * @param string|string[] $uri URI string or an array of segments - * @param string $protocol - * @return string - */ + + + + + + + + + + + + public function base_url($uri = '', $protocol = NULL) { $base_url = $this->slash_item('base_url'); if (isset($protocol)) { - // For protocol-relative links + if ($protocol === '') { $base_url = substr($base_url, strpos($base_url, '//')); @@ -322,17 +322,17 @@ class CI_Config { return $base_url.$this->_uri_string($uri); } - // ------------------------------------------------------------- - /** - * Build URI string - * - * @used-by CI_Config::site_url() - * @used-by CI_Config::base_url() - * - * @param string|string[] $uri URI string or an array of segments - * @return string - */ + + + + + + + + + + protected function _uri_string($uri) { if ($this->item('enable_query_strings') === FALSE) @@ -348,29 +348,29 @@ class CI_Config { return $uri; } - // -------------------------------------------------------------------- - /** - * System URL - * - * @deprecated 3.0.0 Encourages insecure practices - * @return string - */ + + + + + + + public function system_url() { $x = explode('/', preg_replace('|/*(.+?)/*$|', '\\1', BASEPATH)); return $this->slash_item('base_url').end($x).'/'; } - // -------------------------------------------------------------------- - /** - * Set a config file item - * - * @param string $item Config item key - * @param string $value Config item value - * @return void - */ + + + + + + + + public function set_item($item, $value) { $this->config[$item] = $value; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Controller.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Controller.php index 2bb1578..88db544 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Controller.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Controller.php @@ -1,75 +1,75 @@ $class) { $this->$var =& load_class($class); @@ -80,14 +80,14 @@ class CI_Controller { log_message('info', 'Controller Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Get the CI singleton - * - * @static - * @return object - */ + + + + + + + public static function &get_instance() { return self::$instance; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Exceptions.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Exceptions.php index 90ff1ab..df34c8b 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Exceptions.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Exceptions.php @@ -1,65 +1,65 @@ 'Error', E_WARNING => 'Warning', @@ -75,47 +75,47 @@ class CI_Exceptions { E_STRICT => 'Runtime Notice' ); - /** - * Class constructor - * - * @return void - */ + + + + + public function __construct() { $this->ob_level = ob_get_level(); - // Note: Do not log messages from this constructor. + } - // -------------------------------------------------------------------- - /** - * Exception Logger - * - * Logs PHP generated error messages - * - * @param int $severity Log level - * @param string $message Error message - * @param string $filepath File path - * @param int $line Line number - * @return void - */ + + + + + + + + + + + + public function log_exception($severity, $message, $filepath, $line) { $severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity; log_message('error', 'Severity: '.$severity.' --> '.$message.' '.$filepath.' '.$line); } - // -------------------------------------------------------------------- - /** - * 404 Error Handler - * - * @uses CI_Exceptions::show_error() - * - * @param string $page Page URI - * @param bool $log_error Whether to log the error - * @return void - */ + + + + + + + + + + public function show_404($page = '', $log_error = TRUE) { if (is_cli()) @@ -129,31 +129,31 @@ class CI_Exceptions { $message = 'The page you requested was not found.'; } - // By default we log this, but allow a dev to skip it + if ($log_error) { log_message('error', $heading.': '.$page); } echo $this->show_error($heading, $message, 'error_404', 404); - exit(4); // EXIT_UNKNOWN_FILE + exit(4); } - // -------------------------------------------------------------------- - /** - * General Error Page - * - * Takes an error message as input (either as a string or an array) - * and displays it using the specified template. - * - * @param string $heading Page heading - * @param string|string[] $message Error message - * @param string $template Template name - * @param int $status_code (default: 500) - * - * @return string Error page output - */ + + + + + + + + + + + + + + public function show_error($heading, $message, $template = 'error_general', $status_code = 500) { $templates_path = config_item('error_views_path'); @@ -185,7 +185,7 @@ class CI_Exceptions { return $buffer; } - // -------------------------------------------------------------------- + public function show_exception($exception) { @@ -222,17 +222,17 @@ class CI_Exceptions { echo $buffer; } - // -------------------------------------------------------------------- - /** - * Native PHP error handler - * - * @param int $severity Error level - * @param string $message Error message - * @param string $filepath File path - * @param int $line Line number - * @return void - */ + + + + + + + + + + public function show_php_error($severity, $message, $filepath, $line) { $templates_path = config_item('error_views_path'); @@ -243,7 +243,7 @@ class CI_Exceptions { $severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity; - // For safety reasons we don't show the full file path in non-CLI requests + if ( ! is_cli()) { $filepath = str_replace('\\', '/', $filepath); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Hooks.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Hooks.php index 6236dd4..2c52c69 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Hooks.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Hooks.php @@ -1,103 +1,103 @@ item('enable_hooks') === FALSE) { return; } - // Grab the "hooks" definition file. + if (file_exists(APPPATH.'config/hooks.php')) { include(APPPATH.'config/hooks.php'); @@ -108,7 +108,7 @@ class CI_Hooks { include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'); } - // If there are no hooks, we're done. + if ( ! isset($hook) OR ! is_array($hook)) { return; @@ -118,18 +118,18 @@ class CI_Hooks { $this->enabled = TRUE; } - // -------------------------------------------------------------------- - /** - * Call Hook - * - * Calls a particular hook. Called by CodeIgniter.php. - * - * @uses CI_Hooks::_run_hook() - * - * @param string $which Hook name - * @return bool TRUE on success or FALSE on failure - */ + + + + + + + + + + + public function call_hook($which = '') { if ( ! $this->enabled OR ! isset($this->hooks[$which])) @@ -152,19 +152,19 @@ class CI_Hooks { return TRUE; } - // -------------------------------------------------------------------- - /** - * Run Hook - * - * Runs a particular hook - * - * @param array $data Hook details - * @return bool TRUE on success or FALSE on failure - */ + + + + + + + + + protected function _run_hook($data) { - // Closures/lambda functions and array($object, 'method') callables + if (is_callable($data)) { is_array($data) @@ -178,20 +178,20 @@ class CI_Hooks { return FALSE; } - // ----------------------------------- - // Safety - Prevents run-away loops - // ----------------------------------- - // If the script being called happens to have the same - // hook call within it a loop can happen + + + + + if ($this->_in_progress === TRUE) { return; } - // ----------------------------------- - // Set file path - // ----------------------------------- + + + if ( ! isset($data['filepath'], $data['filename'])) { @@ -205,7 +205,7 @@ class CI_Hooks { return FALSE; } - // Determine and class and/or function names + $class = empty($data['class']) ? FALSE : $data['class']; $function = empty($data['function']) ? FALSE : $data['function']; $params = isset($data['params']) ? $data['params'] : ''; @@ -215,13 +215,13 @@ class CI_Hooks { return FALSE; } - // Set the _in_progress flag + $this->_in_progress = TRUE; - // Call the requested class and/or function + if ($class !== FALSE) { - // The object is stored? + if (isset($this->_objects[$class])) { if (method_exists($this->_objects[$class], $function)) @@ -242,7 +242,7 @@ class CI_Hooks { return $this->_in_progress = FALSE; } - // Store the object and execute the method + $this->_objects[$class] = new $class(); $this->_objects[$class]->$function($params); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Input.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Input.php index 30b31d0..349497f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Input.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Input.php @@ -1,140 +1,140 @@ _allow_get_array = (config_item('allow_get_array') !== FALSE); @@ -144,16 +144,16 @@ class CI_Input { $this->security =& load_class('Security', 'core'); - // Do we need the UTF-8 class? + if (UTF8_ENABLED === TRUE) { $this->uni =& load_class('Utf8', 'core'); } - // Sanitize global arrays + $this->_sanitize_globals(); - // CSRF Protection check + if ($this->_enable_csrf === TRUE && ! is_cli()) { $this->security->csrf_verify(); @@ -162,26 +162,26 @@ class CI_Input { log_message('info', 'Input Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Fetch from array - * - * Internal method used to retrieve values from global arrays. - * - * @param array &$array $_GET, $_POST, $_COOKIE, $_SERVER, etc. - * @param mixed $index Index for item to be fetched from $array - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + + + + protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = NULL) { is_bool($xss_clean) OR $xss_clean = $this->_enable_xss; - // If $index is NULL, it means that the whole $array is requested + isset($index) OR $index = array_keys($array); - // allow fetching multiple keys at once + if (is_array($index)) { $output = array(); @@ -197,13 +197,13 @@ class CI_Input { { $value = $array[$index]; } - elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) // Does the index contain array notation + elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) { $value = $array; for ($i = 0; $i < $count; $i++) { $key = trim($matches[0][$i], '[]'); - if ($key === '') // Empty notation will return the value as array + if ($key === '') { break; } @@ -228,43 +228,43 @@ class CI_Input { : $value; } - // -------------------------------------------------------------------- - /** - * Fetch an item from the GET array - * - * @param mixed $index Index for item to be fetched from $_GET - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function get($index = NULL, $xss_clean = NULL) { return $this->_fetch_from_array($_GET, $index, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Fetch an item from the POST array - * - * @param mixed $index Index for item to be fetched from $_POST - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function post($index = NULL, $xss_clean = NULL) { return $this->_fetch_from_array($_POST, $index, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Fetch an item from POST data with fallback to GET - * - * @param string $index Index for item to be fetched from $_POST or $_GET - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function post_get($index, $xss_clean = NULL) { return isset($_POST[$index]) @@ -272,15 +272,15 @@ class CI_Input { : $this->get($index, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Fetch an item from GET data with fallback to POST - * - * @param string $index Index for item to be fetched from $_GET or $_POST - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function get_post($index, $xss_clean = NULL) { return isset($_GET[$index]) @@ -288,52 +288,52 @@ class CI_Input { : $this->post($index, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Fetch an item from the COOKIE array - * - * @param mixed $index Index for item to be fetched from $_COOKIE - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function cookie($index = NULL, $xss_clean = NULL) { return $this->_fetch_from_array($_COOKIE, $index, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Fetch an item from the SERVER array - * - * @param mixed $index Index for item to be fetched from $_SERVER - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + public function server($index, $xss_clean = NULL) { return $this->_fetch_from_array($_SERVER, $index, $xss_clean); } - // ------------------------------------------------------------------------ - /** - * Fetch an item from the php://input stream - * - * Useful when you need to access PUT, DELETE or PATCH request data. - * - * @param string $index Index for item to be fetched - * @param bool $xss_clean Whether to apply XSS filtering - * @return mixed - */ + + + + + + + + + + public function input_stream($index = NULL, $xss_clean = NULL) { - // Prior to PHP 5.6, the input stream can only be read once, - // so we'll need to check if we have already done that first. + + if ( ! is_array($this->_input_stream)) { - // $this->raw_input_stream will trigger __get(). + parse_str($this->raw_input_stream, $this->_input_stream); is_array($this->_input_stream) OR $this->_input_stream = array(); } @@ -341,29 +341,29 @@ class CI_Input { return $this->_fetch_from_array($this->_input_stream, $index, $xss_clean); } - // ------------------------------------------------------------------------ - /** - * Set cookie - * - * Accepts an arbitrary number of parameters (up to 7) or an associative - * array in the first parameter containing all the values. - * - * @param string|mixed[] $name Cookie name or an array containing parameters - * @param string $value Cookie value - * @param int $expire Cookie expiration time in seconds - * @param string $domain Cookie domain (e.g.: '.yourdomain.com') - * @param string $path Cookie path (default: '/') - * @param string $prefix Cookie name prefix - * @param bool $secure Whether to only transfer cookies via SSL - * @param bool $httponly Whether to only makes the cookie accessible via HTTP (no javascript) - * @return void - */ + + + + + + + + + + + + + + + + + public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL) { if (is_array($name)) { - // always leave 'name' in last place, as the loop will break otherwise, due to $$item + foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'httponly', 'name') as $item) { if (isset($name[$item])) @@ -408,15 +408,15 @@ class CI_Input { setcookie($prefix.$name, $value, $expire, $path, $domain, $secure, $httponly); } - // -------------------------------------------------------------------- - /** - * Fetch the IP Address - * - * Determines and validates the visitor's IP address. - * - * @return string IP address - */ + + + + + + + + public function ip_address() { if ($this->ip_address !== FALSE) @@ -438,9 +438,9 @@ class CI_Input { { if (($spoof = $this->server($header)) !== NULL) { - // Some proxies typically list the whole chain of IP - // addresses through which the client has reached us. - // e.g. client_ip, proxy_ip1, proxy_ip2, etc. + + + sscanf($spoof, '%[^,]', $spoof); if ( ! $this->valid_ip($spoof)) @@ -458,11 +458,11 @@ class CI_Input { { for ($i = 0, $c = count($proxy_ips); $i < $c; $i++) { - // Check if we have an IP address or a subnet + if (strpos($proxy_ips[$i], '/') === FALSE) { - // An IP address (and not a subnet) is specified. - // We can compare right away. + + if ($proxy_ips[$i] === $this->ip_address) { $this->ip_address = $spoof; @@ -472,21 +472,21 @@ class CI_Input { continue; } - // We have a subnet ... now the heavy lifting begins + isset($separator) OR $separator = $this->valid_ip($this->ip_address, 'ipv6') ? ':' : '.'; - // If the proxy entry doesn't match the IP protocol - skip it + if (strpos($proxy_ips[$i], $separator) === FALSE) { continue; } - // Convert the REMOTE_ADDR IP address to binary, if needed + if ( ! isset($ip, $sprintf)) { if ($separator === ':') { - // Make sure we're have the "full" IPv6 format + $ip = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($this->ip_address, ':')), @@ -510,10 +510,10 @@ class CI_Input { $ip = vsprintf($sprintf, $ip); } - // Split the netmask length off the network address + sscanf($proxy_ips[$i], '%[^/]/%d', $netaddr, $masklen); - // Again, an IPv6 address is most likely in a compressed form + if ($separator === ':') { $netaddr = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($netaddr, ':')), $netaddr)); @@ -527,7 +527,7 @@ class CI_Input { $netaddr = explode('.', $netaddr); } - // Convert to binary and finally compare + if (strncmp($ip, vsprintf($sprintf, $netaddr), $masklen) === 0) { $this->ip_address = $spoof; @@ -545,15 +545,15 @@ class CI_Input { return $this->ip_address; } - // -------------------------------------------------------------------- - /** - * Validate IP Address - * - * @param string $ip IP address - * @param string $which IP protocol: 'ipv4' or 'ipv6' - * @return bool - */ + + + + + + + + public function valid_ip($ip, $which = '') { switch (strtolower($which)) @@ -572,34 +572,34 @@ class CI_Input { return (bool) filter_var($ip, FILTER_VALIDATE_IP, $which); } - // -------------------------------------------------------------------- - /** - * Fetch User Agent string - * - * @return string|null User Agent string or NULL if it doesn't exist - */ + + + + + + public function user_agent($xss_clean = NULL) { return $this->_fetch_from_array($_SERVER, 'HTTP_USER_AGENT', $xss_clean); } - // -------------------------------------------------------------------- - /** - * Sanitize Globals - * - * Internal method serving for the following purposes: - * - * - Unsets $_GET data, if query strings are not enabled - * - Cleans POST, COOKIE and SERVER data - * - Standardizes newline characters to PHP_EOL - * - * @return void - */ + + + + + + + + + + + + protected function _sanitize_globals() { - // Is $_GET data allowed? If not we'll set the $_GET to an empty array + if ($this->_allow_get_array === FALSE) { $_GET = array(); @@ -612,7 +612,7 @@ class CI_Input { } } - // Clean $_POST Data + if (is_array($_POST)) { foreach ($_POST as $key => $val) @@ -621,14 +621,14 @@ class CI_Input { } } - // Clean $_COOKIE Data + if (is_array($_COOKIE)) { - // Also get rid of specially treated cookies that might be set by a server - // or silly application, that are of no use to a CI application anyway - // but that when present will trip our 'Disallowed Key Characters' alarm - // http://www.ietf.org/rfc/rfc2109.txt - // note that the key names below are single quoted strings, and are not PHP variables + + + + + unset( $_COOKIE['$Version'], $_COOKIE['$Path'], @@ -648,23 +648,23 @@ class CI_Input { } } - // Sanitize PHP_SELF + $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); log_message('debug', 'Global POST, GET and COOKIE data sanitized'); } - // -------------------------------------------------------------------- - /** - * Clean Input Data - * - * Internal method that aids in escaping data and - * standardizing newline characters to PHP_EOL. - * - * @param string|string[] $str Input string(s) - * @return string - */ + + + + + + + + + + protected function _clean_input_data($str) { if (is_array($str)) @@ -677,26 +677,26 @@ class CI_Input { return $new_array; } - /* We strip slashes if magic quotes is on to keep things consistent - NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and - it will probably not exist in future versions at all. - */ + + + + if ( ! is_php('5.4') && get_magic_quotes_gpc()) { $str = stripslashes($str); } - // Clean UTF-8 if supported + if (UTF8_ENABLED === TRUE) { $str = $this->uni->clean_string($str); } - // Remove control characters + $str = remove_invisible_characters($str, FALSE); - // Standardize newlines if needed + if ($this->_standardize_newlines === TRUE) { return preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $str); @@ -705,21 +705,21 @@ class CI_Input { return $str; } - // -------------------------------------------------------------------- - /** - * Clean Keys - * - * Internal method that helps to prevent malicious users - * from trying to exploit keys we make sure that keys are - * only named with alpha-numeric text and a few other items. - * - * @param string $str Input string - * @param bool $fatal Whether to terminate script exection - * or to return FALSE if an invalid - * key is encountered - * @return string|bool - */ + + + + + + + + + + + + + + protected function _clean_input_keys($str, $fatal = TRUE) { if ( ! preg_match('/^[a-z0-9:_\/|-]+$/i', $str)) @@ -732,11 +732,11 @@ class CI_Input { { set_status_header(503); echo 'Disallowed Key Characters.'; - exit(7); // EXIT_USER_INPUT + exit(7); } } - // Clean UTF-8 if supported + if (UTF8_ENABLED === TRUE) { return $this->uni->clean_string($str); @@ -745,23 +745,23 @@ class CI_Input { return $str; } - // -------------------------------------------------------------------- - /** - * Request Headers - * - * @param bool $xss_clean Whether to apply XSS filtering - * @return array - */ + + + + + + + public function request_headers($xss_clean = FALSE) { - // If header is already defined, return it immediately + if ( ! empty($this->headers)) { return $this->_fetch_from_array($this->headers, NULL, $xss_clean); } - // In Apache, you can simply call apache_request_headers() + if (function_exists('apache_request_headers')) { $this->headers = apache_request_headers(); @@ -774,7 +774,7 @@ class CI_Input { { if (sscanf($key, 'HTTP_%s', $header) === 1) { - // take SOME_HEADER and turn it into Some-Header + $header = str_replace('_', ' ', strtolower($header)); $header = str_replace(' ', '-', ucwords($header)); @@ -786,17 +786,17 @@ class CI_Input { return $this->_fetch_from_array($this->headers, NULL, $xss_clean); } - // -------------------------------------------------------------------- - /** - * Get Request Header - * - * Returns the value of a single member of the headers class member - * - * @param string $index Header name - * @param bool $xss_clean Whether to apply XSS filtering - * @return string|null The requested header on success or NULL on failure - */ + + + + + + + + + + public function get_request_header($index, $xss_clean = FALSE) { static $headers; @@ -822,46 +822,46 @@ class CI_Input { : $headers[$index]; } - // -------------------------------------------------------------------- - /** - * Is AJAX request? - * - * Test to see if a request contains the HTTP_X_REQUESTED_WITH header. - * - * @return bool - */ + + + + + + + + public function is_ajax_request() { return ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'); } - // -------------------------------------------------------------------- - /** - * Is CLI request? - * - * Test to see if a request was made from the command line. - * - * @deprecated 3.0.0 Use is_cli() instead - * @return bool - */ + + + + + + + + + public function is_cli_request() { return is_cli(); } - // -------------------------------------------------------------------- - /** - * Get Request Method - * - * Return the request method - * - * @param bool $upper Whether to return in upper or lower case - * (default: FALSE) - * @return string - */ + + + + + + + + + + public function method($upper = FALSE) { return ($upper) @@ -869,16 +869,16 @@ class CI_Input { : strtolower($this->server('REQUEST_METHOD')); } - // ------------------------------------------------------------------------ - /** - * Magic __get() - * - * Allows read access to protected properties - * - * @param string $name - * @return mixed - */ + + + + + + + + + public function __get($name) { if ($name === 'raw_input_stream') diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Lang.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Lang.php index 2c8654d..3b806c8 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Lang.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Lang.php @@ -1,90 +1,90 @@ language[$line]) ? $this->language[$line] : FALSE; - // Because killer robots like unicorns! + if ($value === FALSE && $log_errors === TRUE) { log_message('error', 'Could not find the language line "'.$line.'"'); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Loader.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Loader.php index 14888e4..a187ebc 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Loader.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Loader.php @@ -1,138 +1,138 @@ TRUE); - /** - * List of paths to load libraries from - * - * @var array - */ + + + + + protected $_ci_library_paths = array(APPPATH, BASEPATH); - /** - * List of paths to load models from - * - * @var array - */ + + + + + protected $_ci_model_paths = array(APPPATH); - /** - * List of paths to load helpers from - * - * @var array - */ + + + + + protected $_ci_helper_paths = array(APPPATH, BASEPATH); - /** - * List of cached variables - * - * @var array - */ + + + + + protected $_ci_cached_vars = array(); - /** - * List of loaded classes - * - * @var array - */ + + + + + protected $_ci_classes = array(); - /** - * List of loaded models - * - * @var array - */ + + + + + protected $_ci_models = array(); - /** - * List of loaded helpers - * - * @var array - */ + + + + + protected $_ci_helpers = array(); - /** - * List of class name mappings - * - * @var array - */ + + + + + protected $_ci_varmap = array( 'unit_test' => 'unit', 'user_agent' => 'agent' ); - // -------------------------------------------------------------------- - /** - * Class constructor - * - * Sets component load paths, gets the initial output buffering level. - * - * @return void - */ + + + + + + + + public function __construct() { $this->_ci_ob_level = ob_get_level(); @@ -141,52 +141,52 @@ class CI_Loader { log_message('info', 'Loader Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Initializer - * - * @todo Figure out a way to move this to the constructor - * without breaking *package_path*() methods. - * @uses CI_Loader::_ci_autoloader() - * @used-by CI_Controller::__construct() - * @return void - */ + + + + + + + + + + public function initialize() { $this->_ci_autoloader(); } - // -------------------------------------------------------------------- - /** - * Is Loaded - * - * A utility method to test if a class is in the self::$_ci_classes array. - * - * @used-by Mainly used by Form Helper function _get_validation_object(). - * - * @param string $class Class name to check for - * @return string|bool Class object name if loaded or FALSE - */ + + + + + + + + + + + public function is_loaded($class) { return array_search(ucfirst($class), $this->_ci_classes, TRUE); } - // -------------------------------------------------------------------- - /** - * Library Loader - * - * Loads and instantiates libraries. - * Designed to be called from application controllers. - * - * @param mixed $library Library name - * @param array $params Optional parameters to pass to the library class constructor - * @param string $object_name An optional object name to assign to - * @return object - */ + + + + + + + + + + + + public function library($library, $params = NULL, $object_name = NULL) { if (empty($library)) @@ -219,18 +219,18 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Model Loader - * - * Loads and instantiates models. - * - * @param mixed $model Model name - * @param string $name An optional object name to assign to - * @param bool $db_conn An optional database connection configuration to initialize - * @return object - */ + + + + + + + + + + + public function model($model, $name = '', $db_conn = FALSE) { if (empty($model)) @@ -249,13 +249,13 @@ class CI_Loader { $path = ''; - // Is the model in a sub-folder? If so, parse out the filename and path. + if (($last_slash = strrpos($model, '/')) !== FALSE) { - // The path is in front of the last slash + $path = substr($model, 0, ++$last_slash); - // And the model name behind it + $model = substr($model, $last_slash); } @@ -285,14 +285,14 @@ class CI_Loader { $this->database($db_conn, FALSE, TRUE); } - // Note: All of the code under this condition used to be just: - // - // load_class('Model', 'core'); - // - // However, load_class() instantiates classes - // to cache them for later use and that prevents - // MY_Model from being an abstract class and is - // sub-optimal otherwise anyway. + + + + + + + + if ( ! class_exists('CI_Model', FALSE)) { $app_path = APPPATH.'core'.DIRECTORY_SEPARATOR; @@ -360,25 +360,25 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Database Loader - * - * @param mixed $params Database configuration options - * @param bool $return Whether to return the database object - * @param bool $query_builder Whether to enable Query Builder - * (overrides the configuration setting) - * - * @return object|bool Database object if $return is set to TRUE, - * FALSE on failure, CI_Loader instance in any other case - */ + + + + + + + + + + + + public function database($params = '', $return = FALSE, $query_builder = NULL) { - // Grab the super object + $CI =& get_instance(); - // Do we even need to load the database class? + if ($return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id)) { return FALSE; @@ -391,24 +391,24 @@ class CI_Loader { return DB($params, $query_builder); } - // Initialize the db variable. Needed to prevent - // reference errors with some configurations + + $CI->db = ''; - // Load the DB class + $CI->db =& DB($params, $query_builder); return $this; } - // -------------------------------------------------------------------- - /** - * Load the Database Utilities Class - * - * @param object $db Database object - * @param bool $return Whether to return the DB Utilities class object or not - * @return object - */ + + + + + + + + public function dbutil($db = NULL, $return = FALSE) { $CI =& get_instance(); @@ -432,15 +432,15 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Load the Database Forge Class - * - * @param object $db Database object - * @param bool $return Whether to return the DB Forge class object or not - * @return object - */ + + + + + + + + public function dbforge($db = NULL, $return = FALSE) { $CI =& get_instance(); @@ -476,53 +476,53 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * View Loader - * - * Loads "view" files. - * - * @param string $view View name - * @param array $vars An associative array of data - * to be extracted for use in the view - * @param bool $return Whether to return the view output - * or leave it to the Output class - * @return object|string - */ + + + + + + + + + + + + + public function view($view, $vars = array(), $return = FALSE) { return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return)); } - // -------------------------------------------------------------------- - /** - * Generic File Loader - * - * @param string $path File path - * @param bool $return Whether to return the file output - * @return object|string - */ + + + + + + + + public function file($path, $return = FALSE) { return $this->_ci_load(array('_ci_path' => $path, '_ci_return' => $return)); } - // -------------------------------------------------------------------- - /** - * Set Variables - * - * Once variables are set they become available within - * the controller class and its "view" files. - * - * @param array|object|string $vars - * An associative array or object containing values - * to be set, or a value's name if string - * @param string $val Value to set, only used if $vars is a string - * @return object - */ + + + + + + + + + + + + + public function vars($vars, $val = '') { $vars = is_string($vars) @@ -537,58 +537,58 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Clear Cached Variables - * - * Clears the cached variables. - * - * @return CI_Loader - */ + + + + + + + + public function clear_vars() { $this->_ci_cached_vars = array(); return $this; } - // -------------------------------------------------------------------- - /** - * Get Variable - * - * Check if a variable is set and retrieve it. - * - * @param string $key Variable name - * @return mixed The variable or NULL if not found - */ + + + + + + + + + public function get_var($key) { return isset($this->_ci_cached_vars[$key]) ? $this->_ci_cached_vars[$key] : NULL; } - // -------------------------------------------------------------------- - /** - * Get Variables - * - * Retrieves all loaded variables. - * - * @return array - */ + + + + + + + + public function get_vars() { return $this->_ci_cached_vars; } - // -------------------------------------------------------------------- - /** - * Helper Loader - * - * @param string|string[] $helpers Helper name(s) - * @return object - */ + + + + + + + public function helper($helpers = array()) { is_array($helpers) OR $helpers = array($helpers); @@ -604,7 +604,7 @@ class CI_Loader { continue; } - // Is this a helper extension request? + $ext_helper = config_item('subclass_prefix').$filename; $ext_loaded = FALSE; foreach ($this->_ci_helper_paths as $path) @@ -616,7 +616,7 @@ class CI_Loader { } } - // If we have loaded extensions - check if the base one is here + if ($ext_loaded === TRUE) { $base_helper = BASEPATH.'helpers/'.$helper.'.php'; @@ -631,7 +631,7 @@ class CI_Loader { continue; } - // No extensions found ... try loading regular helpers and/or overrides + foreach ($this->_ci_helper_paths as $path) { if (file_exists($path.'helpers/'.$helper.'.php')) @@ -644,7 +644,7 @@ class CI_Loader { } } - // unable to load the helper + if ( ! isset($this->_ci_helpers[$helper])) { show_error('Unable to load the requested file: helpers/'.$helper.'.php'); @@ -654,72 +654,72 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Load Helpers - * - * An alias for the helper() method in case the developer has - * written the plural form of it. - * - * @uses CI_Loader::helper() - * @param string|string[] $helpers Helper name(s) - * @return object - */ + + + + + + + + + + + public function helpers($helpers = array()) { return $this->helper($helpers); } - // -------------------------------------------------------------------- - /** - * Language Loader - * - * Loads language files. - * - * @param string|string[] $files List of language file names to load - * @param string Language name - * @return object - */ + + + + + + + + + + public function language($files, $lang = '') { get_instance()->lang->load($files, $lang); return $this; } - // -------------------------------------------------------------------- - /** - * Config Loader - * - * Loads a config file (an alias for CI_Config::load()). - * - * @uses CI_Config::load() - * @param string $file Configuration file name - * @param bool $use_sections Whether configuration values should be loaded into their own section - * @param bool $fail_gracefully Whether to just return FALSE or display an error message - * @return bool TRUE if the file was loaded correctly or FALSE on failure - */ + + + + + + + + + + + + public function config($file, $use_sections = FALSE, $fail_gracefully = FALSE) { return get_instance()->config->load($file, $use_sections, $fail_gracefully); } - // -------------------------------------------------------------------- - /** - * Driver Loader - * - * Loads a driver library. - * - * @param string|string[] $library Driver name(s) - * @param array $params Optional parameters to pass to the driver - * @param string $object_name An optional object name to assign to - * - * @return object|bool Object or FALSE on failure if $library is a string - * and $object_name is set. CI_Loader instance otherwise. - */ + + + + + + + + + + + + + public function driver($library, $params = NULL, $object_name = NULL) { if (is_array($library)) @@ -745,12 +745,12 @@ class CI_Loader { if ( ! class_exists('CI_Driver_Library', FALSE)) { - // We aren't instantiating an object here, just making the base class available + require BASEPATH.'libraries/Driver.php'; } - // We can save the loader some time since Drivers will *always* be in a subfolder, - // and typically identically named to the library + + if ( ! strpos($library, '/')) { $library = ucfirst($library).'/'.$library; @@ -759,23 +759,23 @@ class CI_Loader { return $this->library($library, $params, $object_name); } - // -------------------------------------------------------------------- - /** - * Add Package Path - * - * Prepends a parent path to the library, model, helper and config - * path arrays. - * - * @see CI_Loader::$_ci_library_paths - * @see CI_Loader::$_ci_model_paths - * @see CI_Loader::$_ci_helper_paths - * @see CI_Config::$_config_paths - * - * @param string $path Path to add - * @param bool $view_cascade (default: TRUE) - * @return object - */ + + + + + + + + + + + + + + + + public function add_package_path($path, $view_cascade = TRUE) { $path = rtrim($path, '/').'/'; @@ -786,40 +786,40 @@ class CI_Loader { $this->_ci_view_paths = array($path.'views/' => $view_cascade) + $this->_ci_view_paths; - // Add config file path + $config =& $this->_ci_get_component('config'); $config->_config_paths[] = $path; return $this; } - // -------------------------------------------------------------------- - /** - * Get Package Paths - * - * Return a list of all package paths. - * - * @param bool $include_base Whether to include BASEPATH (default: FALSE) - * @return array - */ + + + + + + + + + public function get_package_paths($include_base = FALSE) { return ($include_base === TRUE) ? $this->_ci_library_paths : $this->_ci_model_paths; } - // -------------------------------------------------------------------- - /** - * Remove Package Path - * - * Remove a path from the library, model, helper and/or config - * path arrays if it exists. If no path is provided, the most recently - * added path will be removed removed. - * - * @param string $path Path to remove - * @return object - */ + + + + + + + + + + + public function remove_package_path($path = '') { $config =& $this->_ci_get_component('config'); @@ -854,7 +854,7 @@ class CI_Loader { } } - // make sure the application default paths are still in the array + $this->_ci_library_paths = array_unique(array_merge($this->_ci_library_paths, array(APPPATH, BASEPATH))); $this->_ci_helper_paths = array_unique(array_merge($this->_ci_helper_paths, array(APPPATH, BASEPATH))); $this->_ci_model_paths = array_unique(array_merge($this->_ci_model_paths, array(APPPATH))); @@ -864,24 +864,24 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Internal CI Data Loader - * - * Used to load views and files. - * - * Variables are prefixed with _ci_ to avoid symbol collision with - * variables made available to view files. - * - * @used-by CI_Loader::view() - * @used-by CI_Loader::file() - * @param array $_ci_data Data to load - * @return object - */ + + + + + + + + + + + + + + protected function _ci_load($_ci_data) { - // Set the default data variables + foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val) { $$_ci_val = isset($_ci_data[$_ci_val]) ? $_ci_data[$_ci_val] : FALSE; @@ -889,7 +889,7 @@ class CI_Loader { $file_exists = FALSE; - // Set the path to the requested file + if (is_string($_ci_path) && $_ci_path !== '') { $_ci_x = explode('/', $_ci_path); @@ -921,8 +921,8 @@ class CI_Loader { show_error('Unable to load the requested file: '.$_ci_file); } - // This allows anything loaded using $this->load (views, files, etc.) - // to become accessible from within the Controller and Model functions. + + $_ci_CI =& get_instance(); foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var) { @@ -932,45 +932,45 @@ class CI_Loader { } } - /* - * Extract and cache variables - * - * You can either set variables using the dedicated $this->load->vars() - * function or via the second parameter of this function. We'll merge - * the two types and cache them so that views that are embedded within - * other views can have access to these variables. - */ + + + + + + + + empty($_ci_vars) OR $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars); extract($this->_ci_cached_vars); - /* - * Buffer the output - * - * We buffer the output for two reasons: - * 1. Speed. You get a significant speed boost. - * 2. So that the final rendered template can be post-processed by - * the output class. Why do we need post processing? For one thing, - * in order to show the elapsed page load time. Unless we can - * intercept the content right before it's sent to the browser and - * then stop the timer it won't be accurate. - */ + + + + + + + + + + + ob_start(); - // If the PHP installation does not support short tags we'll - // do a little string replacement, changing the short tags - // to standard PHP echo statements. + + + if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE) { echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace(' $this->_ci_ob_level + 1) { ob_end_flush(); @@ -1000,34 +1000,34 @@ class CI_Loader { return $this; } - // -------------------------------------------------------------------- - /** - * Internal CI Library Loader - * - * @used-by CI_Loader::library() - * @uses CI_Loader::_ci_init_library() - * - * @param string $class Class name to load - * @param mixed $params Optional parameters to pass to the class constructor - * @param string $object_name Optional object name to assign to - * @return void - */ + + + + + + + + + + + + protected function _ci_load_library($class, $params = NULL, $object_name = NULL) { - // Get the class name, and while we're at it trim any slashes. - // The directory path can be included as part of the class name, - // but we don't want a leading slash + + + $class = str_replace('.php', '', trim($class, '/')); - // Was the path included with the class name? - // We look for a slash to determine this + + if (($last_slash = strrpos($class, '/')) !== FALSE) { - // Extract the path + $subdir = substr($class, 0, ++$last_slash); - // Get the filename from the path + $class = substr($class, $last_slash); } else @@ -1037,13 +1037,13 @@ class CI_Loader { $class = ucfirst($class); - // Is this a stock library? There are a few special conditions if so ... + if (file_exists(BASEPATH.'libraries/'.$subdir.$class.'.php')) { return $this->_ci_load_stock_library($class, $subdir, $params, $object_name); } - // Safety: Was the class already loaded by a previous call? + if (class_exists($class, FALSE)) { $property = $object_name; @@ -1063,17 +1063,17 @@ class CI_Loader { return $this->_ci_init_library($class, '', $params, $object_name); } - // Let's search for the requested library file and load it. + foreach ($this->_ci_library_paths as $path) { - // BASEPATH has already been checked for + if ($path === BASEPATH) { continue; } $filepath = $path.'libraries/'.$subdir.$class.'.php'; - // Does the file exist? No? Bummer... + if ( ! file_exists($filepath)) { continue; @@ -1083,31 +1083,31 @@ class CI_Loader { return $this->_ci_init_library($class, '', $params, $object_name); } - // One last attempt. Maybe the library is in a subdirectory, but it wasn't specified? + if ($subdir === '') { return $this->_ci_load_library($class.'/'.$class, $params, $object_name); } - // If we got this far we were unable to find the requested class. + log_message('error', 'Unable to load the requested class: '.$class); show_error('Unable to load the requested class: '.$class); } - // -------------------------------------------------------------------- - /** - * Internal CI Stock Library Loader - * - * @used-by CI_Loader::_ci_load_library() - * @uses CI_Loader::_ci_init_library() - * - * @param string $library_name Library name to load - * @param string $file_path Path to the library filename, relative to libraries/ - * @param mixed $params Optional parameters to pass to the class constructor - * @param string $object_name Optional object name to assign to - * @return void - */ + + + + + + + + + + + + + protected function _ci_load_stock_library($library_name, $file_path, $params, $object_name) { $prefix = 'CI_'; @@ -1137,15 +1137,15 @@ class CI_Loader { } $paths = $this->_ci_library_paths; - array_pop($paths); // BASEPATH - array_pop($paths); // APPPATH (needs to be the first path checked) + array_pop($paths); + array_pop($paths); array_unshift($paths, APPPATH); foreach ($paths as $path) { if (file_exists($path = $path.'libraries/'.$file_path.$library_name.'.php')) { - // Override + include_once($path); if (class_exists($prefix.$library_name, FALSE)) { @@ -1158,7 +1158,7 @@ class CI_Loader { include_once(BASEPATH.'libraries/'.$file_path.$library_name.'.php'); - // Check for extensions + $subclass = config_item('subclass_prefix').$library_name; foreach ($paths as $path) { @@ -1178,29 +1178,29 @@ class CI_Loader { return $this->_ci_init_library($library_name, $prefix, $params, $object_name); } - // -------------------------------------------------------------------- - /** - * Internal CI Library Instantiator - * - * @used-by CI_Loader::_ci_load_stock_library() - * @used-by CI_Loader::_ci_load_library() - * - * @param string $class Class name - * @param string $prefix Class name prefix - * @param array|null|bool $config Optional configuration to pass to the class constructor: - * FALSE to skip; - * NULL to search in config paths; - * array containing configuration data - * @param string $object_name Optional object name to assign to - * @return void - */ + + + + + + + + + + + + + + + + protected function _ci_init_library($class, $prefix, $config = FALSE, $object_name = NULL) { - // Is there an associated config file for this class? Note: these should always be lowercase + if ($config === NULL) { - // Fetch the config paths containing any package paths + $config_component = $this->_ci_get_component('config'); if (is_array($config_component->_config_paths)) @@ -1208,9 +1208,9 @@ class CI_Loader { $found = FALSE; foreach ($config_component->_config_paths as $path) { - // We test for both uppercase and lowercase, for servers that - // are case-sensitive with regard to file names. Load global first, - // override with environment next + + + if (file_exists($path.'config/'.strtolower($class).'.php')) { include($path.'config/'.strtolower($class).'.php'); @@ -1233,8 +1233,8 @@ class CI_Loader { $found = TRUE; } - // Break on the first found configuration, thus package - // files are not overridden by default paths + + if ($found === TRUE) { break; @@ -1245,15 +1245,15 @@ class CI_Loader { $class_name = $prefix.$class; - // Is the class name valid? + if ( ! class_exists($class_name, FALSE)) { log_message('error', 'Non-existent class: '.$class_name); show_error('Non-existent class: '.$class_name); } - // Set the variable name we will assign the class to - // Was a custom class name supplied? If so we'll use it + + if (empty($object_name)) { $object_name = strtolower($class); @@ -1263,7 +1263,7 @@ class CI_Loader { } } - // Don't overwrite existing properties + $CI =& get_instance(); if (isset($CI->$object_name)) { @@ -1276,25 +1276,25 @@ class CI_Loader { show_error("Resource '".$object_name."' already exists and is not a ".$class_name." instance."); } - // Save the class name and object name + $this->_ci_classes[$object_name] = $class; - // Instantiate the class + $CI->$object_name = isset($config) ? new $class_name($config) : new $class_name(); } - // -------------------------------------------------------------------- - /** - * CI Autoloader - * - * Loads component listed in the config/autoload.php file. - * - * @used-by CI_Loader::initialize() - * @return void - */ + + + + + + + + + protected function _ci_autoloader() { if (file_exists(APPPATH.'config/autoload.php')) @@ -1312,7 +1312,7 @@ class CI_Loader { return; } - // Autoload packages + if (isset($autoload['packages'])) { foreach ($autoload['packages'] as $package_path) @@ -1321,7 +1321,7 @@ class CI_Loader { } } - // Load any custom config file + if (count($autoload['config']) > 0) { foreach ($autoload['config'] as $val) @@ -1330,7 +1330,7 @@ class CI_Loader { } } - // Autoload helpers and languages + foreach (array('helper', 'language') as $type) { if (isset($autoload[$type]) && count($autoload[$type]) > 0) @@ -1339,44 +1339,44 @@ class CI_Loader { } } - // Autoload drivers + if (isset($autoload['drivers'])) { $this->driver($autoload['drivers']); } - // Load libraries + if (isset($autoload['libraries']) && count($autoload['libraries']) > 0) { - // Load the database driver. + if (in_array('database', $autoload['libraries'])) { $this->database(); $autoload['libraries'] = array_diff($autoload['libraries'], array('database')); } - // Load all other libraries + $this->library($autoload['libraries']); } - // Autoload models + if (isset($autoload['model'])) { $this->model($autoload['model']); } } - // -------------------------------------------------------------------- - /** - * Prepare variables for _ci_vars, to be later extract()-ed inside views - * - * Converts objects to associative arrays and filters-out internal - * variable names (i.e. keys prefixed with '_ci_'). - * - * @param mixed $vars - * @return array - */ + + + + + + + + + + protected function _ci_prepare_view_vars($vars) { if ( ! is_array($vars)) @@ -1397,16 +1397,16 @@ class CI_Loader { return $vars; } - // -------------------------------------------------------------------- - /** - * CI Component getter - * - * Get a reference to a specific library or model. - * - * @param string $component Component name - * @return bool - */ + + + + + + + + + protected function &_ci_get_component($component) { $CI =& get_instance(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Log.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Log.php index 4338aa9..d5226ac 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Log.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Log.php @@ -1,123 +1,123 @@ 1, 'DEBUG' => 2, 'INFO' => 3, 'ALL' => 4); - /** - * mbstring.func_overload flag - * - * @var bool - */ + + + + + protected static $func_overload; - // -------------------------------------------------------------------- - /** - * Class constructor - * - * @return void - */ + + + + + + public function __construct() { $config =& get_config(); @@ -156,17 +156,17 @@ class CI_Log { } } - // -------------------------------------------------------------------- - /** - * Write Log File - * - * Generally this function will be called using the global log_message() function - * - * @param string $level The error level: 'error', 'debug' or 'info' - * @param string $msg The error message - * @return bool - */ + + + + + + + + + + public function write_log($level, $msg) { if ($this->_enabled === FALSE) @@ -188,7 +188,7 @@ class CI_Log { if ( ! file_exists($filepath)) { $newfile = TRUE; - // Only add protection to php files + if ($this->_file_ext === 'php') { $message .= "\n\n"; @@ -202,7 +202,7 @@ class CI_Log { flock($fp, LOCK_EX); - // Instantiating DateTime with microseconds appended to initial date is needed for proper support of this format + if (strpos($this->_date_fmt, 'u') !== FALSE) { $microtime_full = microtime(TRUE); @@ -236,32 +236,32 @@ class CI_Log { return is_int($result); } - // -------------------------------------------------------------------- - /** - * Format the log line. - * - * This is for extensibility of log formatting - * If you want to change the log format, extend the CI_Log class and override this method - * - * @param string $level The error level - * @param string $date Formatted date string - * @param string $message The log message - * @return string Formatted log line with a new line character '\n' at the end - */ + + + + + + + + + + + + protected function _format_line($level, $date, $message) { return $level.' - '.$date.' --> '.$message."\n"; } - // -------------------------------------------------------------------- - /** - * Byte-safe strlen() - * - * @param string $str - * @return int - */ + + + + + + + protected static function strlen($str) { return (self::$func_overload) @@ -269,22 +269,22 @@ class CI_Log { : strlen($str); } - // -------------------------------------------------------------------- - /** - * Byte-safe substr() - * - * @param string $str - * @param int $start - * @param int $length - * @return string - */ + + + + + + + + + protected static function substr($str, $start, $length = NULL) { if (self::$func_overload) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 + + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Model.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Model.php index 0aadbcd..6734103 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Model.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Model.php @@ -1,75 +1,75 @@ $key; } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Output.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Output.php index 64e7ee1..6a2530e 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Output.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Output.php @@ -1,141 +1,141 @@ _zlib_oc = (bool) ini_get('zlib.output_compression'); @@ -147,78 +147,78 @@ class CI_Output { isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload')); - // Get mime types for later + $this->mimes =& get_mimes(); log_message('info', 'Output Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Get Output - * - * Returns the current output string. - * - * @return string - */ + + + + + + + + public function get_output() { return $this->final_output; } - // -------------------------------------------------------------------- - /** - * Set Output - * - * Sets the output string. - * - * @param string $output Output data - * @return CI_Output - */ + + + + + + + + + public function set_output($output) { $this->final_output = $output; return $this; } - // -------------------------------------------------------------------- - /** - * Append Output - * - * Appends data onto the output string. - * - * @param string $output Data to append - * @return CI_Output - */ + + + + + + + + + public function append_output($output) { $this->final_output .= $output; return $this; } - // -------------------------------------------------------------------- - /** - * Set Header - * - * Lets you set a server header which will be sent with the final output. - * - * Note: If a file is cached, headers will not be sent. - * @todo We need to figure out how to permit headers to be cached. - * - * @param string $header Header - * @param bool $replace Whether to replace the old header value, if already set - * @return CI_Output - */ + + + + + + + + + + + + + public function set_header($header, $replace = TRUE) { - // If zlib.output_compression is enabled it will compress the output, - // but it will not modify the content-length header to compensate for - // the reduction, causing the browser to hang waiting for more data. - // We'll just skip content-length in those cases. + + + + if ($this->_zlib_oc && strncasecmp($header, 'content-length', 14) === 0) { return $this; @@ -228,22 +228,22 @@ class CI_Output { return $this; } - // -------------------------------------------------------------------- - /** - * Set Content-Type Header - * - * @param string $mime_type Extension of the file we're outputting - * @param string $charset Character set (default: NULL) - * @return CI_Output - */ + + + + + + + + public function set_content_type($mime_type, $charset = NULL) { if (strpos($mime_type, '/') === FALSE) { $extension = ltrim($mime_type, '.'); - // Is this extension supported? + if (isset($this->mimes[$extension])) { $mime_type =& $this->mimes[$extension]; @@ -269,13 +269,13 @@ class CI_Output { return $this; } - // -------------------------------------------------------------------- - /** - * Get Current Content-Type Header - * - * @return string 'text/html', if not already set - */ + + + + + + public function get_content_type() { for ($i = 0, $c = count($this->headers); $i < $c; $i++) @@ -289,19 +289,19 @@ class CI_Output { return 'text/html'; } - // -------------------------------------------------------------------- - /** - * Get Header - * - * @param string $header - * @return string - */ + + + + + + + public function get_header($header) { - // Combine headers already sent with our batched headers + $headers = array_merge( - // We only need [x][0] from our multi-dimensional array + array_map('array_shift', $this->headers), headers_list() ); @@ -311,7 +311,7 @@ class CI_Output { return NULL; } - // Count backwards, in order to get the last matching header + for ($c = count($headers) - 1; $c > -1; $c--) { if (strncasecmp($header, $headers[$c], $l = self::strlen($header)) === 0) @@ -323,49 +323,49 @@ class CI_Output { return NULL; } - // -------------------------------------------------------------------- - /** - * Set HTTP Status Header - * - * As of version 1.7.2, this is an alias for common function - * set_status_header(). - * - * @param int $code Status code (default: 200) - * @param string $text Optional message - * @return CI_Output - */ + + + + + + + + + + + public function set_status_header($code = 200, $text = '') { set_status_header($code, $text); return $this; } - // -------------------------------------------------------------------- - /** - * Enable/disable Profiler - * - * @param bool $val TRUE to enable or FALSE to disable - * @return CI_Output - */ + + + + + + + public function enable_profiler($val = TRUE) { $this->enable_profiler = is_bool($val) ? $val : TRUE; return $this; } - // -------------------------------------------------------------------- - /** - * Set Profiler Sections - * - * Allows override of default/config settings for - * Profiler section display. - * - * @param array $sections Profiler sections - * @return CI_Output - */ + + + + + + + + + + public function set_profiler_sections($sections) { if (isset($sections['query_toggle_count'])) @@ -382,72 +382,72 @@ class CI_Output { return $this; } - // -------------------------------------------------------------------- - /** - * Set Cache - * - * @param int $time Cache expiration time in minutes - * @return CI_Output - */ + + + + + + + public function cache($time) { $this->cache_expiration = is_numeric($time) ? $time : 0; return $this; } - // -------------------------------------------------------------------- - /** - * Display Output - * - * Processes and sends finalized output data to the browser along - * with any server headers and profile data. It also stops benchmark - * timers so the page rendering speed and memory usage can be shown. - * - * Note: All "view" data is automatically put into $this->final_output - * by controller class. - * - * @uses CI_Output::$final_output - * @param string $output Output data override - * @return void - */ + + + + + + + + + + + + + + + public function _display($output = '') { - // Note: We use load_class() because we can't use $CI =& get_instance() - // since this function is sometimes called by the caching mechanism, - // which happens before the CI super object is available. + + + $BM =& load_class('Benchmark', 'core'); $CFG =& load_class('Config', 'core'); - // Grab the super object if we can. + if (class_exists('CI_Controller', FALSE)) { $CI =& get_instance(); } - // -------------------------------------------------------------------- - // Set the output data + + if ($output === '') { $output =& $this->final_output; } - // -------------------------------------------------------------------- - // Do we need to write a cache file? Only if the controller does not have its - // own _output() method and we are not dealing with a cache file, which we - // can determine by the existence of the $CI object above + + + + if ($this->cache_expiration > 0 && isset($CI) && ! method_exists($CI, '_output')) { $this->_write_cache($output); } - // -------------------------------------------------------------------- - // Parse out the elapsed time and memory usage, - // then swap the pseudo-variables with the data + + + $elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end'); @@ -457,19 +457,19 @@ class CI_Output { $output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output); } - // -------------------------------------------------------------------- - // Is compression requested? - if (isset($CI) // This means that we're not serving a cache file, if we were, it would already be compressed + + + if (isset($CI) && $this->_compress_output === TRUE && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) { ob_start('ob_gzhandler'); } - // -------------------------------------------------------------------- - // Are there any server headers to send? + + if (count($this->headers) > 0) { foreach ($this->headers as $header) @@ -478,11 +478,11 @@ class CI_Output { } } - // -------------------------------------------------------------------- - // Does the $CI object exist? - // If not we know we are dealing with a cache file so we'll - // simply echo out the data and exit. + + + + if ( ! isset($CI)) { if ($this->_compress_output === TRUE) @@ -494,8 +494,8 @@ class CI_Output { } else { - // User agent doesn't support gzip compression, - // so we'll have to decompress our cache + + $output = gzinflate(self::substr($output, 10, -8)); } } @@ -506,10 +506,10 @@ class CI_Output { return; } - // -------------------------------------------------------------------- - // Do we need to generate profile data? - // If so, load the Profile class and run it. + + + if ($this->enable_profiler === TRUE) { $CI->load->library('profiler'); @@ -518,8 +518,8 @@ class CI_Output { $CI->profiler->set_sections($this->_profiler_sections); } - // If the output data contains closing and tags - // we will remove them and add them back after we insert the profile data + + $output = preg_replace('|.*?|is', '', $output, -1, $count).$CI->profiler->run(); if ($count > 0) { @@ -527,29 +527,29 @@ class CI_Output { } } - // Does the controller contain a function named _output()? - // If so send the output there. Otherwise, echo it. + + if (method_exists($CI, '_output')) { $CI->_output($output); } else { - echo $output; // Send it to the browser! + echo $output; } log_message('info', 'Final output sent to browser'); log_message('debug', 'Total execution time: '.$elapsed); } - // -------------------------------------------------------------------- - /** - * Write Cache - * - * @param string $output Output data to cache - * @return void - */ + + + + + + + public function _write_cache($output) { $CI =& get_instance(); @@ -593,9 +593,9 @@ class CI_Output { return; } - // If output compression is enabled, compress the cache - // itself, so that we don't have to do that each time - // we're serving it + + + if ($this->_compress_output === TRUE) { $output = gzencode($output); @@ -608,7 +608,7 @@ class CI_Output { $expire = time() + ($this->cache_expiration * 60); - // Put together our serialized info. + $cache_info = serialize(array( 'expire' => $expire, 'headers' => $this->headers @@ -637,27 +637,27 @@ class CI_Output { chmod($cache_path, 0640); log_message('debug', 'Cache file written: '.$cache_path); - // Send HTTP cache-control headers to browser to match file cache settings. + $this->set_cache_header($_SERVER['REQUEST_TIME'], $expire); } - // -------------------------------------------------------------------- - /** - * Update/serve cached output - * - * @uses CI_Config - * @uses CI_URI - * - * @param object &$CFG CI_Config class instance - * @param object &$URI CI_URI class instance - * @return bool TRUE on success or FALSE on failure - */ + + + + + + + + + + + public function _display_cache(&$CFG, &$URI) { $cache_path = ($CFG->item('cache_path') === '') ? APPPATH.'cache/' : $CFG->item('cache_path'); - // Build the file path. The file name is an MD5 hash of the full URI + $uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string; if (($cache_query_string = $CFG->item('cache_query_string')) && ! empty($_SERVER['QUERY_STRING'])) @@ -686,7 +686,7 @@ class CI_Output { flock($fp, LOCK_UN); fclose($fp); - // Look for embedded serialized file info. + if ( ! preg_match('/^(.*)ENDCI--->/', $cache, $match)) { return FALSE; @@ -697,38 +697,38 @@ class CI_Output { $last_modified = filemtime($filepath); - // Has the file expired? + if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path)) { - // If so we'll delete it. + @unlink($filepath); log_message('debug', 'Cache file has expired. File deleted.'); return FALSE; } - // Send the HTTP cache control headers + $this->set_cache_header($last_modified, $expire); - // Add headers from cache file. + foreach ($cache_info['headers'] as $header) { $this->set_header($header[0], $header[1]); } - // Display the cache + $this->_display(self::substr($cache, self::strlen($match[0]))); log_message('debug', 'Cache file is current. Sending it to browser.'); return TRUE; } - // -------------------------------------------------------------------- - /** - * Delete cache - * - * @param string $uri URI string - * @return bool - */ + + + + + + + public function delete_cache($uri = '') { $CI =& get_instance(); @@ -772,18 +772,18 @@ class CI_Output { return TRUE; } - // -------------------------------------------------------------------- - /** - * Set Cache Header - * - * Set the HTTP headers to match the server-side file cache settings - * in order to reduce bandwidth. - * - * @param int $last_modified Timestamp of when the page was last modified - * @param int $expiration Timestamp of when should the requested page expire from cache - * @return void - */ + + + + + + + + + + + public function set_cache_header($last_modified, $expiration) { $max_age = $expiration - $_SERVER['REQUEST_TIME']; @@ -800,14 +800,14 @@ class CI_Output { header('Last-modified: '.gmdate('D, d M Y H:i:s', $last_modified).' GMT'); } - // -------------------------------------------------------------------- - /** - * Byte-safe strlen() - * - * @param string $str - * @return int - */ + + + + + + + protected static function strlen($str) { return (self::$func_overload) @@ -815,22 +815,22 @@ class CI_Output { : strlen($str); } - // -------------------------------------------------------------------- - /** - * Byte-safe substr() - * - * @param string $str - * @param int $start - * @param int $length - * @return string - */ + + + + + + + + + protected static function substr($str, $start, $length = NULL) { if (self::$func_overload) { - // mb_substr($str, $start, null, '8bit') returns an empty - // string on PHP 5.3 + + isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start); return mb_substr($str, $start, $length, '8bit'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Router.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Router.php index 90b69d0..990fa5c 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Router.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Router.php @@ -1,126 +1,126 @@ config =& load_class('Config', 'core'); @@ -128,11 +128,11 @@ class CI_Router { $this->enable_query_strings = ( ! is_cli() && $this->config->item('enable_query_strings') === TRUE); - // If a directory override is configured, it has to be set before any dynamic routing logic + is_array($routing) && isset($routing['directory']) && $this->set_directory($routing['directory']); $this->_set_routing(); - // Set any routing overrides that may exist in the main index file + if (is_array($routing)) { empty($routing['controller']) OR $this->set_class($routing['controller']); @@ -142,21 +142,21 @@ class CI_Router { log_message('info', 'Router Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Set route mapping - * - * Determines what should be served based on the URI request, - * as well as any "routes" that have been set in the routing config file. - * - * @return void - */ + + + + + + + + + protected function _set_routing() { - // Load the routes.php file. It would be great if we could - // skip this for enable_query_strings = TRUE, but then - // default_controller would be empty ... + + + if (file_exists(APPPATH.'config/routes.php')) { include(APPPATH.'config/routes.php'); @@ -167,7 +167,7 @@ class CI_Router { include(APPPATH.'config/'.ENVIRONMENT.'/routes.php'); } - // Validate & get reserved routes + if (isset($route) && is_array($route)) { isset($route['default_controller']) && $this->default_controller = $route['default_controller']; @@ -176,12 +176,12 @@ class CI_Router { $this->routes = $route; } - // Are query strings enabled in the config file? Normally CI doesn't utilize query strings - // since URI segments are more search-engine friendly, but they can optionally be used. - // If this feature is enabled, we will gather the directory/class/method a little differently + + + if ($this->enable_query_strings) { - // If the directory is set at this time, it means an override exists, so skip the checks + if ( ! isset($this->directory)) { $_d = $this->config->item('directory_trigger'); @@ -217,12 +217,12 @@ class CI_Router { $this->_set_default_controller(); } - // Routing rules don't apply to query strings and we don't need to detect - // directories, so we're done here + + return; } - // Is there anything to parse? + if ($this->uri->uri_string !== '') { $this->_parse_routes(); @@ -233,23 +233,23 @@ class CI_Router { } } - // -------------------------------------------------------------------- - /** - * Set request route - * - * Takes an array of URI segments as input and sets the class/method - * to be called. - * - * @used-by CI_Router::_parse_routes() - * @param array $segments URI segments - * @return void - */ + + + + + + + + + + + protected function _set_request($segments = array()) { $segments = $this->_validate_request($segments); - // If we don't have any segments left - try the default controller; - // WARNING: Directories get shifted out of the segments array! + + if (empty($segments)) { $this->_set_default_controller(); @@ -280,13 +280,13 @@ class CI_Router { $this->uri->rsegments = $segments; } - // -------------------------------------------------------------------- - /** - * Set default controller - * - * @return void - */ + + + + + + protected function _set_default_controller() { if (empty($this->default_controller)) @@ -294,7 +294,7 @@ class CI_Router { show_error('Unable to determine what should be displayed. A default route has not been specified in the routing file.'); } - // Is the method being specified? + if (sscanf($this->default_controller, '%[^/]/%s', $class, $method) !== 2) { $method = 'index'; @@ -302,14 +302,14 @@ class CI_Router { if ( ! file_exists(APPPATH.'controllers/'.$this->directory.ucfirst($class).'.php')) { - // This will trigger 404 later + return; } $this->set_class($class); $this->set_method($method); - // Assign routed segments, index starting from 1 + $this->uri->rsegments = array( 1 => $class, 2 => $method @@ -318,24 +318,24 @@ class CI_Router { log_message('debug', 'No URI present. Default controller set.'); } - // -------------------------------------------------------------------- - /** - * Validate request - * - * Attempts validate the URI request and determine the controller path. - * - * @used-by CI_Router::_set_request() - * @param array $segments URI segments - * @return mixed URI segments - */ + + + + + + + + + + protected function _validate_request($segments) { $c = count($segments); $directory_override = isset($this->directory); - // Loop through our segments and return as soon as a controller - // is found or when such a directory doesn't exist + + while ($c-- > 0) { $test = $this->directory @@ -353,32 +353,32 @@ class CI_Router { return $segments; } - // This means that all segments were actually directories + return $segments; } - // -------------------------------------------------------------------- - /** - * Parse Routes - * - * Matches any routes that may exist in the config/routes.php file - * against the URI to determine if the class/method need to be remapped. - * - * @return void - */ + + + + + + + + + protected function _parse_routes() { - // Turn the segment array into a URI string + $uri = implode('/', $this->uri->segments); - // Get HTTP verb + $http_verb = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'cli'; - // Loop through the route array looking for wildcards + foreach ($this->routes as $key => $val) { - // Check if route format is using HTTP verbs + if (is_array($val)) { $val = array_change_key_case($val, CASE_LOWER); @@ -392,22 +392,22 @@ class CI_Router { } } - // Convert wildcards to RegEx + $key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key); - // Does the RegEx match? + if (preg_match('#^'.$key.'$#', $uri, $matches)) { - // Are we using callbacks to process back-references? + if ( ! is_string($val) && is_callable($val)) { - // Remove the original string from the matches array. + array_shift($matches); - // Execute the callback using the values in matches as its parameters. + $val = call_user_func_array($val, $matches); } - // Are we using the default routing method for back-references? + elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE) { $val = preg_replace('#^'.$key.'$#', $val, $uri); @@ -418,72 +418,72 @@ class CI_Router { } } - // If we got this far it means we didn't encounter a - // matching route so we'll set the site default route + + $this->_set_request(array_values($this->uri->segments)); } - // -------------------------------------------------------------------- - /** - * Set class name - * - * @param string $class Class name - * @return void - */ + + + + + + + public function set_class($class) { $this->class = str_replace(array('/', '.'), '', $class); } - // -------------------------------------------------------------------- - /** - * Fetch the current class - * - * @deprecated 3.0.0 Read the 'class' property instead - * @return string - */ + + + + + + + public function fetch_class() { return $this->class; } - // -------------------------------------------------------------------- - /** - * Set method name - * - * @param string $method Method name - * @return void - */ + + + + + + + public function set_method($method) { $this->method = $method; } - // -------------------------------------------------------------------- - /** - * Fetch the current method - * - * @deprecated 3.0.0 Read the 'method' property instead - * @return string - */ + + + + + + + public function fetch_method() { return $this->method; } - // -------------------------------------------------------------------- - /** - * Set directory name - * - * @param string $dir Directory name - * @param bool $append Whether we're appending rather than setting the full value - * @return void - */ + + + + + + + + public function set_directory($dir, $append = FALSE) { if ($append !== TRUE OR empty($this->directory)) @@ -496,17 +496,17 @@ class CI_Router { } } - // -------------------------------------------------------------------- - /** - * Fetch directory - * - * Feches the sub-directory (if any) that contains the requested - * controller class. - * - * @deprecated 3.0.0 Read the 'directory' property instead - * @return string - */ + + + + + + + + + + public function fetch_directory() { return $this->directory; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Security.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Security.php index 883968e..865c33e 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Security.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Security.php @@ -1,137 +1,137 @@ ', '<', '>', "'", '"', '&', '$', '#', '{', '}', '[', ']', '=', ';', '?', '%20', '%22', - '%3c', // < - '%253c', // < - '%3e', // > - '%0e', // > - '%28', // ( - '%29', // ) - '%2528', // ( - '%26', // & - '%24', // $ - '%3f', // ? - '%3b', // ; - '%3d' // = + '%3c', + '%253c', + '%3e', + '%0e', + '%28', + '%29', + '%2528', + '%26', + '%24', + '%3f', + '%3b', + '%3d' ); - /** - * Character set - * - * Will be overridden by the constructor. - * - * @var string - */ + + + + + + + public $charset = 'UTF-8'; - /** - * XSS Hash - * - * Random Hash for protecting URLs. - * - * @var string - */ + + + + + + + protected $_xss_hash; - /** - * CSRF Hash - * - * Random hash for Cross Site Request Forgery protection cookie - * - * @var string - */ + + + + + + + protected $_csrf_hash; - /** - * CSRF Expire time - * - * Expiration time for Cross Site Request Forgery protection cookie. - * Defaults to two hours (in seconds). - * - * @var int - */ + + + + + + + + protected $_csrf_expire = 7200; - /** - * CSRF Token name - * - * Token name for Cross Site Request Forgery protection cookie. - * - * @var string - */ + + + + + + + protected $_csrf_token_name = 'ci_csrf_token'; - /** - * CSRF Cookie name - * - * Cookie name for Cross Site Request Forgery protection cookie. - * - * @var string - */ + + + + + + + protected $_csrf_cookie_name = 'ci_csrf_token'; - /** - * List of never allowed strings - * - * @var array - */ + + + + + protected $_never_allowed_str = array( 'document.cookie' => '[removed]', '(document).cookie' => '[removed]', @@ -147,34 +147,34 @@ class CI_Security { '<%' => '<%' ); - /** - * List of never allowed regex replacements - * - * @var array - */ + + + + + protected $_never_allowed_regex = array( 'javascript\s*:', '(\(?document\)?|\(?window\)?(\.document)?)\.(location|on\w*)', - 'expression\s*(\(|&\#40;)', // CSS and IE - 'vbscript\s*:', // IE, surprise! - 'wscript\s*:', // IE - 'jscript\s*:', // IE - 'vbs\s*:', // IE + 'expression\s*(\(|&\#40;)', + 'vbscript\s*:', + 'wscript\s*:', + 'jscript\s*:', + 'vbs\s*:', 'Redirect\s+30\d', "([\"'])?data\s*:[^\\1]*?base64[^\\1]*?,[^\\1]*?\\1?" ); - /** - * Class constructor - * - * @return void - */ + + + + + public function __construct() { - // Is CSRF protection enabled? + if (config_item('csrf_protection')) { - // CSRF config + foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key) { if (NULL !== ($val = config_item($key))) @@ -183,13 +183,13 @@ class CI_Security { } } - // Append application specific cookie prefix + if ($cookie_prefix = config_item('cookie_prefix')) { $this->_csrf_cookie_name = $cookie_prefix.$this->_csrf_cookie_name; } - // Set the CSRF hash + $this->_csrf_set_hash(); } @@ -198,22 +198,22 @@ class CI_Security { log_message('info', 'Security Class Initialized'); } - // -------------------------------------------------------------------- - /** - * CSRF Verify - * - * @return CI_Security - */ + + + + + + public function csrf_verify() { - // If it's not a POST request we will set the CSRF cookie + if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { return $this->csrf_set_cookie(); } - // Check if URI has been whitelisted from CSRF checks + if ($exclude_uris = config_item('csrf_exclude_uris')) { $uri = load_class('URI', 'core'); @@ -226,17 +226,17 @@ class CI_Security { } } - // Check CSRF token validity, but don't error on mismatch just yet - we'll want to regenerate + $valid = isset($_POST[$this->_csrf_token_name], $_COOKIE[$this->_csrf_cookie_name]) && hash_equals($_POST[$this->_csrf_token_name], $_COOKIE[$this->_csrf_cookie_name]); - // We kill this since we're done and we don't want to pollute the _POST array + unset($_POST[$this->_csrf_token_name]); - // Regenerate on every submission? + if (config_item('csrf_regenerate')) { - // Nothing should last forever + unset($_COOKIE[$this->_csrf_cookie_name]); $this->_csrf_hash = NULL; } @@ -253,14 +253,14 @@ class CI_Security { return $this; } - // -------------------------------------------------------------------- - /** - * CSRF Set Cookie - * - * @codeCoverageIgnore - * @return CI_Security - */ + + + + + + + public function csrf_set_cookie() { $expire = time() + $this->_csrf_expire; @@ -285,75 +285,75 @@ class CI_Security { return $this; } - // -------------------------------------------------------------------- - /** - * Show CSRF Error - * - * @return void - */ + + + + + + public function csrf_show_error() { show_error('The action you have requested is not allowed.', 403); } - // -------------------------------------------------------------------- - /** - * Get CSRF Hash - * - * @see CI_Security::$_csrf_hash - * @return string CSRF hash - */ + + + + + + + public function get_csrf_hash() { return $this->_csrf_hash; } - // -------------------------------------------------------------------- - /** - * Get CSRF Token Name - * - * @see CI_Security::$_csrf_token_name - * @return string CSRF token name - */ + + + + + + + public function get_csrf_token_name() { return $this->_csrf_token_name; } - // -------------------------------------------------------------------- - /** - * XSS Clean - * - * Sanitizes data so that Cross Site Scripting Hacks can be - * prevented. This method does a fair amount of work but - * it is extremely thorough, designed to prevent even the - * most obscure XSS attempts. Nothing is ever 100% foolproof, - * of course, but I haven't been able to get anything passed - * the filter. - * - * Note: Should only be used to deal with data upon submission. - * It's not something that should be used for general - * runtime processing. - * - * @link http://channel.bitflux.ch/wiki/XSS_Prevention - * Based in part on some code and ideas from Bitflux. - * - * @link http://ha.ckers.org/xss.html - * To help develop this script I used this great list of - * vulnerabilities along with a few other hacks I've - * harvested from examining vulnerabilities in other programs. - * - * @param string|string[] $str Input data - * @param bool $is_image Whether the input is an image - * @return string - */ + + + + + + + + + + + + + + + + + + + + + + + + + + + public function xss_clean($str, $is_image = FALSE) { - // Is the string an array? + if (is_array($str)) { foreach ($str as $key => &$value) @@ -364,18 +364,18 @@ class CI_Security { return $str; } - // Remove Invisible Characters + $str = remove_invisible_characters($str); - /* - * URL Decode - * - * Just in case stuff like this is submitted: - * - * Google - * - * Note: Use rawurldecode() so it does not remove plus signs - */ + + + + + + + + + if (stripos($str, '%') !== false) { do @@ -388,49 +388,49 @@ class CI_Security { unset($oldstr); } - /* - * Convert character entities to ASCII - * - * This permits our tests below to work reliably. - * We only convert entities that are within tags since - * these are the ones that will pose security problems. - */ + + + + + + + $str = preg_replace_callback("/[^a-z0-9>]+[a-z0-9]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str); $str = preg_replace_callback('/<\w+.*/si', array($this, '_decode_entity'), $str); - // Remove Invisible Characters Again! + $str = remove_invisible_characters($str); - /* - * Convert all tabs to spaces - * - * This prevents strings like this: ja vascript - * NOTE: we deal with spaces between characters later. - * NOTE: preg_replace was found to be amazingly slow here on - * large blocks of data, so we use str_replace. - */ + + + + + + + + $str = str_replace("\t", ' ', $str); - // Capture converted string for later comparison + $converted_string = $str; - // Remove Strings that are never allowed + $str = $this->_do_never_allowed($str); - /* - * Makes PHP tags safe - * - * Note: XML tags are inadvertently replaced too: - * - * '), array('<?', '?>'), $str); } - /* - * Compact any exploded words - * - * This corrects words like: j a v a s c r i p t - * These words are compacted back to their correct state. - */ + + + + + + $words = array( 'javascript', 'expression', 'vbscript', 'jscript', 'wscript', 'vbs', 'script', 'base64', 'applet', 'alert', 'document', @@ -454,23 +454,23 @@ class CI_Security { { $word = implode('\s*', str_split($word)).'\s*'; - // We only want to do this when it is followed by a non-word character - // That way valid stuff like "dealer to" does not become "dealerto" + + $str = preg_replace_callback('#('.substr($word, 0, -3).')(\W)#is', array($this, '_compact_exploded_words'), $str); } - /* - * Remove disallowed Javascript in links or img tags - * We used to do some version comparisons and use of stripos(), - * but it is dog slow compared to these simplified non-capturing - * preg_match(), especially if the pattern exists in the string - * - * Note: It was reported that not only space characters, but all in - * the following pattern can be parsed as separators between a tag name - * and its attributes: [\d\s"\'`;,\/\=\(\x00\x0B\x09\x0C] - * ... however, remove_invisible_characters() above already strips the - * hex-encoded ones, so we'll skip them below. - */ + + + + + + + + + + + + do { $original = $str; @@ -493,31 +493,31 @@ class CI_Security { while ($original !== $str); unset($original); - /* - * Sanitize naughty HTML elements - * - * If a tag containing any of the words in the list - * below is found, the tag gets converted to entities. - * - * So this: - * Becomes: <blink> - */ + + + + + + + + + $pattern = '#' - .'<((?/*\s*)((?[a-z0-9]+)(?=[^a-z0-9]|$)|.+)' // tag start and name, followed by a non-tag character - .'[^\s\042\047a-z0-9>/=]*' // a valid attribute character immediately after the tag would count as a separator - // optional attributes - .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons - .'[^\s\042\047>/=]+' // attribute characters - // optional attribute-value - .'(?:\s*=' // attribute-value separator - .'(?:[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*))' // single, double or non-quoted value - .')?' // end optional attribute-value group - .')*)' // end optional attributes group + .'<((?/*\s*)((?[a-z0-9]+)(?=[^a-z0-9]|$)|.+)' + .'[^\s\042\047a-z0-9>/=]*' + + .'(?(?:[\s\042\047/=]*' + .'[^\s\042\047>/=]+' + + .'(?:\s*=' + .'(?:[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*))' + .')?' + .')*)' .'[^>]*)(?\>)?#isS'; - // Note: It would be nice to optimize this for speed, BUT - // only matching the naughty elements here results in - // false positives and in turn - vulnerabilities! + + + do { $old_str = $str; @@ -526,46 +526,46 @@ class CI_Security { while ($old_str !== $str); unset($old_str); - /* - * Sanitize naughty scripting elements - * - * Similar to above, only instead of looking for - * tags it looks for PHP and JavaScript commands - * that are disallowed. Rather than removing the - * code, it simply converts the parenthesis to entities - * rendering the code un-executable. - * - * For example: eval('some code') - * Becomes: eval('some code') - */ + + + + + + + + + + + + $str = preg_replace( '#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', '\\1\\2(\\3)', $str ); - // Same thing, but for "tag functions" (e.g. eval`some code`) - // See https://github.com/bcit-ci/CodeIgniter/issues/5420 + + $str = preg_replace( '#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)`(.*?)`#si', '\\1\\2`\\3`', $str ); - // Final clean up - // This adds a bit of extra precaution in case - // something got through the above filters + + + $str = $this->_do_never_allowed($str); - /* - * Images are Handled in a Special Way - * - Essentially, we want to know that after all of the character - * conversion is done whether any unwanted, likely XSS, code was found. - * If not, we return TRUE, as the image is clean. - * However, if the string post-conversion does not matched the - * string post-removal of XSS, then it fails, as there was unwanted XSS - * code found and removed/changed during processing. - */ + + + + + + + + + if ($is_image === TRUE) { return ($str === $converted_string); @@ -574,16 +574,16 @@ class CI_Security { return $str; } - // -------------------------------------------------------------------- - /** - * XSS Hash - * - * Generates the XSS hash if needed and returns it. - * - * @see CI_Security::$_xss_hash - * @return string XSS hash - */ + + + + + + + + + public function xss_hash() { if ($this->_xss_hash === NULL) @@ -597,14 +597,14 @@ class CI_Security { return $this->_xss_hash; } - // -------------------------------------------------------------------- - /** - * Get random bytes - * - * @param int $length Output length - * @return string - */ + + + + + + + public function get_random_bytes($length) { if (empty($length) OR ! ctype_digit((string) $length)) @@ -616,19 +616,19 @@ class CI_Security { { try { - // The cast is required to avoid TypeError + return random_bytes((int) $length); } catch (Exception $e) { - // If random_bytes() can't do the job, we can't either ... - // There's no point in using fallbacks. + + log_message('error', $e->getMessage()); return FALSE; } } - // Unfortunately, none of the following PRNGs is guaranteed to exist ... + if (defined('MCRYPT_DEV_URANDOM') && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE) { return $output; @@ -637,7 +637,7 @@ class CI_Security { if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { - // Try not to waste entropy ... + is_php('5.4') && stream_set_chunk_size($fp, $length); $output = fread($fp, $length); fclose($fp); @@ -655,25 +655,25 @@ class CI_Security { return FALSE; } - // -------------------------------------------------------------------- - /** - * HTML Entities Decode - * - * A replacement for html_entity_decode() - * - * The reason we are not using html_entity_decode() by itself is because - * while it is not technically correct to leave out the semicolon - * at the end of an entity most browsers will still interpret the entity - * correctly. html_entity_decode() does not convert entities without - * semicolons, so we are left with our own little solution here. Bummer. - * - * @link http://php.net/html-entity-decode - * - * @param string $str Input - * @param string $charset Character set - * @return string - */ + + + + + + + + + + + + + + + + + + public function entity_decode($str, $charset = NULL) { if (strpos($str, '&') === FALSE) @@ -692,8 +692,8 @@ class CI_Security { { $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); - // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 - // entities to the array manually + + if ($flag === ENT_COMPAT) { $_entities[':'] = ':'; @@ -708,7 +708,7 @@ class CI_Security { { $str_compare = $str; - // Decode standard entities, avoiding false positives + if (preg_match_all('/&[a-z]{2,}(?![a-z;])/i', $str, $matches)) { $replace = array(); @@ -724,7 +724,7 @@ class CI_Security { $str = str_replace(array_keys($replace), array_values($replace), $str); } - // Decode numeric & UTF16 two byte entities + $str = html_entity_decode( preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str), $flag, @@ -740,15 +740,15 @@ class CI_Security { return $str; } - // -------------------------------------------------------------------- - /** - * Sanitize Filename - * - * @param string $str Input file name - * @param bool $relative_path Whether to preserve paths - * @return string - */ + + + + + + + + public function sanitize_filename($str, $relative_path = FALSE) { $bad = $this->filename_bad_chars; @@ -771,14 +771,14 @@ class CI_Security { return stripslashes($str); } - // ---------------------------------------------------------------- - /** - * Strip Image Tags - * - * @param string $str - * @return string - */ + + + + + + + public function strip_image_tags($str) { return preg_replace( @@ -791,15 +791,15 @@ class CI_Security { ); } - // ---------------------------------------------------------------- - /** - * URL-decode taking spaces into account - * - * @see https://github.com/bcit-ci/CodeIgniter/issues/4877 - * @param array $matches - * @return string - */ + + + + + + + + protected function _urldecodespaces($matches) { $input = $matches[0]; @@ -809,34 +809,34 @@ class CI_Security { : rawurldecode($nospaces); } - // ---------------------------------------------------------------- - /** - * Compact Exploded Words - * - * Callback method for xss_clean() to remove whitespace from - * things like 'j a v a s c r i p t'. - * - * @used-by CI_Security::xss_clean() - * @param array $matches - * @return string - */ + + + + + + + + + + + protected function _compact_exploded_words($matches) { return preg_replace('/\s+/s', '', $matches[1]).$matches[2]; } - // -------------------------------------------------------------------- - /** - * Sanitize Naughty HTML - * - * Callback method for xss_clean() to remove naughty HTML elements. - * - * @used-by CI_Security::xss_clean() - * @param array $matches - * @return string - */ + + + + + + + + + + protected function _sanitize_naughty_html($matches) { static $naughty_tags = array( @@ -850,50 +850,50 @@ class CI_Security { 'on\w+', 'style', 'xmlns', 'formaction', 'form', 'xlink:href', 'FSCommand', 'seekSegmentTime' ); - // First, escape unclosed tags + if (empty($matches['closeTag'])) { return '<'.$matches[1]; } - // Is the element that we caught naughty? If so, escape it + elseif (in_array(strtolower($matches['tagName']), $naughty_tags, TRUE)) { return '<'.$matches[1].'>'; } - // For other tags, see if their attributes are "evil" and strip those + elseif (isset($matches['attributes'])) { - // We'll store the already filtered attributes here + $attributes = array(); - // Attribute-catching pattern + $attributes_pattern = '#' - .'(?[^\s\042\047>/=]+)' // attribute characters - // optional attribute-value - .'(?:\s*=(?[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator + .'(?[^\s\042\047>/=]+)' + + .'(?:\s*=(?[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*)))' .'#i'; - // Blacklist pattern for evil attribute names + $is_evil_pattern = '#^('.implode('|', $evil_attributes).')$#i'; - // Each iteration filters a single attribute + do { - // Strip any non-alpha characters that may precede an attribute. - // Browsers often parse these incorrectly and that has been a - // of numerous XSS issues we've had. + + + $matches['attributes'] = preg_replace('#^[^a-z]+#i', '', $matches['attributes']); if ( ! preg_match($attributes_pattern, $matches['attributes'], $attribute, PREG_OFFSET_CAPTURE)) { - // No (valid) attribute found? Discard everything else inside the tag + break; } if ( - // Is it indeed an "evil" attribute? + preg_match($is_evil_pattern, $attribute['name'][0]) - // Or does it have an equals sign, but no value and not quoted? Strip that too! + OR (trim($attribute['value'][0]) === '') ) { @@ -917,21 +917,21 @@ class CI_Security { return $matches[0]; } - // -------------------------------------------------------------------- - /** - * JS Link Removal - * - * Callback method for xss_clean() to sanitize links. - * - * This limits the PCRE backtracks, making it more performance friendly - * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in - * PHP 5.2+ on link-heavy strings. - * - * @used-by CI_Security::xss_clean() - * @param array $match - * @return string - */ + + + + + + + + + + + + + + protected function _js_link_removal($match) { return str_replace( @@ -945,21 +945,21 @@ class CI_Security { ); } - // -------------------------------------------------------------------- - /** - * JS Image Removal - * - * Callback method for xss_clean() to sanitize image tags. - * - * This limits the PCRE backtracks, making it more performance friendly - * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in - * PHP 5.2+ on image tag heavy strings. - * - * @used-by CI_Security::xss_clean() - * @param array $match - * @return string - */ + + + + + + + + + + + + + + protected function _js_img_removal($match) { return str_replace( @@ -973,32 +973,32 @@ class CI_Security { ); } - // -------------------------------------------------------------------- - /** - * Attribute Conversion - * - * @used-by CI_Security::xss_clean() - * @param array $match - * @return string - */ + + + + + + + + protected function _convert_attribute($match) { return str_replace(array('>', '<', '\\'), array('>', '<', '\\\\'), $match[0]); } - // -------------------------------------------------------------------- - /** - * Filter Attributes - * - * Filters tag attributes for consistency and safety. - * - * @used-by CI_Security::_js_img_removal() - * @used-by CI_Security::_js_link_removal() - * @param string $str - * @return string - */ + + + + + + + + + + + protected function _filter_attributes($str) { $out = ''; @@ -1013,22 +1013,22 @@ class CI_Security { return $out; } - // -------------------------------------------------------------------- - /** - * HTML Entity Decode Callback - * - * @used-by CI_Security::xss_clean() - * @param array $match - * @return string - */ + + + + + + + + protected function _decode_entity($match) { - // Protect GET variables in URLs - // 901119URL5918AMP18930PROTECT8198 + + $match = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-/]+)|i', $this->xss_hash().'\\1=\\2', $match[0]); - // Decode, then un-protect URL GET vars + return str_replace( $this->xss_hash(), '&', @@ -1036,15 +1036,15 @@ class CI_Security { ); } - // -------------------------------------------------------------------- - /** - * Do Never Allowed - * - * @used-by CI_Security::xss_clean() - * @param string - * @return string - */ + + + + + + + + protected function _do_never_allowed($str) { $str = str_replace(array_keys($this->_never_allowed_str), $this->_never_allowed_str, $str); @@ -1057,21 +1057,21 @@ class CI_Security { return $str; } - // -------------------------------------------------------------------- - /** - * Set CSRF Hash and Cookie - * - * @return string - */ + + + + + + protected function _csrf_set_hash() { if ($this->_csrf_hash === NULL) { - // If the cookie exists we will use its value. - // We don't necessarily want to regenerate it with - // each page load since a page could contain embedded - // sub-pages causing this feature to fail + + + + if (isset($_COOKIE[$this->_csrf_cookie_name]) && is_string($_COOKIE[$this->_csrf_cookie_name]) && preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) { diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/URI.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/URI.php index a8b98ae..f5da258 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/URI.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/URI.php @@ -1,112 +1,112 @@ config =& load_class('Config', 'core'); - // If query strings are enabled, we don't need to parse any segments. - // However, they don't make sense under CLI. + + if (is_cli() OR $this->config->item('enable_query_strings') !== TRUE) { $this->_permitted_uri_chars = $this->config->item('permitted_uri_chars'); - // If it's a CLI request, ignore the configuration + if (is_cli()) { $uri = $this->_parse_argv(); @@ -118,7 +118,7 @@ class CI_URI { switch ($protocol) { - case 'AUTO': // For BC purposes only + case 'AUTO': case 'REQUEST_URI': $uri = $this->_parse_request_uri(); break; @@ -140,22 +140,22 @@ class CI_URI { log_message('info', 'URI Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Set URI String - * - * @param string $str - * @return void - */ + + + + + + + protected function _set_uri_string($str) { - // Filter out control characters and trim slashes + $this->uri_string = trim(remove_invisible_characters($str, FALSE), '/'); if ($this->uri_string !== '') { - // Remove the URL suffix, if present + if (($suffix = (string) $this->config->item('url_suffix')) !== '') { $slen = strlen($suffix); @@ -167,11 +167,11 @@ class CI_URI { } $this->segments[0] = NULL; - // Populate the segments array + foreach (explode('/', trim($this->uri_string, '/')) as $val) { $val = trim($val); - // Filter segments for security + $this->filter_uri($val); if ($val !== '') @@ -184,16 +184,16 @@ class CI_URI { } } - // -------------------------------------------------------------------- - /** - * Parse REQUEST_URI - * - * Will parse REQUEST_URI and automatically detect the URI from it, - * while fixing the query string if necessary. - * - * @return string - */ + + + + + + + + + protected function _parse_request_uri() { if ( ! isset($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) @@ -201,8 +201,8 @@ class CI_URI { return ''; } - // parse_url() returns false if no host is present, but the path or query string - // contains a colon followed by a number + + $uri = parse_url('http://dummy'.$_SERVER['REQUEST_URI']); $query = isset($uri['query']) ? $uri['query'] : ''; $uri = isset($uri['path']) ? $uri['path'] : ''; @@ -219,8 +219,8 @@ class CI_URI { } } - // This section ensures that even on servers that require the URI to be in the query string (Nginx) a correct - // URI is found, and also fixes the QUERY_STRING server var and $_GET array. + + if (trim($uri, '/') === '' && strncmp($query, '/', 1) === 0) { $query = explode('?', $query, 2); @@ -239,19 +239,19 @@ class CI_URI { return '/'; } - // Do some final cleaning of the URI and return it + return $this->_remove_relative_directory($uri); } - // -------------------------------------------------------------------- - /** - * Parse QUERY_STRING - * - * Will parse QUERY_STRING and automatically detect the URI from it. - * - * @return string - */ + + + + + + + + protected function _parse_query_string() { $uri = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING'); @@ -272,31 +272,31 @@ class CI_URI { return $this->_remove_relative_directory($uri); } - // -------------------------------------------------------------------- - /** - * Parse CLI arguments - * - * Take each command line argument and assume it is a URI segment. - * - * @return string - */ + + + + + + + + protected function _parse_argv() { $args = array_slice($_SERVER['argv'], 1); return $args ? implode('/', $args) : ''; } - // -------------------------------------------------------------------- - /** - * Remove relative directory (../) and multi slashes (///) - * - * Do some final cleaning of the URI and return it, currently only used in self::_parse_request_uri() - * - * @param string $uri - * @return string - */ + + + + + + + + + protected function _remove_relative_directory($uri) { $uris = array(); @@ -313,16 +313,16 @@ class CI_URI { return implode('/', $uris); } - // -------------------------------------------------------------------- - /** - * Filter URI - * - * Filters segments for malicious characters. - * - * @param string $str - * @return void - */ + + + + + + + + + public function filter_uri(&$str) { if ( ! empty($str) && ! empty($this->_permitted_uri_chars) && ! preg_match('/^['.$this->_permitted_uri_chars.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $str)) @@ -331,100 +331,100 @@ class CI_URI { } } - // -------------------------------------------------------------------- - /** - * Fetch URI Segment - * - * @see CI_URI::$segments - * @param int $n Index - * @param mixed $no_result What to return if the segment index is not found - * @return mixed - */ + + + + + + + + + public function segment($n, $no_result = NULL) { return isset($this->segments[$n]) ? $this->segments[$n] : $no_result; } - // -------------------------------------------------------------------- - /** - * Fetch URI "routed" Segment - * - * Returns the re-routed URI segment (assuming routing rules are used) - * based on the index provided. If there is no routing, will return - * the same result as CI_URI::segment(). - * - * @see CI_URI::$rsegments - * @see CI_URI::segment() - * @param int $n Index - * @param mixed $no_result What to return if the segment index is not found - * @return mixed - */ + + + + + + + + + + + + + + public function rsegment($n, $no_result = NULL) { return isset($this->rsegments[$n]) ? $this->rsegments[$n] : $no_result; } - // -------------------------------------------------------------------- - /** - * URI to assoc - * - * Generates an associative array of URI data starting at the supplied - * segment index. For example, if this is your URI: - * - * example.com/user/search/name/joe/location/UK/gender/male - * - * You can use this method to generate an array with this prototype: - * - * array ( - * name => joe - * location => UK - * gender => male - * ) - * - * @param int $n Index (default: 3) - * @param array $default Default values - * @return array - */ + + + + + + + + + + + + + + + + + + + + + public function uri_to_assoc($n = 3, $default = array()) { return $this->_uri_to_assoc($n, $default, 'segment'); } - // -------------------------------------------------------------------- - /** - * Routed URI to assoc - * - * Identical to CI_URI::uri_to_assoc(), only it uses the re-routed - * segment array. - * - * @see CI_URI::uri_to_assoc() - * @param int $n Index (default: 3) - * @param array $default Default values - * @return array - */ + + + + + + + + + + + + public function ruri_to_assoc($n = 3, $default = array()) { return $this->_uri_to_assoc($n, $default, 'rsegment'); } - // -------------------------------------------------------------------- - /** - * Internal URI-to-assoc - * - * Generates a key/value pair from the URI string or re-routed URI string. - * - * @used-by CI_URI::uri_to_assoc() - * @used-by CI_URI::ruri_to_assoc() - * @param int $n Index (default: 3) - * @param array $default Default values - * @param string $which Array name ('segment' or 'rsegment') - * @return array - */ + + + + + + + + + + + + + protected function _uri_to_assoc($n = 3, $default = array(), $which = 'segment') { if ( ! is_numeric($n)) @@ -477,22 +477,22 @@ class CI_URI { } } - // Cache the array for reuse + isset($this->keyval[$which]) OR $this->keyval[$which] = array(); $this->keyval[$which][$n] = $retval; return $retval; } - // -------------------------------------------------------------------- - /** - * Assoc to URI - * - * Generates a URI string from an associative array. - * - * @param array $array Input array of key/value pairs - * @return string URI string - */ + + + + + + + + + public function assoc_to_uri($array) { $temp = array(); @@ -505,53 +505,53 @@ class CI_URI { return implode('/', $temp); } - // -------------------------------------------------------------------- - /** - * Slash segment - * - * Fetches an URI segment with a slash. - * - * @param int $n Index - * @param string $where Where to add the slash ('trailing' or 'leading') - * @return string - */ + + + + + + + + + + public function slash_segment($n, $where = 'trailing') { return $this->_slash_segment($n, $where, 'segment'); } - // -------------------------------------------------------------------- - /** - * Slash routed segment - * - * Fetches an URI routed segment with a slash. - * - * @param int $n Index - * @param string $where Where to add the slash ('trailing' or 'leading') - * @return string - */ + + + + + + + + + + public function slash_rsegment($n, $where = 'trailing') { return $this->_slash_segment($n, $where, 'rsegment'); } - // -------------------------------------------------------------------- - /** - * Internal Slash segment - * - * Fetches an URI Segment and adds a slash to it. - * - * @used-by CI_URI::slash_segment() - * @used-by CI_URI::slash_rsegment() - * - * @param int $n Index - * @param string $where Where to add the slash ('trailing' or 'leading') - * @param string $which Array name ('segment' or 'rsegment') - * @return string - */ + + + + + + + + + + + + + + protected function _slash_segment($n, $where = 'trailing', $which = 'segment') { $leading = $trailing = '/'; @@ -568,73 +568,73 @@ class CI_URI { return $leading.$this->$which($n).$trailing; } - // -------------------------------------------------------------------- - /** - * Segment Array - * - * @return array CI_URI::$segments - */ + + + + + + public function segment_array() { return $this->segments; } - // -------------------------------------------------------------------- - /** - * Routed Segment Array - * - * @return array CI_URI::$rsegments - */ + + + + + + public function rsegment_array() { return $this->rsegments; } - // -------------------------------------------------------------------- - /** - * Total number of segments - * - * @return int - */ + + + + + + public function total_segments() { return count($this->segments); } - // -------------------------------------------------------------------- - /** - * Total number of routed segments - * - * @return int - */ + + + + + + public function total_rsegments() { return count($this->rsegments); } - // -------------------------------------------------------------------- - /** - * Fetch URI string - * - * @return string CI_URI::$uri_string - */ + + + + + + public function uri_string() { return $this->uri_string; } - // -------------------------------------------------------------------- - /** - * Fetch Re-routed URI string - * - * @return string - */ + + + + + + public function ruri_string() { return ltrim(load_class('Router', 'core')->directory, '/').implode('/', $this->rsegments); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Utf8.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Utf8.php index 9ee63e9..eca659f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Utf8.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/Utf8.php @@ -1,68 +1,68 @@ is_ascii($str) === FALSE) @@ -104,34 +104,34 @@ class CI_Utf8 { return $str; } - // -------------------------------------------------------------------- - /** - * Remove ASCII control characters - * - * Removes all ASCII control characters except horizontal tabs, - * line feeds, and carriage returns, as all others can cause - * problems in XML. - * - * @param string $str String to clean - * @return string - */ + + + + + + + + + + + public function safe_ascii_for_xml($str) { return remove_invisible_characters($str, FALSE); } - // -------------------------------------------------------------------- - /** - * Convert to UTF-8 - * - * Attempts to convert a string to UTF-8. - * - * @param string $str Input string - * @param string $encoding Input encoding - * @return string $str encoded in UTF-8 or FALSE on failure - */ + + + + + + + + + + public function convert_to_utf8($str, $encoding) { if (MB_ENABLED) @@ -146,16 +146,16 @@ class CI_Utf8 { return FALSE; } - // -------------------------------------------------------------------- - /** - * Is ASCII? - * - * Tests if a string is standard 7-bit ASCII or not. - * - * @param string $str String to check - * @return bool - */ + + + + + + + + + public function is_ascii($str) { return (preg_match('/[^\x00-\x7F]/S', $str) === 0); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/hash.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/hash.php index 8f5510c..926fa48 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/hash.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/hash.php @@ -1,72 +1,72 @@ 32, @@ -229,7 +229,7 @@ if ( ! function_exists('hash_pbkdf2')) } $hash = ''; - // Note: Blocks are NOT 0-indexed + for ($bc = (int) ceil($length / $hash_length), $bi = 1; $bi <= $bc; $bi++) { $key = $derived_key = hash_hmac($algo, $salt.pack('N', $bi), $password, TRUE); @@ -241,7 +241,7 @@ if ( ! function_exists('hash_pbkdf2')) $hash .= $derived_key; } - // This is not RFC-compatible, but we're aiming for natural PHP compatibility + if ( ! $raw_output) { $hash = bin2hex($hash); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/mbstring.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/mbstring.php index 552e727..66b8820 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/mbstring.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/core/compat/mbstring.php @@ -1,75 +1,75 @@ load->get_package_paths() as $path) @@ -105,13 +105,13 @@ function &DB($params = '', $query_builder_override = NULL) } elseif (is_string($params)) { - /** - * Parse the URL from the DSN string - * Database settings can be passed as discreet - * parameters or as a data source name in the first - * parameter. DSNs must have this prototype: - * $dsn = 'driver://username:password@hostname/database'; - */ + + + + + + + if (($dsn = @parse_url($params)) === FALSE) { show_error('Invalid DB Connection String'); @@ -126,7 +126,7 @@ function &DB($params = '', $query_builder_override = NULL) 'database' => isset($dsn['path']) ? rawurldecode(substr($dsn['path'], 1)) : '' ); - // Were additional config items set? + if (isset($dsn['query'])) { parse_str($dsn['query'], $extra); @@ -143,22 +143,22 @@ function &DB($params = '', $query_builder_override = NULL) } } - // No DB specified yet? Beat them senseless... + if (empty($params['dbdriver'])) { show_error('You have not selected a database type to connect to.'); } - // Load the DB classes. Note: Since the query builder class is optional - // we need to dynamically create a class that extends proper parent class - // based on whether we're using the query builder class or not. + + + if ($query_builder_override !== NULL) { $query_builder = $query_builder_override; } - // Backwards compatibility work-around for keeping the - // $active_record config variable working. Should be - // removed in v3.1 + + + elseif ( ! isset($query_builder) && isset($active_record)) { $query_builder = $active_record; @@ -171,36 +171,36 @@ function &DB($params = '', $query_builder_override = NULL) require_once(BASEPATH.'database/DB_query_builder.php'); if ( ! class_exists('CI_DB', FALSE)) { - /** - * CI_DB - * - * Acts as an alias for both CI_DB_driver and CI_DB_query_builder. - * - * @see CI_DB_query_builder - * @see CI_DB_driver - */ + + + + + + + + class CI_DB extends CI_DB_query_builder { } } } elseif ( ! class_exists('CI_DB', FALSE)) { - /** - * @ignore - */ + + + class CI_DB extends CI_DB_driver { } } - // Load the DB driver + $driver_file = BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'; file_exists($driver_file) OR show_error('Invalid DB driver'); require_once($driver_file); - // Instantiate the DB adapter + $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; $DB = new $driver($params); - // Check for a subdriver + if ( ! empty($DB->subdriver)) { $driver_file = BASEPATH.'database/drivers/'.$DB->dbdriver.'/subdrivers/'.$DB->dbdriver.'_'.$DB->subdriver.'_driver.php'; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_cache.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_cache.php index afcfc4c..a759574 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_cache.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_cache.php @@ -1,79 +1,79 @@ CI and load the file helper since we use it a lot + $this->CI =& get_instance(); $this->db =& $db; $this->CI->load->helper('file'); @@ -81,14 +81,14 @@ class CI_DB_Cache { $this->check_path(); } - // -------------------------------------------------------------------- - /** - * Set Cache Directory Path - * - * @param string $path Path to the cache directory - * @return bool - */ + + + + + + + public function check_path($path = '') { if ($path === '') @@ -101,7 +101,7 @@ class CI_DB_Cache { $path = $this->db->cachedir; } - // Add a trailing slash to the path if needed + $path = realpath($path) ? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR : rtrim($path, '/').'/'; @@ -110,7 +110,7 @@ class CI_DB_Cache { { log_message('debug', 'DB cache path error: '.$path); - // If the path is wrong we'll turn off caching + return $this->db->cache_off(); } @@ -118,7 +118,7 @@ class CI_DB_Cache { { log_message('debug', 'DB cache dir not writable: '.$path); - // If the path is not really writable we'll turn off caching + return $this->db->cache_off(); } @@ -126,17 +126,17 @@ class CI_DB_Cache { return TRUE; } - // -------------------------------------------------------------------- - /** - * Retrieve a cached query - * - * The URI being requested will become the name of the cache sub-folder. - * An MD5 hash of the SQL statement will become the cache file name. - * - * @param string $sql - * @return string - */ + + + + + + + + + + public function read($sql) { $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); @@ -151,15 +151,15 @@ class CI_DB_Cache { return unserialize($cachedata); } - // -------------------------------------------------------------------- - /** - * Write a query to a cache file - * - * @param string $sql - * @param object $object - * @return bool - */ + + + + + + + + public function write($sql, $object) { $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); @@ -181,15 +181,15 @@ class CI_DB_Cache { return TRUE; } - // -------------------------------------------------------------------- - /** - * Delete cache files within a particular directory - * - * @param string $segment_one - * @param string $segment_two - * @return void - */ + + + + + + + + public function delete($segment_one = '', $segment_two = '') { if ($segment_one === '') @@ -206,13 +206,13 @@ class CI_DB_Cache { delete_files($dir_path, TRUE); } - // -------------------------------------------------------------------- - /** - * Delete all existing cache files - * - * @return void - */ + + + + + + public function delete_all() { delete_files($this->db->cachedir, TRUE, TRUE); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_driver.php index 5ae0442..a5ae860 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_driver.php @@ -1,367 +1,367 @@ conn_id) { return TRUE; } - // ---------------------------------------------------------------- - // Connect to the database and set the connection ID + + $this->conn_id = $this->db_connect($this->pconnect); - // No connection resource? Check if there is a failover else throw an error + if ( ! $this->conn_id) { - // Check if there is a failover set + if ( ! empty($this->failover) && is_array($this->failover)) { - // Go over all the failovers + foreach ($this->failover as $failover) { - // Replace the current settings with those of the failover + foreach ($failover as $key => $val) { $this->$key = $val; } - // Try to connect + $this->conn_id = $this->db_connect($this->pconnect); - // If a connection is made break the foreach loop + if ($this->conn_id) { break; @@ -426,7 +426,7 @@ abstract class CI_DB_driver { } } - // We still don't have a connection? + if ( ! $this->conn_id) { log_message('error', 'Unable to connect to the database'); @@ -440,88 +440,88 @@ abstract class CI_DB_driver { } } - // Now we set the character set and that's all + return $this->db_set_charset($this->char_set); } - // -------------------------------------------------------------------- - /** - * DB connect - * - * This is just a dummy method that all drivers will override. - * - * @return mixed - */ + + + + + + + + public function db_connect() { return TRUE; } - // -------------------------------------------------------------------- - /** - * Persistent database connection - * - * @return mixed - */ + + + + + + public function db_pconnect() { return $this->db_connect(TRUE); } - // -------------------------------------------------------------------- - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout. - * - * This is just a dummy method to allow drivers without such - * functionality to not declare it, while others will override it. - * - * @return void - */ + + + + + + + + + + + + public function reconnect() { } - // -------------------------------------------------------------------- - /** - * Select database - * - * This is just a dummy method to allow drivers without such - * functionality to not declare it, while others will override it. - * - * @return bool - */ + + + + + + + + + public function db_select() { return TRUE; } - // -------------------------------------------------------------------- - /** - * Last error - * - * @return array - */ + + + + + + public function error() { return array('code' => NULL, 'message' => NULL); } - // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string - * @return bool - */ + + + + + + + public function db_set_charset($charset) { if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset)) @@ -539,28 +539,28 @@ abstract class CI_DB_driver { return TRUE; } - // -------------------------------------------------------------------- - /** - * The name of the platform in use (mysql, mssql, etc...) - * - * @return string - */ + + + + + + public function platform() { return $this->dbdriver; } - // -------------------------------------------------------------------- - /** - * Database version number - * - * Returns a string containing the version of the database being used. - * Most drivers will override this method. - * - * @return string - */ + + + + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -577,34 +577,34 @@ abstract class CI_DB_driver { return $this->data_cache['version'] = $query->ver; } - // -------------------------------------------------------------------- - /** - * Version number query string - * - * @return string - */ + + + + + + protected function _version() { return 'SELECT VERSION() AS ver'; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * Accepts an SQL string as input and returns a result object upon - * successful execution of a "read" type query. Returns boolean TRUE - * upon successful execution of a "write" type query. Returns boolean - * FALSE upon failure, and if the $db_debug variable is set to TRUE - * will raise an error. - * - * @param string $sql - * @param array $binds = FALSE An array of binding data - * @param bool $return_object = NULL - * @return mixed - */ + + + + + + + + + + + + + + + public function query($sql, $binds = FALSE, $return_object = NULL) { if ($sql === '') @@ -617,21 +617,21 @@ abstract class CI_DB_driver { $return_object = ! $this->is_write_type($sql); } - // Verify table prefix and replace if necessary + if ($this->dbprefix !== '' && $this->swap_pre !== '' && $this->dbprefix !== $this->swap_pre) { $sql = preg_replace('/(\W)'.$this->swap_pre.'(\S+?)/', '\\1'.$this->dbprefix.'\\2', $sql); } - // Compile binds if needed + if ($binds !== FALSE) { $sql = $this->compile_binds($sql, $binds); } - // Is query caching enabled? If the query is a "read type" - // we will load the caching class and return the previously - // cached query if it exists + + + if ($this->cache_on === TRUE && $return_object === TRUE && $this->_cache_init()) { $this->load_rdriver(); @@ -641,16 +641,16 @@ abstract class CI_DB_driver { } } - // Save the query for debugging + if ($this->save_queries === TRUE) { $this->queries[] = $sql; } - // Start the Query Timer + $time_start = microtime(TRUE); - // Run the Query + if (FALSE === ($this->result_id = $this->simple_query($sql))) { if ($this->save_queries === TRUE) @@ -658,24 +658,24 @@ abstract class CI_DB_driver { $this->query_times[] = 0; } - // This will trigger a rollback if transactions are being used + if ($this->_trans_depth !== 0) { $this->_trans_status = FALSE; } - // Grab the error now, as we might run some additional queries before displaying the error + $error = $this->error(); - // Log errors + log_message('error', 'Query error: '.$error['message'].' - Invalid query: '.$sql); if ($this->db_debug) { - // We call this function in order to roll-back queries - // if transactions are enabled. If we don't call this here - // the error message will trigger an exit, causing the - // transactions to remain in limbo. + + + + while ($this->_trans_depth !== 0) { $trans_depth = $this->_trans_depth; @@ -687,14 +687,14 @@ abstract class CI_DB_driver { } } - // Display errors + return $this->display_error(array('Error Number: '.$error['code'], $error['message'], $sql)); } return FALSE; } - // Stop and aggregate the query time results + $time_end = microtime(TRUE); $this->benchmark += $time_end - $time_start; @@ -703,13 +703,13 @@ abstract class CI_DB_driver { $this->query_times[] = $time_end - $time_start; } - // Increment the query counter + $this->query_count++; - // Will we have a result object instantiated? If not - we'll simply return TRUE + if ($return_object !== TRUE) { - // If caching is enabled we'll auto-cleanup any existing files related to this particular URI + if ($this->cache_on === TRUE && $this->cache_autodel === TRUE && $this->_cache_init()) { $this->CACHE->delete(); @@ -718,26 +718,26 @@ abstract class CI_DB_driver { return TRUE; } - // Load and instantiate the result driver + $driver = $this->load_rdriver(); $RES = new $driver($this); - // Is query caching enabled? If so, we'll serialize the - // result object and save it to a cache file. + + if ($this->cache_on === TRUE && $this->_cache_init()) { - // We'll create a new instance of the result object - // only without the platform specific driver since - // we can't use it with cached data (the query result - // resource ID won't be any good once we've cached the - // result object, so we'll have to compile the data - // and save it) + + + + + + $CR = new CI_DB_result($this); $CR->result_object = $RES->result_object(); $CR->result_array = $RES->result_array(); $CR->num_rows = $RES->num_rows(); - // Reset these since cached objects can not utilize resource IDs. + $CR->conn_id = NULL; $CR->result_id = NULL; @@ -747,13 +747,13 @@ abstract class CI_DB_driver { return $RES; } - // -------------------------------------------------------------------- - /** - * Load the result drivers - * - * @return string the name of the result class - */ + + + + + + public function load_rdriver() { $driver = 'CI_DB_'.$this->dbdriver.'_result'; @@ -767,17 +767,17 @@ abstract class CI_DB_driver { return $driver; } - // -------------------------------------------------------------------- - /** - * Simple Query - * This is a simplified version of the query() function. Internally - * we only use it when running transaction commands since they do - * not require all the features of the main query() function. - * - * @param string the sql query - * @return mixed - */ + + + + + + + + + + public function simple_query($sql) { if ( ! $this->conn_id) @@ -791,47 +791,47 @@ abstract class CI_DB_driver { return $this->_execute($sql); } - // -------------------------------------------------------------------- - /** - * Disable Transactions - * This permits transactions to be disabled at run-time. - * - * @return void - */ + + + + + + + public function trans_off() { $this->trans_enabled = FALSE; } - // -------------------------------------------------------------------- - /** - * Enable/disable Transaction Strict Mode - * - * When strict mode is enabled, if you are running multiple groups of - * transactions, if one group fails all subsequent groups will be - * rolled back. - * - * If strict mode is disabled, each group is treated autonomously, - * meaning a failure of one group will not affect any others - * - * @param bool $mode = TRUE - * @return void - */ + + + + + + + + + + + + + + public function trans_strict($mode = TRUE) { $this->trans_strict = is_bool($mode) ? $mode : TRUE; } - // -------------------------------------------------------------------- - /** - * Start Transaction - * - * @param bool $test_mode = FALSE - * @return bool - */ + + + + + + + public function trans_start($test_mode = FALSE) { if ( ! $this->trans_enabled) @@ -842,13 +842,13 @@ abstract class CI_DB_driver { return $this->trans_begin($test_mode); } - // -------------------------------------------------------------------- - /** - * Complete Transaction - * - * @return bool - */ + + + + + + public function trans_complete() { if ( ! $this->trans_enabled) @@ -856,14 +856,14 @@ abstract class CI_DB_driver { return FALSE; } - // The query() function will set this flag to FALSE in the event that a query failed + if ($this->_trans_status === FALSE OR $this->_trans_failure === TRUE) { $this->trans_rollback(); - // If we are NOT running in strict mode, we will reset - // the _trans_status flag so that subsequent groups of - // transactions will be permitted. + + + if ($this->trans_strict === FALSE) { $this->_trans_status = TRUE; @@ -876,42 +876,42 @@ abstract class CI_DB_driver { return $this->trans_commit(); } - // -------------------------------------------------------------------- - /** - * Lets you retrieve the transaction flag to determine if it has failed - * - * @return bool - */ + + + + + + public function trans_status() { return $this->_trans_status; } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @param bool $test_mode - * @return bool - */ + + + + + + + public function trans_begin($test_mode = FALSE) { if ( ! $this->trans_enabled) { return FALSE; } - // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 0) { $this->_trans_depth++; return TRUE; } - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. + + + $this->_trans_failure = ($test_mode === TRUE); if ($this->_trans_begin()) @@ -924,20 +924,20 @@ abstract class CI_DB_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + public function trans_commit() { if ( ! $this->trans_enabled OR $this->_trans_depth === 0) { return FALSE; } - // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 1 OR $this->_trans_commit()) { $this->_trans_depth--; @@ -947,20 +947,20 @@ abstract class CI_DB_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + public function trans_rollback() { if ( ! $this->trans_enabled OR $this->_trans_depth === 0) { return FALSE; } - // When transactions are nested we only begin/commit/rollback the outermost ones + elseif ($this->_trans_depth > 1 OR $this->_trans_rollback()) { $this->_trans_depth--; @@ -970,15 +970,15 @@ abstract class CI_DB_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Compile Bindings - * - * @param string the sql statement - * @param array an array of bind data - * @return string - */ + + + + + + + + public function compile_binds($sql, $binds) { if (empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE) @@ -992,15 +992,15 @@ abstract class CI_DB_driver { } else { - // Make sure we're using numeric keys + $binds = array_values($binds); $bind_count = count($binds); } - // We'll need the marker length later + $ml = strlen($this->bind_marker); - // Make sure not to replace a chunk inside a string that happens to match the bind marker + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', @@ -1009,7 +1009,7 @@ abstract class CI_DB_driver { $sql, $c), $matches, PREG_OFFSET_CAPTURE); - // Bind values' count must match the count of markers in the query + if ($bind_count !== $c) { return $sql; @@ -1035,67 +1035,67 @@ abstract class CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Determines if a query is a "write" type. - * - * @param string An SQL query string - * @return bool - */ + + + + + + + public function is_write_type($sql) { return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX|MERGE)\s/i', $sql); } - // -------------------------------------------------------------------- - /** - * Calculate the aggregate query elapsed time - * - * @param int The number of decimal places - * @return string - */ + + + + + + + public function elapsed_time($decimals = 6) { return number_format($this->benchmark, $decimals); } - // -------------------------------------------------------------------- - /** - * Returns the total number of queries - * - * @return int - */ + + + + + + public function total_queries() { return $this->query_count; } - // -------------------------------------------------------------------- - /** - * Returns the last query that was executed - * - * @return string - */ + + + + + + public function last_query() { return end($this->queries); } - // -------------------------------------------------------------------- - /** - * "Smart" Escape String - * - * Escapes data based on type - * Sets boolean and null types - * - * @param string - * @return mixed - */ + + + + + + + + + + public function escape($str) { if (is_array($str)) @@ -1119,15 +1119,15 @@ abstract class CI_DB_driver { return $str; } - // -------------------------------------------------------------------- - /** - * Escape String - * - * @param string|string[] $str Input string - * @param bool $like Whether or not the string will be used in a LIKE condition - * @return string - */ + + + + + + + + public function escape_str($str, $like = FALSE) { if (is_array($str)) @@ -1142,7 +1142,7 @@ abstract class CI_DB_driver { $str = $this->_escape_str($str); - // escape LIKE condition wildcards + if ($like === TRUE) { return str_replace( @@ -1155,63 +1155,63 @@ abstract class CI_DB_driver { return $str; } - // -------------------------------------------------------------------- - /** - * Escape LIKE String - * - * Calls the individual driver for platform - * specific escaping for LIKE conditions - * - * @param string|string[] - * @return mixed - */ + + + + + + + + + + public function escape_like_str($str) { return $this->escape_str($str, TRUE); } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return str_replace("'", "''", remove_invisible_characters($str, FALSE)); } - // -------------------------------------------------------------------- - /** - * Primary - * - * Retrieves the primary key. It assumes that the row in the first - * position is the primary key - * - * @param string $table Table name - * @return string - */ + + + + + + + + + + public function primary($table) { $fields = $this->list_fields($table); return is_array($fields) ? current($fields) : FALSE; } - // -------------------------------------------------------------------- - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @param string - * @return int - */ + + + + + + + + + + public function count_all($table = '') { if ($table === '') @@ -1230,17 +1230,17 @@ abstract class CI_DB_driver { return (int) $query->numrows; } - // -------------------------------------------------------------------- - /** - * Returns an array of table names - * - * @param string $constrain_by_prefix = FALSE - * @return array - */ + + + + + + + public function list_tables($constrain_by_prefix = FALSE) { - // Is there a cached result? + if (isset($this->data_cache['table_names'])) { return $this->data_cache['table_names']; @@ -1256,7 +1256,7 @@ abstract class CI_DB_driver { foreach ($query->result_array() as $row) { - // Do we know from which column to get the table name? + if ( ! isset($key)) { if (isset($row['table_name'])) @@ -1269,11 +1269,11 @@ abstract class CI_DB_driver { } else { - /* We have no other choice but to just get the first element's key. - * Due to array_shift() accepting its argument by reference, if - * E_STRICT is on, this would trigger a warning. So we'll have to - * assign it first. - */ + + + + + $key = array_keys($row); $key = array_shift($key); } @@ -1285,27 +1285,27 @@ abstract class CI_DB_driver { return $this->data_cache['table_names']; } - // -------------------------------------------------------------------- - /** - * Determine if a particular table exists - * - * @param string $table_name - * @return bool - */ + + + + + + + public function table_exists($table_name) { return in_array($this->protect_identifiers($table_name, TRUE, FALSE, FALSE), $this->list_tables()); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * @param string $table Table name - * @return array - */ + + + + + + + public function list_fields($table) { if (FALSE === ($sql = $this->_list_columns($table))) @@ -1318,7 +1318,7 @@ abstract class CI_DB_driver { foreach ($query->result_array() as $row) { - // Do we know from where to get the column's name? + if ( ! isset($key)) { if (isset($row['column_name'])) @@ -1331,7 +1331,7 @@ abstract class CI_DB_driver { } else { - // We have no other choice but to just get the first element's key. + $key = key($row); } } @@ -1342,44 +1342,44 @@ abstract class CI_DB_driver { return $fields; } - // -------------------------------------------------------------------- - /** - * Determine if a particular field exists - * - * @param string - * @param string - * @return bool - */ + + + + + + + + public function field_exists($field_name, $table_name) { return in_array($field_name, $this->list_fields($table_name)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table the table name - * @return array - */ + + + + + + + public function field_data($table) { $query = $this->query($this->_field_data($this->protect_identifiers($table, TRUE, NULL, FALSE))); return ($query) ? $query->field_data() : FALSE; } - // -------------------------------------------------------------------- - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @param mixed - * @return mixed - */ + + + + + + + + + public function escape_identifiers($item) { if ($this->_escape_char === '' OR empty($item) OR in_array($item, $this->_reserved_identifiers)) @@ -1395,7 +1395,7 @@ abstract class CI_DB_driver { return $item; } - // Avoid breaking functions and literal values inside queries + elseif (ctype_digit($item) OR $item[0] === "'" OR ($this->_escape_char !== '"' && $item[0] === '"') OR strpos($item, '(') !== FALSE) { return $item; @@ -1432,15 +1432,15 @@ abstract class CI_DB_driver { return preg_replace('/'.$preg_ec[0].'?([^'.$preg_ec[1].'\.]+)'.$preg_ec[1].'?(\.)?/i', $preg_ec[2].'$1'.$preg_ec[3].'$2', $item); } - // -------------------------------------------------------------------- - /** - * Generate an insert string - * - * @param string the table upon which the query will be performed - * @param array an associative array data of key/values - * @return string - */ + + + + + + + + public function insert_string($table, $data) { $fields = $values = array(); @@ -1454,33 +1454,33 @@ abstract class CI_DB_driver { return $this->_insert($this->protect_identifiers($table, TRUE, NULL, FALSE), $fields, $values); } - // -------------------------------------------------------------------- - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ + + + + + + + + + + + protected function _insert($table, $keys, $values) { return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')'; } - // -------------------------------------------------------------------- - /** - * Generate an update string - * - * @param string the table upon which the query will be performed - * @param array an associative array data of key/values - * @param mixed the "where" statement - * @return string - */ + + + + + + + + + public function update_string($table, $data, $where) { if (empty($where)) @@ -1501,17 +1501,17 @@ abstract class CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string the table name - * @param array the update data - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { foreach ($values as $key => $val) @@ -1525,27 +1525,27 @@ abstract class CI_DB_driver { .($this->qb_limit !== FALSE ? ' LIMIT '.$this->qb_limit : ''); } - // -------------------------------------------------------------------- - /** - * Tests whether the string has an SQL operator - * - * @param string - * @return bool - */ + + + + + + + protected function _has_operator($str) { return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str)); } - // -------------------------------------------------------------------- - /** - * Returns the SQL string operator - * - * @param string - * @return string - */ + + + + + + + protected function _get_operator($str) { static $_operators; @@ -1556,18 +1556,18 @@ abstract class CI_DB_driver { ? '\s+'.preg_quote(trim(sprintf($this->_like_escape_str, $this->_like_escape_chr)), '/') : ''; $_operators = array( - '\s*(?:<|>|!)?=\s*', // =, <=, >=, != - '\s*<>?\s*', // <, <> - '\s*>\s*', // > - '\s+IS NULL', // IS NULL - '\s+IS NOT NULL', // IS NOT NULL - '\s+EXISTS\s*\(.*\)', // EXISTS(sql) - '\s+NOT EXISTS\s*\(.*\)', // NOT EXISTS(sql) - '\s+BETWEEN\s+', // BETWEEN value AND value - '\s+IN\s*\(.*\)', // IN(list) - '\s+NOT IN\s*\(.*\)', // NOT IN (list) - '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] - '\s+NOT LIKE\s+\S.*('.$_les.')?' // NOT LIKE 'expr'[ ESCAPE '%s'] + '\s*(?:<|>|!)?=\s*', + '\s*<>?\s*', + '\s*>\s*', + '\s+IS NULL', + '\s+IS NOT NULL', + '\s+EXISTS\s*\(.*\)', + '\s+NOT EXISTS\s*\(.*\)', + '\s+BETWEEN\s+', + '\s+IN\s*\(.*\)', + '\s+NOT IN\s*\(.*\)', + '\s+LIKE\s+\S.*('.$_les.')?', + '\s+NOT LIKE\s+\S.*('.$_les.')?' ); } @@ -1576,14 +1576,14 @@ abstract class CI_DB_driver { ? $match[0] : FALSE; } - // -------------------------------------------------------------------- - /** - * Enables a native PHP function to be run, using a platform agnostic wrapper. - * - * @param string $function Function name - * @return mixed - */ + + + + + + + public function call_function($function) { $driver = ($this->dbdriver === 'postgre') ? 'pg_' : $this->dbdriver.'_'; @@ -1603,52 +1603,52 @@ abstract class CI_DB_driver { : call_user_func($function); } - // -------------------------------------------------------------------- - /** - * Set Cache Directory Path - * - * @param string the path to the cache directory - * @return void - */ + + + + + + + public function cache_set_path($path = '') { $this->cachedir = $path; } - // -------------------------------------------------------------------- - /** - * Enable Query Caching - * - * @return bool cache_on value - */ + + + + + + public function cache_on() { return $this->cache_on = TRUE; } - // -------------------------------------------------------------------- - /** - * Disable Query Caching - * - * @return bool cache_on value - */ + + + + + + public function cache_off() { return $this->cache_on = FALSE; } - // -------------------------------------------------------------------- - /** - * Delete the cache files associated with a particular URI - * - * @param string $segment_one = '' - * @param string $segment_two = '' - * @return bool - */ + + + + + + + + public function cache_delete($segment_one = '', $segment_two = '') { return $this->_cache_init() @@ -1656,13 +1656,13 @@ abstract class CI_DB_driver { : FALSE; } - // -------------------------------------------------------------------- - /** - * Delete All cache files - * - * @return bool - */ + + + + + + public function cache_delete_all() { return $this->_cache_init() @@ -1670,13 +1670,13 @@ abstract class CI_DB_driver { : FALSE; } - // -------------------------------------------------------------------- - /** - * Initialize the Cache Class - * - * @return bool - */ + + + + + + protected function _cache_init() { if ( ! class_exists('CI_DB_Cache', FALSE)) @@ -1688,17 +1688,17 @@ abstract class CI_DB_driver { return TRUE; } - $this->CACHE = new CI_DB_Cache($this); // pass db object to support multiple db connections and returned db objects + $this->CACHE = new CI_DB_Cache($this); return TRUE; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + public function close() { if ($this->conn_id) @@ -1708,30 +1708,30 @@ abstract class CI_DB_driver { } } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * This method would be overridden by most of the drivers. - * - * @return void - */ + + + + + + + + protected function _close() { $this->conn_id = FALSE; } - // -------------------------------------------------------------------- - /** - * Display an error message - * - * @param string the error message - * @param string any "swap" values - * @param bool whether to localize the message - * @return string sends the application/views/errors/error_db.php template - */ + + + + + + + + + public function display_error($error = '', $swap = '', $native = FALSE) { $LANG =& load_class('Lang', 'core'); @@ -1748,15 +1748,15 @@ abstract class CI_DB_driver { $message = is_array($error) ? $error : array(str_replace('%s', $swap, $LANG->line($error))); } - // Find the most likely culprit of the error by going through - // the backtrace until the source file is no longer in the - // database folder. + + + $trace = debug_backtrace(); foreach ($trace as $call) { if (isset($call['file'], $call['class'])) { - // We'll need this on Windows, as APPPATH and BASEPATH will always use forward slashes + if (DIRECTORY_SEPARATOR !== '/') { $call['file'] = str_replace('\\', '/', $call['file']); @@ -1764,7 +1764,7 @@ abstract class CI_DB_driver { if (strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') === FALSE) { - // Found it - use a relative path for safety + $message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']); $message[] = 'Line Number: '.$call['line']; break; @@ -1774,37 +1774,37 @@ abstract class CI_DB_driver { $error =& load_class('Exceptions', 'core'); echo $error->show_error($heading, $message, 'error_db'); - exit(8); // EXIT_DATABASE + exit(8); } - // -------------------------------------------------------------------- - /** - * Protect Identifiers - * - * This function is used extensively by the Query Builder class, and by - * a couple functions in this class. - * It takes a column or table name (optionally with an alias) and inserts - * the table prefix onto it. Some logic is necessary in order to deal with - * column names that include the path. Consider a query like this: - * - * SELECT hostname.database.table.column AS c FROM hostname.database.table - * - * Or a query with aliasing: - * - * SELECT m.member_id, m.member_name FROM members AS m - * - * Since the column name can include up to four segments (host, DB, table, column) - * or also have an alias prefix, we need to do a bit of work to figure this out and - * insert the table prefix (if it exists) in the proper position, and escape only - * the correct identifiers. - * - * @param string - * @param bool - * @param mixed - * @param bool - * @return string - */ + + + + + + + + + + + + + + + + + + + + + + + + + + + public function protect_identifiers($item, $prefix_single = FALSE, $protect_identifiers = NULL, $field_exists = TRUE) { if ( ! is_bool($protect_identifiers)) @@ -1823,23 +1823,23 @@ abstract class CI_DB_driver { return $escaped_array; } - // This is basically a bug fix for queries that use MAX, MIN, etc. - // If a parenthesis is found we know that we do not need to - // escape the data or add a prefix. There's probably a more graceful - // way to deal with this, but I'm not thinking of it -- Rick - // - // Added exception for single quotes as well, we don't want to alter - // literal strings. -- Narf + + + + + + + if (strcspn($item, "()'") !== strlen($item)) { return $item; } - // Convert tabs or multiple spaces into single spaces + $item = preg_replace('/\s+/', ' ', trim($item)); - // If the item has an alias declaration we remove it and set it aside. - // Note: strripos() is used in order to support spaces in table names + + if ($offset = strripos($item, ' AS ')) { $alias = ($protect_identifiers) @@ -1859,19 +1859,19 @@ abstract class CI_DB_driver { $alias = ''; } - // Break the string apart if it contains periods, then insert the table prefix - // in the correct location, assuming the period doesn't indicate that we're dealing - // with an alias. While we're at it, we will escape the components + + + if (strpos($item, '.') !== FALSE) { $parts = explode('.', $item); - // Does the first segment of the exploded item match - // one of the aliases previously identified? If so, - // we have nothing more to do other than escape the item - // - // NOTE: The ! empty() condition prevents this method - // from breaking when QB isn't enabled. + + + + + + if ( ! empty($this->qb_aliased_tables) && in_array($parts[0], $this->qb_aliased_tables)) { if ($protect_identifiers === TRUE) @@ -1890,52 +1890,52 @@ abstract class CI_DB_driver { return $item.$alias; } - // Is there a table prefix defined in the config file? If not, no need to do anything + if ($this->dbprefix !== '') { - // We now add the table prefix based on some logic. - // Do we have 4 segments (hostname.database.table.column)? - // If so, we add the table prefix to the column name in the 3rd segment. + + + if (isset($parts[3])) { $i = 2; } - // Do we have 3 segments (database.table.column)? - // If so, we add the table prefix to the column name in 2nd position + + elseif (isset($parts[2])) { $i = 1; } - // Do we have 2 segments (table.column)? - // If so, we add the table prefix to the column name in 1st segment + + else { $i = 0; } - // This flag is set when the supplied $item does not contain a field name. - // This can happen when this function is being called from a JOIN. + + if ($field_exists === FALSE) { $i++; } - // dbprefix may've already been applied, with or without the identifier escaped - $ec = '(?'.preg_quote(is_array($this->_escape_char) ? $this->_escape_char[0] : $this->_escape_char).')?'; - isset($ec[0]) && $ec .= '?'; // Just in case someone has disabled escaping by forcing an empty escape character - // Verify table prefix and replace if necessary + $ec = '(?'.preg_quote(is_array($this->_escape_char) ? $this->_escape_char[0] : $this->_escape_char).')?'; + isset($ec[0]) && $ec .= '?'; + + if ($this->swap_pre !== '' && preg_match('#^'.$ec.preg_quote($this->swap_pre).'#', $parts[$i])) { $parts[$i] = preg_replace('#^'.$ec.preg_quote($this->swap_pre).'(\S+?)#', '\\1'.$this->dbprefix.'\\2', $parts[$i]); } - // We only add the table prefix if it does not already exist + else { preg_match('#^'.$ec.preg_quote($this->dbprefix).'#', $parts[$i]) OR $parts[$i] = $this->dbprefix.$parts[$i]; } - // Put the parts back together + $item = implode('.', $parts); } @@ -1947,15 +1947,15 @@ abstract class CI_DB_driver { return $item.$alias; } - // Is there a table prefix? If not, no need to insert it + if ($this->dbprefix !== '') { - // Verify table prefix and replace if necessary + if ($this->swap_pre !== '' && strpos($item, $this->swap_pre) === 0) { $item = preg_replace('/^'.$this->swap_pre.'(\S+?)/', $this->dbprefix.'\\1', $item); } - // Do we prefix an item with no segments? + elseif ($prefix_single === TRUE && strpos($item, $this->dbprefix) !== 0) { $item = $this->dbprefix.$item; @@ -1970,14 +1970,14 @@ abstract class CI_DB_driver { return $item.$alias; } - // -------------------------------------------------------------------- - /** - * Dummy method that allows Query Builder class to be disabled - * and keep count_all() working. - * - * @return void - */ + + + + + + + protected function _reset_select() { } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_forge.php index 85b58fd..c7f9711 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_forge.php @@ -1,183 +1,183 @@ db =& $db; log_message('info', 'Database Forge Class Initialized'); } - // -------------------------------------------------------------------- - /** - * Create database - * - * @param string $db_name - * @return bool - */ + + + + + + + public function create_database($db_name) { if ($this->_create_database === FALSE) @@ -197,14 +197,14 @@ abstract class CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * Drop database - * - * @param string $db_name - * @return bool - */ + + + + + + + public function drop_database($db_name) { if ($this->_drop_database === FALSE) @@ -228,23 +228,23 @@ abstract class CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * Add Key - * - * @param string $key - * @param bool $primary - * @return CI_DB_forge - */ + + + + + + + + public function add_key($key, $primary = FALSE) { - // DO NOT change this! This condition is only applicable - // for PRIMARY keys because you can only have one such, - // and therefore all fields you add to it will be included - // in the same, composite PRIMARY KEY. - // - // It's not the same for regular indexes. + + + + + + if ($primary === TRUE && is_array($key)) { foreach ($key as $one) @@ -267,14 +267,14 @@ abstract class CI_DB_forge { return $this; } - // -------------------------------------------------------------------- - /** - * Add Field - * - * @param array $field - * @return CI_DB_forge - */ + + + + + + + public function add_field($field) { if (is_string($field)) @@ -309,16 +309,16 @@ abstract class CI_DB_forge { return $this; } - // -------------------------------------------------------------------- - /** - * Create Table - * - * @param string $table Table name - * @param bool $if_not_exists Whether to add IF NOT EXISTS condition - * @param array $attributes Associative array of table attributes - * @return bool - */ + + + + + + + + + public function create_table($table, $if_not_exists = FALSE, array $attributes = array()) { if ($table === '') @@ -353,7 +353,7 @@ abstract class CI_DB_forge { $this->db->data_cache['table_names'][] = $table; } - // Most databases don't support creating indexes from within the CREATE TABLE statement + if ( ! empty($this->keys)) { for ($i = 0, $sqls = $this->_process_indexes($table), $c = count($sqls); $i < $c; $i++) @@ -367,16 +367,16 @@ abstract class CI_DB_forge { return $result; } - // -------------------------------------------------------------------- - /** - * Create Table - * - * @param string $table Table name - * @param bool $if_not_exists Whether to add 'IF NOT EXISTS' condition - * @param array $attributes Associative array of table attributes - * @return mixed - */ + + + + + + + + + protected function _create_table($table, $if_not_exists, $attributes) { if ($if_not_exists === TRUE && $this->_create_table_if === FALSE) @@ -404,13 +404,13 @@ abstract class CI_DB_forge { $columns = implode(',', $columns) .$this->_process_primary_keys($table); - // Are indexes created from within the CREATE TABLE statement? (e.g. in MySQL) + if ($this->_create_table_keys === TRUE) { $columns .= $this->_process_indexes($table); } - // _create_table will usually have the following format: "%s %s (%s\n)" + $sql = sprintf($this->_create_table.'%s', $sql, $this->db->escape_identifiers($table), @@ -421,14 +421,14 @@ abstract class CI_DB_forge { return $sql; } - // -------------------------------------------------------------------- - /** - * CREATE TABLE attributes - * - * @param array $attributes Associative array of table attributes - * @return string - */ + + + + + + + protected function _create_table_attr($attributes) { $sql = ''; @@ -444,15 +444,15 @@ abstract class CI_DB_forge { return $sql; } - // -------------------------------------------------------------------- - /** - * Drop Table - * - * @param string $table_name Table name - * @param bool $if_exists Whether to add an IF EXISTS condition - * @return bool - */ + + + + + + + + public function drop_table($table_name, $if_exists = FALSE) { if ($table_name === '') @@ -467,7 +467,7 @@ abstract class CI_DB_forge { $query = $this->db->query($query); - // Update table list cache + if ($query && ! empty($this->db->data_cache['table_names'])) { $key = array_search(strtolower($this->db->dbprefix.$table_name), array_map('strtolower', $this->db->data_cache['table_names']), TRUE); @@ -480,17 +480,17 @@ abstract class CI_DB_forge { return $query; } - // -------------------------------------------------------------------- - /** - * Drop Table - * - * Generates a platform-specific DROP TABLE string - * - * @param string $table Table name - * @param bool $if_exists Whether to add an IF EXISTS condition - * @return mixed (Returns a platform-specific DROP table string, or TRUE to indicate there's nothing to do) - */ + + + + + + + + + + protected function _drop_table($table, $if_exists) { $sql = 'DROP TABLE'; @@ -513,15 +513,15 @@ abstract class CI_DB_forge { return $sql.' '.$this->db->escape_identifiers($table); } - // -------------------------------------------------------------------- - /** - * Rename Table - * - * @param string $table_name Old table name - * @param string $new_table_name New table name - * @return bool - */ + + + + + + + + public function rename_table($table_name, $new_table_name) { if ($table_name === '' OR $new_table_name === '') @@ -551,25 +551,25 @@ abstract class CI_DB_forge { return $result; } - // -------------------------------------------------------------------- - /** - * Column Add - * - * @todo Remove deprecated $_after option in 3.1+ - * @param string $table Table name - * @param array $field Column definition - * @param string $_after Column for AFTER clause (deprecated) - * @return bool - */ + + + + + + + + + + public function add_column($table, $field, $_after = NULL) { - // Work-around for literal column definitions + is_array($field) OR $field = array($field); foreach (array_keys($field) as $k) { - // Backwards-compatibility work-around for MySQL/CUBRID AFTER clause (remove in 3.1+) + if ($_after !== NULL && is_array($field[$k]) && ! isset($field[$k]['after'])) { $field[$k]['after'] = $_after; @@ -596,15 +596,15 @@ abstract class CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * Column Drop - * - * @param string $table Table name - * @param string $column_name Column name - * @return bool - */ + + + + + + + + public function drop_column($table, $column_name) { $sql = $this->_alter_table('DROP', $this->db->dbprefix.$table, $column_name); @@ -616,18 +616,18 @@ abstract class CI_DB_forge { return $this->db->query($sql); } - // -------------------------------------------------------------------- - /** - * Column Modify - * - * @param string $table Table name - * @param string $field Column definition - * @return bool - */ + + + + + + + + public function modify_column($table, $field) { - // Work-around for literal column definitions + is_array($field) OR $field = array($field); foreach (array_keys($field) as $k) @@ -658,21 +658,21 @@ abstract class CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { $sql = 'ALTER TABLE '.$this->db->escape_identifiers($table).' '; - // DROP has everything it needs now. + if ($alter_type === 'DROP') { return $sql.'DROP COLUMN '.$this->db->escape_identifiers($field); @@ -692,14 +692,14 @@ abstract class CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Process fields - * - * @param bool $create_table - * @return array - */ + + + + + + + protected function _process_fields($create_table = FALSE) { $fields = array(); @@ -795,14 +795,14 @@ abstract class CI_DB_forge { return $fields; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -814,39 +814,39 @@ abstract class CI_DB_forge { .$field['unique']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { - // Usually overridden by drivers + } - // -------------------------------------------------------------------- - /** - * Field attribute UNSIGNED - * - * Depending on the _unsigned property value: - * - * - TRUE will always set $field['unsigned'] to 'UNSIGNED' - * - FALSE will always set $field['unsigned'] to '' - * - array(TYPE) will set $field['unsigned'] to 'UNSIGNED', - * if $attributes['TYPE'] is found in the array - * - array(TYPE => UTYPE) will change $field['type'], - * from TYPE to UTYPE in case of a match - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + + + + + + + + + + protected function _attr_unsigned(&$attributes, &$field) { if (empty($attributes['UNSIGNED']) OR $attributes['UNSIGNED'] !== TRUE) @@ -854,7 +854,7 @@ abstract class CI_DB_forge { return; } - // Reset the attribute in order to avoid issues if we do type conversion + $attributes['UNSIGNED'] = FALSE; if (is_array($this->_unsigned)) @@ -879,15 +879,15 @@ abstract class CI_DB_forge { $field['unsigned'] = ($this->_unsigned === TRUE) ? ' UNSIGNED' : ''; } - // -------------------------------------------------------------------- - /** - * Field attribute DEFAULT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_default(&$attributes, &$field) { if ($this->_default === FALSE) @@ -901,7 +901,7 @@ abstract class CI_DB_forge { { $field['default'] = empty($this->_null) ? '' : $this->_default.$this->_null; - // Override the NULL attribute if that's our default + $attributes['NULL'] = TRUE; $field['null'] = empty($this->_null) ? '' : ' '.$this->_null; } @@ -912,15 +912,15 @@ abstract class CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute UNIQUE - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_unique(&$attributes, &$field) { if ( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) @@ -929,15 +929,15 @@ abstract class CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) @@ -946,14 +946,14 @@ abstract class CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Process primary keys - * - * @param string $table Table name - * @return string - */ + + + + + + + protected function _process_primary_keys($table) { $sql = ''; @@ -975,14 +975,14 @@ abstract class CI_DB_forge { return $sql; } - // -------------------------------------------------------------------- - /** - * Process indexes - * - * @param string $table Table name - * @return string[] list of SQL statements - */ + + + + + + + protected function _process_indexes($table) { $sqls = array(); @@ -1016,15 +1016,15 @@ abstract class CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Reset - * - * Resets table creation vars - * - * @return void - */ + + + + + + + + protected function _reset() { $this->fields = $this->keys = $this->primary_keys = array(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_query_builder.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_query_builder.php index f35b9fd..34d8b9d 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_query_builder.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_query_builder.php @@ -1,286 +1,286 @@ _protect_identifiers; foreach ($select as $val) @@ -312,85 +312,85 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Select Max - * - * Generates a SELECT MAX(field) portion of a query - * - * @param string the field - * @param string an alias - * @return CI_DB_query_builder - */ + + + + + + + + + + public function select_max($select = '', $alias = '') { return $this->_max_min_avg_sum($select, $alias, 'MAX'); } - // -------------------------------------------------------------------- - /** - * Select Min - * - * Generates a SELECT MIN(field) portion of a query - * - * @param string the field - * @param string an alias - * @return CI_DB_query_builder - */ + + + + + + + + + + public function select_min($select = '', $alias = '') { return $this->_max_min_avg_sum($select, $alias, 'MIN'); } - // -------------------------------------------------------------------- - /** - * Select Average - * - * Generates a SELECT AVG(field) portion of a query - * - * @param string the field - * @param string an alias - * @return CI_DB_query_builder - */ + + + + + + + + + + public function select_avg($select = '', $alias = '') { return $this->_max_min_avg_sum($select, $alias, 'AVG'); } - // -------------------------------------------------------------------- - /** - * Select Sum - * - * Generates a SELECT SUM(field) portion of a query - * - * @param string the field - * @param string an alias - * @return CI_DB_query_builder - */ + + + + + + + + + + public function select_sum($select = '', $alias = '') { return $this->_max_min_avg_sum($select, $alias, 'SUM'); } - // -------------------------------------------------------------------- - /** - * SELECT [MAX|MIN|AVG|SUM]() - * - * @used-by select_max() - * @used-by select_min() - * @used-by select_avg() - * @used-by select_sum() - * - * @param string $select Field name - * @param string $alias - * @param string $type - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + + protected function _max_min_avg_sum($select = '', $alias = '', $type = 'MAX') { if ( ! is_string($select) OR $select === '') @@ -424,14 +424,14 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Determines the alias name based on the table - * - * @param string $item - * @return string - */ + + + + + + + protected function _create_alias_from_table($item) { if (strpos($item, '.') !== FALSE) @@ -443,32 +443,32 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $item; } - // -------------------------------------------------------------------- - /** - * DISTINCT - * - * Sets a flag which tells the query string compiler to add DISTINCT - * - * @param bool $val - * @return CI_DB_query_builder - */ + + + + + + + + + public function distinct($val = TRUE) { $this->qb_distinct = is_bool($val) ? $val : TRUE; return $this; } - // -------------------------------------------------------------------- - /** - * From - * - * Generates the FROM portion of the query - * - * @param mixed $from can be a string or array - * @return CI_DB_query_builder - */ + + + + + + + + + public function from($from) { foreach ((array) $from as $val) @@ -493,8 +493,8 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { $val = trim($val); - // Extract any aliases that might exist. We use this information - // in the protect_identifiers to know whether to add a table prefix + + $this->_track_aliases($val); $this->qb_from[] = $val = $this->protect_identifiers($val, TRUE, NULL, FALSE); @@ -510,19 +510,19 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * JOIN - * - * Generates the JOIN portion of the query - * - * @param string - * @param string the join condition - * @param string the type of join - * @param string whether not to try to escape identifiers - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function join($table, $cond, $type = '', $escape = NULL) { if ($type !== '') @@ -539,8 +539,8 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // Extract any aliases that might exist. We use this information - // in the protect_identifiers to know whether to add a table prefix + + $this->_track_aliases($table); is_bool($escape) OR $escape = $this->_protect_identifiers; @@ -555,7 +555,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } else { - // Split multiple conditions + if (preg_match_all('/\sAND\s|\sOR\s/i', $cond, $joints, PREG_OFFSET_CAPTURE)) { $conditions = array(); @@ -564,7 +564,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { for ($i = count($joints) - 1, $pos = strlen($cond); $i >= 0; $i--) { - $joints[$i][1] += strlen($joints[$i][0]); // offset + $joints[$i][1] += strlen($joints[$i][0]); $conditions[$i] = substr($cond, $joints[$i][1], $pos - $joints[$i][1]); $pos = $joints[$i][1] - strlen($joints[$i][0]); $joints[$i] = $joints[$i][0]; @@ -587,13 +587,13 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // Do we want to escape the table name? + if ($escape === TRUE) { $table = $this->protect_identifiers($table, TRUE, NULL, FALSE); } - // Assemble the JOIN statement + $this->qb_join[] = $join = $type.'JOIN '.$table.$cond; if ($this->qb_caching === TRUE) @@ -605,59 +605,59 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * WHERE - * - * Generates the WHERE portion of the query. - * Separates multiple calls with 'AND'. - * - * @param mixed - * @param mixed - * @param bool - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function where($key, $value = NULL, $escape = NULL) { return $this->_wh('qb_where', $key, $value, 'AND ', $escape); } - // -------------------------------------------------------------------- - /** - * OR WHERE - * - * Generates the WHERE portion of the query. - * Separates multiple calls with 'OR'. - * - * @param mixed - * @param mixed - * @param bool - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function or_where($key, $value = NULL, $escape = NULL) { return $this->_wh('qb_where', $key, $value, 'OR ', $escape); } - // -------------------------------------------------------------------- - /** - * WHERE, HAVING - * - * @used-by where() - * @used-by or_where() - * @used-by having() - * @used-by or_having() - * - * @param string $qb_key 'qb_where' or 'qb_having' - * @param mixed $key - * @param mixed $value - * @param string $type - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + + + + protected function _wh($qb_key, $key, $value = NULL, $type = 'AND ', $escape = NULL) { $qb_cache_key = ($qb_key === 'qb_having') ? 'qb_cache_having' : 'qb_cache_where'; @@ -667,7 +667,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $key = array($key => $value); } - // If the escape value was not set will base it on the global setting + is_bool($escape) OR $escape = $this->_protect_identifiers; foreach ($key as $k => $v) @@ -690,7 +690,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } elseif ( ! $this->_has_operator($k)) { - // value appears not to have been set, assign the test to IS NULL + $k .= ' IS NULL'; } elseif (preg_match('/\s*(!?=|<>|\sIS(?:\s+NOT)?\s)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) @@ -711,95 +711,95 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * WHERE IN - * - * Generates a WHERE field IN('item', 'item') SQL query, - * joined with 'AND' if appropriate. - * - * @param string $key The field to search - * @param array $values The values searched on - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function where_in($key = NULL, $values = NULL, $escape = NULL) { return $this->_where_in($key, $values, FALSE, 'AND ', $escape); } - // -------------------------------------------------------------------- - /** - * OR WHERE IN - * - * Generates a WHERE field IN('item', 'item') SQL query, - * joined with 'OR' if appropriate. - * - * @param string $key The field to search - * @param array $values The values searched on - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function or_where_in($key = NULL, $values = NULL, $escape = NULL) { return $this->_where_in($key, $values, FALSE, 'OR ', $escape); } - // -------------------------------------------------------------------- - /** - * WHERE NOT IN - * - * Generates a WHERE field NOT IN('item', 'item') SQL query, - * joined with 'AND' if appropriate. - * - * @param string $key The field to search - * @param array $values The values searched on - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function where_not_in($key = NULL, $values = NULL, $escape = NULL) { return $this->_where_in($key, $values, TRUE, 'AND ', $escape); } - // -------------------------------------------------------------------- - /** - * OR WHERE NOT IN - * - * Generates a WHERE field NOT IN('item', 'item') SQL query, - * joined with 'OR' if appropriate. - * - * @param string $key The field to search - * @param array $values The values searched on - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + public function or_where_not_in($key = NULL, $values = NULL, $escape = NULL) { return $this->_where_in($key, $values, TRUE, 'OR ', $escape); } - // -------------------------------------------------------------------- - /** - * Internal WHERE IN - * - * @used-by where_in() - * @used-by or_where_in() - * @used-by where_not_in() - * @used-by or_where_not_in() - * - * @param string $key The field to search - * @param array $values The values searched on - * @param bool $not If the statement would be IN or NOT IN - * @param string $type - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + + + + protected function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ', $escape = NULL) { if ($key === NULL OR $values === NULL) @@ -849,100 +849,100 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * LIKE - * - * Generates a %LIKE% portion of the query. - * Separates multiple calls with 'AND'. - * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + public function like($field, $match = '', $side = 'both', $escape = NULL) { return $this->_like($field, $match, 'AND ', $side, '', $escape); } - // -------------------------------------------------------------------- - /** - * NOT LIKE - * - * Generates a NOT LIKE portion of the query. - * Separates multiple calls with 'AND'. - * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + public function not_like($field, $match = '', $side = 'both', $escape = NULL) { return $this->_like($field, $match, 'AND ', $side, 'NOT', $escape); } - // -------------------------------------------------------------------- - /** - * OR LIKE - * - * Generates a %LIKE% portion of the query. - * Separates multiple calls with 'OR'. - * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + public function or_like($field, $match = '', $side = 'both', $escape = NULL) { return $this->_like($field, $match, 'OR ', $side, '', $escape); } - // -------------------------------------------------------------------- - /** - * OR NOT LIKE - * - * Generates a NOT LIKE portion of the query. - * Separates multiple calls with 'OR'. - * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + public function or_not_like($field, $match = '', $side = 'both', $escape = NULL) { return $this->_like($field, $match, 'OR ', $side, 'NOT', $escape); } - // -------------------------------------------------------------------- - /** - * Internal LIKE - * - * @used-by like() - * @used-by or_like() - * @used-by not_like() - * @used-by or_not_like() - * - * @param mixed $field - * @param string $match - * @param string $type - * @param string $side - * @param string $not - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + + + + + + + protected function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '', $escape = NULL) { if ( ! is_array($field)) @@ -951,7 +951,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } is_bool($escape) OR $escape = $this->_protect_identifiers; - // lowercase $side in case somebody writes e.g. 'BEFORE' instead of 'before' (doh) + $side = strtolower($side); foreach ($field as $k => $v) @@ -981,7 +981,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { break; } - // some platforms require an escape sequence definition for LIKE wildcards + if ($escape === TRUE && $this->_like_escape_str !== '') { $v .= sprintf($this->_like_escape_str, $this->_like_escape_chr); @@ -999,15 +999,15 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Starts a query group. - * - * @param string $not (Internal use only) - * @param string $type (Internal use only) - * @return CI_DB_query_builder - */ + + + + + + + + public function group_start($not = '', $type = 'AND ') { $type = $this->_group_get_type($type); @@ -1029,49 +1029,49 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Starts a query group, but ORs the group - * - * @return CI_DB_query_builder - */ + + + + + + public function or_group_start() { return $this->group_start('', 'OR '); } - // -------------------------------------------------------------------- - /** - * Starts a query group, but NOTs the group - * - * @return CI_DB_query_builder - */ + + + + + + public function not_group_start() { return $this->group_start('NOT ', 'AND '); } - // -------------------------------------------------------------------- - /** - * Starts a query group, but OR NOTs the group - * - * @return CI_DB_query_builder - */ + + + + + + public function or_not_group_start() { return $this->group_start('NOT ', 'OR '); } - // -------------------------------------------------------------------- - /** - * Ends a query group - * - * @return CI_DB_query_builder - */ + + + + + + public function group_end() { $this->qb_where_group_started = FALSE; @@ -1090,19 +1090,19 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Group_get_type - * - * @used-by group_start() - * @used-by _like() - * @used-by _wh() - * @used-by _where_in() - * - * @param string $type - * @return string - */ + + + + + + + + + + + + protected function _group_get_type($type) { if ($this->qb_where_group_started) @@ -1114,15 +1114,15 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $type; } - // -------------------------------------------------------------------- - /** - * GROUP BY - * - * @param string $by - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + public function group_by($by, $escape = NULL) { is_bool($escape) OR $escape = $this->_protect_identifiers; @@ -1154,50 +1154,50 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * HAVING - * - * Separates multiple calls with 'AND'. - * - * @param string $key - * @param string $value - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + public function having($key, $value = NULL, $escape = NULL) { return $this->_wh('qb_having', $key, $value, 'AND ', $escape); } - // -------------------------------------------------------------------- - /** - * OR HAVING - * - * Separates multiple calls with 'OR'. - * - * @param string $key - * @param string $value - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + + + public function or_having($key, $value = NULL, $escape = NULL) { return $this->_wh('qb_having', $key, $value, 'OR ', $escape); } - // -------------------------------------------------------------------- - /** - * ORDER BY - * - * @param string $orderby - * @param string $direction ASC, DESC or RANDOM - * @param bool $escape - * @return CI_DB_query_builder - */ + + + + + + + + + public function order_by($orderby, $direction = '', $escape = NULL) { $direction = strtoupper(trim($direction)); @@ -1206,7 +1206,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { $direction = ''; - // Do we have a seed value? + $orderby = ctype_digit((string) $orderby) ? sprintf($this->_random_keyword[1], $orderby) : $this->_random_keyword[0]; @@ -1247,15 +1247,15 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * @param int $value LIMIT value - * @param int $offset OFFSET value - * @return CI_DB_query_builder - */ + + + + + + + + public function limit($value, $offset = 0) { is_null($value) OR $this->qb_limit = (int) $value; @@ -1264,47 +1264,47 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Sets the OFFSET value - * - * @param int $offset OFFSET value - * @return CI_DB_query_builder - */ + + + + + + + public function offset($offset) { empty($offset) OR $this->qb_offset = (int) $offset; return $this; } - // -------------------------------------------------------------------- - /** - * LIMIT string - * - * Generates a platform-specific LIMIT clause. - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { return $sql.' LIMIT '.($this->qb_offset ? $this->qb_offset.', ' : '').(int) $this->qb_limit; } - // -------------------------------------------------------------------- - /** - * The "set" function. - * - * Allows key/value pairs to be set for inserting or updating - * - * @param mixed - * @param string - * @param bool - * @return CI_DB_query_builder - */ + + + + + + + + + + + public function set($key, $value = '', $escape = NULL) { $key = $this->_object_to_array($key); @@ -1325,17 +1325,17 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Get SELECT query string - * - * Compiles a SELECT query string and returns the sql. - * - * @param string the table name to select from (optional) - * @param bool TRUE: resets QB values; FALSE: leave QB values alone - * @return string - */ + + + + + + + + + + public function get_compiled_select($table = '', $reset = TRUE) { if ($table !== '') @@ -1354,19 +1354,19 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $select; } - // -------------------------------------------------------------------- - /** - * Get - * - * Compiles the select statement based on the other functions called - * and runs the query - * - * @param string the table - * @param string the limit clause - * @param string the offset clause - * @return CI_DB_result - */ + + + + + + + + + + + + public function get($table = '', $limit = NULL, $offset = NULL) { if ($table !== '') @@ -1385,18 +1385,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $result; } - // -------------------------------------------------------------------- - /** - * "Count All Results" query - * - * Generates a platform-specific query string that counts all records - * returned by an Query Builder query. - * - * @param string - * @param bool the reset clause - * @return int - */ + + + + + + + + + + + public function count_all_results($table = '', $reset = TRUE) { if ($table !== '') @@ -1405,9 +1405,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->from($table); } - // ORDER BY usage is often problematic here (most notably - // on Microsoft SQL Server) and ultimately unnecessary - // for selecting COUNT(*) ... + + + $qb_orderby = $this->qb_orderby; $qb_cache_orderby = $this->qb_cache_orderby; $this->qb_orderby = $this->qb_cache_orderby = array(); @@ -1435,19 +1435,19 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return (int) $row->numrows; } - // -------------------------------------------------------------------- - /** - * get_where() - * - * Allows the where clause, limit and offset to be added directly - * - * @param string $table - * @param string $where - * @param int $limit - * @param int $offset - * @return CI_DB_result - */ + + + + + + + + + + + + public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { if ($table !== '') @@ -1470,18 +1470,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $result; } - // -------------------------------------------------------------------- - /** - * Insert_Batch - * - * Compiles batch insert strings and runs the queries - * - * @param string $table Table to insert into - * @param array $set An associative array of insert values - * @param bool $escape Whether to escape values and identifiers - * @return int Number of rows inserted or FALSE on failure - */ + + + + + + + + + + + public function insert_batch($table, $set = NULL, $escape = NULL, $batch_size = 100) { if ($set === NULL) @@ -1511,7 +1511,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $table = $this->qb_from[0]; } - // Batch this baby + $affected_rows = 0; for ($i = 0, $total = count($this->qb_set); $i < $total; $i += $batch_size) { @@ -1525,33 +1525,33 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $affected_rows; } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES '.implode(', ', $values); } - // -------------------------------------------------------------------- - /** - * The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts - * - * @param mixed - * @param string - * @param bool - * @return CI_DB_query_builder - */ + + + + + + + + + public function set_insert_batch($key, $value = '', $escape = NULL) { $key = $this->_object_to_array_batch($key); @@ -1571,12 +1571,12 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $row = $this->_object_to_array($row); if (count(array_diff($keys, array_keys($row))) > 0 OR count(array_diff(array_keys($row), $keys)) > 0) { - // batch function above returns an error on an empty array + $this->qb_set[] = array(); return; } - ksort($row); // puts $row in the same order as our keys + ksort($row); if ($escape !== FALSE) { @@ -1600,17 +1600,17 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Get INSERT query string - * - * Compiles an insert query and returns the sql - * - * @param string the table to insert into - * @param bool TRUE: reset QB values; FALSE: leave QB values alone - * @return string - */ + + + + + + + + + + public function get_compiled_insert($table = '', $reset = TRUE) { if ($this->_validate_insert($table) === FALSE) @@ -1634,18 +1634,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Insert - * - * Compiles an insert string and runs the query - * - * @param string the table to insert data into - * @param array an associative array of insert values - * @param bool $escape Whether to escape values and identifiers - * @return bool TRUE on success, FALSE on failure - */ + + + + + + + + + + + public function insert($table = '', $set = NULL, $escape = NULL) { if ($set !== NULL) @@ -1670,18 +1670,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Validate Insert - * - * This method is used by both insert() and get_compiled_insert() to - * validate that the there data is actually being set and that table - * has been chosen to be inserted into. - * - * @param string the table to insert data into - * @return string - */ + + + + + + + + + + + protected function _validate_insert($table = '') { if (count($this->qb_set) === 0) @@ -1701,17 +1701,17 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return TRUE; } - // -------------------------------------------------------------------- - /** - * Replace - * - * Compiles an replace into string and runs the query - * - * @param string the table to replace data into - * @param array an associative array of insert values - * @return bool TRUE on success, FALSE on failure - */ + + + + + + + + + + public function replace($table = '', $set = NULL) { if ($set !== NULL) @@ -1740,54 +1740,54 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ + + + + + + + + + + + protected function _replace($table, $keys, $values) { return 'REPLACE INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')'; } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * Note: This is only used (and overridden) by MySQL and CUBRID. - * - * @return string - */ + + + + + + + + + + + protected function _from_tables() { return implode(', ', $this->qb_from); } - // -------------------------------------------------------------------- - /** - * Get UPDATE query string - * - * Compiles an update query and returns the sql - * - * @param string the table to update - * @param bool TRUE: reset QB values; FALSE: leave QB values alone - * @return string - */ + + + + + + + + + + public function get_compiled_update($table = '', $reset = TRUE) { - // Combine any cached components with the current statements + $this->_merge_cache(); if ($this->_validate_update($table) === FALSE) @@ -1805,22 +1805,22 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * UPDATE - * - * Compiles an update string and runs the query. - * - * @param string $table - * @param array $set An associative array of update values - * @param mixed $where - * @param int $limit - * @return bool TRUE on success, FALSE on failure - */ + + + + + + + + + + + + public function update($table = '', $set = NULL, $where = NULL, $limit = NULL) { - // Combine any cached components with the current statements + $this->_merge_cache(); if ($set !== NULL) @@ -1848,18 +1848,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Validate Update - * - * This method is used by both update() and get_compiled_update() to - * validate that data is actually being set and that a table has been - * chosen to be update. - * - * @param string the table to update data on - * @return bool - */ + + + + + + + + + + + protected function _validate_update($table) { if (count($this->qb_set) === 0) @@ -1879,21 +1879,21 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return TRUE; } - // -------------------------------------------------------------------- - /** - * Update_Batch - * - * Compiles an update string and runs the query - * - * @param string the table to retrieve the results from - * @param array an associative array of update values - * @param string the where key - * @return int number of rows affected or FALSE on failure - */ + + + + + + + + + + + public function update_batch($table, $set = NULL, $index = NULL, $batch_size = 100) { - // Combine any cached components with the current statements + $this->_merge_cache(); if ($index === NULL) @@ -1928,7 +1928,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $table = $this->qb_from[0]; } - // Batch this baby + $affected_rows = 0; for ($i = 0, $total = count($this->qb_set_ub); $i < $total; $i += $batch_size) { @@ -1944,18 +1944,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $affected_rows; } - // -------------------------------------------------------------------- - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @param string $table Table name - * @param array $values Update data - * @param string $index WHERE key - * @return string - */ + + + + + + + + + + + protected function _update_batch($table, $values, $index) { $ids = array(); @@ -1985,23 +1985,23 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } - // -------------------------------------------------------------------- - /** - * The "set_update_batch" function. Allows key/value pairs to be set for batch updating - * - * @param array - * @param string - * @param bool - * @return CI_DB_query_builder - */ + + + + + + + + + public function set_update_batch($key, $index = '', $escape = NULL) { $key = $this->_object_to_array_batch($key); if ( ! is_array($key)) { - // @todo error + } is_bool($escape) OR $escape = $this->_protect_identifiers; @@ -2034,16 +2034,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Empty Table - * - * Compiles a delete string and runs "DELETE FROM table" - * - * @param string the table to empty - * @return bool TRUE on success, FALSE on failure - */ + + + + + + + + + public function empty_table($table = '') { if ($table === '') @@ -2065,18 +2065,18 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Truncate - * - * Compiles a truncate string and runs the query - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @param string the table to truncate - * @return bool TRUE on success, FALSE on failure - */ + + + + + + + + + + + public function truncate($table = '') { if ($table === '') @@ -2098,35 +2098,35 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the truncate() command, - * then this method maps to 'DELETE FROM table' - * - * @param string the table name - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE '.$table; } - // -------------------------------------------------------------------- - /** - * Get DELETE query string - * - * Compiles a delete query string and returns the sql - * - * @param string the table to delete from - * @param bool TRUE: reset QB values; FALSE: leave QB values alone - * @return string - */ + + + + + + + + + + public function get_compiled_delete($table = '', $reset = TRUE) { $this->return_delete_sql = TRUE; @@ -2135,22 +2135,22 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Delete - * - * Compiles a delete string and runs the query - * - * @param mixed the table(s) to delete from. String or array - * @param mixed the where clause - * @param mixed the limit clause - * @param bool - * @return mixed - */ + + + + + + + + + + + + public function delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE) { - // Combine any cached components with the current statements + $this->_merge_cache(); if ($table === '') @@ -2202,32 +2202,32 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return ($this->return_delete_sql === TRUE) ? $sql : $this->query($sql); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string the table name - * @return string - */ + + + + + + + + + protected function _delete($table) { return 'DELETE FROM '.$table.$this->_compile_wh('qb_where') .($this->qb_limit !== FALSE ? ' LIMIT '.$this->qb_limit : ''); } - // -------------------------------------------------------------------- - /** - * DB Prefix - * - * Prepends a database prefix if one exists in configuration - * - * @param string the table - * @return string - */ + + + + + + + + + public function dbprefix($table = '') { if ($table === '') @@ -2238,31 +2238,31 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this->dbprefix.$table; } - // -------------------------------------------------------------------- - /** - * Set DB Prefix - * - * Set's the DB Prefix to something new without needing to reconnect - * - * @param string the prefix - * @return string - */ + + + + + + + + + public function set_dbprefix($prefix = '') { return $this->dbprefix = $prefix; } - // -------------------------------------------------------------------- - /** - * Track Aliases - * - * Used to track SQL statements written with aliased tables. - * - * @param string The table to inspect - * @return string - */ + + + + + + + + + protected function _track_aliases($table) { if (is_array($table)) @@ -2274,23 +2274,23 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return; } - // Does the string contain a comma? If so, we need to separate - // the string into discreet statements + + if (strpos($table, ',') !== FALSE) { return $this->_track_aliases(explode(',', $table)); } - // if a table alias is used we can recognize it by a space + if (strpos($table, ' ') !== FALSE) { - // if the alias is written with the AS keyword, remove it + $table = preg_replace('/\s+AS\s+/i', ' ', $table); - // Grab the alias + $table = trim(strrchr($table, ' ')); - // Store the alias, if it doesn't already exist + if ( ! in_array($table, $this->qb_aliased_tables, TRUE)) { $this->qb_aliased_tables[] = $table; @@ -2303,23 +2303,23 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // -------------------------------------------------------------------- - /** - * Compile the SELECT statement - * - * Generates a query string based on which functions were used. - * Should not be called directly. - * - * @param bool $select_override - * @return string - */ + + + + + + + + + + protected function _compile_select($select_override = FALSE) { - // Combine any cached components with the current statements + $this->_merge_cache(); - // Write the "select" portion of the query + if ($select_override !== FALSE) { $sql = $select_override; @@ -2334,9 +2334,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } else { - // Cycle through the "select" portion of the query and prep each column name. - // The reason we protect identifiers here rather than in the select() function - // is because until the user calls the from() function we don't know if there are aliases + + + foreach ($this->qb_select as $key => $val) { $no_escape = isset($this->qb_no_escape[$key]) ? $this->qb_no_escape[$key] : NULL; @@ -2347,13 +2347,13 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // Write the "FROM" portion of the query + if (count($this->qb_from) > 0) { $sql .= "\nFROM ".$this->_from_tables(); } - // Write the "JOIN" portion of the query + if (count($this->qb_join) > 0) { $sql .= "\n".implode("\n", $this->qb_join); @@ -2362,9 +2362,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $sql .= $this->_compile_wh('qb_where') .$this->_compile_group_by() .$this->_compile_wh('qb_having') - .$this->_compile_order_by(); // ORDER BY + .$this->_compile_order_by(); + - // LIMIT if ($this->qb_limit !== FALSE OR $this->qb_offset) { return $this->_limit($sql."\n"); @@ -2373,27 +2373,27 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Compile WHERE, HAVING statements - * - * Escapes identifiers in WHERE and HAVING statements at execution time. - * - * Required so that aliases are tracked properly, regardless of whether - * where(), or_where(), having(), or_having are called prior to from(), - * join() and dbprefix is added only if needed. - * - * @param string $qb_key 'qb_where' or 'qb_having' - * @return string SQL statement - */ + + + + + + + + + + + + + protected function _compile_wh($qb_key) { if (count($this->$qb_key) > 0) { for ($i = 0, $c = count($this->$qb_key); $i < $c; $i++) { - // Is this condition already compiled? + if (is_string($this->{$qb_key}[$i])) { continue; @@ -2404,7 +2404,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { continue; } - // Split multiple conditions + $conditions = preg_split( '/((?:^|\s+)AND\s+|(?:^|\s+)OR\s+)/i', $this->{$qb_key}[$i]['condition'], @@ -2420,14 +2420,14 @@ abstract class CI_DB_query_builder extends CI_DB_driver { continue; } - // $matches = array( - // 0 => '(test <= foo)', /* the whole thing */ - // 1 => '(', /* optional */ - // 2 => 'test', /* the field name */ - // 3 => ' <= ', /* $op */ - // 4 => 'foo', /* optional, if $op is e.g. 'IS NULL' */ - // 5 => ')' /* optional */ - // ); + + + + + + + + if ( ! empty($matches[4])) { @@ -2449,26 +2449,26 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return ''; } - // -------------------------------------------------------------------- - /** - * Compile GROUP BY - * - * Escapes identifiers in GROUP BY statements at execution time. - * - * Required so that aliases are tracked properly, regardless of whether - * group_by() is called prior to from(), join() and dbprefix is added - * only if needed. - * - * @return string SQL statement - */ + + + + + + + + + + + + protected function _compile_group_by() { if (count($this->qb_groupby) > 0) { for ($i = 0, $c = count($this->qb_groupby); $i < $c; $i++) { - // Is it already compiled? + if (is_string($this->qb_groupby[$i])) { continue; @@ -2485,19 +2485,19 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return ''; } - // -------------------------------------------------------------------- - /** - * Compile ORDER BY - * - * Escapes identifiers in ORDER BY statements at execution time. - * - * Required so that aliases are tracked properly, regardless of whether - * order_by() is called prior to from(), join() and dbprefix is added - * only if needed. - * - * @return string SQL statement - */ + + + + + + + + + + + + protected function _compile_order_by() { if (empty($this->qb_orderby)) @@ -2523,16 +2523,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return "\nORDER BY ".implode(', ', $this->qb_orderby); } - // -------------------------------------------------------------------- - /** - * Object to Array - * - * Takes an object as input and converts the class variables to array key/vals - * - * @param object - * @return array - */ + + + + + + + + + protected function _object_to_array($object) { if ( ! is_object($object)) @@ -2543,7 +2543,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $array = array(); foreach (get_object_vars($object) as $key => $val) { - // There are some built in keys we need to ignore for this conversion + if ( ! is_object($val) && ! is_array($val) && $key !== '_parent_name') { $array[$key] = $val; @@ -2553,16 +2553,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $array; } - // -------------------------------------------------------------------- - /** - * Object to Array - * - * Takes an object as input and converts the class variables to array key/vals - * - * @param object - * @return array - */ + + + + + + + + + protected function _object_to_array_batch($object) { if ( ! is_object($object)) @@ -2576,7 +2576,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { foreach ($fields as $val) { - // There are some built in keys we need to ignore for this conversion + if ($val !== '_parent_name') { $i = 0; @@ -2590,45 +2590,45 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $array; } - // -------------------------------------------------------------------- - /** - * Start Cache - * - * Starts QB caching - * - * @return CI_DB_query_builder - */ + + + + + + + + public function start_cache() { $this->qb_caching = TRUE; return $this; } - // -------------------------------------------------------------------- - /** - * Stop Cache - * - * Stops QB caching - * - * @return CI_DB_query_builder - */ + + + + + + + + public function stop_cache() { $this->qb_caching = FALSE; return $this; } - // -------------------------------------------------------------------- - /** - * Flush Cache - * - * Empties the QB cache - * - * @return CI_DB_query_builder - */ + + + + + + + + public function flush_cache() { $this->_reset_run(array( @@ -2648,16 +2648,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Merge Cache - * - * When called, this function merges any cached QB arrays with - * locally called ones. - * - * @return void - */ + + + + + + + + + protected function _merge_cache() { if (count($this->qb_cache_exists) === 0) @@ -2669,7 +2669,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $qb_no_escape = $this->qb_cache_no_escape; } - foreach (array_unique($this->qb_cache_exists) as $val) // select, from, etc. + foreach (array_unique($this->qb_cache_exists) as $val) { $qb_variable = 'qb_'.$val; $qb_cache_var = 'qb_cache_'.$val; @@ -2695,16 +2695,16 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // -------------------------------------------------------------------- - /** - * Is literal - * - * Determines if a string represents a literal value or a field name - * - * @param string $str - * @return bool - */ + + + + + + + + + protected function _is_literal($str) { $str = trim($str); @@ -2725,15 +2725,15 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return in_array($str[0], $_str, TRUE); } - // -------------------------------------------------------------------- - /** - * Reset Query Builder values. - * - * Publicly-visible method to reset the QB values. - * - * @return CI_DB_query_builder - */ + + + + + + + + public function reset_query() { $this->_reset_select(); @@ -2741,14 +2741,14 @@ abstract class CI_DB_query_builder extends CI_DB_driver { return $this; } - // -------------------------------------------------------------------- - /** - * Resets the query builder values. Called by the get() function - * - * @param array An array of fields to reset - * @return void - */ + + + + + + + protected function _reset_run($qb_reset_items) { foreach ($qb_reset_items as $item => $default_value) @@ -2757,13 +2757,13 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } } - // -------------------------------------------------------------------- - /** - * Resets the query builder values. Called by the get() function - * - * @return void - */ + + + + + + protected function _reset_select() { $this->_reset_run(array( @@ -2782,15 +2782,15 @@ abstract class CI_DB_query_builder extends CI_DB_driver { )); } - // -------------------------------------------------------------------- - /** - * Resets the query builder "write" values. - * - * Called by the insert() update() insert_batch() update_batch() and delete() functions - * - * @return void - */ + + + + + + + + protected function _reset_write() { $this->_reset_run(array( diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_result.php index 0dbac16..613ce8f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_result.php @@ -1,132 +1,132 @@ conn_id = $driver_object->conn_id; $this->result_id = $driver_object->result_id; } - // -------------------------------------------------------------------- - /** - * Number of rows in the result set - * - * @return int - */ + + + + + + public function num_rows() { if (is_int($this->num_rows)) @@ -145,14 +145,14 @@ class CI_DB_result { return $this->num_rows = count($this->result_array()); } - // -------------------------------------------------------------------- - /** - * Query result. Acts as a wrapper function for the following functions. - * - * @param string $type 'object', 'array' or a custom class name - * @return array - */ + + + + + + + public function result($type = 'object') { if ($type === 'array') @@ -167,14 +167,14 @@ class CI_DB_result { return $this->custom_result_object($type); } - // -------------------------------------------------------------------- - /** - * Custom query result. - * - * @param string $class_name - * @return array - */ + + + + + + + public function custom_result_object($class_name) { if (isset($this->custom_result_object[$class_name])) @@ -186,7 +186,7 @@ class CI_DB_result { return array(); } - // Don't fetch the result set again if we already have it + $_data = NULL; if (($c = count($this->result_array)) > 0) { @@ -223,13 +223,13 @@ class CI_DB_result { return $this->custom_result_object[$class_name]; } - // -------------------------------------------------------------------- - /** - * Query result. "object" version. - * - * @return array - */ + + + + + + public function result_object() { if (count($this->result_object) > 0) @@ -237,9 +237,9 @@ class CI_DB_result { return $this->result_object; } - // In the event that query caching is on, the result_id variable - // will not be a valid resource so we'll simply return an empty - // array. + + + if ( ! $this->result_id OR $this->num_rows === 0) { return array(); @@ -264,13 +264,13 @@ class CI_DB_result { return $this->result_object; } - // -------------------------------------------------------------------- - /** - * Query result. "array" version. - * - * @return array - */ + + + + + + public function result_array() { if (count($this->result_array) > 0) @@ -278,9 +278,9 @@ class CI_DB_result { return $this->result_array; } - // In the event that query caching is on, the result_id variable - // will not be a valid resource so we'll simply return an empty - // array. + + + if ( ! $this->result_id OR $this->num_rows === 0) { return array(); @@ -305,25 +305,25 @@ class CI_DB_result { return $this->result_array; } - // -------------------------------------------------------------------- - /** - * Row - * - * A wrapper method. - * - * @param mixed $n - * @param string $type 'object' or 'array' - * @return mixed - */ + + + + + + + + + + public function row($n = 0, $type = 'object') { if ( ! is_numeric($n)) { - // We cache the row data for subsequent uses + is_array($this->row_data) OR $this->row_data = $this->row_array(0); - // array_key_exists() instead of isset() to allow for NULL values + if (empty($this->row_data) OR ! array_key_exists($n, $this->row_data)) { return NULL; @@ -338,18 +338,18 @@ class CI_DB_result { return $this->custom_row_object($n, $type); } - // -------------------------------------------------------------------- - /** - * Assigns an item into a particular column slot - * - * @param mixed $key - * @param mixed $value - * @return void - */ + + + + + + + + public function set_row($key, $value = NULL) { - // We cache the row data for subsequent uses + if ( ! is_array($this->row_data)) { $this->row_data = $this->row_array(0); @@ -370,15 +370,15 @@ class CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Returns a single result row - custom object version - * - * @param int $n - * @param string $type - * @return object - */ + + + + + + + + public function custom_row_object($n, $type) { isset($this->custom_result_object[$type]) OR $this->custom_result_object($type); @@ -396,14 +396,14 @@ class CI_DB_result { return $this->custom_result_object[$type][$this->current_row]; } - // -------------------------------------------------------------------- - /** - * Returns a single result row - object version - * - * @param int $n - * @return object - */ + + + + + + + public function row_object($n = 0) { $result = $this->result_object(); @@ -420,14 +420,14 @@ class CI_DB_result { return $result[$this->current_row]; } - // -------------------------------------------------------------------- - /** - * Returns a single result row - array version - * - * @param int $n - * @return array - */ + + + + + + + public function row_array($n = 0) { $result = $this->result_array(); @@ -444,42 +444,42 @@ class CI_DB_result { return $result[$this->current_row]; } - // -------------------------------------------------------------------- - /** - * Returns the "first" row - * - * @param string $type - * @return mixed - */ + + + + + + + public function first_row($type = 'object') { $result = $this->result($type); return (count($result) === 0) ? NULL : $result[0]; } - // -------------------------------------------------------------------- - /** - * Returns the "last" row - * - * @param string $type - * @return mixed - */ + + + + + + + public function last_row($type = 'object') { $result = $this->result($type); return (count($result) === 0) ? NULL : $result[count($result) - 1]; } - // -------------------------------------------------------------------- - /** - * Returns the "next" row - * - * @param string $type - * @return mixed - */ + + + + + + + public function next_row($type = 'object') { $result = $this->result($type); @@ -493,14 +493,14 @@ class CI_DB_result { : NULL; } - // -------------------------------------------------------------------- - /** - * Returns the "previous" row - * - * @param string $type - * @return mixed - */ + + + + + + + public function previous_row($type = 'object') { $result = $this->result($type); @@ -516,14 +516,14 @@ class CI_DB_result { return $result[$this->current_row]; } - // -------------------------------------------------------------------- - /** - * Returns an unbuffered row and move pointer to next row - * - * @param string $type 'array', 'object' or a custom class name - * @return mixed - */ + + + + + + + public function unbuffered_row($type = 'object') { if ($type === 'array') @@ -538,125 +538,125 @@ class CI_DB_result { return $this->_fetch_object($type); } - // -------------------------------------------------------------------- - /** - * The following methods are normally overloaded by the identically named - * methods in the platform-specific driver -- except when query caching - * is used. When caching is enabled we do not load the other driver. - * These functions are primarily here to prevent undefined function errors - * when a cached result object is in use. They are not otherwise fully - * operational due to the unavailability of the database resource IDs with - * cached results. - */ - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * Overridden by driver result classes. - * - * @return int - */ + + + + + + + + + + + + + + + + + + public function num_fields() { return 0; } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names. - * - * Overridden by driver result classes. - * - * @return array - */ + + + + + + + + + + public function list_fields() { return array(); } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data. - * - * Overridden by driver result classes. - * - * @return array - */ + + + + + + + + + + public function field_data() { return array(); } - // -------------------------------------------------------------------- - /** - * Free the result - * - * Overridden by driver result classes. - * - * @return void - */ + + + + + + + + public function free_result() { $this->result_id = FALSE; } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * Overridden by driver result classes. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + + + public function data_seek($n = 0) { return FALSE; } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array. - * - * Overridden by driver result classes. - * - * @return array - */ + + + + + + + + + + protected function _fetch_assoc() { return array(); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object. - * - * Overridden by driver result classes. - * - * @param string $class_name - * @return object - */ + + + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return new $class_name(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_utility.php index 6642fda..5f51822 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/DB_utility.php @@ -1,105 +1,105 @@ db =& $db; log_message('info', 'Database Utility Class Initialized'); } - // -------------------------------------------------------------------- - /** - * List databases - * - * @return array - */ + + + + + + public function list_databases() { - // Is there a cached result? + if (isset($this->db->data_cache['db_names'])) { return $this->db->data_cache['db_names']; @@ -125,27 +125,27 @@ abstract class CI_DB_utility { return $this->db->data_cache['db_names']; } - // -------------------------------------------------------------------- - /** - * Determine if a particular database exists - * - * @param string $database_name - * @return bool - */ + + + + + + + public function database_exists($database_name) { return in_array($database_name, $this->list_databases()); } - // -------------------------------------------------------------------- - /** - * Optimize Table - * - * @param string $table_name - * @return mixed - */ + + + + + + + public function optimize_table($table_name) { if ($this->_optimize_table === FALSE) @@ -163,13 +163,13 @@ abstract class CI_DB_utility { return FALSE; } - // -------------------------------------------------------------------- - /** - * Optimize Database - * - * @return mixed - */ + + + + + + public function optimize_database() { if ($this->_optimize_table === FALSE) @@ -186,7 +186,7 @@ abstract class CI_DB_utility { return $res; } - // Build the result array... + $res = $res->result_array(); $res = current($res); $key = str_replace($this->db->database.'.', '', current($res)); @@ -199,14 +199,14 @@ abstract class CI_DB_utility { return $result; } - // -------------------------------------------------------------------- - /** - * Repair Table - * - * @param string $table_name - * @return mixed - */ + + + + + + + public function repair_table($table_name) { if ($this->_repair_table === FALSE) @@ -224,17 +224,17 @@ abstract class CI_DB_utility { return current($query); } - // -------------------------------------------------------------------- - /** - * Generate CSV from a query result object - * - * @param object $query Query result object - * @param string $delim Delimiter (default: ,) - * @param string $newline Newline character (default: \n) - * @param string $enclosure Enclosure (default: ") - * @return string - */ + + + + + + + + + + public function csv_from_result($query, $delim = ',', $newline = "\n", $enclosure = '"') { if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) @@ -243,7 +243,7 @@ abstract class CI_DB_utility { } $out = ''; - // First generate the headings from the table column names + foreach ($query->list_fields() as $name) { $out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $name).$enclosure.$delim; @@ -251,7 +251,7 @@ abstract class CI_DB_utility { $out = substr($out, 0, -strlen($delim)).$newline; - // Next blast through the result array and build out the rows + while ($row = $query->unbuffered_row('array')) { $line = array(); @@ -265,15 +265,15 @@ abstract class CI_DB_utility { return $out; } - // -------------------------------------------------------------------- - /** - * Generate XML data from a query result object - * - * @param object $query Query result object - * @param array $params Any preferences - * @return string - */ + + + + + + + + public function xml_from_result($query, $params = array()) { if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) @@ -281,7 +281,7 @@ abstract class CI_DB_utility { show_error('You must submit a valid result object'); } - // Set our default values + foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val) { if ( ! isset($params[$key])) @@ -290,13 +290,13 @@ abstract class CI_DB_utility { } } - // Create variables for convenience + extract($params); - // Load the xml helper + get_instance()->load->helper('xml'); - // Generate the result + $xml = '<'.$root.'>'.$newline; while ($row = $query->unbuffered_row()) { @@ -311,37 +311,37 @@ abstract class CI_DB_utility { return $xml.''.$newline; } - // -------------------------------------------------------------------- - /** - * Database Backup - * - * @param array $params - * @return string - */ + + + + + + + public function backup($params = array()) { - // If the parameters have not been submitted as an - // array then we know that it is simply the table - // name, which is a valid short cut. + + + if (is_string($params)) { $params = array('tables' => $params); } - // Set up our default preferences + $prefs = array( 'tables' => array(), 'ignore' => array(), 'filename' => '', - 'format' => 'gzip', // gzip, zip, txt + 'format' => 'gzip', 'add_drop' => TRUE, 'add_insert' => TRUE, 'newline' => "\n", 'foreign_key_checks' => TRUE ); - // Did the user submit any preferences? If so set them.... + if (count($params) > 0) { foreach ($prefs as $key => $val) @@ -353,21 +353,21 @@ abstract class CI_DB_utility { } } - // Are we backing up a complete database or individual tables? - // If no table names were submitted we'll fetch the entire table list + + if (count($prefs['tables']) === 0) { $prefs['tables'] = $this->db->list_tables(); } - // Validate the format + if ( ! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE)) { $prefs['format'] = 'txt'; } - // Is the encoder supported? If not, we'll either issue an - // error or use plain text depending on the debug settings + + if (($prefs['format'] === 'gzip' && ! function_exists('gzencode')) OR ($prefs['format'] === 'zip' && ! function_exists('gzcompress'))) { @@ -379,10 +379,10 @@ abstract class CI_DB_utility { $prefs['format'] = 'txt'; } - // Was a Zip file requested? + if ($prefs['format'] === 'zip') { - // Set the filename if not provided (only needed with Zip files) + if ($prefs['filename'] === '') { $prefs['filename'] = (count($prefs['tables']) === 1 ? $prefs['tables'] : $this->db->database) @@ -390,30 +390,30 @@ abstract class CI_DB_utility { } else { - // If they included the .zip file extension we'll remove it + if (preg_match('|.+?\.zip$|', $prefs['filename'])) { $prefs['filename'] = str_replace('.zip', '', $prefs['filename']); } - // Tack on the ".sql" file extension if needed + if ( ! preg_match('|.+?\.sql$|', $prefs['filename'])) { $prefs['filename'] .= '.sql'; } } - // Load the Zip class and output it + $CI =& get_instance(); $CI->load->library('zip'); $CI->zip->add_data($prefs['filename'], $this->_backup($prefs)); return $CI->zip->get_zip(); } - elseif ($prefs['format'] === 'txt') // Was a text file requested? + elseif ($prefs['format'] === 'txt') { return $this->_backup($prefs); } - elseif ($prefs['format'] === 'gzip') // Was a Gzip file requested? + elseif ($prefs['format'] === 'gzip') { return gzencode($this->_backup($prefs)); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_driver.php index b3b436f..90e0587 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_driver.php @@ -1,95 +1,95 @@ port) OR $this->port = 33000; } } - // -------------------------------------------------------------------- - /** - * Non-persistent database connection - * - * @param bool $persistent - * @return resource - */ + + + + + + + public function db_connect($persistent = FALSE) { if (preg_match('/^CUBRID:[^:]+(:[0-9][1-9]{0,4})?:[^:]+:([^:]*):([^:]*):(\?.+)?$/', $this->dsn, $matches)) @@ -132,16 +132,16 @@ class CI_DB_cubrid_driver extends CI_DB { : $func($this->hostname, $this->port, $this->database); } - // -------------------------------------------------------------------- - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @return void - */ + + + + + + + + + public function reconnect() { if (cubrid_ping($this->conn_id) === FALSE) @@ -150,13 +150,13 @@ class CI_DB_cubrid_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -169,26 +169,26 @@ class CI_DB_cubrid_driver extends CI_DB { : $this->data_cache['version'] = $version; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { return cubrid_query($sql, $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { if (($autocommit = cubrid_get_autocommit($this->conn_id)) === NULL) @@ -203,13 +203,13 @@ class CI_DB_cubrid_driver extends CI_DB { return TRUE; } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if ( ! cubrid_commit($this->conn_id)) @@ -225,13 +225,13 @@ class CI_DB_cubrid_driver extends CI_DB { return TRUE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if ( ! cubrid_rollback($this->conn_id)) @@ -247,53 +247,53 @@ class CI_DB_cubrid_driver extends CI_DB { return TRUE; } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return cubrid_real_escape_string($str, $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return cubrid_affected_rows(); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { return cubrid_insert_id($this->conn_id); } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SHOW TABLES'; @@ -306,29 +306,29 @@ class CI_DB_cubrid_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE))) === FALSE) @@ -355,31 +355,31 @@ class CI_DB_cubrid_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => cubrid_errno($this->conn_id), 'message' => cubrid_error($this->conn_id)); } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * @return string - */ + + + + + + + + + protected function _from_tables() { if ( ! empty($this->qb_join) && count($this->qb_from) > 1) @@ -390,13 +390,13 @@ class CI_DB_cubrid_driver extends CI_DB { return implode(', ', $this->qb_from); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { cubrid_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_forge.php index 69b53dd..0e083e1 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_forge.php @@ -1,87 +1,87 @@ 'INTEGER', 'SMALLINT' => 'INTEGER', @@ -92,16 +92,16 @@ class CI_DB_cubrid_forge extends CI_DB_forge { 'REAL' => 'DOUBLE' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -127,14 +127,14 @@ class CI_DB_cubrid_forge extends CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { $extra_clause = isset($field['after']) @@ -156,16 +156,16 @@ class CI_DB_cubrid_forge extends CI_DB_forge { .$extra_clause; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -185,14 +185,14 @@ class CI_DB_cubrid_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Process indexes - * - * @param string $table (ignored) - * @return string - */ + + + + + + + protected function _process_indexes($table) { $sql = ''; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_result.php index 75d7025..18e6f12 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_result.php @@ -1,58 +1,58 @@ num_rows) @@ -60,41 +60,41 @@ class CI_DB_cubrid_result extends CI_DB_result { : $this->num_rows = cubrid_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return cubrid_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { return cubrid_column_names($this->result_id); } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -111,13 +111,13 @@ class CI_DB_cubrid_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id) OR @@ -128,47 +128,47 @@ class CI_DB_cubrid_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return cubrid_data_seek($this->result_id, $n); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return cubrid_fetch_assoc($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return cubrid_fetch_object($this->result_id, $class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_utility.php index ccf794b..1d6c67d 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/cubrid/cubrid_utility.php @@ -1,56 +1,56 @@ db->data_cache['db_names'])) @@ -61,19 +61,19 @@ class CI_DB_cubrid_utility extends CI_DB_utility { return $this->db->data_cache['db_names'] = cubrid_list_dbs($this->db->conn_id); } - // -------------------------------------------------------------------- - /** - * CUBRID Export - * - * @param array Preferences - * @return mixed - */ + + + + + + + protected function _backup($params = array()) { - // No SQL based support in CUBRID as of version 8.4.0. Database or - // table backup can be performed using CUBRID Manager - // database administration tool. + + + return $this->db->display_error('db_unsupported_feature'); } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_driver.php index 27e87d4..2e87100 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_driver.php @@ -1,88 +1,88 @@ hostname.':'.$this->database, $this->username, $this->password, $this->char_set); } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -108,7 +108,7 @@ class CI_DB_ibase_driver extends CI_DB { { $this->data_cache['version'] = ibase_server_info($service, IBASE_SVC_SERVER_VERSION); - // Don't keep the service open + ibase_service_detach($service); return $this->data_cache['version']; } @@ -116,26 +116,26 @@ class CI_DB_ibase_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { return ibase_query(isset($this->_ibase_trans) ? $this->_ibase_trans : $this->conn_id, $sql); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { if (($trans_handle = ibase_trans($this->conn_id)) === FALSE) @@ -147,13 +147,13 @@ class CI_DB_ibase_driver extends CI_DB { return TRUE; } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if (ibase_commit($this->_ibase_trans)) @@ -165,13 +165,13 @@ class CI_DB_ibase_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if (ibase_rollback($this->_ibase_trans)) @@ -183,43 +183,43 @@ class CI_DB_ibase_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return ibase_affected_rows($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @param string $generator_name - * @param int $inc_by - * @return int - */ + + + + + + + + public function insert_id($generator_name, $inc_by = 0) { - //If a generator hasn't been used before it will return 0 + return ibase_gen_id('"'.$generator_name.'"', $inc_by); } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT TRIM("RDB$RELATION_NAME") AS TABLE_NAME FROM "RDB$RELATIONS" WHERE "RDB$RELATION_NAME" NOT LIKE \'RDB$%\' AND "RDB$RELATION_NAME" NOT LIKE \'MON$%\''; @@ -233,29 +233,29 @@ class CI_DB_ibase_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT TRIM("RDB$FIELD_NAME") AS COLUMN_NAME FROM "RDB$RELATION_FIELDS" WHERE "RDB$RELATION_NAME" = '.$this->escape($table); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "rfields"."RDB$FIELD_NAME" AS "name", @@ -288,85 +288,85 @@ class CI_DB_ibase_driver extends CI_DB { : FALSE; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => ibase_errcode(), 'message' => ibase_errmsg()); } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'DELETE FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { - // Limit clause depends on if Interbase or Firebird + if (stripos($this->version(), 'firebird') !== FALSE) { $select = 'FIRST '.$this->qb_limit @@ -381,30 +381,30 @@ class CI_DB_ibase_driver extends CI_DB { return preg_replace('`SELECT`i', 'SELECT '.$select, $sql, 1); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { ibase_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_forge.php index 29a3acf..7cb0656 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_forge.php @@ -1,116 +1,116 @@ 'INTEGER', 'INTEGER' => 'INT64', 'FLOAT' => 'DOUBLE PRECISION' ); - /** - * NULL value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_null = 'NULL'; - // -------------------------------------------------------------------- - /** - * Create database - * - * @param string $db_name - * @return bool - */ + + + + + + + public function create_database($db_name) { - // Firebird databases are flat files, so a path is required - // Hostname is needed for remote access + + empty($this->db->hostname) OR $db_name = $this->hostname.':'.$db_name; return parent::create_database('"'.$db_name.'"'); } - // -------------------------------------------------------------------- - /** - * Drop database - * - * @param string $db_name (ignored) - * @return bool - */ + + + + + + + public function drop_database($db_name) { if ( ! ibase_drop_db($this->conn_id)) @@ -129,16 +129,16 @@ class CI_DB_ibase_forge extends CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -185,14 +185,14 @@ class CI_DB_ibase_forge extends CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -202,16 +202,16 @@ class CI_DB_ibase_forge extends CI_DB_forge { .$field['default']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -234,18 +234,18 @@ class CI_DB_ibase_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported + } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_result.php index 8653097..dc48c7d 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_result.php @@ -1,72 +1,72 @@ result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -79,15 +79,15 @@ class CI_DB_ibase_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -104,42 +104,42 @@ class CI_DB_ibase_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { ibase_free_result($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return ibase_fetch_assoc($this->result_id, IBASE_FETCH_BLOBS); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { $row = ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_utility.php index a808749..0c39f6b 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/ibase/ibase_utility.php @@ -1,64 +1,64 @@ db->hostname, $this->db->username, $this->db->password)) { $res = ibase_backup($service, $this->db->database, $filename.'.fbk'); - // Close the service connection + ibase_service_detach($service); return $res; } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_driver.php index e197cfb..32e7d53 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_driver.php @@ -1,93 +1,93 @@ conn_id = ($persistent) @@ -117,9 +117,9 @@ class CI_DB_mssql_driver extends CI_DB { return FALSE; } - // ---------------------------------------------------------------- - // Select the DB... assuming a database name is specified in the config file + + if ($this->database !== '' && ! $this->db_select()) { log_message('error', 'Unable to select database: '.$this->database); @@ -129,7 +129,7 @@ class CI_DB_mssql_driver extends CI_DB { : FALSE; } - // Determine how identifiers are escaped + $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); $query = $query->row_array(); $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; @@ -138,14 +138,14 @@ class CI_DB_mssql_driver extends CI_DB { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Select the database - * - * @param string $database - * @return bool - */ + + + + + + + public function db_select($database = '') { if ($database === '') @@ -153,8 +153,8 @@ class CI_DB_mssql_driver extends CI_DB { $database = $this->database; } - // Note: Escaping is required in the event that the DB name - // contains reserved characters. + + if (mssql_select_db('['.$database.']', $this->conn_id)) { $this->database = $database; @@ -165,76 +165,76 @@ class CI_DB_mssql_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return mixed resource if rows are returned, bool otherwise - */ + + + + + + + protected function _execute($sql) { return mssql_query($sql, $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return $this->simple_query('BEGIN TRAN'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return $this->simple_query('COMMIT TRAN'); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return $this->simple_query('ROLLBACK TRAN'); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return mssql_rows_affected($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * Returns the last id created in the Identity column. - * - * @return string - */ + + + + + + + + public function insert_id() { $query = version_compare($this->version(), '8', '>=') @@ -246,41 +246,41 @@ class CI_DB_mssql_driver extends CI_DB { return $query->last_id; } - // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ + + + + + + + protected function _db_set_charset($charset) { return (ini_set('mssql.charset', $charset) !== FALSE); } - // -------------------------------------------------------------------- - /** - * Version number query string - * - * @return string - */ + + + + + + protected function _version() { return "SELECT SERVERPROPERTY('ProductVersion') AS ver"; } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') @@ -296,16 +296,16 @@ class CI_DB_mssql_driver extends CI_DB { return $sql.' ORDER BY '.$this->escape_identifiers('name'); } - // -------------------------------------------------------------------- - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT COLUMN_NAME @@ -313,14 +313,14 @@ class CI_DB_mssql_driver extends CI_DB { WHERE UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, COLUMN_DEFAULT @@ -346,21 +346,21 @@ class CI_DB_mssql_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { - // We need this because the error info is discarded by the - // server the first time you request it, and query() already - // calls error() once for logging purposes when a query fails. + + + static $error = array('code' => 0, 'message' => NULL); $message = mssql_get_last_message(); @@ -373,17 +373,17 @@ class CI_DB_mssql_driver extends CI_DB { return $error; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -391,34 +391,34 @@ class CI_DB_mssql_driver extends CI_DB { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE TABLE '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -429,37 +429,37 @@ class CI_DB_mssql_driver extends CI_DB { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { $limit = $this->qb_offset + $this->qb_limit; - // As of SQL Server 2005 (9.0.*) ROW_NUMBER() is supported, - // however an ORDER BY clause is required for it to work + + if (version_compare($this->version(), '9', '>=') && $this->qb_offset && ! empty($this->qb_orderby)) { $orderby = $this->_compile_order_by(); - // We have to strip the ORDER BY clause + $sql = trim(substr($sql, 0, strrpos($sql, $orderby))); - // Get the fields to select from our subquery, so that we can avoid CI_rownum appearing in the actual results + if (count($this->qb_select) === 0 OR strpos(implode(',', $this->qb_select), '*') !== FALSE) { - $select = '*'; // Inevitable + $select = '*'; } else { - // Use only field names and their aliases, everything else is out of our scope. + $select = array(); $field_regexp = ($this->_quoted_identifier) ? '("[^\"]+")' : '(\[[^\]]+\])'; @@ -480,21 +480,21 @@ class CI_DB_mssql_driver extends CI_DB { return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { - // Multiple-value inserts are only supported as of SQL Server 2008 + if (version_compare($this->version(), '10', '>=')) { return parent::_insert_batch($table, $keys, $values); @@ -503,13 +503,13 @@ class CI_DB_mssql_driver extends CI_DB { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { mssql_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_forge.php index 07b93c2..88c5985 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_forge.php @@ -1,72 +1,72 @@ 'SMALLINT', 'SMALLINT' => 'INT', @@ -74,16 +74,16 @@ class CI_DB_mssql_forge extends CI_DB_forge { 'REAL' => 'FLOAT' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) @@ -101,16 +101,16 @@ class CI_DB_mssql_forge extends CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) @@ -131,15 +131,15 @@ class CI_DB_mssql_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_result.php index 5d7d3be..c5918ab 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_result.php @@ -1,60 +1,60 @@ num_rows) @@ -62,27 +62,27 @@ class CI_DB_mssql_result extends CI_DB_result { : $this->num_rows = mssql_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return mssql_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -95,15 +95,15 @@ class CI_DB_mssql_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -120,13 +120,13 @@ class CI_DB_mssql_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -136,47 +136,47 @@ class CI_DB_mssql_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return mssql_data_seek($this->result_id, $n); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return mssql_fetch_assoc($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { $row = mssql_fetch_object($this->result_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_utility.php index 5c9941a..745fb62 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mssql/mssql_utility.php @@ -1,76 +1,76 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_driver.php index 78e77bc..6652fee 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_driver.php @@ -1,108 +1,108 @@ compress === FALSE) ? 0 : MYSQL_CLIENT_COMPRESS; @@ -130,14 +130,14 @@ class CI_DB_mysql_driver extends CI_DB { $client_flags = $client_flags | MYSQL_CLIENT_SSL; } - // Error suppression is necessary mostly due to PHP 5.5+ issuing E_DEPRECATED messages + $this->conn_id = ($persistent === TRUE) ? mysql_pconnect($this->hostname, $this->username, $this->password, $client_flags) : mysql_connect($this->hostname, $this->username, $this->password, TRUE, $client_flags); - // ---------------------------------------------------------------- - // Select the DB... assuming a database name is specified in the config file + + if ($this->database !== '' && ! $this->db_select()) { log_message('error', 'Unable to select database: '.$this->database); @@ -172,16 +172,16 @@ class CI_DB_mysql_driver extends CI_DB { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @return void - */ + + + + + + + + + public function reconnect() { if (mysql_ping($this->conn_id) === FALSE) @@ -190,14 +190,14 @@ class CI_DB_mysql_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Select the database - * - * @param string $database - * @return bool - */ + + + + + + + public function db_select($database = '') { if ($database === '') @@ -215,26 +215,26 @@ class CI_DB_mysql_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ + + + + + + + protected function _db_set_charset($charset) { return mysql_set_charset($charset, $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -250,33 +250,33 @@ class CI_DB_mysql_driver extends CI_DB { return $this->data_cache['version'] = $version; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return mixed - */ + + + + + + + protected function _execute($sql) { return mysql_query($this->_prep_query($sql), $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @param string $sql an SQL query - * @return string - */ + + + + + + + + + protected function _prep_query($sql) { - // mysql_affected_rows() returns 0 for "DELETE FROM TABLE" queries. This hack - // modifies the query so that it a proper number of affected rows is returned. + + if ($this->delete_hack === TRUE && preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) { return trim($sql).' WHERE 1=1'; @@ -285,26 +285,26 @@ class CI_DB_mysql_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { $this->simple_query('SET AUTOCOMMIT=0'); - return $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK + return $this->simple_query('START TRANSACTION'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if ($this->simple_query('COMMIT')) @@ -316,13 +316,13 @@ class CI_DB_mysql_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if ($this->simple_query('ROLLBACK')) @@ -334,53 +334,53 @@ class CI_DB_mysql_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return mysql_real_escape_string($str, $this->conn_id); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return mysql_affected_rows($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { return mysql_insert_id($this->conn_id); } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database); @@ -393,29 +393,29 @@ class CI_DB_mysql_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE))) === FALSE) @@ -442,31 +442,31 @@ class CI_DB_mysql_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => mysql_errno($this->conn_id), 'message' => mysql_error($this->conn_id)); } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * @return string - */ + + + + + + + + + protected function _from_tables() { if ( ! empty($this->qb_join) && count($this->qb_from) > 1) @@ -477,17 +477,17 @@ class CI_DB_mysql_driver extends CI_DB { return implode(', ', $this->qb_from); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { - // Error suppression to avoid annoying E_WARNINGs in cases - // where the connection has already been closed for some reason. + + @mysql_close($this->conn_id); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_forge.php index b69aa36..59ae2da 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_forge.php @@ -1,73 +1,73 @@ num_rows = mysql_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of rows in the result set - * - * @return int - */ + + + + + + public function num_rows() { return $this->num_rows; } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return mysql_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -108,15 +108,15 @@ class CI_DB_mysql_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -132,13 +132,13 @@ class CI_DB_mysql_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -148,18 +148,18 @@ class CI_DB_mysql_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return $this->num_rows @@ -167,30 +167,30 @@ class CI_DB_mysql_result extends CI_DB_result { : FALSE; } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return mysql_fetch_assoc($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return mysql_fetch_object($this->result_id, $class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_utility.php index a548929..a4a2a3e 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysql/mysql_utility.php @@ -1,80 +1,80 @@ db->query('SHOW CREATE TABLE '.$this->db->escape_identifiers($this->db->database.'.'.$table)); - // No result means the table name was invalid + if ($query === FALSE) { continue; } - // Write out the table schema + $output .= '#'.$newline.'# TABLE STRUCTURE FOR: '.$table.$newline.'#'.$newline.$newline; if ($add_drop === TRUE) @@ -129,13 +129,13 @@ class CI_DB_mysql_utility extends CI_DB_utility { } } - // If inserts are not needed we're done... + if ($add_insert === FALSE) { continue; } - // Grab all the data from the current table + $query = $this->db->query('SELECT * FROM '.$this->db->protect_identifiers($table)); if ($query->num_rows() === 0) @@ -143,29 +143,29 @@ class CI_DB_mysql_utility extends CI_DB_utility { continue; } - // Fetch the field names and determine if the field is an - // integer type. We use this info to decide whether to - // surround the data with quotes or not + + + $i = 0; $field_str = ''; $is_int = array(); while ($field = mysql_fetch_field($query->result_id)) { - // Most versions of MySQL store timestamp as a string + $is_int[$i] = in_array(strtolower(mysql_field_type($query->result_id, $i)), - array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), //, 'timestamp'), + array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), TRUE); - // Create a string of field names + $field_str .= $this->db->escape_identifiers($field->name).', '; $i++; } - // Trim off the end comma + $field_str = preg_replace('/, $/' , '', $field_str); - // Build the insert string + foreach ($query->result_array() as $row) { $val_str = ''; @@ -173,33 +173,33 @@ class CI_DB_mysql_utility extends CI_DB_utility { $i = 0; foreach ($row as $v) { - // Is the value NULL? + if ($v === NULL) { $val_str .= 'NULL'; } else { - // Escape the data if it's not an integer + $val_str .= ($is_int[$i] === FALSE) ? $this->db->escape($v) : $v; } - // Append a comma + $val_str .= ', '; $i++; } - // Remove the comma at the end of the string + $val_str = preg_replace('/, $/' , '', $val_str); - // Build the INSERT string + $output .= 'INSERT INTO '.$this->db->protect_identifiers($table).' ('.$field_str.') VALUES ('.$val_str.');'.$newline; } $output .= $newline.$newline; } - // Do we need to include a statement to re-enable foreign key checks? + if ($foreign_key_checks === FALSE) { $output .= 'SET foreign_key_checks = 1;'.$newline; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php index d374e01..284df48 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php @@ -1,122 +1,122 @@ hostname[0] === '/') { $hostname = NULL; @@ -175,12 +175,12 @@ class CI_DB_mysqli_driver extends CI_DB { { defined('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT') && $this->_mysqli->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, TRUE); } - // Apparently (when it exists), setting MYSQLI_OPT_SSL_VERIFY_SERVER_CERT - // to FALSE didn't do anything, so PHP 5.6.16 introduced yet another - // constant ... - // - // https://secure.php.net/ChangeLog-5.php#5.6.16 - // https://bugs.php.net/bug.php?id=68344 + + + + + + elseif (defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) { $client_flags |= MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT; @@ -202,7 +202,7 @@ class CI_DB_mysqli_driver extends CI_DB { if ($this->_mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)) { - // Prior to version 5.7.3, MySQL silently downgrades to an unencrypted connection if SSL setup fails + if ( ($client_flags & MYSQLI_CLIENT_SSL) && version_compare($this->_mysqli->client_info, '5.7.3', '<=') @@ -221,16 +221,16 @@ class CI_DB_mysqli_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @return void - */ + + + + + + + + + public function reconnect() { if ($this->conn_id !== FALSE && $this->conn_id->ping() === FALSE) @@ -239,14 +239,14 @@ class CI_DB_mysqli_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Select the database - * - * @param string $database - * @return bool - */ + + + + + + + public function db_select($database = '') { if ($database === '') @@ -264,26 +264,26 @@ class CI_DB_mysqli_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ + + + + + + + protected function _db_set_charset($charset) { return $this->conn_id->set_charset($charset); } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -294,33 +294,33 @@ class CI_DB_mysqli_driver extends CI_DB { return $this->data_cache['version'] = $this->conn_id->server_info; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return mixed - */ + + + + + + + protected function _execute($sql) { return $this->conn_id->query($this->_prep_query($sql)); } - // -------------------------------------------------------------------- - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @param string $sql an SQL query - * @return string - */ + + + + + + + + + protected function _prep_query($sql) { - // mysqli_affected_rows() returns 0 for "DELETE FROM TABLE" queries. This hack - // modifies the query so that it a proper number of affected rows is returned. + + if ($this->delete_hack === TRUE && preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) { return trim($sql).' WHERE 1=1'; @@ -329,28 +329,28 @@ class CI_DB_mysqli_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { $this->conn_id->autocommit(FALSE); return is_php('5.5') ? $this->conn_id->begin_transaction() - : $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK + : $this->simple_query('START TRANSACTION'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if ($this->conn_id->commit()) @@ -362,13 +362,13 @@ class CI_DB_mysqli_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if ($this->conn_id->rollback()) @@ -380,53 +380,53 @@ class CI_DB_mysqli_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return $this->conn_id->real_escape_string($str); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return $this->conn_id->affected_rows; } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { return $this->conn_id->insert_id; } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database); @@ -439,29 +439,29 @@ class CI_DB_mysqli_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE))) === FALSE) @@ -488,16 +488,16 @@ class CI_DB_mysqli_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { if ( ! empty($this->_mysqli->connect_errno)) @@ -511,16 +511,16 @@ class CI_DB_mysqli_driver extends CI_DB { return array('code' => $this->conn_id->errno, 'message' => $this->conn_id->error); } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * @return string - */ + + + + + + + + + protected function _from_tables() { if ( ! empty($this->qb_join) && count($this->qb_from) > 1) @@ -531,13 +531,13 @@ class CI_DB_mysqli_driver extends CI_DB { return implode(', ', $this->qb_from); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { $this->conn_id->close(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_forge.php index 92b1e94..3103370 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_forge.php @@ -1,75 +1,75 @@ num_rows) @@ -62,27 +62,27 @@ class CI_DB_mysqli_result extends CI_DB_result { : $this->num_rows = $this->result_id->num_rows; } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return $this->result_id->field_count; } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -95,15 +95,15 @@ class CI_DB_mysqli_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -121,18 +121,18 @@ class CI_DB_mysqli_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Get field type - * - * Extracts field type info from the bitflags returned by - * mysqli_result::fetch_fields() - * - * @used-by CI_DB_mysqli_result::field_data() - * @param int $type - * @return string - */ + + + + + + + + + + + private static function _get_field_type($type) { static $map; @@ -167,13 +167,13 @@ class CI_DB_mysqli_result extends CI_DB_result { return isset($map[$type]) ? $map[$type] : $type; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_object($this->result_id)) @@ -183,47 +183,47 @@ class CI_DB_mysqli_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return $this->result_id->data_seek($n); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return $this->result_id->fetch_assoc(); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return $this->result_id->fetch_object($class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_utility.php index 6064246..848c6f3 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_utility.php @@ -1,82 +1,82 @@ db->query('SHOW CREATE TABLE '.$this->db->escape_identifiers($this->db->database.'.'.$table)); - // No result means the table name was invalid + if ($query === FALSE) { continue; } - // Write out the table schema + $output .= '#'.$newline.'# TABLE STRUCTURE FOR: '.$table.$newline.'#'.$newline.$newline; if ($add_drop === TRUE) @@ -131,13 +131,13 @@ class CI_DB_mysqli_utility extends CI_DB_utility { } } - // If inserts are not needed we're done... + if ($add_insert === FALSE) { continue; } - // Grab all the data from the current table + $query = $this->db->query('SELECT * FROM '.$this->db->protect_identifiers($table)); if ($query->num_rows() === 0) @@ -145,27 +145,27 @@ class CI_DB_mysqli_utility extends CI_DB_utility { continue; } - // Fetch the field names and determine if the field is an - // integer type. We use this info to decide whether to - // surround the data with quotes or not + + + $i = 0; $field_str = ''; $is_int = array(); while ($field = $query->result_id->fetch_field()) { - // Most versions of MySQL store timestamp as a string + $is_int[$i] = in_array($field->type, array(MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_INT24, MYSQLI_TYPE_LONG), TRUE); - // Create a string of field names + $field_str .= $this->db->escape_identifiers($field->name).', '; $i++; } - // Trim off the end comma + $field_str = preg_replace('/, $/' , '', $field_str); - // Build the insert string + foreach ($query->result_array() as $row) { $val_str = ''; @@ -173,33 +173,33 @@ class CI_DB_mysqli_utility extends CI_DB_utility { $i = 0; foreach ($row as $v) { - // Is the value NULL? + if ($v === NULL) { $val_str .= 'NULL'; } else { - // Escape the data if it's not an integer + $val_str .= ($is_int[$i] === FALSE) ? $this->db->escape($v) : $v; } - // Append a comma + $val_str .= ', '; $i++; } - // Remove the comma at the end of the string + $val_str = preg_replace('/, $/' , '', $val_str); - // Build the INSERT string + $output .= 'INSERT INTO '.$this->db->protect_identifiers($table).' ('.$field_str.') VALUES ('.$val_str.');'.$newline; } $output .= $newline.$newline; } - // Do we need to include a statement to re-enable foreign key checks? + if ($foreign_key_checks === FALSE) { $output .= 'SET foreign_key_checks = 1;'.$newline; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_driver.php index a825c4a..7e683ca 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_driver.php @@ -1,162 +1,162 @@ '/^\(DESCRIPTION=(\(.+\)){2,}\)$/', // TNS - // Easy Connect string (Oracle 10g+) + 'tns' => '/^\(DESCRIPTION=(\(.+\)){2,}\)$/', + 'ec' => '/^(\/\/)?[a-z0-9.:_-]+(:[1-9][0-9]{0,4})?(\/[a-z0-9$_]+)?(:[^\/])?(\/[a-z0-9$_]+)?$/i', - 'in' => '/^[a-z0-9$_]+$/i' // Instance name (defined in tnsnames.ora) + 'in' => '/^[a-z0-9$_]+$/i' ); - /* Space characters don't have any effect when actually - * connecting, but can be a hassle while validating the DSN. - */ + + + $this->dsn = str_replace(array("\n", "\r", "\t", ' '), '', $this->dsn); if ($this->dsn !== '') @@ -170,7 +170,7 @@ class CI_DB_oci8_driver extends CI_DB { } } - // Legacy support for TNS in the hostname configuration field + $this->hostname = str_replace(array("\n", "\r", "\t", ' '), '', $this->hostname); if (preg_match($valid_dsns['tns'], $this->hostname)) { @@ -180,13 +180,13 @@ class CI_DB_oci8_driver extends CI_DB { elseif ($this->hostname !== '' && strpos($this->hostname, '/') === FALSE && strpos($this->hostname, ':') === FALSE && (( ! empty($this->port) && ctype_digit($this->port)) OR $this->database !== '')) { - /* If the hostname field isn't empty, doesn't contain - * ':' and/or '/' and if port and/or database aren't - * empty, then the hostname field is most likely indeed - * just a hostname. Therefore we'll try and build an - * Easy Connect string from these 3 settings, assuming - * that the database field is a service name. - */ + + + + + + + $this->dsn = $this->hostname .(( ! empty($this->port) && ctype_digit($this->port)) ? ':'.$this->port : '') .($this->database !== '' ? '/'.ltrim($this->database, '/') : ''); @@ -197,9 +197,9 @@ class CI_DB_oci8_driver extends CI_DB { } } - /* At this point, we can only try and validate the hostname and - * database fields separately as DSNs. - */ + + + if (preg_match($valid_dsns['ec'], $this->hostname) OR preg_match($valid_dsns['in'], $this->hostname)) { $this->dsn = $this->hostname; @@ -215,21 +215,21 @@ class CI_DB_oci8_driver extends CI_DB { } } - /* Well - OK, an empty string should work as well. - * PHP will try to use environment variables to - * determine which Oracle instance to connect to. - */ + + + + $this->dsn = ''; } - // -------------------------------------------------------------------- - /** - * Non-persistent database connection - * - * @param bool $persistent - * @return resource - */ + + + + + + + public function db_connect($persistent = FALSE) { $func = ($persistent === TRUE) ? 'oci_pconnect' : 'oci_connect'; @@ -238,13 +238,13 @@ class CI_DB_oci8_driver extends CI_DB { : $func($this->username, $this->password, $this->dsn, $this->char_set); } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -264,19 +264,19 @@ class CI_DB_oci8_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { - /* Oracle must parse the query before it is run. All of the actions with - * the query are based on the statement id returned by oci_parse(). - */ + + + if ($this->_reset_stmt_id === TRUE) { $this->stmt_id = oci_parse($this->conn_id, $sql); @@ -286,37 +286,37 @@ class CI_DB_oci8_driver extends CI_DB { return oci_execute($this->stmt_id, $this->commit_mode); } - // -------------------------------------------------------------------- - /** - * Get cursor. Returns a cursor from the database - * - * @return resource - */ + + + + + + public function get_cursor() { return $this->curs_id = oci_new_cursor($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Stored Procedure. Executes a stored procedure - * - * @param string package name in which the stored procedure is in - * @param string stored procedure name to execute - * @param array parameters - * @return mixed - * - * params array keys - * - * KEY OPTIONAL NOTES - * name no the name of the parameter should be in : format - * value no the value of the parameter. If this is an OUT or IN OUT parameter, - * this should be a reference to a variable - * type yes the type of the parameter - * length yes the max size of the parameter - */ + + + + + + + + + + + + + + + + + + public function stored_procedure($package, $procedure, array $params) { if ($package === '' OR $procedure === '') @@ -325,7 +325,7 @@ class CI_DB_oci8_driver extends CI_DB { return ($this->db_debug) ? $this->display_error('db_invalid_query') : FALSE; } - // Build the query string + $sql = 'BEGIN '.$package.'.'.$procedure.'('; $have_cursor = FALSE; @@ -348,14 +348,14 @@ class CI_DB_oci8_driver extends CI_DB { return $result; } - // -------------------------------------------------------------------- - /** - * Bind parameters - * - * @param array $params - * @return void - */ + + + + + + + protected function _bind_params($params) { if ( ! is_array($params) OR ! is_resource($this->stmt_id)) @@ -377,26 +377,26 @@ class CI_DB_oci8_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { $this->commit_mode = OCI_NO_AUTO_COMMIT; return TRUE; } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { $this->commit_mode = OCI_COMMIT_ON_SUCCESS; @@ -404,54 +404,54 @@ class CI_DB_oci8_driver extends CI_DB { return oci_commit($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { $this->commit_mode = OCI_COMMIT_ON_SUCCESS; return oci_rollback($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return oci_num_rows($this->stmt_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { - // not supported in oracle + return $this->display_error('db_unsupported_function'); } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "TABLE_NAME" FROM "ALL_TABLES"'; @@ -465,16 +465,16 @@ class CI_DB_oci8_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { if (strpos($table, '.') !== FALSE) @@ -491,14 +491,14 @@ class CI_DB_oci8_driver extends CI_DB { AND UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (strpos($table, '.') !== FALSE) @@ -547,21 +547,21 @@ class CI_DB_oci8_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { - // oci_error() returns an array that already contains - // 'code' and 'message' keys, but it can return false - // if there was no error .... + + + if (is_resource($this->curs_id)) { $error = oci_error($this->curs_id); @@ -584,18 +584,18 @@ class CI_DB_oci8_driver extends CI_DB { : array('code' => '', 'message' => ''); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { $keys = implode(', ', $keys); @@ -609,34 +609,34 @@ class CI_DB_oci8_driver extends CI_DB { return $sql.'SELECT * FROM dual'; } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE TABLE '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -648,21 +648,21 @@ class CI_DB_oci8_driver extends CI_DB { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { if (version_compare($this->version(), '12.1', '>=')) { - // OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; @@ -673,26 +673,26 @@ class CI_DB_oci8_driver extends CI_DB { .($this->qb_offset ? ' WHERE rnum >= '.($this->qb_offset + 1) : ''); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { oci_close($this->conn_id); } - // -------------------------------------------------------------------- - /** - * We need to reset our $limit_used hack flag, so it doesn't propagate - * to subsequent queries. - * - * @return void - */ + + + + + + + protected function _reset_select() { $this->limit_used = FALSE; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_forge.php index 20217f2..fcc3046 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_forge.php @@ -1,96 +1,96 @@ stmt_id = FALSE; } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { $count = oci_num_fields($this->stmt_id); - // if we used a limit we subtract it + return ($this->limit_used) ? $count - 1 : $count; } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -129,15 +129,15 @@ class CI_DB_oci8_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -154,13 +154,13 @@ class CI_DB_oci8_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -181,31 +181,31 @@ class CI_DB_oci8_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; return oci_fetch_assoc($id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { $row = ($this->curs_id) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_utility.php index 3a7261c..823be23 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/oci8/oci8_utility.php @@ -1,67 +1,67 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_driver.php index 72289bf..6dedccd 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_driver.php @@ -1,139 +1,139 @@ dsn)) { $this->dsn = $this->hostname; } } - // -------------------------------------------------------------------- - /** - * Non-persistent database connection - * - * @param bool $persistent - * @return resource - */ + + + + + + + public function db_connect($persistent = FALSE) { return ($persistent === TRUE) @@ -141,15 +141,15 @@ class CI_DB_odbc_driver extends CI_DB_driver { : odbc_connect($this->dsn, $this->username, $this->password); } - // -------------------------------------------------------------------- - /** - * Compile Bindings - * - * @param string $sql SQL statement - * @param array $binds An array of values to bind - * @return string - */ + + + + + + + + public function compile_binds($sql, $binds) { if (empty($binds) OR empty($this->bind_marker) OR strpos($sql, $this->bind_marker) === FALSE) @@ -163,15 +163,15 @@ class CI_DB_odbc_driver extends CI_DB_driver { } else { - // Make sure we're using numeric keys + $binds = array_values($binds); $bind_count = count($binds); } - // We'll need the marker length later + $ml = strlen($this->bind_marker); - // Make sure not to replace a chunk inside a string that happens to match the bind marker + if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches)) { $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', @@ -180,7 +180,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { $sql, $c), $matches, PREG_OFFSET_CAPTURE); - // Bind values' count must match the count of markers in the query + if ($bind_count !== $c) { return $sql; @@ -209,14 +209,14 @@ class CI_DB_odbc_driver extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { if ( ! isset($this->odbc_result)) @@ -230,7 +230,7 @@ class CI_DB_odbc_driver extends CI_DB_driver { if (TRUE === ($success = odbc_execute($this->odbc_result, $this->binds))) { - // For queries that return result sets, return the result_id resource on success + $this->is_write_type($sql) OR $success = $this->odbc_result; } @@ -240,25 +240,25 @@ class CI_DB_odbc_driver extends CI_DB_driver { return $success; } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return odbc_autocommit($this->conn_id, FALSE); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if (odbc_commit($this->conn_id)) @@ -270,13 +270,13 @@ class CI_DB_odbc_driver extends CI_DB_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if (odbc_rollback($this->conn_id)) @@ -288,14 +288,14 @@ class CI_DB_odbc_driver extends CI_DB_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Determines if a query is a "write" type. - * - * @param string An SQL query string - * @return bool - */ + + + + + + + public function is_write_type($sql) { if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) @@ -306,53 +306,53 @@ class CI_DB_odbc_driver extends CI_DB_driver { return parent::is_write_type($sql); } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { $this->display_error('db_unsupported_feature'); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return odbc_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return bool - */ + + + + + + public function insert_id() { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = '".$this->schema."'"; @@ -366,58 +366,58 @@ class CI_DB_odbc_driver extends CI_DB_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SHOW COLUMNS FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _field_data($table) { return 'SELECT TOP 1 FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => odbc_error($this->conn_id), 'message' => odbc_errormsg($this->conn_id)); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { odbc_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_forge.php index 05f9c76..d999567 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_forge.php @@ -1,86 +1,86 @@ num_rows)) @@ -66,7 +66,7 @@ class CI_DB_odbc_result extends CI_DB_result { return $this->num_rows; } - // Work-around for ODBC subdrivers that don't support num_rows() + if (count($this->result_array) > 0) { return $this->num_rows = count($this->result_array); @@ -79,27 +79,27 @@ class CI_DB_odbc_result extends CI_DB_result { return $this->num_rows = count($this->result_array()); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return odbc_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -116,15 +116,15 @@ class CI_DB_odbc_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -141,13 +141,13 @@ class CI_DB_odbc_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -157,30 +157,30 @@ class CI_DB_odbc_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return odbc_fetch_array($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { $row = odbc_fetch_object($this->result_id); @@ -201,20 +201,20 @@ class CI_DB_odbc_result extends CI_DB_result { } -// -------------------------------------------------------------------- + if ( ! function_exists('odbc_fetch_array')) { - /** - * ODBC Fetch array - * - * Emulates the native odbc_fetch_array() function when - * it is not available (odbc_fetch_array() requires unixODBC) - * - * @param resource &$result - * @param int $rownumber - * @return array - */ + + + + + + + + + + function odbc_fetch_array(&$result, $rownumber = 1) { $rs = array(); @@ -234,20 +234,20 @@ if ( ! function_exists('odbc_fetch_array')) } } -// -------------------------------------------------------------------- + if ( ! function_exists('odbc_fetch_object')) { - /** - * ODBC Fetch object - * - * Emulates the native odbc_fetch_object() function when - * it is not available. - * - * @param resource &$result - * @param int $rownumber - * @return object - */ + + + + + + + + + + function odbc_fetch_object(&$result, $rownumber = 1) { $rs = array(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_utility.php index 7872010..273f888 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/odbc/odbc_utility.php @@ -1,62 +1,62 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_driver.php index c5d120f..4750f34 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_driver.php @@ -1,93 +1,93 @@ dsn, $match) && count($match) === 2) { - // If there is a minimum valid dsn string pattern found, we're done - // This is for general PDO users, who tend to have a full DSN string. + + $this->subdriver = $match[1]; return; } - // Legacy support for DSN specified in the hostname field + elseif (preg_match('/([^:]+):/', $this->hostname, $match) && count($match) === 2) { $this->dsn = $this->hostname; @@ -116,14 +116,14 @@ class CI_DB_pdo_driver extends CI_DB { $this->dsn = NULL; } - // -------------------------------------------------------------------- - /** - * Database connection - * - * @param bool $persistent - * @return object - */ + + + + + + + public function db_connect($persistent = FALSE) { if ($persistent === TRUE) @@ -146,13 +146,13 @@ class CI_DB_pdo_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -160,7 +160,7 @@ class CI_DB_pdo_driver extends CI_DB { return $this->data_cache['version']; } - // Not all subdrivers support the getAttribute() method + try { return $this->data_cache['version'] = $this->conn_id->getAttribute(PDO::ATTR_SERVER_VERSION); @@ -171,124 +171,124 @@ class CI_DB_pdo_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql SQL query - * @return mixed - */ + + + + + + + protected function _execute($sql) { return $this->conn_id->query($sql); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return $this->conn_id->beginTransaction(); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return $this->conn_id->commit(); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return $this->conn_id->rollBack(); } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { - // Escape the string + $str = $this->conn_id->quote($str); - // If there are duplicated quotes, trim them away + return ($str[0] === "'") ? substr($str, 1, -1) : $str; } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return is_object($this->result_id) ? $this->result_id->rowCount() : 0; } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @param string $name - * @return int - */ + + + + + + + public function insert_id($name = NULL) { return $this->conn_id->lastInsertId($name); } - // -------------------------------------------------------------------- - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _field_data($table) { return 'SELECT TOP 1 * FROM '.$this->protect_identifiers($table); } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { $error = array('code' => '00000', 'message' => ''); @@ -308,19 +308,19 @@ class CI_DB_pdo_driver extends CI_DB { return $error; } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE TABLE '.$table; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_forge.php index e512d3d..bcb2e50 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_forge.php @@ -1,65 +1,65 @@ num_rows)) @@ -77,34 +77,34 @@ class CI_DB_pdo_result extends CI_DB_result { return $this->num_rows = count($this->result_array()); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return $this->result_id->columnCount(); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return bool - */ + + + + + + + + public function list_fields() { $field_names = array(); for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) { - // Might trigger an E_WARNING due to not all subdrivers - // supporting getColumnMeta() + + $field_names[$i] = @$this->result_id->getColumnMeta($i); $field_names[$i] = $field_names[$i]['name']; } @@ -112,15 +112,15 @@ class CI_DB_pdo_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { try @@ -151,13 +151,13 @@ class CI_DB_pdo_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_object($this->result_id)) @@ -166,30 +166,30 @@ class CI_DB_pdo_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return $this->result_id->fetch(PDO::FETCH_ASSOC); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return $this->result_id->fetchObject($class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_utility.php index 6c40cf3..08e344f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/pdo_utility.php @@ -1,62 +1,62 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php index 2e39bb2..a2e10ee 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php @@ -1,81 +1,81 @@ escape_identifiers('TABLE_NAME').' FROM '.$this->escape_identifiers('_USER_TABLES'); @@ -117,48 +117,48 @@ class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT '.$this->escape_identifiers('COLUMN_NAME').' FROM '.$this->escape_identifiers('_USER_COLUMNS') .' WHERE '.$this->escape_identifiers('TABLE_NAME').' = '.$this->escape($table); } - // -------------------------------------------------------------------- - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _field_data($table) { return 'SELECT * FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE).' LIMIT 1'; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -166,32 +166,32 @@ class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { return $sql.' LIMIT '.$this->qb_limit.($this->qb_offset ? ' OFFSET '.$this->qb_offset : ''); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index 306150b..6a4f97f 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -1,91 +1,91 @@ 'INT', 'SMALLINT' => 'INT', @@ -93,23 +93,23 @@ class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge { 'INT32' => 'INT64' ); - /** - * DEFAULT value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_default = FALSE; - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) @@ -117,18 +117,18 @@ class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge { return parent::_alter_table($alter_type, $table, $field); } - // No method of modifying columns is supported + return FALSE; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -138,16 +138,16 @@ class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge { .$field['auto_increment']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -170,35 +170,35 @@ class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute UNIQUE - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_unique(&$attributes, &$field) { if ( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) { $field['unique'] = ' UNIQUE'; - // UNIQUE must be used with NOT NULL + $field['null'] = ' NOT NULL'; } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php index 9a6b643..7df0515 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php @@ -1,88 +1,88 @@ protect_identifiers($table, TRUE, NULL, FALSE); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE))) === FALSE) @@ -168,34 +168,34 @@ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE '.$table; } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * @return string - */ + + + + + + + + + protected function _from_tables() { if ( ! empty($this->qb_join) && count($this->qb_from) > 1) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php index f2ee3f5..1156845 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_cubrid_forge.php @@ -1,87 +1,87 @@ 'INTEGER', 'SMALLINT' => 'INTEGER', @@ -92,16 +92,16 @@ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { 'REAL' => 'DOUBLE' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -127,14 +127,14 @@ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { $extra_clause = isset($field['after']) @@ -156,16 +156,16 @@ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { .$extra_clause; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -185,14 +185,14 @@ class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Process indexes - * - * @param string $table (ignored) - * @return string - */ + + + + + + + protected function _process_indexes($table) { $sql = ''; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php index 09dbdf0..1682c34 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php @@ -1,93 +1,93 @@ conn_id; } - // Determine how identifiers are escaped + $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); $query = $query->row_array(); $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; @@ -147,16 +147,16 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') @@ -172,16 +172,16 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return $sql.' ORDER BY '.$this->escape_identifiers('name'); } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT COLUMN_NAME @@ -189,14 +189,14 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { WHERE UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, COLUMN_DEFAULT @@ -222,17 +222,17 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -240,16 +240,16 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -260,37 +260,37 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { $limit = $this->qb_offset + $this->qb_limit; - // As of SQL Server 2005 (9.0.*) ROW_NUMBER() is supported, - // however an ORDER BY clause is required for it to work + + if (version_compare($this->version(), '9', '>=') && $this->qb_offset && ! empty($this->qb_orderby)) { $orderby = $this->_compile_order_by(); - // We have to strip the ORDER BY clause + $sql = trim(substr($sql, 0, strrpos($sql, $orderby))); - // Get the fields to select from our subquery, so that we can avoid CI_rownum appearing in the actual results + if (count($this->qb_select) === 0 OR strpos(implode(',', $this->qb_select), '*') !== FALSE) { - $select = '*'; // Inevitable + $select = '*'; } else { - // Use only field names and their aliases, everything else is out of our scope. + $select = array(); $field_regexp = ($this->_quoted_identifier) ? '("[^\"]+")' : '(\[[^\]]+\])'; @@ -311,21 +311,21 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { - // Multiple-value inserts are only supported as of SQL Server 2008 + if (version_compare($this->version(), '10', '>=')) { return parent::_insert_batch($table, $keys, $values); @@ -334,13 +334,13 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php index f38ac99..cf1185c 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_dblib_forge.php @@ -1,70 +1,70 @@ 'SMALLINT', 'SMALLINT' => 'INT', @@ -72,16 +72,16 @@ class CI_DB_pdo_dblib_forge extends CI_DB_pdo_forge { 'REAL' => 'FLOAT' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) @@ -99,16 +99,16 @@ class CI_DB_pdo_dblib_forge extends CI_DB_pdo_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) @@ -129,15 +129,15 @@ class CI_DB_pdo_dblib_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php index 2c49f12..b276ee8 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php @@ -1,83 +1,83 @@ escape($table); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "rfields"."RDB$FIELD_NAME" AS "name", @@ -182,70 +182,70 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { : FALSE; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'DELETE FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { - // Limit clause depends on if Interbase or Firebird + if (stripos($this->version(), 'firebird') !== FALSE) { $select = 'FIRST '.$this->qb_limit @@ -260,18 +260,18 @@ class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver { return preg_replace('`SELECT`i', 'SELECT '.$select, $sql); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 54752f1..058b523 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -1,102 +1,102 @@ 'INTEGER', 'INTEGER' => 'INT64', 'FLOAT' => 'DOUBLE PRECISION' ); - /** - * NULL value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_null = 'NULL'; - // -------------------------------------------------------------------- - /** - * Create database - * - * @param string $db_name - * @return string - */ + + + + + + + public function create_database($db_name) { - // Firebird databases are flat files, so a path is required - // Hostname is needed for remote access + + empty($this->db->hostname) OR $db_name = $this->hostname.':'.$db_name; return parent::create_database('"'.$db_name.'"'); } - // -------------------------------------------------------------------- - /** - * Drop database - * - * @param string $db_name (ignored) - * @return bool - */ + + + + + + + public function drop_database($db_name) { if ( ! ibase_drop_db($this->conn_id)) @@ -115,16 +115,16 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -171,14 +171,14 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -188,16 +188,16 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { .$field['default']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -220,18 +220,18 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported + } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php index 00654d7..63fe3d9 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php @@ -1,74 +1,74 @@ dsn = 'ibm:'; - // Pre-defined DSN + if (empty($this->hostname) && empty($this->HOSTNAME) && empty($this->port) && empty($this->PORT)) { if (isset($this->DSN)) @@ -125,16 +125,16 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { } } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "tabname" FROM "syscat"."tables" @@ -149,16 +149,16 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return array - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT "colname" FROM "syscat"."columns" @@ -166,14 +166,14 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { AND LOWER("tabname") = '.$this->escape(strtolower($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "colname" AS "name", "typename" AS "type", "default" AS "default", "length" AS "max_length", @@ -188,17 +188,17 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { : FALSE; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -206,32 +206,32 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { $sql .= ' FETCH FIRST '.($this->qb_limit + $this->qb_offset).' ROWS ONLY'; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php index 99d75b6..bcd5931 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_ibm_forge.php @@ -1,86 +1,86 @@ 'INTEGER', 'INT' => 'BIGINT', 'INTEGER' => 'BIGINT' ); - /** - * DEFAULT value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_default = FALSE; - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if ($alter_type === 'CHANGE') @@ -91,16 +91,16 @@ class CI_DB_pdo_ibm_forge extends CI_DB_pdo_forge { return parent::_alter_table($alter_type, $table, $field); } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -117,38 +117,38 @@ class CI_DB_pdo_ibm_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute UNIQUE - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_unique(&$attributes, &$field) { if ( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) { $field['unique'] = ' UNIQUE'; - // UNIQUE must be used with NOT NULL + $field['null'] = ' NOT NULL'; } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported + } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php index 114eb74..27bbba4 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php @@ -1,83 +1,83 @@ dsn = 'informix:'; - // Pre-defined DSN + if (empty($this->hostname) && empty($this->host) && empty($this->port) && empty($this->service)) { if (isset($this->DSN)) @@ -127,16 +127,16 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { } } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "tabname" FROM "systables" @@ -151,16 +151,16 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { if (strpos($table, '.') !== FALSE) @@ -179,14 +179,14 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { AND LOWER("systables"."tabname") = '.$this->escape(strtolower($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "syscolumns"."colname" AS "name", @@ -238,17 +238,17 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { : FALSE; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -256,50 +256,50 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE TABLE ONLY '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql $SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { $select = 'SELECT '.($this->qb_offset ? 'SKIP '.$this->qb_offset : '').'FIRST '.$this->qb_limit.' '; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php index 1f4bcd1..9ebad49 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_informix_forge.php @@ -1,63 +1,63 @@ 'INTEGER', 'INT' => 'BIGINT', @@ -66,23 +66,23 @@ class CI_DB_pdo_informix_forge extends CI_DB_pdo_forge { 'SMALLFLOAT' => 'DOUBLE PRECISION' ); - /** - * DEFAULT value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_default = ', '; - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if ($alter_type === 'CHANGE') @@ -93,16 +93,16 @@ class CI_DB_pdo_informix_forge extends CI_DB_pdo_forge { return parent::_alter_table($alter_type, $table, $field); } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -129,15 +129,15 @@ class CI_DB_pdo_informix_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute UNIQUE - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_unique(&$attributes, &$field) { if ( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) @@ -146,18 +146,18 @@ class CI_DB_pdo_informix_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported + } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index 26bc30e..270da8b 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -1,99 +1,99 @@ stricton)) @@ -172,12 +172,12 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { $ssl[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = $this->encrypt['ssl_verify']; } - // DO NOT use array_merge() here! - // It re-indexes numeric keys and the PDO_MYSQL_ATTR_SSL_* constants are integers. + + empty($ssl) OR $this->options += $ssl; } - // Prior to version 5.7.3, MySQL silently downgrades to an unencrypted connection if SSL setup fails + if ( ($pdo = parent::db_connect($persistent)) !== FALSE && ! empty($ssl) @@ -193,14 +193,14 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return $pdo; } - // -------------------------------------------------------------------- - /** - * Select the database - * - * @param string $database - * @return bool - */ + + + + + + + public function db_select($database = '') { if ($database === '') @@ -218,26 +218,26 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { $this->conn_id->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE); return $this->conn_id->beginTransaction(); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { if ($this->conn_id->commit()) @@ -249,13 +249,13 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { if ($this->conn_id->rollBack()) @@ -267,16 +267,16 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SHOW TABLES'; @@ -289,29 +289,29 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('SHOW COLUMNS FROM '.$this->protect_identifiers($table, TRUE, NULL, FALSE))) === FALSE) @@ -338,34 +338,34 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE '.$table; } - // -------------------------------------------------------------------- - /** - * FROM tables - * - * Groups tables in FROM clauses if needed, so there is no confusion - * about operator precedence. - * - * @return string - */ + + + + + + + + + protected function _from_tables() { if ( ! empty($this->qb_join) && count($this->qb_from) > 1) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php index 01595a6..95fb1a3 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php @@ -1,87 +1,87 @@ dsn = 'oci:dbname='; - // Oracle has a slightly different PDO DSN format (Easy Connect), - // which also supports pre-defined DSNs. + + if (empty($this->hostname) && empty($this->port)) { $this->dsn .= $this->database; @@ -127,13 +127,13 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { } } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -150,16 +150,16 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { return FALSE; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "TABLE_NAME" FROM "ALL_TABLES"'; @@ -173,16 +173,16 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { if (strpos($table, '.') !== FALSE) @@ -199,14 +199,14 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { AND UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (strpos($table, '.') !== FALSE) @@ -255,16 +255,16 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + protected function _insert_batch($table, $keys, $values) { $keys = implode(', ', $keys); @@ -278,16 +278,16 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { return $sql.'SELECT * FROM dual'; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -299,21 +299,21 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { if (version_compare($this->version(), '12.1', '>=')) { - // OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index 0abda59..58eab32 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -1,89 +1,89 @@ dsn = 'odbc:'; - // Pre-defined DSN + if (empty($this->hostname) && empty($this->HOSTNAME) && empty($this->port) && empty($this->PORT)) { if (isset($this->DSN)) @@ -124,7 +124,7 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { return; } - // If the DSN is not pre-configured - try to build an IBM DB2 connection string + $this->dsn .= 'DRIVER='.(isset($this->DRIVER) ? '{'.$this->DRIVER.'}' : '{IBM DB2 ODBC DRIVER}').';'; if (isset($this->DATABASE)) @@ -158,27 +158,27 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { } } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { $this->display_error('db_unsupported_feature'); } - // -------------------------------------------------------------------- - /** - * Determines if a query is a "write" type. - * - * @param string An SQL query string - * @return bool - */ + + + + + + + public function is_write_type($sql) { if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) @@ -189,16 +189,16 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { return parent::is_write_type($sql); } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = '".$this->schema."'"; @@ -212,16 +212,16 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT column_name FROM information_schema.columns WHERE table_name = '.$this->escape($table); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php index 47226d7..014bfb6 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_odbc_forge.php @@ -1,70 +1,70 @@ conn_id = parent::db_connect($persistent); @@ -124,14 +124,14 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @param string $name - * @return int - */ + + + + + + + public function insert_id($name = NULL) { if ($name === NULL && version_compare($this->version(), '8.1', '>=')) @@ -144,14 +144,14 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return $this->conn_id->lastInsertId($name); } - // -------------------------------------------------------------------- - /** - * Determines if a query is a "write" type. - * - * @param string An SQL query string - * @return bool - */ + + + + + + + public function is_write_type($sql) { if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) @@ -162,16 +162,16 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return parent::is_write_type($sql); } - // -------------------------------------------------------------------- - /** - * "Smart" Escape String - * - * Escapes data based on type - * - * @param string $str - * @return mixed - */ + + + + + + + + + public function escape($str) { if (is_bool($str)) @@ -182,16 +182,16 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return parent::escape($str); } - // -------------------------------------------------------------------- - /** - * ORDER BY - * - * @param string $orderby - * @param string $direction ASC, DESC or RANDOM - * @param bool $escape - * @return object - */ + + + + + + + + + public function order_by($orderby, $direction = '', $escape = NULL) { $direction = strtoupper(trim($direction)); @@ -217,16 +217,16 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return parent::order_by($orderby, $direction, $escape); } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "table_name" FROM "information_schema"."tables" WHERE "table_schema" = \''.$this->schema."'"; @@ -241,16 +241,16 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return $sql; } - // -------------------------------------------------------------------- - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT "column_name" @@ -258,14 +258,14 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { WHERE LOWER("table_name") = '.$this->escape(strtolower($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default" @@ -291,17 +291,17 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -309,18 +309,18 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @param string $table Table name - * @param array $values Update data - * @param string $index WHERE key - * @return string - */ + + + + + + + + + + + protected function _update_batch($table, $values, $index) { $ids = array(); @@ -350,32 +350,32 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver { return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { return $sql.' LIMIT '.$this->qb_limit.($this->qb_offset ? ' OFFSET '.$this->qb_offset : ''); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index ff7a110..8f14690 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -1,63 +1,63 @@ 'INTEGER', 'SMALLINT' => 'INTEGER', @@ -70,21 +70,21 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { 'FLOAT' => 'DOUBLE PRECISION' ); - /** - * NULL value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_null = 'NULL'; - // -------------------------------------------------------------------- - /** - * Class constructor - * - * @param object &$db Database object - * @return void - */ + + + + + + + public function __construct(&$db) { parent::__construct($db); @@ -95,16 +95,16 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -156,19 +156,19 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { - // Reset field lengths for data types that don't support it + if (isset($attributes['CONSTRAINT']) && stripos($attributes['TYPE'], 'int') !== FALSE) { $attributes['CONSTRAINT'] = NULL; @@ -188,15 +188,15 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index f55d9a6..bf8ccfe 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -1,83 +1,83 @@ query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) @@ -142,14 +142,14 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { return $fields; } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) @@ -177,34 +177,34 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Replace statement - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + protected function _replace($table, $keys, $values) { return 'INSERT OR '.parent::_replace($table, $keys, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'DELETE FROM '.$table; diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php index 545b2a3..0e129fb 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php @@ -1,87 +1,87 @@ db->database)) { - // We need to close the pseudo-connection first + $this->db->close(); if ( ! @unlink($this->db->database)) { @@ -142,29 +142,29 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { return $this->db->db_debug ? $this->db->display_error('db_unable_to_drop') : FALSE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if ($alter_type === 'DROP' OR $alter_type === 'CHANGE') { - // drop_column(): - // BEGIN TRANSACTION; - // CREATE TEMPORARY TABLE t1_backup(a,b); - // INSERT INTO t1_backup SELECT a,b FROM t1; - // DROP TABLE t1; - // CREATE TABLE t1(a,b); - // INSERT INTO t1 SELECT a,b FROM t1_backup; - // DROP TABLE t1_backup; - // COMMIT; + + + + + + + + + return FALSE; } @@ -172,14 +172,14 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { return parent::_alter_table($alter_type, $table, $field); } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -190,16 +190,16 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { .$field['default']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -212,15 +212,15 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index 84109ae..6156655 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -1,93 +1,93 @@ port) OR $this->dsn .= ','.$this->port; empty($this->database) OR $this->dsn .= ';Database='.$this->database; - // Some custom options + if (isset($this->QuotedId)) { @@ -140,14 +140,14 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { } } - // -------------------------------------------------------------------- - /** - * Database connection - * - * @param bool $persistent - * @return object - */ + + + + + + + public function db_connect($persistent = FALSE) { if ( ! empty($this->char_set) && preg_match('/utf[^8]*8/i', $this->char_set)) @@ -162,7 +162,7 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return $this->conn_id; } - // Determine how identifiers are escaped + $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); $query = $query->row_array(); $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; @@ -171,16 +171,16 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') @@ -196,16 +196,16 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return $sql.' ORDER BY '.$this->escape_identifiers('name'); } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT COLUMN_NAME @@ -213,14 +213,14 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { WHERE UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, COLUMN_DEFAULT @@ -246,17 +246,17 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return $retval; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -264,16 +264,16 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -284,22 +284,22 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { - // As of SQL Server 2012 (11.0.*) OFFSET is supported + if (version_compare($this->version(), '11', '>=')) { - // SQL Server OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; @@ -307,22 +307,22 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { $limit = $this->qb_offset + $this->qb_limit; - // An ORDER BY clause is required for ROW_NUMBER() to work + if ($this->qb_offset && ! empty($this->qb_orderby)) { $orderby = $this->_compile_order_by(); - // We have to strip the ORDER BY clause + $sql = trim(substr($sql, 0, strrpos($sql, $orderby))); - // Get the fields to select from our subquery, so that we can avoid CI_rownum appearing in the actual results + if (count($this->qb_select) === 0 OR strpos(implode(',', $this->qb_select), '*') !== FALSE) { - $select = '*'; // Inevitable + $select = '*'; } else { - // Use only field names and their aliases, everything else is out of our scope. + $select = array(); $field_regexp = ($this->_quoted_identifier) ? '("[^\"]+")' : '(\[[^\]]+\])'; @@ -343,21 +343,21 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { - // Multiple-value inserts are only supported as of SQL Server 2008 + if (version_compare($this->version(), '10', '>=')) { return parent::_insert_batch($table, $keys, $values); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php index b23c6d4..2ab46b2 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_forge.php @@ -1,70 +1,70 @@ 'SMALLINT', 'SMALLINT' => 'INT', @@ -72,16 +72,16 @@ class CI_DB_pdo_sqlsrv_forge extends CI_DB_pdo_forge { 'REAL' => 'FLOAT' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) @@ -99,16 +99,16 @@ class CI_DB_pdo_sqlsrv_forge extends CI_DB_pdo_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) @@ -129,15 +129,15 @@ class CI_DB_pdo_sqlsrv_forge extends CI_DB_pdo_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_driver.php index 5ce2761..c40fe42 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_driver.php @@ -1,90 +1,90 @@ hostname, '/') !== FALSE) { - // If UNIX sockets are used, we shouldn't set a port + $this->port = ''; } @@ -113,21 +113,21 @@ class CI_DB_postgre_driver extends CI_DB { { $this->dsn .= 'user='.$this->username.' '; - /* An empty password is valid! - * - * $db['password'] = NULL must be done in order to ignore it. - */ + + + + $this->password === NULL OR $this->dsn .= "password='".$this->password."' "; } $this->database === '' OR $this->dsn .= 'dbname='.$this->database.' '; - /* We don't have these options as elements in our standard configuration - * array, but they might be set by parse_url() if the configuration was - * provided via string. Example: - * - * postgre://username:password@localhost:5432/database?connect_timeout=5&sslmode=1 - */ + + + + + + foreach (array('connect_timeout', 'options', 'sslmode', 'service') as $key) { if (isset($this->$key) && is_string($this->$key) && $this->$key !== '') @@ -139,14 +139,14 @@ class CI_DB_postgre_driver extends CI_DB { $this->dsn = rtrim($this->dsn); } - // -------------------------------------------------------------------- - /** - * Database connection - * - * @param bool $persistent - * @return resource - */ + + + + + + + public function db_connect($persistent = FALSE) { $this->conn_id = ($persistent === TRUE) @@ -169,16 +169,16 @@ class CI_DB_postgre_driver extends CI_DB { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @return void - */ + + + + + + + + + public function reconnect() { if (pg_ping($this->conn_id) === FALSE) @@ -187,26 +187,26 @@ class CI_DB_postgre_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Set client character set - * - * @param string $charset - * @return bool - */ + + + + + + + protected function _db_set_charset($charset) { return (pg_set_client_encoding($this->conn_id, $charset) === 0); } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -219,73 +219,73 @@ class CI_DB_postgre_driver extends CI_DB { return FALSE; } - /* If PHP was compiled with PostgreSQL lib versions earlier - * than 7.4, pg_version() won't return the server version - * and so we'll have to fall back to running a query in - * order to get it. - */ + + + + + return (isset($pg_version['server']) && preg_match('#^(\d+\.\d+)#', $pg_version['server'], $match)) ? $this->data_cache['version'] = $match[1] : parent::version(); } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { return pg_query($this->conn_id, $sql); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return (bool) pg_query($this->conn_id, 'BEGIN'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return (bool) pg_query($this->conn_id, 'COMMIT'); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return (bool) pg_query($this->conn_id, 'ROLLBACK'); } - // -------------------------------------------------------------------- - /** - * Determines if a query is a "write" type. - * - * @param string An SQL query string - * @return bool - */ + + + + + + + public function is_write_type($sql) { if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#is', $sql)) @@ -296,29 +296,29 @@ class CI_DB_postgre_driver extends CI_DB { return parent::is_write_type($sql); } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return pg_escape_string($this->conn_id, $str); } - // -------------------------------------------------------------------- - /** - * "Smart" Escape String - * - * Escapes data based on type - * - * @param string $str - * @return mixed - */ + + + + + + + + + public function escape($str) { if (is_php('5.4.4') && (is_string($str) OR (is_object($str) && method_exists($str, '__toString')))) @@ -333,25 +333,25 @@ class CI_DB_postgre_driver extends CI_DB { return parent::escape($str); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return pg_affected_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return string - */ + + + + + + public function insert_id() { $v = $this->version(); @@ -374,7 +374,7 @@ class CI_DB_postgre_driver extends CI_DB { } else { - // seq_name passed in table parameter + $seq = $table; } @@ -390,16 +390,16 @@ class CI_DB_postgre_driver extends CI_DB { return (int) $query->ins_id; } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT "table_name" FROM "information_schema"."tables" WHERE "table_schema" = \''.$this->schema."'"; @@ -414,16 +414,16 @@ class CI_DB_postgre_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT "column_name" @@ -431,14 +431,14 @@ class CI_DB_postgre_driver extends CI_DB { WHERE LOWER("table_name") = '.$this->escape(strtolower($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT "column_name", "data_type", "character_maximum_length", "numeric_precision", "column_default" @@ -464,31 +464,31 @@ class CI_DB_postgre_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => '', 'message' => pg_last_error($this->conn_id)); } - // -------------------------------------------------------------------- - /** - * ORDER BY - * - * @param string $orderby - * @param string $direction ASC, DESC or RANDOM - * @param bool $escape - * @return object - */ + + + + + + + + + public function order_by($orderby, $direction = '', $escape = NULL) { $direction = strtoupper(trim($direction)); @@ -514,17 +514,17 @@ class CI_DB_postgre_driver extends CI_DB { return parent::order_by($orderby, $direction, $escape); } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -532,18 +532,18 @@ class CI_DB_postgre_driver extends CI_DB { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @param string $table Table name - * @param array $values Update data - * @param string $index WHERE key - * @return string - */ + + + + + + + + + + + protected function _update_batch($table, $values, $index) { $ids = array(); @@ -573,44 +573,44 @@ class CI_DB_postgre_driver extends CI_DB { return 'UPDATE '.$table.' SET '.substr($cases, 0, -2).$this->_compile_wh('qb_where'); } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { $this->qb_limit = FALSE; return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { return $sql.' LIMIT '.$this->qb_limit.($this->qb_offset ? ' OFFSET '.$this->qb_offset : ''); } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { pg_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_forge.php index 353ddac..1992165 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_forge.php @@ -1,58 +1,58 @@ 'INTEGER', 'SMALLINT' => 'INTEGER', @@ -65,21 +65,21 @@ class CI_DB_postgre_forge extends CI_DB_forge { 'FLOAT' => 'DOUBLE PRECISION' ); - /** - * NULL value representation in CREATE/ALTER TABLE statements - * - * @var string - */ + + + + + protected $_null = 'NULL'; - // -------------------------------------------------------------------- - /** - * Class constructor - * - * @param object &$db Database object - * @return void - */ + + + + + + + public function __construct(&$db) { parent::__construct($db); @@ -90,16 +90,16 @@ class CI_DB_postgre_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('DROP', 'ADD'), TRUE)) @@ -151,19 +151,19 @@ class CI_DB_postgre_forge extends CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { - // Reset field lengths for data types that don't support it + if (isset($attributes['CONSTRAINT']) && stripos($attributes['TYPE'], 'int') !== FALSE) { $attributes['CONSTRAINT'] = NULL; @@ -183,15 +183,15 @@ class CI_DB_postgre_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_result.php index b0054dd..e4b2b30 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_result.php @@ -1,60 +1,60 @@ num_rows) @@ -62,27 +62,27 @@ class CI_DB_postgre_result extends CI_DB_result { : $this->num_rows = pg_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return pg_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -94,15 +94,15 @@ class CI_DB_postgre_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -117,13 +117,13 @@ class CI_DB_postgre_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -133,47 +133,47 @@ class CI_DB_postgre_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return pg_result_seek($this->result_id, $n); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return pg_fetch_assoc($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return pg_fetch_object($this->result_id, NULL, $class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_utility.php index 450aa36..3a5c618 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/postgre/postgre_utility.php @@ -1,78 +1,78 @@ db->display_error('db_unsupported_feature'); } } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_driver.php index aec3d74..e420409 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_driver.php @@ -1,81 +1,81 @@ data_cache['version']) @@ -102,14 +102,14 @@ class CI_DB_sqlite_driver extends CI_DB { : $this->data_cache['version'] = sqlite_libversion(); } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { return $this->is_write_type($sql) @@ -117,89 +117,89 @@ class CI_DB_sqlite_driver extends CI_DB { : sqlite_query($this->conn_id, $sql); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return $this->simple_query('BEGIN TRANSACTION'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return $this->simple_query('COMMIT'); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return $this->simple_query('ROLLBACK'); } - // -------------------------------------------------------------------- - /** - * Platform-dependant string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return sqlite_escape_string($str); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return sqlite_changes($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { return sqlite_last_insert_rowid($this->conn_id); } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = "SELECT name FROM sqlite_master WHERE type='table'"; @@ -212,30 +212,30 @@ class CI_DB_sqlite_driver extends CI_DB { return $sql; } - // -------------------------------------------------------------------- - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return bool - */ + + + + + + + + + protected function _list_columns($table = '') { - // Not supported + return FALSE; } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) @@ -263,16 +263,16 @@ class CI_DB_sqlite_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occured. - * - * @return array - */ + + + + + + + + + public function error() { $error = array('code' => sqlite_last_error($this->conn_id)); @@ -280,48 +280,48 @@ class CI_DB_sqlite_driver extends CI_DB { return $error; } - // -------------------------------------------------------------------- - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + + + protected function _replace($table, $keys, $values) { return 'INSERT OR '.parent::_replace($table, $keys, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this function maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'DELETE FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { sqlite_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_forge.php index 6aa9c61..b97bc81 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_forge.php @@ -1,95 +1,95 @@ db->database) OR ! @unlink($this->db->database)) @@ -108,30 +108,30 @@ class CI_DB_sqlite_forge extends CI_DB_forge { return TRUE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @todo implement drop_column(), modify_column() - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if ($alter_type === 'DROP' OR $alter_type === 'CHANGE') { - // drop_column(): - // BEGIN TRANSACTION; - // CREATE TEMPORARY TABLE t1_backup(a,b); - // INSERT INTO t1_backup SELECT a,b FROM t1; - // DROP TABLE t1; - // CREATE TABLE t1(a,b); - // INSERT INTO t1 SELECT a,b FROM t1_backup; - // DROP TABLE t1_backup; - // COMMIT; + + + + + + + + + return FALSE; } @@ -139,14 +139,14 @@ class CI_DB_sqlite_forge extends CI_DB_forge { return parent::_alter_table($alter_type, $table, $field); } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -157,16 +157,16 @@ class CI_DB_sqlite_forge extends CI_DB_forge { .$field['default']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -179,15 +179,15 @@ class CI_DB_sqlite_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_result.php index 30c93a2..743adc1 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_result.php @@ -1,58 +1,58 @@ num_rows) @@ -60,27 +60,27 @@ class CI_DB_sqlite_result extends CI_DB_result { : $this->num_rows = @sqlite_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return @sqlite_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -92,15 +92,15 @@ class CI_DB_sqlite_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -115,47 +115,47 @@ class CI_DB_sqlite_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n - * @return bool - */ + + + + + + + + + + + public function data_seek($n = 0) { return sqlite_seek($this->result_id, $n); } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return sqlite_fetch_array($this->result_id); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return sqlite_fetch_object($this->result_id, $class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_utility.php index 2c7f809..52720c9 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite/sqlite_utility.php @@ -1,60 +1,60 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_driver.php index 5d057ba..22eee06 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_driver.php @@ -1,81 +1,81 @@ data_cache['version'])) @@ -113,15 +113,15 @@ class CI_DB_sqlite3_driver extends CI_DB { return $this->data_cache['version'] = $version['versionString']; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @todo Implement use of SQLite3::querySingle(), if needed - * @param string $sql - * @return mixed SQLite3Result object or bool - */ + + + + + + + + protected function _execute($sql) { return $this->is_write_type($sql) @@ -129,89 +129,89 @@ class CI_DB_sqlite3_driver extends CI_DB { : $this->conn_id->query($sql); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return $this->conn_id->exec('BEGIN TRANSACTION'); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return $this->conn_id->exec('END TRANSACTION'); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return $this->conn_id->exec('ROLLBACK'); } - // -------------------------------------------------------------------- - /** - * Platform-dependent string escape - * - * @param string - * @return string - */ + + + + + + + protected function _escape_str($str) { return $this->conn_id->escapeString($str); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return $this->conn_id->changes(); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * @return int - */ + + + + + + public function insert_id() { return $this->conn_id->lastInsertRowID(); } - // -------------------------------------------------------------------- - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool $prefix_limit - * @return string - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { return 'SELECT "NAME" FROM "SQLITE_MASTER" WHERE "TYPE" = \'table\'' @@ -220,14 +220,14 @@ class CI_DB_sqlite3_driver extends CI_DB { : ''); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * @param string $table Table name - * @return array - */ + + + + + + + public function list_fields($table) { if (($result = $this->query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) @@ -244,14 +244,14 @@ class CI_DB_sqlite3_driver extends CI_DB { return $fields; } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { if (($query = $this->query('PRAGMA TABLE_INFO('.$this->protect_identifiers($table, TRUE, NULL, FALSE).')')) === FALSE) @@ -279,63 +279,63 @@ class CI_DB_sqlite3_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { return array('code' => $this->conn_id->lastErrorCode(), 'message' => $this->conn_id->lastErrorMsg()); } - // -------------------------------------------------------------------- - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string - */ + + + + + + + + + + + protected function _replace($table, $keys, $values) { return 'INSERT OR '.parent::_replace($table, $keys, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'DELETE FROM '.$table; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { $this->conn_id->close(); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_forge.php index 4019a95..747075b 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_forge.php @@ -1,73 +1,73 @@ db->database)) { - // We need to close the pseudo-connection first + $this->db->close(); if ( ! @unlink($this->db->database)) { @@ -128,30 +128,30 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { return $this->db->db_debug ? $this->db->display_error('db_unable_to_drop') : FALSE; } - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @todo implement drop_column(), modify_column() - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if ($alter_type === 'DROP' OR $alter_type === 'CHANGE') { - // drop_column(): - // BEGIN TRANSACTION; - // CREATE TEMPORARY TABLE t1_backup(a,b); - // INSERT INTO t1_backup SELECT a,b FROM t1; - // DROP TABLE t1; - // CREATE TABLE t1(a,b); - // INSERT INTO t1 SELECT a,b FROM t1_backup; - // DROP TABLE t1_backup; - // COMMIT; + + + + + + + + + return FALSE; } @@ -159,14 +159,14 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { return parent::_alter_table($alter_type, $table, $field); } - // -------------------------------------------------------------------- - /** - * Process column - * - * @param array $field - * @return string - */ + + + + + + + protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) @@ -177,16 +177,16 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { .$field['default']; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) @@ -199,15 +199,15 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_result.php index d656fed..3c45a76 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_result.php @@ -1,72 +1,72 @@ result_id->numColumns(); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -78,15 +78,15 @@ class CI_DB_sqlite3_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { static $data_types = array( @@ -112,13 +112,13 @@ class CI_DB_sqlite3_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_object($this->result_id)) @@ -128,33 +128,33 @@ class CI_DB_sqlite3_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return $this->result_id->fetchArray(SQLITE3_ASSOC); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { - // No native support for fetching rows as objects + if (($row = $this->result_id->fetchArray(SQLITE3_ASSOC)) === FALSE) { return FALSE; @@ -173,21 +173,21 @@ class CI_DB_sqlite3_result extends CI_DB_result { return $class_name; } - // -------------------------------------------------------------------- - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero. - * - * @param int $n (ignored) - * @return array - */ + + + + + + + + + + + public function data_seek($n = 0) { - // Only resetting to the start of the result set is supported + return ($n > 0) ? FALSE : $this->result_id->reset(); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_utility.php index 1bdf3ae..a7f61b1 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlite3/sqlite3_utility.php @@ -1,60 +1,60 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_driver.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_driver.php index a22a8b3..3ca589d 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -1,108 +1,108 @@ scrollable === NULL) { $this->scrollable = defined('SQLSRV_CURSOR_CLIENT_BUFFERED') @@ -111,14 +111,14 @@ class CI_DB_sqlsrv_driver extends CI_DB { } } - // -------------------------------------------------------------------- - /** - * Database connection - * - * @param bool $pooling - * @return resource - */ + + + + + + + public function db_connect($pooling = FALSE) { $charset = in_array(strtolower($this->char_set), array('utf-8', 'utf8'), TRUE) @@ -134,8 +134,8 @@ class CI_DB_sqlsrv_driver extends CI_DB { 'ReturnDatesAsStrings' => 1 ); - // If the username and password are both empty, assume this is a - // 'Windows Authentication Mode' connection. + + if (empty($connection['UID']) && empty($connection['PWD'])) { unset($connection['UID'], $connection['PWD']); @@ -143,7 +143,7 @@ class CI_DB_sqlsrv_driver extends CI_DB { if (FALSE !== ($this->conn_id = sqlsrv_connect($this->hostname, $connection))) { - // Determine how identifiers are escaped + $query = $this->query('SELECT CASE WHEN (@@OPTIONS | 256) = @@OPTIONS THEN 1 ELSE 0 END AS qi'); $query = $query->row_array(); $this->_quoted_identifier = empty($query) ? FALSE : (bool) $query['qi']; @@ -153,14 +153,14 @@ class CI_DB_sqlsrv_driver extends CI_DB { return $this->conn_id; } - // -------------------------------------------------------------------- - /** - * Select the database - * - * @param string $database - * @return bool - */ + + + + + + + public function db_select($database = '') { if ($database === '') @@ -178,14 +178,14 @@ class CI_DB_sqlsrv_driver extends CI_DB { return FALSE; } - // -------------------------------------------------------------------- - /** - * Execute the query - * - * @param string $sql an SQL query - * @return resource - */ + + + + + + + protected function _execute($sql) { return ($this->scrollable === FALSE OR $this->is_write_type($sql)) @@ -193,75 +193,75 @@ class CI_DB_sqlsrv_driver extends CI_DB { : sqlsrv_query($this->conn_id, $sql, NULL, array('Scrollable' => $this->scrollable)); } - // -------------------------------------------------------------------- - /** - * Begin Transaction - * - * @return bool - */ + + + + + + protected function _trans_begin() { return sqlsrv_begin_transaction($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Commit Transaction - * - * @return bool - */ + + + + + + protected function _trans_commit() { return sqlsrv_commit($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Rollback Transaction - * - * @return bool - */ + + + + + + protected function _trans_rollback() { return sqlsrv_rollback($this->conn_id); } - // -------------------------------------------------------------------- - /** - * Affected Rows - * - * @return int - */ + + + + + + public function affected_rows() { return sqlsrv_rows_affected($this->result_id); } - // -------------------------------------------------------------------- - /** - * Insert ID - * - * Returns the last id created in the Identity column. - * - * @return string - */ + + + + + + + + public function insert_id() { return $this->query('SELECT SCOPE_IDENTITY() AS insert_id')->row()->insert_id; } - // -------------------------------------------------------------------- - /** - * Database version number - * - * @return string - */ + + + + + + public function version() { if (isset($this->data_cache['version'])) @@ -277,16 +277,16 @@ class CI_DB_sqlsrv_driver extends CI_DB { return $this->data_cache['version'] = $info['SQLServerVersion']; } - // -------------------------------------------------------------------- - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @param bool - * @return string $prefix_limit - */ + + + + + + + + + protected function _list_tables($prefix_limit = FALSE) { $sql = 'SELECT '.$this->escape_identifiers('name') @@ -302,16 +302,16 @@ class CI_DB_sqlsrv_driver extends CI_DB { return $sql.' ORDER BY '.$this->escape_identifiers('name'); } - // -------------------------------------------------------------------- - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _list_columns($table = '') { return 'SELECT COLUMN_NAME @@ -319,14 +319,14 @@ class CI_DB_sqlsrv_driver extends CI_DB { WHERE UPPER(TABLE_NAME) = '.$this->escape(strtoupper($table)); } - // -------------------------------------------------------------------- - /** - * Returns an object with field data - * - * @param string $table - * @return array - */ + + + + + + + public function field_data($table) { $sql = 'SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, COLUMN_DEFAULT @@ -352,16 +352,16 @@ class CI_DB_sqlsrv_driver extends CI_DB { return $retval; } - // -------------------------------------------------------------------- - /** - * Error - * - * Returns an array containing code and message of the last - * database error that has occurred. - * - * @return array - */ + + + + + + + + + public function error() { $error = array('code' => '00000', 'message' => ''); @@ -390,17 +390,17 @@ class CI_DB_sqlsrv_driver extends CI_DB { return $error; } - // -------------------------------------------------------------------- - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @param string $table - * @param array $values - * @return string - */ + + + + + + + + + + protected function _update($table, $values) { $this->qb_limit = FALSE; @@ -408,34 +408,34 @@ class CI_DB_sqlsrv_driver extends CI_DB { return parent::_update($table, $values); } - // -------------------------------------------------------------------- - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * - * If the database does not support the TRUNCATE statement, - * then this method maps to 'DELETE FROM table' - * - * @param string $table - * @return string - */ + + + + + + + + + + + + protected function _truncate($table) { return 'TRUNCATE TABLE '.$table; } - // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string $table - * @return string - */ + + + + + + + + + protected function _delete($table) { if ($this->qb_limit) @@ -446,22 +446,22 @@ class CI_DB_sqlsrv_driver extends CI_DB { return parent::_delete($table); } - // -------------------------------------------------------------------- - /** - * LIMIT - * - * Generates a platform-specific LIMIT clause - * - * @param string $sql SQL Query - * @return string - */ + + + + + + + + + protected function _limit($sql) { - // As of SQL Server 2012 (11.0.*) OFFSET is supported + if (version_compare($this->version(), '11', '>=')) { - // SQL Server OFFSET-FETCH can be used only with the ORDER BY clause + empty($this->qb_orderby) && $sql .= ' ORDER BY 1'; return $sql.' OFFSET '.(int) $this->qb_offset.' ROWS FETCH NEXT '.$this->qb_limit.' ROWS ONLY'; @@ -469,22 +469,22 @@ class CI_DB_sqlsrv_driver extends CI_DB { $limit = $this->qb_offset + $this->qb_limit; - // An ORDER BY clause is required for ROW_NUMBER() to work + if ($this->qb_offset && ! empty($this->qb_orderby)) { $orderby = $this->_compile_order_by(); - // We have to strip the ORDER BY clause + $sql = trim(substr($sql, 0, strrpos($sql, $orderby))); - // Get the fields to select from our subquery, so that we can avoid CI_rownum appearing in the actual results + if (count($this->qb_select) === 0 OR strpos(implode(',', $this->qb_select), '*') !== FALSE) { - $select = '*'; // Inevitable + $select = '*'; } else { - // Use only field names and their aliases, everything else is out of our scope. + $select = array(); $field_regexp = ($this->_quoted_identifier) ? '("[^\"]+")' : '(\[[^\]]+\])'; @@ -505,21 +505,21 @@ class CI_DB_sqlsrv_driver extends CI_DB { return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); } - // -------------------------------------------------------------------- - /** - * Insert batch statement - * - * Generates a platform-specific insert string from the supplied data. - * - * @param string $table Table name - * @param array $keys INSERT keys - * @param array $values INSERT values - * @return string|bool - */ + + + + + + + + + + + protected function _insert_batch($table, $keys, $values) { - // Multiple-value inserts are only supported as of SQL Server 2008 + if (version_compare($this->version(), '10', '>=')) { return parent::_insert_batch($table, $keys, $values); @@ -528,13 +528,13 @@ class CI_DB_sqlsrv_driver extends CI_DB { return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE; } - // -------------------------------------------------------------------- - /** - * Close DB Connection - * - * @return void - */ + + + + + + protected function _close() { sqlsrv_close($this->conn_id); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_forge.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_forge.php index 90c3120..ec439f1 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_forge.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_forge.php @@ -1,70 +1,70 @@ 'SMALLINT', 'SMALLINT' => 'INT', @@ -72,16 +72,16 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge { 'REAL' => 'FLOAT' ); - // -------------------------------------------------------------------- - /** - * ALTER TABLE - * - * @param string $alter_type ALTER type - * @param string $table Table name - * @param mixed $field Column definition - * @return string|string[] - */ + + + + + + + + + protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) @@ -99,16 +99,16 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge { return $sqls; } - // -------------------------------------------------------------------- - /** - * Field attribute TYPE - * - * Performs a data type mapping between different databases. - * - * @param array &$attributes - * @return void - */ + + + + + + + + + protected function _attr_type(&$attributes) { if (isset($attributes['CONSTRAINT']) && strpos($attributes['TYPE'], 'INT') !== FALSE) @@ -129,15 +129,15 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge { } } - // -------------------------------------------------------------------- - /** - * Field attribute AUTO_INCREMENT - * - * @param array &$attributes - * @param array &$field - * @return void - */ + + + + + + + + protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_result.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_result.php index e2649c6..2667521 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_result.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_result.php @@ -1,68 +1,68 @@ scrollable = $driver_object->scrollable; } - // -------------------------------------------------------------------- - /** - * Number of rows in the result set - * - * @return int - */ + + + + + + public function num_rows() { - // sqlsrv_num_rows() doesn't work with the FORWARD and DYNAMIC cursors (FALSE is the same as FORWARD) + if ( ! in_array($this->scrollable, array(FALSE, SQLSRV_CURSOR_FORWARD, SQLSRV_CURSOR_DYNAMIC), TRUE)) { return parent::num_rows(); @@ -90,27 +90,27 @@ class CI_DB_sqlsrv_result extends CI_DB_result { : $this->num_rows = sqlsrv_num_rows($this->result_id); } - // -------------------------------------------------------------------- - /** - * Number of fields in the result set - * - * @return int - */ + + + + + + public function num_fields() { return @sqlsrv_num_fields($this->result_id); } - // -------------------------------------------------------------------- - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @return array - */ + + + + + + + + public function list_fields() { $field_names = array(); @@ -122,15 +122,15 @@ class CI_DB_sqlsrv_result extends CI_DB_result { return $field_names; } - // -------------------------------------------------------------------- - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @return array - */ + + + + + + + + public function field_data() { $retval = array(); @@ -145,13 +145,13 @@ class CI_DB_sqlsrv_result extends CI_DB_result { return $retval; } - // -------------------------------------------------------------------- - /** - * Free the result - * - * @return void - */ + + + + + + public function free_result() { if (is_resource($this->result_id)) @@ -161,30 +161,30 @@ class CI_DB_sqlsrv_result extends CI_DB_result { } } - // -------------------------------------------------------------------- - /** - * Result - associative array - * - * Returns the result set as an array - * - * @return array - */ + + + + + + + + protected function _fetch_assoc() { return sqlsrv_fetch_array($this->result_id, SQLSRV_FETCH_ASSOC); } - // -------------------------------------------------------------------- - /** - * Result - object - * - * Returns the result set as an object - * - * @param string $class_name - * @return object - */ + + + + + + + + + protected function _fetch_object($class_name = 'stdClass') { return sqlsrv_fetch_object($this->result_id, $class_name); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_utility.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_utility.php index 6dd01a9..9a76bec 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_utility.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/database/drivers/sqlsrv/sqlsrv_utility.php @@ -1,76 +1,76 @@ db->display_error('db_unsupported_feature'); } diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/array_helper.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/array_helper.php index cb7eca6..e637033 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/array_helper.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/array_helper.php @@ -1,104 +1,104 @@ 256) { return FALSE; } - // We'll try using the operating system's PRNG first, - // which we can access through CI_Security::get_random_bytes() + + $security = get_instance()->security; - // To avoid numerous get_random_bytes() calls, we'll - // just try fetching as much bytes as we need at once. + + if (($bytes = $security->get_random_bytes($pool_length)) !== FALSE) { $byte_index = $word_index = 0; while ($word_index < $word_length) { - // Do we have more random data to use? - // It could be exhausted by previous iterations - // ignoring bytes higher than $rand_max. + + + if ($byte_index === $pool_length) { - // No failures should be possible if the - // first get_random_bytes() call didn't - // return FALSE, but still ... + + + for ($i = 0; $i < 5; $i++) { if (($bytes = $security->get_random_bytes($pool_length)) === FALSE) @@ -193,7 +193,7 @@ if ( ! function_exists('create_captcha')) if ($bytes === FALSE) { - // Sadly, this means fallback to mt_rand() + $word = ''; break; } @@ -223,39 +223,39 @@ if ( ! function_exists('create_captcha')) $word = (string) $word; } - // ----------------------------------- - // Determine angle and position - // ----------------------------------- + + + $length = strlen($word); $angle = ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0; $x_axis = mt_rand(6, (360/$length)-16); $y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height); - // Create image - // PHP.net recommends imagecreatetruecolor(), but it isn't always available + + $im = function_exists('imagecreatetruecolor') ? imagecreatetruecolor($img_width, $img_height) : imagecreate($img_width, $img_height); - // ----------------------------------- - // Assign colors - // ---------------------------------- + + + is_array($colors) OR $colors = $defaults['colors']; foreach (array_keys($defaults['colors']) as $key) { - // Check for a possible missing value + is_array($colors[$key]) OR $colors[$key] = $defaults['colors'][$key]; $colors[$key] = imagecolorallocate($im, $colors[$key][0], $colors[$key][1], $colors[$key][2]); } - // Create the rectangle + ImageFilledRectangle($im, 0, 0, $img_width, $img_height, $colors['background']); - // ----------------------------------- - // Create the spiral pattern - // ----------------------------------- + + + $theta = 1; $thetac = 7; $radius = 16; @@ -276,9 +276,9 @@ if ( ! function_exists('create_captcha')) $theta -= $thetac; } - // ----------------------------------- - // Write the text - // ----------------------------------- + + + $use_font = ($font_path !== '' && file_exists($font_path) && function_exists('imagettftext')); if ($use_font === FALSE) @@ -310,12 +310,12 @@ if ( ! function_exists('create_captcha')) } } - // Create the border + imagerectangle($im, 0, 0, $img_width - 1, $img_height - 1, $colors['border']); - // ----------------------------------- - // Generate the image - // ----------------------------------- + + + $img_url = rtrim($img_url, '/').'/'; if (function_exists('imagejpeg')) diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/cookie_helper.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/cookie_helper.php index b9c2cb6..2855b51 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/cookie_helper.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/cookie_helper.php @@ -1,90 +1,90 @@ input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly); } } -// -------------------------------------------------------------------- + if ( ! function_exists('get_cookie')) { - /** - * Fetch an item from the COOKIE array - * - * @param string - * @param bool - * @return mixed - */ + + + + + + + function get_cookie($index, $xss_clean = NULL) { is_bool($xss_clean) OR $xss_clean = (config_item('global_xss_filtering') === TRUE); @@ -93,19 +93,19 @@ if ( ! function_exists('get_cookie')) } } -// -------------------------------------------------------------------- + if ( ! function_exists('delete_cookie')) { - /** - * Delete a COOKIE - * - * @param mixed - * @param string the cookie domain. Usually: .yourdomain.com - * @param string the cookie path - * @param string the cookie prefix - * @return void - */ + + + + + + + + + function delete_cookie($name, $domain = '', $path = '/', $prefix = '') { set_cookie($name, '', '', $domain, $path, $prefix); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/date_helper.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/date_helper.php index 5c660e2..16ad3fb 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/date_helper.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/date_helper.php @@ -1,65 +1,65 @@ 12) @@ -312,16 +312,16 @@ if ( ! function_exists('days_in_month')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('local_to_gmt')) { - /** - * Converts a local Unix timestamp to GMT - * - * @param int Unix timestamp - * @return int - */ + + + + + + function local_to_gmt($time = '') { if ($time === '') @@ -340,22 +340,22 @@ if ( ! function_exists('local_to_gmt')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('gmt_to_local')) { - /** - * Converts GMT time to a localized value - * - * Takes a Unix timestamp (in GMT) as input, and returns - * at the local value based on the timezone and DST setting - * submitted - * - * @param int Unix timestamp - * @param string timezone - * @param bool whether DST is active - * @return int - */ + + + + + + + + + + + + function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) { if ($time === '') @@ -369,25 +369,25 @@ if ( ! function_exists('gmt_to_local')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('mysql_to_unix')) { - /** - * Converts a MySQL Timestamp to Unix - * - * @param int MySQL timestamp YYYY-MM-DD HH:MM:SS - * @return int Unix timstamp - */ + + + + + + function mysql_to_unix($time = '') { - // We'll remove certain characters for backward compatibility - // since the formatting changed with MySQL 4.1 - // YYYY-MM-DD HH:MM:SS + + + $time = str_replace(array('-', ':', ' '), '', $time); - // YYYYMMDDHHMMSS + return mktime( substr($time, 8, 2), substr($time, 10, 2), @@ -399,20 +399,20 @@ if ( ! function_exists('mysql_to_unix')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('unix_to_human')) { - /** - * Unix to "Human" - * - * Formats Unix timestamp to the following prototype: 2006-08-21 11:35 PM - * - * @param int Unix timestamp - * @param bool whether to show seconds - * @param string format: us or euro - * @return string - */ + + + + + + + + + + function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') { $r = date('Y', $time).'-'.date('m', $time).'-'.date('d', $time).' '; @@ -440,18 +440,18 @@ if ( ! function_exists('unix_to_human')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('human_to_unix')) { - /** - * Convert "human" date to GMT - * - * Reverses the above process - * - * @param string format: us or euro - * @return int - */ + + + + + + + + function human_to_unix($datestr = '') { if ($datestr === '') @@ -488,19 +488,19 @@ if ( ! function_exists('human_to_unix')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('nice_date')) { - /** - * Turns many "reasonably-date-like" strings into something - * that is actually useful. This only works for dates after unix epoch. - * - * @deprecated 3.1.3 Use DateTime::createFromFormat($input_format, $input)->format($output_format); - * @param string The terribly formatted date-like string - * @param string Date format to return (same as php date function) - * @return string - */ + + + + + + + + + function nice_date($bad_date = '', $format = FALSE) { if (empty($bad_date)) @@ -512,7 +512,7 @@ if ( ! function_exists('nice_date')) $format = 'U'; } - // Date like: YYYYMM + if (preg_match('/^\d{6}$/i', $bad_date)) { if (in_array(substr($bad_date, 0, 2), array('19', '20'))) @@ -529,46 +529,46 @@ if ( ! function_exists('nice_date')) return date($format, strtotime($year.'-'.$month.'-01')); } - // Date Like: YYYYMMDD + if (preg_match('/^\d{8}$/i', $bad_date, $matches)) { return DateTime::createFromFormat('Ymd', $bad_date)->format($format); } - // Date Like: MM-DD-YYYY __or__ M-D-YYYY (or anything in between) + if (preg_match('/^(\d{1,2})-(\d{1,2})-(\d{4})$/i', $bad_date, $matches)) { return date($format, strtotime($matches[3].'-'.$matches[1].'-'.$matches[2])); } - // Any other kind of string, when converted into UNIX time, - // produces "0 seconds after epoc..." is probably bad... - // return "Invalid Date". + + + if (date('U', strtotime($bad_date)) === '0') { return 'Invalid Date'; } - // It's probably a valid-ish date format already + return date($format, strtotime($bad_date)); } } -// ------------------------------------------------------------------------ + if ( ! function_exists('timezone_menu')) { - /** - * Timezone Menu - * - * Generates a drop-down menu of timezones. - * - * @param string timezone - * @param string classname - * @param string menu name - * @param mixed attributes - * @return string - */ + + + + + + + + + + + function timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') { $CI =& get_instance(); @@ -595,23 +595,23 @@ if ( ! function_exists('timezone_menu')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('timezones')) { - /** - * Timezones - * - * Returns an array of timezones. This is a helper function - * for various other ones in this library - * - * @param string timezone - * @return string - */ + + + + + + + + + function timezones($tz = '') { - // Note: Don't change the order of these even though - // some items appear to be in the wrong order + + $zones = array( 'UM12' => -12, @@ -665,25 +665,25 @@ if ( ! function_exists('timezones')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('date_range')) { - /** - * Date range - * - * Returns a list of dates within a specified period. - * - * @param int unix_start UNIX timestamp of period start date - * @param int unix_end|days UNIX timestamp of period end date - * or interval in days. - * @param mixed is_unix Specifies whether the second parameter - * is a UNIX timestamp or a day interval - * - TRUE or 'unix' for a timestamp - * - FALSE or 'days' for an interval - * @param string date_format Output date format, same as in date() - * @return array - */ + + + + + + + + + + + + + + + function date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') { if ($unix_start == '' OR $mixed == '' OR $format == '') @@ -693,7 +693,7 @@ if ( ! function_exists('date_range')) $is_unix = ! ( ! $is_unix OR $is_unix === 'days'); - // Validate input and try strtotime() on invalid timestamps/intervals, just in case + if ( ( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_start)) === FALSE) OR ( ! ctype_digit((string) $mixed) && ($is_unix === FALSE OR ($mixed = @strtotime($mixed)) === FALSE)) OR ($is_unix === TRUE && $mixed < $unix_start)) @@ -727,11 +727,11 @@ if ( ! function_exists('date_range')) $range[] = $date->format($format); } - /* If a period end date was passed to the DatePeriod constructor, it might not - * be in our results. Not sure if this is a bug or it's just possible because - * the end date might actually be less than 24 hours away from the previously - * generated DateTime object, but either way - we have to append it manually. - */ + + + + + if ( ! is_int($arg) && $range[count($range) - 1] !== $arg->format($format)) { $range[] = $arg->format($format); diff --git a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/directory_helper.php b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/directory_helper.php index 73777bf..d03eafb 100644 --- a/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/directory_helper.php +++ b/server/original/www/ezwebserver/src/vendor/codeigniter/framework/system/helpers/directory_helper.php @@ -1,69 +1,69 @@ config->site_url($CI->uri->uri_string()); } - // If an action is not a full URL then turn it into one + elseif (strpos($action, '://') === FALSE) { $action = $CI->config->site_url($action); @@ -98,11 +98,11 @@ if ( ! function_exists('form_open')) } } - // Add CSRF field if enabled, but leave it out for GET requests and requests to external websites + if ($CI->config->item('csrf_protection') === TRUE && strpos($action, $CI->config->base_url()) !== FALSE && ! stripos($form, 'method="get"')) { - // Prepend/append random-length "white noise" around the CSRF - // token input, as a form of protection against BREACH attacks + + if (FALSE !== ($noise = $CI->security->get_random_bytes(1))) { list(, $noise) = unpack('c', $noise); @@ -112,7 +112,7 @@ if ( ! function_exists('form_open')) $noise = mt_rand(-128, 127); } - // Prepend if $noise has a negative value, append if positive, do nothing for zero + $prepend = $append = ''; if ($noise < 0) { @@ -137,20 +137,20 @@ if ( ! function_exists('form_open')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_open_multipart')) { - /** - * Form Declaration - Multipart type - * - * Creates the opening portion of the form, but with "multipart/form-data". - * - * @param string the URI segments of the form destination - * @param array a key/value pair of attributes - * @param array a key/value pair hidden data - * @return string - */ + + + + + + + + + + function form_open_multipart($action = '', $attributes = array(), $hidden = array()) { if (is_string($attributes)) @@ -166,21 +166,21 @@ if ( ! function_exists('form_open_multipart')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_hidden')) { - /** - * Hidden Input Field - * - * Generates hidden fields. You can pass a simple key/value string or - * an associative array with multiple values. - * - * @param mixed $name Field name - * @param string $value Field value - * @param bool $recursing - * @return string - */ + + + + + + + + + + + function form_hidden($name, $value = '', $recursing = FALSE) { static $form; @@ -217,18 +217,18 @@ if ( ! function_exists('form_hidden')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_input')) { - /** - * Text Input Field - * - * @param mixed - * @param string - * @param mixed - * @return string - */ + + + + + + + + function form_input($data = '', $value = '', $extra = '') { $defaults = array( @@ -241,20 +241,20 @@ if ( ! function_exists('form_input')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_password')) { - /** - * Password Field - * - * Identical to the input function but adds the "password" type - * - * @param mixed - * @param string - * @param mixed - * @return string - */ + + + + + + + + + + function form_password($data = '', $value = '', $extra = '') { is_array($data) OR $data = array('name' => $data); @@ -263,20 +263,20 @@ if ( ! function_exists('form_password')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_upload')) { - /** - * Upload Field - * - * Identical to the input function but adds the "file" type - * - * @param mixed - * @param string - * @param mixed - * @return string - */ + + + + + + + + + + function form_upload($data = '', $value = '', $extra = '') { $defaults = array('type' => 'file', 'name' => ''); @@ -287,18 +287,18 @@ if ( ! function_exists('form_upload')) } } -// ------------------------------------------------------------------------ + if ( ! function_exists('form_textarea')) { - /** - * Textarea field - * - * @param mixed $data - * @param string $value - * @param mixed $extra - * @return string - */ + + + + + + + + function form_textarea($data = '', $value = '', $extra = '') { $defaults = array( @@ -314,7 +314,7 @@ if ( ! function_exists('form_textarea')) else { $val = $data['value']; - unset($data['value']); // textareas don't use the value attribute + unset($data['value']); } return '