Dreamweaver MX Ultradev exploration (7) to create our guest book (4)
What to do now is to increase the message of the page, new.asp. Our principle is to design a good database in the previous increase in data, here we do not go through, in Figure (7-36) below.
7-36
Remember to submit data that defines the index.asp page to Oh. In order to prevent it wrong, do we want to use a behavior, but this time do not use the server behaviors, and to use DW MX own behavior on the line. Select a form after form Design -> Behaviors -> Validate Form (Design -> Behavior -> validation form), Figure (7-37) below.
7-37
Remember to plan for the f_name and f_content that the required fields on the hook, f_oicq acceptable type to Number, f_email acceptable type to Email Address.
As edit.asp (edit page), rep.asp (back page) and del.asp (delete page) is simply to accept the values passed to it in front of our display the corresponding data, and then use Updata Recordt and Delete Record server behavior Here we do not go through, and results shown in Figure (7-38,7-39,7-40) below.
7-38
Here is edit.asp page, establishing the time and the previous record set the same, but remember to apply Move To Specific Record server behavior in order to find the corresponding set of records. The above table also produced the same problems and index.asp, but should show the user name, user messages and owners back into the text box and drag the text to the corresponding database field box, the last application Updata Recordt server behavior, and then update the data back to the definition index.asp page on the line. Another point to note here, we should put the form in the large form to be effective.
7-39
This is del.asp page, the same form to build Oh, but do not put names into a text box, because only delete data, it is important also Move To Specific Record server line, and Delete Record server behavior, and finally removed the definition of Go to index.asp page.
7-40
This is rep.asp page, the page and above edit.asp page or less the same behavior using the Updata Recordt server, but the difference is that it only updated the contents of a field, ibid want to use Move To Specific Record server behavior, the Head back into the text box, so that super users can input.
OK, just lack a little bit, and to try and try again ah! ! !
We are here to consider the question, how to have administrative rights on the super-user management message then? Which can edit, delete, reply, etc.. Here we should use landing, this is a no contact with our previous server acts Log In User server behavior. Similarly, it is very easy to learn. :)
Open the login.asp page, to create a form, forms, text boxes and text boxes that the above named f_name, that the following named f_password, and to its type (type) to password, Figure (7 - 41) below.
7-41
After doing all this use of Application -> User Authentication -> Log In User (Applications -> user authentication -> user login), Figure (7-42) below.
7-42
[Next]
After clicking on the Figure (7-43) as shown in the dialog box.
7-43
Get Input Form Form: In this drop-down list, select which to accept the submission form, we have only one form here, so we do not choose.
Username Field: Select the user name here, the corresponding text box. We have defined the user name text box named f_name, so here are options f_name.
Password Field: Select the user password here, the corresponding text box, ibid.
Validate Using Connection: here choose what you want to use a database connection.
Table: To use the database to which table. Here we take note of where we want to use the admin table, though in the past we have been using f_bbs table.
Username Column: select the user name field mapping, select the database where the f_name field.
Password Column: Select the user password on the mapping of the field, ibid.
If Login Succeeds, Go To: to which, if authenticated page, where we define Home index.asp.
If Login Fails, Go To: If there is no validation to which pages, where we define the return to the sorry.asp.
Restrict Access Based On: because we want to restrict access to some pages, such as edit and delete and so on, so use to this. In the following types of choices Username and Password, the user name and password.
Click OK to complete the settings on this page.
Now we head back to look at, and we edit, asp, del.asp, rep.asp are not allowed to share casual visit, where the page should be used to protect the server behavior. Application -> Server Behaviors -> User Authentication -> Restrict Access To Pags (Applications -> server behavior -> user authentication -> pages of data protection), Figure (7 - 45) below.
7-45
Click the Figure after (7-46) as shown in the dialog box.
7-46
Restrict Ased On: page protection type, here we have chosen username and password (user name and password).
If Access Denied, Go To: If the illegal access, go to which pages, where we choose to have illegal access to login.asp (landing page).
The need to protect the page has edit.asp, del.asp, rep, asp, each page of the settings are the same, remember to set the oh.
The final sorry.asp page is a simple page, shown in Figure (7-47) below. In this "here" with a connection to the login.asp page.
7-47
Finished! Oh, I said finally done. :)
Recommended links:
XviD To WMV3G2 to MPEGAcrord32.exe Error Quick RepairDVR-MS To MP4