2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2008 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 = 'users';
16 define('AT_INCLUDE_PATH', '../include/');
17 require(AT_INCLUDE_PATH.'vitals.inc.php');
20 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
23 <title><?php echo _AT('upload_progress'); ?></title>
24 <?php if ($_GET['frame']) { ?>
25 <META HTTP-EQUIV="refresh" content="3;URL=prog.php?frame=1">
27 <link rel="stylesheet" href="../stylesheet.css" type="text/css" />
28 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
31 if ($_SESSION['done']) {
32 echo 'onLoad="parent.window.close();"';
37 <?php if (!$_GET['frame']) {
39 $_SESSION['done'] = 0;
40 session_write_close();
42 <a href="javascript:window.close();"><?php echo _AT('close'); ?></a>
43 <h3><?php echo _AT('upload_progress'); ?></h3>
44 <p><small><?php echo _AT('window_auto_close'); ?></small></p>
47 <table border="0" align="center">
49 <td><img src="../images/transfer.gif" height="20" width="90" alt="file upload in progress..."></td>
50 <td valign="middle"><iframe src="prog.php?frame=1" width="100" height="25" frameborder="0" scrolling=no marginwidth="0" marginheight="1">
54 $newest_file_name = '';
55 $newest_file_time = 0;
56 // get the name of the temp file.
57 if ($dir = @opendir('/tmp')) {
58 while (($file = readdir($dir)) !== false) {
59 if ((strlen($file) == 9) && (substr($file, 0, 3) == 'php')) {
60 $filedata = stat('/tmp/'.$file);
61 if ($filedata['mtime'] > $newest_file_time) {
62 $newest_file_time = $filedata['mtime'];
63 $newest_file_name = $file;
64 $size = $filedata['size'] / 1024;
71 $filedata = stat('/tmp/'.$_GET['t']);
72 $size = $filedata['size'] / 1024;
76 // not sure where these are displayed in the progress popup
78 echo '<em>Unknown</em> '._AT('kb');
80 echo $size.' '._AT('kb');