本文整理匯總了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;
}
示例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);
}
}
示例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;
}