示例#1
0
                    $errors = $pcf->Validator->getErrorsArray();
                    if (is_array($errors)) {
                        foreach ($errors as $error_arr) {
                            echo "      ERROR: " . $error_arr[0] . "\n";
                        }
                    }
                }
            } else {
                echo " \t\t\tFailed!\n";
                $commit_trans = FALSE;
                $e++;
                echo "    ERROR: User not found!\n";
            }
            unset($tmp_punch_control_id, $status_id);
            ob_flush();
            flush();
            $i++;
        }
        if ($e > 0) {
            echo "Total Errors: " . $e . "\n";
        }
        if ($dry_run == TRUE or $commit_trans !== TRUE) {
            echo "Rolling back transaction!\n";
            $uf->FailTransaction();
        }
        //$uf->FailTransaction();
        $uf->CommitTransaction();
    }
}
echo "WARNING: Clear TimeTrex cache after running this.\n";
Debug::Display();