« Home « Chủ đề thiết kế web với php

Chủ đề : thiết kế web với php


Có 80+ tài liệu thuộc chủ đề "thiết kế web với php"

Tương tác giữa PHP và jQuery - part 21

tailieu.vn

<form action="assets/inc/process.inc.php". include_once 'assets/common/footer.inc.php';. Save this code and navigate to http://localhost/login.php in your browser to see the resulting login form (see Figure 6-2).. In the class folder, create a new file called class.admin.inc.php (/sys/class/class.admin.inc.php). Now insert the following code into class.admin.inc.php to define the class, the property, and the constructor:. Determines the length of the salt to use in hashed...

Tương tác giữa PHP và jQuery - part 22

tailieu.vn

Load a hash of the word test and output it. echo "Hash 1 without a salt:<br />", $hash1, "<br /><br />";. Load a second hash of the word test. echo "Hash 2 without a salt:<br />", $hash2, "<br /><br />";. echo "Hash 3 with the salt from hash 2:<br />", $hash3;. You can learn more about this function at http://php.net/sleep....

Tương tác giữa PHP và jQuery - part 23

tailieu.vn

Modifying the App to Handle the User Logout. $actions array in process.inc.php. Insert the following bold code into process.inc.php to complete the logout process:. include_once '../../../sys/config/db-cred.inc.php';. Redirect to the main index if the token/action is invalid header("Location . '.inc.php';. Clicking the Log Out button removes the user data from the session. Note Now that you know the login is working,...

Tương tác giữa PHP và jQuery - part 24

tailieu.vn

231 include_once 'assets/common/footer.inc.php';. Now save this code and try to directly access http://localhost/confirmdelete.php while logged out.. As expected, you’ll be redirected to http://localhost/ instead.. In this chapter, you learned how to add user authorization to your calendar app, which means only authorized users can now make modifications to the calendar. In the next chapter, you’ll start integrating jQuery into the...

Tương tác giữa PHP và jQuery - part 25

tailieu.vn

class to the link $(this).addClass("active");. After saving this code, reload http://localhost/ in your browser and click any of the event titles.. Instead of going to the event details on view.php, the title of the event is output in the console. For instance, if you click the New Year's Day event, you will see the following output in the console:. Extracting...

Tương tác giữa PHP và jQuery - part 26

tailieu.vn

Pulls up events in a modal window. class to the link $(this).addClass("active");. Checks if the modal window exists and. Next, set up the call to $.ajax() in the event handler. It will use the POST method, point to the processFile, and send the appropriate data. Finally, use .append() to insert the returned markup into the modal window if the call...

Tương tác giữa PHP và jQuery - part 27

tailieu.vn

You may have noticed that the modal window appears to flicker right as it’s opened. This happens because fx.initModal() appends the modal window to the body element without hiding it. To correct this, add a call to .hide() in fx.initModal() using the following bold code:. Functions to manipulate the modal window fx. Checks for a modal window and returns it,...

Tương tác giữa PHP và jQuery - part 28

tailieu.vn

Submitting the Serialized Form Data to the Processing File. Now that the form data is serialized, you’re ready use $.ajax() to send the data to the processing file.. Use the POST method to submit the serialized data to ajax.inc.php, and then fade out the modal window and overlay using fx.boxout() on a successful submission. Also, log a confirmation message in...

Tương tác giữa PHP và jQuery - part 29

tailieu.vn

You aren’t passing a time or timezone to the Date object, so that object will default to midnight Greenwich Mean Time (00:00:00 GMT). you can add the value of the timezone offset to the Date object, which will return the date to midnight on the given day, no matter what timezone the user is in.. Adds a new event to...

Tương tác giữa PHP và jQuery - part 30

tailieu.vn

Hides the form. Make sure the modal window exists modal = fx.initModal();. the modal overlay and fade it in fx.boxin(null, modal);. Load the form into the window. a class to the form. Determining the Form Action. Because the event creation button doesn’t have a button name, you need to keep a default value (edit_event).. To access the name of the...

Tương tác giữa PHP và jQuery - part 31

tailieu.vn

To execute properly, the value of the Submit button needs to be stored and passed to the processing file. If so, append the action confirm_delete and the value of the button to the query string before submitting it.. $(".edit-form input[type=submit]").live("click", function(event){. Adds necessary info to the query string formData. Sends the data to the processing file $.ajax({. the calendar. You...

Tương tác giữa PHP và jQuery - part 32

tailieu.vn

Performing Form Validation with Regular Expressions. In the case of the calendar application, the date format is critical: if the format isn’t correct, the app will fail in several places. To verify that only valid dates are allowed into the database, you’ll use regular expressions (regexes), which are powerful pattern-matching tools that allow developers much more control over data than...

Tương tác giữa PHP và jQuery - part 33

tailieu.vn

<p>. </p>. Use regex to highlight any occurence of the letters a-c. Output the pattern you just used. don’t need to include both uppercase and lowercase versions of the letters. Without the modifier, you would need to use [A-Ca-c] to match either case of the three letters.. To match any character except those in a class, prefix the character class...

Tương tác giữa PHP và jQuery - part 34

tailieu.vn

Expanding the validate month section of the date string. Adding the day part of the date string to the pattern. Validating the hour section of the date string. Validating the minutes section of the date string. Validating the seconds section of the date string and completing the pattern. Armed with this regex pattern, you can now validate the date input...

Tương tác giữa PHP và jQuery - part 35

tailieu.vn

$(".edit-form a:contains(cancel)") .live("click", function(event){...});. In the next chapter, you’ll learn how to extend the jQuery object, both by directly extending the jQuery core and by developing a custom plugin for jQuery.. jQuery’s easy-to-use syntax led developers to begin writing scripts to achieve custom effects and other tasks. To make these scripts configurable and reusable, these developers constructed these scripts as...

Tương tác giữa PHP và jQuery - part 36

tailieu.vn

To add a chainable method to the jQuery object, you have to attach it to the fn object of jQuery. $(".class").yourPlugin();. For more information on this, check out the brief and simple explanation of the prototype object in JavaScript at. The plugin you’ll build in this section will rely on a simple method to enlarge the event titles when a...

Publishing PHP eclipse - part 1

tailieu.vn

Those of us who taught ourselves PHP in the late nineties have become more sophisticated in our coding techniques. Developers saw the potential of Eclipse's extensible, plug-in-based architecture. In this book, we will explore using Eclipse for PHP web development using the PHPEclipse plug-in. We will take a tutorial-style approach throughout most of this book. Features of Eclipse and PHPEclipse...

Publishing PHP eclipse - part 2

tailieu.vn

A Project Management Committee (PMC) manages the vision and development of the Eclipse project. Developers are the volunteers who actually write the Eclipse code.. The Eclipse Architecture. Up to this point, we've hinted at how the Eclipse IDE can be your one tool for the whole development process. Plug-Ins. By itself, the Eclipse Platform does nothing. All functionality of the...

Publishing PHP eclipse - part 3

tailieu.vn

If you are using Panther (Mac OS 10.3) or greater, PHP 4.3 already comes installed. If you want to use the native PHP, you will have to go through turning on the root account, editing the Apache configuration file to make Apache aware of PHP, and then manually starting Apache.. If you do choose this route, some of the instructions...

Publishing PHP eclipse - part 4

tailieu.vn

You can also arrive at the SourceForge site by going to the official PHPEclipse site at. http://www.phpeclipse.de , and clicking on Downloadable Files in the left navigation bar.. PHPEclipse releases grouped in Eclipse 2.1 will only work with Eclipse 2.1, and releases in the Eclipse 3.0 stream will only work with Eclipse versions 3.0.x, and so forth.. We are interested...