代码拉取完成,页面将自动刷新
ServicePage
{
Code:"<%
try
{
var vo = new vo();
(new response()).ContentType = \"text/plain\";
var sPostString = vo.GetPostString();
//(new log()).Infor(\"post=\"+sPostString);
//解析输入
var oNode = (new helper()).ConvertFromNode( sPostString );
var sAppName = oNode.appname;
//判断帐号
//throw (\"user=\"+oNode.user+\" pwd=\"+oNode.pwd+\" app=\"+oNode.appname);
var oUser = (new dao.table(\"t_user\")).Single(\"where isdeleted=0 and loginname=?\",oNode.user);
if( oUser == null || oUser.pwd <> (new encrypt.MD5()).Encode( oNode.pwd ) )
throw \"非法的帐号信息\";
//判断权限
var oRolePre = (new dao.table(\"t_role_predefine\")).Single(\"where role=? and userid=?\",\"$流程设计人员\",int(oUser.id));
if( null == oRolePre ) throw \"没有授权\";
//流程冲突判断
var oAppNoneShare = (new dao.table(\"t_wf_app\")).Single(\"where isdeleted=0 and name=? and shared=0 and userid <> ?\",sAppName,int(oUser.id));
if( null <> oAppNoneShare )
throw \"与他人的非共享流程同名!请改名后再上传\";
//流程所有者
var nOwnerUser = int(oUser.id);
var oAppShare = (new dao.table(\"t_wf_app\")).Single(\"where isdeleted=0 and name=? and shared=1\",sAppName);
if( null <> oAppShare ) nOwnerUser = int(oAppShare.userid);
//流程版本
var nVer=0;
{
var obj = (new dao.table(\"t_wf_app\")).Single(\"select max(ver) as v from t_wf_app where isdeleted=0 and name=?\",sAppName);
if( null <> obj ) nVer = 1 + int(obj.v);
else nVer = 1;
}
//保存新版本的流程
{
var obj=
{
\"name\" : sAppName,
\"displayname\" : oNode.displayname,
\"desc\" : oNode.desc,
\"userid\" : nOwnerUser,
\"ver\" : nVer,
\"createtime\" : (new DateTime()),
\"design\" : oNode.design,
\"module\" : oNode.modulecode
};
(new dao.table(\"t_wf_app\")).Add(obj);
}
//返回上传结果
echo(1);
}
catch(ex)
{
echo(\"上传失败,原因是:\"+ex);
}
%>"
Name:ServicePage1
PageID:FP23D436B38A734569E187D0370FD8FC07
Position
{
Height:235
Left:79
Top:65
Width:419
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。