mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1026 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d4bef08607
commit
f1027b7d9c
7 changed files with 110 additions and 0 deletions
|
|
@ -83,6 +83,7 @@
|
||||||
$lang->total_count = "전체개수";
|
$lang->total_count = "전체개수";
|
||||||
$lang->ipaddress = "IP 주소";
|
$lang->ipaddress = "IP 주소";
|
||||||
$lang->path = "경로";
|
$lang->path = "경로";
|
||||||
|
$lang->cart = "선택항목";
|
||||||
|
|
||||||
$lang->mid = "모듈이름";
|
$lang->mid = "모듈이름";
|
||||||
$lang->layout = "레이아웃";
|
$lang->layout = "레이아웃";
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
<action name="dispPollAdminList" type="view" admin_index="true" standalone="true" />
|
<action name="dispPollAdminList" type="view" admin_index="true" standalone="true" />
|
||||||
<action name="procInsert" type="controller" standalone="true" />
|
<action name="procInsert" type="controller" standalone="true" />
|
||||||
<action name="procPoll" type="controller" standalone="true" />
|
<action name="procPoll" type="controller" standalone="true" />
|
||||||
|
<action name="procPollAdminDeleteChecked" type="controller" standalone="true" />
|
||||||
</actions>
|
</actions>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
||||||
|
|
@ -180,5 +180,86 @@
|
||||||
$this->setMessage('success_poll');
|
$this->setMessage('success_poll');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 관리자 페이지에서 선택된 설문조사들을 삭제
|
||||||
|
**/
|
||||||
|
function procPollAdminDeleteChecked() {
|
||||||
|
// 선택된 글이 없으면 오류 표시
|
||||||
|
$cart = Context::get('cart');
|
||||||
|
if(!$cart) return $this->stop('msg_cart_is_null');
|
||||||
|
|
||||||
|
$poll_srl_list= explode('|@|', $cart);
|
||||||
|
$poll_count = count($poll_srl_list);
|
||||||
|
if(!$poll_count) return $this->stop('msg_cart_is_null');
|
||||||
|
|
||||||
|
// 글삭제
|
||||||
|
for($i=0;$i<$poll_count;$i++) {
|
||||||
|
$poll_index_srl = trim($poll_srl_list[$i]);
|
||||||
|
if(!$poll_index_srl) continue;
|
||||||
|
|
||||||
|
$output = $this->deletePollTitle($poll_index_srl, true);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setMessage( sprintf(Context::getLang('msg_checked_poll_is_deleted'), $poll_count) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설문조사 삭제 (한번에 여러개의 설문 등록시 그 중 하나의 설문만 삭제)
|
||||||
|
**/
|
||||||
|
function deletePollTitle($poll_index_srl) {
|
||||||
|
$args->poll_index_srl = $poll_index_srl;
|
||||||
|
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$oDB->begin();
|
||||||
|
|
||||||
|
$output = $oDB->executeQuery('poll.deletePollTitle', $args);
|
||||||
|
if(!$output) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = $oDB->executeQuery('poll.deletePollItem', $args);
|
||||||
|
if(!$output) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oDB->commit();
|
||||||
|
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설문조사 삭제 (하나의 묶인 설문조사를 통째로 삭제)
|
||||||
|
**/
|
||||||
|
function deletePoll($poll_srl) {
|
||||||
|
$args->poll_srl = $poll_srl;
|
||||||
|
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$oDB->begin();
|
||||||
|
|
||||||
|
$output = $oDB->executeQuery('poll.deletePoll', $args);
|
||||||
|
if(!$output) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = $oDB->executeQuery('poll.deletePollTitle', $args);
|
||||||
|
if(!$output) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = $oDB->executeQuery('poll.deletePollItem', $args);
|
||||||
|
if(!$output) {
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oDB->commit();
|
||||||
|
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
$poll->stop_date = $output->data->stop_date;
|
$poll->stop_date = $output->data->stop_date;
|
||||||
|
|
||||||
$output = executeQuery('poll.getPollTitle', $args);
|
$output = executeQuery('poll.getPollTitle', $args);
|
||||||
|
if(!$output->data) return;
|
||||||
if(!is_array($output->data)) $output->data = array($output->data);
|
if(!is_array($output->data)) $output->data = array($output->data);
|
||||||
foreach($output->data as $key => $val) {
|
foreach($output->data as $key => $val) {
|
||||||
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
||||||
|
|
|
||||||
8
modules/poll/queries/deletePoll.xml
Normal file
8
modules/poll/queries/deletePoll.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<query id="deletePoll" action="delete">
|
||||||
|
<tables>
|
||||||
|
<table name="poll" />
|
||||||
|
</tables>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="poll_srl" var="poll_srl" filter="number" notnull="notnull" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
9
modules/poll/queries/deletePollItem.xml
Normal file
9
modules/poll/queries/deletePollItem.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<query id="deletePollItem" action="delete">
|
||||||
|
<tables>
|
||||||
|
<table name="poll_item" />
|
||||||
|
</tables>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="poll_srl" var="poll_srl" filter="number" />
|
||||||
|
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" filter="number" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
9
modules/poll/queries/deletePollTitle.xml
Normal file
9
modules/poll/queries/deletePollTitle.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<query id="deletePollTitle" action="delete">
|
||||||
|
<tables>
|
||||||
|
<table name="poll_title" />
|
||||||
|
</tables>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="poll_srl" var="poll_srl" filter="number" />
|
||||||
|
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" filter="number" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue