diff --git a/api/api_system.php b/api/api_system.php index 46e1959..1fcd7c9 100644 --- a/api/api_system.php +++ b/api/api_system.php @@ -14,6 +14,10 @@ class api_system extends api_login{ public static function call_pagestates($group){ return \SYSTEM\PAGE\State::get($group);} + public static function call_pagestates_flag_js($group){ + return \SYSTEM\PAGE\State::get_js($group);} + public static function call_pagestates_flag_css($group){ + return \SYSTEM\PAGE\State::get_css($group);} public static function static__lang($lang){ \SYSTEM\locale::set($lang);} diff --git a/api/autoload.inc.php b/api/autoload.inc.php new file mode 100644 index 0000000..9c5b8af --- /dev/null +++ b/api/autoload.inc.php @@ -0,0 +1,2 @@ + 12){ $next_year += 1;} + $next_month = ($now_month+$month)%12;} if($day){ - if($day < $now_day){ $next_month += 1;} - $next_day = $day;} + if($day + $now_day> 31){ $next_month += 1;} + $next_day = ($now_day+$day)%31;} if($hour){ - if($hour < $now_hour){ $next_day += 1;} - $next_hour = $hour;} + if(($hour + $now_hour)> 24){ $next_day += 1;} + $next_hour = ($now_hour+$hour)%24;} if($min){ - if($min < $now_min){ $next_hour += 1;} - $next_min = $min;} + if(($min + $now_min)> 60){ $next_hour += 1;} + $next_min = ($now_min+$min)%60;} if($day_week){ $day_week = $day_week % 6; // 7 and 0 both mean Sunday $now_day_week = $now_day_week % 6; // 7 and 0 both mean Sunday @@ -28,17 +26,17 @@ class crontime { list( $now_min, $now_hour, $now_day, $now_month, $now_day_week ) = preg_split( "/ /", date("i H d n N", $base_time ) ); list( $last_min, $last_hour, $last_day, $last_month, $last_year) = preg_split( "/ /", date("i H d n Y", $base_time ) ); if($month){ - if($month > $now_month){ $last_year -= 1;} - $last_month = $month;} + if(($now_month - $month)< 12){ $last_year -= 1;} + $last_month = ($now_month-$month)%12;} if($day){ - if($day > $now_day){ $last_month -= 1;} - $last_day = $day;} + if(($now_day - $day)> 31){ $last_month -= 1;} + $last_day = ($now_day-$day)%31;} if($hour){ - if($hour > $now_hour){ $last_day -= 1;} - $last_hour = $hour;} + if(($now_hour - $hour)> 24){ $last_day -= 1;} + $last_hour = ($now_hour-$hour)%24;} if($min){ - if($min > $now_min){ $last_hour -= 1;} - $last_min = $min;} + if(($now_min - $min)> 60){ $last_hour -= 1;} + $last_min = ($now_min-$min)%60;} if($day_week){ $day_week = $day_week % 6; // 7 and 0 both mean Sunday $now_day_week = $now_day_week % 6; // 7 and 0 both mean Sunday @@ -46,9 +44,10 @@ class crontime { return mktime($last_hour, $last_min, 0, $last_month, $last_day, $last_year); } public static function check($base_time,$last_run,$min,$hour,$day,$day_week,$month){ - return crontime::next($last_run, $min, $hour, $day, $day_week, $month) < $base_time ? true : false;} + //new \SYSTEM\LOG\INFO('next:'.self::next($last_run, $min, $hour, $day, $day_week, $month).' bt:'.$base_time.' last:'.$last_run.' dif:'.(self::next($last_run, $min, $hour, $day, $day_week, $month) - time($base_time)).' run:'.(self::next($last_run, $min, $hour, $day, $day_week, $month) <= time($base_time) ? 'run' : 'not run')); + return self::next($last_run, $min, $hour, $day, $day_week, $month) <= $base_time ? true : false;} public static function next_now($min,$hour,$day,$day_week,$month){ - self::next(time(),$min,$hour,$day,$day_week,$month);} + return self::next(time(),$min,$hour,$day,$day_week,$month);} public static function last_now($min,$hour,$day,$day_week,$month){ return self::last(time(),$min,$hour,$day,$day_week,$month);} public static function check_now($last_run,$min,$hour,$day,$day_week,$month){ diff --git a/db/autoload.inc.php b/db/autoload.inc.php new file mode 100644 index 0000000..2bca5de --- /dev/null +++ b/db/autoload.inc.php @@ -0,0 +1,6 @@ +TinyMCE LogoWelcome to the TinyMCE editor demo!\n

Feel free to try out the different features that are provided, please note that the MoxieManager specific functionality is part of our commercial offering. The demo is to show the integration.

\n

Got questions or need help?

\n

If you have questions or need help, feel free to visit our community forum! We also offer Enterprise support solutions. Also do not miss out on the documentation, its a great resource wiki for understanding how TinyMCE works and integrates.

\n

Found a bug?

\n

If you think you have found a bug, you can use the Bug Tracker to report bugs to the developers.

\n

And here is a simple table for you to play with.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ProductCostReally?
TinyMCEFreeYES!
PluploadFreeYES!
\n

Enjoy our software and create great content!

\n

Oh, and by the way, don\'t forget to check out our other product called Plupload, your ultimate upload solution with HTML5 upload support!

', '

TinyMCE LogoWelcome to the TinyMCE editor demo!

\n

Feel free to try out the different features that are provided, please note that the MoxieManager specific functionality is part of our commercial offering. The demo is to show the integration.

\n

Got questions or need help?

\n

If you have questions or need help, feel free to visit our community forum! We also offer Enterprise support solutions. Also do not miss out on the documentation, its a great resource wiki for understanding how TinyMCE works and integrates.

\n

Found a bug?

\n

If you think you have found a bug, you can use the Bug Tracker to report bugs to the developers.

\n

And here is a simple table for you to play with.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ProductCostReally?
TinyMCEFreeYES!
PluploadFreeYES!
\n

Enjoy our software and create great content!

\n

Oh, and by the way, don\'t forget to check out our other product called Plupload, your ultimate upload solution with HTML5 upload support!

'); \ 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 f987904..17f99fe 100644 --- a/dbd/sql/mysql/data/sai_api.sql +++ b/dbd/sql/mysql/data/sai_api.sql @@ -22,6 +22,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (40, 42, 2, 10, 'text', 'request', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 42, 2, 40, 'text', 'lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 42, 2, 10, 'pagestates', 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 42, 1, 50, NULL, 'js', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (52, 42, 2, 51, NULL, 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 42, 1, 50, NULL, 'css', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 42, 2, 55, NULL, 'group', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 42, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 42, 4, -1, NULL, '_result', 'RESULT'); @@ -124,4 +128,14 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1000, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_todo', 'action', NULL); --- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL); \ No newline at end of file +-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL); + +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cron', 'action', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1201, 42, 2, 1200, 'add', 'cls', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1202, 42, 2, 1200, 'add', 'min', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1203, 42, 2, 1200, 'add', 'hour', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1204, 42, 2, 1200, 'add', 'day', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1205, 42, 2, 1200, 'add', 'day_week', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1206, 42, 2, 1200, 'add', 'month', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1208, 42, 2, 1200, 'del', 'cls', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1209, 42, 2, 1200, 'deldialog', 'cls', 'STRING'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/system_api.sql b/dbd/sql/mysql/data/system_api.sql index 13ccb10..88b9f7f 100644 --- a/dbd/sql/mysql/data/system_api.sql +++ b/dbd/sql/mysql/data/system_api.sql @@ -19,6 +19,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 0, 2, 10, 'text', 'lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 0, 2, 10, 'pagestates', 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 0, 1, 50, NULL, 'js', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (52, 0, 2, 50, NULL, 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 0, 1, 50, NULL, 'css', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 0, 2, 55, NULL, 'group', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 42, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 42, 4, -1, NULL, '_result', 'RESULT'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/system_rights.sql b/dbd/sql/mysql/data/system_rights.sql index 5834681..f56c8bb 100644 --- a/dbd/sql/mysql/data/system_rights.sql +++ b/dbd/sql/mysql/data/system_rights.sql @@ -8,4 +8,6 @@ INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (10, 'SYS_SAI_L INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (15, 'SYS_SAI_IMG', 'Allows access to the Image Module in SAI to delete or add Pictures'); INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (20, 'SYS_SAI_API', 'SAI API Access right'); -INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (21, 'SYS_SAI_API_EDIT', 'SAI API Edit right'); \ No newline at end of file +INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (21, 'SYS_SAI_API_EDIT', 'SAI API Edit right'); + +INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (25, 'SYS_SAI_CRON', 'SAI Cron Access right'); \ No newline at end of file diff --git a/docu/autoload.inc.php b/docu/autoload.inc.php new file mode 100644 index 0000000..d4353fb --- /dev/null +++ b/docu/autoload.inc.php @@ -0,0 +1,4 @@ + ($first ? 'active' : ''), 'tab_id' => $r['group']); $first = false; - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tabopt.tpl'), $vars2); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tabopt.tpl'), $vars2); } if(\SYSTEM\system::isSystemDbInfoPG()){ @@ -33,7 +33,7 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { $tabs[$r['group']]['content'] = isset($tabs[$r['group']]['content']) ? $tabs[$r['group']]['content'] : ''; $r['tr_class'] = self::tablerow_class($r['type']); $r['type'] = self::type_names($r['type']); - $tabs[$r['group']]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/list_entry.tpl'), $r); + $tabs[$r['group']]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/list_entry.tpl'), $r); } $vars['tabs'] = ''; @@ -41,9 +41,9 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { foreach($tabs as $tab){ $tab['active'] = ($first ? 'active' : ''); $first = false; - $vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tab.tpl'), $tab);} + $vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tab.tpl'), $tab);} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tabs.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tabs.tpl'), $vars); /* $result = ""; $result .= ''.''.$r['ID'].''.''.$r['group'].''.''.$r['type'].''.''.$r['parentID'].''.''.$r['parentValue'].''.''.$r['name'].''.''.$r['verify'].''.''; @@ -52,12 +52,14 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { public static function sai_mod__system_sai_saimod_sys_api_action_deletedialog($ID){ $res = \SYSTEM\DBD\SYS_SAIMOD_API_SINGLE_SELECT::Q1(array($ID)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/delete_dialog.tpl'), $res); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/delete_dialog.tpl'), $res); } public static function sai_mod__system_sai_saimod_sys_api_action_addcall($ID,$group,$type,$parentID,$parentValue,$name,$verify){ if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){ throw new \SYSTEM\LOG\ERROR("You dont have edit Rights - Cant proceeed");} + if($parentValue == ''){ $parentValue = NULL;} + if($verify == ''){ $verify = NULL;} \SYSTEM\DBD\SYS_SAIMOD_API_ADD::QI(array($ID,$group,$type,$parentID,$parentValue,$name,$verify)); return \SYSTEM\LOG\JsonResult::ok(); } diff --git a/sai/modules/saimod_sys_api/delete_dialog.tpl b/sai/modules/saimod_sys_api/tpl/delete_dialog.tpl similarity index 100% rename from sai/modules/saimod_sys_api/delete_dialog.tpl rename to sai/modules/saimod_sys_api/tpl/delete_dialog.tpl diff --git a/sai/modules/saimod_sys_api/list_entry.tpl b/sai/modules/saimod_sys_api/tpl/list_entry.tpl similarity index 100% rename from sai/modules/saimod_sys_api/list_entry.tpl rename to sai/modules/saimod_sys_api/tpl/list_entry.tpl diff --git a/sai/modules/saimod_sys_api/tab.tpl b/sai/modules/saimod_sys_api/tpl/tab.tpl similarity index 100% rename from sai/modules/saimod_sys_api/tab.tpl rename to sai/modules/saimod_sys_api/tpl/tab.tpl diff --git a/sai/modules/saimod_sys_api/tabopt.tpl b/sai/modules/saimod_sys_api/tpl/tabopt.tpl similarity index 100% rename from sai/modules/saimod_sys_api/tabopt.tpl rename to sai/modules/saimod_sys_api/tpl/tabopt.tpl diff --git a/sai/modules/saimod_sys_api/tabs.tpl b/sai/modules/saimod_sys_api/tpl/tabs.tpl similarity index 100% rename from sai/modules/saimod_sys_api/tabs.tpl rename to sai/modules/saimod_sys_api/tpl/tabs.tpl diff --git a/sai/modules/saimod_sys_cache/autoload.inc b/sai/modules/saimod_sys_cache/autoload.inc new file mode 100644 index 0000000..12c20b3 --- /dev/null +++ b/sai/modules/saimod_sys_cache/autoload.inc @@ -0,0 +1,5 @@ + -
Api Call: ${ID}
-
- - - - - - - - - - - - - - - - - - - -
IDGroupTypeParentIDParentValueNameVerify
${ID}${group}${type}${parentID}${parentValue}${name}${verify}
- - - diff --git a/dbd/qq/SYS_SAIMOD_CRON.php b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php similarity index 100% rename from dbd/qq/SYS_SAIMOD_CRON.php rename to sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON.php diff --git a/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php new file mode 100644 index 0000000..703e62a --- /dev/null +++ b/sai/modules/saimod_sys_cron/qq/SYS_SAIMOD_CRON_ADD.php @@ -0,0 +1,11 @@ +Api call deleted!

'); - $('#del_api_del').hide(); + console.log("cron call deleted"); + $('#cron_deletedialog').html('

Api call deleted!

'); + $('#del_cron_del').hide(); }});});}});}); - $('#addcall').click(function() { - var id = $('#new_call_id').val(); - var group = $('#new_call_group').val(); - var type = $('#new_call_type').val(); - var parentid = $('#new_call_parentid').val(); - var parentvalue = $('#new_call_parentvalue').val(); - var name = $('#new_call_name').val(); - var verify = $('#new_call_verify').val(); + $('#addcron').click(function() { + var cls = $('#new_cron_class').val(); + var min = $('#new_cron_min').val(); + var hour = $('#new_cron_hour').val(); + var day = $('#new_cron_day').val(); + var day_week = $('#new_cron_day_week').val(); + var month = $('#new_cron_month').val(); $.ajax({ url: SAI_ENDPOINT, - data: { sai_mod: '.SYSTEM.SAI.saimod_sys_api', - action: 'addcall', - ID: id, - group: group, - type: type, - parentID: parentid, - parentValue : parentvalue, - name: name, - verify: verify}, + data: { sai_mod: '.SYSTEM.SAI.saimod_sys_cron', + action: 'add', + cls: cls, + min: min, + hour: hour, + day: day, + day_week: day_week, + month: month}, type: 'GET', success: function(data) { - console.log("new api call added"); - saimod_sys_api_loadcontent(); + console.log("new cronjob added"); } }); }); - $('#del_api_close').click(function() { + $('#del_cron_close').click(function() { console.log("olenski"); - $('#del_api_description').hide(); - $('#del_api_del').show(); - saimod_sys_api_loadcontent(); - }); - $('#localetab a').click(function (e) {e.preventDefault(); $(this).tab('show');}); -} - -function saimod_sys_api_tree(){ - $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch'); - $('.tree li.parent_li > span').on('click', function (e) { - var children = $(this).parent('li.parent_li').find(' > ul > li'); - if (children.is(":visible")) { - children.hide('fast'); - $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign'); - } else { - children.show('fast'); - $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign'); - } - e.stopPropagation(); + $('#del_cron_description').hide(); + $('#del_cron_del').show(); }); } \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/saimod_sys_cron.php b/sai/modules/saimod_sys_cron/saimod_sys_cron.php index 698b6ea..44e61b9 100644 --- a/sai/modules/saimod_sys_cron/saimod_sys_cron.php +++ b/sai/modules/saimod_sys_cron/saimod_sys_cron.php @@ -4,48 +4,34 @@ namespace SYSTEM\SAI; class saimod_sys_cron extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_cron(){ $vars = array(); - $vars['tabopts'] = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tabopt.tpl'), array()); $vars['content'] = ''; - - $res = \SYSTEM\DBD\SYS_SAIMOD_CRON::QQ(); + $res = \SYSTEM\DBD\SYS_SAIMOD_CRON::QQ(); while($r = $res->next()){ - $vars['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/list_entry.tpl'), $r);} - - $vars['tabs'] = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tab.tpl'), $vars); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tabs.tpl'), $vars); + $r['next'] = date('Y-m-d H:i:s',\SYSTEM\CRON\cron::next($r['class'])); + $vars['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tpl/list_entry.tpl'), $r);} + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tpl/tabs.tpl'), $vars); } - public static function sai_mod__system_sai_saimod_sys_api_action_deletedialog($ID){ - $res = \SYSTEM\DBD\SYS_SAIMOD_API_SINGLE_SELECT::Q1(array($ID)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/delete_dialog.tpl'), $res); - } + public static function sai_mod__system_sai_saimod_sys_cron_action_deldialog($cls){ + $res = \SYSTEM\DBD\SYS_SAIMOD_CRON_SINGLE_SELECT::Q1(array($cls)); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tpl/delete_dialog.tpl'), $res);} - public static function sai_mod__system_sai_saimod_sys_api_action_addcall($ID,$group,$type,$parentID,$parentValue,$name,$verify){ - if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){ + public static function sai_mod__system_sai_saimod_sys_cron_action_add($cls,$min,$hour,$day,$day_week,$month){ + if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_CRON)){ throw new \SYSTEM\LOG\ERROR("You dont have edit Rights - Cant proceeed");} - \SYSTEM\DBD\SYS_SAIMOD_API_ADD::QI(array($ID,$group,$type,$parentID,$parentValue,$name,$verify)); + \SYSTEM\DBD\SYS_SAIMOD_CRON_ADD::QI(array($cls,$min,$hour,$day,$day_week,$month)); return \SYSTEM\LOG\JsonResult::ok(); } - public static function sai_mod__system_sai_saimod_sys_api_action_deletecall($ID){ - if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){ + public static function sai_mod__system_sai_saimod_sys_cron_action_del($cls){ + if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_CRON)){ throw new \SYSTEM\LOG\ERROR("You dont have edit Rights - Cant proceeed");} - \SYSTEM\DBD\SYS_SAIMOD_API_DEL::QI(array($ID)); - return \SYSTEM\LOG\JsonResult::ok(); - } - - private static function tablerow_class($flag){ - switch($flag){ - case 0: return 'info'; - case 1: return ''; - case 4: return 'warning'; - default: return 'success'; - } - } + \SYSTEM\DBD\SYS_SAIMOD_CRON_DEL::QI(array($cls)); + return \SYSTEM\LOG\JsonResult::ok();} public static function html_li_menu(){return '
  • Cron
  • ';} public static function right_public(){return false;} - public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);} + public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_CRON);} public static function sai_mod__SYSTEM_SAI_saimod_sys_cron_flag_css(){ return \SYSTEM\LOG\JsonResult::toString( diff --git a/sai/modules/saimod_sys_cron/tab.tpl b/sai/modules/saimod_sys_cron/tab.tpl deleted file mode 100644 index 3de066f..0000000 --- a/sai/modules/saimod_sys_cron/tab.tpl +++ /dev/null @@ -1,15 +0,0 @@ -
    - - - - - - - - - - - - ${content} -
    classminhourdayday_weekmonthlast_runstatus
    -
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/tabopt.tpl b/sai/modules/saimod_sys_cron/tabopt.tpl deleted file mode 100644 index bb18245..0000000 --- a/sai/modules/saimod_sys_cron/tabopt.tpl +++ /dev/null @@ -1 +0,0 @@ -
  • Cron
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/tabs.tpl b/sai/modules/saimod_sys_cron/tabs.tpl deleted file mode 100644 index b8877bb..0000000 --- a/sai/modules/saimod_sys_cron/tabs.tpl +++ /dev/null @@ -1,38 +0,0 @@ -
    -

    System Cron

    -
    -
    -
    - -
    - ${tabs} -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    classminhourdayday_weekmonthlast_runstatus
    - -
    -
    diff --git a/sai/modules/saimod_sys_cron/tpl/delete_dialog.tpl b/sai/modules/saimod_sys_cron/tpl/delete_dialog.tpl new file mode 100644 index 0000000..9a2fa04 --- /dev/null +++ b/sai/modules/saimod_sys_cron/tpl/delete_dialog.tpl @@ -0,0 +1,24 @@ +
    +
    Cron Job: ${class}
    +
    + + + + + + + + + + + + + + + + + +
    classminhourdayday_weekmonth
    ${class}${min}${hour}${day}${day_week}${month}
    +
    + + diff --git a/sai/modules/saimod_sys_cron/list_entry.tpl b/sai/modules/saimod_sys_cron/tpl/list_entry.tpl similarity index 71% rename from sai/modules/saimod_sys_cron/list_entry.tpl rename to sai/modules/saimod_sys_cron/tpl/list_entry.tpl index 894c367..75fd5a4 100644 --- a/sai/modules/saimod_sys_cron/list_entry.tpl +++ b/sai/modules/saimod_sys_cron/tpl/list_entry.tpl @@ -1,4 +1,4 @@ - + ${class} ${min} ${hour} @@ -6,5 +6,6 @@ ${day_week} ${month} ${last_run} + ${next} ${status} \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/tpl/tabs.tpl b/sai/modules/saimod_sys_cron/tpl/tabs.tpl new file mode 100644 index 0000000..912ac79 --- /dev/null +++ b/sai/modules/saimod_sys_cron/tpl/tabs.tpl @@ -0,0 +1,30 @@ +
    +

    System Cron

    +
    +
    + + + + + + + + + + + + + ${content} + + + + + + + + + + +
    classminhourdayday_weekmonthlast_runnext_runstatus
    +
    +
    diff --git a/sai/modules/saimod_sys_docu/autoload.inc b/sai/modules/saimod_sys_docu/autoload.inc new file mode 100644 index 0000000..9159a3d --- /dev/null +++ b/sai/modules/saimod_sys_docu/autoload.inc @@ -0,0 +1,5 @@ + str_replace(' ', '_', $cat), 'tab_id_pretty' => $cat); $first = false; - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tabopt.tpl'), $vars2); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tabopt.tpl'), $vars2); $first2 = true; foreach($docs as $doc){ @@ -23,11 +23,11 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { $vars3 = array( 'active' => ($first2 ? 'active' : ''), 'content' => \Michelf\MarkdownExtra::defaultTransform(file_get_contents($doc)), 'tab_id' => str_replace(array('.',' ','\\','/'), '_', $doc)); - $tabs[$cat]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tab2.tpl'), $vars3); + $tabs[$cat]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tab2.tpl'), $vars3); $vars3 = array( 'active' => ($first2 ? 'active' : ''), 'tab_id' => str_replace(array('.',' ','\\','/'), '_', $doc), 'tab_id_pretty' => basename($doc)); - $tabs[$cat]['menu'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tabopt.tpl'), $vars3); + $tabs[$cat]['menu'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tabopt.tpl'), $vars3); $first2 = false; } @@ -36,9 +36,9 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { foreach($tabs as $tab){ $tab['active'] = ($first ? 'active' : ''); $first = false; - $vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tab.tpl'), $tab);} + $vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tab.tpl'), $tab);} } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tabs.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tabs.tpl'), $vars); } public static function html_li_menu(){return '
  • Docu
  • ';} diff --git a/sai/modules/saimod_sys_docu/tab.tpl b/sai/modules/saimod_sys_docu/tpl/tab.tpl similarity index 100% rename from sai/modules/saimod_sys_docu/tab.tpl rename to sai/modules/saimod_sys_docu/tpl/tab.tpl diff --git a/sai/modules/saimod_sys_docu/tab2.tpl b/sai/modules/saimod_sys_docu/tpl/tab2.tpl similarity index 100% rename from sai/modules/saimod_sys_docu/tab2.tpl rename to sai/modules/saimod_sys_docu/tpl/tab2.tpl diff --git a/sai/modules/saimod_sys_docu/tabopt.tpl b/sai/modules/saimod_sys_docu/tpl/tabopt.tpl similarity index 100% rename from sai/modules/saimod_sys_docu/tabopt.tpl rename to sai/modules/saimod_sys_docu/tpl/tabopt.tpl diff --git a/sai/modules/saimod_sys_docu/tabs.tpl b/sai/modules/saimod_sys_docu/tpl/tabs.tpl similarity index 100% rename from sai/modules/saimod_sys_docu/tabs.tpl rename to sai/modules/saimod_sys_docu/tpl/tabs.tpl diff --git a/sai/modules/saimod_sys_files/autoload.inc b/sai/modules/saimod_sys_files/autoload.inc new file mode 100644 index 0000000..f688fac --- /dev/null +++ b/sai/modules/saimod_sys_files/autoload.inc @@ -0,0 +1,5 @@ +$folder){ - $result['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/saimod_sys_files_tabopt.tpl'),array('name' => $name, 'active' => $first ? 'active' : '')); - $result['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/saimod_sys_files_tab.tpl'),array('name' => $name, 'active' => $first ? 'active' : '', 'content' => $first ? self::sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name) : '')); + $result['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_tabopt.tpl'),array('name' => $name, 'active' => $first ? 'active' : '')); + $result['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_tab.tpl'),array('name' => $name, 'active' => $first ? 'active' : '', 'content' => $first ? self::sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name) : '')); $first = false; } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/saimod_sys_files.tpl'),$result); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files.tpl'),$result); } public static function sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name){ @@ -40,8 +40,8 @@ class saimod_sys_files extends \SYSTEM\SAI\SaiModule { $cat = \SYSTEM\FILES\files::get($name); $i = 0; foreach($cat as $file){ - $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/saimod_sys_files_tableentry.tpl'), array('i' => $i++, 'cat' => $name, 'name' => $file, 'extension' => substr($file,-3,3), 'url' => 'api.php?call=files&cat='.$name.'&id='.$file));} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/saimod_sys_files_tabfull.tpl'), array('cat' => $name, 'content' => $result));} + $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_tableentry.tpl'), array('i' => $i++, 'cat' => $name, 'name' => $file, 'extension' => substr($file,-3,3), 'url' => 'api.php?call=files&cat='.$name.'&id='.$file));} + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_tabfull.tpl'), array('cat' => $name, 'content' => $result));} public static function html_li_menu(){return '
  • Files
  • ';} public static function right_public(){return false;} diff --git a/sai/modules/saimod_sys_files/saimod_sys_files.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl similarity index 100% rename from sai/modules/saimod_sys_files/saimod_sys_files.tpl rename to sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl diff --git a/sai/modules/saimod_sys_files/saimod_sys_files_tab.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files_tab.tpl similarity index 100% rename from sai/modules/saimod_sys_files/saimod_sys_files_tab.tpl rename to sai/modules/saimod_sys_files/tpl/saimod_sys_files_tab.tpl diff --git a/sai/modules/saimod_sys_files/saimod_sys_files_tabfull.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files_tabfull.tpl similarity index 100% rename from sai/modules/saimod_sys_files/saimod_sys_files_tabfull.tpl rename to sai/modules/saimod_sys_files/tpl/saimod_sys_files_tabfull.tpl diff --git a/sai/modules/saimod_sys_files/saimod_sys_files_tableentry.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files_tableentry.tpl similarity index 100% rename from sai/modules/saimod_sys_files/saimod_sys_files_tableentry.tpl rename to sai/modules/saimod_sys_files/tpl/saimod_sys_files_tableentry.tpl diff --git a/sai/modules/saimod_sys_files/saimod_sys_files_tabopt.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files_tabopt.tpl similarity index 100% rename from sai/modules/saimod_sys_files/saimod_sys_files_tabopt.tpl rename to sai/modules/saimod_sys_files/tpl/saimod_sys_files_tabopt.tpl diff --git a/sai/modules/saimod_sys_locale/autoload.inc b/sai/modules/saimod_sys_locale/autoload.inc new file mode 100644 index 0000000..36f61f5 --- /dev/null +++ b/sai/modules/saimod_sys_locale/autoload.inc @@ -0,0 +1,5 @@ + ($first ? 'active' : ''), 'tab_id' => $r['category']); $first = false; - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tabopt.tpl'), $vars2); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/tabopt.tpl'), $vars2); } $langtab_ = ''; foreach (self::getLanguages() as $lang){ $details['langs'] = $lang; - $langtab_ .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/langtabopt.tpl'), $details); + $langtab_ .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/langtabopt.tpl'), $details); $languages[] = $lang; } $langtab['langs'] = $langtab_; - $langhead = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/langtabs.tpl'), $langtab); + $langhead = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/langtabs.tpl'), $langtab); $vars['tabs'] = $langhead; $vars['langs'] = $langtab_; - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tabs.tpl'), $vars); - //.\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/editmode.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/tabs.tpl'), $vars); + //.\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/editmode.tpl'), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_load($lang, $group){ @@ -41,7 +41,7 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { while($r = $res->next()){ $temparr['lang'] = $r[$lang]; $temparr['id'] = $r['id']; - $entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/entry.tpl'), $temparr); + $entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tpl/entry.tpl'), $temparr); } return $entries; } @@ -50,13 +50,11 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(); $result = ""; $query = 'SELECT '.$lang.' FROM `'.\SYSTEM\DBD\system_locale_string::NAME_MYS.'` WHERE id=\''.$id.'\' ORDER BY category ASC;'; - new \SYSTEM\LOG\WARNING($query); - $res = $con->query($query); - $entries = ''; - $temparr = array(); - while($r = $res->next()){ - $entries .= $r[$lang]; - } + $res = $con->query($query); + $entries = ''; + $temparr = array(); + while($r = $res->next()){ + $entries .= $r[$lang];} return $entries; } diff --git a/sai/modules/saimod_sys_locale/entry.tpl b/sai/modules/saimod_sys_locale/tpl/entry.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/entry.tpl rename to sai/modules/saimod_sys_locale/tpl/entry.tpl diff --git a/sai/modules/saimod_sys_locale/lang_tabs.tpl b/sai/modules/saimod_sys_locale/tpl/lang_tabs.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/lang_tabs.tpl rename to sai/modules/saimod_sys_locale/tpl/lang_tabs.tpl diff --git a/sai/modules/saimod_sys_locale/langtabopt.tpl b/sai/modules/saimod_sys_locale/tpl/langtabopt.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/langtabopt.tpl rename to sai/modules/saimod_sys_locale/tpl/langtabopt.tpl diff --git a/sai/modules/saimod_sys_locale/langtabs.tpl b/sai/modules/saimod_sys_locale/tpl/langtabs.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/langtabs.tpl rename to sai/modules/saimod_sys_locale/tpl/langtabs.tpl diff --git a/sai/modules/saimod_sys_locale/tab.tpl b/sai/modules/saimod_sys_locale/tpl/tab.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/tab.tpl rename to sai/modules/saimod_sys_locale/tpl/tab.tpl diff --git a/sai/modules/saimod_sys_locale/tabopt.tpl b/sai/modules/saimod_sys_locale/tpl/tabopt.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/tabopt.tpl rename to sai/modules/saimod_sys_locale/tpl/tabopt.tpl diff --git a/sai/modules/saimod_sys_locale/tabs.tpl b/sai/modules/saimod_sys_locale/tpl/tabs.tpl similarity index 100% rename from sai/modules/saimod_sys_locale/tabs.tpl rename to sai/modules/saimod_sys_locale/tpl/tabs.tpl diff --git a/sai/modules/saimod_sys_log/autoload.inc b/sai/modules/saimod_sys_log/autoload.inc new file mode 100644 index 0000000..54ea0cb --- /dev/null +++ b/sai/modules/saimod_sys_log/autoload.inc @@ -0,0 +1,5 @@ +next(); $vars['trace'] = implode('
    ', array_slice(explode('#', $vars['trace']), 1, -1)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/saimod_sys_log_error.tpl'), $vars);} + 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 = "%"){ $count = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER_COUNT::Q1(array($filter)); @@ -69,19 +69,19 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $r['class_row'] = self::tablerow_class($r['class']); $r['time'] = self::time_elapsed_string(strtotime($r['time'])); $r['message'] = substr($r['message'],0,255); - $table .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/saimod_sys_log_table_row.tpl'),$r); + $table .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); } $vars = array(); $vars['count'] = $count['count']; $vars['table'] = $table; - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/saimod_sys_log_table.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table.tpl'), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_log(){ $vars = array(); $vars['table'] = self::sai_mod__SYSTEM_SAI_saimod_sys_log_action_filter(); $vars['error_filter'] = self::generate_error_filters(); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/saimod_sys_log_filter.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl'), $vars); } private static function time_elapsed_string($ptime){ @@ -115,7 +115,7 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_log(){ $vars = array(); $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/saimod_sys_log.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log.tpl'), $vars); } public static function tablerow_class($class){ diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_admin.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_admin.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_admin.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_admin.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_error.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_error.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_error.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_filter.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_stats.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_stats.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_stats.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_stats.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_table.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_table.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_table.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_table.tpl diff --git a/sai/modules/saimod_sys_log/saimod_sys_log_table_row.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl similarity index 100% rename from sai/modules/saimod_sys_log/saimod_sys_log_table_row.tpl rename to sai/modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl diff --git a/sai/modules/saimod_sys_login/autoload.inc b/sai/modules/saimod_sys_login/autoload.inc new file mode 100644 index 0000000..30cf2ec --- /dev/null +++ b/sai/modules/saimod_sys_login/autoload.inc @@ -0,0 +1,5 @@ +