/* Moving replies */

$predefinedMovedTopics=array();

if( ($user_id==1 or $isMod==1) and ($action=='vthread' or $action=='movepost' or $action=='delAvatarAdmin') ) include($pathToFiles.'addon_movepost2.php');

if( ($user_id==1 or $isMod==1) and $action=='vthread'){
//display onclick topic title = topic ID
$onClickTopicTitle=" onclick=\"javascript:window.prompt('ID: ',{$topic});\"";
}

if( ($user_id==1 or $isMod==1) and $action=='vthread' and isset($enableGroupMsgDelete) and $enableGroupMsgDelete){
//display mass-move link at the bottom of the page

if(isset($is_mobile) and $is_mobile) $l_seprTmp=$brtag; else $l_seprTmp=$l_sepr;

$massMoveLink="{$l_seprTmp} <a href=\"javascript:massMove();\" class=\"mnblnk\">{$l_moveMass}</a>";

$massMoveJs=<<<out
function massMove(){
var el=document.forms['allMsgs'].elements;
var len=el.length;
var chMsNum=0;

for (var i=0;i<len;i++){
if (el[i].name.substring(0,9)=='deleteAll'){
if(el[i].checked) chMsNum++;
}
}

if(chMsNum<2) { alert ('{$l_moveCheck}'); return; }
else {

document.forms['allMsgs'].elements['action'].value='movepost';
document.forms['allMsgs'].target='_blank';
document.forms['allMsgs'].submit();

document.forms['allMsgs'].target='_self';
document.forms['allMsgs'].elements['action'].value='delmsg';

}
}
out;
}

/* --Moving replies */