Example #1
0
        print get_table_def($DB['name'], $Xtbl, $ctrn) . ";" . $ctrn;
        if ($dump_type == 'dump_all') {
            print "{$ctrn}{$ctrn}";
            print "#---------------------------------------------------------" . $ctrn;
            print "# " . $Xtbl . " INSERT DATA" . $ctrn;
            print "# --------------------------------------------------------" . $ctrn . $ctrn;
            get_table_content($DB['name'], $Xtbl, "my_handler", urldecode($SQL));
        }
    }
    exit;
}
if ($_a == 'table_excel') {
    header("Content-type: application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename=" . $Xtbl . ".xls");
    header("Content-Description: PHP4 Generated Data");
    get_excel_content($DB['name'], $Xtbl, urldecode($SQL));
    exit;
}
if ($_a == 'field_alter') {
    if ($field_default || $field_default == "0") {
        $field_default_str = "DEFAULT '" . $field_default . "'";
    }
    if ($field_null) {
        $field_null_str = "NOT NULL";
    }
    if ($field_type != 'TEXT' && $field_type != 'MEDIUMTEXT') {
        $field_length_str = "( " . $field_length . " )";
    } else {
        $field_default_str = "";
    }
    if ($new == 'yes') {
Example #2
0
}
if ($action == 'table_excel') {
    header("Content-type: application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename={$table}.xls");
    header("Content-Description: PHP4 Generated Data");
    ?>
	<HTML>
	<HEAD>
	<META http-equiv="Content-Type" content="text/html; charset=euc-kr">
	<STYLE type="text/css">
	body,table,tr,td { font-size: 9pt; font-family: gullim; line-height: 1.0;}
	</STYLE>

	<BODY LEFTMARGIN=0 TOPMARGIN=0>
	<?php 
    get_excel_content($MYSQL_DB, $table, urldecode(stripslashes($SQL)));
    ?>
	</BODY>
	</HTML>
	<?php 
    exit;
}
if ($action == 'field_alter') {
    if ($field_default || $field_default == "0") {
        $field_default_str = "DEFAULT '{$field_default}'";
    }
    if ($field_null) {
        $field_null_str = "NOT NULL";
    }
    if ($field_type != 'TEXT' && $field_type != 'MEDIUMTEXT') {
        $field_length_str = "( {$field_length} )";