<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include file="JsonPost_user.gds"-->
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<%
|
'´´½¨²¿ÃÅ HttpsÇëÇó·½Ê½: POST
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
|
appUrl="https://qyapi.weixin.qq.com/cgi-bin/department/create?access_token="&access_token
|
|
method="department_update"
|
|
Origin="access_token="&access_token
|
|
departmentName = trim(Request("departmentName"))
|
parentid = trim(Request("parentid"))
|
If departmentName="" Then Response.Redirect "/AdminUser_Department.gds?h_menu1="&session("h_menu1")&"&SystemMessageType=4&SMT=3"
|
If parentid="" Then parentid="1"
|
sql="select vID from dictionary where vtitle='OA_Department' and vtext='"&departmentName&"'"
|
rs.open sql,objConn,1,1
|
If not rs.eof Then Response.Redirect "/AdminUser_Department.gds?h_menu1="&session("h_menu1")&"&SystemMessageType=4&SMT=4"
|
rs.close()
|
|
args1="{"
|
args1=args1&"""name"": """&departmentName&""","
|
args1=args1&"""parentid"": """&parentid&""""
|
args1=args1&"}"
|
|
HTMLCODE= PostBody(appUrl,args1)
|
'Response.Write HTMLCODE&"<br><br>"
|
'Response.End
|
If Mid(HTMLCODE,12,1)="0" Then
|
Response.Redirect "/weixin/department_list.gds"
|
Else
|
Response.Redirect "/AdminUser_Department.gds?h_menu1="&session("h_menu1")&"&SystemMessageType=4&SMT=2"
|
End if
|
|
|
%>
|