function article_operation($sql, $s_msg = "操作成功", $f_msg = "操作失败", $type = 0)
{
    global $db;
    global $cfg;
    $tbl_columns = $cfg['tbl_columns'];
    $tbl_article = $cfg['tbl_article'];
    $cause = " ( 0";
    $article_ids = explode(',', $_GET['article_id']);
    foreach ($article_ids as $id) {
        $id = intval($id);
        $cause = $cause . " or id = " . $id;
    }
    $cause = $cause . ")";
    if (!$type) {
        $sql = "update {$tbl_article} set " . $sql . " where {$cause}";
    } else {
        $sql = $sql . " where {$cause}";
    }
    if ($db->Execute($sql)) {
        $db->CommitTrans();
        alert($s_msg);
    } else {
        $db->RollbackTrans();
        alert($f_msg);
    }
    reload_frame('mainFrame');
}
                    alert("没有任何改动");
                    frame_redirection("mainFrame", "control.php?act=user_manage&cmd=list");
                    exit;
                }
                if ($db->Execute($sql)) {
                    alert("用户添加成功!");
                    frame_redirection("mainFrame", "control.php?act=user_manage&cmd=list");
                } else {
                    alert("用户添加失败!");
                }
            }
        } else {
            if ($cmd == "delete") {
                $cause = " ( 0";
                $user_ids = explode(',', $_GET['uid']);
                foreach ($user_ids as $id) {
                    $id = intval($id);
                    $cause = $cause . " or id = " . $id;
                }
                $cause = $cause . ")";
                $sql = "delete from {$tbl_user} where {$cause}";
                if ($db->Execute($sql)) {
                    alert("用户删除成功");
                } else {
                    alert("用户删除失败");
                }
                reload_frame('mainFrame');
            }
        }
    }
}