Exemplo n.º 1
0
                    <!-- Ex 3: Modify forms -->
                    <form class="write-form" method="POST" action="add.php">
                        <input type="text" name="input_author" placeholder="Author">
                        <div>
                            <input type="text" name="input_contents" placeholder="Content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
                <?
                if (isset($_GET["select"]) && isset($_GET["text"])) {
                    $input_select =$_GET["select"];
                    $input_text =$_GET["text"];

                    $search_stmt =$timeline->searchTweets($input_select, $input_text);

                    if ($search_stmt !="") { 
                        foreach ($search_stmt as $search_s) { 
                            $str_date =strtotime($search_s["time"]);
                            $view_date =date('H:i:s d/m/Y', $str_date);
                        ?>

                            <div class="tweet">
                                <form class="delete-form" method="POST" action="delete.php">
                                    <input type="submit" value="delete">
                                    <input type="hidden" name="num" value=<?php 
echo $search_s["no"];
?>
>
                                </form>
Exemplo n.º 2
0
            <div class="panel">
                <div class="panel-heading">
                    <!-- Ex 3: Modify forms -->
                    <form method="POST" class="write-form" action="add.php">
                        <input type="text" placeholder="Author" name="author">
                        <div>
                           <input type="text" placeholder="Content" name="content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
                <?php 
if (isset($_GET['contents']) && !$_GET['contents'] == "") {
    $_GET['contents'] = htmlspecialchars($_GET['contents']);
    $rows = $timeline->searchTweets($_GET['type'], $_GET['contents']);
} else {
    $rows = $timeline->loadTweets();
}
foreach ($rows as $row) {
    ?>
                <div class="tweet">
                    <form method="POST" class="delete-form" action="delete.php">
                        <input type="submit" value="delete">
                        <?php 
    print "<input type=\"hidden\" name=\"no\" value=\"{$row['no']}\">";
    ?>
                    </form>
                    <div class="tweet-info">
                    <?php 
    print "<span> {$row['author']} </span>";
Exemplo n.º 3
0
                <div class="panel-heading">
                    <!-- Ex 3: Modify forms -->
                    <form class="write-form" action="add.php" method="post">
                        <input type="text" name="author" placeholder="Author">
                        <div>
                            <input type="text" name="content" placeholder="Content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
				<?php 
include "timeline.php";
$database = new TimeLine();
if (!empty($_GET['query']) && isset($_GET['query']) && isset($_GET['type'])) {
    $rows = $database->searchTweets($_GET['type'], $_GET['query']);
} else {
    $rows = $database->loadTweets();
}
foreach ($rows as $row) {
    ?>
<div class="tweet">
							<form class="delete-form" action="delete.php" method="post">
								<input type="submit" value="delete">
								<input type="hidden" name="count" value=<?php 
    echo $row["no"];
    ?>
>
							</form>
							<div class="tweet-info">
								<span> <?php 
Exemplo n.º 4
0
        <div class="panel">
            <div class="panel-heading">
                <!-- Ex 3: Modify forms -->
                <form action="add.php" class="write-form" method="post">
                    <input name="author" type="text" placeholder="Author">
                    <div>
                        <input name="content" type="text" placeholder="Content">
                    </div>
                    <input type="submit" value="write">
                </form>
            </div>
            <!-- Ex 3: Modify forms & Load tweets -->
            <?php 
$timeline = new TimeLine();
if (isset($_GET['type']) && isset($_GET['query'])) {
    $posts = $timeline->searchTweets($_GET['type'], $_GET['query']);
} else {
    $posts = $timeline->loadTweets();
}
foreach ($posts as $post) {
    ?>
            <div class="tweet">
                <form action="delete.php" class="delete-form" method="post">
                    <input type="submit" value="delete">
                    <input name="no" type="hidden" value="<?php 
    echo $post['no'];
    ?>
">
                </form>
                <div class="tweet-info">
                    <span><?php 
Exemplo n.º 5
0
Arquivo: index.php Projeto: hosewq/CSE
                    <form class="write-form" action="add.php" method="POST">
                        <input type="text" name="author" placeholder="Author">
                        <div>
                            <input type="text" name="contents" placeholder="Content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
                <?php 
include 'timeline.php';
$timeline = new TimeLine();
if (!empty($_GET["type"]) && !empty($_GET["query"])) {
    $type = $_GET["type"];
    $query = $_GET["query"];
    $rows = $timeline->searchTweets($type, $query);
    if (empty($rows)) {
        $rows = $timeline->loadTweets();
    }
} else {
    $rows = $timeline->loadTweets();
}
foreach ($rows as $row) {
    $time = explode(" ", $row["time"]);
    $date = explode("-", $time[0]);
    ?>
                <div class="tweet">
                    <form class="delete-form" action="delete.php" method="POST">
                        <input type="submit" value="delete">
                        <input type="hidden" name="no" value="<?php 
    echo $row["no"];
Exemplo n.º 6
0
                    <form action="add.php" method="POST" class="write-form">
                        <input type="text" name="author" placeholder="Author">
                        <div>
                            <input type="text" name="content" placeholder="Content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
                <?php 
include "timeline.php";
$tl = new TimeLine();
if (isset($_GET["srchcontent"])) {
    $getsrch = isset($_GET["srch"]) ? $_GET["srch"] : ' ';
    $getsrchcontent = isset($_GET["srchcontent"]) ? $_GET["srchcontent"] : ' ';
    $tl->searchTweets($getsrch, $getsrchcontent);
} else {
    $tl->loadTweets();
}
?>
                <!--
                <div class="tweet">
                    <form class="delete-form">
                        <input type="submit" value="delete">
                        <input type="hidden">
                    </form>
                    <div class="tweet-info">
                        <span>Adele</span>
                        <span>11:30:11 04/11/2015</span>
                    </div>
                    <div class="tweet-content">
Exemplo n.º 7
0
<?php

require_once 'base.php';
include 'timeline.php';
$TL = new TimeLine();
$rows = $TL->loadTweets();
if (!empty($_GET['type']) && !empty($_GET['query'])) {
    $type = $_GET['type'];
    $query = $_GET['query'];
    $rows = $TL->searchTweets($type, $query);
} else {
    if (!empty($_GET['reply'])) {
        $reply = $_GET['reply'];
        $rows = $TL->searchReply($reply);
    }
}
$username = $_SESSION['user_id'];
?>

<?php 
startblock('head');
?>
        <link rel="stylesheet" href="css/contents.css">
<?php 
endblock('head');
?>

<?php 
startblock('content');
?>
        <div id="community">
Exemplo n.º 8
0
                </form>
            </div>
            <div class="panel">
                <div class="panel-heading">
                    <!-- Ex 3: Modify forms -->
                    <form action="add.php"> 
                        <input type="text" placeholder="Author" name="i_type">
                        <div>
                            <input type="text" placeholder="Content" name="i_text">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
				
                <!-- Ex 3: Modify forms & Load tweets -->
				<?php 
require_once 'timeline.php';
$tclass = new TimeLine();
$g_type = $_GET["c_type"];
$g_text = $_GET["c_text"];
if (isset($g_text) == true) {
    $rdata = $tclass->searchTweets($g_type, $g_text);
} else {
    $rdata = $tclass->loadTweets();
}
?>
            </div>
        </div>
    </body>
</html>
Exemplo n.º 9
0
                <div class="panel-heading">
                    <!-- Ex 3: Modify forms -->
                    <form class="write-form" action="add.php" method="POST">
                        <input type="text" placeholder="Author" name="author">
                        <div>
                            <input type="text" placeholder="Content" name="content">
                        </div>
                        <input type="submit" value="write">
                    </form>
                </div>
                <!-- Ex 3: Modify forms & Load tweets -->
                <?php 
if (isset($_GET["type"]) && isset($_GET["query"])) {
    if (strlen($_GET["type"]) != 0 && strlen($_GET["query"]) != 0) {
        if (!strcmp($_GET["type"], "content") || !strcmp($_GET["type"], "author")) {
            $rows = $timeline->searchTweets($_GET["type"], $_GET["query"]);
        } else {
            $rows = $timeline->loadTweets();
        }
    } else {
        $rows = $timeline->loadTweets();
    }
} else {
    $rows = $timeline->loadTweets();
}
foreach ($rows as $row) {
    $tmp = explode(" ", $row["time"]);
    $tmp[0] = explode("-", $tmp[0]);
    $tmp[0] = $tmp[0][2] . "-" . $tmp[0][1] . "-" . $tmp[0][0];
    $time = $tmp[1] . " " . $tmp[0];
    ?>