Example #1
0
 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);
 }
Example #2
0
 public function screen_list_project()
 {
     if (isset($_GET['flag'])) {
         if ($_GET['flag'] == "regist") {
             $this->message = "新規で1件、登録が完了しました";
         }
         if ($_GET['flag'] == "modify") {
             $this->message = "案件を1件、更新しました";
         }
         if ($_GET['flag'] == "delete") {
             $this->message = "案件を1件、削除しました";
         }
     }
     //システム側から来た場合、セッション値の定義
     if ($this->is_system && isset($_POST['id'])) {
         $_SESSION[_CUSTOMER_AUTHINFO]['id'] = $_POST['id'];
         $CustomerModel = new CustomerModel();
         $_SESSION[_CUSTOMER_AUTHINFO]['company_name'] = $CustomerModel->get_company_name_company_id($_POST['id']);
     }
     if ($this->is_system) {
         $this->title = "<font color='blue'>" . $_SESSION[_CUSTOMER_AUTHINFO]['company_name'] . "</font>様の案件一覧";
     } else {
         $this->title = "案件一覧";
     }
     $perPage = "5";
     $this->next_type = "list_project";
     $CustomerModel = new CustomerModel();
     $CustomerModel->valid_off_yesterday_project();
     list($data, $count) = $CustomerModel->get_project_list($_SESSION[_CUSTOMER_AUTHINFO]['id']);
     list($data, $links) = $this->make_page_link($perPage, $data);
     $this->view->assign('data', $data);
     $this->view->assign('count', $count);
     $this->view->assign('links', $links['all']);
     $this->file = "customer_list_project.tpl";
     $this->view_display();
 }
Example #3
0
 public function get_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']);
         $company_name = $CustomerModel->get_company_name_company_id($data[$i]['company_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_name'] = $member_data['last_name'] . "&nbsp;" . $member_data['first_name'];
         $array[$i]['company_name'] = $company_name;
         $now = date('Ymd');
         $array[$i]['member_age'] = floor(($now - $member_data['birthday']) / 10000);
         $array[$i] = array_merge($array[$i], $data[$i]);
     }
     return $array;
 }
Example #4
0
 public function member_detail_message_messsage_id($message_id)
 {
     try {
         $sql = " SELECT * FROM message \n                      WHERE \n                     id = :id \n                     limit 1 ";
         $stmh = $this->pdo->prepare($sql);
         $stmh->bindValue(':id', $message_id, PDO::PARAM_INT);
         $stmh->execute();
         $count = $stmh->rowCount();
         $data = $stmh->fetch(PDO::FETCH_ASSOC);
         $CustomerModel = new CustomerModel();
         $ActionModel = new ActionModel();
         $project_data = $CustomerModel->get_project_title($data['project_id']);
         $company_name = $CustomerModel->get_company_name_company_id($data['company_id']);
         $action_data = $ActionModel->get_action_id($data['action_id']);
         $data['action_reg_date'] = $action_data['reg_date'];
         $data['company_name'] = $company_name;
         $data['title'] = $project_data;
         $data['body'] = htmlspecialchars($data['body'], ENT_QUOTES);
         $data['body'] = nl2br($data['body']);
     } catch (PDOException $Exception) {
         print "エラー" . $Exception->getMessage();
     }
     return $data;
 }