Exemple #1
0
        $data_str .= $tag . " ";
    }
    echo rtrim($data_str, " ");
}
//id='+n_id+'&title='+title+'&description='+description+'&location='+location+'&owner='+owner+'&assigned='+assigned+'&status='+status+'&tags='+tags
if (isset($_POST['id'])) {
    $id = $_POST['id'];
    $title = $_POST['title'];
    $desc = $_POST['description'];
    $location = $_POST['location'];
    $owner = $_POST['owner'];
    $assigned = $_POST['assigned'];
    $status = $_POST['status'];
    $tags = $_POST['tags'];
    $ip_2 = new IP_Database($id);
    $ip_2->set_title($title);
    $ip_2->set_description($desc);
    $ip_2->set_location_id($location);
    $ip_2->set_owner_id($owner);
    $ip_2->set_assigned_to_id($assigned);
    if (isset($_POST['status'])) {
        if ($status != 'undefined') {
            $ip_2->set_status($status);
        }
    }
    if (isset($_POST['stub'])) {
        $stub = $_POST['stub'];
        $ip_2->set_stub($stub);
    }
    $ip_2->set_tags($tags);
    if (!$ip_2->update()) {
Exemple #2
0
                                    }
                                } else {
                                    //if checks fail, show that
                                    echo Form::warning("INVALID HOST");
                                }
                            } else {
                                if (isset($_POST['ip_update'])) {
                                    $ip_info->set_location_id($_POST['location']);
                                    $ip_info->set_owner_id($_POST['owner']);
                                    $ip_info->set_assigned_to_id($_POST['assigned']);
                                    $ip_info->set_description($_POST['description']);
                                    if (isset($_POST['status'])) {
                                        $ip_info->set_status($_POST['status']);
                                    }
                                    $ip_info->set_tags($_POST['tags']);
                                    $ip_info->set_title($_POST['title']);
                                    $ip_info->set_stub($_POST['stub']);
                                    if (!$ip_info->update()) {
                                        echo $ip_info->get_error();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
//Check if a search is initiated
if (isset($_GET['search'])) {