0

我有包含以下代码的文件 forum.php:

$tpc = $db->query("SELECT * FROM ".$pre."FORUMS 
WHERE FORUM_HIDDEN='0' AND FORUM_LEVEL='0' ORDER BY FORUM_ORDER");
$ntopics = $db->CNrows();
while($rs = $db->record()){
    $forumt[] = $rs;
}
$tmp->assign('forumt',$forumt);

我有这个聪明的文件 forum.tpl 和这个代码:

1-

<input type="checkbox" name="tpcs[]" id="tpcs" value="{$topic[topic].ID}" />

2-

<form action="tr_action.php?action=tmove" method="POST">
  <select name="movet">
  {section name=forumt loop=$forumt}
  <option value="{$forumt[forumt].ID}">
  {$forumt[forumt].FORUM_NAME} -- {$forumt[forumt].ID}</option>
  {/section}
  </select>
  <input class="button" type="submit" value="move topics to :" />
</form>

这是 tr_action.php 文件:

if($action == 'tmove') {
    $tpcs = $_POST['tpcs'];
    $f_to = intval($_POST['movet']);
    $topicsid = implode(", ",$tpcs);
    if(!$f_to) {
        $err = 'you must choose an forum';
        $tmp->assign('msg','false');
    } else {
        if(count($tpcs) > 0) {
            $db->query("UPDATE ".$pre."TOPICS SET F_ID='".$ftid."' WHERE ID IN (".$topicsid.")");
            $err = 'moved successfuly..';
            $tmp->assign('msg','true');
            $redirect = '<meta http-equiv="refresh" content="1; url='.$_SERVER['HTTP_REFERER'].'" />';
        } else {
            $err = 'you must choose an topic';
            $tmp->assign('msg','false');
        }
    }
}

但是当我测试这段代码时,我得到了这个错误:

警告:implode() [function.implode]:第 293 行 C:\xampp\htdocs\mf2\tr_action.php 中传递的参数无效

4

0 回答 0