diff --git a/sai/modules/saistart_sys_sai/content.tpl b/sai/modules/saistart_sys_sai/content.tpl
new file mode 100644
index 0000000..6d95414
--- /dev/null
+++ b/sai/modules/saistart_sys_sai/content.tpl
@@ -0,0 +1,16 @@
+Welcome to the SYSTEM Admin Interface - short SAI.
+From here you can control and manage your Website.
+
+
+
+
+

+
+
System Log
+
Showing Statistics
+
+
+
+
‹
+
›
+
\ No newline at end of file
diff --git a/sai/modules/saistart_sys_sai/img/saimod_log_stats.png b/sai/modules/saistart_sys_sai/img/saimod_log_stats.png
new file mode 100644
index 0000000..ef84e7c
Binary files /dev/null and b/sai/modules/saistart_sys_sai/img/saimod_log_stats.png differ
diff --git a/sai/modules/saistart_sys_sai/login.tpl b/sai/modules/saistart_sys_sai/login.tpl
new file mode 100644
index 0000000..3de313b
--- /dev/null
+++ b/sai/modules/saistart_sys_sai/login.tpl
@@ -0,0 +1,30 @@
+Login
+
\ No newline at end of file
diff --git a/sai/modules/saistart_sys_sai/logout.tpl b/sai/modules/saistart_sys_sai/logout.tpl
new file mode 100644
index 0000000..b0f828b
--- /dev/null
+++ b/sai/modules/saistart_sys_sai/logout.tpl
@@ -0,0 +1,8 @@
+Logout
+
\ No newline at end of file
diff --git a/sai/modules/saistart_sys_sai/saistart.tpl b/sai/modules/saistart_sys_sai/saistart.tpl
new file mode 100644
index 0000000..f82863b
--- /dev/null
+++ b/sai/modules/saistart_sys_sai/saistart.tpl
@@ -0,0 +1,7 @@
+
+${content}
+${login}
+
\ No newline at end of file
diff --git a/sai/modules/saistart_sys_sai/saistart_sys_sai.js b/sai/modules/saistart_sys_sai/saistart_sys_sai.js
new file mode 100644
index 0000000..872f0a2
--- /dev/null
+++ b/sai/modules/saistart_sys_sai/saistart_sys_sai.js
@@ -0,0 +1,35 @@
+function init__SYSTEM_SAI_saistart_sys_sai() {
+ //jqBootstrapValidation
+ $("#login_form input").not("[type=submit]").jqBootstrapValidation({
+ preventSubmit: true,
+ submitError: function($form, event, errors) {},
+ submitSuccess: function($form, event){
+ $.get(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_login&action=login&username='+$('#bt_login_user').val()+'&password_sha='+$.sha1($('#bt_login_password').val())+'&password_md5='+$.md5($('#bt_login_password').val()), function (data) {
+ if(data == 1){
+ $('.help-block').html("Login successfull.");
+ location.reload(true);
+ } else {
+ $('.help-block').html("Login not successfull. User & Password combination wrong.")
+ }
+ });
+ event.preventDefault();
+ }
+ });
+
+ $("#logout_form input").not("[type=submit]").jqBootstrapValidation({
+ preventSubmit: true,
+ submitError: function($form, event, errors) {},
+ submitSuccess: function($form, event){
+ $.get(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_login&action=logout', function (data) {
+ if(data == 1){
+ $('.help-block').html("Logout successfull.");
+ location.reload(true);
+ } else {
+ $('.help-block').html("Logout not successfull.")
+ }
+ });
+ event.preventDefault();
+ }
+ });
+
+};
\ No newline at end of file
diff --git a/sai/modules/saistart_sys_sai/saistart_sys_sai.php b/sai/modules/saistart_sys_sai/saistart_sys_sai.php
index a893cf6..0459ba7 100644
--- a/sai/modules/saistart_sys_sai/saistart_sys_sai.php
+++ b/sai/modules/saistart_sys_sai/saistart_sys_sai.php
@@ -2,11 +2,25 @@
namespace SYSTEM\SAI;
class saistart_sys_sai extends \SYSTEM\SAI\SaiModule {
- public static function sai_mod__SYSTEM_SAI_saistart_sys_sai(){return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/carousel.tpl'), array());}
+ public static function sai_mod__SYSTEM_SAI_saistart_sys_sai(){
+ return \SYSTEM\PAGE\replace::replaceFile( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/saistart.tpl'),
+ array('content' => self::html_content(), 'login' => self::html_login()));}
public static function html_li_menu(){return ''.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE).'';}
public static function right_public(){return true;}
public static function right_right(){return true;}
public static function sai_mod__SYSTEM_SAI_saistart_sys_sai_flag_css(){}
- public static function sai_mod__SYSTEM_SAI_saistart_sys_sai_flag_js(){}
+ public static function sai_mod__SYSTEM_SAI_saistart_sys_sai_flag_js(){
+ return \SYSTEM\LOG\JsonResult::toString(
+ array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/jqBootstrapValidation.js'),
+ \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/saistart_sys_sai.js'),
+ \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.md5.js'),
+ \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.sha1.js')
+ ));}
+
+ protected static function html_content(){
+ return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/content.tpl'), array());}
+
+ protected static function html_login(){
+ return \SYSTEM\SECURITY\Security::isLoggedIn() ? \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/logout.tpl'), array()) : \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/login.tpl'), array());}
}
\ No newline at end of file