'4.1' ? " ENGINE=$type DEFAULT CHARSET=$dbcharset" : " TYPE=$type");
}
function daddslashes($string) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = daddslashes($val, $force);
}
} else {
$string = addslashes($string);
}
return $string;
}
function dir_writeable($dir) {
if(!is_dir($dir)) {
@mkdir($dir, 0777);
}
if(is_dir($dir)) {
if($fp = @fopen("$dir/test.test", 'w')) {
@fclose($fp);
@unlink("$dir/test.test");
$writeable = 1;
} else {
$writeable = 0;
}
}
return $writeable;
}
function dir_clear($dir) {
global $lang;
showjsmessage($lang['clear_dir'].' '.$dir);
$directory = dir($dir);
while($entry = $directory->read()) {
$filename = $dir.'/'.$entry;
if(is_file($filename)) {
@unlink($filename);
}
}
$directory->close();
result(1, 1, 0);
}
function instheader() {
global $charset;
echo "
".
"".
"
Project Parasy v1.5 Installer
";
}
function header2() {
echo "
";
}
function step($action) {
if (!$action) {
$start ="current";
} elseif ($action == 'install') {
$install ="current";
} elseif ($action == 'tpl') {
$tpl ="current";
} elseif ($action =='plugins') {
$plugins ="current";
} elseif ($action == 'setting'){
$setting ="current";
} elseif ($action == 'final'){
$final ="current";
}
echo"";
}
function instfooter() {
global $version;
echo "
|
".
"| ".
"Powered by Project Parasynthesis".
"".
" |
".
"
";
}
function instmsg($message, $url_forward = '') {
global $lang, $msglang;
instheader();
$message = $msglang[$message] ? $msglang[$message] : $message;
if($url_forward) {
$message .= "