Merge branch 'master' of bitbucket.org:venbainformationtechnology/golf_backend

This commit is contained in:
sriramv 2023-05-31 14:18:25 +05:30
commit 05e04fcd12
21 changed files with 723 additions and 41 deletions

View File

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2023 at 02:05 PM
-- Generation Time: May 17, 2023 at 02:42 PM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 7.4.33
@ -86,7 +86,7 @@ CREATE TABLE `email_template` (
`type` int(10) NOT NULL,
`text` mediumtext NOT NULL,
`html` mediumtext NOT NULL,
`to` varchar(50) NOT NULL,
`to` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
@ -100,7 +100,10 @@ CREATE TABLE `email_template` (
--
INSERT INTO `email_template` (`id`, `name`, `type`, `text`, `html`, `to`, `subject`, `is_active`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(6, 'demo', 1, '', '<p>Hi\n<font color=\"#0000ff\">%to%\n</font><font color=\"#000000\">!</font>\n</p>\n<p><font color=\"#000000\">\n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp;\n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp; &nbsp; &nbsp; &nbsp;\n&nbsp; &nbsp; &nbsp; &nbsp; \n&nbsp;&nbsp; &nbsp; &nbsp; Thank</font>\n</p>', 'demo@g.com', 'demo', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0);
(6, 'Member Registration Template', 1, 'Hi %name% , Please confirm your email address by clicking the link below.', '</p>\n<p style=\"margin-bottom: 1rem;\">Hi %name% , \nPlease confirm your email address by clicking the link\n below.\n</p>', 'gowtham.manavalan.la@gmail.com,suseendhiran1999@gmail.com', 'demo', 1, '2023-05-17 06:40:10', '0000-00-00 00:00:00', 0, 0),
(10, 'User Registration Template', 2, 'Please login by clicking the link below.', '<p><p>Please login by clicking the link below.</p></p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 06:55:57', '0000-00-00 00:00:00', 0, 0),
(12, 'OTP Template', 3, 'Please use the verification code below on the Golf Evolution Website.', '<p><p></p><p>Please use the verification code below on the Golf Evolution Website.</p></p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 11:57:55', '0000-00-00 00:00:00', 0, 0),
(14, 'Change Password Verification Template', 4, 'Hello %name% ! , Your password changed successfully...', '<p>Hello %name% ! , Your password changed successfully...</p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 12:02:14', '0000-00-00 00:00:00', 0, 0);
-- --------------------------------------------------------
@ -121,7 +124,10 @@ CREATE TABLE `email_template_variables` (
INSERT INTO `email_template_variables` (`id`, `type`, `name`, `variable_name`) VALUES
(1, 1, 'Member Name', '%name%'),
(2, 1, 'Verify Link', '%link%');
(3, 2, 'User Name', '%name%'),
(4, 3, 'User Name', '%name%'),
(5, 3, 'OTP', '%otp%'),
(6, 4, 'Name', '%name%');
-- --------------------------------------------------------
@ -157,8 +163,7 @@ CREATE TABLE `member` (
INSERT INTO `member` (`id`, `name`, `email`, `is_email_verified`, `mobile`, `address`, `city`, `state`, `country`, `pincode`, `username`, `password`, `verification_code`, `is_active`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(4, 'Gowthaman', 'gwm@gmail.com', 1, '9894638731', '1st st', '1', '1', '1', 650001, '', '$2y$10$XJD4E81SQtf7XaHZdCVJa.VA/FL1/4OIsL7ZDR1t7M1QnzQ87jb7K', 0, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(5, 'test', 'test@gmail.com', 0, '9500625731', 'Bank Suruliyappan street', '1', '1', '1', 625528, '', '$2y$10$pa8XhW/xFapidAaFA7Zd1eDZMr4SxBGpHXCaJAh0fYH7ej6Ns3UUC', 0, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(6, 'Jeeva', 'gowtham.manavalan.la@gmail.com', 1, '9500625731', 'Bank Suruliyappan street', '2', '2', '1', 625528, '', '$2y$10$imlV3IVeMxcb6JiF/yIqDuTrqXq7SEO7N4G9H74xuwTxAKGFUOqt.', 787918, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(69, 'suseendhiran', 'suseendhiran13@gmail.com', 0, '7777777777', '1st street', 'Chennai', 'Tamil Nadu', '1', 656789, '', '', 958737, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
(6, 'Jeeva', 'gowtham.manavalan.la@gmail.com', 1, '9500625731', 'Bank Suruliyappan street', '2', '2', '1', 625528, '', '$2y$10$kOboUqGu66RUC2sfUe/1zuMP0u/6QiNieEgCCCOS08RSYhJjnPbt6', 787918, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-- --------------------------------------------------------
@ -189,9 +194,27 @@ CREATE TABLE `member_credits` (
INSERT INTO `member_credits` (`id`, `member_id`, `package_name`, `package_type`, `credit_points`, `running_balance`, `used_points`, `expired_points`, `expiring_date`, `cost`, `is_active`, `created_at`, `updated_at`) VALUES
(11, 4, 'Evo Pack 2', 'Regular', 40, 0, 40, 0, '2023-06-11', 1000, 1, '2023-05-11 09:28:21', '2023-05-11 09:28:21'),
(12, 4, 'Evo Pack 1', 'Presales', 24, 0, 24, 0, '2023-06-11', 550, 1, '2023-05-11 09:28:22', '2023-05-11 09:28:22'),
(13, 4, 'Evo Pack 2', 'Presales', 48, 40, 8, 0, '2023-06-11', 1000, 1, '2023-05-11 09:33:47', '2023-05-11 09:33:47'),
(13, 4, 'Evo Pack 2', 'Presales', 48, 30, 18, 0, '2023-06-11', 1000, 1, '2023-05-11 09:33:47', '2023-05-11 09:33:47'),
(14, 4, 'Evo Pack 2', 'Presales', 48, 48, 0, 0, '2023-06-11', 1000, 1, '2023-05-11 09:53:51', '2023-05-11 09:53:51'),
(15, 4, 'Evo Pack 1', 'Presales', 24, 24, 0, 0, '2023-06-11', 550, 1, '2023-05-11 09:53:52', '2023-05-11 09:53:52');
(15, 4, 'Evo Pack 1', 'Presales', 24, 24, 0, 0, '2023-06-11', 550, 1, '2023-05-11 09:53:52', '2023-05-11 09:53:52'),
(16, 4, 'Evo Pack 2', 'Presales', 48, 48, 0, 0, '2023-06-17', 1000, 1, '2023-05-17 10:38:23', '2023-05-17 10:38:23'),
(17, 4, 'Evo Pack 1', 'Presales', 24, 24, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:38:23', '2023-05-17 10:38:23'),
(18, 4, 'Evo Pack 2', 'Regular', 40, 40, 0, 0, '2023-06-17', 1000, 1, '2023-05-17 10:39:10', '2023-05-17 10:39:10'),
(19, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:17', '2023-05-17 10:39:17'),
(20, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(21, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(22, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(23, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(24, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(25, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(26, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(27, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(28, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(29, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(30, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(31, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22'),
(32, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22'),
(33, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22');
-- --------------------------------------------------------
@ -309,9 +332,8 @@ CREATE TABLE `users` (
--
INSERT INTO `users` (`id`, `role`, `name`, `profile`, `email`, `address`, `city`, `state`, `country`, `pincode`, `mobile`, `is_active`, `user_name`, `password`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'Admin', 'profile.jpg', 'admin@gmail.com', '1st street', '1', '1', '1', 656787, '986668877', 1, 'admin@gmail.com', '$2y$10$XJD4E81SQtf7XaHZdCVJa.VA/FL1/4OIsL7ZDR1t7M1QnzQ87jb7K', 0, NULL, '2023-05-03 16:30:22', '2023-05-03 16:30:22'),
(1, 'Admin', 'Admin', 'profile.jpg', 'admin@gmail.com', '1st street', '1', '1', '1', 656787, '986668877', 1, 'admin@gmail.com', '$2y$10$IEWpmjmJFPrI4ww/vcqeHeu5uVyChqmA333iiK0glDjZAvV34gjWa', 0, NULL, '2023-05-03 16:30:22', '2023-05-03 16:30:22'),
(2, 'Admin', 'Gowtham', '', 'gwm@gmail.com', '131 ', '1', '1', '1', 652500, '6565656565', 0, NULL, NULL, NULL, NULL, '2023-05-06 12:06:31', '2023-05-06 12:06:31'),
(3, 'Coach', 'Jeeva', '', 'suseendhiran13@gmail.com', '', '2', '2', '1', 0, '986532365', 1, NULL, '$2y$10$U8q1UrDyFf30vpeWlymhf.ViELXqahqfG5JPKPdEQ4hdF8zSzdpbe', NULL, NULL, '2023-05-06 15:16:29', '2023-05-06 15:16:29'),
(4, 'Admin', 'Gowtham 0045', '', 'gowtham.manavalan.la@gmail.com', '', '1', '1', '1', 0, '09500625731', 1, NULL, '$2y$10$UHEtYAei5PoAteL6b0Fm/e7x94Kr8QmQyFHFcW6wq35juNqKvhyN2', NULL, NULL, '2023-05-06 16:24:23', '2023-05-06 16:24:23'),
(5, 'Coach', 'Susee', '', 'suss@gmail.com', 'Bank Suruliyappan street', '1', '1', '1', 625528, '9500625731', 1, NULL, '$2y$10$lNtNgQXFNWCYwyGwMUaYmOpE1MuLUShNvtl9hf5CAf5VEJRyDxDwa', NULL, NULL, '2023-05-08 13:02:43', '2023-05-08 13:02:43');
@ -399,7 +421,7 @@ ALTER TABLE `users`
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `city`
@ -417,25 +439,25 @@ ALTER TABLE `country`
-- AUTO_INCREMENT for table `email_template`
--
ALTER TABLE `email_template`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `email_template_variables`
--
ALTER TABLE `email_template_variables`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `member`
--
ALTER TABLE `member`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;
--
-- AUTO_INCREMENT for table `member_credits`
--
ALTER TABLE `member_credits`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- AUTO_INCREMENT for table `packages_and_pricing`

View File

@ -42,6 +42,7 @@ class Autoload extends AutoloadConfig
public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
'Config' => APPPATH . 'Config',
'App' => APPPATH,
'Daycry\CronJob' => APPPATH .'ThirdParty/cronjob/src',
];

View File

@ -119,7 +119,7 @@ class CronJob extends \Daycry\CronJob\Config\CronJob
public function init(Scheduler $schedule)
{
// $schedule->command('foo:bar')->everyMinute();
$schedule->url('http://localhost/golf_backend/scheduler')->everyFiveMinutes();
// $schedule->shell('cp foo bar')->daily( '11:00 pm' );
// $schedule->call( function() { do something.... } )->everyMonday()->named( 'foo' )

View File

@ -82,9 +82,16 @@ $routes->match(['get','post'],'/email_temp','Admin_controller::email_temp');
$routes->match(['get','post'],'/edit_email_temp/(:any)','Admin_controller::edit_email_temp/$1');
$routes->match(['get','post'],'/mail_temp_deactivate/(:any)','Admin_controller::mail_temp_deactivate/$1');
$routes->match(['get','post'],'/mail_temp_activate/(:any)','Admin_controller::mail_temp_activate/$1');
$routes->match(['get','post'],'/rule','Admin_controller::rule');
$routes->match(['get','post'],'/booked_slot','Admin_controller::booked_slot');
$routes->match(['get','post'],'/manage_availability','Admin_controller::manage_availability');
$routes->match(['get','post'],'/add_to_cart_package','Admin_controller::add_to_cart_package');
$routes->match(['get','post'],'/continue_shopping/(:any)','Admin_controller::continue_shopping/$1');
$routes->match(['get'],'/credits_pack','Admin_controller::credits_pack');
$routes->match(['get'],'/admin_home','Dashboard::admin_home');
$routes->match(['get'],'/member_home','Dashboard::member_home');

View File

@ -9,6 +9,8 @@ use App\Models\Packages_and_pricing_model;
use App\Models\Credits_usage_tracking_model;
use App\Models\Email_template_model;
use App\Models\Variable_model;
use App\Models\Rule_model;
use App\Models\Wp_php_token_model;
class Admin_controller extends BaseController
{
public $session;
@ -23,6 +25,8 @@ class Admin_controller extends BaseController
$this->CreditsUsageTrackingModel = new Credits_usage_tracking_model();
$this->MailModel = new Email_template_model();
$this->VariableModel = new Variable_model();
$this->RuleModel = new Rule_model();
$this->Wp_php_token_model = new Wp_php_token_model();
helper(['form', 'url']);
}
public function index()
@ -172,7 +176,7 @@ class Admin_controller extends BaseController
{
$userdata['userdata']=$this->dModel->getLoggedInUserData(session()->get('logged_user'));
$data['userList'] = $this->UserModel->select('users.* , country.name as country_name , state.name as state_name ,city.name as city_name')
$data['userList'] = $this->UserModel->select('users.* , country.name as country_name')
->join('country', 'users.country = country.id', 'left')
->join('state', 'users.state = state.id', 'left')
->join('city', 'users.city = city.id', 'left')
@ -230,6 +234,12 @@ class Admin_controller extends BaseController
echo view('layout/footer');
}
public function credits_pack()
{
$data = $this->PackagesModel->where('package_type', 'Presales' )->findAll();
return json_encode($data);
}
public function credits_pack_edit($pack_id = null)
{
@ -454,5 +464,77 @@ class Admin_controller extends BaseController
return redirect()->to(base_url()."template_list");
}
public function rule()
{
if($this->request->getmethod() == 'get')
{
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_user'));
$ruledata['rule_data'] = $this->RuleModel->findAll();
echo view('layout/header',$userdata);
echo view('rule.php',$ruledata);
echo view('layout/footer');
}
else if($this->request->getmethod() == 'post')
{
$id = $this->request->getVar('id');
$data['data'] = $this->request->getVar('rule_name');
$data['value'] = $this->request->getVar('value');
$updatedata = $this->RuleModel->where('id', $id )->set($data)->update();
if($updatedata)
echo true;
else
echo false;
}
}
public function booked_slot()
{
if($this->request->getmethod() == 'get')
{
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_user'));
// $ruledata['rule_data'] = $this->RuleModel->findAll();
echo view('layout/header',$userdata);
echo view('booked_slot.php');
echo view('layout/footer');
}
else if($this->request->getmethod() == 'post')
{
echo 'hi';
}
}
public function manage_availability()
{
if($this->request->getmethod() == 'get')
{
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_user'));
// $ruledata['rule_data'] = $this->RuleModel->findAll();
echo view('layout/header',$userdata);
echo view('manage_availability.php');
echo view('layout/footer');
}
else if($this->request->getmethod() == 'post')
{
echo 'hi';
}
}
public function add_to_cart_package()
{
$data = $this->request->getVar();
$data['table_name'] = 'packages_and_pricing';
$save_data = $this->Wp_php_token_model->save($data);
echo $save_data;
}
public function continue_shopping($param)
{
$token_exist = $this->Wp_php_token_model->where('token', $param )->find();
if ($token_exist)
return $token_exist[0]['token'];
else
return false;
}
// -----------------------------------------------
}

View File

@ -25,8 +25,6 @@ class Member_controller extends BaseController
$this->cartModel = new Cart_model();
$this->CreditsUsageTrackingModel = new Credits_usage_tracking_model();
helper('form');
}
public function index()
{
@ -64,7 +62,7 @@ class Member_controller extends BaseController
}else
{
$this->session->setTempdata('error','sorry Email is not existe',3);
$this->session->setTempdata('error','sorry email is not exist',3);
return redirect()->to(base_url());
}
}
@ -428,7 +426,6 @@ class Member_controller extends BaseController
public function scheduler()
{
$Data = $this->creditsModel->select('member_credits.* , member.name as member_name , member.email as member_email ')
->join('member', 'member_credits.member_id = member.id', 'left')
->findAll();

13
app/Models/Rule_model.php Normal file
View File

@ -0,0 +1,13 @@
<?php namespace App\Models;
use CodeIgniter\Model;
class Rule_model extends Model
{
protected $table = 'rules';
protected $primaryKey = 'id';
protected $allowedFields = ['name','rule_name','rule_key','value','label'];
}

View File

@ -0,0 +1,13 @@
<?php namespace App\Models;
use CodeIgniter\Model;
class Wp_php_token_model extends Model
{
protected $table = 'wp_php_token';
protected $primaryKey = 'id';
protected $allowedFields = ['primary_id','table_name','token'];
}

View File

@ -67,7 +67,7 @@
<div class="form-group mb-3">
<label for="password">Password</label>
<div class="input-group input-group-merge">
<input type="password" id="password" name="password" value="admin@123A" class="form-control" placeholder="Enter your password">
<input type="password" id="password" name="password" value="admin" class="form-control" placeholder="Enter your password">
<div class="input-group-append" data-password="false">
<div class="input-group-text">
<span class="password-eye"></span>

36
app/Views/booked_slot.php Normal file
View File

@ -0,0 +1,36 @@
<br><br>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<!-- <h4 class="header-title">Buttons example</h4>
<p class="text-muted font-13 mb-4">
</p> -->
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<thead>
<tr>
<th>Name</th>
<th>Mobile</th>
<th>Email</th>
<th>Role</th>
<th>Address</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->

View File

@ -1,5 +1,223 @@
<h1> Welcome ..! <?= $userdata->name; ?> </h1> </br>
<!-- <h1> Welcome ..! <?= $userdata->name; ?> </h1> </br>
<?php if(isset($userdata->role)){}else{ ?> <a href="<?=base_url()."member_logout"; ?>" >Logout</a> <?php } ?>
<?= Print_r($userdata); ?>
<?= Print_r($userdata); ?> -->
<br><br>
<div class="row">
<div class="col-xl-3 col-md-6">
<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="Campaign Sent">Campaign Sent</h5>
<h3 class="my-2 py-1"><span data-plugin="counterup">865</span></h3>
</div>
<div class="avatar-sm">
<span class="avatar-title bg-soft-primary rounded">
<i class="ri-stack-line font-20 text-primary"></i>
</span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="New Leads">New Leads</h5>
<h3 class="my-2 py-1"><span data-plugin="counterup">384</span></h3>
</div>
<div class="avatar-sm">
<span class="avatar-title bg-soft-primary rounded">
<i class="ri-slideshow-2-line font-20 text-primary"></i>
</span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="Deals">Deals</h5>
<h3 class="my-2 py-1"><span data-plugin="counterup">34,521</span></h3>
</div>
<div class="avatar-sm">
<span class="avatar-title bg-soft-primary rounded">
<i class="ri-hand-heart-line font-20 text-primary"></i>
</span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<div class="card">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="Booked Revenue">Booked Revenue</h5>
<h3 class="my-2 py-1">$<span data-plugin="counterup">89,357</span></h3>
</div>
<div class="avatar-sm">
<span class="avatar-title bg-soft-primary rounded">
<i class="ri-money-dollar-box-line font-20 text-primary"></i>
</span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
</div>
<!-- end row -->
<div class="row">
<div class="col-xl-4 col-lg-6">
<div class="card">
<div class="card-body">
<a href="" class="p-0 float-right mb-3">Export <i class="mdi mdi-download ml-1"></i></a>
<h4 class="header-title mt-1">Channels</h4>
<div class="table-responsive">
<table class="table table-sm table-centered mb-0 font-14">
<thead class="thead-light">
<tr>
<th>Channel</th>
<th>Visits</th>
<th style="width: 40%;"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Direct</td>
<td>2,050</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar" role="progressbar"
style="width: 65%;" aria-valuenow="65"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>Organic Search</td>
<td>1,405</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar bg-info" role="progressbar"
style="width: 45%;" aria-valuenow="45"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>Refferal</td>
<td>750</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar bg-warning" role="progressbar"
style="width: 30%;" aria-valuenow="30"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>Social</td>
<td>540</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar bg-danger" role="progressbar"
style="width: 25%;" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div> <!-- end table-responsive-->
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
<div class="col-xl-4 col-lg-6">
<div class="card">
<div class="card-body">
<a href="" class="p-0 float-right mb-3">Export <i class="mdi mdi-download ml-1"></i></a>
<h4 class="header-title mt-1">Social Media Traffic</h4>
<div class="table-responsive">
<table class="table table-sm table-centered mb-0 font-14">
<thead class="thead-light">
<tr>
<th>Network</th>
<th>Visits</th>
<th style="width: 40%;"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Facebook</td>
<td>2,250</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar" role="progressbar"
style="width: 65%;" aria-valuenow="65"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>Instagram</td>
<td>1,501</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar" role="progressbar"
style="width: 45%;" aria-valuenow="45"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>Twitter</td>
<td>750</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar" role="progressbar"
style="width: 30%;" aria-valuenow="30"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
<tr>
<td>LinkedIn</td>
<td>540</td>
<td>
<div class="progress" style="height: 3px;">
<div class="progress-bar" role="progressbar"
style="width: 25%;" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div> <!-- end table-responsive-->
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
</div>
<!-- end row -->

View File

@ -93,8 +93,25 @@
<script src="<?= base_url()."/public"; ?>/assets/js/pages/inbox.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/js/pages/email.init.js"></script>
<!-- Table Editable plugin-->
<script src="<?= base_url()."/public"; ?>assets/libs/jquery-tabledit/jquery.tabledit.min.js"></script>
<!-- Table editable init-->
<script src="<?= base_url()."/public"; ?>assets/js/pages/tabledit.init.js"></script>
<!-- plugin js -->
<script src="<?= base_url()."/public"; ?>/assets/libs/moment/min/moment.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/core/main.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/bootstrap/main.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/daygrid/main.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/timegrid/main.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/list/main.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/interaction/main.min.js"></script>
<!-- Calendar init -->
<script src="<?= base_url()."/public"; ?>/assets/js/pages/calendar.init.js"></script>
<!-- KNOB JS -->
<script src="<?= base_url()."/public"; ?>/assets/libs/jquery-knob/jquery.knob.min.js"></script>
</body>
</html>

View File

@ -33,6 +33,13 @@
<!-- Summernote css -->
<link href="<?= base_url()."/public"; ?>/assets/libs/summernote/summernote-bs4.min.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Plugin css -->
<link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/core/main.min.css" rel="stylesheet" type="text/css" />
<link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/daygrid/main.min.css" rel="stylesheet" type="text/css" />
<link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/bootstrap/main.min.css" rel="stylesheet" type="text/css" />
<link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/timegrid/main.min.css" rel="stylesheet" type="text/css" />
<link href="<?= base_url()."/public"; ?>/assets/libs/@fullcalendar/list/main.min.css" rel="stylesheet" type="text/css" />
<script>
@ -168,13 +175,33 @@
<li>
<a href="<?= base_url()."template_list"; ?>"><i class="mdi mdi-email-edit-outline"></i> Mail Content Manager</a>
</li>
<li>
<a href="<?= base_url()."rule"; ?>">
<i class="mdi mdi-alpha-r-circle-outline"></i>
<span> Configuration </span>
</a>
</li>
</ul>
</div>
</li>
<?php } elseif($userdata->role == 'Coach' ) { ?>
<li>
<a href="<?= base_url()."booked_slot"; ?>">
<i class="mdi mdi-clipboard-list-outline"></i>
<span> Booked Slot </span>
</a>
</li>
<li>
<a href="<?= base_url()."manage_availability"; ?>">
<i class="mdi mdi-account-check"></i>
<span> Manage Availability </span>
</a>
</li>
<?php } elseif($userdata->role == 'Fronddesk' ) { ?>
<li>
@ -268,13 +295,12 @@
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<?php if (!$userdata) { ?>
<img src='<?php echo base_url()."/public/assets/images/users/avatar-1.jpg" ?>' class="rounded-circle" alt="profile-image">
<?php if ($userdata->profile) { ?>
<img src='<?php echo base_url()."/public/assets/images/users/"?><?= $userdata->profile; ?>' class="rounded-circle" alt="profile-image">
<?php }
else { ?>
<img src='<?php echo base_url()."/public/assets/images/users/"?><?= $userdata->profile; ?>' class="rounded-circle" alt="profile-image">
<img id="" src='<?php echo base_url()."/public/assets/images/users/avatar-1.jpg" ?>' class="rounded-circle" alt="profile-image">
<?php } ?>
<!-- <img src="<?= base_url()."/public"; ?>/assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle"> -->
<span class="pro-user-name ml-1">
<?= $userdata->name; ?> <i class="mdi mdi-chevron-down"></i>
</span>

View File

@ -0,0 +1,160 @@
<!-- Begin page -->
<div id="wrapper">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Calendar</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="">
<div id="external-events" class="m-t-20">
<br>
</div>
</div> <!-- end col-->
<div class="col-lg-12">
<div class="mt-4 mt-lg-0">
<div id="calendar"></div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
</div> <!-- end card body-->
</div> <!-- end card -->
<!-- Add New Event MODAL -->
<div class="modal fade" id="event-modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header py-3 px-4 border-bottom-0 d-block">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">&times;</button>
<h5 class="modal-title" id="title">Manage Availability</h5>
</div>
<div class="modal-body px-4 pb-4 pt-0">
<form class="needs-validation" name="event-form" id="form-event" novalidate>
<div class="row">
<div class="col-12">
<div class="form-group">
<label class="control-label">Leave Reason</label>
<input class="form-control" placeholder="Leave Reason"
type="text" name="title" id="event-title" required />
<div class="invalid-feedback">Please provide a valid reason</div>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="control-label">Category</label>
<select class="form-control custom-select" name="category"
id="event-category" required>
<option value="">--select--</option>
<option value="1">Leave ( Full Day )</option>
<option value="2">Halfday ( First half)</option>
<option value="3">Halfday ( Second half)</option>
</select>
<div class="invalid-feedback">Please select a valid category</div>
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-6">
<button type="button" class="btn btn-danger" id="btn-delete-event">Delete</button>
</div>
<div class="col-6 text-right">
<button type="button" class="btn btn-light mr-1" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success" id="btn-save-event">Save</button>
</div>
</div>
</form>
</div>
</div> <!-- end modal-content-->
</div> <!-- end modal dialog-->
</div>
<!-- end modal-->
</div>
<!-- end col-12 -->
</div> <!-- end row -->
</div> <!-- container-fluid -->
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
</div>
<!-- END wrapper -->
<input id="db_data" name="attachments" type="hidden">
<input id="ins_db_data" name="attachmentsdata" value="" type="hidden">
<button type="hidden" id="butn"></button>
<!-- Right bar overlay-->
<div class="rightbar-overlay"></div>
<script>
attachArray = [
{
title: 'demo',
start: new Date('Sat May 20 2023 10:45:53 GMT+0530 (India Standard Time)'),
allDay: true,
className: '2'
},
{
title: 'demo2',
start: new Date('Sat May 20 2023 10:45:53 GMT+0530 (India Standard Time)'),
allDay: true,
className: '1'
}
];
$('[name=attachments]').val(JSON.stringify(attachArray));
$('#butn').click(function(){
alert($('#ins_db_data').val())
});
// $(document).ready(function(){
// // $('.fc-today-button').hide();
// // $('.fc-next-button').hide();
// // $('.fc-dayGridMonth-button').hide();
// $('.fc-timeGridWeek-button').hide();
// $('.fc-timeGridDay-button').hide();
// // $('.fc-listMonth-button').hide();
// $('.fc-prev-button').hide();
// });
// setTimeout(() => {
// $('.fc-listMonth-button').click(function(){
// $('.fc-timeGridWeek-button').hide();
// $('.fc-timeGridDay-button').hide();
// $('.fc-prev-button').hide();
// });
// }, 1000);
// setTimeout(() => {
// $('.active').click(function(){
// alert()
// $('.fc-timeGridWeek-button').hide();
// $('.fc-timeGridDay-button').hide();
// $('.fc-prev-button').hide();
// });
// }, 1000);
</script>

View File

@ -126,7 +126,6 @@ $(document).on('click','.checkout',function(){
</br>
<div class="col-md-12">
<div class="card">
<div class="card-body">

View File

@ -25,7 +25,7 @@
</head>
<body class="loading">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">

View File

@ -6,9 +6,9 @@ body {
.profilepic {
position: relative;
/* width: 125px;
height: 125px; */
/* border-radius: 50%; */
width: 20%;
margin-left: auto;
margin-right: auto;
overflow: hidden;
background-color: #fffff7;
}
@ -83,8 +83,8 @@ body {
<img src='<?php echo base_url()."/public/assets/images/users/avatar-1.jpg" ?>' class="rounded-circle avatar-xl img-thumbnail" alt="profile-image">
<input id="file_profile" name="profile" class="typeFile1" type="file" hidden/>
<div class="profilepic__content">
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
<span class="profilepic__text"><b>Edit Profile</b></span>
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:#ddd"></i></span>
<!-- <span class="profilepic__text"><b>Edit Profile</b></span> -->
</div>
</div>
<?php }
@ -94,8 +94,8 @@ body {
<img src='<?php echo base_url()."/public/assets/images/users/"?><?php echo $userList[0]['profile'] ?>' class="rounded-circle avatar-xl img-thumbnail" alt="profile-image">
<input id="file_profile" name="profile" class="typeFile1" type="file" hidden/>
<div class="profilepic__content">
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:black"></i></span>
<span class="profilepic__text"><b>Edit Profile</b></span>
<span class="profilepic__icon"><i class="fa fa-camera" style="font-size:25px;color:#ddd"></i></span>
<!-- <span class="profilepic__text"><b>Edit Profile</b></span> -->
</div>
</div>
<?php } ?>
@ -121,7 +121,12 @@ body {
</tr>
<tr>
<th scope="row">Location :</th>
<td class="text-muted"><?= $userList[0]['address'] ?> , <?= $userList[0]['city_name'] ?> , <?= $userList[0]['state_name'] ?> , <?= $userList[0]['country_name'] ?> - <?= $userList[0]['pincode'] ?></td>
<td class="text-muted">
<?php if($userList[0]['address']) { echo $userList[0]['address']; echo ' ,'; } ?>
<?php if($userList[0]['city']) { echo $userList[0]['city']; echo ' ,'; }?>
<?php if($userList[0]['state']) { echo $userList[0]['state']; echo ' ,'; }?>
<?php if($userList[0]['country_name']) { echo $userList[0]['country_name']; }?>
<?php if($userList[0]['pincode']) { echo '- '; echo $userList[0]['pincode']; }?>
</tr>
</tbody>
</table>

79
app/Views/rule.php Normal file
View File

@ -0,0 +1,79 @@
<br><br>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Configuration</h4>
<p class="text-muted font-13 mb-4">
</p>
<table id="btn-editable" class="table table-centered mb-0" >
<thead>
<tr>
<th style="width: 40%;">Pack Name</th>
<th>Days</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($rule_data as $row)
{ ?>
<tr>
<td class="editableColumns"><?php echo $row['rule_name'];?></td>
<td class="editableColumns_1"><?php echo $row['value'];?> ( <?php echo $row['label'];?> )</td>
<td><button type="button" id="<?php echo $row['id'];?>" class="tabledit-edit-button btn btn-success" style="float: none;background-color: #00b4d5;"><span class="mdi mdi-pencil"></span></button></td>
</tr>
<?php } ?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->
<script>
var num = 1;
$(".tabledit-edit-button").click(function(){
id = $(this).attr("id");
if (num == 1)
{
num = 2;
$(`#${id}`).html('<span class="mdi mdi-pencil-plus"></span>');
$(this).closest('tr').find('td.editableColumns').each(function(index) {
var html = $(this).html();
var input = $('<input class="form-control" id="'+index+'" type="text" />');
input.val(html);
$(this).html(input);
});
$(this).closest('tr').find('td.editableColumns_1').each(function(index) {
var html = $(this).html();
var input = $('<input class="form-control" id="_'+index+'" type="text" />');
input.val(html.substring(0, html.indexOf(' ') + ''.length));
$(this).html(input);
});
}
else
{
$.ajax({
type:"post",
url: "<?php echo base_url(); ?>/rule",
data:{ id : id , rule_name:$('#0').val() , value : $('#_0').val()},
success:function(response)
{
if (response == true)
{
window.location.reload();
}
}
});
}
});
</script>

View File

@ -57,7 +57,8 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">Email<span class="text-danger">*</span></label>
<div class="col-7">
<input type="email" id="email" onchange="check_if_exists();" required parsley-type="email" class="form-control" name="email" value="<?php if(isset($userList)){echo $userList[0]['email'];} ?>" placeholder="Email">
<input type="email" id="email" onchange="check_if_exists();" required parsley-type="email" class="form-control" name="<?php if($check){ echo 'mail'; } else { echo 'email'; }?>" value="<?php if(isset($userList)){echo $userList[0]['email'];} ?>" placeholder="Email"
<?php if($check){ echo 'readonly'; }?>>
</div>
</div>

View File

@ -47,6 +47,10 @@ bgcolor="#f6f6f6">
<!-- OTP TEMPLATE -->
<!-- ############################################################### -->
<?php if ($id == 2) { ?>
<?php if ($html) { ?>
<td><?php echo $html ?></td>
<?php
} else { ?>
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<td class="content-block"
style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;"
@ -54,6 +58,7 @@ bgcolor="#f6f6f6">
Please use the verification code below on the Golf Evolution Website.<br>If you didn't request this, you can ignore this email or let us know.<br>OTP : <b><?= $otp ?></b>
</td>
</tr>
<?php } ?>
<?php }
// USER TEMPLATE
@ -145,6 +150,7 @@ bgcolor="#f6f6f6">
<?php } ?>
</tr>
</div>
<!-- ################################################################### -->
</table>
</td>
</tr>

0
php Normal file
View File