1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| <!DOCTYPE html>
<html>
<head>
<title>Remplacement Image</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<?php
$tableau1 = array (1, 8, 14, 21, 28);
$tableau2 = array (2, 9, 15, 22, 29);
$tableau3 = array (3, 9, 16, 23, 30);
$tableau4 = array (4, 10, 17, 24, 31);
$tableau5 = array (5, 11, 18, 25);
$tableau6 = array (6, 12, 19, 26);
$tableau7 = array (7, 13, 20, 27);
$today = date("d");
if (in_array("$today", $tableau1))
{
$imagedujour="IMG_01.jpg";
break;
} elseif (in_array("$today", $tableau2)) {
$imagedujour="IMG_02.jpg";
break;
} elseif (in_array("$today", $tableau3)) {
$imagedujour="IMG_03.jpg";
break;
} elseif (in_array("$today", $tableau4)) {
$imagedujour="IMG_04.jpg";
break;
} elseif (in_array("$today", $tableau5)) {
$imagedujour="IMG_05.jpg";
break;
} elseif (in_array("$today", $tableau6)) {
$imagedujour="IMG_06.jpg";
break;
} else {
$imagedujour="IMG_07.jpg";
}
echo $imagedujour;
echo "<br>";
$path="img/";
echo$path;
$image=$imagedujour;
echo "<br>";
echo $image;
$newimage="image-dupplique";
echo "<br>";
copy($path.$image, $path.$newimage.".jpg");
?>
</body>
</html> |
Partager