mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1004 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cf46548046
commit
c2209ea9b0
12 changed files with 99 additions and 102 deletions
|
|
@ -19,9 +19,48 @@
|
|||
**/
|
||||
function getPollHtml($poll_srl) {
|
||||
|
||||
return "SAdf";
|
||||
}
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
// 해당 설문조사에 대한 내용을 조사
|
||||
$output = executeQuery('poll.getPoll', $args);
|
||||
if(!$output->data) return '';
|
||||
|
||||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
|
||||
$output = executeQuery('poll.getPollTitle', $args);
|
||||
foreach($output->data as $key => $val) {
|
||||
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
||||
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
|
||||
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
|
||||
}
|
||||
|
||||
$output = executeQuery('poll.getPollItem', $args);
|
||||
foreach($output->data as $key => $val) {
|
||||
$poll->poll[$val->poll_index_srl]->item[] = $val;
|
||||
}
|
||||
|
||||
// 현 사용자가 설문조사에 응하였는지 검사
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('poll.getPollLog', $args);
|
||||
if($output->data->count) $poll->poll_date = $output->data->regdate;
|
||||
else $poll->poll_date = '';
|
||||
Context::set('poll', $poll);
|
||||
|
||||
// 응하였다면 결과 html return
|
||||
if($poll->poll_date) $template_file = "result";
|
||||
|
||||
// 응하지 않았다면 설문 form html return
|
||||
else $template_file = "form";
|
||||
|
||||
$tpl_path = $this->module_path.'tpl';
|
||||
$tpl_file = $template_file;
|
||||
|
||||
require_once("./classes/template/TemplateHandler.class.php");
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
11
modules/poll/queries/getPoll.xml
Normal file
11
modules/poll/queries/getPoll.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPoll" action="select">
|
||||
<tables>
|
||||
<table name="poll" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/poll/queries/getPollItem.xml
Normal file
11
modules/poll/queries/getPollItem.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPollItem" action="select">
|
||||
<tables>
|
||||
<table name="poll_title" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/poll/queries/getPollLog.xml
Normal file
13
modules/poll/queries/getPollLog.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="getPollLog" action="select">
|
||||
<tables>
|
||||
<table name="poll_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="equal" column="member_srl" var="memer_srl" pipe="and" />
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" default="ipaddress()" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/poll/queries/getPollTitle.xml
Normal file
11
modules/poll/queries/getPollTitle.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPollTitle" action="select">
|
||||
<tables>
|
||||
<table name="poll_title" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<filter name="delete_checked" module="trackback" act="procTrackbackAdminDeleteChecked" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="cart" required="true" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param name="cart" target="cart" />
|
||||
</parameter>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
5
modules/poll/tpl/filter/poll.xml
Normal file
5
modules/poll/tpl/filter/poll.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<filter name="poll" module="poll" act="procPoll" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response />
|
||||
</filter>
|
||||
2
modules/poll/tpl/form.html
Normal file
2
modules/poll/tpl/form.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!--%import("filter/poll.xml")-->
|
||||
haha
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<!--%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>
|
||||
<tr>
|
||||
<th colspan="2">{$lang->no}</th>
|
||||
<th>{$lang->module}</th>
|
||||
<th>{$lang->blog_name}</th>
|
||||
<th>{$lang->title}</th>
|
||||
<th>{$lang->date}</th>
|
||||
<th>{$lang->ipaddress}</th>
|
||||
<th>{$lang->cmd_move}</th>
|
||||
</tr>
|
||||
<!--@foreach($trackback_list as $no => $val)-->
|
||||
<tr>
|
||||
<td rowspan="2">{$no}</td>
|
||||
<td rowspan="2"><input type="checkbox" name="cart" value="{$val->trackback_srl}" /></td>
|
||||
<td><a href="#" onclick="window.open('./?mid={$val->mid}');return false">{$module_list[$val->module_srl]->browser_title}</a></td>
|
||||
<td><a href="#" onclick="window.open('{$val->url}');return false;">{$val->blog_name}</a></td>
|
||||
<td>{$val->title}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td>{$val->ipaddress}</td>
|
||||
<td rowspan="2"><a href="#" onclick="window.open('./?document_srl={$val->document_srl}&#trackback_{$val->trackback_srl}');return false">{$lang->cmd_move}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">{$val->excerpt}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div>
|
||||
<input type="submit" value="{$lang->cmd_delete_checked_trackback}" />
|
||||
</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','','trackback_srl','')}">[{$lang->first_page}]</a>
|
||||
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
{$page_no}
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'trackback_srl','')}">[{$page_no}]</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'trackback_srl','')}">[{$lang->last_page}]</a>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue