スマイルナーシング
今すぐ応募する
今すぐ応募する

私たちは笑顔をつくる

優しさと責任を持ち 看護で支える 介護で想いをつなぐ

求人一覧

Job Listings

  • 急募

    有料老人ホームの夜勤専従スタッフ 介護未経験・無資格…

    スマイルナーシング豊橋吉田方
    愛知県豊橋市小向町北小向20番2
    17,000円
  • 急募

    有料老人ホームの夜勤専従スタッフ 介護未経験・無資格…

    スマイルナーシング豊橋三ノ輪
    愛知県豊橋市三ノ輪町本興寺 27番4
    17,000円
  • 急募

    夜勤専従看護スタッフ Wワーク可 岐阜市

    スマイルナーシング黒野
    岐阜県岐阜市下鵜飼1602番地2
    17,000円〜20,000円
  • 急募

    夜勤専従看護スタッフ Wワーク可 岐阜市

    スマイルナーシング六条
    岐阜県岐阜市六条南2丁目2
    17,000円〜20,000円
  • 急募

    夜勤専従看護スタッフ Wワーク可 美濃加茂市

    スマイルナーシング美濃加茂
    岐阜県美濃加茂市加茂野町加茂野821番地2
    17,000円〜20,000円
  • 急募

    夜勤専従看護スタッフ Wワーク可 名古屋市

    スマイルナーシング名城
    岐阜県岐阜市菊水町1丁目21
    17,000円〜20,000円
  • 急募

    有料老人ホームの介護スタッフ 日勤のみ 短時間勤務 教…

    スマイルナーシング半田
    半田市板山町二丁目58−4
    2,000円
  • 急募

    有料老人ホームの看護師 教育体制充実

    スマイルナーシング長良
    岐阜市菊水1丁目21
    2,500円
  • 急募

    有料老人ホームの介護スタッフ 有給取りやすい 研修充実

    スマイルナーシング長良
    岐阜市菊水1丁目21
    2,000円
  • 急募

    【公式】有料老人ホームの介護スタッフ 管理者候補 …

    スマイルナーシング中川
    名古屋市中川区下之一色町宮分17−1
    5,500,000円〜60,000,000円
  • 急募

    有料老人ホームの看護スタッフ 管理者候補 正看護師…

    スマイルナーシング名城
    愛知県名古屋市北区柳原1丁目 2番21号
    5,500,000円〜8,200,000円
  • 急募

    夜勤専従看護スタッフ Wワーク可 名古屋市

    スマイルナーシング名城
    名古屋市北区柳原1丁目2番21号
    27,000円〜30,000円
1 2 3 4 5

Debug Information (Developer Only) by Application::shutdownHandler()

Error File: /var/www/vhosts/kyujinbu.com/code/application/detail/Abstract.php
Error Line: 495
Error Message: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
1: <?php
2:
3: class AbstractController extends MyApplication
4: {
5: static $_privacy_policy = '<p>本ウェブサイトにおける個人情報の取り扱いについて、個人情報保護に関する法令を遵守し、これを適切に管理、保護し、安心できる個人情報保護体制の運用・向上を目的として、プライバシーポリシーを以下のように定めます。</p>
6: <p>
7: 1. 個人情報の定義<br>
8: 個人情報とは、「個人情報の保護に関する法律」に規定される生存する個人に関する情報であって、氏名、生年月日その他の記述等により特定の個人を識別することができる情報(個人識別情報)を指します。
9: </p>
10: <div class="has-mb">
11: <p>
12: 2. 個人情報の収集、利用、提供<br>
13: 収集した個人情報の使用目的・範囲を下記に限定し、適切に取り扱います。応募者等の同意を事前に得た場合、又は法令により許された場合を除き、個人情報を第三者に提供しません。
14: </p>
15: <ul>
16: <li>a.応募者等からのお問い合わせに対応・管理するため</li>
17: <li>b.本ウェブサイトにおけるサービスの提供・運用のため</li>
18: <li>c.重要なお知らせなど必要に応じたご連絡のため</li>
19: <li>d.上記の利用目的に付随する目的</li>
20: </ul>
21: </div>
22: <p>
23: 3. プライバシー尊重<br>
24: プライバシーを尊重し、収集した個人情報に対し、開示、訂正、削除、利用停止を求められた時には、合理的な期間、妥当な範囲内でこれに応じます。
25: </p>
26: <p>
27: 4. 法令等の遵守<br>
28: 応募者等の個人情報の取得、利用その他一切の取り扱いについて、個人情報の保護に関する法律、その他の関連法令、及び本プライバシーポリシーを遵守します。
29: </p>
30: <p>
31: 5. 安全管理措置<br>
32: 応募者等の個人情報を正確かつ最新の内容に保つよう努めるとともに、不正なアクセス、改ざん、漏えい、滅失及び毀損から保護するため、必要な安全管理措置を講じます。
33: </p>
34: <p>
35: 6. Cookieについて<br>
36: 本ウェブサイトでは、一部のコンテンツにおいてCookieを利用しています。 Cookieとは、webコンテンツへのアクセスに関する情報であり、氏名・メールアドレス・住所・電話番号は含まれません。また、お使いのブラウザ設定からCookieを無効にすることが可能です。
37: </p>
38: <p>
39: 7. アクセス解析ツールについて<br>
40: 本ウェブサイトでは、Google LLCが提供するアクセス解析ツール「Googleアナリティクス」を利用しています。 Googleアナリティクスは、トラフィックデータの収集のためにCookieを使用しています。このトラフィックデータは匿名で収集されており、個人を特定するものではありません。この機能はCookieを無効にすることで収集を拒否することが出来ます。
41: </p>
42: <p>
43: 8. プライバシーポリシーの変更<br>
44: 本プライバシーポリシーの内容は、法令その他本プライバシーポリシーで別段の定めのある事項を除いて,応募者等に通知することなく変更することができるものとします。
45: </p>
46: <p>
47: 9. お問い合わせ窓口<br>
48: 本プライバシーポリシーに関するお問い合わせは、下記までお願いいたします。
49: </p>
50: <p>%user_name%</p>
51: <p>電話:%phone%</p>
52: ';
53:
54: // メンバ変数
55: protected $_lh = null;
56: protected $_model_jobs;
57: protected $_model_medias;
58: protected $_model_categories;
59: protected $_model_occupations;
60: protected $_model_searches;
61: protected $_model_keywords;
62: protected $_model_tags;
63: protected $_model_mail;
64: protected $_model_job_name;
65: protected $_model_job_store;
66: protected $_model_external_job_id_history;
67: protected $_model_enquete;
68: protected $_userData;
69:
70: /**
71: * コンストラクタ
72: * Constructor
73: */
74: public function __construct()
75: {
76: parent::__construct();
77: }
78:
79: /**
80: * イニシャライズ
81: * Initialize progress
82: *
83: * 省略可。定義されているときは __construct() の後で呼び出される。
84: * __construct() との違いは自身のインスタンスが生成されているので
85: * $thisにより、Applicationクラスのメソッドが使用できる。
86: *
87: * This method run after making self instance.
88: * So, it can use Application class method, for example "$this->in()".
89: * It is the difference between __init and construct.
90: * If this method is nothing, initializing progress is omitted.
91: */
92: public function __init()
93: {
94: parent::__init();
95:
96: // LH用汎用クラスを読込
97: // Load general class for LH Fegg
98: $this->_lh = $this->getClass( 'LH_FW' );
99:
100: //'visible' => 'visible', visible = 1 を除外するかわりに、各種必要な箇所で明示的に visible = 1 するように
101: $this->_model_jobs = new Model(false, array(
102: 'table' => 'cms_job',
103: 'id' => 'job_id',
104: ));
105: $this->page['id'] = $this->_model_jobs->getPrimary();
106:
107: $this->_model_medias = new Model(false, array(
108: 'table' => 'cms_job_media'
109: ));
110:
111: $this->_model_categories = new Model(false, array(
112: 'table' => 'cms_job_category',
113: 'id' => array('job_id', 'category_id'),
114: ));
115:
116: $this->_model_occupations = new Model(false, array(
117: 'table' => 'cms_job_occupation',
118: 'id' => array('job_id', 'suid'),
119: ));
120:
121: $this->_model_searches = new Model(false, array(
122: 'table' => 'cms_job_search',
123: 'id' => array('job_id', 'suid'),
124: ));
125:
126: $this->_model_keywords = new Model(false, array(
127: 'table' => 'cms_job_keyword',
128: 'id' => array('job_id', 'keyword_id'),
129: ));
130:
131: $this->_model_tags = new Model(false, array(
132: 'table' => 'cms_job_tag',
133: 'id' => 'tag_id',
134: ));
135:
136: $this->_model_mail = new Model(false, array(
137: 'table' => 'cms_mailitem',
138: 'id' => 'mailitem_id',
139: ));
140:
141: $this->_model_job_name = new Model(false, array(
142: 'table' => 'cms_job_name',
143: 'id' => 'user_id',
144: ));
145:
146: $this->_model_job_store = new Model(false, array(
147: 'table' => 'cms_job_store',
148: 'id' => 'user_id',
149: ));
150:
151: $this->_model_external_job_id_history = new Model(true, array(
152: 'table' => 'cms_external_job_id_history'
153: ));
154:
155: $this->_model_enquete = new Model(true, array(
156: 'table' => 'cms_enquete',
157: 'id' => 'user_id',
158: 'visible' => 'visible'
159: ));
160:
161: // Get User Data
162: $this->_userData = $this->getClass('UserData');
163: }
164:
165: /**
166: * Assign User information by Login Name
167: *
168: * @param string $userLogin
169: * @return void
170: */
171: protected function assignUserInfo($userLogin)
172: {
173: $this->_userData->search($userLogin);
174:
175: if(! $this->_userData->isExists()) {
176: $this->redirect('/');
177: }
178: $this->page['user'] = $this->_userData->getData();
179:
180: // 特別 動画は t1 テンプレートのみ許す。デフォルトテンプレート(t0) に動画がある場合は消去
181: if( $this->page['user']['html_template'] == '0' && $this->page['user']['main_image_id'] ){
182: $imageRow = getImageRow($this->page['user']['main_image_id']);
183: if( ! ($imageRow && is_array($imageRow) && $imageRow['type'] == 'image') ){
184: $this->page['user']['main_image_id'] = null;
185: }
186: }
187:
188: // Get user's theme Color
189: if(! isset($this->page['user']['valiation']) || $this->page['user']['valiation'] == '') {
190: $this->page['user']['valiation'] = 'blue';
191: }
192:
193: // Check Exists Theme Color
194: //$existsColor = $this->config['category_info']['valiation'];
195: //if (! isset($existsColor[$this->page['user']['valiation']])) {
196: // $this->page['user']['valiation'] = 'blue';
197: //}
198:
199: // Update Contact Config
200: //$this->contact_config['admin_name'] = $this->page['user']['name'];
201: // $this->contact_config['admin_mail'] = $this->page['user']['mailaddress'];
202: }
203:
204: protected function assignPickupData()
205: {
206: // Get Job list data
207: $this->page['list_data']
208: = $this->_model_jobs
209: ->listMax(3)//3
210: ->current($this->in('p'))
211: ->select('*, usual_name AS selected_name, (SELECT image_id FROM cms_job_media AS tm WHERE tm.job_id = cms_job.job_id AND tm.media_role = \'main\' and tm.valid = 1 ORDER BY tm.order_by ASC LIMIT 1) AS main_image_id')
212: ->where('user_id = ?', $this->_userData->getId())
213: ->where('priority_flag = ?', 1)
214: ->order('post_date', 'desc')
215: ->simple_find();
216: }
217:
218: /**
219: * Get Top Page data
220: *
221: * @return void
222: */
223: protected function executeJobSearch($searches, $page)
224: {
225: // Search Jobs
226: $this->_model_jobs->where('(visible = 1 OR visible = 99)');
227:
228: // Old name
229: if( isset($searches['name']) ){
230: if( is_array($searches['name']) && 0 < count($searches['name']) ){
231:
232: if( $this->page['user']['job_name_select'] == 2 ){
233: $this->_model_jobs->where('name2 IN ('. implode(',', array_fill(0, count($searches['name']), '?')) . ')', $searches['name']);
234: } else {
235: $this->_model_jobs->where('name IN ('. implode(',', array_fill(0, count($searches['name']), '?')) . ')', $searches['name']);
236: }
237:
238: } else {
239: $search_name_strlen = mb_strlen($searches['name']);
240: if(100 < $search_name_strlen){
241: $this->page['search_error'][] = '[職種] 検索文字数は100文字までにしてください';
242:
243: } else if( 0 < $search_name_strlen ){
244: if( $this->page['user']['job_name_select'] == 2 ){
245: $this->_model_jobs->where('name2 like ?', '%' . $searches['name'] . '%');
246: } else {
247: $this->_model_jobs->where('name like ?', '%' . $searches['name'] . '%');
248: }
249: }
250: }
251: }
252:
253: // 検索用 name
254: if( isset($searches['search_name']) ){
255: if( is_array($searches['search_name']) && 0 < count($searches['search_name']) ){
256:
257: if( in_array('その他', $searches['search_name'], true) ){
258: if( count($searches['search_name']) === 1 ){
259:
260: $this->_model_jobs->where('', array(), 'AND');
261: $this->_model_jobs->whereOpen();
262: $this->_model_jobs->where("search_name IS NULL OR search_name = ''");
263: $this->_model_jobs->whereClose();
264:
265: } else {
266: $searches['search_name'] = array_filter($searches['search_name'], function($item) {
267: return $item !== "その他";
268: });
269:
270: $this->_model_jobs->where('', array(), 'AND');
271: $this->_model_jobs->whereOpen();
272: $this->_model_jobs->where('search_name IN ('. implode(',', array_fill(0, count($searches['search_name']), '?')) . ')', $searches['search_name'], 'OR');
273: $this->_model_jobs->where("search_name IS NULL OR search_name = ''", array(), 'OR');
274: $this->_model_jobs->whereClose();
275: }
276:
277: } else {
278: $this->_model_jobs->where('search_name IN ('. implode(',', array_fill(0, count($searches['search_name']), '?')) . ')', $searches['search_name']);
279: }
280:
281: } else {
282: $search_name_strlen = mb_strlen($searches['search_name']);
283: if(100 < $search_name_strlen){
284: $this->page['search_error'][] = '[職種] 検索文字数は100文字までにしてください';
285:
286: } else if( 0 < $search_name_strlen ){
287: $this->_model_jobs->where('search_name like ?', '%' . $searches['search_name'] . '%');
288: }
289: }
290: }
291:
292: // 店舗名
293: if( isset($searches['store']) ){
294: if( is_array($searches['store']) && 0 < count($searches['store']) ){
295:
296: if( in_array('その他', $searches['store'], true) ){
297: if( count($searches['store']) === 1 ){
298:
299: $this->_model_jobs->where('', array(), 'AND');
300: $this->_model_jobs->whereOpen();
301: $this->_model_jobs->where("store IS NULL OR store = ''");
302: $this->_model_jobs->whereClose();
303:
304: } else {
305: $searches['store'] = array_filter($searches['store'], function($item) {
306: return $item !== "その他";
307: });
308:
309: $this->_model_jobs->where('', array(), 'AND');
310: $this->_model_jobs->whereOpen();
311: $this->_model_jobs->where('store IN ('. implode(',', array_fill(0, count($searches['store']), '?')) . ')', $searches['store'], 'OR');
312: $this->_model_jobs->where("store IS NULL OR store = ''", array(), 'OR');
313: $this->_model_jobs->whereClose();
314: }
315:
316: } else {
317: $this->_model_jobs->where('store IN ('. implode(',', array_fill(0, count($searches['store']), '?')) . ')', $searches['store']);
318: }
319:
320: } else {
321: $store_strlen = mb_strlen($searches['store']);
322: if(100 < $store_strlen){
323: $this->page['search_error'][] = '[店舗名] 検索文字数は100文字までにしてください';
324:
325: } else if( 0 < $store_strlen ){
326: $this->_model_jobs->where('store like ?', '%' . $searches['store'] . '%');
327: }
328: }
329: }
330:
331: if( isset($searches['place']) ){
332: $search_place_strlen = mb_strlen($searches['place']);
333: if( 100 < $search_place_strlen ){
334: $this->page['search_error'][] = '[勤務地] 検索文字数は100文字までにしてください';
335: } else if( 0 < $search_place_strlen ){
336: $this->_model_jobs->where('', array(), 'AND');
337: $this->_model_jobs->whereOpen();
338: $this->_model_jobs->where('pref like ?', '%' . $searches['place'] . '%', 'OR');
339: $this->_model_jobs->where('city like ?', '%' . $searches['place'] . '%', 'OR');
340: $this->_model_jobs->where('place like ?', '%' . $searches['place'] . '%', 'OR');
341: $this->_model_jobs->whereClose();
342: }
343: }
344:
345: // New search pref
346: if( isset($searches['pref']) ){
347: if( is_array($searches['pref']) && 0 < count($searches['pref']) ){
348: $this->_model_jobs->where('pref IN ('. implode(',', array_fill(0, count($searches['pref']), '?')) . ')', $searches['pref']);
349: } else if( 0 < mb_strlen($searches['pref']) ){
350: $this->_model_jobs->where('pref = ?', $searches['pref']);
351: }
352: }
353:
354: // New search short_type
355: if( isset($searches['short_type']) && 0 < mb_strlen($searches['short_type']) ){
356: $this->_model_jobs->where('short_type = ?', $searches['short_type']);
357: }
358:
359: $pageUnitCount = null;
360: if( 2 == $this->page['user']['html_template'] || 3 == $this->page['user']['html_template'] ){
361: $pageUnitCount = 12;
362: } else {
363: $pageUnitCount = 60;
364: }
365:
366: if(! isset($this->page['search_error'])){
367: $this->page['jobs'] = $this->_model_jobs
368: ->select('*, usual_name AS selected_name, (SELECT image_id FROM cms_job_media AS tm WHERE tm.job_id = cms_job.job_id AND tm.media_role = \'main\' and tm.valid = 1 ORDER BY tm.order_by ASC LIMIT 1) AS main_image_id')
369: ->where('user_id = ?', $this->_userData->getId())
370: ->order('priority_flag', 'desc')
371: ->order('post_date', 'desc')
372: ->order('job_id', 'desc')
373: ->listMax($pageUnitCount)
374: ->current($page)
375: ->find();
376: }
377:
378: return false;
379: }
380:
381: /**
382: * Get Top Page data
383: *
384: * @return void
385: */
386: protected function getTopData()
387: {
388: // データ取得
389: // Get data
390:
391: // Search Jobs
392: $this->page['search_name'] = $this->in('search_name');
393: $this->page['search_search_name'] = $this->in('search_search_name');
394: $this->page['search_place'] = $this->in('search_place');
395: $this->page['search_store'] = $this->in('search_store');
396: $this->page['search_location_group'] = $this->in('search_location_group');
397: $this->page['search_pref'] = $this->in('search_pref');
398: $this->page['search_short_type'] = $this->in('search_short_type');
399:
400: $this->page['search_submit'] = $this->in('search_submit'); // テンプレート側で検索ボタンを押したかどうかの判断
401:
402: $this->page['data'] = $this->executeJobSearch(array('name' => $this->page['search_name'],
403: 'search_name' => $this->page['search_search_name'],
404: 'place' => $this->page['search_place'],
405: 'store' => $this->page['search_store'],
406: 'pref' => $this->page['search_pref'],
407: 'short_type' => $this->page['search_short_type']), $this->in('p'));
408:
409: // ページャーのデータを取得
410: // Get pager data
411: $this->page['pager'] = $this->_model_jobs->getPager();
412: $this->page['pageUnitCount'] = 60; // for
413:
414: if( $this->page['user']['is_user_search'] == 1 ){
415: // Get prefs
416: if( $this->page['user']['user_search_option'] & 1 ){
417: $userExistsPrefs = $this->_model_jobs
418: ->select('pref')
419: ->where('user_id = ? AND (visible = 1 OR visible = 99)', $this->_userData->getId())->group('pref')
420: ->listMax(9999)
421: ->simple_find();
422:
423: if( is_array($userExistsPrefs) && 0 < count($userExistsPrefs) ){
424: $existsPrefs = [];
425: foreach($userExistsPrefs as $userExistsPref){
426: $existsPrefs[] = $userExistsPref['pref'];
427: }
428:
429: $allLocationGroups = [
430: 'ht' => ['prefs' => [], 'allPrefs' => ['北海道', '青森県', '岩手県', '宮城県', '秋田県', '山形県', '福島県'], 'html' => '<div class="sp">北海道</div><div class="sp">東北</div><div class="pc">北海道・東北</div>', 't2_html' => '<span>北海道<br class="u-sp">・東北</span>'], // 北海道・東北
431: 'kt' => ['prefs' => [], 'allPrefs' => ['茨城県', '栃木県', '群馬県', '埼玉県', '千葉県', '東京都', '神奈川県'], 'html' => '<div>関東</div>', 't2_html' => '<span>関東</span>'], // 関東
432: 'hk' => ['prefs' => [], 'allPrefs' => ['新潟県', '富山県', '石川県', '福井県', '山梨県', '長野県'], 'html' => '<div class="sp">北陸</div><div class="sp">甲信越</div><div class="pc">北陸・甲信越</div>', 't2_html' => '<span>北陸<br class="u-sp">・甲信越</span>'], // 北陸・甲信越
433: 'tk' => ['prefs' => [], 'allPrefs' => ['岐阜県', '静岡県', '愛知県', '三重県'], 'html' => '<div>東海</div>', 't2_html' => '<span>東海</span>'], // 東海
434: 'ks' => ['prefs' => [], 'allPrefs' => ['滋賀県', '京都府', '大阪府', '兵庫県', '奈良県', '和歌山県'], 'html' => '<div>関西</div>', 't2_html' => '<span>関西</span>'], // 関西
435: 'cs' => ['prefs' => [], 'allPrefs' => ['鳥取県', '島根県', '岡山県', '広島県', '山口県', '徳島県', '香川県', '愛媛県', '高知県'], 'html' => '<div class="sp">中国</div><div class="sp">四国</div><div class="pc">中国・四国</div>', 't2_html' => '<span>中国<br class="u-sp">・四国</span>'], // 中国・四国
436: 'ko' => ['prefs' => [], 'allPrefs' => ['福岡県', '佐賀県', '長崎県', '熊本県', '大分県', '宮崎県', '鹿児島県', '沖縄県'], 'html' => '<div class="sp">九州</div><div class="sp">沖縄</div><div class="pc">九州・沖縄</div>', 't2_html' => '<span>九州<br class="u-sp">・沖縄</span>'] // 九州・沖縄
437: ];
438:
439: $this->page['locationGroups'] = [];
440: foreach($allLocationGroups as $locationGroupKey => $locationGroup){
441: $prefs = array_intersect($locationGroup['allPrefs'], $existsPrefs);
442: if( is_array($prefs) && 0 < count($prefs) ){
443: $locationGroup['prefs'] = $prefs;
444: $this->page['locationGroups'][$locationGroupKey] = $locationGroup;
445: }
446: }
447: }
448: }
449:
450: // Short Type
451: if( $this->page['user']['user_search_option'] & 2 ){
452: $userExistsShortTypes = $this->_model_jobs
453: ->select('short_type')
454: ->where('user_id = ? AND (visible = 1 OR visible = 99)', $this->_userData->getId())->group('short_type')
455: ->listMax(9999)
456: ->simple_find();
457:
458: $this->page['shortTypes'] = [];
459: foreach($userExistsShortTypes as $userExistsShortType){
460: $this->page['shortTypes'][$userExistsShortType['short_type']] = $userExistsShortType['short_type'];
461: }
462: }
463:
464: // Get job_name
465: if( $this->page['user']['user_search_option'] & 4 ){
466: $userExistsSearchNames = $this->_model_jobs
467: ->select('search_name')
468: ->where('user_id = ? AND (visible = 1 OR visible = 99)', $this->_userData->getId())->group('search_name')
469: ->listMax(9999)
470: ->simple_find();
471:
472: $jobName = $this->_model_job_name->select('text')->where('user_id = ?', $this->_userData->getId())->one();
473: if( isset($jobName['text']) ){
474: $this->page['jobNames'] = array_intersect(array_filter(preg_split('/\r\n|\r|\n/', $jobName['text']), function($value) { return 0 < strlen($value); }),
475: array_filter(array_column($userExistsSearchNames, 'search_name'), function($value) { return 0 < strlen($value); }));
476: if( is_array($this->page['jobNames']) ){
477: $this->page['jobNames'][] = 'その他';
478: } else {
479: $this->page['jobNames'] = ['その他'];
480: }
481: }
482: }
483:
484: // Get job_store
485: if( $this->page['user']['user_search_option'] & 8 ){
486: $userExistsStores = $this->_model_jobs
487: ->select('store')
488: ->where('user_id = ? AND (visible = 1 OR visible = 99)', $this->_userData->getId())->group('store')
489: ->listMax(9999)
490: ->simple_find();
491:
492: $jobStore = $this->_model_job_store->select('text, label')->where('user_id = ?', $this->_userData->getId())->one();
493: if( isset($jobStore['text']) ){
494: $this->page['jobStores'] = array_intersect(array_filter(preg_split('/\r\n|\r|\n/', $jobStore['text']), function($value) { return 0 < strlen($value); }),
495: array_filter(array_column($userExistsStores, 'store'), function($value) { return 0 < strlen($value); }));
496: if( is_array($this->page['jobStores']) ){
497: $this->page['jobStores'][] = 'その他';
498: } else {
499: $this->page['jobStores'] = ['その他'];
500: }
501: }
502:
503: if( isset($jobStore['label']) ){
504: $this->page['jobStoreLabel'] = $jobStore['label'];
505: }
506: }
507: }
508:
509: // データ取得
510: // Get data
511: if( $this->page['user']['html_template'] != 2 && $this->page['user']['html_template'] != 3 ){ // html_template == 2 の場合は parts と contact data は必要ない
512:
513: // Parts Data
514: $parts = $this->getClass('Parts');
515: $this->page['parts'] = $parts->getData($this->_userData->getId(), 0);
516:
517: // Contact Data
518: $actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/'; // Get Displaying current page URL
519: $this->_getContactPageData(null, $actual_link);
520: }
521:
522: // 処理
523: if( $this->page['user']['login'] === 'builpo' ){
524: $this->displayPage( 'detail/index-user-builpo' );
525: } else {
526: if( 0 < $this->page['user']['html_template'] ){
527: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_index' );
528: } else {
529: $this->displayPage( 'detail/index' );
530: }
531: }
532: }
533:
534: protected function getAboutData($data_key = 'data', $html = true)
535: {
536: $model_about = new Model(false, array(
537: 'table' => 'cms_profile_about',
538: 'id' => 'profile_about_id',
539: ));
540: $this->page[$data_key] = $model_about->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_about_id', 'ASC')->listMax(9999)->simple_find();
541:
542: if( $html ){
543: $this->assignPickupData();
544:
545: if( 0 < $this->page['user']['html_template'] ){
546: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_about' );
547: } else {
548: $this->displayPage( 'detail/about' );
549: }
550: }
551: }
552:
553: protected function getBenefitData()
554: {
555: $model_benefit = new Model(false, array(
556: 'table' => 'cms_profile_benefit',
557: 'id' => 'profile_benefit_id',
558: ));
559:
560: if( $this->page['user']['html_template'] == 3 ){
561: $model_category_header = new Model(false, array(
562: 'table' => 'cms_category_header',
563: 'id' => 'category_header_id',
564: ));
565: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'benefit'])->one();
566:
567: $data = $model_benefit->select('cms_profile_benefit_category.profile_benefit_category_id AS category_id, cms_profile_benefit_category.name AS category_name, image_id, head, content')
568: ->join('cms_profile_benefit_category', 'inner', 'cms_profile_benefit_category.profile_benefit_category_id = cms_profile_benefit.profile_benefit_category_id')
569: ->where('cms_profile_benefit.user_id = ? AND cms_profile_benefit_category.valid = 1 AND cms_profile_benefit.valid = 1', $this->_userData->getId())
570: ->order('cms_profile_benefit.profile_benefit_category_id', 'ASC')->order('cms_profile_benefit.profile_benefit_id', 'ASC')->listMax(9999)->simple_find();
571: if( is_array($data) && 0 < count($data) ){
572: foreach($data as $item){
573: if( !isset($this->page['data'][$item['category_id']]) ){
574: $this->page['category_data'][$item['category_id']] = $item['category_name'];
575: $this->page['data'][$item['category_id']] = [];
576: }
577: $this->page['data'][$item['category_id']][] = $item;
578: }
579: }
580: } else {
581: $this->page['data'] = $model_benefit->select('image_id, head, content')->where('user_id = ?', $this->_userData->getId())->order('profile_benefit_id', 'ASC')->listMax(9999)->simple_find();
582: }
583:
584: $this->assignPickupData();
585:
586: if( 0 < $this->page['user']['html_template'] ){
587: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_benefit' );
588: } else {
589: $this->displayPage( 'detail/benefit' );
590: }
591: }
592:
593: protected function getVoiceData()
594: {
595: if( $this->page['user']['html_template'] == 3 ){
596: $model_category_header = new Model(false, array(
597: 'table' => 'cms_category_header',
598: 'id' => 'category_header_id',
599: ));
600: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'voice'])->one();
601: }
602:
603: $model_voice = new Model(false, array(
604: 'table' => 'cms_profile_voice',
605: 'id' => 'profile_voice_id',
606: ));
607: $this->page['data'] = $model_voice->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_voice_id', 'ASC')->listMax(9)->current($this->in('p'))->find();
608: $this->page['pager'] = $model_voice->getPager();
609:
610: $this->assignPickupData();
611:
612: if( 0 < $this->page['user']['html_template'] ){
613: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_voice' );
614: } else {
615: $this->displayPage( 'detail/voice' );
616: }
617: }
618:
619: protected function getVoiceDetailData($voiceId)
620: {
621: if( $this->page['user']['html_template'] == 3 ){
622: $model_category_header = new Model(false, array(
623: 'table' => 'cms_category_header',
624: 'id' => 'category_header_id',
625: ));
626: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'voice'])->one();
627: }
628:
629: $model_voice = new Model(false, array(
630: 'table' => 'cms_profile_voice',
631: 'id' => 'profile_voice_id',
632: ));
633: $this->page['data'] = $model_voice->select('*')->where('user_id = ? AND profile_voice_id = ?', [$this->_userData->getId(), $voiceId])->one();
634: if( isset($this->page['data']) && is_array($this->page['data']) ){
635: $this->assignPickupData();
636:
637: if( 0 < $this->page['user']['html_template'] ){
638: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_voice-detail' );
639: } else {
640: $this->displayPage( 'detail/voice-detail' );
641: }
642: } else {
643: return $this->redirect($this->_userData->getLogin() . '/voice.html#intro');
644: }
645: }
646:
647: protected function getDataData()
648: {
649: if( $this->page['user']['html_template'] == 3 ){
650: $model_category_header = new Model(false, array(
651: 'table' => 'cms_category_header',
652: 'id' => 'category_header_id',
653: ));
654: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'data'])->one();
655: }
656:
657: $model_data = new Model(false, array(
658: 'table' => 'cms_profile_data',
659: 'id' => 'profile_data_id',
660: ));
661: $this->page['data'] = $model_data->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_data_id', 'ASC')->listMax(9999)->simple_find();
662:
663: $this->assignPickupData();
664:
665: if( 0 < $this->page['user']['html_template'] ){
666: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_data' );
667: } else {
668: $this->displayPage( 'detail/data' );
669: }
670: }
671:
672: protected function getPhotoData()
673: {
674: if( $this->page['user']['html_template'] == 3 ){
675: $model_category_header = new Model(false, array(
676: 'table' => 'cms_category_header',
677: 'id' => 'category_header_id',
678: ));
679: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'photo'])->one();
680: }
681:
682: $model_photo = new Model(false, array(
683: 'table' => 'cms_profile_photo',
684: 'id' => 'profile_photo_id',
685: ));
686: $this->page['data'] = $model_photo->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_photo_id', 'ASC')->listMax(9)->current($this->in('p'))->find();
687: $this->page['pager'] = $model_photo->getPager();
688:
689: $this->assignPickupData();
690:
691: if( 0 < $this->page['user']['html_template'] ){
692: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_photo' );
693: } else {
694: $this->displayPage( 'detail/photo' );
695: }
696: }
697:
698: protected function getProfileData()
699: {
700: if( $this->page['user']['html_template'] == 3 ){
701: $model_category_header = new Model(false, array(
702: 'table' => 'cms_category_header',
703: 'id' => 'category_header_id',
704: ));
705: $this->page['category_header_data'] = $model_category_header->select('image_id, description')->where('user_id = ? AND category_key = ?', [$this->_userData->getId(), 'profile'])->one();
706: }
707:
708: $this->assignPickupData();
709:
710: if( 0 < $this->page['user']['html_template'] ){
711: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_profile' );
712: } else {
713: $this->displayPage( 'detail/profile' );
714: }
715: }
716:
717: /**
718: * Get Top Page data
719: *
720: * @return void
721: */
722: protected function getTopDataJobs($page)
723: {
724: // データ取得
725: // Get data
726:
727: // Search Jobs
728: $this->page['search_name'] = $this->in('search_name');
729: $this->page['search_search_name'] = $this->in('search_search_name');
730: $this->page['search_place'] = $this->in('search_place');
731: $this->page['search_store'] = $this->in('search_store');
732: $this->page['search_pref'] = $this->in('search_pref');
733: $this->page['search_short_type'] = $this->in('search_short_type');
734:
735: $this->executeJobSearch(array('name' => $this->page['search_name'],
736: 'search_name' => $this->page['search_search_name'],
737: 'place' => $this->page['search_place'],
738: 'store' => $this->page['search_store'],
739: 'pref' => $this->page['search_pref'],
740: 'short_type' => $this->page['search_short_type']), $page);
741:
742: // 処理
743: $this->displayPage( 'detail/template/jobs_list' );
744: }
745:
746: /**
747: * Get Detail Page Data
748: *
749: * @param int $externalId
750: * @return void
751: */
752: protected function getDetailPageData($externalId)
753: {
754: // Get Job data
755: $this->page['data'] =
756: $this->_model_jobs
757: ->select('*, usual_name AS selected_name')
758: ->where('user_id = ?', $this->_userData->getId())
759: ->where('external_job_id = ?', $externalId)
760: ->where('(visible = 1 OR visible = 99)')
761: ->one();
762:
763: // If not Exists target Job Information
764: // Redirect to company top
765: if(! $this->page['data']) {
766: // 履歴から捜す
767: $external_job_id_history = $this->_model_external_job_id_history->select('(SELECT external_job_id FROM cms_job AS current WHERE current.job_id = cms_external_job_id_history.job_id AND (visible = 1 OR visible = 99) AND valid = 1 LIMIT 1) AS external_job_id')
768: ->where('user_id = ?', $this->_userData->getId())
769: ->where('external_job_id = ?', $externalId)
770: ->one();
771:
772: if($external_job_id_history && is_array($external_job_id_history) && isset($external_job_id_history['external_job_id']) && $external_job_id_history['external_job_id'] ){
773: return $this->redirect($this->_userData->getLogin() . '/detail/post_'.$external_job_id_history['external_job_id'].'.html');
774: } else {
775: return $this->redirect($this->_userData->getLogin() . '/');
776: }
777: }
778:
779: // for url date_post
780: $this->page['external_job_id_data'] = $this->_model_external_job_id_history
781: ->where('user_id = ?', $this->_userData->getId())
782: ->where('external_job_id = ?', $externalId)
783: ->one();
784:
785: // Displaying current page URL
786: //$actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/post_'.$this->page['data'][$this->page['id']].'.html';
787: $actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/post_'.$externalId.'.html';
788:
789: $this->_getDetailPageData($this->page['data']['job_id'], $actual_link);
790: }
791:
792: /**
793: * Get Detail Page Data
794: *
795: * @param int $internalId
796: * @param string $secret
797: * @return void
798: */
799: protected function getDetailPageDataSecret($internalId, $secret)
800: {
801: // Get Job data
802: $secretExpire = (isset($this->config['site_info']['secret_expire'])) ? $this->config['site_info']['secret_expire'] : '10 DAY';
803: $this->page['data'] =
804: $this->_model_jobs
805: ->select('*, usual_name AS selected_name')
806: ->where('user_id = ?', $this->_userData->getId())
807: ->where('job_id = ?', $internalId)
808: ->where('DATE_SUB(now(), INTERVAL '.$secretExpire.') < secret_created')
809: ->one();
810:
811: if( $this->page['data'] && hash('sha256', $this->page['data']['job_id'] . $this->page['data']['secret_created']) === $secret ){
812: // Displaying current page URL
813: $actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/secret_'.$internalId.'.html?secret='.$secret;
814:
815: $this->_getDetailPageData($this->page['data']['job_id'], $actual_link);
816: } else {
817: header('HTTP/1.0 404 Not Found');
818: echo "Secret Not Found.<br/>";
819: exit;
820: }
821: }
822:
823: /**
824: * Display Contact Page Data
825: *
826: * @param int $externalId
827: * @return void
828: */
829: protected function _getContactPageData($jobId, $actual_link)
830: {
831:
832: // For Displaying current page URL
833: $this->page['actual_link'] = $actual_link;
834: $this->setHidden('actual_link', $actual_link);
835:
836: // application form
837: //if( $this->getSession( 'contact_form' ) ) {
838: // $this->page['contact_data'] = $this->getSession( 'contact_form' );
839: // $this->unsetSession( 'contact_form' );
840: //}
841:
842: //$this->setTicket( 'contact' );
843: //$this->setSession( 'contact_referer', array('referer' => (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : NULL));
844:
845: // Get Mail data
846: $this->page['mail']
847: = $this->_model_mail
848: ->current($this->in('p'))
849: ->where('user_id = ?', $this->_userData->getId())
850: ->one();
851:
852: if(isset($this->page['data']['mailaddress']) && $this->page['data']['mailaddress']) {
853: $this->setHidden('mail_to', str_rot13(base64_encode($this->page['data']['mailaddress'])));
854: }
855: //if(isset($this->page['data']['job_id']) && $this->page['data']['job_id']) {
856: if( $jobId ){
857: $this->setHidden('job_id', $jobId);
858: }
859: if(isset($this->page['data']['recruit_id']) && $this->page['data']['recruit_id']) {
860: $this->setHidden('recruit_id', $this->page['data']['recruit_id']);
861: }
862:
863: // For contact application control_number
864: if(isset($this->page['data']['control_number']) && $this->page['data']['control_number']) {
865: $this->page['contact_data']['control_number'] = $this->page['data']['control_number'];
866: }
867:
868: // For contact application input area
869: if(isset($this->page['data']['usual_name']) && $this->page['data']['usual_name']){
870: $this->page['contact_data']['application'] = $this->page['data']['usual_name'];
871: }
872:
873: // For select box: years
874: $years = array_combine(range(1952,date('Y')), range(1952,date('Y')));
875: $this->page['years'] = $years;
876:
877: // For select box: months
878: $months = array_combine(range(1,12), range(1,12));
879: $this->page['months'] = $months;
880:
881: // For select box: days
882: $days = array_combine(range(1,31), range(1,31));
883: $this->page['days'] = $days;
884:
885: // For privacy_policy
886: $privacy_policy_rep = array();
887: $privacy_policy_rep[0] = $this->page['user']['name'];
888:
889: if(isset($this->page['data']['phone']) && $this->page['data']['phone']){
890: $privacy_policy_rep[1] = $this->page['data']['phone'];
891: } else {
892: $privacy_policy_rep[1] = $this->page['user']['phone'];
893: }
894: if( isset($this->page['user']['privacy_policy']) && $this->page['user']['privacy_policy'] && !preg_match('/^(\s| |\r|\n|\r\n)*$/su', $this->page['user']['privacy_policy']) ){
895: $this->page['user']['privacy_policy'] = preg_replace(array('/%user_name%/', '/%phone%/'), $privacy_policy_rep, $this->page['user']['privacy_policy']);
896: } else {
897: $this->page['user']['privacy_policy'] = preg_replace(array('/%user_name%/', '/%phone%/'), $privacy_policy_rep, AbstractController::$_privacy_policy);
898: }
899:
900: if( empty($this->page['contact_data']['year']) && empty($this->page['contact_data']['month']) && empty($this->page['contact_data']['day']) ){
901: if( !isset($this->page['contact_data']) || !is_array($this->page['contact_data']) ) $this->page['contact_data'] = array();
902: $this->page['contact_data']['year'] = 1998;
903: }
904: }
905:
906: /**
907: * Display Detail Page Data
908: *
909: * @param int $externalId
910: * @return void
911: */
912: protected function _getDetailPageData($internalId, $actual_link)
913: {
914: // Get Parts data
915: $parts = $this->getClass('Parts');
916: $this->page['parts'] = $parts->getData($this->_userData->getId(), $internalId);
917:
918: if( $this->page['user']['html_template'] == 2 || $this->page['user']['html_template'] == 3 ){
919: $medias = $this->_model_medias->select('media_role, media_title, media_type, image_id, youtube_url')->where('job_id = ? AND valid = 1', $internalId)->order('order_by', 'ASC')->simple_find();
920: } else {
921: $medias = $this->_model_medias->select('media_role, media_title, media_type, image_id, youtube_url')->where('job_id = ? AND (media_role = \'main\' OR media_role = \'youtube\') AND valid = 1', $internalId)->order('order_by', 'ASC')->simple_find();
922: }
923:
924: if( is_array($medias) && 0 < count($medias) ){
925: $this->page['data']['main_images'] = array();
926: foreach($medias as $media){
927: if( $media['media_role'] === 'main' ){
928: $this->page['data']['main_images'][] = $media['image_id'];
929:
930: } else if( $media['media_role'] === 'youtube' ){
931: $this->page['data']['youtube_url'] = $media['youtube_url'];
932:
933: } else {
934: if( $this->page['user']['html_template'] == 2 || $this->page['user']['html_template'] == 3 ){
935: foreach(array('job', 'culture', 'welfare') as $role){
936: if( $media['media_role'] === $role ){
937: $this->page['data'][$role . '_media_title'] = $media['media_title'];
938: $this->page['data'][$role . '_media_type'] = $media['media_type'];
939: if( $media['media_type'] == 1 ){
940: $this->page['data'][$role . '_image_id'] = $media['image_id'];
941: } else if( $media['media_type'] == 2 ){
942: $this->page['data'][$role . '_youtube_url'] = $media['youtube_url'];
943: }
944: }
945: }
946: }
947: }
948: }
949: }
950:
951: // Get Job list data
952: $this->page['list_data']
953: = $this->_model_jobs
954: ->listMax(3)//3
955: ->current($this->in('p'))
956: ->select('*, usual_name AS selected_name, (SELECT image_id FROM cms_job_media AS tm WHERE tm.job_id = cms_job.job_id AND tm.media_role = \'main\' and tm.valid = 1 ORDER BY tm.order_by ASC LIMIT 1) AS main_image_id')
957: ->where('job_id != ?', $internalId)
958: ->where('user_id = ?', $this->_userData->getId())
959: ->where('priority_flag = ?', 1)
960: ->order('post_date', 'desc')
961: ->simple_find();
962:
963: if($this->page['user']['job_schema_version'] == 2){
964: // Get Category list data
965: $this->page['categories']
966: = $this->_model_categories
967: ->listMax(9999)
968: ->select('name')
969: ->where('job_id =?', $internalId)
970: ->order('order_by', 'asc')
971: ->simple_find();
972:
973: // Get Tag list data
974: $this->page['occupations']
975: = $this->_model_occupations
976: ->listMax(9999)
977: ->select('suid')
978: ->where('job_id =?', $internalId)
979: ->order('order_by', 'asc')
980: ->simple_find();
981:
982: // Get Tag list data
983: $this->page['searches']
984: = $this->_model_searches
985: ->listMax(9999)
986: ->select('suid')
987: ->where('job_id =?', $internalId)
988: ->order('order_by', 'asc')
989: ->simple_find();
990:
991: } else if($this->page['user']['job_schema_version'] == 1){
992: // Get Category list data
993: $this->page['categories']
994: = $this->_model_categories
995: ->listMax(9999)
996: ->select('name')
997: ->where('job_id =?', $internalId)
998: ->order('order_by', 'asc')
999: ->simple_find();
1000:
1001: // Get Tag list data
1002: $this->page['keywords']
1003: = $this->_model_keywords
1004: ->listMax(9999)
1005: ->select('name')
1006: ->where('job_id =?', $internalId)
1007: ->order('order_by', 'asc')
1008: ->simple_find();
1009: } else {
1010: // Obsolete
1011: // Get Tag list data
1012: $this->page['tags']
1013: = $this->_model_tags
1014: ->listMax(9999)
1015: ->select('name')
1016: ->where('job_id =?', $internalId)
1017: ->order('order_by', 'asc')
1018: ->simple_find();
1019: }
1020:
1021: // Contact html_template が 2 or 3 の場合は form 画面が分離しているので読み込む必要がない
1022: if( $this->page['user']['html_template'] != 2 && $this->page['user']['html_template'] != 3 ){
1023: $this->_getContactPageData($internalId, $actual_link);
1024: }
1025:
1026: // LD+JSON
1027: $ldJson = array("@context" => "http://schema.org/", "@type" => "JobPosting");
1028:
1029: // datePosted
1030: $ldJson["datePosted"] = ( isset($this->page['external_job_id_data']['created']) ) ? $this->page['external_job_id_data']['created'] : $this->page['data']['post_date'];
1031:
1032: //description
1033: if( $this->page['user']['job_schema_version'] == 2 ){
1034: $category_info = $this->loadConfig('category_info');
1035:
1036: if( isset($this->page['occupations']) && is_array($this->page['occupations']) && 0 < count($this->page['occupations']) ){
1037: $this->page['occupationsString'] = implode(' / ', array_map(function($occupation) use($category_info) {
1038: foreach($category_info['job_occupations'] as $category){
1039: if( isset($category[$occupation['suid']][0]) ) return $category[$occupation['suid']][0];
1040: }
1041: return '';
1042: }, $this->page['occupations']));
1043: }
1044:
1045: if( isset($this->page['searches']) && is_array($this->page['searches']) && 0 < count($this->page['searches']) ){
1046: $this->page['searchesString'] = implode(' / ', array_map(function($search) use($category_info) { return (isset($category_info['job_searches'][$search['suid']])) ? $category_info['job_searches'][$search['suid']] : '';}, $this->page['searches']));
1047: // 嘱託社員用
1048: $this->page['search_9HCQR'] = !empty(array_filter($this->page['searches'], function($search){ return $search['suid'] === '9HCQR'; }));
1049: }
1050: $ldJson['description'] = $this->fetchPage('detail/template/schema2_json_ld_description');
1051:
1052: } else {
1053: if( isset($this->page['keywords']) && is_array($this->page['keywords']) && 0 < count($this->page['keywords']) ){
1054: $this->page['keywordsString'] = implode(' / ', array_map(function($keyword){ return $keyword['name'];}, $this->page['keywords']));
1055: }
1056: $ldJson['description'] = $this->fetchPage('detail/template/json_ld_description');
1057: }
1058:
1059: // hiringOrganization
1060: $ldJson["hiringOrganization"] = array("@type" => "Organization",
1061: "name" => removeBreakLine($this->page['user']['name']),
1062: "sameAs" => FEGG_CURRENT_URL . '/' . $this->page['user']['login'],
1063: "logo" => FEGG_CURRENT_URL . '/images/kyujinbu-logo.png');
1064:
1065: // jobLocation
1066: $ldJson["jobLocation"] = array("@type" => "Place");
1067: $jobLocationAddress = array("@type" => "PostalAddress",
1068: "streetAddress" => removeBreakLine($this->page['data']['city'] . $this->page['data']['place']),
1069: "addressLocality" => removeBreakLine($this->page['data']['place_remark']),
1070: "addressRegion" => $this->page['data']['pref'],
1071: "postalCode" => $this->page['data']['postalcode'],
1072: "addressCountry" => "JP");
1073:
1074: if ($this->page['data']['work_latlng']) {
1075: $geo = explode(",", $this->page['data']['work_latlng']);
1076: if(is_array($geo) && count($geo) == 2){
1077: $address["geo"] = array(
1078: "@type" => "GeoCoordinates",
1079: "latitude" => trim($geo[0]),
1080: "longitude" => trim($geo[1]));
1081: }
1082: }
1083:
1084: $ldJson["jobLocation"]["address"] = $jobLocationAddress;
1085:
1086: // title
1087: $ldJson["title"] = removeBreakLine($this->page['data']['selected_name']);
1088:
1089: // baseSalary
1090: if( isset($this->page['data']['salary_amount']) && isset($this->page['data']['salary_amount_max'])
1091: && $this->page['data']['salary_amount'] && $this->page['data']['salary_amount_max'] ){
1092: $baseSalaryValue = array("@type" => "QuantitativeValue");
1093: if($this->page['data']['salary_amount'] && $this->page['data']['salary_amount'] == $this->page['data']['salary_amount_max']){
1094: $baseSalaryValue["value"] = $this->page['data']['salary_amount'];
1095: } else {
1096: $baseSalaryValue["minValue"] = $this->page['data']['salary_amount'];
1097: $baseSalaryValue["maxValue"] = $this->page['data']['salary_amount_max'];
1098: }
1099:
1100: $baseSalaryValue['unitText'] = ( isset($this->page['data']['salary_type']) ) ? $this->page['data']['salary_type'] : null;
1101:
1102: $ldJson["baseSalary"] = array("@type" => "MonetaryAmount", "currency" => "JPY", "value" => $baseSalaryValue);
1103: }
1104:
1105: $ldJson['directApply'] = true;
1106:
1107: // employmentType
1108: if( $this->page['user']['job_schema_version'] == 2 ){
1109: if ($this->page['data']['short_type']) {
1110: switch($this->page['data']['short_type']){
1111: case '5QWDV': // '正社員',
1112: $ldJson["employmentType"] = 'FULL_TIME';
1113: break;
1114:
1115: case '75GKK': // 'アルバイト・パート',
1116: $ldJson["employmentType"] = 'PART_TIME';
1117: break;
1118:
1119: case '8YWGX': // '派遣社員',
1120: $ldJson["employmentType"] = 'TEMPORARY';
1121: break;
1122:
1123: case 'T65DZ': // '業務委託'
1124: case 'T9BXE': // '契約社員'
1125: case 'T65DZ_QDAPK': // '業務委託(完全歩合)'
1126: $ldJson["employmentType"] = 'CONTRACTOR';
1127: break;
1128:
1129: default:
1130: $ldJson["employmentType"] = 'OTHER';
1131: }
1132: }
1133:
1134: } else {
1135: if ($this->page['data']['short_type']) {
1136: switch($this->page['data']['short_type']){
1137: case "正社員":
1138: case "新卒":
1139: $ldJson["employmentType"] = 'FULL_TIME';
1140: break;
1141:
1142: case "アルバイト・パート":
1143: case "嘱託社員":
1144: $ldJson["employmentType"] = 'PART_TIME';
1145: break;
1146:
1147: case "派遣社員":
1148: $ldJson["employmentType"] = 'TEMPORARY';
1149: break;
1150:
1151: case "請負":
1152: case "契約社員":
1153: case "業務委託":
1154: $ldJson["employmentType"] = 'CONTRACTOR';
1155: break;
1156:
1157: case "インターン":
1158: $ldJson["employmentType"] = 'INTERN';
1159: break;
1160:
1161: case "ボランティア":
1162: $ldJson["employmentType"] = 'VOLUNTEER';
1163: break;
1164:
1165: default:
1166: $ldJson["employmentType"] = 'OTHER';
1167: }
1168: }
1169: }
1170:
1171: // identifier
1172: $ldJson["identifier"] = array(
1173: "@type" => "PropertyValue",
1174: "name" => removeBreakLine($this->page['user']['name']),
1175: "value" => array('@type' => 'URL', 'url' => FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/'));
1176:
1177: //if("experienceRequirements" : {
1178: /*
1179: "experienceRequirements" : {
1180: "@type" : "Text",
1181: "description": "{{ if $this->page['data']['qualification }}{{ $this->page['data']['qualification|removeBreakLine }}{{ end }}{{ if $this->page['data']['education }} 最終学歴 {{ $this->page['data']['education|removeBreakLine }}{{ end }}{{ if $this->page['data']['experience }} 望ましい経験 {{ $this->page['data']['experience|removeBreakLine }}{{ end }}"
1182: },
1183: */
1184:
1185: //$ldJson["responsibilities"] = $this->page['data']['description|noescape|br|removeBreakLine
1186: //$ldJson["salaryCurrency"] = "JPY";
1187:
1188: //$ldJson["workHours"] = removeBreakLine($this->page['data']['time);
1189:
1190: //$ldJson["image"] = getImageUrl($define.FEGG_CURRENT_URL . '/' . $this->page['data']['main_image_id);
1191: //$ldJson["url"] = $this->page['actual_link;
1192:
1193: // $this->page['data'][']['main_image_id'] = FEGG_CURRENT_URL.'/'.getImageUrl($this->page['data'][']['main_image_id']);
1194:
1195: // finally encode as json.
1196: $this->page['data']['json_ld'] = json_encode($ldJson);
1197:
1198: // google map 向け
1199: if ($this->page['data']['work_latlng']) {
1200: $geo = explode(",", $this->page['data']['work_latlng']);
1201: if(is_array($geo) && count($geo) == 2){
1202: $this->page['latitude'] = trim($geo[0]);
1203: $this->page['longitude'] = trim($geo[1]);
1204: }
1205: }
1206:
1207: if($this->page['user']['job_schema_version'] == 2){
1208: if( 0 < $this->page['user']['html_template'] ){
1209: $this->displayPage('detail/schema2_t' . $this->page['user']['html_template'] . '_detail');
1210: } else {
1211: $this->displayPage('detail/schema2_detail');
1212: }
1213:
1214: } else {
1215: if( $this->page['user']['html_template'] == 1 ){
1216: $this->displayPage('detail/t1_detail');
1217: } else {
1218: $this->displayPage('detail/detail');
1219: }
1220: }
1221: }
1222:
1223: /**
1224: * Get XML Feed data
1225: *
1226: * @return void
1227: */
1228: protected function getXMLFeedData($mode)
1229: {
1230: $limit = null;
1231: if ( $this->in('_limit') ){
1232: $limit = (int)$this->in('_limit');
1233: }
1234:
1235: if ($mode === 'indeed') {
1236: $this->getClass('IndeedFeed');
1237: $this->loadConfig( 'site_info' );
1238: $options = array('user_id' => $this->_userData->getId(),
1239: 'indeed' => $this->config[ 'site_info' ]['indeed'],
1240: 'include_indeed' => true);
1241: $indeedFeed = new IndeedFeed($options);
1242: $indeedFeed->displayFeed($serviceKey = 'indeed', $templateKey = 'indeed', array('limit' => $limit));
1243:
1244: } else if ($mode === 'stanby') {
1245: $this->getClass('IndeedFeed');
1246: $this->loadConfig( 'site_info' );
1247: $options = array('user_id' => $this->_userData->getId());
1248: $indeedFeed = new IndeedFeed($options);
1249: $indeedFeed->displayFeed($serviceKey = 'stanby', $template = 'stanby', array('limit' => $limit));
1250:
1251: } else if ($mode === 'careerjet') {
1252: $this->getClass('IndeedFeed');
1253: $this->loadConfig( 'site_info' );
1254: $options = array('user_id' => $this->_userData->getId());
1255: $indeedFeed = new IndeedFeed($options);
1256: $indeedFeed->displayFeed($serviceKey = 'careerjet', $templateKey = 'indeed', array('limit' => $limit));
1257:
1258: } else if($mode === 'kyujinbox' || $mode === null ){
1259: $this->getClass('KyujinboxFeed');
1260: $options = array('user_id' => $this->_userData->getId());
1261: $kyujinboxFeed = new KyujinboxFeed($options);
1262: $kyujinboxFeed->displayFeed($serviceKey = 'kyujinbox', $templateKey = 'kyujinbox', array('limit' => $limit));
1263:
1264: } else {
1265: throw new Exception('Target feed Not found');
1266: }
1267: }
1268: }
1269: