pixmicat

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/ @ 887  →  / @ 888
/release/Modules-PIO-v6/mod_threadlist/mod_threadlist.php
@@ -26,7 +26,7 @@
 
/* Get the module version infomation */
function getModuleVersionInfo(){
return '5th.Release.2 (v110125)';
return '5th.Release.3 (v130717)';
}
 
function autoHookRegistBeforeCommit(&$name, &$email, &$sub, &$com, &$category, &$age, $dest, $isReply, $imgWH, &$status){
@@ -122,7 +122,7 @@
$post = $PIO->fetchPosts($plist); // 取出資料
$post_count = count($post);
 
if(strpos($sort, 'post') !== false) { // 要重排次序
if($sort=='date' || strpos($sort, 'post') !== false) { // 要重排次序
$mypost = array();
foreach($plist as $p) {
@@ -139,10 +139,22 @@
}
 
head($dat);
$dat .= '<script>
var selectall = "";
function checkall(){
selectall = selectall ? "" : "checked";
var inputs = document.getElementsByTagName("input");
for(x=0; x < inputs.length; x++){
if(inputs[x].type == "checkbox" && parseInt(inputs[x].name)) {
inputs[x].checked = selectall;
}
}
}
</script>';
$dat .= '<div id="contents">
[<a href="'.PHP_SELF2.'?'.time().'">回到版面</a>]
<div class="bar_reply">列表模式</div>'.($this->SHOW_FORM ? '<form action="'.PHP_SELF.'" method="post">' : '').'<table align="center" width="98%"><tr>
'.($this->SHOW_FORM ? '<th></th>' : '').'
'.($this->SHOW_FORM ? '<th><a href="javascript:checkall()">↓</a></th>' : '').'
<th><a href="'.$thisPage.'&amp;sort=no">No.'.($sort == 'no' ? ' ▼' : '').'</a></th>
<th width="48%">標題</th>
<th>發文者</th>
@@ -180,10 +192,21 @@
</tr></table>
</div>';
if($this->SHOW_FORM) {
$adminMode = adminAuthenticate('check'); // 前端管理模式
$adminFunc = ''; // 前端管理選擇
if($adminMode){
$adminFunc = '<select name="func"><option value="delete">'._T('admin_delete').'</option>';
$funclist = array();
$dummy = '';
$PMS->useModuleMethods('AdminFunction', array('add', &$funclist, null, &$dummy)); // "AdminFunction" Hook Point
foreach($funclist as $f) $adminFunc .= '<option value="'.$f[0].'">'.$f[1].'</option>'."\n";
$adminFunc .= '</select>';
}
 
$pte_vals = array('{$DEL_HEAD_TEXT}' => '<input type="hidden" name="mode" value="usrdel" />'._T('del_head'),
'{$DEL_IMG_ONLY_FIELD}' => '<input type="checkbox" name="onlyimgdel" id="onlyimgdel" value="on" />',
'{$DEL_IMG_ONLY_TEXT}' => _T('del_img_only'),
'{$DEL_PASS_TEXT}' => _T('del_pass'),
'{$DEL_PASS_TEXT}' => ($adminMode ? $adminFunc : '')._T('del_pass'),
'{$DEL_PASS_FIELD}' => '<input type="password" name="pwd" size="8" value="" />',
'{$DEL_SUBMIT_BTN}' => '<input type="submit" value="'._T('del_btn').'" />');
$dat .= $PTE->ParseBlock('DELFORM', $pte_vals).'</form>';