发布于 2008-07-15 15:53:49
0楼
#pragma code("useadmin.dll");
#include "PWRT_API.H";
#pragma code();
#pragma code("USEGEN.dll");
#include "USEGENAP.H";
#pragma code();
LPCMN_ERROR err;
if (PWRTSilentLogin(GetTagChar("username"), GetTagChar("password")))
{
OpenPicture("1.pdl");
SetTagChar("username","");// 清空
SetTagChar("username","");
//以下只是检查用户类型,以便在窗口中显示当前的用户类型而已,如不需要可以删除
if (PWGENConnect("CC_Server_08_04_09_09_10_28",err)) //建立与数据库的联接, 验证用户类型
{
if(PWGENCheckPermission( GetTagChar("username"),1,err))
{
SetTagChar("用户类型","管理员");
}
else if(PWGENCheckPermission( GetTagChar("username"),3,err))
SetTagChar("用户类型","操作员");
else
SetTagChar("用户类型","");
}
PWGENDisconnect(err);//断开连接
}
else
{
SetText("启动界面.pdl","静态文本2","用户名或密码错误!");
SetVisible("启动界面.pdl","组4",1);
SetTagChar("password","");
}
纯属巧合