diff --git a/modules/comment/tpl/comment_list.html b/modules/comment/tpl/comment_list.html index c0acf5927..37e4b7946 100644 --- a/modules/comment/tpl/comment_list.html +++ b/modules/comment/tpl/comment_list.html @@ -23,6 +23,17 @@ + + + {$lang->comment} + {$lang->nick_name} + {$lang->cmd_vote}(+/-) + {$lang->date} + {$lang->ipaddress} + {$lang->status} + + + {@ $comment = cut_str(trim(htmlspecialchars(strip_tags($val->content))), 200, '...')} diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index 0c5ac41a5..4bc1c5b39 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -24,6 +24,18 @@ + + + {$lang->title} + {$lang->author} + {$lang->readed_count} + {$lang->cmd_vote}(+/-) + {$lang->date} + {$lang->ipaddress} + {$lang->status} + + + diff --git a/modules/file/lang/en.lang.php b/modules/file/lang/en.lang.php index 820ed2694..b27bb8a4a 100644 --- a/modules/file/lang/en.lang.php +++ b/modules/file/lang/en.lang.php @@ -56,5 +56,5 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files from sites other than this.'; $lang->msg_not_permitted_create = 'Failed to create a file or directory.'; $lang->msg_file_upload_error = 'An error has occurred during uploading.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/es.lang.php b/modules/file/lang/es.lang.php index da9ded268..b8f584743 100644 --- a/modules/file/lang/es.lang.php +++ b/modules/file/lang/es.lang.php @@ -53,5 +53,5 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/fr.lang.php b/modules/file/lang/fr.lang.php index cdc448780..2e5e6f8dc 100644 --- a/modules/file/lang/fr.lang.php +++ b/modules/file/lang/fr.lang.php @@ -53,5 +53,5 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/jp.lang.php b/modules/file/lang/jp.lang.php index c2c5e1caa..fbd1ad4d0 100644 --- a/modules/file/lang/jp.lang.php +++ b/modules/file/lang/jp.lang.php @@ -55,5 +55,5 @@ $lang->msg_not_allowed_outlink = '外部リンクからのダウンロードは許可されていません。'; $lang->msg_not_permitted_create = 'ファイルまたはディレクトリを生成できません。'; $lang->msg_file_upload_error = 'ファイルアップロードに失敗しました。'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/ru.lang.php b/modules/file/lang/ru.lang.php index ff88fae17..a86cb0b04 100644 --- a/modules/file/lang/ru.lang.php +++ b/modules/file/lang/ru.lang.php @@ -55,5 +55,5 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.'; $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/tr.lang.php b/modules/file/lang/tr.lang.php index a25377052..7f3ba61dd 100644 --- a/modules/file/lang/tr.lang.php +++ b/modules/file/lang/tr.lang.php @@ -56,5 +56,5 @@ $lang->msg_not_allowed_outlink = 'Bu siteden dosya indirimine izin verilmemektedir.'; $lang->msg_not_permitted_create = 'Dosya veya dizin oluşturma hatası.'; $lang->msg_file_upload_error = 'Karşıya yükleme esnasında bir hata oluştu.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/vi.lang.php b/modules/file/lang/vi.lang.php index ce44c395b..e0cac981c 100644 --- a/modules/file/lang/vi.lang.php +++ b/modules/file/lang/vi.lang.php @@ -59,5 +59,5 @@ $lang->msg_not_allowed_outlink = 'Không cho phép tải file từ những trang khác ngoài trang này.'; $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/zh-CN.lang.php b/modules/file/lang/zh-CN.lang.php index 02edc0c3e..31ce1148d 100644 --- a/modules/file/lang/zh-CN.lang.php +++ b/modules/file/lang/zh-CN.lang.php @@ -53,5 +53,5 @@ $lang->msg_not_allowed_outlink = '此站不允许外链下载。'; $lang->msg_not_permitted_create = '无法生成文件或文件夹。'; $lang->msg_file_upload_error = '上传文件发生出错。'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/file/lang/zh-TW.lang.php b/modules/file/lang/zh-TW.lang.php index 82823120e..a5cac4e44 100644 --- a/modules/file/lang/zh-TW.lang.php +++ b/modules/file/lang/zh-TW.lang.php @@ -55,5 +55,5 @@ $lang->msg_not_allowed_outlink = '無法從網站下載檔案。'; $lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; - + $lang->no_files = 'No Files'; ?> diff --git a/modules/poll/conf/module.xml b/modules/poll/conf/module.xml index 1effacb1f..13b483713 100644 --- a/modules/poll/conf/module.xml +++ b/modules/poll/conf/module.xml @@ -3,7 +3,7 @@ - + @@ -15,8 +15,10 @@ + + diff --git a/modules/poll/lang/en.lang.php b/modules/poll/lang/en.lang.php index d9f0fee15..c6aa8b63f 100644 --- a/modules/poll/lang/en.lang.php +++ b/modules/poll/lang/en.lang.php @@ -35,4 +35,6 @@ 'regdate' => 'Posting date', 'ipaddress' => 'IP Address', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/es.lang.php b/modules/poll/lang/es.lang.php index 2433fb1d3..382c96d65 100644 --- a/modules/poll/lang/es.lang.php +++ b/modules/poll/lang/es.lang.php @@ -35,4 +35,6 @@ 'regdate' => 'Fecha de la participación', 'ipaddress' => 'Dirección IP', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/fr.lang.php b/modules/poll/lang/fr.lang.php index 7651d1387..428d5cb80 100644 --- a/modules/poll/lang/fr.lang.php +++ b/modules/poll/lang/fr.lang.php @@ -35,4 +35,6 @@ 'regdate' => 'Jour posté', 'ipaddress' => 'Adresse IP', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/jp.lang.php b/modules/poll/lang/jp.lang.php index 0ce341f3b..63e7ebd03 100644 --- a/modules/poll/lang/jp.lang.php +++ b/modules/poll/lang/jp.lang.php @@ -35,4 +35,6 @@ 'regdate' => '登録日', 'ipaddress' => 'IPアドレス', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/ko.lang.php b/modules/poll/lang/ko.lang.php index aa6cd6a44..9b34df092 100644 --- a/modules/poll/lang/ko.lang.php +++ b/modules/poll/lang/ko.lang.php @@ -28,4 +28,6 @@ 'regdate' => '등록일', 'ipaddress' => 'IP 주소', ); + $lang->single_check = '단일 선택'; + $lang->multi_check = '다중 선택'; ?> diff --git a/modules/poll/lang/ru.lang.php b/modules/poll/lang/ru.lang.php index 523ca958f..4aa046b49 100644 --- a/modules/poll/lang/ru.lang.php +++ b/modules/poll/lang/ru.lang.php @@ -35,4 +35,6 @@ 'regdate' => 'Дата Размещения', // // translator's remark: this may be as "Дата Регистрации" 'ipaddress' => 'IP-адрес', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/tr.lang.php b/modules/poll/lang/tr.lang.php index 19fb4944b..9e0e58c67 100644 --- a/modules/poll/lang/tr.lang.php +++ b/modules/poll/lang/tr.lang.php @@ -35,4 +35,6 @@ 'regdate' => 'Mesaj Tarihi', 'ipaddress' => 'IP Adresi', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/vi.lang.php b/modules/poll/lang/vi.lang.php index 5fd71d5d8..484f8e5c1 100644 --- a/modules/poll/lang/vi.lang.php +++ b/modules/poll/lang/vi.lang.php @@ -37,4 +37,6 @@ 'regdate' => 'Ngày gửi', 'ipaddress' => 'IP', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/zh-CN.lang.php b/modules/poll/lang/zh-CN.lang.php index b18de80bf..6b5495990 100644 --- a/modules/poll/lang/zh-CN.lang.php +++ b/modules/poll/lang/zh-CN.lang.php @@ -35,4 +35,6 @@ 'regdate' => '登录日期', 'ipaddress' => 'IP 地址', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/lang/zh-TW.lang.php b/modules/poll/lang/zh-TW.lang.php index f7bdd00d8..009d3cc62 100644 --- a/modules/poll/lang/zh-TW.lang.php +++ b/modules/poll/lang/zh-TW.lang.php @@ -35,4 +35,6 @@ 'regdate' => '登錄日期', 'ipaddress' => 'IP位址', ); + $lang->single_check = 'Single Check'; + $lang->multi_check = 'Multi Check'; ?> diff --git a/modules/poll/poll.admin.controller.php b/modules/poll/poll.admin.controller.php index 94f72bb71..7cc7bfc3b 100644 --- a/modules/poll/poll.admin.controller.php +++ b/modules/poll/poll.admin.controller.php @@ -60,6 +60,27 @@ } } + function procPollAdminAddCart() + { + $poll_index_srl = (int)Context::get('poll_index_srl'); + + $oPollAdminModel = &getAdminModel('poll'); + //$columnList = array('comment_srl'); + $args->pollIndexSrlList = array($poll_index_srl); + $args->list_count = 100; + + $output = $oPollAdminModel->getPollList($args); + + if(is_array($output->data)) + { + foreach($output->data AS $key=>$value) + { + if($_SESSION['poll_management'][$value->poll_index_srl]) unset($_SESSION['poll_management'][$value->poll_index_srl]); + else $_SESSION['poll_management'][$value->poll_index_srl] = true; + } + } + } + /** * @brief Delete the poll (when several questions are registered in one poll, delete this question) **/ diff --git a/modules/poll/poll.admin.model.php b/modules/poll/poll.admin.model.php index c7c0760b7..0c4a0ffb6 100644 --- a/modules/poll/poll.admin.model.php +++ b/modules/poll/poll.admin.model.php @@ -17,13 +17,24 @@ * @brief Get the list of polls **/ function getPollList($args) { - $output = executeQuery('poll.getPollList', $args); + $output = executeQueryArray('poll.getPollList', $args); if(!$output->toBool()) return $output; - if($output->data && !is_array($output->data)) $output->data = array($output->data); + //if($output->data && !is_array($output->data)) $output->data = array($output->data); return $output; } + /** + * @brief Get the list of polls with member info + **/ + function getPollListWithMember($args) + { + $output = executeQueryArray('poll.getPollListWithMember', $args); + if(!$output->toBool()) return $output; + + return $output; + } + /** * @brief Get the original poll **/ diff --git a/modules/poll/poll.admin.view.php b/modules/poll/poll.admin.view.php index 7ea864847..8c6b45c44 100644 --- a/modules/poll/poll.admin.view.php +++ b/modules/poll/poll.admin.view.php @@ -40,11 +40,20 @@ $args->list_count = 50; // The number of posts to show on one page $args->page_count = 10; // The number of pages to display in the page navigation - $args->sort_index = 'list_order'; // Sorting value + $args->sort_index = 'P.list_order'; // Sorting value // Get the list $oPollAdminModel = &getAdminModel('poll'); - $output = $oPollAdminModel->getPollList($args); + $output = $oPollAdminModel->getPollListWithMember($args); + if(is_array($output->data)) + { + foreach($output->data AS $key=>$value) + { + if($_SESSION['poll_management'][$value->poll_index_srl]) $value->isCarted = true; + else $value->isCarted = false; + } + } + // Configure the template variables Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); diff --git a/modules/poll/poll.controller.php b/modules/poll/poll.controller.php index 2f2d10207..0ccae4189 100644 --- a/modules/poll/poll.controller.php +++ b/modules/poll/poll.controller.php @@ -191,6 +191,46 @@ $this->add('tpl',$tpl); } + /** + * @brief poll list + **/ + function procPollGetList() + { + if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted'); + // Taken from a list of selected sessions + $flagList = $_SESSION['poll_management']; + if(count($flagList)) { + foreach($flagList as $key => $val) { + if(!is_bool($val)) continue; + $pollSrlList[] = $key; + } + } + + global $lang; + if(count($pollSrlList) > 0) { + $oPollAdminModel = &getAdminModel('poll'); + $args->pollIndexSrlList = $pollSrlList; + $output = $oPollAdminModel->getPollListWithMember($args); + $pollList = $output->data; + + if(is_array($pollList)) + { + foreach($pollList AS $key=>$value) + { + if($value->checkcount == 1) $value->checkName = $lang->single_check; + else $value->checkName = $lang->multi_check; + } + } + } + else + { + $pollList = array(); + $this->setMessage($lang->no_documents); + } + + $this->add('poll_list', $pollList); + } + /** * @brief A poll synchronization trigger when a new post is registered **/ diff --git a/modules/poll/queries/getPollList.xml b/modules/poll/queries/getPollList.xml index 1e7bba724..1c2154a78 100644 --- a/modules/poll/queries/getPollList.xml +++ b/modules/poll/queries/getPollList.xml @@ -6,7 +6,8 @@ - + + diff --git a/modules/poll/queries/getPollListWithMember.xml b/modules/poll/queries/getPollListWithMember.xml new file mode 100644 index 000000000..92b229067 --- /dev/null +++ b/modules/poll/queries/getPollListWithMember.xml @@ -0,0 +1,24 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/modules/poll/tpl/js/poll_admin.js b/modules/poll/tpl/js/poll_admin.js index 80a4ae155..2948acbb3 100644 --- a/modules/poll/tpl/js/poll_admin.js +++ b/modules/poll/tpl/js/poll_admin.js @@ -54,3 +54,52 @@ function completeMovePoll(ret_obj, response_tags) { if(comment_srl) url = url+'#comment_'+comment_srl; winopen(url, 'pollTarget'); } + +function getPollList() +{ + var params = new Array(); + var response_tags = ['error','message', 'poll_list']; + + exec_xml('poll','procPollGetList',params, completeGetPollList, response_tags); +} + +function completeGetPollList(ret_obj, response_tags) +{ + var htmlListBuffer = ''; + + if(ret_obj['poll_list'] == null) + { + htmlListBuffer = '' + + '' + + ''; + } + else + { + var poll_list = ret_obj['poll_list']['item']; + if(!jQuery.isArray(poll_list)) poll_list = [poll_list]; + for(var x in poll_list) + { + var objPoll = poll_list[x]; + htmlListBuffer += '' + + '' + + '' + + '' + + '' + + ''; + } + jQuery('#selectedPollCount').html(poll_list.length); + } + jQuery('#pollManageListTable>tbody').html(htmlListBuffer); +} + +function addCart(poll_index_srl) { + var params = new Array(); + var response_tags = ['error','message']; + params['poll_index_srl'] = poll_index_srl; + + exec_xml('poll','procPollAdminAddCart',params, completeAddCart, response_tags); +} + +function completeAddCart(ret_obj, response_tags) +{ +} diff --git a/modules/poll/tpl/poll_list.html b/modules/poll/tpl/poll_list.html index 18224be0b..dd32df9c6 100644 --- a/modules/poll/tpl/poll_list.html +++ b/modules/poll/tpl/poll_list.html @@ -1,82 +1,125 @@ - - - +

{$XE_VALIDATOR_MESSAGE}

-
- - - - -
'+ret_obj['message']+'
'+objPoll.title+''+objPoll.poll_count+''+objPoll.nick_name+'
- - - - - - - - - - - - - - - - - - - - - - - - - -
Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}
{$lang->no}
{$lang->title}
{$lang->poll_checkcount}
{$lang->poll_join_count}
{$lang->regdate}
 
{$no}{htmlspecialchars($val->title)}{$val->checkcount}{$val->poll_count}{zdate($val->regdate,"Y-m-d H:i")}{$lang->cmd_view}
- - -
- -
- -
+ +

Poll

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ All({number_format($total_count)}) + 선택한 설문 관리... +
{$lang->title}{$lang->poll_checkcount}{$lang->poll_join_count}Author{$lang->regdate}
{$lang->title}{$lang->poll_checkcount}{$lang->poll_join_count}Author{$lang->regdate}
{htmlspecialchars($val->title)}{$lang->single_check}{$lang->multi_check}{$val->poll_count}{$val->nick_name}{zdate($val->regdate,"Y-m-d H:i")} + isCarted)-->checked onclick="addCart({$val->poll_index_srl})" /> +
+
+ + + +
- - - - - - - -
- - -
- - - - {$lang->cmd_cancel} -
-