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

私たちは笑顔をつくる

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

求人一覧

Job Listings

  • 急募

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

    スマイルナーシング中川
    名古屋市中川区下之一色町宮分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円
  • 急募

    「公式」有料老人ホームの看護師 介護未経験OK 有給と…

    スマイルナーシング小牧
    小牧市間々字神田436−1
    4,900,000円〜5,000,000円
  • 急募

    「公式」 有料老人ホームの准看護師 日勤のみ 定時に帰…

    スマイルナーシング小牧
    小牧市間々字神田436-1
    1,800円〜2,000円
  • 急募

    有料老人ホームの施設長候補(作業療法士、理学療法士)

    スマイルナーシング豊橋吉田方
    豊橋市小向町字北小向20-22月20日
    215,000円〜235,000円
  • 急募

    有料老人ホームの看護師 定時に退社できる 業界未経験可

    スマイルナーシング美濃加茂
    美濃加茂市加茂野町加茂野821ー2
    1,680円〜1,800円
  • 急募

    有料老人ホームの看護師 定時に退社できる 業界未経験可

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

    看護師 有料老人ホーム勤務 介護未経験可 定時に帰れる…

    スマイルナーシング金山
    名古屋市中区正木四丁目2-41
    4,900,000円〜5,500,000円
  • 急募

    有料老人ホームの看護師 介護未経験OK 定時に帰れる 有…

    スマイルナーシング金山
    名古屋市中区正木四丁目2-41
    4,900,000円〜5,500,000円
  • 急募

    有料老人ホームの介護スタッフ 定時に帰れる 有給とり…

    スマイルナーシング小牧
    小牧市間々字神田436-1
    3,300,000円〜4,500,000円
  • 急募

    有料老人ホームの看護スタッフ 夜勤専従 准看護師さん…

    スマイルナーシング美濃加茂
    美濃加茂市加茂野町加茂野821−2
    30,000円
1 2 3 4

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: ->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'] ){
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 ){ // 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()
535: {
536: $model_about = new Model(false, array(
537: 'table' => 'cms_profile_about',
538: 'id' => 'profile_about_id',
539: ));
540: $this->page['data'] = $model_about->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_about_id', 'ASC')->listMax(9999)->find();
541:
542: $this->assignPickupData();
543:
544: if( 0 < $this->page['user']['html_template'] ){
545: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_about' );
546: } else {
547: $this->displayPage( 'detail/about' );
548: }
549: }
550:
551: protected function getBenefitData()
552: {
553: $model_benefit = new Model(false, array(
554: 'table' => 'cms_profile_benefit',
555: 'id' => 'profile_benefit_id',
556: ));
557: $this->page['data'] = $model_benefit->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_benefit_id', 'ASC')->listMax(9999)->find();
558:
559: $this->assignPickupData();
560:
561: if( 0 < $this->page['user']['html_template'] ){
562: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_benefit' );
563: } else {
564: $this->displayPage( 'detail/benefit' );
565: }
566: }
567:
568: protected function getVoiceData()
569: {
570: $model_voice = new Model(false, array(
571: 'table' => 'cms_profile_voice',
572: 'id' => 'profile_voice_id',
573: ));
574: $this->page['data'] = $model_voice->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_voice_id', 'ASC')->listMax(9)->current($this->in('p'))->find();
575: $this->page['pager'] = $model_voice->getPager();
576:
577: $this->assignPickupData();
578:
579: if( 0 < $this->page['user']['html_template'] ){
580: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_voice' );
581: } else {
582: $this->displayPage( 'detail/voice' );
583: }
584: }
585:
586: protected function getVoiceDetailData($voiceId)
587: {
588: $model_voice = new Model(false, array(
589: 'table' => 'cms_profile_voice',
590: 'id' => 'profile_voice_id',
591: ));
592: $this->page['data'] = $model_voice->select('*')->where('user_id = ? AND profile_voice_id = ?', [$this->_userData->getId(), $voiceId])->one();
593: if( isset($this->page['data']) && is_array($this->page['data']) ){
594: $this->assignPickupData();
595:
596: if( 0 < $this->page['user']['html_template'] ){
597: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_voice-detail' );
598: } else {
599: $this->displayPage( 'detail/voice-detail' );
600: }
601: } else {
602: return $this->redirect($this->_userData->getLogin() . '/voice.html#intro');
603: }
604: }
605:
606: protected function getDataData()
607: {
608: $model_data = new Model(false, array(
609: 'table' => 'cms_profile_data',
610: 'id' => 'profile_data_id',
611: ));
612: $this->page['data'] = $model_data->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_data_id', 'ASC')->listMax(9999)->find();
613:
614: $this->assignPickupData();
615:
616: if( 0 < $this->page['user']['html_template'] ){
617: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_data' );
618: } else {
619: $this->displayPage( 'detail/data' );
620: }
621: }
622:
623: protected function getPhotoData()
624: {
625: $model_photo = new Model(false, array(
626: 'table' => 'cms_profile_photo',
627: 'id' => 'profile_photo_id',
628: ));
629: $this->page['data'] = $model_photo->select('*')->where('user_id = ?', $this->_userData->getId())->order('profile_photo_id', 'ASC')->listMax(9)->current($this->in('p'))->find();
630: $this->page['pager'] = $model_photo->getPager();
631:
632: $this->assignPickupData();
633:
634: if( 0 < $this->page['user']['html_template'] ){
635: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_photo' );
636: } else {
637: $this->displayPage( 'detail/photo' );
638: }
639: }
640:
641: protected function getProfileData()
642: {
643: $this->assignPickupData();
644:
645: if( 0 < $this->page['user']['html_template'] ){
646: $this->displayPage( 'detail/t' . $this->page['user']['html_template'] . '_profile' );
647: } else {
648: $this->displayPage( 'detail/profile' );
649: }
650: }
651:
652: /**
653: * Get Top Page data
654: *
655: * @return void
656: */
657: protected function getTopDataJobs($page)
658: {
659: // データ取得
660: // Get data
661:
662: // Search Jobs
663: $this->page['search_name'] = $this->in('search_name');
664: $this->page['search_search_name'] = $this->in('search_search_name');
665: $this->page['search_place'] = $this->in('search_place');
666: $this->page['search_store'] = $this->in('search_store');
667: $this->page['search_pref'] = $this->in('search_pref');
668: $this->page['search_short_type'] = $this->in('search_short_type');
669:
670: $this->executeJobSearch(array('name' => $this->page['search_name'],
671: 'search_name' => $this->page['search_search_name'],
672: 'place' => $this->page['search_place'],
673: 'store' => $this->page['search_store'],
674: 'pref' => $this->page['search_pref'],
675: 'short_type' => $this->page['search_short_type']), $page);
676:
677: // 処理
678: $this->displayPage( 'detail/template/jobs_list' );
679: }
680:
681: /**
682: * Get Detail Page Data
683: *
684: * @param int $externalId
685: * @return void
686: */
687: protected function getDetailPageData($externalId)
688: {
689: // Get Job data
690: $this->page['data'] =
691: $this->_model_jobs
692: ->select('*, usual_name AS selected_name')
693: ->where('user_id = ?', $this->_userData->getId())
694: ->where('external_job_id = ?', $externalId)
695: ->where('(visible = 1 OR visible = 99)')
696: ->one();
697:
698: // If not Exists target Job Information
699: // Redirect to company top
700: if(! $this->page['data']) {
701: // 履歴から捜す
702: $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')
703: ->where('user_id = ?', $this->_userData->getId())
704: ->where('external_job_id = ?', $externalId)
705: ->one();
706:
707: 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'] ){
708: return $this->redirect($this->_userData->getLogin() . '/detail/post_'.$external_job_id_history['external_job_id'].'.html');
709: } else {
710: return $this->redirect($this->_userData->getLogin() . '/');
711: }
712: }
713:
714: // for url date_post
715: $this->page['external_job_id_data'] = $this->_model_external_job_id_history
716: ->where('user_id = ?', $this->_userData->getId())
717: ->where('external_job_id = ?', $externalId)
718: ->one();
719:
720: // Displaying current page URL
721: //$actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/post_'.$this->page['data'][$this->page['id']].'.html';
722: $actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/post_'.$externalId.'.html';
723:
724: $this->_getDetailPageData($this->page['data']['job_id'], $actual_link);
725: }
726:
727: /**
728: * Get Detail Page Data
729: *
730: * @param int $internalId
731: * @param string $secret
732: * @return void
733: */
734: protected function getDetailPageDataSecret($internalId, $secret)
735: {
736: // Get Job data
737: $secretExpire = (isset($this->config['site_info']['secret_expire'])) ? $this->config['site_info']['secret_expire'] : '10 DAY';
738: $this->page['data'] =
739: $this->_model_jobs
740: ->select('*, usual_name AS selected_name')
741: ->where('user_id = ?', $this->_userData->getId())
742: ->where('job_id = ?', $internalId)
743: ->where('DATE_SUB(now(), INTERVAL '.$secretExpire.') < secret_created')
744: ->one();
745:
746: if( $this->page['data'] && hash('sha256', $this->page['data']['job_id'] . $this->page['data']['secret_created']) === $secret ){
747: // Displaying current page URL
748: $actual_link = FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/detail/secret_'.$internalId.'.html?secret='.$secret;
749:
750: $this->_getDetailPageData($this->page['data']['job_id'], $actual_link);
751: } else {
752: throw new Exception('404 Not found');
753: }
754: }
755:
756: /**
757: * Display Contact Page Data
758: *
759: * @param int $externalId
760: * @return void
761: */
762: protected function _getContactPageData($jobId, $actual_link)
763: {
764:
765: // For Displaying current page URL
766: $this->page['actual_link'] = $actual_link;
767: $this->setHidden('actual_link', $actual_link);
768:
769: // application form
770: //if( $this->getSession( 'contact_form' ) ) {
771: // $this->page['contact_data'] = $this->getSession( 'contact_form' );
772: // $this->unsetSession( 'contact_form' );
773: //}
774:
775: //$this->setTicket( 'contact' );
776: //$this->setSession( 'contact_referer', array('referer' => (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : NULL));
777:
778: // Get Mail data
779: $this->page['mail']
780: = $this->_model_mail
781: ->current($this->in('p'))
782: ->where('user_id = ?', $this->_userData->getId())
783: ->one();
784:
785: if(isset($this->page['data']['mailaddress']) && $this->page['data']['mailaddress']) {
786: $this->setHidden('mail_to', str_rot13(base64_encode($this->page['data']['mailaddress'])));
787: }
788: //if(isset($this->page['data']['job_id']) && $this->page['data']['job_id']) {
789: if( $jobId ){
790: $this->setHidden('job_id', $jobId);
791: }
792: if(isset($this->page['data']['recruit_id']) && $this->page['data']['recruit_id']) {
793: $this->setHidden('recruit_id', $this->page['data']['recruit_id']);
794: }
795:
796: // For contact application control_number
797: if(isset($this->page['data']['control_number']) && $this->page['data']['control_number']) {
798: $this->page['contact_data']['control_number'] = $this->page['data']['control_number'];
799: }
800:
801: // For contact application input area
802: if(isset($this->page['data']['usual_name']) && $this->page['data']['usual_name']){
803: $this->page['contact_data']['application'] = $this->page['data']['usual_name'];
804: }
805:
806: // For select box: years
807: $years = array_combine(range(1952,date('Y')), range(1952,date('Y')));
808: $this->page['years'] = $years;
809:
810: // For select box: months
811: $months = array_combine(range(1,12), range(1,12));
812: $this->page['months'] = $months;
813:
814: // For select box: days
815: $days = array_combine(range(1,31), range(1,31));
816: $this->page['days'] = $days;
817:
818: // For privacy_policy
819: $privacy_policy_rep = array();
820: $privacy_policy_rep[0] = $this->page['user']['name'];
821:
822: if(isset($this->page['data']['phone']) && $this->page['data']['phone']){
823: $privacy_policy_rep[1] = $this->page['data']['phone'];
824: } else {
825: $privacy_policy_rep[1] = $this->page['user']['phone'];
826: }
827: 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']) ){
828: $this->page['user']['privacy_policy'] = preg_replace(array('/%user_name%/', '/%phone%/'), $privacy_policy_rep, $this->page['user']['privacy_policy']);
829: } else {
830: $this->page['user']['privacy_policy'] = preg_replace(array('/%user_name%/', '/%phone%/'), $privacy_policy_rep, AbstractController::$_privacy_policy);
831: }
832:
833: if( empty($this->page['contact_data']['year']) && empty($this->page['contact_data']['month']) && empty($this->page['contact_data']['day']) ){
834: if( !isset($this->page['contact_data']) || !is_array($this->page['contact_data']) ) $this->page['contact_data'] = array();
835: $this->page['contact_data']['year'] = 1998;
836: }
837: }
838:
839: /**
840: * Display Detail Page Data
841: *
842: * @param int $externalId
843: * @return void
844: */
845: protected function _getDetailPageData($internalId, $actual_link)
846: {
847: // Get Parts data
848: $parts = $this->getClass('Parts');
849: $this->page['parts'] = $parts->getData($this->_userData->getId(), $internalId);
850:
851: if( $this->page['user']['html_template'] == 2 ){
852: $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')->find();
853: } else {
854: $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')->find();
855: }
856:
857: if( is_array($medias) && 0 < count($medias) ){
858: $this->page['data']['main_images'] = array();
859: foreach($medias as $media){
860: if( $media['media_role'] === 'main' ){
861: $this->page['data']['main_images'][] = $media['image_id'];
862:
863: } else if( $media['media_role'] === 'youtube' ){
864: $this->page['data']['youtube_url'] = $media['youtube_url'];
865:
866: } else {
867: if( $this->page['user']['html_template'] == 2 ){
868: foreach(array('job', 'culture', 'welfare') as $role){
869: if( $media['media_role'] === $role ){
870: $this->page['data'][$role . '_media_title'] = $media['media_title'];
871: $this->page['data'][$role . '_media_type'] = $media['media_type'];
872: if( $media['media_type'] == 1 ){
873: $this->page['data'][$role . '_image_id'] = $media['image_id'];
874: } else if( $media['media_type'] == 2 ){
875: $this->page['data'][$role . '_youtube_url'] = $media['youtube_url'];
876: }
877: }
878: }
879: }
880: }
881: }
882: }
883:
884: // Get Job list data
885: $this->page['list_data']
886: = $this->_model_jobs
887: ->listMax(3)//3
888: ->current($this->in('p'))
889: ->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')
890: ->where('job_id != ?', $internalId)
891: ->where('user_id = ?', $this->_userData->getId())
892: ->where('priority_flag = ?', 1)
893: ->order('post_date', 'desc')
894: ->find();
895:
896: if($this->page['user']['job_schema_version'] == 2){
897: // Get Category list data
898: $this->page['categories']
899: = $this->_model_categories
900: ->listMax(9999)
901: ->select('name')
902: ->where('job_id =?', $internalId)
903: ->order('order_by', 'asc')
904: ->find();
905:
906: // Get Tag list data
907: $this->page['occupations']
908: = $this->_model_occupations
909: ->listMax(9999)
910: ->select('suid')
911: ->where('job_id =?', $internalId)
912: ->order('order_by', 'asc')
913: ->find();
914:
915: // Get Tag list data
916: $this->page['searches']
917: = $this->_model_searches
918: ->listMax(9999)
919: ->select('suid')
920: ->where('job_id =?', $internalId)
921: ->order('order_by', 'asc')
922: ->find();
923:
924: } else if($this->page['user']['job_schema_version'] == 1){
925: // Get Category list data
926: $this->page['categories']
927: = $this->_model_categories
928: ->listMax(9999)
929: ->select('name')
930: ->where('job_id =?', $internalId)
931: ->order('order_by', 'asc')
932: ->find();
933:
934: // Get Tag list data
935: $this->page['keywords']
936: = $this->_model_keywords
937: ->listMax(9999)
938: ->select('name')
939: ->where('job_id =?', $internalId)
940: ->order('order_by', 'asc')
941: ->find();
942: } else {
943: // Obsolete
944: // Get Tag list data
945: $this->page['tags']
946: = $this->_model_tags
947: ->listMax(9999)
948: ->select('name')
949: ->where('job_id =?', $internalId)
950: ->order('order_by', 'asc')
951: ->find();
952: }
953:
954: // Contact html_template が 2 の場合は form 画面が分離しているので読み込む必要がない
955: if( $this->page['user']['html_template'] != 2 ){
956: $this->_getContactPageData($internalId, $actual_link);
957: }
958:
959: // LD+JSON
960: $ldJson = array("@context" => "http://schema.org/", "@type" => "JobPosting");
961:
962: // datePosted
963: $ldJson["datePosted"] = ( isset($this->page['external_job_id_data']['created']) ) ? $this->page['external_job_id_data']['created'] : $this->page['data']['post_date'];
964:
965: //description
966: if( $this->page['user']['job_schema_version'] == 2 ){
967: $category_info = $this->loadConfig('category_info');
968:
969: if( isset($this->page['occupations']) && is_array($this->page['occupations']) && 0 < count($this->page['occupations']) ){
970: $this->page['occupationsString'] = implode(' / ', array_map(function($occupation) use($category_info) {
971: foreach($category_info['job_occupations'] as $category){
972: if( isset($category[$occupation['suid']][0]) ) return $category[$occupation['suid']][0];
973: }
974: return '';
975: }, $this->page['occupations']));
976: }
977:
978: if( isset($this->page['searches']) && is_array($this->page['searches']) && 0 < count($this->page['searches']) ){
979: $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']));
980: // 嘱託社員用
981: $this->page['search_9HCQR'] = !empty(array_filter($this->page['searches'], function($search){ return $search['suid'] === '9HCQR'; }));
982: }
983: $ldJson['description'] = $this->fetchPage('detail/template/schema2_json_ld_description');
984:
985: } else {
986: if( isset($this->page['keywords']) && is_array($this->page['keywords']) && 0 < count($this->page['keywords']) ){
987: $this->page['keywordsString'] = implode(' / ', array_map(function($keyword){ return $keyword['name'];}, $this->page['keywords']));
988: }
989: $ldJson['description'] = $this->fetchPage('detail/template/json_ld_description');
990: }
991:
992: // hiringOrganization
993: $ldJson["hiringOrganization"] = array("@type" => "Organization",
994: "name" => removeBreakLine($this->page['user']['name']),
995: "sameAs" => FEGG_CURRENT_URL . '/' . $this->page['user']['login'],
996: "logo" => FEGG_CURRENT_URL . '/images/kyujinbu-logo.png');
997:
998: // jobLocation
999: $ldJson["jobLocation"] = array("@type" => "Place");
1000: $jobLocationAddress = array("@type" => "PostalAddress",
1001: "streetAddress" => removeBreakLine($this->page['data']['city'] . $this->page['data']['place']),
1002: "addressLocality" => removeBreakLine($this->page['data']['place_remark']),
1003: "addressRegion" => $this->page['data']['pref'],
1004: "postalCode" => $this->page['data']['postalcode'],
1005: "addressCountry" => "JP");
1006:
1007: if ($this->page['data']['work_latlng']) {
1008: $geo = explode(",", $this->page['data']['work_latlng']);
1009: if(is_array($geo) && count($geo) == 2){
1010: $address["geo"] = array(
1011: "@type" => "GeoCoordinates",
1012: "latitude" => trim($geo[0]),
1013: "longitude" => trim($geo[1]));
1014: }
1015: }
1016:
1017: $ldJson["jobLocation"]["address"] = $jobLocationAddress;
1018:
1019: // title
1020: $ldJson["title"] = removeBreakLine($this->page['data']['selected_name']);
1021:
1022: // baseSalary
1023: if( isset($this->page['data']['salary_amount']) && isset($this->page['data']['salary_amount_max'])
1024: && $this->page['data']['salary_amount'] && $this->page['data']['salary_amount_max'] ){
1025: $baseSalaryValue = array("@type" => "QuantitativeValue");
1026: if($this->page['data']['salary_amount'] && $this->page['data']['salary_amount'] == $this->page['data']['salary_amount_max']){
1027: $baseSalaryValue["value"] = $this->page['data']['salary_amount'];
1028: } else {
1029: $baseSalaryValue["minValue"] = $this->page['data']['salary_amount'];
1030: $baseSalaryValue["maxValue"] = $this->page['data']['salary_amount_max'];
1031: }
1032:
1033: $baseSalaryValue['unitText'] = ( isset($this->page['data']['salary_type']) ) ? $this->page['data']['salary_type'] : null;
1034:
1035: $ldJson["baseSalary"] = array("@type" => "MonetaryAmount", "currency" => "JPY", "value" => $baseSalaryValue);
1036: }
1037:
1038: $ldJson['directApply'] = true;
1039:
1040: // employmentType
1041: if( $this->page['user']['job_schema_version'] == 2 ){
1042: if ($this->page['data']['short_type']) {
1043: switch($this->page['data']['short_type']){
1044: case '5QWDV': // '正社員',
1045: $ldJson["employmentType"] = 'FULL_TIME';
1046: break;
1047:
1048: case '75GKK': // 'アルバイト・パート',
1049: $ldJson["employmentType"] = 'PART_TIME';
1050: break;
1051:
1052: case '8YWGX': // '派遣社員',
1053: $ldJson["employmentType"] = 'TEMPORARY';
1054: break;
1055:
1056: case 'T65DZ': // '業務委託'
1057: case 'T9BXE': // '契約社員'
1058: case 'T65DZ_QDAPK': // '業務委託(完全歩合)'
1059: $ldJson["employmentType"] = 'CONTRACTOR';
1060: break;
1061:
1062: default:
1063: $ldJson["employmentType"] = 'OTHER';
1064: }
1065: }
1066:
1067: } else {
1068: if ($this->page['data']['short_type']) {
1069: switch($this->page['data']['short_type']){
1070: case "正社員":
1071: case "新卒":
1072: $ldJson["employmentType"] = 'FULL_TIME';
1073: break;
1074:
1075: case "アルバイト・パート":
1076: case "嘱託社員":
1077: $ldJson["employmentType"] = 'PART_TIME';
1078: break;
1079:
1080: case "派遣社員":
1081: $ldJson["employmentType"] = 'TEMPORARY';
1082: break;
1083:
1084: case "請負":
1085: case "契約社員":
1086: case "業務委託":
1087: $ldJson["employmentType"] = 'CONTRACTOR';
1088: break;
1089:
1090: case "インターン":
1091: $ldJson["employmentType"] = 'INTERN';
1092: break;
1093:
1094: case "ボランティア":
1095: $ldJson["employmentType"] = 'VOLUNTEER';
1096: break;
1097:
1098: default:
1099: $ldJson["employmentType"] = 'OTHER';
1100: }
1101: }
1102: }
1103:
1104: // identifier
1105: $ldJson["identifier"] = array(
1106: "@type" => "PropertyValue",
1107: "name" => removeBreakLine($this->page['user']['name']),
1108: "value" => array('@type' => 'URL', 'url' => FEGG_CURRENT_DOMAIN.'/'.$this->page['user']['login'].'/'));
1109:
1110: //if("experienceRequirements" : {
1111: /*
1112: "experienceRequirements" : {
1113: "@type" : "Text",
1114: "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 }}"
1115: },
1116: */
1117:
1118: //$ldJson["responsibilities"] = $this->page['data']['description|noescape|br|removeBreakLine
1119: //$ldJson["salaryCurrency"] = "JPY";
1120:
1121: //$ldJson["workHours"] = removeBreakLine($this->page['data']['time);
1122:
1123: //$ldJson["image"] = getImageUrl($define.FEGG_CURRENT_URL . '/' . $this->page['data']['main_image_id);
1124: //$ldJson["url"] = $this->page['actual_link;
1125:
1126: // $this->page['data'][']['main_image_id'] = FEGG_CURRENT_URL.'/'.getImageUrl($this->page['data'][']['main_image_id']);
1127:
1128: // finally encode as json.
1129: $this->page['data']['json_ld'] = json_encode($ldJson);
1130:
1131: // google map 向け
1132: if ($this->page['data']['work_latlng']) {
1133: $geo = explode(",", $this->page['data']['work_latlng']);
1134: if(is_array($geo) && count($geo) == 2){
1135: $this->page['latitude'] = trim($geo[0]);
1136: $this->page['longitude'] = trim($geo[1]);
1137: }
1138: }
1139:
1140: if($this->page['user']['job_schema_version'] == 2){
1141: if( 0 < $this->page['user']['html_template'] ){
1142: $this->displayPage('detail/schema2_t' . $this->page['user']['html_template'] . '_detail');
1143: } else {
1144: $this->displayPage('detail/schema2_detail');
1145: }
1146:
1147: } else {
1148: if( $this->page['user']['html_template'] == 1 ){
1149: $this->displayPage('detail/t1_detail');
1150: } else {
1151: $this->displayPage('detail/detail');
1152: }
1153: }
1154: }
1155:
1156: /**
1157: * Get XML Feed data
1158: *
1159: * @return void
1160: */
1161: protected function getXMLFeedData($mode)
1162: {
1163: $limit = null;
1164: if ( $this->in('_limit') ){
1165: $limit = (int)$this->in('_limit');
1166: }
1167:
1168: if ($mode === 'indeed') {
1169: $this->getClass('IndeedFeed');
1170: $this->loadConfig( 'site_info' );
1171: $options = array('user_id' => $this->_userData->getId(),
1172: 'indeed' => $this->config[ 'site_info' ]['indeed'],
1173: 'include_indeed' => true);
1174: $indeedFeed = new IndeedFeed($options);
1175: $indeedFeed->displayFeed($serviceKey = 'indeed', $templateKey = 'indeed', array('limit' => $limit));
1176:
1177: } else if ($mode === 'stanby') {
1178: $this->getClass('IndeedFeed');
1179: $this->loadConfig( 'site_info' );
1180: $options = array('user_id' => $this->_userData->getId());
1181: $indeedFeed = new IndeedFeed($options);
1182: $indeedFeed->displayFeed($serviceKey = 'stanby', $template = 'stanby', array('limit' => $limit));
1183:
1184: } else if ($mode === 'careerjet') {
1185: $this->getClass('IndeedFeed');
1186: $this->loadConfig( 'site_info' );
1187: $options = array('user_id' => $this->_userData->getId());
1188: $indeedFeed = new IndeedFeed($options);
1189: $indeedFeed->displayFeed($serviceKey = 'careerjet', $templateKey = 'indeed', array('limit' => $limit));
1190:
1191: } else if($mode === 'kyujinbox' || $mode === null ){
1192: $this->getClass('KyujinboxFeed');
1193: $options = array('user_id' => $this->_userData->getId());
1194: $kyujinboxFeed = new KyujinboxFeed($options);
1195: $kyujinboxFeed->displayFeed($serviceKey = 'kyujinbox', $templateKey = 'kyujinbox', array('limit' => $limit));
1196:
1197: } else {
1198: throw new Exception('Target feed Not found');
1199: }
1200: }
1201: }
1202: