@@ 354-362 (lines=9) @@ | ||
351 | if ($mode!='daily') { |
|
352 | switch ($mode) { |
|
353 | case 'weekly': |
|
354 | if (isset($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
355 | if ($this->validateScheduleWeekDays($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
356 | $curSchedule .= '"weekdays":['.$rows[$locationsFieldsMapping['schedule_weekdays']].']}'; |
|
357 | } else { |
|
358 | array_push($results['fail'], "$iRow --> Wrong weekdays"); |
|
359 | } |
|
360 | } else { |
|
361 | array_push($results['fail'], "$iRow --> The parameters sched_weekdays is not set"); |
|
362 | } |
|
363 | break; |
|
364 | case 'monthly': |
|
365 | $monthlyMode = ""; |
|
@@ 389-397 (lines=9) @@ | ||
386 | } |
|
387 | break; |
|
388 | case 'nth': |
|
389 | if (isset($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
390 | if ($this->validateScheduleNthN($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
391 | $curSchedule .= '"nth":{"n":'.$rows[$locationsFieldsMapping['monthly_nth_n']].','; |
|
392 | } else { |
|
393 | array_push($results['fail'], "$iRow --> Wrong parameter sched_nth_n"); |
|
394 | } |
|
395 | } else { |
|
396 | array_push($results['fail'], "$iRow --> The parameter sched_nth_n is not set"); |
|
397 | } |
|
398 | ||
399 | if ($curSchedule!="") { |
|
400 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
@@ 399-409 (lines=11) @@ | ||
396 | array_push($results['fail'], "$iRow --> The parameter sched_nth_n is not set"); |
|
397 | } |
|
398 | ||
399 | if ($curSchedule!="") { |
|
400 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
401 | if ($this->validateScheduleNthWhat($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
402 | $curSchedule .= '"what":'.$rows[$locationsFieldsMapping['monthly_nth_wwhat']].'}}'; |
|
403 | } else { |
|
404 | array_push($results['fail'], "$iRow --> Wrong parameter sched_nth_what"); |
|
405 | } |
|
406 | } else { |
|
407 | array_push($results['fail'], "$iRow --> The parameter sched_nth_what is not set"); |
|
408 | } |
|
409 | } |
|
410 | break; |
|
411 | } |
|
412 | } |