c1
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$mariaServer = "10.0.0.108";
|
$mariaServer = "172.17.0.1";
|
||||||
$mariaUser = "siliconpin";
|
$mariaUser = "siliconpin";
|
||||||
$mariaPass = "bijaynagar";
|
$mariaPass = "0000";
|
||||||
$mariaDb = "siliconpin_crm";
|
$mariaDb = "siliconpin_crm";
|
||||||
?>
|
?>
|
||||||
151
.hta_slug/admin/add-forms.php
Normal file
151
.hta_slug/admin/add-forms.php
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
require_once('/var/www/html/.hta_config/crm_config.php');
|
||||||
|
require_once('/var/www/html/.htac_header.php');
|
||||||
|
require_once('/var/www/html/.htac_nav.php');
|
||||||
|
|
||||||
|
if($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['formname'] && $_POST['bverticals'] && $_POST['save_forms']){
|
||||||
|
try {
|
||||||
|
$lowercase_bv = str_replace(' ', '_', strtolower($_POST['formname']));
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$stmt = $conn->prepare("INSERT INTO addforms (formname, bverticals) VALUES (:formname, :bverticals)");
|
||||||
|
$stmt->bindParam(':formname', $lowercase_bv);
|
||||||
|
$stmt->bindParam(':bverticals', $_POST['bverticals']);
|
||||||
|
$stmt->execute();
|
||||||
|
echo "Record added successfully";
|
||||||
|
} catch(PDOException $e) {
|
||||||
|
echo "Error: " . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<button onclick="toggleDisplay();" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 10px 20px 10px 20px; color: #fff; border-radius: 6px; float: right; margin-top: 100px; margin-bottom: 30px;">Add New Forms</button>
|
||||||
|
</div>
|
||||||
|
<div class="add-bv-form" id="add-bv-form">
|
||||||
|
<div class="flex flex-row place-content-between" style="border-bottom: 2px solid #464E5F; border-style: dashed;">
|
||||||
|
<h3 style="font-size: 25px; font-weight: bold;">Add New Forms</h3>
|
||||||
|
<p onclick="toggleDisplay();" class="rounded-lg px-1.5 text-[#464E5F] text-[25px] cursor-pointer" style="border: 2px solid #464E5F; border-radius: 50%;">✘</p>
|
||||||
|
</div>
|
||||||
|
<form method="post">
|
||||||
|
<div class="flex flex-col mt-4">
|
||||||
|
<label for="formname">Form Name:</label>
|
||||||
|
<input type="text" name="formname" id="formname" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" />
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col mr-4">
|
||||||
|
<label for="bverticals">Select Business Verticals:</label>
|
||||||
|
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="bverticals" id="bverticals" >
|
||||||
|
<option value="">-Select-</option>
|
||||||
|
<?php
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$stmt = $conn->prepare("SELECT * FROM business_verticals");
|
||||||
|
$stmt->execute();
|
||||||
|
$users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
$row_count = count($users_rows);
|
||||||
|
if($row_count > 0){
|
||||||
|
foreach($users_rows as $users_data){
|
||||||
|
echo '<option value="'.$users_data['bv'].'">'.$users_data['bv'].'</option>';
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
echo '<p>No users Found</p>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="submit" name="save_forms" id="submit" value="Save" style="color:#fff; border-radius: 6px; background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; margin-top: 10px; padding: 10px 20px 10px 20px;" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold" style="">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="text-center border-b-2 p-3">Serial</th>
|
||||||
|
<th class="text-center border-b-2 p-3">Form Name</th>
|
||||||
|
<th class="text-center border-b-2 p-3">Business Verticals</th>
|
||||||
|
<th class="text-center border-b-2 p-3">Time</th>
|
||||||
|
<th class="text-center border-b-2 p-3">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
try {
|
||||||
|
$bv_counter = 1;
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$stmt = $conn->prepare("SELECT * FROM addforms ORDER BY created_at DESC");
|
||||||
|
$stmt->execute();
|
||||||
|
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
foreach($rows as $row){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="border-y-2 p-2 text-center"><?php echo $bv_counter; ?></td>
|
||||||
|
<td class="border-y-2 p-2 "><?php echo $row['formname']; ?></td>
|
||||||
|
<td class="border-y-2 p-2 "><?php echo $row['bverticals']; ?></td>
|
||||||
|
<td class="border-y-2 p-2 text-center"><?php echo $row['time']; ?></td>
|
||||||
|
<td class="border-y-2 p-2">
|
||||||
|
<div class="flex flex-row justify-center">
|
||||||
|
<a href="/admin/edit-forms/?id=<?php echo $row['id']; ?>">Edit</a> |
|
||||||
|
<a href="/admin/delete-forms/?id=<?php echo $row['id']; ?>">Delete</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php $bv_counter++; }
|
||||||
|
$num_rows = $stmt->rowCount();
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleDisplay() {
|
||||||
|
var element = document.getElementById('add-bv-form');
|
||||||
|
if (element.style.display === 'block') {
|
||||||
|
element.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
element.style.display = 'block';
|
||||||
|
element.classList.add('slide-in-animation'); // Add class to trigger animation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Event listener for the Esc key
|
||||||
|
document.addEventListener('keydown', function(event) {
|
||||||
|
if (event.keyCode === 27) {
|
||||||
|
var modal = document.getElementById('add-bv-form');
|
||||||
|
if (modal.style.display === 'block') {
|
||||||
|
modal.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.add-bv-form {
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 0%;
|
||||||
|
right: 0%;
|
||||||
|
transform: translateX(100%);
|
||||||
|
/* transform: translate(-0%, -50%); */
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
box-shadow: 0px 0px 20px 0px #443780;
|
||||||
|
border-radius: 2px;
|
||||||
|
z-index: 100;
|
||||||
|
height: 100%;
|
||||||
|
padding: 10px 20px 10px 20px;
|
||||||
|
animation: slideInRight 0.5s forwards; /* Animation to slide in */
|
||||||
|
/* overflow-x: auto; */
|
||||||
|
}
|
||||||
|
@keyframes slideInRight {
|
||||||
|
from {
|
||||||
|
transform: translateX(100%);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: translateX(0%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
if($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['bv'] && $_POST['save_lead'] ){
|
if($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['bv'] && $_POST['save_lead'] ){
|
||||||
try {
|
try {
|
||||||
$lowercase_bv = strtolower($_POST['bv']);
|
$lowercase_bv = str_replace(' ', '_', strtolower($_POST['bv']));
|
||||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$stmt = $conn->prepare("INSERT INTO business_verticals (bv) VALUES (:bv)");
|
$stmt = $conn->prepare("INSERT INTO business_verticals (bv) VALUES (:bv)");
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="border-y-2 p-2 text-center"><?php echo $bv_counter; ?></td>
|
<td class="border-y-2 p-2 text-center"><?php echo $bv_counter; ?></td>
|
||||||
<td class="border-y-2 p-2 uppercase"><?php echo $row['bv']; ?></td>
|
<td class="border-y-2 p-2 "><?php echo $row['bv']; ?></td>
|
||||||
<td class="border-y-2 p-2 text-center"><?php echo $row['time']; ?></td>
|
<td class="border-y-2 p-2 text-center"><?php echo $row['time']; ?></td>
|
||||||
<td class="border-y-2 p-2">
|
<td class="border-y-2 p-2">
|
||||||
<div class="flex flex-row justify-center">
|
<div class="flex flex-row justify-center">
|
||||||
|
|||||||
@@ -1,3 +1,61 @@
|
|||||||
|
<style>
|
||||||
|
.xzmdropdown-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-content {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #EAEAEA;
|
||||||
|
min-width: 120px;
|
||||||
|
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
|
||||||
|
z-index: 1;
|
||||||
|
border: 1px solid #939393;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-content a {
|
||||||
|
color: black;
|
||||||
|
padding: 12px 16px;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-content a:hover {
|
||||||
|
background-color: #B2B0FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-wrapper:hover .xzmdropdown-content {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-submenu {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 100%;
|
||||||
|
margin-top: 105px;
|
||||||
|
display: none;
|
||||||
|
background-color: #EAEAEA; /* Background color for submenu */
|
||||||
|
min-width: 120px; /* Adjust width as needed */
|
||||||
|
border: 1px solid #939393;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-content .xzmdropdown-item:hover .xzmdropdown-submenu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-submenu a {
|
||||||
|
padding: 10px 16px; /* Padding for submenu items */
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xzmdropdown-submenu a:hover {
|
||||||
|
background-color: #c0c0c0; /* Hover background color for submenu items */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</style>
|
||||||
<?php
|
<?php
|
||||||
require_once('/var/www/html/.hta_config/crm_config.php');
|
require_once('/var/www/html/.hta_config/crm_config.php');
|
||||||
require_once('/var/www/html/.htac_header.php');
|
require_once('/var/www/html/.htac_header.php');
|
||||||
@@ -136,13 +194,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</th>';
|
</th>';
|
||||||
?>
|
?>
|
||||||
|
<th class="text-center border-b-2 p-3">Quick Action</th>
|
||||||
<th class="text-center border-b-2 p-3">Name</th>
|
<th class="text-center border-b-2 p-3">Name</th>
|
||||||
<th class="text-center border-b-2 p-3">ID</th>
|
<th class="text-center border-b-2 p-3">ID</th>
|
||||||
<th class="text-center border-b-2 p-3">Status Update</th>
|
<th class="text-center border-b-2 p-3">Status Update</th>
|
||||||
<!-- <th class="text-center border-b-2 p-3">Contact Detail</th> -->
|
<!-- <th class="text-center border-b-2 p-3">Contact Detail</th> -->
|
||||||
<th class="text-center border-b-2 p-3">Form Name</th>
|
<th class="text-center border-b-2 p-3">Form Name</th>
|
||||||
<th class="text-center border-b-2 p-3">Date</th>
|
<th class="text-center border-b-2 p-3">Date</th>
|
||||||
<th class="text-center border-b-2 p-3">Quick Action</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody >
|
<tbody >
|
||||||
@@ -175,7 +233,6 @@
|
|||||||
$stmt->bindValue(2, "%$searchQuery%", PDO::PARAM_STR);
|
$stmt->bindValue(2, "%$searchQuery%", PDO::PARAM_STR);
|
||||||
$stmt->bindValue(3, "%$searchQuery%", PDO::PARAM_STR);
|
$stmt->bindValue(3, "%$searchQuery%", PDO::PARAM_STR);
|
||||||
$stmt->bindValue(4, "%$searchQuery%", PDO::PARAM_STR);
|
$stmt->bindValue(4, "%$searchQuery%", PDO::PARAM_STR);
|
||||||
|
|
||||||
$stmt->bindValue( 5, 0, PDO::PARAM_INT); // Offset for pagination
|
$stmt->bindValue( 5, 0, PDO::PARAM_INT); // Offset for pagination
|
||||||
$stmt->bindValue( 6, $recordsPerPage, PDO::PARAM_INT); // Records per page
|
$stmt->bindValue( 6, $recordsPerPage, PDO::PARAM_INT); // Records per page
|
||||||
// this is for date serch
|
// this is for date serch
|
||||||
@@ -222,6 +279,30 @@
|
|||||||
// if($row['status'] == 'Warm'){$conditional_status = '<div class="flex flex-row"><p>'.$row['status'].'</p><select class="focus: outline-none " style="'.$conditional_background_color.' border: none;"><option>Option 1</option><option>Option 2</option></select></div>';}elseif($row['status'] != 'Warm'){$conditional_status = $row['status'];}
|
// if($row['status'] == 'Warm'){$conditional_status = '<div class="flex flex-row"><p>'.$row['status'].'</p><select class="focus: outline-none " style="'.$conditional_background_color.' border: none;"><option>Option 1</option><option>Option 2</option></select></div>';}elseif($row['status'] != 'Warm'){$conditional_status = $row['status'];}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="border-y-2 p-2">
|
||||||
|
<div class="flex flex-row justify-center place-items-center">
|
||||||
|
<div class="xzmdropdown-wrapper">
|
||||||
|
<button class="xzmdropdown-btn"><i class="fa fa-envelope" style="font-size: 20px"></i></button>
|
||||||
|
<div class="xzmdropdown-content">
|
||||||
|
<a href="#">UNO</a>
|
||||||
|
<a href="#">Primero</a>
|
||||||
|
<div class="xzmdropdown-item">
|
||||||
|
<a href="#">ILC</a>
|
||||||
|
<a href="#">Complete package</a>
|
||||||
|
<a href="#">Bespoke</a>
|
||||||
|
<div class="xzmdropdown-submenu">
|
||||||
|
<a href="#">Academic</a>
|
||||||
|
<a href="#">Buzzapp</a>
|
||||||
|
<a href="#">Design Solution</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="https://wa.me/<?php echo $row['phone'] ?>?text=Hello%2C%20how%20are%20you%3F"><i class="fab fa-whatsapp" style="font-size: 20px"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<?php if($_SESSION['user_type'] == 'admin'){?>
|
<?php if($_SESSION['user_type'] == 'admin'){?>
|
||||||
<td class="border-y-2 p-2">
|
<td class="border-y-2 p-2">
|
||||||
<input type="checkbox" name="selected_records[]" value="<?php echo $row['id']; ?>" id="<?php echo $row['id']; ?>" />
|
<input type="checkbox" name="selected_records[]" value="<?php echo $row['id']; ?>" id="<?php echo $row['id']; ?>" />
|
||||||
@@ -236,13 +317,6 @@
|
|||||||
</td> -->
|
</td> -->
|
||||||
<td class="border-y-2 p-2"><?php echo $row['formname'] ?></td>
|
<td class="border-y-2 p-2"><?php echo $row['formname'] ?></td>
|
||||||
<td class="border-y-2 p-2"><?php echo $only_date[0]; ?></td>
|
<td class="border-y-2 p-2"><?php echo $only_date[0]; ?></td>
|
||||||
<td class="border-y-2 p-2">
|
|
||||||
<div class="flex flex-row justify-center place-items-center">
|
|
||||||
<i class="fa fa-envelope" style="font-size: 20px"></i>
|
|
||||||
<div>
|
|
||||||
<a href="https://wa.me/<?php echo $row['phone'] ?>?text=Hello%2C%20how%20are%20you%3F"><i class="fab fa-whatsapp" style="font-size: 20px"></i></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@@ -326,7 +400,7 @@
|
|||||||
<div class="flex flex-row place-content-between p-2 text-[25px] font-bold" style="border-bottom: 2px solid #464E5F; border-style: dashed;">Lead Information</div>
|
<div class="flex flex-row place-content-between p-2 text-[25px] font-bold" style="border-bottom: 2px solid #464E5F; border-style: dashed;">Lead Information</div>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2">
|
<div class="grid grid-cols-1 md:grid-cols-2">
|
||||||
<div class="flex flex-col mr-4">
|
<div class="flex flex-col mr-4">
|
||||||
<label for="origin">Details:</label>
|
<label for="origin">Origin:</label>
|
||||||
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="origin" id="origin" >
|
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="origin" id="origin" >
|
||||||
<option value="Facebook Ads">Facebook Ads</option>
|
<option value="Facebook Ads">Facebook Ads</option>
|
||||||
<option value="Google Ads">Google Ads</option>
|
<option value="Google Ads">Google Ads</option>
|
||||||
@@ -341,26 +415,26 @@
|
|||||||
<option value="Others">Others</option>
|
<option value="Others">Others</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col mr-4">
|
<!-- <div class="flex flex-col mr-4">
|
||||||
<label for="user">Lead Owner:</label>
|
<label for="user">Lead Owner:</label>
|
||||||
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="user" id="user" >
|
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="user" id="user" >
|
||||||
<?php
|
<?php
|
||||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
// $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
// $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$stmt = $conn->prepare("SELECT * FROM users");
|
// $stmt = $conn->prepare("SELECT * FROM users");
|
||||||
$stmt->execute();
|
// $stmt->execute();
|
||||||
$users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
// $users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
$row_count = count($users_rows);
|
// $row_count = count($users_rows);
|
||||||
if($row_count > 0){
|
// if($row_count > 0){
|
||||||
foreach($users_rows as $users_data){
|
// foreach($users_rows as $users_data){
|
||||||
echo '<option value="'.$users_data['email'].'">'.$users_data['email'].'</option>';
|
// echo '<option value="'.$users_data['email'].'">'.$users_data['email'].'</option>';
|
||||||
}
|
// }
|
||||||
} else{
|
// } else{
|
||||||
echo '<p>No users Found</p>';
|
// echo '<p>No users Found</p>';
|
||||||
}
|
// }
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col mr-4">
|
<div class="flex flex-col mr-4">
|
||||||
<label for="note">Note:</label>
|
<label for="note">Note:</label>
|
||||||
|
|||||||
42
.hta_slug/admin/delete-forms.php
Normal file
42
.hta_slug/admin/delete-forms.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
require_once('/var/www/html/.hta_config/crm_config.php');
|
||||||
|
require_once('/var/www/html/.htac_header.php');
|
||||||
|
require_once('/var/www/html/.htac_nav.php');
|
||||||
|
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||||
|
try {
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
$stmt = $conn->prepare("DELETE FROM addforms WHERE id = :id");
|
||||||
|
$stmt->bindParam(':id', $_POST['id']);
|
||||||
|
$stmt->execute();
|
||||||
|
echo '<script>window.location.href = "/admin/add-forms";</script>';
|
||||||
|
exit();
|
||||||
|
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="delete-div">
|
||||||
|
<form method="post">
|
||||||
|
<p style="font-size: 20px; padding: 10px 0px 10px 0px;">Confirm to Delete id <?php echo $_GET['id']; ?>? </p>
|
||||||
|
<input type="hidden" name="id" value="<?php echo $_GET['id']; ?>">
|
||||||
|
<input type="submit" name="submit" id="submit" value="YES" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 9px 20px 9px 20px; color: #fff; border-radius: 6px; cursor: pointer;" />
|
||||||
|
<a href="/admin/users" style="border:3px solid #443780; text-align: center; padding: 10px 20px 10px 20px; color: #443780; border-radius: 6px;">NO</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<style>
|
||||||
|
.delete-div{
|
||||||
|
position: absolute;
|
||||||
|
margin: auto;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background: #E6E5F4;
|
||||||
|
max-width: 500px;
|
||||||
|
min-width: 400px;
|
||||||
|
padding: 30px 50px 30px 50px;
|
||||||
|
border-radius: 9px
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -27,10 +27,16 @@ require_once('/var/www/html/.htac_nav.php');
|
|||||||
$bvrows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$bvrows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
foreach($bvrows as $bvname){ ?>
|
foreach($bvrows as $bvname){ ?>
|
||||||
<div>
|
<div class="flex flex-col place-items-center mt-40 mb-60 ">
|
||||||
<form method="post">
|
<form method="post" class="max-w-2xl shadow-xl p-4 rounded-lg space-y-4" style="width: 100%; max-width: 600px;">
|
||||||
<input type="text" name="bv" id="bv" value="<?php echo $bvname['bv']; ?>" />
|
<p class="my-4" style="border-bottom: 2px solid #464E5F; border-style: dashed; font-size: 20px; font-weight: bold" >Edit Business Verticals</p>
|
||||||
<input type="submit" value="Update" id="submit" name="submit" />
|
<div style="display: flex; flex-direction: column;">
|
||||||
|
<label for="bv">Business Verticals:</label>
|
||||||
|
<input type="text" name="bv" id="bv" value="<?php echo $bvname['bv']; ?>" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" />
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col justify-center">
|
||||||
|
<input type="submit" value="Update" id="submit" name="submit" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 6px; color: #fff; border-radius: 6px; margin-top: 6px;" />
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
75
.hta_slug/admin/edit-forms.php
Normal file
75
.hta_slug/admin/edit-forms.php
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
require_once('/var/www/html/.hta_config/crm_config.php');
|
||||||
|
require_once('/var/www/html/.htac_header.php');
|
||||||
|
require_once('/var/www/html/.htac_nav.php');
|
||||||
|
|
||||||
|
if($_SERVER['REQUEST_METHOD']=="POST"){
|
||||||
|
try {
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$stmt = $conn->prepare("UPDATE addforms SET formname = :formname, bverticals = :bverticals WHERE id = :id");
|
||||||
|
$stmt->bindParam(':formname', $_POST['formname']);
|
||||||
|
$stmt->bindParam(':formname', $_POST['formname']);
|
||||||
|
$stmt->bindParam(':id', $_GET['id']);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
echo "Record Updated successfully";
|
||||||
|
} 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 * FROM business_verticals");
|
||||||
|
$stmt->execute();
|
||||||
|
$verticals_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
// foreach($verticals_data as $verticals){
|
||||||
|
// $bverticals = $verticals['bv'];
|
||||||
|
// }
|
||||||
|
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$stmt = $conn->prepare("SELECT * FROM addforms WHERE id=:id");
|
||||||
|
$stmt->bindParam(":id", $_GET['id']);
|
||||||
|
$stmt->execute();
|
||||||
|
$formrows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
foreach($formrows as $formname){ $pre_verticals = $formname['bverticals']; ?>
|
||||||
|
<div class="flex flex-col place-items-center mt-40 mb-60">
|
||||||
|
<form method="post" class="max-w-2xl shadow-xl p-4 rounded-lg space-y-4" style="width: 100%; max-width: 600px;">
|
||||||
|
<p class="my-4" style="border-bottom: 2px solid #464E5F; border-style: dashed; font-size: 20px; font-weight: bold" >Edit From</p>
|
||||||
|
<div style="display: flex; flex-direction: column;">
|
||||||
|
<label for="">Form Name:</label>
|
||||||
|
<input type="text" name="formname" id="formname" value="<?php echo $formname['formname']; ?>" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" />
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; flex-direction: column;">
|
||||||
|
<label for="">Select Business Verticals:</label>
|
||||||
|
<select name="" id="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px; ">
|
||||||
|
<?php
|
||||||
|
foreach($verticals_data as $verticals) {
|
||||||
|
$isSelected = in_array($pre_verticals, $verticals) ? 'selected' : '';
|
||||||
|
echo '<option value="'.$verticals['bv'].'" '.$isSelected.'>'.$verticals['bv'].'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col justify-center">
|
||||||
|
<input type="submit" value="Update" id="submit" name="submit" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 6px; color: #fff; border-radius: 6px; margin-top: 6px;" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<button onclick="toggleDisplay();" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 10px 20px 10px 20px; color: #fff; border-radius: 6px; float: right; margin-top: 100px; margin-bottom: 30px;">Add Business Verticals</button>
|
<button onclick="toggleDisplay();" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 10px 20px 10px 20px; color: #fff; border-radius: 6px; float: right; margin-top: 100px; margin-bottom: 30px;">Add User</button>
|
||||||
<a href="/admin/add-user" class="" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 10px 20px 10px 20px; color: #fff; border-radius: 6px; float: right; margin-top: 30px;">Add User</a>
|
<!-- <a href="/admin/add-user" class="" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center; padding: 10px 20px 10px 20px; color: #fff; border-radius: 6px; float: right; margin-top: 30px;">Add User</a> -->
|
||||||
</div>
|
</div>
|
||||||
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold">
|
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -349,7 +349,7 @@
|
|||||||
<div class="flex flex-row place-content-between p-2 text-[25px] font-bold" style="border-bottom: 2px solid #464E5F; border-style: dashed;">Lead Information</div>
|
<div class="flex flex-row place-content-between p-2 text-[25px] font-bold" style="border-bottom: 2px solid #464E5F; border-style: dashed;">Lead Information</div>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2">
|
<div class="grid grid-cols-1 md:grid-cols-2">
|
||||||
<div class="flex flex-col mr-4">
|
<div class="flex flex-col mr-4">
|
||||||
<label for="origin">Details:</label>
|
<label for="origin">Origin:</label>
|
||||||
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="origin" id="origin" >
|
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="origin" id="origin" >
|
||||||
<option value="Facebook Ads">Facebook Ads</option>
|
<option value="Facebook Ads">Facebook Ads</option>
|
||||||
<option value="Google Ads">Google Ads</option>
|
<option value="Google Ads">Google Ads</option>
|
||||||
@@ -364,26 +364,26 @@
|
|||||||
<option value="Others">Others</option>
|
<option value="Others">Others</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col mr-4">
|
<!-- <div class="flex flex-col mr-4">
|
||||||
<label for="user">Lead Owner:</label>
|
<label for="user">Lead Owner:</label>
|
||||||
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="user" id="user" >
|
<select class="" style="border: 1px solid #363650; border-radius: 5px; padding: 6px;" type="text" name="user" id="user" >
|
||||||
<?php
|
<?php
|
||||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
// $conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
// $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$stmt = $conn->prepare("SELECT * FROM users");
|
// $stmt = $conn->prepare("SELECT * FROM users");
|
||||||
$stmt->execute();
|
// $stmt->execute();
|
||||||
$users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
// $users_rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
$row_count = count($users_rows);
|
// $row_count = count($users_rows);
|
||||||
if($row_count > 0){
|
// if($row_count > 0){
|
||||||
foreach($users_rows as $users_data){
|
// foreach($users_rows as $users_data){
|
||||||
echo '<option value="'.$users_data['email'].'">'.$users_data['email'].'</option>';
|
// echo '<option value="'.$users_data['email'].'">'.$users_data['email'].'</option>';
|
||||||
}
|
// }
|
||||||
} else{
|
// } else{
|
||||||
echo '<p>No users Found</p>';
|
// echo '<p>No users Found</p>';
|
||||||
}
|
// }
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col mr-4">
|
<div class="flex flex-col mr-4">
|
||||||
<label for="note">Note:</label>
|
<label for="note">Note:</label>
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ copyButtons.forEach(button => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
fetchCountries();
|
// fetchCountries();
|
||||||
let nameID = document.getElementById('name');
|
let nameID = document.getElementById('name');
|
||||||
let addressID = document.getElementById('address');
|
let addressID = document.getElementById('address');
|
||||||
let countryID = document.getElementById('country');
|
let countryID = document.getElementById('country');
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ select{
|
|||||||
border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;
|
border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;
|
||||||
}
|
}
|
||||||
label, option, input{
|
label, option, input{
|
||||||
text-transform: uppercase;
|
/* text-transform: uppercase; */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a {
|
/* a {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<div style="display: flex; flex-direction: row;">
|
<div style="display: flex; flex-direction: row;">
|
||||||
<div style="position: fixed; height: 100%;">
|
<div style="position: fixed; height: 100%; z-index: 999;">
|
||||||
<nav class="main-menu">
|
<nav class="main-menu">
|
||||||
<ul style="padding-top: 100px;">
|
<ul style="padding-top: 100px;">
|
||||||
<li>
|
<li>
|
||||||
@@ -147,6 +147,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/add-forms">
|
||||||
|
<i class="fa fa-2x"><img src="/assets/all-lead.png" alt="" /></i>
|
||||||
|
<span class="nav-text">
|
||||||
|
Add Forms
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<?php }
|
<?php }
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
10
node_modules/.yarn-integrity
generated
vendored
Normal file
10
node_modules/.yarn-integrity
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"systemParams": "linux-x64-93",
|
||||||
|
"modulesFolders": [],
|
||||||
|
"flags": [],
|
||||||
|
"linkedModules": [],
|
||||||
|
"topLevelPatterns": [],
|
||||||
|
"lockfileEntries": {},
|
||||||
|
"files": [],
|
||||||
|
"artifacts": {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user