Beispiel #1
0
function editKoneData($spojeni)
{
    $idmenu = $_GET["idm"];
    if ($idmenu) {
        ZobrazUvod($spojeni, 1, 1);
        $sql = "SELECT * from konemenu where id={$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=editKoneData">
                <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"];
        ?>
"></td>
                </tr>
                </tr>
                </table>
            </form>
          <?php 
    } else {
        $text = $_POST["text"];
        $idm = $_POST["iddata"];
        $sql = "UPDATE konemenu SET text='{$text}' where id={$idm}";
        $res = PrSql($spojeni, $sql);
        zobrazKoneMenu($spojeni);
    }
}
Beispiel #2
0
          <div class="slider-right">				        
            <div class="slidesa">   				                      
              <div id="karta-domu33"> 
    
   <div id="text-admin">
  <?php 
$cmd = $_GET["cmd"];
switch ($cmd) {
    case "prKoneMenu":
        prKoneMenu($spojeni);
        break;
    case "editKoneData":
        editKoneData($spojeni);
        break;
    case "zobrazKoneMenu":
        zobrazKoneMenu($spojeni);
        break;
    case "zobrazhlavni_Menu":
        zobrazHlavni_Menu($spojeni);
        break;
    case "edithlavni_Data":
        $idm = $_GET["idm"];
        $_SESSION["idhmenu"] = $idm;
        editHlavni_Data($spojeni);
        break;
    case "zobrazcontent_Menu":
        $idm = $_GET["idm"];
        $_SESSION["idhmenu"] = $idm;
        zobrazContent_Menu($spojeni);
        break;
    case "prcontent_Menu":