-
Notifications
You must be signed in to change notification settings - Fork 0
/
friends1.php
68 lines (60 loc) · 1.3 KB
/
friends1.php
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
<html>
<head>
<style type=text/css>
.img{
float:left;
-webkit-transition-duration: 0.5s;
}
.img img{
padding:25px;
border:2px solid magenta;
}
.img:hover{
-webkit-transform:scale(1.25);
-webkit-box-shadow:0px 0px 20px #ccc;
}
.img .mask{
width: 205px;
background-color: rgb(0, 0, 0);
position: absolute;
height: 205px;
opacity:0.6;
cursor:pointer;
-webkit-transition-duration: 0.5s;
}
#img-1:hover .mask{
height:0%;
}
</style>
</head>
<body vlink=blue bgcolor="FFFFE0">
<center>
<h1>Family</h1>
<?php
$imgpath="./photos/Family/";
$dirPath = dir($imgpath);
$imgArray = array();
while (($file = $dirPath->read()) !== false)
{
if ((substr($file, -3)=="gif") || (substr($file, -3)=="jpg") || (substr($file, -3)=="png") || (substr($file, -4)=="jpeg"))
{
$imgArray[]=trim($file);
}
}
$dirPath->close();
sort($imgArray);
$c = count($imgArray);
$img;
for($i=0; $i<$c; $i++)
{ ?>
<div id="img-1" class="img">
<div class="mask"></div>
<?php
echo '<img src="'.$imgpath.$imgArray[$i].'" width=150 height=150>'; ?>
</div>
<?php } ?>
<a href="rating">Rate this Gallery</a>
<a href="home.php" target=f2>Home</a>
</center>
</body>
</html>