diff --git a/common/css/xe.css b/common/css/xe.css
index 1c186ff08..de39e72c3 100644
--- a/common/css/xe.css
+++ b/common/css/xe.css
@@ -63,14 +63,16 @@ a img {
/* Popup Menu Area */
#popup_menu_area {
position: absolute;
+ z-index:9999;
margin: 10px 0;
- padding: 10px;
- border: 1px solid #e9e9e9;
- border-radius: 3px;
+ padding: 0;
+ border: 1px solid #eeeeee;
+ border-radius: 2px;
font-size: 12px;
- box-shadow: 0 0 6px #666;
- filter: progid: DXImageTransform.Microsoft.Shadow(color=#999999,direction=135, strength=5);
+ box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
background: #fff;
+ min-width:80px;
+ outline:none;
}
#popup_menu_area ul {
margin: 0;
@@ -80,20 +82,31 @@ a img {
#popup_menu_area li {
margin: 0;
padding: 0;
- line-height: 1.25;
+ line-height: 1.5;
}
#popup_menu_area a {
display: block;
- padding: 1px 3px;
- border-radius: 2px;
+ padding: 5px;
text-decoration: none;
- color: #333;
+ color: #212121;
}
#popup_menu_area a:hover,
#popup_menu_area a:active,
#popup_menu_area a:focus {
- color: #fff;
- background: #666;
+ background: #eeeeee;
+}
+@media screen and (max-width: 400px) {
+ #popup_menu_area {
+ min-width:120px;
+ max-width:95%;
+ font-size: 13px;
+ }
+ #popup_menu_area a {
+ display: block;
+ padding: 10px;
+ text-decoration: none;
+ color: #212121;
+ }
}
/* Message */
diff --git a/common/js/common.js b/common/js/common.js
index ef829e480..29164bc60 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -945,7 +945,7 @@ jQuery(function($){
// display popup menu that contains member actions and document actions
$(document).on('click', function(evt) {
var $area = $('#popup_menu_area');
- if(!$area.length) $area = $('
').appendTo(document.body);
+ if(!$area.length) $area = $('').appendTo(document.body);
// 이전에 호출되었을지 모르는 팝업메뉴 숨김
$area.hide();
diff --git a/modules/comment/comment.admin.view.php b/modules/comment/comment.admin.view.php
index 3cb165997..0ea4d7bb3 100644
--- a/modules/comment/comment.admin.view.php
+++ b/modules/comment/comment.admin.view.php
@@ -140,6 +140,50 @@ class commentAdminView extends comment
$this->setTemplateFile('declared_list');
}
+ /**
+ * Display a reported comment and log of reporting
+ * @return void
+ */
+ function dispCommentAdminDeclaredLogByCommentSrl()
+ {
+ // option for a list
+ $args = new stdClass;
+ $args->page = Context::get('page'); // /< Page
+ $args->list_count = 30; // /< the number of posts to display on a single page
+ $args->page_count = 10; // /< the number of pages that appear in the page navigation
+ $args->comment_srl = intval(Context::get('target_srl'));
+
+
+ // get Status name list
+ $oCommentModel = getModel('comment');
+ $oMemberModel = getModel('member');
+ $oComment = $oCommentModel->getComment($args->comment_srl);
+
+ $declared_output = executeQuery('comment.getDeclaredLogByCommentSrl', $args);
+ if($declared_output->data && count($declared_output->data))
+ {
+ $reporter_list = array();
+
+ foreach($declared_output->data as $key => $log)
+ {
+ $reporter_list[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
+ }
+ }
+
+ // Set values of document_model::getDocumentList() objects for a template
+ Context::set('total_count', $declared_output->total_count);
+ Context::set('total_page', $declared_output->total_page);
+ Context::set('page', $declared_output->page);
+ Context::set('declare_log', $declared_output->data);
+ Context::set('reporter_list', $reporter_list);
+ Context::set('declared_comment', $oComment);
+ Context::set('page_navigation', $declared_output->page_navigation);
+
+ // Set the template
+ $this->setLayoutFile('popup_layout');
+ $this->setTemplatePath($this->module_path.'tpl');
+ $this->setTemplateFile('declared_log');
+ }
}
/* End of file comment.admin.view.php */
/* Location: ./modules/comment/comment.admin.view.php */
diff --git a/modules/comment/comment.class.php b/modules/comment/comment.class.php
index 808130b15..494512bd8 100644
--- a/modules/comment/comment.class.php
+++ b/modules/comment/comment.class.php
@@ -101,6 +101,12 @@ class comment extends ModuleObject
return TRUE;
}
+ // 2016. 1. 29: Add a column(declare_message) for report
+ if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
+ {
+ return true;
+ }
+
return FALSE;
}
@@ -175,6 +181,12 @@ class comment extends ModuleObject
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after');
}
+ // 2016. 1. 29: Add a column(declare_message) for report
+ if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
+ {
+ $oDB->addColumn('comment_declared_log',"declare_message","text");
+ }
+
return new Object(0, 'success_updated');
}
diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php
index 314e75330..5ba090ca2 100644
--- a/modules/comment/comment.controller.php
+++ b/modules/comment/comment.controller.php
@@ -205,7 +205,19 @@ class commentController extends comment
return new Object(-1, 'msg_invalid_request');
}
- return $this->declaredComment($comment_srl);
+ // if an user select message from options, message would be the option.
+ $message_option = strval(Context::get('message_option'));
+ $improper_comment_reasons = Context::getLang('improper_comment_reasons');
+ $declare_message = ($message_option !== 'others' && isset($improper_comment_reasons[$message_option]))?
+ $improper_comment_reasons[$message_option] : trim(Context::get('declare_message'));
+
+ // if there is return url, set that.
+ if(Context::get('success_return_url'))
+ {
+ $this->setRedirectUrl(Context::get('success_return_url'));
+ }
+
+ return $this->declaredComment($comment_srl, $declare_message);
}
/**
@@ -1313,9 +1325,10 @@ class commentController extends comment
/**
* Report a blamed comment
* @param $comment_srl
+ * @param string $declare_message
* @return void
*/
- function declaredComment($comment_srl)
+ function declaredComment($comment_srl, $declare_message)
{
// Fail if session information already has a reported document
if($_SESSION['declared_comment'][$comment_srl])
@@ -1331,6 +1344,7 @@ class commentController extends comment
{
return $output;
}
+
$declared_count = ($output->data->declared_count) ? $output->data->declared_count : 0;
$trigger_obj = new stdClass();
@@ -1379,7 +1393,9 @@ class commentController extends comment
{
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
}
+
$args->comment_srl = $comment_srl;
+ $args->declare_message = trim(htmlspecialchars($declare_message));
$log_output = executeQuery('comment.getCommentDeclaredLogInfo', $args);
// session registered if log info contains report log.
@@ -1411,6 +1427,13 @@ class commentController extends comment
// leave the log
$output = executeQuery('comment.insertCommentDeclaredLog', $args);
+ if(!$output->toBool())
+ {
+ $oDB->rollback();
+ return $output;
+ }
+
+ $this->add('declared_count', $declared_count + 1);
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
@@ -1421,6 +1444,7 @@ class commentController extends comment
return $trigger_output;
}
+ // commit
$oDB->commit();
// leave into the session information
diff --git a/modules/comment/comment.model.php b/modules/comment/comment.model.php
index 01a483738..09ca6be0f 100644
--- a/modules/comment/comment.model.php
+++ b/modules/comment/comment.model.php
@@ -69,8 +69,8 @@ class commentModel extends comment
}
// Add the report feature against abused posts
- $url = sprintf("doCallModuleAction('comment','procCommentDeclare','%s')", $comment_srl);
- $oCommentController->addCommentPopupMenu($url, 'cmd_declare', '', 'javascript');
+ $url = getUrl('', 'act', 'dispCommentDeclare', 'target_srl', $comment_srl);
+ $oCommentController->addCommentPopupMenu($url, 'cmd_declare', '', 'popup');
}
// call a trigger (after)
diff --git a/modules/comment/comment.view.php b/modules/comment/comment.view.php
index 0e2cb92aa..5f59da78f 100644
--- a/modules/comment/comment.view.php
+++ b/modules/comment/comment.view.php
@@ -60,6 +60,44 @@ class commentView extends comment
return new Object();
}
+ /**
+ * Report an improper comment
+ * @return void
+ */
+ function dispCommentDeclare()
+ {
+ $this->setLayoutFile('popup_layout');
+ $comment_srl = Context::get('target_srl');
+
+ $oMemberModel = getModel('member');
+ // A message appears if the user is not logged-in
+ if(!$oMemberModel->isLogged())
+ {
+ return $this->stop('msg_not_logged');
+ }
+
+ // Create the comment object.
+ $oCommentModel = getModel('comment');
+ // Creates an object for displaying the selected comment
+ $oComment = $oCommentModel->getComment($comment_srl);
+ if(!$oComment->isExists())
+ {
+ return new Object(-1,'msg_invalid_request');
+ }
+ // Check permissions
+ if(!$oComment->isAccessible())
+ {
+ return new Object(-1,'msg_not_permitted');
+ }
+
+ // Browser title settings
+ Context::set('target_comment', $oComment);
+
+ Context::set('target_srl', $comment_srl);
+
+ $this->setTemplatePath($this->module_path.'tpl');
+ $this->setTemplateFile('declare_comment');
+ }
}
/* End of file comment.view.php */
/* Location: ./modules/comment/comment.view.php */
diff --git a/modules/comment/conf/module.xml b/modules/comment/conf/module.xml
index d13854c26..9ea9f287c 100644
--- a/modules/comment/conf/module.xml
+++ b/modules/comment/conf/module.xml
@@ -1,4 +1,4 @@
-
+
@@ -8,17 +8,25 @@
+
+
+
+
+
+
+
+
diff --git a/modules/comment/lang/lang.xml b/modules/comment/lang/lang.xml
index ed45f3151..6fe6ea89d 100644
--- a/modules/comment/lang/lang.xml
+++ b/modules/comment/lang/lang.xml
@@ -324,4 +324,54 @@
-
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
-
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/modules/comment/queries/getDeclaredLogByCommentSrl.xml b/modules/comment/queries/getDeclaredLogByCommentSrl.xml
new file mode 100644
index 000000000..ae8a13bb3
--- /dev/null
+++ b/modules/comment/queries/getDeclaredLogByCommentSrl.xml
@@ -0,0 +1,17 @@
+
diff --git a/modules/comment/queries/insertCommentDeclaredLog.xml b/modules/comment/queries/insertCommentDeclaredLog.xml
index 07510dd0c..f2ceba3c7 100644
--- a/modules/comment/queries/insertCommentDeclaredLog.xml
+++ b/modules/comment/queries/insertCommentDeclaredLog.xml
@@ -1,11 +1,12 @@
diff --git a/modules/comment/ruleset/insertDeclare.xml b/modules/comment/ruleset/insertDeclare.xml
new file mode 100644
index 000000000..f9a57eddf
--- /dev/null
+++ b/modules/comment/ruleset/insertDeclare.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/comment/schemas/comment_declared_log.xml b/modules/comment/schemas/comment_declared_log.xml
index bf1f4a7d7..2d9df72a5 100644
--- a/modules/comment/schemas/comment_declared_log.xml
+++ b/modules/comment/schemas/comment_declared_log.xml
@@ -1,6 +1,7 @@
diff --git a/modules/comment/tpl/css/declare_comment.css b/modules/comment/tpl/css/declare_comment.css
new file mode 100644
index 000000000..5e6e52041
--- /dev/null
+++ b/modules/comment/tpl/css/declare_comment.css
@@ -0,0 +1,19 @@
+@charset "UTF-8";
+div.xe_mobile {
+ display:none!important;
+}
+section.declare_comment{
+ display:block;
+}
+section.declare_comment label{
+ font-weight: bold;
+}
+section.declare_comment select,section.declare_comment textarea{
+ box-sizing:border-box;
+ height:auto;
+ width: 100%;
+ padding:7px;
+ font-size: 11pt;
+ line-height: normal;
+ display:block;
+}
\ No newline at end of file
diff --git a/modules/comment/tpl/declare_comment.html b/modules/comment/tpl/declare_comment.html
new file mode 100644
index 000000000..a7eb9ff62
--- /dev/null
+++ b/modules/comment/tpl/declare_comment.html
@@ -0,0 +1,56 @@
+{@Context::addMetaTag('viewport', 'width=device-width, user-scalable=no', FALSE);}
+
+
+
+
\ No newline at end of file
diff --git a/modules/comment/tpl/declared_list.html b/modules/comment/tpl/declared_list.html
index 34aa58508..14a3a0b2f 100644
--- a/modules/comment/tpl/declared_list.html
+++ b/modules/comment/tpl/declared_list.html
@@ -45,7 +45,7 @@
{$oComment->getSummary(100)}
{$oComment->getRegdate("Y-m-d")}
- {$oComment->get('declared_count')}
+ {$oComment->get('declared_count')} ({$lang->improper_comment_declare_reason} )
{$oComment->get('ipaddress')}
diff --git a/modules/comment/tpl/declared_log.html b/modules/comment/tpl/declared_log.html
new file mode 100644
index 000000000..b5cfa6257
--- /dev/null
+++ b/modules/comment/tpl/declared_log.html
@@ -0,0 +1,71 @@
+{$lang->improper_comment_declare}
+
+
{$XE_VALIDATOR_MESSAGE}
+
+
+
+
diff --git a/modules/document/conf/module.xml b/modules/document/conf/module.xml
index 1ec724c13..66607d25c 100644
--- a/modules/document/conf/module.xml
+++ b/modules/document/conf/module.xml
@@ -1,71 +1,73 @@
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
- .
-
-
-
-
-
-
+
+ .
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Document
@@ -81,4 +83,4 @@
Document
-
+
\ No newline at end of file
diff --git a/modules/document/document.admin.view.php b/modules/document/document.admin.view.php
index b0ab9df3d..5351aed4c 100644
--- a/modules/document/document.admin.view.php
+++ b/modules/document/document.admin.view.php
@@ -161,6 +161,51 @@ class documentAdminView extends document
$this->setTemplateFile('declared_list');
}
+ /**
+ * Display a reported post and log of reporting
+ * @return void
+ */
+ function dispDocumentAdminDeclaredLogByDocumentSrl()
+ {
+ // option for a list
+ $args = new stdClass;
+ $args->page = Context::get('page'); // /< Page
+ $args->list_count = 30; // /< the number of posts to display on a single page
+ $args->page_count = 10; // /< the number of pages that appear in the page navigation
+ $args->document_srl = intval(Context::get('target_srl'));
+
+
+ // get Status name list
+ $oDocumentModel = getModel('document');
+ $oMemberModel = getModel('member');
+ $oDocument = $oDocumentModel->getDocument($args->document_srl);
+
+ $declared_output = executeQuery('document.getDeclaredLogByDocumentSrl', $args);
+ if($declared_output->data && count($declared_output->data))
+ {
+ $reporter_list = array();
+
+ foreach($declared_output->data as $key => $log)
+ {
+ $reporter_list[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
+ }
+ }
+
+ // Set values of document_model::getDocumentList() objects for a template
+ Context::set('total_count', $declared_output->total_count);
+ Context::set('total_page', $declared_output->total_page);
+ Context::set('page', $declared_output->page);
+ Context::set('declare_log', $declared_output->data);
+ Context::set('reporter_list', $reporter_list);
+ Context::set('declared_document', $oDocument);
+ Context::set('page_navigation', $declared_output->page_navigation);
+
+ // Set the template
+ $this->setLayoutFile('popup_layout');
+ $this->setTemplatePath($this->module_path.'tpl');
+ $this->setTemplateFile('declared_log');
+ }
+
/**
* Display a alias list on the admin page
* @return void
diff --git a/modules/document/document.class.php b/modules/document/document.class.php
index 1eba9935e..278f540f4 100644
--- a/modules/document/document.class.php
+++ b/modules/document/document.class.php
@@ -124,6 +124,9 @@ class document extends ModuleObject
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after')) return true;
+ // 2016. 1. 27: Add a column(declare_message) for report
+ if(!$oDB->isColumnExists("document_declared_log","declare_message")) return true;
+
return false;
}
@@ -320,6 +323,12 @@ class document extends ModuleObject
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after');
}
+ // 2016. 1. 27: Add a column(declare_message) for report
+ if(!$oDB->isColumnExists("document_declared_log","declare_message"))
+ {
+ $oDB->addColumn('document_declared_log',"declare_message","text");
+ }
+
return new Object(0,'success_updated');
}
diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php
index 9a5bd1b40..d9015be44 100644
--- a/modules/document/document.controller.php
+++ b/modules/document/document.controller.php
@@ -192,12 +192,30 @@ class documentController extends document
*/
function procDocumentDeclare()
{
- if(!Context::get('is_logged')) return new Object(-1, 'msg_invalid_request');
+ if(!Context::get('is_logged'))
+ {
+ return new Object(-1, 'msg_not_logged');
+ }
- $document_srl = Context::get('target_srl');
- if(!$document_srl) return new Object(-1, 'msg_invalid_request');
+ $document_srl = intval(Context::get('target_srl'));
+ if(!$document_srl)
+ {
+ return new Object(-1, 'msg_invalid_request');
+ }
- return $this->declaredDocument($document_srl);
+ // if an user select message from options, message would be the option.
+ $message_option = strval(Context::get('message_option'));
+ $improper_document_reasons = Context::getLang('improper_document_reasons');
+ $declare_message = ($message_option !== 'others' && isset($improper_document_reasons[$message_option]))?
+ $improper_document_reasons[$message_option] : trim(Context::get('declare_message'));
+
+ // if there is return url, set that.
+ if(Context::get('success_return_url'))
+ {
+ $this->setRedirectUrl(Context::get('success_return_url'));
+ }
+
+ return $this->declaredDocument($document_srl, $declare_message);
}
/**
@@ -1359,18 +1377,25 @@ class documentController extends document
/**
* Report posts
* @param int $document_srl
+ * @param string $declare_message
* @return void|Object
*/
- function declaredDocument($document_srl)
+ function declaredDocument($document_srl, $declare_message = '')
{
// Fail if session information already has a reported document
- if($_SESSION['declared_document'][$document_srl]) return new Object(-1, 'failed_declared');
+ if($_SESSION['declared_document'][$document_srl])
+ {
+ return new Object(-1, 'failed_declared');
+ }
// Check if previously reported
$args = new stdClass();
$args->document_srl = $document_srl;
$output = executeQuery('document.getDeclaredDocument', $args);
- if(!$output->toBool()) return $output;
+ if(!$output->toBool())
+ {
+ return $output;
+ }
$declared_count = ($output->data->declared_count) ? $output->data->declared_count : 0;
@@ -1390,7 +1415,8 @@ class documentController extends document
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
// Pass if the author's IP address is as same as visitor's.
- if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR']) {
+ if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'])
+ {
$_SESSION['declared_document'][$document_srl] = true;
return new Object(-1, 'failed_declared');
}
@@ -1421,6 +1447,7 @@ class documentController extends document
}
$args->document_srl = $document_srl;
+ $args->declare_message = trim(htmlspecialchars($declare_message));
$output = executeQuery('document.getDocumentDeclaredLogInfo', $args);
// Pass after registering a sesson if reported/declared documents are in the logs.
@@ -1435,9 +1462,21 @@ class documentController extends document
$oDB->begin();
// Add the declared document
- if($declared_count > 0) $output = executeQuery('document.updateDeclaredDocument', $args);
- else $output = executeQuery('document.insertDeclaredDocument', $args);
- if(!$output->toBool()) return $output;
+ if($declared_count > 0)
+ {
+ $output = executeQuery('document.updateDeclaredDocument', $args);
+ }
+ else
+ {
+ $output = executeQuery('document.insertDeclaredDocument', $args);
+ }
+
+ if(!$output->toBool())
+ {
+ $oDB->rollback();
+ return $output;
+ }
+
// Leave logs
$output = executeQuery('document.insertDocumentDeclaredLog', $args);
if(!$output->toBool())
@@ -1446,7 +1485,7 @@ class documentController extends document
return $output;
}
- $this->add('declared_count', $declared_count+1);
+ $this->add('declared_count', $declared_count + 1);
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
diff --git a/modules/document/document.model.php b/modules/document/document.model.php
index 7167623a4..c353a33a4 100644
--- a/modules/document/document.model.php
+++ b/modules/document/document.model.php
@@ -514,8 +514,8 @@ class documentModel extends document
}
// Adding Report
- $url = sprintf("doCallModuleAction('document','procDocumentDeclare','%s')", $document_srl);
- $oDocumentController->addDocumentPopupMenu($url,'cmd_declare','','javascript');
+ $url = getUrl('', 'act', 'dispDocumentDeclare', 'target_srl', $document_srl);
+ $oDocumentController->addDocumentPopupMenu($url,'cmd_declare','','popup');
// Add Bookmark button
$url = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl);
diff --git a/modules/document/document.view.php b/modules/document/document.view.php
index b922d8778..f7a0e447b 100644
--- a/modules/document/document.view.php
+++ b/modules/document/document.view.php
@@ -175,6 +175,44 @@ class documentView extends document
$this->setTemplateFile('saved_list_popup');
}
+ /**
+ * Report an improper post
+ * @return void
+ */
+ function dispDocumentDeclare()
+ {
+ $this->setLayoutFile('popup_layout');
+ $document_srl = Context::get('target_srl');
+
+ $oMemberModel = getModel('member');
+ // A message appears if the user is not logged-in
+ if(!$oMemberModel->isLogged())
+ {
+ return $this->stop('msg_not_logged');
+ }
+
+ // Create the document object. If the document module of basic data structures, write it all works .. -_-;
+ $oDocumentModel = getModel('document');
+ // Creates an object for displaying the selected document
+ $oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager, FALSE);
+ if(!$oDocument->isExists())
+ {
+ return new Object(-1,'msg_invalid_request');
+ }
+ // Check permissions
+ if(!$oDocument->isAccessible())
+ {
+ return new Object(-1,'msg_not_permitted');
+ }
+
+ // Browser title settings
+ Context::set('target_document', $oDocument);
+
+ Context::set('target_srl', $document_srl);
+
+ $this->setTemplatePath($this->module_path.'tpl');
+ $this->setTemplateFile('declare_document');
+ }
}
/* End of file document.view.php */
/* Location: ./modules/document/document.view.php */
diff --git a/modules/document/lang/lang.xml b/modules/document/lang/lang.xml
index 0a2d5f3b5..0bb0d2924 100644
--- a/modules/document/lang/lang.xml
+++ b/modules/document/lang/lang.xml
@@ -965,4 +965,54 @@
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
-
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+ -
+
+
+
diff --git a/modules/document/queries/getDeclaredLogByDocumentSrl.xml b/modules/document/queries/getDeclaredLogByDocumentSrl.xml
new file mode 100644
index 000000000..b30790912
--- /dev/null
+++ b/modules/document/queries/getDeclaredLogByDocumentSrl.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/document/queries/insertDocumentDeclaredLog.xml b/modules/document/queries/insertDocumentDeclaredLog.xml
index 81e9dd6d8..9fbe756c8 100644
--- a/modules/document/queries/insertDocumentDeclaredLog.xml
+++ b/modules/document/queries/insertDocumentDeclaredLog.xml
@@ -1,11 +1,12 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/document/queries/updateDeclaredDocument.xml b/modules/document/queries/updateDeclaredDocument.xml
index b06e9d8b5..736ec6a54 100644
--- a/modules/document/queries/updateDeclaredDocument.xml
+++ b/modules/document/queries/updateDeclaredDocument.xml
@@ -1,11 +1,11 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/modules/document/ruleset/insertDeclare.xml b/modules/document/ruleset/insertDeclare.xml
new file mode 100644
index 000000000..f9a57eddf
--- /dev/null
+++ b/modules/document/ruleset/insertDeclare.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/document/schemas/document_declared.xml b/modules/document/schemas/document_declared.xml
index e2892b7c6..a180aa7e2 100644
--- a/modules/document/schemas/document_declared.xml
+++ b/modules/document/schemas/document_declared.xml
@@ -1,4 +1,4 @@
diff --git a/modules/document/schemas/document_declared_log.xml b/modules/document/schemas/document_declared_log.xml
index 046f6d3b3..80af4c993 100644
--- a/modules/document/schemas/document_declared_log.xml
+++ b/modules/document/schemas/document_declared_log.xml
@@ -1,6 +1,7 @@
diff --git a/modules/document/tpl/css/declare_document.css b/modules/document/tpl/css/declare_document.css
new file mode 100644
index 000000000..304f73094
--- /dev/null
+++ b/modules/document/tpl/css/declare_document.css
@@ -0,0 +1,19 @@
+@charset "UTF-8";
+div.xe_mobile {
+ display:none!important;
+}
+section.declare_document{
+ display:block;
+}
+section.declare_document label{
+ font-weight: bold;
+}
+section.declare_document select,section.declare_document textarea{
+ box-sizing:border-box;
+ height:auto;
+ width: 100%;
+ padding:7px;
+ font-size: 11pt;
+ line-height: normal;
+ display:block;
+}
\ No newline at end of file
diff --git a/modules/document/tpl/declare_document.html b/modules/document/tpl/declare_document.html
new file mode 100644
index 000000000..0f887de53
--- /dev/null
+++ b/modules/document/tpl/declare_document.html
@@ -0,0 +1,56 @@
+{@Context::addMetaTag('viewport', 'width=device-width, user-scalable=no', FALSE);}
+
+
+
+ {$lang->improper_document_declare}
+
+
+
\ No newline at end of file
diff --git a/modules/document/tpl/declared_list.html b/modules/document/tpl/declared_list.html
index 6822a12f3..239e16dcb 100644
--- a/modules/document/tpl/declared_list.html
+++ b/modules/document/tpl/declared_list.html
@@ -46,7 +46,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
{$oDocument->getTitle()}
{$oDocument->getNickName()}
- {$oDocument->get('declared_count')}
+ {$oDocument->get('declared_count')} ({$lang->improper_document_declare_reason} )
{$oDocument->get('readed_count')}
{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}
{$oDocument->getRegdate("Y-m-d H:i")}
diff --git a/modules/document/tpl/declared_log.html b/modules/document/tpl/declared_log.html
new file mode 100644
index 000000000..2a99dd848
--- /dev/null
+++ b/modules/document/tpl/declared_log.html
@@ -0,0 +1,71 @@
+{$lang->improper_document_declare}
+
+
{$XE_VALIDATOR_MESSAGE}
+
+
+
+
+
+
+
+ {$lang->improper_document_declare_reason}
+
+
+
+ {$lang->declaring_user}
+ {$lang->improper_document_declare_reason}
+ {$lang->date}
+
+
+
+
+ {$reporter_list[$log->member_srl]->nick_name} ({$log->ipaddress})
+ {$log->declare_message}
+ {date('Y-m-d H:i:s', strtotime($log->regdate))}
+
+
+
+
+
+
diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml
index 1c541ec03..4d9aff4b2 100644
--- a/modules/member/lang/lang.xml
+++ b/modules/member/lang/lang.xml
@@ -2665,6 +2665,14 @@
+ -
+
+
+
+ -
+
+
+
-
diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php
index b6a89a27e..c844f636d 100644
--- a/modules/member/member.admin.controller.php
+++ b/modules/member/member.admin.controller.php
@@ -24,12 +24,12 @@ class memberAdminController extends member
// if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request");
// Extract the necessary information in advance
$logged_info = Context::get('logged_info');
- if($logged_info->is_admin != 'Y' || !checkCSRF())
+ if($logged_info->is_admin !== 'Y' || !checkCSRF())
{
return new Object(-1, 'msg_invalid_request');
}
- $args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date');
+ $args = new stdClass;
$oMemberModel = &getModel ('member');
$config = $oMemberModel->getMemberConfig ();
$getVars = array();
@@ -47,7 +47,7 @@ class memberAdminController extends member
{
$args->{$val} = Context::get($val);
}
- $args->member_srl = Context::get('member_srl');
+ $args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
if(Context::get('reset_password'))
$args->password = Context::get('reset_password');
else unset($args->password);
diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php
index dead10f27..e2f1e2de7 100644
--- a/modules/member/member.controller.php
+++ b/modules/member/member.controller.php
@@ -1751,7 +1751,7 @@ class memberController extends member
$redirectUrl = getUrl('', 'act', 'dispMemberResendAuthMail');
return $this->setRedirectUrl($redirectUrl, new Object(-1,'msg_user_not_confirmed'));
}
- return new Object(-1,'msg_user_denied');
+ return new Object(-1, ($this->memberInfo->refused_reason)? Context::getLang('msg_user_denied') . "\n" . $this->memberInfo->refused_reason : 'msg_user_denied');
}
// Notify if denied_date is less than the current time
if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) return new Object(-9,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d")));
diff --git a/modules/member/tpl/insert_member.html b/modules/member/tpl/insert_member.html
index 37f31505a..e8f5245ed 100644
--- a/modules/member/tpl/insert_member.html
+++ b/modules/member/tpl/insert_member.html
@@ -77,6 +77,13 @@
denied == 'Y'" > {$lang->denied}
+
+
{$lang->refused_reason}
+
+ {$member_info->refused_reason}
+ {$lang->about_refused_reason}
+
+
{$lang->limit_date}
@@ -116,16 +123,32 @@
{$lang->improper_comment_declare}
+ +