當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Forum::ROW方法代碼示例

本文整理匯總了PHP中Forum::ROW方法的典型用法代碼示例。如果您正苦於以下問題:PHP Forum::ROW方法的具體用法?PHP Forum::ROW怎麽用?PHP Forum::ROW使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Forum的用法示例。


在下文中一共展示了Forum::ROW方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

<?php

if (isset($_GET['pregunta'])) {
    $pregunta = Forum::ROW($_GET['pregunta']);
    $pregunta->drawAnswers();
} else {
    ?>
<div class="margen" style="text-align:center;">
	<input style="display:inline-block; margin:0; padding:7px; border:solid silver 1px; height:17px;"
		onkeyup="searchQuestions(this.value);"
	><button class="shadow-button" style="display:inline-block; height:33px; border-top-left-radius:0; border-bottom-left-radius:0;">Buscar</button>
</div>

<div id="no-hay-resultados" class="mensaje" style="display:none;">
	No hay ningún resultado acorde con la búsqueda.
</div>

<div id="preguntas">
	<?php 
    $questions = Forum::SELECT("ResponseTo = 0 ORDER BY Timestamp DESC");
    foreach ($questions as $q) {
        $q->drawQuestion();
    }
    ?>
</div>

<div class="margen" id="make-question">
	<div style="padding:8px; background-color:white;">
		<textarea id="make-question-text" style="border:none; padding:0; margin:0; width:100%;" onkeyup="ajustarTextarea(this);"></textarea>
	</div>
	<div style="margin-top:16px; text-align:right;">
開發者ID:fulldump,項目名稱:8,代碼行數:31,代碼來源:index.php

示例2: getResponseTo

 public function getResponseTo()
 {
     if ($this->row['ResponseTo'] == 0) {
         return null;
     } else {
         return Forum::ROW($this->row['ResponseTo']);
     }
 }
開發者ID:fulldump,項目名稱:8,代碼行數:8,代碼來源:auto.class.php

示例3: htmlentities

<?php

$id = $_POST['id'];
$text = $_POST['text'];
$pregunta = Forum::ROW($id)->answer($text);
$pregunta->drawAnswers();
ob_end_flush();
$user = Session::getUser();
$login = $user->getLogin();
$email_contacto = $login;
$to = 'ovillo@lists.ovillo.org';
$subject = $user->getName() . ' ha respondido algo en Ovillo';
$date = $pregunta->getTimestamp();
$autor = $pregunta->getUser();
if ($autor != null) {
    $autor_txt = '<div class="autor">por <em>' . htmlentities($autor->getName(), ENT_COMPAT, 'utf-8') . '</em></div>';
}
$message = '
		<div style="    border: 1px solid silver;    border-radius: 8px 8px 8px 8px;    margin: 8px;    overflow: auto;">
			<div class="fecha" title="Hora: ' . date('H', $date) . ':' . date('i', $date) . '" style="    color: gray;    float: left;    font-weight: bold;    text-align: center;    width: 48px;">
				<div class="dia" style="font-size: 28px;">' . date('d', $date) . '</div>
				<div class="mes" style="">' . date('M', $date) . '</div>
				<div class="ano" style="font-size: 10px;">' . date('Y', $date) . '</div>
			</div>
			<div class="botones margen" style="clear: right; float: right; padding: 16px;">
				<a href="http://' . $_SERVER['HTTP_HOST'] . Config::get('FORUM_URL') . '?pregunta=' . $pregunta->getQuestion()->getId() . '#q' . $pregunta->getId() . '" class="shadow-button shadow-button-blue" style="    border: 1px solid silver;    border-radius: 3px 3px 3px 3px;    color: white;    cursor: pointer;    font-size: 12px;    font-weight: bold;    margin: 0;    padding: 7px;    text-transform: uppercase; background-color: #4D90FE; text-decoration:none;">Responder</a>
			</div>
			<div style="margin-left: 48px; padding: 16px;">
				<div class="pie" style="">
					' . $autor_txt . '
				</div>
開發者ID:fulldump,項目名稱:8,代碼行數:31,代碼來源:answer.php


注:本文中的Forum::ROW方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。