This commit is contained in:
suseendhiran17 2023-06-10 10:19:16 +05:30
parent b4c741c440
commit 60ca21e866
23 changed files with 2997 additions and 620 deletions

View File

@ -1,495 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 17, 2023 at 02:42 PM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 7.4.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `golf`
--
-- --------------------------------------------------------
--
-- Table structure for table `cart`
--
CREATE TABLE `cart` (
`id` int(11) NOT NULL,
`member_id` int(11) NOT NULL,
`pack_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `city`
--
CREATE TABLE `city` (
`id` int(11) NOT NULL,
`state_id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `city`
--
INSERT INTO `city` (`id`, `state_id`, `name`, `is_active`) VALUES
(1, 1, 'Chennai', 1),
(2, 2, 'Cochin', 1);
-- --------------------------------------------------------
--
-- Table structure for table `country`
--
CREATE TABLE `country` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `country`
--
INSERT INTO `country` (`id`, `name`, `is_active`) VALUES
(1, 'India', 1),
(2, 'Canada', 1);
-- --------------------------------------------------------
--
-- Table structure for table `email_template`
--
CREATE TABLE `email_template` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`type` int(10) NOT NULL,
`text` mediumtext NOT NULL,
`html` mediumtext 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(),
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(11) NOT NULL,
`updated_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for 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, '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);
-- --------------------------------------------------------
--
-- Table structure for table `email_template_variables`
--
CREATE TABLE `email_template_variables` (
`id` int(11) NOT NULL,
`type` int(10) NOT NULL,
`name` varchar(50) NOT NULL,
`variable_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `email_template_variables`
--
INSERT INTO `email_template_variables` (`id`, `type`, `name`, `variable_name`) VALUES
(1, 1, 'Member Name', '%name%'),
(3, 2, 'User Name', '%name%'),
(4, 3, 'User Name', '%name%'),
(5, 3, 'OTP', '%otp%'),
(6, 4, 'Name', '%name%');
-- --------------------------------------------------------
--
-- Table structure for table `member`
--
CREATE TABLE `member` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`is_email_verified` int(11) NOT NULL DEFAULT 0,
`mobile` varchar(12) NOT NULL,
`address` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`state` varchar(50) NOT NULL,
`country` varchar(50) NOT NULL,
`pincode` int(10) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(100) NOT NULL,
`verification_code` int(10) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1,
`created_by` int(11) NOT NULL,
`updated_by` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for 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$kOboUqGu66RUC2sfUe/1zuMP0u/6QiNieEgCCCOS08RSYhJjnPbt6', 787918, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `member_credits`
--
CREATE TABLE `member_credits` (
`id` int(11) NOT NULL,
`member_id` int(11) DEFAULT NULL,
`package_name` varchar(50) DEFAULT NULL,
`package_type` varchar(50) DEFAULT NULL,
`credit_points` int(11) DEFAULT NULL,
`running_balance` int(11) DEFAULT NULL,
`used_points` int(11) NOT NULL,
`expired_points` int(11) DEFAULT NULL,
`expiring_date` date DEFAULT NULL,
`cost` int(11) DEFAULT NULL,
`is_active` int(11) DEFAULT 1,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for 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, 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'),
(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');
-- --------------------------------------------------------
--
-- Table structure for table `packages_and_pricing`
--
CREATE TABLE `packages_and_pricing` (
`id` int(11) NOT NULL,
`package_name` varchar(50) DEFAULT NULL,
`package_type` varchar(50) DEFAULT NULL,
`credit` int(11) DEFAULT NULL,
`cost` int(11) DEFAULT NULL,
`is_active` int(11) NOT NULL DEFAULT 1,
`created_by` int(11) DEFAULT NULL,
`updated_by` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `packages_and_pricing`
--
INSERT INTO `packages_and_pricing` (`id`, `package_name`, `package_type`, `credit`, `cost`, `is_active`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(3, 'Evo Pack 1', 'Regular', 20, 550, 1, 1, NULL, '2023-05-08 11:27:10', '2023-05-08 16:57:10'),
(4, 'Evo Pack 2', 'Regular', 40, 1000, 1, 1, NULL, '2023-05-08 11:27:10', '2023-05-08 16:57:10'),
(6, 'Evo Pack 1', 'Presales', 24, 550, 1, NULL, NULL, '2023-05-11 09:12:43', '2023-05-11 14:42:43'),
(7, 'Evo Pack 2', 'Presales', 48, 1000, 1, NULL, NULL, '2023-05-11 09:12:43', '2023-05-11 14:42:43');
-- --------------------------------------------------------
--
-- Table structure for table `simulator`
--
CREATE TABLE `simulator` (
`id` int(11) NOT NULL,
`type` varchar(50) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1,
`created_by` int(11) NOT NULL,
`updated_by` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `slot`
--
CREATE TABLE `slot` (
`id` int(11) NOT NULL,
`member_id` int(11) NOT NULL,
`slot_time` time NOT NULL,
`slot_date` date NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1,
`created_by` int(11) NOT NULL,
`updated_by` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `state`
--
CREATE TABLE `state` (
`id` int(11) NOT NULL,
`country_id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `state`
--
INSERT INTO `state` (`id`, `country_id`, `name`, `is_active`) VALUES
(1, 1, 'Tamilnadu', 1),
(2, 1, 'Kerala', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`role` varchar(50) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
`profile` varchar(50) NOT NULL,
`email` varchar(155) DEFAULT NULL,
`address` varchar(255) NOT NULL,
`city` varchar(50) NOT NULL,
`state` varchar(50) NOT NULL,
`country` varchar(50) NOT NULL,
`pincode` int(10) NOT NULL,
`mobile` varchar(12) DEFAULT NULL,
`is_active` int(11) DEFAULT 1,
`user_name` varchar(100) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`updated_by` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
`updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for 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$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'),
(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');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `city`
--
ALTER TABLE `city`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `country`
--
ALTER TABLE `country`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `email_template`
--
ALTER TABLE `email_template`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `email_template_variables`
--
ALTER TABLE `email_template_variables`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `member`
--
ALTER TABLE `member`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `member_credits`
--
ALTER TABLE `member_credits`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `packages_and_pricing`
--
ALTER TABLE `packages_and_pricing`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `simulator`
--
ALTER TABLE `simulator`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `slot`
--
ALTER TABLE `slot`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `state`
--
ALTER TABLE `state`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `city`
--
ALTER TABLE `city`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `country`
--
ALTER TABLE `country`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `email_template`
--
ALTER TABLE `email_template`
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=7;
--
-- AUTO_INCREMENT for table `member`
--
ALTER TABLE `member`
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=34;
--
-- AUTO_INCREMENT for table `packages_and_pricing`
--
ALTER TABLE `packages_and_pricing`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `simulator`
--
ALTER TABLE `simulator`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `slot`
--
ALTER TABLE `slot`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `state`
--
ALTER TABLE `state`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -17,7 +17,9 @@ class App extends BaseConfig
*
* http://example.com/
*/
// public string $baseURL = 'https://mprkv.co.in/devbook';
public string $baseURL = 'http://localhost/golf_backend';
/**
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.

View File

@ -34,7 +34,7 @@ class Database extends Config
// 'username' => 'root',
// 'password' => '',
// 'database' => 'golf',
'DBDriver' => 'mysqli',
'DBDriver' => 'MySQLi',
'DBPrefix' => '',
'pConnect' => false,
'DBDebug' => true,

View File

@ -28,17 +28,17 @@ class Email extends BaseConfig
/**
* SMTP Server Address
*/
public string $SMTPHost = 'smtp.gmail.com';
public string $SMTPHost = 'bh-in-11.webhostbox.net';
/**
* SMTP Username
*/
public string $SMTPUser = 'suseendhiran.1702117@srit.org';
public string $SMTPUser = 'devbook@mprkv.co.in';
/**
* SMTP Password
*/
public string $SMTPPass = 'zlquygyjcjacvuqr';
public string $SMTPPass = 'DevBook@2023';
/**
* SMTP Port

View File

@ -96,6 +96,7 @@ $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(['post'],'/order_details','Admin_controller::order_details');

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +1,140 @@
<?php
namespace App\Controllers;
use App\Models\User_model;
use App\Models\Dashboard_model;
use App\Models\Common_model;
use App\Models\Member_model;
class Common_controller extends BaseController
{
public $session;
public function __construct()
{
$this->session = session();
$this->MemberModel = new Member_model();
$this->UserModel = new User_model();
$this->dModel = new Dashboard_model();
$this->cModel = new Common_model();
helper(['form']);
}
public function index()
{
}
function fetch_country()
{
echo $this->cModel->fetch_country();
}
function fetch_state()
{
if($this->request->getVar('country_id'))
{
echo $this->cModel->fetch_state($this->request->getVar('country_id'));
}
}
function fetch_city()
{
if($this->request->getVar('state_id'))
{
echo $this->cModel->fetch_city($this->request->getVar('state_id'));
}
}
function check_if_mail_exists()
{
if($this->request->getVar('table'))
{
if($this->request->getVar('table') == 'member')
$data = $this->MemberModel->where('email', $this->request->getVar('email'))->find();
$data = $this->MemberModel->where('email', $this->request->getVar('email'))->where('is_active', 1)->find();
else if($this->request->getVar('table') == 'users')
$data = $this->UserModel->where('email', $this->request->getVar('email'))->find();
$data = $this->UserModel->where('email', $this->request->getVar('email'))->where('is_active', 1)->find();
if ($data)
{
echo true;
}
else
{
echo false;
}
}
}
// -----------------------------------------------
}

File diff suppressed because it is too large Load Diff

View File

@ -1,401 +1,802 @@
<?php
namespace App\Controllers;
use Square\SquareClient;
use Square\Models\Money;
use Square\Models\CreatePaymentRequest;
use Square\Exceptions\ApiException;
use Ramsey\Uuid\Uuid;
use App\Models\transaction_model;
use App\Models\Transaction_model;
use App\Models\Member_model;
use App\Models\Dashboard_model;
use App\Models\Common_model;
use App\Models\Member_credits_model;
use App\Models\Packages_and_pricing_model;
use App\Models\Cart_model;
use App\Models\Credits_usage_tracking_model;
use App\Models\Rule_model;
use App\Models\Cart_token_model;
use App\Models\Member_address_model;
use App\Models\Zipcode_model;
class PaymentController extends BaseController
{
public function __construct()
{
$this->session = session();
$this->MemberModel = new Member_model();
$this->dModel = new Dashboard_model();
$this->cModel = new Common_model();
$this->creditsModel = new Member_credits_model();
$this->PackagesModel = new Packages_and_pricing_model();
$this->cartModel = new Cart_model();
$this->CreditsUsageTrackingModel = new Credits_usage_tracking_model();
$this->TransactionModel = new transaction_model();
$this->TransactionModel = new Transaction_model();
$this->RuleModel = new Rule_model();
$this->Cart_token_model = new Cart_token_model();
$this->MemberAddressModel = new Member_address_model();
$this->ZipcodeModel = new Zipcode_model();
}
public function index($token = null)
{
if($this->request->getmethod() == 'post')
{
if(!session()->has('logged_user'))
{
$count = $this->request->getVar('count');
foreach ($count as $key => $value)
{
$this->Cart_token_model->where('id', $this->request->getVar('cart_token_id')[$key] )->set(array( 'count' => $value ))->update();
}
$this->session->set('token',$token);
return redirect()->to(base_url());
}
else{
$this->payment_form();
}
} else {
$this->payment_form();
}
}
public function payment_form()
{
if(!session()->has('logged_user'))
{
return redirect()->to(base_url());
}
$CartData = $this->cartModel->where('member_id',session()->get('logged_user'))->findAll();
$count = count($CartData);
if($count)
{
$credit_pack_expiry_duration = $this->RuleModel->select('value')->where('rule_key', 1 )->get()->getRow()->value;
$gst = $this->RuleModel->select('value')->where('rule_key', 3 )->get()->getRow()->value;
$pst = $this->RuleModel->select('value')->where('rule_key', 4 )->get()->getRow()->value;
$today = date("Y-m-d");
$days = "+".$credit_pack_expiry_duration." days";
$amount = 0;
$item_count = 0;
if($CartData[0]['order_id'] == null)
{
$orderId = 'EGF'.rand(10,100).rand(10,100).rand(10,100);
}else{
$orderId = $CartData[0]['order_id'];
}
$packageArray = [];
for($i=0;$i<$count;$i++)
{
$packageData = $this->PackagesModel->where('id',$CartData[$i]['pack_id'])->find();
$packageData[0]['count'] = $CartData[$i]['count'];
array_push($packageArray , $packageData[0]);
$cost = $packageData[0]['cost'] * $CartData[$i]['count'];
$credits_data['member_id'] = session()->get('logged_user');
$credits_data['package_name'] = $packageData[0]['package_name'];
$credits_data['package_type'] = $packageData[0]['package_type'];
$credits_data['credit_points'] = $packageData[0]['credit'];
$credits_data['running_balance'] = $packageData[0]['credit'];
$credits_data['expired_points'] = 0;
$credits_data['expiring_date'] = date('Y-m-d', strtotime($days, strtotime($today)));
$credits_data['cost'] = $packageData[0]['cost'];
$credits_data['is_active'] = 0;
$credits_data['order_id'] = $orderId;
$credits_data['cost_with_tax'] = round( ( $packageData[0]['cost'] + (($packageData[0]['cost'] * ($gst + $pst) ) / 100) ) , 2 );
$creditsModel_pack_count = $this->creditsModel->selectCount('id')->where('package_name',$packageData[0]['package_name'])->where('order_id',$orderId)->where('member_id', session()->get('logged_user'))->get()->getRow()->id;
$single_pack_no_of_count = $CartData[$i]['count'] - $creditsModel_pack_count;
// if($CartData[0]['order_id'] == null)
// {
for($j=0;$j<$single_pack_no_of_count;$j++)
{
$insert_data = $this->creditsModel->save($credits_data);
}
$this->cartModel->where('id', $CartData[$i]['id'] )
->where('member_id', session()->get('logged_user'))
->set(array( 'order_id' => $orderId ))->update();
// }
$amount = $amount + $cost;
$item_count = $item_count + $CartData[$i]['count'];
}
$data['amount'] = $amount;
$data['item_count'] = $item_count;
$data['order_id'] = $orderId;
$data['gst'] = $gst;
$data['pst'] = $pst;
$data['packageArray'] = $packageArray;
$data['userdata'] = $this->MemberModel->select('member.* , zipcode.code as zipcode')
->join('zipcode', 'member.pincode = zipcode.id', 'left')
->where('member.id', session()->get('logged_user'))
->find();
$if_trans_exist = $this->TransactionModel->where('member_id', session()->get('logged_user'))
->where('order_id', $orderId )->find();
if($if_trans_exist){
//skip insertion
}else{
//Trancaction Table initial entry for this transaction
$TrancactionData['status'] = 'initialized';
$TrancactionData['member_id'] = session()->get('logged_user');
$TrancactionData['order_id'] = $orderId;
$insert = $this->TransactionModel->save($TrancactionData);
}
$zip = $this->ZipcodeModel->findAll();
$output = '<option value="">'.$data['userdata'][0]['pincode'].'</option>';
foreach($zip as $row)
{
$output .= '<option value="'.$row['id'].'">'.$row['code'].'</option>';
}
$data['zipcode'] = $output;
echo view('checkout',$data);
} else { return redirect()->to(base_url()."view/".md5(session()->get('logged_user'))); }
}
public function processPayment()
{
try {
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
error_log('Received a non-POST request');
echo 'Request not allowed';
http_response_code(405);
return;
}
include 'App\Libraries\LocationInfo.php';
include 'app/Libraries/LocationInfo.php';
$json = file_get_contents('php://input');
$data = json_decode($json);
$gst = $this->RuleModel->select('value')->where('rule_key', 3 )->get()->getRow()->value;
$pst = $this->RuleModel->select('value')->where('rule_key', 4 )->get()->getRow()->value;
$token = $data->token;
$idempotencyKey = $data->idempotencyKey;
$amount = $data->amount;
$order_id = $data->order_id;
$add = $data->address;
parse_str( $add, $address);
//print_r($add);die();
$Final_amount = round( ( $amount + (($amount * ($gst + $pst) ) / 100) ) , 2 );
$square_client = new SquareClient([
'accessToken' => getenv('SQUARE_ACCESS_TOKEN'),
'environment' => getenv('ENVIRONMENT'),
'userAgentDetail' => 'golf_evo', // Remove or replace this detail when building your own app
]);
$payments_api = $square_client->getPaymentsApi();
// To learn more about splitting payments with additional recipients,
// see the Payments API documentation on our [developer site]
// (https://developer.squareup.com/docs/payments-api/overview).
$money = new Money();
// Monetary amounts are specified in the smallest unit of the applicable currency.
// This amount is in cents. It's also hard-coded for $1.00, which isn't very useful.
$money->setAmount($Final_amount);
// Set currency to the currency for the location
$money->setCurrency($location_info->getCurrency());
//print_r($money); die();
try {
// Every payment you process with the SDK must have a unique idempotency key.
// If you're unsure whether a particular payment succeeded, you can reattempt
// it with the same idempotency key without worrying about double charging
// the buyer.
$create_payment_request = new CreatePaymentRequest($token, $idempotencyKey, $money);
$create_payment_request->setLocationId($location_info->getId());
$response = $payments_api->createPayment($create_payment_request);
if ($response->isSuccess()) {
$data = json_encode($response->getResult());
$result = json_decode( $data ,true);
//Trancaction Table Data
$TrancactionData['status'] = 'success';
//$TrancactionData['member_id'] = session()->get('logged_user');
$TrancactionData['first_name'] = $address['name'];
$TrancactionData['last_name'] = $address['last_name'];
$TrancactionData['address'] = $address['address'];
$TrancactionData['state'] = $address['state'];
$TrancactionData['city'] = $address['city'];
$TrancactionData['zip_code'] = $address['pincode'];
// $TrancactionData['order_id'] = $order_id;
$TrancactionData['transaction_id'] = $result['payment']['id'];
$TrancactionData['payment_order_id'] = $result['payment']['order_id'];
$TrancactionData['transaction'] = json_encode($response->getResult());
$update = $this->TransactionModel->where('member_id', session()->get('logged_user'))
->where('order_id', $order_id )
->set($TrancactionData)->update();
if( $update)
{
$this->creditsModel->where('order_id', $order_id )->where('member_id', session()->get('logged_user'))
->set(array( 'is_active' => 1 , 'transaction_id' => $result['payment']['id'] ))->update();
$this->cartModel->where('order_id', $order_id )->delete();
}
echo json_encode($response->getResult());
} else {
$data = json_encode($response->getErrors());
$result = json_decode( $data ,true);
//Trancaction Table Data
$TrancactionData['status'] = 'failed';
// $TrancactionData['member_id'] = session()->get('logged_user');
$TrancactionData['first_name'] = $address['name'];
$TrancactionData['last_name'] = $address['last_name'];
$TrancactionData['address'] = $address['address'];
$TrancactionData['state'] = $address['state'];
$TrancactionData['city'] = $address['city'];
$TrancactionData['zip_code'] = $address['pincode'];
//$TrancactionData['order_id'] = $order_id;
$TrancactionData['transaction'] = json_encode($response->getErrors());
$update = $this->TransactionModel->where('member_id', session()->get('logged_user'))
->where('order_id', $order_id )
->set($TrancactionData)->update();
if( $update)
{
$this->creditsModel->where('order_id', $order_id )->delete();
$this->cartModel->where('order_id', $order_id )->set(array('order_id'=>null))->update();
}
echo json_encode(array('errors' => $response->getErrors()));
}
} catch (ApiException $e) {
echo json_encode(array('errors' => $e));
}
} catch (\Exception $e) {
// Handle exceptions
// Example: Logging the exception
log_message('error', 'Exception: ' . $e->getMessage());
// Example: Displaying a custom error message
echo 'An exception occurred: ' . $e->getMessage();
} catch (\Error $e) {
// Handle errors
// Example: Logging the error
log_message('error', 'Error: ' . $e->getMessage());
// Example: Displaying a custom error message
echo 'An error occurred: ' . $e->getMessage();
}
}
public function payment_success( $local_order_id = null)
{
if( $local_order_id != null)
{
$data['TransactionData'] = $this->TransactionModel->where('order_id', $local_order_id )->where('member_id', session()->get('logged_user'))->find();
if($data['TransactionData']){
$memberCredits = $this->creditsModel->where('order_id', $local_order_id )
->where('member_id', session()->get('logged_user'))
->select('package_name')
->select('cost')
->selectSum('credit_points', 'credit_points')
->selectSum('cost', 'costSum')
->selectCount('package_name', 'pack_count')
->groupBy('package_name')->findAll();
if($data['TransactionData'][0]['is_mail_triggered'] == 0){
$sendmail_controller = new Sendmail_controller();
$mail = $sendmail_controller->index(session()->get('logged_user_email') , null , 5);
if($mail == true){
$this->TransactionModel->where('order_id', $local_order_id )->set(array('is_mail_triggered'=>1))->update();
}
}
$Subtotal = 0;
foreach ($memberCredits as $key => $ele) {
$Subtotal = $Subtotal + $ele['costSum'];
}
$data['memberCredits'] =$memberCredits;
$data['order_id'] = $local_order_id;
$timestamp = strtotime($data['TransactionData'][0]['created_at']);
$data['formattedDate'] = date('l, F j, Y', $timestamp);
$data['Subtotal'] = $Subtotal;
$data['gst'] = $this->RuleModel->select('value')->where('rule_key', 3 )->get()->getRow()->value;
$data['pst'] = $this->RuleModel->select('value')->where('rule_key', 4 )->get()->getRow()->value;
$data['card_brand'] = json_decode($data['TransactionData'][0]['transaction'] , true)['payment']['card_details']['card']['card_brand'];
$data['last_4'] = json_decode($data['TransactionData'][0]['transaction'] , true)['payment']['card_details']['card']['last_4'];
// echo '<pre>';
// print_r( $data['memberCredits']);
// echo '</pre>';
// die();
echo view('payment',$data);
}else{
echo 'invalid order_id';
}
}
}
public function payment_failed( $local_order_id = null)
{
if( $local_order_id != null)
{
$data['TransactionData'] = $this->TransactionModel->where('order_id', $local_order_id )->where('member_id', session()->get('logged_user'))->find();
if($data['TransactionData']){
$data['category'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['category'];
$data['code'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['code'];
$data['detail'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['detail'];
$data['order_id'] = $data['TransactionData'][0]['order_id'];
$timestamp = strtotime($data['TransactionData'][0]['created_at']);
$data['formattedDate'] = date('l, F j, Y', $timestamp);
echo view('payment_failed',$data);
}else{
echo 'invalid order_id';
}
}
}
}

View File

@ -1,269 +1,535 @@
<?php namespace App\Controllers;
// use App\Models\Dashboard_model;
use App\Models\User_model;
use App\Models\Dashboard_model;
use App\Models\Common_model;
use App\Models\Member_credits_model;
use App\Models\Packages_and_pricing_model;
use App\Models\Credits_usage_tracking_model;
use App\Models\Email_template_model;
use App\Models\Member_model;
use App\Models\transaction_model;
use App\Models\Transaction_model;
class Sendmail_controller extends BaseController
{
public function __construct()
{
$this->session = session();
$this->MemberModel = new Member_model();
$this->MemberModel = new Member_model();
$this->UserModel = new User_model();
$this->dModel = new Dashboard_model();
$this->cModel = new Common_model();
$this->creditsModel = new Member_credits_model();
$this->PackagesModel = new Packages_and_pricing_model();
$this->CreditsUsageTrackingModel = new Credits_usage_tracking_model();
$this->MailModel = new Email_template_model();
$this->TransactionModel = new transaction_model();
$this->TransactionModel = new Transaction_model();
helper(['form', 'url']);
}
public function index($to,$code,$return)
{
try{
$email = \Config\Services::email();
$email->setFrom('suseendhiran.1702117@srit.org', 'suseendhiran');
$email->setFrom('devbook@mprkv.co.in', 'GolfEvo');
$email->setTo($to);
// login user change passowrd => type 4
if($return == 4)
{
$data['id'] = '4';
$mem_data = $this->MemberModel->where('email', $to)->find();
if ($mem_data)
{
$temp_data = $this->MailModel->where('type' , 4)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data) {
$data['html'] = str_replace("%name%",$mem_data[0]['name'],$temp_data[0]['html']);
}
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Password change');
}
else
{
$user_data = $this->UserModel->where('email', $to)->find();
$temp_data = $this->MailModel->where('type' , 4)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data) {
$data['html'] = str_replace("%name%",$user_data[0]['name'],$temp_data[0]['html']);
}
$message = view('verification_mail_temp',$data);
}
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Password change');
}
// user => type 2
else if($return == 3)
{
$user_data = $this->UserModel->where('email', $to)->find();
$data['id'] = '3';
$data['username'] = $to;
$data['password'] = $code;
$data['url'] = base_url()."admin";
$temp_data = $this->MailModel->where('type' , 2)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data)
$data['html'] = str_replace("%name%",$user_data[0]['name'],$temp_data[0]['html']);
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Username Password');
}
// otp => type 3
else if ($return == 2)
{
$data['id'] = '2';
$data['otp'] = $code;
$mem_data = $this->MemberModel->where('email', $to)->find();
if ($mem_data)
{
$temp_data = $this->MailModel->where('type' , 3)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data) {
$html = str_replace("%name%",$mem_data[0]['name'],$temp_data[0]['html']);
$data['html'] = str_replace("%otp%",$code,$html);
}
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('OTP verification');
}
else
{
$user_data = $this->UserModel->where('email', $to)->find();
$temp_data = $this->MailModel->where('type' , 3)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data) {
$html = str_replace("%name%",$user_data[0]['name'],$temp_data[0]['html']);
$data['html'] = str_replace("%otp%",$code,$html);
}
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('OTP verification');
}
}
// member => type 1
else if($return == 1)
{
$data['id'] = '1';
$user_data = $this->MemberModel->where('email', $to)->find();
$data['to'] = $to;
$data['code'] = $code;
$data['url'] = base_url()."verify_email/".md5($code);
$temp_data = $this->MailModel->where('type' , 1)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data)
$data['html'] = str_replace("%name%",$user_data[0]['name'],$temp_data[0]['html']);
$message = view('verification_mail_temp',$data);
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Verify your email address');
}
// payment => type 5
else if($return == 5)
{
$TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
$Transaction_id = $TransactionData['transaction_id'];
$timestamp = strtotime($TransactionData['created_at']);
$Transaction_date = date('l, F j, Y', $timestamp);
$amount = json_decode($TransactionData['transaction'] , true)['payment']['amount_money']['amount'];
$payment_method = json_decode($TransactionData['transaction'] , true)['payment']['source_type'];
$data['id'] = $return;
$temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
if ($temp_data) {
$data['html'] = str_replace("%name%",session()->get('logged_user_name'),$temp_data[0]['html']);
$data['html'] = str_replace("%id%",$Transaction_id,$temp_data[0]['html']);
$data['html'] = str_replace("%method%",$payment_method,$temp_data[0]['html']);
$data['html'] = str_replace("%date%", $Transaction_date,$temp_data[0]['html']);
$data['html'] = str_replace("%amount%",$amount,$temp_data[0]['html']);
$message = view('verification_mail_temp',$data);
}
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Username Password');
}
$email->setMessage($message);
if ($email->send())
{
if ($return == 1)
$this->session->setTempdata('mail_success', "Please check your mail to verify",3);
if ($return == 5)
return true;
}
else
{
$error = $email->printDebugger();
//echo 'Email sending failed: ' . $error;
}
} catch (EmailException $e) {
// echo 'Email sending failed: ' . $e->getMessage();
echo 'Email sending failed: ' . $e->getMessage();
}
}
public function verify_email($verification_code)
{
// Get the user data corresponding to the verification code
$user_data = $this->MemberModel->where('md5(verification_code)', $verification_code)->find();
if($user_data)
{
//print_r($user_data);die();
if($user_data[0]['is_email_verified'] == 0)
{
// Update the users status
// $update_data = $this->MemberModel->update_status($user_data['id']);
$data['is_email_verified'] = 1;
$update_data = $this->MemberModel->where('id', $user_data[0]['id'] )->set($data)->update();
if($update_data)
{
return redirect()->to(base_url()."set_password/".md5($user_data[0]['id']));
}
else
{
// Show error message
echo 'Error in verifying email. Please try again.';
}
}
else
{
// Show error message
// echo 'Email already verified.';
return redirect()->to(base_url()."set_password/".md5($user_data[0]['id']));
}
}
else
{
// Show error message
echo 'Invalid verification code.';
}
}
public function forgot_password()
{
$this->session->setTempdata('user',"member",3);
if($this->request->getmethod() == 'get')
{
return view('forgot_password_otp.php');
}
else if($this->request->getmethod() == 'post')
{
$email = $this->request->getVar('email');
$user_data = $this->MemberModel->where('email', $email)->where('is_email_verified', 1 )->find();
if ($user_data)
{
$otp = rand(1000 , 9999);
$this->index($this->request->getVar('email') , $otp , 2 );
$data['status'] = 'success';
$data['otp'] = $otp;
echo json_encode($data);
}
else
{
$data['status'] = 'failed';
echo json_encode($data);
}
}
}
}

View File

@ -1,44 +1,88 @@
<?php
namespace App\Controllers;
use App\Models\User_model;
use App\Models\Dashboard_model;
use App\Models\Common_model;
use App\Models\Member_credits_model;
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\Cart_token_model;
use App\Models\Cart_model;
use App\Models\transaction_model;
use App\Models\Transaction_model;
class Test_controller extends BaseController
{
public $session;
public function __construct()
{
$this->session = session();
$this->UserModel = new User_model();
$this->dModel = new Dashboard_model();
$this->cModel = new Common_model();
$this->creditsModel = new Member_credits_model();
$this->PackagesModel = new Packages_and_pricing_model();
$this->CreditsUsageTrackingModel = new Credits_usage_tracking_model();
$this->MailModel = new Email_template_model();
$this->VariableModel = new Variable_model();
$this->RuleModel = new Rule_model();
$this->Cart_token_model = new Cart_token_model();
$this->cartModel = new Cart_model();
$this->TransactionModel = new transaction_model();
$this->TransactionModel = new Transaction_model();
helper(['form', 'url']);
}
public function index($token = null)
{
}
// -----------------------------------------------
}

View File

@ -1,13 +1,25 @@
<?php namespace App\Models;
use CodeIgniter\Model;
class transaction_model extends Model
class Transaction_model extends Model
{
protected $table = 'transactions';
protected $primaryKey = 'id';
protected $allowedFields = ['status','member_id','transaction_id','payment_order_id','order_id','transaction','is_mail_triggered', 'first_name','last_name','address', 'city' , 'state' , 'zip_code'];
}

View File

@ -15,6 +15,19 @@
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<style>
.field-icon {
float: right;
margin-left: -35px;
margin-top: -33px;
margin-right: 12px;
position: relative;
z-index: 3;
}
</style>
</head>
<body class="forgetpassword">
<?php include 'member_layout/header.php' ?>
@ -49,6 +62,7 @@
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,}"
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"
placeholder="Enter password" name="password" required>
<span toggle="#hori-pass1" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div>
<div class="col-12 mb-4">
<label for="email">Confirm Password</label>
@ -62,6 +76,18 @@
</section>
<?php include 'member_layout/footer.php' ?>
</body>
<script>
$("#toggle-password").click(function() {
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
}
else {
input.attr("type", "password");
}
});
</script>
<!-- Plugin js-->
<script src="<?= base_url()."/public"; ?>/assets/libs/parsleyjs/parsley.min.js"></script>

View File

@ -1,270 +1,540 @@
<!DOCTYPE html>
<?php
require 'vendor/autoload.php';
include 'App\Libraries\LocationInfo.php';
include 'app/Libraries/LocationInfo.php';
use Square\Environment;
use Ramsey\Uuid\Uuid;
// Pulled from the .env file and upper cased e.g. SANDBOX, PRODUCTION.
$upper_case_environment = strtoupper(getenv('ENVIRONMENT'));
$web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https://web.squarecdn.com/v1/square.js" : "https://sandbox.web.squarecdn.com/v1/square.js";
?>
<html lang="en-US">
<head>
<script type="text/javascript" src="<?php echo $web_payment_sdk_url ?>"></script>
<script type="text/javascript">
window.applicationId =
"<?php
echo getenv('SQUARE_APPLICATION_ID');
?>";
window.locationId =
"<?php
echo getenv('SQUARE_LOCATION_ID');
?>";
window.currency =
"<?php
echo $location_info->getCurrency();
?>";
window.country =
"<?php
echo $location_info->getCountry();
?>";
window.idempotencyKey =
"<?php
echo Uuid::uuid4();
?>";
</script>
<!-- <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>public/square-stylesheets/style.css">
<link rel="stylesheet" type="text/css" href="<?= base_url(); ?>public/square-stylesheets/sq-payment.css"> -->
<title>Checkout - Golf Evolution</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?= base_url()."/public"; ?>/assets/member_images/favicon.png" sizes="192x192" />
<link rel="apple-touch-icon" href="<?= base_url()."/public"; ?>/assets/member_images/favicon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="<?= base_url()."/public"; ?>/assets/member_css/front-style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/member_js/ajax.js"></script>
<input id="url" value="<?= base_url() ?>" type="hidden">
<style typr="text/css">
/* Styles for the loading spinner */
.loading-spinner-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
visibility: hidden;
}
.loading-spinner {
border: 8px solid #f3f3f3;
border-top: 8px solid #3498db;
border-radius: 50%;
width: 60px;
height: 60px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body class="checkout">
<?php include 'member_layout/header.php' ?>
<section class="pt-5 pb-3">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="heading-border">Check Out</h1>
</div>
</div>
<div class="row back-card">
<div class="col-lg-12">
<a href="<?=base_url()."view_cart/".md5(session()->get('logged_user')); ?>"><i class="arrow-left"></i> Back to Cart</a>
<!-- <h4>Billing Address</h4> -->
</div>
</div>
</div>
</section>
<section class="checkout-inner mt-3">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="address-form" >
<form id="member_address" >
<div class="row">
<div class="col-lg-12 d-flex align-items-center mb-3">
</div>
<!-- <input type="hidden" value="<?= $userdata[0]['id']; ?>" name="id" > -->
<div class="col-lg-6 mb-3">
<label for="first_name">First Name</label>
<input type="text" value="<?= $userdata[0]['name']; ?>" name="name" id="first_name">
</div>
<div class="col-lg-6 mb-3">
<label for="last_name">Last Name</label>
<input type="text" value="<?= $userdata[0]['last_name']; ?>" name="last_name" id="last_name">
</div>
<div class="col-lg-12 mb-3">
<label for="address">Street Address</label>
<input type="text" value="<?= $userdata[0]['address']; ?>" name="address" id="address">
</div>
<div class="col-lg-4 mb-3">
<label for="zipcode">Zip Code</label>
<select name="pincode" id="pincode">
<option value="<?= $userdata[0]['pincode']; ?>"><?= $userdata[0]['zipcode']; ?></option>
<?= $zipcode ?>
</select>
</div>
<div class="col-lg-4 mb-3">
<label for="city">City</label>
<input type="text" value="<?= $userdata[0]['city']; ?>" name="city" id="city">
<input type="text" value="<?= $userdata[0]['city']; ?>" name="city" id="city" readonly>
</div>
<div class="col-lg-4 mb-3">
<label for="state">State</label>
<input type="text" name="state" id="state" value="<?= $userdata[0]['state']; ?>">
<input type="text" name="state" id="state" value="<?= $userdata[0]['state']; ?>" readonly>
</div>
</div>
<!-- <div class="row form-button">
<div class="col-lg-2 col-4">
<button>Cancel</button>
</div>
<div class="col-lg-3 col-4">
<input type="button" class="submit" value="Save">
</div>
<div class="col-lg-7 col-4"></div>
</div> -->
</form>
</div>
<!-- Loading spinner HTML markup -->
<div class="loading-spinner-overlay" id="loading-spinner-overlay">
<div class="loading-spinner"></div>
</div>
<h4 class="payment-title">Payment Method</h4>
<form class="payment-form" id="fast-checkout">
<div class="wrapper">
<div class="credit-card">
<div class="row">
<div class="col-lg-12 ">
<!-- Add Payment Method Code-->
<input type="hidden" value="<?= $amount; ?>" name="amount" id="amount">
<input type="hidden" value="<?= $order_id; ?>" name="order_id" id="order_id">
<input type="hidden" value="" name="address_id" id="address_id">
<div id="card-container"></div>
<span id="payment-flow-message"></span>
<div class="text-end" style="margin-top:-45px;"> <button id="card-button" type="button">Proceed to Pay</button></div>
</div>
</div>
</div>
<!-- <div class="google-pay">
<div class="row google-pay-content align-items-center">
<div class="col-lg-10 d-flex align-items-center">
<span>Google Pay</span>
</div>
<div id="google-pay-button" alt="google-pay" type="button"></div>
<div class="col-lg-2 text-end">
<img src="<?= base_url()."/public"; ?>/assets/member_images/g-pay.png" alt="" width="64" height="58"/>
</div>
</div>
</div> -->
</div>
</div>
</form>
<div class="col-lg-4 order-summary-main">
<div class="order-summary">
<div class="row order1">
<div class="col-lg-12 col-12">
<h4>Order Summary</h4>
</div>
</div>
<?php foreach ($packageArray as $row) { ?>
<div class="row evo">
<div class="col-lg-8 col-8"><div class="product-name"><?php echo $row['package_name']." ($".$row['cost']." x ".$row['count'].")"; ?></div></div>
<div class="col-lg-4 col-4 text-end"><div class="product-price"><span class="price-symbol">$</span><?php echo $row['cost'] * $row['count']; ?></div></div>
</div>
<?php } ?>
<div class="row item1">
<div class="col-lg-6 col-6"><p>Items (<?= $item_count; ?>) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= $amount; ?></p></div>
</div>
<div class="row item2">
<div class="col-lg-6 col-6"><p>PST (<?= $pst; ?>%) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $pst / 100 , 2); ?></p></div>
</div>
<div class="row item3">
<div class="col-lg-6 col-6"><p>GST (<?= $gst; ?>%) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $gst / 100 , 2); ?></p></div>
</div>
<div class="row order2">
<div class="col-lg-6 col-6"><h5>Order Total : </h5></div>
<div class="col-lg-6 col-6 text-end"><div class="product-total"><span class="price-symbol">$</span><?= round( ( $amount + (($amount * ($gst + $pst) ) / 100) ) , 2 ); ?></div></div>
</div>
<div class="row order-button">
<div class="col-lg-12">
<p>By placing your order, you agree to our company privacy policy and condition of use.</p>
<!-- <button id="card-button" type="button">Proceed to Pay</button> -->
<!-- <input id="card-button" type="submit" value="Proceed to Pay"> -->
</div>
</div>
</div>
</div> -->
</div>
</div>
</form>
<div class="col-lg-4 order-summary-main">
<div class="order-summary">
<div class="row order1">
<div class="col-lg-12 col-12">
<h4>Order Summary</h4>
</div>
</div>
<?php foreach ($packageArray as $row) { ?>
<div class="row evo">
<div class="col-lg-8 col-8"><div class="product-name"><?php echo $row['package_name']." ($".$row['cost']." x ".$row['count'].")"; ?></div></div>
<div class="col-lg-4 col-4 text-end"><div class="product-price"><span class="price-symbol">$</span><?php echo $row['cost'] * $row['count']; ?></div></div>
</div>
<?php } ?>
<div class="row item1">
<div class="col-lg-6 col-6"><p>Items (<?= $item_count; ?>) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= $amount; ?></p></div>
</div>
<div class="row item2">
<div class="col-lg-6 col-6"><p>PST (<?= $pst; ?>%) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $pst / 100 , 2); ?></p></div>
</div>
<div class="row item3">
<div class="col-lg-6 col-6"><p>GST (<?= $gst; ?>%) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $gst / 100 , 2); ?></p></div>
</div>
<div class="row order2">
<div class="col-lg-6 col-6"><h5>Order Total : </h5></div>
<div class="col-lg-6 col-6 text-end"><div class="product-total"><span class="price-symbol">$</span><?= round( ( $amount + (($amount * ($gst + $pst) ) / 100) ) , 2 ); ?></div></div>
</div>
<div class="row order-button">
<div class="col-lg-12">
<p>By placing your order, you agree to our company privacy policy and condition of use.</p>
<!-- <button id="card-button" type="button">Proceed to Pay</button> -->
<!-- <input id="card-button" type="submit" value="Proceed to Pay"> -->
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include 'member_layout/footer.php' ?>
<!-- <script type="text/javascript" src="<?= base_url(); ?>public/square-js/sq-ach.js"></script>
<script type="text/javascript" src="<?= base_url(); ?>public/square-js/sq-apple-pay.js"></script>
<script type="text/javascript" src="<?= base_url(); ?>public/square-js/sq-google-pay.js"></script> -->
<script type="text/javascript" src="<?= base_url(); ?>public/square-js/sq-card-pay.js"></script>
<script type="text/javascript" src="<?= base_url(); ?>public/square-js/sq-payment-flow.js"></script>
</body>
</html>

View File

@ -89,7 +89,7 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">State<span class="text-danger"></span></label>
<div class="col-7">
<input type="text" class="form-control" id="state" name="state" value="<?php if(isset($Memberdata)){echo $Memberdata[0]['state'];} ?>" placeholder="State">
<input type="text" class="form-control" id="state" name="state" value="<?php if(isset($Memberdata)){echo $Memberdata[0]['state'];} ?>" placeholder="State" readonly>
</div>
</div>
@ -97,7 +97,7 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">City<span class="text-danger"></span></label>
<div class="col-7">
<input type="text" class="form-control" id="city" name="city" value="<?php if(isset($Memberdata)){echo $Memberdata[0]['city'];} ?>" placeholder="City">
<input type="text" class="form-control" id="city" name="city" value="<?php if(isset($Memberdata)){echo $Memberdata[0]['city'];} ?>" placeholder="City" readonly>
</div>
</div>

View File

@ -1,121 +1,241 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Log In | Member</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="public/assets/images/favicon.ico">
<!-- App css -->
<link href="public/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
<link href="public/assets/css/app-material.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
<link href="public/assets/css/bootstrap-material-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
<link href="public/assets/css/app-material-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
<!-- icons -->
<link href="public/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<!-- css -->
<link href="<?= base_url()."/public"; ?>/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body class="loading">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-5">
<div class="card">
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<h1>Login</h1>
<!-- <p class="text-muted mb-4 mt-3">Enter your email address and password to access admin panel.</p> -->
</div>
</br>
<form method="post" action="<?= base_url(); ?>">
<?php if(session()->getTempdata('mail_success')):?>
<div class="alert alert-success" >
<?= session()->getTempdata('mail_success'); ?>
</div>
<?php endif;?>
<?php if(session()->getTempdata('error')):?>
<div class="alert alert-danger" >
<?= session()->getTempdata('error'); ?>
</div>
<?php endif;?>
<div class="form-group mb-3">
<label for="emailaddress">Email address</label>
<input class="form-control" type="email" name="email" id="emailaddress" required="" value="gowthamceline46@gmail.com" placeholder="Enter your email">
</div>
<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" 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>
</div>
</div>
</div>
<label for="emailaddress">Email address</label>
<input class="form-control" type="email" name="email" id="emailaddress" required="" value="gowthamceline46@gmail.com" placeholder="Enter your email">
</div>
<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" 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>
</div>
</div>
</div>
</div>
</br>
<div class="form-group mb-0 text-center">
<button class="btn btn-primary btn-block" type="submit"> Log In </button>
</div>
</form>
</div> <!-- end card-body -->
</div>
<!-- end card -->
<div class="row mt-3">
<div class="col-12 text-center">
<p> <a href="<?= base_url()."forgot_password"; ?>" class="">Forgot your password?</a></p>
<p class="text-muted">Don't have an account? <a href="<?= base_url()."register"; ?>" class="text-primary font-weight-medium ml-1">Sign Up</a></p>
</div> <!-- end col -->
</div>
<!-- end row -->
</div> <!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end container -->
</div>
<!-- end page -->
<footer class="footer footer-alt">
<script>document.write(new Date().getFullYear())</script> &copy; <a href="" class="text-dark"></a>
</footer>
<!-- Vendor js -->
<script src="public/assets/js/vendor.min.js"></script>
<!-- App js -->
<script src="public/assets/js/app.min.js"></script>
</body>
</html>

View File

@ -16,6 +16,16 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/member_js/ajax.js"></script>
<style>
.field-icon {
float: right;
margin-left: -35px;
margin-top: 20px;
margin-right: 12px;
position: relative;
z-index: 3;
}
</style>
</head>
<body class="memberaccess">
<?php include 'member_layout/header.php' ?>
@ -101,11 +111,11 @@
<p>Expiry Date : <?php $date = new DateTime($credit_data[$i]['expiring_date']); echo $date->format('M-d-Y'); ?></p></td>
<?php
if($credit_data[$i]['running_balance'] > 0)
echo '<td><i class="fa fa-caret-up" aria-hidden="true">'.$credit_data[$i]['running_balance'].'</i> </td>';
echo '<td><div class="credit-trans"><i class="fa fa-caret-up" aria-hidden="true"></i> '.$credit_data[$i]['running_balance'].'</div></td>';
else
echo '<td class="red-content"><i class="fa fa-sort-desc" aria-hidden="true">'.$credit_data[$i]['used_points'].'</i> </td>';
echo '<td class="red-content"><div class="credit-trans"><i class="fa fa-sort-desc" aria-hidden="true"></i>'.$credit_data[$i]['used_points'].'</div> </td>';
?>
<td><i class="fa" aria-hidden="true"><?= $credit_data[$i]['avaiable_credit'] ?></i> </td>
<td><div class="credit-trans"><?= $credit_data[$i]['avaiable_credit'] ?></div> </td>
</tr>
<?php } ?>
</table>
@ -161,10 +171,10 @@
<td>Credit Usage</td>
</tr>
<?php foreach ($value['credit_data'] as $credit_datakey => $credit_data_value) { ?>
<tr class="table-grey <?= $key."_table-grey" ?> table-bottom">
<tr class="table-grey <?= $key."_table-grey" ?>">
<td><?= $credit_data_value['package_name'] ?></td>
<td><p>Pack Cost : $<?= $credit_data_value['cost'] ?></p><p>Pack Credits : <?= $credit_data_value['credit_points'] ?> Nos</p><p>Pack Expiry : <?php $date = new DateTime($credit_data_value['expiring_date']); echo $date->format('M-d-Y'); ?></p></td>
<td>x<?= $credit_data_value['pack_count'] ?></td>
<td><?= $credit_data_value['pack_count'] ?></td>
<td><span>$</span><?= $credit_data_value['costSum'] ?></td>
<td></td>
</tr>
@ -179,8 +189,8 @@
<td></td>
</tr>
<tr class="table-grey <?= $key."_table-grey" ?> table-bottom">
<td>Taxes</td>
<td></td>
<td style="text-align:end;">Taxes</td>
<td>PST (<?= $pst ?>%)</td>
<td><span>$</span><?= round(array_sum(array_column($value['credit_data'],'costSum')) * $pst / 100 , 2) ?></td>
<td></td>
@ -247,11 +257,11 @@
</div>
<div class="col-4 col-lg-4 mb-3">
<label for="city">City</label><br>
<input type="text" name="city" id="city" value="<?= $profile[0]['city']?>">
<input type="text" name="city" id="city" value="<?= $profile[0]['city']?>" readonly>
</div>
<div class="col-4 col-lg-4 mb-3">
<label for="state">State</label><br>
<input type="text" name="state" id="state" value="<?= $profile[0]['state']?>">
<input type="text" name="state" id="state" value="<?= $profile[0]['state']?>" readonly>
</div>
<div class="col-6 col-lg-6">
@ -274,10 +284,11 @@
<div class="col-6 col-lg-6"></div>
<div class="col-6 col-lg-6 mb-3">
<label for="new_password">New Password</label><br>
<input type="text" name="password" id="new_password"
<input type="password" name="password" id="new_password"
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,}"
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"
required>
<span toggle="#new_password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div>
<div class="col-6 col-lg-6"></div>
<div class="col-6 col-lg-6 mb-3">
@ -334,5 +345,17 @@ $(document).ready(function(){
</script>
<script>
$("#toggle-password").click(function() {
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
}
else {
input.attr("type", "password");
}
});
</script>
</body>
</html>

View File

@ -1,148 +1,296 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Evo Membership - Golf Evolution</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?= base_url()."/public"; ?>/assets/member_images/favicon.png" sizes="192x192" />
<link rel="apple-touch-icon" href="<?= base_url()."/public"; ?>/assets/member_images/favicon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="<?= base_url()."/public"; ?>/assets/member_css/front-style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="<?= base_url()."/public"; ?>/assets/member_js/ajax.js"></script>
<input id="url" value="<?= base_url() ?>" type="hidden">
<input id="c_token" value="<?php if ($token) { echo md5($token); } ?>" type="hidden">
</head>
<body class="membership">
<?php include 'member_layout/header.php' ?>
<section class="pt-5 pb-5 evo-membership">
<div class="container">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8">
<h1 class="heading-border">Evo Membership</h1>
<p class="text-center">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here, making it look like readable English.</p>
</div>
<div class="col-md-2">
</div>
</div>
<div class="row membership-img">
<div class="col-md-4">
<img src="<?= base_url()."/public"; ?>/assets/member_images/vector-3.png" width="68" height="80" alt="" class="mb-3"/>
<img src="<?= base_url()."/public"; ?>/assets/member_images/Vector-3.png" width="68" height="80" alt="" class="mb-3"/>
<h5 class="mem-icontitle">Lorem Ipsum Lorem</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
<div class="col-md-4">
<img src="<?= base_url()."/public"; ?>/assets/member_images/vector-4.png" width="68" height="80" alt="" class="mb-3"/>
<img src="<?= base_url()."/public"; ?>/assets/member_images/Vector-4.png" width="68" height="80" alt="" class="mb-3"/>
<h5 class="mem-icontitle">Lorem Ipsum Lorem</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
<div class="col-md-4">
<img src="<?= base_url()."/public"; ?>/assets/member_images/vector-5.png" width="68" height="80" alt="" class="mb-3"/>
<img src="<?= base_url()."/public"; ?>/assets/member_images/Vector-5.png" width="68" height="80" alt="" class="mb-3"/>
<h5 class="mem-icontitle">Lorem Ipsum Lorem</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
</div>
</div>
</section>
<section class="presale-offer-section">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-6">
<h3 class="mb-3 heading-font">Get Credit Packs on <br/>Pre-Sales Offer</h3>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-6">
<div class="credit-offer-box">
<div class="offer-tag"><img src="<?= base_url()."/public"; ?>/assets/member_images/Offer.png"/ width="43" height="71"></div>
<img src="<?= base_url()."/public"; ?>/assets/member_images/cart-icon.png" alt="" width="70" height="70"/>
<h6 class="pack-title font-bold"><?= $pack_data[0]['package_name']; ?></h6>
<div class="pack-desc"><?= $pack_data[0]['discription']; ?></div>
<div class="pack-price font-bold"><span class="price-symbol">$</span><?= $pack_data[0]['cost']; ?></div>
<div class="pack-tax font-bold">+ Taxes</div>
<div class="pack-credit-number font-bold"><?= $pack_data[0]['credit']; ?> Credits</div>
<div class="pack-credit-point"><?= $pack_data[0]['offer_label']; ?></div>
<div class="pack-credit-price">1 Credit at $<?= round($pack_data[0]['cost'] / $pack_data[0]['credit'] , 2); ?></div>
<a id="<?= $pack_data[0]['id']; ?>" class="pack-submit blue">Add To Cart</a>
</div>
</div>
<div class="col-lg-6 second-pack">
<div class="credit-offer-box">
<div class="offer-tag"><img src="<?= base_url()."/public"; ?>/assets/member_images/Offer.png"/ width="43" height="71"></div>
<img src="<?= base_url()."/public"; ?>/assets/member_images/cart-icon.png" alt="" width="70" height="70"/>
<h6 class="pack-title font-bold"><?= $pack_data[1]['package_name']; ?></h6>
<div class="pack-desc"><?= $pack_data[1]['discription']; ?></div>
<div class="pack-price font-bold"><span class="price-symbol">$</span><?= $pack_data[1]['cost']; ?></div>
<div class="pack-tax font-bold">+ Taxes</div>
<div class="pack-credit-number font-bold"><?= $pack_data[1]['credit']; ?> Credits</div>
<div class="pack-credit-point"><?= $pack_data[1]['offer_label']; ?></div>
<div class="pack-credit-price">1 Credit at $<?= round($pack_data[1]['cost'] / $pack_data[1]['credit'] , 2); ?></div>
<a id="<?= $pack_data[1]['id']; ?>" class="pack-submit pink">Add To Cart</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="how-works" style="background-image:url(<?= base_url()."/public/assets/member_images/good-shot-buddy-shot-two-happy-men-playing-game-golf.png"; ?>);">
<div class="container">
<div class="row">
<div class="col-lg-6 pt-5 pb-5 pe-5 bg-white">
<h3 class="mb-3 heading-font">How it Works</h3>
<p class="mb-5">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
<div class="row work-section">
<div class="col-12 mb-4">
<h5>Lorem Ipsum</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
<div class="col-12 mb-4">
<h5>Lorem Ipsum</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
<div class="col-12 mb-4">
<h5>Lorem Ipsum</h5>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
</div>
</div>
</div>
<div class="col-lg-6">
</div>
</div>
</div>
</section>
<section class="contact-section pt-5 pb-5 text-center">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-3">
</div>
<div class="col-lg-3 question-title">
<h6>Have a question? Reach us</h6>
</div>
<div class="col-lg-3">
<a href="#" class="contact-btn">Contact Us</a>
</div>
<div class="col-lg-3">
</div>
</div>
</div>
</section>
<?php include 'member_layout/footer.php' ?>
</body>
</html>

View File

@ -1,136 +1,294 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Account - Golf Evolution</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?= base_url()."/public"; ?>/assets/member_images/favicon.png" sizes="192x192" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= base_url()."/public"; ?>/assets/member_css/front-style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script>
function check_if_exists() {
var email = $("#email").val();
$.ajax({
type:"post",
url: "<?php echo base_url(); ?>/check_if_mail_exists",
data:{ email:email , table : 'member'},
success:function(response)
{
if (response == true)
{
alert("This mail id already exists");
$("#email").val('');
}
}
});
}
</script>
<style>
.field-icon {
float: right;
margin-left: -35px;
margin-top: 17px;
margin-right: 12px;
position: relative;
z-index: 3;
}
</style>
</head>
<body>
<?php include 'member_layout/header.php' ?>
<section class="login pt-5 pb-5">
<div class="container">
<div class="account-width mb-4" id="myaccount">
<div class="form-container sign-up-container">
<form method="post" action="<?= base_url()."register"; ?>" role="form" class="parsley-examples">
<h1>Create Account</h1>
<div class="row">
<div class="col-6 mb-3">
<label for="username">First Name</label>
<input type="text" class="form-control" required parsley-type="text" name="name" placeholder="Enter your firstname" id="username"/>
<input type="text" class="form-control" required parsley-type="text" name="name" placeholder="Firstname" id="username"/>
</div>
<div class="col-6 mb-3">
<label for="username">Last Name</label>
<input type="text" class="form-control" required parsley-type="text" name="last_name" placeholder="Enter your lastname" id="lastname"/>
<input type="text" class="form-control" required parsley-type="text" name="last_name" placeholder="Lastname" id="lastname"/>
</div>
<div class="col-12 mb-3">
<label for="loginemail">Email Id</label>
<input type="email" class="form-control" required parsley-type="email" name="email" placeholder="Enter your email id" onchange="check_if_exists();" id="loginemail"/>
<input type="email" class="form-control" required parsley-type="email" name="email" placeholder="Enter your email id" onchange="check_if_exists();" id="email"/>
</div>
<div class="col-12 mb-3">
<label for="mobile">Mobile Number</label>
<input type="tel" class="form-control" data-parsley-type="number" name="mobile" placeholder="Enter your mobile number" id="mobile"/>
</div>
</div>
<button class="signup-btn" type="submit">Register</button>
</form>
</div>
<div class="form-container sign-in-container">
<form method="post" action="<?= base_url(); ?>">
<h1>Sign in</h1>
<?php if(session()->getTempdata('mail_success')):?>
<div class="alert alert-success" >
<?= session()->getTempdata('mail_success'); ?>
</div>
<?php endif;?>
<?php if(session()->getTempdata('error')):?>
<div class="alert alert-danger" >
<?= session()->getTempdata('error'); ?>
</div>
<?php endif;?>
<div class="row">
<div class="col-12 mb-3">
<label for="regemail">Email or Username</label>
<input type="email" name="email" id="emailaddress" required="" value="gowthamceline46@gmail.com" placeholder="Email" />
<input type="email" name="email" id="emailaddress" required=""
value="<?php if(session()->getTempdata('l_email')) { echo session()->getTempdata('l_email'); }?>" placeholder="Email" />
</div>
<div class="col-12 mb-3">
<label for="newpassword">Password</label>
<input type="password" id="password" name="password" value="admin" placeholder="Password" />
<input type="password" id="password" name="password"
value="<?php if(session()->getTempdata('l_password')) { echo session()->getTempdata('l_password'); }?>" placeholder="Password" />
<span toggle="#password" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div>
</div>
<button class="signin-btn" type="submit">Login</button>
<a href="<?= base_url()."forgot_password"; ?>" class="forget-pwd">Forgot your password?</a>
</form>
</div>
<div class="overlay-container">
<div class="login-overlay">
<div class="overlay-panel overlay-left">
<h1>Welcome Back!</h1>
<p>To keep connected with us please login with your personal info</p>
<button class="login-btn" id="signIn">Sign In</button>
</div>
<div class="overlay-panel overlay-right">
<h1>Hello, Friend!</h1>
<p>Enter your personal details and start playing with us</p>
<button class="login-btn" id="signUp">Sign Up</button>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include 'member_layout/footer.php' ?>
<script>
const signUpButton = document.getElementById('signUp');
const signInButton = document.getElementById('signIn');
const container = document.getElementById('myaccount');
signUpButton.addEventListener('click', () => {
container.classList.add("right-panel-active");
});
signInButton.addEventListener('click', () => {
container.classList.remove("right-panel-active");
});
</script>
<script>
$("#toggle-password").click(function() {
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
}
else {
input.attr("type", "password");
}
});
</script>
</body>
</html>

View File

@ -26,6 +26,14 @@
.parsley-errors-list>li {
color: red !important;
}
.field-icon {
float: right;
margin-left: -35px;
margin-top: 12px;
margin-right: 12px;
position: relative;
z-index: 3;
}
</style>
@ -76,6 +84,7 @@
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"
required class="form-control" name="password">
</div>
<span toggle="#hori-pass1" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div>
<div class="form-group row">
<label for="hori-pass2" class="col-4 col-form-label">Confirm Password
@ -113,7 +122,18 @@
<!-- Right bar overlay-->
<div class="rightbar-overlay"></div>
<script>
$("#toggle-password").click(function() {
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
}
else {
input.attr("type", "password");
}
});
</script>
<!-- Vendor js -->
<script src="<?= base_url()."/public"; ?>/assets/js/vendor.min.js"></script>

View File

@ -1,8 +1,8 @@
<!-- start page title -->
<div class="row">
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Credit points purchase and Transaction Details</h4>
<h4 class="page-title">Transaction Details</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<!-- <li class="breadcrumb-item">
@ -35,11 +35,13 @@
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<thead>
<tr>
<th>Date</th>
<th>Purchased by</th>
<th>Points</th>
<th>Order Id</th>
<th>Order Date</th>
<th>Transaction Id</th>
<th>Cost</th>
<th>Pack / Indidual</th>
<th>Member</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
@ -49,11 +51,20 @@
<?php foreach ($creditsData as $row)
{ ?>
<tr>
<td><?php echo $row['created_at'];?></td>
<td><?php echo $row['order_id'];?></td>
<td><?php $date = new DateTime($row['created_at']); echo $date->format('M-d-Y'); ?></td>
<td><?php echo $row['transaction_id'];?></td>
<td><?php if($row['status'] == 'success'){
echo json_decode($row['transaction'] , true)['payment']['amount_money']['amount'];
}
?></td>
<td><?php echo $row['member_name'];?></td>
<td><?php echo $row['credit_points'];?></td>
<td><?php echo $row['cost'];?></td>
<td><?php echo $row['package_name'];?></td>
<td><?php echo $row['status'];?></td>
<td> <?php if($row['status'] == 'success'){ ?>
<i class="mdi mdi-eye-outline order_details" value="<?php echo $row['order_id'];?>" id="<?php echo $row['member_id'];?>" style="font-size:18px;" title="Order Details"> </i>
<?php } ?>
</td>
</tr>
<?php } ?>
@ -65,4 +76,50 @@
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->
<!-- end row-->
<!-- Modal content for the Large example -->
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">Order Details</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body" id="model-table">
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
$(document).on('click','.order_details',function(){
var member_id = $(this).closest('i').attr('id');
var order_id = $(this).closest('i').attr('value');
$.ajax({
url:"<?= base_url(); ?>/order_details",
method: 'POST',
data: { 'member_id' : member_id , 'order_id' : order_id },
json: true,
success: function(response) {
$('#model-table').html(response);
$('#bs-example-modal-lg').modal('show');
},
error: function(xhr, status, error) {
// Handle the error here
console.error(error);
}
});
});
</script>

View File

@ -50,7 +50,7 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">Name<span class="text-danger">*</span></label>
<div class="col-7">
<input type="text" required class="form-control" name="name" value="<?php if(isset($userList)){echo $userList[0]['name'];} ?>" placeholder="Member Name">
<input type="text" required class="form-control" name="name" value="<?php if(isset($userList)){echo $userList[0]['name'];} ?>" placeholder="User Name">
</div>
</div>
@ -122,7 +122,7 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">State<span class="text-danger"></span></label>
<div class="col-7">
<input type="text" class="form-control" id="state" name="state" value="<?php if(isset($userList)){echo $userList[0]['state'];} ?>" placeholder="State">
<input type="text" class="form-control" id="state" name="state" value="<?php if(isset($userList)){echo $userList[0]['state'];} ?>" placeholder="State" readonly>
</div>
</div>
@ -130,7 +130,7 @@
<div class="form-group row">
<label for="inputEmail3" class="col-4 col-form-label">City<span class="text-danger"></span></label>
<div class="col-7">
<input type="text" class="form-control" id="city" name="city" value="<?php if(isset($userList)){echo $userList[0]['city'];} ?>" placeholder="City">
<input type="text" class="form-control" id="city" name="city" value="<?php if(isset($userList)){echo $userList[0]['city'];} ?>" placeholder="City" readonly>
</div>
</div>

View File

@ -1,3 +1,13 @@
<style>
.field-icon {
float: right;
margin-left: -35px;
margin-top: 10px;
margin-right: 12px;
position: relative;
z-index: 3;
}
</style>
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
@ -40,6 +50,8 @@
title="Must contain at least one number &#013;and one uppercase &#013;and one special character like !@#$%^&*() &#013;and lowercase letter,&#013;and at least 8 or more characters" required
class="form-control" name="password">
</div>
<span toggle="#hori-pass1" id="toggle-password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div>
<div class="form-group row">
<label for="hori-pass2" class="col-4 col-form-label">Confirm<br> Password
@ -72,4 +84,17 @@
<!-- end row -->
</div>
<!-- end container -->
</div>
</div>
<script>
$("#toggle-password").click(function() {
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $($(this).attr("toggle"));
if (input.attr("type") == "password") {
input.attr("type", "text");
}
else {
input.attr("type", "password");
}
});
</script>