Skip to content

Commit

Permalink
new JS, clean URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
cocide committed Nov 4, 2012
1 parent 69701ac commit 28c60af
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 893 deletions.
4 changes: 4 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RewriteEngine On

RewriteRule ^admin/*$ admin.php
RewriteRule ^install/*$ install.php
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Things that Need to Eventually Happen
* Maybe also background the first pull of data rather than have the page just sit 'loading'
* Improve security
* Add a graphical edit for each movie (to spot-fix bugs)
* Update the 3+ year old JS
* Clean URLs


The Log of Change
Expand Down
7 changes: 4 additions & 3 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

if (!file_exists("conf.php")) {
ob_end_clean();
header("Location: install.php");
header("Location: install");
exit;
}
include("conf.php");
Expand Down Expand Up @@ -38,7 +38,8 @@
<input type="hidden" name="PASS" value="'.$_POST['PASS'].'" />
<br />
<input type="submit" name="submit" value="Upload" />
</form>';
</form>
NOTE: The file must end in .ls or .txt';
} elseif ($_FILES["file"]["error"] > 0) {
echo "Error: " . $_FILES["file"]["error"] . "<br />";
} else {
Expand Down Expand Up @@ -200,7 +201,7 @@
}
}
ob_end_clean();
header("Location: index.php");
header("Location: index");
exit;
}

Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

if (!file_exists("conf.php")) {
ob_end_clean();
header("Location: install.php");
header("Location: install");
exit;
}
ob_end_flush();
Expand Down
10 changes: 6 additions & 4 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<br>
Admin Password: <input type="text" name="PASS" value="YourSecretPassword"><br>
<input type="submit" value="Install">
</form>';
</form>
NOTE: apache must be able to write to the directory.
';
} elseif (isset($_POST['DATABASE'])) {
file_put_contents("conf.php", '<?php
define("DB_HOST", "'.$_POST['DB_HOST'].'");
Expand All @@ -36,8 +38,8 @@
define("PASS", "'.$_POST['PASS'].'");
?>' );
?>
' );
}
if (file_exists("conf.php")) {
include("conf.php");
Expand Down Expand Up @@ -133,7 +135,7 @@

# the DB has been set up, redirect to admin so they can add files
ob_end_clean();
header("Location: admin.php");
header("Location: admin");
exit;
}
mysql_close($db);
Expand Down
34 changes: 2 additions & 32 deletions js/jquery.js

Large diffs are not rendered by default.

Loading

0 comments on commit 28c60af

Please sign in to comment.