PHP e107 skrift
hejsa alle sammen.jeg har en side templars.dk siden er lavet i e107 lige som php nuke :)
mit problem er : jeg har en kalender der inde og den funker helt fint MEN skriften i selve kalenderen er sort ! og nu er det sådan at min baggrund er sort :( ville meget gerne ha noget hjælpe til hvor jeg laver det om henne vil gerne ha den hvid skriften .
det er disse php script inde
calendar.php
<?
/*
+---------------------------------------------------------------+
| e107 website system
| /e_PLUGIN."calnder.php
|
| ©Steve Dunstan 2001-2002
| http://jalist.com
| stevedunstan@jalist.com
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvsroot/e107/e107/e107_plugins/calendar_menu/calendar.php,v $
| $Revision: 1.6 $
| $Date: 2004/09/03 18:32:10 $
| $Author: e107coders $
+---------------------------------------------------------------+
*/
// get current date information ---------------------------------------------------------------------
define("PAGE_NAME", "Show Calendar");
require_once("../../class2.php");
require_once(HEADERF);
$num = $_POST['num'];
if(IsSet($_POST['viewallevents'])){
Header("Location: ".e_PLUGIN."calendar_menu/event.php?".$_POST['enter_new_val']);
}
if(IsSet($_POST['doit'])){
Header("Location: ".e_PLUGIN."calendar_menu/event.php?ne.".$_POST['enter_new_val']);
}
$ec_dir = e_PLUGIN."calendar_menu/";
$lan_file = $ec_dir."languages/".e_LANGUAGE.".php";
include(file_exists($lan_file) ? $lan_file : e_PLUGIN."calendar_menu/languages/English.php");
// new part by cam.
$qs = explode(".", e_QUERY);
$action = $qs[0];
if ($action == "") {
$datearray = getdate();
$month = $datearray['mon'];
$year = $datearray['year'];
$day = $datearray['day'];
} else {
$datearray = getdate($action);
$month = $datearray['mon'];
$year = $datearray['year'];
}
// set up arrays for calender display ------------------------------------------------------------------
$week = Array('S','M','T','W','T','F','S');
$months = Array(EC_LAN_0,EC_LAN_1,EC_LAN_2,EC_LAN_3,EC_LAN_4,EC_LAN_5,EC_LAN_6,EC_LAN_7,EC_LAN_8,EC_LAN_9,EC_LAN_10,EC_LAN_11);
$monthabb = Array(EC_LAN_JAN,EC_LAN_FEB,EC_LAN_MAR,EC_LAN_APR,EC_LAN_MAY,EC_LAN_JUN,EC_LAN_JUL,EC_LAN_AUG,EC_LAN_SEP,EC_LAN_OCT,EC_LAN_NOV,EC_LAN_DEC);
$calendar_title = "<a href='".e_PLUGIN."calendar_menu/event.php' class='mmenu'>".$months[$datearray[mon]-1]." ".$current_year."</a>";
// -----------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------
// show events-------------------------------------------------------------------------------------------
// get first and last days of month in unix format---------------------------------------------------
$monthstart= mktime(0,0,0,$month,1,$year);
$firstdayarray = getdate($monthstart);
$monthend = mktime(0,0,0,$month+1,1,$year);
$lastdayarray = getdate($monthend);
// ----------------------------------------------------------------------------------------------------------
// echo current month with links to previous/next months ----------------------------------------
$prevmonth = ($month-1);
$prevyear = $year;
if ($prevmonth == 0) {
$prevmonth = 12;
$prevyear = ($year-1);
}
$previous = mktime(0,0,0,$prevmonth,1, $prevyear);
$nextmonth = ($month+1);
$nextyear = $year;
if ($nextmonth == 13) {
$nextmonth = 1;
$nextyear = ($year+1);
}
$next = mktime(0,0,0,$nextmonth,1, $nextyear);
$py = $year-1;
$prevlink = mktime(0,0,0,$month,1, $py);
$ny = $year+1;
$nextlink = mktime(0,0,0,$month,1, $ny);
$cal_text = "<table style='width:100%' class='fborder'>
<tr>
<td class='forumheader' style='width:18%; text-align:left'><span class='defaulttext'><a href='".e_SELF."?".$previous."'><< ".$months[($prevmonth-1)]."</a></span></td>
<td class='fcaption' style='width:64%; text-align:center'><b>".$months[($month-1)]." ".$year."</b></td>
<td class='forumheader' style='width:185%; text-align:right'><span class='defaulttext'><a href='".e_SELF."?".$next."'> ".$months[($nextmonth-1)]." >></a></span> </td>
</tr>
<tr>
<td class='forumheader3' style='text-align:left'><a href='calendar.php?".$prevlink."'><< ".$py."</a></td>
<td class='fcaption' style='text-align:center; vertical-align:middle'>";
for ($ii = 0; $ii < 13; $ii++){
$m = $ii+1;
$monthjump= mktime(0,0,0,$m,1,$year);
$cal_text .= "<a class='forumlink' href=\"calendar.php?".$monthjump."\">".$monthabb[$ii]."</a> ";
}
$cal_text .=
"</td>
<td class='forumheader3' style='text-align:right'>
<a href='calendar.php?".$nextlink."'>".$ny." >></a>
</td>
</tr>
</table>";
$cal_text .= "<div style='text-align:center'>
";
$prop = mktime(0,0,0,$month, 1, $year);
$nowarray = getdate();
$nowmonth = $nowarray['mon'];
$nowyear = $nowarray['year'];
$nowday = $nowarray['mday'];
$current = mktime(0,0,0,$nowmonth, 1, $nowyear);
##### Check for access.
//------------ Navigation Buttons. ------------------------------------------------------
$nav_text = "<br />
<form method='post' action='".e_SELF."?".e_QUERY."'>
<table border='0' cellpadding='2' cellspacing='3' class='forumheader3'>
<tr>
<td align='right'>
<select name='event_cat_ids' class='tbox' style='width:140px;'>
<option value='all'>All</option>";
$event_cat_id = !isset($_POST['event_cat_ids'])? NULL : $_POST['event_cat_ids'];
$sql -> db_Select("event_cat");
while($row = $sql -> db_Fetch()){
extract($row);
if($event_cat_id == $_POST['event_cat_ids']){
//if($event_cat_id == $qs[1]){
$nav_text .= "<option value='$event_cat_id' selected>".$event_cat_name."</option>";
}else{
$nav_text .= "<option value='$event_cat_id'>".$event_cat_name."</option>";
}
}
$nav_text .= "</select>
</td>
<td align='center'>
<input class='button' type='submit' style='width:140px;' name='viewallevents' value='View Events List' />
</td>
</tr>
<tr>
<td align='right'>
<input type='hidden' name='do' value='vc' />
<input class='button' type='submit' style='width:140px;' name='viewcat' value='View Category' />
</td>
<td align='center'>
<input type='hidden' name='enter_new_val' value='".$prop."' /> ";
if(check_class($pref['eventpost_admin']) || getperms('0')){ // start no admin preference
$nav_text .= "<input class='button' type='submit' style='width:140px;' name='doit' value='Enter New Event' />";
} // end admin preference activated.
$nav_text .= "</td>
</tr>
</table>
</form>
<br />";
//--------------------------------------------------------------------------------
if ($month != $nowmonth || $year != $nowyear) {
$nav_text .= " <span class='button' style='width:120px; '><a href='".e_SELF."?$current'>".EC_LAN_40."</a></span>";
}
$nav_text .= "</div><br />";
// get events from current month----------------------------------------------------------------------
$sql -> db_Select("event", "*", "(event_start>='$monthstart' AND event_start<= '$monthend') ORDER BY event_start ASC");
while ($row = $sql -> db_Fetch()) {
extract($row);
$evf = getdate($event_start);
$tmp = $evf['mday'];
$eve = getdate($event_end);
$tmp2 = $eve['mday'];
$cevent_title[$tmp] = $event_title;
$event_true[$tmp] = $event_start;
for ($i=($tmp+1); $i<($tmp2+1); $i++) {
$event_true_end[$i] = $i != $tmp2 ? 1:2;
$cevent_title[$i] = $event_title;
}
}
// -----------------------------------------------------------------------------------------------------------
$start = $monthstart;
$text .= "<div style='text-align:center'>
<table cellpadding='0' cellspacing='1' class='fborder' style='background-color:#DDDDDD; width:580px'><tr>";
foreach($week as $day){
$text .= "<td class='fcaption' style='z-index: -1;background-color:black; width:90px;height:20px;text-align:center'>
<strong>".$day."</strong>
<img src='".THEME."images/blank.gif' alt='' height='12%' width='14%' />
</td>";
}
$text .= "</tr><tr>";
$calmonth = $datearray['mon'];
$calday = $datearray['mday'];
$calyear = $datearray['year'];
for ($c=0; $c<$firstdayarray['wday']; $c++) {
$text .= "<td style=' width:90px;height:60px;'></td>";
}
$loop = $firstdayarray['wday'];
for ($c=1; $c<=31; $c++) {
$dayarray = getdate($start+(($c-1)*86400));
$stopp = mktime(24,0,0,$calmonth,$c,$calyear);
$startt = mktime(0,0,0,$calmonth,$c,$calyear);
$sql2 = new db;
$sql2 -> db_Select("event_cat", "*", "event_cat_id!='' ");
while($event_cat = $sql2-> db_Fetch()){
extract($event_cat);
$category_icon[$event_cat_id]= $event_cat_icon;
$category_title[$event_cat_id]= $event_cat_name;
}
$sql -> db_Select("event", "*", "event_start>='$startt' AND event_start<='$stopp' ORDER BY event_start");
$events = $sql -> db_Rows();
// Highlight the current day.
if ($dayarray['mon'] == $calmonth) {
if ($nowday == $c && $calmonth == $nowmonth && $calyear == $nowyear && !$event_true[($c)]&& !$event_true_end[($c)]) {
$text .="<td class='forumheader3' style='vertical-align:top; width:90px;height:90px;padding-bottom:0px;padding-right:0px; margin-right:0px'>";
$text .="<div style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>
<b>
<a href='".e_PLUGIN."calendar_menu/event.php?".$startt.".one'>".$c."</a>
</b>
<span class='smalltext'>[today]</span>
</div>";
} elseif($event_true[($c)] || $event_true_end[($c)]) {
$text .="<td class='forumheader3' style='z-index: 1;vertical-align:top; width:90px;height:90px;padding-bottom:0px;padding-right:0px; margin-right:0px'>";
$text .="<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>
<a href='".e_PLUGIN."calendar_menu/event.php?".$startt.".one'>
<strong>".$c."</strong>
</a>
</span>";
}else {
$text .="<td class='forumheader2 ' style='z-index: 1;vertical-align:top; width:90px;height:90px;padding-bottom:0px;padding-right:0px; margin-right:0px'>";
$text .="<span style='z-index: 2; position:relative; top:1px; height:10px;padding-right:0px'>
<a href='".e_PLUGIN."calendar_menu/event.php?".$startt.".one'>
<strong>".$c."</strong>
</a>
</span>";
}
if ($event_true_end[($c)]) {
$indicat = $event_true_end[($c)]==1? "->":"|";
$text .="<br /><img style='border:0' src='".$ec_dir."images/".$category_icon[$event_category]."' alt='' height='8' width='8' /> <a href='".e_PLUGIN."calendar_menu/event.php?".$linkut.".one'><span class='smalltext' style='color:black' >".$cevent_title[$c]."</span></a>".$indicat;
}
while($row = $sql -> db_Fetch()){
extract($row);
$event_title = $cevent_title[$c];
if (strlen($event_title) > 9){
$oevent_title = substr($event_title,0,10)."<br />".substr($event_title,10,9);
if (strlen($event_title) > 15){
$oevent_title .= "..";
}
} else {
$oevent_title = $event_title;
}
if ($event_true[($c)]) {
$linkut = mktime(0 ,0 ,0 ,$datearray['mon'], $c, $datearray['year']);
if(($_POST['do'] == NULL || $_POST['event_cat_ids'] == "all") || ($_POST['event_cat_ids'] == $event_cat_id)){
$text .="<br />
<img style='border:0' src='".$ec_dir."images/".$category_icon[$event_category]."' alt='' height='8' width='8' />
<a href='".e_PLUGIN."calendar_menu/event.php?".$linkut.".one'>
<span class='smalltext' style='color:black' >".$oevent_title."</span>
</a>";
}
}
}
$text .= '</td>';
}
$loop++;
if ($loop == 7) {
$loop = 0;
$text .= '</tr><tr>';
}
}
$text .= "</tr></table></div>";
$caption = EC_LAN_79; // "Calendar View";
$nav = $cal_text .$nav_text. $text;
$ns -> tablerender($caption, $nav);
// echo $text;
require_once(FOOTERF);
?>
SLUT
calendar_menu.php
rrent_day = $datearray['mday'];
$current_month = $datearray['mon'];
$current_year = $datearray['year'];
// get first and last days of month in unix format---------------------------------------------------
$monthstart= mktime(0,0,0,$current_month,1,$current_year);
$firstdayarray = getdate($monthstart);
$monthend = mktime(0,0,0,$current_month+1,0,$current_year);
$lastdayarray = getdate($monthend);
// ----------------------------------------------------------------------------------------------------------
// get events from current month----------------------------------------------------------------------
$sql -> db_Select("event", "*", "(event_start>='$monthstart' AND event_start<= '$monthend') OR (event_rec_y='$current_month')");
$events = $sql -> db_Rows();
while($row = $sql -> db_Fetch()){
extract($row);
$evf = getdate($event_start);
$tmp = $evf['mday'];
$event_true[$tmp] = $event_category;
}
// -----------------------------------------------------------------------------------------------------------
// set up arrays for calender display ------------------------------------------------------------------
$week = Array(EC_LAN_25,EC_LAN_19,EC_LAN_20,EC_LAN_21,EC_LAN_22,EC_LAN_23,EC_LAN_24);
$months = Array(EC_LAN_0,EC_LAN_1,EC_LAN_2,EC_LAN_3,EC_LAN_4,EC_LAN_5,EC_LAN_6,EC_LAN_7,EC_LAN_8,EC_LAN_9,EC_LAN_10,EC_LAN_11);
$calendar_title = "<a class='forumlink' href='".$ec_dir."calendar.php'>".$months[$datearray[mon]-1]." ".$current_year."</a>";
// -----------------------------------------------------------------------------------------------------------
$text = "<div style='text-align:center'>";
if($events){
$text .= EC_LAN_26 . ": ".$events;
}else{
$text .= EC_LAN_27;
}
$start = $monthstart;
$text .= "<br /><br />
<table cellpadding='0' cellspacing='1' style='width:95%' class='fborder'><tr>";
foreach($week as $day){
$text .= "<td class='forumheader' style='text-align:center'><span class='smalltext'>".$day."</span></td>";
}
$text .= "</tr><tr >";
$thismonth = $datearray['mon'];
$thisday = $datearray['mday'];
for($c=0; $c<$firstdayarray['wday']; $c++){
$text .= "<td class='forumheader3' style='text-align:center'><br /></td>";
}
$loop = $firstdayarray['wday'];
for($c=1; $c<=31; $c++){
$dayarray = getdate($start+(($c-1)*86400));
if($dayarray['mon'] == $thismonth){
if($thisday == $c){
$text .= "<td class='indent' style='text-align:center'>";
}else{
$text .="<td class='forumheader3' style='text-align:center'>";
}
if($event_true[($c)]){
$sql -> db_Select("event_cat", "*", "event_cat_id='".$event_true[($c)]."' ");
$icon = $sql -> db_Fetch();
extract($icon);
$img = "<img style='border:0' src='".$ec_dir."images/".$event_cat_icon."' alt='' height='10' width='10'/>";
}else{
$img = $c;
}
$linkut = mktime(0 ,0 ,0 ,$dayarray['mon'], $c, $datearray['year']);
$text .="<a href='".$ec_dir."event.php?".$linkut.".one'>$img</a>";
if($thisday == $c){
}
$text .= "</td>\n";
$loop++;
if($loop == 7){
$loop = 0;
$text .= "</tr><tr>";
}
}
}
for($a=($loop+1); $a<=7; $a++){
$text .="<td> </td>";
}
$text .= "</tr></table></div>";
$ns -> tablerender($calendar_title, $text);
?>
SLUT
config.php
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvsroot/e107/e107/e107_plugins/calendar_menu/config.php,v $
| $Revision: 1.2 $
| $Date: 2004/09/03 18:32:10 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
require_once("../../class2.php");
require_once(e_HANDLER."userclass_class.php");
if(!getperms("P")){ header("location:".e_BASE."index.php"); }
$lan_file = e_PLUGIN."calendar_menu/languages/".e_LANGUAGE.".php";
include(file_exists($lan_file) ? $lan_file : e_PLUGIN."calendar_menu/languages/English.php");
if(IsSet($_POST['updatesettings'])){
$pref['eventpost_admin'] = $_POST['eventpost_admin'];
save_prefs();
$message = EC_LAN_75; // "Calendar settings updated.";
}
require_once(e_ADMIN."auth.php");
if($message){
$ns -> tablerender("", "<div style='text-align:center'><b>$message</b></div>");
}
$text = "<div style='text-align:center'>
<form method='post' action='".e_SELF."'>
<table style='width:85%' class='fborder'>
<tr>
<td style='width:40%' class='forumheader3'>".EC_LAN_76." </td>
<td style='width:60%' class='forumheader3'>".
r_userclass("eventpost_admin", $pref['eventpost_admin'], $mode="off")
."
</td>
</tr>
<tr style='vertical-align:top'>
<td colspan='2' style='text-align:center' class='forumheader'>
<input class='button' type='submit' name='updatesettings' value='".EC_LAN_77."' />
</td>
</tr>
</table>
</form>
</div>";
$ns -> tablerender("<div style='text-align:center'>".EC_LAN_78."</div>", $text);
require_once(e_ADMIN."footer.php");
?>
SLUT
event.php
<?php
/*
+---------------------------------------------------------------+
| e107 website system
| /event.php
|
| ©Steve Dunstan 2001-2002
| http://jalist.com
| stevedunstan@jalist.com
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/
require_once("../../class2.php");
define("PAGE_NAME", "Event List");
if(IsSet($_POST['viewallevents'])){
Header("Location: ".e_PLUGIN."calendar_menu/calendar.php?".$_POST['enter_new_val']);
}
if(IsSet($_POST['doit'])){
Header("Location: ".e_PLUGIN."calendar_menu/event.php?ne.".$_POST['enter_new_val']);
}
$ec_dir = e_PLUGIN."calendar_menu/";
$lan_file = $ec_dir."languages/".e_LANGUAGE.".php";
include(file_exists($lan_file) ? $lan_file : e_PLUGIN."calendar_menu/languages/English.php");
$aj = new textparse();
// enter new category into db ------------------------------------------------------------------------
if(IsSet($_POST['ne_cat_create'])){
if($_POST['ne_new_category'] != "" && $_POST['ne_new_category_icon'] != ""){
$sql -> db_Insert("event_cat", " 0, '".$_POST['ne_new_category']."', '".$_POST['ne_new_category_icon']."' ");
header("location:event.php?".$_POST['qs'].".m1");
}else{
header("location:event.php?".$_POST['qs'].".m3");
}
}
// ----------------------------------------------------------------------------------------------------------
// enter new event into db ----------------------------------------------------------------------------
if(IsSet($_POST['ne_insert']) && USER == TRUE){
if($_POST['ne_event'] != ""){
$ev_start = mktime( $_POST['ne_hour'], $_POST['ne_minute'], 0, $_POST['ne_month'], $_POST['ne_day'], $_POST['ne_year']);
$ev_end = mktime( $_POST['end_hour'], $_POST['end_minute'], 0, $_POST['end_month'], $_POST['end_day'], $_POST['end_year']);
$ev_title = $aj -> formtpa($_POST['ne_title']);
$ev_location = $aj -> formtpa($_POST['ne_location']);
$ev_event = $aj -> formtpa($_POST['ne_event']);
if($_POST['recurring'] == 1){
$rec_m = $_POST['ne_day'];
$rec_y = $_POST['ne_month'];
}else{
$rec_m = "";
$rec_y = "";
}
$sql -> db_Insert("event", " 0, '$ev_start', '$ev_end', '".$_POST['allday']."', '".$_POST['recurring']."', '".time()."', '$ev_title', '$ev_location', '$ev_event', '".USERID.".".USERNAME."', '".$_POST['ne_email']."', '".$_POST['ne_category']."', '".$_POST['ne_thread']."', '$rec_m', '$rec_y' ");
$qs = eregi_replace("ne.", "", $_POST['qs']);
header("location:event.php?".$qs.".m4");
}else{
header("location:event.php?".$ev_start."..m3");
}
}
// ----------------------------------------------------------------------------------------------------------
// update event in db ----------------------------------------------------------------------------------
if(IsSet($_POST['ne_update']) && USER == TRUE){
if($_POST['ne_event'] != ""){
$ev_start = mktime( $_POST['ne_hour'], $_POST['ne_minute'], 0, $_POST['ne_month'], $_POST['ne_day'], $_POST['ne_year']);
$ev_end = mktime( $_POST['end_hour'], $_POST['end_minute'], 0, $_POST['end_month'], $_POST['end_day'], $_POST['end_year']);
$ev_title = $aj -> formtpa($_POST['ne_title']);
$ev_location = $aj -> formtpa($_POST['ne_location']);
$ev_event = $aj -> formtpa($_POST['ne_event']);
if($_POST['recurring'] == 1){
$rec_m = $_POST['ne_day'];
$rec_y = $_POST['ne_month'];
}else{
$rec_m = "";
$rec_y = "";
}
$sql -> db_Update("event", "event_start='$ev_start', event_end='$ev_end', event_allday='".$_POST['allday']."', event_recurring='".$_POST['recurring']."', event_datestamp= '".time()."', event_title= '$ev_title', event_location='$ev_location', event_details='$ev_event', event_contact='".$_POST['ne_email']."', event_category='".$_POST['ne_category']."', event_thread='".$_POST['ne_thread']."', event_rec_m='$rec_m', event_rec_y='$rec_y' WHERE event_id='".$_POST['id']."' ");
$qs = eregi_replace("ed.", "", $_POST['qs']);
header("location:event.php?".$ev_start.".".$qs.".m5");
}else{
header("location:event.php?".$ev_start."..m3");
}
}
// ----------------------------------------------------------------------------------------------------------
require_once(HEADERF);
if(IsSet($_POST['jump'])){
$smarray = getdate(mktime(0,0,0,$_POST['jumpmonth'], 1, $_POST['jumpyear']));
$month = $smarray['mon'];
$year = $smarray['year'];
}else{
$qs = explode(".", $_SERVER['QUERY_STRING']);
$action = $qs[0];
$ds = $qs[1];
if($action == ""){
$nowarray = getdate();
$month = $nowarray['mon'];
$year = $nowarray['year'];
}else{
$smarray = getdate($action);
$month = $smarray['mon'];
$year = $smarray['year'];
}
}
if(IsSet($_POST['confirm'])){
$sql -> db_Delete("event", "event_id='".$_POST['existing']."' ");
$message = EC_LAN_51; //Event Deleted
}
if($action == "de"){
$text = "<div style='text-align:center'>
<b>".EC_LAN_48."</b>
<br /><br />
<form method='post' action='".e_SELF."'>
<input class='button' type='submit' name='cancel' value='".EC_LAN_49."' />
<input class='button' type='submit' name='confirm' value='".EC_LAN_50."' />
<input type='hidden' name='existing' value='".$qs[1]."'>
</form>
</div>";
$ns -> tablerender(EC_LAN_46, $text); // Confirm Delete Event
require_once(FOOTERF);
exit;
}
if(IsSet($_POST['cancel'])){
$message = EC_LAN_47; // Delete Cancelled
}
// set up data arrays ----------------------------------------------------------------------------------
$days = array(EC_LAN_18,EC_LAN_12,EC_LAN_13,EC_LAN_14,EC_LAN_15,EC_LAN_16,EC_LAN_17);
$dayslo = array('1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th', '17th', '18th', '19th', '20th', '21st', '22nd', '23rd', '24th', '25th', '26th', '27th', '28th', '29th', '30th', '31st');
$monthabb = Array(EC_LAN_JAN,EC_LAN_FEB,EC_LAN_MAR,EC_LAN_APR,EC_LAN_MAY,EC_LAN_JUN,EC_LAN_JUL,EC_LAN_AUG,EC_LAN_SEP,EC_LAN_OCT,EC_LAN_NOV,EC_LAN_DEC);
$months = array(EC_LAN_0,EC_LAN_1,EC_LAN_2,EC_LAN_3,EC_LAN_4,EC_LAN_5,EC_LAN_6,EC_LAN_7,EC_LAN_8,EC_LAN_9,EC_LAN_10,EC_LAN_11);
// ----------------------------------------------------------------------------------------------------------
if($qs[2] == "m1"){
$message = EC_LAN_41; //"New category created.";
}else if($qs[2] == "m2"){
$message = EC_LAN_42; //"Event cannot end before it starts.";
}else if($qs[2] == "m3"){
$message = EC_LAN_43; //"You left required field(s) blank.";
}else if($qs[2] == "m4"){
$message = EC_LAN_44; //"New event created and entered into database.";
}elseif($qs[2] == "m5"){
$message = EC_LAN_45; // "Event updated in database.";
}
if(IsSet($message)){
$ns -> tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
}
// enter new event form---------------------------------------------------------------------------------
if($action == "ne" || $action == "ed"){
if(check_class($pref['eventpost_admin']) || getperms('0')){
if($action == "ed"){
$sql -> db_Select("event", "*", "event_id='".$qs[1]."' ");
list($null, $ne_start, $ne_end, $allday, $recurring, $ne_datestamp, $ne_title, $ne_location, $ne_event, $ne_author, $ne_email, $ne_category, $ne_thread) = $sql-> db_Fetch();
$smarray = getdate($ne_start);
$ne_day = $smarray['mday'];
$ne_month = $smarray['mon'];
$ne_year = $smarray['year'];
$ne_hour = $smarray['hours'];
$ne_minute = $smarray['minutes'];
$smarray = getdate($ne_end);
$end_day = $smarray['mday'];
$end_month = $smarray['mon'];
$end_year = $smarray['year'];
$end_hour = $smarray['hours'];
$end_minute = $smarray['minutes'];
}else{
$smarray = getdate($qs[1]);
$month = $smarray['mon'];
$year = $smarray['year'];
$ne_day = $smarray['mday'];
$ne_month = $smarray['mon'];
$ne_year = $smarray['year'];
$ne_hour = $smarray['hours'];
$ne_minute = $smarray['minutes'];
$end_day = $smarray['mday'];
$end_month = $smarray['mon'];
$end_year = $smarray['year'];
$end_hour = $smarray['hours'];
$end_minute = $smarray['minutes'];
}
$text = "<form method='post' action='".$_SERVER['PHP_SELF']."' name='linkform'>
<table style='width:580px' class='fborder' align='center'>";
if($action == "ed"){
$caption = EC_LAN_66; // edit Event
}elseif($action == "ne"){
$caption = EC_LAN_28; // Enter New Event
}else{
$caption = "Calendar";
}
$text .= "
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_72." </td>
<td class='forumheader3' style='width:80%'>
".EC_LAN_67." <select name='ne_day' class='tbox'>";
for($count=1; $count<=31; $count++){
if($count == $ne_day){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
<select name='ne_month' class='tbox'>";
for($count=1; $count<=12; $count++){
if($count == $ne_month){
$text .= "<option value='$count' selected>".$months[($count-1)]."</option>";
}else{
$text .= "<option value='$count'>".$months[($count-1)]."</option>";
}
}
$text .= "</select>
<select name='ne_year' class='tbox'>";
for($count=2002; $count<=2022; $count++){
if($count == $ne_year){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select></br> ".EC_LAN_73."
<select name='end_day' class='tbox'>";
for($count=1; $count<=31; $count++){
if($count == $end_day){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
<select name='end_month' class='tbox'>";
for($count=1; $count<=12; $count++){
if($count == $end_month){
$text .= "<option value='$count' selected>".$months[($count-1)]."</option>";
}else{
$text .= "<option value='$count'>".$months[($count-1)]."</option>";
}
}
$text .= "</select>
<select name='end_year' class='tbox'>";
for($count=2002; $count<=2022; $count++){
if($count == $end_year){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_71 ." </td>
<td class='forumheader3' style='width:80%'>
".EC_LAN_67." <select name='ne_hour' class='tbox'>";
for($count="00"; $count<="23"; $count++){
if($count == $ne_hour){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
<select name='ne_minute' class='tbox'>";
for($count="00"; $count<="59"; $count++){
if($count == $ne_minute){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
".EC_LAN_73." <select name='end_hour' class='tbox'>";
for($count="00"; $count<="23"; $count++){
if($count == $end_hour){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>
<select name='end_minute' class='tbox'>";
for($count="00"; $count<="59"; $count++){
if($count == $end_minute){
$text .= "<option selected>".$count."</option>";
}else{
$text .= "<option>".$count."</option>";
}
}
$text .= "</select>";
if($allday == 1){
$text .= "<br><input type='checkbox' name='allday' value='1' checked>";
}else{
$text .= "<br><input type='checkbox' name='allday' value='1'>";
}
$text .= EC_LAN_64."
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_65 ."</td>
<td class='forumheader3' style='width:80%'>";
if($recurring == 1){
$text .= "<input type='checkbox' name='recurring' value='1' checked>";
}else{
$text .= "<input type='checkbox' name='recurring' value='1'>";
}
$text .= EC_LAN_63 . "
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_70 ."</td>
<td class='forumheader3' style='width:80%'>
<input class='tbox' type='text' name='ne_title' size='75' value='$ne_title' maxlength='200' />
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_52." </td>
<td class='forumheader3' style='width:80%'>
<select name='ne_category' class='tbox'>";
$sql -> db_Select("event_cat");
while($row = $sql -> db_Fetch()){
extract($row);
if($ne_category == $event_cat_id){
$text .= "<option value='$event_cat_id' selected>".$event_cat_name."</option>";
}else{
$text .= "<option value='$event_cat_id'>".$event_cat_name."</option>";
}
}
$text .= "</select>
</td>
</tr>";
if(ADMIN == TRUE && $action != "ed"){
$imagelist = "";
$handle=opendir(e_PLUGIN."calendar_menu/images/");
while ($file = readdir($handle)){
if($file != "." && $file != ".." && $file != "templates" && $file != "icon_ec.png" && $file != "shared" && $file != "/"){
$imagelist[] = $file;
}
}
closedir($handle);
$text .="<script type=\"text/javascript\">
function addtext(sc){
document.linkform.ne_new_category_icon.value = sc;
}
</script>";
$text .= "<tr>
<td class='forumheader3' style='width:20%' rowspan='2'>".EC_LAN_53." </td>
<td class='forumheader3' style='width:80%'>".EC_LAN_54." <input class='tbox' type='text' name='ne_new_category' size='30' value='$ne_new_category' maxlength='100' /> ";
$text .="</tr><tr><td class='forumheader3' style='width:80%'>".EC_LAN_55;
$text .=" <input class='tbox' style='width:150px' type='text' name='ne_new_category_icon' />";
$text .=" <input class='button' type ='button' style=''width: 35px'; cursor:hand' size='30' value='Choose' onClick='expandit(this)'>";
$text .="<div style='display:none' style=&{head};>";
while(list($key,$icons) = each($imagelist)){
$text .= "<a href='java script:addtext(\"$icons\")'><img src='".$ec_dir."images/".$icons."' style='border:0px' alt='' /></a> ";
}
/*
$text .="<select class='tbox' name='ne_new_category_icon'>";
$c=0;
while($imagelist[$c]){
$text .= "<option>".$imagelist[$c]."</option>";
$c++;
}
$text .="</select>";
*/
$text .= "</div>";
$text .="<div style='text-align:center'><input class='button' type='submit' name='ne_cat_create' value='".EC_LAN_56."' /></div>";
}
$text .= "</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_32." </td>
<td class='forumheader3' style='width:80%'>
<input class='tbox' type='text' name='ne_location' size='60' value='$ne_location' maxlength='200' />
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_57." </td>
<td class='forumheader3' style='width:80%'>
<textarea class='tbox' name='ne_event' cols='59' rows='8'>$ne_event</textarea>
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_58." </td>
<td class='forumheader3' style='width:80%'>
<input class='tbox' type='text' name='ne_thread' size='60' value='$ne_thread' maxlength='100' />
</td>
</tr>
<tr>
<td class='forumheader3' style='width:20%'>".EC_LAN_59." </td>
<td class='forumheader3' style='width:80%'>
<input class='tbox' type='text' name='ne_email' size='60' value='$ne_email' maxlength='150' />
</td></tr>
<tr>
<td class='forumheader' colspan='2' style='text-align:center'>";
if($action == "ed"){
$text .= "<input class='button' type='submit' name='ne_update' value='".EC_LAN_60."' />
<input type='hidden' name='id' value='".$qs[1]."'>";
}else{
$text .= "<input class='button' type='submit' name='ne_insert' value='".EC_LAN_28."' />";
}
$text .= "</td>
</tr>
</table>
<input type='hidden' name='qs' value='".$_SERVER['QUERY_STRING']."'>
<form>";
// echo $text;
$ns -> tablerender($caption, $text);
require_once(FOOTERF);
exit;
}else{
header("location:".e_PLUGIN."calendar_menu/event.php");
exit;
}
}
// ----------------------------------------------------------------------------------------------------------
// show events-------------------------------------------------------------------------------------------
// get first and last days of month in unix format---------------------------------------------------
$monthstart= mktime(0,0,0,$month,1,$year);
$firstdayarray = getdate($monthstart);
$monthend = mktime(0,0,0,$month+1,0,$year);
$lastdayarray = getdate($monthend);
// ----------------------------------------------------------------------------------------------------------
// echo current month with links to previous/next months ----------------------------------------
$prevmonth = ($month-1);
$prevyear = $year;
if($prevmonth == 0){
$prevmonth = 12;
$prevyear = ($year-1);
}
$previous = mktime(0,0,0,$prevmonth,1, $prevyear);
$nextmonth = ($month+1);
$nextyear = $year;
if($nextmonth == 13){
$nextmonth = 1;
$nextyear = ($year+1);
}
$next = mktime(0,0,0,$nextmonth,1, $nextyear);
/*
echo "<table style='width:100%' class='fborder'>
<tr>
<td class='forumheader' style='width:15%; text-align:left'><span class='defaulttext'><a href='event.php?".$previous."'><< ".$months[($prevmonth-1)]."</a></span></td>
<td class='fcaption' style='width:70%; text-align:center' class='mediumtext'><b>".$months[($month-1)]." ".$year."</b></td>
<td class='forumheader' style='width:15%; text-align:right'><span class='defaulttext'><a href='event.php?".$next."'> ".$months[($nextmonth-1)]." >></a></span> </td>
</tr>
</table>";
*/
// added by Cameron
$todayarray = getdate();
$current_month = $todayarray['mon'];
$current_year = $todayarray['year'];
$current = mktime(0,0,0,$current_month, 1, $current_year);
$prop = mktime(0,0,0,$month, 1, $year);
$next = mktime(0,0,0,$nextmonth,1, $nextyear);
$py = $year-1;
$prevlink = mktime(0,0,0,$month,1, $py);
$ny = $year+1;
$nextlink = mktime(0,0,0,$month,1, $ny);
$text2 = "<table style='width:100%' class='fborder'>
<tr>
<td class='forumheader' style='width:18%; text-align:left'><span class='defaulttext'><a href='".e_SELF."?".$previous."'><< ".$months[($prevmonth-1)]."</a></span></td>
<td class='fcaption' style='width:64%; text-align:center' class='mediumtext'><b>".$months[($month-1)]." ".$year."</b></td>
<td class='forumheader' style='width:185%; text-align:right'><span class='defaulttext'><a href='".e_SELF."?".$next."'> ".$months[($nextmonth-1)]." >></a></span> </td>
</tr><tr><td colspan='3'></td></tr><tr>
<td class='forumheader' style='text-align:left'><a href='event.php?".$prevlink."'><< ".$py."</a></td>
<td class='fcaption' style='text-align:center'>";
for ($ii = 0; $ii < 13; $ii++)
{ $m = $ii+1;
$monthjump= mktime(0,0,0,$m,1,$year);
$text2 .= "<a class='forumlink' href=\"event.php?".$monthjump."\">".$monthabb[$ii]."</a>  "; }
$text2 .= "<td class='forumheader' style='text-align:right'><a href='event.php?".$nextlink."'>".$ny." >></a></td></td></tr></table>";
// ================
//------------my test stuff------------------------------------------------------
$text2 .= "<div style='text-align:center'>";
$text2 .= "<br /><table border='0' cellpadding='2' cellspacing='3' class='forumheader3'>
<tr><td align=right><form method=post action=".e_SELF."?".e_QUERY.">
<select name='event_cat_ids' class='tbox' style='width:140px; '>
<option class='tbox' value='all'>All</option>";
$event_cat_id = !isset($_POST['event_cat_ids'])? NULL : $_POST['event_cat_ids'];
$sql -> db_Select("event_cat");
while($row = $sql -> db_Fetch()){
extract($row);
if($event_cat_id == $_POST['event_cat_ids']){
$text2 .= "<option class='tbox' value='$event_cat_id' selected>".$event_cat_name."</option>";
}else{
$text2 .= "<option value='$event_cat_id'>".$event_cat_name."</option>";
}
}
$text2 .= "</td></select><td align='center'>
<input class='button' type='submit' style='width:140px;' name='viewallevents' value='View Calendar'>
</td></tr>
<tr><td align='right'><input type='hidden' name='do' value='vc'>
<input class='button' type='submit' style='width:140px;' name='viewcat' value='View Category'>
</td><td align=center><input type='hidden' name='enter_new_val' value='".$prop."'> ";
if(check_class($pref['eventpost_admin']) || getperms('0')){ // start no admin preference
$text2 .= "<input class='button' type='submit' style='width:140px;' name='doit' value='Enter New Event'>";
}
$text2 .= "</form></tr></table><br />";
//--------------------------------------------------------------------------------
/*
$text2 .= "
<form method='post' action='".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."'>
".EC_LAN_34."
<select name='jumpmonth' class='tbox'>";
$count = 0;
while($months[$count]){
$text2 .= "<option value='".($count+1)."'>".$months[$count]."</option>";
$count++;
}
$text2 .= "</select>
<select name='jumpyear' class='tbox'>";
for($count=2002; $count<=2022; $count++){
$text2 .= "<option>".$count."</option>";
}
$text2 .= "</select>
<input class='button' type='submit' name='jump' value='".EC_LAN_61."' />
</form>";
##### Check for access.
if($pref['eventpost_admin'][1] == 1 ){ // start admin preference activated.
if(ADMIN == TRUE){ $text2 .= "<br /><div class='button' style='width:130px; height:15px'>- <a href='event.php?ne.".$prop."'>".EC_LAN_28."</a> -</div>"; }
} // end admin preference activated.
if(!$pref['eventpost_admin'][1] == 1 ){ // start no admin preference
if(USER == TRUE){ $text2 .= "<br /><span class='button' style='width:130px; height:15px'>- <a href='event.php?ne.".$prop."'>".EC_LAN_28."</a> -</span>";}
} // end no admin preference
if($month != $current_month || $year != $current_year){
$text2 .= " <span class='button' style='width:130px; height:15px'>- <a href='event.php?$current'>".EC_LAN_40."</a> -</span>";
}
$text2 .= "</div><br />";
*/
// extra stuff for Category.
$sql2 = new db;
$sql2 -> db_Select("event_cat", "*", "event_cat_id='".$event_true[($c)]."' ");
$event_cat = $sql2 -> db_Fetch();
extract($event_cat);
// get events from current month----------------------------------------------------------------------
if($_POST['event_cat_ids'] && $_POST['event_cat_ids'] !="all"){
$evcat_id = $_POST['event_cat_ids'];
$sql -> db_Select("event", "*", "(event_start>='$monthstart' AND event_start<= '$monthend' AND event_category='$evcat_id') OR (event_rec_y='$month' AND event_category='$evcat_id') ORDER BY event_start ASC");
}else{
$sql -> db_Select("event", "*", "(event_start>='$monthstart' AND event_start<= '$monthend' ) OR (event_rec_y='$month' ) ORDER BY event_start ASC");
}
$events = $sql -> db_Rows();
//$text2 .= "There are $events event(s) this month<br />";
$sql2 = new db;
$text2 .= "<table style='width:620px' class='fborder'>";
while($row = $sql -> db_Fetch()){
extract($row);
// $text2 .= $event_id.". ".$event_details;
$evf = getdate($event_start);
$tmp = $evf['mday'];
$event_true[$tmp] = $event_category;
$sql2 -> db_Select("event_cat", "*", "event_cat_id='".$event_category."' ");
$icon = $sql2 -> db_Fetch();
extract($icon);
if($event_allday == 0){
if($event_start > $event_end){
$event_end = $event_start;
}
}
$startds = ereg_replace(" 0", " ", date("l d F Y - H:i:s", $event_start));
$endds = ereg_replace(" 0", " ", date("l d F Y - H:i:s", $event_end));
if($event_recurring == 1){
$tmp = getdate($event_start);
$tmpyear = $tmp['year'];
$startds = str_replace("$tmpyear", $year, $startds);
$endds = str_replace("$tmpyear", $year, $endds);
}
$lp = explode(".", $event_author);
if(ereg("[0-9]+", $lp[0])){
$event_author_id = $lp[0];
$event_author_name = $lp[1];
}
################## Changed by Cameron
if ($event_cat_icon){
$text2 .= "<tr>
<td colspan='2' class='fcaption'><img style='border:0' src='".$ec_dir."images/".$event_cat_icon."' alt='' /> ".$event_title."</td>";
}
else {
$text2 .= "<tr>
<td colspan='2' class='fcaption'>".$event_title."</td>";
}
############# end Change by Cameron.
$text2 .= "</tr>
<tr>";
if($event_allday){
$text2 .= "<td colspan='2' class='forumheader'><b>".EC_LAN_68."</b>: $startds</td>";
}else if($startds == $endds){
$text2 .= "<td colspan='2' class='forumheader'><b>".EC_LAN_29."</b>: ".$startds."</td>";
}else{
$text2 .= "<td style='width:50%' class='forumheader'><b>".EC_LAN_29."</b>: ".$startds."</td>
<td style='width:50%' class='forumheader'><b>".EC_LAN_69."</b>: ".$endds."</td>";
}
$text2 .= "</tr>
<tr>
<td colspan='2' class='forumheader3'>".
$event_details."
</td>
</tr>
<tr>";
########## Changed by Cameron 2
if ($event_cat_icon){
$text2 .= "
<td style='width:50%' class='forumheader3'><b>".EC_LAN_30."</b> <img style='border:0' src='".$ec_dir."images/".$event_cat_icon."' alt='' width='12' height='12' /> ".$event_cat_name."</td>";
}
else {
$text2 .= "
<td style='width:50%' class='forumheader3'><b>".EC_LAN_30."</b> ".$event_cat_name."</td>";
}
$text2 .= "<td style='width:50%' class='forumheader3'><b>".EC_LAN_32."</b> ";
if($event_location == ""){
$text2 .= EC_LAN_38;
# End of Changed by Cameron 2.
}else{
$text2 .= $event_location."</td>";
}
$text2 .= "</tr>
<tr>
<td style='width:33%' class='forumheader3'><b>".EC_LAN_31."</b> <a href='".e_BASE."user.php?id.".$event_author_id."'>".$event_author_name."</a></td>
<td style='width:33%' class='forumheader3'><b>".EC_LAN_33."</b> ";
if($event_contact == ""){
$text2 .= EC_LAN_38; // Not Specified ;
}else{
$text2 .= "<a href='mailto:".$event_contact."'>".$event_contact."</a></td>";
}
$text2 .= "</tr>
<tr>
<td style='width:50%' class='forumheader'>".
($event_thread ? "<span class='smalltext'><a href='$event_thread'><img src='".e_IMAGE."forum/e.png' alt='' style='border:0' width='16' height='16' align='absmiddle'> ".EC_LAN_39."</a></span>" : " ")."
</td>
<td style='width:50%' class='forumheader' style='text-align:right'>";
if(USERNAME == $event_author_name || (ADMIN == TRUE && ADMINPERMS <= 2)){
$text2 .= "<span class='smalltext'>
[ <a href='event.php?ed.".$event_id."'>".EC_LAN_35."</a> ] [ <a href='event.php?de.".$event_id."'>".EC_LAN_36."</a> ]
</span>";
}
$text2 .= "</td>
</tr>";
}
$text2 .= "</table>";
// -----------------------------------------------------------------------------------------------------------
$nextmonth = mktime(0,0,0,$month+1,1,$year);
$sql -> db_Select("event", "*", "event_start>='$nextmonth' ORDER BY event_start ASC LIMIT 0,10");
$num = $sql -> db_Rows();
$text2 .= "<br /><table style='width:620px' class='fborder'>
<tr>
<td colspan='2' class='forumheader'><span class='defaulttext'>".EC_LAN_62."</span></td>";
if($num != 0){
while($events = $sql -> db_Fetch()){
extract($events);
$startds = ereg_replace(" 0", " ", date("l d F Y @ H:i:s", $event_start));
$text2 .= "<tr><td style='width:35%; vertical-align:top' class='forumheader3'><a href='event.php?".$event_start."'>".$startds."</a></td>
<td style='width:65%' class='forumheader3'>".$event_details."</td></tr>";
}
}else{
$text2 .= "<tr><td colspan='2' class='forumheader3'>".EC_LAN_37."</td></tr>";
}
$text2 .= "</table>";
$caption = EC_LAN_80; // "Event List";
$ns -> tablerender($caption, $text2);
require_once(FOOTERF);
?>
SLUT
plugin.php
<?php
/*
+---------------------------------------------------------------+
| e107 website system
|
| ©Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
| $Id: plugin.php,v 1.3 2004/09/03 18:32:10 e107coders Exp $
+---------------------------------------------------------------+
*/
// Plugin info -------------------------------------------------------------------------------------------------------
$lan_file = e_PLUGIN."calendar_menu/languages/".e_LANGUAGE.".php";
@require_once(file_exists($lan_file) ? $lan_file : e_PLUGIN."calendar_menu/languages/English.php");
$eplug_name = "Event Calendar";
$eplug_version = "3.2";
$eplug_author = "jalist / cameron";
$eplug_logo = "button.png";
$eplug_url = "http://e107.org";
$eplug_email = "jalist@e107.org";
$eplug_description = "This plugin is a fully featured event calendar with calendar menu.";
$eplug_compatible = "e107v6";
$eplug_readme = ""; // leave blank if no readme file
// Name of the plugin's folder -------------------------------------------------------------------------------------
$eplug_folder = "calendar_menu";
// Mane of menu item for plugin ----------------------------------------------------------------------------------
$eplug_menu_name = "calendar_menu";
// Name of the admin configuration file --------------------------------------------------------------------------
$eplug_conffile = "config.php";
// Icon image and caption text ------------------------------------------------------------------------------------
$eplug_icon = $eplug_folder."/images/icon_ec.png";
$eplug_caption = EC_LAN_81; // "Configure Event Calendar";
// List of preferences -----------------------------------------------------------------------------------------------
$eplug_prefs = array(
"eventpost_admin" => 0
);
// List of table names -----------------------------------------------------------------------------------------------
$eplug_table_names = array(
"event",
"event_cat"
);
// List of sql requests to create tables -----------------------------------------------------------------------------
$eplug_tables = array(
"CREATE TABLE ".MPREFIX."event (
event_id int(11) unsigned NOT NULL auto_increment,
event_start int(10) NOT NULL default '0',
event_end int(10) NOT NULL default '0',
event_allday tinyint(1) unsigned NOT NULL default '0',
event_recurring tinyint(1) unsigned NOT NULL default '0',
event_datestamp int(10) unsigned NOT NULL default '0',
event_title varchar(200) NOT NULL default '',
event_location text NOT NULL,
event_details text NOT NULL,
event_author varchar(100) NOT NULL default '',
event_contact varchar(200) NOT NULL default '',
event_category smallint(5) unsigned NOT NULL default '0',
event_thread varchar(100) NOT NULL default '',
event_rec_m tinyint(2) unsigned NOT NULL default '0',
event_rec_y tinyint(2) unsigned NOT NULL default '0',
PRIMARY KEY (event_id)
) TYPE=MyISAM;",
"CREATE TABLE ".MPREFIX."event_cat (
event_cat_id smallint(5) unsigned NOT NULL auto_increment,
event_cat_name varchar(100) NOT NULL default '',
event_cat_icon varchar(100) NOT NULL default '',
PRIMARY KEY (event_cat_id)
) TYPE=MyISAM;");
// Create a link in main menu (yes=TRUE, no=FALSE) -------------------------------------------------------------
$eplug_link = TRUE;
$eplug_link_name = EC_LAN_83; // "Calendar";
$ec_dir = e_PLUGIN."calendar_menu/";
$eplug_link_url = "".$ec_dir."calendar.php";
// Text to display after plugin successfully installed ------------------------------------------------------------------
$eplug_done = EC_LAN_82; // "To activate please go to your menus screen and select the calendar_menu into one of your menu areas.";
// upgrading ... //
$upgrade_add_prefs = "";
$upgrade_remove_prefs = "";
$upgrade_alter_tables = "";
$eplug_upgrade_done = "";
?>
SLUT
Håber der er en der kan finde ud af det
vil gerne ha skriften hvid
