Skip to content
Extraits de code Groupes Projets
Valider 5da70e3f rédigé par esj's avatar esj
Parcourir les fichiers

petits ajustements pour exécution à partir de l'espace public

parent 15fe5bb3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -73,7 +73,7 @@ if (!_DIR_RESTREINT) ...@@ -73,7 +73,7 @@ if (!_DIR_RESTREINT)
else debut_html($titre); else debut_html($titre);
$f = 'http_calendrier_init_' . $type; $f = 'http_calendrier_init_' . $type;
echo $f($jour,$mois,$annee, $date); echo $f($jour,$mois,$annee, $date, $GLOBALS['PHP_SELF']);
if (!_DIR_RESTREINT) fin_page(); else echo "</body></html>\n"; if (!_DIR_RESTREINT) fin_page(); else echo "</body></html>\n";
......
...@@ -143,7 +143,7 @@ function http_calendrier_ics($evenements, $amj = "") ...@@ -143,7 +143,7 @@ function http_calendrier_ics($evenements, $amj = "")
# affiche un mois en grand, avec des tableau de clics vers d'autres mois # affiche un mois en grand, avec des tableau de clics vers d'autres mois
function http_calendrier_init_mois($premier_jour, $mois, $annee, $date) function http_calendrier_init_mois($premier_jour, $mois, $annee, $date, $script)
{ {
global $spip_lang_left, $largeur_table, $largeur_gauche, $spip_ecran; global $spip_lang_left, $largeur_table, $largeur_gauche, $spip_ecran;
...@@ -608,9 +608,9 @@ function http_calendrier_clics($annee, $mois, $jour, $clic) ...@@ -608,9 +608,9 @@ function http_calendrier_clics($annee, $mois, $jour, $clic)
{ {
global $bleu, $jaune, $vert; global $bleu, $jaune, $vert;
$href = "message_edit.php3?rv=$annee-$mois-$jour&new=oui"; $href = "message_edit.php3?rv=$annee-$mois-$jour&new=oui";
$script = 'calendrier.php3' ; // ok pour espace de redac, pas pour public
return "\n" . return "\n" .
http_href("calendrier.php3?type=jour&jour=$jour&mois=$mois&annee=$annee", $clic) . http_href("$script?type=jour&jour=$jour&mois=$mois&annee=$annee", $clic) .
"\n" . "\n" .
(_DIR_RESTREINT ? '' : ( (_DIR_RESTREINT ? '' : (
http_href("$href&type=pb", http_href("$href&type=pb",
...@@ -733,8 +733,9 @@ function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, ...@@ -733,8 +733,9 @@ function http_calendrier_suite_heures($jour_today,$mois_today,$annee_today,
// Calcule un agenda mensuel et l'affiche // Calcule un agenda mensuel et l'affiche
function http_calendrier_agenda ($mois, $annee, $jour_ved, $mois_ved, $annee_ved, $semaine = false, $script='calendrier.php3?', $ancre='') { function http_calendrier_agenda ($mois, $annee, $jour_ved, $mois_ved, $annee_ved, $semaine = false, $script='', $ancre='') {
if (!$script) $script = 'calendrier.php3?' ;
if (!$mois) {$mois = 12; $annee--;} if (!$mois) {$mois = 12; $annee--;}
elseif ($mois==13) {$mois = 1; $annee++;} elseif ($mois==13) {$mois = 1; $annee++;}
return return
...@@ -1097,7 +1098,8 @@ function http_calendrier_jour_ics($debut, $fin, $largeur, $detcolor, $echelle, $ ...@@ -1097,7 +1098,8 @@ function http_calendrier_jour_ics($debut, $fin, $largeur, $detcolor, $echelle, $
} }
function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date){ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date, $script){
global $largeur_table, $largeur_gauche, $spip_ecran; global $largeur_table, $largeur_gauche, $spip_ecran;
$jour = journum($date); $jour = journum($date);
$mois = mois($date); $mois = mois($date);
...@@ -1122,7 +1124,7 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date){ ...@@ -1122,7 +1124,7 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date){
} }
$retour .= "\n<td width='$largeur_centre' valign='top'>" . $retour .= "\n<td width='$largeur_centre' valign='top'>" .
"<div>" . "<div>" .
http_calendrier_navigation_jour($jour,$mois,$annee, $GLOBALS['echelle'], 'calendrier.php3', '') . http_calendrier_navigation_jour($jour,$mois,$annee, $GLOBALS['echelle'], $script, '') .
"</div>". "</div>".
http_calendrier_jour($jour,$mois,$annee, "large") . http_calendrier_jour($jour,$mois,$annee, "large") .
'</td>'; '</td>';
...@@ -1139,7 +1141,7 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date){ ...@@ -1139,7 +1141,7 @@ function http_calendrier_init_jour($jour_today,$mois_today,$annee_today, $date){
return $retour; return $retour;
} }
function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date) function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date, $script)
{ {
global $spip_ecran, $spip_lang_left, $couleur_claire; global $spip_ecran, $spip_lang_left, $couleur_claire;
...@@ -1170,7 +1172,7 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date ...@@ -1170,7 +1172,7 @@ function http_calendrier_init_semaine($jour_today,$mois_today,$annee_today,$date
"<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'><tr>" . "<table cellpadding=0 cellspacing=0 border=0 width='$largeur_table'><tr>" .
"<td width='$largeur_table' valign='top'>" . "<td width='$largeur_table' valign='top'>" .
http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, $articles, $breves, $messages, http_calendrier_suite_heures($jour_today,$mois_today,$annee_today, $articles, $breves, $messages,
'calendrier.php3', $script,
'') . '') .
"</td></tr></table>" . "</td></tr></table>" .
(!(strlen($breves["0"]) > 0 OR $articles["0"] > 0) ? '' : (!(strlen($breves["0"]) > 0 OR $articles["0"] > 0) ? '' :
...@@ -1187,6 +1189,7 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message = ...@@ -1187,6 +1189,7 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message =
global $calendrier_message_fermeture; global $calendrier_message_fermeture;
global $partie_cal; global $partie_cal;
$script = 'calendrier.php3' ; // ok pour espace de redac, pas pour public
if ($partie_cal == "soir") { if ($partie_cal == "soir") {
$debut_cal = 12; $debut_cal = 12;
$fin_cal = 23; $fin_cal = 23;
...@@ -1221,14 +1224,14 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message = ...@@ -1221,14 +1224,14 @@ function http_calendrier_jour($jour,$mois,$annee,$large = "large", $le_message =
if ($large == "col" ) { if ($large == "col" ) {
$entete = "<div align='center' style='padding: 5px;'><b class='verdana1'>" . $entete = "<div align='center' style='padding: 5px;'><b class='verdana1'>" .
http_href("calendrier.php3?type=jour&jour=$jour&mois=$mois&annee=$annee", http_href("$script?type=jour&jour=$jour&mois=$mois&annee=$annee",
affdate_jourcourt("$annee-$mois-$jour"), affdate_jourcourt("$annee-$mois-$jour"),
'', '',
'color:black;') . 'color:black;') .
"</b></div>"; "</b></div>";
} }
else { else {
if ($large == "large") if (($large == "large") && !_DIR_RESTREINT)
$entete = "<div align='center' style='padding: 5px;'>" . $entete = "<div align='center' style='padding: 5px;'>" .
http_href("message_edit.php3?rv=$annee-$mois-$jour&new=oui&type=pb", http_href("message_edit.php3?rv=$annee-$mois-$jour&new=oui&type=pb",
$bleu ._T("lien_nouvea_pense_bete"), $bleu ._T("lien_nouvea_pense_bete"),
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter