| Date: Tue, 17 Nov 2015 15:48:45 +0100
add percentage to preloader
Diffstat:
M index.php | 15 +++++++++++++++
M matlab/m_pakke2014maj11/MetHasLong… | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
--- |
| t@@ -38,6 +38,14 @@ if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
$status = fgets($statusfile);
fclose($statusfile);
+ $show_percentage = false;
+ if (strpos($status, '/', '', $percentage);
+ $percentage = preg_replace('/ /', '', $percentage);
+ $show_percentage = true;
+ }
+
// redirect to results page if computations are complete
if (strcmp($status, "Computations complete") == 0) {
header("Location: /index.php?results_id=" . $_GET['wait_id']);
t@@ -72,7 +80,14 @@ if (isset($_GET['wait_id']) && !empty($_GET['wait_id'])) {
|
| t@@ -112,7 +112,7 @@ for it=1:N_run
fid = fopen(statusfile, 'w');
statusinfo = strcat(num2str(datestr(RemainingTime,13)), ...
' remaining', ...
- ' ');
+ ' ');
fprintf(fid, statusinfo);
fclose(fid);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |