Background: Looking to put local marine radio cruisers net online. Net being received via SDR piped to sox for encoding as mp3 file. File uploaded to server in dedicated directory (/data), naming convention (YY)(MM)(DD).mp3 At this time the project is in test mode, and files are not always recorded or uploaded daily
Goal: Server side (PHP) calendar script which will parse the /data directory for an array and recolor the calendar cells background for dates matching the files naming convention. Clicking on a highlighted cell will open the associated file.
Status: Have very simple (but adequate?) calendar script with no exterior libraries or css (code follows). Php experience limited and rusty. Unsure how and where to integrate scandir() function and other required bits to achieve goal. Assistance appreciated.
[code]
Boot Key Calendar Test <?php $monthNames = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); if (!isset($_REQUEST["month"])) $_REQUEST["month"] = date("n"); if (!isset($_REQUEST["year"])) $_REQUEST["year"] = date("Y"); $cMonth = $_REQUEST["month"]; $cYear = $_REQUEST["year"]; $prev_year = $cYear; $next_year = $cYear; $prev_month = $cMonth-1; $next_month = $cMonth+1; if ($prev_month == 0 ) { $prev_month = 12; $prev_year = $cYear - 1; } if ($next_month == 13 ) { $next_month = 1; $next_year = $cYear + 1; } ?>
|
||||||||||
|
As a “noob” unable to post link to working example on server… Sorry
TIA
David
Onboard S/V Solitaire
Boot Key Harbor