Changed hour-base identifiers to intervals of 4 hours instead of 6.

merge-requests/2/head
YandolsZX 6 years ago
parent 1e52b9f248
commit 07e9424bb7
  1. 18
      upload.php

@ -2,7 +2,7 @@
// Imeji Uploader Core Code -- Version 1.3 (Uploader Filename Randomizer Algorithm Update) // Imeji Uploader Core Code -- Version 1.3 (Uploader Filename Randomizer Algorithm Update)
// //
// Core Variables. Don't change unless you know what you're doing. // Core Variables. Don't change unless you know what you're doing.
$imejicoreversion = "imeji_v1.3_1"; $imejicoreversion = "imeji_v1.3_2";
$target_dir = "public/"; $target_dir = "public/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$target_filenameonly = basename($_FILES["fileToUpload"]["name"]); $target_filenameonly = basename($_FILES["fileToUpload"]["name"]);
@ -75,15 +75,19 @@ if ($uploadOk == 0) {
} else { } else {
$dayId = '0'; $dayId = '0';
} }
// Hour-base identifiers (Implemented in v1.3_0) // Hour-base identifiers (Implemented in v1.3_0 / Changed in v1.3_2)
if ((date('H') >= '00') && (date('H') <= '05')) { if ((date('H') >= '00') && (date('H') <= '03')) {
$hourId = '3'; $hourId = '3';
} else if ((date('H') >= '06') && (date('H') <= '11')) { } else if ((date('H') >= '04') && (date('H') <= '07')) {
$hourId = 'E'; $hourId = 'E';
} else if ((date('H') >= '12') && (date('H') <= '17')) { } else if ((date('H') >= '08') && (date('H') <= '11')) {
$hourId = 'd'; $hourId = 'd';
} else if ((date('H') >= '18') && (date('H') <= '23')) { } else if ((date('H') >= '12') && (date('H') <= '15')) {
$hourId = 'C'; $hourId = '4';
} else if ((date('H') >= '16') && (date('H') <= '19')) {
$hourId = 'R';
} else if ((date('H') >= '20') && (date('H') <= '23')) {
$hourId = 'f';
} else { } else {
$hourId = 'z'; $hourId = 'z';
} }

Loading…
Cancel
Save