Có 160+ tài liệu thuộc chủ đề "thiết kế web với php"
tailieu.vn Xem trực tuyến Tải xuống
Explain who owns the data—does the user retain ownership or do they grant a licence of use to us?. Some countries also have legislation in place governing the management of user data, such as the Data Protection Act in the UK. Security—ensuring data is held securely, and isn't easy for others to access, unless the user's permission has been given....
tailieu.vn Xem trực tuyến Tải xuống
if( strlen( $_POST['register_password. $this->registrationErrors. $this->registrationErrorLabels['register_password_label. $this->registrationErrorLabels['register_password_confirm_. urldecode( $_POST[ 'register_email. $this->registrationErrorLabels['register_email_label. preg_match( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a- z a-z POST[ 'register_email. isset( $_POST['register_terms. $_POST['register_. $this->registrationErrorLabels['register_terms_label. $u = $this->registry->getObject('db')->sanitizeData(. $e = $this->registry->getObject('db')->sanitizeData(. $this->registry->getObject('db')->executeQuery( $sql. $this->registrationErrorLabels['register_user_label. $data = $this->registry->getObject('db')->getRows();. if( $this->registry->getSetting('captcha.enabled. if( $this->registrationExtention->checkRegistrationSubmission. $this->sanitizedValues['username. $this->sanitizedValues['email. $this->sanitizedValues['password_hash. $this->sanitizedValues['active. $this->activeValue;. $this->sanitizedValues['admin. $this->sanitizedValues['banned. $this->submittedValues['register_user. $this->submittedValues['register_password. $this->submittedValues['register_email. $this->submittedValues['register_password_confirm. $this->submittedValues['register_captcha. POST['register_captcha. $_POST['register_captcha. $this->registry = $registry;. $this->extraFields['dino_name. $this->extraFields['dino_breed. $this->extraFields['dino_gender. $this->extraFields['dino_dob. foreach( $this->extraFields as...
tailieu.vn Xem trực tuyến Tải xuống
if( $this->checkRegistration. If the form was completed properly, we can then process the registration and create the user account and the profile:. $userId = $this->processRegistration();. if( $this->activeValue. If we have set all users to be active by default, we log the user in automatically:. $this->registry->getObject('authenticate. >forceLogin( $this->submittedValues['register_. md5( $this->submittedValues['register_. $this->uiRegistrationProcessed();. If the registration attempt wasn't successful, we display the user...
tailieu.vn Xem trực tuyến Tải xuống
However, as cookies last for longer periods of time and are stored on the user's computer (whereas sessions are stored on the server) cookie authentication will need to be more advanced. One option would be to store a random salted hash of the time the user logged in, within the cookie. If we simply relied on the user ID being...
tailieu.vn Xem trực tuyến Tải xuống
We should define a number of properties for the object, including:. The query we wish to paginate:. The query we will be paginating. The query that we actually execute to give us the paginated results (as we will need to dynamically add limits to the initial query):. The maximum number of results to display per page. An offset that indicates...
tailieu.vn Xem trực tuyến Tải xuống
addTag( 'first', "<a href='members/list/'>First page</a>". addTag( 'previous', "<a href='members/list/". "'>Previous page</a>". addTag( 'first', "<a href='members/list/". "'>Next page</a>". "'>Last page</a>". <div id="main">. <div id="rightside">. <div id="content">. <p><strong>{name}</strong></p>. <p>Keeper of <strong>{dino_name}</strong>. a <strong>{dino_gender} {dino_breed}</strong></p>. <p>Viewing page {page_number} of {num_pages}</p>. <p>{first} {previous} {next} {last}</p>. -1)LIKE'".$alpha.". 'footer.tpl.php');. addTag( 'first', "<a href='members/alpha/".$alpha."/'>First page</a>". addTag( 'previous', "<a href='members/alpha/".$alpha."/". "'>Previous. page</a>". addTag( 'first', "<a href='members/alpha/".$alpha."/". <p>. <a...
tailieu.vn Xem trực tuyến Tải xuống
Our relationships table needs to relate two users together, as well as record the type of relationship. Since some relationships require mutual consent, we need to indicate if the non-requesting user accepted the request to connect. Increment A unique ID for the relationship between the two users. Type ID The type of relationship (a reference to the. relationship_types table). Usera...
tailieu.vn Xem trực tuyến Tải xuống
AND r.usera={$usera} ";. $cache = $this->registry->getObject('db')->cacheQuery( $sql. The controller needs to check if the user is logged in, include our relationships model, get the pending requests, and display them to the user in the view.. 'models/relationships.php');. $relationships = new Relationships( $this->registry. $this->registry->getObject('template')->buildFromTemplates(. 'header.tpl.php', 'friends/pending.tpl.php', 'footer.tpl.php');. $this->registry->getObject('template')->getPage() ->addTag('pending', array( 'SQL', $pending. $this->registry->errorPage( 'Please login', 'Please login to manage pending connections');. We...
tailieu.vn Xem trực tuyến Tải xuống
$sc = new Profilestatusescontroller( $this->registry, true, $user. If the user tried to access a sub-controller that doesn't exist, we would display an error.. @return void. $this->registry->errorPage( 'Sorry, an error has occured', 'The link you followed was invalid, please try again');. Although the user's profile is going to be broken down into different areas, which are accessed through different links showing...
tailieu.vn Xem trực tuyến Tải xuống
This enacts the profile controller, which in turn passes control to the profile information controller. Views/default/templates/members/list.tpl.php. Views/default/templates/members/search.tpl.php The link is shown below:. <p><strong><a href="profile/view/{ID}">{name}</a></strong></p>. <p>Keeper of <strong>{dino_name}</strong>. a <strong>{dino_gender}. {dino_breed}</strong></p>. The profile information controller ( controllers/profile/. profileinformationcontroller.php ) needs to communicate with the model, to get the data for the profile, and have the data assigned to template variables.. We...
tailieu.vn Xem trực tuyến Tải xuống
if( in_array( $ext, $this->uploadExtentions. $this- >uploadTypes. $this->name = $name_prefix . $name_prefix.$name;. $this->loadFromFile( $path. return $this->name;. When we have finished processing an image, the save method finds the appropriate image function for the format of the image, and then saves the file.. after resize * @param String $location location of image * @param String $type type of the image * @param...
tailieu.vn Xem trực tuyến Tải xuống
$this->registry->getSetting('view. $this->page->addTemplateBit( $tag, $bit, $replacements. As mentioned above, we need to take this parameter in the method in the page object. this method also needs to be changed to assign both the template bit and the replacements array with the template tag, and not just assign the template bit with the template tag, as it previously did. This can be...
tailieu.vn Xem trực tuyến Tải xuống
The concept is very similar to the statuses section of a user's profile we created in Chapter 5 except that instead of relating to one specific user, this should combine the activity of all users directly connected to the logged-in user.. Although at this stage it is primarily simple statuses, this will involve some logic to determine the context of...
tailieu.vn Xem trực tuyến Tải xuống
'-fromself.tpl.php', $datatags. $this->registry->getObject('template')->addTemplateBit(. '-user.tpl.php', $datatags. '.tpl.php', $datatags. $this->registry->getObject('template')->buildFromTemplates(. 'header.tpl.php', 'stream/none.tpl.php', 'footer.tpl.php');. We can now look at adding comments, likes, and dislikes to the stream.. Comments, likes, and dislikes. The functionality behind adding comments, likes, and dislikes is very similar to the work we did in Chapter 5 in developing the statuses on a user's profile.. The concept to adding these...
tailieu.vn Xem trực tuyến Tải xuống
If the user isn't connected to the user, or isn't logged in, then we simply remove the template tag from the view so they don't see any update or post box on the page:. $this->registry->getObject('template')->getPage. >addTag( 'status_update. Now, we need to process status updates and profile posts, and create the templates that make up the final aspect of our view.....
tailieu.vn Xem trực tuyến Tải xuống
ID of the message. ID of the sender. Name of the sender. ID of the recipient. Name of the recipient. Subject of the message. When the message was sent (TIMESTAMP). User readable, friendly format of the time the message was sent. Has the message been read. The message content itself. The constructor takes the registry and ID of the message...
tailieu.vn Xem trực tuyến Tải xuống
Once a user has read a message, we should update the database to indicate that the message has been read, so that the user can see at a glance which of their messages are new and unread, and which ones have already been read. However, for privacy reasons, we shouldn't show this information to the sender of the message.. @param...
tailieu.vn Xem trực tuyến Tải xuống
Changes to the view. Since all of the media types we are going to support require at least one additional database field in a table that extends the statuses table, we are going to need to display any additional fields on the post status form. To support a varying number of additional fields depending on the type, we could use...
tailieu.vn Xem trực tuyến Tải xuống
The following getter method is used to return the name of the image we are working with:. Get the image name * @return String. public function getName(). return $this->name;. after resize * @param String $location location of image * @param String $type type of the image * @param int $quality image quality /100 * @return void. public function save( $location,...
tailieu.vn Xem trực tuyến Tải xuống
One of the two main remaining features (the other being groups) is events. How to re-use this calendar feature in other areas of the site. How to notify users of the birthday of their contacts. Because a calendar is something we will most likely want to reuse throughout our network, and because of the complexities that come with it, it...