diff --git a/app/Controllers/Provider.php b/app/Controllers/Provider.php index b11506d..9ddf8a3 100644 --- a/app/Controllers/Provider.php +++ b/app/Controllers/Provider.php @@ -10,7 +10,9 @@ class Provider extends SecureBaseController public function StartProviders() { $this->product_model = new \App\Models\Product_model(); $data = array(); - $data['product_array'] = $this->product_model->getProducts(); // $product_array; + $data['product_array'] = $this->product_model->getProducts(''); // $product_array; + // var_dump($data['product_array']); + // exit; return $this->renderProviderSecurePage('dash', $data); } diff --git a/app/Models/Product_model.php b/app/Models/Product_model.php index d157e43..41420a1 100644 --- a/app/Models/Product_model.php +++ b/app/Models/Product_model.php @@ -7,16 +7,21 @@ use CodeIgniter\Model; class Product_model extends Model { public function getProducts($productId = '') { - if ( $productId == '' ){ + $db = db_connect(); + if (trim($productId) == '' ){ $mysql = "SELECT * FROM products ORDER BY id ASC "; + $query = $db->query($mysql); + return $query->getResult('array'); }else { $mysql = "SELECT * FROM products WHERE product_id='$productId' "; + $query = $db->query($mysql); + return $query->getResult('array')[0]; } - $db = db_connect(); - $query = $db->query($mysql); - return $query->getResult('array'); + +// $query = $db->query($mysql); +// return $query->getResult('array')[0]; } diff --git a/app/Views/provider/product.php b/app/Views/provider/product.php index 86e5562..e97c89f 100644 --- a/app/Views/provider/product.php +++ b/app/Views/provider/product.php @@ -2,112 +2,36 @@ section('content') ?>
-
-
+
+
-

My Products

+

-
- ppppp + +
+
+ + + +
+
+ +
+
+
-
-
-
-
-

Actions

-
- -
-
-
    -
  • -
    -
    Meeting with Amanda and team.
    - 10:30 Jan -
    -
  • -
  • -
    -
    Assign task for Smith.
    - - Wed, 10 Mar - -
    -
  • -
  • -
    -
    Complete milestone 3 and update.
    - - Mon, 14 Jun - -
    -
  • -
  • -
    -
    Start new task with mark.
    - - Sat, 01 May - -
    -
  • -
  • -
    -
    You have created a new task
    - 9:30 -
    -
  • -
  • -
    -
    Meeting with client and CEO.
    - - Fri, 10 Aug - -
    -
  • -
  • -
    -
    Meeting with Amanda and team.
    - - Fri, 01 Dec - -
    -
  • -
-
-
-
-
-
-
-
-

My Products

-
- -
-
- ppppp -
-
-
+ + endSection() ?> diff --git a/app/Views/provider/product_parts/A000001.php b/app/Views/provider/product_parts/A000001.php new file mode 100644 index 0000000..cbfae28 --- /dev/null +++ b/app/Views/provider/product_parts/A000001.php @@ -0,0 +1,108 @@ +
+
+
+
+
+

My Products

+
+ +
+
+ ppppp +
+
+
+ +
+
+
+
+

Actions

+
+ +
+
+
    +
  • +
    +
    Meeting with Amanda and team.
    + 10:30 Jan +
    +
  • +
  • +
    +
    Assign task for Smith.
    + + Wed, 10 Mar + +
    +
  • +
  • +
    +
    Complete milestone 3 and update.
    + + Mon, 14 Jun + +
    +
  • +
  • +
    +
    Start new task with mark.
    + + Sat, 01 May + +
    +
  • +
  • +
    +
    You have created a new task
    + 9:30 +
    +
  • +
  • +
    +
    Meeting with client and CEO.
    + + Fri, 10 Aug + +
    +
  • +
  • +
    +
    Meeting with Amanda and team.
    + + Fri, 01 Dec + +
    +
  • +
+
+
+
+
+
+
+
+

My Products

+
+ +
+
+ ppppp +
+
+
+
diff --git a/app/Views/provider/product_parts/A000002.php b/app/Views/provider/product_parts/A000002.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/app/Views/provider/product_parts/A000002.php @@ -0,0 +1 @@ + +
+
+
+
+

My Products

+
+ +
+
+ ppppp +
+
+
+ +
+
+
+
+

Actions

+
+ +
+
+
    +
  • +
    +
    Meeting with Amanda and team.
    + 10:30 Jan +
    +
  • +
  • +
    +
    Assign task for Smith.
    + + Wed, 10 Mar + +
    +
  • +
  • +
    +
    Complete milestone 3 and update.
    + + Mon, 14 Jun + +
    +
  • +
  • +
    +
    Start new task with mark.
    + + Sat, 01 May + +
    +
  • +
  • +
    +
    You have created a new task
    + 9:30 +
    +
  • +
  • +
    +
    Meeting with client and CEO.
    + + Fri, 10 Aug + +
    +
  • +
  • +
    +
    Meeting with Amanda and team.
    + + Fri, 01 Dec + +
    +
  • +
+
+
+
+
+
+
+
+

My Products

+
+ +
+
+ ppppp +
+
+
+