X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/8d680388c6ee5495386a31ea22d794df26d5c910..117541049ca0a09a13a40fc0a5e686e334334fae:/lib/functions.php?ds=inline diff --git a/lib/functions.php b/lib/functions.php index b87f6c3..fd0fe2c 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1720,3 +1720,159 @@ function jirafeau_write_download_stats($hash, $ip) fwrite($handle, $count . NL . time() . NL . $ip); fclose($handle); } + +function jirafeau_create_upload_finished_box($preview = true) { + ?> + +
+

+ +
+

+ + +

+ + +

+
+ + +
+

+ +

+ + +

+
+ + +
+

+ +

+ + +

+
+ +
+

+ +

+ + +

+
+ +
+

:

+

+
+
+ 'minute', + 'label' => '1_MIN' + ), + array( + 'value' => 'hour', + 'label' => '1_H' + ), + array( + 'value' => 'day', + 'label' => '1_D' + ), + array( + 'value' => 'week', + 'label' => '1_W' + ), + array( + 'value' => 'fortnight', + 'label' => '2_W' + ), + array( + 'value' => 'month', + 'label' => '1_M' + ), + array( + 'value' => 'quarter', + 'label' => '1_Q' + ), + array( + 'value' => 'year', + 'label' => '1_Y' + ), + array( + 'value' => 'none', + 'label' => 'NONE' + ) + ); +} + + + + /** + * + * creates the time selection field + * @param mixed $cfg + * @return void + */ + function jirafeau_create_selection_array($cfg) { + echo + ''; + } + + function jirafeau_datestr_to_int ($time_str) { + $time = time(); + switch ($time_str) { + case 'minute': + $time += JIRAFEAU_MINUTE; + break; + case 'hour': + $time += JIRAFEAU_HOUR; + break; + case 'day': + $time += JIRAFEAU_DAY; + break; + case 'week': + $time += JIRAFEAU_WEEK; + break; + case 'fortnight': + $time += JIRAFEAU_FORTNIGHT; + break; + case 'month': + $time += JIRAFEAU_MONTH; + break; + case 'quarter': + $time += JIRAFEAU_QUARTER; + break; + case 'year': + $time += JIRAFEAU_YEAR; + break; + default: + $time = JIRAFEAU_INFINITY; + break; + } + return $time; +}