Ejemplo n.º 1
0
 }
 // Local Groups
 if (substr($split, 0, 7) == "l_group") {
     insert_group($split);
 }
 // Local Users
 if (substr($split, 0, 6) == "l_user") {
     insert_user($split);
 }
 // Startup Programs
 if (substr($split, 0, 7) == "startup") {
     insert_startup($split);
 }
 // Services
 if (substr($split, 0, 7) == "service") {
     insert_service($split);
 }
 // Hotfixes
 if (substr($split, 0, 6) == "hotfix") {
     insert_hotfix($split);
 }
 // IE Browser Helper Objects
 if (substr($split, 0, 6) == "ie_bho") {
     insert_bho($split);
 }
 // Tenth system submit - AntiVirus Settings - XP SP2
 if (substr($split, 0, 8) == "system10") {
     insert_system10($split);
 }
 //Software
 if (substr($split, 0, 8) == "software") {
Ejemplo n.º 2
0
     $template = 'service_add';
     break;
 case 'do_add':
     $username = check_login($req_url);
     if (pdo_get_service($pdo, $params['service_name'])) {
         msg_redirect("back", 'This service name has been exist!');
     }
     $service_attr['service_name'] = $params['service_name'];
     $service_attr['url_regex'] = '/' . $params['service_name'] . '/';
     $service_attr['description'] = $params['description'];
     $service_attr['hash_type'] = $params['hash_type'];
     $service_attr['config_type'] = $params['config_type'];
     $service_attr['optimize_time'] = $params['optimize_time'];
     $service_attr['department'] = $params['department'];
     $service_attr['solr_version'] = $params['solr_version'];
     $service_id = insert_service($pdo, $service_attr);
     if ($service_id) {
         if ($params['config_type'] == 1) {
             $solr_config_attr['maxDocs'] = intval($params['maxDocs']);
             $solr_config_attr['maxTime'] = intval($params['maxTime']);
             $solr_config_attr['pollInterval'] = $params['pollInterval'];
             $solr_config_attr['config_type'] = $params['config_type'];
         } else {
             $solr_config_attr['config_json'] = $params['hand_config'];
             $solr_config_attr['service_id'] = $service_id;
             $solr_config_attr['config_type'] = $params['config_type'];
         }
         $solr_config_attr['service_id'] = $service_id;
         insert_solr_config($pdo, $solr_config_attr);
         init_schema($pdo, $service_id);
         msg_redirect('service.php?action=schema_add&service_id=' . $service_id);