示例#1
0
     break;
 case "update":
     $value = POST('inv_prop_value');
     $extra = POST('inv_prop_version');
     $extra = empty($extra) ? "None" : $extra;
     $id_prop = POST('inv_prop_id');
     $source_id = POST('inv_prop_source_id');
     $anom = POST('inv_prop_anom');
     $date = date("Y-m-d H:i:s");
     ossim_valid($id_prop, OSS_DIGIT, 'illegal:' . _("Property id"));
     ossim_valid($source_id, OSS_DIGIT, 'illegal:' . _("Source id"));
     ossim_valid($anom, OSS_DIGIT, 'illegal:' . _("Anomaly"));
     if (ossim_error()) {
         echo ossim_get_error();
     } else {
         $ret = Host::update_property($conn, $ip, $id_prop, $value, $extra, $date, $source_id);
         if ($ret !== true) {
             echo $ret;
         }
     }
     break;
 case "accept_change":
     $id_prop = POST('id_change');
     ossim_valid($id_prop, OSS_DIGIT, 'illegal:' . _("Property id"));
     if (ossim_error()) {
         echo ossim_get_error();
     } else {
         $ret = Host::accept_change($conn, $ip, $id_prop);
         if ($ret !== true) {
             echo $ret;
         }