Ignore comic images, keep support files.
darkmorford -
8248689dc91e
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -0,0 +1,1
1 ErrorDocument 404 /strips/notfound.php
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
@@ -0,0 +1,27
1 <?php
2
3 require_once('../frontend.inc.php');
4 require_once('../admin/include/admin.inc.php');
5
6 /* Provide clean data */
7 if( !preg_match('/(\d{4})\.(\w{3})$/', $_SERVER['REQUEST_URI'], $request) )
8 term('404 Not Found');
9
10 $stripnumber = (int) $strip[0];
11 $extention = mysql_real_escape_string($request[2]);
12
13 /* Determine if the requested strip exists and is published */
14 $qr = mysqli_query($link, "SELECT strip.id AS id, media_t.extension AS ext
15 FROM strip JOIN media_t ON strip.media = media_t.id
16 WHERE strip.id = $stripnumber AND media_t.extension = '$extension' AND strip.published < NOW()");
17 if(!( $strip = mysqli_fetch_array($qr) ))
18 term('404 Not Found');
19
20 if( @rename(sprintf('restricted/%04d.%s', $strip[0], $strip[1]), sprintf('%04d.%s', $strip[0], $strip[1])) ) {
21 /* We are the first one to get here, post to Twitter */
22 twitterpost( urlencode("Comic ".$strip[0]." posted: ".SITE_HOST.SITE_PATH."/strip/".$strip[0]) );
23 }
24
25 header("Location: $_SERVER[REQUEST_URI]");
26
27 ?>
@@ -1,6 +1,9
1 # Site-local configuration
1 # Site-local configuration
2 LocalSettings.php
2 LocalSettings.php
3
3
4 # Comic images
5 strips
6
4 # Fred's random extra stuff
7 # Fred's random extra stuff
5 extra
8 extra
6 naishou
9 naishou
Comments 0
You need to be logged in to leave comments. Login now