2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
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 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
28 <script src="<?php echo $_base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
29 <script language="javascript" type="text/javascript">
34 <script src="<?php echo $_base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>
35 <link rel="stylesheet" href="../stylesheet.css" type="text/css" />
36 <style id="pref_style" type="text/css"></style>
39 if ($_SESSION['done']) {
40 echo 'onLoad="parent.window.close();"';
45 <?php if (!$_GET['frame']) {
47 $_SESSION['done'] = 0;
48 session_write_close();
50 <a href="javascript:window.close();"><?php echo _AT('close'); ?></a>
51 <h3><?php echo _AT('upload_progress'); ?></h3>
52 <p><small><?php echo _AT('window_auto_close'); ?></small></p>
55 <table border="0" align="center">
57 <td><img src="../images/transfer.gif" height="20" width="90" alt="file upload in progress..."></td>
58 <td valign="middle"><iframe src="prog.php?frame=1" width="100" height="25" frameborder="0" scrolling=no marginwidth="0" marginheight="1">
62 $newest_file_name = '';
63 $newest_file_time = 0;
64 // get the name of the temp file.
65 if ($dir = @opendir('/tmp')) {
66 while (($file = readdir($dir)) !== false) {
67 if ((strlen($file) == 9) && (substr($file, 0, 3) == 'php')) {
68 $filedata = stat('/tmp/'.$file);
69 if ($filedata['mtime'] > $newest_file_time) {
70 $newest_file_time = $filedata['mtime'];
71 $newest_file_name = $file;
72 $size = $filedata['size'] / 1024;
79 $filedata = stat('/tmp/'.$_GET['t']);
80 $size = $filedata['size'] / 1024;
84 // not sure where these are displayed in the progress popup
86 echo '<strong>Unknown</strong> '._AT('kb');
88 echo $size.' '._AT('kb');
94 <script type="text/javascript">
96 <?php require_once(AT_INCLUDE_PATH.'../jscripts/ATutor_js.php'); ?>