diff --git a/api/api.php b/api/api.php index c68b393..371b492 100644 --- a/api/api.php +++ b/api/api.php @@ -63,17 +63,16 @@ class api { $result = \SYSTEM\DBD\SYS_API_TREE::QA(array($group)); if(!isset($result) || !is_array($result) || count($result) <= 0){ throw new \SYSTEM\LOG\ERROR("Database Tree for Api empty - cannot proced! GROUP: ".$group);} - return $result; } private static function do_statics($params,$tree,$apiclassname,$verifyclassname,$default){ $statics = array(); $parentid = self::ROOT_PARENTID; - foreach($tree as $item){ + foreach($tree as $item){ if( intval($item[\SYSTEM\DBD\system_api::FIELD_TYPE]) == \SYSTEM\DBD\system_api::VALUE_TYPE_STATIC && intval($item[\SYSTEM\DBD\system_api::FIELD_PARENTID]) == $parentid && - isset($params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]])){ + isset($params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]])){ $statics[] = array($item,$params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]]); $call_funcname = 'static_'.$item[\SYSTEM\DBD\system_api::FIELD_NAME]; diff --git a/dbd/sql/mysql/data/basic_locale_string.sql b/dbd/sql/mysql/data/basic_locale_string.sql new file mode 100644 index 0000000..65301a9 --- /dev/null +++ b/dbd/sql/mysql/data/basic_locale_string.sql @@ -0,0 +1,22 @@ +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_logout', 1, 'Logout', 'Ausloggen'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_login', 1, 'Login', 'Einloggen'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_register', 1, 'Register', 'Registrieren'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_username', 1, 'Username', 'Username'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_password', 1, 'Password', 'Passwort'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_email', 1, 'EMail', 'E-Mail2'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_last_active', 1, 'Last active', 'Zuletzt aktiv'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_join_date', 1, 'Joindate', 'Beitrittsdatum'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_locale', 1, 'Locale', 'Sprache'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_admin_rights', 1, 'Admin Rights', 'Admin Rechte'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_cancel', 1, 'Cancel', 'Abbrechen'); + +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_logout', 1, 'Logout before you leave!', 'Loggen Sie sie sich aus bevor Sie gehen!'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_login', 1, 'Login to your Website.', 'Loggen Sie sich in ihre Website ein.'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_register', 1, 'Register an Account', 'Register an Account'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_password_miss', 1, 'Can\'t really remember your Password?', 'Can\'t really remember your Password?'); + +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_username', 1, 'peter / peter@world.org', 'peter / peter@world.org'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_password', 1, 'my secret123', 'geheim567'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_email', 1, 'peter@world.org', 'peter@world.org'); + +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_state_login', 1, 'You are logged in.', 'You are logged in.'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/sai_api.sql b/dbd/sql/mysql/data/sai_api.sql index 9889284..305ba65 100644 --- a/dbd/sql/mysql/data/sai_api.sql +++ b/dbd/sql/mysql/data/sai_api.sql @@ -23,6 +23,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (35, 42, 2, 3, 'add', 'id', 'ALL'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (36, 42, 2, 3, 'add', 'category', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (37, 42, 2, 3, 'load', 'id', 'LANG'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (38, 42, 2, 3, 'load', 'group', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (39, 42, 2, 3, 'singleload', 'id', 'ALL'); + INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (40, 42, 2, 3, 'upload', 'cat', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 42, 2, 3, 'del', 'cat', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (42, 42, 2, 3, 'del', 'id', 'STRING'); diff --git a/dbd/sql/mysql/data/sai_error_locale_string.sql b/dbd/sql/mysql/data/sai_error_locale_string.sql new file mode 100644 index 0000000..b432da8 --- /dev/null +++ b/dbd/sql/mysql/data/sai_error_locale_string.sql @@ -0,0 +1,8 @@ +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_short', 43, 'Username is too short', 'Nutzername ist zu kurz'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_long', 43, 'Username is too long', 'Nutzername ist zu lang'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_miss', 43, 'Username required', 'Nutzername erfoderlich'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_miss', 43, 'Password required', 'Passwort erforderlich'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_long', 43, 'Password too long', 'Passwort zu lang'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_short', 43, 'Password too short', 'Passwort zu kurz'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_match', 43, 'Passwords do not match!', 'Passwords do not match!'); +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_email_wrong', 43, 'Invalid EMail!', 'Invalid EMail!'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/sai_locale_string.sql b/dbd/sql/mysql/data/sai_locale_string.sql new file mode 100644 index 0000000..1a85b5e --- /dev/null +++ b/dbd/sql/mysql/data/sai_locale_string.sql @@ -0,0 +1 @@ +INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_mod_login_text', 42, 'Please login for developer access (if you are a developer).', 'Please login for developer access (if you are a developer).'); \ No newline at end of file diff --git a/dbd/tbl/system_locale_string.php b/dbd/tbl/system_locale_string.php index ff09565..274b506 100644 --- a/dbd/tbl/system_locale_string.php +++ b/dbd/tbl/system_locale_string.php @@ -11,8 +11,7 @@ class system_locale_string { const FIELD_EN_US = 'enUS'; const FIELD_DE_DE = 'deDE'; - const VALUE_CATEGORY_TEST1 = 1; - const VALUE_CATEGORY_TEST2 = 2; + const VALUE_CATEGORY_BASIC = 1; const VALUE_CATEGORY_SYSTEM = 10; const VALUE_CATEGORY_SYSTEM_ERROR = 11; diff --git a/sai/modules/saimod_sys_login/login.tpl b/sai/modules/saimod_sys_login/login.tpl index 8c4f06a..1393ff5 100644 --- a/sai/modules/saimod_sys_login/login.tpl +++ b/sai/modules/saimod_sys_login/login.tpl @@ -1,6 +1,6 @@
-

Login / Register

-

Please login for developer access (if you are a developer).

+

${basic_login} / ${basic_register}

+

${sai_mod_login_text}

@@ -9,27 +9,25 @@ size="30" style="margin-bottom: 15px;" id="bt_login_user" - placeholder="${sai_mod_login_username}" - minlength="3" data-validation-minlength-message="${sai_error_mod_login_username_too_short}" - maxlength="16" data-validation-maxlength-message="${sai_error_mod_login_username_too_long}" - required data-validation-required-message="${sai_error_mod_login_username_required}"/> + placeholder="${basic_placeholder_username}" + minlength="3" data-validation-minlength-message="${sai_error_username_short}" + maxlength="16" data-validation-maxlength-message="${sai_error_username_long}" + required data-validation-required-message="${sai_error_username_miss}"/>
+ placeholder="${basic_placeholder_password}" + minlength="5" data-validation-minlength-message="${sai_error_password_short}" + maxlength="16" data-validation-maxlength-message="${sai_error_password_long}" + required data-validation-required-message="${sai_error_password_miss}"/>
- +
-Register an Account
-Can't really remember your Password? \ No newline at end of file +${basic_text_register}
+${basic_text_password_miss} \ No newline at end of file diff --git a/sai/modules/saimod_sys_login/logout.tpl b/sai/modules/saimod_sys_login/logout.tpl index 4c7ad22..2529c8d 100644 --- a/sai/modules/saimod_sys_login/logout.tpl +++ b/sai/modules/saimod_sys_login/logout.tpl @@ -1,16 +1,16 @@
-

Logout

-

You are logged in.

+

${basic_logout}

+

${basic_state_login}

- - + + - + - + - + - + - + - + @@ -96,7 +96,7 @@
- +
diff --git a/sai/modules/saimod_sys_login/register.tpl b/sai/modules/saimod_sys_login/register.tpl index 6807cd9..1b6240d 100644 --- a/sai/modules/saimod_sys_login/register.tpl +++ b/sai/modules/saimod_sys_login/register.tpl @@ -1,4 +1,4 @@ -

${register}

+

${basic_register}



@@ -6,16 +6,16 @@
${sai_mod_login_username}${basic_username}
${sai_mod_login_email}${basic_email}
${sai_mod_login_password}${basic_password} ****
@@ -47,8 +47,8 @@ style="margin-bottom: 15px; float: left;" id="user_new_password1" name="user_new_password1" - placeholder="${ua_new_password_first}" - minlength="5" data-validation-minlength-message="${login_password_too_short}"/> + placeholder="${basic_placeholder_password}" + minlength="5" data-validation-minlength-message="${sai_error_password_short}"/>
@@ -57,24 +57,24 @@ style="margin-bottom: 15px; float: left;" id="user_new_password2" name="user_new_password2" - placeholder="${ua_new_password_second}" + placeholder="${basic_placeholder_password}" data-validation-matches-match="user_new_password1" - data-validation-matches-message="${register_password_dont_math}"/> + data-validation-matches-message="${sai_error_password_match}"/>
${sai_mod_login_last_active}${basic_last_active}
${sai_mod_login_join_date}${basic_join_date}
${sai_mod_login_locale}${basic_locale}
${sai_mod_login_admin_rights}${basic_admin_rights} ${isadmin}
- + - + - +
${loginUsername}${basic_username}
+ placeholder="${basic_placeholder_username}" + minlength="3" data-validation-minlength-message="${sai_error_username_short}" + required data-validation-required-message="${sai_error_username_miss}"/>
@@ -29,16 +29,16 @@ size="30" style="margin-bottom: 15px; float: left;" id="register_email" - placeholder="${enter_email}" - data-validation-email-message="${check_mail_format}" - required data-validation-required-message="${email_required}"/> + placeholder="${basic_placeholder_email}" + data-validation-email-message="${sai_error_email_wrong}" + required data-validation-required-message="${sai_error_email_miss}"/>
${loginPassword}${basic_password}
@@ -47,9 +47,9 @@ style="margin-bottom: 15px; float: left;" id="user_register_password1" name="user_register_password1" - placeholder="${enter_password}" - minlength="5" data-validation-minlength-message="${login_password_too_short}" - required data-validation-required-message="${login_password_required}"/> + placeholder="${basic_placeholder_password}" + minlength="5" data-validation-minlength-message="${sai_error_password_short}" + required data-validation-required-message="${sai_error_password_miss}"/>
@@ -59,9 +59,9 @@ style="margin-bottom: 15px; float: left;" id="user_register_password2" name="user_register_password2" - placeholder="${retype_password}" + placeholder="${basic_placeholder_password}" data-validation-matches-match="user_register_password1" - data-validation-matches-message="${register_password_dont_math}"/> + data-validation-matches-message="${sai_error_password_match}"/>
@@ -69,7 +69,7 @@
${locale}${basic_locale}
- - + +
\ No newline at end of file diff --git a/sai/modules/saimod_sys_login/saimod_sys_login.php b/sai/modules/saimod_sys_login/saimod_sys_login.php index 514febf..0d0cdaa 100644 --- a/sai/modules/saimod_sys_login/saimod_sys_login.php +++ b/sai/modules/saimod_sys_login/saimod_sys_login.php @@ -12,8 +12,9 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { $vars['login_username_too_short'] = 'Username to short.'; $vars['login_password_too_short'] = 'Password to short.'; $vars['isadmin'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) ? "yes" : "no"; - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI)); - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI), + \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR), + \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_BASIC)); if(\SYSTEM\SECURITY\Security::isLoggedIn()){ return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/logout.tpl'), $vars); @@ -39,8 +40,10 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { } public static function sai_mod__SYSTEM_SAI_saimod_sys_login_action_registerform(){ - $vars = \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI); - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); + $vars = \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI), + \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR), + \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_BASIC)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/register.tpl'), $vars);} public static function html_li_menu(){return '