コード例 #1
0
ファイル: tbl_change.php プロジェクト: poush/phpmyadmin
$GLOBALS['plugin_scripts'] = array();
foreach ($rows as $row_id => $current_row) {
    if (empty($current_row)) {
        $current_row = array();
    }
    $jsvkey = $row_id;
    $vkey = '[multi_edit][' . $jsvkey . ']';
    $current_result = isset($result) && is_array($result) && isset($result[$row_id]) ? $result[$row_id] : $result;
    $repopulate = array();
    $checked = true;
    if (isset($unsaved_values[$row_id])) {
        $repopulate = $unsaved_values[$row_id];
        $checked = false;
    }
    if ($insert_mode && $row_id > 0) {
        $html_output .= PMA_getHtmlForIgnoreOption($row_id, $checked);
    }
    $html_output .= PMA_getHtmlForInsertEditRow($url_params, $table_columns, $comments_map, $timestamp_seen, $current_result, $chg_evt_handler, $jsvkey, $vkey, $insert_mode, $current_row, $o_rows, $tabindex, $columns_cnt, $is_upload, $tabindex_for_function, $foreigners, $tabindex_for_null, $tabindex_for_value, $table, $db, $row_id, $titles, $biggest_max_file_size, $text_dir, $repopulate, $where_clause_array);
}
// end foreach on multi-edit
$scripts->addFiles($GLOBALS['plugin_scripts']);
unset($unsaved_values, $checked, $repopulate, $GLOBALS['plugin_scripts']);
if (!isset($after_insert)) {
    $after_insert = 'back';
}
//action panel
$html_output .= PMA_getActionsPanel($where_clause, $after_insert, $tabindex, $tabindex_for_value, $found_unique_key);
if ($biggest_max_file_size > 0) {
    $html_output .= '        ' . Util::generateHiddenMaxFileSize($biggest_max_file_size) . "\n";
}
$html_output .= '</form>';
コード例 #2
0
 /**
  * Test for PMA_getHtmlForIgnoreOption
  *
  * @return void
  */
 public function testGetHtmlForIgnoreOption()
 {
     $expected = '<input type="checkbox" %sname="insert_ignore_1"' . ' id="insert_ignore_1" /><label for="insert_ignore_1">' . 'Ignore</label><br />' . "\n";
     $checked = 'checked="checked" ';
     $this->assertEquals(sprintf($expected, $checked), PMA_getHtmlForIgnoreOption(1));
     $this->assertEquals(sprintf($expected, ''), PMA_getHtmlForIgnoreOption(1, false));
 }