From 666d63a8a23723ab9e0b78c964518cadb4887f40 Mon Sep 17 00:00:00 2001 From: Olusesan Ameye Date: Sat, 2 Jul 2022 02:40:07 -0400 Subject: [PATCH] fix --- www/application/controllers/Jobs.php | 39 ++- www/application/models/Combo_model.php | 35 +++ www/application/views/jobs/view_create.php | 58 ++-- www/application/views/jobs/view_jobagree.php | 65 ++-- www/svs/bko/.htaccess | 21 ++ www/svs/bko/bkove.php | 105 +++++++ www/svs/config.php | 4 + www/svs/constants.php | 226 ++++++++++++++ www/svs/formarter.php | 300 +++++++++++++++++++ www/svs/user/userve.php | 2 +- 10 files changed, 782 insertions(+), 73 deletions(-) create mode 100644 www/svs/bko/.htaccess create mode 100644 www/svs/bko/bkove.php create mode 100644 www/svs/config.php create mode 100644 www/svs/constants.php create mode 100644 www/svs/formarter.php diff --git a/www/application/controllers/Jobs.php b/www/application/controllers/Jobs.php index 43f1a4b0..e054df85 100644 --- a/www/application/controllers/Jobs.php +++ b/www/application/controllers/Jobs.php @@ -957,7 +957,22 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); $amountArray[] = [$i,$i,'Naira']; } + $marketArray = []; + for ($i = 2; $i <= 6; $i = $i + 1) { + $marketArray[] = [$i,$i,'Days']; + } + + for ($i = 7; $i <= 21; $i = $i + 7) { + $marketArray[] = [$i,$i,'Week(s)']; + } + + for ($i = 30; $i <= 90; $i = $i + 30) { + $marketArray[] = [$i,$i,'Month(s)']; + } + $data['amount_array'] = $amountArray; + $data['timeline_array'] = $marketArray; + $mysqlJ = "SELECT id, title,created::date FROM members_jobs WHERE member_id = " . $_SESSION['member_id'] . " @@ -966,6 +981,7 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); $query = $this->db->query($mysqlJ); $data['recentjobs'] = $query->result(); + $data['recentjobs_count'] = $query->num_rows(); extract($_POST); $redirected = false; @@ -1005,6 +1021,7 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); $this->combo_model->defaultComboMessage = 'Select Job Country'; $data['country_job'] = $this->combo_model->getCountryJobCombo('country', $country); $data['job_price'] = $this->combo_model->getJobPriceCombo('price','Naira', $price); + $data['timeline_combo'] = $this->combo_model->marketTimeline('timeline', $timeline); $data['title'] = $title; $data['description'] = $description; @@ -1013,7 +1030,7 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); $data['price'] = $price; $data['country'] = $country_job; -$data['page_title'] = "Create Job"; + $data['page_title'] = "Create Job"; if ($redirected == false) { $this->load->model('dash_model'); @@ -1022,11 +1039,6 @@ $data['page_title'] = "Create Job"; $data['active_pass_due'] = $out['active_pass_due']; $data['current_balance'] = $out['current_balance']; $data['new_message'] = $out['new_message']; - - // $this->load->view('users/view_header_user', $data); - // $this->load->view('jobs/view_create', $data); - // $this->load->view('users/view_footer_user', $data); - $this->renderSecurePage('jobs/view_create', $data); } @@ -1052,18 +1064,21 @@ $data['page_title'] = "Create Job"; $in['member_id'] = $_SESSION['member_id']; $this->load->model('backend_model'); $out = array(); - $res = $this->backend_model->wrenchboard_api($in, $out); - - if ($res == PHP_API_OK) { - redirect('/jobs/create'); + $res = $this->backend_model->wrenchboard_api($in, $out); + //echo $res; +//exit; + if ($res == PHP_API_OK || $out["terms_update"]=='completed') { + redirect('/jobs/create',$data); } } public function jobagree() { $data = $this->getSessionArray(); -//$this->agreejobterms(); if ($_POST) { + echo "Ameye"; + exit; + $in = array(); $in['action'] = WRENCHBOARD_ACCOUNT_TERMS; $in['action_item'] = ACCOUNT_AGREE_JOBS; @@ -1072,7 +1087,7 @@ $data['page_title'] = "Create Job"; $out = array(); $res = $this->backend_model->wrenchboard_api($in, $out); - if ($res == PHP_API_OK) { + if ($res == PHP_API_OK || $out["terms_update"]=='completed') { redirect('/jobs/create'); } } diff --git a/www/application/models/Combo_model.php b/www/application/models/Combo_model.php index 8d40eed3..2a22bec0 100644 --- a/www/application/models/Combo_model.php +++ b/www/application/models/Combo_model.php @@ -12,6 +12,40 @@ class Combo_model extends CI_Model { } + public function marketTimeline($option_name, $curVal) + { + $marketArray = []; + for ($i = 2; $i <= 6; $i = $i + 1) { + $marketArray[] = [$i,$i,'Days']; + } + $ic=0; + for ($i = 7; $i <= 21; $i = $i + 7) { + $ic++; + $marketArray[] = [$i,$ic,'Week(s)']; + } +$ic=0; + for ($i = 30; $i <= 90; $i = $i + 30) { + $ic++; + $marketArray[] = [$i,$ic,'Month(s)']; + } + + $cmbstr =""; + foreach ($marketArray as $item) { + + $i = $item[0]; + $ii = $item[1]; + $description =$item[2]; + $selV = ''; + if ($curVal == $i) { + $selV = " selected "; + } + $cmbstr .= ""; + } + return $this->comboFrame($option_name, $cmbstr); + + } + + public function getJobPriceCombo($option_name,$description, $curVal){ $this->defaultComboMessage ='Select Price...'; @@ -179,6 +213,7 @@ class Combo_model extends CI_Model { if ($this->readOnlyMode == true) { $addReaOnly = " disabled "; } + //form-select form-select-solid form-select-lg $style_line = "form-select form-select-solid form-select-lg"; return $cmb = ""; } diff --git a/www/application/views/jobs/view_create.php b/www/application/views/jobs/view_create.php index 2afdb49e..89f42957 100644 --- a/www/application/views/jobs/view_create.php +++ b/www/application/views/jobs/view_create.php @@ -88,30 +88,10 @@
-
- - - - - - + +
- - -
@@ -164,21 +144,29 @@
-
- -
- title?> - created?> -
- - View -
+ if ($recentjobs_count > 0){ - +
+ +
+ title?> + created?> +
+ + View +
+ + diff --git a/www/application/views/jobs/view_jobagree.php b/www/application/views/jobs/view_jobagree.php index f26d4fe3..99a6988b 100644 --- a/www/application/views/jobs/view_jobagree.php +++ b/www/application/views/jobs/view_jobagree.php @@ -17,8 +17,7 @@
- -
+

All terms of sale must follow WrenchBoard policies for buying and selling. Setting and meeting expectations in a listing's terms of sale ensure a smooth transaction and buyer satisfaction while helping WrenchBoard remain a reputable marketplace.


@@ -27,19 +26,19 @@

Task or Job owners should provide clear and accurate delivery terms and conditions required to meet the expectations they have set in their listings. These should include:

    -
  • Delivery mode, timelines, and reviews
  • -
  • The forms of payment available for the task
  • -
  • A returns policy: -
      -
    • Clearly stated criteria under which cancellation will be accepted.
    • -
    • Clearly stated the time period in which the buyer must notify the seller about the delivery delay.
    • -
    • How refunds/returns/cancellations will be issued
    • -
    +
  • Delivery mode, timelines, and reviews
  • +
  • The forms of payment available for the task
  • +
  • A returns policy: +
      +
    • Clearly stated criteria under which cancellation will be accepted.
    • +
    • Clearly stated the time period in which the buyer must notify the seller about the delivery delay.
    • +
    • How refunds/returns/cancellations will be issued
    • +
    -
  • +
-
+

@@ -48,24 +47,17 @@

Activity that doesn't follow WrenchBoard policy could result in a range of actions, including for example: administratively ending or canceling listings, hiding or demoting all listings from search results, lowering rating, buying or selling restrictions, and account suspension.
- All fees paid or payable concerning listings or accounts on which we take any action will not be refunded or otherwise credited to your account.

+ All fees paid or payable concerning listings or accounts on which we take any action will not be refunded or otherwise credited to your account.

Why does WrencBoard have this policy?

Buyers and sellers enter a contract when they complete transactions, so it's necessary to have precise details on what the transaction entails to guarantee satisfaction. This policy also helps sellers meet our performance standards.

-
- - - - - - +
- -
@@ -79,12 +71,35 @@