当前位置: 首页>>代码示例>>PHP>>正文


PHP runtime_csfr::Protect方法代码示例

本文整理汇总了PHP中runtime_csfr::Protect方法的典型用法代码示例。如果您正苦于以下问题:PHP runtime_csfr::Protect方法的具体用法?PHP runtime_csfr::Protect怎么用?PHP runtime_csfr::Protect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在runtime_csfr的用法示例。


在下文中一共展示了runtime_csfr::Protect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doUpdateConfig

 static function doUpdateConfig()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $sql = "SELECT * FROM x_settings WHERE so_module_vc=:name AND so_usereditable_en = 'true'";
     //$numrows = $zdbh->query($sql);
     $name = ui_module::GetModuleName();
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':name', $name);
     $numrows->execute();
     if ($numrows->fetchColumn() != 0) {
         $sql = $zdbh->prepare($sql);
         $sql->bindParam(':name', $name);
         $sql->execute();
         while ($row = $sql->fetch()) {
             if (!fs_director::CheckForEmptyValue($controller->GetControllerRequest('FORM', $row['so_name_vc']))) {
                 $updatesql = $zdbh->prepare("UPDATE x_settings SET so_value_tx = :name2 WHERE so_name_vc = :so_name_vc");
                 $name2 = $controller->GetControllerRequest('FORM', $row['so_name_vc']);
                 $updatesql->bindParam(':name2', $name2);
                 $updatesql->bindParam(':so_name_vc', $row['so_name_vc']);
                 $updatesql->execute();
             }
         }
     }
     self::$ok = true;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:27,代码来源:controller.ext.php

示例2: doUpdateMessage

 static function doUpdateMessage()
 {
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $formvars = $controller->GetAllControllerRequests('FORM');
     self::ExectuteUpdateNotice($currentuser['userid'], $formvars['inNotice']);
     header("location: ./?module=" . $controller->GetCurrentModule() . "&saved=true");
     exit;
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:10,代码来源:controller.ext.php

示例3: doShowStats

 static function doShowStats()
 {
     global $controller;
     runtime_csfr::Protect();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (isset($formvars['inDomain'])) {
         header("location: ./?module=" . $controller->GetCurrentModule() . "&show=true&domain=" . $formvars['inDomain'] . "");
         exit;
     } else {
         return false;
     }
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:12,代码来源:controller.ext.php

示例4: doUpdatePassword

 static function doUpdatePassword()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $current_pass = $controller->GetControllerRequest('FORM', 'inCurPass');
     $newpass = $controller->GetControllerRequest('FORM', 'inNewPass');
     $conpass = $controller->GetControllerRequest('FORM', 'inConPass');
     $crypto = new runtime_hash();
     $crypto->SetPassword($newpass);
     $randomsalt = $crypto->RandomSalt();
     $crypto->SetSalt($randomsalt);
     $new_secure_password = $crypto->CryptParts($crypto->Crypt())->Hash;
     $sql = $zdbh->prepare("SELECT ac_pass_vc, ac_passsalt_vc FROM x_accounts WHERE ac_id_pk= :uid");
     $sql->bindParam(':uid', $currentuser['userid']);
     $sql->execute();
     $result = $sql->fetch();
     $userpasshash = new runtime_hash();
     $userpasshash->SetPassword($current_pass);
     $userpasshash->SetSalt($result['ac_passsalt_vc']);
     $current_secure_password = $userpasshash->CryptParts($userpasshash->Crypt())->Hash;
     if (fs_director::CheckForEmptyValue($newpass)) {
         // Current password is blank!
         self::$error = "error";
     } elseif ($current_secure_password != $result['ac_pass_vc']) {
         // Current password does not match!
         self::$error = "nomatch";
     } else {
         if ($newpass == $conpass) {
             // Check for password length...
             if (strlen($newpass) < ctrl_options::GetSystemOption('password_minlength')) {
                 self::$badpassword = true;
                 return false;
             }
             // Check that the new password matches the confirmation box.
             $sql = $zdbh->prepare("UPDATE x_accounts SET ac_pass_vc=:new_secure_password, ac_passsalt_vc= :randomsalt WHERE ac_id_pk=:userid");
             $sql->bindParam(':randomsalt', $randomsalt);
             $sql->bindParam(':new_secure_password', $new_secure_password);
             $sql->bindParam(':userid', $currentuser['userid']);
             $sql->execute();
             self::$error = "ok";
         } else {
             self::$error = "error";
         }
     }
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:47,代码来源:controller.ext.php

示例5: doUpdateAccountSettings

 static function doUpdateAccountSettings()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $userid = $currentuser['userid'];
     $email = $controller->GetControllerRequest('FORM', 'inEmail');
     $fullname = $controller->GetControllerRequest('FORM', 'inFullname');
     $language = $controller->GetControllerRequest('FORM', 'inLanguage');
     $phone = $controller->GetControllerRequest('FORM', 'inPhone');
     $address = $controller->GetControllerRequest('FORM', 'inAddress');
     $postalCode = $controller->GetControllerRequest('FORM', 'inPostalCode');
     if (!fs_director::CheckForEmptyValue(self::ExecuteUpdateAccountSettings($userid, $email, $fullname, $language, $phone, $address, $postalCode))) {
         runtime_hook::Execute('OnAfterUpdateMyAccount');
         self::$ok = true;
     }
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:18,代码来源:controller.ext.php

示例6: doShadowUser

 static function doShadowUser()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     if ($currentuser['username'] == 'zadmin') {
         $sql = "SELECT * FROM x_accounts WHERE ac_deleted_ts IS NULL ORDER BY ac_user_vc";
         $numrows = $zdbh->prepare($sql);
     } else {
         $sql = "SELECT * FROM x_accounts WHERE ac_reseller_fk = :userid AND ac_deleted_ts IS NULL";
         $numrows = $zdbh->prepare($sql);
         $numrows->bindParam(':userid', $currentuser['userid']);
     }
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             $sql = $zdbh->prepare($sql);
             if ($currentuser['username'] == 'zadmin') {
                 //no bind needed
             } else {
                 //bind the username
                 $sql->bindParam(':userid', $currentuser['userid']);
             }
             $sql->execute();
             while ($rowclients = $sql->fetch()) {
                 if (!fs_director::CheckForEmptyValue($controller->GetControllerRequest('FORM', 'inShadow_' . $rowclients['ac_id_pk']))) {
                     ctrl_auth::KillCookies();
                     ctrl_auth::SetSession('ruid', $currentuser['userid']);
                     ctrl_auth::SetUserSession($rowclients['ac_id_pk'], runtime_sessionsecurity::getSessionSecurityEnabled());
                     header("location: /");
                     exit;
                 }
             }
         }
     }
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:36,代码来源:controller.ext.php

示例7: doConfirmDeleteAlias

 static function doConfirmDeleteAlias()
 {
     global $controller;
     runtime_csfr::Protect();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (self::ExecuteDeleteAlias($formvars['inDelete'])) {
         return true;
     }
     return false;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:10,代码来源:controller.ext.php

示例8: doSaveVhost

 static function doSaveVhost()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $port = $controller->GetControllerRequest('FORM', 'vh_custom_port_in');
     if (empty($port)) {
         $port = NULL;
     } else {
         $port = $controller->GetControllerRequest('FORM', 'vh_custom_port_in');
     }
     $ip = $controller->GetControllerRequest('FORM', 'vh_custom_ip_vc');
     if (empty($ip)) {
         $ip = NULL;
     } else {
         $ip = $controller->GetControllerRequest('FORM', 'vh_custom_ip_vc');
     }
     $sql = $zdbh->prepare("UPDATE x_vhosts SET\n\t\t\tvh_enabled_in  = ?,\n\t\t\tvh_suhosin_in  = ?,\n\t\t\tvh_obasedir_in = ?,\n\t\t\tvh_custom_port_in   = ?,\n                        vh_portforward_in   = ?,\n                        vh_custom_ip_vc   = ?,\n\t\t\tvh_custom_tx   = ?\n\t\t\tWHERE\n\t\t\tvh_id_pk = ?\n\t\t\tAND vh_deleted_ts IS NULL");
     $sql->execute(array(fs_director::GetCheckboxValue($controller->GetControllerRequest('FORM', 'vh_enabled_in')), fs_director::GetCheckboxValue($controller->GetControllerRequest('FORM', 'vh_suhosin_in')), fs_director::GetCheckboxValue($controller->GetControllerRequest('FORM', 'vh_obasedir_in')), $port, fs_director::GetCheckboxValue($controller->GetControllerRequest('FORM', 'vh_portforward_in')), $ip, $controller->GetControllerRequest('FORM', 'vh_custom_tx'), $controller->GetControllerRequest('FORM', 'vh_id_pk')));
     self::SetWriteApacheConfigTrue();
     self::$ok = true;
     return true;
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:23,代码来源:controller.ext.php

示例9: doUpdateClient

 static function doUpdateClient()
 {
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (self::ExecuteUpdateClient($formvars['inClientID'], $formvars['inPackage'], $formvars['inEnabled'], $formvars['inGroup'], $formvars['inFullName'], $formvars['inEmailAddress'], $formvars['inAddress'], $formvars['inPostCode'], $formvars['inPhone'], $formvars['inNewPassword'])) {
         return true;
     }
     return false;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:11,代码来源:controller.ext.php

示例10: doDeleteCron

 static function doDeleteCron()
 {
     global $zdbh;
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $sql = "SELECT COUNT(*) FROM x_cronjobs WHERE ct_acc_fk=:userid AND ct_deleted_ts IS NULL";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':userid', $currentuser['userid']);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             $sql = $zdbh->prepare("SELECT * FROM x_cronjobs WHERE ct_acc_fk=:userid AND ct_deleted_ts IS NULL");
             $sql->bindParam(':userid', $currentuser['userid']);
             $sql->execute();
             while ($rowcrons = $sql->fetch()) {
                 if (!fs_director::CheckForEmptyValue($controller->GetControllerRequest('FORM', 'inDelete_' . $rowcrons['ct_id_pk'] . ''))) {
                     $sql2 = $zdbh->prepare("UPDATE x_cronjobs SET ct_deleted_ts=:time WHERE ct_id_pk=:cronid");
                     $sql2->bindParam(':cronid', $rowcrons['ct_id_pk']);
                     $sql2->bindParam(':time', time());
                     $sql2->execute();
                     (new Cronfile())->writeToFile();
                     self::$ok = TRUE;
                     return;
                 }
             }
         }
     }
     self::$error = TRUE;
     return;
 }
开发者ID:albertkampde,项目名称:sentora-cron-module,代码行数:30,代码来源:controller.ext.php

示例11: doUpdateSettings

 /**
  * Accepts Admin settings form
  * @return null
  */
 static function doUpdateSettings()
 {
     global $controller;
     runtime_csfr::Protect();
     $form = $controller->GetAllControllerRequests('FORM');
     if (!isset($form['inAdminSettings'])) {
         return false;
     }
     ctrl_options::SetSystemOption('whmcs_sendemail_bo', $form['SendEmail']);
     ctrl_options::SetSystemOption('whmcs_link', $form['Link']);
     self::$Results[] = ui_sysmessage::shout('Settings updated!', 'alert-success');
 }
开发者ID:nmsde,项目名称:sentora-whmcs,代码行数:16,代码来源:controller.ext.php

示例12: doUpdateGroup

 static function doUpdateGroup()
 {
     global $controller;
     runtime_csfr::Protect();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (self::ExectuteUpdateGroup($formvars['inGroupID'], $formvars['inGroupName'], $formvars['inDesc'])) {
         return true;
     }
     return false;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:10,代码来源:controller.ext.php

示例13: doAddFaq

 static function doAddFaq()
 {
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     if (!fs_director::CheckForEmptyValue($controller->GetControllerRequest('FORM', 'inAdd'))) {
         $question = $controller->GetControllerRequest('FORM', 'question');
         $answer = $controller->GetControllerRequest('FORM', 'answer');
         $userid = $currentuser['userid'];
         if ($currentuser['usergroup'] == "Administrators") {
             $global = 1;
         } else {
             $global = 0;
         }
         self::ExecuteAddFaq($question, $answer, $userid, $global);
     }
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:17,代码来源:controller.ext.php

示例14: doDeletePackage

 static function doDeletePackage()
 {
     global $controller;
     runtime_csfr::Protect();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (self::ExecuteDeletePackage($formvars['inPackageID'], $formvars['inMovePackage'])) {
         return true;
     }
     return false;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:10,代码来源:controller.ext.php

示例15: doDelete

 static function doDelete()
 {
     global $controller;
     runtime_csfr::Protect();
     $formvars = $controller->GetAllControllerRequests('FORM');
     if (self::ExecuteDelete($formvars['inDelete'], $formvars['inTable'], $formvars['inColumn'], $formvars['inNullCol'])) {
         return true;
     }
     return false;
 }
开发者ID:Ron-e,项目名称:deleted_records_manager,代码行数:10,代码来源:controller.ext.php


注:本文中的runtime_csfr::Protect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。