<?php

if (!defined('ABSPATH'))
    die('Restricted Access');

class WPJOBPORTALPostinstallationModel {

    function updateInstallationStatusConfiguration(){
            $flag = get_option('wpjobportal_post_installation');
            if($flag == false){
                add_option( 'wpjobportal_post_installation', '1', '', 'yes' );
            }else{
                update_option( 'wpjobportal_post_installation', '1');
            }
    }

    function storeconfigurations($wpjobportal_data){
        if (empty($wpjobportal_data))
            return false;
        $error = false;
        unset($wpjobportal_data['action']);
        unset($wpjobportal_data['form_request']);
        if($wpjobportal_data['step'] == 0 ){
            update_option("wpjobportal_multiple_employers",$wpjobportal_data['enable_multiple_employers_mode']);
            if($wpjobportal_data['enable_multiple_employers_mode'] == 0){

                $wpjobportal_config_array = array();

                $wpjobportal_config_array['disable_employer'] = 0;// disable employer area
                $wpjobportal_config_array['showemployerlink'] = 0;// disable user to register as employer
                $wpjobportal_config_array['visitor_can_post_job'] = 0;// disbale add job for visitor

                $wpjobportal_config_array['employerview_js_controlpanel'] = 1;// allow admin/employer to view job seeker side
                $wpjobportal_config_array['companyautoapprove'] = 1;// auto approve new company
                $wpjobportal_config_array['jobautoapprove'] = 1;// auto approve new job

                $wpjobportal_config_array['visitor_can_apply_to_job'] = 1;// allow visitor to apply job
                $wpjobportal_config_array['visitor_can_add_resume'] = 1;// allow visitor to add resume


                $wpjobportal_config_array['quick_apply_for_user'] = 1;// enable quick apply for logged in user
                $wpjobportal_config_array['quick_apply_for_visitor'] = 1;// enable quick apply for visitor
                $wpjobportal_config_array['cur_location'] = 0;// hide breadcrumbs



                // un require company field for form job
                $query = "UPDATE `" . wpjobportal::$_db->prefix . "wj_portal_fieldsordering` SET `required` = 0 WHERE `field` = 'company'";
                if (!wpjobportaldb::query($query)) {
                }

                $query = '';
                foreach ($wpjobportal_config_array as $wpjobportal_key => $wpjobportal_value) {
                    $query = "UPDATE `" . wpjobportal::$_db->prefix . "wj_portal_config` SET `configvalue` = '" . esc_sql($wpjobportal_value) . "' WHERE `configname`= '" . esc_sql($wpjobportal_key) . "'";
                    if (!wpjobportaldb::query($query)) {
                        $error = true;
                    }
                }
            }
        }else{
            unset($wpjobportal_data['step']);
            if(isset($wpjobportal_data['enable_multiple_employers_mode'])){
                unset($wpjobportal_data['enable_multiple_employers_mode']);
            }
            foreach ($wpjobportal_data as $wpjobportal_key => $wpjobportal_value) {
                $query = "UPDATE `" . wpjobportal::$_db->prefix . "wj_portal_config` SET `configvalue` = '" . esc_sql($wpjobportal_value) . "' WHERE `configname`= '" . esc_sql($wpjobportal_key) . "'";
                if (!wpjobportaldb::query($query)) {
                    $error = true;
                }
            }

        }
            if ($error)
                return WPJOBPORTAL_SAVE_ERROR;
            else
                return WPJOBPORTAL_SAVED;
    }

    function getConfigurationValues(){
        $this->updateInstallationStatusConfiguration();
        $query = "SELECT configvalue,configname  FROM`" . wpjobportal::$_db->prefix . "wj_portal_config`";
        $wpjobportal_data = wpjobportaldb::get_results($query);
        $wpjobportal_config_array = array();
        foreach ($wpjobportal_data as $wpjobportal_config) {
            if($wpjobportal_config->configname == 'offline'){
                $wpjobportal_config_array['offline']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'title'){
                $wpjobportal_config_array['title']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'adminemailaddress'){
                $wpjobportal_config_array['adminemailaddress']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'mailfromaddress'){
                $wpjobportal_config_array['mailfromaddress']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'system_slug'){
                $wpjobportal_config_array['system_slug']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'disable_employer'){
                $wpjobportal_config_array['disable_employer']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'cur_location'){
                $wpjobportal_config_array['cur_location']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'companyautoapprove'){
                $wpjobportal_config_array['companyautoapprove']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'jobautoapprove'){
                $wpjobportal_config_array['jobautoapprove']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'empautoapprove'){
                $wpjobportal_config_array['empautoapprove']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'newdays'){
                $wpjobportal_config_array['newdays']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'searchjobtag'){
                $wpjobportal_config_array['searchjobtag']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'visitor_can_apply_to_job'){
                $wpjobportal_config_array['visitor_can_apply_to_job']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'visitor_can_post_job'){
                $wpjobportal_config_array['visitor_can_post_job']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'employerview_js_controlpanel'){
                $wpjobportal_config_array['employerview_js_controlpanel']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'data_directory'){
                $wpjobportal_config_array['data_directory']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'date_format'){
                $wpjobportal_config_array['date_format']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'mailfromname'){
                $wpjobportal_config_array['mailfromname']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'showemployerlink'){
                $wpjobportal_config_array['showemployerlink']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'system_have_gold_job'){
                $wpjobportal_config_array['system_have_gold_job']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'system_have_featured_job'){
                $wpjobportal_config_array['system_have_featured_job']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'allow_jobshortlist'){
                $wpjobportal_config_array['allow_jobshortlist']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'allow_tellafriend'){
                $wpjobportal_config_array['allow_tellafriend']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'employer_defaultgroup'){
                $wpjobportal_config_array['employer_defaultgroup']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'jobseeker_defaultgroup'){
                $wpjobportal_config_array['jobseeker_defaultgroup']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'default_pageid'){
                $wpjobportal_config_array['default_pageid']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'allow_search_resume'){
                $wpjobportal_config_array['allow_search_resume']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'defaultaddressdisplaytype'){
                $wpjobportal_config_array['defaultaddressdisplaytype']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'quick_apply_for_user'){
                $wpjobportal_config_array['quick_apply_for_user']=$wpjobportal_config->configvalue;
            }
            if($wpjobportal_config->configname == 'quick_apply_for_visitor'){
                $wpjobportal_config_array['quick_apply_for_visitor']=$wpjobportal_config->configvalue;
            }
        }
        wpjobportal::$_data[0] = $wpjobportal_config_array;

    }

    function installSampleData($wpjobportal_insertsampledata, $wpjobportal_jsmenu,$wpjobportal_empmenu,$wpjobportal_temp_data = 0,$wpjobportal_joblist_menu = 0) {
        $wpjobportal_date = gmdate('Y-m-d H:i:s');
        $wpjobportal_curdate = gmdate('Y-m-d H:i:s');
        $thirdydaydate = gmdate('Y-m-d', strtotime($wpjobportal_curdate. ' + 30 days'));
        $wpjobportal_data_directory = WPJOBPORTALincluder::getJSModel('configuration')->getConfigValue('data_directory');


        if($wpjobportal_jsmenu == 1){
            $query = "SELECT COUNT(ID) FROM ".wpjobportal::$_db->prefix."posts WHERE post_content LIKE '%[wpjobportal_jobseeker_controlpanel]%'";
            $pageexists = wpjobportal::$_db->get_var($query);
            if($pageexists == 0){
                $post = array(
                    'post_name' => 'wp-job-portal-jobseeker-controlpanel',
                    'post_title' => 'Job seeker',
                    'post_status' => 'publish',
                    'post_content' => '[wpjobportal_jobseeker_controlpanel]',
                    'post_type' => 'page'
                );
                $post_ID = wp_insert_post($post);
            }
        }
        if($wpjobportal_empmenu == 1){
            $query = "SELECT COUNT(ID) FROM ".wpjobportal::$_db->prefix."posts WHERE post_content LIKE '%[wpjobportal_employer_controlpanel]%'";
            $pageexists = wpjobportal::$_db->get_var($query);
            if($pageexists == 0){
                $post = array(
                    'post_name' => 'wp-job-portal-employer-controlpanel',
                    'post_title' => 'Employer',
                    'post_status' => 'publish',
                    'post_content' => '[wpjobportal_employer_controlpanel]',
                    'post_type' => 'page'
                );
                $post_ID = wp_insert_post($post);
            }
        }
        if($wpjobportal_joblist_menu == 1){
            $query = "SELECT COUNT(ID) FROM ".wpjobportal::$_db->prefix."posts WHERE post_content LIKE '%[wpjobportal_job]%'";
            $pageexists = wpjobportal::$_db->get_var($query);
            if($pageexists == 0){
                $post = array(
                    'post_name' => 'wp-job-portal-newset-jobs',
                    'post_title' => 'Newest Jobs',
                    'post_status' => 'publish',
                    'post_content' => '[wpjobportal_job]',
                    'post_type' => 'page'
                );
                $post_ID = wp_insert_post($post);
            }
    delete_option( 'wpjobportal_multiple_employers' );
        }
        if ( ! function_exists( 'WP_Filesystem' ) ) {
            require_once ABSPATH . 'wp-admin/includes/file.php';
        }
        global $wp_filesystem;
        if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ) {
            $creds = request_filesystem_credentials( site_url() );
            wp_filesystem( $creds );
        }

        if ($wpjobportal_insertsampledata == 1) {
            // sample images zip
            $basepath = ABSPATH;
            $wp_upload_dir = wp_upload_dir();
            $wpjobportal_url = "https://d3ewuxxxzqg2dd.cloudfront.net/sample_data.zip";
            $filepath = $basepath . "tmp/jp_sample_data.zip";
            if(!function_exists('download_url')){
               do_action('wpjobportal_load_wp_file');
            }

            if($wp_filesystem->exists($basepath.'tmp')){
                $this->recursiveremove($basepath.'tmp');
            }
            if($wp_filesystem->exists($basepath.'tmp')){
                $wp_filesystem->move($basepath.'tmp', $basepath.'tmp-rename');
            }

            $this->makeDir($basepath.'tmp');
            $tmpfile = download_url( $wpjobportal_url);

            if(is_wp_error($tmpfile)){ // to hanlde the case of first url not working
                $wpjobportal_url = "https://wpjobportal-sampledata.s3.amazonaws.com/sample_data.zip";
                $tmpfile = download_url( $wpjobportal_url);
            }

            $wpjobportal_data_directory_path = $wp_upload_dir["basedir"]."/".$wpjobportal_data_directory;
            if(!$wp_filesystem->exists($wpjobportal_data_directory_path)){
                $this->makeDir($wpjobportal_data_directory_path);
            }

            $this->makeDir($basepath.'tmp');

            if(!is_wp_error($tmpfile)){
               // echo "<br>tmpfile: ".$tmpfile;
                //echo "<br>filepath: ".$filepath;
                copy( $tmpfile, $filepath );
                @wp_delete_file( $tmpfile ); // must wp_delete_file afterwards

                if ($wp_filesystem->exists($basepath . "tmp/jp_sample_data.zip")) {
                    do_action('wpjobportal_load_wp_pcl_zip');
                    $archive = new PclZip($basepath . "tmp/jp_sample_data.zip");
                    $v_list = $archive->extract(PCLZIP_OPT_PATH, $wpjobportal_data_directory_path."/");
                }

                // end of sample images code
            }
            $wpjobportal_jobseeker_id = 0;
            $wpjobportal_employer_id = 0;
            $post_jobseeker_id = WPJOBPORTALrequest::getVar('jobseeker_id','post');
            if(isset($post_jobseeker_id) && is_numeric($post_jobseeker_id) && $post_jobseeker_id != 0){

                /* insert new jobseeker */
                $query = "SELECT * FROM `" . wpjobportal::$_db->prefix . "users` where ID= ". $post_jobseeker_id;
                $wpjobportal_jobseeker_data =wpjobportaldb::get_row($query);

                $query = "SELECT id FROM `" . wpjobportal::$_db->prefix . "wj_portal_users` where uid= ". $post_jobseeker_id;
                $wpjobportal_jobseeker_already_exist =wpjobportaldb::get_var($query);
                if(empty($wpjobportal_jobseeker_already_exist)){
                    $wpjobportal_insert_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_users`
                                (id,uid,first_name,roleid,emailaddress,status,created)
                                  VALUES('',".esc_sql($post_jobseeker_id).",'".esc_sql($wpjobportal_jobseeker_data->user_login)."',2,'".esc_sql($wpjobportal_jobseeker_data->user_email)."',1,'".esc_sql($wpjobportal_date)."');";
                    wpjobportaldb::query($wpjobportal_insert_query);
                    $wpjobportal_jobseeker_id = wpjobportal::$_db->insert_id;
                }else{
                    $wpjobportal_jobseeker_id = $wpjobportal_jobseeker_already_exist;
                }
            }
            $post_employer_id = WPJOBPORTALrequest::getVar('employer_id','post');
            if(isset($post_employer_id) && is_numeric($post_employer_id) && $post_employer_id != 0){

                /* insert new employer */
                $query = "SELECT * FROM `" . wpjobportal::$_db->prefix . "users` where ID= ". $post_employer_id;
                $wpjobportal_employer_data =wpjobportaldb::get_row($query);

                $query = "SELECT id FROM `" . wpjobportal::$_db->prefix . "wj_portal_users` where uid= ". $post_employer_id;
                $wpjobportal_employer_already_exist =wpjobportaldb::get_var($query);
                if(empty($wpjobportal_employer_already_exist)){
                    $wpjobportal_insert_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_users`
                                (id,uid,first_name,roleid,emailaddress,status,created)
                                  VALUES('',".$post_employer_id.",'". esc_sql($wpjobportal_employer_data->user_login) ."',1,'". esc_sql($wpjobportal_employer_data->user_email) ."',1,'".esc_sql($wpjobportal_date)."');";
                    wpjobportaldb::query($wpjobportal_insert_query);
                    $wpjobportal_employer_id = wpjobportal::$_db->insert_id;
                }else{
                    $wpjobportal_employer_id = $wpjobportal_employer_already_exist;
                }
            }

            /**
            *@param wp job portal
            * * Sample Data Company
            */
            // For feature vehicle addons
            $wpjobportal_isfeaturedcompany = 0;
            $wpjobportal_startfeatureddate = "0000-00-00 00:00:00";
            $wpjobportal_endfeatureddate = "0000-00-00 00:00:00";
            if(in_array('featuredcompany', wpjobportal::$_active_addons)){
               $wpjobportal_isfeaturedcompany = 1;
               $wpjobportal_startfeatureddate = gmdate("Y-m-d H:i:s");
               $wpjobportal_endfeatureddate = gmdate("Y-m-d H:i:s", strtotime("+12 months"));
            }

            //if($wpjobportal_employer_id > 0 && is_numeric($wpjobportal_employer_id)){
            if(is_numeric($wpjobportal_employer_id)){

                //  first company
                $cityid = '33';// cityids for companies
                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ( '".esc_sql($wpjobportal_employer_id) ."', 'Buruj Solution', 'buruj-solution', 'http://www.burujsolutions.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sampledata@info.com', '<p>We aligns itself with modern and advanced concepts in IT industry to help its customers by providing value added software. We performs thorough research on each given problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid', 'WAPDA Town, Gujranwala ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid = wpjobportal::$_db->insert_id;
                    // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x1")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x1",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid);
                //Cities
                 $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid) . ", " . esc_sql($cityid) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);

                //  Second Company
                $cityid1 = '36';// cityids for companies

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Joom Sky', 'joom-sky', 'http://www.joomsky.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sampledata@joomsky.com', '<p>We aligns itself with modern and advanced concepts in IT industry to help its customers by providing value added software. We performs thorough research on each given problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid1', 'WAPDA Town, Gujranwala ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid1 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x2")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x2",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid1);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid1) . ", " . esc_sql($cityid1) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);


                //Third Company
                $cityid2 = '483';// cityids for companies

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Joom Shark', 'joom-shark', 'http://www.joomshark.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample@joomshark.com', '<p>We aligns itself with modern and advanced concepts in IT industry to help its customers by providing value added software. We performs thorough research on each given problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid2', 'WAPDA Town, Gujranwala ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedcompany."', '".$wpjobportal_startfeatureddate."', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid2 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x3")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x3",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid2);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid2) . ", " . esc_sql($cityid2) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);


                //  Fourth Company
                $cityid3 = '880';// cityids for companies

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ( '".esc_sql($wpjobportal_employer_id) ."', 'Sample Company', 'sample-company', 'http://www.sample.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample@sample.com', '<p>We perform thorough research on each given problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid3', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid3 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x4")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x4",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid3);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid3) . ", " . esc_sql($cityid3) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);

                //Fifth Company
                $cityid4 = '837';

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Sample Company 1', 'sample-company-1', 'http://www.sample1.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample1@sample1.com', '<p>We perform thorough research on each given problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid4', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid4 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x5")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x5",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid4);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid4) . ", " . esc_sql($cityid4) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);


                //Sixth  Company
                $cityid5 = '1329';
                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` ( `uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Sample Company 2', 'sample-company-2', 'http://www.sample2.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample2@2sample.com', '<p>problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid5', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedcompany."', '".$wpjobportal_startfeatureddate."', '[]', '', 0)";

                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid5 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x6")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x6",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid5);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)VALUES( " . esc_sql($wpjobportal_companyid5) . ", " . esc_sql($cityid5) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);



                //Seventh Company
                $cityid6 = '857';

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` (`uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Sample Company 3', 'sample-company-3', 'http://www.sample3.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample3@3sample.com', '<p>problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid6', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid6 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x7")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x7",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid6);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid6) . ", " . esc_sql($cityid6) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);

                //Eight Company
                 $cityid7 = '872';

                 $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` (`uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Sample Company 4', 'sample-company-4', 'http://www.sample.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample4@4sample.com', '<p>problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid7', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$thirdydaydate."', 2, '0000-00-00 00:00:00', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid7 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x8")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x8",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid7);

                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid7) . ", " . esc_sql($cityid7) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);

                //Ninth Company
                $cityid8 = '5';

                $wpjobportal_insert_company = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companies` (`uid`, `name`, `alias`, `url`, `logofilename`, `logoisfile`, `logo`, `smalllogofilename`, `smalllogoisfile`, `smalllogo`, `tagline`, `contactemail`, `description`, `city`, `address1`, `address2`, `created`, `modified`, `hits`, `metadescription`, `metakeywords`, `status`, `userpackageid`, `price`, `isgoldcompany`, `startgolddate`, `endgolddate`, `endfeatureddate`, `isfeaturedcompany`, `startfeatureddate`, `params`, `serverstatus`, `serverid`) VALUES
                    ('".esc_sql($wpjobportal_employer_id) ."', 'Sample Company 5', 'sample-company-5', 'http://www.sample5.com', 'default-logo.png', 1, '', '', 0, '', 'We are the Best', 'sample5@5sample.com', '<p>problem and advises its customers on how their business growth aims can be achieved by the implementation of a specific and research-based software solution</p>\n', '$cityid8', 'some streest in some city ', '', '".$wpjobportal_curdate."', '".$wpjobportal_curdate."', 0, NULL, NULL, 1, 0, 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedcompany."', '".$wpjobportal_startfeatureddate."', '[]', '', 0)
                    ";
                wpjobportaldb::query($wpjobportal_insert_company);
                $wpjobportal_companyid8 = wpjobportal::$_db->insert_id;
                // logo handling
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x9")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_x9",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/employer/comp_".$wpjobportal_companyid8);
                $wpjobportal_insert_companycity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_companycities` (`companyid`, `cityid`)
                VALUES( " . esc_sql($wpjobportal_companyid8) . ", " . esc_sql($cityid8) . ");";
                wpjobportaldb::query($wpjobportal_insert_companycity);

                /**
                *@param wp job portal
                * * Sample Data For job
                */


                //First  JOB
                $wpjobportal_isfeaturedjob = 2;
                $wpjobportal_startfeatureddate = "0000-00-00 00:00:00";
                $wpjobportal_endfeatureddate = "0000-00-00 00:00:00";
                if(in_array('featuredjob', wpjobportal::$_active_addons)){
                    $wpjobportal_isfeaturedjob = 1;
                    $wpjobportal_startfeatureddate = gmdate("Y-m-d H:i:s");
                    $wpjobportal_endfeatureddate = gmdate("Y-m-d H:i:s", strtotime("+12 months"));
                }

                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `is_urgent`) VALUES
                    ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid)."', 'PHP Developer', 'php-developer', '13', 1, 2, 0, '<p>Responsibilities</p>\n<p>Work closely with Project Managers and other members of the Development Team to both develop detailed specification documents with clear project deliverables and timelines, and to ensure timely completion of deliverables.<br />\nProduce project estimates during sales process, including expertise required, total number of people required, total number of development hours required, etc.<br />\nAttend client meetings during the sales process and during development.<br />\nWork with clients and Project Managers to build and refine graphic designs for websites. Must have strong skills in Photoshop, Fireworks, or equivalent application(s).<br />\nConvert raw images and layouts from a graphic designer into CSS/XHTML themes.<br />\nDetermine appropriate architecture, and other technical solutions, and make relevant recommendations to clients.<br />\nCommunicate to the Project Manager with efficiency and accuracy any progress and/or delays. Engage in outside-the-box thinking to provide high value-of-service to clients.<br />\nAlert colleagues to emerging technologies or applications and the opportunities to integrate them into operations and activities.<br />\nBe actively involved in and contribute regularly to the development community of the CMS of your choice.<br />\nDevelop innovative, reusable Web-based tools for activism and community building.</p>\n', '', '', '', '', '".$cityid."', '', '', '', '', '', '', '', 0, 2, '', '3 Month', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 0, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 3, '', 0, '$', 'qgk6BtRM8', '67.0099388', '24.8614622', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_startfeatureddate."', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedjob."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 3, 1000, 1500, 2, 0, 0, 'PHP Developer Buruj Solution Computer/IT Full-Time Interviewing 1,000 - 1,500 $ Per Month Entry Level Santa Barbara, California, United States 3 Month', 'PHP Developer Buruj Solution Computer/IT Full-Time Interviewing 1,000 - 1,500 $ Per Month Entry Level Santa Barbara, California, United States 3 Month<p>Responsibilities</p>',1);
                    ";
                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid);



                //Second job
                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `workplace_type`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid1)."', 'Android Developer', 'android-developer', '13', 1, 3, 0, '<p>Games developers are involved in the creation and production of games for personal computers, games consoles, social/online games, arcade games, tablets, mobile phones and other hand held devices. Their work involves either design (including art and animation) or programming.</p>\n<p>Games development is a fast-moving, multi-billion pound industry. The making of a game from concept to finished product can take up to three years and involve teams of up to 200 professionals.</p>\n<p>There are many stages, including creating and designing a game&#8217;s look and how it plays, animating characters and objects, creating audio, programming, localisation, testing and producing.</p>\n<p>The games developer job title covers a broad area of work and there are many specialisms within the industry. These include:</p>\n<p>quality assurance tester;<br />\nprogrammer, with various specialisms such as network, engine, toolchain and artificial intelligence;<br />\naudio engineer;<br />\nartist, including concept artist, animator and 3D modeller;<br />\nproducer;<br />\neditor;<br />\ndesigner;<br />\nspecial effects technician.</p>\n', '', '', '', '', '".$cityid1."', '', '', '', '', '', '', '', 0, 3, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 0, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 3, '', 0, '$', 'CKd6@8JQw', '73.0791073', '31.4187142', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 3, 2500, 3000, 2, 0, 0, 'Android Developer Joom Sky Computer/IT Full-Time Closed to New Applicants 2,500 - 3,000 $ Per Month Entry Level Ventura, California, United States', 'Android Developer Joom Sky Computer/IT Full-Time Closed to New Applicants 2,500 - 3,000 $ Per Month Entry Level Ventura, California, United States<p>Games developers are involved in the creation and production of games for personal computers, games consoles, social/online games, arcade games, tablets, mobile phones and other hand held devices. Their work involves either design (including art and animation) or programming.</p>',1);

                    ";

                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid1);


                // Third Job
                $wpjobportal_insert_job = " INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid2)."', 'Accountant', 'accountant', '13', 1, 3, 0, '<ul>\n<li>Accountant Job Duties:</li>\n<li>Prepares asset, liability, and capital account entries by compiling and analyzing account information.<br />\nDocuments financial transactions by entering account information.<br />\nRecommends financial actions by analyzing accounting options.<br />\nSummarizes current financial status by collecting information; preparing balance sheet, profit and loss statement, and other reports.<br />\nSubstantiates financial transactions by auditing documents.<br />\nMaintains accounting controls by preparing and recommending policies and procedures.<br />\nGuides accounting clerical staff by coordinating activities and answering questions.<br />\nReconciles financial discrepancies by collecting and analyzing account information.<br />\nSecures financial information by completing data base backups.<br />\nMaintains financial security by following internal controls.<br />\nPrepares payments by verifying documentation, and requesting disbursements.<br />\nAnswers accounting procedure questions by researching and interpreting accounting policy and regulations.<br />\nComplies with federal, state, and local financial legal requirements by studying existing and new legislation, enforcing adherence to requirements, and advising management on needed actions.<br />\nPrepares special financial reports by collecting, analyzing, and summarizing account information and trends.<br />\nMaintains customer confidence and protects operations by keeping financial information confidential.<br />\nMaintains professional and technical knowledge by attending educational workshops; reviewing professional publications; establishing personal networks; participating in professional societies.<br />\nAccomplishes the result by performing the duty.<br />\nContributes to team effort by accomplishing related results as needed.</li>\n</ul>\n', '', '', '', '', '".$cityid2."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 0, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'CA', 3, '', 0, '$', 'pmX6r!W27', '73.0931461', '33.7293882', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 3, 4000, 4500, 2, 0, 0, 'Accountant Joom Shark Computer/IT Full-Time Closed to New Applicants 4,000 - 4,500 $ Per Month Entry Level Leona, Kansas, United States', 'Accountant Joom Shark Computer/IT Full-Time Closed to New Applicants 4,000 - 4,500 $ Per Month Entry Level Leona, Kansas, United States<ul>');";
                            wpjobportaldb::query($wpjobportal_insert_job);
                            $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                            $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid2);


                //4th job
                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `workplace_type`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid3)."', 'Senior Software Engineer', 'senior-software-engineer', '13', 1, 2, 0, '<ul>\n<li>You might be responsible for the replacement of a whole system based on the specifications provided by an IT analyst but often you&#8217;ll work with &#8216;off the shelf&#8217; software, modifying it and integrating it into the existing network. The skill in this is creating the code to link the systems together.</li>\n<li>You&#8217;ll also be responsible for:</li>\n<li>Reviewing current systems<br />\nPresenting ideas for system improvements, including cost proposals<br />\nWorking closely with analysts, designers and staff<br />\nProducing detailed specifications and writing the programme codes<br />\nTesting the product in controlled, real situations before going live<br />\nPreparation of training manuals for users<br />\nMaintaining the systems once they are up and running</li>\n</ul>\n', '', '', '', '', '".$cityid3."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'CNQ83Jrgm', '74.3833333', '31.5166667', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0, 'Senior Software Engineer Sample Company Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Sheboygan, Wisconsin, United States', 'Senior Software Engineer Sample Company Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Sheboygan, Wisconsin, United States<ul><li>You might be responsible for the replacement of a whole system based on the specifications provided by an IT analyst but often you&#8217;ll work with &#8216;off the shelf&#8217; software, modifying it and integrating it into the existing network. The skill in this is creating the code to link the systems together.</li><li>You&#8217;ll also be responsible for:</li><li>Reviewing current systems<br />Presenting ideas for system improvements, including cost proposals<br />Working closely with analysts, designers and staff<br />Producing detailed specifications and writing the programme codes<br />Testing the product in controlled, real situations before going live<br />Preparation of training manuals for users<br />Maintaining the systems once they are up and running</li></ul> 05/23/2025 06/22/2025 ',2);
                        ";

                 wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid3);

                //5th job

                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `is_urgent`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid4)."', 'Web Designer Engineer', 'web-designer', '13', 1, 2, 0, '<p>An associates degree program related to web design, such as an Associate of Applied Science in Web Graphic Design, provides a student with a foundation in the design and technical aspects of creating a website. Students learn web design skills and build professional portfolios that highlight their skills and abilities. Common topics include:</p>\r\n<ul>\r\n<li>Fundamentals of design imaging</li>\r\n<li>Basic web design</li>\r\n<li>Animation</li>\r\n<li>Multimedia design</li>\r\n<li>Content management</li>\r\n<li>Editing for video and audio</li>\r\n<li>Multimedia programming and technology</li>\r\n</ul>\r\n<p>A bachelors degree program in multimedia or web design allows students to learn advanced skills needed for professional web design. Students develop artistic and creative abilities in addition to technical skills. Degree programs, such as a Bachelor of Science in Web Design and Interactive Media, cover:</p>\r\n<ul>\r\n<li>Databases</li>\r\n<li>Webpage scripting</li>\r\n<li>Programming</li>\r\n<li>Digital imaging</li>\r\n<li>Multimedia design</li>\r\n<li>Web development</li>\r\n</ul>', '', '', '', '', '".$cityid4."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'JZH6Nz2cm', '73.06137450000006', '33.697006', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_startfeatureddate."', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedjob."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0, 'Web Designer Engineer Sample Company 1 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Danville, Virginia, United States', 'Web Designer Engineer Sample Company 1 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Danville, Virginia, United States<p>An associates degree program related to web design, such as an Associate of Applied Science in Web Graphic Design, provides a student with a foundation in the design and technical aspects of creating a website. Students learn web design skills and build professional portfolios that highlight their skills and abilities. Common topics include:</p>', 1);
                        ";
                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid4);



                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid5)."', 'WP Developer', 'wp-developer', '13', 1, 2, 0, '<ul>\n<li>You might be responsible for the replacement of a whole system based on the specifications provided by an IT analyst but often you&#8217;ll work with &#8216;off the shelf&#8217; software, modifying it and integrating it into the existing network. The skill in this is creating the code to link the systems together.</li>\n<li>You&#8217;ll also be responsible for:</li>\n<li>Reviewing current systems<br />\nPresenting ideas for system improvements, including cost proposals<br />\nWorking closely with analysts, designers and staff<br />\nProducing detailed specifications and writing the programme codes<br />\nTesting the product in controlled, real situations before going live<br />\nPreparation of training manuals for users<br />\nMaintaining the systems once they are up and running</li>\n</ul>\n', '', '', '', '', '".$cityid5."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'CNQ83Jrgm', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0, 'WP Developer Sample Company 2 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Laconia, New Hampshire, United States', 'WP Developer Sample Company 2 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Laconia, New Hampshire, United States<ul>');
                        ";



                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid5);


                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid6)."', 'Senior Web Developer', 'senior-web-developer', '13', 1, 2, 0, '<ul>\n<li>You might be responsible for the replacement of a whole system based on the specifications provided by an IT analyst but often you&#8217;ll work with &#8216;off the shelf&#8217; software, modifying it and integrating it into the existing network. The skill in this is creating the code to link the systems together.</li>\n<li>You&#8217;ll also be responsible for:</li>\n<li>Reviewing current systems<br />\nPresenting ideas for system improvements, including cost proposals<br />\nWorking closely with analysts, designers and staff<br />\nProducing detailed specifications and writing the programme codes<br />\nTesting the product in controlled, real situations before going live<br />\nPreparation of training manuals for users<br />\nMaintaining the systems once they are up and running</li>\n</ul>\n', '', '', '', '', '".$cityid6."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'JZH6Nz2cm', '73.06137450000006', '33.697006', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_startfeatureddate."', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedjob."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0, 'Senior Web Developer Sample Company 3 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Elgin, Illinois, United States', 'Senior Web Developer Sample Company 3 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Elgin, Illinois, United States<ul>');
                        ";
                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid6);


                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `workplace_type`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid7)."', 'Junior PHP Developer', 'junior-php-developer', '13', 1, 2, 0, '<ul>\n<li>You might be responsible for the replacement of a whole system based on the specifications provided by an IT analyst but often you&#8217;ll work with &#8216;off the shelf&#8217; software, modifying it and integrating it into the existing network. The skill in this is creating the code to link the systems together.</li>\n<li>You&#8217;ll also be responsible for:</li>\n<li>Reviewing current systems<br />\nPresenting ideas for system improvements, including cost proposals<br />\nWorking closely with analysts, designers and staff<br />\nProducing detailed specifications and writing the programme codes<br />\nTesting the product in controlled, real situations before going live<br />\nPreparation of training manuals for users<br />\nMaintaining the systems once they are up and running</li>\n</ul>\n', '', '', '', '', '".$cityid7."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'JZH6Nz2cm', '73.06137450000006', '33.697006', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '".$wpjobportal_startfeatureddate."', '".$wpjobportal_endfeatureddate."', '".$wpjobportal_isfeaturedjob."', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0, 'Junior PHP Developer Sample Company 4 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Rockford, Illinois, United States', 'Junior PHP Developer Sample Company 4 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) Rockford, Illinois, United States<ul>',3);";
                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid7);


                $wpjobportal_insert_job = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobs` (`uid`, `companyid`, `title`, `alias`, `jobcategory`, `jobtype`, `jobstatus`, `hidesalaryrange`, `description`, `qualifications`, `prefferdskills`, `applyinfo`, `company`, `city`, `zipcode`, `address1`, `address2`, `companyurl`, `contactname`, `contactphone`, `contactemail`, `showcontact`, `noofjobs`, `reference`, `duration`, `heighestfinisheducation`, `created`, `created_by`, `modified`, `modified_by`, `hits`, `experience`, `startpublishing`, `stoppublishing`, `departmentid`, `sendemail`, `metadescription`, `metakeywords`, `ordering`, `aboutjobfile`, `status`, `educationid`, `degreetitle`, `careerlevel`, `map`, `subcategoryid`, `currency`, `jobid`, `longitude`, `latitude`, `isgoldjob`, `startgolddate`, `endgolddate`, `startfeatureddate`, `endfeatureddate`, `isfeaturedjob`, `raf_gender`, `raf_degreelevel`, `raf_experience`, `raf_age`, `raf_education`, `raf_category`, `raf_subcategory`, `raf_location`, `jobapplylink`, `joblink`, `params`, `serverstatus`, `serverid`, `tags`, `salarytype`, `salarymin`, `salarymax`, `salaryduration`, `userpackageid`, `price`, `aijobsearchtext`, `aijobsearchdescription`, `is_urgent`) VALUES
                        ('".$wpjobportal_employer_id."', '".esc_sql($wpjobportal_companyid8)."', 'Junior Andriod Developer', 'junior-games-developer', '13', 1, 2, 0, '<p>Games developers are involved in the creation and production of games for personal computers, games consoles, social/online games, arcade games, tablets, mobile phones and other hand held devices. Their work involves either design (including art and animation) or programming.</p>\r\n<p>Games development is a fast-moving, multi-billion pound industry. The making of a game from concept to finished product can take up to three years and involve teams of up to 200 professionals.</p>\r\n<p>There are many stages, including creating and designing a games look and how it plays, animating characters and objects, creating audio, programming, localisation, testing and producing.</p>\r\n<p>The games developer job title covers a broad area of work and there are many specialisms within the industry. These include:</p>\r\n<ul>\r\n<li>quality assurance tester;</li>\r\n<li>programmer, with various specialisms such as network, engine, toolchain and artificial intelligence;</li>\r\n<li>audio engineer;</li>\r\n<li>artist, including concept artist, animator and 3D modeller;</li>\r\n<li>producer;</li>\r\n<li>editor;</li>\r\n<li>designer;</li>\r\n<li>special effects technician.</li>\r\n</ul>', '', '', '', '', '".$cityid8."', '', '', '', '', '', '', '', 0, 1, '', '', '', '".$wpjobportal_curdate."', 0, '0000-00-00 00:00:00', 0, 5, 0, '".$wpjobportal_curdate."', '".$thirdydaydate."', '', 0, '', '', 0, '', 1, NULL, 'BSCS', 4, '', 0, '$', 'JZH6Nz2cm', '73.06137450000006', '33.697006', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '[]', '', 0, '', 2, 4500, 4500, 2, 0, 0,'Junior Andriod Developer Sample Company 5 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) El Cajon, California, United States', 'Junior Andriod Developer Sample Company 5 Computer/IT Full-Time Interviewing 4,500 $ Per Month Experienced (Non-Manager) El Cajon, California, United States<p>Games developers are involved in the creation and production of games for personal computers, games consoles, social/online games, arcade games, tablets, mobile phones and other hand held devices. Their work involves either design (including art and animation) or programming.</p>',1);";

                wpjobportaldb::query($wpjobportal_insert_job);
                $wpjobportal_jobid = wpjobportal::$_db->insert_id;
                $wpjobportal_insetjobcities = $this->insertJobCities($wpjobportal_jobid, $cityid8);
            }

            //if($wpjobportal_jobseeker_id > 0){
            if($wpjobportal_jobseeker_id >= 0){

                /**
                  * @param wp job portal
                  * * Sample Data * *
                  * * * Resume  * * *
                  */

                $cityid = '33';// cityids for resume
                $cityid1 = '36';// cityids for resume
                $cityid2 = '483';// cityids for resume
                $cityid3 = '880';// cityids for resume
                $cityid4 = '837';// cityids for resume
                $cityid5 = '1329';// cityids for resume
                $cityid6 = '857';// cityids for resume
                $cityid7 = '872';// cityids for resume
                $cityid8 = '5';// cityids for resume

                // first  resumes

                $wpjobportal_isfeaturedresume = 2;
                $wpjobportal_startfeatureresumeddate = "0000-00-00 00:00:00";
                $wpjobportal_endfeatureresumeddate = "0000-00-00 00:00:00";
                if(in_array('featureresume', wpjobportal::$_active_addons)){
                    $wpjobportal_isfeaturedresume = 1;
                    $wpjobportal_startfeatureresumeddate = gmdate("Y-m-d H:i:s");
                    $wpjobportal_endfeatureresumeddate = gmdate("Y-m-d H:i:s", strtotime("+12 months"));
                }

                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Data', '340000', '', 'Sample-Data', 'First name ', 'last Name', '1', 'sampledata@info.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Data Computer/IT Full-Time United States Male 340000Santa Barbara, California, United States', 'Sample Data Computer/IT Full-Time United States Male 340000Santa Barbara, California, United States Gujranwala 31.5166667 74.3833333 Sample data Sample data Sample 12/18/2019 12/5/2014 Sample data 2025-05-23 06:08:01 2025-05-23 06:08:01 123456789 GT ROAD TRUST PLAZA Santa Barbara, California, United States this is some text that i have written in skills section of reusme. Sample data ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;

                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x1")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x1",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`, `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);


                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeemployers` (`resumeid`, `employer`, `employer_from_date`, `employer_to_date`, `employer_current_status`, `employer_city`, `employer_phone`, `employer_address`, `created`, `last_modified`, `params`, `serverstatus`, `serverid`)
                                VALUES( " .esc_sql($wpjobportal_resumeid).  ", 'Sample data', '" .esc_sql($wpjobportal_date). "', '" .esc_sql($wpjobportal_date). "' , 0, '" .$cityid. "', '123456789', 'GT ROAD TRUST PLAZA', '0000-00-00 00:00:00', '', '', NULL, NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);


                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeinstitutes` ( `resumeid`, `institute`, `institute_certificate_name`, `institute_study_area`, `created`, `last_modified`, `serverstatus`, `serverid`, `fromdate`, `todate` , `params`)
                                        VALUES( " .esc_sql($wpjobportal_resumeid). " , 'Sample data', 'Sample data', 'Sample', '" .esc_sql($wpjobportal_date). "', '', NULL, NULL, '12/5/2014', '12/18/2019', '');";

                wpjobportaldb::query($wpjobportal_resume_query);


                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumelanguages` ( `resumeid`, `language`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Sample data','".esc_sql($wpjobportal_date)."','0000-00-00 00:00:00',NULL,NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);

                // 2nd resume

                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume', '340000', '', 'sample-resume', 'John ', 'Doe', '1', 'sample@resume.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '".$wpjobportal_startfeatureresumeddate."', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureresumeddate."', '".$wpjobportal_isfeaturedresume."', '', 0, '', '[]', 0, 0, 'Sample Resume Computer/IT Full-Time United States Male 340000Ventura, California, United States', 'Sample Resume Computer/IT Full-Time United States Male 340000Ventura, California, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x2")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x2",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                    VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid1, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);

                //3rd Resume
                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 1', '340000', '', 'sample-resume-1', 'John ', 'Doe', '1', 'sample@resume1.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Resume 1 Computer/IT Full-Time United States Male 340000Leona, Kansas, United States ', 'Sample Resume 1 Computer/IT Full-Time United States Male 340000Leona, Kansas, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x3")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x3",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                    VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid2, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);
                //4th Resume

                 $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 2', '340000', '', 'sample-resume-2', 'John ', 'Doe', '1', 'sample@resume2.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '".$wpjobportal_startfeatureresumeddate."', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureresumeddate."', '".$wpjobportal_isfeaturedresume."', '', 0, '', '[]', 0, 0, 'Sample Resume 2 Computer/IT Full-Time United States Male 340000Sheboygan, Wisconsin, United States ', 'Sample Resume 2 Computer/IT Full-Time United States Male 340000Sheboygan, Wisconsin, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x4")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x4",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid3, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);
                //5th Resume
                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 3', '340000', '', 'sample-resume-3', 'John ', 'Doe', '1', 'sample@resume3.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Resume 3 Computer/IT Full-Time United States Male 340000Danville, Virginia, United States ', 'Sample Resume 3 Computer/IT Full-Time United States Male 340000Danville, Virginia, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                    wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x5")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x5",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid4, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);

                ///6th Resume
                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 4', '340000', '', 'sample-resume-4', 'John ', 'Doe', '1', 'sample@resume4.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '".$wpjobportal_startfeatureresumeddate."', '0000-00-00 00:00:00', '".$wpjobportal_endfeatureresumeddate."', '".$wpjobportal_isfeaturedresume."', '', 0, '', '[]', 0, 0, 'Sample Resume 4 Computer/IT Full-Time United States Male 340000Laconia, New Hampshire, United States ', 'Sample Resume 4 Computer/IT Full-Time United States Male 340000Laconia, New Hampshire, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x6")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x6",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid5, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);


                //7th Resume
                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 5', '340000', '', 'sample-resume-5', 'John ', 'Doe', '1', 'sample@resume5.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Resume 5 Computer/IT Full-Time United States Male 340000Elgin, Illinois, United States ', 'Sample Resume 5 Computer/IT Full-Time United States Male 340000Elgin, Illinois, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";

                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x7")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x7",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid6, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);



                ///8th Resume

                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 3', '340000', '', 'sample-resume-6', 'John ', 'Doe', '1', 'sample@resume6.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Resume 3 Computer/IT Full-Time United States Male 340000Rockford, Illinois, United States ', 'Sample Resume 3 Computer/IT Full-Time United States Male 340000Rockford, Illinois, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                 wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x8")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x8",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid7, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);

                ///9th Resume

                $wpjobportal_resume_query = "INSERT INTO `".wpjobportal::$_db->prefix."wj_portal_resume` ( `uid`, `created`, `last_modified`, `published`, `hits`, `application_title`, `salaryfixed`, `keywords`, `alias`, `first_name`, `last_name`, `gender`, `email_address`, `cell`, `nationality`, `searchable`, `photo`, `job_category`, `jobtype`, `status`, `resume`, `skills`, `isgoldresume`, `startgolddate`, `startfeatureddate`, `endgolddate`, `endfeatureddate`, `isfeaturedresume`, `serverstatus`, `serverid`, `tags`, `params`, `userpackageid`, `price`, `airesumesearchtext`, `airesumesearchdescription`) VALUES
                    ('".esc_sql($wpjobportal_jobseeker_id)."', '".esc_sql($wpjobportal_date)."', '0000-00-00', 0, 0, 'Sample Resume 7', '340000', '', 'sample-resume-7', 'John ', 'Doe', '1', 'sample@resume7.com', '123456789', '1', 1, 'resume-photo.png', 13, 1, 1, '', 'this is some text that i have written in skills section of reusme.', 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 2, '', 0, '', '[]', 0, 0, 'Sample Resume 7 Computer/IT Full-Time United States Male 340000El Cajon, California, United States ', 'Sample Resume 7 Computer/IT Full-Time United States Male 340000El Cajon, California, United States Gujranwala 31.5166667 74.3833333 this is some text that i have written in skills section of reusme. ');";
                wpjobportaldb::query($wpjobportal_resume_query);
                $wpjobportal_resumeid = wpjobportal::$_db->insert_id;
                if ($wp_filesystem->exists($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x9")) $wp_filesystem->move($wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_x9",$wp_upload_dir["basedir"]."/".$wpjobportal_data_directory."/data/jobseeker/resume_".$wpjobportal_resumeid);

                $wpjobportal_resume_query = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_resumeaddresses` ( `resumeid`, `address`, `address_city`,  `longitude`, `latitude`, `created`, `last_modified`, `serverstatus`, `serverid`)
                                VALUES (" . esc_sql($wpjobportal_resumeid) . ", 'Gujranwala', $cityid8, 74.3833333, 31.5166667, '".esc_sql($wpjobportal_date)."', '0000-00-00 00:00:00', NULL  , NULL);";
                wpjobportaldb::query($wpjobportal_resume_query);




                /**
                ** @param wp job portal
                *Sample Data
                * * *Job Apply Code
                **/

                $wpjobportal_jobs = "SELECT id FROM `" . wpjobportal::$_db->prefix . "wj_portal_jobs` WHERE title='Web Designer' OR title='senior software engineer' OR title='Accountant' OR title='Android Developer' OR title='PHP Developer';";
                $wpjobportal_jobids = wpjobportaldb::get_results($wpjobportal_jobs);


                foreach ($wpjobportal_jobids AS $wpjobportal_jobid) {
                    $wpjobportal_appliedjobs = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobapply` (`jobid`, `uid`, `cvid`, `apply_date`, `resumeview`, `comments`, `coverletterid`, `action_status`, `serverstatus`, `serverid`,status)
                        VALUES (" . esc_sql($wpjobportal_jobid->id) . "," . esc_sql($wpjobportal_jobseeker_id) . "," . esc_sql($wpjobportal_resumeid) . ",'" . esc_sql($wpjobportal_date) . "',0,NULL,NULL,1,NULL,NULL,1)";
                    wpjobportaldb::query($wpjobportal_appliedjobs);
                }
            }
            // if ($wpjobportal_temp_data == 1) {
            //     $wpjobportal_product_type = WPJOBPORTALincluder::getJSModel('configuration')->getConfigurationByConfigName('producttype');
            //     if($wpjobportal_product_type == 'pro'){
            //         $flag = 'p';
            //     }else{
            //         $flag = 'f';
            //     }
            //     $this->installSampleDataTemplate($flag);
            // }


        }
        return true;
    }

    function installSampleDataTemplate($flag) {
        if(wpjobportal::$wpjobportal_theme_chk == 2){
            return $this->installSampleDataTemplateJobHub($flag);
        }
        $wpjobportal_product_type = WPJOBPORTALincluder::getJSModel('configuration')->getConfigurationByConfigName('producttype');
        if($flag == 'p'){
            if($wpjobportal_product_type != 'pro'){
                return 0;
            }
                $wpjobportal_pro  = 1;
        }elseif($flag == 'f'){
            if($wpjobportal_product_type != 'free'){
                return 0;
            }
            $wpjobportal_pro  = 0;
        }elseif($flag == 'ftp'){
            if($wpjobportal_product_type != 'pro'){
                return 0;
            }
            $this->installFreeToProData();
            return 1;
        }
        return 1;
    }

    function installSampleDataTemplateJobHub($flag) {
        $wpjobportal_product_type = WPJOBPORTALincluder::getJSModel('configuration')->getConfigurationByConfigName('producttype');
        if($flag == 'p'){
            return 0;
        }elseif($flag == 'f'){
            if($wpjobportal_product_type != 'free'){
                return 0;
            }
            $wpjobportal_pro  = 0;
        }elseif($flag == 'ftp'){
                return 0;
        }
        // Check for the rev slider
        $wp_upload_dir = wp_upload_dir();
        if ( ! function_exists( 'WP_Filesystem' ) ) {
            require_once ABSPATH . 'wp-admin/includes/file.php';
        }
        global $wp_filesystem;
        if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ) {
            $creds = request_filesystem_credentials( site_url() );
            wp_filesystem( $creds );
        }

        if ($wp_filesystem->exists(get_template_directory() . "/framework/plugins/sample-data.zip")) {
            do_action('wpjobportal_load_wp_pcl_zip');
            $archive = new PclZip(get_template_directory() . "/framework/plugins/sample-data.zip");
            $v_list = $archive->extract($wp_upload_dir["basedir"]);
        }
        if( ! function_exists("wpjobportal_wp_update_post_meta")){
            function wpjobportal_wp_update_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value = "" ){
                if ( empty( $wpjobportal_value ) OR ! $wpjobportal_value ){
                    delete_post_meta( $post_id, $wpjobportal_field_name );
                }elseif ( ! get_post_meta( $post_id, $wpjobportal_field_name ) ){
                    add_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value );
                }else{
                    update_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value );
                }
            }
        }
        if( ! function_exists("wpjobportal_uploadPostFeatureImage")){
            function wpjobportal_uploadPostFeatureImage($filename,$parent_post_id){
                // Check the type of file. We"ll use this as the "post_mime_type".
                $filetype = wp_check_filetype( wpjobportalphplib::wpJP_basename( $filename ), null );
                // Get the path to the upload directory.
                $wp_upload_dir = wp_upload_dir();
                // Prepare an array of post data for the attachment.
                $attachment = array(
                    "guid"           => $wp_upload_dir["url"] . "/" . wpjobportalphplib::wpJP_basename( $filename ),
                    "post_mime_type" => $filetype["type"],
                    "post_title"     => wpjobportalphplib::wpJP_preg_replace(  "/\.[^.]+$/", "", wpjobportalphplib::wpJP_basename( $filename ) ),
                    "post_content"   => "",
                    "post_status"    => "inherit"
                );
                // Insert the attachment.
                $attach_id = wp_insert_attachment( $attachment, $filename, $parent_post_id );
                // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
                do_action('wpjobportal_load_wp_image');
                // Generate the metadata for the attachment, and update the database record.
                $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
                wp_update_attachment_metadata( $attach_id, $attach_data );
                set_post_thumbnail( $parent_post_id, $attach_id );
            }
        }
        $jh_pages = array();
        // Home
        $wpjobportal_new_page_title = "Home";
        $wpjobportal_new_page_template = "templates/template-homepage.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => "",
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["home"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["home"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["home"], "_wp_page_template", $wpjobportal_new_page_template);
        update_post_meta($jh_pages["home"], "jh_show_header", 2);
        // Home 1
        $wpjobportal_new_page_title = "Home 1";
        $wpjobportal_new_page_template = "templates/template-homepage.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => "",
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["home1"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["home1"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["home1"], "_wp_page_template", $wpjobportal_new_page_template);
        update_post_meta($jh_pages["home1"], "jh_show_header", 2);
        
        $wp_upload_dir = wp_upload_dir();
        /* end of homepages */
        // Price table
        $wpjobportal_new_page_title = "Pricing Table";
        $wpjobportal_new_page_content = '<div class="jsjb-jh-pricicing-box-wrap"><div class="jsjb-jh-price-box-row"><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-1"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-2"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-3"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-4"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-5"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-6"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-7"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-8"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div><div class="col-md-4"><div class="jsjb-jh-price-box jsjb-jh-pkg-color-9"><div class="jsjb-jh-price-box-heading"><h3 class="jsjb-jh-price-box-heading-txt">Basic Package</h3><h5 class="jsjb-jh-price-box-title">Basic Package</h5></div><ul class="list-group jsjb-jh-price-box-crdts-list"> <li>Credits</li><li>50,000</li><li>Expire In 60 Days</li></ul><div class="jsjb-jh-price-box-price-wrp">$200</div><a class="jsjb-jh-price-box-bn-btn-txt" title="Buy Now" href="#">Buy Now</a></div></div></div></div>';
        $wpjobportal_new_page_template = "templates/template-fullwidth.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["pricing_table"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["pricing_table"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["pricing_table"], "jh_show_header", 1);
        update_post_meta($jh_pages["pricing_table"], "_wp_page_template", $wpjobportal_new_page_template);
    // job hub pages
        $page_array[1] = "Jobseeker Control Panel";
        $page_array[2] = "Newest Jobs";
        $page_array[3] = "My Applied Jobs";
        $page_array[4] = "My Resume";
        $page_array[5] = "Search Job";
        $page_array[6] = "Jobs By Category";
        $page_array[8] = "Add Resume";
        $page_array[11] = "All Companies";

        $page_array[18] = "Jobseeker Stats";
        $page_array[19] = "Employer Control Panel";
        $page_array[20] = "My Jobs";
        $page_array[21] = "Add Job";
        $page_array[22] = "Resume Search";
        $page_array[23] = "Resume By Categories";
        $page_array[24] = "My Companies";
        $page_array[25] = "Add Company";
        $page_array[32] = "Employer Stats";
        $page_array[33] = "Login";
        $page_array[34] = "Employer Registration";
        $page_array[35] = "Jobseeker Registration";
        $page_array[36] = "Thank You";
        foreach ($page_array as $wpjobportal_key => $wpjobportal_value) {
            // $wpjobportal_value_string = wpjobportalphplib::wpJP_strtolower($wpjobportal_value);
            // $wpjobportal_value_string = sanitize_title($wpjobportal_value_string);
            $wpjobportal_value_string = wpjobportalphplib::wpJP_strtolower($wpjobportal_value);
            $wpjobportal_value_string = wpjobportalphplib::wpJP_str_replace(" ","_",$wpjobportal_value_string);
            $wpjobportal_new_page_title = $wpjobportal_value;
            $wpjobportal_new_page_content = '[vc_row][vc_column][jh_job_hub_pages page page="'.$wpjobportal_key.'"][/vc_column][/vc_row]';
            $wpjobportal_new_page_template = "templates/template-fullwidth.php";
            $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
            $wpjobportal_new_page = array(
                    "post_type" => "page",
                    "post_title" => $wpjobportal_new_page_title,
                    "post_content" => $wpjobportal_new_page_content,
                    "post_status" => "publish",
                    "post_author" => 1,
                    "post_parent" => 0,
            );
            if(!isset($page_check->ID)){
                $jh_pages[$wpjobportal_value_string] = wp_insert_post($wpjobportal_new_page);
            }else{
                $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
                $jh_pages[$wpjobportal_value_string] = wp_insert_post($wpjobportal_new_page);
            }
            update_post_meta($jh_pages[$wpjobportal_value_string], "jh_show_header", 1);
            update_post_meta($jh_pages[$wpjobportal_value_string], "_wp_page_template", $wpjobportal_new_page_template);
        }
    // job hub pages end
        // News & Rumors
        $wpjobportal_new_page_title = "News & Rumors";
        $wpjobportal_new_page_content = '[vc_row][vc_column][jh_news_and_rumors style="3" posts_per_page="2"][/vc_column][/vc_row]';
        $wpjobportal_new_page_template = "templates/template-news_and_rumors.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["news_and_rumors"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["news_and_rumors"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["news_and_rumors"], "jh_show_header", 1);
        update_post_meta($jh_pages["news_and_rumors"], "_wp_page_template", $wpjobportal_new_page_template);
        // FAQ
        $wpjobportal_new_page_title = "FAQ";
        $wpjobportal_new_page_content = '[vc_row][vc_column][vc_tta_accordion active_section="1" el_class="jsjb-jh-faq-wrap"][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754286724-c9ed48ed-c7f7" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754537433-695717d6-6bfc" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754536332-73927004-0a28" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754535606-7dffd7a9-2119" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754534808-bb9dfb79-6d18" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754534095-ec21098b-4397" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754529612-21aedc15-ddd9" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][vc_tta_section title="Lorem Ipsum is simply dummy text of the printing and typesetting industry." tab_id="1482754528056-93a9c873-2efd" el_class="jsjb-jh-faq"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_tta_section][/vc_tta_accordion][/vc_column][/vc_row]';
        $wpjobportal_new_page_template = "templates/template-fullwidth.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["faq"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["faq"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["faq"], "jh_show_header", 1);
        update_post_meta($jh_pages["faq"], "_wp_page_template", $wpjobportal_new_page_template);
       // Our Team
        $wpjobportal_new_page_title = "Our Team";
        $wpjobportal_new_page_content = '[vc_row][vc_column][jh_team_memebers per_row="3" posts_per_page="4" style="3"][/vc_column][/vc_row]';
        $wpjobportal_new_page_template = "templates/template-fullwidth.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["ourteam"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["ourteam"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["ourteam"], "_wp_page_template", $wpjobportal_new_page_template);
        update_post_meta($jh_pages["ourteam"], "jh_show_header", 1);
        // Contact Us
        $wpjobportal_new_page_title = "Contact Us";
        $wpjobportal_new_page_content = "";
        $wpjobportal_new_page_template = "templates/template-contactus.php";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        if(!isset($page_check->ID)){
            $jh_pages["contact_us"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["contact_us"] = wp_insert_post($wpjobportal_new_page);
        }
        update_post_meta($jh_pages["contact_us"], "_wp_page_template", $wpjobportal_new_page_template);
        update_post_meta($jh_pages["contact_us"], "jh_show_header", 1);
        // Blog Page
        $wpjobportal_new_page_title = "Blog";
        $wpjobportal_new_page_content = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );

        if(!isset($page_check->ID)){
            $jh_pages["blog"] = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Hub ".$wpjobportal_new_page_title;
            $jh_pages["blog"] = wp_insert_post($wpjobportal_new_page);
        }
        update_option("page_for_posts", $jh_pages["blog"]);
    // Update home page contents
        //Home
        $wpjobportal_new_page_content = '[vc_row][vc_column][jh_job_search wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="7" subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text"][/vc_column][/vc_row][vc_row][vc_column][jh_feature_3box][/vc_column][/vc_row][vc_row][vc_column][jh_jobs_category wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="2" category="1" category1="1" category2="1" category3="1" category4="1" category5="1" category6="1" category7="1"][/vc_column][/vc_row][vc_row][vc_column][jh_5count_box style="2" count1="587" count2="146" count3="919" count4="796"][/vc_column][/vc_row][vc_row][vc_column][jh_jobs wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" title1="Latest Jobs" noofjobs="6" style="2"][/vc_column][/vc_row][vc_row][vc_column][jh_job_hub_custom_link wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="6" title="REGISTER AS EMPLOYER" description="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut veniam ." description1="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut veniam ."][/vc_column][/vc_row][vc_row][vc_column][jh_price_tables style="2" posts_per_page="3"][/vc_column][/vc_row][vc_row][vc_column][jh_companies wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" companytype="1" style="1" bgcolor="#ffffff" title="Popular Companies" scrollstyle="2" speed="1" posts_per_page="10"][/vc_column][/vc_row][vc_row][vc_column][jh_shortdescription_with_btn][/vc_column][/vc_row]';
        $wpjobportal_my_post = array(
            "ID"           => $jh_pages["home"],
            "post_content" => $wpjobportal_new_page_content,
        );
        wp_update_post( $wpjobportal_my_post );
        //Home 1
        $wpjobportal_new_page_content = '[vc_row][vc_column][jh_job_search wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="8"][/vc_column][/vc_row][vc_row][vc_column][jh_latest_featured_jobs wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" title="Latest Jobs" heading="Featured Jobs" noofjobs="6"][/vc_column][/vc_row][vc_row][vc_column][jh_job_hub_custom_link wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="7" description="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo"][/vc_column][/vc_row][vc_row][vc_column][jh_latest_resume wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="5" title="Latest Resume" description="Here you can see most recent resume added by users.You are able to set how many resume will be displayed ,order them or chose the specific taxonomy terms of resume." post_per_page="5" scrollstyle="2" speed="1"][/vc_column][/vc_row][vc_row][vc_column][jh_5count_box style="6" count1="587" count2="146" count3="919" count4="796"][/vc_column][/vc_row][vc_row][vc_column][jh_job_hub_custom_link wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="8" description="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo"][/vc_column][/vc_row][vc_row][vc_column][jh_news_and_rumors style="1"][/vc_column][/vc_row][vc_row][vc_column][jh_companies wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" companytype="1" style="2" title="Popular Companies" posts_per_page="6"][/vc_column][/vc_row][vc_row][vc_column][jh_shortdescription_with_btn][/vc_column][/vc_row]';
        $wpjobportal_my_post = array(
            "ID"           => $jh_pages["home1"],
            "post_content" => $wpjobportal_new_page_content,
        );
        wp_update_post( $wpjobportal_my_post );
        //Home 2
        $wpjobportal_new_page_content = '[vc_row video_bg="yes"][vc_column][vc_empty_space height="550px"][/vc_column][/vc_row][vc_row][vc_column][jh_job_search wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="2"][/vc_column][/vc_row][vc_row][vc_column][jh_latest_jobs_types_categories_cities wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" title="Latest Jobs" noofjobs="5" display_style="1" show_jobs_by_types="1" number_of_job_type="5" show_number_of_jobs_by_type="1" show_jobs_by_categories="1" number_of_categories="5" show_number_of_jobs_by_category="1" show_jobs_by_cities="1" number_of_cities="5" show_number_of_jobs_by_city="1"][/vc_column][/vc_row][vc_row][vc_column][jh_image_and_text_box_with_links][/vc_column][/vc_row][vc_row][vc_column][jh_latest_resume wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" style="4" title="Latest Resume" description="Here you can see most recent resume added by users.You are able to set how many resume will be displayed ,order them or chose the specific taxonomy terms of resume." post_per_page="5"][/vc_column][/vc_row][vc_row][vc_column][jh_news_and_rumors style="4"][/vc_column][/vc_row][vc_row][vc_column][jh_testimonial style="4" heading="Kind Words From Happy Candidates" description="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et ."][/vc_column][/vc_row][vc_row el_class="jsjb-jh-companies-carasole-without-bg"][vc_column][jh_companies wpjobportalpageid="'.esc_attr($jh_pages["newest_jobs"]).'" companytype="1" style="2" title="Popular Companies" posts_per_page="6"][/vc_column][/vc_row][vc_row][vc_column][jh_post_add style="1"][/vc_column][/vc_row]';
        $wpjobportal_my_post = array(
            "ID"           => $jh_pages["home2"],
            "post_content" => $wpjobportal_new_page_content,
        );
        wp_update_post( $wpjobportal_my_post );
        // Update WP Options
        $wp_page_array = array();
        foreach ($page_array as $wpjobportal_key => $wpjobportal_value) {
            $wpjobportal_value_string = wpjobportalphplib::wpJP_strtolower($wpjobportal_value);
            $wpjobportal_value_string = wpjobportalphplib::wpJP_str_replace(" ","_",$wpjobportal_value_string);
            $wp_page_array[$wpjobportal_value_string] = $jh_pages[$wpjobportal_value_string];
        }
        update_option("job-hub-layout", $wp_page_array);
        // ----------------Posts -------- //
        $wpjobportal_new_page_title = "Lorem ipsum dolor sit amet, consectetur adipiscing.";
        $wpjobportal_new_page_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed sapien non elit rhoncus faucibus id mattis metus. Integer in dictum lectus. Cras et risus leo. Morbi viverra congue sem vel posuere. Aenean odio turpis, posuere ac sem id, posuere viverra nisi. Integer pellentesque ornare tortor, ut suscipit leo sagittis vitae. In eu porta nisi. In id odio non risus blandit ultricies ut aliquam ex.Curabitur at ante pulvinar, mattis ipsum sit amet, aliquam turpis. Vivamus et sem mollis, ornare odio nec, consequat leo. Quisque commodo eget velit vitae sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas cursus augue at enim fringilla, eget egestas risus hendrerit. In hac habitasse platea dictumst. Nulla vitae enim id odio porttitor mollis. In vehicula finibus eleifend. Aenean gravida, nisl ac dapibus tincidunt, mi orci pretium sapien, eu varius magna nunc egestas metus.Vivamus vitae rhoncus mi, vel ultrices dolor. Mauris vitae ex laoreet, sagittis dolor id, commodo mauris. Integer pellentesque mi non dictum vehicula. Sed a elit velit. Suspendisse vel justo sed enim gravida iaculis. Nulla pretium a odio non convallis. Donec lacus lectus, ultrices vel elit vel, auctor laoreet odio. Donec velit est, consectetur ac condimentum eu, scelerisque in elit. Sed ultricies quis enim id congue. Aliquam nec aliquam urna. Ut iaculis vel purus nec pellentesque. Proin quis lorem eros. Praesent lacinia id sapien sed elementum. Fusce sodales nisl orci, ac venenatis erat tincidunt faucibus. Cras elementum efficitur lorem eu pellentesque. Donec efficitur fringilla arcu ac.  ';
        $wpjobportal_new_page = array(
                "post_type" => "post",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/post2.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Lorem ipsum dolor sit";
        $wpjobportal_new_page_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed sapien non elit rhoncus faucibus id mattis metus. Integer in dictum lectus. Cras et risus leo. Morbi viverra congue sem vel posuere. Aenean odio turpis, posuere ac sem id, posuere viverra nisi. Integer pellentesque ornare tortor, ut suscipit leo sagittis vitae. In eu porta nisi. In id odio non risus blandit ultricies ut aliquam ex.Curabitur at ante pulvinar, mattis ipsum sit amet, aliquam turpis. Vivamus et sem mollis, ornare odio nec, consequat leo. Quisque commodo eget velit vitae sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas cursus augue at enim fringilla, eget egestas risus hendrerit. In hac habitasse platea dictumst. Nulla vitae enim id odio porttitor mollis. In vehicula finibus eleifend. Aenean gravida, nisl ac dapibus tincidunt, mi orci pretium sapien, eu varius magna nunc egestas metus.Vivamus vitae rhoncus mi, vel ultrices dolor. Mauris vitae ex laoreet, sagittis dolor id, commodo mauris. Integer pellentesque mi non dictum vehicula. Sed a elit velit. Suspendisse vel justo sed enim gravida iaculis. Nulla pretium a odio non convallis. Donec lacus lectus, ultrices vel elit vel, auctor laoreet odio. Donec velit est, consectetur ac condimentum eu, scelerisque in elit. Sed ultricies quis enim id congue. Aliquam nec aliquam urna. Ut iaculis vel purus nec pellentesque. Proin quis lorem eros. Praesent lacinia id sapien sed elementum. Fusce sodales nisl orci, ac venenatis erat tincidunt faucibus. Cras elementum efficitur lorem eu pellentesque. Donec efficitur fringilla arcu ac.  ';
        $wpjobportal_new_page = array(
                "post_type" => "post",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/post3.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Lorem ipsum dolor sit amet, consectetur";
        $wpjobportal_new_page_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed sapien non elit rhoncus faucibus id mattis metus. Integer in dictum lectus. Cras et risus leo. Morbi viverra congue sem vel posuere. Aenean odio turpis, posuere ac sem id, posuere viverra nisi. Integer pellentesque ornare tortor, ut suscipit leo sagittis vitae. In eu porta nisi. In id odio non risus blandit ultricies ut aliquam ex.Curabitur at ante pulvinar, mattis ipsum sit amet, aliquam turpis. Vivamus et sem mollis, ornare odio nec, consequat leo. Quisque commodo eget velit vitae sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas cursus augue at enim fringilla, eget egestas risus hendrerit. In hac habitasse platea dictumst. Nulla vitae enim id odio porttitor mollis. In vehicula finibus eleifend. Aenean gravida, nisl ac dapibus tincidunt, mi orci pretium sapien, eu varius magna nunc egestas metus.Vivamus vitae rhoncus mi, vel ultrices dolor. Mauris vitae ex laoreet, sagittis dolor id, commodo mauris. Integer pellentesque mi non dictum vehicula. Sed a elit velit. Suspendisse vel justo sed enim gravida iaculis. Nulla pretium a odio non convallis. Donec lacus lectus, ultrices vel elit vel, auctor laoreet odio. Donec velit est, consectetur ac condimentum eu, scelerisque in elit. Sed ultricies quis enim id congue. Aliquam nec aliquam urna. Ut iaculis vel purus nec pellentesque. Proin quis lorem eros. Praesent lacinia id sapien sed elementum. Fusce sodales nisl orci, ac venenatis erat tincidunt faucibus. Cras elementum efficitur lorem eu pellentesque. Donec efficitur fringilla arcu ac.  ';
        $wpjobportal_new_page = array(
                "post_type" => "post",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/post1.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
        $wpjobportal_new_page_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed sapien non elit rhoncus faucibus id mattis metus. Integer in dictum lectus. Cras et risus leo. Morbi viverra congue sem vel posuere. Aenean odio turpis, posuere ac sem id, posuere viverra nisi. Integer pellentesque ornare tortor, ut suscipit leo sagittis vitae. In eu porta nisi. In id odio non risus blandit ultricies ut aliquam ex.Curabitur at ante pulvinar, mattis ipsum sit amet, aliquam turpis. Vivamus et sem mollis, ornare odio nec, consequat leo. Quisque commodo eget velit vitae sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas cursus augue at enim fringilla, eget egestas risus hendrerit. In hac habitasse platea dictumst. Nulla vitae enim id odio porttitor mollis. In vehicula finibus eleifend. Aenean gravida, nisl ac dapibus tincidunt, mi orci pretium sapien, eu varius magna nunc egestas metus.Vivamus vitae rhoncus mi, vel ultrices dolor. Mauris vitae ex laoreet, sagittis dolor id, commodo mauris. Integer pellentesque mi non dictum vehicula. Sed a elit velit. Suspendisse vel justo sed enim gravida iaculis. Nulla pretium a odio non convallis. Donec lacus lectus, ultrices vel elit vel, auctor laoreet odio. Donec velit est, consectetur ac condimentum eu, scelerisque in elit. Sed ultricies quis enim id congue. Aliquam nec aliquam urna. Ut iaculis vel purus nec pellentesque. Proin quis lorem eros. Praesent lacinia id sapien sed elementum. Fusce sodales nisl orci, ac venenatis erat tincidunt faucibus. Cras elementum efficitur lorem eu pellentesque. Donec efficitur fringilla arcu ac.  ';
        $wpjobportal_new_page = array(
                "post_type" => "post",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/post5.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Lorem ipsum dolor sit amet";
        $wpjobportal_new_page_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed sapien non elit rhoncus faucibus id mattis metus. Integer in dictum lectus. Cras et risus leo. Morbi viverra congue sem vel posuere. Aenean odio turpis, posuere ac sem id, posuere viverra nisi. Integer pellentesque ornare tortor, ut suscipit leo sagittis vitae. In eu porta nisi. In id odio non risus blandit ultricies ut aliquam ex.Curabitur at ante pulvinar, mattis ipsum sit amet, aliquam turpis. Vivamus et sem mollis, ornare odio nec, consequat leo. Quisque commodo eget velit vitae sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas cursus augue at enim fringilla, eget egestas risus hendrerit. In hac habitasse platea dictumst. Nulla vitae enim id odio porttitor mollis. In vehicula finibus eleifend. Aenean gravida, nisl ac dapibus tincidunt, mi orci pretium sapien, eu varius magna nunc egestas metus.Vivamus vitae rhoncus mi, vel ultrices dolor. Mauris vitae ex laoreet, sagittis dolor id, commodo mauris. Integer pellentesque mi non dictum vehicula. Sed a elit velit. Suspendisse vel justo sed enim gravida iaculis. Nulla pretium a odio non convallis. Donec lacus lectus, ultrices vel elit vel, auctor laoreet odio. Donec velit est, consectetur ac condimentum eu, scelerisque in elit. Sed ultricies quis enim id congue. Aliquam nec aliquam urna. Ut iaculis vel purus nec pellentesque. Proin quis lorem eros. Praesent lacinia id sapien sed elementum. Fusce sodales nisl orci, ac venenatis erat tincidunt faucibus. Cras elementum efficitur lorem eu pellentesque. Donec efficitur fringilla arcu ac.  ';
        $wpjobportal_new_page = array(
                "post_type" => "post",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/post4.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        // ----------------Custom posts -------- //
        // News & Rumors
        $wpjobportal_new_page_title = "Advertising For Your Business";
        $wpjobportal_new_page_content = 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using "Content here, content here", making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for "lorem ipsum" will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).';
        $wpjobportal_new_page = array(
                "post_type" => "jh_news_and_rumors",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/nar_1.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Attract More Attention Sales";
        $wpjobportal_new_page_content = '<strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry"s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<strong></strong>';
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_news_and_rumors",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $filename = $wp_upload_dir["basedir"]."/2017/01/nar_2.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Top fun activities tips for you ";
        $wpjobportal_new_page_content = '<strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry"s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.';
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_news_and_rumors",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        $filename = $wp_upload_dir["basedir"]."/2017/01/nar_3.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);


        // Team members
        $wpjobportal_new_page_title = "Member 4";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
        $wpjobportal_new_page = array(
                "post_type" => "jh_team_member",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "team_member_title", "Front-end Developer");
        update_post_meta($wpjobportal_new_page_id, "team_member_facebook", "http://www.facebook.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_twitter", "http://www.twitter.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_linkedin", "http://www.linkedin.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_gplus", "http://www.googleplus.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_instagram", "http://www.instagram.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_pinterest", "http://www.pinterest.com");
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/tm_1.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Member 3";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
        $wpjobportal_new_page = array(
                "post_type" => "jh_team_member",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "team_member_title", "Project Manager");
        update_post_meta($wpjobportal_new_page_id, "team_member_facebook", "http://www.facebook.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_twitter", "http://www.twitter.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_linkedin", "http://www.linkedin.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_gplus", "http://www.googleplus.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_instagram", "http://www.instagram.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_pinterest", "http://www.pinterest.com");
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/tm_2.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Member 2";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
        $wpjobportal_new_page = array(
                "post_type" => "jh_team_member",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "team_member_title", "Team Leader");
        update_post_meta($wpjobportal_new_page_id, "team_member_facebook", "http://www.facebook.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_twitter", "http://www.twitter.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_linkedin", "http://www.linkedin.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_gplus", "http://www.googleplus.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_instagram", "http://www.instagram.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_pinterest", "http://www.pinterest.com");
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/tm_3.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Member 1";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
        $wpjobportal_new_page = array(
                "post_type" => "jh_team_member",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "team_member_title", "Cheif executive office / CEO");
        update_post_meta($wpjobportal_new_page_id, "team_member_facebook", "http://www.facebook.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_twitter", "http://www.twitter.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_linkedin", "http://www.linkedin.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_gplus", "http://www.googleplus.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_instagram", "http://www.instagram.com");
        update_post_meta($wpjobportal_new_page_id, "team_member_pinterest", "http://www.pinterest.com");
        $wp_upload_dir = wp_upload_dir();
        $filename = $wp_upload_dir["basedir"]."/2017/01/tm_4.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        // Price Table
        $wpjobportal_new_page_title = "Basic Package";
        $wpjobportal_new_page_content = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_price_table",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_price" , "$ 500");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line1" , "1500 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line2" , "New Company 500 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line3" , "New Job 250 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line4" , "Featured Job 100 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_buynowlink" , "#");

        $wpjobportal_new_page_title = "Business Package";
        $wpjobportal_new_page_content = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_price_table",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_price" , "$ 750");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line1" , "2500 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line2" , "New Company 500 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line3" , "New Job 250 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line4" , "Featured Job 100 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_buynowlink" , "#");

        $wpjobportal_new_page_title = "Complete Package";
        $wpjobportal_new_page_content = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_price_table",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_price" , "$ 1500");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line1" , "6000 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line2" , "New Company 500 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line3" , "New Job 250 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_line4" , "Featured Job 100 Credits");
        wpjobportal_wp_update_post_meta($wpjobportal_new_page_id, "jh_buynowlink" , "#");

        // TESTIMONIAL
        $wpjobportal_new_page_title = "Auro Navanth";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam iaculis quam sit amet dolor fermentum, in porta nisi egestas. Nullam convallis laoreet gravida. Pellentesque sed.";
        $wpjobportal_new_page_template = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_testimonials",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );

        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        // set feature image
        $filename = $wp_upload_dir["basedir"]."/2017/01/tsti_1.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Naro MathDoe";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at tempus velit. Aliquam et diam convallis, tempus ligula ut, placerat sem. Nulla condimentum nulla a.";
        $wpjobportal_new_page_template = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_testimonials",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        // set feature image
        $filename = $wp_upload_dir["basedir"]."/2017/01/tsti_2.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "MARY DOE";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce accumsan vitae massa vel aliquet. Morbi sed nibh eget lectus consequat tempor. Aliquam erat volutpat. Nam.";
        $wpjobportal_new_page_template = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_testimonials",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        // set feature image
        $filename = $wp_upload_dir["basedir"]."/2017/01/tsti_3.jpg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Robert Lafore";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eleifend lacinia enim at dapibus. Nam eget accumsan neque. Nam felis augue, egestas ut varius vel.";
        $wpjobportal_new_page_template = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_testimonials",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        // set feature image
        $filename = $wp_upload_dir["basedir"]."/2017/01/tsti_4.jpeg";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);

        $wpjobportal_new_page_title = "Auro Navanth";
        $wpjobportal_new_page_content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam commodo laoreet neque, vitae facilisis quam eleifend a. In consectetur purus quis arcu dictum, sit amet.";
        $wpjobportal_new_page_template = "";
        $page_check = $this->wpjobportal_get_page_by_title($wpjobportal_new_page_title);
        $wpjobportal_new_page = array(
                "post_type" => "jh_testimonials",
                "post_title" => $wpjobportal_new_page_title,
                "post_content" => $wpjobportal_new_page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $wpjobportal_new_page_id = wp_insert_post($wpjobportal_new_page);
        update_post_meta($wpjobportal_new_page_id, "_wp_page_template", $wpjobportal_new_page_template);
        // set feature image
        $filename = $wp_upload_dir["basedir"]."/2017/01/tsti_5.png";
        $parent_post_id = $wpjobportal_new_page_id;
        wpjobportal_uploadPostFeatureImage($filename,$parent_post_id);
        // Pages and custom post are created Now create Menu ----------------

        update_option( "page_on_front", $jh_pages["home"] );
        update_option( "show_on_front", "page" );

        // MENU
        // Check if the menu exists
        $menu_name = "Job Hub";
        $menu_exists = wp_get_nav_menu_object( $menu_name );

        // If it doesn"t exist, let"s create it.
        if( !$menu_exists){
            $menu_id = wp_create_nav_menu($menu_name);

            $locations = get_theme_mod("nav_menu_locations");
            $locations["primary"] = $menu_id;
            set_theme_mod( "nav_menu_locations", $locations );

            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["home"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            $parent_home = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["home1"],
                "menu-item-parent-id" => $parent_home,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["home2"],
                "menu-item-parent-id" => $parent_home,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            // Job seeker

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Job Seeker",
                "menu-item-object-id" => $jh_pages["jobseeker_control_panel"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            $parent_jobseeker = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Jobs",
                "menu-item-object-id" => $jh_pages["newest_jobs"],
                "menu-item-parent-id" => $parent_jobseeker,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Search Job",
                "menu-item-object-id" => $jh_pages["search_job"],
                "menu-item-parent-id" => $parent_jobseeker,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Jobs By Categories",
                "menu-item-object-id" => $jh_pages["jobs_by_category"],
                "menu-item-parent-id" => $parent_jobseeker,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Add Resume",
                "menu-item-object-id" => $jh_pages["add_resume"],
                "menu-item-parent-id" => $parent_jobseeker,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "My Applied Jobs",
                "menu-item-object-id" => $jh_pages["my_applied_jobs"],
                "menu-item-parent-id" => $parent_jobseeker,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            // employer
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Employer",
                "menu-item-object-id" => $jh_pages["employer_control_panel"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            $parent_employer = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Add Job",
                "menu-item-object-id" => $jh_pages["add_job"],
                "menu-item-parent-id" => $parent_employer,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "My Jobs",
                "menu-item-object-id" => $jh_pages["my_jobs"],
                "menu-item-parent-id" => $parent_employer,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Resume Search",
                "menu-item-object-id" => $jh_pages["resume_search"],
                "menu-item-parent-id" => $parent_employer,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Resumes By Categories",
                "menu-item-object-id" => $jh_pages["resume_by_category"],
                "menu-item-parent-id" => $parent_employer,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
            );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Pages",
                "menu-item-object-id" => $jh_pages["blog"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            $parent_pages = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["news_and_rumors"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["faq"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["blog"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["pricing_table"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["thank_you"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            if($wpjobportal_pro == 1){

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Credits",
                "menu-item-object-id" => $jh_pages["jobseeker_credits_pack"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            $parent_credits = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Job Seeker Credits Pack",
                "menu-item-object-id" => $jh_pages["jobseeker_credits_pack"],
                "menu-item-parent-id" => $parent_pages,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            $parent_credits = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Job Seeker Credits Log",
                "menu-item-object-id" => $jh_pages["jobseeker_credits_log"],
                "menu-item-parent-id" => $parent_credits,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Job Seeker Rate List",
                "menu-item-object-id" => $jh_pages["jobseeker_rate_list"],
                "menu-item-parent-id" => $parent_credits,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-title" => "Employer Credits Pack",
                "menu-item-object-id" => $jh_pages["employer_credits_pack"],
                "menu-item-parent-id" => $parent_credits,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Employer Credits Log",
                "menu-item-object-id" => $jh_pages["employer_credits_log"],
                "menu-item-parent-id" => $parent_credits,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);

            $wpjobportal_itemData =  array(
                "menu-item-title" => "Employer Rate List",
                "menu-item-object-id" => $jh_pages["employer_rate_list"],
                "menu-item-parent-id" => $parent_credits,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            }

            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["ourteam"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            $wpjobportal_itemData =  array(
                "menu-item-object-id" => $jh_pages["contact_us"],
                "menu-item-parent-id" => 0,
                "menu-item-object" => "page",
                "menu-item-type"      => "post_type",
                "menu-item-status"    => "publish"
              );
            wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
            }
            $widget_positions = get_option("sidebars_widgets");
            // Woocommerce sidebar
                $widget_positions["woocommerce-sidebar"][] = "woocommerce_widget_cart-1";
                $widget_woocommerce_widget_cart_array[1] = array("title" => "My Cart");
                $widget_woocommerce_widget_cart_array["_multiwidget"] = 1;
                // Left sidebar
                $widget_positions["left-sidebar"][] = "search-1";
                $wpjobportal_search_array[1] = array("title" => "Search");
                $wpjobportal_search_array["_multiwidget"] = 1;
                $widget_positions["left-sidebar"][] = "recent-posts-1";
                $recent_posts_array[1] = array("title" => "Recent Posts", "number" => 5);
                $recent_posts_array["_multiwidget"] = 1;
                $widget_positions["left-sidebar"][] = "recent-comments-1";
                $recent_comments_array[1] = array("title" => "Recent Comments", "number" => 5);
                $recent_comments_array["_multiwidget"] = 1;
                $widget_positions["left-sidebar"][] = "archives-1";
                $archives_array[1] = array("title" => "Archives");
                $archives_array["_multiwidget"] = 1;
                $widget_positions["left-sidebar"][] = "categories-1";
                $wpjobportal_categories_array[1] = array("title" => "Categories");
                $wpjobportal_categories_array["_multiwidget"] = 1;
                $widget_positions["left-sidebar"][] = "meta-1";
                $meta_array[1] = array("title" => "Meta");
                $meta_array["_multiwidget"] = 1;
                // Right sidebar
                $widget_positions["right-sidebar"][] = "calendar-1";
                $calendar_array[1] = array("title" => "Calendar");
                $calendar_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "widget_jsjb_recent_comments-1";
                $widget_jsjb_recent_comments_array[1] = array("title" => "Job Hub Recent Comments", "count" => 2);
                $widget_jsjb_recent_comments_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "widget_jsjb_recent_posts-1";
                $widget_jsjb_recent_posts_array[1] = array("title" => "Job Hub Recent Posts", "category" => "");
                $widget_jsjb_recent_posts_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "nav_menu-1";
                $wpjobportal_nav_menu_array[1] = array("title" => "Custom Menu", "nav_menu" => "");
                $wpjobportal_nav_menu_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "pages-1";
                $pages_array[1] = array("title" => "Pages", "sortby" => "post_title");
                $pages_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "tag_cloud-1";
                $wpjobportal_tag_cloud_array[1] = array("title" => "Tag Cloud", "taxonomy" => "post_tag");
                $wpjobportal_tag_cloud_array["_multiwidget"] = 1;
                $widget_positions["right-sidebar"][] = "text-1";
                $wpjobportal_text_array[1] = array("title" => "Text Heading", "text" => "Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum Text body is here for lorem ipsum");
                $wpjobportal_text_array["_multiwidget"] = 1;
                // News and rumors
                $widget_positions["news_and_rumors"][] = "search-2";
                $wpjobportal_search_array[2] = array("title" => "Search");
                $wpjobportal_search_array["_multiwidget"] = 1;
                $widget_positions["news_and_rumors"][] = "recent-posts-2";
                $recent_posts_array[2] = array("title" => "Recent Posts", "number" => 5);
                $recent_posts_array["_multiwidget"] = 1;
                // footer1
                if (!is_active_sidebar( 'footer1' ) ) { // check if widget was activated from template. to avoid dupilication
                    $widget_positions["footer1"][] = "widget_jsjb_footeraboutus-1";
                    $widget_jsjb_footeraboutus_array[1] = array("title" => "Job Hub", "description" => "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.");
                    $widget_jsjb_footeraboutus_array["_multiwidget"] = 1;
                }
                // footer2
                $widget_positions["footer2"][] = "widget_jsjb_footerusefullinks-1";
                $widget_jsjb_footerusefullinks_array[1] = array(
                    "title" => "Useful Links",
                    "title1"=>"Newest Jobs", "link1"=> get_the_permalink($jh_pages["newest_jobs"]),
                    "title3"=>"Search Job", "link3"=> get_the_permalink($jh_pages["search_job"]),
                    "title2"=>"Resume Search", "link2"=> get_the_permalink($jh_pages["resume_search"]),
                    "title4"=>"Shortlisted Jobs", "link4"=> get_the_permalink($jh_pages["shortlisted_jobs"]),
                    "title5"=>"All Companies", "link5"=> get_the_permalink($jh_pages["all_companies"]),
                    "title6"=>"", "link6"=> "#",
                    "title7"=>"", "link7"=> "#",
                    "title8"=>"", "link8"=> "#",
                    "title9"=>"", "link9"=> "#",
                    "title10"=>"", "link10"=> "#",
                    );
                $widget_jsjb_footerusefullinks_array["_multiwidget"] = 1;
                // footer3
                // $widget_positions["footer3"][] = "widget_jsjs_footercompaniesimages-1";
                $widget_jsjs_footercompaniesimages_array[1] = array("title" => "Featured Companies", "companytype" => 1, "max_images"=>9, "column"=>3);
                $widget_jsjs_footercompaniesimages_array["_multiwidget"] = 1;
                // footer4
                if (!is_active_sidebar( 'footer3' ) ) { // check if widget was activated from template. to avoid dupilication
                    $widget_positions["footer3"][] = "widget_jsjb_footercontactus-1";
                    $widget_jsjb_footercontactus_array[1] = array("title" => "Contact Us", "email" => "jobhub@yourdomain.com", "address"=>"At vero eos et accusamus et iusto odio dignissimos", "phone"=>"+1234567890");
                    $widget_jsjb_footercontactus_array["_multiwidget"] = 1;
                }

                update_option("widget_"."widget_woocommerce_widget_cart"  , $widget_woocommerce_widget_cart_array);
                update_option("widget_"."search"  , $wpjobportal_search_array);
                update_option("widget_"."recent-posts"  , $recent_posts_array);
                update_option("widget_"."recent-comments"  , $recent_comments_array);
                update_option("widget_"."archives"  , $archives_array);
                update_option("widget_"."categories"  , $wpjobportal_categories_array);
                update_option("widget_"."meta"  , $meta_array);
                update_option("widget_"."calendar"  , $calendar_array);
                update_option("widget_"."widget_jsjb_recent_comments"  , $widget_jsjb_recent_comments_array);
                update_option("widget_"."widget_jsjb_recent_posts"  , $widget_jsjb_recent_posts_array);
                update_option("widget_"."nav_menu"  , $wpjobportal_nav_menu_array);
                update_option("widget_"."pages"  , $pages_array);
                update_option("widget_"."tag_cloud"  , $wpjobportal_tag_cloud_array);
                update_option("widget_"."text"  , $wpjobportal_text_array);
                update_option("widget_"."widget_jsjb_footerusefullinks"  , $widget_jsjb_footerusefullinks_array);
                update_option("widget_"."widget_jsjs_footercompaniesimages"  , $widget_jsjs_footercompaniesimages_array);
                if (!is_active_sidebar( 'footer3' ) ) { // check if widget was activated from template. to avoid dupilication
                    update_option("widget_"."widget_jsjb_footercontactus"  , $widget_jsjb_footercontactus_array);
                }
                if (!is_active_sidebar( 'footer1' ) ) { // check if widget was activated from template. to avoid dupilication
                    update_option("widget_"."widget_jsjb_footeraboutus"  , $widget_jsjb_footeraboutus_array);
                }

                // update this array at last
                update_option( "sidebars_widgets" , $widget_positions);


                $wpjobportal_pageid = wpjobportal::$_db->get_var("Select id FROM `" . wpjobportal::$_db->prefix . "posts` WHERE post_name = 'js-support-ticket-controlpanel'");
                if(is_numeric($wpjobportal_pageid) && $wpjobportal_pageid > 0){
                    update_post_meta($wpjobportal_pageid, "_wp_page_template", "templates/template-fullwidth.php");
                }
            // Update the configuration default page to Vehicles
                $query = "UPDATE `".wpjobportal::$_db->prefix."wj_portal_config` SET configvalue = '".esc_sql($jh_pages["newest_jobs"])."' WHERE configname = 'default_pageid'";
                wpjobportaldb::query($query);
                update_option("rewrite_rules", "");
            return 1;
    }

    function insertJobCities($wpjobportal_jobid, $cityid) {
        $wpjobportal_insert_jobcity = "INSERT INTO `" . wpjobportal::$_db->prefix . "wj_portal_jobcities` (`jobid`, `cityid`)
        VALUES( " . esc_sql($wpjobportal_jobid) . ", " . esc_sql($cityid) . ");";
        wpjobportaldb::query($wpjobportal_insert_jobcity);
        return true;
    }

    function getPageList() {
        $query = "SELECT ID AS id, post_title AS text FROM `" . wpjobportal::$_db->prefix . "posts` WHERE post_type = 'page' AND post_status = 'publish' ";
        $pages = wpjobportal::$_db->get_results($query);
        return $pages;
    }

    function getListOfDemoVersions() {
        $post_data = array();// data to posted with curl call
        if(class_exists("job_portal_theme_Options_plugins")){
            job_portal_theme_Options_plugins::getListOfDemoVersions($post_data);
        }
        return ;
    }

    function getDemo($wpjobportal_demoid,$foldername,$wpjobportal_demo_overwrite =0) {
        if($wpjobportal_demoid == ''){
            die('demo not seleceted');
        }

        if($wpjobportal_demoid == ''){
            die('demo not seleceted');
        }
        if($wpjobportal_demo_overwrite == 1){
            WPJOBPORTALincluder::getJSModel('postinstallation')->removeJobPortalDemoData();
        }
        //$wpjobportal_url = 'https://setup.joomsky.com/jobmanagertheme/demoimporter/demos/'.$foldername.'/democode.php';
        $wpjobportal_url = 'https://wpjobportal.com/setup/theme/demoimporter/demos/'.$foldername.'/democode.php';
        //$wpjobportal_url = 'http://192.168.10.20/2023/jobportaltheme/democode.php';
        $post_data = array();
        $response = wp_remote_post( $wpjobportal_url, array('body' => $post_data,'timeout'=>7,'sslverify'=>false));
        if( !is_wp_error($response) && $response['response']['code'] == 200 && isset($response['body']) ){
            $call_result = $response['body'];
        }else{
            $call_result = false;
            if(!is_wp_error($response)){
               $error = $response['response']['message'];
           }else{
                $error = $response->get_error_message();
           }
        }

        if($call_result){
           $return_string = $call_result;
           $wpjobportal_result = json_decode(base64_decode($return_string),true);
           $this->installSampleDataTemplateJobPortal($wpjobportal_result);
           update_option('job_portal_demno_id',$wpjobportal_demoid);// record the id of the demo currently imported.
        }

        // if(class_exists("job_portal_theme_Options_plugins")){
        //     job_portal_theme_Options_plugins::getDemo($wpjobportal_demoid,$foldername,$wpjobportal_demo_overwrite);
        // }
        //$this->installSampleDataTemplateJobPortal();
        // die('post installtion model 1806');
        return;
    }

    function recursiveremove($wpjobportal_dir) {
        if ( ! function_exists( 'WP_Filesystem' ) ) {
            require_once ABSPATH . 'wp-admin/includes/file.php';
        }
        global $wp_filesystem;
        if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ) {
            $creds = request_filesystem_credentials( site_url() );
            wp_filesystem( $creds );
        }
        $wpjobportal_data_directory = WPJOBPORTALincluder::getJSModel('configuration')->getConfigValue('data_directory');
        $wpjobportal_structure = glob(wpjobportalphplib::wpJP_rtrim($wpjobportal_dir, "/").'/*');
        if (is_array($wpjobportal_structure)) {
            foreach($wpjobportal_structure as $file) {
                if (is_dir($file)){
                    if($file != $wpjobportal_dir."/".$wpjobportal_data_directory && $file != $wpjobportal_dir."/languages")
                    $this->recursiveremove($file);
                }elseif (is_file($file)){
                    if($wp_filesystem->exists($file)){
                        if($wp_filesystem->is_writable($file)){
                            if(!wp_delete_file($file)){
                            }else{

                            }
                        }else{

                        }
                    }else{

                    }
                }
            }
        }
        if($wp_filesystem->exists($wpjobportal_dir) && count(glob("$wpjobportal_dir/*")) === 0 ){

            $wp_filesystem->rmdir($wpjobportal_dir);
        }
    }

    function makeDir($wpjobportal_path){
        if ( ! function_exists( 'WP_Filesystem' ) ) {
            require_once ABSPATH . 'wp-admin/includes/file.php';
        }
        global $wp_filesystem;
        if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ) {
            $creds = request_filesystem_credentials( site_url() );
            wp_filesystem( $creds );
        }

        if (!$wp_filesystem->exists($wpjobportal_path)){
            $wp_filesystem->mkdir( $wpjobportal_path, 0755 );
            $ourFileName = $wpjobportal_path.'/index.html';
            $ourFileHandle = $wp_filesystem->put_contents($ourFileName,'');
            if($ourFileHandle !== false){
            }else{
                die("can't open file (".esc_html($ourFileName).")");
            }
        }
    }

    function getWpUsersList() {
        $query = "SELECT ID as id,CONCAT(user_login,' ( ',display_name,' ) - ',id) AS text  FROM `" . wpjobportal::$_db->prefix . "users`";
        $wpjobportal_users = wpjobportal::$_db->get_results($query);
        $wpjobportal_data[0] = (object) array('id' => 0, 'text' => esc_html(__('Select User', 'wp-job-portal')));
        foreach ($wpjobportal_users as $wpjobportal_user) {
            $wpjobportal_data[] = $wpjobportal_user;
        }
        return $wpjobportal_data;
    }

    function addMissingUsers(){
        // wpuid column does not esist in the table. it was showing a query error in log
        $missingUser2 = 0;
        $query = "SELECT ID FROM `" . wpjobportal::$_db->prefix . "users`";
        $wpjobportal_users = wpjobportal::$_db->get_results($query);
        $wpUsers = array();
        $wpjobportal_jsstUsers = array();
        foreach ($wpjobportal_users as $wpjobportal_key => $wpjobportal_user) {
            $wpUsers[] = $wpjobportal_user->ID;
        }
        $query = " SELECT uid AS wpuid FROM `" . wpjobportal::$_db->prefix . "wj_portal_users`";
        $wpjobportal_users = wpjobportal::$_db->get_results($query);
        foreach ($wpjobportal_users as $wpjobportal_key => $wpjobportal_user) {
            $wpjobportal_jsstUsers[] = $wpjobportal_user->wpuid;
        }

        $missingUsers = array_diff($wpUsers,$wpjobportal_jsstUsers);
        foreach ($missingUsers as $missingUser) {
            $query = "SELECT count(id) FROM `" . wpjobportal::$_db->prefix . "wj_portal_users` WHERE uid = " . esc_sql($missingUser);
            $wpjobportal_total = wpjobportal::$_db->get_var($query);
            if ($wpjobportal_total == 0) {
                $query = "SELECT * FROM `" . wpjobportal::$_db->prefix . "users` WHERE id = " . esc_sql($missingUser);
                $wpjobportal_user = wpjobportal::$_db->get_row($query);
                if (isset($wpjobportal_user)) {
                    $wpjobportal_row = WPJOBPORTALincluder::getJSTable('users');
                    $wpjobportal_data['uid'] = $wpjobportal_user->ID;
                    $wpjobportal_data['first_name '] = $wpjobportal_user->display_name;
                    $wpjobportal_data['emailaddress'] = $wpjobportal_user->user_email;
                    $wpjobportal_data['issocial'] = 0;
                    $wpjobportal_data['socialid'] = null;
                    $wpjobportal_data['status'] = 1;
                    $wpjobportal_data['created'] = date_i18n('Y-m-d H:i:s');
                    $wpjobportal_data = wpjobportal::wpjobportal_sanitizeData($wpjobportal_data);
                    $wpjobportal_row->bind($wpjobportal_data);
                    $wpjobportal_row->store();
                    $missingUser2 = 1;
                }
            }
        }
        if ($missingUser2 == 1) {
            //JSSTmessage::setMessage(esc_html(__('Missing user(s) added successfully!', 'wp-job-portal')), 'updated');
        } else {
            //JSSTmessage::setMessage(esc_html(__('No missing user found!', 'wp-job-portal')), 'error');
        }
        return;
    }

    function installSampleDataTemplateJobPortal($wpjobportal_data_arrays) {
        if(isset($wpjobportal_data_arrays['plugin_pages_array'])){
            $wpjobportal_plugin_pages_array = $wpjobportal_data_arrays['plugin_pages_array'];
        }else{
            return 'error in demo data from live';
        }

        if(isset($wpjobportal_data_arrays['other_pages_array'])){
            $other_pages_array = $wpjobportal_data_arrays['other_pages_array'];
        }else{
            return 'error in demo data from live';
        }

        if(isset($wpjobportal_data_arrays['job_portal_posts_array'])){
            $wpjobportal_job_portal_posts_array = $wpjobportal_data_arrays['job_portal_posts_array'];
        }else{
            return 'error in demo data from live';
        }


        if(isset($wpjobportal_data_arrays['menu_array'])){
            $menu_array = $wpjobportal_data_arrays['menu_array'];
        }else{
            return 'error in demo data from live';
        }

        if(isset($wpjobportal_data_arrays['widgets_array'])){
            $widgets_array = $wpjobportal_data_arrays['widgets_array'];
        }else{
            return 'error in demo data from live';
        }

        if(isset($wpjobportal_data_arrays['theme_options'])){
            $wpjobportal_theme_options = $wpjobportal_data_arrays['theme_options'];
        }else{
            return 'error in demo data from live';
        }

        if ( ! function_exists( 'WP_Filesystem' ) ) {
            require_once ABSPATH . 'wp-admin/includes/file.php';
        }
        global $wp_filesystem;
        if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base') ) {
            $creds = request_filesystem_credentials( site_url() );
            wp_filesystem( $creds );
        }


        $wp_upload_dir = wp_upload_dir();
        if ($wp_filesystem->exists(get_template_directory() . "/framework/plugins/sample-data.zip")) {
            do_action('wpjobportal_load_wp_pcl_zip');
            $archive = new PclZip(get_template_directory() . "/framework/plugins/sample-data.zip");
            $v_list = $archive->extract($wp_upload_dir["basedir"]);
        }
        if( ! function_exists("wpjobportal_wp_update_post_meta")){
            function wpjobportal_wp_update_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value = "" ){
                if ( empty( $wpjobportal_value ) OR ! $wpjobportal_value ){
                    delete_post_meta( $post_id, $wpjobportal_field_name );
                }elseif ( ! get_post_meta( $post_id, $wpjobportal_field_name ) ){
                    add_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value );
                }else{
                    update_post_meta( $post_id, $wpjobportal_field_name, $wpjobportal_value );
                }
            }
        }
        if( ! function_exists("wpjobportal_uploadPostFeatureImage")){
            function wpjobportal_uploadPostFeatureImage($filename,$parent_post_id){
                // Check the type of file. We"ll use this as the "post_mime_type".
                $filetype = wp_check_filetype( wpjobportalphplib::wpJP_basename( $filename ), null );
                // Get the path to the upload directory.
                $wp_upload_dir = wp_upload_dir();
                // Prepare an array of post data for the attachment.
                $attachment = array(
                    "guid"           => $wp_upload_dir["url"] . "/" . wpjobportalphplib::wpJP_basename( $filename ),
                    "post_mime_type" => $filetype["type"],
                    "post_title"     => wpjobportalphplib::wpJP_preg_replace( "/\.[^.]+$/", "", wpjobportalphplib::wpJP_basename( $filename ) ),
                    "post_content"   => "",
                    "post_status"    => "inherit"
                );
                // Insert the attachment.
                $attach_id = wp_insert_attachment( $attachment, $filename, $parent_post_id );
                // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
                do_action('wpjobportal_load_wp_image');
                // Generate the metadata for the attachment, and update the database record.
                $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
                wp_update_attachment_metadata( $attach_id, $attach_data );
                set_post_thumbnail( $parent_post_id, $attach_id );
            }
        }
        $jp_pages = array();

        $wp_upload_dir = wp_upload_dir();

    // job portal pages
        // plugin pages.
        $full_width_page_template = "templates/template-fullwidth.php";
        $wp_page_array = array();
        foreach ($wpjobportal_plugin_pages_array as $wpjobportal_key => $page_title) {
            $page_title_string = wpjobportalphplib::wpJP_strtolower($page_title);
            $page_title_string = wpjobportalphplib::wpJP_str_replace(" ","_",$page_title_string);
            $page_content = '[vc_row][vc_column][jp_job_portal_theme_pages page page="'.esc_attr($wpjobportal_key).'"][/vc_column][/vc_row]';
            $jp_pages[$page_title_string] = WPJOBPORTALincluder::getJSModel('postinstallation')->createTemplatePagesGeneric($page_title,$page_content,$full_width_page_template,1);
            $wp_page_array[$page_title_string] = $jp_pages[$page_title_string];
        }
        update_option("job-portal-layout", $wp_page_array);
    // job portal pages end


    // job portal theme pages
    // $other_pages_array = array();


    // // Home

    foreach ($other_pages_array as $wpjobportal_key => $page_data) {
        $page_title = $page_data['page_title'];
        $page_content = $page_data['page_content'];
        $page_template = $page_data['page_template'];
        $wpjobportal_show_header = $page_data['show_header'];
        $page_title_string = wpjobportalphplib::wpJP_strtolower($page_title);
        $page_title_string = wpjobportalphplib::wpJP_str_replace(" ","_",$page_title_string);
        if($page_title_string == 'home'){// to handle page ids for url
            $page_content = str_replace('{page_id}', $jp_pages['newest_jobs'], $page_content);
        }
        $jp_pages[$page_title_string] = WPJOBPORTALincluder::getJSModel('postinstallation')->createTemplatePagesGeneric($page_title,$page_content,$page_template,$wpjobportal_show_header);
    }
    update_option("page_for_posts", $jp_pages["blog"]);

        $jp_post_ids = array();
        $jp_post_ids_for_links = array();
        foreach ($wpjobportal_job_portal_posts_array as $wpjobportal_key => $post_data) {
            // $post_data will have all the relvent information for post creation
            $post_type = $post_data['post_type'];
            $post_title = $post_data['post_title'];
            $post_content = $post_data['post_content'];
            $post_image = $post_data['post_image'];
            $post_meta = $post_data['post_meta'];
            $post_title_string = wpjobportalphplib::wpJP_strtolower($post_title);
            $post_title_string = wpjobportalphplib::wpJP_str_replace(" ","_",$post_title_string);

            // handle dynamic data case
            if($post_title_string == 'register_as_job_seeker'){
                $post_meta['wpj_jp_widget_image_URL_two'] = JOB_PORTAL_THEME_IMAGE.'/register-jobseeker.png';
                $post_meta['wpj_mw_register_btn_link'] = get_the_permalink($jp_pages["jobseeker_registration"]);
            }

            if($post_title_string == 'register_as_employer'){
                $post_meta['wpj_jp_widget_image_URL_two'] = JOB_PORTAL_THEME_IMAGE.'/register-employer.png';
                $post_meta['wpj_mw_register_btn_link'] = get_the_permalink($jp_pages["employer_registration"]);
            }

            // call the function to create post with above data and return post id to keep record(handle remove demo data case)
            $post_id = WPJOBPORTALincluder::getJSModel('postinstallation')->createSamplePosts($post_type,$post_title,$post_content,$post_image,$post_meta);
            $jp_post_ids[] = $post_id;
            $jp_post_ids_for_links[$post_title_string] = $post_id;
        }

        // Pages and custom post are created Now create Menu ----------------

        // Update WP Options
        update_option( "page_on_front", $jp_pages["home"] );
        update_option( "show_on_front", "page" );

        // main array indexes are the page_title_strings strtolower and without spaces

            // echo '<pre>';print_r($menu_array);echo '</pre>';
            // echo '<pre>';print_r($jp_post_ids_for_links);echo '</pre>';
            // die('asdf');
        $menu_name = "Job Portal";
        $menu_exists = wp_get_nav_menu_object( $menu_name );

        // If it doesn"t exist, let"s create it.
        if( !$menu_exists){
            $menu_id = wp_create_nav_menu($menu_name);

            $locations = get_theme_mod("nav_menu_locations");
            $locations["primary"] = $menu_id;
            set_theme_mod( "nav_menu_locations", $locations );

            foreach ($menu_array as $page_string => $menu_item) { // main menu objects
                //createSampleMenuItem($menu_id,$wp_pageid,$parent_id = 0,$title='')
                $wpjobportal_number_of_columns = ''; // to handle the case of menu widgets
                $wp_pageid = $jp_pages[$page_string]; // js_pages has ids of created pages by the title string as index
                $menu_item_type = $menu_item['menu_object'];
                if(isset($menu_item['number_of_columns']) && $menu_item['number_of_columns'] !='' ){
                    $wpjobportal_number_of_columns = $menu_item['number_of_columns'];
                }
                $menu_parent_id = WPJOBPORTALincluder::getJSModel('postinstallation')->createSampleMenuItem($menu_id,$wp_pageid,$menu_item['menu_title'],0,$menu_item_type,$wpjobportal_number_of_columns);
                if( is_array($menu_item['sub_menu']) && !empty($menu_item['sub_menu']) ){
                    foreach ($menu_item['sub_menu'] as $wpjobportal_sub_page_string => $wpjobportal_sub_menu_item) {

                        //jp_menu_widget
                        if(isset($jp_pages[$wpjobportal_sub_page_string])){
                            $wp_pageid = $jp_pages[$wpjobportal_sub_page_string]; // js_pages has ids of created pages by the title string as index
                        }elseif(isset($jp_post_ids_for_links[$wpjobportal_sub_page_string])){
                            $wp_pageid = $jp_post_ids_for_links[$wpjobportal_sub_page_string]; // js_pages has ids of created pages by the title string as index
                        }else{
                            continue; // to avoid any errors. if id not found
                        }

                        $menu_item_type = $wpjobportal_sub_menu_item['menu_object'];
                        $wpjobportal_number_of_columns = ''; // to handle the case of menu widgets
                        if(isset($wpjobportal_sub_menu_item['number_of_columns']) && $wpjobportal_sub_menu_item['number_of_columns'] !='' ){
                            $wpjobportal_number_of_columns = $wpjobportal_sub_menu_item['number_of_columns'];
                        }
                        $wpjobportal_sub_menu_id = WPJOBPORTALincluder::getJSModel('postinstallation')->createSampleMenuItem($menu_id,$wp_pageid,$wpjobportal_sub_menu_item['menu_title'],$menu_parent_id,$menu_item_type,$wpjobportal_number_of_columns);
                    }
                }
            }
        }

        // add widgets to side bars and footer positions
        $params_data = array();
        $params_data['logo'] = JOB_PORTAL_THEME_IMAGE.'/logo.png';
        $params_data['pages'] = $jp_pages;
         // echo '<pre>';print_r($widgets_array);echo '</pre>';
         // die('asdf');
        foreach ($widgets_array as $wpjobportal_key => $widget_data) {
            WPJOBPORTALincluder::getJSModel('postinstallation')->createTemplateWidget($widget_data,$params_data);
        }
        // redux options// template options
        //$redux_options_json = '{"animated_menu":"1", "fixed_menu":"1", "menu_login_logout":"1", "jobs_layout":"1", "footer_copyright_show":"1", "header_bg":"#378AD8", "primary_color":"#378AD8", "copyright_bg":"#378AD8"}';// json is generated from export redux options interface,
        // json is generated from export redux options interface, and stored in data index of this array
        $redux_options_json  = isset($wpjobportal_theme_options['data']) ? $wpjobportal_theme_options['data']: wp_json_encode(array());

        $wpjobportal_options = json_decode($redux_options_json, true);
        $redux_option = ReduxFrameworkInstances::get_instance('job_portal_theme_options');
        global $job_portal_theme_options;
        if(isset($job_portal_theme_options['header_bg']['hover'])){
            $wpjobportal_options['header_bg']['hover'] = $job_portal_theme_options['header_bg']['hover'];// to solve a merge array problem;
        }
        $wpjobportal_options = array_merge($job_portal_theme_options,$wpjobportal_options);
        //$redux_option->set_options($wpjobportal_options);

        $opt_name = 'job_portal_theme_options'; // TODO - Replace with your opt_name
        foreach ($wpjobportal_options as $wpjobportal_key => $wpjobportal_value) {
            Redux::set_option( $opt_name, $wpjobportal_key, $wpjobportal_value );
        }

        //$redux_option->set($wpjobportal_options); // to avoid a notice. not working ....

        // storing values of pages and posts
        update_option('job_portal_theme_demo_pages_ids',$jp_pages);
        update_option('job_portal_theme_demo_post_ids',$jp_post_ids);
        $wpjobportal_demo_data_array = array();
        $wpjobportal_demo_data_array['color'] = isset($wpjobportal_theme_options['color']) ? $wpjobportal_theme_options['color'] : "#378AD8";
        update_option('job_portal_theme_demo_demo_specific_data',$wpjobportal_demo_data_array);



        $wpjobportal_pageid = wpjobportal::$_db->get_var("Select id FROM `" . wpjobportal::$_db->prefix . "posts` WHERE post_name = 'js-support-ticket-controlpanel'");
        if(is_numeric($wpjobportal_pageid) && $wpjobportal_pageid > 0){
            update_post_meta($wpjobportal_pageid, "_wp_page_template", "templates/template-fullwidth.php");
        }
    // Update the configuration default page to Vehicles
        $query = "UPDATE `".wpjobportal::$_db->prefix."wj_portal_config` SET configvalue = '".esc_sql($jp_pages["newest_jobs"])."' WHERE configname = 'default_pageid'";
        wpjobportaldb::query($query);
        update_option("rewrite_rules", "");
            ///die(' all code executed');
        return 1;
    }

    function removeJobPortalDemoData(){
        delete_option("widget_widget_woocommerce_widget_cart");
        delete_option("widget_search");
        delete_option("widget_recent-posts");
        delete_option("widget_recent-comments");
        delete_option("widget_archives");
        delete_option("widget_categories");
        delete_option("widget_meta");
        delete_option("widget_calendar");
        delete_option("widget_widget_wpj_recent_comments");
        delete_option("widget_widget_wpj_recent_posts");
        delete_option("widget_nav_menu");
        delete_option("widget_pages");
        delete_option("widget_tag_cloud");
        delete_option("widget_text");
        delete_option("widget_widget_wpj_footeraboutus");
        delete_option("widget_widget_wpj_footerusefullinks");
        delete_option("widget_widget_wpj_footercontactus");

        $widget_positions = get_option("sidebars_widgets");
        unset($widget_positions["footer1"]);
        unset($widget_positions["footer2"]);
        unset($widget_positions["footer3"]);
        unset($widget_positions["footer4"]);
        unset($widget_positions["left-sidebar"]);
        unset($widget_positions["right-sidebar"]);
        unset($widget_positions["news_and_rumors"]);

        update_option( "sidebars_widgets" , $widget_positions);

        $menu_name = "Job Portal";
        $wpjobportal_del_flag = wp_delete_nav_menu($menu_name);
        $menu_exists = wp_get_nav_menu_object( $menu_name );

        $pages_array = get_option('job_portal_theme_demo_pages_ids');
        if(!empty($pages_array) && is_array($pages_array) ){
            foreach ($pages_array as $wpjobportal_key => $wpjobportal_value) {
                wp_delete_post($wpjobportal_value,true);
            }
        }

        $post_array = get_option('job_portal_theme_demo_post_ids');
        if(!empty($post_array) && is_array($post_array) ){
            foreach ($post_array as $wpjobportal_key => $wpjobportal_value) {
                wp_delete_post($wpjobportal_value,true);
            }
        }
        return;
    }

    function getMessagekey(){
        $wpjobportal_key = 'postinstallation';if(wpjobportal::$_common->wpjp_isadmin()){$wpjobportal_key = 'admin_'.$wpjobportal_key;}return $wpjobportal_key;
    }


    function wpjobportal_uploadPostFeatureImage($filename,$parent_post_id){
        // Check the type of file. We"ll use this as the "post_mime_type".
        $filetype = wp_check_filetype( wpjobportalphplib::wpJP_basename( $filename ), null );
        // Get the path to the upload directory.
        $wp_upload_dir = wp_upload_dir();
        // Prepare an array of post data for the attachment.
        $attachment = array(
            "guid"           => $wp_upload_dir["url"] . "/" . wpjobportalphplib::wpJP_basename( $filename ),
            "post_mime_type" => $filetype["type"],
            "post_title"     => wpjobportalphplib::wpJP_preg_replace( "/\.[^.]+$/", "", wpjobportalphplib::wpJP_basename( $filename ) ),
            "post_content"   => "",
            "post_status"    => "inherit"
        );
        // Insert the attachment.
        $attach_id = wp_insert_attachment( $attachment, $filename, $parent_post_id );
        // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
        do_action('wpjobportal_load_wp_image');
        // Generate the metadata for the attachment, and update the database record.
        $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
        wp_update_attachment_metadata( $attach_id, $attach_data );
        set_post_thumbnail( $parent_post_id, $attach_id );
    }

    function createSamplePosts($post_type,$post_title,$post_content,$file_path = '',$postmeta = array()){
        // $wpjobportal_new_page_template = '';
        $wpjobportal_new_post = array(
                        "post_type" => $post_type,
                        "post_title" => $post_title,
                        "post_content" => $post_content,
                        "post_status" => "publish",
                        "post_author" => 1,
                        "post_parent" => 0,
                );
        $post_id = wp_insert_post($wpjobportal_new_post);
        // update_post_meta($post_id, "_wp_page_template", $wpjobportal_new_page_template);
        if($file_path != ''){
            $this->wpjobportal_uploadPostFeatureImage($file_path,$post_id);
        }
        if(!empty($postmeta)){
            foreach ($postmeta as $meta_key => $meta_value) {
                wpjobportal_wp_update_post_meta($post_id, $meta_key, $meta_value);
            }
        }
        return $post_id;
    }


    function createSampleMenuItem($menu_id,$wp_pageid,$title,$parent_id,$menu_item_type,$wpjobportal_number_of_columns = 0){
        $wpjobportal_itemData = array();
        if($title != ''){
            $wpjobportal_itemData['menu-item-title'] = $title;
        }
        $wpjobportal_itemData["menu-item-object-id"] = $wp_pageid;
        $wpjobportal_itemData["menu-item-parent-id"] = $parent_id;
        $wpjobportal_itemData["menu-item-object"] = $menu_item_type;
        $wpjobportal_itemData["menu-item-type"] = "post_type";
        $wpjobportal_itemData["menu-item-status"] = "publish";
        if($wpjobportal_number_of_columns > 0){
            $wpjobportal_itemData["menu-item-numberofsubcolumns"] = $wpjobportal_number_of_columns;
        }
        // original sample

        $return_parent_id = wp_update_nav_menu_item($menu_id, 0, $wpjobportal_itemData);
        if($wpjobportal_number_of_columns > 0){
            update_post_meta( $return_parent_id, '_menu_item_numberofsubcolumns', $wpjobportal_number_of_columns );
        }
        return $return_parent_id;
    }

    function getPageByTitle($title){
        $query = new WP_Query(
            array(
                'post_type'              => 'page',
                'title'                  => $title,
                'posts_per_page'         => 1,
                'no_found_rows'          => true,
                'update_post_term_cache' => false,
                'update_post_meta_cache' => false,
            )
        );

        if ( ! empty( $query->post ) ) {
            return $query->post;

        } else {
            return false;
        }
    }

    function createTemplatePagesGeneric($page_title,$page_content,$page_template,$wpjobportal_show_header,$file_path=''){
        $wpjobportal_new_page = array(
                "post_type" => "page",
                "post_title" => $page_title,
                "post_content" => $page_content,
                "post_status" => "publish",
                "post_author" => 1,
                "post_parent" => 0,
        );
        $page_check = $this->getPageByTitle($page_title);
        if(!isset($page_check->ID)){
            $page_id = wp_insert_post($wpjobportal_new_page);
        }else{
            $wpjobportal_new_page["post_title"] = "Job Portal ".$page_title;
            $page_check = $this->getPageByTitle($wpjobportal_new_page["post_title"]);
            if(!isset($page_check->ID)){
                $page_id = wp_insert_post($wpjobportal_new_page);
            }else{
                $page_id = $page_check->ID;
            }
        }
        if(isset($page_id) && $page_id != ''){
            update_post_meta($page_id, "jp_show_header", $wpjobportal_show_header);
            update_post_meta($page_id, "jp_headerimage_url", $file_path);
            if($page_template != ''){
                update_post_meta($page_id, "_wp_page_template", $page_template);
            }
        }

        return $page_id;
    }

    function createTemplateWidget($widget_array,$params_data = array()){
        $wpjobportal_name_string = $widget_array['name_string'];
        $widget_position = $widget_array['position_name'];

        // to handle the case of wigdets having dynamic created data

        if(!empty($params_data)){
            if($widget_position == 'footer1'){
                $widget_array['params']['logo'] = $params_data['logo'];
            }elseif ($widget_position == 'footer2') {
                $widget_array['params']['link1'] = get_the_permalink($params_data['pages']["newest_jobs"]);
                $widget_array['params']['link3'] = get_the_permalink($params_data['pages']["search_job"]);
                $widget_array['params']['link2'] = get_the_permalink($params_data['pages']["resume_search"]);
                $widget_array['params']['link4'] = get_the_permalink($params_data['pages']["shortlisted_jobs"]);
                $widget_array['params']['link5'] = get_the_permalink($params_data['pages']["all_companies"]);

            }elseif ($widget_position == 'footer3') {
                $widget_array['params']['link1'] = get_the_permalink($params_data['pages']["my_jobs"]);
                $widget_array['params']['link3'] = get_the_permalink($params_data['pages']["resume_search"]);// corrct ordering
                $widget_array['params']['link2'] = get_the_permalink($params_data['pages']["add_job"]);
                $widget_array['params']['link4'] = get_the_permalink($params_data['pages']["my_companies"]);

            }
        }

        $widget_params = array();
        // to handle the case of same widget on two different positions
        if($widget_position != 'footer3' ){
            $widget_params[1] = $widget_array['params'];
        }else{
            $widget_params =  json_decode( wp_json_encode(get_option("widget_".$wpjobportal_name_string)),true);
            $widget_params[] = $widget_array['params'];
        }

        $widget_params['_multiwidget'] = $widget_array['_multiwidget'];
        update_option("widget_".$wpjobportal_name_string  , $widget_params);

        // set widget in wordpress site bar options
            $widget_positions = get_option("sidebars_widgets");
            if($widget_position != 'footer3' ){ // to handle the case of using same widget in muliple footer positions.
                $widget_positions[$widget_position][] = $wpjobportal_name_string."-1";
            }else{
                $widget_positions[$widget_position][] = $wpjobportal_name_string."-2";
            }
            update_option( "sidebars_widgets" , $widget_positions);
            return;
    }

    function wpjobportal_get_page_by_title( $title ) {
        $wpjobportal_args = array(
            'post_type'   => 'page',
            'title'       => $title,
            'post_status' => 'publish',
            'numberposts' => 1,
        );

        $query = new WP_Query( $wpjobportal_args );

        if ( $query->have_posts() ) {
            return $query->posts[0];
        }

        return null;
    }


}
?>