팝업레이어 알림

기사님께 알려드립니다.^^
모델, 차대번호 정확하게 입력해 주세요.
틀릴 경우 결제가 되지 않습니다.
착불이거나 선불일 경우는
바탕색이 노란색입니다.
인지하시고 착오가 없도록 해주세요.~~
rn";
echo " alert("".$msg."");rn";
echo " history.back();rn";
echo "";
exit();
}
// ���丮 ��°�� �����ϱ�....
function rm($fileglob) {
if (is_string($fileglob)) {
if (is_file($fileglob)) {
return unlink($fileglob);
} else if (is_dir($fileglob)) {
$ok = rm("$fileglob/*");
if (! $ok) {
return false;
}
return rmdir($fileglob);
} else {
$matching = glob($fileglob);
if ($matching === false) {
trigger_error(sprintf('No files match supplied glob %s', $fileglob), E_USER_WARNING);
return false;
}
$rcs = array_map('rm', $matching);
if (in_array(false, $rcs)) {
return false;
}
}
} else if (is_array($fileglob)) {
$rcs = array_map('rm', $fileglob);
if (in_array(false, $rcs)) {
return false;
}
} else {
trigger_error('Param #1 must be filename or glob pattern, or array of filenames or glob patterns', E_USER_ERROR);
return false;
}
return true;
}
// ���ε� ���� ���丮
$up_path = "../upload";
$zip_dir = "../upload/tmp_zip";
// tmp ���丮 ����� ���ؼ� file_dir �����
$tmp = microtime();
$tmp2 = explode(" ",$tmp);
$file_dir = $tmp2[1].sprintf("%03d",(int)($tmp2[0]*1000));
$tmp=null;
$tmp2=null;
// tmp ���丮
$tmp_dir = $zip_dir."/".$file_dir;
// tmp ���丮 ����
if(!mkdir ($tmp_dir, 0700)) {
error("���� ������ ������ ���߽��ϴ�.");
exit;
}
$sql = "SELECT id, filename FROM table";
$result = mysql_query($sql);
$i=0;
while($row = mysql_fetch_assoc($result)) {
$org_name = "/".$row[file_name];
$new_name = "/".$id."_".$row[file_name];
// tmp ���丮�� COPY
@copy($up_path.$org_name,$tmp_dir.$new_name);
$i++;
}
mysql_free_result($result);
mysql_close();
if (!$i) {
rm($tmp_dir);
error("���õ� ������ �����ϴ�.");
exit;
}
// zip ���� ����
// zip ��δ� �������� which zip �� ���ؼ� �˾Ƴ���.
@exec("/usr/bin/zip ".$tmp_dir."/".$file_dir.".zip ".$tmp_dir."/*");
// �ٿ�ε� �ޱ�
if( $fp = @fopen( $tmp_dir."/".$file_dir.".zip","r")) {
Header("Content-type: file/unknown");
Header("Content-Disposition: attachment; filename=".$file_dir.".zip");
Header("Content-Description: PHP3 Generated Data");
while ($data=fread($fp, filesize( $tmp_dir."/".$file_dir.".zip"))){
print($data);
}
} else {
error("������ �ڷ������� �����ϴ�.");
}
// �ӽ÷� ������� ��� ������ �����, ��, ����ڰ� ��Ҹ� ������ ������ �ӽõ����Ͱ� �������� ������ cron �� ���� �Ϸ翡 �ѹ��� �����ָ� �ȴ�.
rm($tmp_dir);
exit;
?>