master
Suvodip 2024-08-31 18:49:18 +05:30
parent 2056e1e4af
commit 2eca9ab2c6
10 changed files with 390 additions and 33 deletions

View File

@ -18,7 +18,7 @@ try {
foreach ($rows as $row) {
$data = str_getcsv($row);
// Prepare SQL statement
$stmt = $conn->prepare("INSERT INTO cleads (name, email, phone, formname, note, details, origin, verticals, business_type, status) VALUES (:name, :email, :phone, 'crm-portal', :note, :details, :origin, '5', :business_type, 'New')");
$stmt = $conn->prepare("INSERT INTO cleads (name, email, phone, formname, note, details, origin, verticals, business_type, status, country, state) VALUES (:name, :email, :phone, 'crm-portal', :note, :details, :origin, '5', :business_type, 'New', :country, :state)");
$stmt->bindParam(':name', $data[0]);
$stmt->bindParam(':email', $data[1]);
$stmt->bindParam(':phone', $data[2]);
@ -26,6 +26,8 @@ try {
$stmt->bindParam(':details', $data[5]);
$stmt->bindParam(':origin', $data[6]);
$stmt->bindParam(':business_type', $data[8]);
$stmt->bindParam(':country', $data[13]);
$stmt->bindParam(':state', $data[14]);
// Execute the SQL statement
$stmt->execute();
@ -46,6 +48,8 @@ $conn = null;
<p>TH(the first row) will not be added (Ignored), in every uploads the first row have to be there, as provided in the sample csv </p>
<p><span style="font-weight: bold;">Origin:</span> Facebook-Ads, Google-Ads, Linkedin-Ads, Instagram, Messenger, Whatsapp, GMB, Linkedin, Inbound-Call, Outbound-Call, Others</p>
<p><span style="font-weight: bold;">Verticals:</span> beanstalk, inhouse, teenybeans, iimtt, buzzapp, atheneum, teenybeans_curriculum</p>
<p class="font-bold">Country list & code <a class="" style="color: #7875f4;" href="/assets/countries.csv" download="Country_List_&_Code.csv">Download</a></p>
<p class="font-bold">State list & code <a class="" style="color: #7875f4;" href="/assets/states.csv" download="State_List_&_Code.csv">Download</a></p>
</div>
<div class="flex flex-col place-items-center mt-10 mb-[20%]">
<div class="flex flex-col justify-center bg-[#F6F6F6] p-6 rounded-xl" style="min-width: 600px;">
@ -83,7 +87,7 @@ $conn = null;
document.getElementById("spinner").style.display = "block";
setTimeout(() => {
document.getElementById("uploadStatus").textContent = "Upload Complete";
document.getElementById("uploadStatus").textContent = "Then: Click Upload Files";
// Hide spinner after upload completion
document.getElementById("spinner").style.display = "none";
}, 2000); // Simulated upload time 2 seconds

View File

@ -366,7 +366,7 @@
"callbackData" => "some text here",
"type" => "Template",
"template" => [
"name" => "boost_conversion",
"name" => $_GET['send-whatsapp-id'],
"languageCode" => "en",
"headerValues" => [
"header_variable_value"
@ -391,12 +391,14 @@
$context = stream_context_create($options);
$fp = fopen($url, 'r', false, $context);
if ($fp === FALSE) {
echo 'Error occurred';
// echo 'Error occurred';
echo $fp;
} else {
$response = stream_get_contents($fp);
if ($response === FALSE) {
echo 'Error reading response';
// echo 'Error reading response';
// echo $response;
} else {
if(isset($_GET['send-whatsapp-id'])){
$templateName = $_GET['send-whatsapp-id'];
@ -632,7 +634,6 @@
<div class="flex flex-row place-content-between p-3" style="border-bottom: 2px solid #7E8299; border-style: dashed;">
<div class="flex flex-col">
<p style="font-size: 20px; font-weight: bold;">Communication:</p>
<p><?php echo $saved_message; ?></p>
</div>
</div>

34
.hta_slug/followup.php Normal file
View File

@ -0,0 +1,34 @@
<?php
require_once('.hta_config/crm_config.php');
require_once('.htac_header.php');
require_once('.htac_nav.php');
?>
<div class="flex flex-row place-content-between py-2" style="border-bottom: 2px solid #A0A2AB; border-style: dashed;">
<p class="text-[25px] font-bold">Followup</p>
</div>
<?php
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT date, user, id, name FROM cleads WHERE date IS NOT NULL AND date >= CURRENT_DATE AND user = :user");
$stmt->bindParam(':user', $_SESSION['email']);
$stmt->execute();
$users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
$row_count = count($users_rows);
if($row_count > 0){
foreach($users_rows as $users_data){
?>
<div class="flex flex-col space-y-2 gap-2 mb-2 ">
<a href="<?php echo '/edit-lead/?id='.$users_data['id']?>" class="flex flex-col w-full p-2 rounded-md shadow" style="border: 3px solid #F5F4FFE8;">
<p>🕑 New Followup for <?php echo $users_data['name']; ?></p>
<p><?php echo $users_data['date']; ?></p>
</a>
</div>
<?php
// echo '<p>'.$users_data['id'] . $users_data['user'] . $users_data['date'].'<br> </p>';
}
} else{
echo '<p>No Followup Found</p>';
}
?>

View File

@ -184,7 +184,7 @@
<!-- Existing search parameters -->
<input type="hidden" name="bv" value="<?php echo isset($_GET['bv']) ? htmlspecialchars($_GET['bv']) : ''; ?>">
<input class="p-2.5 rounded-l-lg focus:outline-none w-[170px] md:w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email..." style="border: 2px solid #8E8E8E;">
<input class="p-2.5 rounded-l-lg focus:outline-none w-[170px] md:w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email, Status..." style="border: 2px solid #8E8E8E;">
<button class="rounded-r-lg text-[#fff] p-1.5" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%);" type="submit"><i class="fa fa-search"></i></button>
</form>
</div>
@ -254,7 +254,7 @@
// second & final query to get the page_view data
$sql = "SELECT * FROM cleads WHERE business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
$sql = "SELECT * FROM cleads WHERE business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm OR status LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
$stmt = $conn->prepare($sql);
$stmt->bindValue(':businessVertical', "%".$businessVertical."%");
$stmt->bindValue(':searchTerm', "%$searchTerm%");
@ -445,7 +445,7 @@ echo'<div class="flex flex-row justify-between">
</form>
</div>
<?php
$leadsWithComments = []; // Initialize an array to hold leads with comments
$leadsWithComments = [];
foreach ($leads as $singleLead) {
try {

View File

@ -1,5 +1,4 @@
<style>
/* Quick action Sub menu */
.xzmdropdown-wrapper {
position: relative;
display: inline-block;
@ -29,7 +28,7 @@
.xzmdropdown-wrapper:hover .xzmdropdown-content {
display: block;
}
}
.xzmdropdown-submenu {
position: absolute;
@ -130,7 +129,17 @@
}
}
?>
<p class="text-[28px] font-bold p-4">Lead Management</p>
<div class="flex flex-row gap-2 justify-content-between place-items-center">
<p class="text-[28px] font-bold p-4">Lead Management</p>
<a href="/followup" class="inline-flex h-fit px-3 py-2 rounded-lg" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%);">
<svg width="30px" height="30px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M7 14C7 13.4477 7.44772 13 8 13C8.55229 13 9 13.4477 9 14C9 14.5523 8.55229 15 8 15C7.44772 15 7 14.5523 7 14Z" fill="#ffffff"></path> <path d="M8 17C7.44772 17 7 17.4477 7 18C7 18.5523 7.44772 19 8 19C8.55229 19 9 18.5523 9 18C9 17.4477 8.55229 17 8 17Z" fill="#ffffff"></path> <path d="M11 14C11 13.4477 11.4477 13 12 13C12.5523 13 13 13.4477 13 14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14Z" fill="#ffffff"></path> <path d="M12 17C11.4477 17 11 17.4477 11 18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18C13 17.4477 12.5523 17 12 17Z" fill="#ffffff"></path> <path d="M15 14C15 13.4477 15.4477 13 16 13C16.5523 13 17 13.4477 17 14C17 14.5523 16.5523 15 16 15C15.4477 15 15 14.5523 15 14Z" fill="#ffffff"></path> <path d="M16 17C15.4477 17 15 17.4477 15 18C15 18.5523 15.4477 19 16 19C16.5523 19 17 18.5523 17 18C17 17.4477 16.5523 17 16 17Z" fill="#ffffff"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M6 2C6 1.44772 6.44772 1 7 1C7.55228 1 8 1.44772 8 2V3H16V2C16 1.44772 16.4477 1 17 1C17.5523 1 18 1.44772 18 2V3H19C20.6569 3 22 4.34315 22 6V20C22 21.6569 20.6569 23 19 23H5C3.34315 23 2 21.6569 2 20V6C2 4.34315 3.34315 3 5 3H6V2ZM16 5V6C16 6.55228 16.4477 7 17 7C17.5523 7 18 6.55228 18 6V5H19C19.5523 5 20 5.44772 20 6V9H4V6C4 5.44772 4.44772 5 5 5H6V6C6 6.55228 6.44772 7 7 7C7.55228 7 8 6.55228 8 6V5H16ZM4 11V20C4 20.5523 4.44772 21 5 21H19C19.5523 21 20 20.5523 20 20V11H4Z" fill="#ffffff"></path> </g></svg>
<?php if($follow_date_count > 0){ ?>
<div class="bg-[#FF0000] rounded-full h-[18px] w-[18px] flex justify-center place-items-center -mt-[8px] -ml-[10px]">
<p class="text-center text-[#FFF]"><?php echo $follow_date_count; ?></p>
</div>
<?php } ?>
</a>
</div>
<div id="page-body" class="flex flex-row place-content-between px-4">
<dialog id="d" class="rounded-lg">
<form class="text-2xl text-[#464E5F] border-[3px] m-2 border-[#464E5F] duration-700 rounded-full px-2 float-right" method="dialog" class=""><button class="">&#10008</button></form>
@ -165,7 +174,7 @@
<button onclick="downloadCSV(data, filename)" class="text-[#fff] rounded-lg h-fit inline-flex justify-center place-items-center p-2" style="background: linear-gradient(90deg, rgba(70, 68, 142, 0.91) 0%, rgba(120, 117, 244, 0.91) 100%);">Download csv</button>
<div class="flex flex-row">
<form method="GET" action="" class="bg-[#fff] flex flex-row place-items-center">
<input class="p-2.5 rounded-l-lg focus:outline-none w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email..." style="border: 2px solid #8E8E8E;">
<input class="p-2.5 rounded-l-lg focus:outline-none w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email, Status..." style="border: 2px solid #8E8E8E;">
<button class="rounded-r-lg text-[#fff] p-1.5" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%);" type="submit"><i class="fa fa-search"></i></button>
</form>
</div>
@ -200,6 +209,7 @@
<th class="border-b-2 p-3 text-left">Status</th>
<th class="border-b-2 p-3 text-left">Form Name</th>
<th class="border-b-2 p-3">Assigned to</th>
<th class="border-b-2 p-3">Followup Date</th>
</tr>
</thead>
<tbody >
@ -226,7 +236,7 @@
$quotedParts = array_map(function($item) { return "'" . $item . "'";}, $parts);
$stateAcc = implode(',', $quotedParts);
$sql= "SELECT COUNT(*) FROM cleads WHERE state IN ($stateAcc) OR user LIKE :user AND business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ";
$sql= "SELECT COUNT(*) FROM cleads WHERE state IN ($stateAcc) OR user LIKE :user AND business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm OR status LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ";
$stmt = $conn->prepare($sql);
$stmt->bindValue(':businessVertical', $businessVertical);
$stmt->bindValue(':searchTerm', "%".$searchTerm."%");
@ -238,7 +248,7 @@
// second & final query to get the page_view data
$sql = "SELECT * FROM cleads WHERE state IN ($stateAcc) OR user LIKE :user AND business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
$sql = "SELECT * FROM cleads WHERE state IN ($stateAcc) OR user LIKE :user AND business_type LIKE :businessVertical AND (name LIKE :searchTerm OR phone LIKE :searchTerm OR id LIKE :searchTerm OR email LIKE :searchTerm OR status LIKE :searchTerm ) AND time BETWEEN :start_date AND :end_date ORDER BY id DESC LIMIT :limit OFFSET :offset";
$stmt = $conn->prepare($sql);
$stmt->bindValue(':businessVertical', $businessVertical, PDO::PARAM_STR );
$stmt->bindValue(':searchTerm', "%$searchTerm%"); // PDO::PARAM_STR is the default data type binding so is not needed
@ -284,6 +294,7 @@
</td> -->
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
<td class="border-y-2 p-2"><?php echo $lead['user'] ?></td>
<td class="border-y-2 p-2"><?php echo $lead['date'] ?></td>
</tr>
<?php

View File

@ -15,7 +15,6 @@
echo "Error: " . $e->getMessage();
}
};
?>
<form method="post">
<div>
@ -23,9 +22,10 @@
<p class="text-[25px] font-bold">Notifications</p>
<div>
<a href="/notifications?tab=past" class="text-[#6F6BFF]">Past Notifications</a> |
<input name="mark_all_read" type="submit" value="Mark all as read" class="text-[#6F6BFF] pr-6 cursor-pointer " />
<input name="mark_all_read" type="submit" value="Mark all as read" class="text-[#6F6BFF] pr-6 cursor-pointer" />
</div>
</div>
</div>
</form>
<?php
try {
@ -42,15 +42,15 @@
if($appt['view_status'] == 0){
$notification_bg = 'background: #F5F4FFE8;';
$notification_batch = '<div style="width: 8px; height: 8px; background-color: red; border-radius: 50%;"></div>';
$clickButton = '';
// $clickButton = '';
}elseif($appt['view_status'] == 1){
$notification_bg = 'background: #fff;';
$notification_batch = '<div style="width: 8px; height: 8px; background-color: #fff; border-radius: 50%;"></div>';
$clickButton = 'disabled';
// $clickButton = 'disabled';
}
?> <div class="p-2">
<form method="post">
<button type="submit" class="w-full text-left" <?php echo $clickButton; ?>>
<button type="submit" class="w-full text-left" >
<div class="flex flex-col w-full p-2 rounded-md shadow" style="border: 3px solid #F5F4FFE8; <?php echo $notification_bg; ?>">
<div class="flex flex-row place-items-center justify-between">
<div class="flex flex-row place-items-center">🕑 Reminders for &nbsp;<?php echo $appt['lead_name'].'&nbsp;&nbsp;'. $notification_batch; ?></div>
@ -69,8 +69,6 @@
} catch (PDOException $e) {
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
};
if($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['status_id']) && $_POST['status_id']){
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);

View File

@ -13,6 +13,17 @@
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT COUNT(*) AS count FROM cleads WHERE user = :user AND date IS NOT NULL AND date >= CURRENT_DATE");
$stmt->bindParam(':user', $_SESSION['email']);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$follow_date_count = $result['count'];
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
<section class="bg-[#443780] py-1.5 px-4" style="position: fixed; width: 100%; z-index: 999;">
<div class="container mx-auto flex flex-row place-content-between text-[#fff] ">
@ -21,16 +32,26 @@
<p class="font-bold">CRM</p>
</div>
<div class="flex flex-row space-x-4 place-items-center">
<div class="flex flex-row space-x-4">
<a href="/notifications" class="flex flex-row"><i class="fa fa-bell">
<?php
if($total_notice > 0){
echo '<span class="bg-[#FF0000] rounded-full px-1" style="margin-top: -10px;">'.$total_notice.'</span>';
}
?>
<a href="/notifications" class="inline-flex">
<svg height="23px" width="23px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve" fill="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <style type="text/css"> .st0{fill:#ffffff;} </style> <g> <path class="st0" d="M448.282,367.411H63.712c-19.812,0-35.928,16.114-35.928,35.924c0,19.814,16.116,35.932,35.928,35.932h384.57 c19.814,0,35.934-16.118,35.934-35.932C484.216,383.526,468.096,367.411,448.282,367.411z"></path> <path class="st0" d="M425.958,340.707c-8.653-14.375-13.226-30.765-13.226-47.396v-78.824c0-78.145-57.706-144.27-134.748-155.09 c5.693-6.534,8.793-14.759,8.793-23.474c0-19.81-16.12-35.924-35.934-35.924c-19.808,0-35.924,16.114-35.924,35.924 c0,9.324,3.729,18.272,10.326,24.996C152.058,75.478,99.269,139.562,99.269,214.488v78.824c0,16.627-4.573,33.016-13.224,47.396 l-1.45,2.41h342.813L425.958,340.707z"></path> <path class="st0" d="M201.956,470.773C206.051,494.663,226.61,512,250.84,512c24.235,0,44.8-17.337,48.896-41.227l0.32-1.86h-98.42 L201.956,470.773z"></path> </g> </g></svg>
<?php if($total_notice > 0){ ?>
<div class="bg-[#FF0000] rounded-full h-[18px] w-[18px] flex justify-center place-items-center -mt-[8px] -ml-[10px]">
<p class="text-center"><?php echo $total_notice; ?></p>
</div>
<?php } ?>
</a>
<!-- <span class="" style="background-color: #FF0000; padding-left: 4px; padding-right: 4px; border-radius: 50%; ">1</span> -->
</i></a>
<div class="flex flex-row space-x-4">
<a href="/notifications" class="flex flex-row">
<?php
// if($total_notice > 0){
// echo ' <div class="bg-[#FF0000] rounded-full h-[18px] w-[18px] flex justify-center place-items-center -mt-[8px] -ml-[10px]">
// <p class="text-center">'.$total_notice.'</p>
// </div>';
// }
?>
</a>
<a href="/logout" class="bg-[#E4C1F9] text-[#443780] px-4 rounded-full"><i class="fa fa-sign-out">Logout</i></a>
</div>
<?php

View File

@ -1,2 +1,2 @@
name,email,phone,subject,message,details,origin,verticals,business_type,note,user,coupon_code,coupon
Sample Name,sample@email.com,0,Sample Subject,Sample Message,Sample Details,Sample Origin ,Sample verticals,Sample business_type,Sample Note,user@siliconpin.com,Sample coupon_code,Sample coupon
name,email,phone,subject,message,details,origin,verticals,business_type,note,user,coupon_code,coupon,country,state
Sample Name,sample@email.com,0,Sample Subject,Sample Message,Sample Details,Sample Origin ,Sample verticals,Sample business_type,Sample Note,user@siliconpin.com,Sample coupon_code,Sample coupon ,IN,WB

1 name email phone subject message details origin verticals business_type note user coupon_code coupon country state
2 Sample Name sample@email.com 0 Sample Subject Sample Message Sample Details Sample Origin Sample verticals Sample business_type Sample Note user@siliconpin.com Sample coupon_code Sample coupon IN WB

251
assets/countries.csv Normal file
View File

@ -0,0 +1,251 @@
"name";"iso2"
"Afghanistan";"AF"
"Aland Islands";"AX"
"Albania";"AL"
"Algeria";"DZ"
"American Samoa";"AS"
"Andorra";"AD"
"Angola";"AO"
"Anguilla";"AI"
"Antarctica";"AQ"
"Antigua And Barbuda";"AG"
"Argentina";"AR"
"Armenia";"AM"
"Aruba";"AW"
"Australia";"AU"
"Austria";"AT"
"Azerbaijan";"AZ"
"The Bahamas";"BS"
"Bahrain";"BH"
"Bangladesh";"BD"
"Barbados";"BB"
"Belarus";"BY"
"Belgium";"BE"
"Belize";"BZ"
"Benin";"BJ"
"Bermuda";"BM"
"Bhutan";"BT"
"Bolivia";"BO"
"Bosnia and Herzegovina";"BA"
"Botswana";"BW"
"Bouvet Island";"BV"
"Brazil";"BR"
"British Indian Ocean Territory";"IO"
"Brunei";"BN"
"Bulgaria";"BG"
"Burkina Faso";"BF"
"Burundi";"BI"
"Cambodia";"KH"
"Cameroon";"CM"
"Canada";"CA"
"Cape Verde";"CV"
"Cayman Islands";"KY"
"Central African Republic";"CF"
"Chad";"TD"
"Chile";"CL"
"China";"CN"
"Christmas Island";"CX"
"Cocos (Keeling) Islands";"CC"
"Colombia";"CO"
"Comoros";"KM"
"Congo";"CG"
"Democratic Republic of the Congo";"CD"
"Cook Islands";"CK"
"Costa Rica";"CR"
"Cote D'Ivoire (Ivory Coast)";"CI"
"Croatia";"HR"
"Cuba";"CU"
"Cyprus";"CY"
"Czech Republic";"CZ"
"Denmark";"DK"
"Djibouti";"DJ"
"Dominica";"DM"
"Dominican Republic";"DO"
"East Timor";"TL"
"Ecuador";"EC"
"Egypt";"EG"
"El Salvador";"SV"
"Equatorial Guinea";"GQ"
"Eritrea";"ER"
"Estonia";"EE"
"Ethiopia";"ET"
"Falkland Islands";"FK"
"Faroe Islands";"FO"
"Fiji Islands";"FJ"
"Finland";"FI"
"France";"FR"
"French Guiana";"GF"
"French Polynesia";"PF"
"French Southern Territories";"TF"
"Gabon";"GA"
"Gambia The";"GM"
"Georgia";"GE"
"Germany";"DE"
"Ghana";"GH"
"Gibraltar";"GI"
"Greece";"GR"
"Greenland";"GL"
"Grenada";"GD"
"Guadeloupe";"GP"
"Guam";"GU"
"Guatemala";"GT"
"Guernsey and Alderney";"GG"
"Guinea";"GN"
"Guinea-Bissau";"GW"
"Guyana";"GY"
"Haiti";"HT"
"Heard Island and McDonald Islands";"HM"
"Honduras";"HN"
"Hong Kong S.A.R.";"HK"
"Hungary";"HU"
"Iceland";"IS"
"India";"IN"
"Indonesia";"ID"
"Iran";"IR"
"Iraq";"IQ"
"Ireland";"IE"
"Israel";"IL"
"Italy";"IT"
"Jamaica";"JM"
"Japan";"JP"
"Jersey";"JE"
"Jordan";"JO"
"Kazakhstan";"KZ"
"Kenya";"KE"
"Kiribati";"KI"
"North Korea";"KP"
"South Korea";"KR"
"Kuwait";"KW"
"Kyrgyzstan";"KG"
"Laos";"LA"
"Latvia";"LV"
"Lebanon";"LB"
"Lesotho";"LS"
"Liberia";"LR"
"Libya";"LY"
"Liechtenstein";"LI"
"Lithuania";"LT"
"Luxembourg";"LU"
"Macau S.A.R.";"MO"
"North Macedonia";"MK"
"Madagascar";"MG"
"Malawi";"MW"
"Malaysia";"MY"
"Maldives";"MV"
"Mali";"ML"
"Malta";"MT"
"Man (Isle of)";"IM"
"Marshall Islands";"MH"
"Martinique";"MQ"
"Mauritania";"MR"
"Mauritius";"MU"
"Mayotte";"YT"
"Mexico";"MX"
"Micronesia";"FM"
"Moldova";"MD"
"Monaco";"MC"
"Mongolia";"MN"
"Montenegro";"ME"
"Montserrat";"MS"
"Morocco";"MA"
"Mozambique";"MZ"
"Myanmar";"MM"
"Namibia";"NA"
"Nauru";"NR"
"Nepal";"NP"
"Bonaire, Sint Eustatius and Saba";"BQ"
"Netherlands";"NL"
"New Caledonia";"NC"
"New Zealand";"NZ"
"Nicaragua";"NI"
"Niger";"NE"
"Nigeria";"NG"
"Niue";"NU"
"Norfolk Island";"NF"
"Northern Mariana Islands";"MP"
"Norway";"NO"
"Oman";"OM"
"Pakistan";"PK"
"Palau";"PW"
"Palestinian Territory Occupied";"PS"
"Panama";"PA"
"Papua new Guinea";"PG"
"Paraguay";"PY"
"Peru";"PE"
"Philippines";"PH"
"Pitcairn Island";"PN"
"Poland";"PL"
"Portugal";"PT"
"Puerto Rico";"PR"
"Qatar";"QA"
"Reunion";"RE"
"Romania";"RO"
"Russia";"RU"
"Rwanda";"RW"
"Saint Helena";"SH"
"Saint Kitts And Nevis";"KN"
"Saint Lucia";"LC"
"Saint Pierre and Miquelon";"PM"
"Saint Vincent And The Grenadines";"VC"
"Saint-Barthelemy";"BL"
"Saint-Martin (French part)";"MF"
"Samoa";"WS"
"San Marino";"SM"
"Sao Tome and Principe";"ST"
"Saudi Arabia";"SA"
"Senegal";"SN"
"Serbia";"RS"
"Seychelles";"SC"
"Sierra Leone";"SL"
"Singapore";"SG"
"Slovakia";"SK"
"Slovenia";"SI"
"Solomon Islands";"SB"
"Somalia";"SO"
"South Africa";"ZA"
"South Georgia";"GS"
"South Sudan";"SS"
"Spain";"ES"
"Sri Lanka";"LK"
"Sudan";"SD"
"Suriname";"SR"
"Svalbard And Jan Mayen Islands";"SJ"
"Swaziland";"SZ"
"Sweden";"SE"
"Switzerland";"CH"
"Syria";"SY"
"Taiwan";"TW"
"Tajikistan";"TJ"
"Tanzania";"TZ"
"Thailand";"TH"
"Togo";"TG"
"Tokelau";"TK"
"Tonga";"TO"
"Trinidad And Tobago";"TT"
"Tunisia";"TN"
"Turkey";"TR"
"Turkmenistan";"TM"
"Turks And Caicos Islands";"TC"
"Tuvalu";"TV"
"Uganda";"UG"
"Ukraine";"UA"
"United Arab Emirates";"AE"
"United Kingdom";"GB"
"United States";"US"
"United States Minor Outlying Islands";"UM"
"Uruguay";"UY"
"Uzbekistan";"UZ"
"Vanuatu";"VU"
"Vatican City State (Holy See)";"VA"
"Venezuela";"VE"
"Vietnam";"VN"
"Virgin Islands (British)";"VG"
"Virgin Islands (US)";"VI"
"Wallis And Futuna Islands";"WF"
"Western Sahara";"EH"
"Yemen";"YE"
"Zambia";"ZM"
"Zimbabwe";"ZW"
"Kosovo";"XK"
"Curaçao";"CW"
"Sint Maarten (Dutch part)";"SX"
1 name iso2
2 Afghanistan AF
3 Aland Islands AX
4 Albania AL
5 Algeria DZ
6 American Samoa AS
7 Andorra AD
8 Angola AO
9 Anguilla AI
10 Antarctica AQ
11 Antigua And Barbuda AG
12 Argentina AR
13 Armenia AM
14 Aruba AW
15 Australia AU
16 Austria AT
17 Azerbaijan AZ
18 The Bahamas BS
19 Bahrain BH
20 Bangladesh BD
21 Barbados BB
22 Belarus BY
23 Belgium BE
24 Belize BZ
25 Benin BJ
26 Bermuda BM
27 Bhutan BT
28 Bolivia BO
29 Bosnia and Herzegovina BA
30 Botswana BW
31 Bouvet Island BV
32 Brazil BR
33 British Indian Ocean Territory IO
34 Brunei BN
35 Bulgaria BG
36 Burkina Faso BF
37 Burundi BI
38 Cambodia KH
39 Cameroon CM
40 Canada CA
41 Cape Verde CV
42 Cayman Islands KY
43 Central African Republic CF
44 Chad TD
45 Chile CL
46 China CN
47 Christmas Island CX
48 Cocos (Keeling) Islands CC
49 Colombia CO
50 Comoros KM
51 Congo CG
52 Democratic Republic of the Congo CD
53 Cook Islands CK
54 Costa Rica CR
55 Cote D'Ivoire (Ivory Coast) CI
56 Croatia HR
57 Cuba CU
58 Cyprus CY
59 Czech Republic CZ
60 Denmark DK
61 Djibouti DJ
62 Dominica DM
63 Dominican Republic DO
64 East Timor TL
65 Ecuador EC
66 Egypt EG
67 El Salvador SV
68 Equatorial Guinea GQ
69 Eritrea ER
70 Estonia EE
71 Ethiopia ET
72 Falkland Islands FK
73 Faroe Islands FO
74 Fiji Islands FJ
75 Finland FI
76 France FR
77 French Guiana GF
78 French Polynesia PF
79 French Southern Territories TF
80 Gabon GA
81 Gambia The GM
82 Georgia GE
83 Germany DE
84 Ghana GH
85 Gibraltar GI
86 Greece GR
87 Greenland GL
88 Grenada GD
89 Guadeloupe GP
90 Guam GU
91 Guatemala GT
92 Guernsey and Alderney GG
93 Guinea GN
94 Guinea-Bissau GW
95 Guyana GY
96 Haiti HT
97 Heard Island and McDonald Islands HM
98 Honduras HN
99 Hong Kong S.A.R. HK
100 Hungary HU
101 Iceland IS
102 India IN
103 Indonesia ID
104 Iran IR
105 Iraq IQ
106 Ireland IE
107 Israel IL
108 Italy IT
109 Jamaica JM
110 Japan JP
111 Jersey JE
112 Jordan JO
113 Kazakhstan KZ
114 Kenya KE
115 Kiribati KI
116 North Korea KP
117 South Korea KR
118 Kuwait KW
119 Kyrgyzstan KG
120 Laos LA
121 Latvia LV
122 Lebanon LB
123 Lesotho LS
124 Liberia LR
125 Libya LY
126 Liechtenstein LI
127 Lithuania LT
128 Luxembourg LU
129 Macau S.A.R. MO
130 North Macedonia MK
131 Madagascar MG
132 Malawi MW
133 Malaysia MY
134 Maldives MV
135 Mali ML
136 Malta MT
137 Man (Isle of) IM
138 Marshall Islands MH
139 Martinique MQ
140 Mauritania MR
141 Mauritius MU
142 Mayotte YT
143 Mexico MX
144 Micronesia FM
145 Moldova MD
146 Monaco MC
147 Mongolia MN
148 Montenegro ME
149 Montserrat MS
150 Morocco MA
151 Mozambique MZ
152 Myanmar MM
153 Namibia NA
154 Nauru NR
155 Nepal NP
156 Bonaire, Sint Eustatius and Saba BQ
157 Netherlands NL
158 New Caledonia NC
159 New Zealand NZ
160 Nicaragua NI
161 Niger NE
162 Nigeria NG
163 Niue NU
164 Norfolk Island NF
165 Northern Mariana Islands MP
166 Norway NO
167 Oman OM
168 Pakistan PK
169 Palau PW
170 Palestinian Territory Occupied PS
171 Panama PA
172 Papua new Guinea PG
173 Paraguay PY
174 Peru PE
175 Philippines PH
176 Pitcairn Island PN
177 Poland PL
178 Portugal PT
179 Puerto Rico PR
180 Qatar QA
181 Reunion RE
182 Romania RO
183 Russia RU
184 Rwanda RW
185 Saint Helena SH
186 Saint Kitts And Nevis KN
187 Saint Lucia LC
188 Saint Pierre and Miquelon PM
189 Saint Vincent And The Grenadines VC
190 Saint-Barthelemy BL
191 Saint-Martin (French part) MF
192 Samoa WS
193 San Marino SM
194 Sao Tome and Principe ST
195 Saudi Arabia SA
196 Senegal SN
197 Serbia RS
198 Seychelles SC
199 Sierra Leone SL
200 Singapore SG
201 Slovakia SK
202 Slovenia SI
203 Solomon Islands SB
204 Somalia SO
205 South Africa ZA
206 South Georgia GS
207 South Sudan SS
208 Spain ES
209 Sri Lanka LK
210 Sudan SD
211 Suriname SR
212 Svalbard And Jan Mayen Islands SJ
213 Swaziland SZ
214 Sweden SE
215 Switzerland CH
216 Syria SY
217 Taiwan TW
218 Tajikistan TJ
219 Tanzania TZ
220 Thailand TH
221 Togo TG
222 Tokelau TK
223 Tonga TO
224 Trinidad And Tobago TT
225 Tunisia TN
226 Turkey TR
227 Turkmenistan TM
228 Turks And Caicos Islands TC
229 Tuvalu TV
230 Uganda UG
231 Ukraine UA
232 United Arab Emirates AE
233 United Kingdom GB
234 United States US
235 United States Minor Outlying Islands UM
236 Uruguay UY
237 Uzbekistan UZ
238 Vanuatu VU
239 Vatican City State (Holy See) VA
240 Venezuela VE
241 Vietnam VN
242 Virgin Islands (British) VG
243 Virgin Islands (US) VI
244 Wallis And Futuna Islands WF
245 Western Sahara EH
246 Yemen YE
247 Zambia ZM
248 Zimbabwe ZW
249 Kosovo XK
250 Curaao CW
251 Sint Maarten (Dutch part) SX

37
assets/states.csv Normal file
View File

@ -0,0 +1,37 @@
"name";"iso2"
"Meghalaya";"ML"
"Haryana";"HR"
"Maharashtra";"MH"
"Goa";"GA"
"Manipur";"MN"
"Puducherry";"PY"
"Telangana";"TG"
"Odisha";"OR"
"Rajasthan";"RJ"
"Punjab";"PB"
"Uttarakhand";"UT"
"Andhra Pradesh";"AP"
"Nagaland";"NL"
"Lakshadweep";"LD"
"Himachal Pradesh";"HP"
"Delhi";"DL"
"Uttar Pradesh";"UP"
"Andaman and Nicobar Islands";"AN"
"Arunachal Pradesh";"AR"
"Jharkhand";"JH"
"Karnataka";"KA"
"Assam";"AS"
"Kerala";"KL"
"Jammu and Kashmir";"JK"
"Gujarat";"GJ"
"Chandigarh";"CH"
"Dadra and Nagar Haveli and Daman and Diu";"DH"
"Sikkim";"SK"
"Tamil Nadu";"TN"
"Mizoram";"MZ"
"Bihar";"BR"
"Tripura";"TR"
"Madhya Pradesh";"MP"
"Chhattisgarh";"CT"
"Ladakh";"LA"
"West Bengal";"WB"
1 name iso2
2 Meghalaya ML
3 Haryana HR
4 Maharashtra MH
5 Goa GA
6 Manipur MN
7 Puducherry PY
8 Telangana TG
9 Odisha OR
10 Rajasthan RJ
11 Punjab PB
12 Uttarakhand UT
13 Andhra Pradesh AP
14 Nagaland NL
15 Lakshadweep LD
16 Himachal Pradesh HP
17 Delhi DL
18 Uttar Pradesh UP
19 Andaman and Nicobar Islands AN
20 Arunachal Pradesh AR
21 Jharkhand JH
22 Karnataka KA
23 Assam AS
24 Kerala KL
25 Jammu and Kashmir JK
26 Gujarat GJ
27 Chandigarh CH
28 Dadra and Nagar Haveli and Daman and Diu DH
29 Sikkim SK
30 Tamil Nadu TN
31 Mizoram MZ
32 Bihar BR
33 Tripura TR
34 Madhya Pradesh MP
35 Chhattisgarh CT
36 Ladakh LA
37 West Bengal WB