예제 #1
0
$uploader = new uploader();
$reference_table_handling = new reference_table_handling();
//get day of week
$worktable_handling = new worktable_handling();
$today = $worktable_handling->get_dayofweek();
echo "<p>today: " . $today . "</p>";
if ($compare != 0) {
    $compare = strcasecmp($csv_filename, $all_friends_update_csv);
    if ($compare != 0) {
        echo "תאריך הקובץ לא זהה לתאריך של היום או ששם הקובץ (" . $csv_filename . ") לא  בפורמט הנכון (" . $date_csv . ")";
    } else {
        $addauto_ind = 1;
        //28-02-2014 - if 1 then match the uploader to insert update all_friends
        $check_log_num = 1;
        //28-02-2014 - if 1 then upload to draft only
        $uploader->draft_uploader($check_log_num, $addauto_ind);
        //28-02-2014
        $reference_table_handling->add_records();
    }
} else {
    $addauto_ind = 0;
    //28-02-2014 - if 0 then match the uploader to insert daily usual report
    //check log table
    $log_handling = new log_handling();
    $check_log_num = $log_handling->check_log();
    if ($check_log_num > 0) {
        echo "<div>היום כבר בוצעה טעינת הקובץ</div>" . $check_log_num . "</p>";
        $upload_to_draft = $uploader->draft_uploader($check_log_num, $addauto_ind);
        //$addauto_ind 28-02-2014
        //latecomers handling
        $newarrivers_rec_handling = $worktable_handling->newarrivers_rec_handling();