Example #1
0
 public function execSetEvent()
 {
     if (!$this->input->post('event_id')) {
         $data = array('PROCESS_CODE' => $this->input->post('process'), 'TITLE' => $this->input->post('title'), 'START_DATE' => $this->input->post('start_date'), 'END_DATE' => $this->input->post('end_date'), 'REPEAT_CODE' => $this->input->post('repeat_type'), 'REPEAT_COUNT' => $this->input->post('repeat_count'), 'LIMIT_COUNT' => $this->input->post('repeat_limit'), 'GIFT_TYPE' => $this->input->post('reward_type'), 'ITEM_ID' => $this->input->post('reward_item_id'), 'AMOUNT' => $this->input->post('reward_amount'), 'SPOT_START_TIME' => $this->input->post('spot_start_time'), 'SPOT_END_TIME' => $this->input->post('spot_end_time'));
         $this->Event_data->insertEvent($data);
     } else {
         $data = array('EVENT_ID' => $this->input->post('event_id'), 'PROCESS_CODE' => $this->input->post('process'), 'TITLE' => $this->input->post('title'), 'START_DATE' => $this->input->post('start_date'), 'END_DATE' => $this->input->post('end_date'), 'REPEAT_CODE' => $this->input->post('repeat_type'), 'REPEAT_COUNT' => $this->input->post('repeat_count'), 'LIMIT_COUNT' => $this->input->post('repeat_limit'), 'GIFT_TYPE' => $this->input->post('reward_type'), 'ITEM_ID' => $this->input->post('reward_item_id'), 'AMOUNT' => $this->input->post('reward_amount'), 'SPOT_START_TIME' => $this->input->post('spot_start_time'), 'SPOT_END_TIME' => $this->input->post('spot_end_time'));
         $this->Event_data->updateEvent($data);
     }
     js_alert_redirect('Done.', site_url(array('event')));
 }
Example #2
0
 function execSetNotice()
 {
     if (!$this->input->post('notice_id')) {
         $data = array('TITLE' => $this->input->post('title'), 'CONTENT' => $this->input->post('content'), 'MANAGER_ID' => $this->auth->getManagerId(), 'START_DATE' => $this->input->post('start_date') . ' 00:00:00', 'END_DATE' => $this->input->post('end_date') . ' 23:59:59', 'IS_SHOW' => $this->input->post('is_show'));
         $this->Notice_data->insertNotice($data);
     } else {
         $data = array('NOTICE_ID' => $this->input->post('notice_id'), 'TITLE' => $this->input->post('title'), 'CONTENT' => $this->input->post('content'), 'START_DATE' => $this->input->post('start_date') . ' 00:00:00', 'END_DATE' => $this->input->post('end_date') . ' 23:59:59', 'IS_SHOW' => $this->input->post('is_show'));
         $this->Notice_data->updateNotice($data);
     }
     js_alert_redirect('Done.', site_url(array('notice')));
 }
Example #3
0
 public function execAddPoint($user_id = 0)
 {
     $amount = $this->input->post('amount');
     $point_type = $this->input->post('point_type');
     $memo = $this->input->post('memo');
     $data = array('USER_ID' => $user_id);
     if ($amount == 0) {
         js_alert_back('Invalid amount.');
     } else {
         if ($amount > 0) {
             $category = 99;
         } else {
             $category = -99;
         }
     }
     if ($point_type == 'MONEY') {
         $this->Shop_data->updateUserPoint(1, $amount, $category, $user_id, $memo);
     } else {
         if ($point_type == 'CASH') {
             $this->Shop_data->updateUserPoint(2, $amount, $category, $user_id, $memo);
         } else {
             if ($point_type == 'LOTTERY_POINT') {
                 $this->Shop_data->updateUserPoint(3, $amount, $category, $user_id, $memo);
             } else {
                 if ($point_type == 'LOTTERY_COUPON') {
                     $this->Shop_data->updateUserPoint(4, $amount, $category, $user_id, $memo);
                 } else {
                     if ($point_type == 'LOTTERY_HIGH_COUPON') {
                         $this->Shop_data->updateUserPoint(5, $amount, $category, $user_id, $memo);
                     } else {
                         $this->Shop_data->updateUserPoint($data);
                     }
                 }
             }
         }
     }
     js_alert_redirect('처리가 완료 되었습니다.', site_url(array('user', 'view', $user_id)));
 }
Example #4
0
 function execAddHeart($user_id = 0)
 {
     $value = $this->input->post('value');
     $add_type = $this->input->post('add_type');
     $memo = $this->input->post('memo');
     if ($add_type == 'plus') {
         $heart = '+' . $value;
     } else {
         if ($add_type == 'minus') {
             $heart = '-' . $value;
         }
     }
     $data = array('USER_ID' => $user_id, 'HEART' => $heart);
     if ($this->User_data->setUserRow($data)) {
         js_alert_redirect('처리가 완료 되었습니다.', site_url(array('user', 'view', $user_id)));
     } else {
         js_alert_back('처리하지 못하였습니다.');
     }
 }
Example #5
0
 public function execSendMailHeart($user_id = 0)
 {
     $amount = $this->input->post('amount');
     $message = array('SEND_USER_ID' => 0, 'RECEIVE_USER_ID' => $user_id, 'GIFT_TYPE' => 2, 'AMOUNT' => $amount, 'TEXT_ID' => 1002);
     $this->Message_data->insertMessage($message);
     js_alert_redirect('发送' . $amount . '体力补偿邮件?', site_url(array('user', 'view', $user_id)));
 }