diff --git a/dbd/qq/SYS_SAIMOD_CRON.php b/dbd/qq/SYS_SAIMOD_CRON.php
new file mode 100644
index 0000000..76943e1
--- /dev/null
+++ b/dbd/qq/SYS_SAIMOD_CRON.php
@@ -0,0 +1,11 @@
+query('SELECT "group", count(*) as "count" FROM system.api GROUP BY "group" ORDER BY "group" ASC;');
- } else {
- $res = $con->query('SELECT `group`, count(*) as `count` FROM system_api GROUP BY `group` ORDER BY `group` ASC;');
- }
-
- $vars['tabopts'] = '';
- $first = true;
+ $res = \SYSTEM\DBD\SYS_SAIMOD_CRON::QQ();
while($r = $res->next()){
- $vars2 = array( 'active' => ($first ? 'active' : ''),
- 'tab_id' => $r['group']);
- $first = false;
- $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tabopt.tpl'), $vars2);
- }
-
- if(\SYSTEM\system::isSystemDbInfoPG()){
- $res = $con->query('SELECT * FROM system.api ORDER BY "group", "ID" ASC;');
- } else {
- $res = $con->query('SELECT * FROM system_api ORDER BY `group`, `ID` ASC;');
- }
-
- while($r = $res->next()){
- $tabs[$r['group']]['tab_id'] = $r['group'];
- $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_cron/list_entry.tpl'), $r);
- }
-
- $vars['tabs'] = '';
- $first = true;
- foreach($tabs as $tab){
- $tab['active'] = ($first ? 'active' : '');
- $first = false;
- $vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tab.tpl'), $tab);}
-
+ $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);
-
-/* $result = "";
- $result .= '
'.'| '.$r['ID'].' | '.''.$r['group'].' | '.''.$r['type'].' | '.''.$r['parentID'].' | '.''.$r['parentValue'].' | '.''.$r['name'].' | '.''.$r['verify'].' | '.'
';
- return $result;*/
}
public static function sai_mod__system_sai_saimod_sys_api_action_deletedialog($ID){
@@ -69,17 +34,6 @@ class saimod_sys_cron extends \SYSTEM\SAI\SaiModule {
return \SYSTEM\LOG\JsonResult::ok();
}
- private static function type_names($type){
- switch($type){
- case 0: return 'COMMAND';
- case 1: return 'COMMAND_FLAG';
- case 2: return 'PARAMETER';
- case 3: return 'PARAMETER_OPT';
- case 4: return 'STATIC';
- default: return 'Problem unknown type';
- }
- }
-
private static function tablerow_class($flag){
switch($flag){
case 0: return 'info';
diff --git a/sai/modules/saimod_sys_cron/tab.tpl b/sai/modules/saimod_sys_cron/tab.tpl
index bbfaecf..3de066f 100644
--- a/sai/modules/saimod_sys_cron/tab.tpl
+++ b/sai/modules/saimod_sys_cron/tab.tpl
@@ -1,4 +1,4 @@
-
+
| class |
diff --git a/sai/modules/saimod_sys_cron/tabopt.tpl b/sai/modules/saimod_sys_cron/tabopt.tpl
index cf223b0..bb18245 100644
--- a/sai/modules/saimod_sys_cron/tabopt.tpl
+++ b/sai/modules/saimod_sys_cron/tabopt.tpl
@@ -1 +1 @@
-Group ${tab_id}
\ No newline at end of file
+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
index c1596be..b8877bb 100644
--- a/sai/modules/saimod_sys_cron/tabs.tpl
+++ b/sai/modules/saimod_sys_cron/tabs.tpl
@@ -3,7 +3,7 @@
-
+
diff --git a/system/HEADER.php b/system/HEADER.php
index 3dd8ae1..b21c85f 100644
--- a/system/HEADER.php
+++ b/system/HEADER.php
@@ -2,7 +2,6 @@
namespace SYSTEM;
class HEADER {
-
private static function checkHeader(){
$file = null;
$line = null;
@@ -15,10 +14,25 @@ class HEADER {
public static function JSON(){
if(self::checkHeader()){
header('Access-Control-Allow-Origin: *');//allow cross domain calls
- header('content-type: application/json');}
- }
+ header('content-type: application/json');}}
public static function PNG(){
if(self::checkHeader()){
- header('content-type:image/png;');}
- }
+ header('content-type:image/png;');}}
+ public static function JPG(){
+ if(self::checkHeader()){
+ header('content-type:image/jpeg;');}}
+ public static function JPEG(){
+ if(self::checkHeader()){
+ header('content-type:image/jpeg;');}}
+ public static function GIF(){
+ if(self::checkHeader()){
+ header('content-type:image/gif;');}}
+
+ public static function FILE($filename){
+ header("Content-type: application/octet-stream");
+ header("Content-Disposition: attachment; filename=\"".$filename."\"");}
+
+ public static function available($datatype){
+ $datatype = strtoupper($datatype);
+ return \method_exists('\SYSTEM\HEADER', $datatype);}
}
\ No newline at end of file