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 = '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 <meta http-equiv="Content-Type" content="text/html; <?php echo $myLang->getCharacterSet(); ?>" />
34 <script src="<?php echo $_base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
35 <script language="javascript" type="text/javascript">
40 <script src="<?php echo $_base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>
41 <link rel="stylesheet" href="<?php echo $_base_path; ?>themes/<?php echo $_SESSION['prefs']['PREF_THEME']; ?>/styles.css" type="text/css" />
42 <style id="pref_style" type="text/css"></style>
45 if ($_SESSION['done']) {
46 echo 'onload="parent.window.close();"';
50 if (!$_GET['frame']) { ?>
51 <a href="javascript:window.close();"><?php echo _AT('close'); ?></a>
52 <h3><?php echo _AT($lang_variable); ?></h3>
53 <p><small><?php echo _AT('window_auto_close'); ?></small></p>
56 <table border="0" align="center">
58 <td><img src="<?php echo AT_BASE_HREF; ?>images/transfer.gif" height="20" width="90" alt="<?php echo _AT($lang_variable); ?>"></td>
59 <td valign="middle"><iframe src="prog.php?frame=1" width="100" height="25" frameborder="0" scrolling="no" marginwidth="0" marginheight="1">
62 $tmp_dir = ini_get('upload_tmp_dir') . DIRECTORY_SEPARATOR;
64 $newest_file_name = '';
65 $newest_file_time = 0;
66 // get the name of the temp file.
67 if ($dir = @opendir($tmp_dir)) {
68 while (($file = readdir($dir)) !== false) {
69 if ((strlen($file) == 9) && (substr($file, 0, 3) == 'php')) {
70 $filedata = stat($tmp_dir . $file);
71 if ($filedata['mtime'] > $newest_file_time) {
72 $newest_file_time = $filedata['mtime'];
73 $newest_file_name = $file;
74 $size = $filedata['size'] / 1024;
81 $filedata = stat($tmp_dir . $_GET['t']);
82 $size = $filedata['size'] / AT_KBYTE_SIZE;
84 // not sure where these are displayed in the progress popup
87 echo '<strong>'._AT('unknown').' </strong> '._AT('kb');
89 echo number_format($size, 2).' '._AT('kb');
95 <script type="text/javascript">
97 <?php require_once(AT_INCLUDE_PATH.'../jscripts/ATutor_js.php'); ?>