mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1023 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5bb93cd38a
commit
988d15362a
9 changed files with 163 additions and 14 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
$lang->cmd_delete_checked_poll = '선택항목 삭제';
|
$lang->cmd_delete_checked_poll = '선택항목 삭제';
|
||||||
$lang->cmd_apply_poll = '설문 참여';
|
$lang->cmd_apply_poll = '설문 참여';
|
||||||
|
$lang->cmd_delete_checked_poll = '선택 설문 삭제';
|
||||||
|
|
||||||
$lang->success_poll = '설문에 응하여 주셔서 감사합니다';
|
$lang->success_poll = '설문에 응하여 주셔서 감사합니다';
|
||||||
|
|
||||||
|
|
@ -18,6 +19,8 @@
|
||||||
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
||||||
$lang->msg_checked_poll_is_deleted = '%d개의 설문조사가 삭제되었습니다';
|
$lang->msg_checked_poll_is_deleted = '%d개의 설문조사가 삭제되었습니다';
|
||||||
$lang->msg_check_poll_item = '설문에 응할 항목을 선택하여 주세요. (설문조사 마다 필수 선택항목이 다를 수 있습니다)';
|
$lang->msg_check_poll_item = '설문에 응할 항목을 선택하여 주세요. (설문조사 마다 필수 선택항목이 다를 수 있습니다)';
|
||||||
|
$lang->msg_cart_is_null = '삭제할 설문을 선택해주세요';
|
||||||
|
$lang->msg_checked_poll_is_deleted = '%d개의 설문이 삭제되었습니다';
|
||||||
|
|
||||||
$lang->cmd_null_item = "설문조사로 등록할 값이 없습니다.\n다시 설정해주세요";
|
$lang->cmd_null_item = "설문조사로 등록할 값이 없습니다.\n다시 설정해주세요";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,15 @@
|
||||||
|
|
||||||
// 개별 설문 등록
|
// 개별 설문 등록
|
||||||
foreach($args->poll as $key => $val) {
|
foreach($args->poll as $key => $val) {
|
||||||
unset($poll_args);
|
unset($title_args);
|
||||||
$poll_args->poll_srl = $poll_srl;
|
$title_args->poll_srl = $poll_srl;
|
||||||
$poll_args->poll_index_srl = $key+1;
|
$title_args->poll_index_srl = getNextSequence();
|
||||||
$poll_args->title = $val->title;
|
$title_args->title = $val->title;
|
||||||
$poll_args->checkcount = $val->checkcount;
|
$title_args->checkcount = $val->checkcount;
|
||||||
$poll_args->poll_count = 0;
|
$title_args->poll_count = 0;
|
||||||
$output = executeQuery('poll.insertPollTitle', $poll_args);
|
$title_args->list_order = $title_args->poll_index_srl * -1;
|
||||||
|
$title_args->member_srl = $member_srl;
|
||||||
|
$output = executeQuery('poll.insertPollTitle', $title_args);
|
||||||
if(!$output->toBool()) {
|
if(!$output->toBool()) {
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -86,12 +88,12 @@
|
||||||
|
|
||||||
// 개별 설문의 항목 추가
|
// 개별 설문의 항목 추가
|
||||||
foreach($val->item as $k => $v) {
|
foreach($val->item as $k => $v) {
|
||||||
unset($poll_args);
|
unset($item_args);
|
||||||
$poll_args->poll_srl = $poll_srl;
|
$item_args->poll_srl = $poll_srl;
|
||||||
$poll_args->poll_index_srl = $key+1;
|
$item_args->poll_index_srl = $title_args->poll_index_srl;
|
||||||
$poll_args->title = $v;
|
$item_args->title = $v;
|
||||||
$poll_args->poll_count = 0;
|
$item_args->poll_count = 0;
|
||||||
$output = executeQuery('poll.insertPollItem', $poll_args);
|
$output = executeQuery('poll.insertPollItem', $item_args);
|
||||||
if(!$output->toBool()) {
|
if(!$output->toBool()) {
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,17 @@
|
||||||
function init() {
|
function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설문 목록 구해옴 (관리자용)
|
||||||
|
**/
|
||||||
|
function getPollList($args) {
|
||||||
|
$output = executeQuery('poll.getPollList', $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
if($output->data && !is_array($output->data)) $output->data = array($output->data);
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 이미 설문 조사를 하였는지 검사하는 함수
|
* @brief 이미 설문 조사를 하였는지 검사하는 함수
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,33 @@
|
||||||
function init() {
|
function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 관리자 페이지
|
||||||
|
**/
|
||||||
|
function dispPollAdminList() {
|
||||||
|
// 목록을 구하기 위한 옵션
|
||||||
|
$args->page = Context::get('page'); ///< 페이지
|
||||||
|
$args->list_count = 50; ///< 한페이지에 보여줄 글 수
|
||||||
|
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||||
|
|
||||||
|
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||||
|
|
||||||
|
// 목록 구함
|
||||||
|
$oPollModel = &getModel('poll');
|
||||||
|
$output = $oPollModel->getPollList($args);
|
||||||
|
|
||||||
|
// 템플릿 변수 설정
|
||||||
|
Context::set('total_count', $output->total_count);
|
||||||
|
Context::set('total_page', $output->total_page);
|
||||||
|
Context::set('page', $output->page);
|
||||||
|
Context::set('poll_list', $output->data);
|
||||||
|
Context::set('page_navigation', $output->page_navigation);
|
||||||
|
Context::set('module_list', $module_list);
|
||||||
|
|
||||||
|
// 템플릿 지정
|
||||||
|
$this->setTemplatePath($this->module_path.'tpl');
|
||||||
|
$this->setTemplateFile('poll_list');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
19
modules/poll/queries/getPollList.xml
Normal file
19
modules/poll/queries/getPollList.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<query id="getPollList" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="poll_title" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="*" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="like" column="title" var="s_title" />
|
||||||
|
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||||
|
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||||
|
</conditions>
|
||||||
|
<navigation>
|
||||||
|
<index var="sort_index" default="list_order" order="asc" />
|
||||||
|
<list_count var="list_count" default="20" />
|
||||||
|
<page_count var="page_count" default="10" />
|
||||||
|
<page var="page" default="1" />
|
||||||
|
</navigation>
|
||||||
|
</query>
|
||||||
|
|
@ -8,5 +8,9 @@
|
||||||
<column name="title" var="title" notnull="notnull" />
|
<column name="title" var="title" notnull="notnull" />
|
||||||
<column name="poll_count" var="poll_count" default="0" />
|
<column name="poll_count" var="poll_count" default="0" />
|
||||||
<column name="checkcount" var="checkcount" notnull="notnull" default="1" />
|
<column name="checkcount" var="checkcount" notnull="notnull" default="1" />
|
||||||
|
<column name="member_srl" var="member_srl" />
|
||||||
|
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||||
|
<column name="regdate" var="regdate" default="curdate()" />
|
||||||
|
<column name="list_order" var="list_order" default="0" />
|
||||||
</columns>
|
</columns>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,8 @@
|
||||||
<column name="title" type="varchar" size="250" notnull="notnull" />
|
<column name="title" type="varchar" size="250" notnull="notnull" />
|
||||||
<column name="checkcount" type="number" size="11" notnull="notnull" default="1" />
|
<column name="checkcount" type="number" size="11" notnull="notnull" default="1" />
|
||||||
<column name="poll_count" type="number" size="11" notnull="notnull" />
|
<column name="poll_count" type="number" size="11" notnull="notnull" />
|
||||||
|
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||||
|
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
|
||||||
|
<column name="regdate" type="date" index="idx_regdate" />
|
||||||
|
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,14 @@
|
||||||
.poll_detail_box .bar_box {
|
.poll_detail_box .bar_box {
|
||||||
width:80%;
|
width:80%;
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
|
border:1px solid #DDDDDD;
|
||||||
|
margin:0px 5px 5px 35px;
|
||||||
|
padding:1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poll_detail_box .bar {
|
.poll_detail_box .bar {
|
||||||
background-color:#444444;
|
background-color:#444444;
|
||||||
border-bottom:1px solid #AAAAAA;
|
border-bottom:1px solid #AAAAAA;
|
||||||
margin:0px 5px 5px 35px;
|
|
||||||
height:5px;
|
height:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
76
modules/poll/tpl/poll_list.html
Normal file
76
modules/poll/tpl/poll_list.html
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
<!--%import("filter/delete_checked.xml")-->
|
||||||
|
|
||||||
|
<!-- 정보 -->
|
||||||
|
<div>
|
||||||
|
{$lang->total_count} : {number_format($total_count)},
|
||||||
|
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
|
||||||
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
|
|
||||||
|
<!-- 목록 -->
|
||||||
|
<div>
|
||||||
|
<table border="1" width="100%">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">{$lang->no}</th>
|
||||||
|
<th>{$lang->title}</th>
|
||||||
|
<th>{$lang->poll_check_count}</th>
|
||||||
|
<th>{$lang->poll_total_count}</th>
|
||||||
|
<th>{$lang->regdate}</th>
|
||||||
|
</tr>
|
||||||
|
<!--@foreach($poll_list as $no => $val)-->
|
||||||
|
<tr>
|
||||||
|
<td>{$no}</td>
|
||||||
|
<td><input type="checkbox" name="cart" value="{$val->poll_index_srl}" /></td>
|
||||||
|
<td>{$val->title}</td>
|
||||||
|
<td>{$val->checkcount}</td>
|
||||||
|
<td>{$val->poll_count}</td>
|
||||||
|
<td>{zdate($val->regdate,"Y-m-d H:i")}</td>
|
||||||
|
</tr>
|
||||||
|
<!--@end-->
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 버튼 -->
|
||||||
|
<div>
|
||||||
|
<input type="submit" value="{$lang->cmd_delete_checked_poll}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- 검색 -->
|
||||||
|
<div>
|
||||||
|
<form action="./" method="get">
|
||||||
|
<input type="hidden" name="module" value="{$module}" />
|
||||||
|
<input type="hidden" name="act" value="{$act}" />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select name="search_target">
|
||||||
|
<option value="">{$lang->search_target}</option>
|
||||||
|
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||||
|
<option value="{$key}" <!--@if($search_target==$key)-->selected="true"<!--@end-->>{$val}</option>
|
||||||
|
<!--@end-->
|
||||||
|
</select>
|
||||||
|
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||||
|
<input type="submit" value="{$lang->cmd_search}" />
|
||||||
|
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('','module',$module,'act',$act)}'"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 페이지 네비게이션 -->
|
||||||
|
<div>
|
||||||
|
<a href="{getUrl('page','')}">[{$lang->first_page}]</a>
|
||||||
|
|
||||||
|
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||||
|
<!--@if($page == $page_no)-->
|
||||||
|
{$page_no}
|
||||||
|
<!--@else-->
|
||||||
|
<a href="{getUrl('page',$page_no)}">[{$page_no}]</a>
|
||||||
|
<!--@end-->
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
|
<a href="{getUrl('page',$page_navigation->last_page)}">[{$lang->last_page}]</a>
|
||||||
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue