diff --git a/index.php b/index.php index 4177d7d..d9ff29e 100644 --- a/index.php +++ b/index.php @@ -14,16 +14,16 @@ while($res = mysqli_fetch_array($result)) { echo " "; echo "
"; echo " "; - echo " current mood: ".$res['Mood']; + echo " current mood: ".$res[ ".$res['Mood']; echo " "; - echo "
"; + echo "
"; echo " "; echo " current tunes: ".$res['Song']; echo " "; - echo "
"; + echo "
"; echo $res['Message']; - echo "
"; - echo " share: "; + echo "
"; + echo " share: "; echo "
"; echo ""; } diff --git a/templates/config.def.php b/templates/config.def.php index ed95740..6992f21 100644 --- a/templates/config.def.php +++ b/templates/config.def.php @@ -7,6 +7,8 @@ $url="http://127.0.0.1"; $root=$url.""; // If moodblog is located in a subdirectory, you'll want to change this. $style="glazed-gray.css"; // This would be a file located in your /css folder $charset="UTF-8"; // If you don't know what this is, leave it be! +$lang="en-us"; +$password="password"; $blog_title="Example User's blog created with moodblog"; // Title shown in the bio window $short_blog_title="Example moodblog"; // String used in diff --git a/write/post.php b/write/post.php index 0133304..c1a352a 100644 --- a/write/post.php +++ b/write/post.php @@ -12,7 +12,7 @@ $go_back = "<br/><a class='button options' href='".$root."'>go back!</a>"; <div class='window-content'> <?php if(isset($_POST['articlebody'])) { - if($_POST['password'] == "yeppers") { + if($_POST['password'] == $password) { $title = mysqli_real_escape_string($mysqli, $_POST['title']); $mood = mysqli_real_escape_string($mysqli, $_POST['mood']); $moodimage = mysqli_real_escape_string($mysqli, $_POST['moodimage']); @@ -20,8 +20,6 @@ if(isset($_POST['articlebody'])) { $articlebody = mysqli_real_escape_string($mysqli, $_POST['articlebody']); $mysqli->query("INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES('".$title."', '".$mood."', '".$moodimage."', '".$song."', '".$articlebody."')"); - #$mysqli->query('INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES("title test", "mood", "what-a-night.png", "music", "styles!")'); - #$mysqli->query('INSERT INTO articles (Title, Mood, MoodImage, Song, Message) VALUES("'.$title.'", "'.$mood.'", "what-a-night.png", "music", "styles!")'); echo "success".$go_back; header("Location: ".$root);