assign('_wh_url',$_wh_url); //Common Confiuration for domain $urljj = explode('.',$server); $urlkk = $urljj[1]; $ciohttps="https://"; $ciowww="https://www"; if($urlkk=="cioreview1") { $ciodomian="cioreview1.com"; $cio_fulldomian="https://www.cioreview1.com"; $cioname_exp=".cioreview1."; } elseif($urlkk=="cioreview2") { $ciodomian="cioreview2.com"; $cio_fulldomian="https://www.cioreview2.com"; $cioname_exp=".cioreview2."; } else{ $ciodomian="cioreview.com"; $cio_fulldomian="https://www.cioreview.com"; $cioname_exp=".cioreview."; } $smarty->assign('ciohttps',$ciohttps); $smarty->assign('ciowww',$ciowww); $smarty->assign('ciodomian',$ciodomian); $smarty->assign('cio_fulldomian',$cio_fulldomian); $smarty->assign('cioname_exp',$cioname_exp); //---------------------------------- $smarty->assign('server',$server); $smarty->assign('country_code',$country_code); $smarty->assign('image_path',$image_path); $country_code_new = apache_note("GEOIP_COUNTRY_CODE"); $smarty->assign('country_code_new',$country_code_new); $smarty->assign("country_name",$country_name); $r_newurl=$_SERVER['REQUEST_URI']; $smarty->assign("r_newurl",$r_newurl); if($r_newurl=='/magazine/2013--Cloud-Predictions-We-will-Finally-Get-Real-About-Cloud-ERFB976020426.html') { header("HTTP/1.0 404 Not Found"); header("Location: https://www.cioreview.com/news_new/404.php"); exit(); } //echo ""; /* url redirection demo*/ $rep_url=$_SERVER['REQUEST_URI']; $rep_newurl=$_SERVER['HTTP_HOST']; $rep_main=explode('.',$rep_newurl); $rep_subcat=$rep_main[0]; $replace_url=$rep_newurl.$rep_url; $newurl_cat = array('cpg','gis','plm','alm','hpc','bpm','qms','soa','erp','uc','dms','ea','cdn','drs','crm','api','m2m','eam','pt','cm','cem','am','web','dataintegration','cms','ecm','itinfra','epm','m2m','iot','hrtech','salestech','capital-market','smart-city','software-testing','cyber-security','dot-net-development'); $newurl_cat1 = array('consumer-packaged-goods','geographic-information-system','product-lifecycle-management','application-lifecycle-management','high-performance-computing','business-process-management','quality-management-systems','service-oriented-architecture','enterprise-resource-planning','unified-communications','document-management-systems','enterprise-architecture','content-delivery-network','disaster-recovery-services','customer-relationship-mangement','application-programming-interface','machine-to-machine','enterprise-asset-management','productivity-tools','contract-management','customer-experience-management','application-management','web-development','data-integration','content-management-system','enterprise-content-management','it-infrastructure','enterprise-performance-management','machine-to-machine','internet-of-things','hr','sales','capital-markets','smartcity','softwaretesting','cybersecurity','dotnet-development'); $i=0; foreach($newurl_cat as $newurl_cat_redirection) { if($newurl_cat_redirection == $rep_subcat) { $replace_url_new1=str_replace("$newurl_cat_redirection","$newurl_cat1[$i]",$replace_url); header('HTTP/1.1 301 Moved Permanently'); header('location:https://'.$replace_url_new1); exit(0); } $i++; } /* end url redirection demo*/ /*For Whitepapaers*/ function get_url_with_filter($str){ $filter=array('-','/','&','%','_','$','^','(',')','^','*','.',',',':',';','>','<','?','`','~','@','!','#','^','+','=','''); $filtered=str_replace($filter,'',$str); $filter_new = stripslashes(strip_tags(strtolower($filtered))); $str = str_replace(" "," ",$filter_new); $str = str_replace(" "," ",$str); $str = str_replace(" "," ",$str); $str = str_replace(" ","-",$str); $str = str_replace("---","-",$str); $str = str_replace("--","-",$str); $str = str_replace(",","-",$str); $str = str_replace('"','-',$str); $str = str_replace('.','-',$str); $str = str_replace('~','-',$str); $str = str_replace('!','-',$str); $str = str_replace('@','-',$str); $str = str_replace('%','-',$str); $str = str_replace('*','-',$str); $str = str_replace("'",'',$str); $str=str_replace('039','-',$str); return $str; } function get_item_with_undescore($str) { $filter=array('-','/','&','%','_','$','^','(',')','^','*','.',',',':',';','>','<','?','`','~','@','!','#','^','+','='); $filtered=str_replace($filter,'',$str); $filter_new = stripslashes(strip_tags(strtolower($filtered))); $str = str_replace(" "," ",$filter_new); $str = str_replace(" "," ",$str); $str = str_replace(" "," ",$str); $str = str_replace(" ","_",$str); $str = str_replace("---","-",$str); $str = str_replace("--","-",$str); $str = str_replace(",","-",$str); $str = str_replace("'","-",$str); $str = str_replace('"','-',$str); $str = str_replace('.','-',$str); $str = str_replace('~','-',$str); $str = str_replace('!','-',$str); $str = str_replace('@','-',$str); $str = str_replace('%','-',$str); $str = str_replace('*','-',$str); return $str; } function getcategory_name_val_ver($catname) { global $link2; $mainurl = 'https://'.$catname.'.cioreview.com'; $sql_news_cat="select cat_name from cioreview_header where url = '$mainurl'"; $res_cat=$link2->query($sql_news_cat); $data_news_cat=$res_cat->fetch_row(); $cat_name=$data_news_cat[0]; mysqli_free_result($res_cat) ; if(isset($sql_news_cat)){unset($sql_news_cat);} return $cat_name; } if($country_code =='US'){$region1_n='CIOREVIEW';}else{$region1_n='CIOREVIEW_INDIA';} $smarty->assign('region1_n',$region1_n); $urlval=$_SERVER['HTTP_HOST']; $url1=explode($cioname_exp,$urlval); $mainsubcat_12=str_replace('https://','',$url1[0]); $smarty->assign('maincatname',$mainsubcat_12); function cxocat_name($cxocatidname) { global $link2; $sqlcat="select cat_name from cioreview_header where catid = '$cxocatidname'"; $rescxaodata_new=$link2->query($sqlcat); $data_cxoinsight_newval=$rescxaodata_new->fetch_row(); return $data_cxoinsight_newval[0]; } $frnt_stat=''; if($mainsubcat_12=='www') { if (strpos($_SERVER['REQUEST_URI'],'-cid-') !== false) { $contenturlnew = $_SERVER['REQUEST_URI']; $categoryidval = explode('-cid-',$contenturlnew); $categoryidval_1 = str_replace('.html','',$categoryidval[1]); $mainsubcat_121 = cxocat_name($categoryidval_1); $mainsubcat_122 = pagecat_url($categoryidval_1); $smarty->assign('mainsubcat_urlval',$mainsubcat_122); } else { if($urlval=='www.cioreview.com' && $r_newurl=='/') { $mainsubcat_121='Home Page'; $frnt_stat='Main'; } else { $mainsubcat_121='Home Page'; } } } else { $mainsubcat_121=getcategory_name_val_ver($mainsubcat_12); } //echo ""; $smarty->assign('maincategorynamelatest_new',$mainsubcat_121); $smarty->assign('maincategorynamelatest',$mainsubcat_121); $smarty->assign('frnt_stat',$frnt_stat); function pagecat_url($cxocatidname) { global $link2; global $ciodomian; $sqlcat="select url from cioreview_header where catid = '$cxocatidname'"; $rescxaodata_new=$link2->query($sqlcat); $data_cxoinsight_newval=$rescxaodata_new->fetch_row(); return str_replace('cioreview.com',$ciodomian,$data_cxoinsight_newval[0]); } $sqlcat="select catid,pcid from cioreview_header where cat_name like '$mainsubcat_121%'"; $rescat=$link2->query($sqlcat); $datacat=$rescat->fetch_row(); $catidval=$datacat[0]; $pcidval=$datacat[1]; $smarty->assign('catidval',$catidval); /* Dynamic Title & Meta Description*/ $screen_t=$_SERVER['REQUEST_URI']; if($screen_t =='/news/' || strpos($screen_t,'/news/?pgid=') !== false) { $sect=2; } elseif($screen_t =='/cxoinsight/' || strpos($screen_t,'/cxoinsight/?pgid=') !== false) { $sect=3; } elseif($screen_t =='/cioviewpoint/' || strpos($screen_t,'/cioviewpoint/?pgid=') !== false) { $sect=4; } elseif($screen_t =='/ccoinsight/' || strpos($screen_t,'/ccoinsight/?pgid=') !== false) { $sect=5; } elseif($screen_t =='/cfoinsight/' || strpos($screen_t,'/cfoinsight/?pgid=') !== false) { $sect=6; } elseif($screen_t =='/chroinsight/' || strpos($screen_t,'/chroinsight/?pgid=') !== false) { $sect=7; } elseif($screen_t =='/cmoinsight/' || strpos($screen_t,'/cmoinsight/?pgid=') !== false) { $sect=8; } elseif($screen_t =='/csoinsight/' || strpos($screen_t,'/csoinsight/?pgid=') !== false) { $sect=9; } elseif($screen_t =='/cloinsight/' || strpos($screen_t,'/cloinsight/?pgid=') !== false) { $sect=10; } elseif($screen_t =='/cisoinsight/' || strpos($screen_t,'/cisoinsight/?pgid=') !== false) { $sect=11; } elseif($screen_t =='/whitepaper/' || strpos($screen_t,'/whitepaper/?pgid=') !== false) { $sect=12; } elseif($screen_t =='/' || strpos($screen_t,'/pg-') !== false || strpos($screen_t,'/?utm_campaign=') !== false && $server!=="www.cioreview.com") { $sect=1; } else { $sect=0; } $scr_lab1 = explode('/',$screen_t); $scr_lab=$scr_lab1[1]; //echo ""; $smarty->assign('scr_lab',$scr_lab); if(isset($pcidval)) { $sql_seo="SELECT catid,seotitle,metatitle FROM seotitle WHERE catid=$catidval and section=$sect"; $res_seo=$link2->query($sql_seo); if($res_seo->num_rows>0) { $row_seo=$res_seo->fetch_row(); $seo_title=stripslashes($row_seo[1]); $seo_meta_title=$row_seo[2]; } $smarty->assign('seo_title',$seo_title); $smarty->assign('seo_meta_title',$seo_meta_title); } /* Dynamic Title & Meta Description*/ /*** Select FEATURED WHITEPAPER ***/ function filter_specialURL_right($str) { $filter = array('/', '%', '_', '$', '^', '(', ')', '^', '*', ';', '>', '<', '?', "\\"); $filtered = str_replace($filter, '', $str); $filtered = str_replace("'", '', strtolower($filtered)); $filtered = str_replace(' ', ' ', strtolower($filtered)); $filtered = str_replace(' ', ' ', strtolower($filtered)); $filtered = str_replace(' ', '_', strtolower($filtered)); return $filtered; } function my_function_right($str) { $str1 = str_replace(array('&', '"', '''), '', $str); return $str1; } function get_alt_mag($mag_url) { $spl_mag = explode('magazines/',$mag_url); $res_exp=$spl_mag[1]; $alt_text=str_replace('/', '-',$res_exp); return $alt_text; } // function urlselect($cat) // { // global $ciodomian; // global $link2; // $select_url="select url from cioreview_header where catid='$cat'"; // $res_cat_url=$link2->query($select_url); // if($res_cat_url) // { // $data_cat=$res_cat_url->fetch_row(); // $url1=str_replace('cioreview.com',$ciodomian,$data_cat[0]); // mysqli_free_result($res_cat_url) ; // if(isset($select_url)){unset($select_url);} // } // return $url1; // } function get_category_right($id) { global $link2; $get_name = "select cat_name from cioreview_header where catid=$id"; $res = $link2->query($get_name); $row_name =$res->fetch_row(); $name = $row_name[0]; return $name; } function get_category_urlZ($id) { global $link2; global $ciodomian; $get_url="select url from cioreview_header where catid=$id"; $res_url=$link2->query ($get_url); $row_url=$res_url->fetch_row(); $url=str_replace('cioreview.com',$ciodomian,$row_url[0]); return $url; } function get_company_right($id) { global $link2; $get_comp_name = "select company_name from companies_master where id=$id"; $res_comp = $link2->query($get_comp_name); $row_comp_name = $res_comp->fetch_row(); $comp_name = $row_comp_name[0]; return $comp_name; } function get_company_year_right($id) { global $link2; $get_comp_year = "select max(year) from companies where master_id=$id"; $res_comp_year =$link2->query($get_comp_year); $row_comp_year = $res_comp_year->fetch_row(); $comp_year = $row_comp_year[0]; return $comp_year; } function get_company_category_right($id) { global $link2; $get_comp_cat = " select catid, comp_category from companies where master_id=$id order by year desc limit 1;"; $res_comp_cat = $link2->query($get_comp_cat); $row_comp_cat =$res_comp_cat->fetch_row(); $catid = $row_comp_cat[0]; $comp_category = $row_comp_cat[1]; if ($comp_category == '') { if ($catid == 4) $comp_cat = 5; else $comp_cat = 4; } else { $comp_cat = $comp_category; } $company_category = get_category_right($comp_cat); if ($company_category == 'Capital Market') $company_category = 'Capital Markets'; return $company_category; } function http_replce_https($html){ $domains = array("cioreview.com"); $re = '/http(?=:\/\/(?:[^\/]+\.)?(?:' . implode("|", array_map(function ($x) { return preg_quote($x); }, $domains)) . ')\b)/i'; return preg_replace($re, "https", $html); } if($catidval!=1) { $select_featurted1 = "select a.cat_id,a.companyid,a.whitepaterid,a.title,b.priority,a.image_whitepaper,a.image2 ,a.alt_description,a.whitepaper_title_url from white_paper a,featurted_whitepaper_priority b where a.whitepaterid=b.whitepaper_id and b.cat_id=$catidval and a.hide_whitepaper!=1 order by b.priority =0,b.priority limit 4"; $res_featurted1 = $link2->query($select_featurted1); $repete1 = $res_featurted1->num_rows; if($repete1!=0 && $repete1<4) { $select_featurted = "select a.cat_id,a.companyid,a.whitepaterid,a.title,b.priority,a.image_whitepaper,a.image2 ,a.alt_description,a.whitepaper_title_url from white_paper a,featurted_whitepaper_priority b where a.whitepaterid=b.whitepaper_id and b.cat_id in ($catidval,1) and a.hide_whitepaper!=1 group by a.whitepaterid order by b.cat_id desc,b.priority =0,b.priority limit 4"; } elseif($repete1!=0 && $repete1==4) { $select_featurted = "select a.cat_id,a.companyid,a.whitepaterid,a.title,b.priority,a.image_whitepaper,a.image2 ,a.alt_description,a.whitepaper_title_url from white_paper a,featurted_whitepaper_priority b where a.whitepaterid=b.whitepaper_id and b.cat_id =$catidval and a.hide_whitepaper!=1 order by b.priority =0,b.priority limit 4"; } else { $select_featurted = "select a.cat_id,a.companyid,a.whitepaterid,a.title,b.priority,a.image_whitepaper,a.image2 ,a.alt_description,a.whitepaper_title_url from white_paper a,featurted_whitepaper_priority b where a.whitepaterid=b.whitepaper_id and b.cat_id=1 and a.hide_whitepaper!=1 order by b.priority =0,b.priority limit 4"; } } else { $select_featurted = "select a.cat_id,a.companyid,a.whitepaterid,a.title,b.priority,a.image_whitepaper,a.image2 ,a.alt_description,a.whitepaper_title_url from white_paper a,featurted_whitepaper_priority b where a.whitepaterid=b.whitepaper_id and b.cat_id=1 and a.hide_whitepaper!=1 order by b.priority =0,b.priority limit 4"; } $res_featurted = $link2->query($select_featurted); $repete = $res_featurted->num_rows; while ($row_featurted = $res_featurted->fetch_array()) { $f_category[]=$temp2=get_category_right($row_featurted['cat_id']); $f_company[]=$f_cmp=get_company_right($row_featurted['companyid']); $f_cmp_year=get_company_year_right($row_featurted['companyid']); $f_company_category=get_company_category_right($row_featurted['companyid']); $f_wp_id[]=$row_featurted['whitepaterid']; $f_wh_title[]= stripslashes(stripslashes($row_featurted['title'])); $f_short_desc[]=stripslashes($row_featurted['short_description']); $f_image_whitepaper[]=$row_featurted['image_whitepaper']; $f_image_sec[]=$row_featurted['image2']; if($row_featurted['alt_description']!='') { $f_wh_alt[]= stripslashes(stripslashes($row_featurted['alt_description'])); } else { $f_wh_alt[]= stripslashes(stripslashes($row_featurted['title'])); } $desc_url2[]=get_category_urlZ($row_featurted['cat_id'])."/whitepaper/".$row_featurted['whitepaper_title_url']."-wid-".$row_featurted['whitepaterid'].".html"; $f_cat_url[]=get_category_urlZ($row_featurted['cat_id'])."/whitepaper/"; if($f_company_category!='' && $f_cmp_year!='') { $f_cmp_url[]=get_category_urlZ($row_featurted['cat_id'])."/vendor/".$f_cmp_year."/".filter_specialURL_right(strtolower(trim($f_cmp))); } else { $f_cmp_url[]=''; } } $smarty->assign('right_category', $f_category); $smarty->assign('right_category_url', $f_category_url); $smarty->assign('right_company', $f_company); $smarty->assign('right_whitepater_id', $f_wp_id); $smarty->assign('right_title', $f_wh_title); $smarty->assign('right_short_desc', $f_short_desc); $smarty->assign('right_image_whitepaper', $f_image_whitepaper); $smarty->assign('right_image_sec', $f_image_sec); $smarty->assign('right_desc_url', $desc_url2); $smarty->assign('right_cmp_url', $f_cmp_url); $smarty->assign('right_cat_url',$f_cat_url); $smarty->assign('right_wh_alt',$f_wh_alt); if(isset($f_category)){unset($f_category);} if(isset($f_category_url)){unset($f_category_url);} if(isset($f_company)){unset($f_company);} if(isset($f_wp_id)){unset($f_wp_id);} if(isset($f_wh_title)){unset($f_wh_title);} if(isset($f_short_desc)){unset($f_short_desc);} if(isset($f_image_whitepaper)){unset($f_image_whitepaper);} if(isset($desc_url2)){unset($desc_url2);} if(isset($f_cmp_url)){unset($f_cmp_url);} if(isset($f_cat_url)){unset($f_cat_url);} if(isset($temp2)){unset($temp2);} if(isset($f_cmp)){unset($f_cmp);} if(isset($f_cmp_year)){unset($f_cmp_year);} if(isset($f_company_category)){unset($f_company_category);} /*** End ***/ /* For whitepaper */ $_count=count($url1); if($_count>1) { $count_wtpr="select whitepaterid from white_paper where cat_id=$catidval"; $count_res = $link2->query($count_wtpr); $num=$count_res->num_rows; } $_for_whitepaper5=$_SERVER['REQUEST_URI']; $_for_whitepaper9=explode('/',$_for_whitepaper5); $_for_whitepaper3=$_for_whitepaper9[1]; if($_for_whitepaper3!=$_wh_url) { if($_count>1 && $num > 0) { $smarty->assign('_subdomain',$url1[0]); } else { $smarty->assign('_subdomain',''); } } /* end */ /* for slider for ciooutllo*/ if ($catidval==1) { $sql_slider="select sno,imagename,imageurl,subject,cat_id,dateadded,magazine_headline from subscription_slider where cat_id=$catidval order by dateadded desc"; } else { $sql_slider1="select * from subscription_slider where cat_id=$catidval order by dateadded desc"; //echo ""; $res_slider1=$link2->query($sql_slider1); $mysql_slider_cal=$res_slider1->num_rows; $sql_parent_check="select a.catid,a.cat_name,a.pcid from cioreview_header a, (select catid from cioreview_header where pcid=$catidval) b where a.catid=b.catid"; $res_parent_ch=$link2->query($sql_parent_check); $mysql_parent_count=$res_parent_ch->num_rows; $data_slide_parent=$res_parent_ch->fetch_row(); $sno_slide_parent=$data_slide_parent[0]; if($mysql_slider_cal > 0) { $sql_slider="select a.sno,a.imagename,a.imageurl,a.subject,a.cat_id,a.dateadded,a.magazine_headline,b.year from subscription_slider a,ranking_detail b where a.cat_id=$catidval and a.sno=b.mag_id group by b.mag_id order by b.year desc"; } else { if($mysql_parent_count > 0) { $sql_slider="select a.sno,a.imagename,a.imageurl,a.subject,a.cat_id,a.dateadded,a.magazine_headline,b.year from subscription_slider a,ranking_detail b where a.cat_id=$sno_slide_parent and a.sno=b.mag_id group by b.mag_id order by b.year desc"; } elseif($mysql_parent_count == 0) { $sql_cat_in="select pcid,catid from cioreview_header where catid=$catidval"; $res_cat_in=$link2->query($sql_cat_in); $data_cat_slide_row=$res_cat_in->fetch_row(); $pcid_inn=$data_cat_slide_row[0]; $sql_slider111="select sno,imagename,imageurl,subject,cat_id,dateadded from subscription_slider where cat_id=$pcid_inn order by dateadded desc"; //echo ""; $res_slider11=$link2->query($sql_slider111); $mysql_slider_empty=$res_slider11->num_rows; if($mysql_slider_empty == 0) { $sql_slider="select sno,imagename,imageurl,subject,cat_id,dateadded,magazine_headline from subscription_slider where cat_id=1 order by dateadded desc"; } else { $sql_slider="select a.sno,a.imagename,a.imageurl,a.subject,a.cat_id,a.dateadded,a.magazine_headline,b.year from subscription_slider a,ranking_detail b where a.cat_id=$pcid_inn and a.sno=b.mag_id group by b.mag_id order by b.year desc"; } } else { $sql_slider="select sno,imagename,imageurl,subject,cat_id,dateadded,magazine_headline from subscription_slider where cat_id=1 order by dateadded desc"; } } } $res_slider=$link2->query($sql_slider); $mysql_mag_check_empty=$res_slider->num_rows; if($mysql_mag_check_empty==0) { $sql_slider="select a.sno,a.imagename,a.imageurl,a.subject,a.cat_id,a.dateadded,a.magazine_headline,b.year from subscription_slider a,ranking_detail b where a.cat_id=1 and a.sno=b.mag_id group by b.mag_id order by b.year desc"; $res_slider=$link2->query($sql_slider); } $num_count_curissue=$res_slider->num_rows; while($data_slide=$res_slider->fetch_array()) { $sno_slide[]=$data_slide['sno']; $imagename[]=$data_slide['imagename']; $imageurl[]=str_replace('http://', 'https://', $data_slide['imageurl']); $subject[]=$data_slide['subject']; $alt_title[]=get_alt_mag($data_slide['imageurl']); if($data_slide['magazine_headline']=='') { if($data_slide['cat_id']==1){ $cat_name_mag[]=$data_slide['subject']; }else{ $cat_name_mag[]=get_category_right($data_slide['cat_id']); } } else { $cat_name_mag[]=$data_slide['magazine_headline']; } $catidmggg[]=$data_slide['cat_id']; $parts_dt_magzz = explode('-', $data_slide['dateadded']); //$cur_magzz_year[]=$parts_dt_magzz[0]; //$cur_magzz_year[]=date('Y',strtotime($data_slide['dateadded'])); if($data_slide['cat_id']==1){ $cur_magzz_year[]=date('Y',strtotime($data_slide['dateadded'])); }else{ $cur_magzz_year[]=$data_slide['year']; } $currunt_magzz_year=date('Y',strtotime($data_slide['dateadded'])); //$cat_url_mag[]=get_category_urlZ($data_slide['cat_id']); $cat_url_mag[]="https://".get_category_right($data_slide['cat_id']).".cioreview.com/"; //$cat_name_mag[]=$data_slide['subject']; if ($data_slide['cat_id']==1){ $quer_chck="select sno from subscription_slider where imageurl=(select imageurl from subscription_slider where sno = '".$data_slide['sno']."') and cat_id !=1"; $quer_run_chck = $link2->query($quer_chck); $row_quer_chckk=$quer_run_chck->fetch_row(); $chck_sno= $row_quer_chckk[0]; //$quer_rnk="select rank_id,title,weburl,year,cat_id,change_title,change_weburl,master_stat from ranking_detail where year=$currunt_magzz_year and cat_id=(select cat_id from subscription_slider where sno='".$row_quer_chckk['sno']."' and cat_id!=1) order by year asc limit 1"; $quer_rnk="select rank_id,title,weburl,year,cat_id,change_title,change_weburl,master_stat from ranking_detail where year=$currunt_magzz_year and mag_id=".$chck_sno." order by year asc limit 1"; } else{ $quer_rnk="select rank_id,title,weburl,year,cat_id,change_title,change_weburl,master_stat from ranking_detail where year=".$data_slide['year']." and mag_id=".$data_slide['sno']." order by year desc limit 1"; } $sql_quer_rnk=$link2->query($quer_rnk); $row_quer_rnk=$sql_quer_rnk->fetch_row(); $num_count_rankchck=$sql_quer_rnk->num_rows; /* echo "";*/ if($num_count_rankchck > 0){ if($row_quer_rnk[5]!='') { $data_rnktitle= $row_quer_rnk[5]; $data_rnkweburl= $row_quer_rnk[6]; } else{ $data_rnktitle= $row_quer_rnk[1]; $data_rnkweburl= $row_quer_rnk[2]; } $make_rnkurl1=explode(' '.$row_quer_rnk[3],str_replace('-', ' ', $data_rnkweburl)); $make_rnkurl2=explode(' ',$make_rnkurl1[0]); $make_rnkurl=implode('-',$make_rnkurl2); //echo ""; if($row_quer_rnk[7]==1){ $rnkurl_mag_new[]=get_category_urlZ($row_quer_rnk[4])."/vendors/".strtolower($data_rnkweburl).".html"; } else{ $rnkurl_mag_new[]=get_category_urlZ($row_quer_rnk[4])."/vendors/".$data_rnkweburl.".html"; } //print_r($rnkurl_mag); } else{ $rnkurl_mag_new[]="#"; } /*$select_rnktab="select rank_id,weburl,cat_id from ranking_detail a, subscription_slider b where a.mag_url = b.imageurl and b.cat_id=".$data_slide['cat_id']." order by rank_id desc limit 1"; $res_rnktab=$link2->query($select_rnktab); $data_rnktab = $res_rnktab->fetch_row();*/ //$full_rnktab[]=pagecat_url($data_rnktab['cat_id'])."/vendors/".strtolower($data_rnktab['weburl']).".html"; } $smarty->assign('rnkurl_mag_new',$rnkurl_mag_new); $smarty->assign('cat_name_mag',$cat_name_mag); $smarty->assign('sno_slide',$sno_slide); $smarty->assign('imagename',$imagename); $smarty->assign('imageurl',$imageurl); $smarty->assign('subject',$subject); $smarty->assign('alt_title',$alt_title); $smarty->assign('mysql_slider_cal',$mysql_slider_cal); $smarty->assign('mysql_parent_count',$mysql_parent_count); $smarty->assign('catname_parent',$catname_parent); $smarty->assign('cat_slide_parent',$cat_slide_parent); $smarty->assign('mysql_slider_empty',$mysql_slider_empty); $smarty->assign('cur_magzz_year',$cur_magzz_year); $smarty->assign('cat_url_mag',$cat_url_mag); $smarty->assign('full_rnktab',$full_rnktab); $smarty->assign('num_count_curissue',$num_count_curissue); /**/ /*For getting main cat name*/ $sqlmaincat="select cat_name from cioreview_header where catid='$pcidval'"; $resmaincat=$link2->query($sqlmaincat); $datamain=$resmaincat->fetch_row(); $catname=$datamain[0]; if($catidval!=1) { /*For cxo insight*/ $sql_cxoinsightnew="select headline,newsno,category,image6,source from sin001.news where category='$catidval' and newscategory=2 order by ndate desc limit 3"; $res_newscxo=$link2->query($sql_cxoinsightnew); $cxoinsightcalnum=$res_newscxo->num_rows; while($cxonewdata=$res_newscxo->fetch_array()) { $headlinecxodata[]=stripslashes($cxonewdata['headline']); $newsnocxodata[]=$cxonewdata['newsno']; $imagecxodata[]=$cxonewdata['image6']; $sourcecxodata[]=$cxonewdata['source']; $cxoinsight_url[]='https://'.str_replace('-&-','-',str_replace(' ','-',strtolower(cxocat_name($cxonewdata['category'])))).'.'.$ciodomian.'/cxoinsight/'.get_url_with_filter(strtolower($cxonewdata['headline'])).'-nid-'.$cxonewdata['newsno'].'-cid-'.$datacat[0].'.html'; } /*For cio viewpoint*/ $sql_cioviewpointnew="select headline,newsno,category,image6,source from sin001.news where category='$catidval' and newscategory=3 order by ndate desc limit 3"; $res_newscio=$link2->query($sql_cioviewpointnew); $cioinsightcalnum=$res_newscio->num_rows; while($cionewdata=$res_newscio->fetch_array()) { $headlineciodata[]=stripslashes($cionewdata['headline']); $newsnociodata[]=$cionewdata['newsno']; $imageciodata[]=$cionewdata['image6']; $sourceciodata[]=$cionewdata['source']; $cioviewpoint_url[]='https://'.str_replace('-&-','-',str_replace(' ','-',strtolower(cxocat_name($cionewdata['category'])))).'.'.$ciodomian.'/cioviewpoint/'.get_url_with_filter(strtolower($cionewdata['headline'])).'-nid-'.$cionewdata['newsno'].'-cid-'.$datacat[0].'.html'; } } else { /*For cxo insight*/ $sql_cxoinsightnew="select headline,newsno,category,image6,source from sin001.news where newscategory=2 and ndate > '2014-04-25' order by RAND() desc limit 3"; $res_newscxo=$link2->query($sql_cxoinsightnew); $cxoinsightcalnum=$res_newscxo->num_rows; while($cxonewdata=$res_newscxo->fetch_array()) { $headlinecxodata[]=stripslashes($cxonewdata['headline']); $newsnocxodata[]=$cxonewdata['newsno']; $imagecxodata[]=$cxonewdata['image6']; $sourcecxodata[]=$cxonewdata['source']; $cxoinsight_url[]='https://'.str_replace('-&-','-',str_replace(' ','-',strtolower(cxocat_name($cxonewdata['category'])))).'.'.$ciodomian.'/cxoinsight/'.get_url_with_filter($cxonewdata['headline']).'-nid-'.$cxonewdata['newsno'].'-cid-'.$datacat[0].'.html'; } /*For cio viewpoint*/ $sql_cioviewpointnew="select headline,newsno,category,image6,source from sin001.news where newscategory=3 and ndate > '2014-04-25' order by RAND() desc limit 3"; $res_newscio=$link2->query($sql_cioviewpointnew); $cioinsightcalnum=$res_newscio->num_rows; while($cionewdata=$res_newscio->fetch_array()) { $headlineciodata[]=stripslashes($cionewdata['headline']); $newsnociodata[]=$cionewdata['newsno']; $imageciodata[]=$cionewdata['image6']; $sourceciodata[]=$cionewdata['source']; $cioviewpoint_url[]='https://'.str_replace('-&-','-',str_replace(' ','-',strtolower(cxocat_name($cionewdata['category'])))).'.'.$ciodomian.'/cioviewpoint/'.get_url_with_filter($cionewdata['headline']).'-nid-'.$cionewdata['newsno'].'-cid-'.$datacat[0].'.html'; } } $smarty->assign('cxoinsightcalnum',$cxoinsightcalnum); $smarty->assign('cioinsightcalnum',$cioinsightcalnum); $smarty->assign('headlinecxodata',$headlinecxodata); $smarty->assign('newsnocxodata',$newsnocxodata); $smarty->assign('cxoinsight_url',$cxoinsight_url); $smarty->assign('headlineciodata',$headlineciodata); $smarty->assign('newsnociodata',$newsnociodata); $smarty->assign('cioviewpoint_url',$cioviewpoint_url); $smarty->assign('imageciodata',$imageciodata); $smarty->assign('imagecxodata',$imagecxodata); $smarty->assign('sourceciodata',$sourceciodata); $smarty->assign('sourcecxodata',$sourcecxodata); $mkl_one="select * from sin001.news where category=246 order by newsno desc limit 4"; $mkl_two=$link2->query($mkl_one); $mkl_three=$mkl_two->num_rows; while($mkl_four=$mkl_two->fetch_array()) { $head_k[]=$mkl_four['headline']; $source_k[]=$mkl_four['source']; $image_k[]=$mkl_four['image3']; $news_k[]="https://www.cioreview.com/news/".stringfilternew(strtolower($mkl_four['headline'])).'-nid-'.$mkl_four['newsno'].'-cid-'.$mkl_four['category'].'.html'; $nameOfMonth_two[]= date("F", strtotime($mkl_four['ndate'])); $nameOfYear_two[]= date("Y", strtotime($mkl_four['ndate'])); $nameOfdate_two[]= date("d", strtotime($mkl_four['ndate'])); $nameOfDay_two[]= date("l", strtotime($mkl_four['ndate'])); } $smarty->assign('mkl_three',$mkl_three); $smarty->assign('head_k',$head_k); $smarty->assign('image_k',$image_k); $smarty->assign('source_k',$source_k); $smarty->assign('news_k',$news_k); $smarty->assign('nameOfMonth_two',$nameOfMonth_two); $smarty->assign('nameOfYear_two',$nameOfYear_two); $smarty->assign('nameOfDay_two',$nameOfDay_two); $smarty->assign('nameOfdate_two',$nameOfdate_two); /*For Content Copy Restiriction Notification Message*/ $get_request_url_for_mesg=$_SERVER['REQUEST_URI']; $get_http_url=$_SERVER['HTTP_HOST']; $show_message_for_notification="https://".$get_http_url.$get_request_url_for_mesg; $smarty->assign('show_message_for_notification',$show_message_for_notification); //for enable or disable (new, viewpoint, cxo_insight and vendors). $_for_whitepaper2=$_SERVER['REQUEST_URI']; $_for_whitepaper1=explode('/',$_for_whitepaper2); $_for_whitepaper=$_for_whitepaper1[1]; if($_for_whitepaper!='whitepaper') { $sel_stat_qry="select news, cio_viewpoint, cxo_insight, vendors,cco_insight,cfo_insight,chro_insight,cmo_insight,cso_insight,clo_insight,ciso_insight,case_study from subcat_selection where cat_id=$catidval"; $res_stat=$link2->query($sel_stat_qry); while($stat_row=$res_stat->fetch_array()) { $_news=$stat_row[0]; $_viewpoint=$stat_row[1]; $_insight=$stat_row[2]; $_vendors=$stat_row[3]; $_cco_insight=$stat_row[4]; $_cfo_insight=$stat_row[5]; $_chro_insight=$stat_row[6]; $_cmo_insight=$stat_row[7]; $_cso_insight=$stat_row[8]; $_clo_insight=$stat_row[9]; $_ciso_insight=$stat_row[10]; $_case_study=$stat_row[11]; } if($_case_study=='1') { $ven_max=2; $bot_col=1; } else { $ven_max=3; $bot_col=2; } $smarty->assign('_news',$_news); $smarty->assign('_viewpoint',$_viewpoint); $smarty->assign('_insight',$_insight); $smarty->assign('_vendors',$_vendors); $smarty->assign('_cco_insight',$_cco_insight); $smarty->assign('_cfo_insight',$_cfo_insight);$smarty->assign('_chro_insight',$_chro_insight);$smarty->assign('_cmo_insight',$_cmo_insight); $smarty->assign('_cso_insight',$_cso_insight);$smarty->assign('_clo_insight',$_clo_insight);$smarty->assign('_ciso_insight',$_ciso_insight); $smarty->assign('_case_study',$_case_study); $smarty->assign('ven_max',$ven_max); $smarty->assign('bot_col',$bot_col); } // end // //for vendors url $get_count="select year from ranking_detail where cat_id=$catidval order by year desc limit 1"; $res_count=$link2->query($get_count); while($year_row=$res_count->fetch_array()) { $vendor_year=$year_row['year']; } if($vendor_year=='') { $vendor_year='2014'; } $vendor_url="/vendors/".$vendor_year."/"; $smarty->assign('vendor_url',$vendor_url); // end // //-------------------------rank hide feature vendor $get_news_rside_catww="select companyid,comp_category,companyname,company_newname,year,management_name,companydesc,logo from companies where comp_category=$catidval and year in(select distinct year from ranking_detail where cat_id=$catidval and rank_priority=0) and char_length(companydesc)>408 order by dateadded desc"; //echo ""; $res_featurted_rnewsww = $link2->query($get_news_rside_catww); $repete_rnewsww = $res_featurted_rnewsww->num_rows; while($row_news_rsideww=$res_featurted_rnewsww->fetch_array()) { preg_match_all('/]+src=([\'"])(?.+?)\1[^>]*>/i', $row_news_rsideww['companydesc'], $matches); $ven_companyid[]=$row_news_rsideww['companyid']; $ven_companyname[]=$row_news_rsideww['companyname']; $ven_management_name[]=$row_news_rsideww['management_name']; $ven_year[]=$row_news_rsideww['year']; $ven_logo[]=$row_news_rsideww['logo']; $ven_comp_url_fvr[]= stripslashes(str_replace('-&-','-',str_replace(' ','-',strtolower(sub_cat_latest_section1($row_news_rsideww['comp_category'])))))."/vendor/".$row_news_rsideww['year']."/".filter_specialURL_right($row_news_rsideww['company_newname']); $ven_vimage_fv[]=str_replace('http://', 'https://', $matches['src'][0]); } $smarty->assign('ven_companyid',$ven_companyid); $smarty->assign('ven_companyname',$ven_companyname); $smarty->assign('ven_management_name',$ven_management_name); $smarty->assign('ven_year',$ven_year); $smarty->assign('ven_comp_url_fvr',$ven_comp_url_fvr); $smarty->assign('ven_vimage_fv',$ven_vimage_fv); $smarty->assign('repete_rnewsww',$repete_rnewsww); $smarty->assign('ven_logo',$ven_logo); // end // //-------------------------news listing if($catidval!=1 && $_news==1) { $get_news_rside_cat="select newsno,headline,news_type,newscategory,category,image3,image6 from sin001.news where newscategory=1 and category=$catidval and image3 is not null order by newsno desc limit 10"; $res_featurted_rnews = $link2->query($get_news_rside_cat); $repete_rnews = $res_featurted_rnews->num_rows; if($repete_rnews<4 && $repete_rnews!=0) { $get_news_rside="select * from ((select newsno,headline,news_type,newscategory,category,image3,image6 from sin001.news where newscategory=1 and category=$catidval and image3 is not null order by newsno desc) union (select newsno,headline,news_type,newscategory,category,image3,image6 from sin001.news where newscategory=1 and category not in ($catidval,1) and image3 is not null order by newsno desc limit 10)) q order by category=$catidval desc"; } elseif($repete_rnews==0) { $get_news_rside="select newsno,headline,news_type,newscategory,category,image3,image6,ndate from sin001.news where newscategory=1 and image3 is not null order by newsno desc limit 10"; } else { $get_news_rside="select newsno,headline,news_type,newscategory,category,image3,image6,ndate from sin001.news where newscategory=1 and category=$catidval and image3 is not null order by newsno desc limit 10"; } } else { $get_news_rside="select newsno,headline,news_type,newscategory,category,image3,image6,ndate from sin001.news where newscategory=1 and image3 is not null order by newsno desc limit 10"; } if($catidval=='114') { $maxxx_rside='4'; } else { $maxxx_rside='5'; } $res_news_rside=$link2->query($get_news_rside); while($row_news_rside=$res_news_rside->fetch_array()) { $newsno_rside[]=$row_news_rside['newsno']; $headline_rside[]=$row_news_rside['headline']; $news_type_rside[]=$row_news_rside['news_type']; $newscategory_rside[]=$row_news_rside['newscategory']; $category_rside[]=$row_news_rside['category']; if($row_news_rside['image6']!=''){ $image5_rside[]=$cio_fulldomian."/newsimages/".$row_news_rside['image6']; } else{ $image5_rside[]=$cio_fulldomian."/newsimages/".$row_news_rside['image3']; } $news_url3_rside[]=$cio_fulldomian."/news/".get_url_with_filter(strtolower($row_news_rside['headline'])).'-nid-'.$row_news_rside['newsno'].'-cid-'.$row_news_rside['category'].'.html'; $nameOfdate1[]= date("d", strtotime($row_news_rside['ndate'])); $nameOfDay1[]= date("l", strtotime($row_news_rside['ndate'])); $nameOfMonth1[]= date("F", strtotime($row_news_rside['ndate'])); $nameOfYear1[]= date("Y", strtotime($row_news_rside['ndate'])); } //echo ""; $smarty->assign('newsno_rside',$newsno_rside); $smarty->assign('headline_rside',$headline_rside); $smarty->assign('news_type_rside',$news_type_rside); $smarty->assign('newscategory_rside',$newscategory_rside); $smarty->assign('image5_rside',$image5_rside); $smarty->assign('news_url3_rside',$news_url3_rside); $smarty->assign('maxxx_rside',$maxxx_rside); $smarty->assign('nameOfdate1',$nameOfdate1); $smarty->assign('nameOfDay1',$nameOfDay1); $smarty->assign('nameOfMonth1',$nameOfMonth1); $smarty->assign('nameOfYear1',$nameOfYear1); //------------------------- //* for identify which Vendor tab should be bold // function get_venors_year($weburl) { global $link2; $sql_vend="SELECT year FROM ranking_detail WHERE weburl='$weburl' or change_weburl='$weburl'"; $res_vend=$link2->query($sql_vend); if($res_vend) { $row_vend=$res_vend->fetch_row(); $yr_vend=$row_vend[0]; } return $yr_vend; } $tmp_url=$_SERVER['REQUEST_URI']; $tmp_url2=explode("/",$tmp_url); $bold=$tmp_url2[1]; $exp_vend=explode("/",$tmp_url); $vendor_bold=get_venors_year(str_replace('.html','',$exp_vend[2])); if($vendor_bold) { $boldyear=$vendor_bold; } else { $boldyear=$tmp_url2[2]; } if($bold=='vendors' || $bold=='vendor') { $smarty->assign('t33',$bold); } if($bold=="vendor") { $bold="vendors"; } $smarty->assign('bold',$bold); $smarty->assign('boldyear',$boldyear); // end // //for vendors url New design $get_yeary="select distinct year,cat_id,rank_priority from ranking_detail where cat_id=$catidval and rank_priority!=0 order by year desc"; $res_urly=$link2->query($get_yeary); $year_count=$res_urly->num_rows; while($row_urly=$res_urly->fetch_row()) { $vendor_yeary[]=$row_urly[0]; $vendor_catidyy[]=$row_urly[1]; $vendor_urly[]="/vendors/".$row_urly[0]."/"; $vendor_Catnamey[]=get_url_with_filter(Get_Catname($row_urly[1])); $vendor_rnkpri[]=$row_urly[2]; } $smarty->assign('vendor_urly',$vendor_urly); $smarty->assign('vendor_yeary',$vendor_yeary); $smarty->assign('vendor_catidyy',$vendor_catidyy); $smarty->assign('vendor_Catnamey',$vendor_Catnamey); $smarty->assign('year_count',$year_count); $smarty->assign('vendor_rnkpri',$vendor_rnkpri); $get_yeary_more="select distinct year,cat_id,rank_priority from ranking_detail where cat_id=$catidval and rank_priority!=0 order by year desc"; $res_urly_more=$link2->query($get_yeary_more); while($row_urly_more=$res_urly_more->fetch_row()) { $vendor_yeary_more[]=$row_urly_more[0]; $vendor_catidyy_more[]=$row_urly_more[1]; $vendor_rnkpri_more[]=$row_urly_more[2]; } $smarty->assign('vendor_yeary_more',$vendor_yeary_more); $smarty->assign('vendor_catidyy_more',$vendor_catidyy_more); $smarty->assign('vendor_rnkpri_more',$vendor_rnkpri_more); /*For Ranking Information*/ $sql_rank_all="SELECT rank_id,cat_id,title,rank_image,rank_desc,year,weburl,change_title,change_weburl,master_stat FROM ranking_detail WHERE rank_priority=1 AND cat_id=$catidval order by year desc"; $res_rank_all=$link2->query ($sql_rank_all); if($res_rank_all->num_rows>0) { while($row_rank_all=$res_rank_all->fetch_array()) { if($row_rank_all['change_title']!='') { $rnk_title_all[]= $row_rank_all['change_title']; $rnk_weburl_all= $row_rank_all['change_weburl']; } else{ $rnk_title_all[]= $row_rank_all['title']; $rnk_weburl_all= $row_rank_all['weburl']; } $make_rnkurl1=explode(' '.$row_rank_all['year'],str_replace('-', ' ', $rnk_weburl_all)); $make_rnkurl2=explode(' ',$make_rnkurl1[0]); $make_rnkurl=implode('-',$make_rnkurl2); if($row_rank_all['master_stat']==1){ $full_rnkurl_all[]=stripslashes(str_replace('-&-','-',str_replace(' ','-',strtolower(sub_cat_latest_section1($row_rank_all['cat_id'])))))."/vendors/".strtolower($make_rnkurl).".html"; } else{ $full_rnkurl_all[]=stripslashes(str_replace('-&-','-',str_replace(' ','-',strtolower(sub_cat_latest_section1($row_rank_all['cat_id'])))))."/vendors/".strtolower($rnk_weburl_all).".html"; } $rnk_id_all[]=$row_rank_all['rank_id']; $rnk_cat_id_all[]=$row_rank_all['cat_id']; $rnk_title_all[]=$row_rank_all['title']; $rnk_image_all[]=$row_rank_all['rank_image']; $rnk_desc_all[]=$row_rank_all['rank_desc']; $rnk_year_all[]=$row_rank_all['year']; $vendor_Catnamey_all[]=get_url_with_filter(Get_Catname($row_rank_all['cat_id'])); $rnk_url_all[]=$cio_fulldomian."/outlook/".strtolower(stripslashes(get_url_with_filter(str_replace("'","", $row_rank_all['title'])))).'-cid-'.$row_rank_all['cat_id'].'-rnktid-'.$row_rank_all['rank_id'].'.html'; } $smarty->assign('full_rnkurl_all',$full_rnkurl_all); $smarty->assign('rnk_cat_id_all',$rnk_cat_id_all); $smarty->assign('rnk_id_all',$rnk_id_all); $smarty->assign('rnk_cat_id_all',$rnk_cat_id_all); $smarty->assign('rnk_cat_name_all',$rnk_cat_name_all); $smarty->assign('rnk_title_all',$rnk_title_all); $smarty->assign('rnk_image_all',$rnk_image_all); $smarty->assign('rnk_desc_all',$rnk_desc_all); $smarty->assign('rnk_url_all',$rnk_url_all); $smarty->assign('rnk_year_all',$rnk_year_all); $smarty->assign('vendor_Catnamey_all',$vendor_Catnamey_all); } function Get_Catname($catidval) { global $link2; $sql_catid="SELECT cat_name FROM cioreview_header WHERE catid='$catidval'"; $res_catid=$link2->query($sql_catid); if($res_catid) { $row_catid=$res_catid->fetch_row(); $get_Catname=$row_catid[0]; } return $get_Catname; } function rnkimg($catidval,$year) { global $link2; $sql_rnkimg="select rank_image from ranking_detail where cat_id=$catidval and year=$year"; $res_rnkimg=$link2->query($sql_rnkimg); if($res_rnkimg) { $row_rnkimg=$res_rnkimg->fetch_row(); $get_rnkimg=$row_rnkimg[0]; } return $get_rnkimg; } function rnktitle($catidval,$year) { global $link2; $sql_rnktitle="select title from ranking_detail where cat_id=$catidval and year=$year"; $res_rnktitle=$link2->query($sql_rnktitle); if($res_rnktitle) { $row_rnktitle=$res_rnktitle->fetch_row(); $get_rnktitle=$row_rnktitle[0]; } return $get_rnktitle; } // end // function Get_Cat_Name($main_url) { global $link2; $sql_url="SELECT cat_name FROM cioreview_header WHERE url='https://$main_url'"; $res_url=$link2->query($sql_url) or die(mysql_error()); if($res_url->num_rows>0) { $row_url=$res_url->fetch_row(); $send_cat_name=$row_url[0]; } return $send_cat_name; } //Nomination Data Information $sql_nm="SELECT nm_id,catid,title,nm_image,priority FROM nomination_detail where priority=1"; $res_nm=$link2->query($sql_nm); $count_nm=$res_nm->num_rows; if($count_nm>0) { while($row_nm=$res_nm->fetch_array()) { $nm_id[]=$row_nm['nm_id']; $nm_cat_id[]=$row_nm['catid']; $nm_title[]=stripslashes($row_nm['title']); $nm_image[]=$row_nm['nm_image']; $priority[]=$row_nm['priority']; $nm_url[]=$cio_fulldomian."/nominate/".stripslashes(stringfilternew(str_replace("'","",$row_nm['title']))).'-cid-'.$row_nm['catid'].'-nmid-'.$row_nm['nm_id'].'.html'; } if(in_array($catidval,$nm_cat_id) || $catidval==1 || $catidval==36) { $smarty->assign('flag',1); } $smarty->assign('nm_id',$nm_id); $smarty->assign('nm_cat_id',$nm_cat_id); $smarty->assign('nm_title',$nm_title); $smarty->assign('nm_image',$nm_image); $smarty->assign('nm_priority',$priority); $smarty->assign('nm_url',$nm_url); } /*For editor pick */ $high=$_COOKIE['SICONTRY']; $smarty->assign('high',$high); $smarty->assign('repete',$repete); function sub_cat_latest_section1($catidval) { global $link2; global $ciodomian; $sql="select url from cioreview_header where catid=$catidval"; $res=$link2->query ($sql); while($row=$res->fetch_array()) { $cat_id=str_replace('cioreview.com',$ciodomian,trim($row['url'])); } return $cat_id; } if($mainsubcat_121=='Home Page'){ if($tmp_url=='/contact-us/'){ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 3"; } elseif($tmp_url=='/privacy-policy/'){ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 12"; } else{ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 12"; } $resedi1=$link2->query($sql_edi1); while($data_edi1=$resedi1->fetch_array()) { $newsnoedi1[]=$data_edi1['newsno']; $headlineedi1[]=stripslashes($data_edi1['headline']); $sourceedi1[]=$data_edi1['source']; $imgedi1[]=$data_edi1['image5']; $categoryedi1[]=$data_edi1['category']; if($data_edi1['newscategory']==3) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cioviewpoint/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==5) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cfoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==6) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/chroinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==7) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cmoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } else { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cxoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } } $smarty->assign('newsnoedi1',$newsnoedi1); $smarty->assign('headlineedi1',$headlineedi1); $smarty->assign('sourceedi1',$sourceedi1); $smarty->assign('imgedi1',$imgedi1); $smarty->assign('categoryedi1',$categoryedi1); $smarty->assign('edi_url1',$edi_url1); } else{ if($tmp_url=='/contact-us/'){ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 3"; } elseif($tmp_url=='/privacy-policy/'){ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 12"; } else{ $sql_edi1="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 20"; } $resedi1=$link2->query($sql_edi1); while($data_edi1=$resedi1->fetch_array()) { $newsnoedi1[]=$data_edi1['newsno']; $headlineedi1[]=stripslashes($data_edi1['headline']); $sourceedi1[]=$data_edi1['source']; $imgedi1[]=$data_edi1['image5']; $categoryedi1[]=$data_edi1['category']; if($data_edi1['newscategory']==3) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cioviewpoint/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==5) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cfoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==6) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/chroinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } elseif($data_edi1['newscategory']==7) { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cmoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } else { $edi_url1[]=sub_cat_latest_section1($data_edi1['category']).'/cxoinsight/'.get_url_with_filter(strtolower($data_edi1['headline'])).'-nid-'.$data_edi1['newsno'].'-cid-'.$data_edi1['category'].'.html'; } } $smarty->assign('newsnoedi1',$newsnoedi1); $smarty->assign('headlineedi1',$headlineedi1); $smarty->assign('sourceedi1',$sourceedi1); $smarty->assign('imgedi1',$imgedi1); $smarty->assign('categoryedi1',$categoryedi1); $smarty->assign('edi_url1',$edi_url1); } //echo ""; /*For editor pick For Category*/ $get=$_SERVER['REQUEST_URI']; $get=explode('/',$_SERVER['REQUEST_URI']); $g=$get[1]; //if($g=='' && $rep_subcat!='www') if($g==''){ $editor_subcat="ppp"; $smarty->assign('editor_subcat',$editor_subcat); $smarty->assign('section','editor_subcat'); } $sql_edi2="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 20"; $resedi2=$link2->query($sql_edi2); while($data_edi2=$resedi2->fetch_array()) { $newsnoedi2[]=$data_edi2['newsno']; $headlineedi2[]=stripslashes($data_edi2['headline']); $sourceedi2[]=$data_edi2['source']; $imgedi2[]=$data_edi2['image5']; $categoryedi2[]=$data_edi2['category']; if($data_edi2['newscategory']==3) { $edi_url2[]=sub_cat_latest_section1($data_edi2['category']).'/cioviewpoint/'.get_url_with_filter(strtolower($data_edi2['headline'])).'-nid-'.$data_edi2['newsno'].'-cid-'.$data_edi2['category'].'.html'; } elseif($data_edi2['newscategory']==5) { $edi_url2[]=sub_cat_latest_section1($data_edi2['category']).'/cfoinsight/'.get_url_with_filter(strtolower($data_edi2['headline'])).'-nid-'.$data_edi2['newsno'].'-cid-'.$data_edi2['category'].'.html'; } elseif($data_edi2['newscategory']==6) { $edi_url2[]=sub_cat_latest_section1($data_edi2['category']).'/chroinsight/'.get_url_with_filter(strtolower($data_edi2['headline'])).'-nid-'.$data_edi2['newsno'].'-cid-'.$data_edi2['category'].'.html'; } elseif($data_edi2['newscategory']==7) { $edi_url2[]=sub_cat_latest_section1($data_edi2['category']).'/cmoinsight/'.get_url_with_filter(strtolower($data_edi2['headline'])).'-nid-'.$data_edi2['newsno'].'-cid-'.$data_edi2['category'].'.html'; } else { $edi_url2[]=sub_cat_latest_section1($data_edi2['category']).'/cxoinsight/'.get_url_with_filter(strtolower($data_edi2['headline'])).'-nid-'.$data_edi2['newsno'].'-cid-'.$data_edi2['category'].'.html'; } } $smarty->assign('newsnoedi2',$newsnoedi2); $smarty->assign('headlineedi2',$headlineedi2); $smarty->assign('sourceedi2',$sourceedi2); $smarty->assign('imgedi2',$imgedi2); $smarty->assign('categoryedi2',$categoryedi2); $smarty->assign('edi_url2',$edi_url2); /*For editor pick For Category End*/ /*For editor pick For Desc*/ $original = explode('-nid-',$_SERVER['REQUEST_URI']); $orig = $original[1]; $orig1 = explode('-cid-',$orig); $orig2 = $orig1[0]; if($orig2!=''){ $editor_desc="ZZZ"; $smarty->assign('section','editor_desc'); } $descsize=$_COOKIE['Desc_Hig']; $smarty->assign('descsize',$descsize); $sql_edi3="select a.newsno,a.ndate,a.headline,a.source,a.image5,a.category,a.newscategory from sin001.news a,sin001.shuffle_news b where a.newsno=b.newsno limit 20"; $resedi3=$link2->query($sql_edi3); while($data_edi3=$resedi3->fetch_array()) { $newsnoedi3[]=$data_edi3['newsno']; $headlineedi3[]=stripslashes($data_edi3['headline']); $sourceedi3[]=$data_edi3['source']; $imgedi3[]=$data_edi3['image5']; $categoryedi3[]=$data_edi3['category']; if($data_edi3['newscategory']==3) { $edi_url3[]=sub_cat_latest_section1($data_edi3['category']).'/cioviewpoint/'.get_url_with_filter(strtolower($data_edi3['headline'])).'-nid-'.$data_edi3['newsno'].'-cid-'.$data_edi3['category'].'.html'; } elseif($data_edi3['newscategory']==5) { $edi_url3[]=sub_cat_latest_section1($data_edi3['category']).'/cfoinsight/'.get_url_with_filter(strtolower($data_edi3['headline'])).'-nid-'.$data_edi3['newsno'].'-cid-'.$data_edi3['category'].'.html'; } elseif($data_edi3['newscategory']==6) { $edi_url3[]=sub_cat_latest_section1($data_edi3['category']).'/chroinsight/'.get_url_with_filter(strtolower($data_edi3['headline'])).'-nid-'.$data_edi3['newsno'].'-cid-'.$data_edi3['category'].'.html'; } elseif($data_edi3['newscategory']==7) { $edi_url3[]=sub_cat_latest_section1($data_edi3['category']).'/cmoinsight/'.get_url_with_filter(strtolower($data_edi3['headline'])).'-nid-'.$data_edi3['newsno'].'-cid-'.$data_edi3['category'].'.html'; } else { $edi_url3[]=sub_cat_latest_section1($data_edi3['category']).'/cxoinsight/'.get_url_with_filter(strtolower($data_edi3['headline'])).'-nid-'.$data_edi3['newsno'].'-cid-'.$data_edi3['category'].'.html'; } } $smarty->assign('newsnoedi3',$newsnoedi3); $smarty->assign('headlineedi3',$headlineedi3); $smarty->assign('sourceedi3',$sourceedi3); $smarty->assign('imgedi3',$imgedi3); $smarty->assign('categoryedi3',$categoryedi3); $smarty->assign('edi_url3',$edi_url3); /*For editor pick For Category End*/ $website_id_new='28'; $auoraconn_new = mysqli_connect("admincio.c7ot51pfb1o7.us-west-2.rds.amazonaws.com","ciowebmdb","**2018*dev#","web_migration") or die("Please try again later !!"); //homepage meta description $sel_website_keyword="select webname,keyword,title,metadesc,web_id from web_migration.homepage_metadesc where web_id ='$website_id_new' order by sno desc limit 1"; $sel_res_keyword=mysqli_query($auoraconn_new,$sel_website_keyword) or die(mysqli_error()); if(mysqli_num_rows($sel_res_keyword)>0) { $row_keyword=mysqli_fetch_row($sel_res_keyword); $webname_keyword=$row_keyword[0]; $keyword_keyword=$row_keyword[1]; $title_keyword=$row_keyword[2]; $metadesc_keyword=$row_keyword[3]; } $smarty->assign('webname_keyword',$webname_keyword); $smarty->assign('keyword_keyword',$keyword_keyword); $smarty->assign('title_keyword',$title_keyword); $smarty->assign('metadesc_keyword',$metadesc_keyword); //end ?>