当前位置: 首页>>代码示例>>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;未经允许,请勿转载。