<!DOCTYPE html>
<html lang="en">
<?php
    include_once '../../account/session.php';
    include_once 'scripts.php';
    $id_manager=$_SESSION['id-manager'];
    $username_manager=$_SESSION['username-manager'];
?>
    
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Manage Servers</title>
    <link type="text/css" href="../../../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" href="../../../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
    <link type="text/css" href="../../../css/theme.css" rel="stylesheet">
    <link type="text/css" href="../../../images/icons/css/font-awesome.css" rel="stylesheet">
    <link type="text/css" href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>
    <script src="../../../scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../../../scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
    <script src="../../../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../../../scripts/flot/jquery.flot.js" type="text/javascript"></script>
    <script src="scripts.js" type="text/javascript"></script>
    <script>
        $(document).ready(function(){
            show_servers();
        });
    </script>
</head>
<body>
    
     <?php include('../../include/inc.top_menu.php'); ?>

    <div class="wrapper">
        <div class="container">
            <div class="row">
                
				<?php include('../../include/inc.left_menu.php'); ?>
				<style type="text/css">
					#showw {
						padding: 9px;background: rgba(255, 165, 0, 0.68);color: white;width: 95%;margin-left: 11px;clear: both;border-radius: 3px;line-height: 30px;height: 30px;font-weight: bold;margin-top: 5px;cursor: pointer;
					}
				</style>
				
                <div class="span9">
                    <div class="content">
                        <div class="module">
                            <div class="module-head"><h3>Add VMTA<div class="processing" id="processing"></div></h3></div>
                            <div class="show_back" id="showw" style="background:red;display: none;">Go back</div>
                            <div class="show_group" onclick="javascript:show_div('group');" id="showw">Add GROUPS</div>
                            <div class="show_line" onclick="javascript:show_div('line');" id="showw">Add Line by line</div>
                            <div class="module_group" style="display:none;">
                            <div class="form-horizontal row-fluid" style="    margin-top: 22px;">
                            	 <div class="control-group">
                                        <label class="control-label" for="basicinput">Server</label>
                                        <div class="controls">
                                            <select tabindex="1" data-placeholder="Select here..." id="server1" class="span5">
                                                <option value="0">Select here...</option>
                                            </select>
                                        </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="basicinput">Block IP</label>
                                        <div class="controls">
                                            <input type="text" id="block_ips" placeholder="" class="span3">
                                            <span class="help-inline"></span>
                                        </div>
                                </div>
                                 <div class="control-group">
                                    <label class="control-label" for="basicinput">Vmtas name</label>
                                        <div class="controls">
                                            <textarea class="span3" id="vmta_name" style="margin: 0px; width: 667px; height: 129px;"></textarea>
                                            <span class="help-inline"></span>
                                        </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="basicinput">Ips</label>
                                        <div class="controls">
                                            <textarea class="span3" id="ips" style="margin: 0px; width: 667px; height: 129px;"></textarea>
                                            <span class="help-inline"></span>
                                        </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="basicinput">Hosts name</label>
                                        <div class="controls">
                                            <textarea class="span3" id="hosts" style="margin: 0px; width: 667px; height: 129px;"></textarea>
                                            <span class="help-inline"></span>
                                        </div>
                                </div>
                                <div class="control-group">
                                        <label class="control-label" for="basicinput"></label>
                                        <div class="controls">
                                            <button class="btn btn-primary" type="button" onclick="add_groups();">Add VMTAs</button>
                                            <button class="btn btn-default" type="button" onclick="location.href='show.php'">Back to show</button>
                                        </div>
                                    </div>
                             </div>
                            </div>
                            <div class="module_line" style="display:none;">
                            <div class="module-body">
                                <div class="alert" id="message-warning">
                                    <button type="button" class="close" onclick="close_message_warning();">×</button>
                                    <strong>Warning!</strong> Please verify your data
                                </div>
                                <div class="alert" id="message-warning-custom">
                                    <button type="button" class="close" onclick="close_message_warning_custom();">×</button>
                                    <strong>Warning!</strong> <span id="message-custom"></span>
                                </div>
                                <div class="alert alert-error" id="message-error">
                                    <button type="button" class="close" onclick="close_message_error();">×</button>
                                    <strong>Error!</strong> There was an error while executing your request
                                </div>
                                <div class="alert alert-success" id="message-success">
                                    <button type="button" class="close" onclick="close_message_success();">×</button>
                                    <strong>Done!</strong> VMTA has been added successfully
                                </div>
                                <div class="form-horizontal row-fluid">
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput">Server</label>
                                        <div class="controls">
                                            <select tabindex="1" data-placeholder="Select here..." id="server" class="span5">
                                                <option value="0">Select here...</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput">VMTA Name</label>
                                        <div class="controls">
                                            <input type="text" id="name" placeholder="" class="span5">
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput">Block IP</label>
                                        <div class="controls">
                                            <input type="text" id="block_ip" placeholder="" class="span3">
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput">Address IP</label>
                                        <div class="controls">
                                            <input type="text" id="address_ip" placeholder="" class="span3">
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput">Host Name</label>
                                        <div class="controls">
                                            <input type="text" id="host_name" placeholder="" class="span5">
                                            <span class="help-inline"></span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="basicinput"></label>
                                        <div class="controls">
                                            <button class="btn btn-primary" type="button" onclick="add();">Add VMTA</button>
                                            <button class="btn btn-default" type="button" onclick="location.href='show.php'">Back to show</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </div>
                            <div style="margin-top: 30px;"></div>
                        </div>
                    </div><!--/.content-->
                </div><!--/.span9-->
            </div>
        </div><!--/.container-->
    </div><!--/.wrapper-->
<script type="text/javascript">
function show_div(params)
{
	if(params == 'group') {
		$('.show_back').show();
		$('.show_line').hide();
		$('.show_group').hide();
		$('.module_line').hide();
		$('.module_group').show();
	} else {
		$('.show_back').show();
		$('.show_group').hide();
		$('.show_line').hide();
		$('.module_group').hide();
		$('.module_line').show();
    }
}
$(function() {
	$('.show_back').click(function() {
		$('.show_back').hide();
		$('.show_group').show();
		$('.show_line').show();
	    $('.module_group').hide();
		$('.module_line').hide();
	})
})
</script>
</body>