function editHlavni_Data($spojeni) { $idmenu = $_GET["idm"]; if ($idmenu) { ZobrazUvod($spojeni, 1, 2); $sql = "SELECT * from hlavni_Menu where id_hlavni_Menu={$idmenu}"; $res = PrSql($spojeni, $sql); $pocet = mysqli_num_rows($res); $zaznam = mysqli_fetch_array($res); $text = $zaznam["text"]; $butt = "Uložit"; ?> <form name="dataMenuT" ENCTYPE="multipart/form-data" method="post" action="?cmd=edithlavni_Data"> <table> <td><textarea id="e1m1" name="text"><?php echo $text; ?> </textarea></td> <tr> <td align="center"><input type="submit" name="<?php echo $butt; ?> " value="Uložit text"><input name="iddata" type="hidden" value="<?php echo $zaznam["id_hlavni_Menu"]; ?> "></td> </tr> </tr> </table> </form> <?php } else { $text = mysqli_real_escape_string($spojeni, $_POST["text"]); $idm = $_POST["iddata"]; $sql = "UPDATE hlavni_Menu SET text='{$text}' where id_hlavni_Menu={$idm}"; $res = PrSql($spojeni, $sql); zobrazHlavni_Menu($spojeni); } }
break; case "editdata_Domy": $iddum = $_GET["idm"]; $_SESSION["iddomy_Menu"] = $iddum; editData_Domy($spojeni); break; case "zobrazLDolniMenu": zobrazLDolniMenu($spojeni); break; case "zobrazcontent_Menu": $idm = $_GET["idm"]; $_SESSION["idhmenu"] = $idm; zobrazContent_Menu($spojeni); break; case "zobrazhlavni_Menu": zobrazHlavni_Menu($spojeni); break; case "edithlavni_Data": $idm = $_GET["idm"]; $_SESSION["idhmenu"] = $idm; editHlavni_Data($spojeni); break; case "zobrazUvodniText": edit_Uvodni_Text($spojeni); break; default: zobrazAdministraci($spojeni); } ?> </div>