- } elseif($action == 'forumlinks') {
- if(!submitcheck('forumlinksubmit')) {
- $forumlinks = '';
- $query = $db->query("SELECT * FROM $table_forumlinks ORDER BY displayorder");
- while($forumlink = $db->fetch_array($query)) {
- $forumlinks .= "<tr bgcolor="".ALTBG2."" align="center">\n".
- "<td bgcolor="".ALTBG1.""><input type="checkbox" name="delete[]" value="$forumlink[id]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="3" name="displayorder[$forumlink[id]]" value="$forumlink[displayorder]"></td>\n".
- "<td bgcolor="".ALTBG1.""><input type="text" size="15" name="name[$forumlink[id]]" value="$forumlink[name]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="15" name="url[$forumlink[id]]" value="$forumlink[url]"></td>\n".
- "<td bgcolor="".ALTBG1.""><input type="text" size="15" name="note[$forumlink[id]]" value="$forumlink[note]"></td>\n".
- "<td bgcolor="".ALTBG2.""><input type="text" size="15" name="logo[$forumlink[id]]" value="$forumlink[logo]"></td></tr>\n";
- }
- include CP_TPL.'misc_forumlink.php';
- } else {
- if($ids = implode_ids( $delete )) {
- $db->query("DELETE FROM $table_forumlinks WHERE id IN ($ids)");
- }
- if(is_array($name)) {
- foreach($name as $id => $val) {
- $db->query("UPDATE $table_forumlinks SET displayorder='$displayorder[$id]', name='$name[$id]', url='$url[$id]', note='$note[$id]', logo='$logo[$id]' WHERE id='$id'");
- }
- }
- if($newname != '') {
- $db->query("INSERT INTO $table_forumlinks (displayorder, name, url, note, logo) VALUES ('$newdisplayorder', '$newname', '$newurl', '$newnote', '$newlogo')");
- }
- updatecache('forumlinks');
- cpmsg('forumlinks_succeed', 'admincp.php?action=forumlinks');
- }
复制代码
这个联盟论坛的后台编辑。
能不能整个论坛广告 |