瀏覽代碼

Preparing for cioccolato RC1

pecesama 18 年之前
父節點
當前提交
3eb4cd43dc
共有 7 個文件被更改,包括 15 次插入142 次删除
  1. 5 1
      classes/functions.php
  2. 0 116
      comments.php
  3. 2 0
      db/gelato_db.sql
  4. 1 1
      index.php
  5. 0 2
      login.php
  6. 6 6
      notice.txt
  7. 1 16
      update.php

+ 5 - 1
classes/functions.php 查看文件

13
 ?>
13
 ?>
14
 <?php
14
 <?php
15
 	function version() {
15
 	function version() {
16
-		return "0.90";
16
+		return "0.95";
17
+	}
18
+	
19
+	function codeName() {
20
+		return "cioccolato RC1";
17
 	}
21
 	}
18
 	
22
 	
19
 	function beginsWith($str, $sub) {
23
 	function beginsWith($str, $sub) {

+ 0 - 116
comments.php 查看文件

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&hellip;");?></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">&nbsp;</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
-?>

+ 2 - 0
db/gelato_db.sql 查看文件

1
+-- DB Gelato CMS v0.95
1
 
2
 
2
 CREATE TABLE `gel_data` (
3
 CREATE TABLE `gel_data` (
3
   `id_post` int(11) NOT NULL auto_increment,
4
   `id_post` int(11) NOT NULL auto_increment,
81
 INSERT INTO `gel_options` VALUES ('allow_comments', '0');
81
 INSERT INTO `gel_options` VALUES ('allow_comments', '0');
82
 INSERT INTO `gel_options` VALUES ('offset_city', 'Mexico/General');
82
 INSERT INTO `gel_options` VALUES ('offset_city', 'Mexico/General');
83
 INSERT INTO `gel_options` VALUES ('offset_time', '-6');
83
 INSERT INTO `gel_options` VALUES ('offset_time', '-6');
84
+INSERT INTO `gel_options` VALUES ('shorten_links', '0');
84
 INSERT INTO `gel_options` VALUES ('rss_import_frec', '5 minutes');
85
 INSERT INTO `gel_options` VALUES ('rss_import_frec', '5 minutes');

+ 1 - 1
index.php 查看文件

47
         }
47
         }
48
         
48
         
49
         $gelato_includes = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n";
49
         $gelato_includes = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n";
50
-        $gelato_includes .= "\t<meta name=\"generator\" content=\"gelato cms ".version()."\" />\n";
50
+        $gelato_includes .= "\t<meta name=\"generator\" content=\"gelato  ".codeName()." (".version().")\" />\n";
51
         $gelato_includes .= "\t<link rel=\"shortcut icon\" href=\"".$conf->urlGelato."/images/favicon.ico\" />\n";
51
         $gelato_includes .= "\t<link rel=\"shortcut icon\" href=\"".$conf->urlGelato."/images/favicon.ico\" />\n";
52
         $gelato_includes .= "\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$conf->urlGelato.($conf->urlFriendly?"/rss/":"/rss.php")."\"/>\n";
52
         $gelato_includes .= "\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$conf->urlGelato.($conf->urlFriendly?"/rss/":"/rss.php")."\"/>\n";
53
         $gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/themes/".$conf->template."/style.css\"/>\n";
53
         $gelato_includes .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".$conf->urlGelato."/themes/".$conf->template."/style.css\"/>\n";

+ 0 - 2
login.php 查看文件

36
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
36
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
37
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
37
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
38
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
38
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
39
-		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
40
-		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/sortable.js"></script>
41
 		<style type="text/css" media="screen">	
39
 		<style type="text/css" media="screen">	
42
 			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
40
 			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
43
 		</style>
41
 		</style>

+ 6 - 6
notice.txt 查看文件

11
 = COPYRIGHT NOTICES =
11
 = COPYRIGHT NOTICES =
12
 This product includes code and libraries developed by third parties, which are governed by different licenses.  These components, and their licenses, are listed below.
12
 This product includes code and libraries developed by third parties, which are governed by different licenses.  These components, and their licenses, are listed below.
13
 
13
 
14
-= Mootools =
15
-Copyright (c) 2006 Valerio Proietti, http://mad4milk.net
16
-Mootools is available under MIT Style License.
14
+= jQuery =
15
+Copyright (c) 2007 John Resig, http://jquery.com
16
+jQuery is available under a dual licensed the MIT and GPL licenses.
17
 
17
 
18
-= Slimbox =
19
-Copyright (c) Christophe Beyls, http://www.digitalia.be
20
-Slimbox available under MIT Style License.
18
+= jQuery Lightbox =
19
+Copyright (c) 2007 Warren Krewenki, http://warren.mesozen.com/jquery-lightbox/
20
+jQuery Lightbox available under an Open License.
21
 
21
 
22
 = Sortable =
22
 = Sortable =
23
 Copyright (c) 1997-2006 Stuart Langridge, Joost de Valk, http://www.joostdevalk.nl/code/sortable-table/
23
 Copyright (c) 1997-2006 Stuart Langridge, Joost de Valk, http://www.joostdevalk.nl/code/sortable-table/

+ 1 - 16
update.php 查看文件

27
 
27
 
28
 $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
28
 $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
29
 
29
 
30
-/*$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
31
-		
32
-$db->ejecutarConsulta($sqlStr);
33
-
34
-$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', 'Mexico/General');";
35
-		
36
-$db->ejecutarConsulta($sqlStr);
37
-		
38
-$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '-6');";
39
-
40
-$db->ejecutarConsulta($sqlStr);
41
-		
42
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');";
30
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');";
43
 		
31
 		
44
 $db->ejecutarConsulta($sqlStr);
32
 $db->ejecutarConsulta($sqlStr);
45
-
46
- AFTER v0.90 */
47
  
33
  
48
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');";
34
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');";
49
 		
35
 		
50
 $db->ejecutarConsulta($sqlStr);
36
 $db->ejecutarConsulta($sqlStr);
51
 
37
 
52
-
53
 $sqlStr = "CREATE TABLE `".Table_prefix."feeds` (
38
 $sqlStr = "CREATE TABLE `".Table_prefix."feeds` (
54
   `id_feed` int(11) NOT NULL auto_increment,
39
   `id_feed` int(11) NOT NULL auto_increment,
55
   `url` varchar(255) NOT NULL,
40
   `url` varchar(255) NOT NULL,
71
 }
56
 }
72
 
57
 
73
 echo "<p><em>Finished!</em></p>";
58
 echo "<p><em>Finished!</em></p>";
74
-echo "<p>Now you are running on the new <strong>After 0.90</strong> version!!!</p>";
59
+echo "<p>Now you are running on the new <strong>gelato cioccolato RC1</strong> version!!!</p>";
75
 
60
 
76
 ?>
61
 ?>