diff --git a/app/Controllers/Provider.php b/app/Controllers/Provider.php index 146004a..4ebff15 100644 --- a/app/Controllers/Provider.php +++ b/app/Controllers/Provider.php @@ -6,19 +6,12 @@ namespace App\Controllers; class Provider extends SecureBaseController { //var $patient_model; + protected \App\Models\Product_model $product_model; public function StartProviders() { + $this->product_model = new \App\Models\Product_model(); $data = array(); -// $out = 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"]; + $data['product_array'] = $this->product_model->getProducts(); // $product_array; return $this->renderProviderSecurePage('dash', $data); - // return view('template/provider_page'); - // print_r($_SESSION); } diff --git a/app/Models/Product_model.php b/app/Models/Product_model.php new file mode 100644 index 0000000..32fb51c --- /dev/null +++ b/app/Models/Product_model.php @@ -0,0 +1,16 @@ +query($mysql); + return $query->getResult('array'); + } + +} \ No newline at end of file diff --git a/app/Views/provider/components/product_listing.php b/app/Views/provider/components/product_listing.php index e8d378f..9f92719 100644 --- a/app/Views/provider/components/product_listing.php +++ b/app/Views/provider/components/product_listing.php @@ -1,47 +1,46 @@ "Personal Website", - "description" => "Product description here", - "status" => 0, - "product" => 'A000001' - ], - [ - "name" => "Professional Website", - "description" => "Product description here", - "status" => 0, - "product" => 'A000002' - ], - [ - "name" => "Personal Blog", - "description" => "Product description here", - "status" => 0, - "product" => 'A000003' - ], - [ - "name" => "Professional Blog", - "description" => "Product description here", - "status" => 0, - "product" => 'A000004' - ], - [ - "name" => "Practice EMR", - "description" => "Product description here", - "status" => 0, - "product" => 'A000005' - ] -]; +//$product_array = [ +// [ +// "name" => "Personal Website", +// "description" => "Product description here", +// "status" => 0, +// "product" => 'A000001' +// ], +// [ +// "name" => "Professional Website", +// "description" => "Product description here", +// "status" => 0, +// "product" => 'A000002' +// ], +// [ +// "name" => "Personal Blog", +// "description" => "Product description here", +// "status" => 0, +// "product" => 'A000003' +// ], +// [ +// "name" => "Professional Blog", +// "description" => "Product description here", +// "status" => 0, +// "product" => 'A000004' +// ], +// [ +// "name" => "Practice EMR", +// "description" => "Product description here", +// "status" => 0, +// "product" => 'A000005' +// ] +//]; ?>
- +