当前位置: 首页>>代码示例>>PHP>>正文


PHP getcomments函数代码示例

本文整理汇总了PHP中getcomments函数的典型用法代码示例。如果您正苦于以下问题:PHP getcomments函数的具体用法?PHP getcomments怎么用?PHP getcomments使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getcomments函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

		', $quest_cols[2], $id);
    if ($rows_qe) {
        $object['ends'] = array();
        foreach ($rows_qe as $numRow => $row) {
            $object['ends'][] = GetQuestInfo($row, 0xffffff);
        }
    }
    unset($rows_qe);
    // Положения объектофф:
    $data = $DB->select('SELECT position_y as y, position_x as x, map as m, spawntimesecs FROM gameobject WHERE id = ?d', $id);
    position($data);
    save_cache(3, $object['entry'], $object);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $object['name'] . ' - ' . $smarty->get_config_vars('Objects'), 'tab' => 0, 'type' => 2, 'typeid' => $object['entry'], 'path' => '[0,5,' . $object['type'] . ']');
if ($object['pagetext']) {
    $page['Book'] = true;
}
$page['Mapper'] = true;
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
if (isset($allitems)) {
    $smarty->assign('allitems', $allitems);
}
if (isset($object)) {
    $smarty->assign('object', $object);
}
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->display('object.tpl');
开发者ID:OregonCore,项目名称:AoWoW,代码行数:31,代码来源:object.php

示例2: getsharechain

    //---shared---//
    if ($sharestatus == "yes") {
        $topleftbutton = "checkedbutton";
        include "getsharechain.php";
        $sharechainpane = getsharechain($siteid, $myid);
    } else {
        $topleftbutton = "sharebutton";
    }
    //---comments---//
    include "getcomments.php";
    if (isset($ownerid) and $ownerid == $myid) {
        $slashurl = addslashes($url);
        $arraygetcomments = getcomments($slashurl, "myproject", $myid);
    } else {
        $slashurl = addslashes($url);
        $arraygetcomments = getcomments($slashurl, "project", $myid);
    }
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
} else {
    $topleftbutton = "error";
    $searchbar = "error";
    $commentspane = "error";
}
//---navbar---//
//---hidden go button---//
$hiddengobutton = "\n\t\t<!-- hidden go button -->\n\t\t\t<input name='gobutton' type='submit' value='>>>' style='width: 0; height: 0; padding: 0; border: 0; margin: 0;' aria-hidden='false' tabindex='-1'>\n\t\t";
//---topleft button---//
//---about button---//
if ($topleftbutton == "aboutbutton") {
    $topleftbutton = "\n\t\t\t\t<!-- about button -->\n\t\t\t\t\t<a id='aboutbutton' href='index.php?p=about' tabindex='0' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;aboutbutton&#39;).click()' class='btn btn-primary navbarbutton' title='what is sharewaves?'>\n\t\t\t\t\t\t<img src='sharewhite.png' style='height: 100%; width: auto'><p class='navbartext'>hare</p></img>\n\t\t\t\t\t</a>\n\t\t\t\t\t<a id='extensionsigninbutton' href='http://share-waves.com?p=signin' target='_blank' class='btn btn-primary navbarbutton' title='signin'>\n\t\t\t\t\t\t<img src='sharewhite.png' style='height: 100%; width: auto'><p class='navbartext'>ign in</p></img>\n\t\t\t\t\t</a>\n\t\t\t\t";
开发者ID:jamesbmayr,项目名称:sharewaves,代码行数:31,代码来源:navbar.php

示例3: str_replace

        $msg = str_replace("\n", " ", $msg);
        $msg = str_replace("\r", " ", $msg);
        require_once CODE . 'bbParser.php';
        $bbcode = new bbParser($disableURL);
        $msg = $bbcode->getHtml($msg);
        addcomments((int) $idmess, $commentsfilename, $msg, $yourname, $email);
        $msg = '';
        @setcookie('flood_news', $newsflood, time() + $newsflood);
    }
}
if (empty($yourname)) {
    $yourname = $_SESSION['name'];
}
if (file_exists($commentsfilename)) {
    $commentpage = isset($_GET['commentpage']) ? (int) $_GET['commentpage'] : 0;
    $arrcomments = getcomments($commentsid, $commentsfilename, $moder_comments);
    $arrcomments = array_reverse($arrcomments);
    $countcomments = getcountcomments($commentsid, $commentsfilename, $moder_comments);
    echo '<br /><br /><div class="comment_head"><a name="comment_begin"></a><h3>' . __('Комментарии') . ':</h3></div><hr>';
    if (count($arrcomments) == 0) {
        echo '<div class="comment"><br/>' . __('Нет комментариев') . '.<br/></div>';
    } else {
        if ($commentpage * $commentsperpage_comments > count($arrcomments)) {
            $commentpage = 0;
        }
        $i = $commentpage * $commentsperpage_comments;
        if ($commentpage == 0) {
            $j = min(count($arrcomments), $commentsperpage_comments);
        } else {
            $j = min(count($arrcomments), $commentpage * $commentsperpage_comments + $commentsperpage_comments);
        }
开发者ID:porese,项目名称:kandidat-cms,代码行数:31,代码来源:comments.php

示例4: news

function news($theme)
{
    include "modules/getcomments.php";
    include "includes/smileyparse.php";
    if (isset($_GET["article"])) {
        $article_id = $_GET["article"];
        $query = "SELECT * FROM news WHERE id = '{$article_id}'";
        $result = mysql_query($query);
        $num = mysql_numrows($result);
        if ($num == 0) {
            echo '<div class="entry">No such article!</div>';
        } else {
            $id = mysql_result($result, 0, "id");
            $title = mysql_result($result, 0, "title");
            $title = stripslashes($title);
            $details = mysql_result($result, 0, "details");
            $article = mysql_result($result, 0, "short_article");
            $article = parseSmiley($article);
            $article = stripslashes($article);
            $extended_article = mysql_result($result, 0, "extended_article");
            $extended_article = parseSmiley($extended_article);
            $extended_article = stripslashes($extended_article);
            ?>
			<div class="entry">
			<h1><a href="index.php?module=news&article=<?php 
            echo $id;
            ?>
" class="h1"><?php 
            echo $title;
            ?>
</a></h1>
			<?php 
            echo $article;
            ?>
<br />
			<?php 
            if ($extended_article != "") {
                echo "<br />{$extended_article}";
            }
            ?>
			<hr>
			<span class="posttime"><?php 
            echo $details;
            ?>
</span><br />
			<?php 
            include "modules/comments.php";
            comments($id, $title);
            ?>
			</div>
			<?php 
        }
    } else {
        $query = "SELECT * FROM news ORDER BY id DESC LIMIT 5";
        $result = mysql_query($query);
        $num = mysql_numrows($result);
        if ($num == 0) {
            echo '<div class="entry">No posts in database</div>';
        } else {
            $i = 0;
            while ($i < $num) {
                $id = mysql_result($result, $i, "id");
                $title = mysql_result($result, $i, "title");
                $details = mysql_result($result, $i, "details");
                $article = mysql_result($result, $i, "short_article");
                $article = parseSmiley($article);
                $extended_article = mysql_result($result, $i, "extended_article");
                ?>
				<div class="entry">
				<h1><a href="index.php?module=news&article=<?php 
                echo $id;
                ?>
" class="h1"><?php 
                echo $title;
                ?>
</a></h1>
				<span class="posttime"><?php 
                echo $details;
                ?>
</span><br />
				<?php 
                echo $article;
                ?>
<br />
				<?php 
                if ($extended_article != "") {
                    ?>
					<br /><a href="index.php?module=news&article=<?php 
                    echo $id;
                    ?>
">Read More >></a>
					<?php 
                }
                ?>
				<hr>
				<span class="rightalign"><?php 
                getcomments($id);
                ?>
</span><br />
				</div>
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:fireblog-svn,代码行数:101,代码来源:news.php

示例5: getcomments

" class="trash"><span class="glyphicon glyphicon-trash"></span></a>
                                    <a id="<?php 
        echo $task['item_id'];
        ?>
" class="flag"><span class="glyphicon glyphicon-ok"></span></a>
                                </div>
                                    <?php 
    }
    ?>
                            <div class="actionBox">
                                <ul id="commentList-<?php 
    echo $task['item_id'];
    ?>
">                                
                                    <?php 
    $comments = getcomments($task['item_id']);
    foreach ($comments as $comment) {
        ?>
                                        <li id="liComment-<?php 
        echo $comment['comment_id'];
        ?>
">
                                            <div class="commentText">
                                                <p class="comment" id="comment-<?php 
        echo $comment['comment_id'];
        ?>
"><?php 
        echo $comment['comment_text'];
        ?>
</p> 
                                                <?php 
开发者ID:sanjaypaudel007,项目名称:WAP_todo-list-app,代码行数:31,代码来源:index.php

示例6: filter_input

include "db-connection.php";
include "getters.php";
$action = filter_input(INPUT_POST, 'action');
session_start();
include_once '../session_check.php';
//$_SESSION['user_id'] = 1;
$user_id = $_SESSION['user_id'];
switch ($action) {
    case "Insert":
        $comment_text = filter_input(INPUT_POST, 'commentText');
        $item_id = filter_input(INPUT_POST, 'itemId');
        $created_date = date('Y-m-d H:i:s');
        $statement = $db->prepare("INSERT INTO comments VALUES (NULL, :comment_text, :user_id, :item_id, :created_date)");
        $statement->execute(array(":comment_text" => $comment_text, ":user_id" => $user_id, ":item_id" => $item_id, ":created_date" => $created_date));
        $comments = getcomments($item_id);
        echo json_encode($comments);
        break;
    case "Update":
        $comment_text = filter_input(INPUT_POST, 'commentText');
        $comment_id = filter_input(INPUT_POST, 'commentId');
        $user_id = filter_input(INPUT_POST, 'userId');
        $statement = $db->prepare("UPDATE comments set comment_text= :comment_text where comment_id= :comment_id and user_id= :user_id");
        $statement->execute(array(":comment_text" => $comment_text, ":user_id" => $user_id, ":comment_id" => $comment_id));
        if ($statement->rowCount()) {
            echo $comment_id;
        } else {
            echo 'You are not allowed to do update.';
        }
        break;
    case "Delete":
开发者ID:sanjaypaudel007,项目名称:WAP_todo-list-app,代码行数:30,代码来源:comments.php

示例7: getcomments

        }
    }
    //---update navbar---//
    include "getcomments.php";
    $arraygetcomments = getcomments($p, $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    //---tips---//
    if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
        include "tips.php";
        $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid);
        $helppane = displaytip($pagetype, $myid);
    } else {
        $helppane = "";
    }
    echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments;
} elseif (!empty($_POST["p"]) and $myid > 0) {
    include "getcomments.php";
    $arraygetcomments = getcomments(ltrim($_POST["p"], "c_"), $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    //---tips---//
    if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
        include "tips.php";
        $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid);
        $helppane = displaytip($pagetype, $myid);
    } else {
        $helppane = "";
    }
    echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments;
}
开发者ID:jamesbmayr,项目名称:sharewaves,代码行数:31,代码来源:comment.php

示例8: inserttable

    inserttable('spacecomments', $setsqlarr);
    if ($rates > 0) {
        $goodrate = $rates;
        $badrate = 0;
    } elseif ($rates < 0) {
        $goodrate = 0;
        $badrate = 0 - $rates;
    } else {
        $goodrate = 0;
        $badrate = 0;
    }
    $_SGLOBAL['db']->query('UPDATE ' . tname('spaceitems') . ' SET lastpost=\'' . $_SGLOBAL['timestamp'] . '\', replynum=replynum+1,goodrate=goodrate+' . $goodrate . ',badrate=badrate+' . $badrate . ' WHERE itemid=\'' . $item['itemid'] . '\'');
    //评分完成
    if (empty($mode)) {
        $item['replynum']++;
        $html = getcomments($item);
        $html = jsstrip($html);
        print <<<EOF
\t\t<script language="javascript">
\t\tparent.document.getElementById('xspace-itemreply').innerHTML = "{$html}";
\t\tparent.document.getElementById('xspace-itemreply').scrollIntoView();
\t\tparent.document.getElementById('xspace-phpframe').src = "about:blank";
\t\t</script>
EOF;
    } else {
        showxml($blang['rates_succeed']);
    }
} elseif ($action == 'modelrate') {
    //快捷评分
    $rates = 1;
    $resultmodels = array();
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:batch.comment.php

示例9: writecomment

 *
 *@return echoes the coments
 *
 **/
function writecomment($user, $coment)
{
    echo '<div class="comment">
		  <h5><b>' . htmlspecialchars($user) . ' Says:</b></h5>
		  <p style="text-indent:40px;text-align:justify">' . htmlspecialchars($coment) . '</p>
		</div>';
}
if (isset($_SESSION['usrid'])) {
    if (isset($_POST['comment']) && isset($_POST['idvideo'])) {
        if ($_POST['comment'] != "") {
            if (insertcomment($_SESSION['usrid'], $_POST['idvideo'], $_POST['comment'], date('Y/m/d'))) {
                if ($lastcomments = getcomments(20, $_POST['idvideo'])) {
                    echo 'posted ';
                    while ($row = pg_fetch_array($lastcomments)) {
                        writecomment($row['username'], $row['coment']);
                    }
                } else {
                    echo 'noposted';
                }
            } else {
                echo 'noposted';
            }
        } else {
            echo 'nocomment';
        }
    } else {
        echo 'notdata';
开发者ID:FihlaTV,项目名称:LeVideoCollector,代码行数:31,代码来源:comment.php

示例10: hexdec

    $skunit['UnitID2'][$i] = $arr[2];
    $skunit['Layout'][$i] = $arr[3];
    $skunit['Range'][$i] = $arr[4];
    $skunit['Interval'][$i] = $arr[5];
    $skunit['Target'][$i] = $arr[6];
    $skunit['Flag'][$i] = hexdec($arr[7]);
    $i++;
}
if ($debug) {
    print "[0;34m[Debug][0;0m Read unit_db Memory: " . print_mem() . "\n";
}
fclose($unitdb);
$putsk = "";
// initialize variable for file_put_contents.
// Publish all comments
$putsk .= getcomments(defined('RENEWAL') ? true : false);
$putsk .= "skill_db: (\n";
// Get Main Skilldb File
$file = "skill_db.txt";
$skmain = fopen(DIRPATH . $file, "r") or die("Unable to open '" . DIRPATH . $file . "'.\n");
print "[0;32mReading[0;0m '" . DIRPATH . $file . "' ...\n";
$linecount = 0;
// Get Number of entries
while (!feof($skmain)) {
    $line = fgets($skmain);
    if (substr($line, 0, 2) == "//" || strlen($line) < 10) {
        continue;
    }
    $linecount++;
}
if ($debug) {
开发者ID:KirieZ,项目名称:Hercules,代码行数:31,代码来源:skilldbconverter.php

示例11: mysql_query

        if ($row["profileid"] == $myid) {
            $p = $myid;
            $pagetype = "myprofile";
        } else {
            $profileid = $row["profileid"];
            $strSQL4 = "SELECT * FROM users WHERE userid = '{$profileid}' ";
            $rs = mysql_query($strSQL4) or die(mysql_error());
            $row = mysql_fetch_array($rs);
            $p = $row["userid"];
            $pagetype = "profile";
        }
    } else {
        $p = $row["url"];
        $slashp = addslashes($p);
        $strSQL5 = "SELECT * FROM masters WHERE url = '{$p}' ";
        $rs = mysql_query($strSQL5) or die(mysql_error());
        $row = mysql_fetch_array($rs);
        if ($row['owner'] == $myid) {
            $pagetype = "myproject";
        } else {
            $pagetype = "project";
        }
    }
    //---update commentspane---//
    include "getcomments.php";
    $arraygetcomments = getcomments($p, $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    $commentformbar = "\n\t\t\t<form onsubmit='commentbutton(&#39;c_" . $p . "&#39;);' action='javascript:void(0);' style='margin-bottom: 0px'>\n\t\t\t\t<div id='commentsform' class='searchform input-group' style='padding-top: 0px'>\n\t\t\t\t\t<input id='commentbox' name='comment' type='text' class='form-control searchfield' style='text-align: left; margin-top: 5px; border: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px' autocomplete='off'></input>\n\t\t\t\t\t<span class='input-group-addon' style='padding: 0px; margin: 0px; border-radius: 0px; border: 0px; background-color: rgba(048,122,183,1);'>\n\t\t\t\t\t\t<div id='c_" . $p . "' class='btn btn-success' tabindex='0' style='margin-top: 5px; padding-left: 30px; padding-right: 30px; min-height: 32px; border-radius: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; min-height: 32px' onclick='commentbutton(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;c_" . $p . "&#39;).click()' title='post your comment'>\n\t\t\t\t\t\t\t<span class='glyphicon glyphicon-comment divbuttonglyph' aria-hidden='false'>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t";
    echo $commentcount . ":|:|:|:" . $pagecomments . ":|:|:|:" . $commentformbar;
}
开发者ID:jamesbmayr,项目名称:sharewaves,代码行数:31,代码来源:openedit.php

示例12: foreach

     }
 }
 foreach ($arraysitesid as $siteid) {
     $strSQL7 = "UPDATE branches SET observerqueue=CONCAT(observerqueue,'{$myid},') WHERE siteid = '{$siteid}' ";
     mysql_query($strSQL7) or die(mysql_error());
 }
 //---wavescount---//
 $strSQL17 = "SELECT * FROM branches WHERE observerqueue LIKE '%{$myid}%' ";
 $rs = mysql_query($strSQL17) or die(mysql_error());
 $wavescount = mysql_num_rows($rs);
 if ($wavescount == 0) {
     $wavescount = "";
 }
 //---update navbar---//
 include "getcomments.php";
 $arraygetcomments = getcomments($friendid, "profile", $myid);
 $commentcount = $arraygetcomments[0];
 $pagecomments = $arraygetcomments[1];
 $strSQL1 = "SELECT * FROM users WHERE friends LIKE '%{$friendid}%' ";
 $rs = mysql_query($strSQL1) or die(mysql_error());
 $followercount = mysql_num_rows($rs);
 $unfollowbutton = "\n\t\t\t<!-- unfollow button -->\n\t\t\t\t<div name='unfollowbutton' tabindex='0' id='unfollow_" . $friendid . "' class='btn btn-success navbarbutton' onclick='unfollow(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;unfollow_" . $friendid . "&#39;).click()' title='unfollow this user'>\n\t\t\t\t\t<span class='glyphicon glyphicon-heart divbuttonglyph' style='padding-right: 3px' aria-hidden='false'></span>\n\t\t\t\t\t<span class='badge'>" . $followercount . "</span>\n\t\t\t\t</div>\n\t\t\t";
 //---tips---//
 if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
     include "tips.php";
     $_SESSION["tip"] = updatetips("follow", $_SESSION["tip"], $myid);
     $helppane = displaytip("profile", $myid);
 } else {
     $helppane = "";
 }
 echo $unfollowbutton . ":|:|:|:" . $wavescount . ":|:|:|:" . $commentcount . ":|:|:|:" . $pagecomments . ":|:|:|:" . $helppane;
开发者ID:jamesbmayr,项目名称:sharewaves,代码行数:31,代码来源:follow.php

示例13: elseif

    if (trim($_REQUEST['message']) !== "") {
        //Запись
    } elseif ($commentsid > 0) {
        if ($del > 0) {
            dellcomments(0, $commentsid, $commentFile);
            header('LOCATION: ../admin/comments.php' . $editpage);
        }
        if ($moder > -1) {
            modercomments(0, $commentsid, $commentFile, $moder);
            header('LOCATION: ../admin/comments.php' . $editpage);
        }
        if ($edit > 0) {
        }
    }
    @($contentcenter .= "<table cellpadding=\"2\" cellspacing=\"0\" width=\"90%\"><h3>Комментарии к новости</h3><br /><br />");
    $arrcomments = getcomments(0, $commentFile);
    for ($i = 0; $i < count($arrcomments); $i++) {
        $currentcomment = $arrcomments[$i];
        $contentcenter .= '<tr><td  width="50%" colspan="1"><b>Автор:</b> ' . $currentcomment['name'] . '  <b>ip:</b>[<a href="../admin/banip.php?add=' . $currentcomment['ip'] . '" title="Бан по ip адресу">' . $currentcomment['ip'] . '</a>]<br/>';
        $contentcenter .= '<b>E-mail:</b>  <a href="mailto:' . $currentcomment['email'] . '">' . $currentcomment['email'] . '</a></td>';
        $contentcenter .= '<td  width="30%" colspan="1">' . date("r", $currentcomment['id_comment']) . '</td>';
        $contentcenter .= '<td width="15%" colspan="1">Модерация: <a title="Модерация" href="../admin/comments.php' . $editpage . '&commentsid=' . $currentcomment['id_comment'];
        if ($currentcomment['moderator'] == 1) {
            $contentcenter .= '&moder=0"><img src="images/cb_y.png" /></a></td>';
        } else {
            $contentcenter .= '&moder=1"><img src="images/cb_e.png" /></a></td>';
        }
        $contentcenter .= '<td width="5%" colspan="1"><a title="Удалить комментарий" href="../admin/comments.php' . $editpage . '&commentsid=' . $currentcomment['id_comment'] . '&del=1"><img src="images/delete.png" /></a></td></tr>';
        $contentcenter .= '<tr><td class="line3" colspan="4">' . $currentcomment['content'] . "</td></tr>";
    }
}
开发者ID:porese,项目名称:kandidat-cms,代码行数:31,代码来源:comments.php

示例14: elseif

			<br /><br /><a href=\'javascript:history.back(1)\'><B>Вернуться назад</B></a>';
        }
        //Комментарии
    } elseif ($newsid > 0) {
        if ($commentsid > 0) {
            if ($del > 0) {
                dellcomments($newsid, $commentsid, $commentFile);
                header('LOCATION: ../admin/news.php?newsid=' . $newsid);
            }
            if ($moder > -1) {
                modercomments($newsid, $commentsid, $commentFile, $moder);
                header('LOCATION: ../admin/news.php?newsid=' . $newsid);
            }
        }
        @($contentcenter .= '<table cellpadding="2" cellspacing="0" width="90%"><h3>Комментарии к новости</h3><br /><br />');
        $arrcomments = getcomments($newsid, $commentFile);
        for ($i = 0; $i < count($arrcomments); $i++) {
            $currentcomment = $arrcomments[$i];
            $contentcenter .= '<tr><td  width="80%" colspan="1"><b>Автор:</b> ' . $currentcomment['name'] . '  <b>ip:</b>[<a href="../admin/banip.php?add=' . $currentcomment['ip'] . '" title="Бан по ip адресу">' . $currentcomment['ip'] . '</a>]<br/>';
            $contentcenter .= '<b>E-mail:</b>  <a href="mailto:' . $currentcomment['email'] . '">' . $currentcomment['email'] . '</a></td>';
            $contentcenter .= '<td width="15%" colspan="1">Модерация: <a title="Модерация" href="../admin/news.php?newsid=' . $newsid . '&commentsid=' . $currentcomment['id_comment'];
            if ($currentcomment['moderator'] == 1) {
                $contentcenter .= '&moder=0"><img src="images/cb_y.png" /></a></td>';
            } else {
                $contentcenter .= '&moder=1"><img src="images/cb_e.png" /></a></td>';
            }
            $contentcenter .= '<td width="5%" colspan="1"><a title="Удалить комментарий" href="../admin/news.php?newsid=' . $newsid . '&commentsid=' . $currentcomment['id_comment'] . '&del=1"><img src="images/delete.png" /></a></td></tr>';
            $contentcenter .= '<tr><td class="line3" colspan="3">' . $currentcomment['content'] . "</td></tr>";
        }
        $contentcenter .= '<tr><td><center><a href=\'javascript:history.back(1)\'><B>Вернуться назад</B></a></center></td></tr>';
        //Редактирование
开发者ID:porese,项目名称:kandidat-cms,代码行数:31,代码来源:news.php

示例15: getcomments



              <!-- comment section --> 
              <div id = "commentlist"> 
                <!-- area to write comments--> 
                <div id = "postcomment">
                  <p> What do you think? Write a commment</p>
                  <textarea class="input-lg col-xs-12 col-sm-12 col-md-12" id="commenttext" type="text" name="search" rows="2" > </textarea>
                  <button id="post" type="button" class="btn btn-info">Post Comment <span class="glyphicon glyphicon-comment"></span>
                  </button>
                  <p id="alert-comment" class="bg-danger" style = "display:none;"><br>you need to Sign in before you post a comment<br><br></p>
                </div>

                <div id = "commentpart">
                  <?php 
$comments = getcomments(20, $_GET['watch']);
while ($commentrow = pg_fetch_array($comments)) {
    ?>
                      <div class="comment">
                        <h5><b><?php 
    echo htmlspecialchars($commentrow['username']);
    ?>
 Says:</b></h5>
                        <p style="text-indent:40px;text-align:justify"><?php 
    echo htmlspecialchars($commentrow['coment']);
    ?>
</p>
                      </div>
                    <?php 
}
//end of while
开发者ID:FihlaTV,项目名称:LeVideoCollector,代码行数:29,代码来源:watchvideo.php


注:本文中的getcomments函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。