<?php //db call
$db = new SQLite3('./api/vpn.db');
//table name
$table_name = "vpnconfig";
//header title
$Htitle = "OVPN Servers";
//current file var
$base_file = basename($_SERVER["SCRIPT_NAME"]);
//create if not
$db->exec("CREATE TABLE IF NOT EXISTS {$table_name}(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 
													userid text, 
													vpn_appid TEXT, 
													vpn_country TEXT, 
													vpn_state TEXT, 
													vpn_config TEXT, 
													vpn_status TEXT, 
													auth_type TEXT, 
													auth_embedded TEXT, 
													username TEXT, 
													password TEXT, 
													date TEXT)");
//table call
$res = $db->query("SELECT * FROM {$table_name}");
//update call
@$resU = $db->query("SELECT * FROM {$table_name} WHERE id='" . $_GET['update'] . "'");
@$rowU = $resU->fetchArray();
if (isset($_POST['submitU'])) {
    $db->exec("UPDATE {$table_name} SET 	userid='" . $_POST['userid'] . "',
											vpn_appid='" . $_POST['vpn_appid'] . "',
											vpn_country='" . $_POST['vpn_country'] . "',
											vpn_state='" . $_POST['vpn_state'] . "', 
											vpn_config='" . $_POST['vpn_config'] . "', 
											vpn_status='" . $_POST['vpn_status'] . "', 
											auth_type='" . $_POST['auth_type'] . "', 
											auth_embedded='" . $_POST['auth_embedded'] . "', 
											username='" . $_POST['username'] . "', 
											password='" . $_POST['password'] . "', 
											date='" . $_POST['date'] . "'
										WHERE 
											id='" . $_GET['update'] . "'");
    $db->close();
    header("Location: {$base_file}?status=1");
}
//submit new
if (isset($_POST['submit'])) {
    $db->exec("INSERT INTO {$table_name}(userid,
										 vpn_appid, 
										 vpn_country, 
										 vpn_state, 
										 vpn_config, 
										 vpn_status, 
										 auth_type, 
										 auth_embedded, 
										 username, 
										 password, 
										 date
										 ) 
								VALUES( '" . $_POST['userid'] . "', 
										'" . $_POST['vpn_appid'] . "', 
										'" . $_POST['vpn_country'] . "', 
										'" . $_POST['vpn_state'] . "', 
										'" . $_POST['vpn_config'] . "', 
										'" . $_POST['vpn_status'] . "', 
										'" . $_POST['auth_type'] . "', 
										'" . $_POST['auth_embedded'] . "', 
										'" . $_POST['username'] . "', 
										'" . $_POST['password'] . "', 
										'" . $_POST['date'] . "'
										)");
    $db->close();
    header("Location: {$base_file}?status=1");
}
//delete row
if (isset($_GET['delete'])) {
    $db->exec("DELETE FROM {$table_name} WHERE id=" . $_GET['delete']);
    header("Location: {$base_file}?status=1");
}
include ('includes/header.php');
//delete modal
echo "<div class=\"modal fade\" id=\"confirm-delete\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">
";
echo "    <div class=\"modal-dialog\">
";
echo "        <div class=\"modal-content\">
";
echo "            <div class=\"modal-header\">
";
echo "                <h2>Confirm</h2>
";
echo "            </div>
";
echo "            <div class=\"modal-body\">
";
echo "                Do you really want to delete?
";
echo "            </div>
";
echo "            <div class=\"modal-footer\">
";
echo "                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>
";
echo "                <a class=\"btn btn-danger btn-ok\">Delete</a>
";
echo "            </div>
";
echo "        </div>
";
echo "    </div>
";
echo "</div>
";
if (isset($_GET['create'])) {
    //create form
    echo "        <div class=\"col-md-8 mx-auto\">
";
    echo "            <div class=\"card-body\">
";
    echo "                <div class=\"card bg-primary text-white\">
";
    echo "                    <div class=\"card-header card-header-warning\">
";
    echo "                            <center><h2><i class=\"icon icon-bullhorn\"></i>echo $Htitle</h2></center>
";
    echo "                    </div>
";
    echo "                    
";
    echo "                    <div class=\"card-body\">
";
    echo "
";
    echo "                        <div class=\"col-12\">
";
    echo "                            <h3>Add OVPN Server</h3>
";
    echo "                        </div>
";
    echo "                            <form method=\"post\">
";
    echo "                                <input class=\"form-control\" id=\"date\" name=\"date\" value=\"" . date("Y-m-d h:i:s") . "\" type=\"hidden\"/>
";
    echo "                                <input class=\"form-control\" id=\"userid\" name=\"userid\" value=\"521064\" type=\"hidden\"/>
";
    echo "                                <input class=\"form-control\" id=\"vpn_appid\" name=\"vpn_appid\" value=\"1646\" type=\"hidden\"/>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_state\">
";
    echo "                                        State/Province
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"vpn_state\" name=\"vpn_state\" placeholder=\"Enter State/Province\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_config\">
";
    echo "                                        OpenVPN Config URL
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"vpn_config\" name=\"vpn_config\" placeholder=\"Enter OpenVPN Config URL\"  type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"auth_type\" >
";
    echo "                                        Authentication Type
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"auth_type\" name=\"auth_type\">
";
    echo "                                        <option value=\"noup\">
";
    echo "                                            Username and Password are not required
";
    echo "                                        </option>
";
    echo "                                        <option value=\"up\">
";
    echo "                                            Username and Password required
";
    echo "                                        </option>
";
    echo "                                        <option value=\"kp\">
";
    echo "                                            Key file password Required
";
    echo "                                        </option>
";
    echo "                                                          
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"username\">
";
    echo "                                        Embedded Username
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"username\" name=\"username\" placeholder=\"Enter Username\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"password\">
";
    echo "                                        Embedded Password 
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"password\" name=\"password\" placeholder=\"Enter Password\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_status\" >
";
    echo "                                        Status
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"vpn_status\" name=\"vpn_status\">
";
    echo "                                        <option value=\"ACTIVE\">ACTIVE</option>
";
    echo "                                        <option value=\"INACTIVE\">INACTIVE</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"auth_embedded\" >
";
    echo "                                        Auth Embedded
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"auth_embedded\" name=\"auth_embedded\">
";
    echo "                                        <option value=\"NO\">NO</option>
";
    echo "                                        <option value=\"YES\">YES</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "
";
    echo "                                <div class=\"form-group\">
";
    echo "                                    <label class=\"form-label\" for=\"vpn_country\">vpn_country</label>
";
    echo "                                    <select class=\"select form-control\" id=\"select\" name=\"vpn_country\">
";
    echo "                                            <option value=\"AF\">Afghanistan</option>
";
    echo "                                            <option value=\"AX\">Åland Islands</option>
";
    echo "                                            <option value=\"AL\">Albania</option>
";
    echo "                                            <option value=\"DZ\">Algeria</option>
";
    echo "                                            <option value=\"AS\">American Samoa</option>
";
    echo "                                            <option value=\"AD\">Andorra</option>
";
    echo "                                            <option value=\"AO\">Angola</option>
";
    echo "                                            <option value=\"AI\">Anguilla</option>
";
    echo "                                            <option value=\"AQ\">Antarctica</option>
";
    echo "                                            <option value=\"AG\">Antigua and Barbuda</option>
";
    echo "                                            <option value=\"AR\">Argentina</option>
";
    echo "                                            <option value=\"AM\">Armenia</option>
";
    echo "                                            <option value=\"AW\">Aruba</option>
";
    echo "                                            <option value=\"AU\">Australia</option>
";
    echo "                                            <option value=\"AT\">Austria</option>
";
    echo "                                            <option value=\"AZ\">Azerbaijan</option>
";
    echo "                                            <option value=\"BS\">Bahamas</option>
";
    echo "                                            <option value=\"BH\">Bahrain</option>
";
    echo "                                            <option value=\"BD\">Bangladesh</option>
";
    echo "                                            <option value=\"BB\">Barbados</option>
";
    echo "                                            <option value=\"BY\">Belarus</option>
";
    echo "                                            <option value=\"BE\">Belgium</option>
";
    echo "                                            <option value=\"BZ\">Belize</option>
";
    echo "                                            <option value=\"BJ\">Benin</option>
";
    echo "                                            <option value=\"BM\">Bermuda</option>
";
    echo "                                            <option value=\"BT\">Bhutan</option>
";
    echo "                                            <option value=\"BO\">Bolivia, Plurinational State of</option>
";
    echo "                                            <option value=\"BQ\">Bonaire, Sint Eustatius and Saba</option>
";
    echo "                                            <option value=\"BA\">Bosnia and Herzegovina</option>
";
    echo "                                            <option value=\"BW\">Botswana</option>
";
    echo "                                            <option value=\"BV\">Bouvet Island</option>
";
    echo "                                            <option value=\"BR\">Brazil</option>
";
    echo "                                            <option value=\"IO\">British Indian Ocean Territory</option>
";
    echo "                                            <option value=\"BN\">Brunei Darussalam</option>
";
    echo "                                            <option value=\"BG\">Bulgaria</option>
";
    echo "                                            <option value=\"BF\">Burkina Faso</option>
";
    echo "                                            <option value=\"BI\">Burundi</option>
";
    echo "                                            <option value=\"KH\">Cambodia</option>
";
    echo "                                            <option value=\"CM\">Cameroon</option>
";
    echo "                                            <option value=\"CA\">Canada</option>
";
    echo "                                            <option value=\"CV\">Cape Verde</option>
";
    echo "                                            <option value=\"KY\">Cayman Islands</option>
";
    echo "                                            <option value=\"CF\">Central African Republic</option>
";
    echo "                                            <option value=\"TD\">Chad</option>
";
    echo "                                            <option value=\"CL\">Chile</option>
";
    echo "                                            <option value=\"CN\">China</option>
";
    echo "                                            <option value=\"CX\">Christmas Island</option>
";
    echo "                                            <option value=\"CC\">Cocos (Keeling) Islands</option>
";
    echo "                                            <option value=\"CO\">Colombia</option>
";
    echo "                                            <option value=\"KM\">Comoros</option>
";
    echo "                                            <option value=\"CG\">Congo</option>
";
    echo "                                            <option value=\"CD\">Congo, the Democratic Republic of the</option>
";
    echo "                                            <option value=\"CK\">Cook Islands</option>
";
    echo "                                            <option value=\"CR\">Costa Rica</option>
";
    echo "                                            <option value=\"CI\">Côte d\'Ivoire</option>
";
    echo "                                            <option value=\"HR\">Croatia</option>
";
    echo "                                            <option value=\"CU\">Cuba</option>
";
    echo "                                            <option value=\"CW\">Curaçao</option>
";
    echo "                                            <option value=\"CY\">Cyprus</option>
";
    echo "                                            <option value=\"CZ\">Czech Republic</option>
";
    echo "                                            <option value=\"DK\">Denmark</option>
";
    echo "                                            <option value=\"DJ\">Djibouti</option>
";
    echo "                                            <option value=\"DM\">Dominica</option>
";
    echo "                                            <option value=\"DO\">Dominican Republic</option>
";
    echo "                                            <option value=\"EC\">Ecuador</option>
";
    echo "                                            <option value=\"EG\">Egypt</option>
";
    echo "                                            <option value=\"SV\">El Salvador</option>
";
    echo "                                            <option value=\"GQ\">Equatorial Guinea</option>
";
    echo "                                            <option value=\"ER\">Eritrea</option>
";
    echo "                                            <option value=\"EE\">Estonia</option>
";
    echo "                                            <option value=\"ET\">Ethiopia</option>
";
    echo "                                            <option value=\"FK\">Falkland Islands (Malvinas)</option>
";
    echo "                                            <option value=\"FO\">Faroe Islands</option>
";
    echo "                                            <option value=\"FJ\">Fiji</option>
";
    echo "                                            <option value=\"FI\">Finland</option>
";
    echo "                                            <option value=\"FR\">France</option>
";
    echo "                                            <option value=\"GF\">French Guiana</option>
";
    echo "                                            <option value=\"PF\">French Polynesia</option>
";
    echo "                                            <option value=\"TF\">French Southern Territories</option>
";
    echo "                                            <option value=\"GA\">Gabon</option>
";
    echo "                                            <option value=\"GM\">Gambia</option>
";
    echo "                                            <option value=\"GE\">Georgia</option>
";
    echo "                                            <option value=\"DE\">Germany</option>
";
    echo "                                            <option value=\"GH\">Ghana</option>
";
    echo "                                            <option value=\"GI\">Gibraltar</option>
";
    echo "                                            <option value=\"GR\">Greece</option>
";
    echo "                                            <option value=\"GL\">Greenland</option>
";
    echo "                                            <option value=\"GD\">Grenada</option>
";
    echo "                                            <option value=\"GP\">Guadeloupe</option>
";
    echo "                                            <option value=\"GU\">Guam</option>
";
    echo "                                            <option value=\"GT\">Guatemala</option>
";
    echo "                                            <option value=\"GG\">Guernsey</option>
";
    echo "                                            <option value=\"GN\">Guinea</option>
";
    echo "                                            <option value=\"GW\">Guinea-Bissau</option>
";
    echo "                                            <option value=\"GY\">Guyana</option>
";
    echo "                                            <option value=\"HT\">Haiti</option>
";
    echo "                                            <option value=\"HM\">Heard Island and McDonald Islands</option>
";
    echo "                                            <option value=\"VA\">Holy See (Vatican City State)</option>
";
    echo "                                            <option value=\"HN\">Honduras</option>
";
    echo "                                            <option value=\"HK\">Hong Kong</option>
";
    echo "                                            <option value=\"HU\">Hungary</option>
";
    echo "                                            <option value=\"IS\">Iceland</option>
";
    echo "                                            <option value=\"IN\">India</option>
";
    echo "                                            <option value=\"ID\">Indonesia</option>
";
    echo "                                            <option value=\"IR\">Iran, Islamic Republic of</option>
";
    echo "                                            <option value=\"IQ\">Iraq</option>
";
    echo "                                            <option value=\"IE\">Ireland</option>
";
    echo "                                            <option value=\"IM\">Isle of Man</option>
";
    echo "                                            <option value=\"IL\">Israel</option>
";
    echo "                                            <option value=\"IT\">Italy</option>
";
    echo "                                            <option value=\"JM\">Jamaica</option>
";
    echo "                                            <option value=\"JP\">Japan</option>
";
    echo "                                            <option value=\"JE\">Jersey</option>
";
    echo "                                            <option value=\"JO\">Jordan</option>
";
    echo "                                            <option value=\"KZ\">Kazakhstan</option>
";
    echo "                                            <option value=\"KE\">Kenya</option>
";
    echo "                                            <option value=\"KI\">Kiribati</option>
";
    echo "                                            <option value=\"KP\">Korea, Democratic People\'s Republic of</option>
";
    echo "                                            <option value=\"KR\">Korea, Republic of</option>
";
    echo "                                            <option value=\"KW\">Kuwait</option>
";
    echo "                                            <option value=\"KG\">Kyrgyzstan</option>
";
    echo "                                            <option value=\"LA\">Lao People\'s Democratic Republic</option>
";
    echo "                                            <option value=\"LV\">Latvia</option>
";
    echo "                                            <option value=\"LB\">Lebanon</option>
";
    echo "                                            <option value=\"LS\">Lesotho</option>
";
    echo "                                            <option value=\"LR\">Liberia</option>
";
    echo "                                            <option value=\"LY\">Libya</option>
";
    echo "                                            <option value=\"LI\">Liechtenstein</option>
";
    echo "                                            <option value=\"LT\">Lithuania</option>
";
    echo "                                            <option value=\"LU\">Luxembourg</option>
";
    echo "                                            <option value=\"MO\">Macao</option>
";
    echo "                                            <option value=\"MK\">Macedonia, the former Yugoslav Republic of</option>
";
    echo "                                            <option value=\"MG\">Madagascar</option>
";
    echo "                                            <option value=\"MW\">Malawi</option>
";
    echo "                                            <option value=\"MY\">Malaysia</option>
";
    echo "                                            <option value=\"MV\">Maldives</option>
";
    echo "                                            <option value=\"ML\">Mali</option>
";
    echo "                                            <option value=\"MT\">Malta</option>
";
    echo "                                            <option value=\"MH\">Marshall Islands</option>
";
    echo "                                            <option value=\"MQ\">Martinique</option>
";
    echo "                                            <option value=\"MR\">Mauritania</option>
";
    echo "                                            <option value=\"MU\">Mauritius</option>
";
    echo "                                            <option value=\"YT\">Mayotte</option>
";
    echo "                                            <option value=\"MX\">Mexico</option>
";
    echo "                                            <option value=\"FM\">Micronesia, Federated States of</option>
";
    echo "                                            <option value=\"MD\">Moldova, Republic of</option>
";
    echo "                                            <option value=\"MC\">Monaco</option>
";
    echo "                                            <option value=\"MN\">Mongolia</option>
";
    echo "                                            <option value=\"ME\">Montenegro</option>
";
    echo "                                            <option value=\"MS\">Montserrat</option>
";
    echo "                                            <option value=\"MA\">Morocco</option>
";
    echo "                                            <option value=\"MZ\">Mozambique</option>
";
    echo "                                            <option value=\"MM\">Myanmar</option>
";
    echo "                                            <option value=\"NA\">Namibia</option>
";
    echo "                                            <option value=\"NR\">Nauru</option>
";
    echo "                                            <option value=\"NP\">Nepal</option>
";
    echo "                                            <option value=\"NL\">Netherlands</option>
";
    echo "                                            <option value=\"NC\">New Caledonia</option>
";
    echo "                                            <option value=\"NZ\">New Zealand</option>
";
    echo "                                            <option value=\"NI\">Nicaragua</option>
";
    echo "                                            <option value=\"NE\">Niger</option>
";
    echo "                                            <option value=\"NG\">Nigeria</option>
";
    echo "                                            <option value=\"NU\">Niue</option>
";
    echo "                                            <option value=\"NF\">Norfolk Island</option>
";
    echo "                                            <option value=\"MP\">Northern Mariana Islands</option>
";
    echo "                                            <option value=\"NO\">Norway</option>
";
    echo "                                            <option value=\"OM\">Oman</option>
";
    echo "                                            <option value=\"PK\">Pakistan</option>
";
    echo "                                            <option value=\"PW\">Palau</option>
";
    echo "                                            <option value=\"PS\">Palestinian Territory, Occupied</option>
";
    echo "                                            <option value=\"PA\">Panama</option>
";
    echo "                                            <option value=\"PG\">Papua New Guinea</option>
";
    echo "                                            <option value=\"PY\">Paraguay</option>
";
    echo "                                            <option value=\"PE\">Peru</option>
";
    echo "                                            <option value=\"PH\">Philippines</option>
";
    echo "                                            <option value=\"PN\">Pitcairn</option>
";
    echo "                                            <option value=\"PL\">Poland</option>
";
    echo "                                            <option value=\"PT\">Portugal</option>
";
    echo "                                            <option value=\"PR\">Puerto Rico</option>
";
    echo "                                            <option value=\"QA\">Qatar</option>
";
    echo "                                            <option value=\"RE\">Réunion</option>
";
    echo "                                            <option value=\"RO\">Romania</option>
";
    echo "                                            <option value=\"RU\">Russian Federation</option>
";
    echo "                                            <option value=\"RW\">Rwanda</option>
";
    echo "                                            <option value=\"BL\">Saint Barthélemy</option>
";
    echo "                                            <option value=\"SH\">Saint Helena, Ascension and Tristan da Cunha</option>
";
    echo "                                            <option value=\"KN\">Saint Kitts and Nevis</option>
";
    echo "                                            <option value=\"LC\">Saint Lucia</option>
";
    echo "                                            <option value=\"MF\">Saint Martin (French part)</option>
";
    echo "                                            <option value=\"PM\">Saint Pierre and Miquelon</option>
";
    echo "                                            <option value=\"VC\">Saint Vincent and the Grenadines</option>
";
    echo "                                            <option value=\"WS\">Samoa</option>
";
    echo "                                            <option value=\"SM\">San Marino</option>
";
    echo "                                            <option value=\"ST\">Sao Tome and Principe</option>
";
    echo "                                            <option value=\"SA\">Saudi Arabia</option>
";
    echo "                                            <option value=\"SN\">Senegal</option>
";
    echo "                                            <option value=\"RS\">Serbia</option>
";
    echo "                                            <option value=\"SC\">Seychelles</option>
";
    echo "                                            <option value=\"SL\">Sierra Leone</option>
";
    echo "                                            <option value=\"SG\">Singapore</option>
";
    echo "                                            <option value=\"SX\">Sint Maarten (Dutch part)</option>
";
    echo "                                            <option value=\"SK\">Slovakia</option>
";
    echo "                                            <option value=\"SI\">Slovenia</option>
";
    echo "                                            <option value=\"SB\">Solomon Islands</option>
";
    echo "                                            <option value=\"SO\">Somalia</option>
";
    echo "                                            <option value=\"ZA\">South Africa</option>
";
    echo "                                            <option value=\"GS\">South Georgia and the South Sandwich Islands</option>
";
    echo "                                            <option value=\"SS\">South Sudan</option>
";
    echo "                                            <option value=\"ES\">Spain</option>
";
    echo "                                            <option value=\"LK\">Sri Lanka</option>
";
    echo "                                            <option value=\"SD\">Sudan</option>
";
    echo "                                            <option value=\"SR\">Suriname</option>
";
    echo "                                            <option value=\"SJ\">Svalbard and Jan Mayen</option>
";
    echo "                                            <option value=\"SZ\">Swaziland</option>
";
    echo "                                            <option value=\"SE\">Sweden</option>
";
    echo "                                            <option value=\"CH\">Switzerland</option>
";
    echo "                                            <option value=\"SY\">Syrian Arab Republic</option>
";
    echo "                                            <option value=\"TW\">Taiwan, Province of China</option>
";
    echo "                                            <option value=\"TJ\">Tajikistan</option>
";
    echo "                                            <option value=\"TZ\">Tanzania, United Republic of</option>
";
    echo "                                            <option value=\"TH\">Thailand</option>
";
    echo "                                            <option value=\"TL\">Timor-Leste</option>
";
    echo "                                            <option value=\"TG\">Togo</option>
";
    echo "                                            <option value=\"TK\">Tokelau</option>
";
    echo "                                            <option value=\"TO\">Tonga</option>
";
    echo "                                            <option value=\"TT\">Trinidad and Tobago</option>
";
    echo "                                            <option value=\"TN\">Tunisia</option>
";
    echo "                                            <option value=\"TR\">Turkey</option>
";
    echo "                                            <option value=\"TM\">Turkmenistan</option>
";
    echo "                                            <option value=\"TC\">Turks and Caicos Islands</option>
";
    echo "                                            <option value=\"TV\">Tuvalu</option>
";
    echo "                                            <option value=\"UG\">Uganda</option>
";
    echo "                                            <option value=\"UA\">Ukraine</option>
";
    echo "                                            <option value=\"AE\">United Arab Emirates</option>
";
    echo "                                            <option value=\"GB\">United Kingdom</option>
";
    echo "                                            <option value=\"US\">United States</option>
";
    echo "                                            <option value=\"UM\">United States Minor Outlying Islands</option>
";
    echo "                                            <option value=\"UY\">Uruguay</option>
";
    echo "                                            <option value=\"UZ\">Uzbekistan</option>
";
    echo "                                            <option value=\"VU\">Vanuatu</option>
";
    echo "                                            <option value=\"VE\">Venezuela, Bolivarian Republic of</option>
";
    echo "                                            <option value=\"VN\">Viet Nam</option>
";
    echo "                                            <option value=\"VG\">Virgin Islands, British</option>
";
    echo "                                            <option value=\"VI\">Virgin Islands, U.S.</option>
";
    echo "                                            <option value=\"WF\">Wallis and Futuna</option>
";
    echo "                                            <option value=\"EH\">Western Sahara</option>
";
    echo "                                            <option value=\"YE\">Yemen</option>
";
    echo "                                            <option value=\"ZM\">Zambia</option>
";
    echo "                                            <option value=\"ZW\">Zimbabwe</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "
";
    echo "                                <div class=\"form-group\">
";
    echo "                                    <center>
";
    echo "                                        <button class=\"btn btn-info \" name=\"submit\" type=\"submit\">
";
    echo "                                            <i class=\"icon icon-check\"></i> Submit
";
    echo "                                        </button>
";
    echo "                                    </center>
";
    echo "                                </div>
";
    echo "                            </form>
";
    echo "                    </div>
";
    echo "                </div>
";
    echo "            </div>
";
    echo "        </div>
";
} else if (isset($_GET['update'])) {
    $vpn_country1 = $rowU['vpn_country'] == 'AF' ? 'selected' : '';
    $vpn_country2 = $rowU['vpn_country'] == 'AX' ? 'selected' : '';
    $vpn_country3 = $rowU['vpn_country'] == 'AL' ? 'selected' : '';
    $vpn_country4 = $rowU['vpn_country'] == 'DZ' ? 'selected' : '';
    $vpn_country5 = $rowU['vpn_country'] == 'AS' ? 'selected' : '';
    $vpn_country6 = $rowU['vpn_country'] == 'AD' ? 'selected' : '';
    $vpn_country7 = $rowU['vpn_country'] == 'AO' ? 'selected' : '';
    $vpn_country8 = $rowU['vpn_country'] == 'AI' ? 'selected' : '';
    $vpn_country9 = $rowU['vpn_country'] == 'AQ' ? 'selected' : '';
    $vpn_country10 = $rowU['vpn_country'] == 'AG' ? 'selected' : '';
    $vpn_country11 = $rowU['vpn_country'] == 'AR' ? 'selected' : '';
    $vpn_country12 = $rowU['vpn_country'] == 'AM' ? 'selected' : '';
    $vpn_country13 = $rowU['vpn_country'] == 'AW' ? 'selected' : '';
    $vpn_country14 = $rowU['vpn_country'] == 'AU' ? 'selected' : '';
    $vpn_country15 = $rowU['vpn_country'] == 'AT' ? 'selected' : '';
    $vpn_country16 = $rowU['vpn_country'] == 'AZ' ? 'selected' : '';
    $vpn_country17 = $rowU['vpn_country'] == 'BS' ? 'selected' : '';
    $vpn_country18 = $rowU['vpn_country'] == 'BH' ? 'selected' : '';
    $vpn_country19 = $rowU['vpn_country'] == 'BD' ? 'selected' : '';
    $vpn_country20 = $rowU['vpn_country'] == 'BB' ? 'selected' : '';
    $vpn_country21 = $rowU['vpn_country'] == 'BY' ? 'selected' : '';
    $vpn_country22 = $rowU['vpn_country'] == 'BE' ? 'selected' : '';
    $vpn_country23 = $rowU['vpn_country'] == 'BZ' ? 'selected' : '';
    $vpn_country24 = $rowU['vpn_country'] == 'BJ' ? 'selected' : '';
    $vpn_country25 = $rowU['vpn_country'] == 'BM' ? 'selected' : '';
    $vpn_country26 = $rowU['vpn_country'] == 'BT' ? 'selected' : '';
    $vpn_country27 = $rowU['vpn_country'] == 'BO' ? 'selected' : '';
    $vpn_country28 = $rowU['vpn_country'] == 'BQ' ? 'selected' : '';
    $vpn_country29 = $rowU['vpn_country'] == 'BA' ? 'selected' : '';
    $vpn_country30 = $rowU['vpn_country'] == 'BW' ? 'selected' : '';
    $vpn_country31 = $rowU['vpn_country'] == 'BV' ? 'selected' : '';
    $vpn_country32 = $rowU['vpn_country'] == 'BR' ? 'selected' : '';
    $vpn_country33 = $rowU['vpn_country'] == 'IO' ? 'selected' : '';
    $vpn_country34 = $rowU['vpn_country'] == 'BN' ? 'selected' : '';
    $vpn_country35 = $rowU['vpn_country'] == 'BG' ? 'selected' : '';
    $vpn_country36 = $rowU['vpn_country'] == 'BF' ? 'selected' : '';
    $vpn_country37 = $rowU['vpn_country'] == 'BI' ? 'selected' : '';
    $vpn_country38 = $rowU['vpn_country'] == 'KH' ? 'selected' : '';
    $vpn_country39 = $rowU['vpn_country'] == 'CM' ? 'selected' : '';
    $vpn_country40 = $rowU['vpn_country'] == 'CA' ? 'selected' : '';
    $vpn_country41 = $rowU['vpn_country'] == 'CV' ? 'selected' : '';
    $vpn_country42 = $rowU['vpn_country'] == 'KY' ? 'selected' : '';
    $vpn_country43 = $rowU['vpn_country'] == 'CF' ? 'selected' : '';
    $vpn_country44 = $rowU['vpn_country'] == 'TD' ? 'selected' : '';
    $vpn_country45 = $rowU['vpn_country'] == 'CL' ? 'selected' : '';
    $vpn_country46 = $rowU['vpn_country'] == 'CN' ? 'selected' : '';
    $vpn_country47 = $rowU['vpn_country'] == 'CX' ? 'selected' : '';
    $vpn_country48 = $rowU['vpn_country'] == 'CC' ? 'selected' : '';
    $vpn_country49 = $rowU['vpn_country'] == 'CO' ? 'selected' : '';
    $vpn_country50 = $rowU['vpn_country'] == 'KM' ? 'selected' : '';
    $vpn_country51 = $rowU['vpn_country'] == 'CG' ? 'selected' : '';
    $vpn_country52 = $rowU['vpn_country'] == 'CD' ? 'selected' : '';
    $vpn_country53 = $rowU['vpn_country'] == 'CK' ? 'selected' : '';
    $vpn_country54 = $rowU['vpn_country'] == 'CR' ? 'selected' : '';
    $vpn_country55 = $rowU['vpn_country'] == 'CI' ? 'selected' : '';
    $vpn_country56 = $rowU['vpn_country'] == 'HR' ? 'selected' : '';
    $vpn_country57 = $rowU['vpn_country'] == 'CU' ? 'selected' : '';
    $vpn_country58 = $rowU['vpn_country'] == 'CW' ? 'selected' : '';
    $vpn_country59 = $rowU['vpn_country'] == 'CY' ? 'selected' : '';
    $vpn_country60 = $rowU['vpn_country'] == 'CZ' ? 'selected' : '';
    $vpn_country61 = $rowU['vpn_country'] == 'DK' ? 'selected' : '';
    $vpn_country62 = $rowU['vpn_country'] == 'DJ' ? 'selected' : '';
    $vpn_country63 = $rowU['vpn_country'] == 'DM' ? 'selected' : '';
    $vpn_country64 = $rowU['vpn_country'] == 'DO' ? 'selected' : '';
    $vpn_country65 = $rowU['vpn_country'] == 'EC' ? 'selected' : '';
    $vpn_country66 = $rowU['vpn_country'] == 'EG' ? 'selected' : '';
    $vpn_country67 = $rowU['vpn_country'] == 'SV' ? 'selected' : '';
    $vpn_country68 = $rowU['vpn_country'] == 'GQ' ? 'selected' : '';
    $vpn_country69 = $rowU['vpn_country'] == 'ER' ? 'selected' : '';
    $vpn_country70 = $rowU['vpn_country'] == 'EE' ? 'selected' : '';
    $vpn_country71 = $rowU['vpn_country'] == 'ET' ? 'selected' : '';
    $vpn_country72 = $rowU['vpn_country'] == 'FK' ? 'selected' : '';
    $vpn_country73 = $rowU['vpn_country'] == 'FO' ? 'selected' : '';
    $vpn_country74 = $rowU['vpn_country'] == 'FJ' ? 'selected' : '';
    $vpn_country75 = $rowU['vpn_country'] == 'FI' ? 'selected' : '';
    $vpn_country76 = $rowU['vpn_country'] == 'FR' ? 'selected' : '';
    $vpn_country77 = $rowU['vpn_country'] == 'GF' ? 'selected' : '';
    $vpn_country78 = $rowU['vpn_country'] == 'PF' ? 'selected' : '';
    $vpn_country79 = $rowU['vpn_country'] == 'TF' ? 'selected' : '';
    $vpn_country80 = $rowU['vpn_country'] == 'GA' ? 'selected' : '';
    $vpn_country81 = $rowU['vpn_country'] == 'GM' ? 'selected' : '';
    $vpn_country82 = $rowU['vpn_country'] == 'GE' ? 'selected' : '';
    $vpn_country83 = $rowU['vpn_country'] == 'DE' ? 'selected' : '';
    $vpn_country84 = $rowU['vpn_country'] == 'GH' ? 'selected' : '';
    $vpn_country85 = $rowU['vpn_country'] == 'GI' ? 'selected' : '';
    $vpn_country86 = $rowU['vpn_country'] == 'GR' ? 'selected' : '';
    $vpn_country87 = $rowU['vpn_country'] == 'GL' ? 'selected' : '';
    $vpn_country88 = $rowU['vpn_country'] == 'GD' ? 'selected' : '';
    $vpn_country89 = $rowU['vpn_country'] == 'GP' ? 'selected' : '';
    $vpn_country90 = $rowU['vpn_country'] == 'GU' ? 'selected' : '';
    $vpn_country91 = $rowU['vpn_country'] == 'GT' ? 'selected' : '';
    $vpn_country92 = $rowU['vpn_country'] == 'GG' ? 'selected' : '';
    $vpn_country93 = $rowU['vpn_country'] == 'GN' ? 'selected' : '';
    $vpn_country94 = $rowU['vpn_country'] == 'GW' ? 'selected' : '';
    $vpn_country95 = $rowU['vpn_country'] == 'GY' ? 'selected' : '';
    $vpn_country96 = $rowU['vpn_country'] == 'HT' ? 'selected' : '';
    $vpn_country97 = $rowU['vpn_country'] == 'HM' ? 'selected' : '';
    $vpn_country98 = $rowU['vpn_country'] == 'VA' ? 'selected' : '';
    $vpn_country99 = $rowU['vpn_country'] == 'HN' ? 'selected' : '';
    $vpn_country100 = $rowU['vpn_country'] == 'HK' ? 'selected' : '';
    $vpn_country101 = $rowU['vpn_country'] == 'HU' ? 'selected' : '';
    $vpn_country102 = $rowU['vpn_country'] == 'IS' ? 'selected' : '';
    $vpn_country103 = $rowU['vpn_country'] == 'IN' ? 'selected' : '';
    $vpn_country104 = $rowU['vpn_country'] == 'ID' ? 'selected' : '';
    $vpn_country105 = $rowU['vpn_country'] == 'IR' ? 'selected' : '';
    $vpn_country106 = $rowU['vpn_country'] == 'IQ' ? 'selected' : '';
    $vpn_country107 = $rowU['vpn_country'] == 'IE' ? 'selected' : '';
    $vpn_country108 = $rowU['vpn_country'] == 'IM' ? 'selected' : '';
    $vpn_country109 = $rowU['vpn_country'] == 'IL' ? 'selected' : '';
    $vpn_country110 = $rowU['vpn_country'] == 'IT' ? 'selected' : '';
    $vpn_country111 = $rowU['vpn_country'] == 'JM' ? 'selected' : '';
    $vpn_country112 = $rowU['vpn_country'] == 'JP' ? 'selected' : '';
    $vpn_country113 = $rowU['vpn_country'] == 'JE' ? 'selected' : '';
    $vpn_country114 = $rowU['vpn_country'] == 'JO' ? 'selected' : '';
    $vpn_country115 = $rowU['vpn_country'] == 'KZ' ? 'selected' : '';
    $vpn_country116 = $rowU['vpn_country'] == 'KE' ? 'selected' : '';
    $vpn_country117 = $rowU['vpn_country'] == 'KI' ? 'selected' : '';
    $vpn_country118 = $rowU['vpn_country'] == 'KP' ? 'selected' : '';
    $vpn_country119 = $rowU['vpn_country'] == 'KR' ? 'selected' : '';
    $vpn_country120 = $rowU['vpn_country'] == 'KW' ? 'selected' : '';
    $vpn_country121 = $rowU['vpn_country'] == 'KG' ? 'selected' : '';
    $vpn_country122 = $rowU['vpn_country'] == 'LA' ? 'selected' : '';
    $vpn_country123 = $rowU['vpn_country'] == 'LV' ? 'selected' : '';
    $vpn_country124 = $rowU['vpn_country'] == 'LB' ? 'selected' : '';
    $vpn_country125 = $rowU['vpn_country'] == 'LS' ? 'selected' : '';
    $vpn_country126 = $rowU['vpn_country'] == 'LR' ? 'selected' : '';
    $vpn_country127 = $rowU['vpn_country'] == 'LY' ? 'selected' : '';
    $vpn_country128 = $rowU['vpn_country'] == 'LI' ? 'selected' : '';
    $vpn_country129 = $rowU['vpn_country'] == 'LT' ? 'selected' : '';
    $vpn_country130 = $rowU['vpn_country'] == 'LU' ? 'selected' : '';
    $vpn_country131 = $rowU['vpn_country'] == 'MO' ? 'selected' : '';
    $vpn_country132 = $rowU['vpn_country'] == 'MK' ? 'selected' : '';
    $vpn_country133 = $rowU['vpn_country'] == 'MG' ? 'selected' : '';
    $vpn_country134 = $rowU['vpn_country'] == 'MW' ? 'selected' : '';
    $vpn_country135 = $rowU['vpn_country'] == 'MY' ? 'selected' : '';
    $vpn_country136 = $rowU['vpn_country'] == 'MV' ? 'selected' : '';
    $vpn_country137 = $rowU['vpn_country'] == 'ML' ? 'selected' : '';
    $vpn_country138 = $rowU['vpn_country'] == 'MT' ? 'selected' : '';
    $vpn_country139 = $rowU['vpn_country'] == 'MH' ? 'selected' : '';
    $vpn_country140 = $rowU['vpn_country'] == 'MQ' ? 'selected' : '';
    $vpn_country141 = $rowU['vpn_country'] == 'MR' ? 'selected' : '';
    $vpn_country142 = $rowU['vpn_country'] == 'MU' ? 'selected' : '';
    $vpn_country143 = $rowU['vpn_country'] == 'YT' ? 'selected' : '';
    $vpn_country144 = $rowU['vpn_country'] == 'MX' ? 'selected' : '';
    $vpn_country145 = $rowU['vpn_country'] == 'FM' ? 'selected' : '';
    $vpn_country146 = $rowU['vpn_country'] == 'MD' ? 'selected' : '';
    $vpn_country147 = $rowU['vpn_country'] == 'MC' ? 'selected' : '';
    $vpn_country148 = $rowU['vpn_country'] == 'MN' ? 'selected' : '';
    $vpn_country149 = $rowU['vpn_country'] == 'ME' ? 'selected' : '';
    $vpn_country150 = $rowU['vpn_country'] == 'MS' ? 'selected' : '';
    $vpn_country151 = $rowU['vpn_country'] == 'MA' ? 'selected' : '';
    $vpn_country152 = $rowU['vpn_country'] == 'MZ' ? 'selected' : '';
    $vpn_country153 = $rowU['vpn_country'] == 'MM' ? 'selected' : '';
    $vpn_country154 = $rowU['vpn_country'] == 'NA' ? 'selected' : '';
    $vpn_country155 = $rowU['vpn_country'] == 'NR' ? 'selected' : '';
    $vpn_country156 = $rowU['vpn_country'] == 'NP' ? 'selected' : '';
    $vpn_country157 = $rowU['vpn_country'] == 'NL' ? 'selected' : '';
    $vpn_country158 = $rowU['vpn_country'] == 'NC' ? 'selected' : '';
    $vpn_country159 = $rowU['vpn_country'] == 'NZ' ? 'selected' : '';
    $vpn_country160 = $rowU['vpn_country'] == 'NI' ? 'selected' : '';
    $vpn_country161 = $rowU['vpn_country'] == 'NE' ? 'selected' : '';
    $vpn_country162 = $rowU['vpn_country'] == 'NG' ? 'selected' : '';
    $vpn_country163 = $rowU['vpn_country'] == 'NU' ? 'selected' : '';
    $vpn_country164 = $rowU['vpn_country'] == 'NF' ? 'selected' : '';
    $vpn_country165 = $rowU['vpn_country'] == 'MP' ? 'selected' : '';
    $vpn_country166 = $rowU['vpn_country'] == 'NO' ? 'selected' : '';
    $vpn_country167 = $rowU['vpn_country'] == 'OM' ? 'selected' : '';
    $vpn_country168 = $rowU['vpn_country'] == 'PK' ? 'selected' : '';
    $vpn_country169 = $rowU['vpn_country'] == 'PW' ? 'selected' : '';
    $vpn_country170 = $rowU['vpn_country'] == 'PS' ? 'selected' : '';
    $vpn_country171 = $rowU['vpn_country'] == 'PA' ? 'selected' : '';
    $vpn_country172 = $rowU['vpn_country'] == 'PG' ? 'selected' : '';
    $vpn_country173 = $rowU['vpn_country'] == 'PY' ? 'selected' : '';
    $vpn_country174 = $rowU['vpn_country'] == 'PE' ? 'selected' : '';
    $vpn_country175 = $rowU['vpn_country'] == 'PH' ? 'selected' : '';
    $vpn_country176 = $rowU['vpn_country'] == 'PN' ? 'selected' : '';
    $vpn_country177 = $rowU['vpn_country'] == 'PL' ? 'selected' : '';
    $vpn_country178 = $rowU['vpn_country'] == 'PT' ? 'selected' : '';
    $vpn_country179 = $rowU['vpn_country'] == 'PR' ? 'selected' : '';
    $vpn_country180 = $rowU['vpn_country'] == 'QA' ? 'selected' : '';
    $vpn_country181 = $rowU['vpn_country'] == 'RE' ? 'selected' : '';
    $vpn_country182 = $rowU['vpn_country'] == 'RO' ? 'selected' : '';
    $vpn_country183 = $rowU['vpn_country'] == 'RU' ? 'selected' : '';
    $vpn_country184 = $rowU['vpn_country'] == 'RW' ? 'selected' : '';
    $vpn_country185 = $rowU['vpn_country'] == 'BL' ? 'selected' : '';
    $vpn_country186 = $rowU['vpn_country'] == 'SH' ? 'selected' : '';
    $vpn_country187 = $rowU['vpn_country'] == 'KN' ? 'selected' : '';
    $vpn_country188 = $rowU['vpn_country'] == 'LC' ? 'selected' : '';
    $vpn_country189 = $rowU['vpn_country'] == 'MF' ? 'selected' : '';
    $vpn_country190 = $rowU['vpn_country'] == 'PM' ? 'selected' : '';
    $vpn_country191 = $rowU['vpn_country'] == 'VC' ? 'selected' : '';
    $vpn_country192 = $rowU['vpn_country'] == 'WS' ? 'selected' : '';
    $vpn_country193 = $rowU['vpn_country'] == 'SM' ? 'selected' : '';
    $vpn_country194 = $rowU['vpn_country'] == 'ST' ? 'selected' : '';
    $vpn_country195 = $rowU['vpn_country'] == 'SA' ? 'selected' : '';
    $vpn_country196 = $rowU['vpn_country'] == 'SN' ? 'selected' : '';
    $vpn_country197 = $rowU['vpn_country'] == 'RS' ? 'selected' : '';
    $vpn_country198 = $rowU['vpn_country'] == 'SC' ? 'selected' : '';
    $vpn_country199 = $rowU['vpn_country'] == 'SL' ? 'selected' : '';
    $vpn_country200 = $rowU['vpn_country'] == 'SG' ? 'selected' : '';
    $vpn_country201 = $rowU['vpn_country'] == 'SX' ? 'selected' : '';
    $vpn_country202 = $rowU['vpn_country'] == 'SK' ? 'selected' : '';
    $vpn_country203 = $rowU['vpn_country'] == 'SI' ? 'selected' : '';
    $vpn_country204 = $rowU['vpn_country'] == 'SB' ? 'selected' : '';
    $vpn_country205 = $rowU['vpn_country'] == 'SO' ? 'selected' : '';
    $vpn_country206 = $rowU['vpn_country'] == 'ZA' ? 'selected' : '';
    $vpn_country207 = $rowU['vpn_country'] == 'GS' ? 'selected' : '';
    $vpn_country208 = $rowU['vpn_country'] == 'SS' ? 'selected' : '';
    $vpn_country209 = $rowU['vpn_country'] == 'ES' ? 'selected' : '';
    $vpn_country210 = $rowU['vpn_country'] == 'LK' ? 'selected' : '';
    $vpn_country211 = $rowU['vpn_country'] == 'SD' ? 'selected' : '';
    $vpn_country212 = $rowU['vpn_country'] == 'SR' ? 'selected' : '';
    $vpn_country213 = $rowU['vpn_country'] == 'SJ' ? 'selected' : '';
    $vpn_country214 = $rowU['vpn_country'] == 'SZ' ? 'selected' : '';
    $vpn_country215 = $rowU['vpn_country'] == 'SE' ? 'selected' : '';
    $vpn_country216 = $rowU['vpn_country'] == 'CH' ? 'selected' : '';
    $vpn_country217 = $rowU['vpn_country'] == 'SY' ? 'selected' : '';
    $vpn_country218 = $rowU['vpn_country'] == 'TW' ? 'selected' : '';
    $vpn_country219 = $rowU['vpn_country'] == 'TJ' ? 'selected' : '';
    $vpn_country220 = $rowU['vpn_country'] == 'TZ' ? 'selected' : '';
    $vpn_country221 = $rowU['vpn_country'] == 'TH' ? 'selected' : '';
    $vpn_country222 = $rowU['vpn_country'] == 'TL' ? 'selected' : '';
    $vpn_country223 = $rowU['vpn_country'] == 'TG' ? 'selected' : '';
    $vpn_country224 = $rowU['vpn_country'] == 'TK' ? 'selected' : '';
    $vpn_country225 = $rowU['vpn_country'] == 'TO' ? 'selected' : '';
    $vpn_country226 = $rowU['vpn_country'] == 'TT' ? 'selected' : '';
    $vpn_country227 = $rowU['vpn_country'] == 'TN' ? 'selected' : '';
    $vpn_country228 = $rowU['vpn_country'] == 'TR' ? 'selected' : '';
    $vpn_country229 = $rowU['vpn_country'] == 'TM' ? 'selected' : '';
    $vpn_country230 = $rowU['vpn_country'] == 'TC' ? 'selected' : '';
    $vpn_country231 = $rowU['vpn_country'] == 'TV' ? 'selected' : '';
    $vpn_country232 = $rowU['vpn_country'] == 'UG' ? 'selected' : '';
    $vpn_country233 = $rowU['vpn_country'] == 'UA' ? 'selected' : '';
    $vpn_country234 = $rowU['vpn_country'] == 'AE' ? 'selected' : '';
    $vpn_country235 = $rowU['vpn_country'] == 'GB' ? 'selected' : '';
    $vpn_country236 = $rowU['vpn_country'] == 'US' ? 'selected' : '';
    $vpn_country237 = $rowU['vpn_country'] == 'UM' ? 'selected' : '';
    $vpn_country238 = $rowU['vpn_country'] == 'UY' ? 'selected' : '';
    $vpn_country239 = $rowU['vpn_country'] == 'UZ' ? 'selected' : '';
    $vpn_country240 = $rowU['vpn_country'] == 'VU' ? 'selected' : '';
    $vpn_country241 = $rowU['vpn_country'] == 'VE' ? 'selected' : '';
    $vpn_country242 = $rowU['vpn_country'] == 'VN' ? 'selected' : '';
    $vpn_country243 = $rowU['vpn_country'] == 'VG' ? 'selected' : '';
    $vpn_country244 = $rowU['vpn_country'] == 'VI' ? 'selected' : '';
    $vpn_country245 = $rowU['vpn_country'] == 'WF' ? 'selected' : '';
    $vpn_country246 = $rowU['vpn_country'] == 'EH' ? 'selected' : '';
    $vpn_country247 = $rowU['vpn_country'] == 'YE' ? 'selected' : '';
    $vpn_country248 = $rowU['vpn_country'] == 'ZM' ? 'selected' : '';
    $vpn_country249 = $rowU['vpn_country'] == 'ZW' ? 'selected' : '';
    $vpn_state = $rowU['vpn_state'];
    $vpn_config = $rowU['vpn_config'];
    $auth_type = $rowU['auth_type'] == 'noup' ? 'selected' : '';
    $auth_type1 = $rowU['auth_type'] == 'up' ? 'selected' : '';
    $auth_type2 = $rowU['auth_type'] == 'kp' ? 'selected' : '';
    $username = $rowU['username'];
    $password = $rowU['password'];
    $vpn_status = $rowU['vpn_status'] == 'ACTIVE' ? 'selected' : '';
    $vpn_status1 = $rowU['vpn_status'] == 'ACTIVE' ? 'selected' : '';
    $auth_embedded = $rowU['auth_embedded'] == 'YES' ? 'selected' : '';
    $auth_embedded1 = $rowU['auth_embedded'] == 'NO' ? 'selected' : '';
    //update form
    echo "        <div class=\"col-md-8 mx-auto\">
";
    echo "            <div class=\"card-body\">
";
    echo "                <div class=\"card bg-primary text-white\">
";
    echo "                    <div class=\"card-header card-header-warning\">
";
    echo "                        <center>
";
    echo "                            <h2><i class=\"icon icon-bullhorn\"></i>$Htitle</h2>
";
    echo "                        </center>
";
    echo "                    </div>
";
    echo "                    
";
    echo "                    <div class=\"card-body\">
";
    echo "
";
    echo "                        <div class=\"col-12\">
";
    echo "                            <h3>Add OVPN Server</h3>
";
    echo "                        </div>
";
    echo "                            <form method=\"post\">
";
    echo "                                <input class=\"form-control\" id=\"date\" name=\"date\" value=\"" . date("Y-m-d h:i:s") . "\" type=\"hidden\"/>
";
    echo "                                <input class=\"form-control\" id=\"userid\" name=\"userid\" value=\"521064\" type=\"hidden\"/>
";
    echo "                                <input class=\"form-control\" id=\"vpn_appid\" name=\"vpn_appid\" value=\"1646\" type=\"hidden\"/>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_state\">
";
    echo "                                        State/Province
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"vpn_state\" name=\"vpn_state\" placeholder=\"Enter State/Province\" value=\"$vpn_state\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_config\">
";
    echo "                                        OpenVPN Config URL
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"vpn_config\" name=\"vpn_config\" placeholder=\"Enter OpenVPN Config URL\" value=\"$vpn_config\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"auth_type\" >
";
    echo "                                        Authentication Type
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"auth_type\" name=\"auth_type\">
";
    echo "                                        <option value=\"noup\" $auth_type >Username and Password are not required</option>
";
    echo "                                        <option value=\"up\" $auth_type1 >Username and Password required</option>
";
    echo "                                        <option value=\"kp\" $auth_type2 >Key file password Required</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"username\">
";
    echo "                                        Embedded Username
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"username\" name=\"username\" placeholder=\"Enter Username\" value=\"$username\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"password\">
";
    echo "                                        Embedded Password 
";
    echo "                                    </label>
";
    echo "                                    <div class=\"input-group\">
";
    echo "                                        <input class=\"form-control\" id=\"password\" name=\"password\" placeholder=\"Enter Password\" value=\"$password\" type=\"text\"/>
";
    echo "                                    </div>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"vpn_status\" >
";
    echo "                                        Status
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"vpn_status\" name=\"vpn_status\">
";
    echo "                                        <option value=\"ACTIVE\" $vpn_status>ACTIVE</option>
";
    echo "                                        <option value=\"INACTIVE\" $vpn_status1>INACTIVE</option>
";
    echo "                  
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group \">
";
    echo "                                    <label class=\"control-label \" for=\"auth_embedded\" >
";
    echo "                                        Auth Embedded
";
    echo "                                    </label>
";
    echo "                                    <select class=\"select form-control\" id=\"auth_embedded\" name=\"auth_embedded\">
";
    echo "                                        <option value=\"NO\" $auth_embedded1 >NO</option>
";
    echo "                                        <option value=\"YES\" $auth_embedded >YES</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group\">
";
    echo "                                    <label class=\"form-label\" for=\"vpn_country\">vpn_country</label>
";
    echo "                                    <select class=\"select form-control\" id=\"select\" name=\"vpn_country\">
";
    echo "                                            <option value=\"AF\" $vpn_country1  >Afghanistan</option>
";
    echo "                                            <option value=\"AX\" $vpn_country2  >Åland Islands</option>
";
    echo "                                            <option value=\"AL\" $vpn_country3  >Albania</option>
";
    echo "                                            <option value=\"DZ\" $vpn_country4  >Algeria</option>
";
    echo "                                            <option value=\"AS\" $vpn_country5  >American Samoa</option>
";
    echo "                                            <option value=\"AD\" $vpn_country6  >Andorra</option>
";
    echo "                                            <option value=\"AO\" $vpn_country7  >Angola</option>
";
    echo "                                            <option value=\"AI\" $vpn_country8  >Anguilla</option>
";
    echo "                                            <option value=\"AQ\" $vpn_country9  >Antarctica</option>
";
    echo "                                            <option value=\"AG\" $vpn_country10 >Antigua and Barbuda</option>
";
    echo "                                            <option value=\"AR\" $vpn_country11 >Argentina</option>
";
    echo "                                            <option value=\"AM\" $vpn_country12 >Armenia</option>
";
    echo "                                            <option value=\"AW\" $vpn_country13 >Aruba</option>
";
    echo "                                            <option value=\"AU\" $vpn_country14 >Australia</option>
";
    echo "                                            <option value=\"AT\" $vpn_country15 >Austria</option>
";
    echo "                                            <option value=\"AZ\" $vpn_country16 >Azerbaijan</option>
";
    echo "                                            <option value=\"BS\" $vpn_country17 >Bahamas</option>
";
    echo "                                            <option value=\"BH\" $vpn_country18 >Bahrain</option>
";
    echo "                                            <option value=\"BD\" $vpn_country19 >Bangladesh</option>
";
    echo "                                            <option value=\"BB\" $vpn_country20 >Barbados</option>
";
    echo "                                            <option value=\"BY\" $vpn_country21 >Belarus</option>
";
    echo "                                            <option value=\"BE\" $vpn_country22 >Belgium</option>
";
    echo "                                            <option value=\"BZ\" $vpn_country23 >Belize</option>
";
    echo "                                            <option value=\"BJ\" $vpn_country24 >Benin</option>
";
    echo "                                            <option value=\"BM\" $vpn_country25 >Bermuda</option>
";
    echo "                                            <option value=\"BT\" $vpn_country26 >Bhutan</option>
";
    echo "                                            <option value=\"BO\" $vpn_country27 >Bolivia, Plurinational State of</option>
";
    echo "                                            <option value=\"BQ\" $vpn_country28 >Bonaire, Sint Eustatius and Saba</option>
";
    echo "                                            <option value=\"BA\" $vpn_country29 >Bosnia and Herzegovina</option>
";
    echo "                                            <option value=\"BW\" $vpn_country30 >Botswana</option>
";
    echo "                                            <option value=\"BV\" $vpn_country31 >Bouvet Island</option>
";
    echo "                                            <option value=\"BR\" $vpn_country32 >Brazil</option>
";
    echo "                                            <option value=\"IO\" $vpn_country33 >British Indian Ocean Territory</option>
";
    echo "                                            <option value=\"BN\" $vpn_country34 >Brunei Darussalam</option>
";
    echo "                                            <option value=\"BG\" $vpn_country35 >Bulgaria</option>
";
    echo "                                            <option value=\"BF\" $vpn_country36 >Burkina Faso</option>
";
    echo "                                            <option value=\"BI\" $vpn_country37 >Burundi</option>
";
    echo "                                            <option value=\"KH\" $vpn_country38 >Cambodia</option>
";
    echo "                                            <option value=\"CM\" $vpn_country39 >Cameroon</option>
";
    echo "                                            <option value=\"CA\" $vpn_country40 >Canada</option>
";
    echo "                                            <option value=\"CV\" $vpn_country41 >Cape Verde</option>
";
    echo "                                            <option value=\"KY\" $vpn_country42 >Cayman Islands</option>
";
    echo "                                            <option value=\"CF\" $vpn_country43 >Central African Republic</option>
";
    echo "                                            <option value=\"TD\" $vpn_country44 >Chad</option>
";
    echo "                                            <option value=\"CL\" $vpn_country45 >Chile</option>
";
    echo "                                            <option value=\"CN\" $vpn_country46 >China</option>
";
    echo "                                            <option value=\"CX\" $vpn_country47 >Christmas Island</option>
";
    echo "                                            <option value=\"CC\" $vpn_country48 >Cocos (Keeling) Islands</option>
";
    echo "                                            <option value=\"CO\" $vpn_country49 >Colombia</option>
";
    echo "                                            <option value=\"KM\" $vpn_country50 >Comoros</option>
";
    echo "                                            <option value=\"CG\" $vpn_country51 >Congo</option>
";
    echo "                                            <option value=\"CD\" $vpn_country52 >Congo, the Democratic Republic of the</option>
";
    echo "                                            <option value=\"CK\" $vpn_country53 >Cook Islands</option>
";
    echo "                                            <option value=\"CR\" $vpn_country54 >Costa Rica</option>
";
    echo "                                            <option value=\"CI\" $vpn_country55 >Côte d\'Ivoire</option>
";
    echo "                                            <option value=\"HR\" $vpn_country56 >Croatia</option>
";
    echo "                                            <option value=\"CU\" $vpn_country57 >Cuba</option>
";
    echo "                                            <option value=\"CW\" $vpn_country58 >Curaçao</option>
";
    echo "                                            <option value=\"CY\" $vpn_country59 >Cyprus</option>
";
    echo "                                            <option value=\"CZ\" $vpn_country60 >Czech Republic</option>
";
    echo "                                            <option value=\"DK\" $vpn_country61 >Denmark</option>
";
    echo "                                            <option value=\"DJ\" $vpn_country62 >Djibouti</option>
";
    echo "                                            <option value=\"DM\" $vpn_country63 >Dominica</option>
";
    echo "                                            <option value=\"DO\" $vpn_country64 >Dominican Republic</option>
";
    echo "                                            <option value=\"EC\" $vpn_country65 >Ecuador</option>
";
    echo "                                            <option value=\"EG\" $vpn_country66 >Egypt</option>
";
    echo "                                            <option value=\"SV\" $vpn_country67 >El Salvador</option>
";
    echo "                                            <option value=\"GQ\" $vpn_country68 >Equatorial Guinea</option>
";
    echo "                                            <option value=\"ER\" $vpn_country69 >Eritrea</option>
";
    echo "                                            <option value=\"EE\" $vpn_country70 >Estonia</option>
";
    echo "                                            <option value=\"ET\" $vpn_country71 >Ethiopia</option>
";
    echo "                                            <option value=\"FK\" $vpn_country72 >Falkland Islands (Malvinas)</option>
";
    echo "                                            <option value=\"FO\" $vpn_country73 >Faroe Islands</option>
";
    echo "                                            <option value=\"FJ\" $vpn_country74 >Fiji</option>
";
    echo "                                            <option value=\"FI\" $vpn_country75 >Finland</option>
";
    echo "                                            <option value=\"FR\" $vpn_country76 >France</option>
";
    echo "                                            <option value=\"GF\" $vpn_country77 >French Guiana</option>
";
    echo "                                            <option value=\"PF\" $vpn_country78 >French Polynesia</option>
";
    echo "                                            <option value=\"TF\" $vpn_country79 >French Southern Territories</option>
";
    echo "                                            <option value=\"GA\" $vpn_country80 >Gabon</option>
";
    echo "                                            <option value=\"GM\" $vpn_country81 >Gambia</option>
";
    echo "                                            <option value=\"GE\" $vpn_country82 >Georgia</option>
";
    echo "                                            <option value=\"DE\" $vpn_country83 >Germany</option>
";
    echo "                                            <option value=\"GH\" $vpn_country84 >Ghana</option>
";
    echo "                                            <option value=\"GI\" $vpn_country85 >Gibraltar</option>
";
    echo "                                            <option value=\"GR\" $vpn_country86 >Greece</option>
";
    echo "                                            <option value=\"GL\" $vpn_country87 >Greenland</option>
";
    echo "                                            <option value=\"GD\" $vpn_country88 >Grenada</option>
";
    echo "                                            <option value=\"GP\" $vpn_country89 >Guadeloupe</option>
";
    echo "                                            <option value=\"GU\" $vpn_country90 >Guam</option>
";
    echo "                                            <option value=\"GT\" $vpn_country91 >Guatemala</option>
";
    echo "                                            <option value=\"GG\" $vpn_country92 >Guernsey</option>
";
    echo "                                            <option value=\"GN\" $vpn_country93 >Guinea</option>
";
    echo "                                            <option value=\"GW\" $vpn_country94 >Guinea-Bissau</option>
";
    echo "                                            <option value=\"GY\" $vpn_country95 >Guyana</option>
";
    echo "                                            <option value=\"HT\" $vpn_country96 >Haiti</option>
";
    echo "                                            <option value=\"HM\" $vpn_country97 >Heard Island and McDonald Islands</option>
";
    echo "                                            <option value=\"VA\" $vpn_country98 >Holy See (Vatican City State)</option>
";
    echo "                                            <option value=\"HN\" $vpn_country99 >Honduras</option>
";
    echo "                                            <option value=\"HK\" $vpn_country100>Hong Kong</option>
";
    echo "                                            <option value=\"HU\" $vpn_country101>Hungary</option>
";
    echo "                                            <option value=\"IS\" $vpn_country102>Iceland</option>
";
    echo "                                            <option value=\"IN\" $vpn_country103>India</option>
";
    echo "                                            <option value=\"ID\" $vpn_country104>Indonesia</option>
";
    echo "                                            <option value=\"IR\" $vpn_country105>Iran, Islamic Republic of</option>
";
    echo "                                            <option value=\"IQ\" $vpn_country106>Iraq</option>
";
    echo "                                            <option value=\"IE\" $vpn_country107>Ireland</option>
";
    echo "                                            <option value=\"IM\" $vpn_country108>Isle of Man</option>
";
    echo "                                            <option value=\"IL\" $vpn_country109>Israel</option>
";
    echo "                                            <option value=\"IT\" $vpn_country110>Italy</option>
";
    echo "                                            <option value=\"JM\" $vpn_country111>Jamaica</option>
";
    echo "                                            <option value=\"JP\" $vpn_country112>Japan</option>
";
    echo "                                            <option value=\"JE\" $vpn_country113>Jersey</option>
";
    echo "                                            <option value=\"JO\" $vpn_country114>Jordan</option>
";
    echo "                                            <option value=\"KZ\" $vpn_country115>Kazakhstan</option>
";
    echo "                                            <option value=\"KE\" $vpn_country116>Kenya</option>
";
    echo "                                            <option value=\"KI\" $vpn_country117>Kiribati</option>
";
    echo "                                            <option value=\"KP\" $vpn_country118>Korea, Democratic People\'s Republic of</option>
";
    echo "                                            <option value=\"KR\" $vpn_country119>Korea, Republic of</option>
";
    echo "                                            <option value=\"KW\" $vpn_country120>Kuwait</option>
";
    echo "                                            <option value=\"KG\" $vpn_country121>Kyrgyzstan</option>
";
    echo "                                            <option value=\"LA\" $vpn_country122>Lao People\'s Democratic Republic</option>
";
    echo "                                            <option value=\"LV\" $vpn_country123>Latvia</option>
";
    echo "                                            <option value=\"LB\" $vpn_country124>Lebanon</option>
";
    echo "                                            <option value=\"LS\" $vpn_country125>Lesotho</option>
";
    echo "                                            <option value=\"LR\" $vpn_country126>Liberia</option>
";
    echo "                                            <option value=\"LY\" $vpn_country127>Libya</option>
";
    echo "                                            <option value=\"LI\" $vpn_country128>Liechtenstein</option>
";
    echo "                                            <option value=\"LT\" $vpn_country129>Lithuania</option>
";
    echo "                                            <option value=\"LU\" $vpn_country130>Luxembourg</option>
";
    echo "                                            <option value=\"MO\" $vpn_country131>Macao</option>
";
    echo "                                            <option value=\"MK\" $vpn_country132>Macedonia, the former Yugoslav Republic of</option>
";
    echo "                                            <option value=\"MG\" $vpn_country133>Madagascar</option>
";
    echo "                                            <option value=\"MW\" $vpn_country134>Malawi</option>
";
    echo "                                            <option value=\"MY\" $vpn_country135>Malaysia</option>
";
    echo "                                            <option value=\"MV\" $vpn_country136>Maldives</option>
";
    echo "                                            <option value=\"ML\" $vpn_country137>Mali</option>
";
    echo "                                            <option value=\"MT\" $vpn_country138>Malta</option>
";
    echo "                                            <option value=\"MH\" $vpn_country139>Marshall Islands</option>
";
    echo "                                            <option value=\"MQ\" $vpn_country140>Martinique</option>
";
    echo "                                            <option value=\"MR\" $vpn_country141>Mauritania</option>
";
    echo "                                            <option value=\"MU\" $vpn_country142>Mauritius</option>
";
    echo "                                            <option value=\"YT\" $vpn_country143>Mayotte</option>
";
    echo "                                            <option value=\"MX\" $vpn_country144>Mexico</option>
";
    echo "                                            <option value=\"FM\" $vpn_country145>Micronesia, Federated States of</option>
";
    echo "                                            <option value=\"MD\" $vpn_country146>Moldova, Republic of</option>
";
    echo "                                            <option value=\"MC\" $vpn_country147>Monaco</option>
";
    echo "                                            <option value=\"MN\" $vpn_country148>Mongolia</option>
";
    echo "                                            <option value=\"ME\" $vpn_country149>Montenegro</option>
";
    echo "                                            <option value=\"MS\" $vpn_country150>Montserrat</option>
";
    echo "                                            <option value=\"MA\" $vpn_country151>Morocco</option>
";
    echo "                                            <option value=\"MZ\" $vpn_country152>Mozambique</option>
";
    echo "                                            <option value=\"MM\" $vpn_country153>Myanmar</option>
";
    echo "                                            <option value=\"NA\" $vpn_country154>Namibia</option>
";
    echo "                                            <option value=\"NR\" $vpn_country155>Nauru</option>
";
    echo "                                            <option value=\"NP\" $vpn_country156>Nepal</option>
";
    echo "                                            <option value=\"NL\" $vpn_country157>Netherlands</option>
";
    echo "                                            <option value=\"NC\" $vpn_country158>New Caledonia</option>
";
    echo "                                            <option value=\"NZ\" $vpn_country159>New Zealand</option>
";
    echo "                                            <option value=\"NI\" $vpn_country160>Nicaragua</option>
";
    echo "                                            <option value=\"NE\" $vpn_country161>Niger</option>
";
    echo "                                            <option value=\"NG\" $vpn_country162>Nigeria</option>
";
    echo "                                            <option value=\"NU\" $vpn_country163>Niue</option>
";
    echo "                                            <option value=\"NF\" $vpn_country164>Norfolk Island</option>
";
    echo "                                            <option value=\"MP\" $vpn_country165>Northern Mariana Islands</option>
";
    echo "                                            <option value=\"NO\" $vpn_country166>Norway</option>
";
    echo "                                            <option value=\"OM\" $vpn_country167>Oman</option>
";
    echo "                                            <option value=\"PK\" $vpn_country168>Pakistan</option>
";
    echo "                                            <option value=\"PW\" $vpn_country169>Palau</option>
";
    echo "                                            <option value=\"PS\" $vpn_country170>Palestinian Territory, Occupied</option>
";
    echo "                                            <option value=\"PA\" $vpn_country171>Panama</option>
";
    echo "                                            <option value=\"PG\" $vpn_country172>Papua New Guinea</option>
";
    echo "                                            <option value=\"PY\" $vpn_country173>Paraguay</option>
";
    echo "                                            <option value=\"PE\" $vpn_country174>Peru</option>
";
    echo "                                            <option value=\"PH\" $vpn_country175>Philippines</option>
";
    echo "                                            <option value=\"PN\" $vpn_country176>Pitcairn</option>
";
    echo "                                            <option value=\"PL\" $vpn_country177>Poland</option>
";
    echo "                                            <option value=\"PT\" $vpn_country178>Portugal</option>
";
    echo "                                            <option value=\"PR\" $vpn_country179>Puerto Rico</option>
";
    echo "                                            <option value=\"QA\" $vpn_country180>Qatar</option>
";
    echo "                                            <option value=\"RE\" $vpn_country181>Réunion</option>
";
    echo "                                            <option value=\"RO\" $vpn_country182>Romania</option>
";
    echo "                                            <option value=\"RU\" $vpn_country183>Russian Federation</option>
";
    echo "                                            <option value=\"RW\" $vpn_country184>Rwanda</option>
";
    echo "                                            <option value=\"BL\" $vpn_country185>Saint Barthélemy</option>
";
    echo "                                            <option value=\"SH\" $vpn_country186>Saint Helena, Ascension and Tristan da Cunha</option>
";
    echo "                                            <option value=\"KN\" $vpn_country187>Saint Kitts and Nevis</option>
";
    echo "                                            <option value=\"LC\" $vpn_country188>Saint Lucia</option>
";
    echo "                                            <option value=\"MF\" $vpn_country189>Saint Martin (French part)</option>
";
    echo "                                            <option value=\"PM\" $vpn_country190>Saint Pierre and Miquelon</option>
";
    echo "                                            <option value=\"VC\" $vpn_country191>Saint Vincent and the Grenadines</option>
";
    echo "                                            <option value=\"WS\" $vpn_country192>Samoa</option>
";
    echo "                                            <option value=\"SM\" $vpn_country193>San Marino</option>
";
    echo "                                            <option value=\"ST\" $vpn_country194>Sao Tome and Principe</option>
";
    echo "                                            <option value=\"SA\" $vpn_country195>Saudi Arabia</option>
";
    echo "                                            <option value=\"SN\" $vpn_country196>Senegal</option>
";
    echo "                                            <option value=\"RS\" $vpn_country197>Serbia</option>
";
    echo "                                            <option value=\"SC\" $vpn_country198>Seychelles</option>
";
    echo "                                            <option value=\"SL\" $vpn_country199>Sierra Leone</option>
";
    echo "                                            <option value=\"SG\" $vpn_country200>Singapore</option>
";
    echo "                                            <option value=\"SX\" $vpn_country201>Sint Maarten (Dutch part)</option>
";
    echo "                                            <option value=\"SK\" $vpn_country202>Slovakia</option>
";
    echo "                                            <option value=\"SI\" $vpn_country203>Slovenia</option>
";
    echo "                                            <option value=\"SB\" $vpn_country204>Solomon Islands</option>
";
    echo "                                            <option value=\"SO\" $vpn_country205>Somalia</option>
";
    echo "                                            <option value=\"ZA\" $vpn_country206>South Africa</option>
";
    echo "                                            <option value=\"GS\" $vpn_country207>South Georgia and the South Sandwich Islands</option>
";
    echo "                                            <option value=\"SS\" $vpn_country208>South Sudan</option>
";
    echo "                                            <option value=\"ES\" $vpn_country209>Spain</option>
";
    echo "                                            <option value=\"LK\" $vpn_country210>Sri Lanka</option>
";
    echo "                                            <option value=\"SD\" $vpn_country211>Sudan</option>
";
    echo "                                            <option value=\"SR\" $vpn_country212>Suriname</option>
";
    echo "                                            <option value=\"SJ\" $vpn_country213>Svalbard and Jan Mayen</option>
";
    echo "                                            <option value=\"SZ\" $vpn_country214>Swaziland</option>
";
    echo "                                            <option value=\"SE\" $vpn_country215>Sweden</option>
";
    echo "                                            <option value=\"CH\" $vpn_country216>Switzerland</option>
";
    echo "                                            <option value=\"SY\" $vpn_country217>Syrian Arab Republic</option>
";
    echo "                                            <option value=\"TW\" $vpn_country218>Taiwan, Province of China</option>
";
    echo "                                            <option value=\"TJ\" $vpn_country219>Tajikistan</option>
";
    echo "                                            <option value=\"TZ\" $vpn_country220>Tanzania, United Republic of</option>
";
    echo "                                            <option value=\"TH\" $vpn_country221>Thailand</option>
";
    echo "                                            <option value=\"TL\" $vpn_country222>Timor-Leste</option>
";
    echo "                                            <option value=\"TG\" $vpn_country223>Togo</option>
";
    echo "                                            <option value=\"TK\" $vpn_country224>Tokelau</option>
";
    echo "                                            <option value=\"TO\" $vpn_country225>Tonga</option>
";
    echo "                                            <option value=\"TT\" $vpn_country226>Trinidad and Tobago</option>
";
    echo "                                            <option value=\"TN\" $vpn_country227>Tunisia</option>
";
    echo "                                            <option value=\"TR\" $vpn_country228>Turkey</option>
";
    echo "                                            <option value=\"TM\" $vpn_country229>Turkmenistan</option>
";
    echo "                                            <option value=\"TC\" $vpn_country230>Turks and Caicos Islands</option>
";
    echo "                                            <option value=\"TV\" $vpn_country231>Tuvalu</option>
";
    echo "                                            <option value=\"UG\" $vpn_country232>Uganda</option>
";
    echo "                                            <option value=\"UA\" $vpn_country233>Ukraine</option>
";
    echo "                                            <option value=\"AE\" $vpn_country234>United Arab Emirates</option>
";
    echo "                                            <option value=\"GB\" $vpn_country235>United Kingdom</option>
";
    echo "                                            <option value=\"US\" $vpn_country236>United States</option>
";
    echo "                                            <option value=\"UM\" $vpn_country237>United States Minor Outlying Islands</option>
";
    echo "                                            <option value=\"UY\" $vpn_country238>Uruguay</option>
";
    echo "                                            <option value=\"UZ\" $vpn_country239>Uzbekistan</option>
";
    echo "                                            <option value=\"VU\" $vpn_country240>Vanuatu</option>
";
    echo "                                            <option value=\"VE\" $vpn_country241>Venezuela, Bolivarian Republic of</option>
";
    echo "                                            <option value=\"VN\" $vpn_country242>Viet Nam</option>
";
    echo "                                            <option value=\"VG\" $vpn_country243>Virgin Islands, British</option>
";
    echo "                                            <option value=\"VI\" $vpn_country244>Virgin Islands, U.S.</option>
";
    echo "                                            <option value=\"WF\" $vpn_country245>Wallis and Futuna</option>
";
    echo "                                            <option value=\"EH\" $vpn_country246>Western Sahara</option>
";
    echo "                                            <option value=\"YE\" $vpn_country247>Yemen</option>
";
    echo "                                            <option value=\"ZM\" $vpn_country248>Zambia</option>
";
    echo "                                            <option value=\"ZW\" $vpn_country249>Zimbabwe</option>
";
    echo "                                    </select>
";
    echo "                                </div>
";
    echo "                                <div class=\"form-group\">
";
    echo "                                    <center>
";
    echo "                                        <button class=\"btn btn-info \" name=\"submitU\" type=\"submit\">
";
    echo "                                            <i class=\"icon icon-check\"></i> Submit
";
    echo "                                        </button>
";
    echo "                                    </center>
";
    echo "                                </div>
";
    echo "                            </form>
";
    echo "                    </div>
";
    echo "                </div>
";
    echo "            </div>
";
    echo "        </div>
";
} else {
    //main table/form
    echo "        <div>
";
    echo "            <div class=\"card-body\">
";
    echo "                <div class=\"card bg-primary text-white\">
";
    echo "                    <div class=\"card-header card-header-warning\">
";
    echo "                        <center>
";
    echo "                            <h2><i class=\"icon icon-commenting\"></i>$Htitle</h2>
";
    echo "                        </center>
";
    echo "                    </div>
";
    echo "
";
    echo "                    <div class=\"card-body\">
";
    echo "                        <div >
";
    echo "                        	<center>
";
    echo "	        					<a id=\"button\" href=\"./$base_file?create\" class=\"btn btn-info\">New OVPN Server</a>
";
    echo "	        				</center>
";
    echo "    					</div>
";
    echo "
";
    echo "    					<hr>
";
    echo "
";
    echo "						<div class=\"table-responsive\">
";
    echo "							<table id=\"Dtable\" class=\"table\" style=\"width:100% background-color:#FFFFE0;\">
";
    echo "							<thead style=\"color:white!important\">
";
    echo "								<tr>
";
    echo "								<th style = \"display:none\">Index</th>
";
    echo "								<th>Country</th>
";
    echo "								<th>State</th>
";
    echo "								<th>OVPN Url</th>
";
    echo "								<th>Status</th>
";
    echo "								<th>Auth Type</th>
";
    echo "								<th>Username</th>
";
    echo "								<th>Password</th>
";
    echo "								<th>Date</th>
";
    echo "								<th>Edit&nbsp;&nbsp;&nbsp;Delete</th>
";
    echo "								</tr>
";
    echo "							</thead>
";
    echo "							<tbody>
";
    while ($row = $res->fetchArray()) {
        $id = $row['id'];
        $vpn_country = $row['vpn_country'];
        $vpn_state = $row['vpn_state'];
        $vpn_config = $row['vpn_config'];
        $vpn_status = $row['vpn_status'];
        $auth_type = $row['auth_type'];
        $username = $row['username'];
        $password = $row['password'];
        $date = $row['date'];
        echo "								<tr style=\"background-color:#2b2b2b;color:#ffffff;\">
";
        echo "								<td style = \"display:none\">$id</td>
";
        echo "								<td>$vpn_country</td>
";
        echo "								<td>$vpn_state</td>
";
        echo "								<td>$vpn_config</td>
";
        echo "								<td>$vpn_status</td>
";
        echo "								<td>$auth_type</td>
";
        echo "								<td>$username</td>
";
        echo "								<td>$password</td>
";
        echo "								<td>$date</td>
";
        echo "								<td>
";
        echo "								<a class=\"btn btn-info btn-ok\" href=\"./$base_file?update=$id\"><i class=\"fa fa-pencil-square-o\"></i></a>
";
        echo "								&nbsp&nbsp&nbsp
";
        echo "								<a class=\"btn btn-danger btn-ok\" href=\"#\" data-href=\"./$base_file?delete=$id\" data-toggle=\"modal\" data-target=\"#confirm-delete\"><i class=\"fa fa-trash-o\"></i></a>
";
        echo "								</td>
";
        echo "								</tr>
";
    }
    echo "							</tbody>
";
    echo "							</table>
";
    echo "						</div>
";
    echo "					</div>
";
    echo "				</div>
";
    echo "			</div>
";
    echo "		</div>
";
}
echo "
";
include ('includes/footer.php');
echo "
";
echo "</body>
";
echo "</html>
";
