if (count($argv) != 4) { Command_Line::quit('Wrong parameter count'); } Command_Line::lookupCustomer($client, $auth, $argv[2], $argv[3]); } elseif ($argv[1] == 'weekly-report' || $argv[1] == 'wr') { if (count(@$argv) >= 4 and $argv[3] != '--separate-closed') { $separate_closed = @$argv[4] == '--separate-closed'; // date range Command_Line::getWeeklyReport($client, $auth, 0, $argv[2], $argv[3], $separate_closed); } else { // weekly if (@$argv[2] == '') { $separate_closed = false; @($argv[2] = 0); } else { $separate_closed = (@$argv[3] == '--separate-closed' or @$argv[2] == '--separate-closed'); } Command_Line::getWeeklyReport($client, $auth, $argv[2], '', '', $separate_closed); } } elseif ($argv[1] == 'clock') { Command_Line::timeClock($client, $auth, @$argv[2]); } else { Command_Line::quit("Unknown parameter '" . $argv[1] . "'"); } } } catch (Eventum_RPC_Exception $e) { print 'ERROR: ' . $e->getMessage() . "\n"; if ($debug) { print $e->getTraceAsString(); } }