if ($record["weburl"] != "") { print "{$email}, {$record[weburl]}\n"; } else { print "{$email}\n"; } } else { if ($record["weburl"] != "") { print "{$record[weburl]}\n"; } } } } # Were dates passed as a parameter? if ($_REQUEST["dates"]) { # Parse the "dates" value $dates = repeatdates($_REQUEST["dates"]); # Extract th starting and ending dates from the list $startdate = $dates[1]["timestamp"]; $sqlstart = $dates[1]["sqldate"]; for ($i = 1; $dates[$i]["timestamp"]; $i++) { $enddate = $dates[$i]["timestamp"]; $sqlend = $dates[$i]["sqldate"]; } } else { # Choose the starting date. This is always the last Friday in either # the current month or the preceding month. $now = getdate(); $noon = $now[0] + (12 - $now["hours"]) * 3600; # approximately noon today $friday = $noon - 86400 * ($now["wday"] + 2); $prevbonb = $friday;
<h1>Print Description Editor</h1> This page allows you to edit print descriptions before the print deadline. This is also where you go to export the event data to a desktop publisher. <p> <center> <table> <tr> <td valign=middle>Date range:</td> <td align=left valign=middle> <form action="admreview.php"> <?php print "<input type=text size=30 name=\"dates\" value=\"" . $_REQUEST["dates"] . "\" onChange=\"submit()\">\n"; if ($_REQUEST["dates"] == "") { print "</td></tr><tr><td></td><td>Enter the dates of the<br>events you want to edit.\n"; } else { $daylist = repeatdates($_REQUEST["dates"]); if ($daylist[365]) { $daylist = array(); } if (!$daylist[1]) { print "</td></tr><tr><td></td><td><font color=red>Invalid date range.</font><br>Date ranges are typically<br>a month name, or of the<br>form \"MM/DD - MM/DD\""; } } ?> </form> </td> </tr> <tr> <td></td> <td> <table>
$dateradio = $_REQUEST["dateradio"]; $range = $_REQUEST["range"]; $dateerror = ""; switch ($dateradio) { case "past": $startdate = ""; $enddate = date("Y-m-d", strtotime("yesterday")); break; case "future": $startdate = date("Y-m-d", strtotime("today")); $enddate = ""; break; case "range": $dateradio = "range"; $range = $_REQUEST["range"]; $dates = repeatdates($range); switch ($dates["datestype"]) { case "one": case "consecutive": $startdate = $dates[1]["sqldate"]; for ($i = 1; $dates[$i + 1]; $i++) { } $enddate = $dates[$i]["sqldate"]; $range = $dates["canonical"]; break; case "scattered": $startdate = ""; $enddate = ""; $dateerror = "Can't search on scattered dates"; break; default:
$timedetails = $_REQUEST['timedetails']; $locname = safeinput($_REQUEST['locname']); $address = safeinput($_REQUEST['address']); $addressverified = $_REQUEST['addressverified']; $locdetails = safeinput($_REQUEST['locdetails']); $area = $_REQUEST['area']; $id = unobscure($_REQUEST['edit']); $comment = wordwrap(stripslashes($_REQUEST['comment']), 60); $highlight = $_REQUEST['highlight']; if ($highlight == '1') { $highlight = 1; } else { $highlight = 0; } # parse the $dates value, and convert it to a list of specific dates $daylist = repeatdates($dates); # retrieve the old image name (if any), and review status $oldimage = ''; $record = ''; if ($id) { $result = mysql_query("SELECT * FROM calevent WHERE id={$id}", $conn) or die('Retrieveing old image name, ' . mysql_error()); $record = mysql_fetch_array($result); $oldimage = $record['image']; $t = pathinfo("{$oldimage}"); $oldext = $t['extension']; $oldreview = $t['review']; } # fetch the new image parameter $imgchange = $_REQUEST['imgchange']; if ($imgchange == 'delete') { $changeimage = true;
for ($i = 1; $tokens[$i]; $i++) { print ($i == 1 ? "" : ", ") . tokenstr($tokens[$i]); } print "]</td></tr>"; $rules = daterules($tokens); print "<tr><td valign=top>Rules:</td><td>"; dumprules($rules); print "</td><tr>"; print "<tr><td>String:</td><td>"; print daterulestr($rules); print "</td><tr>"; print "<tr><td>Canonical:</td><td>"; print repeatcanonical($rules); print "</td><tr>"; print "<tr><td valign=top>Actual Dates:</td><td>"; $dates = repeatdates($_REQUEST["repeat"]); for ($i = 1; $dates[$i]; $i++) { print $dates[$i]["sqldate"] . " "; print date("l, F d, Y", $dates[$i]["timestamp"]) . "<br>\n"; } print "</td><tr>"; print "</table>"; } ?> <hr> <h2>Email mangler</h2> <form action="repeattest.php"> Email: <input type=text size=40 name="email" value="<?php print $_REQUEST["email"]; ?> ">