diff --git a/www/application/controllers/Jobs.php b/www/application/controllers/Jobs.php index 8248ba37..04459fc1 100644 --- a/www/application/controllers/Jobs.php +++ b/www/application/controllers/Jobs.php @@ -744,6 +744,58 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); } } + public function myoffer() { + $data = array(); + $data = $this->getSessionArray(); + $data['offer_dash'] = ''; + $this->load->library('table'); + $this->table->set_template($this->template); + + $data["offer_dash"] = "
\"Active
"; + + $data["dash_title"] = "My Pending Offer(s)"; + $jbx = "''/jobs/viewmyjob''"; + $mysql = "SELECT jo.added::date||'
'||jo.expire::date,j.title||'
To :'||jo.email AS tRec," + . 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status,' + . "'' AS View " + . "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id " + . "WHERE jo.expire > now() AND jo.status = 1 " + . "AND jo.member_id = " . $_SESSION['member_id'] . "LIMIT 400"; + + $mysql = "SELECT jo.added::date||'
'||jo.expire::date AS job_dates,j.title||'
To :'||(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec," + . "'' AS View " + . "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id " + . "WHERE jo.expire > now() AND jo.status = 1 " + . "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT 400"; +// . 'CASE WHEN jo.status = 1 AND jo.public_view =0 THEN \'Pending\' WHEN jo.status = 1 AND jo.public_view >0 THEN \'Active\' ELSE \'Other\' END AS status,' + + $query = $this->db->query($mysql); + + $mysql2 = "SELECT jo.added::date AS start_job_date, jo.expire::date AS end_job_date, j.title, (CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS job_to,jo.offer_code AS offer_code," + . "'' AS View " + . "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id " + . "WHERE jo.expire > now() AND jo.status = 1 " + . "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT 400"; + $query2 = $this->db->query($mysql2); + $data['offer_dash_rows'] = $query2->result(); + + $num = $query->num_rows(); + + if ($num > 0) { + // array('data' => 'Added/Expire', 'style' => 'width:100px') + + $this->table->set_heading(array('data' => 'Added/Expire', 'style' => 'width:100px'), 'Title/Recipient', array('data' => ' ', 'style' => 'width:80px')); + $data['offer_dash'] = $this->table->generate($query); + + $offer_found = true; + } + + $_SESSION['secure_data'] = $data; // all data needed for secure page + $data['page_title'] = "Offer(s)"; + $this->renderSecurePage('jobs/view_myoffer', $data); + + } + public function pendingoffer() { $data = array(); $data = $this->getSessionArray(); diff --git a/www/application/views/jobs/view_myoffer.php b/www/application/views/jobs/view_myoffer.php new file mode 100644 index 00000000..ee396ad4 --- /dev/null +++ b/www/application/views/jobs/view_myoffer.php @@ -0,0 +1,131 @@ +
+ +
+ + + + +
+ +
+ +
+ +
+

+ +

+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Added
Expire
Title
Recipient
+ start_job_date?>
+ end_job_date?> +
+ title?> + To : job_to?> + + + + + + + +
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+
+ +
+ +
+ + + +
+ +
+ + +
+
+ +
+ +
+ +
+ diff --git a/www/application/views/site3/internal/template/side_menu.php b/www/application/views/site3/internal/template/side_menu.php index f482d70c..fb054608 100644 --- a/www/application/views/site3/internal/template/side_menu.php +++ b/www/application/views/site3/internal/template/side_menu.php @@ -112,6 +112,7 @@ Activities + + + + + + - - + + + +