コード例 #1
0
ファイル: lab08_index.php プロジェクト: JinyoungHeo/webLab00
                                <div class="tweet-content">
                                    <?php 
echo $search_s["contents"];
?>
                                </div>
                            </div>
                    <?                   
                        }
                    }
                    else {
                        header("Location:index.php");
                    }
                }
                else { 

                    $load_stmt =$timeline->loadTweets();
                    foreach ($load_stmt as $load_s) { 
                            $str_date =strtotime($load_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 $load_s["no"];
?>
>
                            </form>
                            <div class="tweet-info">
                                <span><?php 
echo $load_s["author"];
コード例 #2
0
ファイル: index.php プロジェクト: heojae91/webLab00
                    <!-- 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>";
    print "<span>" . date('H:i:s d/m/Y', strtotime($row['time'])) . "</span>";
    ?>
コード例 #3
0
ファイル: index.php プロジェクト: Na-Ick-Chae/Web
                <!-- 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 
    echo $post['author'];
    ?>
コード例 #4
0
ファイル: index.php プロジェクト: joontae/web0
                    <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 
    echo $row["author"];
    ?>
コード例 #5
0
ファイル: index.php プロジェクト: jiheec/webLab00
                        <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">
                        Nevermind I'll find someone like you
                    </div>
コード例 #6
0
ファイル: contents.php プロジェクト: KeoSeong/project
<?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">
コード例 #7
0
ファイル: index.php プロジェクト: hanyangsw/webpro
                </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>