Universal Rights Management tool, all the ADO (including ODBC) supported databases, whatever programming, Vc/bcb/vb/pb/delphi

Source: Internet
Author: User
Tags date empty integer log odbc time limit valid
ado|odbc| Programming | data | database
Here is a section of the description:

Please come here to download the Exedemo Beta
The creation motivation Authority management of universal Privilege management tool is very important in mis software. Many well-known domestic MIS software vendors have designed a more perfect and have their own characteristics of the Rights Management module. But for many less-regulated software vendors (including individuals or small authoring groups), they often receive a single, design a set of rights management system, each set is different, some not enough attention, casually write a paragraph, where all the past use, and some have tried to do, but the results can not make their own satisfaction.
In fact, think about it, each set of software permissions, although different, but in fact, the required implementation of the function is the same. Authority management is the most reusable module of code reusability in MIS software, and it is also the one with the highest repeat development rate.
Do one of the most common rights management module, support as many database backstage, support as much as possible foreground development tools, to the greatest extent possible to facilitate the design and maintenance of software workers and end-user use, of course, but also to ensure the advancement of the Rights management technology, that is, focus on the security of flexibility. Based on this assumption, I have consulted a variety of rights management systems, the design of the implementation of this universal Rights management tool.
I do not dare to say: Reduce code reuse from me. But also hope that their work can bring convenience to everyone.
I hope you enjoy this tool. Have a bug a certain trouble report, we together to perfect it! About the Universal Rights Management Tool branch all ADO (including ODBC) supported databases, no matter what programming, Vc/bcb/vb/pb/delphi, is this bragging? No, not at all! During the software authoring period, the database compatibility problem is considered, and the important script conforms to the SQL_92 standard absolutely. Most of the work was done backstage, and it was easy to adapt.
All users who purchase the DLL version give the SQL script and the same or similar call code examples as the EXE version, altogether:
Delphi6.0
c++builder5.0
VB5.0
PB7.0 Use and Purchase agreement this universal rights Management system of the EXE version of free user test use, the purchase of the DLL version of the cost of RMB100 yuan, providing DLLs, SQL Scripts and Delphi, BCB, VB, PB called the original program examples. The Delphi6 source code fee for the purchase DLL is RMB500. Free, purchased, program, source, and SQL scripts are copyrighted by the author. The user buys the file or the code, the script only is limited to the user oneself or the unit research and Development, the publication system use, may not free or the paid again publish, publishes. If you disagree with the above agreement, the author will not accept the purchase. Contact Author letter/Remittance Address:
321409 da Yuan Zhen, Li Yuekin, Jinyun County, Zhejiang Province, China
China Merchants Bank Card account: 057150424609
Home Address: http://elsesoft.home.sohu.com
Emailto:llii@163.net
©1999-2001 Software Studio
User Rights Management This is the User Rights Management window, (if not ADO transaction processing, there will be no "Cancel" and "Save" button)
Please note, here I for convenience, many places are set 1, 2, 3, in fact, can be set to string data, length of 20 bytes, should be enough. In addition, after you add a group name, you should automatically display the permission entries that you can set under the Group Permissions settings list, and if not, the DBMS does not support ADO transactions Well, please cancel the ADO transaction and re-enter it.

You can choose to add the user first or add a permission group first, the system will be perfect processing.
A user is set differently, with three states, "normal", "expired" and "disabled", and only users who are in the normal state can successfully log on to the system. A user can set permissions that allow several permission groups to pass in the permission entry tests allowed in any one of the permission groups.
For each permission group, you can select the appropriate permission items according to the work pass and the duty.
The role of the grouping in the group permissions list is complementary: if all its subprojects have no choice, it has no choice, and if one or more or all of them are selected, it is allowed. You can detect the user has no access to the group before entering a large module, if there is release, there is no need to enter, because he went in there is nothing to do.

Please enter a user ID, user name, password, and specify whether the period is valid and valid.
The password can be empty or up to dozens of characters long.
The user ID cannot be added when it repeats with an existing ID.

When editing user information, you cannot change the user ID, if you want to change it, delete it, and then add it again.

Adding a permission group simply does not duplicate the name of an existing group.
The software studio? 1999-2001
function declaration software designers fully grasp the rights management does not need to rack their brains, using the Common Rights Management tool DLL version, just declare 10 functions can, if also let me dip your luster, more than a declaration of a showabout also only 11.

This Rights management DLL tests the functional tests of four common MIS development tools, which are available for use.
C++builder, VB, PB please click into the corresponding Page view, VC + + I do not know, but the use of the people are all masters, I will not shortcoming, according to BCB a little change on the line.
The following is described in detail in Delphi's function call.

Delphi (DLL Edition provides this example Delphi6.0 and c++builder5.0 interface and Code of this window)
It is strongly recommended that the name of the DLL be changed when the user is delivered, and that the name of the DLL be renamed to prevent some self-righteous person from exploiting it and destroying the system security.

Procedure Showabout;stdcall; External ' qxDll.dll ';
You don't have to say that, do you?}
function Connectdb (cnstr, user, Pwd:pchar;
DT, Enpwd:pchar): integer; stdcall; External ' qxDll.dll ';
{Connecting to the database
Parameter description:
CNSTR: The connection parameters to be obtained above
User: Login to the database
PWD: Password for login to database
DT: Date format is YYYY-MM-DD, computer date is empty
ENPWD: Cipher Encryption factor
return value:
0, Connection successful
1, Connection failed
}
Procedure Disconnectdb;stdcall; External ' qxDll.dll ';
{Disconnect database connection}
Procedure Editqxlist (Tran:integer); stdcall;
{Parameter Description: 1: Transaction processing, 0: no transaction processing}
{You can open the Permissions List Maintenance window without declaring it, because the end user does not need}
Procedure Qxmanager (Tran:integer); stdcall; External ' qxDll.dll ';
{Parameter Description: 1: Transaction processing, 0: no transaction processing}
{Open Rights Management window, this most important}
function Logincheck (UserID, pwd, DT, Errstr:pchar;
Syserr:integer): Integer;stdcall; External ' qxDll.dll ';
{User Login to your system
Parameter description:
UserID: Login to admin system username
PWD: Login to the management system password
DT: The same last function, mainly considering that some systems are not shut down for a few days,
So that the software knows that the user who just wanted to log on is expired.
ERRSTR: If a user fails to log in, you want to display your information in a DLL using the
Can be an empty string
Syserr: Login failed to handle the method,
0, you handle it by your program.
1, show only the information provided by ERRSTR
2, the DLL to display the error message
return value:
0, Login successful
1, users are prohibited from using
2, the user has expired
3, the password is not correct
4, no this user
}
function Showloginform (Cap, Dt:pchar;
var userid:pchar;var sec:integer): Integer;stdcall;
{Using the Login dialog box for this DLL to process user logins}
{Parameter Description:
Cap: Title of the logon dialog box
DT: The same last function, mainly considering that some systems are not shut down for a few days,
So that the software knows that the user who just wanted to log on is expired.
UserID: Returns the UserID buffer for the user who just logged on
Sec:10 above, the time limit in seconds to log in, under 10, the time limit to log in.
Returns the length of UserID when a login succeeds
return value:
0, Login successful
1, the number of logins has been limited to
2, the logon time limit has arrived
3, User canceled
The following are two qualified login dialog box diagrams:


}
function Changuserpwd (Userid,oldpwd,newpwd,dt:pchar): Integer;stdcall;
{Change user password
Parameter description:
UserID: Login to admin system username
OLDPWD: The original password
NEWPWD: New Password
DT: ditto
return value:
0, successful change
1, the user is forbidden to use, so cannot change
2, the user's lifetime has expired, so cannot change
3, the password is not correct, so cannot change
4, no this user, so cannot change
5, the old and new passwords are the same, so do not change
6, Unknown cause modification unsuccessful}
function Showchanguserpwdform (Userid,dt:pchar): Integer;stdcall;
{Use the Login dialog box for this DLL to handle password changes
parameter is User ID and date
Return value: 0: Success, 1: unsuccessful
The following is a diagram of the User Change Password dialog box:

}
function Getusernamefromid (Userid:pchar;
var username:pchar): Integer;stdcall;
{Get the user name of the corresponding user ID
Parameter description:
UserID: User ID
UserName: Returns a buffer for the user name checked
return value:
0: Did not get the name of this ID,
Other: Returns the length of the username}
function Userqxcheck (Userid:pchar; qxid:integer;
Errstr:pchar; Syserr:integer): integer; stdcall; External ' qxDll.dll ';
{Check to see if a user has permission to use a feature
Parameter description:
UserID: User ID to check for permissions
QXID: the permission ID to check, note that it is an integer value
Errstr: Ditto function
Syserr: Ditto function

return value:
0, have permission to use this feature
1, there is no permission to use this feature
}

©1999-2001 Software Studio




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.