$value) { if ($value < 10) $date[$item] = "0".$value; } $str[0] = $date['year']."-".$date['mon']."-".$date['mday']." ".$date['hours'].":".$date['minutes'].":".$date['seconds']; $str[1] = $date['year']."-".$date['mon']."-".$date['mday']; return $str; } function download_file($file_name) { $path_file = $_SERVER["DOCUMENT_ROOT"]."/".$file_name; $ret = true; if (!file_exists($path_file))$ret=false; if (!($fp = fopen($path_file, "r"))) { $ret=false; } fclose($fp); if (($content_length = filesize($path_file)) == 0)$ret=false; if($ret){ header("Content-Disposition: inline; filename=\"".basename($path_file)."\""); header("Content-Length: ".$content_length); header("Content-Type: application/octet-stream"); } if (!readfile($path_file)) $ret=false; return $ret; } function noScript(){ $str = <<