2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2004 by Greg Gay & Joel Kronenberg */
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
15 $_user_location = 'prog';
16 define('AT_INCLUDE_PATH', '../include/');
17 require(AT_INCLUDE_PATH.'vitals.inc.php');
18 session_write_close();
20 $lang_variable = 'tile_progress';
22 $lang_variable = 'upload_progress';
26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27 <html lang="<?php echo $myLang->getCode(); ?>">
29 <title><?php echo _AT($lang_variable); ?></title>
30 <?php if ($_GET['frame']) { ?>
31 <META HTTP-EQUIV="refresh" content="3;URL=prog.php?frame=1">
33 <link rel="stylesheet" href="<?php echo $_base_path; ?>themes/<?php echo $_SESSION['prefs']['PREF_THEME']; ?>/styles.css" type="text/css" />
34 <meta http-equiv="Content-Type" content="text/html; <?php echo $myLang->getCharacterSet(); ?>" />
37 if ($_SESSION['done']) {
38 echo 'onload="parent.window.close();"';
42 if (!$_GET['frame']) { ?>
43 <a href="javascript:window.close();"><?php echo _AT('close'); ?></a>
44 <h3><?php echo _AT($lang_variable); ?></h3>
45 <p><small><?php echo _AT('window_auto_close'); ?></small></p>
48 <table border="0" align="center">
50 <td><img src="<?php echo AT_BASE_HREF; ?>images/transfer.gif" height="20" width="90" alt="<?php echo _AT($lang_variable); ?>"></td>
51 <td valign="middle"><iframe src="prog.php?frame=1" width="100" height="25" frameborder="0" scrolling="no" marginwidth="0" marginheight="1">
54 $tmp_dir = ini_get('upload_tmp_dir') . DIRECTORY_SEPARATOR;
56 $newest_file_name = '';
57 $newest_file_time = 0;
58 // get the name of the temp file.
59 if ($dir = @opendir($tmp_dir)) {
60 while (($file = readdir($dir)) !== false) {
61 if ((strlen($file) == 9) && (substr($file, 0, 3) == 'php')) {
62 $filedata = stat($tmp_dir . $file);
63 if ($filedata['mtime'] > $newest_file_time) {
64 $newest_file_time = $filedata['mtime'];
65 $newest_file_name = $file;
66 $size = $filedata['size'] / 1024;
73 $filedata = stat($tmp_dir . $_GET['t']);
74 $size = $filedata['size'] / AT_KBYTE_SIZE;
79 echo '<em>'._AT('unknown').'</em> KB';
81 echo number_format($size, 2).' KB';