Example #1
0
					<iframe width="560" height="315" src="https://www.youtube.com/embed/IyTv_SR2uUo" frameborder="0" allowfullscreen></iframe>
				</div>
				<div class="color_box" id="orange">
					<a href="http://www.nomadicmatt.com/"><h1>NOMADIC MATT</h1></a>
				</div>
			</div>

			<div id="right_col" >
				<div class="color_box" id="black">
					<a href="http://www.ourawesomeplanet.com/"><h1>OUR AWSOME PLANET</h1></a>
				</div>	
				<div class="articles">

					<?php 
include 'scripts/getsetarticle.php';
$id = getlastid();
for ($i = $id; $i > $id - 4; $i--) {
    printheader($i);
}
?>

				</div>			
			</div>			
			<div id="cleared"></div>
		</div>
		<footer>
			<div class="inline"><a href="index.php"><h1>Explore The World</h1></a></div>
			<div class="inline" id="copyright">
				<p>Creatred by Yakov Yusipenko</p>
				<p>Contact me <a href="mailto:myemail@explore.world">myemail@explore.world</a></p>
			</div>
Example #2
0
        echo $username;
        ?>
</a><br>
								<a class="user" ><?php 
        echo $details;
        ?>
</a><br>
								
								<!---<textarea  placeholder="Add Your Answer" style="margin-right:0px;" class="textarea1 form-control" name="reply" ></textarea>-->
								<form  action="topic.php?topic=<?php 
        echo urlFormat($_GET['topic']);
        ?>
" method="POST">
								<div class="form-group" style="padding-top:10px;">
								<input type="hidden" name="newAns" value="<?php 
        echo getlastid("replies") + 1;
        ?>
">
								<textarea name="reply"  class="ckeditor" rows="5" cols="34" ></textarea>
								</div>
								<button type="submit" name="do_reply" class="btn btn-primary">Reply</button>
							</form>
								</div>
								<!--<button style="margin:10px 0px 0px 10px;;" type="submit" name="do_reply" class="btn btn-primary">Reply</button>-->
								</div>									
												
								
								
<?php 
    } else {
        echo "<p style='text-align:center'>Please Login to add your answer.</p>";
Example #3
0
            $db = new Database();
            $db->query("INSERT INTO categories VALUES ('',:name,:description)");
            $db->bind(":name", strip_tags($_POST['newCat'], ''));
            $db->bind(":description", $b);
            $db->execute();
            $db->query("SELECT id FROM categories ORDER BY id DESC LIMIT 1");
            $result = $db->single();
            $data['category_id'] = $result->id;
        } else {
            $data['category_id'] = strip_tags($_POST['category'], '');
        }
        $data['user_id'] = $_SESSION['user_id'];
        $data['last_activity'] = date("Y-m-d H:i:s");
        $data['body'] = strip_tags($_POST['body'], '<iframe><br>');
        $required = array("title", "category_id");
        if (requiredFields($required, $data)) {
            if ($user->createTopic($data)) {
                add_notification($_SESSION['user_id'], "asked a question", getlastid('topics'), 0, followers_id($_SESSION['user_id']));
                echo '<div class="al alert alert-success" style="text-align:center">Successfully posted your query</div>
	 <script>reload();</script>';
            } else {
                echo '<div class="al alert alert-danger" style="text-align:center">Couldn\'t Upload. Please try after some time </div>';
            }
        } else {
            echo '<div class="al alert alert-warning" style="text-align:center">Please fill all the required fields</div>';
        }
    }
    echo $template;
} else {
    redirect("index.php");
}