title: php - lock out days in a week for timesheet
body: <p>im trying to lock out a whole week if someone submits their timesheet for that week so they cannot edit/add new times to that week thats already submitted.</p>
  
  <p>i currently have a checksubmit function which returns 1 if someone submitted a timesheet for that week (checks $submitendweek which would be saturday of ending week ie: 2013-01-05)</p>
  
  <p>im very new to programming and the language php/mysql so i apologize for lack of php knowledge.</p>
  
  <p>this is what im temporarily using but is very disgusting and doesn't catch the days of previous month ... like the 30th or 31st.</p>
  
  <pre><code>$submitted = checksubmit($contextUser, $year, $month, $curDay);
  $submitted1 = checksubmit($contextUser, $year, $month, $curDay+1);
  $submitted2 = checksubmit($contextUser, $year, $month, $curDay+2);
  $submitted3 = checksubmit($contextUser, $year, $month, $curDay+3);
  $submitted4 = checksubmit($contextUser, $year, $month, $curDay+4);
  $submitted5 = checksubmit($contextUser, $year, $month, $curDay+5);
  $submitted6 = checksubmit($contextUser, $year, $month, $curDay+6);
  if ($submitted || $submitted1 || $submitted2 || $submitted3 || $submitted4 || $submitted5 || $submitted6) {
  print "submitted already";
  ...more
  } else {
  print "submit button";
  ...more 
  }
  </code></pre>