public function index()
 {
     actionLogAdd(31, session('account'));
     $this->checkRedNote();
     //获取列表数据
     $this->resumeListBox(array('in', '1,2'), '/ResumePost/index', '', true);
     $this->display();
 }
Example #2
0
File: role.php Project: ram-1501/rs
 public function add($edit_id = 0)
 {
     $form = $this->input->post();
     $form = $this->security->xss_clean($form);
     if (isset($form['edit_id'])) {
         $edit_id = $form['edit_id'];
     }
     $this->form_validation->set_rules($this->_validation_rules_message());
     if ($this->form_validation->run()) {
         $this->ins_data['name'] = $form['name'];
         $this->ins_data['updated_date'] = date("Y-m-d H:i:s");
         $this->ins_data['updated_id'] = get_current_user_id();
         $this->ins_data['created_id'] = get_current_user_id();
         if ($edit_id) {
             $this->role_model->update(array('id' => $edit_id), $this->ins_data);
             $this->service_message->set_flash_message("record_update_success");
             actionLogAdd('role', $edit_id, "Role#{$edit_id} ({$form['name']}) record has been updated.");
         } else {
             $role_id = $this->role_model->insert($this->ins_data);
             $this->service_message->set_flash_message("record_insert_success");
             actionLogAdd('role', $role_id, "Role#{$role_id} ({$form['name']}) record has been created.");
         }
         redirect("admin/role");
     }
     if ($edit_id) {
         $edit_data = $this->role_model->get_where(array('id' => $edit_id))->row_array();
         if (!$edit_data) {
             $this->service_message->set_flash_message("record_not_found_error");
             redirect("admin/user");
         }
         $this->data['form_data'] = $edit_data;
     } else {
         if ($form) {
             $this->data['form_data'] = $form;
             $this->data['form_data']['id'] = $edit_id ? $edit_id : 0;
         } else {
             $this->data['form_data'] = array("id" => '', 'name' => '');
         }
     }
     $this->layout->view("admin/role/add");
 }
 public function actionLog($id)
 {
     actionLogAdd($id, session('account'));
 }
Example #4
0
 function send_refund_confirmation($refund_id)
 {
     $this->_CI->load->model('refund_model');
     $refund_details = $this->_CI->refund_model->get_refund_details($refund_id);
     if (!count($refund_details)) {
         return FALSE;
     }
     $data['so_id'] = $refund_details['sales_order_id'];
     $data['amount'] = $refund_details['refunded_amount'];
     $data['name'] = $refund_details['name'];
     $email = $refund_details['email'];
     $sales_channel_id = $refund_details['sales_channel_id'];
     $refund_products = $this->_CI->refund_model->get_refund_products_with_qty($refund_id);
     //get products from sales_order_id
     $records = $this->_CI->sales_order_model->get_product_details_by_sales_order($data['so_id']);
     if (!count($records)) {
         return FALSE;
     }
     $product_details = array();
     foreach ($records as $record) {
         if (!isset($refund_products[$record['product_id']])) {
             continue;
         }
         $product_details[$record['product_id']]['sku'] = $record['sku'];
         $product_details[$record['product_id']]['name'] = $record['product_name'];
         $product_details[$record['product_id']]['sell_price'] = $record['unit_price'];
         $product_details[$record['product_id']]['quantity'] = $refund_products[$record['product_id']];
     }
     $data['product_details'] = $product_details;
     if (!empty($email)) {
         $data['message'] = $this->_CI->load->view("email/{$sales_channel_id}/hh-refund", $data, TRUE);
         $message = $this->_CI->load->view("email/{$sales_channel_id}/system_email_template", $data, TRUE);
         //get email details
         $email_details = get_settings($sales_channel_id, 'general');
         if ($email_details) {
             $this->send_email($email, '', $email_details['email_id'], $email_details['from_name'], "{$email_details['site_name']} - Refund Request ", $message, array($email_details['email_id']));
             actionLogAdd('refunds', "Refund Confirmation mail has been sent to customer.", $refund_id);
         }
     }
     return true;
 }
Example #5
0
 public function uploadAvatar($path)
 {
     actionLogAdd(6, session('account'));
     return $this->data(array('avatar' => $path))->where(array('pkid' => session('account.student_id')))->save();
 }
 protected function deliveryList($id, $page)
 {
     if (!isset($_GET['id']) || !$id || $id == 1) {
         $where = array();
         $id = 1;
         $timeText = timeText(1);
         $order = 'resume_post.create_time desc';
     }
     if (isset($_GET['id']) && $id == 2) {
         $where['resume_post.status'] = 1;
         //未查看
         $timeText = timeText(1);
         $order = 'resume_post.create_time desc';
     }
     if (isset($_GET['id']) && $id == 3) {
         $where['resume_post.status'] = 2;
         //已查看
         $timeText = timeText(2);
         $order = 'resume_post.read_time desc';
     }
     if (isset($_GET['id']) && $id == 4) {
         $where['resume_post.status'] = 3;
         //通知面试
         $timeText = timeText(3);
         $order = 'resume_post.deal_time desc';
     }
     if (isset($_GET['id']) && $id == 5) {
         $where['resume_post.status'] = 4;
         //拒绝面试
         $timeText = timeText(3);
         $order = 'resume_post.deal_time desc';
     }
     if (isset($_GET['id']) && $id == 6) {
         $where['resume_post.status'] = 5;
         //待定中
         $timeText = timeText(3);
         $order = 'resume_post.deal_time desc';
     }
     actionLogAdd(29, array('account_type' => 2, 'student_id' => session('account.student_id')));
     $this->checkRedNote();
     $pagebtn['type'] = $id;
     $count = $this->ResumePostModel->getPostDeliveryTotal($where);
     $page_sum = ceil($count / $this->page_number);
     $page = isset($_GET['page']) ? intval($page) : 1;
     $page = min($page, $page_sum);
     $page = max(0, $page);
     $delivery = $this->ResumePostModel->getPostDelivery($where, $page, $this->page_number, $order);
     if (!empty($delivery) && is_array($delivery)) {
         foreach ($delivery as $k => $v) {
             $delivery[$k]['send_type'] = getPostTypeText($v['send_type']);
             $delivery[$k]['status'] = getResumeStatusText($v['status']);
             if ($id == 2 || $id == 1 || !$id) {
                 $time = $v['create_time'];
             }
             if ($id == 3) {
                 $time = $v['read_time'];
             }
             if ($id == 4 || $id == 5 || $id == 6) {
                 $time = $v['deal_time'];
             }
             if ($v['status'] == 3 || $v['status'] == 4) {
                 $delivery[$k]['hr_remark'] = !empty($v['hr_remark']) ? $v['hr_remark'] : $this->default_text[$v['status']];
             }
             $delivery[$k]['create_time'] = time2Unit($time);
             $delivery[$k]['city'] = regionIdToname($v['city_id'], $this->RegionsModel);
             $delivery[$k]['id'] = enInt($v['post_id']);
             $delivery[$k]['enterprise_id'] = enInt($v['enterprise_id']);
         }
         //            if($id==3){
         //                $time = $v['read_time'];
         //            }
         //            if($id==4||$id==5 || $id==6){
         //                $time = $v['deal_time'];
         //            }
         //            $delivery[$k]['create_time'] = time2Unit($time);
         //            $delivery[$k]['city'] = regionIdToname($v['city_id'],$this->RegionsModel);
         //            $delivery[$k]['id'] = enInt($v['post_id']);
         //            $delivery[$k]['enterprise_id'] = enInt($v['enterprise_id']);
     }
     $pagebtn['btn'] = self::page($id, $page, $page_sum);
     return array('data' => $delivery, 'page' => $pagebtn, 'text' => $timeText);
 }
 public function enterpriseUpdata($data = array(), $id = '')
 {
     if (!empty($data)) {
         $bool = $this->data($data)->where(array('pkid' => $id))->save();
         memcache($this->memcached, 'Enterprise', $id, 'rm');
         $this->rmMemcacheForPost($id);
         actionLogAdd(7, session('account'));
         return $bool;
     }
 }
Example #8
0
 function add($edit_id = 0)
 {
     $this->layout->add_javascripts(array('product'));
     $form = $this->input->post();
     //print_r($form);exit;
     $form = $this->security->xss_clean($form);
     if (isset($form['upcoming_product'])) {
         $form['upcoming_product'] = $form['upcoming_product'];
     } else {
         $form['upcoming_product'] = "0";
     }
     if (isset($form['edit_id'])) {
         $edit_id = $form['edit_id'];
     }
     $this->form_validation->set_rules($this->_validation_rules());
     $this->data['form_data'] = array("id" => "", "product_name" => "", "description" => "", "product_image" => "", "upcoming_product" => "", "buylink" => "", "price" => "");
     $edit_data = $this->product_model->get_where(array('id' => $edit_id))->row_array();
     if ($edit_data) {
         $this->data['form_data'] = $edit_data;
     }
     $this->data['img_url'] = site_url('assets/uploads/products/' . $this->data['form_data']['product_image']);
     if ($this->form_validation->run()) {
         $ins_data = array();
         $ins_data['product_name'] = $form['product_name'];
         $ins_data['description'] = $form['description'];
         $ins_data['product_image'] = $form['product_image'];
         $ins_data['upcoming_product'] = $form['upcoming_product'];
         $ins_data['buylink'] = $form['buylink'];
         $ins_data['price'] = $form['price'];
         $ins_data['created_id'] = get_current_user_id();
         $ins_data['created_time'] = str2DBDT();
         if (!empty($edit_id)) {
             $ins_data['updated_id'] = get_current_user_id();
             $ins_data['updated_time'] = str2DBDT();
             $this->product_model->update(array('id' => $edit_id), $ins_data);
             $this->service_message->set_flash_message("record_update_success");
             //log
             actionLogAdd('product', $edit_id, "Product#{$edit_id} ({$form['product_name']}) record has been updated.");
         } else {
             $product_id = $this->product_model->insert($ins_data);
             $this->service_message->set_flash_message("record_insert_success");
             //log
             actionLogAdd('product', $product_id, "Product#{$product_id} ({$form['product_name']}) record has been created.");
         }
         redirect('admin/products');
     }
     $this->layout->view("admin/product/add");
 }
Example #9
0
File: user.php Project: ram-1501/rs
 function ttt()
 {
     actionLogAdd('so', 12, 'hhhhh hhh');
 }