product listing
This commit is contained in:
@@ -6,19 +6,12 @@ namespace App\Controllers;
|
|||||||
class Provider extends SecureBaseController
|
class Provider extends SecureBaseController
|
||||||
{
|
{
|
||||||
//var $patient_model;
|
//var $patient_model;
|
||||||
|
protected \App\Models\Product_model $product_model;
|
||||||
public function StartProviders() {
|
public function StartProviders() {
|
||||||
|
$this->product_model = new \App\Models\Product_model();
|
||||||
$data = array();
|
$data = array();
|
||||||
// $out = array();
|
$data['product_array'] = $this->product_model->getProducts(); // $product_array;
|
||||||
// $this->load->model('patient_model');
|
|
||||||
// $out = $this->patient_model->getPatientList();
|
|
||||||
// $data["patient_list"] = $out["patient_list"];
|
|
||||||
// $_SESSION['patient_count'] = 5;
|
|
||||||
// $this->load->model('encounter_model');
|
|
||||||
// $out = $this->encounter_model->getEncounterList();
|
|
||||||
// $data["encounter_list"] = $out["encounter_list"];
|
|
||||||
return $this->renderProviderSecurePage('dash', $data);
|
return $this->renderProviderSecurePage('dash', $data);
|
||||||
// return view('template/provider_page');
|
|
||||||
// print_r($_SESSION);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class Product_model extends Model
|
||||||
|
{
|
||||||
|
public function getProducts() {
|
||||||
|
$mysql = "SELECT * FROM products ORDER BY id ASC ";
|
||||||
|
$db = db_connect();
|
||||||
|
$query = $db->query($mysql);
|
||||||
|
return $query->getResult('array');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,47 +1,46 @@
|
|||||||
<?php
|
<?php
|
||||||
$product_array = [
|
//$product_array = [
|
||||||
[
|
// [
|
||||||
"name" => "Personal Website",
|
// "name" => "Personal Website",
|
||||||
"description" => "Product description here",
|
// "description" => "Product description here",
|
||||||
"status" => 0,
|
// "status" => 0,
|
||||||
"product" => 'A000001'
|
// "product" => 'A000001'
|
||||||
],
|
// ],
|
||||||
[
|
// [
|
||||||
"name" => "Professional Website",
|
// "name" => "Professional Website",
|
||||||
"description" => "Product description here",
|
// "description" => "Product description here",
|
||||||
"status" => 0,
|
// "status" => 0,
|
||||||
"product" => 'A000002'
|
// "product" => 'A000002'
|
||||||
],
|
// ],
|
||||||
[
|
// [
|
||||||
"name" => "Personal Blog",
|
// "name" => "Personal Blog",
|
||||||
"description" => "Product description here",
|
// "description" => "Product description here",
|
||||||
"status" => 0,
|
// "status" => 0,
|
||||||
"product" => 'A000003'
|
// "product" => 'A000003'
|
||||||
],
|
// ],
|
||||||
[
|
// [
|
||||||
"name" => "Professional Blog",
|
// "name" => "Professional Blog",
|
||||||
"description" => "Product description here",
|
// "description" => "Product description here",
|
||||||
"status" => 0,
|
// "status" => 0,
|
||||||
"product" => 'A000004'
|
// "product" => 'A000004'
|
||||||
],
|
// ],
|
||||||
[
|
// [
|
||||||
"name" => "Practice EMR",
|
// "name" => "Practice EMR",
|
||||||
"description" => "Product description here",
|
// "description" => "Product description here",
|
||||||
"status" => 0,
|
// "status" => 0,
|
||||||
"product" => 'A000005'
|
// "product" => 'A000005'
|
||||||
]
|
// ]
|
||||||
];
|
//];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php
|
<?php
|
||||||
//for ($i=0; $i<5; $i++)
|
|
||||||
foreach ($product_array as $row)
|
foreach ($product_array as $row)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="col-lg-6 col-xxl-6 m-b-30" style=" min-width: 200px;">
|
<div class="col-lg-6 col-xxl-6 m-b-30" style=" min-width: 200px;">
|
||||||
<div style="padding: 2px; border-radius: 10px;">
|
<div style="padding: 2px; border-radius: 10px;">
|
||||||
<a href="/product/<?=$row['product']?>">
|
<a href="/product/<?=$row['product_id']?>">
|
||||||
<div class="card card-statistics h-25 mb-0" style="background-color: aliceblue;">
|
<div class="card card-statistics h-25 mb-0" style="background-color: aliceblue;">
|
||||||
<div class="card-header d-flex justify-content-between">
|
<div class="card-header d-flex justify-content-between">
|
||||||
<div class="card-heading" style="padding: 1px;">
|
<div class="card-heading" style="padding: 1px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user