friseurteam implemented:

gallery
files
1st style
header
bam!
This commit is contained in:
Naeltard 2014-06-18 03:00:41 +02:00
parent 80bc2ddf3c
commit 8526bba954
25 changed files with 422 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 KiB

View File

@ -1,2 +1,2 @@
<?php
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/how_to/','how_to');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/page/','page');

View File

@ -11,6 +11,7 @@ class default_page extends SYSTEM\PAGE\Page {
$vars = array();
$vars['js'] = self::js();
$vars['css'] = self::css();
$vars['default_gallery'] = saimod_webcraft_gallery::getGalleryGalleria(1);
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/friseurteam.tpl'), $vars);
}

View File

@ -6,7 +6,14 @@
${js}
${css}
</head>
<body>
tralala
<body style="background: url(./api.php?call=files&cat=page&id=background_friseur.png);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;">
<div>
<img src="./api.php?call=files&cat=page&id=header_friseurteam.png">
</div>
<div style="bottom: 0; position: absolute; color: white;"><p>Friseur Team, © <a href="http://www.webcraft-media.de" target="_blank">WebCraft Media</a> 2014</p></div>
</body>
</html>

View File

@ -1,2 +1,3 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_billing_satelite','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_billing_satelite','');
require_once dirname(__FILE__).'/saimod_webcraft_gallery/autoload.inc.php';

View File

@ -1,2 +1,3 @@
<?php
\SYSTEM\SAI\sai::register('saimod_webcraft_billing_satelite');
\SYSTEM\SAI\sai::register('saimod_webcraft_gallery');

View File

@ -0,0 +1,3 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq','DBD');

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERIES extends \SYSTEM\DB\QQ {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT DISTINCT gallery FROM webcraft_gallery;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM webcraft_gallery WHERE gallery = ? ORDER BY position ASC;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_ADD extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'INSERT INTO webcraft_gallery (gallery, position, heading, description, file_cat, file_id) VALUES (?,?,?,?,?,?);'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_CHG extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'UPDATE webcraft_gallery SET gallery = ?, position = ?, heading = ?, description = ?, file_cat = ?, file_id= ? WHERE ID = ?;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_DELETE extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'DELETE FROM webcraft_gallery WHERE ID = ?;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_ID extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM webcraft_gallery WHERE gallery = ? and ID = ?;'
);}}

View File

@ -0,0 +1,93 @@
function init_saimod_webcraft_gallery() {
$('#gallerytab a').click(function (e) {e.preventDefault(); load_tab($(this).attr('gallery')); $(this).tab('show');});
register_controlls();
}
function load_tab(name){
$('#tab_gallery').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=tab&name='+name, function(){
register_controlls();
});
}
function register_controlls(){
$('.gallery_entry').click(function(){
$('#tab_gallery').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=showgalleryitem&gallery='+$(this).attr('gallery')+'&id='+$(this).attr('galleryid'), function(){
$('#input_show_file_cat').change(function(){
$('#input_show_file_id').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=select_options_id&cat='+$('#input_show_file_cat').val(),function(){
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_show_file_cat').val()+'&id='+$('#input_show_file_id').val());
});
});
$('#input_show_file_id').change(function(){
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_show_file_cat').val()+'&id='+$('#input_show_file_id').val());
});
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_show_file_cat').val()+'&id='+$('#input_show_file_id').val());
$('#btn_back').click(function(){
load_tab($(this).attr('gallery'));});
$('#btn_del').click(function(){
$.ajax({
url: SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=delgalleryitem',
type: 'GET',
data: { id : $(this).attr('galleryid')},
success: function (data) {
if(!data || !data['status']){
alert("Fail: "+data);
return;}
alert("OK: "+data);
}
});
});
$('#btn_chg').click(function(){
$.ajax({
url: SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=chggalleryitem',
type: 'GET',
data: { id : $(this).attr('galleryid'),
gallery : $('#input_show_gallery').val(),
position : $('#input_show_position').val(),
heading : $('#input_show_heading').val(),
description : $('#input_show_description').val(),
file_cat : $('#input_show_file_cat').val(),
file_id : $('#input_show_file_id').val()},
success: function (data) {
if(!data || !data['status']){
alert("Fail: "+data);
return;}
alert("OK: "+data);
}
});
});
});
});
$('.galleryadd').click(function(){
$('#tab_gallery').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=addgallery', function(){
$('#input_add_file_cat').change(function(){
$('#input_add_file_id').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=select_options_id&cat='+$('#input_add_file_cat').val(),function(){
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_add_file_cat').val()+'&id='+$('#input_add_file_id').val());
});
});
$('#input_add_file_id').change(function(){
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_add_file_cat').val()+'&id='+$('#input_add_file_id').val());
});
$('#img_preview').attr('src', './api.php?call=files&cat='+$('#input_add_file_cat').val()+'&id='+$('#input_add_file_id').val());
$('#btn_add').click(function(){
$.ajax({
url: SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=addgalleryitem',
type: 'GET',
data: { gallery : $('#input_add_gallery').val(),
position : $('#input_add_position').val(),
heading : $('#input_add_heading').val(),
description : $('#input_add_description').val(),
file_cat : $('#input_add_file_cat').val(),
file_id : $('#input_add_file_id').val()},
success: function (data) {
if(!data || !data['status']){
alert("Fail: "+data);
return;}
alert("OK: "+data);
}
});
});
$('#btn_back').click(function(){
load_tab($(this).attr('gallery'));});
});
});
}

View File

@ -0,0 +1,100 @@
<?php
class saimod_webcraft_gallery extends \SYSTEM\SAI\SaiModule {
public static function getGalleryBootstrap($id){
$gallery = \DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID::QQ(array($id));
$gallery_items = '';
$first = true;
while($img = $gallery->next()){
$img['active'] = $first ? 'active' : '';
$first = false;
$gallery_items .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webraft_gallery_gallery_item.tpl'), $img);}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webraft_gallery_gallery.tpl'),
array('gallery' => $id, 'items' => $gallery_items));
}
public static function getGalleryGalleria($id){
$gallery = \DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID::QQ(array($id));
$result = '';
while($img = $gallery->next()){
$result .= '<img class="carousel-img" src="./api.php?call=files&cat='.$img['file_cat'].'&id='.$img['file_id'].'" alt="">';}
$result .= '<script>Galleria.loadTheme(\'rhein/page/default_page/js/galleria/themes/classic/galleria.classic.min.js\');Galleria.run(\'#galleria\');</script>';
return $result;
}
public static function sai_mod_saimod_webcraft_gallery_action_addgalleryitem($gallery, $position, $heading, $description, $file_cat, $file_id){
if(!\DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_ADD::QI(array($gallery, $position, $heading, $description, $file_cat, $file_id))){
throw new SYSTEM\LOG\ERROR("Problem with adding Galleryitem!");}
return \SYSTEM\LOG\JsonResult::ok();}
public static function sai_mod_saimod_webcraft_gallery_action_delgalleryitem($id){
if(!\DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_DELETE::QI(array($id))){
throw new SYSTEM\LOG\ERROR("Problem with deleting Galleryitem!");}
return \SYSTEM\LOG\JsonResult::ok();}
public static function sai_mod_saimod_webcraft_gallery_action_chggalleryitem($id, $gallery, $position, $heading, $description, $file_cat, $file_id){
if(!\DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_CHG::QI(array($gallery, $position, $heading, $description, $file_cat, $file_id, $id))){
throw new SYSTEM\LOG\ERROR("Problem with changing Galleryitem!");}
return \SYSTEM\LOG\JsonResult::ok();}
public static function sai_mod_saimod_webcraft_gallery_action_addgallery(){
$vars = array('file_cat_options' => self::select_options_cat(), 'file_id_options' => self::sai_mod_saimod_webcraft_gallery_action_select_options_id(array_keys(\SYSTEM\FILES\files::get())[0]));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_add.tpl'),$vars);
}
private static function select_options_cat($cat = null){
$result = '';
$cats = \SYSTEM\FILES\files::get();
foreach($cats as $name=>$path){
$selected = $name == $cat ? 'selected' : '';
$result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_file_option.tpl'), array('name' => $name, 'selected' => $selected));
}
return $result;
}
public static function sai_mod_saimod_webcraft_gallery_action_select_options_id($cat, $id = null){
$result = '';
$files = \SYSTEM\FILES\files::get($cat);
foreach($files as $file){
$selected = $file == $id ? 'selected' : '';
$result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_file_option.tpl'), array('name' => $file, 'selected' => $selected));
}
return $result;
}
public static function sai_mod_saimod_webcraft_gallery_action_showgalleryitem($gallery,$id){
$vars = \DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ITEM_ID::Q1(array($gallery,$id));
$vars = array_merge($vars, array('file_cat_options' => self::select_options_cat($vars['file_cat']), 'file_id_options' => self::sai_mod_saimod_webcraft_gallery_action_select_options_id($vars['file_cat'],$vars['file_id'])));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_show.tpl'),$vars);
}
public static function sai_mod_saimod_webcraft_gallery(){
$galleries = DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERIES::QQ();
$vars = array('tabopts' => '', 'firsttab' => '');
$first = true;
while($gallery = $galleries->next()){
$gallery['active'] = $first ? 'active' : '';
if($first){$vars['firsttab'] = self::sai_mod_saimod_webcraft_gallery_action_tab($gallery['gallery']);}
$first = false;
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabopt.tpl'), $gallery);}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabs.tpl'),$vars);
}
public static function sai_mod_saimod_webcraft_gallery_action_tab($name){
$gallery = DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID::QQ(array($name));
$content = '';
while($entry = $gallery->next()){
$content .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabentry.tpl'), $entry);}
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tab.tpl'),
array('content' => $content, 'gallery' => self::getGalleryBootstrap($name)));
}
public static function html_li_menu(){return '<li><a href="#" saimenu="saimod_webcraft_gallery">Gallery</a></li><li class="divider"></li>';}
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 sai_mod_saimod_webcraft_gallery_flag_js(){
return \SYSTEM\LOG\JsonResult::toString(
array( \SYSTEM\WEBPATH(new PSAI(),'saimod_webcraft_gallery/saimod_webcraft_gallery.js')));}
public static function sai_mod_saimod_webcraft_gallery_flag_css(){
return \SYSTEM\LOG\JsonResult::toString(array());}
}

View File

@ -0,0 +1,31 @@
<h3>Add Gallery Element</h3>
<table class="table table-hover table-condensed" style="overflow: auto;">
<tr>
<td>Gallery</td>
<td><input type="number" id="input_add_gallery"/></td>
</tr>
<tr>
<td>Position</td>
<td><input type="number" id="input_add_position"/></td>
</tr>
<tr>
<td>Heading</td>
<td><input type="text" id="input_add_heading"/></td>
</tr>
<tr>
<td>Description</td>
<td><input type="text" id="input_add_description"/></td>
</tr>
<tr>
<td>File</td>
<td>
<select id="input_add_file_cat">${file_cat_options}</select>
<select id="input_add_file_id">${file_id_options}</select>
</td>
</tr>
</table>
<img id="img_preview" src="./api.php?call=files&cat=&id="/>
</br>
</br>
<input type="button" class="btn btn-success" id="btn_add" value="Add"/>
<input type="button" class="btn" id="btn_back" value="Back" gallery="1"/>

View File

@ -0,0 +1 @@
<option value="${name}" ${selected}>${name}</option>

View File

@ -0,0 +1,37 @@
<h3>Show Gallery Element</h3>
<table class="table table-hover table-condensed" style="overflow: auto;">
<tr>
<td>Gallery</td>
<td>${gallery}</td>
<td><input type="number" id="input_show_gallery" value="${gallery}"/></td>
</tr>
<tr>
<td>Position</td>
<td>${position}</td>
<td><input type="number" id="input_show_position" value="${position}"/></td>
</tr>
<tr>
<td>Heading</td>
<td>${heading}</td>
<td><input type="text" id="input_show_heading" value="${heading}"/></td>
</tr>
<tr>
<td>Description</td>
<td>${description}</td>
<td><input type="text" id="input_show_description" value="${description}"/></td>
</tr>
<tr>
<td>File</td>
<td><a href="./api.php?call=files&cat=${file_cat}&id=${file_id}">./api.php?call=files&cat=${file_cat}&id=${file_id}<a> </td>
<td>
<select id="input_show_file_cat">${file_cat_options}</select>
<select id="input_show_file_id">${file_id_options}</select>
</td>
</tr>
</table>
<img id="img_preview" src="./api.php?call=files&cat=${file_cat}&id=${file_id}"/>
</br>
</br>
<input type="button" class="btn btn-success" id="btn_chg" galleryid="${ID}"value="Change"/>
<input type="button" class="btn btn-danger" id="btn_del" galleryid="${ID}" value="Delete"/>
<input type="button" class="btn" id="btn_back" value="Back" gallery="${gallery}"/>

View File

@ -0,0 +1,20 @@
${gallery}
<table class="table table-hover table-condensed" style="overflow: auto;">
<tr>
<th>ID</th>
<th>Gallery</th>
<th>Position</th>
<th>Heading</th>
<th>Description</th>
<th>File</th>
</tr>
${content}
<tr>
<th><input type="button" class="btn btn-success galleryadd" value="Add"/></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</table>

View File

@ -0,0 +1,8 @@
<tr class="gallery_entry" gallery="${gallery}" galleryid="${ID}">
<td>${ID}</td>
<td>${gallery}</td>
<td>${position}</td>
<td>${heading}</td>
<td>${description}</td>
<td><a href="./api.php?call=files&cat=${file_cat}&id=${file_id}">./api.php?call=files&cat=${file_cat}&id=${file_id}<a></td>
</tr>

View File

@ -0,0 +1 @@
<li class="${active}"><a href="#tab_gallery" gallery="${gallery}">Gallery ${gallery}</a></li>

View File

@ -0,0 +1,10 @@
<h4>Gallery</h4>
<hr>
<div class="tabbable">
<ul class="nav nav-tabs" id="gallerytab">
${tabopts}
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_gallery">${firsttab}</div>
</div>
</div>

View File

@ -0,0 +1,5 @@
<div id="gallery_${gallery}" class="carousel slide" style="">
<div class="carousel-inner">${items}</div>
<a class="carousel-control left" href="#gallery_${gallery}" data-slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#gallery_${gallery}" data-slide="next">&rsaquo;</a>
</div>

View File

@ -0,0 +1,7 @@
<div class="item ${active}">
<img class="carousel-img" src="./api.php?call=files&cat=${file_cat}&id=${file_id}" alt="">
<div class="carousel-caption">
<h4>${heading}</h4>
<p>${description}</p>
</div>
</div>

View File

@ -0,0 +1,26 @@
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5000, 42, 0, 0, 'saimod_webcraft_gallery', 'action', NULL);
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5001, 42, 2, 5000, 'showgalleryitem', 'gallery', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5002, 42, 2, 5000, 'showgalleryitem', 'id', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5005, 42, 2, 5000, 'addgalleryitem', 'gallery', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5006, 42, 2, 5000, 'addgalleryitem', 'position', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5007, 42, 2, 5000, 'addgalleryitem', 'heading', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5008, 42, 2, 5000, 'addgalleryitem', 'description', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5009, 42, 2, 5000, 'addgalleryitem', 'file_cat', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5010, 42, 2, 5000, 'addgalleryitem', 'file_id', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5015, 42, 2, 5000, 'delgalleryitem', 'id', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5020, 42, 2, 5000, 'select_options_id', 'cat', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5021, 42, 3, 5000, 'select_options_id', 'id', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5025, 42, 2, 5000, 'chggalleryitem', 'id', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5026, 42, 2, 5000, 'chggalleryitem', 'gallery', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5027, 42, 2, 5000, 'chggalleryitem', 'position', 'UINT0');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5028, 42, 2, 5000, 'chggalleryitem', 'heading', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5029, 42, 2, 5000, 'chggalleryitem', 'description', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5030, 42, 2, 5000, 'chggalleryitem', 'file_cat', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5031, 42, 2, 5000, 'chggalleryitem', 'file_id', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5035, 42, 2, 5000, 'tab', 'name', 'UINT0');