<!--#include file="../../Inc/Cls_Main.Asp"-->
<!--#include file="../inc/Cls_Admin.Asp"-->
<!--#include file="../inc/Cls_MapPath.Asp"-->
<!--#include file="../Admin_Check.Asp"-->
<%
'=============================================================================
Dim ChannelRs, ChannelId, ChannelName, BriefName, TabName, ChannelPath, ModelId
Dim objType, TypeArrayList, SelectList
ChannelId = Easp.Get("ChannelId:n:0")
If ChannelId = 0 Then
    CmsFun.ShowJsonMsg 1, "频道参数错误!"
End If
' 读取频道信息
Set ChannelRs = Easp.db.GR(TablePrefix & "Channel:ChannelName,BriefName,TabName,ChannelPath,ModelId:1", " Id = "& ChannelId &" ", "")
If Easp.IsN(ChannelRs) Then
    CmsFun.ShowJsonMsg 1, "不存在的频道!"
Else
    ChannelName = ChannelRs("ChannelName")
    BriefName = ChannelRs("BriefName")
    TabName = ChannelRs("TabName")
    ChannelPath = ChannelRs("ChannelPath")
    ModelId = ChannelRs("ModelId")
End If
Easp.C ChannelRs
'=============================================================================
Dim Action
'=============================================================================
Action = Trim(Easp.Get("action"))
Select Case Action
    Case "updata"
        Call UpData()
End Select

Sub UpData()
    ChkChannelAdminLevel ChannelId, "edit"
    '=====================================================================
    Dim DataId, DataType, DataVal, Result
    DataId = Easp.Get("DataId:n:0")
    DataType = Trim(Easp.Get("DataType:s"))
    DataVal = Easp.Get("DataVal:n:0")
    If DataId = 0 Then
        CmsFun.ShowJsonMsg 1, "信息参数错误!"
    End If
    Result = Easp.db.UR(TabName, " Id = "& DataId &" ", Array(DataType & ":" & DataVal))
    If Result <> 0 Then
        CmsFun.ShowJsonMsg 0, "更新成功!"
    Else
        CmsFun.ShowJsonMsg 1, "更新失败!"
    End If
End Sub
%>