public function get_project_action_id($id) { try { $data = ""; $sql = " SELECT * FROM action \n WHERE member_id = :member_id "; $stmh = $this->pdo->prepare($sql); $stmh->bindValue(':member_id', $id, PDO::PARAM_INT); $stmh->execute(); $count = $stmh->rowCount(); $i = 0; $data = []; //案件の詳細情報の取得 $CustomerModel = new CustomerModel(); while ($row = $stmh->fetch(PDO::FETCH_ASSOC)) { foreach ($row as $key => $value) { $data[$i][$key] = $value; } $project_data = $CustomerModel->get_project($data[$i]['project_id']); $data[$i]['title'] = $project_data['title']; $data[$i]['company_name'] = $CustomerModel->get_company_name_company_id($data[$i]['company_id']); $i++; } } catch (PDOException $Exception) { print "エラー" . $Exception->getMessage(); } return array($data, $count); }
public function get_base_applicant_list($data) { $MemberModel = new MemberModel(); $CustomerModel = new CustomerModel(); $array = array(); for ($i = 0; $i < count($data); $i++) { $project_data = $CustomerModel->get_project($data[$i]['project_id']); $member_data = $MemberModel->get_member_base_info_id($data[$i]['member_id']); $array[$i]['action_id'] = $data[$i]['id']; $array[$i]['project_title'] = $project_data['title']; $array[$i]['project_reg_date'] = $project_data['reg_date']; $array[$i]['member_last_name'] = $member_data['last_name']; $now = date('Ymd'); $array[$i]['member_age'] = floor(($now - $member_data['birthday']) / 10000); $array[$i] = array_merge($array[$i], $data[$i]); } return $array; }
public function screen_detail_project() { $this->title = "お仕事の詳細"; $this->message = "下記に応募しますか?"; $project_id = ""; $member_id = ""; if (isset($_REQUEST['project_id'])) { $project_id = $_REQUEST['project_id']; } if (isset($_SESSION[_MEMBER_AUTHINFO]['id'])) { $member_id = $_SESSION[_MEMBER_AUTHINFO]['id']; } $CustomerModel = new CustomerModel(); $data = $CustomerModel->get_project($project_id, $member_id); $data2 = $CustomerModel->get_customer_authinfo_id($data['company_id']); $this->view->assign('data', $data); $this->view->assign('data2', $data2); $this->file = "index_detail_project.tpl"; $this->view_display(); }