diff --git a/admin/css/images/bg-box.png b/admin/css/images/bg-box.png new file mode 100644 index 0000000..4cd8fa6 Binary files /dev/null and b/admin/css/images/bg-box.png differ diff --git a/admin/css/images/bg-foot-box.png b/admin/css/images/bg-foot-box.png new file mode 100644 index 0000000..56d4868 Binary files /dev/null and b/admin/css/images/bg-foot-box.png differ diff --git a/admin/css/images/bg-top-box-hover.png b/admin/css/images/bg-top-box-hover.png new file mode 100644 index 0000000..202f5f4 Binary files /dev/null and b/admin/css/images/bg-top-box-hover.png differ diff --git a/admin/css/images/bg-top-box.png b/admin/css/images/bg-top-box.png new file mode 100644 index 0000000..0727e88 Binary files /dev/null and b/admin/css/images/bg-top-box.png differ diff --git a/admin/css/images/comments.png b/admin/css/images/comments.png new file mode 100644 index 0000000..39433cf Binary files /dev/null and b/admin/css/images/comments.png differ diff --git a/admin/css/images/film.png b/admin/css/images/film.png new file mode 100644 index 0000000..b0ce7bb Binary files /dev/null and b/admin/css/images/film.png differ diff --git a/admin/css/images/gelato-logo.png b/admin/css/images/gelato-logo.png new file mode 100644 index 0000000..e30cc44 Binary files /dev/null and b/admin/css/images/gelato-logo.png differ diff --git a/admin/css/images/grad-big.png b/admin/css/images/grad-big.png new file mode 100644 index 0000000..621a516 Binary files /dev/null and b/admin/css/images/grad-big.png differ diff --git a/admin/css/images/grad-small.png b/admin/css/images/grad-small.png new file mode 100644 index 0000000..2841523 Binary files /dev/null and b/admin/css/images/grad-small.png differ diff --git a/admin/css/images/image.png b/admin/css/images/image.png new file mode 100644 index 0000000..fc3c393 Binary files /dev/null and b/admin/css/images/image.png differ diff --git a/admin/css/images/music.png b/admin/css/images/music.png new file mode 100644 index 0000000..a8b3ede Binary files /dev/null and b/admin/css/images/music.png differ diff --git a/admin/css/images/page_white_text.gif b/admin/css/images/page_white_text.gif new file mode 100644 index 0000000..a572f45 Binary files /dev/null and b/admin/css/images/page_white_text.gif differ diff --git a/admin/css/images/page_white_text.png b/admin/css/images/page_white_text.png new file mode 100644 index 0000000..813f712 Binary files /dev/null and b/admin/css/images/page_white_text.png differ diff --git a/admin/css/images/world.png b/admin/css/images/world.png new file mode 100644 index 0000000..68f21d3 Binary files /dev/null and b/admin/css/images/world.png differ diff --git a/admin/css/style.css b/admin/css/style.css new file mode 100644 index 0000000..50642c5 --- /dev/null +++ b/admin/css/style.css @@ -0,0 +1,128 @@ +/* CSS Document created by Jorge Condomi */ + + +/************ BASICS *************/ + +div, p, ul, ol, li, h1, h2, h3, h4, h5, h6, h7,form, span, pre, a{margin:0; padding:0;} + +h1, h2, h3, h4, h5, h6, h7{ font-weight:normal;} + +a, a:link, a:visited, a:active{ color:#000; text-decoration:none; outline:none;} +a:hover{ text-decoration:underline; color:#000000; outline:none;} + +acronym{ border-bottom: 1px dotted #666; cursor:help;} +fieldset{ border:none; margin:0; padding:0;} + +.gelato{color:#006699; font-weight:bold; font-family:'Trebuchet Ms', Verdad, Tahoma;} +.option{ color:#666666; font-style:italic; font-size:0.9em} + +/*********** LAYOUT *************/ + +body{ background: #fff; text-align:center; font-family:"Trebuchet Ms", Verdana, Tahoma; font-size:1em;} + +#cont{ width:569px; margin:30px auto 10px auto; text-align:left;} + +#head{ background: transparent url(images/head_bg.png) bottom center no-repeat; position: relative; padding-bottom:20px; height:73px;} + h1 a{ display:block; height:77px; width:161px; background:#fff url(images/gelato-logo.png) top left no-repeat; text-indent:-9999px; overflow:hidden;} + +#nav{ position:absolute; right:1px; font-size:0.75em; line-height:normal; margin:0; padding:0 10px 0 0; list-style:none;bottom:34px;} + + #nav li{ margin:0; padding:0; text-align:right;} + + #nav li a:link, #nav li a:visited, #nav li a:active, #nav li a:focus{ color:#777; text-decoration: none;} + #nav li a:hover{ text-decoration:underline;} + + +#main{ background: #fff url(images/main_bg.png) top left repeat-y; text-align:left; padding:0 0 40px 0;} + h2{ font-size:1.56em; margin:4px; text-indent:20px;} + h3{font-size:1.12em; margin:4px; color:#333333; text-indent:20px;} + +.box{ background:#efefef url(images/bg-box.png) left top repeat-y;} +.footer-box{background:#fff url(images/bg-foot-box.png) top center no-repeat;} + +.box h3{float:left; color:#FFFFFF; font-weight:bold; padding:5px 10px 0 0;} +.menu{ background:#c1c7cd url(images/bg-top-box.png) top center no-repeat; height:40px; width:559px; list-style-type:none; padding-right:10px;} +.menu li{ display:inline;} +.menu li.selected a{background: transparent url(images/bg-top-box-hover.png) left top repeat-x; text-decoration:none;} +.menu li a{ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:0.7em; display:block; float:right; height:28px; padding:12px 3px 0 3px;} +.menu li a:hover{ background: transparent url(images/bg-top-box-hover.png) left top repeat-x; text-decoration:none;} +.menu li a img{border:none; vertical-align:bottom;} + +.manage li a{ padding:14px 6px 0 6px;} + +form.newpost{ width:500px; margin:0 auto; padding:0;} +form.newpost ul{ list-style-type:none; margin:20px 0 10px 0; padding:0;} +form.newpost li{ margin:4px 0; padding:0;} +form.newpost label{} +form.newpost input{ margin-bottom:10px;} +form.newpost input.txt{ background: #fff url(images/grad-small.png) top left repeat-x; height:15px; border:1px solid #999; width:490px; padding:5px;} +form.newpost input.btn{ } +form.newpost textarea{background: #fff url(images/grad-big.png) top left repeat-x; height:190px; border:1px solid #999; width:490px; padding:5px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:0.8em;} + +.entry{ background-color:#efefef; border:1px solid #ccc; margin:20px 15px;} +.info{ border-bottom:1px solid #aaa; position:relative; display:block; padding:4px 10px; height:20px; } +.info p{font-size:0.8em; color:#297aab; display:inline;} +form.compact{ float:right; margin:-2px 0 0 0; padding:0;} + + +.post{ padding:10px;} +.post h4{ font-style:italic; font-weight:bold; } +.post p{ font-size:0.9em; text-indent:20px;} +.post img{} +.post blockqoute{} +.post .video{} +.post .audio{} + +#foot{ background: transparent url(images/foot_bg.png) top center no-repeat; clear: both;} + +#foot { text-align:center; + + font-size: 10px; + color: #000; + } + + #footer a { + color: #000; + } + +#div-process { + top:0px; + padding-left: 22px; + font: normal 14.5px/17px georgia, "times new roman", serif; + background: url('../../images/proceso.gif') no-repeat 0% 10%; + float: right; + height: 20px; + width: 150px; + border: 1px solid #000066; + background-color:#FFFFCC; + color:#011940; +} + +/* Mensajes para el usuario */ + +.error { + width:80%; + background: #FFF7F2 url('../../images/error.png') 15px center no-repeat; + border-top: 2px solid #CC0000; + border-bottom: 2px solid #CC0000; + margin: 0 auto; + padding: 5px 20px 5px 45px; +} + +.exito { + width:80%; + background: #F4FBF5 url('../../images/information.png') 15px center no-repeat; + border-top: 2px solid #006600; + border-bottom: 2px solid #006600; + margin: 0 auto; + padding: 5px 20px 5px 45px; +} + +.information { + width:80%; + background: #FFF6BF url('../../images/icon_info.gif') 15px center no-repeat; + border-top: 2px solid #FFD324; + border-bottom: 2px solid #FFD324; + margin: 0 auto; + padding: 5px 20px 5px 45px; +} diff --git a/admin/index.php b/admin/index.php index 60b045f..47f61e5 100644 --- a/admin/index.php +++ b/admin/index.php @@ -11,17 +11,82 @@ isAdmin()) { -?> - - +$template = new plantillas("admin"); + + +if ($user->isAdmin()) { + + 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"] = $conf->urlGelato."/uploads/".$photoName; + } + + if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".$_FILES['photo']['name'] ) ) { + $_POST["url"] = $conf->urlGelato."/uploads/".$_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(); + } + $_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name; + } + + if (get_magic_quotes_gpc()) { + $_POST["title"] = htmlspecialchars(stripslashes($_POST["title"])); + $_POST["description"] = htmlspecialchars(stripslashes($_POST["description"])); + } else { + $_POST["title"] = htmlspecialchars($_POST["title"]); + $_POST["description"] = htmlspecialchars($_POST["description"]); + } + + $_POST["title"] = strip_tags($_POST["title"]); + $_POST["description"] = strip_tags($_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(); + } + } + } +?> + + - gelato :: Control panel + gelato :: Control panel + + - -
- gelato CMS -
- - - -
-
-
-

Manage the posts

-
+ The article has been eliminated successfully.
"; - } + if (isset($_GET["deleted"])) { + if ($_GET["deleted"]=="true") { + echo "

 

The article has been eliminated successfully.
"; } - - if (isset($_GET["modified"])) { - if ($_GET["modified"]=="true") { - echo "
The article has been modified successfully.
"; - } + } + + if (isset($_GET["modified"])) { + if ($_GET["modified"]=="true") { + echo "

 

The article has been modified successfully.
"; } - - if (isset($_GET["added"])) { - if ($_GET["added"]=="true") { - echo "
The article has been added successfully.
"; - } + } + + if (isset($_GET["added"])) { + if ($_GET["added"]=="true") { + echo "

 

The article has been added successfully.
"; } - - if (isset($_GET["error"])) { - if ($_GET["error"]==2) { - echo "
Error on the database server: ".$_GET["des"]."
"; - } + } + + 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["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.
"; - } + } + + if (isset($_GET["photo"])) { + if ($_GET["photo"]=="false") { + echo "

 

Not a photo file or an upload problem.
"; } + } +?> +
name="frmAdd" class="newpost"> +
+cargarPlantilla($input, $output, "template_add_post"); + $template->mostrarPlantilla(); + break; + case "photo": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("2", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_photo"); + $template->mostrarPlantilla(); + break; + case "quote": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("3", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_quote"); + $template->mostrarPlantilla(); + break; + case "url": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("4", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_link"); + $template->mostrarPlantilla(); + break; + case "conversation": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("5", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_conversation"); + $template->mostrarPlantilla(); + break; + case "video": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("6", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_video"); + $template->mostrarPlantilla(); + break; + case "mp3": + $input = array("{type}", "{date}", "{id_user}"); + $output = array("7", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_mp3"); + $template->mostrarPlantilla(); + break; + default: + $input = array("{type}", "{date}", "{id_user}"); + $output = array("1", time(), $_SESSION['user_id']); + + $template->cargarPlantilla($input, $output, "template_add_post"); + $template->mostrarPlantilla(); + break; + } ?> - -

Add a new...

- - - - - - - - - - - - - - -
New regular post
New photo
New quote
New link
New conversation
New video
New MP3
-

 

-

Title 1

-

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas facilisis scelerisque ligula. Aliquam accumsan. In hac habitasse platea dictumst. Nulla ut urna eget felis tempor pellentesque. Fusce sollicitudin ultricies lacus. Duis felis. Mauris posuere enim ac tortor scelerisque tempus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce porta. Integer odio purus, semper malesuada, eleifend in, volutpat non, quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Aliquam pellentesque aliquet turpis. Quisque non enim sed enim ullamcorper aliquet. Integer sit amet arcu.

-

 

+

+    + Cancel +

+
+
+ + +
+ +
+ + +
+
+

25/05 Regular Post (0 Comments)

+
+
+ (no title) +

I just discovered Gelato

+
-
-
-
-

- gelato CMS :: PHP/MySQL Tumblelog Content Management System. -

-
+ +
+
+

25/05 Regular Post (0 Comments)

+
+
+

One with a title

+

Another entry, this one has some varations in the content, even dares + to be in two lines.

+
+
+ + +
+ + diff --git a/admin/themes/admin/template_add_post.htm b/admin/themes/admin/template_add_post.htm index e2d7c65..5b4401a 100644 --- a/admin/themes/admin/template_add_post.htm +++ b/admin/themes/admin/template_add_post.htm @@ -1,11 +1,11 @@ Add a Regular Post

- - + +

- +

-
+

diff --git a/rss.php b/rss.php index 3d28e62..f6b217a 100644 --- a/rss.php +++ b/rss.php @@ -9,7 +9,7 @@ =========================== */ ?>