本文整理汇总了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;">
示例2: getResponseTo
public function getResponseTo()
{
if ($this->row['ResponseTo'] == 0) {
return null;
} else {
return Forum::ROW($this->row['ResponseTo']);
}
}
示例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>