=========================== */ ?> isAuthenticated()) { if (isset($_GET["delete"])) { $tumble->deletePost($_GET['delete']); header("Location: index.php?deleted=true"); die(); } if(isset($_POST["btnAdd"])) { unset($_POST["btnAdd"]); if ($_POST["type"]=="2") { // is Photo type if (isset($_POST["url"]) && $_POST["url"]!="") { $photoName = getFileName($_POST["url"]); if (!$tumble->savePhoto($_POST["url"])) { header("Location: ".$conf->urlGelato."/admin/index.php?photo=false"); die(); } $_POST["url"] = "../uploads/".sanitizeName($photoName); } if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) { $_POST["url"] = "../uploads/".sanitizeName($_FILES['photo']['name']); } unset($_POST["photo"]); unset($_POST["MAX_FILE_SIZE"]); } if ($_POST["type"]=="7") { // is MP3 type set_time_limit(300); $mp3Name = getFileName($_POST["url"]); if (!$tumble->saveMP3($_POST["url"])) { header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false"); die(); } if (isMP3($remoteFileName)) { $_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name; } } if (!get_magic_quotes_gpc()) { $_POST["title"] = addslashes($_POST["title"]); $_POST["description"] = addslashes($_POST["description"]); } /* $textile = new Textile(); $_POST["title"] = $textile->TextileThis(removeBadTags($_POST["title"],true)); $_POST["description"] = $textile->TextileThis(removeBadTags($_POST["description"])); */ $_POST["title"] = removeBadTags($_POST["title"],true); $_POST["description"] = removeBadTags($_POST["description"]); if (isset($_POST["id_post"])) { $tumble->modifyPost($_POST, $_POST["id_post"]); } else { if ($tumble->addPost($_POST)) { header("Location: ".$conf->urlGelato."/admin/index.php?added=true"); die(); } else { header("Location: ".$conf->urlGelato."/admin/index.php?error=2&des=".$this->merror); die(); } } } else { if ($isEdition) { $post = $tumble->getPost($postId); } ?> gelato :: <?php echo __("control panel")?> richText) { ?>

 

check_version){ $present = version(); $lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt"); if ($present < $lastest) { echo "
".__("A new gelato version has been released and is ready for download.")."

"; } } if (isset($_GET["deleted"])) { if ($_GET["deleted"]=="true") { echo "
".__("The post has been eliminated successfully.")."
"; } } if (isset($_GET["modified"])) { if ($_GET["modified"]=="true") { echo "
".__("The post has been modified successfully.")."
"; } } if (isset($_GET["added"])) { if ($_GET["added"]=="true") { echo "
".__("The post has been added successfully.")."
"; } } if (isset($_GET["error"])) { if ($_GET["error"]==2) { echo "
".__("Error on the database server:")." ".$_GET["des"]."
"; } } if (isset($_GET["mp3"])) { if ($_GET["mp3"]=="false") { echo "
".__("Not an MP3 file or an upload problem.")."
"; } } if (isset($_GET["photo"])) { if ($_GET["photo"]=="false") { echo "
".__("Not a photo file or an upload problem.")."
"; } } ?>
name="frmAdd" id="autosave" class="newpost">
cargarPlantilla($input, $output, "template_add_post"); $template->mostrarPlantilla(); break; case "photo": $url = str_replace("../", $conf->urlGelato."/", $url); $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); $output = array("2", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_photo"); $template->mostrarPlantilla(); break; case "quote": $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); $output = array("3", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_quote"); $template->mostrarPlantilla(); break; case "url": $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editUrl}", "{editBody}"); $output = array("4", $date, $_SESSION['user_id'], $title, $url, $body); $template->cargarPlantilla($input, $output, "template_add_link"); $template->mostrarPlantilla(); break; case "conversation": $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); $output = array("5", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_conversation"); $template->mostrarPlantilla(); break; case "video": $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); $output = array("6", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_video"); $template->mostrarPlantilla(); break; case "mp3": $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); $output = array("7", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_mp3"); $template->mostrarPlantilla(); break; default: $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); $output = array("1", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_post"); $template->mostrarPlantilla(); break; } ?>

:
     <strong> <em> <del> <ul> <ol> <li> <a>
    <blockquote> <code> <pre> <img>
Bookmarklet -

post" />

postLimit; if(isset($page_num) && is_numeric($page_num) && $page_num>0) { // Is defined the page and is numeric? $from = (($page_num-1) * $limit); } else { $from = 0; } $rs = $tumble->getPosts($limit, $from); if ($tumble->contarRegistros()>0) { while($register = mysql_fetch_array($rs)) { $formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime)); $permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/"; $register["title"] = stripslashes($register["title"]); $register["description"] = stripslashes($register["description"]); switch ($tumble->getType($register["id_post"])) { case "1": $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Title}", "{Body}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $register["title"], $register["description"], $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_regular_post"); $template->mostrarPlantilla(); break; case "2": $fileName = "../uploads/".getFileName($register["url"]); $x = @getimagesize($fileName); if ($x[0] > 100) { $photoPath = $conf->urlGelato."/classes/imgsize.php?w=100&img=".$register["url"]; } else { $photoPath = $register["url"]; } $effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\""; $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_photo"); $template->mostrarPlantilla(); break; case "3": $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_quote"); $template->mostrarPlantilla(); break; case "4": if($conf->shorten_links){ $register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]); } $register["title"] = ($register["title"]=="")? $register["url"] : $register["title"]; $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_url"); $template->mostrarPlantilla(); break; case "5": $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $register["title"], $tumble->formatConversation($register["description"]), $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_conversation"); $template->mostrarPlantilla(); break; case "6": $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_video"); $template->mostrarPlantilla(); break; case "7": $input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}"); $output = array($register["id_post"], $formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato); $template->cargarPlantilla($input, $output, "template_mp3"); $template->mostrarPlantilla(); break; } } $p = new pagination; $p->items($tumble->getPostsNumber()); $p->limit($limit); $p->currentPage(isset($page_num) ? $page_num : 1); $p->show(); } else { $template->renderizaEtiqueta(__("No posts in this tumblelog."), "div","error"); } ?>
urlGelato."/login.php"); } ?>