=========================== */ ?> isAdmin(); $isEdition = isset($_GET["edit"]); $commentId = ($isEdition) ? $_GET["edit"] : NULL; if(isset($_POST["btnAdd"])) { unset($_POST["btnAdd"]); $_POST["username"] = strip_tags($_POST["username"]); $_POST["email"] = strip_tags($_POST["email"]); $_POST["web"] = strip_tags($_POST["web"]); if (isset($_POST["id_comment"])) { if ($isAdmin) { if ($comment->modifyComment($_POST, $_POST["id_comment"])) { header("Location: comments.php?modified=true"); die(); } else { header("Location: comments.php?modified=false"); die(); } } } else { $comment->generateCookie($_POST); $_POST["spam"] = ($comment->isSpam($_POST)) ? "1" : "0"; $_POST["ip_user"] = $_SERVER["REMOTE_ADDR"]; if ($comment->addComment($_POST)) { header("Location: ".$conf->urlGelato."/index.php/post/".$_POST["id_post"]); die(); } } } if ($isAdmin) { if (isset($_GET["delete"])) { if ($comment->deleteComment($_GET['delete'])) { header("Location: comments.php?deleted=true"); die(); } else { header("Location: comments.php?deleted=false"); die(); } } ?> gelato :: <?php echo __("comments")?>

 

".__("The comment has been eliminated successfully.")."
"; } if ($_GET["deleted"]=="false") { echo "
".__("The post has NOT been eliminated.")."
"; } } if (isset($_GET["modified"])) { if ($_GET["modified"]=="true") { echo "
".__("The comment has been modified successfully.")."
"; } if ($_GET["modified"]=="false") { echo "
".__("The post has NOT been modified.")."
"; } } ?>
getComment($_GET["edit"]); $date = strtotime($row["comment_date"]); $input = array("{User}", "{Email}", "{Web}", "{Comment}", "{Id_Post}", "{Date_Added}", "{Id_Comment}", "{Form_Action}"); $output = array($row["username"], $row["email"], $row["web"], $row["content"], $row["id_post"], $date, $row["id_comment"], $conf->urlGelato."/admin/comments.php"); $template->cargarPlantilla($input, $output, "template_comment_post"); $template->mostrarPlantilla(); } else { if (isset($_GET["page"]) && is_numeric($_GET["page"]) ) { $page_num = $_GET["page"]; } else { $page_num = NULL; } $limit=$conf->postLimit; if(isset($page_num) && is_numeric($page_num) && $page_num>0) { $from = (($page_num-1) * $limit); } else { $from = 0; } if (isset($_GET["spam"]) && $_GET["spam"]=="true") { $sp = "1"; } else { $sp = null; } $rs = $comment->getComments(null, $limit, $from, $sp); if ($comment->contarRegistros()>0) { while($rowComment = mysql_fetch_array($rs)) { $commentAuthor = ($rowComment["web"]=="") ? $rowComment["username"]." | ".$rowComment["email"] : "".$rowComment["username"]." | ".$rowComment["email"]; $input = array("{Permalink}", "{URL_Tumble}", "{Id_Comment}", "{Comment_Author}", "{Comment}"); $output = array($conf->urlGelato."/index.php/post/".$rowComment["id_post"]."#comment-".$rowComment["id_comment"], $conf->urlGelato, $rowComment["id_comment"], $commentAuthor, $rowComment["content"]); $template->cargarPlantilla($input, $output, "template_comment"); $template->mostrarPlantilla(); } $p = new pagination; $p->items($comment->countComments()); $p->limit($limit); $p->currentPage(isset($page_num) ? $page_num : 1); $p->show(); } } ?>
urlGelato."/login.php"); } ?>