示例#1
0
 }
 echo "{$rowsSaved} Rows saved!<br>";
 if (isset($_POST['append_row'])) {
     $rs->append();
     echo "1 Row appended!<br>";
 }
 echo "colCount: {$colCount}<br>";
 for ($i = 0; $i < $colCount; ++$i) {
     if (isset($_POST['dupCol' . $i])) {
         $rs->duplicateColumn($i);
         echo "Column {$i} duplicated!<br>";
     }
 }
 for ($i = 0; $i < $colCount; ++$i) {
     if (isset($_POST['delCol' . $i])) {
         $rs->removeColumn($i);
         echo "Column {$i} deleted!<br>";
     }
 }
 $fd = fopen($table_file, "wb");
 $rp = new ResultSetParser();
 $rp->parseResultSetIntoFile($fd, $rs);
 fclose($fd);
 if (isset($_POST['close_table'])) {
     echo "<br>";
     echo "Table saved and closed, klick <a href='" . $_SERVER['PHP_SELF'] . "'> here </a> to continue";
     $_SESSION['mode'] = 'choose_table';
     unset($_SESSION['table_file']);
     echo "<meta http-equiv='refresh' content='1;URL=" . $_SERVER['PHP_SELF'] . "'>";
 } else {
     $_SESSION['mode'] = 'edit_table';