function http_calendrier_messages($annee='', $mois='', $jour='', $heures='', $partie_cal='', $echelle='') { $evtm = quete_calendrier_agenda($annee, $mois); if ($evtm OR !$heures) $evtm = http_calendrier_agenda($annee, $mois, $jour, $mois, $annee, false, generer_url_ecrire('calendrier'), '', $evtm); else $evtm= ''; $evtt = http_calendrier_rv(quete_calendrier_taches_annonces(),"annonces") . http_calendrier_rv(quete_calendrier_taches_pb(),"pb") . http_calendrier_rv(quete_calendrier_taches_rv(), "rv"); $evtr= ''; if ($heures) { $date = date("$annee-$mois-$jour"); $datef = "'$date $heures'"; if ($heures = quete_calendrier_interval_rv("'$date'", $datef)) $evtr = http_calendrier_ics_titre($annee,$mois,$jour,generer_url_ecrire('calendrier')) . http_calendrier_ics($annee, $mois, $jour, $echelle, $partie_cal, 90, array('', $heures), '', ' calendrier-msg'); } return array($evtm, $evtt, $evtr); }
function lcm_page_start($title = "", $css_files = "", $meta = '', $help_code = '') { global $connect_id_auteur; global $connect_status; global $auth_can_disconnect, $connect_login; global $options; global $lcm_lang, $lcm_lang_rtl, $lcm_lang_left, $lcm_lang_right; global $clean_link; global $prefs; // Clean the global link (i.e. remove actions passed in the URL) $clean_link->delVar('var_lang'); $clean_link->delVar('set_options'); $clean_link->delVar('set_couleur'); $clean_link->delVar('set_disp'); $clean_link->delVar('set_ecran'); lcm_html_start($title, $css_files, $meta); // // Title (mandatory) and description (may be empty) of the site // $site_name = _T(read_meta('site_name')); if (!$site_name) { $site_name = _T('title_software'); } $site_desc = _T(read_meta('site_description')); // // Most of the header/navigation html // echo '<div id="header"> <a href="summary.php" class="balance_link"> </a> <h1 class="lcm_main_head"><a href="summary.php" class="head_ttl_link">' . $site_name . '</a></h1> <div class="lcm_slogan"><a href="summary.php" class="head_subttl_link">' . $site_desc . "</a></div>\n\t\t<br />\n\t</div>\n"; echo "<div id='wrapper_" . $prefs['screen'] . "'>\n\t\t<div id=\"container_" . $prefs['screen'] . "\">\n\t\t\t<div id=\"content_" . $prefs['screen'] . "\">\n\t\t\t<!-- This is the navigation column, usually used for menus and brief information -->\n\t\t\t\t<div id=\"navigation_menu_column\">\n\t\t\t\t<!-- Start of navigation_menu_column content -->\n\t\t\t\t\t<div class=\"nav_menu_box\">\n\t\t\t\t\t\t<div class=\"nav_column_menu_head\"><div class=\"mm_main_menu\">" . _T('menu_main') . "</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<ul class=\"nav_menu_list\">"; echo show_navmenu_item("listcases.php", 'main_cases'); // Require to be explicitly off in order to hide the menu item (avoid config errors) if (read_meta('client_hide_all') != 'yes') { echo show_navmenu_item("listclients.php", 'main_clients'); } if (read_meta('org_hide_all') != 'yes') { echo show_navmenu_item("listorgs.php", 'main_orgs'); } if (read_meta('expenses_hide_all') != 'yes') { echo show_navmenu_item("listexps.php", "main_expenses"); } echo show_navmenu_item("listauthors.php", 'main_authors'); echo "</ul>\n"; echo "</div>\n"; if ($connect_status == 'admin') { echo "<div class=\"nav_menu_box\">\n"; echo "<div class=\"nav_column_menu_head\"><div class=\"mm_admin\">" . _T('menu_admin') . "</div></div>\n"; echo "<ul class=\"nav_menu_list\">"; show_navmenu_item("config_site.php", "admin_siteconf"); show_navmenu_item("archive.php", "admin_archives"); show_navmenu_item("listreps.php", "admin_reports"); show_navmenu_item("keywords.php", "admin_keywords"); echo "</ul>\n"; echo "</div>\n"; } // Show today's date if ($title != _T('title_upgrade_database')) { echo "<div class=\"nav_menu_box\">\n"; echo "<div class=\"nav_column_menu_head\">\n"; echo "<div class=\"mm_calendar\">" . _T('menu_calendar') . "</div>\n"; echo "</div>\n"; // Show calendar include_lcm('inc_calendar'); $now = date('Y-m-d'); echo "<table border='0' align='center'><tr><td>\n"; // Temporary? [ML] echo http_calendrier_agenda(mois($now), annee($now), jour($now), mois($now), annee($now), false, 'calendar.php'); echo "</td></tr></table>\n"; echo "</div>\n"; // Start agenda box echo '<div class="nav_menu_box">' . "\n"; echo '<div class="nav_column_menu_head">'; echo '<div class="mm_agenda">' . _T('menu_agenda') . "</div>\n"; echo "</div>\n"; $events = false; // Show appointments for today $q = "SELECT app.id_app, start_time, type, title\n\t\t\tFROM lcm_app as app, lcm_author_app as aut\n\t\t\tWHERE aut.id_author=" . $GLOBALS['author_session']['id_author'] . "\n\t\t\tAND app.id_app = aut.id_app\n\t\t\tAND " . lcm_query_trunc_field('app.start_time', 'day') . "\n\t\t\t= " . lcm_query_trunc_field('NOW()', 'day') . "\n\t\t\tORDER BY app.reminder ASC"; $result = lcm_query($q); if (lcm_num_rows($result) > 0) { $events = true; $today = getdate(time()); echo "<p class=\"nav_column_text\">\n" . '<strong><a class="content_link" href="calendar.php?type=jour' . "&jour=" . $today['mday'] . "&mois=" . $today['mon'] . "&annee=" . $today['year'] . '">' . _Th('calendar_button_now') . "</a></strong><br />\n"; echo "</p>\n"; echo "<ul class=\"small_agenda\">\n"; while ($row = lcm_fetch_array($result)) { echo "<li><a href=\"app_det.php?app=" . $row['id_app'] . "\">" . heures($row['start_time']) . ':' . minutes($row['start_time']) . " - " . $row['title'] . "</a></li>\n"; } echo "</ul>\n"; echo "<hr class=\"hair_line\" />\n"; } // Show next appointments $q = "SELECT a.id_app, a.start_time, a.type, a.title\n\t\t\tFROM lcm_app as a, lcm_author_app as aa\n\t\t\tWHERE (aa.id_author = " . $GLOBALS['author_session']['id_author'] . "\n\t\t\t\t\tAND a.id_app = aa.id_app\n\t\t\t\t\tAND a.start_time >= '" . date('Y-m-d H:i:s', (int) ceil(time() / 86400) * 86400) . "')\n\t\t\tORDER BY a.reminder ASC\n\t\t\tLIMIT 5"; $result = lcm_query($q); if (lcm_num_rows($result) > 0) { $events = true; echo "<p class=\"nav_column_text\">\n"; echo "<strong>" . _T('calendar_button_nextapps') . "</strong><br />\n"; echo "</p>\n"; echo "<ul class=\"small_agenda\">\n"; while ($row = lcm_fetch_array($result)) { echo "<li><a href=\"app_det.php?app=" . $row['id_app'] . "\">" . format_date($row['start_time'], 'short') . " - " . $row['title'] . "</a></li>\n"; } echo "</ul>\n"; } if (!$events) { echo '<p class="nav_column_text">' . _T('calendar_info_noacts') . "</p>\n"; } // my appointments echo ' <a href="author_det.php?tab=appointments&author=' . $GLOBALS['author_session']['id_author'] . '" title="' . _T('title_agenda_list') . '">' . '<img src="images/jimmac/stock_show-form-dialog.png" border="0" width="16" height="16" alt="" /></a>'; // new appointment echo ' <a href="edit_app.php?app=0" title="' . _T('app_button_new') . '">' . '<img src="images/jimmac/stock_new-16.png" border="0" width="16" height="16" alt="" /></a>'; // End of nav_menu_box for Agenda echo "</div>\n"; } // End of "navigation_menu_column" content echo "</div>\n\n\t\t\t\t<!-- The main content will be here - all the data, html forms, search results etc. -->\n\t\t\t\t<div id=\"main_column\">\n\t\t\t\t\n\t\t\t\t\t<!-- Start of 'main_column' content -->\n\t\t\t\t\t<h3 class=\"content_head\">"; if ($help_code) { echo '<span class="help_icon">' . lcm_help($help_code) . "</span> "; } echo $title; echo "</h3>\n\t\t\t\t\t<!-- [KM] Just a small experiment how the future breadcrumb will look like -->\n\t\t\t\t\t<!-- div id=\"breadcrumb\"><a href=\"#\" title=\"Test link\">Home</a> > <a href=\"#\" title=\"Test link\">Page1</a> > <a href=\"#\" title=\"Test link\">Subpage1</a> > Subsubpage1</div -->\n\t"; }
function exec_affiche_message_dist($id_message, $cherche_auteur, $forcer_dest) { $row = sql_fetsel("*", "spip_messages", "id_message=$id_message"); if ($row) { $id_message = $row['id_message']; $date_heure = $row["date_heure"]; $date_fin = $row["date_fin"]; $titre = typo($row["titre"]); $texte = propre($row["texte"]); $type = $row["type"]; $statut = $row["statut"]; $rv = $row["rv"]; $expediteur = $row['id_auteur']; $lejour=journum($row['date_heure']); $lemois = mois($row['date_heure']); $lannee = annee($row['date_heure']); $commencer_page = charger_fonction('commencer_page', 'inc'); echo $commencer_page($titre, "accueil", "messagerie"); echo debut_gauche('', true); if ($rv != 'non') echo http_calendrier_agenda ($lannee, $lemois, $lejour, $lemois, $lannee,false, generer_url_ecrire('calendrier')); echo "<br />"; echo http_calendrier_rv(quete_calendrier_taches_annonces(),"annonces"); echo http_calendrier_rv(quete_calendrier_taches_pb(),"pb"); echo http_calendrier_rv(quete_calendrier_taches_rv(), "rv"); if ($rv != "non") { list ($sh, $ah) = quete_calendrier_interval(quete_calendrier_jour($lannee,$lemois, $lejour)); foreach ($ah as $k => $v) { foreach ($v as $l => $e) { if (preg_match(",=$id_message$,", $e['URL'])) { $ah[$k][$l]['CATEGORIES'] = "calendrier-nb"; break; } } } echo creer_colonne_droite('', true); echo http_calendrier_ics_titre($lannee,$lemois,$lejour,generer_url_ecrire('calendrier')); echo http_calendrier_ics($lannee,$lemois, $lejour, '', '', 90, array($sh, $ah), '', ' calendrier-msg'); } echo debut_droite('', true); http_affiche_message($id_message, $expediteur, $statut, $type, $texte, $titre, $rv, $date_heure, $date_fin, $cherche_auteur, $forcer_dest); // reponses et bouton poster message $discuter = charger_fonction('discuter', 'inc'); echo $discuter($id_message, 'message', 'id_message', "perso"); } echo fin_gauche(), fin_page(); }
function http_agenda_invisible($id, $annee, $jour, $mois, $script, $ancre) { $couleur_claire = 'white'; // CSS FIXME $gadget = "<div id='{$id}' style='position: relative; visibility: hidden;z-index: 1000; ' " . " onmouseover=\"lcm_show('{$id}');\" " . " onmouseout=\"lcm_hide('{$id}');\">" . "<div style='position: absolute; padding: 5px; background-color: {$couleur_claire}; margin-bottom: 5px; -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px;'>"; $gadget .= "<table cellpadding='0' cellspacing='5' border='0' width='98%'>\n"; $gadget .= "<tr>\n<td colspan='3' style='text-align:left;'>"; $annee_avant = $annee - 1; $annee_apres = $annee + 1; // // show month names before and after current month // for ($i = $mois; $i < 13; $i++) { $gadget .= http_href($script . "mois={$i}&annee={$annee_avant}{$ancre}", nom_mois("{$annee_avant}-{$i}-1"), '', '', 'cal_yearview'); } for ($i = 1; $i < $mois - 1; $i++) { $gadget .= http_href($script . "mois={$i}&annee={$annee}{$ancre}", nom_mois("{$annee}-{$i}-1"), '', '', 'cal_yearview'); } // // Show calendars for previous, current and next month // $show_week = $_REQUEST['type'] == 'semaine' ? true : false; $gadget .= "</td>\n</tr>\n</table>\n"; // [ML] I had a problem centering the name of month, so I removed the 'width="100%"' // but I know it's still ugly now, so if you have any ideas, feel free to fix :-) $gadget .= "<table cellpadding='0' cellspacing='5' border='0' align='center'>\n"; $gadget .= "<tr>\n<td valign='top' width='33%'>" . http_calendrier_agenda($mois - 1, $annee, $jour, $mois, $annee, $show_week, $script, $ancre) . "</td>\n<td valign='top' width='33%'>" . http_calendrier_agenda($mois, $annee, $jour, $mois, $annee, $show_week, $script, $ancre) . "</td>\n<td valign='top' width='33%'>" . http_calendrier_agenda($mois + 1, $annee, $jour, $mois, $annee, $show_week, $script, $ancre) . "</td>\n" . "</tr>\n</table>\n" . "<table cellpadding='0' cellspacing='5' border='0' width='98%'><tr><td colspan='3' style='text-align:right;'>"; for ($i = $mois + 2; $i <= 12; $i++) { $gadget .= http_href($script . "mois={$i}&annee={$annee}{$ancre}", nom_mois("{$annee}-{$i}-1"), '', '', 'cal_yearview'); } for ($i = 1; $i < $mois + 1; $i++) { $gadget .= http_href($script . "mois={$i}&annee={$annee_apres}{$ancre}", nom_mois("{$annee_apres}-{$i}-1"), '', '', 'cal_yearview'); } return $gadget . "</td></tr></table></div></div>\n\n"; }