示例#1
0
文件: index.php 项目: fulldump/8
<?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
0
文件: auto.class.php 项目: fulldump/8
 public function getResponseTo()
 {
     if ($this->row['ResponseTo'] == 0) {
         return null;
     } else {
         return Forum::ROW($this->row['ResponseTo']);
     }
 }
示例#3
0
文件: answer.php 项目: fulldump/8
<?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 = '*****@*****.**';
$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>