case "-H": case "--help": case "--version": display_help($me); exit(0); case "--quiet": $quietMode = TRUE; break; default: echo __("ERROR: Invalid Argument: (%s)", $arg) . "\n\n"; display_help($me); exit(1); } } # at least one matching criteria has to be defined if (!sizeof($device)) { print __("ERROR: No device matching criteria found\n"); exit(1); } # now verify the parameters given $verify = verifyDevice($device, true); if (isset($verify["err_msg"])) { print $verify["err_msg"] . "\n\n"; display_help($me); exit(1); } /* get devices matching criteria */ $devices = getDevices($device); if (!sizeof($devices)) { echo __("ERROR: No matching Devices found") . "\n"; echo __("Try php -q device_list.php") . "\n"; exit(1); } foreach ($devices as $item) {
} if (!sizeof($new)) { print __("ERROR: No Update Parameters found\n"); exit(1); } #print "old1: "; print_r($old); #print "new1: "; print_r($new); # now verify the parameters given $verify = verifyDevice($old, true); if (isset($verify["err_msg"])) { print $verify["err_msg"] . "\n\n"; display_help($me); exit(1); } $verify = verifyDevice($new, true); if (isset($verify["err_msg"])) { print $verify["err_msg"] . "\n\n"; display_help($me); exit(1); } #print "old2: "; print_r($old); #print "new2: "; print_r($new); # get all devices matching criteria $devices = getDevices($old); if (!sizeof($devices)) { echo __("ERROR: No matching Devices found") . "\n"; echo __("Try php -q device_list.php") . "\n"; exit(1); }