Newer
Older
. ";' valign='bottom'>\n<div align='"
. $spip_lang_right
. "'>"
. (!$bouton ? ''
: (!$id_rubrique
? icone(_T('icone_creer_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav"), "secteur-24.gif", "creer.gif",'', false)
: icone(_T('icone_creer_sous_rubrique'), generer_url_ecrire("rubriques_edit","new=oui&retour=nav&id_parent=$id_rubrique"), "rubrique-24.gif", "creer.gif",'',false)))
. "</div></td></tr></table>";
if ($return) return $res; else echo $res;
}
// Pour construire des menu avec SELECTED
// http://doc.spip.org/@mySel
function mySel($varaut,$variable, $option = NULL) {
$res = ' value="'.$varaut.'"' . (($variable==$varaut) ? ' selected="selected"' : '');
return (!isset($option) ? $res : "<option$res>$option</option>\n");
// Voir en ligne, ou apercu, ou rien (renvoie tout le bloc)
// http://doc.spip.org/@voir_en_ligne
function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif', $af = true) {
if ($statut == "publie" AND $GLOBALS['meta']["post_dates"] == 'non') {
$n = spip_fetch_array(spip_query("SELECT id_article FROM spip_articles WHERE id_article=$id AND date<=NOW()"));
if (!$n) $statut = 'prop';
}
$en_ligne = 'calcul';
else if ($statut == 'prop')
break;
case 'rubrique':
if ($id > 0)
if ($statut == 'publie')
$en_ligne = 'calcul';
case 'site':
$en_ligne = 'calcul';
$en_ligne = 'calcul';
if ($en_ligne == 'calcul')
else if ($en_ligne == 'preview') {
// est-ce autorise ?
if (($GLOBALS['meta']['preview'] == 'oui' AND $connect_statut=='0minirezo')
OR ($GLOBALS['meta']['preview'] == '1comite'))
return icone_horizontale($message, generer_url_action('redirect', "id_$type=$id&var_mode=$en_ligne"), $image, "rien.gif", $af);
//
// Creer un bouton qui renvoie vers la bonne url spip_rss
// http://doc.spip.org/@bouton_spip_rss
function bouton_spip_rss($op, $args, $fmt='rss') {
$a = '';
if (is_array($args))
foreach ($args as $val => $var)
if ($var) $a .= ':' . $val.'-'.$var;
$a = substr($a,1);
$url = generer_url_action('rss', "op=$op"
. (!$a ? "" : "&args=$a")
. ('&id=' . $GLOBALS['connect_id_auteur'])
. ('&cle=' . afficher_low_sec($GLOBALS['connect_id_auteur'], "rss $op $a"))
. ('&lang=' . $GLOBALS['spip_lang']));
switch($fmt) {
case 'ical':
$url = preg_replace(',^.*?://,', 'webcal://', $url)
. "&fmt=ical";
$button = 'iCal';
break;
case 'atom':
$button = 'atom';
break;
case 'rss':
default:
$button = 'RSS';
break;
}
return "<a href='"
. $url
. "'>"
. http_img_pack('feed.png', $button, '', 'RSS')
. "</a>";
}
// Fonction pour la messagerie et la page d'accueil
// http://doc.spip.org/@http_calendrier_rv
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
function http_calendrier_rv($messages, $type) {
global $spip_lang_rtl, $spip_lang_left, $spip_lang_right;
$total = '';
if (!$messages) return $total;
foreach ($messages as $row) {
if (ereg("^=([^[:space:]]+)$",$row['texte'],$match))
$url = quote_amp($match[1]);
else
$url = generer_url_ecrire("message", "id_message=".$row['id_message']);
$rv = ($row['rv'] == 'oui');
$date = $row['date_heure'];
$date_fin = $row['date_fin'];
if ($row['type']=="pb") $bouton = "pense-bete";
else if ($row['type']=="affich") $bouton = "annonce";
else $bouton = "message";
if ($rv) {
$date_jour = affdate_jourcourt($date);
$total .= "<tr><td colspan='2'>" .
(($date_jour == $date_rv) ? '' :
"\n<div class='calendrier-arial11'><b>$date_jour</b></div>") .
"</td></tr>";
$date_rv = $date_jour;
$rv =
((affdate($date) == affdate($date_fin)) ?
("\n<div class='calendrier-arial9 fond-agenda'>"
. heures($date).":".minutes($date)."<br />"
. heures($date_fin).":".minutes($date_fin)."</div>") :
( "\n<div class='calendrier-arial9 fond-agenda' style='text-align: center;'>"
. heures($date).":".minutes($date)."<br />...</div>" ));
}
$total .= "<tr><td style='width: 24px' valign='middle'>" .
http_href($url,
($rv ?
http_img_pack("rv.gif", 'rv',
Fil
a validé
http_style_background($bouton . '.gif', "no-repeat;'")) :
http_img_pack($bouton.".gif", $bouton, "")),
'', '') .
"</td>" .
"<td valign='middle'>" .
$rv .
"\n<div><b>" .
http_href($url, typo($row['titre']), '', '', 'calendrier-verdana10') .
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
"</b></div>" .
"</td>" .
"</tr>\n";
}
if ($type == 'annonces') {
$titre = _T('info_annonces_generales');
$couleur_titre = "ccaa00";
$couleur_texte = "black";
$couleur_fond = "#ffffee";
}
else if ($type == 'pb') {
$titre = _T('infos_vos_pense_bete');
$couleur_titre = "#3874B0";
$couleur_fond = "#EDF3FE";
$couleur_texte = "white";
}
else if ($type == 'rv') {
$titre = _T('info_vos_rendez_vous');
$couleur_titre = "#666666";
$couleur_fond = "#eeeeee";
$couleur_texte = "white";
}
return
debut_cadre_enfonce("", true, "", $titre) .
"<table width='100%' border='0' cellpadding='0' cellspacing='2'>" .
$total .
"</table>" .
fin_cadre_enfonce(true);
}