Commit 10ed394a authored by Loïc DAYOT's avatar Loïc DAYOT
Browse files

chore(): cleaning code, adding css, update robot filter

adl/css/calendar.css inc/text.inc.php inc/class.region.inc.php js/displayMap.js
Add style for edit event
Remove text unused
Move optgroup in select region
parent 39fe54f2
<?php
/*
* Copyright 2015-2016
* Copyright 2015-2018
* - Loic Dayot <ldayot CHEZ epnadmin POINT net>
*
* This file is part of agenda-libre-php.
......@@ -114,10 +114,10 @@ class region {
}
$return = ""; //"<strong>". _("Région :") ."</strong> ";
$return .= "<select name='region' $onChange>";
$return .= " <optgroup label=\"France\">\n";
$return .= " <option value='all' ".
($this->id=="all" ? "selected='selected' " : ""). ">".
_("Toutes les régions"). "</option>";
$return .= " <optgroup label=\"France\">\n";
while ($row = $this->db->fetchObject($ret))
{
$return .= " <option value='{$row->id}' ".
......
......@@ -72,6 +72,9 @@ $localgroupManagement = false;
/* Availability of submit localgroup
* true = available */
$localgroupSubmit = false;
/* Availability of show local groups list
* true = available */
$localgroupList = false;
/**
* Calendar display settings
......
......@@ -9,4 +9,7 @@ Disallow: /localgrouptextlist.php
Disallow: /xmllistevents.php
Disallow: /ical.php
Disallow: /javascript.php
Disallow: /exportevents.php
Disallow: /exportlocalgroups.php
Disallow: /listlocalgroups.php
......@@ -23,16 +23,17 @@
$privatePage = false;
include("inc/main.inc.php");
include_once("inc/class.region.inc.php");
if (isset($_GET['tag']) && preg_match("~^[a-z0-9\-]*$~", $_GET['tag']))
$tag = $_GET['tag'];
$tag = $_GET['tag'];
else
$tag = '';
$tag = '';
if (isset($_GET['start']) && $_GET['start'] == 'now')
$start = "now";
$start = "now";
else
$start = '';
$start = '';
$limit = get_safe_integer('limit', 0);
......@@ -42,15 +43,15 @@ $limit = get_safe_integer('limit', 0);
$sql = "select * from {$GLOBALS['db_tablename_prefix']}events where (moderated=1)";
if ($start == 'now')
$sql .= " and (end_time >= '" . date_timestamp2mysql(time()) . "')";
$sql .= " and (end_time >= '" . date_timestamp2mysql(time()) . "')";
if ($tag != '')
$sql .= " and (concat(' ', tags, ' ') like '% " . $tag . " %') ";
$sql .= " and (concat(' ', tags, ' ') like '% " . $tag . " %') ";
$sql .= " order by start_time asc";
if ($limit != 0)
$sql .= " limit " . $limit;
$sql .= " limit " . $limit;
$events = $db->query($sql);
if (! $events)
......@@ -72,7 +73,8 @@ while($event = mysql_fetch_object($events))
$xml->writeElement("start-time", $event->start_time);
$xml->writeElement("end-time", $event->end_time);
$xml->writeElement("city", $event->city);
$xml->writeElement("region", region_find($db, $event->region));
$region = new region($db, $this->region);
$xml->writeElement("region", $region->name);
$xml->writeElement("locality", $event->locality);
$xml->writeElement("url", $event->url);
$xml->writeElement("tags", eventTagsList($event->id));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment