Please log in.

Username:
Password:
EOF; } else if(!isset($_POST['year'])) { $user = $_POST['user']; $pass = $_POST['pass']; $year = strftime("%Y"); $month = strftime("%m"); $day = strftime("%d"); print <<< EOF Please post the comic.

Comic file:
Year:
Month:
Day:
EOF; } else { $comic = $_FILES['comic']; $cname = $comic['name']; $parts = explode('.', $cname); $cext = end($parts); $basename = md5($cname . rand()); $fname = "$basename.$cext"; if(move_uploaded_file($_FILES['comic']['tmp_name'], "comics/$fname")) { $timestamp = sprintf("%04d%02d%02d", $_POST['year'], $_POST['month'], $_POST['day']); print $timestamp; mysql_select_db('e2f') or die(mysql_error());; mysql_query("insert into comics (date, filename) values ('$timestamp', '$fname')") or die("Failed to insert into database: " . mysql_error()); print "Successfully uploaded comic."; } } ?>