Selaa lähdekoodia

Small improvements. Improved README.

seavenois 10 vuotta sitten
vanhempi
sitoutus
8e7cdd548b

+ 48 - 1
README.md

@@ -1,2 +1,49 @@
 Gasteizko Margolariak Web
-=== 
+===
+
+Source code of the <a href="http://margolariak.com/">Gasteizko Margolariak</a> Web Portal.
+
+Website designed to work over Apache+MySQL+PHP.
+
+###Public page###
+
+The public page is available for anyone to visit, is respectfull with the privacy of the user, lightweight, and it includes:
+
+* A blog, where users can comment without registration.
+* A photo gallery where users can upload their own photos and comment them without registration.
+* Information about upcaming activities.
+* Review of past activities.
+* During the festivals, information about events and the cuadrilla schedule. 
+* During the festivals, prices and offers.
+* Real time location of Gasteizko Margolariak.
+* Information and the History of Gasteizko Margolariak.
+* Custom-made, non intrusive, privacy-awatre advertisment of collaborators.
+* An API to sync the <a href="https://github.com/GasteizkoMargolariak/GasteizkoMargolariakApp">App</a>.
+* A respectfull statistics counter.
+* Vanity URLs.
+
+
+###Private page###
+
+The private page includes a private area for the directives of Gasteizko Margolariak. It is designed to be served on a different port and is password protected.
+
+As of now, it includes:
+
+* A form to publish, edit, delete and translate blog posts.
+* A form to publish, edit, delete and translate activities.
+* Member management.
+* A form to set up a year's festivals.
+* User activity logging.
+
+In the future, more functionalities will be added:
+
+* Account handling.
+* Gallery management.
+* Web site and app statistics reviewsing
+* Change site settings.
+* Drafts.
+* Many more.
+
+###About this project###
+
+This projets includes the source for both the public and private page, as well as the files required to build the database. Apache configuration is left as an exercice to the reader.

+ 3 - 3
sql/setup.sql

@@ -118,7 +118,7 @@ CREATE TABLE sponsor (
 	click			INT				DEFAULT 0
 );
 
---DROP TABLE IF EXISTS stat_visit;
+DROP TABLE IF EXISTS stat_visit;
 CREATE TABLE stat_visit (
 	id		INT				NOT NULL	AUTO_INCREMENT	PRIMARY KEY,
 	ip		VARCHAR(50),
@@ -127,7 +127,7 @@ CREATE TABLE stat_visit (
 	browser	VARCHAR(150)
 );
 
---DROP TABLE IF EXISTS stat_view;
+DROP TABLE IF EXISTS stat_view;
 CREATE TABLE stat_view (
 	id		INT				NOT NULL	AUTO_INCREMENT	PRIMARY KEY,
 	visit	INT				NOT NULL	REFERENCES stat_visit.id,
@@ -136,7 +136,7 @@ CREATE TABLE stat_view (
 	dtime	TIMESTAMP		NOT NULL	DEFAULT now()
 );
 
---DROP TABLE IF EXISTS stat_sync;
+DROP TABLE IF EXISTS stat_sync;
 CREATE TABLE stat_sync (
 	id		INT			NOT NULL	AUTO_INCREMENT	PRIMARY KEY,
 	dtime	TIMESTAMP	NOT NULL	DEFAULT now(),

BIN
www-admin/.functions.php.kate-swp


+ 1 - 1
www-admin/actividades/translate/apply.php

@@ -1,6 +1,6 @@
 <?php
 	$http_host = $_SERVER['HTTP_HOST'];
-	include("../../../php_functions.php");
+	include("../../functions.php");
 	$con = startdb('rw');
 	if (!checkSession($con)){
 		header("Location: /index.php");

+ 2 - 2
www-admin/actividades/translate/index.php

@@ -1,6 +1,6 @@
 <?php
 	$http_host = $_SERVER['HTTP_HOST'];
-	include("../../../php_functions.php");
+	include("../../functions.php");
 	$con = startdb();
 	if (!checkSession($con)){
 		header("Location: /index.php");
@@ -88,4 +88,4 @@
 		</div>
 	</body>
 </html>
-<?php } ?>
+<?php } ?>

+ 2 - 2
www-admin/actividades/translate/translate.php

@@ -1,6 +1,6 @@
 <?php
 	$http_host = $_SERVER['HTTP_HOST'];
-	include("../../../php_functions.php");
+	include("../../functions.php");
 	$con = startdb();
 	if (!checkSession($con)){
 		header("Location: /index.php");
@@ -104,4 +104,4 @@
 		</div>
 	</body>
 </html>
-<?php } } ?>
+<?php } } ?>

+ 1 - 20
www-admin/functions.php

@@ -243,26 +243,7 @@
 			return false;
 	}
 	
-	/****************************************************
-	* Generates a URL-valid string from a regular one.  *
-	*                                                   *
-	* @params:                                          *
-	*    text: (string): Original string.               *
-	* @return: (string): URL-valid string.              *
-	****************************************************/
-	function permalink($text){
-		$unwanted_array = array('Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
-							'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',
-							'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',
-							'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',
-							'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );
-		$str = strtr( $text, $unwanted_array );
-		$str = preg_replace('/[^\da-zA-Z ]/i', '', $str);
-		$str = str_replace(' ', '-', $str);
-		return $str;
-	}
-	
-	
+
 	/****************************************************
 	* Increases version value in table settings by one. *
 	* Helpfull for the app to know when to perform a    * 

+ 1 - 1
www/functions.php

@@ -413,7 +413,7 @@
 		$bot_kw[21] = 'html';
 		$bot_kw[22] = 'fetch';
 		
-		$i = 1;
+		$i = 0;
 		while ($i < sizeof($bot_kw)) {
 			if (strpos(strtolower($uagent), $bot_kw[$i]) !== false){
 				mysqli_close($con);

+ 0 - 1
www/sitemap.php

@@ -3,7 +3,6 @@
 	$http_host = $_SERVER['HTTP_HOST'];
 	include("functions.php");
 	$con = startdb();
-	//registerVisit($_SERVER['REQUEST_URI'], false);
 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
 ?>
 <urlset