|
@@ -1,116 +0,0 @@
|
1
|
|
-<?php
|
2
|
|
-if(!defined('entry') || !entry) die('Not a valid page');
|
3
|
|
-/* ===========================
|
4
|
|
-
|
5
|
|
- gelato CMS - A PHP based tumblelog CMS
|
6
|
|
- development version
|
7
|
|
- http://www.gelatocms.com/
|
8
|
|
-
|
9
|
|
- gelato CMS is a free software licensed under the GPL 2.0
|
10
|
|
- Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
|
11
|
|
-
|
12
|
|
- =========================== */
|
13
|
|
-?>
|
14
|
|
-<?php
|
15
|
|
-require_once('config.php');
|
16
|
|
-include("classes/functions.php");
|
17
|
|
-include("classes/comments.class.php");
|
18
|
|
-require_once("classes/configuration.class.php");
|
19
|
|
-
|
20
|
|
-$comment = new comments();
|
21
|
|
-$conf = new configuration();
|
22
|
|
-$isEdition = isset($_GET["edit"]);
|
23
|
|
-$commentId = ($isEdition) ? $_GET["edit"] : NULL;
|
24
|
|
-
|
25
|
|
-
|
26
|
|
-if (isset($_GET["delete"])) {
|
27
|
|
- $comment->deleteComment($_GET['delete']);
|
28
|
|
- header("Location: comments.php?delete=true");
|
29
|
|
- die();
|
30
|
|
-}
|
31
|
|
-
|
32
|
|
-if(isset($_POST["btnAdd"])) {
|
33
|
|
- unset($_POST["btnAdd"]);
|
34
|
|
- $_POST["username"] = strip_tags($_POST["username"]);
|
35
|
|
- $_POST["email"] = strip_tags($_POST["email"]);
|
36
|
|
- $_POST["web"] = strip_tags($_POST["web"]);
|
37
|
|
-
|
38
|
|
- if (isset($_POST["id_comment"])) {
|
39
|
|
- $comment->modifyComment($_POST, $_POST["id_comment"]);
|
40
|
|
- } else {
|
41
|
|
- $comment->generateCookie($_POST);
|
42
|
|
- $_POST["spam"] = ($comment->isSpam($_POST)) ? "1" : "0";
|
43
|
|
- $_POST["ip_user"] = $_SERVER["REMOTE_ADDR"];
|
44
|
|
-
|
45
|
|
- if ($comment->addComment($_POST)) {
|
46
|
|
- header("Location: comments.php?added=true");
|
47
|
|
- die();
|
48
|
|
- } else {
|
49
|
|
- header("Location: comments.php?added=false");
|
50
|
|
- die();
|
51
|
|
- }
|
52
|
|
- }
|
53
|
|
-} else {
|
54
|
|
- if ($isEdition) {
|
55
|
|
- $row = $comment->getCommentByID($userId);
|
56
|
|
- }
|
57
|
|
-?>
|
58
|
|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
59
|
|
- <html xmlns="http://www.w3.org/1999/xhtml">
|
60
|
|
- <head>
|
61
|
|
- <title>gelato :: <?php echo __("add user")?></title>
|
62
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
63
|
|
- <meta name="generator" content="gelato cms <?php echo version();?>" />
|
64
|
|
- <link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
65
|
|
- <script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
66
|
|
- <script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
67
|
|
- <style type="text/css" media="screen">
|
68
|
|
- @import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
69
|
|
- </style>
|
70
|
|
- </head>
|
71
|
|
-
|
72
|
|
- <body>
|
73
|
|
- <div id="div-process" style="display:none;"><?=__("Processing request…");?></div>
|
74
|
|
- <div id="cont">
|
75
|
|
- <div id="head">
|
76
|
|
- <h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: <?=__("home")?>">gelato cms</a></h1>
|
77
|
|
- <ul id="nav">
|
78
|
|
- <li><a href="<?php echo $conf->urlGelato;?>/" title="<?=__("Take me to the tumblelog")?>"><?=__("Back to the Tumblelog")?></a></li>
|
79
|
|
- </ul>
|
80
|
|
- </div>
|
81
|
|
- <div id="main">
|
82
|
|
-
|
83
|
|
- <div class="box">
|
84
|
|
- <ul class="menu manage">
|
85
|
|
- <h3><?=__("Start session")?></h3>
|
86
|
|
- <li><a href="index.php"><?=__("Post")?></a></li>
|
87
|
|
- <li><a href="admin.php"><?=__("Users")?></a></li>
|
88
|
|
- <li class="selected"><a><?php echo ($isEdition) ? __("Edit") : __("Add"); ?></a></li>
|
89
|
|
- </ul>
|
90
|
|
-
|
91
|
|
- <div class="tabla">
|
92
|
|
-
|
93
|
|
-
|
94
|
|
-<?php
|
95
|
|
- if ($isEdition) {
|
96
|
|
-?>
|
97
|
|
- <input type="hidden" name="id_user" id="id_user" value="<?php echo $userId;?>" />
|
98
|
|
-<?php
|
99
|
|
- }
|
100
|
|
-?>
|
101
|
|
-
|
102
|
|
-
|
103
|
|
- </div>
|
104
|
|
-
|
105
|
|
- <div class="footer-box"> </div>
|
106
|
|
- </div>
|
107
|
|
- </div>
|
108
|
|
- <div id="foot">
|
109
|
|
- <a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
|
110
|
|
- </div>
|
111
|
|
- </div>
|
112
|
|
- </body>
|
113
|
|
- </html>
|
114
|
|
-<?php
|
115
|
|
-}
|
116
|
|
-?>
|