Exemplo n.º 1
0
                            $outstr = explode("','", $outstr);
                            $outstr = str_replace("''", "'", $outstr);
                            $outstr = str_replace('"', '\\"', $outstr);
                            $outstr = implode('",' . PHP_EOL . $indent . '"', $outstr);
                            echo_buffer("  'values'   => array(" . PHP_EOL . $indent . '"' . $outstr . '"),');
                        }
                        // automatic support for Default values
                        if ($row[4] != '' && $row[4] != 'NULL') {
                            echo_buffer("  'default'  => '" . $row[4] . "',");
                        } else {
                            if ($auto_increment) {
                                echo_buffer("  'default'  => '0',");
                            }
                        }
                        // check for table constraints
                        $outstr = check_constraints($tb, $fd);
                        if ($outstr != '') {
                            echo_buffer($outstr);
                        }
                        echo_buffer("  'sort'     => true");
                        //echo_buffer("  'nowrap'   => false,");
                        echo_buffer(');');
                    }
                    echo_buffer("\r\n// Now important call to phpMyEdit\r\nrequire_once 'phpMyEdit.class.php';\r\nnew phpMyEdit(\$opts);\r\n\r\n?>\r\n");
                    $css_directive = <<<END
<style type="text/css">
\thr.pme-hr\t\t     { border: 0px solid; padding: 0px; margin: 0px; border-top-width: 1px; height: 1px; }
\ttable.pme-main \t     { border: #004d9c 1px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
\ttable.pme-navigation { border: #004d9c 0px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
\ttd.pme-navigation-0, td.pme-navigation-1 { white-space: nowrap; }
\tth.pme-header\t     { border: #004d9c 1px solid; padding: 4px; background: #add8e6; }
Exemplo n.º 2
0
		}
		return "{".implode(', ', $pairs)."}";
	}
}

$response = array();
foreach (array_keys($_FILES) as $name) {
	$file = reason_get_uploaded_file($name);
	$filename = $file->get_filename();
	
	$constraints = (!empty($session['constraints'][$name]))
		? $session['constraints'][$name]
		: null;
	
	if ($constraints) {
		check_constraints($constraints, $file);
	}
	
	$m = array();
	if (preg_match('/((?:\.tar)?\.[a-zA-Z0-9]+)$/', $filename, $m)) {
		$extension = strtolower($m[0]);
	} else {
		$extension = '';
	}
	
	$unique_name = sha1(uniqid(mt_rand(), true));
	$temp_uri = WEB_TEMP.$unique_name.strtolower($extension);
	$temp_path = $_SERVER['DOCUMENT_ROOT'].$temp_uri;
	$unscaled_path = null;
	$filesize = $file->get_size();