예제 #1
0
 public function view()
 {
     $manager = new Pass_File_Manager($this->pass);
     $pass = $this->pass;
     $this->echo_img = function ($name) use($manager, $pass) {
         if (file_exists($manager->file_path($name))) {
             echo \Fuel\Core\Html::img(\Fuel\Core\Uri::create('admin/pass/image/' . $pass->id . '/' . $name), array('alt' => str_replace('.png', '', $name)));
         }
     };
     $image_names = array('icon.png', '*****@*****.**', 'logo.png', '*****@*****.**', 'background.png', '*****@*****.**', 'footer.png', '*****@*****.**', 'strip.png', '*****@*****.**', 'thumbnail.png', '*****@*****.**');
     $this->images = array_map(function ($image_name) use($manager) {
         if (file_exists($manager->file_path($image_name))) {
             return array('name' => $image_name, 'sizes' => \Fuel\Core\Image::sizes($manager->file_path($image_name)));
         } else {
             return null;
         }
     }, array_filter($image_names, function ($image_name) use($manager) {
         if (file_exists($manager->file_path($image_name))) {
             return true;
         } else {
             return false;
         }
     }));
     $this->upload_image_selection = $manager->required_images_readable();
 }
예제 #2
0
파일: medias.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Thuanth6589 <*****@*****.**>
  * list media
  */
 public function action_index()
 {
     $m_group = new \Model_Mgroups();
     $m_partner = new \Model_Mpartner();
     $tmp = array('' => 'その他');
     $data['groups'] = $tmp + (new \Model_Mgroups())->get_type(2);
     $data['partners'] = $this->_partners;
     $filters = Input::get();
     $query_string = empty($filters) ? '' : '?' . http_build_query($filters);
     Session::set('medias_url', Uri::base() . 'master/medias' . $query_string);
     if (isset($filters['m_group_id']) && $filters['m_group_id']) {
         $data['partners'] += array_column($m_partner->get_partner_group($filters['m_group_id'], $this->_partner_type), 'branch_name', 'partner_code');
     }
     $m_media = new \Model_Mmedia();
     $m_post = new \Model_Mpost();
     $data['count_media'] = $m_media->count_data($filters);
     $pagination = \Uospagination::forge('pagination', array('pagination_url' => Uri::base() . 'master/medias' . $query_string, 'total_items' => $data['count_media'], 'per_page' => \Constants::$default_limit_pagination, 'num_links' => \Constants::$default_num_links, 'uri_segment' => 'page', 'show_last' => true));
     $filters['offset'] = $pagination->offset;
     $filters['limit'] = $pagination->per_page;
     $medias = $m_media->get_data($filters);
     foreach ($medias as $media) {
         $media->count_post = $m_post->count_by_media_id($media->m_media_id);
     }
     $data['pagination'] = $pagination;
     $data['medias'] = $medias;
     $data['type'] = \Constants::$media_type;
     $data['classification'] = \Constants::get_search_media_classification();
     $data['filters'] = $filters;
     $this->template->title = 'UOS求人システム';
     $this->template->content = View::forge('medias', $data);
 }
예제 #3
0
파일: tool.php 프로젝트: khoapld/wjshop
 public static function feed_fb($token, $data)
 {
     $data = json_decode(base64_decode($data));
     if (!empty($data->id)) {
         if (!defined('_PATH_PRODUCT_')) {
             define('_PATH_PRODUCT_', Config::get('base_url') . Config::get('app.path.product'));
         }
         $product = \Model_Base_Product::get_one($data->id);
         $tmp = "\r\n\r\n--------------------------------------------------\r\n\r\n";
         $message = $product['product_name'] . $tmp . $product['product_description'] . $tmp . $product['product_info'];
         $groups = \Model_Base_GroupFb::get_all();
         foreach ($groups as $group) {
             try {
                 \OpauthStrategy::serverPost('https://graph.facebook.com/v2.5/' . $group['group_id'] . '/feed', array('access_token' => $token, 'message' => strip_tags(html_entity_decode($message, ENT_QUOTES)), 'link' => Uri::create('/product/' . $product['code']), 'caption' => 'WJ-SHOP', 'name' => html_entity_decode($product['product_name'], ENT_QUOTES), 'description' => html_entity_decode($product['product_description'], ENT_QUOTES), 'picture' => _PATH_PRODUCT_ . $product['product_photo']), null, $headers);
             } catch (\Exception $e) {
                 Log::error($e->getMessage());
             }
             sleep(5);
         }
     } elseif (!empty($data->message) && !empty($data->link)) {
         $groups = \Model_Base_GroupFb::get_all();
         foreach ($groups as $group) {
             try {
                 \OpauthStrategy::serverPost('https://graph.facebook.com/v2.5/' . $group['group_id'] . '/feed', array('access_token' => $token, 'message' => html_entity_decode($data->message, ENT_QUOTES), 'link' => $data->link), null, $headers);
             } catch (\Exception $e) {
                 Log::error($e->getMessage());
             }
             sleep(5);
         }
     }
 }
예제 #4
0
파일: login.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Bui Dang <*****@*****.**>
  * action login
  */
 public function action_index()
 {
     if (\Fuel\Core\Session::get('login_info')) {
         \Fuel\Core\Response::redirect(($uri = \Fuel\Core\Session::get('uri_before_login')) ? $uri : \Fuel\Core\Uri::base());
     }
     if (\Fuel\Core\Input::post()) {
         $login_id = \Fuel\Core\Input::post('login_id');
         $pass = \Fuel\Core\Input::post('password');
         if ($user = Model_Muser::find_one_by(array('login_id' => $login_id, 'pass' => hash('SHA256', $pass)))) {
             $login_info = array('department_id' => $user['department_id'], 'division_type' => $user['division_type'], 'name' => $user['name'], 'login_id' => $user['login_id'], 'email' => $user['mail'], 'user_id' => $user['user_id'], 'expired' => time() + 30 * 60);
             \Fuel\Core\Session::set('login_info', $login_info);
             $url = \Fuel\Core\Uri::base();
             if ($user['division_type'] == 2) {
                 $url = \Fuel\Core\Uri::base() . '?division=2';
             }
             if ($user['division_type'] == 3) {
                 $url = \Fuel\Core\Uri::base() . '?division=3';
             }
             \Fuel\Core\Response::redirect(($uri = \Fuel\Core\Session::get('uri_before_login')) ? $uri : $url);
         }
         \Fuel\Core\Session::set_flash('error', 'ログインIDもしくはパスワードが正しくありません');
     }
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('login/index');
 }
예제 #5
0
 public function mysendmail($person, $type)
 {
     foreach ($person as $k => $v) {
         $arr_mail = array();
         if ($v['order_id'] == null) {
             $arr_mail[] = self::get_email_user($v['user_id']);
         } else {
             if ($type == 1 or $type == 2 or $type == 3 or $type == 4) {
                 $arr_mail[] = self::get_email_user($v['business_user_id']);
                 $arr_mail[] = self::get_email_user($v['interview_user_id']);
             }
             if ($type == 5 or $type == 6 or $type == 7) {
                 $arr_mail[] = self::get_email_user($v['business_user_id']);
                 $arr_mail[] = self::get_email_user($v['agreement_user_id']);
             }
             if ($type == 8) {
                 $arr_mail[] = self::get_email_user($v['business_user_id']);
             }
             if ($type == 9) {
                 $arr_mail[] = self::get_email_user($v['business_user_id']);
                 $arr_mail[] = self::get_email_user($v['training_user_id']);
             }
         }
         $data = array('person_id' => $v['person_id'], 'uri_base' => Uri::base(), 'uosbo_url' => \Fuel\Core\Config::get('uosbo_url'), 'ss_name' => $v['ss_name'], 'name_kana' => Utility::crop_string($v['name_kana'], 4), 'nametitle' => self::$nametitle[$type]);
         if (array_filter($arr_mail)) {
             Utility::sendmail($arr_mail, '求人管理システム', $data, 'email/sendmailperson');
         }
     }
 }
예제 #6
0
 /**
  * @author Bui Dang <*****@*****.**>
  * action detail contact
  */
 public function action_index($id = null)
 {
     $data = array();
     if (!isset($id) or !\Model_Contact::find_by_pk($id)) {
         Response::redirect(Uri::base() . 'support/contacts');
     }
     $data['contact'] = \Model_Contact::find_by_pk($id);
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('contact/index', $data);
 }
예제 #7
0
파일: orders.php 프로젝트: huylv-hust/uosbo
 public function action_index()
 {
     $export = \Input::get('export', false);
     //set cookie order
     \Fuel\Core\Cookie::set('person_url', Uri::base() . 'job/orders');
     $this->template->title = 'UOS求人システム';
     //get search value
     $search_arr = \Input::get();
     //set return url after edit
     $pagination_url = \Uri::base() . 'job/orders/index';
     $return_url = \Uri::current();
     if (\Input::get('flag') != null) {
         $pagination_url = \Uri::base() . 'job/orders/index' . '?' . http_build_query($_GET);
         $return_url = \Uri::current() . '?' . http_build_query($_GET);
     }
     //config pagination
     $config = array('pagination_url' => $pagination_url, 'total_items' => count(\Model_Orders::get_all_order_list(null, null, $search_arr)), 'per_page' => \Constants::$default_limit_pagination, 'uri_segment' => 'page', 'num_links' => \Constants::$default_num_links, 'show_last' => true);
     if ($export) {
         $config['per_page'] = 100000;
     } else {
         //setcookie
         \Cookie::set('return_url_search', $return_url, 60 * 60 * 24);
     }
     //setup pagination
     $pagination = \Uospagination::forge('orders-pagination', $config);
     $model_group = new \Model_Mgroups();
     $data['listgroup'] = $model_group->get_type(1);
     $model_partner = new \Model_Mpartner();
     $data['listpartner'] = $model_partner->get_filter_partner(array('type' => 1));
     //get list media
     $model_media = new \Model_Mmedia();
     $data['listmedias'] = $model_media->get_list_all_media();
     if (is_array($data['listmedias']) == false) {
         $data['listmedias'] = array();
     }
     //get list post
     $model_post = new \Model_Mpost();
     $data['listpost'] = $model_post->get_list_all();
     //get list ss
     $model_ss = new \Model_Mss();
     $data['list_all_ss'] = $model_ss->get_list_all_ss();
     //get all orders
     $model_order = new \Model_Orders();
     $data['listorders'] = \Model_Orders::get_all_order_list($pagination->per_page, $pagination->offset, $search_arr);
     if ($export) {
         $csv_data = $model_order->csv_process($data['listorders']);
         \Model_Orders::export($csv_data);
     }
     foreach ($data['listorders'] as $key => $value) {
         $data['listorders'][$key]['image_content'] = base64_encode($data['listorders'][$key]['image_content']);
         $data['listorders'][$key]['price'] = \Model_Orders::cost_of_order($value);
     }
     $this->template->content = \View::forge('orders/index', $data);
 }
예제 #8
0
 /**
  * @author NamNT
  * action index
  */
 public function action_index()
 {
     $model = new \Model_Employment();
     $person = new \Model_Person();
     $person_id = \Input::get('person_id');
     $data = array();
     if (!$person_id) {
         Response::redirect('job/persons');
     }
     if (!($data_person = $person::find($person_id))) {
         Response::redirect('job/persons');
     }
     $data = $model->get_data_detail($person_id);
     $data['person_id'] = $person_id;
     $application_date = $data_person['application_date'];
     $get_date = getdate(strtotime($application_date));
     if ($get_date['mday'] == '29' and $get_date['mon'] == '2') {
         $registration_expiration = date('Y-m-d', strtotime(date('Y-m-d', strtotime($application_date)) . ' + 1 year' . '-1 day'));
     } else {
         $registration_expiration = date('Y-m-d', strtotime(date('Y-m-d', strtotime($application_date)) . ' + 1 year'));
     }
     $data['reg_expiration'] = $registration_expiration;
     if (\Input::method() == 'POST') {
         $datas = \Input::post();
         foreach ($datas as $key => $value) {
             if (\Input::post($key) == '') {
                 $datas[$key] = null;
             }
         }
         if ($model->find($person_id)) {
             $model = $model->find($person_id);
             $datas['obic7_flag'] = isset($datas['obic7_flag']) ? 1 : 0;
             if ($datas['obic7_flag'] == 1 && $model->obic7_flag != 1) {
                 $datas['obic7_date'] = date('Y-m-d', time());
             }
         } else {
             $datas['person_id'] = $person_id;
             $datas['created_at'] = date('Y-m-d H:i:s');
             if (isset($datas['obic7_flag'])) {
                 $datas['obic7_date'] = date('Y-m-d', time());
             }
         }
         $model->set($datas);
         if ($model->save()) {
             Session::set_flash('success', \Constants::$message_create_success);
             Response::redirect(\Fuel\Core\Uri::base() . 'job/employment?person_id=' . $person_id);
         }
     }
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('employment/index', $data);
 }
예제 #9
0
 function performMultipleStatusChange()
 {
     $ids = Input::post($this->multipleItemsFieldName);
     $items = $this->findByIds($ids);
     foreach ($items as $item) {
         /* @var $item Orm\Model */
         $currentStatus = $item->get('visible');
         $newStatus = $currentStatus ? false : true;
         $item->set('visible', $newStatus);
         $item->save();
     }
     $session = Session::instance();
     $session->set($this->updatedKey, true);
     Response::redirect(Uri::current());
 }
예제 #10
0
 public function action_change_status()
 {
     if ($contact_id = Input::post('contact_id')) {
         $user_login = Session::get('login_info');
         $contact = \Model_Contact::find_by_pk($contact_id);
         if (Input::post('status') == 0) {
             $contact->set(array('status' => 1, 'user_id' => $user_login['user_id'], 'update_at' => date('Y-m-d H:i:s')));
         }
         if (Input::post('status') == 1) {
             $contact->set(array('status' => 0, 'user_id' => null, 'update_at' => null));
         }
         $contact->save();
         Response::redirect(Uri::base() . 'support/contacts?' . Session::get('url_filter_contacts'));
     }
     Response::redirect(Uri::base() . 'support/contacts?' . Session::get('url_filter_contacts'));
 }
예제 #11
0
파일: sssale.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Thuanth6589 <*****@*****.**>
  * delete sssale
  */
 public function action_delete()
 {
     if (Input::method() == 'POST') {
         $sssale_id = Input::post('sssale_id');
         $result = 'error-' . Input::post('panel_index');
         $message = \Constants::$message_delete_error;
         if (isset($sssale_id) && ($sssale = \Model_Sssale::find_by_pk($sssale_id))) {
             if ($sssale->delete_data()) {
                 $result = 'success';
                 $message = \Constants::$message_delete_success;
             }
         }
         Session::set_flash($result, $message);
     }
     $url = Session::get('sssale_url') ? Session::get('sssale_url') : Uri::base() . 'master/sslist';
     return Response::redirect($url);
 }
예제 #12
0
 public function before()
 {
     $parentReturn = parent::before();
     \Fuel\Core\Lang::load("global");
     \Fuel\Core\Lang::load("share");
     $this->template->jsVars = new JsVars();
     $this->template->jsVars->addVar("wsUrl", rtrim(Router::get("ws_" . $this->lang), "/") . "/");
     $this->template->jsVars->addVar("baseUrl", \Fuel\Core\Uri::base(FALSE));
     $this->template->css = array("fonts.css", "normalize.css", "definitions.css", "template.css", "sprites/generic.css");
     $this->template->js = array("libs/jquery-2.1.3.min.js", "libs/jquery-ui.min.js", "libs/mustache.js", "template.js");
     $this->template->header = "front_header";
     $this->template->set_global(array("menu_selected" => ""));
     $this->template->footer = "front_footer";
     $this->template->footer_options = array();
     $fbShare = array("share" => FALSE, "siteName" => '', "title" => '', "description" => '', "image" => '');
     $this->template->fbShare = $fbShare;
     return $parentReturn;
 }
예제 #13
0
 /**
  * @author: Bui Cong Dang (dangbcd6591@seta-asia.com.vn)
  * @params: List partner
  **/
 public function action_index()
 {
     $data = array();
     $partner = new \Model_Mpartner();
     //Get value from form search
     if ($filter = Input::get()) {
         Session::set('url_filter_partner', http_build_query($filter));
         //Set url filter
     }
     $pagination = \Uospagination::forge('pagination', array('pagination_url' => Uri::base() . 'master/partners?' . http_build_query($filter), 'total_items' => $partner->count_data($filter), 'per_page' => \Constants::$default_limit_pagination, 'num_links' => \Constants::$default_num_links, 'uri_segment' => 'page', 'show_last' => true));
     $filter['offset'] = $pagination->offset;
     $filter['limit'] = $pagination->per_page;
     $data['pagination'] = $pagination;
     $data['filter'] = $filter;
     $data['partners'] = $partner->get_filter_partner($filter);
     $this->template->title = 'UOS求人システム';
     $this->template->content = View::forge('partners/index', $data);
 }
예제 #14
0
파일: sslist.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Thuanth6589 <*****@*****.**>
  * action list ss
  */
 public function action_index()
 {
     $filters = Input::get();
     $query_string = empty($filters) ? '' : '?' . http_build_query($filters);
     Session::set('sslist_url', Uri::base() . 'master/sslist' . $query_string);
     $m_ss = new \Model_Mss();
     $data = array();
     $data['count_ss'] = $m_ss->count_data($filters);
     $pagination = \Uospagination::forge('pagination', array('pagination_url' => Uri::base() . 'master/sslist' . $query_string, 'total_items' => $data['count_ss'], 'per_page' => \Constants::$default_limit_pagination, 'num_links' => \Constants::$default_num_links, 'uri_segment' => 'page', 'show_last' => true));
     $filters['offset'] = $pagination->offset;
     $filters['limit'] = $pagination->per_page;
     $data['ss'] = $m_ss->get_data($filters);
     $data['addr1'] = \Constants::get_search_address();
     $data['filters'] = $filters;
     $data['pagination'] = $pagination;
     $this->template->title = 'UOS求人システム';
     $this->template->content = View::forge('sslist', $data);
 }
예제 #15
0
 public function action_upload($folder, $sub = null)
 {
     if (\Fuel\Core\Input::method() == 'POST') {
         try {
             \Fuel\Core\DB::start_transaction();
             $val = Model_Filemanager::validate('create');
             if ($val->run()) {
                 $config = array('path' => "/var/www/html/" . $this->_dir . "/" . $folder . "/" . $sub . DS, 'ext_whitelist' => array('jpg', 'jpeg', 'png'), 'file_chmod' => 0777, 'auto_rename' => true, 'overwrite' => true, 'randomize' => true, 'create_path' => true);
                 Upload::process($config);
                 $img = '';
                 if (Upload::is_valid()) {
                     Upload::save();
                     $img = Upload::get_files()[0];
                 }
                 if (!\Fuel\Core\Input::post('id')) {
                     $file = Model_Filemanager::forge(array('folder' => $folder, 'key' => Input::post('key'), 'value' => $img['saved_as'], 'photographer' => \Fuel\Core\Input::post('photographer'), 'price' => \Fuel\Core\Input::post('price'), 'usage' => \Fuel\Core\Input::post('usage'), 'source' => \Fuel\Core\Input::post('source')));
                 } else {
                     $file = Model_Filemanager::find_by_id(\Fuel\Core\Input::post('id'));
                     if ($img == '') {
                         $img = $file->value;
                     }
                     if ($file) {
                         $file->set(array('folder' => $folder, 'key' => Input::post('key'), 'value' => $img, 'photographer' => \Fuel\Core\Input::post('photographer'), 'price' => \Fuel\Core\Input::post('price'), 'usage' => \Fuel\Core\Input::post('usage'), 'source' => \Fuel\Core\Input::post('source')));
                     } else {
                         throw new Exception('File not found!');
                     }
                 }
                 if ($file and $file->save()) {
                     DB::commit_transaction();
                     \Fuel\Core\Session::set_flash('success', 'Upload success');
                 } else {
                     throw new Exception('Cannot save into database!');
                 }
             } else {
                 throw new Exception($val->show_errors());
             }
         } catch (Exception $e) {
             DB::rollback_transaction();
             \Fuel\Core\Session::set_flash('error', $e->getMessage());
         }
     }
     \Fuel\Core\Response::redirect(\Fuel\Core\Uri::create('filemanager/folder/' . $folder));
 }
예제 #16
0
파일: user.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Thuanth6589 <*****@*****.**>
  * action delete user
  */
 public function action_delete()
 {
     if (Input::method() == 'POST') {
         $user_id = Input::post('user_id', null);
         $result = 'error';
         if (!\Model_Muser::find_by_pk($user_id)) {
             $message = 'ユーザーは存在しません';
         } else {
             $message = \Constants::$message_delete_error;
             $user = new \Model_Muser();
             if ($user->delete_data($user_id)) {
                 $result = 'success';
                 $message = \Constants::$message_delete_success;
             }
         }
         Session::set_flash($result, $message);
     }
     $url = Session::get('users_url') ? Session::get('users_url') : Uri::base() . 'master/users';
     return Response::redirect($url);
 }
예제 #17
0
 /**
  * @author Thuanth6589
  * action index
  */
 public function action_index()
 {
     $data['person_id'] = Input::get('person_id', '');
     $inteview_usami = new \Model_Interviewusami();
     if ($data['person_id'] == '' || !\Model_Person::find($data['person_id'])) {
         return Response::redirect(Uri::base() . 'job/persons');
     }
     $data['inteview_usami'] = \Model_Interviewusami::find_one_by('person_id', $data['person_id']);
     if (Input::method() == 'POST') {
         $fields = Input::post('data');
         $inteview_usami->set_data($fields);
         if ($inteview_usami->save_data()) {
             Session::set_flash('success', \Constants::$message_create_success);
             return Response::redirect(Uri::base() . 'job/interviewusami?person_id=' . $data['person_id']);
         }
         Session::set_flash('error', \Constants::$message_create_error);
     }
     $this->template->title = 'UOS求人システム';
     $this->template->content = View::forge('interviewusami/index', $data);
 }
예제 #18
0
 public function action_index()
 {
     $data = array();
     $model_par = new \Model_Mpartner();
     $model_ss = new \Model_Mss();
     $model_job = new \Model_Job();
     $model_or = new \Model_Orders();
     $m_user = new Model_Muser();
     $m_person = new Model_Person();
     $data['m_partner'] = $model_par->count_data(array('status' => 1));
     $data['m_ss'] = $model_ss->count_data(array('status' => '0'));
     $data['job'] = $model_job->count_data();
     $data['or'] = count($model_or->get_all_order_list(null, null, array('unapproved' => '0')));
     $data['person_inactive'] = $m_person->count_data(array('status' => '0'));
     $this->template->title = 'UOS求人システム';
     $this->template->content = View::forge('default/top', $data);
     $user_info = \Fuel\Core\Session::get('login_info');
     $division = $user_info['division_type'];
     $department_id = $user_info['department_id'];
     if ($division == 2) {
         $data['count_partner'] = $model_par->count_data(array('department_id' => $department_id, 'status' => '1'));
         $data['count_ss'] = $model_ss->count_data(array('department_id' => $department_id, 'status' => '0'));
         $data['count_job'] = $model_job->count_job_department_id(array('department_id' => $department_id, 'status' => '0'));
         $data['count_order'] = count($model_or->get_all_order_list(null, null, array('department_id' => $department_id, 'unapproved' => '0')));
         $data['list_user'] = $m_user->get_data(array('department_id' => $department_id, 'order_by_time' => 1));
         $data['link_partner'] = \Fuel\Core\Uri::base() . 'master/partners?department_id=' . $department_id . '&status=1';
         $data['link_ss'] = \Fuel\Core\Uri::base() . 'master/sslist?department_id=' . $department_id . '&status=0';
         $data['link_job'] = \Fuel\Core\Uri::base() . 'job/jobs?department_id=' . $department_id . '&status=0';
         $data['link_order'] = \Fuel\Core\Uri::base() . 'job/orders?department_id=' . $department_id . '&unapproved=0&flag=1';
         $array_user = array();
         foreach ($data['list_user'] as $user) {
             $array_user[] = $user->user_id;
         }
         $list_person = $m_person->get_person_division_2($array_user);
         foreach ($list_person as $person) {
             foreach ($array_user as $k => $v) {
                 if ($person['interview_user_id'] == $v || $person['agreement_user_id'] == $v || $person['training_user_id'] == $v || $person['partner_user_id'] == $v) {
                     if ($person['contact_result'] == 0) {
                         $data['count'][$v]['contact_result'] = isset($data['count'][$v]['contact_result']) ? $data['count'][$v]['contact_result'] + 1 : 1;
                     }
                     if ($person['review_date'] == '') {
                         $data['count'][$v]['review_date'] = isset($data['count'][$v]['review_date']) ? $data['count'][$v]['review_date'] + 1 : 1;
                     }
                     if ($person['review_result'] == 0) {
                         $data['count'][$v]['review_result'] = isset($data['count'][$v]['review_result']) ? $data['count'][$v]['review_result'] + 1 : 1;
                     }
                     if ($person['adoption_result'] == 0) {
                         $data['count'][$v]['adoption_result'] = isset($data['count'][$v]['adoption_result']) ? $data['count'][$v]['adoption_result'] + 1 : 1;
                     }
                     if ($person['contract_date'] == '') {
                         $data['count'][$v]['contract_date'] = isset($data['count'][$v]['contract_date']) ? $data['count'][$v]['contract_date'] + 1 : 1;
                     }
                     if ($person['contract_result'] == 0) {
                         $data['count'][$v]['contract_result'] = isset($data['count'][$v]['contract_result']) ? $data['count'][$v]['contract_result'] + 1 : 1;
                     }
                     if ($person['hire_date'] == '') {
                         $data['count'][$v]['hire_date'] = isset($data['count'][$v]['hire_date']) ? $data['count'][$v]['hire_date'] + 1 : 1;
                     }
                     if ($person['employee_code'] == '') {
                         $data['count'][$v]['employee_code'] = isset($data['count'][$v]['employee_code']) ? $data['count'][$v]['employee_code'] + 1 : 1;
                     }
                     if ($person['work_confirmation'] == 0) {
                         $data['count'][$v]['work_confirmation'] = isset($data['count'][$v]['work_confirmation']) ? $data['count'][$v]['work_confirmation'] + 1 : 1;
                     }
                 }
             }
         }
         $data['pagination'] = \Uospagination::forge('pagination', array('pagination_url' => Uri::base() . '?division=2', 'total_items' => count($data['list_user']), 'per_page' => \Constants::$default_limit_pagination, 'num_links' => \Constants::$default_num_links, 'uri_segment' => 'page', 'show_last' => true));
         $this->template->content = View::forge('default/division2', $data);
     } elseif ($division == 3) {
         $this->division3();
     } else {
         $this->template->content = View::forge('default/top', $data);
     }
 }
예제 #19
0
파일: media.php 프로젝트: huylv-hust/uosbo
 /**
  * @author Thuanth6589 <*****@*****.**>
  * action delete media
  */
 public function action_delete()
 {
     if (Input::method() == 'POST') {
         $result = 'error';
         $m_media_id = Input::post('m_media_id', null);
         if (!\Model_Mmedia::find_by_pk($m_media_id)) {
             $message = '媒体は存在しません';
         } else {
             $umedia = new \Model_Umedia();
             $message = \Constants::$message_delete_error;
             if ($umedia->delete_media($m_media_id)) {
                 $result = 'success';
                 $message = \Constants::$message_delete_success;
             }
         }
         Session::set_flash($result, $message);
     }
     $url = Session::get('medias_url') ? Session::get('medias_url') : Uri::base() . 'master/medias';
     return Response::redirect($url);
 }
예제 #20
0
?>
                </td>
            </tr>
            
            <tr>
                <td>
                    <strong>Number of Tasks:</strong>
                </td>
                
                <td>
                    <?php 
echo count($project->project_tasks);
?>
                    
		    <?php 
$segment_title = \Fuel\Core\Uri::segment(1, 'user');
?>
		    
                    <?php 
if (\Fuel\Core\Str::lower($segment_title) == 'admin') {
    ?>
                    <span class="pull-right">
                        <?php 
    echo Html::anchor('admin/projects/addtask/' . $project->id, 'New Task', array('onclick' => "return confirm('Are you sure you want to create a new task?')"));
    ?>
 
                    </span>
		    <?php 
} else {
    ?>
		    <span class="pull-right">
예제 #21
0
파일: index.php 프로젝트: khoapld/wjshop
                        <i class="fa fa-arrows"></i>
                        <span><?php 
    echo Fuel\Core\Lang::get('title.group');
    ?>
</span>
                    </div>
                    <div class="box-icons">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                    <div class="no-move"></div>
                </div>
                <div class="box-content">
                    <form id="create-group-fb-form" method="post" action="<?php 
    echo \Fuel\Core\Uri::create('/admin/facebook/add_group', array(), array());
    ?>
" class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"><?php 
    echo Fuel\Core\Lang::get('label.name_or_id');
    ?>
</label>
                            <div class="col-sm-8">
                                <input type="text" id="group-fb" class="form-control" name="group" />
                            </div>
                        </div>
                        <div class="form-group text-center">
                            <button type="submit" class="btn btn-primary"><?php 
    echo Fuel\Core\Lang::get('button.submit');
    ?>
예제 #22
0
                            <input type="submit" class="btn btn-primary" value="Submit" />
                            <button type="button" name="cancel" class="btn btn-default" id="cancel">Cancel</button>
                        </div>
                    </div>
                </form>
            </div>
            <hr />
            <table class="table">
                <?php 
foreach ($all_folder as $k => $v) {
    if (!is_int($k)) {
        ?>
                    <tr>
                        <td>
                            <?php 
        echo \Fuel\Core\Html::anchor(\Fuel\Core\Uri::string() . '/folder/' . $k, $k);
        ?>
                        </td>
                    </tr>
                <?php 
    }
}
?>
            </table>
        </div>
    </div>
</div>
<script src="https://buffohero.com/cms/public/assets/lib/jquery/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#dir_form').click(function(){
예제 #23
0
파일: edit.php 프로젝트: khoapld/wjshop
                    <span><?php 
echo Fuel\Core\Lang::get('title.create_sub_photo');
?>
</span>
                </div>
                <div class="box-icons">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </div>
                <div class="no-move"></div>
            </div>
            <div class="box-content">
                <form id="sub-product-photo-form" method="post"
                      action="<?php 
echo \Fuel\Core\Uri::create('/admin/product/sub_photo', array(), array());
?>
"
                      class="form-horizontal">
                    <div class="form-group">
                        <div id="sub-product-photo-uploader"></div>
                    </div>
                    <div class="form-group text-center panel-heading">
                        <input type="hidden" name="id" value="<?php 
echo $product['id'];
?>
"/>
                        <button type="submit" class="btn btn-primary"><?php 
echo Fuel\Core\Lang::get('button.submit');
?>
</button>
예제 #24
0
 public function action_colors($id = null)
 {
     $pass = Model_Pass::find($id);
     $val = \Fuel\Core\Validation::forge();
     $val->add_field('background_color', 'Background Color', 'max_length[255]');
     $val->add_field('foreground_color', 'Foreground Color', 'max_length[255]');
     $val->add_field('label_color', 'Label Color', 'max_length[255]');
     if ($val->run()) {
         $pass->background_color = \Fuel\Core\Input::post('background_color');
         $pass->foreground_color = \Fuel\Core\Input::post('foreground_color');
         $pass->label_color = \Fuel\Core\Input::post('label_color');
         if ($pass->save()) {
             Session::set_flash('success', e('Set colors of pass #' . $id));
             Response::redirect('admin/pass/view/' . $id);
         } else {
             Session::set_flash('error', e('Could not update pass #' . $id));
         }
     } else {
         if (\Fuel\Core\Input::method() == 'POST') {
             $pass->background_color = $val->validated('background_color');
             $pass->foreground_color = $val->validated('foreground_color');
             $pass->label_color = $val->validated('label_color');
             Session::set_flash('error', $val->error());
         }
         $this->template->set_global('pass', $pass, false);
     }
     $this->template->title = "Pass colors";
     $this->template->set_safe('head', '<script type="text/javascript" src="' . \Fuel\Core\Uri::base() . 'assets/modcoder_excolor/jquery.modcoder.excolor.js"></script>');
     $this->template->content = View::forge('admin/pass/colors');
 }
예제 #25
0
파일: edit.php 프로젝트: aminh047/pepperyou
<h1 class="page-header">Chỉnh sửa ngôn ngữ</h1>
<?php 
echo Form::open(array('class' => 'form-horizontal'));
?>
    <div class="form-group">
        <label class="col-sm-4 control-label required">Ngôn ngữ viết tắt </label>
        <div class="col-sm-4">
            <?php 
echo Form::input('shortname', $data['shortname'], array('autocomplete' => 'off', 'class' => 'form-control', 'placeholder' => 'vi, en, ...', 'disabled' => 'disabled'));
?>
        </div>
    </div>

    <?php 
require_once '_form.php';
?>

    <div class="form-group">
        <div class="col-md-4"></div>
        <div class="col-md-8" style="padding-left: 0;">
            <a href="<?php 
echo \Fuel\Core\Uri::base() . 'admin/language';
?>
" class="btn btn-default">Quay lại</a>
            <button type="submit" class="btn btn-success">Chỉnh sửa</button>
        </div>
    </div>
<?php 
echo Form::close();
예제 #26
0
파일: index.php 프로젝트: khoapld/wjshop
                    <i class="fa fa-arrows"></i>
                    <span><?php 
echo Fuel\Core\Lang::get('title.add_category');
?>
</span>
                </div>
                <div class="box-icons">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-down"></i>
                    </a>
                </div>
                <div class="no-move"></div>
            </div>
            <div class="box-content" style="display: none;">
                <form id="create-category-form" method="post" action="<?php 
echo \Fuel\Core\Uri::create('/admin/category/create', array(), array());
?>
" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><?php 
echo Fuel\Core\Lang::get('label.parent_category');
?>
</label>
                        <div class="col-sm-6">
                            <select class="populate placeholder" name="parent_category_id">
                                <option value="" >--- <?php 
echo Fuel\Core\Lang::get('text.select_category');
?>
 ---</option>
                                <?php 
foreach ($category as $k => $v) {
예제 #27
0
echo Form::file('thumbnail', array('class' => ''));
?>
        <?php 
echo Form::error('thumbnail', $err);
?>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label required">Hiển thị</label>
        <div class="col-sm-4">
            <input name="active" value="1" type="checkbox" class="checkbox">
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-10">
            <button type="submit" class="btn btn-success">Đăng ký</button>
            <a href="<?php 
echo \Fuel\Core\Uri::base() . 'admin/mainlogo';
?>
" class="btn btn-default">Quay lại</a>
        </div>
    </div>

    <!--tooltip helper-->
    <?php 
require_once APPPATH . 'views/admin/tooltip_helper/mainlogo.php';
?>

<?php 
echo Form::close();
예제 #28
0
 /**
  *
  * @return boolean is true str1!=str2
  */
 public function action_index()
 {
     $data_interview = array();
     if (!($person_id = Input::get('person_id')) or !\Model_Person::find($person_id)) {
         Response::redirect(Uri::base() . 'job/persons');
     }
     if ($data = Input::post()) {
         if (isset($data['anamnesis'])) {
             $data['anamnesis'] = json_encode($this->remove_value_empty($data['anamnesis']));
         }
         if (isset($data['medical_history'])) {
             $data['medical_history'] = json_encode($this->remove_value_empty($data['medical_history'], array('name', 'year')));
         }
         if (isset($data['surgical_history'])) {
             $data['surgical_history'] = json_encode($this->remove_value_empty($data['surgical_history'], array('name', 'year')));
         }
         if (isset($data['working_arrangements'])) {
             $data['working_arrangements'] = $this->convertarraytostring($data['working_arrangements']);
         }
         if (isset($data['weekend'])) {
             $data['weekend'] = $this->convertarraytostring($data['weekend']);
         }
         if (isset($data['special_license'])) {
             $data['special_license'] = $this->convertarraytostring($data['special_license']);
         }
         if (isset($data['other'])) {
             $data['other'] = $this->convertarraytostring($data['other']);
         }
         if (isset($data['mechanic_qualification'])) {
             $data['mechanic_qualification'] = $this->convertarraytostring($data['mechanic_qualification']);
         }
         if (isset($data['PC'])) {
             $data['PC'] = $this->convertarraytostring($data['PC']);
         }
         if (isset($data['start_time_hh']) or isset($data['start_time_mm'])) {
             $data['start_time'] = $this->merge_hh_mm($data['start_time_hh'], $data['start_time_mm']);
         }
         if (isset($data['end_time_hh']) or isset($data['end_time_mm'])) {
             $data['end_time'] = $this->merge_hh_mm($data['end_time_hh'], $data['end_time_mm']);
         }
         if (isset($data['weekend_start_time_hh']) or isset($data['weekend_start_time_mm'])) {
             $data['weekend_start_time'] = $this->merge_hh_mm($data['weekend_start_time_hh'], $data['weekend_start_time_mm']);
         }
         if (isset($data['weekend_end_time_hh']) or isset($data['weekend_end_time_mm'])) {
             $data['weekend_end_time'] = $this->merge_hh_mm($data['weekend_end_time_hh'], $data['weekend_end_time_mm']);
         }
         $data['person'] = $person_id;
         $data = \Model_Interview::_set($data);
         $interview_id = null;
         if (isset($data['interview_id']) and $data['interview_id'] != '') {
             $interview_id = $data['interview_id'];
             unset($data['interview_id']);
         }
         $interview = new \Model_Interview();
         if ($interview->save_data($data, $interview_id)) {
             Session::set_flash('success', \Constants::$message_create_success);
         } else {
             Session::set_flash('error', \Constants::$message_create_error);
         }
     }
     if ($interview_data = \Model_Interview::find_one_by('person', $person_id)) {
         $data_interview['interviews'] = $interview_data;
     }
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('interview/index', $data_interview);
 }
예제 #29
0
        $data['work_confirmation'] = '<span class="label label-success">○</span>';
    }
    if ($check) {
        return true;
    }
    return $data;
}
foreach ($person_list as $row) {
    $data = show_data($row, $employment_list);
    if ($data === true) {
        continue;
    }
    ?>
				<tr>
					<td><a href="<?php 
    echo \Fuel\Core\Uri::base();
    ?>
job/employment?person_id=<?php 
    echo $row['person_id'];
    ?>
"><?php 
    echo $row['name'];
    ?>
</a></td>
					<td><?php 
    echo $row['application_date'];
    ?>
</td>
					<td><?php 
    echo isset($sssale_list[$row['sssale_id']]) ? $sssale_list[$row['sssale_id']] : '';
    ?>
예제 #30
0
파일: media.php 프로젝트: huylv-hust/uosbo
    echo Session::get_flash('error');
    ?>
	</div>
<?php 
}
?>
<h3>
	媒体
</h3>
	<form action="<?php 
echo \Fuel\Core\Uri::base();
?>
master/media/delete" method="post">
		<p class="text-right">
			<a href="<?php 
echo \Fuel\Core\Session::get('medias_url') ? \Fuel\Core\Session::get('medias_url') : \Fuel\Core\Uri::base() . 'master/medias';
?>
" class="btn btn-warning btn-sm right">
				<i class="glyphicon glyphicon-arrow-left icon-white"></i>
				戻る
			</a>
			<?php 
if (isset($media)) {
    ?>
			<input name="m_media_id" type="hidden" value="<?php 
    echo $media->m_media_id;
    ?>
">
			<button class="btn btn-danger btn-sm" type="button" id="btn_medias_back">
				<i class="glyphicon glyphicon-trash icon-white"></i>
				削除