03.
<head>
04.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
/>
05.
<title>Untitled Document</title>
06.
<link media=
"screen"
rel=
"stylesheet"
href=
"colorbox.css"
/>
07.
<script src=
"js/jquery-1.6.1.min.js"
type=
"text/javascript"
></script>
08.
<link rel=
"stylesheet"
href=
"css/prettyPhoto.css"
type=
"text/css"
media=
"screen"
charset=
"utf-8"
/>
09.
<script src=
"js/jquery.prettyPhoto.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
10.
11.
<style type=
"text/css"
media=
"screen"
>
12.
13.
body {
14.
font: 62.5%/1.2 Arial, Verdana, Sans-Serif;
15.
padding: 0 20px;
16.
}
17.
18.
</style>
19.
20.
<script type=
"text/javascript"
charset=
"utf-8"
>
21.
$(document).ready(
function
(){
22.
$(
"area[rel^='prettyPhoto']"
).prettyPhoto();
23.
24.
$(
"a[rel^='prettyPhoto']"
).prettyPhoto({animation_speed:
'normal'
,theme:
'light_square'
,slideshow:1000});
25.
$(
"a[rel^='prettyPhoto']"
).prettyPhoto({animation_speed:
'fast'
,slideshow:1000, hideflash: true});
26.
27.
});
28.
</script>
29.
30.
31.
32.
</head>
33.
34.
<body>
35.
36.
<?
37.
mysql_connect(
"localhost"
,
"root"
,
"admin"
)
or
die
(mysql_error());
38.
mysql_select_db(
"test2"
);
39.
mysql_query(
"SET NAMES UTF8"
);
40.
41.
for
(
$i
=1;
$i
<=(int)(
$_POST
[
"hdnLine"
]);
$i
++)
42.
{
43.
if
(
$_FILES
[
"fileUpload"
.
$i
][
"name"
] !=
""
)
44.
{
45.
if
(move_uploaded_file(
$_FILES
[
"fileUpload"
.
$i
][
"tmp_name"
],
"myfile/"
.
$_FILES
[
"fileUpload"
.
$i
][
"name"
]))
46.
{
47.
$strSQL
=
"INSERT INTO gallery "
;
48.
$strSQL
.=
"(Picture) VALUES ('"
.
$_FILES
[
"fileUpload"
.
$i
][
"name"
].
"')"
;
49.
mysql_query(
$strSQL
);
50.
51.
}
52.
}
53.
}
54.
55.
56.
57.
58.
?>
59.
<?
60.
61.
62.
63.
$strSQL2
=
"SELECT * FROM gallery ORDER BY picid ASC "
;
64.
$objQuery2
= mysql_query(
$strSQL2
)
or
die
(
"Error Query ["
.
$strSQL2
.
"]"
);
65.
66.
echo
"<table align=\"center\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\"><tr>"
;
67.
$intRows
= 0;
68.
while
(
$objResult2
= mysql_fetch_array(
$objQuery2
))
69.
{
70.
echo
"<td>"
;
71.
$intRows
++;
72.
?>
73.
<center>
74.
<p><a href=
"myfile/<?=$objResult2["
Picture
"];?>"
rel=
"prettyPhoto[gallery]"
title=
"<?=$objResult2["
Picture
"];?>"
><img src=
"myfile/<?=$objResult2["
Picture
"];?>"
width=
"200"
></a></p>
75.
<p><br>
76.
77.
<br>
78.
</p>
79.
</center>
80.
<?
81.
echo
"</td>"
;
82.
if
((
$intRows
)%3==0)
83.
{
84.
echo
"</tr>"
;
85.
}
86.
}
87.
echo
"</tr></table>"
;
88.
89.
mysql_close();
90.
?>
91.
</body>
92.
</html>