aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/announcements/index.php3
-rw-r--r--admin/calendar/functions.php22
-rw-r--r--admin/calendar/index.php2
-rw-r--r--admin/images/image.pngbin0 -> 4733 bytes
-rw-r--r--admin/navigation/index.php2
-rw-r--r--admin/news/index.php24
-rw-r--r--admin/settings/index.php2
-rw-r--r--blocks/mini_calendar/functions.php20
8 files changed, 62 insertions, 13 deletions
diff --git a/admin/announcements/index.php b/admin/announcements/index.php
index 17b6003..6b0874e 100644
--- a/admin/announcements/index.php
+++ b/admin/announcements/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * Xoma Content Management System
+ * Bayonet Content Management System
* Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
*
* This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@
?>
<div style="text-align:left;"><h2>- Edit Announcements</h2></div>
- -Maybe see if this can go into more depth (ie. selecting whether to display announcements or not and on what pages)<br /><br />
<?php
diff --git a/admin/calendar/functions.php b/admin/calendar/functions.php
index d0c13ec..8d1d6a1 100644
--- a/admin/calendar/functions.php
+++ b/admin/calendar/functions.php
@@ -83,7 +83,7 @@
<table width="100%"><tr><td>
<h3>Events for: <?php echo date_format(date_create($date),'F jS, Y'); ?></h3>
</td><td align="right">
- <a href="?op=calendar&create=true&date=<?php echo $date; ?>"><img src="images/add.gif" /> Add New Event</a>
+ <a href="?op=calendar&create=true&date=<?php echo $date; ?>"><img src="images/add.png" /> Add New Event</a>
</td></tr></table>
<?php
@@ -100,7 +100,7 @@
<tr>
<td><strong><?php echo $time." - ".$row['title']; ?></strong></td>
- <td><span style="border:1px solid black;background-color:#<?php echo $row['color'];?>;">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
+ <td><span style="border:1px solid black;background-color:<?php echo $row['color'];?>;">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
<td>
<a href="?op=calendar&month=<?php echo $_GET['month']; ?>&year=<?php echo $_GET['year']; ?>&edit=<?php echo $row['event_id'];?>">Edit</a>
&nbsp;|&nbsp;
@@ -140,6 +140,22 @@
echo $date_arr['year']; */
global $db;
+
+ if(isset($_POST['processed'])){
+ $title = addslashes($_POST['title']);
+ $text = addslashes($_POST['text']);
+ $year = addslashes($_POST['year']);
+ $month = addslashes($_POST['month']);
+ $day = addslashes($_POST['day']);
+ $time = addslashes($_POST['time']);
+ $color = addslashes($_POST['color']);
+
+ $date = date("Y-m-d", mktime(0, 0, 0, $month, $day, $year));
+
+$db->Query("UPDATE `bayonet_events` SET `title` = '$title', `text` = '$text', `color` = '$color', `date` = '$date', `time` = '$time' WHERE `event_id` ='$event_id' LIMIT 1");
+
+ }
+
$result = $db->Query("SELECT * FROM `bayonet_events` WHERE `event_id` = $event_id LIMIT 1");
while(($row = $db->Fetch($result))!=false)
{
@@ -152,6 +168,7 @@
<tr><th>Title</th><td><input type="text" name="title" value="<?php echo $event['title']; ?>" /></td></tr>
<tr><th>Color</th><td><input type="text" name="color" value="<?php echo $event['color']; ?>" /></td></tr>
<tr><th>Date</th><td><?php SelectDate($event['date']); ?></td></tr>
+ <tr><th>Time</th><td><input type="text" name="time" value="<?php echo substr($event['time'],0,-3); ?>" maxlength="5" size="5" /></td></tr>
<tr><th>Text</th><td><textarea id="markItUp" rows="30" cols="80" name="text"><?php echo $event['text']; ?></textarea></td>
<tr><th colspan="2"><input type="submit" name="processed" value="Submit" /></th></tr>
</table>
@@ -192,6 +209,7 @@
echo "New event, '$title', has been added.\n";
+ PageRedirect(2,"?op=calendar");
//die, because we have completed what we wanted to do.
return;
}
diff --git a/admin/calendar/index.php b/admin/calendar/index.php
index 64798e3..a61424f 100644
--- a/admin/calendar/index.php
+++ b/admin/calendar/index.php
@@ -51,7 +51,7 @@ include $basedir.'calendar/functions.php';
<table class="panel" width="100%">
<tr>
<td style="width:325px; vertical-align:top; text-align:center;">
- <a href="?op=calendar&create=true"><img src="images/add.gif" /> Add New Event</a><br /><br />
+ <a href="?op=calendar&create=true"><img src="images/add.png" /> Add New Event</a><br /><br />
<?php PrintCalendar(); ?>
Click on a day to add/edit/delete events
</td>
diff --git a/admin/images/image.png b/admin/images/image.png
new file mode 100644
index 0000000..865b923
--- /dev/null
+++ b/admin/images/image.png
Binary files differ
diff --git a/admin/navigation/index.php b/admin/navigation/index.php
index f50ef55..e2179a1 100644
--- a/admin/navigation/index.php
+++ b/admin/navigation/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * Xoma Content Management System
+ * Bayonet Content Management System
* Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
*
* This program is free software: you can redistribute it and/or modify
diff --git a/admin/news/index.php b/admin/news/index.php
index e69de29..6448e4b 100644
--- a/admin/news/index.php
+++ b/admin/news/index.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+}
+ ?> \ No newline at end of file
diff --git a/admin/settings/index.php b/admin/settings/index.php
index 947bba9..875abc8 100644
--- a/admin/settings/index.php
+++ b/admin/settings/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * Xoma Content Management System
+ * Bayonet Content Management System
* Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
*
* This program is free software: you can redistribute it and/or modify
diff --git a/blocks/mini_calendar/functions.php b/blocks/mini_calendar/functions.php
index 06ce910..3291e6b 100644
--- a/blocks/mini_calendar/functions.php
+++ b/blocks/mini_calendar/functions.php
@@ -132,7 +132,7 @@
$date = time();
date_default_timezone_set("America/New_York"); //EASTERN TIME ZONE
-
+
//GET values for month and year
$month = "";
$year = "";
@@ -252,14 +252,16 @@
$isEvent=false;
global $db;
- $result = $db->Query("SELECT title,color FROM `bayonet_events` WHERE `date` = '$sqlDate' LIMIT 1");
+ $result = $db->Query("SELECT title,color FROM `bayonet_events` WHERE `date` = '$sqlDate' ORDER BY `date` DESC");
while(($row = $db->Fetch($result))!=false)
{
$isEvent = true;
- }
-
+ if($day_num == $today){
+ $todaysEvents[] = $row;
+ }
+ }
if($day_num == $today && $isEvent==true){
- echo '<div class="eventtoday">'.$day_num.'</div>';
+ echo '<div class="eventtoday">'.$day_num.'</div>';
}else if($day_num == $today && $isEvent==false){
echo '<div class="monthtoday">'.$day_num.'</div>';
}else if($day_num != $today && $isEvent==true){
@@ -295,7 +297,13 @@
</table>
</center>
<?php
-
+ //list events for today
+ if(count($todaysEvents)>0){
+ echo "<h3>Today's Events</h3>";
+ foreach($todaysEvents as $event){
+ echo "<span style=\"background-color: {$event['color']}\">&nbsp;&nbsp;</span>&nbsp;{$event['title']}<br />";
+ }
+ }
}
?> \ No newline at end of file