session_start(); include('inc/db.php'); connect_comments(); ######################################################################################## echo "
No Cases are currently running
"; exit; } #--------------COMMENTS STATUS---------------------------------------------------------- #--------------COMMENTS STATUS---------------------------------------------------------- #----------------------- GET DATE RANGE FOR DROP DOWN BOXES --------------------------------- $q_get_date = mysql_query("SELECT DATE_FORMAT(StartDate, '%c')AS Month, DATE_FORMAT(StartDate, '%Y') AS Year FROM cases WHERE CaseID = '$caseid'", $conn); if (mysql_num_rows($q_get_date) > 0) { $month = mysql_result($q_get_date, 0, 'Month'); $year = mysql_result($q_get_date, 0, 'Year'); } $current_month = date('m'); $month_text = array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $monthnumber = ""; for ($m=$month;$m<=$current_month;$m++) { $forarray = $m; if ($m < 10) {$m = "0".$m;} $monthnumber .= ""; } $current_year = date('Y'); $yearnumber = ""; for ($y=$year;$y<=$current_year;$y++) { $yearnumber .= "\n"; } #----------------------- GET DATE RANGE FOR DROP DOWN BOXES --------------------------------- #--------------------- SELECT DATE -------------------------------------------------- $month_from = isset($_POST['month_from'])?$_POST['month_from']:""; $day_from = isset($_POST['day_from'])?$_POST['day_from']:""; $year_from = isset($_POST['year_from'])?$_POST['year_from']:""; $month_to = isset($_POST['month_to'])?$_POST['month_to']:""; $day_to = isset($_POST['day_to'])?$_POST['day_to']:""; $year_to = isset($_POST['year_to'])?$_POST['year_to']:""; $daynumber = ""; for ($i=1; $i <= 31; $i++) { if ($i < 10) {$i = "0$i";} $daynumber .= "\n"; } echo ""; echo " Show posts between: |