<?php

// Edit record -> built Edit-Form
$tpl = new MSDTemplate();
$tpl->set_filenames(array('show' => './tpl/sqlbrowser/sql_record_update_inputmask.tpl'));
$target = $mode == "searchedit" ? '?mode=searchedit' : '?mode=update';
// jump back to search hit list after saving
$fields = getExtendedFieldInfo($db, $tablename);
$sqledit = "SELECT * FROM `{$tablename}` WHERE " . $recordkey;
$res = MSD_query($sqledit);
$record = mysqli_fetch_array($res, MYSQLI_ASSOC);
// get the record
$num = sizeof($record);
// get the nr of fields of the record
// iterate fields
$x = 0;
$fieldnames = '';
foreach ($record as $field => $fieldvalue) {
    $fieldnames .= $field . '|';
    $tpl->assign_block_vars('ROW', array('CLASS' => $x % 2 ? 1 : 2, 'FIELD_NAME' => $field, 'FIELD_VALUE' => my_quotes($fieldvalue), 'FIELD_ID' => correct_post_index($field)));
    if ('YES' == $fields[$field]['null']) {
        //field is nullable - precheck checkbox if value is null
        $tpl->assign_block_vars('ROW.IS_NULLABLE', array('NULL_CHECKED' => is_null($fieldvalue) ? ' checked="checked"' : ''));
    }
    $type = strtoupper($fields[$field]['type']);
    if (in_array($type, array('BLOB', 'TEXT'))) {
        $tpl->assign_block_vars('ROW.IS_TEXTAREA', array());
    } else {
        $tpl->assign_block_vars('ROW.IS_TEXTINPUT', array());
    }
    $x++;
<?php

/**
 * This file is part of MySQLDumper released under the GNU/GPL 2 license
 * http://www.mysqldumper.net
 *
 * @package         MySQLDumper
 * @version         SVN: $rev: 1205 $
 * @author          $Author$
 * @lastmodified    $Date$
 * @filesource      $URL$
 */
echo 'bla';
die;
if (!defined('MSD_VERSION')) {
    die('No direct access.');
}
$checkit = isset($_GET['checkit']) ? base64_decode($_GET['checkit']) : '';
$repair = isset($_GET['repair']) ? base64_decode($_GET['repair']) : 0;
$tables = isset($_POST['table']) ? $_POST['table'] : array();
$sort_by_column = isset($_POST['sort_by_column']) ? $_POST['sort_by_column'] : 'name';
$sort_direction = isset($_POST['sort_direction']) ? $_POST['sort_direction'] : 'a';
$db = isset($_GET['db']) ? base64_decode($_GET['db']) : $config['db_actual'];
$tablename = isset($_GET['tablename']) ? base64_decode($_GET['tablename']) : '';
mysql_select_db($db, $config['dbconnection']);
$table_infos = getExtendedFieldInfo($db, $tablename);
//v($table_infos);
$tpl_sqlbrowser_table_edit_table = new MSDTemplate();
$tpl_sqlbrowser_table_edit_table->set_filenames(array('tpl_sqlbrowser_table_edit_field' => 'tpl/sqlbrowser/table/edit_field.tpl'));
$tpl_sqlbrowser_table_edit_table->assign_vars(array('DB' => $db, 'TABLE' => $tablename));
$tpl_sqlbrowser_table_edit_table->assign_block_vars('ROW', array());