';
return $result;
}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_edit($id, $lang, $newtext){
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = null;
if(\SYSTEM\system::isSystemDbInfoPG()){
throw new \SYSTEM\LOG\ERROR("action_edit failed");
} else {
$res = $con->prepare('newText' ,'UPDATE system_locale_string SET '.$lang.'=? WHERE id=?;', array($newtext, $id));
}
return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no rows affected")) : \SYSTEM\LOG\JsonResult::ok();
}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_add($id, $lang, $newtext){
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = null;
if(\SYSTEM\system::isSystemDbInfoPG()){
throw new \SYSTEM\LOG\ERROR("action_edit failed");
} else {
$res = $con->prepare('addText' ,'INSERT INTO system_locale_string (id, '.$lang.', category) VALUES (?, ?, 100);', array($id, $newtext));
}
return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no data added")) : \SYSTEM\LOG\JsonResult::ok();
}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_addcontent(){
$result = "
Add new text
";
$result .= '
';
return $result;
}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_delete($id){
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = null;
if(\SYSTEM\system::isSystemDbInfoPG()){
throw new \SYSTEM\LOG\ERROR("action_delete failed");
} else {
$res = $con->prepare('deleteText' ,'DELETE FROM system_locale_string WHERE id=?;', array($id));
}
return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("could not delete the permitted data")) : \SYSTEM\LOG\JsonResult::ok();
}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_action_editmode($entry){
$result =
'
'.$entry.'
'.
'
'.
'
';
foreach (self::getLanguages() as $lang){
$result .= '
'.$lang.'
';
$languages[] = $lang;
}
$result .= '
';
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = null;
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->prepare( 'edit',
'SELECT * FROM system.locale_string WHERE id = $1 ORDER BY "category" ASC;',
array($entry));
} else {
$res = $con->prepare( 'edit',
'SELECT * FROM system_locale_string WHERE id = ? ORDER BY "category" ASC;',
array($entry));
}
while($r = $res->next()){
$result .= "
';}
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__SYSTEM_SAI_saimod_sys_locale_flag_css(){}
public static function sai_mod__SYSTEM_SAI_saimod_sys_locale_flag_js(){
return \SYSTEM\LOG\JsonResult::toString(
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/saimod_sys_locale_submit.js'),
\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_locale/tinymce/tinymce.min.js')));}
}