ui adjust, country convert to db. db schema updated
This commit is contained in:
parent
1c9db7e5c7
commit
88190020a6
@ -48,6 +48,259 @@ INSERT INTO `lsio_sites` (`id`, `name`, `timezone`, `region`) VALUES
|
||||
(1, 'NOSITE', 'UTC', 'NO'),
|
||||
(2, 'Default Site', 'America/New_York', 'US');
|
||||
-- --------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `lsio_countries`;
|
||||
CREATE TABLE `lsio_countries` (
|
||||
`id` varchar(3) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||
`name` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||
`continent` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||
`priority` int UNSIGNED
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||
INSERT INTO `lsio_countries` (`id`, `name`, `continent`, `priority`) VALUES
|
||||
('FR', 'France', 'Europe','1'),
|
||||
('US', 'United States', 'North America','1'),
|
||||
('CN', 'China', 'Asia','1'),
|
||||
('ES', 'Spain', 'Europe','1'),
|
||||
('IT', 'Italy', 'Europe','1'),
|
||||
('TR', 'Turkey', 'Asia','1'),
|
||||
('GB', 'United Kingdom', 'Europe','1'),
|
||||
('DE', 'Germany', 'Europe','1'),
|
||||
('RU', 'Russian Federation', 'Europe','1'),
|
||||
('MY', 'Malaysia', 'Asia','1'),
|
||||
('AF', 'Afghanistan', 'Asia','9'),
|
||||
('AX', 'Åland Islands', 'Europe','9'),
|
||||
('AL', 'Albania', 'Europe','9'),
|
||||
('DZ', 'Algeria', 'Africa','9'),
|
||||
('AS', 'American Samoa', 'Oceania','9'),
|
||||
('AD', 'Andorra', 'Europe','9'),
|
||||
('AO', 'Angola', 'Africa','9'),
|
||||
('AI', 'Anguilla', 'North America','9'),
|
||||
('AQ', 'Antarctica', 'Antarctica','9'),
|
||||
('AG', 'Antigua and Barbuda', 'North America','9'),
|
||||
('AR', 'Argentina', 'South America','9'),
|
||||
('AM', 'Armenia', 'Asia','9'),
|
||||
('AW', 'Aruba', 'North America','9'),
|
||||
('AU', 'Australia', 'Oceania','9'),
|
||||
('AT', 'Austria', 'Europe','9'),
|
||||
('AZ', 'Azerbaijan', 'Asia','9'),
|
||||
('BS', 'Bahamas', 'North America','9'),
|
||||
('BH', 'Bahrain', 'Asia','9'),
|
||||
('BD', 'Bangladesh', 'Asia','9'),
|
||||
('BB', 'Barbados', 'North America','9'),
|
||||
('BY', 'Belarus', 'Europe','9'),
|
||||
('BE', 'Belgium', 'Europe','1'),
|
||||
('BZ', 'Belize', 'North America','9'),
|
||||
('BJ', 'Benin', 'Africa','9'),
|
||||
('BM', 'Bermuda', 'North America','9'),
|
||||
('BT', 'Bhutan', 'Asia','9'),
|
||||
('BO', 'Bolivia', 'South America','9'),
|
||||
('BA', 'Bosnia and Herzegovina', 'Europe','9'),
|
||||
('BW', 'Botswana', 'Africa','9'),
|
||||
('BV', 'Bouvet Island', 'Antarctica','9'),
|
||||
('BR', 'Brazil', 'South America','9'),
|
||||
('IO', 'British Indian Ocean Territory', 'Asia','9'),
|
||||
('BN', 'Brunei Darussalam', 'Asia','9'),
|
||||
('BG', 'Bulgaria', 'Europe','9'),
|
||||
('BF', 'Burkina Faso', 'Africa','9'),
|
||||
('BI', 'Burundi', 'Africa','9'),
|
||||
('KH', 'Cambodia', 'Asia','9'),
|
||||
('CM', 'Cameroon', 'Africa','9'),
|
||||
('CA', 'Canada', 'North America','1'),
|
||||
('CV', 'Cape Verde', 'Africa','9'),
|
||||
('KY', 'Cayman Islands', 'North America','9'),
|
||||
('CF', 'Central African Republic', 'Africa','9'),
|
||||
('TD', 'Chad', 'Africa','9'),
|
||||
('CL', 'Chile', 'South America','9'),
|
||||
('CX', 'Christmas Island', 'Asia','9'),
|
||||
('CC', 'Cocos (Keeling] Islands', 'Asia','9'),
|
||||
('CO', 'Colombia', 'South America','9'),
|
||||
('KM', 'Comoros', 'Africa','9'),
|
||||
('CG', 'Congo', 'Africa','9'),
|
||||
('CD', 'The Democratic Republic of The Congo', 'Africa','9'),
|
||||
('CK', 'Cook Islands', 'Oceania','9'),
|
||||
('CR', 'Costa Rica', 'North America','9'),
|
||||
('CI', 'Cote D`ivoire', 'Africa','9'),
|
||||
('HR', 'Croatia', 'Europe','9'),
|
||||
('CU', 'Cuba', 'North America','9'),
|
||||
('CY', 'Cyprus', 'Asia','9'),
|
||||
('CZ', 'Czech Republic', 'Europe','9'),
|
||||
('DK', 'Denmark', 'Europe','9'),
|
||||
('DJ', 'Djibouti', 'Africa','9'),
|
||||
('DM', 'Dominica', 'North America','9'),
|
||||
('DO', 'Dominican Republic', 'North America','9'),
|
||||
('EC', 'Ecuador', 'South America','9'),
|
||||
('EG', 'Egypt', 'Africa','9'),
|
||||
('SV', 'El Salvador', 'North America','9'),
|
||||
('GQ', 'Equatorial Guinea', 'Africa','9'),
|
||||
('ER', 'Eritrea', 'Africa','9'),
|
||||
('EE', 'Estonia', 'Europe','9'),
|
||||
('ET', 'Ethiopia', 'Africa','9'),
|
||||
('FK', 'Falkland Islands (Malvinas]', 'South America','9'),
|
||||
('FO', 'Faroe Islands', 'Europe','9'),
|
||||
('FJ', 'Fiji', 'Oceania','9'),
|
||||
('FI', 'Finland', 'Europe','9'),
|
||||
('GF', 'French Guiana', 'South America','9'),
|
||||
('PF', 'French Polynesia', 'Oceania','9'),
|
||||
('TF', 'French Southern Territories', 'Antarctica','9'),
|
||||
('GA', 'Gabon', 'Africa','9'),
|
||||
('GM', 'Gambia', 'Africa','9'),
|
||||
('GE', 'Georgia', 'Asia','9'),
|
||||
('GH', 'Ghana', 'Africa','9'),
|
||||
('GI', 'Gibraltar', 'Europe','9'),
|
||||
('GR', 'Greece', 'Europe','9'),
|
||||
('GL', 'Greenland', 'North America','9'),
|
||||
('GD', 'Grenada', 'North America','9'),
|
||||
('GP', 'Guadeloupe', 'North America','9'),
|
||||
('GU', 'Guam', 'Oceania','9'),
|
||||
('GT', 'Guatemala', 'North America','9'),
|
||||
('GG', 'Guernsey', 'Europe','9'),
|
||||
('GN', 'Guinea', 'Africa','9'),
|
||||
('GW', 'Guinea-bissau', 'Africa','9'),
|
||||
('GY', 'Guyana', 'South America','9'),
|
||||
('HT', 'Haiti', 'North America','9'),
|
||||
('HM', 'Heard Island and Mcdonald Islands', 'Antarctica','9'),
|
||||
('VA', 'Holy See (Vatican City State]', 'Europe','9'),
|
||||
('HN', 'Honduras', 'North America','9'),
|
||||
('HK', 'Hong Kong', 'Asia','9'),
|
||||
('HU', 'Hungary', 'Europe','9'),
|
||||
('IS', 'Iceland', 'Europe','9'),
|
||||
('IN', 'India', 'Asia','9'),
|
||||
('ID', 'Indonesia', 'Asia','9'),
|
||||
('IR', 'Iran', 'Asia','9'),
|
||||
('IQ', 'Iraq', 'Asia','9'),
|
||||
('IE', 'Ireland', 'Europe','1'),
|
||||
('IM', 'Isle of Man', 'Europe','9'),
|
||||
('IL', 'Israel', 'Asia','9'),
|
||||
('JM', 'Jamaica', 'North America','9'),
|
||||
('JP', 'Japan', 'Asia','9'),
|
||||
('JE', 'Jersey', 'Europe','9'),
|
||||
('JO', 'Jordan', 'Asia','9'),
|
||||
('KZ', 'Kazakhstan', 'Asia','9'),
|
||||
('KE', 'Kenya', 'Africa','9'),
|
||||
('KI', 'Kiribati', 'Oceania','9'),
|
||||
('KP', 'Democratic People`s Republic of Korea', 'Asia','9'),
|
||||
('KR', 'Republic of Korea', 'Asia','1'),
|
||||
('KW', 'Kuwait', 'Asia','9'),
|
||||
('KG', 'Kyrgyzstan', 'Asia','9'),
|
||||
('LA', 'Lao People`s Democratic Republic', 'Asia','9'),
|
||||
('LV', 'Latvia', 'Europe','9'),
|
||||
('LB', 'Lebanon', 'Asia','9'),
|
||||
('LS', 'Lesotho', 'Africa','9'),
|
||||
('LR', 'Liberia', 'Africa','9'),
|
||||
('LY', 'Libya', 'Africa','9'),
|
||||
('LI', 'Liechtenstein', 'Europe','9'),
|
||||
('LT', 'Lithuania', 'Europe','9'),
|
||||
('LU', 'Luxembourg', 'Europe','9'),
|
||||
('MO', 'Macao', 'Asia','9'),
|
||||
('MK', 'Macedonia', 'Europe','9'),
|
||||
('MG', 'Madagascar', 'Africa','9'),
|
||||
('MW', 'Malawi', 'Africa','9'),
|
||||
('MV', 'Maldives', 'Asia','9'),
|
||||
('ML', 'Mali', 'Africa','9'),
|
||||
('MT', 'Malta', 'Europe','9'),
|
||||
('MH', 'Marshall Islands', 'Oceania','9'),
|
||||
('MQ', 'Martinique', 'North America','9'),
|
||||
('MR', 'Mauritania', 'Africa','9'),
|
||||
('MU', 'Mauritius', 'Africa','9'),
|
||||
('YT', 'Mayotte', 'Africa','9'),
|
||||
('MX', 'Mexico', 'North America','9'),
|
||||
('FM', 'Micronesia', 'Oceania','9'),
|
||||
('MD', 'Moldova', 'Europe','9'),
|
||||
('MC', 'Monaco', 'Europe','9'),
|
||||
('MN', 'Mongolia', 'Asia','9'),
|
||||
('ME', 'Montenegro', 'Europe','9'),
|
||||
('MS', 'Montserrat', 'North America','9'),
|
||||
('MA', 'Morocco', 'Africa','9'),
|
||||
('MZ', 'Mozambique', 'Africa','9'),
|
||||
('MM', 'Myanmar', 'Asia','9'),
|
||||
('NA', 'Namibia', 'Africa','9'),
|
||||
('NR', 'Nauru', 'Oceania','9'),
|
||||
('NP', 'Nepal', 'Asia','9'),
|
||||
('NL', 'Netherlands', 'Europe','9'),
|
||||
('AN', 'Netherlands Antilles', 'North America','9'),
|
||||
('NC', 'New Caledonia', 'Oceania','9'),
|
||||
('NZ', 'New Zealand', 'Oceania','9'),
|
||||
('NI', 'Nicaragua', 'North America','9'),
|
||||
('NE', 'Niger', 'Africa','9'),
|
||||
('NG', 'Nigeria', 'Africa','9'),
|
||||
('NU', 'Niue', 'Oceania','9'),
|
||||
('NF', 'Norfolk Island', 'Oceania','9'),
|
||||
('MP', 'Northern Mariana Islands', 'Oceania','9'),
|
||||
('NO', 'Norway', 'Europe','9'),
|
||||
('OM', 'Oman', 'Asia','9'),
|
||||
('PK', 'Pakistan', 'Asia','9'),
|
||||
('PW', 'Palau', 'Oceania','9'),
|
||||
('PS', 'Palestinia', 'Asia','9'),
|
||||
('PA', 'Panama', 'North America','9'),
|
||||
('PG', 'Papua New Guinea', 'Oceania','9'),
|
||||
('PY', 'Paraguay', 'South America','9'),
|
||||
('PE', 'Peru', 'South America','9'),
|
||||
('PH', 'Philippines', 'Asia','9'),
|
||||
('PN', 'Pitcairn', 'Oceania','9'),
|
||||
('PL', 'Poland', 'Europe','9'),
|
||||
('PT', 'Portugal', 'Europe','9'),
|
||||
('PR', 'Puerto Rico', 'North America','9'),
|
||||
('QA', 'Qatar', 'Asia','9'),
|
||||
('RE', 'Reunion', 'Africa','9'),
|
||||
('RO', 'Romania', 'Europe','9'),
|
||||
('RW', 'Rwanda', 'Africa','9'),
|
||||
('SH', 'Saint Helena', 'Africa','9'),
|
||||
('KN', 'Saint Kitts and Nevis', 'North America','9'),
|
||||
('LC', 'Saint Lucia', 'North America','9'),
|
||||
('PM', 'Saint Pierre and Miquelon', 'North America','9'),
|
||||
('VC', 'Saint Vincent and The Grenadines', 'North America','9'),
|
||||
('WS', 'Samoa', 'Oceania','9'),
|
||||
('SM', 'San Marino', 'Europe','9'),
|
||||
('ST', 'Sao Tome and Principe', 'Africa','9'),
|
||||
('SA', 'Saudi Arabia', 'Asia','9'),
|
||||
('SN', 'Senegal', 'Africa','9'),
|
||||
('RS', 'Serbia', 'Europe','9'),
|
||||
('SC', 'Seychelles', 'Africa','9'),
|
||||
('SL', 'Sierra Leone', 'Africa','9'),
|
||||
('SG', 'Singapore', 'Asia','9'),
|
||||
('SK', 'Slovakia', 'Europe','9'),
|
||||
('SI', 'Slovenia', 'Europe','9'),
|
||||
('SB', 'Solomon Islands', 'Oceania','9'),
|
||||
('SO', 'Somalia', 'Africa','9'),
|
||||
('ZA', 'South Africa', 'Africa','9'),
|
||||
('GS', 'South Georgia and The South Sandwich Islands', 'Antarctica','9'),
|
||||
('LK', 'Sri Lanka', 'Asia','9'),
|
||||
('SD', 'Sudan', 'Africa','9'),
|
||||
('SR', 'Suriname', 'South America','9'),
|
||||
('SJ', 'Svalbard and Jan Mayen', 'Europe','9'),
|
||||
('SZ', 'Swaziland', 'Africa','9'),
|
||||
('SE', 'Sweden', 'Europe','9'),
|
||||
('CH', 'Switzerland', 'Europe','9'),
|
||||
('SY', 'Syrian Arab Republic', 'Asia','9'),
|
||||
('TW', 'Taiwan, Province of China', 'Asia','9'),
|
||||
('TJ', 'Tajikistan', 'Asia','9'),
|
||||
('TZ', 'Tanzania, United Republic of', 'Africa','9'),
|
||||
('TH', 'Thailand', 'Asia','9'),
|
||||
('TL', 'Timor-leste', 'Asia','9'),
|
||||
('TG', 'Togo', 'Africa','9'),
|
||||
('TK', 'Tokelau', 'Oceania','9'),
|
||||
('TO', 'Tonga', 'Oceania','9'),
|
||||
('TT', 'Trinidad and Tobago', 'North America','9'),
|
||||
('TN', 'Tunisia', 'Africa','9'),
|
||||
('TM', 'Turkmenistan', 'Asia','9'),
|
||||
('TC', 'Turks and Caicos Islands', 'North America','9'),
|
||||
('TV', 'Tuvalu', 'Oceania','9'),
|
||||
('UG', 'Uganda', 'Africa','9'),
|
||||
('UA', 'Ukraine', 'Europe','9'),
|
||||
('AE', 'United Arab Emirates', 'Asia','9'),
|
||||
('UM', 'United States Minor Outlying Islands', 'Oceania','9'),
|
||||
('UY', 'Uruguay', 'South America','9'),
|
||||
('UZ', 'Uzbekistan', 'Asia','9'),
|
||||
('VU', 'Vanuatu', 'Oceania','9'),
|
||||
('VE', 'Venezuela', 'South America','9'),
|
||||
('VN', 'Viet Nam', 'Asia','9'),
|
||||
('VG', 'Virgin Islands, British', 'North America','9'),
|
||||
('VI', 'Virgin Islands, U.S.', 'North America','9'),
|
||||
('WF', 'Wallis and Futuna', 'Oceania','9'),
|
||||
('EH', 'Western Sahara', 'Africa','9'),
|
||||
('YE', 'Yemen', 'Asia','9'),
|
||||
('ZM', 'Zambia', 'Africa','9'),
|
||||
('ZW', 'Zimbabwe', 'Africa', '9');
|
||||
-- --------------------------------------------------------
|
||||
DROP TABLE IF EXISTS `lsio_users`;
|
||||
CREATE TABLE `lsio_users` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
@ -138,6 +391,10 @@ ALTER TABLE `lsio_sites`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `id` (`id`),
|
||||
ADD UNIQUE KEY `name` (`name`);
|
||||
ALTER TABLE `lsio_countries`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `id` (`id`),
|
||||
ADD UNIQUE KEY `name` (`name`);
|
||||
ALTER TABLE `lsio_users`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `users_ibfk_1` (`usertype`);
|
||||
|
38
index.php
38
index.php
@ -231,7 +231,7 @@ $(document).on("click", ".open-voidModal", function (e) {
|
||||
<table class="table table-sm table-responsive-sm text-nowrap">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th class="small"><?php echo $transLang['TIMEREASON']; ?></th><th class="small"><?php echo $transLang['NAME']; ?></th><th class="small"><?php echo $transLang['ESCORT']; ?></th><th class="small"><?php echo $transLang['VALIDATIONS']; ?></th><th class="small"><?php echo $transLang['BADGEINITIALS']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th class="small"><?php echo $transLang['CARNUM'] . " / " . $transLang['SSANUM']; ?></th><?php }; ?><th class="small"><?php echo $transLang['ACTIONS']; ?></th>
|
||||
<th class="small col-sm-1"><?php echo $transLang['TIMEREASON']; ?></th><th class="small col-sm-2"><?php echo $transLang['NAME']; ?></th><th class="small col-sm-2"><?php echo $transLang['ESCORT']; ?></th><th class="small col-sm-2"><?php echo $transLang['VALIDATIONS']; ?></th><th class="small col-sm-2"><?php echo $transLang['BADGEINITIALS']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th class="small col-sm-1"><?php echo $transLang['CARNUM'] . " / " . $transLang['SSANUM']; ?></th><?php }; ?><th class="small col-sm-1"><?php echo $transLang['ACTIONS']; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -249,31 +249,31 @@ $(document).on("click", ".open-voidModal", function (e) {
|
||||
<tr class="alert alert-warning">
|
||||
<?php }; ?>
|
||||
<form class="form form-approve" method="post">
|
||||
<td class="small"><?php echo $timein_disp; ?><br><?php echo $transLang[$VisitTypeInfo->getVisitTypeInfo($row['visits_reason'])[0]["visittypes_name"]]; ?></td>
|
||||
<td class="small"><div><span class="badge badge-light"><?php echo $timein_disp; ?></span></div><div><span class="badge badge-light"><?php echo $transLang[$VisitTypeInfo->getVisitTypeInfo($row['visits_reason'])[0]["visittypes_name"]]; ?></span></div></td>
|
||||
<td class="small"><?php echo $row['visits_lastname'] . ", " . $row['visits_firstname']; ?><br><img src="<?php echo $row['visits_signature']; ?>" width="200" height="50"></img></td>
|
||||
<td class="small"><?php if (!empty($row['visits_escort'])) {echo $row['visits_escort'] . '<br /><img src="' . $row['visits_escort_signature'] . '" width="200" height="50"></img>'; } ?></td>
|
||||
<td class="small">
|
||||
<?php if($row['visits_approved'] === 2) { ?>
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['ID_TYPE']; ?></span></div>
|
||||
<input class="form-control form-control-sm bg-white" type="text" id="id_type" name="id_type" disabled value="<?php echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]["idtypes_name"]]; ?>">
|
||||
<div>
|
||||
<span class="badge badge-light"><?php echo $transLang['ID_TYPE']; ?></span> <?php echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]["idtypes_name"]]; ?>
|
||||
</div>
|
||||
<?php if($row['visits_id_type'] === 1) { ?>
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['REFERENCE']; ?></span></div>
|
||||
<input class="form-control form-control-sm bg-white" type="text" id="id_reference" name="id_reference" disabled value="<?php echo $row['visits_id_reference']; ?>">
|
||||
<div>
|
||||
<span class="badge badge-light"><?php echo $transLang['REFERENCE']; ?></span> <?php echo $row['visits_id_reference']; ?>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['CITIZEN']; ?></span></div>
|
||||
<input class="form-control form-control-sm bg-white" type="text" id="citizen" name="citizen" disabled value="<?php echo $row['visits_citizen']; ?>">
|
||||
<div>
|
||||
<span class="badge badge-light"><?php echo $transLang['COUNTRY']; ?>?</span> <?php echo $VisitInfo->getCountryInfo($row['visits_citizen'])[0]["countries_name"]; ?>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
</td>
|
||||
<td class="small">
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['BADGE']; ?></span></div>
|
||||
<input class="form-control form-control-sm bg-white" type="text" id="badge" name="badge" disabled value="<?php echo $row['visits_badge']; ?>">
|
||||
<?php }; ?>
|
||||
</td>
|
||||
<td class="small">
|
||||
<div>
|
||||
<span class="badge badge-light"><?php echo $transLang['BADGE']; ?></span> <?php echo $row['visits_badge']; ?>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['USERNAME']; ?></span></div>
|
||||
<input class="form-control form-control-sm bg-white" type="text" id="who" name="who" disabled value="<?php echo $Users->getUserInitials($row['visits_initials'])[0]["users_firstname"] . " " . $Users->getUserInitials($row['visits_initials'])[0]["users_lastname"]; ?>">
|
||||
<div>
|
||||
<span class="badge badge-light"><?php echo $transLang['USERNAME']; ?></span> <?php echo $Users->getUserInitials($row['visits_initials'])[0]["users_firstname"] . " " . $Users->getUserInitials($row['visits_initials'])[0]["users_lastname"]; ?>
|
||||
</div>
|
||||
|
||||
|
||||
@ -324,16 +324,14 @@ $(document).on("click", ".open-voidModal", function (e) {
|
||||
$('#id_type-<?php echo $visitid; ?>').trigger("change");
|
||||
</script>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['CITIZEN']; ?></span></div>
|
||||
<div class="input-group input-group-sm mb-0"><div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><?php echo $transLang['COUNTRY']; ?></span></div>
|
||||
<select class="form-control form-control-sm bg-white custom-select<?php if( isset($citizen_error) && $citizen_error == "1" && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" id="citizen" name="citizen">
|
||||
<option value="00" selected><?php echo $transLang['COUNTRY']; ?></option>
|
||||
<?php
|
||||
foreach ($VisitInfo->countries as $key => $value) { ?>
|
||||
<option value="<?php echo $key; ?>"><?php echo $value['country']; ?></option><?php }; ?>
|
||||
foreach ($VisitInfo->getCountryInfo('%') as $row) { ?>
|
||||
<option value="<?php echo $row['countries_id']; ?>"><?php echo $row['countries_name']; ?></option><?php }; ?>
|
||||
</select>
|
||||
<div class="invalid-feedback"><?php echo $transLang['REQUIRED']; ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php }; ?>
|
||||
|
@ -73,251 +73,17 @@ class VisitInfo {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public $countries = [
|
||||
"FR" => ["country" => "France", "continent" => "Europe"],
|
||||
"US" => ["country" => "United States", "continent" => "North America"],
|
||||
"CN" => ["country" => "China", "continent" => "Asia"],
|
||||
"ES" => ["country" => "Spain", "continent" => "Europe"],
|
||||
"IT" => ["country" => "Italy", "continent" => "Europe"],
|
||||
"TR" => ["country" => "Turkey", "continent" => "Asia"],
|
||||
"GB" => ["country" => "United Kingdom", "continent" => "Europe"],
|
||||
"DE" => ["country" => "Germany", "continent" => "Europe"],
|
||||
"RU" => ["country" => "Russian Federation", "continent" => "Europe"],
|
||||
"MY" => ["country" => "Malaysia", "continent" => "Asia"],
|
||||
"AF" => ["country" => "Afghanistan", "continent" => "Asia"],
|
||||
"AX" => ["country" => "Åland Islands", "continent" => "Europe"],
|
||||
"AL" => ["country" => "Albania", "continent" => "Europe"],
|
||||
"DZ" => ["country" => "Algeria", "continent" => "Africa"],
|
||||
"AS" => ["country" => "American Samoa", "continent" => "Oceania"],
|
||||
"AD" => ["country" => "Andorra", "continent" => "Europe"],
|
||||
"AO" => ["country" => "Angola", "continent" => "Africa"],
|
||||
"AI" => ["country" => "Anguilla", "continent" => "North America"],
|
||||
"AQ" => ["country" => "Antarctica", "continent" => "Antarctica"],
|
||||
"AG" => ["country" => "Antigua and Barbuda", "continent" => "North America"],
|
||||
"AR" => ["country" => "Argentina", "continent" => "South America"],
|
||||
"AM" => ["country" => "Armenia", "continent" => "Asia"],
|
||||
"AW" => ["country" => "Aruba", "continent" => "North America"],
|
||||
"AU" => ["country" => "Australia", "continent" => "Oceania"],
|
||||
"AT" => ["country" => "Austria", "continent" => "Europe"],
|
||||
"AZ" => ["country" => "Azerbaijan", "continent" => "Asia"],
|
||||
"BS" => ["country" => "Bahamas", "continent" => "North America"],
|
||||
"BH" => ["country" => "Bahrain", "continent" => "Asia"],
|
||||
"BD" => ["country" => "Bangladesh", "continent" => "Asia"],
|
||||
"BB" => ["country" => "Barbados", "continent" => "North America"],
|
||||
"BY" => ["country" => "Belarus", "continent" => "Europe"],
|
||||
"BE" => ["country" => "Belgium", "continent" => "Europe"],
|
||||
"BZ" => ["country" => "Belize", "continent" => "North America"],
|
||||
"BJ" => ["country" => "Benin", "continent" => "Africa"],
|
||||
"BM" => ["country" => "Bermuda", "continent" => "North America"],
|
||||
"BT" => ["country" => "Bhutan", "continent" => "Asia"],
|
||||
"BO" => ["country" => "Bolivia", "continent" => "South America"],
|
||||
"BA" => ["country" => "Bosnia and Herzegovina", "continent" => "Europe"],
|
||||
"BW" => ["country" => "Botswana", "continent" => "Africa"],
|
||||
"BV" => ["country" => "Bouvet Island", "continent" => "Antarctica"],
|
||||
"BR" => ["country" => "Brazil", "continent" => "South America"],
|
||||
"IO" => ["country" => "British Indian Ocean Territory", "continent" => "Asia"],
|
||||
"BN" => ["country" => "Brunei Darussalam", "continent" => "Asia"],
|
||||
"BG" => ["country" => "Bulgaria", "continent" => "Europe"],
|
||||
"BF" => ["country" => "Burkina Faso", "continent" => "Africa"],
|
||||
"BI" => ["country" => "Burundi", "continent" => "Africa"],
|
||||
"KH" => ["country" => "Cambodia", "continent" => "Asia"],
|
||||
"CM" => ["country" => "Cameroon", "continent" => "Africa"],
|
||||
"CA" => ["country" => "Canada", "continent" => "North America"],
|
||||
"CV" => ["country" => "Cape Verde", "continent" => "Africa"],
|
||||
"KY" => ["country" => "Cayman Islands", "continent" => "North America"],
|
||||
"CF" => ["country" => "Central African Republic", "continent" => "Africa"],
|
||||
"TD" => ["country" => "Chad", "continent" => "Africa"],
|
||||
"CL" => ["country" => "Chile", "continent" => "South America"],
|
||||
"CX" => ["country" => "Christmas Island", "continent" => "Asia"],
|
||||
"CC" => ["country" => "Cocos (Keeling] Islands", "continent" => "Asia"],
|
||||
"CO" => ["country" => "Colombia", "continent" => "South America"],
|
||||
"KM" => ["country" => "Comoros", "continent" => "Africa"],
|
||||
"CG" => ["country" => "Congo", "continent" => "Africa"],
|
||||
"CD" => ["country" => "The Democratic Republic of The Congo", "continent" => "Africa"],
|
||||
"CK" => ["country" => "Cook Islands", "continent" => "Oceania"],
|
||||
"CR" => ["country" => "Costa Rica", "continent" => "North America"],
|
||||
"CI" => ["country" => "Cote D'ivoire", "continent" => "Africa"],
|
||||
"HR" => ["country" => "Croatia", "continent" => "Europe"],
|
||||
"CU" => ["country" => "Cuba", "continent" => "North America"],
|
||||
"CY" => ["country" => "Cyprus", "continent" => "Asia"],
|
||||
"CZ" => ["country" => "Czech Republic", "continent" => "Europe"],
|
||||
"DK" => ["country" => "Denmark", "continent" => "Europe"],
|
||||
"DJ" => ["country" => "Djibouti", "continent" => "Africa"],
|
||||
"DM" => ["country" => "Dominica", "continent" => "North America"],
|
||||
"DO" => ["country" => "Dominican Republic", "continent" => "North America"],
|
||||
"EC" => ["country" => "Ecuador", "continent" => "South America"],
|
||||
"EG" => ["country" => "Egypt", "continent" => "Africa"],
|
||||
"SV" => ["country" => "El Salvador", "continent" => "North America"],
|
||||
"GQ" => ["country" => "Equatorial Guinea", "continent" => "Africa"],
|
||||
"ER" => ["country" => "Eritrea", "continent" => "Africa"],
|
||||
"EE" => ["country" => "Estonia", "continent" => "Europe"],
|
||||
"ET" => ["country" => "Ethiopia", "continent" => "Africa"],
|
||||
"FK" => ["country" => "Falkland Islands (Malvinas]", "continent" => "South America"],
|
||||
"FO" => ["country" => "Faroe Islands", "continent" => "Europe"],
|
||||
"FJ" => ["country" => "Fiji", "continent" => "Oceania"],
|
||||
"FI" => ["country" => "Finland", "continent" => "Europe"],
|
||||
"GF" => ["country" => "French Guiana", "continent" => "South America"],
|
||||
"PF" => ["country" => "French Polynesia", "continent" => "Oceania"],
|
||||
"TF" => ["country" => "French Southern Territories", "continent" => "Antarctica"],
|
||||
"GA" => ["country" => "Gabon", "continent" => "Africa"],
|
||||
"GM" => ["country" => "Gambia", "continent" => "Africa"],
|
||||
"GE" => ["country" => "Georgia", "continent" => "Asia"],
|
||||
"GH" => ["country" => "Ghana", "continent" => "Africa"],
|
||||
"GI" => ["country" => "Gibraltar", "continent" => "Europe"],
|
||||
"GR" => ["country" => "Greece", "continent" => "Europe"],
|
||||
"GL" => ["country" => "Greenland", "continent" => "North America"],
|
||||
"GD" => ["country" => "Grenada", "continent" => "North America"],
|
||||
"GP" => ["country" => "Guadeloupe", "continent" => "North America"],
|
||||
"GU" => ["country" => "Guam", "continent" => "Oceania"],
|
||||
"GT" => ["country" => "Guatemala", "continent" => "North America"],
|
||||
"GG" => ["country" => "Guernsey", "continent" => "Europe"],
|
||||
"GN" => ["country" => "Guinea", "continent" => "Africa"],
|
||||
"GW" => ["country" => "Guinea-bissau", "continent" => "Africa"],
|
||||
"GY" => ["country" => "Guyana", "continent" => "South America"],
|
||||
"HT" => ["country" => "Haiti", "continent" => "North America"],
|
||||
"HM" => ["country" => "Heard Island and Mcdonald Islands", "continent" => "Antarctica"],
|
||||
"VA" => ["country" => "Holy See (Vatican City State]", "continent" => "Europe"],
|
||||
"HN" => ["country" => "Honduras", "continent" => "North America"],
|
||||
"HK" => ["country" => "Hong Kong", "continent" => "Asia"],
|
||||
"HU" => ["country" => "Hungary", "continent" => "Europe"],
|
||||
"IS" => ["country" => "Iceland", "continent" => "Europe"],
|
||||
"IN" => ["country" => "India", "continent" => "Asia"],
|
||||
"ID" => ["country" => "Indonesia", "continent" => "Asia"],
|
||||
"IR" => ["country" => "Iran", "continent" => "Asia"],
|
||||
"IQ" => ["country" => "Iraq", "continent" => "Asia"],
|
||||
"IE" => ["country" => "Ireland", "continent" => "Europe"],
|
||||
"IM" => ["country" => "Isle of Man", "continent" => "Europe"],
|
||||
"IL" => ["country" => "Israel", "continent" => "Asia"],
|
||||
"JM" => ["country" => "Jamaica", "continent" => "North America"],
|
||||
"JP" => ["country" => "Japan", "continent" => "Asia"],
|
||||
"JE" => ["country" => "Jersey", "continent" => "Europe"],
|
||||
"JO" => ["country" => "Jordan", "continent" => "Asia"],
|
||||
"KZ" => ["country" => "Kazakhstan", "continent" => "Asia"],
|
||||
"KE" => ["country" => "Kenya", "continent" => "Africa"],
|
||||
"KI" => ["country" => "Kiribati", "continent" => "Oceania"],
|
||||
"KP" => ["country" => "Democratic People's Republic of Korea", "continent" => "Asia"],
|
||||
"KR" => ["country" => "Republic of Korea", "continent" => "Asia"],
|
||||
"KW" => ["country" => "Kuwait", "continent" => "Asia"],
|
||||
"KG" => ["country" => "Kyrgyzstan", "continent" => "Asia"],
|
||||
"LA" => ["country" => "Lao People's Democratic Republic", "continent" => "Asia"],
|
||||
"LV" => ["country" => "Latvia", "continent" => "Europe"],
|
||||
"LB" => ["country" => "Lebanon", "continent" => "Asia"],
|
||||
"LS" => ["country" => "Lesotho", "continent" => "Africa"],
|
||||
"LR" => ["country" => "Liberia", "continent" => "Africa"],
|
||||
"LY" => ["country" => "Libya", "continent" => "Africa"],
|
||||
"LI" => ["country" => "Liechtenstein", "continent" => "Europe"],
|
||||
"LT" => ["country" => "Lithuania", "continent" => "Europe"],
|
||||
"LU" => ["country" => "Luxembourg", "continent" => "Europe"],
|
||||
"MO" => ["country" => "Macao", "continent" => "Asia"],
|
||||
"MK" => ["country" => "Macedonia", "continent" => "Europe"],
|
||||
"MG" => ["country" => "Madagascar", "continent" => "Africa"],
|
||||
"MW" => ["country" => "Malawi", "continent" => "Africa"],
|
||||
"MV" => ["country" => "Maldives", "continent" => "Asia"],
|
||||
"ML" => ["country" => "Mali", "continent" => "Africa"],
|
||||
"MT" => ["country" => "Malta", "continent" => "Europe"],
|
||||
"MH" => ["country" => "Marshall Islands", "continent" => "Oceania"],
|
||||
"MQ" => ["country" => "Martinique", "continent" => "North America"],
|
||||
"MR" => ["country" => "Mauritania", "continent" => "Africa"],
|
||||
"MU" => ["country" => "Mauritius", "continent" => "Africa"],
|
||||
"YT" => ["country" => "Mayotte", "continent" => "Africa"],
|
||||
"MX" => ["country" => "Mexico", "continent" => "North America"],
|
||||
"FM" => ["country" => "Micronesia", "continent" => "Oceania"],
|
||||
"MD" => ["country" => "Moldova", "continent" => "Europe"],
|
||||
"MC" => ["country" => "Monaco", "continent" => "Europe"],
|
||||
"MN" => ["country" => "Mongolia", "continent" => "Asia"],
|
||||
"ME" => ["country" => "Montenegro", "continent" => "Europe"],
|
||||
"MS" => ["country" => "Montserrat", "continent" => "North America"],
|
||||
"MA" => ["country" => "Morocco", "continent" => "Africa"],
|
||||
"MZ" => ["country" => "Mozambique", "continent" => "Africa"],
|
||||
"MM" => ["country" => "Myanmar", "continent" => "Asia"],
|
||||
"NA" => ["country" => "Namibia", "continent" => "Africa"],
|
||||
"NR" => ["country" => "Nauru", "continent" => "Oceania"],
|
||||
"NP" => ["country" => "Nepal", "continent" => "Asia"],
|
||||
"NL" => ["country" => "Netherlands", "continent" => "Europe"],
|
||||
"AN" => ["country" => "Netherlands Antilles", "continent" => "North America"],
|
||||
"NC" => ["country" => "New Caledonia", "continent" => "Oceania"],
|
||||
"NZ" => ["country" => "New Zealand", "continent" => "Oceania"],
|
||||
"NI" => ["country" => "Nicaragua", "continent" => "North America"],
|
||||
"NE" => ["country" => "Niger", "continent" => "Africa"],
|
||||
"NG" => ["country" => "Nigeria", "continent" => "Africa"],
|
||||
"NU" => ["country" => "Niue", "continent" => "Oceania"],
|
||||
"NF" => ["country" => "Norfolk Island", "continent" => "Oceania"],
|
||||
"MP" => ["country" => "Northern Mariana Islands", "continent" => "Oceania"],
|
||||
"NO" => ["country" => "Norway", "continent" => "Europe"],
|
||||
"OM" => ["country" => "Oman", "continent" => "Asia"],
|
||||
"PK" => ["country" => "Pakistan", "continent" => "Asia"],
|
||||
"PW" => ["country" => "Palau", "continent" => "Oceania"],
|
||||
"PS" => ["country" => "Palestinia", "continent" => "Asia"],
|
||||
"PA" => ["country" => "Panama", "continent" => "North America"],
|
||||
"PG" => ["country" => "Papua New Guinea", "continent" => "Oceania"],
|
||||
"PY" => ["country" => "Paraguay", "continent" => "South America"],
|
||||
"PE" => ["country" => "Peru", "continent" => "South America"],
|
||||
"PH" => ["country" => "Philippines", "continent" => "Asia"],
|
||||
"PN" => ["country" => "Pitcairn", "continent" => "Oceania"],
|
||||
"PL" => ["country" => "Poland", "continent" => "Europe"],
|
||||
"PT" => ["country" => "Portugal", "continent" => "Europe"],
|
||||
"PR" => ["country" => "Puerto Rico", "continent" => "North America"],
|
||||
"QA" => ["country" => "Qatar", "continent" => "Asia"],
|
||||
"RE" => ["country" => "Reunion", "continent" => "Africa"],
|
||||
"RO" => ["country" => "Romania", "continent" => "Europe"],
|
||||
"RW" => ["country" => "Rwanda", "continent" => "Africa"],
|
||||
"SH" => ["country" => "Saint Helena", "continent" => "Africa"],
|
||||
"KN" => ["country" => "Saint Kitts and Nevis", "continent" => "North America"],
|
||||
"LC" => ["country" => "Saint Lucia", "continent" => "North America"],
|
||||
"PM" => ["country" => "Saint Pierre and Miquelon", "continent" => "North America"],
|
||||
"VC" => ["country" => "Saint Vincent and The Grenadines", "continent" => "North America"],
|
||||
"WS" => ["country" => "Samoa", "continent" => "Oceania"],
|
||||
"SM" => ["country" => "San Marino", "continent" => "Europe"],
|
||||
"ST" => ["country" => "Sao Tome and Principe", "continent" => "Africa"],
|
||||
"SA" => ["country" => "Saudi Arabia", "continent" => "Asia"],
|
||||
"SN" => ["country" => "Senegal", "continent" => "Africa"],
|
||||
"RS" => ["country" => "Serbia", "continent" => "Europe"],
|
||||
"SC" => ["country" => "Seychelles", "continent" => "Africa"],
|
||||
"SL" => ["country" => "Sierra Leone", "continent" => "Africa"],
|
||||
"SG" => ["country" => "Singapore", "continent" => "Asia"],
|
||||
"SK" => ["country" => "Slovakia", "continent" => "Europe"],
|
||||
"SI" => ["country" => "Slovenia", "continent" => "Europe"],
|
||||
"SB" => ["country" => "Solomon Islands", "continent" => "Oceania"],
|
||||
"SO" => ["country" => "Somalia", "continent" => "Africa"],
|
||||
"ZA" => ["country" => "South Africa", "continent" => "Africa"],
|
||||
"GS" => ["country" => "South Georgia and The South Sandwich Islands", "continent" => "Antarctica"],
|
||||
"LK" => ["country" => "Sri Lanka", "continent" => "Asia"],
|
||||
"SD" => ["country" => "Sudan", "continent" => "Africa"],
|
||||
"SR" => ["country" => "Suriname", "continent" => "South America"],
|
||||
"SJ" => ["country" => "Svalbard and Jan Mayen", "continent" => "Europe"],
|
||||
"SZ" => ["country" => "Swaziland", "continent" => "Africa"],
|
||||
"SE" => ["country" => "Sweden", "continent" => "Europe"],
|
||||
"CH" => ["country" => "Switzerland", "continent" => "Europe"],
|
||||
"SY" => ["country" => "Syrian Arab Republic", "continent" => "Asia"],
|
||||
"TW" => ["country" => "Taiwan, Province of China", "continent" => "Asia"],
|
||||
"TJ" => ["country" => "Tajikistan", "continent" => "Asia"],
|
||||
"TZ" => ["country" => "Tanzania, United Republic of", "continent" => "Africa"],
|
||||
"TH" => ["country" => "Thailand", "continent" => "Asia"],
|
||||
"TL" => ["country" => "Timor-leste", "continent" => "Asia"],
|
||||
"TG" => ["country" => "Togo", "continent" => "Africa"],
|
||||
"TK" => ["country" => "Tokelau", "continent" => "Oceania"],
|
||||
"TO" => ["country" => "Tonga", "continent" => "Oceania"],
|
||||
"TT" => ["country" => "Trinidad and Tobago", "continent" => "North America"],
|
||||
"TN" => ["country" => "Tunisia", "continent" => "Africa"],
|
||||
"TM" => ["country" => "Turkmenistan", "continent" => "Asia"],
|
||||
"TC" => ["country" => "Turks and Caicos Islands", "continent" => "North America"],
|
||||
"TV" => ["country" => "Tuvalu", "continent" => "Oceania"],
|
||||
"UG" => ["country" => "Uganda", "continent" => "Africa"],
|
||||
"UA" => ["country" => "Ukraine", "continent" => "Europe"],
|
||||
"AE" => ["country" => "United Arab Emirates", "continent" => "Asia"],
|
||||
"UM" => ["country" => "United States Minor Outlying Islands", "continent" => "Oceania"],
|
||||
"UY" => ["country" => "Uruguay", "continent" => "South America"],
|
||||
"UZ" => ["country" => "Uzbekistan", "continent" => "Asia"],
|
||||
"VU" => ["country" => "Vanuatu", "continent" => "Oceania"],
|
||||
"VE" => ["country" => "Venezuela", "continent" => "South America"],
|
||||
"VN" => ["country" => "Viet Nam", "continent" => "Asia"],
|
||||
"VG" => ["country" => "Virgin Islands, British", "continent" => "North America"],
|
||||
"VI" => ["country" => "Virgin Islands, U.S.", "continent" => "North America"],
|
||||
"WF" => ["country" => "Wallis and Futuna", "continent" => "Oceania"],
|
||||
"EH" => ["country" => "Western Sahara", "continent" => "Africa"],
|
||||
"YE" => ["country" => "Yemen", "continent" => "Asia"],
|
||||
"ZM" => ["country" => "Zambia", "continent" => "Africa"],
|
||||
"ZW" => ["country" => "Zimbabwe", "continent" => "Africa"]
|
||||
];
|
||||
|
||||
public function getCountryInfo ($countryid){
|
||||
$query = "
|
||||
SELECT
|
||||
" . Registry::DB_PRFX . "countries.id as countries_id,
|
||||
" . Registry::DB_PRFX . "countries.name as countries_name
|
||||
FROM " . Registry::DB_PRFX . "countries
|
||||
WHERE " . Registry::DB_PRFX . "countries.id LIKE \"$countryid\"
|
||||
ORDER BY " . Registry::DB_PRFX . "countries.priority ASC, " . Registry::DB_PRFX . "countries.name ASC";
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
$rows = $database->getQuery($query);
|
||||
return $rows;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user