} $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> ' . Lib::colorizeHTML($pregunta->getText()) . ' </div> </div> <br> <br> Enlace para responder <a href="http://' . $_SERVER['HTTP_HOST'] . Config::get('FORUM_URL') . '?pregunta=' . $pregunta->getQuestion()->getId() . '#q' . $pregunta->getId() . '">http://' . $_SERVER['HTTP_HOST'] . Config::get('FORUM_URL') . '?pregunta=' . $pregunta->getQuestion()->getId() . '#q' . $pregunta->getId() . '</a> '; $headers = "MIME-Version: 1.0\n"; $headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; $headers .= 'Message-ID: <' . md5($pregunta->getQuestion()->getId()) . '@ibentus.treeweb.es>' . "\n"; $headers .= "Reply-To: " . $login . "\n"; $headers .= "From: " . Config::get('FORUM_SENDER_EMAIL') . "\n"; $headers .= "X-Priority: 1 (Higuest)\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "Importance: High\n"; $usuarios = SystemUser::SELECT();
public function drawAnswers() { $classname = 'foro-elem'; if (Session::isLoggedIn() && $this->getUser()->getId() == Session::getUser()->getId()) { $classname .= ' foro-elem-user'; } echo '<div class="' . $classname . '" id="q' . $this->getId() . '">'; $date = $this->getTimestamp(); echo '<div class="fecha" title="Hora: ' . date('H', $date) . ':' . date('i', $date) . '">'; echo '<div class="dia">' . date('d', $date) . '</div>'; echo '<div class="mes">' . date('M', $date) . '</div>'; echo '<div class="ano">' . date('Y', $date) . '</div>'; echo '</div>'; echo '<div class="botones margen">'; echo '<button id="answer-button1-' . $this->getId() . '" class="shadow-button shadow-button-blue" onclick="botonResponderClick(\'' . $this->getId() . '\'); this.style.display=\'none\'">Responder</button>'; echo '</div>'; echo '<div class="margen texto">'; echo '<div class="pie">'; $autor = $this->getUser(); if ($autor != null) { echo '<div class="autor">por <em>' . htmlentities($this->getUser()->getName(), ENT_COMPAT, 'utf-8') . '</em></div>'; } // TODO: Contar y escribir comentarios: echo '<div class="comentarios">' . $this->getNumResponses() . ' respuestas</div>'; echo '</div>'; echo Lib::colorizeHTML($this->getText()); echo '</div>'; echo '<div id="answer' . $this->getId() . '" class="margen" style="background-color:silver; display:none;">fasdfasfdffdfdfdfafsd'; echo '</div>'; echo '</div>'; echo '<div id="hijos' . $this->getId() . '" class="foro-hijos">'; $hijos = $this->getResponses(); foreach ($hijos as $h) { $h->drawAnswers(); } echo '</div>'; }