'; ?>
Edit Metadata
just save GUI description elseif ($mySave == '2') { if($SYS_DBTYPE=='pgsql') { $sql[0] = "SET AUTOCOMMIT=1"; } else { $sql[0] = "SET AUTOCOMMIT=0"; } $sql[1] = "BEGIN"; $sql[3] = "UPDATE gui SET gui_description = '". $guiDesc."' WHERE gui_id ='".$guiId."'"; } foreach ($sql as $mysql){ $res = db_query($mysql); if(!$res){break;} } if($res){ $res = db_query( "COMMIT"); $res = db_query( "SET AUTOCOMMIT=1"); } else{ $res = db_query( "ROLLBACK"); $res = db_query( "SET AUTOCOMMIT=1"); } if(isset($sql_vars)){//sicherstellen das keine Element_Vars gelöscht wurden while($row = db_fetch_array($res_vars)){ $securesql = "INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,type) VALUES ('".$guiList1."','".$e_id."','".$row["var_name"]."','".$row["var_value"]."','".$row["context"]."','".$row["type"]."');"; //echo $securesql."
"; $secureinsert = db_query($securesql); } } if(!$res){break;} } if(isset($myDelete) && $myDelete == '1'){ $sql = "DELETE FROM gui_element WHERE e_id = '".$e_id."' AND fkey_gui_id = '".$guiList1."'"; $res = db_query($sql); $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = ""; $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = ""; $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = ""; $e_target = ""; $e_requires = ""; } if(isset($myShow) && $myShow == '1'){ $_SESSION["mb_user_myGui"] = $guiList1; echo ""; } if(isset($all) && $all == '1'){ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = '".$guiList2."'"; $res = db_query($sql); $cnt = 0; while(db_fetch_row($res)){ $sql_del = "DELETE FROM gui_element WHERE fkey_gui_id = '".$guiList1."' AND e_id = '".db_result($res,$cnt,"e_id")."'"; $res_del = db_query($sql_del); if(db_result($res,$cnt,"e_left") == ""){$myleft = 'NULL';} else{$myleft = db_result($res,$cnt,"e_left");} if(db_result($res,$cnt,"e_top") == ""){$mytop = 'NULL';} else{$mytop = db_result($res,$cnt,"e_top");} if(db_result($res,$cnt,"e_width") == ""){$mywidth = 'NULL';} else{$mywidth = db_result($res,$cnt,"e_width");} if(db_result($res,$cnt,"e_height") == ""){$myheight = 'NULL';} else{$myheight = db_result($res,$cnt,"e_height");} if(db_result($res,$cnt,"e_z_index") == ""){$my_z_index = 'NULL';} else{$my_z_index = db_result($res,$cnt,"e_z_index");} $sql_ins = "INSERT INTO gui_element(fkey_gui_id,e_id,e_pos,e_public,e_comment,e_element,e_src,e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,e_content,e_closetag,e_js_file,e_mb_mod,e_target,e_requires) "; $sql_ins .= "VALUES ('".$guiList1."','".db_result($res,$cnt,"e_id")."','".db_result($res,$cnt,"e_pos")."','".db_result($res,$cnt,"e_public")."','".db_escape_string(db_result($res,$cnt,"e_comment"))."','".db_result($res,$cnt,"e_element")."','".db_result($res,$cnt,"e_src")."','".db_escape_string(db_result($res,$cnt,"e_attributes"))."',".$myleft.","; $sql_ins .= $mytop.",".$mywidth.",".$myheight.",".$my_z_index.",'".db_result($res,$cnt,"e_more_styles")."','".db_escape_string(db_result($res,$cnt,"e_content"))."','".db_result($res,$cnt,"e_closetag")."','".db_result($res,$cnt,"e_js_file")."','".db_result($res,$cnt,"e_mb_mod")."','".db_result($res,$cnt,"e_target")."','".db_result($res,$cnt,"e_requires")."')"; $res_ins = db_query($sql_ins); if(!$res_ins){echo db_error($con); } $cnt++; } $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = '".$guiList2."'"; $res = db_query($sql); $cnt = 0; while(db_fetch_row($res)){ $sql_ins2 = "INSERT INTO gui_element_vars(fkey_gui_id,fkey_e_id,var_name,var_value,context,type) "; $sql_ins2 .= "VALUES ('".$guiList1."','".db_result($res,$cnt,"fkey_e_id")."','".db_result($res,$cnt,"var_name")."','".db_escape_string(db_result($res,$cnt,"var_value"))."','".db_escape_string(db_result($res,$cnt,"context"))."','".db_result($res,$cnt,"type")."')"; $res_ins2 = db_query($sql_ins2); if(!$res_ins2){echo db_error($connect); } $cnt++; } } # end echo ""; ?> getGuisByOwner($_SESSION["mb_user_id"]); $permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"]); echo "
\n"; $sql = "SELECT * from gui WHERE gui.gui_id IN("; for($i=0; $i
0){ $sql .= ",";} $sql .= "'".$ownguis[$i]."'"; } $sql .= ")"; //echo $sql; $res = db_query($sql); $count=0; while(db_fetch_row($res)){ $gui_id_own[$count]=db_result($res,$count,"gui_id"); $gui_name_own[$count]=db_result($res,$count,"gui_name"); $gui_description_own[$count]=db_result($res,$count,"gui_description"); $count++; } $sql = "SELECT * from gui WHERE gui.gui_id IN("; for($i=0; $i
0){ $sql .= ",";} $sql .= "'".$permguis[$i]."'"; } $sql .= ")"; $res = db_query($sql); $count=0; while($row = db_fetch_array($res)){ $gui_id_perm[$count]= $row["gui_id"]; $gui_name_perm[$count]=$row["gui_name"]; $gui_description_perm[$count]=$row["gui_description"]; $count++; } #Gui to edit if(!isset($guiList1)){ echo "
GUI:
\n"; echo "
\n"; for ($i=0; $i
".$gui_name_own[$i]."\n"; } echo "
\n"; for ($i=0; $i
\n"; echo "
\n"; } echo "
\n"; } else{ echo "
"; echo "Edit Elements: ".$guiList1; // set guiDesc and guiId if guiList1 has just been selected if (!$guiDesc) { $Desc = "guiDesc_" . $guiList1; $guiDesc = $$Desc; } if (!$guiId) { $Id = "guiId_" . $guiList1; $guiId = $$Id; } echo " (" . $guiDesc; echo "
) \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; } #Depot if(isset($guiList1)){ echo "
\n"; echo "
GUI...
\n"; for ($i=0; $i
".$gui_name_perm[$i]."\n"; } echo "
\n"; if($guiList1 != $guiList2){echo "
\n";} } #Elements if(isset($guiList2)){ if($guiList1 == $guiList2){ echo "
Edit Element:
\n"; } else{ echo "
Templates
\n"; } $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = '".$guiList2."' ORDER BY e_id"; $res = db_query($sql); $cnt = 0; echo "
\n
\n"; while(db_fetch_row($res)){ echo "
\n"; echo "
\n"; echo "
"; if(db_result($res,$cnt,"e_public") == 1){echo "
on
";} echo "
\n"; echo "
"; echo "
"; echo db_result($res,$cnt,"e_id"); echo "
\n
\n"; echo "
".db_result($res,$cnt,"e_comment")."
"; echo "
\n"; $cnt++; } echo "
\n
\n"; } #Formular: echo "
\n"; if(isset($myElement)){ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = '".$guiList2."' AND e_id = '".$myElement."'"; $res = db_query($sql); if(db_fetch_row($res)){ echo "
ID:
\n"; echo "
Position:
\n"; echo "
ON/OFF:
\n"; echo "
Comment:
".stripslashes(db_result($res,0,"e_comment"))."
\n"; echo "
HTML-TAG:
\n"; echo "
SRC:
\n"; echo "
Attributes:
".stripslashes(db_result($res,0,"e_attributes"))."
\n"; echo "
Left:
\n"; echo "
Top:
\n"; echo "
Width:
\n"; echo "
Height:
\n"; echo "
Z-INDEX:
\n"; echo "
Styles:
\n"; echo "
Content:
".stripslashes(db_result($res,0,"e_content"))."
\n"; echo "
Close-TAG:
\n"; echo "
JavaScript:
\n"; echo "
Modul:
\n"; echo "
Target:
\n"; echo "
Requires:
\n"; } echo "
"; } else if(isset($guiList1)){ echo "
ID:
\n"; echo "
Position:
\n"; echo "
Public:
\n"; echo "
Comment:
".stripslashes($e_comment)."
\n"; echo "
HTML-TAG:
\n"; echo "
SRC:
\n"; echo "
Attributes:
".stripslashes($e_attributes)."
\n"; echo "
Left:
\n"; echo "
Top:
\n"; echo "
Width:
\n"; echo "
Height:
\n"; echo "
Z-INDEX:
\n"; echo "
Styles:
\n"; echo "
Content:
".stripslashes($e_content)."
\n"; echo "
Close-TAG:
\n"; echo "
JavaScript:
\n"; echo "
Modul:
\n"; echo "
Target:
\n"; echo "
Requires:
\n"; } echo "\n"; ?>