-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcache.manifest.php
116 lines (94 loc) · 2.32 KB
/
cache.manifest.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
<?php
/*
* generates a manifest file for this synth
*/
// Turn off all error reporting
error_reporting(0);
// get guid
$guid = htmlspecialchars($_GET["guid"]);
$cacheLocation = './synths/'.$guid.'/';
$cacheFile = $cacheLocation . 'json.json';
header('Content-type: text/cache-manifest');
?>
CACHE MANIFEST
# Bump this with each release:
# Serial number 3
# static libraries
./js/PhotoSynthLoader.js
./js/PhotoSynthMetadataLoader.js
./js/PhotoSynthViewer.js
./js/prototype.jscrambler.js
./js/soundmanager2-nodebug-jsmin.js
./mobile-bookmark-bubble/bookmark_bubble.js
./bookmark.js
./css/PhotoSynthViewer.css
viewer.php
# cut down Three reference
./js/Three.js
./js/Three/Three.jscrambler.js
./js/Three/core/Vector3.jscrambler.js
./js/Three/core/Matrix3.jscrambler.js
./js/Three/core/Matrix4.jscrambler.js
./js/Three/core/Quaternion.jscrambler.js
# include SM2 library
./js/soundmanager2-nodebug-jsmin.js
./js/soundmanager2-jsmin.js
./js/ArrayReader.js
./js/jdataview.js
./js/swfobject.js
./swf/soundmanager2.swf
# images
./img/icon_herein.png
./img/rotateccw.jpg
./img/109.png
./img/110.png
./img/111.png
./img/112.png
./img/119.png
./img/120.png
./img/129.png
./img/loadinfo.net.gif
./img/loading.gif
# synth files
<?php
// if we have the soap, return it!
foreach (directoryToArray($cacheLocation, true) as $file) {
print $file."\r\n";
}
function directoryToArray($directory, $recursive) {
$array_items = array();
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (is_dir($directory. "/" . $file)) {
if($recursive) {
$array_items = array_merge($array_items, directoryToArray($directory. "/" . $file, $recursive));
}
/*$file = $directory . "/" . $file;
$array_items[] = preg_replace("/\/\//si", "/", $file);*/
} else {
$file = $directory . "/" . $file;
$array_items[] = preg_replace("/\/\//si", "/", $file);
}
}
}
closedir($handle);
}
return $array_items;
}
?>
# thumbs
<?php
// if we have the soap, return it!
if (file_exists($cacheFile)) {
$json = file_get_contents($cacheFile, false);
$thumbs = explode('],"u":"', $json);
foreach ($thumbs as $thumbs) {
if (strstr($thumbs, "thumb.jpg")) {
$thumburl = explode('"}', $thumbs);
print str_replace('\\', '', $thumburl[0])."\r\n";
}
}
}
?>
NETWORK: