當前位置: 首頁>>代碼示例>>PHP>>正文


PHP module_controller::reset方法代碼示例

本文整理匯總了PHP中module_controller::reset方法的典型用法代碼示例。如果您正苦於以下問題:PHP module_controller::reset方法的具體用法?PHP module_controller::reset怎麽用?PHP module_controller::reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在module_controller的用法示例。


在下文中一共展示了module_controller::reset方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ExecuteResetPassword

 static function ExecuteResetPassword($ft_id_pk, $password)
 {
     global $zdbh;
     global $controller;
     // Verify if Current user can Edit FTP Account.
     $currentuser = ctrl_users::GetUserDetail($uid);
     $sql = "SELECT * FROM x_ftpaccounts WHERE ft_acc_fk=:userid AND ft_id_pk=:editedUsrID AND ft_deleted_ts IS NULL";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':userid', $currentuser['userid']);
     $numrows->bindParam(':editedUsrID', $ft_id_pk);
     $numrows->execute();
     if ($numrows->rowCount() == 0) {
         return;
     }
     // Change User Password
     runtime_hook::Execute('OnBeforeResetFTPPassword');
     $rowftpsql = "SELECT * FROM x_ftpaccounts WHERE ft_id_pk=:ftIdPk";
     $rowftpfind = $zdbh->prepare($rowftpsql);
     $rowftpfind->bindParam(':ftIdPk', $ft_id_pk);
     $rowftpfind->execute();
     $rowftp = $rowftpfind->fetch();
     $sql = $zdbh->prepare("UPDATE x_ftpaccounts SET ft_password_vc=:password WHERE ft_id_pk=:ftpid");
     $sql->bindParam(':password', $password);
     $sql->bindParam(':ftpid', $ft_id_pk);
     $sql->execute();
     self::$reset = true;
     // Include FTP server specific file here.
     $FtpModuleFile = 'modules/' . $controller->GetControllerRequest('URL', 'module') . '/code/' . ctrl_options::GetSystemOption('ftp_php');
     if (file_exists($FtpModuleFile)) {
         include $FtpModuleFile;
     }
     $retval = TRUE;
     runtime_hook::Execute('OnAfterResetFTPPassword');
     return $retval;
 }
開發者ID:Boter,項目名稱:madmin-core,代碼行數:35,代碼來源:controller.ext.php

示例2: ResetAll

 static function ResetAll()
 {
     global $zdbh;
     global $controller;
     $vhosts = array();
     $numrecords = 0;
     //Get a list of current domains with records
     $sql = "SELECT COUNT(*) FROM x_dns WHERE dn_deleted_ts IS NULL";
     if ($numrows = $zdbh->query($sql)) {
         if ($numrows->fetchColumn() != 0) {
             $sql = $zdbh->prepare("SELECT * FROM x_dns WHERE dn_deleted_ts IS NULL GROUP BY dn_vhost_fk");
             $sql->execute();
             while ($row = $sql->fetch()) {
                 $vhosts[] = $row['dn_vhost_fk'];
                 $numrecords++;
             }
         }
     }
     self::$reset = $numrecords;
     //Delete current records
     self::DeleteAll();
     //Create Default Records
     foreach ($vhosts as $vhost) {
         self::CreateDefaultRecords($vhost);
     }
 }
開發者ID:caglaroflazoglu,項目名稱:sentora-core,代碼行數:26,代碼來源:controller.ext.php

示例3: ExecuteResetPassword

 static function ExecuteResetPassword($ft_id_pk, $password)
 {
     global $zdbh;
     global $controller;
     runtime_hook::Execute('OnBeforeResetFTPPassword');
     $rowftpsql = "SELECT * FROM x_ftpaccounts WHERE ft_id_pk=:ftIdPk";
     $rowftpfind = $zdbh->prepare($rowftpsql);
     $rowftpfind->bindParam(':ftIdPk', $ft_id_pk);
     $rowftpfind->execute();
     $rowftp = $rowftpfind->fetch();
     $sql = $zdbh->prepare("UPDATE x_ftpaccounts SET ft_password_vc=:password WHERE ft_id_pk=:ftpid");
     $sql->bindParam(':password', $password);
     $sql->bindParam(':ftpid', $ft_id_pk);
     $sql->execute();
     self::$reset = true;
     // Include FTP server specific file here.
     $FtpModuleFile = 'modules/' . $controller->GetControllerRequest('URL', 'module') . '/code/' . ctrl_options::GetSystemOption('ftp_php');
     if (file_exists($FtpModuleFile)) {
         include $FtpModuleFile;
     }
     $retval = TRUE;
     runtime_hook::Execute('OnAfterResetFTPPassword');
     return $retval;
 }
開發者ID:elaleprieto,項目名稱:sentora-core,代碼行數:24,代碼來源:controller.ext.php


注:本文中的module_controller::reset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。