douxunwei7083 2016-11-24 13:43
浏览 17

用户配置文件之间存在意图空间,并且在我的论坛中使用bootsrap进行回复

I'm building a forum using php and bootstrap. It works 100%, my only issue is when a user posts in a thread, the post and the user profile images has a big gap. It looks like a padding issue, but there is no padding between them. Any advice would be brilliant

 echo '<div class="container form">
            <div class="page-header page-heading">
                <tr class="text-center">
                    <th colspan="2"><h2>' . $row['topic_subject'] .   '</h2></th>
                </tr> 
            <table class="table forum table-striped table-hover">
                <thead>
                    <tr>
                        <th class="cell-stat"></th>
                    </tr>
                </thead/>';

    //fetch the posts from the database
    $posts_sql = "SELECT
                posts.post_topic,
                posts.post_content,
                posts.post_date,
                posts.post_by,
                users.user_id,
                users.user_name
            FROM
                posts
            LEFT JOIN
                users
            ON
                posts.post_by = users.user_id
            WHERE
                posts.post_topic = " . mysql_real_escape_string($_GET['id']);

    $posts_result = mysql_query($posts_sql);

    if(!$posts_result)
    {
        echo '<tr><td>The posts could not be displayed, please try again  later.</tr></td></table>';
    }
    else
    {

        while($posts_row = mysql_fetch_assoc($posts_result))
        {
            echo '
                <tbody>
                    <tr>
                        <td class="text-center">

                        </td>
                        <td class="hidden-xs hidden-sm">
                            <img src="ppp.png"><br>
                            <i class="fa fa-clock-o">
                            </i>
                            <ul class="pull-left user-info">
                                <li>'
                                    .$posts_row['user_name'].
                                '</li>'.
                                '<li>'
                                    . date('d-m-Y H:i',  strtotime($posts_row['post_date'])).
                                '</li>
                        </td>
                        <td class="pull-right">'.
                            '<p>' 
                                 .htmlentities(stripslashes($posts_row['post_content'])).
                            '</p>
                        </td>
                    </tr>';
        }
    }

    if(!$_SESSION['signed_in'])
    {
      echo '<tr><td colspan=2>You must be <a href="signin.php">signed    in</a> to reply. You can also <a href="signup.php">sign up</a> for an account.';
    }
    else
    {
      //show reply box
      echo '<tr><td colspan="2"><h2>Reply:</h2><br />
            <form method="post" action="reply.php?id=' .     $row['topic_id'] . '">
                <textarea name="reply-content"></textarea><br /><br />
                <input type="submit" value="Submit reply" />
            </form></td></tr>';
    }
    //finish the table
    echo '</thead></table>';
  }
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测