Có 60+ tài liệu thuộc chủ đề "các framework phổ biến"
tailieu.vn Xem trực tuyến Tải xuống
$this->setUserID();. $fieldList = $this->user_tbl_fields;. $keyVal = $this->makeUpdateKeyValuePairs($this->user_tbl_fields,. $stmt = “UPDATE $this->user_tbl SET $keyVal WHERE USER_ID = $this-. >USER_ID”;. $result = $this->dbi->query($stmt);. return $this->getReturnValue($result);. $this->dbi->quote(addslashes($data[$k]));. $stmt = “INSERT INTO $this->user_tbl ($fields) VALUES($values)”;. $this->setUserID($uid);. $stmt = “DELETE from $this->user_tbl. “WHERE USER_ID = $this->USER_ID”;. $stmt = “INSERT INTO $this->user_activity_log SET. “USER_ID = $this->USER_ID,. Throughout the user management system, many user interface templates are...
tailieu.vn Xem trực tuyến Tải xuống
Listing 6-2: user_mngr.php. require_once “user_mngr.conf”;. $cmd = $this->getRequestField(‘cmd’);. $this->authorize. $this->alert(‘UNAUTHORIZED_ACCESS’);. $this->addDriver();. $this->modifyDriver();. $this->deleteUser();. print $this->showScreen($USERMNGR_MENU_TEMPLATE,. $step = $this->getRequestField(‘step’);. $this->modifyUser();. print $this->showScreen($USERMNGR_USER_TEMPLATE,. $this->addUser();. $username = $this->getRequestField(‘username’);. $password1 = $this->getRequestField(‘password1’);. $password2 = $this->getRequestField(‘password2’);. $user_type = $this->getRequestField(‘user_type’);. $active = $this->getRequestField(‘active’);. $this->checkInput();. $this->show_status($this->getMessage(‘USER_ADD_SUCCESSFUL’),. $this->show_status($this->getMessage(‘USER_ADD_FAILED’),. $user_id = $this->getRequestField(‘user_id’);. $this->alert(‘INACTIVE_NOT_OK’);. $this->alert(‘OPERATION_NOT_ALLOWED’);
tailieu.vn Xem trực tuyến Tải xuống
$this->show_status($this->getMessage(‘USER_MODIFY_SUCCESSFUL’),. $this->show_status($this->getMessage(‘USER_MODIFY_FAILED’),. $user_id = $this->getRequestField(‘user_id’);. $this->emptyError($user_id, ‘USER_ID_MISSING’);. $userObj->getUserInfo();. $email = $userObj->getEMAIL();. $this->alert(‘USER_DELETE_NOT_ALLOWED’);. $status = $userObj->deleteUser();. $this->show_status($this->getMessage(‘USER_DELETE_SUCCESSFUL’),. $this->show_status($this->getMessage(‘USER_DELETE_FAILED’),. $users = $userObj->getUserList();. $t->set_block(‘mainBlock’,’userBlock’, ‘ublock’);. $t->set_var( array(. ‘USER_ID’ =>. ‘USER_NAME’ =>. $status = $userObj->getUserInfo();. $this->alert(‘USER_INFO_MISSING’);. $userType = $userObj->getTYPE();. $userTypes = $userObj->getUserTypeList();. $t->set_block(‘mainBlock’,’typeBlock’, ‘tblock’);. $t->set_var(. ‘TYPE_ID’ =>. ‘USER_TYPE’ =>. ‘CHOSEN’ =>. $fields = $userObj->getUserFieldList();. $t->set_var($f, null);. $userObj->getACTIVE. $activeOFF = (!$userObj->getACTIVE. $t->set_var(array(. ‘EMAIL’ =>. $userObj->getEMAIL(),....
tailieu.vn Xem trực tuyến Tải xuống
array( ‘app_name’ =>. ‘app_version’ =>. ‘app_type’ =>. ‘app_db_url’ =>. ‘app_auto_authorize’ =>. ‘app_auto_connect’ =>. ‘app_auto_chk_session’ =>. ‘app_debugger’ =>. The user manager application and all the other applications in the user manage- ment system require configuration information that is stored in user_mngr.conf . $PEAR_DIR Set to the directory containing the PEAR package. specifically the DB module needed for class.DBI.php in our application...
tailieu.vn Xem trực tuyến Tải xuống
Listing 6-4 shows such a message file, called user_mngr.messages. Listing 6-4: user_mngr.messages. $MESSAGES[‘US’][‘USER_ADD_SUCCESSFUL. $MESSAGES[‘US’][‘USER_ADD_FAILED. $MESSAGES[‘US’][‘USER_MODIFY_SUCCESSFUL. $MESSAGES[‘US’][‘USER_MODIFY_FAILED. $MESSAGES[‘US’][‘USER_DELETE_SUCCESSFUL. $MESSAGES[‘US’][‘USER_DELETE_FAILED. $MESSAGES[‘US’][‘USER_INFO_MISSING. $MESSAGES[‘US’][‘PWD_EMAIL_SENT. $MESSAGES[‘US’][‘PWD_EMAIL_NOT_SENT. Listing 6-5 shows such an error message file, called user_mngr.errors. Listing 6-5: user_mngr.errors. $ERRORS[‘US’][‘APP_FAILURE. $ERRORS[‘US’][‘UNAUTHORIZED_ACCESS. $ERRORS[‘US’][‘INVALID_REQUEST. $ERRORS[‘US’][‘USERNAME_MISSING. $ERRORS[‘US’][‘PASSWORD1_MISSING. $ERRORS[‘US’][‘PASSWORD2_MISSING. $ERRORS[‘US’][‘USER_TYPE_MISSING. $ERRORS[‘US’][‘PASSWORD_MISMATCH. $ERRORS[‘US’][‘INVALID_PASSWORD. $ERRORS[‘US’][‘USER_DELETE_NOT_ALLOWED. $ERRORS[‘US’][‘USER_NOT_FOUND. $ERRORS[‘US’][‘INACTIVE_NOT_OK. $ERRORS[‘US’][‘OPERATION_NOT_ALLOWED. Testing the user management application. After you’ve created class.User.php , user_mngr.php , user_mngr.conf....
tailieu.vn Xem trực tuyến Tải xuống
checkPassword() Checks the user-supplied new password. If the new password is empty, does not match the confirmation password, violates the minimum length limit, or matches the dummy password, it displays the appropriate alert message.. Listing 6-6 shows the user password application user_mngr_passwd.php. Listing 6-6: user_mngr_passwd.php. $AUTHENTICATION_URL = “/login/login.php”;. $LOGOUT_URL = “/logout/logout.php”;. $APP_MENU = ‘/home/home.php’;. $APPLICATION_NAME = ‘USER_MNGR’;. $REL_ROOT_PATH = ‘/user_mngr’;....
tailieu.vn Xem trực tuyến Tải xuống
Figure 6-6: Flow diagram of the forgotten-password recovery application.. Implementing the forgotten-password recovery application. The forgotten-password recovery application implements the methods:. $step , to determine phases of the forgotten password recovery process.. When $step is unset, the first step in the process is assumed and the user is provided an interface to enter her username ( EMAIL ) address.. When...
tailieu.vn Xem trực tuyến Tải xuống
$STATUS_TEMPLATE = ‘usermngr_status.html’;. $USERMNGR_MENU_TEMPLATE = ‘usermngr_menu.html’;. $USERMNGR_USER_TEMPLATE = ‘usermngr_user_form.html’;. $USERMNGR_PWD_REQUEST_TEMPLATE= ‘usermngr_forgotten_pwd.html’;. $USERMNGR_PWD_EMAIL_TEMPLATE = ‘usermngr_forgotten_pwd_email.html’;. $USERMNGR_PWD_RESET_TEMPLATE = ‘usermngr_pwd_reset.html’;. $USERMNGR_PWD_CHANGE_TEMPLATE = ‘usermngr_pwd_change.html’;. To make it easy for users to reset forgotten passwords, you can add the forgotten- password application link in the login interface template. Submit a user’s e-mail address and wait for an e-mail to appear in the user’s mailbox. Click...
tailieu.vn Xem trực tuyến Tải xuống
MSG_VIEWER Holds the message viewer data, the message number ( MSG_ID. THEME Holds information about the available intranet themes that can be used by the user. It contains the theme number ( THEME_ID ) and the name of the theme ( THEME_NAME. ACTIVITY Holds information about the user login/logout activities, discussed in Chapter 5. It contains the user ID (...
tailieu.vn Xem trực tuyến Tải xuống
This method updates an existing message in the data- base. The method is called with message ID ( $mid. It sets the current message ID to the given message ID ( $mid ) using the. The given title ( $title ) and message body ( $msg ) are escaped for char- acters such as quotation marks and slashes using $this->dbi-....
tailieu.vn Xem trực tuyến Tải xuống
associative array called $breakdown . The method is called with an associative array parameter called. $params , which contains information from the configuration file ( home.conf ) regarding start of office hours ( OFFICE_START. These settings are found as follows in the default configuration file:. The method defines an associative array called $retArr , which is what it returns after...
tailieu.vn Xem trực tuyến Tải xuống
$TIP_URL Point to the relative path, which is the parent of the tips directory.. $DEFAULT_THEME Set to the default theme ID. By default, the theme is set to 1. $MAX_AVAILABLE_TIP Set to the maximum number of tips that are available in the tips directory within the templates directory.. $ADMIN_MSG_COLOR Set the color shown to the viewers with administrative privileges.. $STANDARD_MSG_COL...
tailieu.vn Xem trực tuyến Tải xuống
returned with a value of 3 from the user interface shown by. This indicates that the user has confirmed the new message, which is then written to the database addMessage(). Similarly, when the user decides to modify an existing message and. run() is called with cmd set to modify , the step parameter value can be. If the user decides...
tailieu.vn Xem trực tuyến Tải xuống
Uses the logUserIn() method of the $analyzer object to log in the user.. This method authorizes access to this application. It checks the current user ID using the getUID() method. A user object called $userObj is created using the $user_dbi and the current user ID.. The getType() method is called to determine the user type of the cur- rent user....
tailieu.vn Xem trực tuyến Tải xuống
This application is included on the CD-ROM in the ch07/apps directory.. When the application is run, this method is called. Checks whether the user has administrative privilege.. If the user has the administrative privilege and if she passes a user ID, she can view the access logs of that user as well. which shows the daily activities of the intended...
tailieu.vn Xem trực tuyến Tải xuống
The index.php file installed in %DocumentRoot% during the installation process is nothing but a simple redirect to /home/home.php application. So if you did not install index.php in the previous installation section, you can access your intranet using http://yourserver/home/home.php . You’ll be automatically redirected to the central login script ( /login/login.php. and after you authenticate success- fully, you’ll see an intranet...
tailieu.vn Xem trực tuyến Tải xuống
Document Publisher. Developing a simple intranet document publisher. Installing the intranet document publisher. Using the intranet document publisher. P UBLISHING DOCUMENTS ON THE W EB or on the intranet is a major task due to the complexity of the documents and how organizations manage their workflow. In this chapter, we’ll develop a simple document publishing tool that is available to...
tailieu.vn Xem trực tuyến Tải xuống
The Category class. The Category class is used to manipulate each category. The ch08/apps/class/class.Category.php file in the CDROM an implementation of this class. Sets the object variable cat_tbl to $LD_CATEGORY_TBL , which is loaded with the category table name (LD_CATEGORY) from the ld.conf file.. Sets the object variable doc_tbl to $LD_DOC_TBL , which is loaded with the document table name...
tailieu.vn Xem trực tuyến Tải xuống
Sets an object variable called fields, which holds a comma separated list of fields from the std_fields set earlier.. Sets the object variable dbi to point to the class.DBI.php -provided object, which is passed to the constructor by an application. Calls setDocID() to set the document ID of the object.. Sets an object variable called std_fields , which is an...
tailieu.vn Xem trực tuyến Tải xuống
Like all other applications we’ve developed in this book, the document publishing applications also use a standard set of configuration, message, and error files. These files are discussed in the following sections.. $PEAR_DIR Set to the directory containing the PEAR package. $PHPLIB_DIR Set to the PHPLIB directory, which contains the PHPLIB packages (specifically, the. $APP_FRAMEWORK_DIR Set to our application framework...