/**
  * @brief 문자취소(그룹)
  **/
 function cancelGroupMessages($grpid, $basecamp = FALSE)
 {
     $sms = textmessageModel::getCoolSMS($basecamp);
     $options = new stdClass();
     $options->gid = $grpid;
     $result = $sms::cancel($options);
     if ($result->code) {
         return new Object(-1, $result->code);
     }
     return new Object();
 }
 function dispTextmessageAdminUsageStatement()
 {
     $config = textmessageModel::getModuleConfig();
     $sms = textmessageModel::getCoolSMS();
     $count = Context::get('page_no');
     $search_code = Context::get('search_code');
     $msg_type = Context::get('msg_type');
     $rcpt_no = Context::get('rcpt_no');
     if (!$count) {
         $count = 20;
     }
     $options = new stdClass();
     if ($msg_type != 'all') {
         $options->type = $msg_type;
     }
     if (is_numeric($search_code)) {
         $options->s_resultcode = $search_code;
     }
     if ($rcpt_no) {
         $options->rcpt = $rcpt_no;
     }
     $options->count = $count;
     $options->page = Context::get('page');
     $output = $sms::sent($options);
     $output->total_page = ceil($output->total_count / $count);
     $page = new PageHandler($output->total_count, $output->total_page, 1, $count);
     $output->page_navigation = $page;
     // 템플릿에 쓰기 위해서 context::set
     Context::set('page_no', $count);
     Context::set('total_count', $output->total_count);
     Context::set('total_page', $output->total_page);
     Context::set('page', $output->page);
     Context::set('list_count', $output->list_count);
     Context::set('message_list', $output->data);
     Context::set('page_navigation', $output->page_navigation);
     require_once 'textmessage.utility.php';
     $csutil = new CSUtility();
     Context::set('csutil', $csutil);
     Context::set('config', $config);
     $this->setTemplateFile('usagestatement_list');
 }