Commit 9294caaf by Manzar Hussain

gtm and download form

parent 87067f74
......@@ -23,7 +23,8 @@
<th width="20%"><?php echo wp_list_sort($list, $orderby = array("type_of_form"), $order = 'ASC', $preserve_keys = false );?></th>
<th width="20%">Type of Account</th>
<th width="20%">User URl</th>
<th width="20%">Url</th>
<th width="10%">Url</th>
<th width="10%">Type</th>
<th width="5%">Status</th>
<th width="5%">Ordering</th>
<th width="8%">Actions</th>
......@@ -74,6 +75,7 @@
<td><?php echo $print->type_of_account?></td>
<td><a href="<?php echo $print->slug?>">User Url</a></td>
<td><a href="<?php echo $print->download_file_name?>">Check File</a></td>
<td><?php echo $print->type;?></td>
<td><?php echo $status?></td>
<td><?php echo $print->ordering?></td>
<td>
......
......@@ -53,6 +53,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Submit'){
$type_of_form = $_POST['type_of_form'];
$slug = $_POST['slug'];
$ordering = $_POST['ordering'];
$type = $_POST['type'];
if($type_of_form=='Other'){
$type_of_form = $_POST['type_of_form_other'];
}
......@@ -60,7 +61,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Submit'){
$type_of_account = $_POST['type_of_account_other'];
}
$date_time = date('Y-m-d H:i:s');
$data ="INSERT INTO mr_download_form(type_of_account,type_of_form,slug,download_file_name,created_on,ordering) VALUES('$type_of_account','$type_of_form','$slug','$image_url','$date_time','$ordering')";
$data ="INSERT INTO mr_download_form(type,type_of_account,type_of_form,slug,download_file_name,created_on,ordering) VALUES('$type','$type_of_account','$type_of_form','$slug','$image_url','$date_time','$ordering')";
$wpdb->query($data);
echo "<script>location.replace('admin.php?page=list&msg=1');</script>";
}
......@@ -97,6 +98,7 @@ if ($_GET['action']=="status" && isset($_GET['upt'])) {
if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update'){
$id = $_POST['id'];
$type = $_POST['type'];
$type_of_account = $_POST['type_of_account'];
$type_of_form = $_POST['type_of_form'];
$slug = $_POST['slug'];
......@@ -107,7 +109,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update'){
}else{
$image_url = $_POST['image_url'];
}
$update_query = "update mr_download_form set type_of_account ='$type_of_account',type_of_form ='$type_of_form',slug= '$slug',download_file_name ='$image_url',ordering = '$ordering' WHERE id=".$id;
$update_query = "update mr_download_form set type='$type',type_of_account ='$type_of_account',type_of_form ='$type_of_form',slug= '$slug',download_file_name ='$image_url',ordering = '$ordering' WHERE id=".$id;
$wpdb->query($update_query);
echo "<script>location.replace('admin.php?page=list&msg=1');</script>";
......@@ -132,6 +134,18 @@ if(isset($_GET['msg'])){
<table class="form-table">
<form method='post' action='' name='myform' enctype='multipart/form-data'>
<tr class="form-field term-name-wrap">
<th scope="row"><label for="name">Type</label></th>
<td>
<select name="type" id="type" class="postform required">
<option value="">Select Type</option>
<option value="direct">Direct</option>
<option value="Partner">Partner</option>
<option value="Other">Other</option>
</select>
</td>
</tr>
<tr class="form-field term-name-wrap">
<th scope="row"><label for="name">Type of Form</label></th>
<td>
<select name="type_of_form" id="type_of_form" class="postform required">
......@@ -216,6 +230,18 @@ if(isset($_GET['msg'])){
<input type="hidden" name="id" id="id" value="<?php echo $id?>">
<input type="hidden" name="action" id="action" value="update">
<tr class="form-field term-name-wrap">
<th scope="row"><label for="name">Type</label></th>
<td>
<select name="type" id="type" class="postform required">
<option value="">Select Type</option>
<option value="direct">Direct</option>
<option value="distrubuter">Distrubuter</option>
<option value="Other">Other</option>
</select>
</td>
</tr>
<tr class="form-field term-name-wrap">
<th scope="row"><label for="name">Type of Form</label></th>
<td>
<select name="type_of_form" id="type_of_form" required>
......
......@@ -94,6 +94,7 @@
<script src="<?php bloginfo('template_directory'); ?>/js/sticky-kit.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script>
$(document).ready(function(){
$('.team-carousel').owlCarousel({
......@@ -329,6 +330,18 @@ function onScroll(event) {
</script>
<script>
$('#contact_as_btn').on('click', function(){
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event' : 'Contact Us',
'userId' : <?php echo rand(0,1000); ?> //this number must be replaced with an actual User ID
});
})
</script>
<?php wp_footer(); ?>
<!--Footer Ends-->
......
......@@ -16,7 +16,20 @@
gtag('js', new Date());
gtag('config', 'UA-140433658-1');
</script>
<!-- Google Tag Manager -->
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5G25MLH');
</script>
<!-- End Google Tag Manager -->
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/owl.carousel.min.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/owl.theme.default.min.css">
......@@ -36,6 +49,12 @@
</head>
<body <?php body_class(); ?>>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5G25MLH"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="wrapper">
<!--Header Starts-->
<header>
......
<?php
/*
* Template Name: Direct
*/
get_header();
$new_result = $wpdb->get_results("SELECT * FROM mr_download_form WHERE status =1 AND type='direct' order by ordering");
?>
<div id="full-content" class="about-page">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<section style="background-image: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/about-banner-bg.jpg');" class="about-banner-bg">
<div class="container">
<h1 class="page-title-cus">Direct</h1>
</div>
</section>
<div class="container mt-5 ">
<div class="rightColumnContainer bg-white p-5">
<h1>Download Forms</h1>
<div class="right linkz">
<a id="expand-all-overview" href="javascript:void(0);" class="expand-all0">Expand All</a><a id="close-all-overview" href="javascript:void(0);" class="close-all0">Close All</a>
</div>
<div class="answers-content close-all0" id="expand-all0">
<?php
$type_array = array();
$count = 0;
foreach($new_result as $print) {
$type_of_account = $print->type_of_account;
$div_close =0;
if(!in_array($print->type_of_form, $type_array)){
$type_array[] = $type_of_form = $print->type_of_form;
$div_close =1;
?>
<?php
if($div_close==1 && $count > 0){?>
</div>
<?php } ?>
<div class="answers-article accordian clearfix close">
<a id="<?php echo $type_of_form;?>-<?php echo $count;?>" name="<?php echo $type_of_form;?>-<?php echo $count;?>" class="accoropen"></a>
<h2>
<span><?php echo $type_of_form;?></span><i class="icon-angle-up"></i><i class="icon-angle-down"></i>
</h2>
<hr>
<?php
$count++;
} ?>
<div class="main-contentz">
<ul>
<li><a href="<?php echo $print->slug?>" target="_blank"><?php echo $type_of_account;?></a></li>
</ul>
</div>
<?php
} ?>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 mt-5 mb-5">
<h3 class="text-uppercase text-center section-title">Address</h3>
<p class="text-center">Marcellus Investment Managers <br>929, DBS Business Centre, Kanakia Wall Street<br>Andheri-Kurla Road, Andheri – East, Mumbai - 400 093 </p>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<script type="text/javascript">
(function ($) {
$('#expand-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').removeClass('close');
});
$('#close-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').addClass('close');
});
$('.answers-article h2').on('click', function(){
$(this).parents('.answers-article').toggleClass('close');
});
})(jQuery);
</script>
<?php get_footer(); ?>
<?php
/*
* Template Name: Forms Custody Icici
*/
get_header();
$new_result = $wpdb->get_results("SELECT * FROM mr_custody_icici_forms WHERE status =1 order by form_ordering,account_ordering");
?>
<div id="full-content" class="about-page">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<section style="background-image: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/about-banner-bg.jpg');" class="about-banner-bg">
<div class="container">
<h1 class="page-title-cus">ICICI Custody Forms</h1>
</div>
</section>
<div class="container mt-5 ">
<div class="rightColumnContainer bg-white p-5">
<h1>Download Forms</h1>
<div class="right linkz">
<a id="expand-all-overview" href="javascript:void(0);" class="expand-all0">Expand All</a><a id="close-all-overview" href="javascript:void(0);" class="close-all0">Close All</a>
</div>
<div class="answers-content close-all0" id="expand-all0">
<?php
$type_array = array();
$count = 0;
foreach($new_result as $print) {
$type_of_account = $print->type_of_account;
$div_close =0;
if(!in_array($print->type_of_form, $type_array)){
$type_array[] = $type_of_form = $print->type_of_form;
$div_close =1;
?>
<?php
if($div_close==1 && $count > 0){?>
</div>
<?php } ?>
<div class="answers-article accordian clearfix close">
<a id="<?php echo $type_of_form;?>-<?php echo $count;?>" name="<?php echo $type_of_form;?>-<?php echo $count;?>" class="accoropen"></a>
<h2>
<span><?php echo $type_of_form;?></span><i class="icon-angle-up"></i><i class="icon-angle-down"></i>
</h2>
<hr>
<?php
$count++;
} ?>
<div class="main-contentz">
<ul>
<li><a href="<?php echo $print->slug?>" target="_blank"><?php echo $type_of_account;?></a></li>
</ul>
</div>
<?php
} ?>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 mt-5 mb-5">
<h3 class="text-uppercase text-center section-title">Address</h3>
<p class="text-center">Marcellus Investment Managers <br>929, DBS Business Centre, Kanakia Wall Street<br>Andheri-Kurla Road, Andheri – East, Mumbai - 400 093 </p>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<script type="text/javascript">
(function ($) {
$('#expand-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').removeClass('close');
});
$('#close-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').addClass('close');
});
$('.answers-article h2').on('click', function(){
$(this).parents('.answers-article').toggleClass('close');
});
})(jQuery);
</script>
<?php get_footer(); ?>
<?php
/*
* Template Name: Partner
*/
get_header();
$new_result = $wpdb->get_results("SELECT * FROM mr_download_form WHERE status =1 AND type='partner' order by ordering");
?>
<div id="full-content" class="about-page">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<section style="background-image: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/about-banner-bg.jpg');" class="about-banner-bg">
<div class="container">
<h1 class="page-title-cus">Partner</h1>
</div>
</section>
<div class="container mt-5 ">
<div class="rightColumnContainer bg-white p-5">
<h1>Download Forms</h1>
<div class="right linkz">
<a id="expand-all-overview" href="javascript:void(0);" class="expand-all0">Expand All</a><a id="close-all-overview" href="javascript:void(0);" class="close-all0">Close All</a>
</div>
<div class="answers-content close-all0" id="expand-all0">
<?php
$type_array = array();
$count = 0;
foreach($new_result as $print) {
$type_of_account = $print->type_of_account;
$div_close =0;
if(!in_array($print->type_of_form, $type_array)){
$type_array[] = $type_of_form = $print->type_of_form;
$div_close =1;
?>
<?php
if($div_close==1 && $count > 0){?>
</div>
<?php } ?>
<div class="answers-article accordian clearfix close">
<a id="<?php echo $type_of_form;?>-<?php echo $count;?>" name="<?php echo $type_of_form;?>-<?php echo $count;?>" class="accoropen"></a>
<h2>
<span><?php echo $type_of_form;?></span><i class="icon-angle-up"></i><i class="icon-angle-down"></i>
</h2>
<hr>
<?php
$count++;
} ?>
<div class="main-contentz">
<ul>
<li><a href="<?php echo $print->slug?>" target="_blank"><?php echo $type_of_account;?></a></li>
</ul>
</div>
<?php
} ?>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 mt-5 mb-5">
<h3 class="text-uppercase text-center section-title">Address</h3>
<p class="text-center">Marcellus Investment Managers <br>929, DBS Business Centre, Kanakia Wall Street<br>Andheri-Kurla Road, Andheri – East, Mumbai - 400 093 </p>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<script type="text/javascript">
(function ($) {
$('#expand-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').removeClass('close');
});
$('#close-all-overview').on('click', function(e){
e.preventDefault();
$('.answers-content').find('.answers-article').addClass('close');
});
$('.answers-article h2').on('click', function(){
$(this).parents('.answers-article').toggleClass('close');
});
})(jQuery);
</script>
<?php get_footer(); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment