<?php
$translation        = \DynCom\mysyde\common\classes\Registry::get("translation");
$formname           = "bewerber_forms";
$input_page_id      = (isset($_REQUEST["input_page_id"]) ? $_REQUEST["input_page_id"] : "");
$input_component_id = (isset($_REQUEST["input_component_id"]) ? $_REQUEST["input_component_id"] : "");
$is_survey = 0;
if(isset($_GET["level_2"]) && $_GET["level_2"] == 'survey_forms'){
    $is_survey = 1;
}
$query  = 'SELECT * FROM google_recaptcha';
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
$grecaptcha = @mysqli_fetch_array($result);
$reCaptchaDisabled = false;
 
if ($grecaptcha["secretkey"] == "" && $grecaptcha["websitekey"] == "") {
    $reCaptchaDisabled = true;
}
?>

    <div id="overlaycrumb">
        <?php if ($input_tableform["id"] == "") {
              
                echo $translation->get("new_tableform");
             
            
        } else {
             
                echo $translation->get("edit_tableform");
          
           
        }
        ?>
        <div id="closeoverlay" onclick="disableOverlay();"></div>
    </div>

    <ul class="toolbar_menu">
        <?php
 
         

        // Speichern button
        button("save", $translation->get("save"), $formname, "loadCard('save_tableform', true)");

        // Speichern und schliessen
        button("save", $translation->get("save_and_close"), $formname, "loadCard('save_tableform', true, '', true)");
        ?>
        <li>
            <ul>
                <?php
                // Loeschen  button
                if ($input_tableform["id"] != "" && is_page_edit() === FALSE && is_component_edit() === FALSE) {
                    echo button("delete", $translation->get("delete"), $formname, "loadCard('delete_tableform', true, '{$translation->get('delete_data_confirm')}', true)", "", FALSE);
                }

               
                ?>
            </ul>
        </li>
    </ul>
    <div class="clearfixs"></div>

<?php
if (count($messages)) {
    echo '<div id="overlayMessages">' . join("\r\n", $messages) . '</div>';
}
?>

    <form id="<?= $formname ?>" name="<?= $formname ?>" method="post">
        <input name="input_id" type="hidden" value="<?= $input_tableform["id"] ?>">
        <input type="hidden" name="get_real_page_link_id" value="1" />
       
        
        
        <table class="cardform" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <? input($translation->get("description"), "input_description", "text", $input_tableform["description"], 255) ?>
                    <? input($translation->get("Code"), "input_code", "text", $input_tableform["code"], 255) ?>
                    <? input($translation->get("rows"), "no_rows", "number", $input_tableform["no_rows"], 255) ?>
                    <? input($translation->get("columns"), "no_columns", "number", $input_tableform["no_columns"], 255) ?>
                   
                </td>
                <td>
                    

                     
                    <?php
                    if ($input_tableform["id"] != "") {
                        show_changed_on($input_tableform["id"], "table_header");
                        show_changed_by($input_tableform["id"], "table_header");
                    }
                    ?>
                </td>
            </tr> 
             
                 
                    

                     
                    <?php
                    if ($input_tableform["id"] != "") {
                        create_table_set($input_tableform);
                    }
                    ?>
                 
            

        </table>
    </form>
    <br />
<?
 
?>