new blog location
This commit is contained in:
@@ -97,4 +97,50 @@ class BaseController extends Controller {
|
||||
return $blog_post;
|
||||
}
|
||||
|
||||
public function APIcall($method, $url, $data) {
|
||||
// $curl = curl_init();
|
||||
$curl = curl_init($url);
|
||||
switch ($method) {
|
||||
case "GET":
|
||||
$params2 = '';
|
||||
foreach($data as $key2=>$value2)
|
||||
$params2 .= $key2.'='.$value2.'&';
|
||||
|
||||
$params2 = trim($params2, '&');
|
||||
$url = $url.'?'.$params2;// add param to URL
|
||||
log_message('critical', "API URL FINAL =>".$url );
|
||||
//curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
|
||||
//curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
//curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
break;
|
||||
case "POST":
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
if ($data)
|
||||
// curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
|
||||
// curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
break;
|
||||
case "PUT":
|
||||
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
|
||||
if ($data)
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
break;
|
||||
}
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
|
||||
'APIKEY: RegisteredAPIkey',
|
||||
'Content-Type: application/json',
|
||||
));
|
||||
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
||||
$result = curl_exec($curl);
|
||||
|
||||
if(!$result) {
|
||||
echo("Connection failure!");
|
||||
}
|
||||
curl_close($curl);
|
||||
return json_decode($result, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,18 @@ class Home extends BaseController {
|
||||
public function index() {
|
||||
|
||||
// $wpData = WpContentsClient::serviceGetBlogItems();
|
||||
$out = $this->APIcall('GET','https://blogdata.chiefsoft.net/blogdata/mermsemr',[]); // https://blogdata.chiefsoft.net/
|
||||
$data["blog_post"] = $out['payload']['blogdata'];
|
||||
// var_dump( $data["blog_post"] );
|
||||
//exit();
|
||||
|
||||
global $myfit_items;
|
||||
global $practice_text1;
|
||||
global $practice_text2;
|
||||
$data = array();
|
||||
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
||||
// $data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
||||
$data["blog_post"] = $out['payload']['blogdata'];
|
||||
|
||||
$data["myfit_items"] = $myfit_items;
|
||||
$data["practice_text1"] = $practice_text1;
|
||||
$data["practice_text2"] = $practice_text2;
|
||||
@@ -29,7 +35,9 @@ class Home extends BaseController {
|
||||
global $practice_text1;
|
||||
global $practice_text2;
|
||||
$data = array();
|
||||
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
||||
$out = $this->APIcall('GET','https://blogdata.chiefsoft.net/blogdata/mermsemr',[]); // https://blogdata.chiefsoft.net/
|
||||
$data["blog_post"] = $out['payload']['blogdata'];
|
||||
// $data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
||||
$data["myfit_items"] = $myfit_items;
|
||||
$data["practice_text1"] = $practice_text1;
|
||||
$data["practice_text2"] = $practice_text2;
|
||||
|
||||
+3
-23
@@ -71,29 +71,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 padding_zero">
|
||||
<div class="owl-carousel three_items">
|
||||
|
||||
<?php
|
||||
foreach ($blog_post as $bitem) {
|
||||
// print_r($bitem);
|
||||
?>
|
||||
<div class="doctor_box type_one ">
|
||||
<div class="image_box">
|
||||
<img src="<?=$bitem['image']?>" class="img-fluid" alt="<?= $bitem['title'] ?>" />
|
||||
</div>
|
||||
<div class="content_box">
|
||||
|
||||
<h2> <a href="<?= $bitem['link'] ?>"><?= $bitem['title'] ?> </a> </h2>
|
||||
<small><?= $bitem['date'] ?></small>
|
||||
<p><?= $bitem['desc']?>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include 'blog_section.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<div class="col-lg-12 padding_zero">
|
||||
<div class=" owl-carousel three_items">
|
||||
|
||||
<?php
|
||||
foreach ($blog_post as $bitem) {
|
||||
// print_r($bitem);
|
||||
?>
|
||||
<div class="blog_box type_two">
|
||||
<div class="image_box">
|
||||
<img src="https://blog.mermsemr.com/wp-content/uploads/<?=$bitem['meta_value']?>" class="img-fluid" alt="<?= $bitem['title'] ?>" />
|
||||
<div class="overlay">
|
||||
<a href="<?= $bitem['guid']?>" data-fancybox="gallery" data-caption="">
|
||||
<span class="flaticon-image zoom_icon"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_box">
|
||||
<a href="<?= $bitem['guid'] ?>" class="category"><?=PROUCT_BRAND_NAME?></a>
|
||||
<div class="title_box">
|
||||
<div class="post-date">
|
||||
<p><span class="fa fa-clock-o"></span><?= $bitem['post_date'] ?></p>
|
||||
</div>
|
||||
<h2><a href="<?= $bitem['link'] ?>"><?= $bitem['post_title'] ?> </a></h2>
|
||||
</div>
|
||||
<p><?= $bitem['desc']?>.</p>
|
||||
<a href="<?= $bitem['guid'] ?>" class="read_more tp_two">Read More<span class="flaticon-arrow"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -262,43 +262,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 padding_zero">
|
||||
<div class=" owl-carousel three_items">
|
||||
|
||||
<?php
|
||||
foreach ($blog_post as $bitem) {
|
||||
// print_r($bitem);
|
||||
?>
|
||||
<div class="blog_box type_two">
|
||||
<div class="image_box">
|
||||
<img src="<?=$bitem['image']?>" class="img-fluid" alt="<?= $bitem['title'] ?>" />
|
||||
<div class="overlay">
|
||||
<a href="<?= $bitem['link']?>" data-fancybox="gallery" data-caption="">
|
||||
<span class="flaticon-image zoom_icon"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_box">
|
||||
<a href="<?= $bitem['link'] ?>" class="category"><?=PROUCT_BRAND_NAME?></a>
|
||||
<div class="title_box">
|
||||
<div class="post-date">
|
||||
<p><span class="fa fa-clock-o"></span><?= $bitem['date'] ?></p>
|
||||
</div>
|
||||
<h2><a href="<?= $bitem['link'] ?>"><?= $bitem['title'] ?> </a></h2>
|
||||
</div>
|
||||
<p><?= $bitem['desc']?>.</p>
|
||||
<a href="<?= $bitem['link'] ?>" class="read_more tp_two">Read More<span class="flaticon-arrow"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include 'blog_section.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -18,5 +18,8 @@ services:
|
||||
- ./apache_log:/var/log/apache2
|
||||
ports:
|
||||
- 8088:80
|
||||
extra_hosts:
|
||||
- blogdata.chiefsoft.net:10.10.33.15
|
||||
- sitedata.chiefsoft.net:10.10.33.15
|
||||
volumes:
|
||||
src:
|
||||
Reference in New Issue
Block a user