[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/calendar_menu/ -> calendar_template.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/calendar_menu/calendar_template.php,v $
  14  |     $Revision: 1.9 $
  15  |     $Date: 2006/11/16 10:24:14 $
  16  |     $Author: e107coders $
  17  |
  18  | 10.11.06 steved - mods for next CVS release
  19  +----------------------------------------------------------------------------+
  20  */
  21  if (!defined('e107_INIT')) { exit; }
  22  
  23  // TIME SWITCH BUTTONS ------------------------------------------------------------
  24  $sc_style['PREV_MONTH']['pre'] = "<span class='defaulttext'>";
  25  $sc_style['PREV_MONTH']['post'] = "</span>";
  26  
  27  $sc_style['CURRENT_MONTH']['pre'] = "<b>";
  28  $sc_style['CURRENT_MONTH']['post'] = "</b>";
  29  
  30  $sc_style['NEXT_MONTH']['pre'] = "<span class='defaulttext'>";
  31  $sc_style['NEXT_MONTH']['post'] = "</span>";
  32  
  33  $sc_style['PREV_YEAR']['pre'] = "";
  34  $sc_style['PREV_YEAR']['post'] = "";
  35  
  36  $sc_style['MONTH_LIST']['pre'] = "";
  37  $sc_style['MONTH_LIST']['post'] = "";
  38  
  39  $sc_style['NEXT_YEAR']['pre'] = "";
  40  $sc_style['NEXT_YEAR']['post'] = "";
  41  
  42  //<table style='width:98%;' class='fborder'>
  43  
  44  $CALENDAR_TIME_TABLE = "
  45  <table cellpadding='0' cellspacing='1' class='fborder' style='width:100%'>
  46  <tr>
  47      <td class='forumheader' style='width:18%; text-align:left'>{PREV_MONTH}</td>
  48      <td class='fcaption' style='width:64%; text-align:center'>{CURRENT_MONTH}</td>
  49      <td class='forumheader' style='width:18%; text-align:right'>{NEXT_MONTH}</td>
  50  </tr>\n
  51  <tr>
  52      <td class='forumheader3' style='text-align:left'>{PREV_YEAR}</td>
  53      <td class='fcaption' style='text-align:center; vertical-align:middle'>{MONTH_LIST}</td>
  54      <td class='forumheader3' style='text-align:right'>{NEXT_YEAR}</td>
  55  </tr>\n
  56  </table>";
  57  
  58  
  59  
  60  // NAVIGATION BUTTONS ------------------------------------------------------------
  61  //$sc_style['NAV_LINKCURRENTMONTH']['pre'] = "<span class='button' style='width:120px; '>";
  62  //$sc_style['NAV_LINKCURRENTMONTH']['post'] = "</span>";
  63  $sc_style['NAV_LINKCURRENTMONTH']['pre'] = "";
  64  $sc_style['NAV_LINKCURRENTMONTH']['post'] = "";
  65  
  66  $CALENDAR_NAVIGATION_TABLE = "
  67  <div style='text-align:center; margin-bottom:20px;'>
  68  <form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='calform'>
  69  <table border='0' cellpadding='0' cellspacing='0' style='width:100%;'>
  70  <tr>
  71      <td style='text-align:center;'>{NAV_CATEGORIES} {NAV_BUT_ALLEVENTS} {NAV_BUT_VIEWCAT} {NAV_BUT_ENTEREVENT} {NAV_BUT_SUBSCRIPTION} {NAV_LINKCURRENTMONTH}</td>
  72  </tr>\n
  73  </table>
  74  </form>
  75  </div>";
  76  
  77  
  78  
  79  // EVENT LIST ------------------------------------------------------------
  80  $sc_style['EVENTLIST_CAPTION']['pre'] = "<tr><td class='fcaption' colspan='2'>";
  81  $sc_style['EVENTLIST_CAPTION']['post'] = ":<br /><br /></td></tr>\n";
  82  
  83  $EVENT_EVENTLIST_TABLE_START = "<table style='width:100%' class='fborder'>{EVENTLIST_CAPTION}";
  84  $EVENT_EVENTLIST_TABLE_END = "</table>";
  85  
  86  
  87  
  88  // EVENT ARCHIVE ------------------------------------------------------------
  89  $sc_style['EVENTARCHIVE_CAPTION']['pre'] = "<tr><td colspan='2' class='fcaption'>";
  90  $sc_style['EVENTARCHIVE_CAPTION']['post'] = "</td></tr>\n";
  91  
  92  $EVENT_ARCHIVE_TABLE_START = "<br /><table style='width:100%' class='fborder'>{EVENTARCHIVE_CAPTION}";
  93  $EVENT_ARCHIVE_TABLE = "
  94  <tr>
  95      <td style='width:35%; vertical-align:top' class='forumheader3'>{EVENT_RECENT_ICON}{EVENTARCHIVE_DATE}</td>
  96      <td style='width:65%' class='forumheader3'>{EVENTARCHIVE_HEADING}</td>
  97  </tr>\n";
  98  //<br />{EVENTARCHIVE_DETAILS}
  99  $EVENT_ARCHIVE_TABLE_EMPTY = "<tr><td colspan='2' class='forumheader3'>{EVENTARCHIVE_EMPTY}</td></tr>\n";
 100  $EVENT_ARCHIVE_TABLE_END = "</table>";
 101  
 102  
 103  
 104  // EVENT SHOW EVENT ------------------------------------------------------------
 105  $EVENT_EVENT_TABLE_START = "<table style='width:100%' class='fborder' cellspacing='0' cellpadding='0'>";
 106  $EVENT_EVENT_TABLE_END = "</table>";
 107  
 108  $sc_style['EVENT_HEADING_DATE']['pre'] = "";
 109  $sc_style['EVENT_HEADING_DATE']['post'] = "";
 110  
 111  $sc_style['EVENT_DETAILS']['pre'] = "<tr><td colspan='2' class='forumheader3'>";
 112  $sc_style['EVENT_DETAILS']['post'] = "</td></tr>\n";
 113  
 114  $sc_style['EVENT_LOCATION']['pre'] = "<b>".EC_LAN_32."</b> ";
 115  $sc_style['EVENT_LOCATION']['post'] = "";
 116  
 117  $sc_style['EVENT_AUTHOR']['pre'] = "<b>".EC_LAN_31."</b> ";
 118  $sc_style['EVENT_AUTHOR']['post'] = "&nbsp;";
 119  
 120  $sc_style['EVENT_CONTACT']['pre'] = "<b>".EC_LAN_33."</b> ";
 121  $sc_style['EVENT_CONTACT']['post'] = "&nbsp;";
 122  
 123  $sc_style['EVENT_THREAD']['pre'] = "<tr><td colspan='2' class='forumheader3'><span class='smalltext'>";
 124  $sc_style['EVENT_THREAD']['post'] = "</span></td></tr>\n";
 125  
 126  $sc_style['EVENT_CATEGORY']['pre'] = "<b>".EC_LAN_30."</b> ";
 127  $sc_style['EVENT_CATEGORY']['post'] = "&nbsp;";
 128  
 129  $sc_style['EVENT_DATE_START']['pre'] = (isset($thisevent['event_allday']) && $thisevent['event_allday']) ? "<b>".EC_LAN_68."</b> " : "<b>".EC_LAN_29."</b> ";
 130  $sc_style['EVENT_DATE_START']['post'] = "";
 131  
 132  $sc_style['EVENT_TIME_START']['pre'] = EC_LAN_144;
 133  $sc_style['EVENT_TIME_START']['post'] = "";
 134  
 135  $sc_style['EVENT_DATE_END']['pre'] = "<b>".EC_LAN_69."</b> ";
 136  $sc_style['EVENT_DATE_END']['post'] = "";
 137  
 138  $sc_style['EVENT_TIME_END']['pre'] = EC_LAN_144;
 139  $sc_style['EVENT_TIME_END']['post'] = "";
 140  
 141  $EVENT_EVENT_TABLE = "
 142  <tr>
 143      <td >
 144          <div title='".EC_LAN_132."' class='fcaption' style='cursor:pointer; text-align:left; border:0px solid #000;' onclick=\"expandit('{EVENT_ID}')\">{EVENT_RECENT_ICON}{EVENT_CAT_ICON}{EVENT_HEADING_DATE}{EVENT_TIME_START}&nbsp;-&nbsp;{EVENT_TITLE}</div>
 145          <div id='{EVENT_ID}' style='display:{EVENT_DISPLAYSTYLE}; padding-top:10px; padding-bottom:10px; text-align:left;'>
 146              <table style='width:100%;'  cellspacing='0' cellpadding='0'>
 147                  <tr><td colspan='2' class='forumheader3'>{EVENT_AUTHOR} {EVENT_CAT_ICON} {EVENT_CATEGORY} {EVENT_CONTACT} {EVENT_OPTIONS}</td></tr>
 148                  <tr><td colspan='2' class='forumheader3'>{EVENT_DATE_START}{EVENT_TIME_START} {EVENT_DATE_END}{EVENT_TIME_END}</td></tr>\n
 149                  <tr><td colspan='2' class='forumheader3'>{EVENT_LOCATION}</td></tr>
 150                  {EVENT_DETAILS}
 151                  {EVENT_THREAD}
 152              </table>
 153          </div>
 154      </td>
 155  </tr>\n
 156  ";
 157  
 158  
 159  // CALENDAR SHOW EVENT ------------------------------------------------------------
 160  $sc_style['CALENDAR_CALENDAR_RECENT_ICON']['pre'] = "<td style='vertical-align:top; color: #0; background-color: #ff00; width:10px;'>";
 161  $sc_style['CALENDAR_CALENDAR_RECENT_ICON']['post'] = "</td>";
 162  $CALENDAR_SHOWEVENT = "<table cellspacing='0' cellpadding='0' style='width:100%;'><tr>{CALENDAR_CALENDAR_RECENT_ICON}<td style='vertical-align:top; width:10px;'>{SHOWEVENT_IMAGE}</td><td style='vertical-align:top; width:2%;'>{SHOWEVENT_INDICAT}</td><td style='vertical-align:top;'>{SHOWEVENT_HEADING}</td></tr>\n</table>";
 163  
 164  
 165  
 166  // CALENDAR CALENDAR ------------------------------------------------------------
 167  $CALENDAR_CALENDAR_START = "
 168  <div style='text-align:center'>
 169  <table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:100%'>";
 170  
 171  $CALENDAR_CALENDAR_END = "
 172  </tr>\n</table></div>";
 173  
 174  $CALENDAR_CALENDAR_DAY_NON = "<td style='width:12%;height:60px;'></td>";
 175  
 176  //header row
 177  $CALENDAR_CALENDAR_HEADER_START = "<tr>";
 178  $CALENDAR_CALENDAR_HEADER = "<td class='fcaption' style='z-index: -1; background-color:#000; color:#FFF; width:90px; height:20px; text-align:center; vertical-align:middle;'>{CALENDAR_CALENDAR_HEADER_DAY}</td>";
 179  $CALENDAR_CALENDAR_HEADER_END = "</tr>\n<tr>";
 180  
 181  
 182  $CALENDAR_CALENDAR_WEEKSWITCH = "</tr>\n<tr>";
 183  
 184  //today
 185  $CALENDAR_CALENDAR_DAY_TODAY = "
 186  <td class='forumheader3' style='vertical-align:top; width:14%; height:90px; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;'>
 187  <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>{CALENDAR_CALENDAR_DAY_TODAY_HEADING}</span>";
 188  
 189  //day has events
 190  $CALENDAR_CALENDAR_DAY_EVENT = "
 191  <td class='forumheader3' style='z-index: 1;vertical-align:top; width:14%; height:90px; padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;'>
 192  <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{CALENDAR_CALENDAR_DAY_EVENT_HEADING}</b></span>";
 193  
 194  // no events and not today
 195  $CALENDAR_CALENDAR_DAY_EMPTY = "
 196  <td class='forumheader2' style='z-index: 1;vertical-align:top; width:14%; height:90px;padding-bottom:0px;padding-right:0px; margin-right:0px; padding:2px;'>
 197  <span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'><b>{CALENDAR_CALENDAR_DAY_EMPTY_HEADING}</b></span>";
 198  
 199  $CALENDAR_CALENDAR_DAY_END = "</td>";
 200  
 201  //====================================================================
 202  // Calendar menu templates
 203  $CALENDAR_MENU_START = "<div style='text-align:center'>";
 204  $CALENDAR_MENU_TABLE_START =   "<table cellpadding='0' cellspacing='1' style='width:100%' class='fborder'>";
 205  
 206  $CALENDAR_MENU_END = "</tr></table></div>";
 207  
 208  // Blank cells at beginning and end
 209  $CALENDAR_MENU_DAY_NON = "<td class='forumheader3' style='padding:1px; text-align:center'><br /></td>";
 210  
 211  //header row
 212  $CALENDAR_MENU_HEADER_START = "<tr>\n";
 213  $CALENDAR_MENU_HEADER_FRONT = "<td class='forumheader' style='text-align:center; vertical-align:middle;'><span class='smalltext'>";
 214  $CALENDAR_MENU_HEADER_BACK = "</span></td>";
 215  $CALENDAR_MENU_HEADER_END = "</tr>\n<tr>";
 216  
 217  
 218  $CALENDAR_MENU_WEEKSWITCH = "</tr>\n<tr>";
 219  
 220  // Start and end CSS for date cells - six cases to decode, determined by array index:
 221  //         1 - Today, no events
 222  //        2 - Some other day, no events (or no icon defined)
 223  //        3 - Today with events (and icon defined)
 224  //        4 - Some other day with events (and icon defined)
 225  //        5 - today with events, one or more of which has recently been added/updated (and icon defined)
 226  //        6 - Some other day with events, one or more of which has recently been added/updated (and icon defined)
 227   
 228  //today, no events
 229  $CALENDAR_MENU_DAY_START['1'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
 230  
 231  // no events and not today
 232  $CALENDAR_MENU_DAY_START['2'] = "<td class='forumheader3' style='width:14.28%; padding:1px; text-align:center; '>";
 233  
 234  //day has events - same whether its today or not
 235  $CALENDAR_MENU_DAY_START['3'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
 236  $CALENDAR_MENU_DAY_START['4'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center;'>";
 237  // day has events, one which is recently added/updated
 238  $CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; '>";
 239  $CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center;'>";
 240  // Example highlight using background colour:
 241  //$CALENDAR_MENU_DAY_START['5'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF8000;'>";
 242  //$CALENDAR_MENU_DAY_START['6'] = "<td class='indent' style='width:14.28%; padding:1px; text-align:center; background-color: #FF0000; '>";
 243  
 244  $CALENDAR_MENU_DAY_END['1'] = "</td>";
 245  $CALENDAR_MENU_DAY_END['2'] = "</td>";
 246  $CALENDAR_MENU_DAY_END['3'] = "</td>";
 247  $CALENDAR_MENU_DAY_END['4'] = "</td>";
 248  $CALENDAR_MENU_DAY_END['5'] = "</td>";
 249  $CALENDAR_MENU_DAY_END['6'] = "</td>";
 250  
 251  //============================================================================
 252  // Next event menu template
 253  $sc_style['NEXT_EVENT_TIME']['pre'] = EC_LAN_144;
 254  $sc_style['NEXT_EVENT_TIME']['post'] = "";
 255  // Following are original styles
 256  //$sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='border:0px' src='";
 257  //$sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' />&nbsp;";
 258  // Following to 'float right' on a larger icon
 259  $sc_style['NEXT_EVENT_ICON']['pre'] = "<img style='clear: right; float: left; margin: 0px 3px 0px 0px; padding:1px; border: 0px;' src='";
 260  $sc_style['NEXT_EVENT_ICON']['post'] = "' alt='' />";
 261  
 262  
 263  if (!isset($EVENT_CAL_FE_LINE))
 264  {  
 265    $EVENT_CAL_FE_LINE = "{NEXT_EVENT_ICON}{NEXT_EVENT_DATE}{NEXT_EVENT_TIME}<br /><strong>{NEXT_EVENT_TITLE}</strong>{NEXT_EVENT_GAP}";
 266  }
 267  
 268  
 269  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7