forked from julmud/phpDVDProfiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getimages.php
119 lines (98 loc) · 4.01 KB
/
getimages.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
define('IN_SCRIPT', 1);
include('global.php');
error_reporting(E_ALL);
// Force the global.php AcquireAThumbnail routine to try to download
function GetAThumbnail($file) {
$temp = $getimages;
$getimages = 2;
AcquireAThumbnail($file);
$getimages = $temp;
}
$gi = '0.1.1';
$sql = "SELECT id, title FROM $DVD_TABLE WHERE 1 ORDER BY sorttitle ASC";
$result = $db->sql_query($sql) or die($db->sql_error());
echo "<html>\n
<head>\n
<title>GET THE IMAGES!</title>\n
<link rel=\"stylesheet\" type=\"text/css\" href=\"./format.css\">\n
</head>\n
<body class=\"f6\">\n
<!-- Version: $gi -->\n
<center>\n
<table width=\"80%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n
<tr class=\"f1\">\n
<td rowspan=\"2\" align=\"center\" valign=\"middle\">Profile Name </td>\n
<td colspan=\"2\" align=\"center\" valign=\"middle\"><div align=\"center\">Hires</div></td>\n
<td colspan=\"2\" align=\"center\" valign=\"middle\"><div align=\"center\">Lowres</div></td>\n
<td colspan=\"2\" align=\"center\" valign=\"middle\"><div align=\"center\">Got new Lowres from IVS </div></td>\n
</tr>\n
<tr>\n
<td width=\"50\" align=\"center\" valign=\"middle\">front</td>\n
<td width=\"50\" align=\"center\" valign=\"middle\">back</td>\n
<td width=\"50\" align=\"center\" valign=\"middle\">front</td>\n
<td width=\"50\" align=\"center\" valign=\"middle\">back</td>\n
<td width=\"75\" align=\"center\" valign=\"middle\">front</td>\n
<td width=\"75\" align=\"center\" valign=\"middle\">back</td>\n
</tr>\n";
while($dvd = mysql_fetch_array($result)) {
$getfront = false;
$getback = false;
echo "<tr>\n
<td>$dvd[title]</td>\n";
$front = $dvd['id'].'f.jpg';
if (!file_exists($img_physpath.$thumbnails.'/'.$front)) {
if (($tmp=findfilecase($img_physpath.$thumbnails, $front)) != '')
$front = $tmp;
}
$back = $dvd['id'].'b.jpg';
if (!file_exists($img_physpath.$thumbnails.'/'.$back)) {
if (($tmp=findfilecase($img_physpath.$thumbnails, $back)) != '')
$back = $tmp;
}
if (file_exists($img_physpath.$front)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$front\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
else {
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
}
if (file_exists($img_physpath.$back)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$back\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
else {
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
}
if (file_exists($img_physpath.$thumbnails.'/'.$front)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$thumbnails/$front\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
else {
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
$getfront = true;
GetAThumbnail($front);
}
if (file_exists($img_physpath.$thumbnails.'/'.$back)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$thumbnails/$back\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
else {
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
$getback = true;
GetAThumbnail($back);
}
if ($getfront == true && file_exists($img_physpath.$thumbnails.'/'.$front)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$thumbnails/$front\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
elseif ($getfront == true && !file_exists($img_physpath.$thumbnails.'/'.$front)){
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
}
else { echo "<td> </td>\n";}
if ($getback == true && file_exists($img_physpath.$thumbnails.'/'.$back)) {
echo " <td align=\"center\"><a target=\"_blank\" href=\"{$img_webpath}$thumbnails/$back\"><img border=0 src=\"gfx/yes.png\"></a></td>\n";
}
elseif ($getback == true && !file_exists($img_physpath.$thumbnails.'/'.$back)){
echo " <td align=\"center\"><img border=0 src=\"gfx/no.png\"></td>\n";
}
else { echo "<td> </td>\n";}
echo " </tr>\n";
}
echo "</table>\n";
?>