diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 629c926..8c2964f 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -50,6 +50,53 @@ class BaseController extends Controller // E.g.: $this->session = \Config\Services::session(); } + 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); + } + var $template = array( 'table_open' => "", 'thead_open' => '', diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index a34801b..426fbf3 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -14,11 +14,27 @@ class Home extends BaseController } public function home2(){ - return view('main/home'); + $data = []; + return $this->sitePage("home", $data); } + + private function sitePage($curr_page, $data){ + return view('main/header').view('main/home').view('main/footer'); + } public function home(){ - return view('site/home'); + + $siteData =[]; + $out = $this->APIcall('GET','https://blogdata.chiefsoft.net/blogdata/chiefsoft',[]); // https://blogdata.chiefsoft.net/ + $siteData['blogdata'] = $out['payload']['blogdata']; + + $data=array(); + + $data["blog_featured"] = $siteData['blogdata'][0]; + $data["blog_array"] =array_slice( $siteData['blogdata'], 0, 7); // $siteData['blogdata']; + + + return view('site/home', $data); } public function about(){ $data=array(); @@ -76,6 +92,15 @@ class Home extends BaseController } + $siteData =[]; + $out = $this->APIcall('GET','https://blogdata.chiefsoft.net/blogdata/chiefsoft',[]); // https://blogdata.chiefsoft.net/ + $siteData['blogdata'] = $out['payload']['blogdata']; + + $data=array(); + + $data["blog_featured"] = $siteData['blogdata'][0]; + $data["blog_array"] =array_slice( $siteData['blogdata'], 0, 7); // $siteData['blogdata']; + $this->renderSitePage('blog',$data); diff --git a/app/Views/main/footer.php b/app/Views/main/footer.php new file mode 100644 index 0000000..abb4521 --- /dev/null +++ b/app/Views/main/footer.php @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Views/main/header.php b/app/Views/main/header.php new file mode 100644 index 0000000..caea723 --- /dev/null +++ b/app/Views/main/header.php @@ -0,0 +1,202 @@ + + + + + + + <?=SITE_NAME?>,<?php echo isset($location->city) ? $location->city :''; ?> Software Development + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/app/Views/main/home.php b/app/Views/main/home.php index fbbd3a1..d248a4b 100644 --- a/app/Views/main/home.php +++ b/app/Views/main/home.php @@ -1,206 +1,3 @@ - - - - - - - - - - - - - Martex - Software, App, SaaS & Startup Landing Pages Pack - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - @@ -218,13 +15,7 @@

Design, Development & Management of Enterprise Solutions

-

Mauris donec ociis magnis sapien ipsum sagittis sapien tempor and volute - gravida aliquet quaerat vitae -

- - -

- No credit card needed, free 14-day trial +

We are fully equipped to deliver first-class solution development services. We improve your business efficiency and security at every step.

@@ -244,9 +35,6 @@
- - -
@@ -270,9 +58,9 @@ - - - + + + @@ -298,10 +86,10 @@ - - - - +--> + + + @@ -327,10 +115,10 @@ - - - - +--> + + + @@ -356,10 +144,10 @@ - - - - +--> + + + @@ -403,9 +191,9 @@ - - - + + + @@ -432,9 +220,9 @@ - - - + + + @@ -460,10 +248,10 @@ - - - - +--> + + + @@ -490,9 +278,9 @@ - - - + + + @@ -519,8 +307,6 @@
- -
@@ -585,9 +371,6 @@
- - -
@@ -682,8 +465,6 @@
- -
@@ -776,8 +557,6 @@
- -
@@ -1288,346 +1067,14 @@
- - - -
-
- - - -
-
-
- - -

Our Happy Customers

- - -

Ligula risus auctor tempus magna feugiat lacinia.

- -
-
-
- - - -
-
- - - -
-
- - -
- - -
- - -

Quaerat sodales sapien euismod blandit aliquet ipsum primis undo and cubilia - laoreet augue and luctus magna dolor luctus egestas sapien vitae -

- - -
- - -
- review-avatar -
- - -
-
Scott Boxer
-

@scott_boxer

-
- -
- -
- -
-
- - - -
-
- - -
- - -
- - -

At sagittis congue augue and magna ipsum vitae a purus ipsum primis diam a - cubilia laoreet augue egestas luctus a donec vitae ultrice ligula magna suscipit - lectus gestas augue into cubilia -

- - -
- - -
- review-avatar -
- - -
-
Joel Peterson
-

Internet Surfer

-
- -
- -
- -
-
- - - -
-
- - -
- - -
- - -

An augue cubilia laoreet magna suscipit egestas and ipsum a lectus purus ipsum - primis and augue ultrice ligula and egestas a suscipit lectus gestas undo auctor - tempus feugiat impedit quaerat -

- - -
- - -
- review-avatar -
- - -
-
Jennifer Harper
-

App Developer

-
- -
- -
- -
-
- - - -
-
- - -
- - -
- - -

Augue at vitae purus tempus egestas volutpat augue undo cubilia laoreet magna - suscipit luctus dolor blandit at purus tempus feugiat impedit -

- - -
- - -
- review-avatar -
- - -
-
Evelyn Martinez
-

WordPress Consultant

-
- -
- -
- -
-
- - -
-
- - -
-
- - - - - -
-
- - - -
-
-
-
Trusted and used by over 3,400 companies
-
-
-
- - - -
-
- -
-
- - -
-
- - - - - + +
+ - -
-
- - - -
-
-
- - -

Discover insights across all your data with Martex

- - -

Ligula risus auctor tempus magna feugiat lacinia.

- -
-
-
- - - -
-
-
- video-preview -
-
-
- - - -
-
-
- - - Monitor your activity - - -
    -
  • Free 14 days trial

  • - -
  • Exclusive Support

  • - -
  • No Fees

  • -
- -
-
-
- - -
-
- - - - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/Views/main/homeparts/brands.php b/app/Views/main/homeparts/brands.php new file mode 100644 index 0000000..4c9a70d --- /dev/null +++ b/app/Views/main/homeparts/brands.php @@ -0,0 +1,85 @@ + +
+
+ + + +
+
+
+
Trusted and used by over 3,400 companies
+
+
+
+ + + +
+
+ +
+
+ + +
+
+ + diff --git a/app/Views/main/homeparts/grow.php b/app/Views/main/homeparts/grow.php new file mode 100644 index 0000000..5937a8b --- /dev/null +++ b/app/Views/main/homeparts/grow.php @@ -0,0 +1,41 @@ + + + diff --git a/app/Views/main/homeparts/imagepart.php b/app/Views/main/homeparts/imagepart.php new file mode 100644 index 0000000..06269bf --- /dev/null +++ b/app/Views/main/homeparts/imagepart.php @@ -0,0 +1,57 @@ + +
+
+ + + +
+
+
+ + +

Discover insights across all your data with Martex

+ + +

Ligula risus auctor tempus magna feugiat lacinia.

+ +
+
+
+ + + +
+
+
+ video-preview +
+
+
+ + + +
+
+
+ + + Monitor your activity + + +
    +
  • Free 14 days trial

  • + +
  • Exclusive Support

  • + +
  • No Fees

  • +
+ +
+
+
+ + +
+
+ diff --git a/app/Views/main/homeparts/integrations.php b/app/Views/main/homeparts/integrations.php new file mode 100644 index 0000000..e69de29 diff --git a/app/Views/main/homeparts/testimonial.php b/app/Views/main/homeparts/testimonial.php new file mode 100644 index 0000000..7527f0a --- /dev/null +++ b/app/Views/main/homeparts/testimonial.php @@ -0,0 +1,184 @@ + +
+
+ + + +
+
+
+ + +

Our Happy Customers

+ + +

Ligula risus auctor tempus magna feugiat lacinia.

+ +
+
+
+ + + +
+
+ + + +
+
+ + +
+ + +
+ + +

Quaerat sodales sapien euismod blandit aliquet ipsum primis undo and cubilia + laoreet augue and luctus magna dolor luctus egestas sapien vitae +

+ + +
+ + +
+ review-avatar +
+ + +
+
Scott Boxer
+

@scott_boxer

+
+ +
+ +
+ +
+
+ + + +
+
+ + +
+ + +
+ + +

At sagittis congue augue and magna ipsum vitae a purus ipsum primis diam a + cubilia laoreet augue egestas luctus a donec vitae ultrice ligula magna suscipit + lectus gestas augue into cubilia +

+ + +
+ + +
+ review-avatar +
+ + +
+
Joel Peterson
+

Internet Surfer

+
+ +
+ +
+ +
+
+ + + +
+
+ + +
+ + +
+ + +

An augue cubilia laoreet magna suscipit egestas and ipsum a lectus purus ipsum + primis and augue ultrice ligula and egestas a suscipit lectus gestas undo auctor + tempus feugiat impedit quaerat +

+ + +
+ + +
+ review-avatar +
+ + +
+
Jennifer Harper
+

App Developer

+
+ +
+ +
+ +
+
+ + + +
+
+ + +
+ + +
+ + +

Augue at vitae purus tempus egestas volutpat augue undo cubilia laoreet magna + suscipit luctus dolor blandit at purus tempus feugiat impedit +

+ + +
+ + +
+ review-avatar +
+ + +
+
Evelyn Martinez
+

WordPress Consultant

+
+ +
+ +
+ +
+
+ + +
+
+ + +
+
+ diff --git a/app/Views/site/blog.php b/app/Views/site/blog.php index b24ee75..7366234 100644 --- a/app/Views/site/blog.php +++ b/app/Views/site/blog.php @@ -19,18 +19,22 @@ +
+
@@ -92,6 +96,10 @@ $blog_id = $blgr["id"]; $comment_count = $blgr["comment_count"]; $meta_value = $blgr["meta_value"]; + + $date=date_create($post_date); + $post_date = date_format($date,"Y/m/d"); + include("blog_unit.php"); } ?> diff --git a/app/Views/site/blog_unit.php b/app/Views/site/blog_unit.php index 1178fad..012ca30 100644 --- a/app/Views/site/blog_unit.php +++ b/app/Views/site/blog_unit.php @@ -9,7 +9,7 @@ $blog_image = "https://blog.chiefsoft.com/wp-content/uploads/".$meta_value; //20
-
+
@@ -31,9 +31,9 @@ $blog_image = "https://blog.chiefsoft.com/wp-content/uploads/".$meta_value; //20