issue 70 comment type check and case type change url

showing member profile


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8900 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-08-26 01:12:47 +00:00
parent 4f6336d746
commit 1efce9b356
2 changed files with 25 additions and 4 deletions

View file

@ -45,12 +45,33 @@
// Get the list
$oPollAdminModel = &getAdminModel('poll');
$output = $oPollAdminModel->getPollListWithMember($args);
// check poll type. document or comment
if(is_array($output->data))
{
$uploadTargetSrlList = array();
foreach($output->data AS $key=>$value)
{
if($_SESSION['poll_management'][$value->poll_index_srl]) $value->isCarted = true;
else $value->isCarted = false;
array_push($uploadTargetSrlList, $value->upload_target_srl);
}
$oDocumentModel = &getModel('document');
$targetDocumentOutput = $oDocumentModel->getDocuments($uploadTargetSrlList);
$oCommentModel = &getModel('comment');
$columnList = array('comment_srl', 'document_srl');
$targetCommentOutput = $oCommentModel->getComments($uploadTargetSrlList, $columnList);
foreach($output->data AS $key=>$value)
{
if(array_key_exists($value->upload_target_srl, $targetDocumentOutput))
$value->document_srl = $value->upload_target_srl;
if(array_key_exists($value->upload_target_srl, $targetCommentOutput))
{
$value->comment_srl = $value->upload_target_srl;
$value->document_srl = $targetCommentOutput[$value->comment_srl]->document_srl;
}
}
}

View file

@ -33,10 +33,10 @@
<tbody>
<!--@foreach($poll_list as $no => $val)-->
<tr>
<td class="title"><a href="#" onclick="doMovePoll({$val->poll_srl},{$val->upload_target_srl});return false;">{htmlspecialchars($val->title)}</a></td>
<td class="title"><a href="<!--@if($val->document_srl)-->{getUrl('')}?document_srl={$val->document_srl}<!--@end--><!--@if($val->comment_srl)-->#comment_{$val->comment_srl}<!--@end-->" target="_blank">{htmlspecialchars($val->title)}</a></td>
<td><!--@if($val->checkcount == 1)-->{$lang->single_check}<!--@else-->{$lang->multi_check}<!--@end--></td>
<td>{$val->poll_count}</td>
<td><a href="#popup_menu_area" class="member_">{$val->nick_name}</a></td>
<td><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a></td>
<td>{zdate($val->regdate,"Y-m-d H:i")}</td>
<td>
<input type="checkbox" name="cart" value="{$val->poll_index_srl}" />