@@ -140,6 +133,7 @@ END_OF_CLOSE;
class index extends cms {
public function display() {
+ $this->scripts = "";
$this->display_head();
$this->display_exhibits();
echo "
";
@@ -167,7 +161,7 @@ class index extends cms {
- git://dylanstestserver.com
+ "git">git://dylansserver.com
-
some notes:
@@ -182,21 +176,21 @@ OTHER_PROJECTS;
// Because of the CSS necessary for the animations,
// the contact link needs to be in #portfolio to clear
// the floats.
- echo " - ";
+ echo "
- ";
$this->display_contact();
- echo "
";
+ echo "";
echo "
";
$this->display_close($show_contact = false);
}
protected function display_exhibits() {
+ echo "
";
$sql = "SELECT text FROM projects";
$result = $this->db->query($sql);
while ($entry = $result->fetch_object()) {
- echo "
";
echo $entry->text;
- echo "
";
}
+ echo "
";
}
private function list_projects() {
@@ -324,6 +318,11 @@ class note extends cms {
public $number_of_comments;
public function __construct() {
+ if (isset($_GET['comments'])) {
+ $this->scripts = "
+
+ ";
+ }
parent::__construct();
if (isset($_GET['comments'])) {
$this->comments_enabled = true;
@@ -385,15 +384,14 @@ class note extends cms {
}
if (isset($_POST['captcha']) || $resp->is_valid) {
$sql = ("INSERT INTO comments (date_posted, author,
- email, text, note)
- VALUES(NOW(), ?, ?, ?, ?)");
+ text, note)
+ VALUES(NOW(), ?, ?, ?)");
$stmt = $this->db->prepare($sql);
// Checks are needed here (no blank text,
- // and a default author / email need to be set
+ // and a default author needs to be set
// for no-javascript users.
- $stmt->bind_param('ssss',
+ $stmt->bind_param('sss',
htmlspecialchars($_POST['name']),
- htmlspecialchars($_POST['email']),
htmlspecialchars($_POST['text']),
$this->id);
$stmt->execute();
@@ -441,15 +439,15 @@ END_OF_NAVIGATION;
private function display_comments() {
echo "
-END_OF_FORM;
+END_OF_ERRORS;
} else {
- echo <<
+ reCAPTCHA said you're not human,
+ try again?
+
+
+END_OF_ERRORS;
+ }
+ echo <<
$author
"; echo <<name:
-email:
-@@ -505,19 +501,31 @@ END_CAPTCHA_STYLE; END_OF_FORM; echo recaptcha_get_html($this->recaptcha_publickey); if ($this->failed_captcha) { - echo <<
+ try again? +