2c9e80d2 by Jeff Balicki

clean up

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 43c579a4
1 <?php 1 <?php
2 /* 2 /*
3 * Template Name: badge share 3 * Template Name: Badge share
4 */ 4 */
5 global $wpdb; 5 global $wpdb;
6 6
......
1 <?php 1 <?php
2 /* 2 /*
3 * Template Name: broker notifications archive 3 * Template Name: Broker notifications archive
4 */ 4 */
5 5
6 global $user_ID; 6 global $user_ID;
......
1 <?php
2 /*
3 * Template Name: default
4 */
5
6 get_header("home");
7 ?>
8
9 <div id="homecontent" class="home-content default">
10 <?php if (get_the_post_thumbnail()) { ?>
11 <div class="head-image" style="background-image:url(<?= get_the_post_thumbnail_url() ?>) !important;"></div>
12 <?php } ?>
13 <div class="row">
14 <?php get_template_part('loop', 'page'); ?>
15 </div>
16 </div>
17
18 <div class="modal fade" style='visibility:hidden' id="contact-team-modal" tabindex="-1" role="dialog" aria-labelledby="find-brokerTitle" aria-hidden="true">
19 <div class="modal-dialog modal-lg" role="document">
20 <div class="modal-content">
21 <div class="modal-header">
22 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
23 <span aria-hidden="true">&times;</span>
24 </button>
25 </div>
26 <div class="modal-body">
27 <?php echo do_shortcode('[contact-form-7 id="46927" title="Contact Our Team"]') ?>
28 </div>
29
30 </div>
31 </div>
32 </div>
33
34 <script>
35 jQuery(document).ready(function($) {
36 $('.find-a-broker-modal').on('click', function(e) {
37 e.preventDefault();
38 $('#find-broker-modal').modal('show');
39 });
40 $('.contact-modal').on('click', function(e) {
41 e.preventDefault();
42 $('#contact-team-modal').modal('show');
43 });
44 $('#find-broker-modal').css('visibility',' visible');
45 $('#contact-team-modal').css('visibility',' visible');
46 });
47 </script>
48
49 <?php wp_reset_query(); ?>
50
51 <?php get_footer(); ?>
...\ No newline at end of file ...\ No newline at end of file
...@@ -4,7 +4,6 @@ error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED); ...@@ -4,7 +4,6 @@ error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);
4 @ini_set( 'post_max_size', '64M'); 4 @ini_set( 'post_max_size', '64M');
5 @ini_set( 'max_execution_time', '300' ); 5 @ini_set( 'max_execution_time', '300' );
6 require_once __DIR__ . '/vendor/autoload.php'; 6 require_once __DIR__ . '/vendor/autoload.php';
7 require_once 'simple_html_dom.php';
8 require_once 'inc/users.php'; 7 require_once 'inc/users.php';
9 require_once 'inc/learn.php'; 8 require_once 'inc/learn.php';
10 9
...@@ -14,9 +13,7 @@ function theme_broker_enqueue_scripts() ...@@ -14,9 +13,7 @@ function theme_broker_enqueue_scripts()
14 if ( 13 if (
15 is_page_template("broker_landing_page.php") 14 is_page_template("broker_landing_page.php")
16 || is_page_template("broker_pages.php") 15 || is_page_template("broker_pages.php")
17 || is_page_template("login-page.php")
18 || is_page_template("default.php") 16 || is_page_template("default.php")
19 || is_page_template("general.php")
20 || is_page_template("SearchWpResult.php") 17 || is_page_template("SearchWpResult.php")
21 || is_page_template("SearchWp.php") 18 || is_page_template("SearchWp.php")
22 || is_page_template("broker_notifications_archive.php") 19 || is_page_template("broker_notifications_archive.php")
...@@ -70,10 +67,7 @@ function theme_broker_enqueue_scripts() ...@@ -70,10 +67,7 @@ function theme_broker_enqueue_scripts()
70 67
71 if ( 68 if (
72 is_page_template("broker_landing_page.php") 69 is_page_template("broker_landing_page.php")
73 || is_page_template("login-page.php")
74 || is_page_template("default.php") 70 || is_page_template("default.php")
75 || is_page_template("general.php")
76 || is_page_template("SearchWpResult.php")
77 || is_page_template("broker_notifications_archive.php") 71 || is_page_template("broker_notifications_archive.php")
78 || is_page_template("broker_account_pages.php") 72 || is_page_template("broker_account_pages.php")
79 || get_post_type() == 'notifications' 73 || get_post_type() == 'notifications'
...@@ -89,9 +83,7 @@ function theme_broker_enqueue_scripts() ...@@ -89,9 +83,7 @@ function theme_broker_enqueue_scripts()
89 if ( 83 if (
90 is_page_template("broker_landing_page.php") 84 is_page_template("broker_landing_page.php")
91 || is_page_template("broker_pages.php") 85 || is_page_template("broker_pages.php")
92 || is_page_template("login-page.php")
93 || is_page_template("default.php") 86 || is_page_template("default.php")
94 || is_page_template("general.php")
95 || is_page_template("SearchWpResult.php") 87 || is_page_template("SearchWpResult.php")
96 || is_page_template("SearchWp.php") 88 || is_page_template("SearchWp.php")
97 || is_page_template("broker_notifications_archive.php") 89 || is_page_template("broker_notifications_archive.php")
...@@ -110,9 +102,7 @@ function theme_broker_enqueue_scripts() ...@@ -110,9 +102,7 @@ function theme_broker_enqueue_scripts()
110 if ( 102 if (
111 is_page_template("broker_landing_page.php") 103 is_page_template("broker_landing_page.php")
112 || is_page_template("broker_pages.php") 104 || is_page_template("broker_pages.php")
113 || is_page_template("login-page.php")
114 || is_page_template("default.php") 105 || is_page_template("default.php")
115 || is_page_template("general.php")
116 || is_page_template("SearchWpResult.php") 106 || is_page_template("SearchWpResult.php")
117 || is_page_template("broker_notifications_archive.php") 107 || is_page_template("broker_notifications_archive.php")
118 || is_page_template("broker_account_pages.php") 108 || is_page_template("broker_account_pages.php")
......
...@@ -229,6 +229,7 @@ function badges_shortcode() ...@@ -229,6 +229,7 @@ function badges_shortcode()
229 } 229 }
230 } 230 }
231 echo '</div>'; 231 echo '</div>';
232 //echo '<div id="dialog" style="display:none;"></div>';
232 ?> 233 ?>
233 234
234 <?php 235 <?php
......
1 <?php
2 /*
3 * Template Name: Login Staff Page
4 */
5 ?>
6
7 <?php get_header();?>
8 <div id="page-content">
9 <div id="login-wrap">
10 <div id="container">
11 <?php if (is_user_logged_in()): ?>
12 <?php global $current_user;
13 get_currentuserinfo();
14 ?>
15 <script>
16 window.location.replace("<?php echo home_url('/'); ?>brokers-agents-info/broker-private-page/");
17 </script>
18 <?php else: ?>
19 <h2>Broker Login</h2>
20 <?php $args = array('redirect' => site_url('/broker-private-page'));
21
22 if (isset($_GET['action'])): ?>
23 <div class="success">
24 <p>
25 Your password has been reset. Please check your email for your new password.
26 </p>
27 </div>
28 <?php
29 endif;
30
31 if (isset($_GET['login']) && $_GET['login'] == 'failed_empty') {
32 ?>
33 <div id="login-error">
34 <p>Login failed: You have entered an incorrect username or password. Please try again.</p>
35 </div>
36 <?php
37 }
38 wp_login_form($args);
39
40 ?>
41
42 <?php endif;?>
43 </div>
44 </div>
45 </div>
46 <?php get_footer();?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /*
3 * Template Name: Login Page
4 */
5 ?>
6
7 <?php get_header();?>
8 <div id="page-content">
9 <div id="login-wrap">
10 <div id="container">
11 <?php if (is_user_logged_in()):
12 ?>
13 <script>window.location.replace("<?php echo site_url(); ?>");</script>
14 <?php global $current_user;
15 get_currentuserinfo();
16 ?>
17 <div class="siblings mobile-hide">
18 <?php
19 if ($post->post_parent) {
20 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
21 $titlenamer = get_the_title($post->post_parent);
22 } else {
23 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
24 $titlenamer = get_the_title($post->ID);
25 }
26 if ($children) {?>
27 <ul>
28 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
29 <?php echo $children; ?>
30 </ul>
31 <?php }?>
32 </div>
33 <div class="siblings mobile-show">
34 <?php
35 if ($post->post_parent) {
36 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
37 $titlenamer = get_the_title($post->post_parent);
38 } else {
39 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
40 $titlenamer = get_the_title($post->ID);
41 }
42 if ($children) {?>
43 <ul>
44 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
45 <?php echo $children; ?>
46 </ul>
47 <?php }?>
48 </div>
49 <h2>Welcome <?php echo is_super_admin() ? 'Administrator' : $current_user->user_firstname . ' ' . $current_user->user_lastname; ?></h2>
50 <p><a href="<?php echo wp_logout_url(home_url()); ?>" title="Logout">>> Member Logout</a></p>
51 <?php else: ?>
52 <h2>Broker Login</h2>
53 <?php $args = array('redirect' => site_url());
54
55 if (isset($_GET['action'])): ?>
56 <div class="success">
57 <p>
58 Your password has been reset. Please check your email for your new password.
59 </p>
60 </div>
61 <?php
62 endif;
63
64 if (isset($_GET['login']) && $_GET['login'] == 'failed_empty') {
65 ?>
66 <div id="login-error">
67 <p>Login failed: You have entered an incorrect username or password. Please try again.</p>
68 </div>
69 <?php
70 }
71 wp_login_form($args);
72
73 ?>
74 <br />
75 <a style="margin-left:18px;" href="https://thecommonwell.ca/lost-password/" title="Password Lost and Found">Lost your password</a>
76 <?php endif;?>
77 </div>
78 </div>
79 </div>
80 <?php get_footer();?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /*
3 * Template Name: logout Page
4 */
5 ?>
6
7 <?php get_header(); ?>
8 <div id="page-content">
9 <div id="login-wrap">
10 <div id="container">
11 <?php if (is_user_logged_in()) : ?>
12 <script>
13 window.location.replace("<?php echo wp_logout_url(home_url('/')); ?>");
14 </script>
15 <?php endif; ?>
16 </div>
17 </div>
18 </div>
19 </div>
20 <?php get_footer(); ?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php get_header(); ?>
2 <div id="homepage-content">
3 <header id="page-header">
4 <a href="#" class="mobile-menu-btn" title="mobile-menu-btn">Mobile menu link</a>
5 <div id="front-header">
6 <?php wp_nav_menu(array(
7 'theme_location' => 'main-nav',
8 'container' => 'nav',
9 'container_id' => 'primary-nav',
10 'menu_class' => 'sf-menu',
11 'walker' => new commonwell_walker_nav_menu
12
13 )) ?>
14 <?php wp_nav_menu(array(
15 'theme_location' => 'main-nav',
16 'container' => 'nav',
17 'container_id' => 'primary-nav-mobile',
18 'menu_class' => 'sf-click sf-vertical',
19 'walker' => new commonwell_walker_nav_menu
20 )) ?>
21 <img class="menu-logo-bottom mobile-show"
22 src="<?php bloginfo('template_directory'); ?>/images/ontario-mutuals-logo-143x86.jpg"
23 width="143" height="86" alt="Ontario Mutuals Logo">
24 <div class="mobile-show"><?php wp_nav_menu(array(
25 'theme_location' => 'secondary-nav',
26 'container' => 'nav',
27 'container_id' => 'menu-nav'
28 ))
29 ?>
30 </div>
31 </div>
32 </header>
33 <?php if (has_post_thumbnail($post->ID)): ?>
34 <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full-post-thumbnail');
35 $img_id = get_post_thumbnail_id($post->ID);
36 $alt_text = get_post_meta($img_id, '_wp_attachment_image_alt', true);
37 $header_part_image_mobile = get_field('header_image_mobile');
38
39 $videoEnableValue = get_field('enable_video', $post->ID, true);
40 $enableVideo = !empty($videoEnableValue);
41
42 if($enableVideo) : ?>
43 <?php
44 $videoType = get_field('video_type', $post->ID, true);
45 $videoId = get_field('video_id', $post->ID, true);
46 ?>
47
48 <a href="#" class="video-play-button link-lightbox" data-videoid="<?php echo $videoId; ?>" data-videosite="<?php echo $videoType; ?>">
49 <span class="play-arrow">Play button</span>
50 </a>
51 <div id="home-image">
52 <img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
53 </div>
54 <?php else : ?>
55 <div id="home-image">
56 <img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
57 </div>
58 <?php endif; ?>
59
60 <div class='header-image-mobile'>
61 <img src='<?= (!empty($header_part_image_mobile)) ? $header_part_image_mobile['sizes']['large'] : "" ?>' />
62 </div>
63
64 <div id="transparency-content">
65 <?php the_field('transparency_content'); ?>
66 </div>
67 <?php endif; ?>
68 <!-- For blue menu list (Don't use for now)-->
69 <?php
70 // wp_nav_menu(array(
71 // 'theme_location' => 'main-nav',
72 // 'container' => 'nav',
73 // 'container_id' => 'blue-menu',
74 // 'link_before' => ' [ ',
75 // 'link_after' => ' ] ',
76 // 'menu_class' => 'blue-menu',
77 // 'depth' => 1,
78 // ))
79 ?>
80 </div>
81 <div class="front-page-bottom">
82 <div id="first-page-logo">
83 <a href="<?php bloginfo('url') ?>" title="<?php bloginfo('name') ?> - <?php bloginfo('description') ?>">
84 <img id="frontpage-logo" src="<?php bloginfo('template_directory') ?>/images/Commonwell-logo.svg"
85 width="200" height="80" alt="Commonwell Mutual Insurance Group Logo" />
86 </a>
87 </div>
88 <?php get_template_part('loop', 'home'); ?>
89 </div>
90 <script type="text/javascript">
91 (function($) {
92 $(document).ready(function() {
93 $('.link-lightbox').simpleLightboxVideo();
94 });
95 })(jQuery);
96 </script>
97 <?php //get_sidebar(); ?>
98
99 <?php wp_nav_menu(
100 array(
101 'theme_location' => 'broker-footer',
102 'container' => 'nav',
103 'container_id' => 'broker-footer',
104 )
105 );
106
107 ?>
108 <?php get_footer(); ?>
1 <?php
2 /*
3 * Template Name: Lost Password
4 */
5 ?>
6
7
8 <?php get_header(); ?>
9 <div id="page-content">
10 <div id="login-wrap">
11 <div id="container">
12 <h2>Lost Password</h2>
13 <?php while ( have_posts() ) : the_post(); ?>
14
15
16
17
18 <article id="page-<?php the_ID(); ?>" class="meta-box hentry">
19 <div id="page-login" class="post-content page-login cf">
20
21 <div id="lostPassword">
22 <div id="message"></div>
23 <form id="lostPasswordForm" method="post">
24 <?php
25 // this prevent automated script for unwanted spam
26 if ( function_exists( 'wp_nonce_field' ) )
27 wp_nonce_field( 'rs_user_lost_password_action', 'rs_user_lost_password_nonce' );
28 ?>
29
30 <p>
31 <label for="user_login"><?php _e('Username or E-mail:') ?> <br />
32 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" />
33 </label>
34 </p>
35 <?php
36 /**
37 * Fires inside the lostpassword <form> tags, before the hidden fields.
38 *
39 * @since 2.1.0
40 */
41 do_action( 'lostpassword_form' ); ?>
42 <p class="submit">
43 <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" style="width: 140px !important;" value="<?php esc_attr_e('Get New Password'); ?>" />
44
45 </p>
46 </form>
47 </div>
48
49
50
51
52 </div>
53 </article>
54
55 <?php endwhile; ?>
56
57 </div><!-- .main-column -->
58
59 </div>
60 </div>
61
62
63
64 <?php get_footer(); ?>
1 <?php
2 /*
3 * Template Name: User page and change password
4 */
5
6 global $current_user, $wp_roles;
7 get_currentuserinfo();
8
9 require_once(ABSPATH . WPINC . '/registration.php');
10 /* Get user info. */
11
12 //get_currentuserinfo(); //deprecated since 3.1
13
14 /* Load the registration file. */
15 //require_once( ABSPATH . WPINC . '/registration.php' ); //deprecated since 3.1
16 $error = array();
17 /* If profile was saved, update profile. */
18 if ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == 'update-user') {
19
20 /* Update user password. */
21 if (!empty($_POST['pass1']) && !empty($_POST['pass2'])) {
22 if ($_POST['pass1'] == $_POST['pass2'])
23 wp_update_user(array('ID' => $current_user->ID, 'user_pass' => esc_attr($_POST['pass1'])));
24 else
25 $error[] = __('The passwords you entered do not match. Your password was not updated.', 'profile');
26 }
27
28 /* Update user information. */
29 if (!empty($_POST['url']))
30 wp_update_user(array('ID' => $current_user->ID, 'user_url' => esc_url($_POST['url'])));
31 if (!empty($_POST['email'])) {
32 if (!is_email(esc_attr($_POST['email'])))
33 $error[] = __('The Email you entered is not valid. please try again.', 'profile');
34 elseif (email_exists(esc_attr($_POST['email'])) != $current_user->id)
35 $error[] = __('This email is already used by another user. try a different one.', 'profile');
36 else {
37 wp_update_user(array('ID' => $current_user->ID, 'user_email' => esc_attr($_POST['email'])));
38 }
39 }
40
41 if (!empty($_POST['first-name']))
42 update_user_meta($current_user->ID, 'first_name', esc_attr($_POST['first-name']));
43 if (!empty($_POST['last-name']))
44 update_user_meta($current_user->ID, 'last_name', esc_attr($_POST['last-name']));
45 if (!empty($_POST['description']))
46 update_user_meta($current_user->ID, 'description', esc_attr($_POST['description']));
47
48 /* Redirect so the page will show updated info.*/
49 /*I am not Author of this Code- i dont know why but it worked for me after changing below line to if ( count($error) == 0 ){ */
50 if (count($error) == 0) {
51 //action hook for plugins and extra fields saving
52 do_action('edit_user_profile_update', $current_user->ID);
53 wp_redirect(get_permalink());
54 exit;
55 }
56 }
57 ?>
58
59
60
61
62 <?php get_header(); ?>
63 <div id="page-content">
64 <div id="login-wrap">
65 <div id="container">
66
67 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
68 <div id="post-<?php the_ID(); ?>">
69 <div class="entry-content entry">
70 <?php the_content(); ?>
71 <?php if (!is_user_logged_in()) : ?>
72 <p class="warning">
73 <?php _e('You must be logged in to edit your profile.', 'profile'); ?>
74 </p><!-- .warning -->
75 <?php else : ?>
76 <?php if (count($error) > 0) echo '<p class="error">' . implode("<br />", $error) . '</p>'; ?>
77
78 <div class="siblings mobile-hide">
79 <?php
80 if ($post->post_parent) {
81 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
82 $titlenamer = get_the_title($post->post_parent);
83 } else {
84 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
85 $titlenamer = get_the_title($post->ID);
86 }
87 if ($children) { ?>
88 <ul>
89 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
90 <?php echo $children; ?>
91 </ul>
92 <?php } ?>
93 </div>
94 <div class="siblings mobile-show">
95 <?php
96 if ($post->post_parent) {
97 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->post_parent . "&echo=0");
98 $titlenamer = get_the_title($post->post_parent);
99 } else {
100 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=" . $post->ID . "&echo=0");
101 $titlenamer = get_the_title($post->ID);
102 }
103 if ($children) { ?>
104 <ul>
105 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
106 <?php echo $children; ?>
107 </ul>
108 <?php } ?>
109 </div>
110
111 <h2>Broker Profile</h2>
112
113
114 <form method="post" id="adduser" action="<?php the_permalink(); ?>">
115 <p class="form-username">
116 <label for="first-name"><?php _e('First Name', 'profile'); ?></label>
117 <input class="text-input" name="first-name" type="text" id="first-name" value="<?php the_author_meta('first_name', $current_user->ID); ?>" />
118 </p><!-- .form-username -->
119 <p class="form-username">
120 <label for="last-name"><?php _e('Last Name', 'profile'); ?></label>
121 <input class="text-input" name="last-name" type="text" id="last-name" value="<?php the_author_meta('last_name', $current_user->ID); ?>" />
122 </p><!-- .form-username -->
123 <p class="form-email">
124 <label for="email"><?php _e('E-mail *', 'profile'); ?></label>
125 <input class="text-input" name="email" type="text" id="email" value="<?php the_author_meta('user_email', $current_user->ID); ?>" />
126 </p><!-- .form-email -->
127 <p class="form-url">
128 <label for="url"><?php _e('Website', 'profile'); ?></label>
129 <input class="text-input" name="url" type="text" id="url" value="<?php the_author_meta('user_url', $current_user->ID); ?>" />
130 </p><!-- .form-url -->
131 <p class="form-password">
132 <label for="pass1"><?php _e('Password *', 'profile'); ?> </label>
133 <input class="text-input" name="pass1" type="password" id="pass1" />
134 </p><!-- .form-password -->
135 <p class="form-password">
136 <label for="pass2"><?php _e('Repeat Password *', 'profile'); ?></label>
137 <input class="text-input" name="pass2" type="password" id="pass2" />
138 </p><!-- .form-password -->
139 <p class="form-textarea">
140 <label for="description"><?php _e('Biographical Information', 'profile') ?></label>
141 <textarea name="description" id="description" rows="3" cols="50"><?php the_author_meta('description', $current_user->ID); ?></textarea>
142 </p><!-- .form-textarea -->
143
144 <?php
145 //action hook for plugin and extra fields
146 // do_action('edit_user_profile',$current_user);
147 ?>
148 <p class="form-submit">
149 <?php echo $referer; ?>
150 <p class="submit"><input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update', 'profile'); ?>" /></ <?php wp_nonce_field('update-user') ?> <input name="action" type="hidden" id="action" value="update-user" />
151 </p><!-- .form-submit -->
152 </form><!-- #adduser -->
153 <?php endif; ?>
154 </div><!-- .entry-content -->
155 </div><!-- .hentry .post -->
156 <?php endwhile; ?>
157 <?php else : ?>
158 <p class="no-data">
159 <?php _e('Sorry, no page matched your criteria.', 'profile'); ?>
160 </p><!-- .no-data -->
161 <?php endif; ?>
162
163
164
165 <hr>
166
167 <p><a style="float:right" href="<?php echo wp_logout_url(home_url()); ?>" class="icon-cancel standard-button button-logout">logout</a></p>
168 </div><!-- .entry-content -->
169 </div>
170 </article>
171
172
173
174 </div><!-- .main-column -->
175
176
177
178 <?php get_footer(); ?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /*
3 * Template Name: Default Video
4 */
5 ?>
6 <?php get_header(); ?>
7 <div id="page-content">
8
9 <?php if (has_post_thumbnail($post->ID)): ?>
10 <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full-post-thumbnail');
11 $img_id = get_post_thumbnail_id($post->ID);
12 $alt_text = get_post_meta($img_id, '_wp_attachment_image_alt', true);
13
14 $videoEnableValue = get_field('enable_video', $post->ID, true);
15 $enableVideo = !empty($videoEnableValue);
16 ?>
17
18 <div id="content-image" style='z-index:0;'>
19 <?php if($enableVideo) : ?>
20 <?php
21 $videoType = get_field('video_type', $post->ID, true);
22 $videoId = get_field('video_id', $post->ID, true);
23 ?>
24 <div id="content-image">
25 <a href="#" class="video-play-button page-video-button link-lightbox" data-videoid="<?php echo $videoId; ?>" data-videosite="<?php echo $videoType; ?>">
26 <span class="play-arrow">Play button</span>
27 </a>
28 <img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
29 </div>
30 <?php else : ?>
31 <div id="content-image">
32 <img src="<?php echo $image[0]; ?>" width="1024" height="575" alt="<?php echo $alt_text; ?>" />
33 </div>
34 <?php endif; ?>
35
36 <div id="transparency-content">
37 <?php the_field('transparency_content'); ?>
38 </div>
39 </div>
40 <div id='has-image'>
41 <div class="breadcrumbs">
42 <?php if (function_exists('bcn_display')) {
43 bcn_display();
44 } ?>
45 </div>
46 <?php get_template_part('loop', 'page'); ?>
47 <div class="siblings mobile-show">
48 <?php
49 if($post->post_parent) {
50 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
51 $titlenamer = get_the_title($post->post_parent);
52 }
53 else {
54 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
55 $titlenamer = get_the_title($post->ID);
56 }
57 if ($children) { ?>
58 <ul>
59 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
60 <?php echo $children; ?>
61 </ul>
62 <?php } ?>
63 </div>
64 </div>
65 <?php else : ?>
66 <?php if(is_page('broker-private-page')){?>
67
68 <?php global $userAccessManager;
69 global $wpdb;
70 if (isset($userAccessManager)) {
71 $iUserId = $user_ID;
72 $is_no_bar=false;
73
74 $aUserGroupsForUser = $wpdb->get_results( $wpdb->prepare( "
75 SELECT wp_uam_accessgroup_to_object.object_id, wp_uam_accessgroup_to_object.object_type, wp_uam_accessgroup_to_object.group_id
76 FROM wp_uam_accessgroup_to_object INNER JOIN wp_uam_accessgroups ON wp_uam_accessgroup_to_object.group_id=wp_uam_accessgroups.ID
77 WHERE wp_uam_accessgroups.groupname = '%s' AND wp_uam_accessgroup_to_object.object_id = %d
78 ORDER BY wp_uam_accessgroup_to_object.object_id DESC
79 ",'rating.thecommonwell.ca/auth/authenticate', $iUserId ) );
80
81 //error_log(print_r($aUserGroupsForUser,true));
82
83
84
85 foreach ($aUserGroupsForUser as $oGroup) {
86 // error_log($oGroup);
87 if ($oGroup->group_id =="3"){
88 $is_no_bar=true;
89 }
90 }
91
92 }//end of $userAccessManager
93 if(current_user_can('administrator')){$is_no_bar=true;}
94 if($is_no_bar == true){
95
96 ?>
97 <div class="promer-banner">
98 <div class="promer-text">GIVE “WAVE” A TRY</div>
99 <div class="promer-button"><a href="http://rating.thecommonwell.ca" class="rating-engine-link-button" target="_blank">COMMERCIAL RATING TOOL</a></div>
100 </div>
101 <div id="no-image" class="promer-no-image">
102 <?php } else{?> <div id="no-image"> <?php }
103
104 }else{?>
105 <!-- If there is no image for content page -->
106 <div id="no-image">
107 <?php }//end of broker-private-page?>
108 <div class="siblings mobile-hide">
109 <?php
110 if($post->post_parent) {
111 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
112 $titlenamer = get_the_title($post->post_parent);
113 }
114 else {
115 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
116 $titlenamer = get_the_title($post->ID);
117 }
118 if ($children) { ?>
119 <ul>
120 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
121 <?php echo $children; ?>
122 </ul>
123 <?php } ?>
124 </div>
125 <div class="breadcrumbs">
126 <?php if (function_exists('bcn_display')) {
127 bcn_display();
128 } ?>
129 </div>
130 <?php get_template_part('loop', 'page'); ?>
131 <div class="siblings mobile-show">
132 <?php
133 if($post->post_parent) {
134 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
135 $titlenamer = get_the_title($post->post_parent);
136 }
137 else {
138 $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
139 $titlenamer = get_the_title($post->ID);
140 }
141 if ($children) { ?>
142 <ul>
143 <li class="<?php echo $post->post_parent ? '' : 'current_page_item'; ?>"><a href="<?php echo get_permalink($post->post_parent); ?>"><?php echo $titlenamer; ?></a></li>
144 <?php echo $children; ?>
145 </ul>
146 <?php } ?>
147 </div>
148 </div>
149 <?php endif; ?>
150 <script type="text/javascript">
151 (function($) {
152 $(document).ready(function() {
153 $('.link-lightbox').simpleLightboxVideo();
154 });
155 })(jQuery);
156 </script>
157 </div>
158 <?php //get_sidebar(); ?>
159 <?php get_footer(); ?>
1 <?php
2 /*
3 * Template Name: Password Reset
4 */
5 ?>
6
7
8 <?php get_header(); ?>
9
10 <div id="homecontent" class="home-content">
11 <div id="login-wrap">
12 <div id="container">
13 <h2>Password Reset</h2>
14 <?php while (have_posts()) : the_post(); ?>
15
16
17
18
19 <article id="page-<?php the_ID(); ?>" class="meta-box hentry">
20
21
22
23
24 <div id="resetPassword">
25 <div id="message"></div>
26 <!--this check on the link key and user login/username-->
27 <?php
28 $errors = new WP_Error();
29 $user = check_password_reset_key($_GET['key'], $_GET['login']);
30
31 if (is_wp_error($user)) {
32 if ($user->get_error_code() == 'expired_key')
33 $errors->add(
34 'expiredkey',
35 __('Sorry, this key has expired. To gain access to your account, <a href="https://thecommonwell.ca/lost-password/">request a password reset key.</a>')
36 );
37 else
38 $errors->add('invalidkey', __('Sorry, that key does not appear to be valid.'));
39 }
40
41 // display error message
42 if ($errors->get_error_code()) {
43 echo '<span style="color:red;">' . $errors->get_error_message($errors->get_error_code()) . '</span>';
44 } else {
45 ?>
46
47 <form id="resetPasswordForm" method="post" autocomplete="off">
48 <?php
49 // this prevent automated script for unwanted spam
50 if (function_exists('wp_nonce_field'))
51 wp_nonce_field('rs_user_reset_password_action', 'rs_user_reset_password_nonce');
52 ?>
53
54 <input type="hidden" name="user_key" id="user_key" value="<?php echo esc_attr($_GET['key']); ?>" autocomplete="off" />
55 <input type="hidden" name="user_login" id="user_login" value="<?php echo esc_attr($_GET['login']); ?>" autocomplete="off" />
56
57 <p>
58 <label for="pass1"><?php _e('New password') ?><br />
59 <input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label>
60 </p>
61 <p>
62 <label for="pass2"><?php _e('Confirm new password') ?><br />
63 <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label>
64 </p>
65
66 <p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ &amp; ).'); ?></p>
67
68 <br class="clear" />
69
70 <?php
71 /**
72 * Fires following the 'Strength indicator' meter in the user password reset form.
73 *
74 * @since 3.9.0
75 *
76 * @param WP_User $user User object of the user whose password is being reset.
77 */
78 do_action('resetpass_form', $user);
79 ?>
80 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" />
81
82 </p>
83 <?php } ?>
84 </form>
85 </div>
86
87 </article>
88
89 <?php endwhile; ?>
90
91 </div><!-- .main-column -->
92
93 </div>
94 </div>
95 <style>
96 .error {
97 color: red !important;
98
99 }
100 </style>
101
102
103
104 <?php get_footer(); ?>
...\ No newline at end of file ...\ No newline at end of file
1 <?php 1 <?php
2 /* 2 /*
3 * Template Name: searchwp results template pdf 3 * Template Name: Searchwp results template pdf
4 */ 4 */
5 ?> 5 ?>
6 6
......
...@@ -55,25 +55,14 @@ jQuery(document).ready(function($) { ...@@ -55,25 +55,14 @@ jQuery(document).ready(function($) {
55 } 55 }
56 }); 56 });
57 $(".learning-cards .ugb-card__item .ugb-card__content:empty").parent().addClass('empty').removeClass('ugb--shadow-1'); 57 $(".learning-cards .ugb-card__item .ugb-card__content:empty").parent().addClass('empty').removeClass('ugb--shadow-1');
58 // $('a').on('click', function(e) { 58
59 // if($(e.target).attr('href') == '#') {
60 // e.preventDefault();
61 // }
62 // if(!isMobile) {
63 // if($(this).parents('.menu-item-has-children').length > 0) {
64 // $(this).parents('.menu-item-has-children').addClass('open-menu');
65 // } else {
66 // $('.menu-item-has-children').removeClass('open-menu');
67 // }
68 // }
69 // });
70 59
71 60
72 61
73 $(".badge_container").not('.cert').click(function () { 62 $(".badge_container").not('.cert').click(function () {
74 var title = $(this).data('title'); 63 var title = $(this).data('title');
75 64
76 //$("#dialog").dialog({modal: true, height: 590, width: 1005 }); 65 // $("#dialog").dialog({modal: true, height: 590, width: 1005 });
77 var w = window.open("https://thecommonwell.ca/badge-share/?badge="+title, "popupWindow", "width=400, height=400, scrollbars=no"); 66 var w = window.open("https://thecommonwell.ca/badge-share/?badge="+title, "popupWindow", "width=400, height=400, scrollbars=no");
78 67
79 }); 68 });
......