payment:GWM
This commit is contained in:
commit
a36f884a1f
473
DB/golf.sql
Normal file
473
DB/golf.sql
Normal file
@ -0,0 +1,473 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.0
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Generation Time: May 16, 2023 at 02:05 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(50) 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, 'demo', 1, '', '<p>Hi\n<font color=\"#0000ff\">%to%\n</font><font color=\"#000000\">!</font>\n</p>\n<p><font color=\"#000000\">\n \n \n \n \n \n \n \n \n \n \n \n Thank</font>\n</p>', 'demo@g.com', 'demo', 1, '0000-00-00 00:00:00', '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%'),
|
||||
(2, 1, 'Verify Link', '%link%');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 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$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');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 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, 40, 8, 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');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 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$XJD4E81SQtf7XaHZdCVJa.VA/FL1/4OIsL7ZDR1t7M1QnzQ87jb7K', 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');
|
||||
|
||||
--
|
||||
-- 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=11;
|
||||
|
||||
--
|
||||
-- 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=9;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `email_template_variables`
|
||||
--
|
||||
ALTER TABLE `email_template_variables`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `member`
|
||||
--
|
||||
ALTER TABLE `member`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `member_credits`
|
||||
--
|
||||
ALTER TABLE `member_credits`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
|
||||
|
||||
--
|
||||
-- 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 */;
|
||||
@ -74,6 +74,12 @@ $routes->match(['get','post'],'/user_activate/(:any)','Admin_controller::user_ac
|
||||
$routes->match(['get'],'/transactions_list/(:any)','Admin_controller::transactions_list/$1');
|
||||
$routes->match(['get'],'/transactions_list','Admin_controller::transactions_list');
|
||||
$routes->match(['get','post'],'/user_forgot_password','Admin_controller::user_forgot_password');
|
||||
$routes->match(['get','post'],'/template_list','Admin_controller::template_list');
|
||||
$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');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@ 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;
|
||||
class Admin_controller extends BaseController
|
||||
{
|
||||
public $session;
|
||||
@ -19,6 +21,8 @@ class Admin_controller extends BaseController
|
||||
$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();
|
||||
helper(['form', 'url']);
|
||||
}
|
||||
public function index()
|
||||
@ -49,7 +53,7 @@ class Admin_controller extends BaseController
|
||||
}
|
||||
}else
|
||||
{
|
||||
$this->session->setTempdata('error','sorry Email does not existe',3);
|
||||
$this->session->setTempdata('error','sorry Email does not exist',3);
|
||||
return redirect()->to(base_url()."/admin");
|
||||
}
|
||||
}
|
||||
@ -151,18 +155,14 @@ class Admin_controller extends BaseController
|
||||
|
||||
public function user_deactivate($id = null)
|
||||
{
|
||||
|
||||
$this->UserModel->where('md5(id)', $id )->set(array( 'is_active' => 0))->update();
|
||||
return redirect()->to(base_url()."users_list");
|
||||
|
||||
}
|
||||
|
||||
public function user_activate($id = null)
|
||||
{
|
||||
|
||||
$this->UserModel->where('md5(id)', $id )->set(array( 'is_active' => 1))->update();
|
||||
return redirect()->to(base_url()."users_list");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -285,9 +285,19 @@ class Admin_controller extends BaseController
|
||||
$data = $this->UserModel->where('id', $this->request->getVar('id') )->find();
|
||||
if (password_verify($old_password ,$data[0]['password']))
|
||||
{
|
||||
$this->UserModel->where('id', $this->request->getVar('id') )->set($UserData)->update();
|
||||
$this->session->setTempdata('mail_success',"Password changed successfully",3);
|
||||
return redirect()->to(base_url()."admin");
|
||||
$user_data = $this->UserModel->where('id', $this->request->getVar('id') )->set($UserData)->update();
|
||||
if ($user_data)
|
||||
{
|
||||
$sendmail_controller = new Sendmail_controller();
|
||||
$get_data = $sendmail_controller->index($this->request->getVar('email') , null , 4 );
|
||||
$this->session->setTempdata('mail_success',"Password changed successfully",3);
|
||||
return redirect()->to(base_url()."admin");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->setTempdata('error',"Entered wrong old password",3);
|
||||
return redirect()->to(base_url()."user_password_change");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -298,7 +308,7 @@ class Admin_controller extends BaseController
|
||||
|
||||
$userdata['userdata']=$this->dModel->getLoggedInUserData(session()->get('logged_user'));
|
||||
echo view('layout/header',$userdata);
|
||||
echo view('users_password');
|
||||
echo view('users_password',$userdata);
|
||||
echo view('layout/footer');
|
||||
|
||||
}
|
||||
@ -347,7 +357,8 @@ class Admin_controller extends BaseController
|
||||
if ($user_data)
|
||||
{
|
||||
$otp = rand(1000 , 9999);
|
||||
$this->index($this->request->getVar('email') , $otp , 2 );
|
||||
$sendmail_controller = new Sendmail_controller();
|
||||
$sendmail_controller->index($this->request->getVar('email') , $otp , 2 );
|
||||
$data['status'] = 'success';
|
||||
$data['otp'] = $otp;
|
||||
echo json_encode($data);
|
||||
@ -361,5 +372,85 @@ class Admin_controller extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function template_list()
|
||||
{
|
||||
if($this->request->getmethod() == 'get')
|
||||
{
|
||||
$userdata['template_data'] = $this->MailModel->findAll();
|
||||
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_user'));
|
||||
echo view('layout/header',$userdata);
|
||||
echo view('email_template_list.php');
|
||||
echo view('layout/footer');
|
||||
}
|
||||
}
|
||||
|
||||
public function email_temp()
|
||||
{
|
||||
if($this->request->getmethod() == 'get')
|
||||
{
|
||||
echo view('email.template.php');
|
||||
}
|
||||
else if($this->request->getmethod() == 'post')
|
||||
{
|
||||
$data['name'] = $this->request->getVar('name');
|
||||
$data['to'] = $this->request->getVar('to');
|
||||
$data['subject'] = $this->request->getVar('subject');
|
||||
$data['html'] = $this->request->getVar('code');
|
||||
$data['text'] = $this->request->getVar('text');
|
||||
// $data['type'] = 1;
|
||||
$mail_temp = $this->MailModel->save($data);
|
||||
if ($mail_temp)
|
||||
echo true;
|
||||
else
|
||||
echo false;
|
||||
}
|
||||
}
|
||||
|
||||
public function edit_email_temp($temp_id = null)
|
||||
{
|
||||
if($this->request->getmethod() == 'get')
|
||||
{
|
||||
$temp_data = $this->MailModel->where('md5(id)' , $temp_id)->find();
|
||||
if ($temp_data)
|
||||
{
|
||||
$data['dropdownData'] = $this->VariableModel->where('type' , $temp_data[0]['type'])->findAll();
|
||||
$data['id'] = $temp_data[0]['id'];
|
||||
$data['code'] = $temp_data[0]['html'];
|
||||
$data['name'] = $temp_data[0]['name'];
|
||||
$data['subject'] = $temp_data[0]['subject'];
|
||||
$data['to'] = $temp_data[0]['to'];
|
||||
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_user'));
|
||||
echo view('layout/header',$userdata);
|
||||
echo view("email.template.php" , $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
}
|
||||
else if($this->request->getmethod() == 'post')
|
||||
{
|
||||
$data['name'] = $this->request->getVar('name');
|
||||
$data['to'] = $this->request->getVar('to');
|
||||
$data['subject'] = $this->request->getVar('subject');
|
||||
$data['html'] = $this->request->getVar('code');
|
||||
$data['text'] = $this->request->getVar('text');
|
||||
$mail_temp = $this->MailModel->where('id', $this->request->getVar('id') )->set($data)->update();
|
||||
if ($mail_temp)
|
||||
echo true;
|
||||
else
|
||||
echo false;
|
||||
}
|
||||
}
|
||||
|
||||
public function mail_temp_deactivate($id = null)
|
||||
{
|
||||
$this->MailModel->where('md5(id)', $id )->set(array( 'is_active' => 0))->update();
|
||||
return redirect()->to(base_url()."template_list");
|
||||
}
|
||||
|
||||
public function mail_temp_activate($id = null)
|
||||
{
|
||||
$this->MailModel->where('md5(id)', $id )->set(array( 'is_active' => 1))->update();
|
||||
return redirect()->to(base_url()."template_list");
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
}
|
||||
|
||||
@ -88,13 +88,9 @@ class Member_controller extends BaseController
|
||||
// Generate a random verification code
|
||||
$verification_code = rand(10 , 99 ).rand(10 , 99 ).rand(10 , 99 );
|
||||
$MemberData['verification_code'] = $verification_code;
|
||||
// print_r($MemberData);die();
|
||||
$insert_data = $this->MemberModel->save($MemberData);
|
||||
if($insert_data)
|
||||
{
|
||||
// Send the verification email
|
||||
// return redirect()->to(base_url()."mail/".$this->request->getVar('email')."/".$verification_code);
|
||||
// Send the verification email
|
||||
$sendmail_controller = new Sendmail_controller();
|
||||
$sendmail_controller->index($this->request->getVar('email') , $MemberData['verification_code'] , 1);
|
||||
return redirect()->to(base_url());
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
<?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;
|
||||
|
||||
class Sendmail_controller extends BaseController
|
||||
@ -8,45 +15,136 @@ class Sendmail_controller extends BaseController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->session = session();
|
||||
$this->MemberModel = new Member_model();
|
||||
$this->session = session();
|
||||
$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();
|
||||
helper(['form', 'url']);
|
||||
|
||||
}
|
||||
public function index($to,$code,$return=null)
|
||||
public function index($to,$code,$return)
|
||||
{
|
||||
$email = \Config\Services::email();
|
||||
$email->setFrom('suseendhiran.1702117@srit.org', 'suseendhiran');
|
||||
$email->setTo($to);
|
||||
$email->setTo($to);
|
||||
// login user change passowrd => type 4
|
||||
if($return == 4)
|
||||
{
|
||||
$subject = 'Expire Alert';
|
||||
$message = $code;
|
||||
}
|
||||
else if ($return == 2)
|
||||
{
|
||||
$data['id'] = '2';
|
||||
$data['otp'] = $code;
|
||||
$subject ='Verify your email address';
|
||||
$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";
|
||||
$subject ='Verify your email address';
|
||||
$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');
|
||||
}
|
||||
else
|
||||
// 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)
|
||||
{
|
||||
// $email->setCC('another@another-example.com');
|
||||
// $email->setBCC('them@their-example.com');
|
||||
$user_data = $this->MemberModel->where('email', $to)->find();
|
||||
$data['to'] = $to;
|
||||
$data['code'] = $code;
|
||||
$data['url'] = base_url()."/verify_email/".md5($code);
|
||||
$subject ='Verify your email address';
|
||||
$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');
|
||||
}
|
||||
$email->setSubject($subject);
|
||||
$email->setMessage($message);
|
||||
if ($email->send())
|
||||
{
|
||||
@ -85,10 +183,12 @@ class Sendmail_controller extends BaseController
|
||||
// Show error message
|
||||
echo 'Error in verifying email. Please try again.';
|
||||
}
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show error message
|
||||
echo 'Email already verified.';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
13
app/Models/email_template_model.php
Normal file
13
app/Models/email_template_model.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class Email_template_model extends Model
|
||||
{
|
||||
protected $table = 'email_template';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = ['name','to','html','text', 'type' ,'subject','is_active'];
|
||||
|
||||
|
||||
}
|
||||
13
app/Models/variable_model.php
Normal file
13
app/Models/variable_model.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class Variable_model extends Model
|
||||
{
|
||||
protected $table = 'email_template_variables';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = ['name','variable_name','type'];
|
||||
|
||||
|
||||
}
|
||||
@ -20,6 +20,10 @@
|
||||
<!-- 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">
|
||||
@ -63,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" class="form-control" placeholder="Enter your password">
|
||||
<input type="password" id="password" name="password" value="admin@123A" 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>
|
||||
|
||||
127
app/Views/email.template.php
Normal file
127
app/Views/email.template.php
Normal file
@ -0,0 +1,127 @@
|
||||
<br><br>
|
||||
<div id="wrapper">
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="composemodalTitle">New Template</h5>
|
||||
<button type="button" onClick="history.back()" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body p-3">
|
||||
<form id="form">
|
||||
<div class="form-group">
|
||||
<label for="name-input">Name</label>
|
||||
<input type="text" name="name" class="form-control" id="name" placeholder="Template Name" value='<?php if ($name) { echo $name; }?>' required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="messageto-input">Cc</label>
|
||||
<input type="email" name="to" class="form-control" id="email" placeholder="example@email.com" value='<?php if ($to) { echo $to; }?>' required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="subject-input">Subject</label>
|
||||
<input type="text" name="subject" class="form-control" id="subject" placeholder="your subject" value='<?php if ($subject) { echo $subject; }?>' required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="subject-input">Message</label>
|
||||
<!-- basic summernote-->
|
||||
<div id="summernote-basic"></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!-- ------- -->
|
||||
<div class="modal-body" style="width: 50%;padding: 0rem !important;">
|
||||
<table class="table table-dark table-borderless mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>HTML Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($dropdownData as $key => $value) { ?>
|
||||
<tr>
|
||||
<td><?php echo $value['name']; ?></td>
|
||||
<td><?php echo $value['variable_name']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- ------- -->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" onClick="history.back()" data-dismiss="modal">Close</button>
|
||||
<button type="button" id="data" class="btn btn-primary">Save <i class="fab fa-telegram-plane ml-1"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Right-bar -->
|
||||
<input type="hidden" id="id" value='<?php if ($id) { echo $id; }?>'>
|
||||
<input type="hidden" id="hid" value='<?php if ($code) { echo $code; }?>'>
|
||||
|
||||
<!-- Right bar overlay-->
|
||||
<div class="rightbar-overlay"></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
if ($('#hid').val().length != 0)
|
||||
{
|
||||
setTimeout(() =>
|
||||
{
|
||||
$('.note-placeholder').html('');
|
||||
$('.note-editable > p:first').html($('#hid').val());
|
||||
}, 500);
|
||||
}
|
||||
|
||||
$(document).on('click','#data',function(){
|
||||
$('.btn-codeview').click();
|
||||
var URL;
|
||||
var DATA;
|
||||
if ($('#hid').val().length == 0) {
|
||||
URL = "<?php echo base_url();?>email_temp";
|
||||
DATA = {
|
||||
'name' : $('#name').val() ,
|
||||
'to' : $('#email').val() ,
|
||||
'subject' : $('#subject').val() ,
|
||||
'text' : $('.note-editable > p:first').text() ,
|
||||
'code' : $('.note-codable').val()
|
||||
};
|
||||
}
|
||||
else {
|
||||
URL = "<?php echo base_url();?>edit_email_temp/1";
|
||||
DATA = {
|
||||
'id' : $('#id').val(),
|
||||
'name' : $('#name').val(),
|
||||
'to' : $('#email').val(),
|
||||
'subject' : $('#subject').val(),
|
||||
'text' : $('.note-editable > p:first').text(),
|
||||
'code' : $('.note-codable').val()
|
||||
};
|
||||
}
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: URL,
|
||||
data: DATA,
|
||||
json: true,
|
||||
success: function(response) {
|
||||
if (response == true)
|
||||
{
|
||||
window.location = "<?php echo base_url();?>template_list";
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// var data = $('#form').serialize();
|
||||
// console.log($('.note-editable').text()); // text
|
||||
// console.log($('.note-codable').val()); //code
|
||||
</script>
|
||||
</html>
|
||||
66
app/Views/email_template_list.php
Normal file
66
app/Views/email_template_list.php
Normal file
@ -0,0 +1,66 @@
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Mail Template</h4>
|
||||
<!-- <div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?= base_url() ?>email_temp">
|
||||
<button type="button" class="btn btn-primary waves-effect waves-light">Add</button>
|
||||
</a></li>
|
||||
</ol>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="header-title">Email Content Template</h4>
|
||||
<div class="page-title-right">
|
||||
<!-- <ol class="breadcrumb m-0" >
|
||||
<li class="breadcrumb-item"><a href="<?= base_url() ?>email_temp">
|
||||
<button type="button" class="btn btn-primary waves-effect waves-light">Add</button>
|
||||
</a></li>
|
||||
</ol> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table id="datatable" class="table table-striped dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($template_data as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['name'];?></td>
|
||||
<td>
|
||||
<a href="<?= base_url() ?>edit_email_temp/<?php echo md5($row['id']);?>"><i class="mdi mdi-lead-pencil" style="font-size:18px;"></i></a>
|
||||
<?php if ($row['is_active'] == 1) { ?>
|
||||
<a href="<?= base_url() ?>mail_temp_deactivate/<?php echo md5($row['id']);?>"><i class="mdi mdi-text-box-check-outline" title="Deactivate" style="font-size:18px;"></i></a>
|
||||
<?php } ?>
|
||||
<?php if ($row['is_active'] == 0) { ?>
|
||||
<a href="<?= base_url() ?>mail_temp_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-text-box-remove-outline" title="Activate" style="font-size:18px;"></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
@ -20,6 +20,8 @@
|
||||
<!-- 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" />
|
||||
<!-- jquery -->
|
||||
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> -->
|
||||
|
||||
@ -73,7 +75,7 @@
|
||||
</br>
|
||||
|
||||
<div class="form-group mb-0 text-center" id="re-sub">
|
||||
<button class="btn btn-primary btn-block" type="submit" id="submit1"> Get OTP </button>
|
||||
<button class="btn btn-primary" type="submit" id="submit1"> Get OTP </button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@ -85,9 +85,14 @@
|
||||
|
||||
<!-- Validation init js-->
|
||||
<script src="<?= base_url()."/public"; ?>/assets/js/pages/form-validation.init.js"></script>
|
||||
|
||||
|
||||
|
||||
<!-- Summernote js -->
|
||||
<script src="<?= base_url()."/public"; ?>/assets/libs/summernote/summernote-bs4.min.js"></script>
|
||||
|
||||
<!-- Inbox init -->
|
||||
<script src="<?= base_url()."/public"; ?>/assets/js/pages/inbox.js"></script>
|
||||
|
||||
<script src="<?= base_url()."/public"; ?>/assets/js/pages/email.init.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,10 @@
|
||||
<link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url()."/public"; ?>/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- third party css end -->
|
||||
<link href="<?= base_url()."/public"; ?>/assets/css/style.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- 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>
|
||||
<script>
|
||||
|
||||
@ -105,7 +108,7 @@
|
||||
|
||||
<a href="index.html" class="logo logo-light text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url()."/public"; ?>/assets/images/logo-sm.png" alt="" height="24">
|
||||
<img src="<?= base_url()."/public"; ?>/assets/images/company-logo/golf_logo_2.png" alt="" height="30">
|
||||
</span>
|
||||
<span class="logo-lg">
|
||||
<img src="<?= base_url()."/public"; ?>/assets/images/company-logo/GolfEvolution_White.png" alt="" height="65">
|
||||
@ -154,6 +157,20 @@
|
||||
<span> Transactions </span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#sidebarTables" data-toggle="collapse">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
<span> General Settings </span>
|
||||
<span class="menu-arrow"></span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarTables">
|
||||
<ul class="nav-second-level">
|
||||
<li>
|
||||
<a href="<?= base_url()."template_list"; ?>"><i class="mdi mdi-email-edit-outline"></i> Mail Content Manager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } elseif($userdata->role == 'Coach' ) { ?>
|
||||
|
||||
@ -264,9 +281,9 @@
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
|
||||
<!-- item-->
|
||||
<div class="dropdown-header noti-title">
|
||||
<!-- <div class="dropdown-header noti-title">
|
||||
<h6 class="text-overflow m-0">Welcome !</h6>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- item-->
|
||||
<a href="<?= base_url()."admin_profile/". md5($userdata->id); ?>" class="dropdown-item notify-item">
|
||||
@ -281,16 +298,22 @@
|
||||
</a>
|
||||
|
||||
<!-- item-->
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<!-- <a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-settings-3-line"></i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
</a> -->
|
||||
|
||||
<!-- item-->
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<!-- <a href="<?= base_url()."template_list"; ?>" class="dropdown-item notify-item">
|
||||
<i class="mdi mdi-email-edit-outline"></i>
|
||||
<span>Email Template </span>
|
||||
</a> -->
|
||||
|
||||
<!-- item-->
|
||||
<!-- <a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<i class="ri-wallet-line"></i>
|
||||
<span>My Wallet <span class="badge badge-success float-right">3</span> </span>
|
||||
</a>
|
||||
</a> -->
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
<!-- 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">
|
||||
|
||||
@ -19,6 +19,9 @@
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?= base_url()."/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" />
|
||||
<style>
|
||||
.text-danger {
|
||||
color: red !important;
|
||||
@ -203,7 +206,7 @@ $.ajax({
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
|
||||
Register
|
||||
</button>
|
||||
<button type="reset"
|
||||
<button type="reset" onclick="history.back()"
|
||||
class="btn btn-secondary waves-effect">
|
||||
Cancel
|
||||
</button>
|
||||
|
||||
@ -59,16 +59,17 @@ body {
|
||||
}
|
||||
</style>
|
||||
</br></br>
|
||||
<div class="page-title-box page-title-box-alt" style="margin-top:-50px">
|
||||
<h4 class="page-title">Profile</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?= base_url() ?>user_edit/<?= md5($userList[0]['id']) ?>/profile_edit">
|
||||
<button type="button" class="btn btn-primary waves-effect waves-light">Edit</button>
|
||||
</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body1">
|
||||
<div class="page-title-box page-title-box-alt" style="margin-top:-50px">
|
||||
<h4 class="page-title">Profile</h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?= base_url() ?>user_edit/<?= md5($userList[0]['id']) ?>/profile_edit">
|
||||
<button type="button" class="btn btn-primary waves-effect waves-light">Edit</button>
|
||||
</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-xl-12">
|
||||
<div class="card text-center">
|
||||
@ -80,7 +81,7 @@ body {
|
||||
<div class="profilepic">
|
||||
<!-- <img style="width: 100%;height: 100%; display: block;" src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="Avatar" title="Change the avatar"> -->
|
||||
<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" onchange="onFileInputChange()" type="file" hidden/>
|
||||
<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>
|
||||
@ -91,7 +92,7 @@ body {
|
||||
<div class="profilepic">
|
||||
<!-- <img style="width: 100%;height: 100%; display: block;" src="<?php echo base_url(); ?>/assets/uploads/profile_picture/profile.jpg" alt="Avatar" title="Change the avatar"> -->
|
||||
<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" onchange="onFileInputChange()" type="file" hidden/>
|
||||
<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>
|
||||
@ -130,30 +131,22 @@ body {
|
||||
</div> <!-- end card-box -->
|
||||
</div> <!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var reload = 0;
|
||||
$(".profilepic").one('click',function() {
|
||||
reload = 1;
|
||||
$("#file_profile").trigger("click");
|
||||
});
|
||||
|
||||
$("#file_profile").change(function(){
|
||||
reload = 2;
|
||||
$(".btn-success").click();
|
||||
});
|
||||
|
||||
// $(document).on('change','#file_profile',function(e){
|
||||
// var data = $("#form").serialize();
|
||||
// $.ajax({
|
||||
// type: "post",
|
||||
// url: "<?php echo base_url();?>profilepic_insert",
|
||||
// data: data,
|
||||
// json: true,
|
||||
// success: function(response) {
|
||||
// alert(response)
|
||||
// if (response == true) {
|
||||
// alert("dakug");
|
||||
// }
|
||||
|
||||
// },
|
||||
// error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
||||
// });
|
||||
// });
|
||||
$('.profilepic').hover(function() {
|
||||
if (reload == 1) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
<form method="post" action="<?= base_url()."user_password_change"; ?>" role="form" class="parsley-examples">
|
||||
<input id="id" type="hidden" value="<?= $userdata->id; ?>" name="id">
|
||||
<input id="email" type="hidden" value="<?= $userdata->email; ?>" name="email">
|
||||
|
||||
<?php if(session()->getTempdata('mail_success')):?>
|
||||
<div class="alert alert-success" >
|
||||
@ -36,12 +37,12 @@
|
||||
<label for="hori-pass1" class="col-4 col-form-label">Password<span class="text-danger">*</span></label>
|
||||
<div class="col-7">
|
||||
<input id="hori-pass1" type="password" placeholder="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
|
||||
title="Must contain at least one number 
and one uppercase 
and one special character like !@#$%^&*() 
and lowercase letter,
and at least 8 or more characters" required
|
||||
class="form-control" name="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="hori-pass2" class="col-4 col-form-label">Confirm Password
|
||||
<label for="hori-pass2" class="col-4 col-form-label">Confirm<br> Password
|
||||
<span class="text-danger">*</span></label>
|
||||
<div class="col-7">
|
||||
<input data-parsley-equalto="#hori-pass1" type="password" required
|
||||
|
||||
@ -43,6 +43,9 @@ bgcolor="#f6f6f6">
|
||||
<!-- <img src="<?= base_url()."/public/assets/images/company-logo/GolfEvolution_White.png"; ?> alt="" height="40"> -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- OTP TEMPLATE -->
|
||||
<!-- ############################################################### -->
|
||||
<?php if ($id == 2) { ?>
|
||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||
<td class="content-block"
|
||||
@ -52,14 +55,22 @@ bgcolor="#f6f6f6">
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
|
||||
// USER TEMPLATE
|
||||
// ###################################################################
|
||||
else if ($id == 3) { ?>
|
||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||
<?php if ($html) { ?>
|
||||
<td><?php echo $html ?></td>
|
||||
<?php
|
||||
} else { ?>
|
||||
<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;"
|
||||
valign="top">
|
||||
Please login by clicking the link below.
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<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;"
|
||||
@ -78,10 +89,35 @@ bgcolor="#f6f6f6">
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
|
||||
|
||||
// USER CHANGE PASSWORD TEMPLATE
|
||||
// ###################################################################
|
||||
else if ($id == 4) { ?>
|
||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||
<?php if ($html) { ?>
|
||||
<td><?php echo $html ?></td>
|
||||
<?php
|
||||
} else { ?>
|
||||
<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;"
|
||||
valign="top">
|
||||
Your password changed successfully...
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
// MEMBER TEMPLATE
|
||||
// ###################################################################
|
||||
else
|
||||
{ ?>
|
||||
<div class="html">
|
||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||
<td class="content-block"
|
||||
<?php if ($html) { ?>
|
||||
<td><?php echo $html ?></td>
|
||||
<?php
|
||||
} else { ?>
|
||||
<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;"
|
||||
valign="top">
|
||||
Please confirm your email address by clicking the link below.
|
||||
@ -95,6 +131,8 @@ bgcolor="#f6f6f6">
|
||||
important that we have an accurate email address.
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} ?>
|
||||
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
|
||||
<td class="content-block" itemprop="handler" itemscope
|
||||
itemtype="http://schema.org/HttpActionHandler"
|
||||
@ -104,8 +142,9 @@ bgcolor="#f6f6f6">
|
||||
style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #f1556c; margin: 0; border-color: #f1556c; border-style: solid; border-width: 8px 16px;">
|
||||
Verify Email</a>
|
||||
</td>
|
||||
</tr> <?php
|
||||
} ?>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</div>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user