diff --git a/.gitmodules b/.gitmodules index 76eac3b..e29da0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,9 @@ [submodule "lib/tinymce"] path = lib/tinymce url = git@mojotrollz.eu:webcraft/lib_tinymce.git +[submodule "lib/bootstrap_growl"] + path = lib/bootstrap_growl + url = git@mojotrollz.eu:webcraft/lib_bootstrap-growl.git [submodule "lib/textillate"] path = lib/textillate url = git@mojotrollz.eu:webcraft/lib_textillate.git diff --git a/api/api_system.php b/api/api_system.php index 832ca95..64fd869 100644 --- a/api/api_system.php +++ b/api/api_system.php @@ -19,4 +19,7 @@ class api_system extends api_login{ \SYSTEM\locale::set($lang);} public static function static__result($result){ \SYSTEM\CONFIG\config::set(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, $result);} + + public static function call_bug($message,$data){ + return \SYSTEM\SAI\saimod_sys_todo::report($message,$data);} } \ No newline at end of file diff --git a/db/result/ResultMysqliPrepare.php b/db/result/ResultMysqliPrepare.php index 7d5dcd4..9ee20f6 100644 --- a/db/result/ResultMysqliPrepare.php +++ b/db/result/ResultMysqliPrepare.php @@ -27,6 +27,7 @@ class ResultMysqliPrepare extends \SYSTEM\DB\Result{ \mysqli_free_result($this->meta); call_user_func_array(array($this->res, 'bind_result'), $this->binds); //you need 2 append the parameters - thats the right way to do that. + $this->res->store_result(); } public function __destruct() { diff --git a/dbd/qq/SYS_LOG_MONTH.php b/dbd/qq/SYS_LOG_MONTH.php index 19ddf45..8501a9a 100644 --- a/dbd/qq/SYS_LOG_MONTH.php +++ b/dbd/qq/SYS_LOG_MONTH.php @@ -5,7 +5,7 @@ class SYS_LOG_MONTH extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'SELECT extract(epoch from time) as time_pg,* FROM '.\SYSTEM\DBD\system_log::NAME_PG.' WHERE EXTRACT(MONTH FROM time)::INTEGER = $1 AND EXTRACT(YEAR FROM time)::INTEGER = $2 LIMIT 10000;',//ORDER BY time ASC +'todo', //mys -'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ? ORDER BY time ASC LIMIT 10000;' +'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ? ORDER BY time DESC LIMIT 10000;' );}} \ No newline at end of file diff --git a/dbd/qq/SYS_LOG_MONTH_DEL.php b/dbd/qq/SYS_LOG_MONTH_DEL.php deleted file mode 100644 index ce1a642..0000000 --- a/dbd/qq/SYS_LOG_MONTH_DEL.php +++ /dev/null @@ -1,11 +0,0 @@ -${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'enUS', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'trTR', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'frFR', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'esES', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_copyright', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_copyright', 'sai_default'); @@ -614,6 +703,8 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'deDE', 'API', 1, 1, '2015-04-19 20:48:44', '2015-04-19 20:48:44'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'enUS', 'API', 2, 2, '2015-04-17 19:17:28', '2015-04-17 19:17:28'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'frFR', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'trTR', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'esES', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'jaJA', 'エーピーアイ', 1, 1, '2015-04-19 21:02:19', '2015-04-19 21:02:19'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_api', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_api', 'sai_default'); @@ -623,6 +714,8 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'deDE', 'Cache', 2, 2, '2015-04-17 19:18:07', '2015-04-17 19:18:07'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'enUS', 'Cache', 2, 2, '2015-04-17 19:18:07', '2015-04-17 19:18:07'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'frFR', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'esES', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'trTR', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'jaJA', 'キャッシュ', 1, 1, '2015-04-19 21:13:51', '2015-04-19 21:13:51'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cache', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cache', 'sai_default'); @@ -638,8 +731,11 @@ DELETE FROM `system_text` WHERE id = 'sai_menu_cron'; DELETE FROM `system_text_tag` WHERE id = 'sai_menu_cron'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'deDE', 'Timer', 1, 1, '2015-04-19 21:17:24', '2015-04-19 21:17:24'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'deDE', 'Cron', 1, 1, '2015-04-19 21:17:24', '2015-04-19 21:17:24'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'enUS', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'esES', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'trTR', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'frFR', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'jaJA', 'スケジューラ', 1, 1, '2015-04-19 21:17:04', '2015-04-19 21:17:04'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cron', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cron', 'sai_default'); @@ -649,6 +745,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'deDE', 'Docu', 2, 2, '2015-04-17 19:18:38', '2015-04-17 19:18:38'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'enUS', 'Docu', 2, 2, '2015-04-17 19:18:38', '2015-04-17 19:18:38'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'frFR', 'Docu', 3, 3, '2015-04-20 19:11:20', '2015-04-20 19:11:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'esES', 'Docu', 3, 3, '2015-04-20 19:11:20', '2015-04-20 19:11:20'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'jaJA', 'ドキュメンテーション', 1, 1, '2015-04-19 21:00:25', '2015-04-19 21:00:25'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_docu', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_docu', 'sai_default'); @@ -666,6 +763,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_menu_git'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'deDE', 'Git', 2, 2, '2015-05-19 00:44:29', '2015-05-19 00:44:29'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'enUS', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'frFR', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'trTR', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'esES', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_git', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_git', 'sai_default'); @@ -744,14 +844,18 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_menu_todo'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'deDE', 'To-do', 1, 2, '2015-04-20 01:39:54', '2015-04-20 01:39:54'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'enUS', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'frFR', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'trTR', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'esES', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'jaJA', 'ToDoリスト', 1, 1, '2015-04-19 21:05:14', '2015-04-19 21:05:14'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_todo', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_todo', 'sai_default'); DELETE FROM `system_text` WHERE id = 'sai_mod_login_text'; DELETE FROM `system_text_tag` WHERE id = 'sai_mod_login_text'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'deDE', 'Please login for developer access (if you are a developer).', 0, 2, '2015-04-17 20:34:48', '2015-04-17 20:34:48'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'deDE', 'Für Entwicklerzugriff bitte einloggen (falls Sie Entwickler sind).', 0, 2, '2015-04-17 20:34:48', '2015-04-17 20:34:48'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'enUS', 'Please login for developer access (if you are a developer).', 0, 0, '2015-04-16 20:27:32', '0000-00-00 00:00:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'frFR', 'Connectez pour accès de développeur (si vous êtes un développeur).', 0, 0, '2015-04-16 20:27:32', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_mod_login_text', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_mod_login_text', 'sai_login'); @@ -816,6 +920,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_todo_title'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'deDE', 'System To-do', 2, 2, '2015-04-23 01:53:37', '2015-04-23 01:53:37'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'enUS', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'frFR', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'esES', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'trTR', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai_todo'); @@ -895,6 +1002,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_log'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_text'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'table'); DELETE FROM `system_text` WHERE id = 'table_ip'; @@ -1080,6 +1188,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_username', 'enUS', 'Username', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_start'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'table'); DELETE FROM `system_text` WHERE id = 'table_open'; @@ -1148,6 +1257,48 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_interface', 'enUS', 'Interface', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_interface', 'sai_mod'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_interface', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_priority'; + DELETE FROM `system_text_tag` WHERE id = 'table_priority'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_priority', 'deDE', 'Priorität', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_priority', 'enUS', 'Priority', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_email'; + DELETE FROM `system_text_tag` WHERE id = 'table_email'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email', 'deDE', 'E-Mail', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email', 'enUS', 'EMail', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_join_date'; + DELETE FROM `system_text_tag` WHERE id = 'table_join_date'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_join_date', 'deDE', 'Beitrittsdatum', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_join_date', 'enUS', 'Join Date', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_join_date', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_join_date', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_language'; + DELETE FROM `system_text_tag` WHERE id = 'table_language'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_language', 'deDE', 'Sprache', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_language', 'enUS', 'Language', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_language', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_language', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_last_active'; + DELETE FROM `system_text_tag` WHERE id = 'table_last_active'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_last_active', 'deDE', 'Zuletzt aktiv', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_last_active', 'enUS', 'Last active', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_last_active', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_last_active', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_reset_password'; + DELETE FROM `system_text_tag` WHERE id = 'table_reset_password'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_reset_password', 'deDE', 'Passwort zurücksetzen', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_reset_password', 'enUS', 'Reset Password', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'table'); -- Time diff --git a/dbd/tbl/system_todo.php b/dbd/tbl/system_todo.php index 5b24c8a..839cccf 100644 --- a/dbd/tbl/system_todo.php +++ b/dbd/tbl/system_todo.php @@ -29,6 +29,7 @@ class system_todo { const FIELD_TYPE = 'type'; const FIELD_TYPE_EXCEPTION = 0; const FIELD_TYPE_USER = 1; + const FIELD_TYPE_REPORT = 2; const FIELD_STATE = 'state'; const FIELD_STATE_OPEN = 0; const FIELD_STATE_CLOSED = 1; diff --git a/lib/autoload.inc b/lib/autoload.inc index 4c4865a..d3f46f9 100644 --- a/lib/autoload.inc +++ b/lib/autoload.inc @@ -8,4 +8,5 @@ require_once dirname(__FILE__).'/bootstrap/autoload.inc'; require_once dirname(__FILE__).'/tinymce/autoload.inc'; require_once dirname(__FILE__).'/textillate/autoload.inc'; require_once dirname(__FILE__).'/animate/autoload.inc'; -require_once dirname(__FILE__).'/lettering/autoload.inc'; \ No newline at end of file +require_once dirname(__FILE__).'/lettering/autoload.inc'; +require_once dirname(__FILE__).'/bootstrap_growl/autoload.inc'; \ No newline at end of file diff --git a/lib/bootstrap_growl b/lib/bootstrap_growl new file mode 160000 index 0000000..5940b96 --- /dev/null +++ b/lib/bootstrap_growl @@ -0,0 +1 @@ +Subproject commit 5940b96a932d940580ccf0d3ba46b4c381f90c08 diff --git a/lib/tablesorter b/lib/tablesorter index 4765518..54f8142 160000 --- a/lib/tablesorter +++ b/lib/tablesorter @@ -1 +1 @@ -Subproject commit 4765518860d3f7f25617bc73db12ed56a7f1fdae +Subproject commit 54f81421b3002be930ab53e560cb658e5c11bcfa diff --git a/lib/textillate b/lib/textillate index 327bd4b..45ded03 160000 --- a/lib/textillate +++ b/lib/textillate @@ -1 +1 @@ -Subproject commit 327bd4bfbc61979b98b01f7a1eaa9910dea01f77 +Subproject commit 45ded03fc9c45bb3e9fce61dd700a2acabc0b9db diff --git a/lib/tinymce b/lib/tinymce index e8b11f1..852cb11 160000 --- a/lib/tinymce +++ b/lib/tinymce @@ -1 +1 @@ -Subproject commit e8b11f1d77cc3aa4187162dae17ca95211c2e567 +Subproject commit 852cb110810fc18804be991f7bfe39a71d3b2091 diff --git a/sai/modules/saimod_sys_log/js/saimod_sys_log.js b/sai/modules/saimod_sys_log/js/saimod_sys_log.js index 8124a49..61d10f9 100644 --- a/sai/modules/saimod_sys_log/js/saimod_sys_log.js +++ b/sai/modules/saimod_sys_log/js/saimod_sys_log.js @@ -8,11 +8,18 @@ function init_saimod_sys_log() { }); }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_log_log() { $("#sai_mod_log_table").tablesorter(); $('#tabs_log li').each(function(){ $(this).removeClass('active');}); $('#menu_loglist').parent().addClass('active'); + register_search(); } function init_saimod_sys_log_stats() { diff --git a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php index d3a4d77..e75ca91 100644 --- a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php +++ b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php @@ -10,12 +10,13 @@ class SYS_SAIMOD_LOG_FILTER extends \SYSTEM\DB\QP { ' ON '.\SYSTEM\DBD\system_log::NAME_PG.'.'.\SYSTEM\DBD\system_log::FIELD_USER. ' = '.\SYSTEM\DBD\system_user::NAME_PG.'.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE $1'. -' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_PG.'."'.\SYSTEM\DBD\system_log::FIELD_ID.'" DESC LIMIT 100;', +' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_PG.'."'.\SYSTEM\DBD\system_log::FIELD_ID.'" DESC;', //mys 'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS. ' ON '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_USER. ' = '.\SYSTEM\DBD\system_user::NAME_MYS.'.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE ?'. -' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_ID.' DESC LIMIT 100;' +' AND ('.\SYSTEM\DBD\system_log::FIELD_MESSAGE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_FILE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_IP.' LIKE ?)'. +' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_ID.' DESC;' );}} diff --git a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php index 70d04e7..3d24f35 100644 --- a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php +++ b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php @@ -11,7 +11,7 @@ class SYS_SAIMOD_LOG_FILTER_COUNT extends \SYSTEM\DB\QP { //mys 'SELECT COUNT(*) as count'. ' FROM '.\SYSTEM\DBD\system_log::NAME_MYS. -' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS. -' LIKE ?;' +' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE ?'. +' AND ('.\SYSTEM\DBD\system_log::FIELD_MESSAGE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_FILE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_IP.' LIKE ?);' );}} diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.php b/sai/modules/saimod_sys_log/saimod_sys_log.php index 39755fc..0b70a94 100644 --- a/sai/modules/saimod_sys_log/saimod_sys_log.php +++ b/sai/modules/saimod_sys_log/saimod_sys_log.php @@ -292,37 +292,42 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_error.tpl'), $vars);} - public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_filter($filter = "%"){ - $filter_ = $filter; + public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_filter($filter = "%",$search="%",$page=0){ $filter = str_replace('\\', '\\\\', $filter); - $count = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER_COUNT::Q1(array($filter)); - $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER::QQ(array($filter)); - $table=''; - while($r = $res->next()){ - //print_r($r); + $count = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER_COUNT::Q1(array($filter,$search,$search,$search))['count']; + $vars = array(); + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER::QQ(array($filter,$search,$search,$search)); + $vars['table'] = ''; + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ $r['class_row'] = self::tablerow_class($r['class']); $r['time'] = \SYSTEM\time::time_ago_string(strtotime($r['time'])); $r['message'] = htmlspecialchars(substr($r['message'],0,255)); $r['request_uri'] = htmlspecialchars($r['request_uri']); - $table .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); + $count_filtered++; } - $vars = array(); - $vars['count'] = $count['count']; - $vars['error_filter'] = self::generate_error_filters($filter_); + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['error_filter'] = ''; + $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTERS::QQ(); + while($row = $res->next()){ + $data = array('active' => ($filter == $row['class'] ? 'active' : ''), 'filter' => $row['class'], 'search' => $search); + $vars['error_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl'),$data);} $vars['active'] = ($filter == '%' ? 'active' : ''); - $vars['table'] = $table; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl'),$vars); } - private static function generate_error_filters($filter){ - $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTERS::QQ(); - $result = ''; - while($row = $res->next()){ - $result .= ''.$row['class'].'';} - return $result; - } - public static function sai_mod__SYSTEM_SAI_saimod_sys_log(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG); $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl new file mode 100644 index 0000000..e0322b9 --- /dev/null +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl @@ -0,0 +1 @@ +
  • ${filter}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl index 1e11627..a39cc82 100644 --- a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl @@ -1,25 +1,28 @@
    - ${basic_rows}: ${count} +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    - - - - - - - - - - - - - - - ${table} - + + + + + + + + + + + + ${table}
    ${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}
    ${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}
    +
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl new file mode 100644 index 0000000..8fc22b9 --- /dev/null +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/js/saimod_sys_security.js b/sai/modules/saimod_sys_security/js/saimod_sys_security.js index 8e31b7d..4f52573 100644 --- a/sai/modules/saimod_sys_security/js/saimod_sys_security.js +++ b/sai/modules/saimod_sys_security/js/saimod_sys_security.js @@ -6,15 +6,20 @@ function init_saimod_sys_security() { $(this).parent().addClass('active'); }); - $('#user_go').click(function(){ - system.load('security;search.'+encodeURIComponent($('#user_search').val()));}) }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_security_users() { $("#sai_mod_security_table").tablesorter(); $('#securitytab li').each(function(){ $(this).removeClass('active');}); $('#menu_users').parent().addClass('active'); + register_search(); } function init_saimod_sys_security_user() { diff --git a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php index 34b1a86..ef68526 100644 --- a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php +++ b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php @@ -5,7 +5,7 @@ class SYS_SAIMOD_SECURITY_USERS extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, account_flag FROM system.user WHERE username LIKE $1 OR email LIKE $1 ORDER BY last_active DESC LIMIT 100;', +'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, account_flag FROM system.user WHERE username LIKE $1 OR email LIKE $1 ORDER BY last_active DESC;', //mys -'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, account_flag FROM system_user WHERE username LIKE ? OR email LIKE ? ORDER BY last_active DESC LIMIT 100;' +'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, account_flag FROM system_user WHERE username LIKE ? OR email LIKE ? ORDER BY last_active DESC;' );}} \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php new file mode 100644 index 0000000..8852704 --- /dev/null +++ b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php @@ -0,0 +1,15 @@ +next()){ + public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_users($filter = "all",$search="%",$page=0){ + $count = $filter == "all" ? \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USER_COUNT::Q1(array($search,$search))['count'] : + \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USER_COUNT_FILTER::Q1(array($search,$search,$filter))['count']; + $vars = array(); + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $vars['table'] = ''; + $res = $filter == "all" ? \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USERS::QQ(array($search),array($search,$search)) : + \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USERS_FILTER::QQ(array($search,$search,$filter)); + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ $r['class'] = self::tablerow_class($r['last_active']); $r['time_elapsed'] = \SYSTEM\time::time_ago_string($r['last_active']); - $rows .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'),$r); + $count_filtered++; } - $vars = array(); - $vars['rows'] = $rows; - $vars['count'] = $count['count']; + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['right_filter'] = ''; + $res = \SYSTEM\DBD\SYS_SAIMOD_SECURITY_RIGHTS::QQ(); + while($row = $res->next()){ + $data = array('active' => ($filter == $row['ID'] ? 'active' : ''), 'filter' => $row['ID'], 'search' => $search, 'name' => $row['name']); + $vars['right_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl'),$data);} + $vars['active'] = ($filter == 'all' ? 'active' : ''); $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_SECURITY)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl'),$vars); } diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl index bf46324..c82cb83 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl @@ -5,8 +5,6 @@
  • Users
  • Rights
  • - -
    diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl new file mode 100644 index 0000000..250bd56 --- /dev/null +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl new file mode 100644 index 0000000..ee0cfd4 --- /dev/null +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl @@ -0,0 +1 @@ +
  • ${name}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl index c7d3dc9..925f4b5 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl @@ -5,11 +5,6 @@ ${joindate} ${locale} ${time_elapsed} - ${account_flag} - diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl index ce5a57f..0a32863 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl @@ -1,19 +1,26 @@ -Users: ${count} - - + +
    +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    +
    - - - - - - - - - + + + + + + + - - - ${rows} - -
    IDUsernameE-MailJoinDateLocaleLast ActiveFlagreset password${table_id}${table_username}${table_email}${table_join_date}${table_language}${table_last_active}${table_reset_password}
    \ No newline at end of file + ${table} + + +
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_text/js/saimod_sys_text.js b/sai/modules/saimod_sys_text/js/saimod_sys_text.js index 9a18ae9..ca7934a 100644 --- a/sai/modules/saimod_sys_text/js/saimod_sys_text.js +++ b/sai/modules/saimod_sys_text/js/saimod_sys_text.js @@ -13,11 +13,17 @@ function init_saimod_sys_text() { }); } +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function text_menu(){ $('#tabs_text li').each(function(){ $(this).removeClass('active');}); if(system.cur_state().split('.')[1]){ - $('#menu_tag_'+system.cur_state().split(';')[1].split('.')[1]).parent().addClass('active'); + $('#menu_tag_'+system.cur_state().split(';')[1].split('.')[1].split(';')[0]).parent().addClass('active'); } else { $('#menu_tag_all').parent().addClass('active');} }; @@ -26,22 +32,16 @@ function text2_menu(){ $('#tabs2_text li').each(function(){ $(this).removeClass('active');}); if($('#menu_lang_'+system.cur_state().split('.')[2]).length){ - $('#menu_lang_'+system.cur_state().split('.')[2]).parent().addClass('active'); + $('#menu_lang_'+system.cur_state().split('.')[2].split(';')[0]).parent().addClass('active'); } else { $('.menu_lang_default').parent().addClass('active');} }; -function init_saimod_sys_text_notag(){ - $("#sai_mod_text_table").tablesorter(); - $('#tabs_text li').each(function(){ - $(this).removeClass('active');}); - $('#menu_tag_notag').parent().addClass('active'); -} - function init_saimod_sys_text_tag(){ $("#sai_mod_text_table").tablesorter(); - text_menu(); - text2_menu(); + register_search(); + text_menu(); + text2_menu(); }; function init_saimod_sys_text_editor(){ diff --git a/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php new file mode 100644 index 0000000..04f13c5 --- /dev/null +++ b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php @@ -0,0 +1,15 @@ +next()){ - $entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + if($filter == 'all'){ + $count = \SYSTEM\DBD\SYS_SAIMOD_TEXT_COUNT_TAG::Q1(array($tag,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TEXT_TEXT_TAG::QQ(array($tag,$search,$search,$search)); + } else { + $count = \SYSTEM\DBD\SYS_SAIMOD_TEXT_COUNT_TAG_FILTER::Q1(array($tag,$filter,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TEXT_TEXT_TAG_FILTER::QQ(array($tag,$filter,$search,$search,$search)); + } } - $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TEXT); - $vars['entries'] = $entries; + $vars = array(); + $vars['tag'] = $tag; + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $vars['entries'] = ''; + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + $count_filtered++;} + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : '', 'tag' => $tag); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['lang_filter'] = ''; + $res = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS); + foreach($res as $lang){ + $data = array('active' => ($filter == $lang ? 'active' : ''), 'filter' => $lang, 'search' => $search, 'name' => $lang, 'tag' => $tag); + $vars['lang_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_lang_filter.tpl'),$data);} + $vars['active'] = ($filter == 'all' ? 'active' : ''); + $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TEXT)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'), $vars); } diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl index 84b1eb8..f72f450 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl @@ -3,7 +3,7 @@
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl index bcc0694..0fd81ff 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl @@ -1,6 +1,6 @@ ${id} - ${lang} (${count}) + ${lang} ${text} ${author_name} ${time_create} diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl new file mode 100644 index 0000000..900428f --- /dev/null +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js index 218861f..33d6472 100644 --- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js +++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js @@ -20,17 +20,24 @@ function init_saimod_sys_todo() { }) }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_todo_todo() { $('#tabs_todo li').each(function(){ $(this).removeClass('active');}); $('#menu_todolist').parent().addClass('active'); - init_tinymce(); + register_search(); } function init_saimod_sys_todo_doto() { $('#tabs_todo li').each(function(){ $(this).removeClass('active');}); $('#menu_doto').parent().addClass('active'); + register_search(); } function init_saimod_sys_todo_stats() { diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php new file mode 100644 index 0000000..8064264 --- /dev/null +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php @@ -0,0 +1,18 @@ +id; - $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$userid)); - while($row = $res->next()){ + switch($filter){ + case 'mine': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_MINE::Q1(array($state,$userid,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_MINE::QQ(array($state,$userid,$search,$search,$search)); + $vars['filter_mine'] = 'active'; + break; + case 'free': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_FREE::Q1(array($state,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_FREE::QQ(array($state,$search,$search,$search)); + $vars['filter_free'] = 'active'; + break; + case 'others': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_OTHERS::Q1(array($state,$userid,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_OTHERS::QQ(array($state,$userid,$search,$search,$search)); + $vars['filter_others'] = 'active'; + break; + case 'gen': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION,$search,$search,$search,$userid)); + $vars['filter_gen'] = 'active'; + break; + case 'user': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_USER,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_USER,$search,$search,$search,$userid)); + $vars['filter_user'] = 'active'; + break; + case 'report': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT,$search,$search,$search,$userid)); + $vars['filter_report'] = 'active'; + break; + default: + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$search,$search,$search,$userid)); + $vars['filter_all'] = 'active'; + break; + } + $count_filtered = 0; + $res->seek(100*$page); + while(($row = $res->next()) && ($count_filtered < 100)){ $row['class_row'] = self::trclass($row['type'],$row['class'],$row['assignee_id'],$userid); $row['time_elapsed'] = \SYSTEM\time::time_ago_string(strtotime($row['time'])); $row['state_string'] = self::state($row['count']); @@ -67,18 +112,18 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $row['message'] = $row['message']; $row['request_uri'] = htmlspecialchars($row['request_uri']); $row['openclose'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'close' : 'open'; - if($row['type'] == \SYSTEM\DBD\system_todo::FIELD_TYPE_USER){ - $row['message'] = str_replace("\n", '
    ', $row['message']); - $result_user .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); - } else { - $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_element.tpl'), $row); - } + $row['message'] = str_replace("\n", '
    ', $row['message']); + $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); + $count_filtered++; } - $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; - $vars = array(); - $vars['todo_user_list_elements'] = $result_user; - $vars['todo_list_elements'] = $result; - $vars['count'] = $count; + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['state'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list.tpl'), $vars); } @@ -181,41 +226,25 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { public static function js(){ return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/js/saimod_sys_todo.js'));} - public static function exception(\Exception $E, $thrown, $user = false){ + public static function report($message,$data){ + $_POST = $data; //save data in post + self::exception(new \Exception($message), false, \SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT); + return \SYSTEM\LOG\JsonResult::ok();} + + public static function exception(\Exception $E, $thrown, $type = \SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION){ try{ if(\property_exists(get_class($E), 'todo_logged') && $E->todo_logged){ return false;} //alrdy logged(this prevents proper thrown value for every system exception) - if($user){ - \SYSTEM\DBD\SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0, sha1($E->getMessage())), - array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage())); - } else { - \SYSTEM\DBD\SYS_SAIMOD_TODO_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0, sha1($E->getMessage())), - array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage())); - } + + \SYSTEM\DBD\SYS_SAIMOD_TODO_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), + getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), + $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), + array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, + array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, + ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage(),$type)); if(\property_exists(get_class($E), 'logged')){ $E->todo_logged = true;} //we just did log } catch (\Exception $E){return false;} //Error -> Ignore - return false; //We just log and do not handle the error! } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/todo_stats_data.php b/sai/modules/saimod_sys_todo/todo_stats_data.php index 4f23655..c85d3a8 100644 --- a/sai/modules/saimod_sys_todo/todo_stats_data.php +++ b/sai/modules/saimod_sys_todo/todo_stats_data.php @@ -11,6 +11,6 @@ class todo_stats_data { $this->open = $all-$closed; $this->closed = $closed; $this->all = $all; - $this->perc = round($this->closed / $this->all * 100,2); + $this->perc = round($this->closed / ($this->all == 0 ? 1 : $this->all) * 100,2); } } diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index c368fbd..bc01691 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -1,6 +1,16 @@
    - Rows: ${count} -
    User ToDo's
    + +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    @@ -8,23 +18,11 @@ - ${todo_user_list_elements} -
    ${time_ago}${table_author} ${table_assignee}
    -
    -
    Generated ToDo's
    - - - - - - - - - - - - - ${todo_list_elements}
    ${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}${table_count}
    +
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl new file mode 100644 index 0000000..9ba0130 --- /dev/null +++ b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl b/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl index 38d9b54..ed6c17b 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl @@ -2,5 +2,5 @@ ${time_elapsed} ${message} ${username} - ${assignee} + ${assignee}
    ${basic_priority}: ${priority} \ No newline at end of file diff --git a/sai/page/default_page.php b/sai/page/default_page.php index a5d9f65..c26c1f2 100644 --- a/sai/page/default_page.php +++ b/sai/page/default_page.php @@ -44,6 +44,7 @@ class default_page extends \SYSTEM\PAGE\Page { ''. ''. ''. + ''. ''. ''. //''.