本文整理汇总了PHP中Cx\Core\Csrf\Controller\Csrf::check_code方法的典型用法代码示例。如果您正苦于以下问题:PHP Csrf::check_code方法的具体用法?PHP Csrf::check_code怎么用?PHP Csrf::check_code使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cx\Core\Csrf\Controller\Csrf
的用法示例。
在下文中一共展示了Csrf::check_code方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeDir
private function makeDir($dir)
{
global $_ARRAYLANG;
if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {
$strPath = $this->mediaTypePaths[$this->_mediaType][0] . $this->_path;
$strWebPath = $this->mediaTypePaths[$this->_mediaType][1] . $this->_path;
} else {
$strPath = ASCMS_CONTENT_IMAGE_PATH . $this->_path;
$strWebPath = ASCMS_CONTENT_IMAGE_WEB_PATH . $this->_path;
}
if (preg_match('#^[0-9a-zA-Z_\\-]+$#', $dir)) {
\Cx\Core\Csrf\Controller\Csrf::check_code();
$objFile = new \File();
if (!$objFile->mkDir($strPath, $strWebPath, $dir)) {
$this->_pushStatusMessage(sprintf($_ARRAYLANG['TXT_FILEBROWSER_UNABLE_TO_CREATE_FOLDER'], $dir), 'error');
} else {
$this->_pushStatusMessage(sprintf($_ARRAYLANG['TXT_FILEBROWSER_DIRECTORY_SUCCESSFULLY_CREATED'], $dir));
}
} else {
if (!empty($dir)) {
$this->_pushStatusMessage($_ARRAYLANG['TXT_FILEBROWSER_INVALID_CHARACTERS'], 'error');
}
}
}
示例2: processCreateDirectory
private function processCreateDirectory($objCategory)
{
if (empty($_POST['downloads_category_name'])) {
return;
} else {
$name = contrexx_stripslashes($_POST['downloads_category_name']);
}
\Cx\Core\Csrf\Controller\Csrf::check_code();
// check for sufficient permissiosn
if ($objCategory->getAddSubcategoriesAccessId() && !\Permission::checkAccess($objCategory->getAddSubcategoriesAccessId(), 'dynamic', true) && $objCategory->getOwnerId() != $this->userId) {
return;
}
// parse name and description attributres
$arrLanguageIds = array_keys(\FWLanguage::getLanguageArray());
foreach ($arrLanguageIds as $langId) {
$arrNames[$langId] = $name;
$arrDescriptions[$langId] = '';
}
$objSubcategory = new Category();
$objSubcategory->setParentId($objCategory->getId());
$objSubcategory->setActiveStatus(true);
$objSubcategory->setVisibility($objCategory->getVisibility());
$objSubcategory->setNames($arrNames);
$objSubcategory->setDescriptions($arrDescriptions);
$objSubcategory->setPermissions(array('read' => array('protected' => (bool) $objCategory->getAddSubcategoriesAccessId(), 'groups' => array()), 'add_subcategories' => array('protected' => (bool) $objCategory->getAddSubcategoriesAccessId(), 'groups' => array()), 'manage_subcategories' => array('protected' => (bool) $objCategory->getAddSubcategoriesAccessId(), 'groups' => array()), 'add_files' => array('protected' => (bool) $objCategory->getAddSubcategoriesAccessId(), 'groups' => array()), 'manage_files' => array('protected' => (bool) $objCategory->getAddSubcategoriesAccessId(), 'groups' => array())));
//
// foreach ($this->arrPermissionTypes as $protectionType) {
// $arrCategoryPermissions[$protectionType]['protected'] = isset($_POST['downloads_category_'.$protectionType]) && $_POST['downloads_category_'.$protectionType];
// $arrCategoryPermissions[$protectionType]['groups'] = !empty($_POST['downloads_category_'.$protectionType.'_associated_groups']) ? array_map('intval', $_POST['downloads_category_'.$protectionType.'_associated_groups']) : array();
// }
//
// $objCategory->setPermissionsRecursive(!empty($_POST['downloads_category_apply_recursive']));
// $objCategory->setPermissions($arrCategoryPermissions);
if (!$objSubcategory->store()) {
$this->arrStatusMsg['error'] = array_merge($this->arrStatusMsg['error'], $objSubcategory->getErrorMsg());
}
}
示例3: settings
private function settings()
{
global $_CONFIG, $_ARRAYLANG;
$objFWUser = \FWUser::getFWUserObject();
if (!$objFWUser->objUser->login()) {
\Cx\Core\Csrf\Controller\Csrf::header('Location: ' . CONTREXX_DIRECTORY_INDEX . '?section=Login&redirect=' . base64_encode(ASCMS_PROTOCOL . '://' . $_CONFIG['domainUrl'] . CONTREXX_SCRIPT_PATH . '?section=Access&cmd=' . rawurlencode($_REQUEST['cmd'])));
exit;
}
$settingsDone = false;
$objFWUser->objUser->loadNetworks();
if (isset($_POST['access_delete_account'])) {
// delete account
\Cx\Core\Csrf\Controller\Csrf::check_code();
if ($objFWUser->objUser->checkPassword(isset($_POST['access_user_password']) ? $_POST['access_user_password'] : null)) {
if ($objFWUser->objUser->isAllowedToDeleteAccount()) {
if ($objFWUser->objUser->delete(true)) {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $_ARRAYLANG['TXT_ACCESS_YOUR_ACCOUNT_SUCCSESSFULLY_DELETED']);
if ($this->_objTpl->blockExists('access_settings')) {
$this->_objTpl->hideBlock('access_settings');
}
if ($this->_objTpl->blockExists('access_settings_done')) {
$this->_objTpl->touchBlock('access_settings_done');
}
return;
} else {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', implode('<br />', $objFWUser->objUser->getErrorMsg()));
}
} else {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $_ARRAYLANG['TXT_ACCESS_NOT_ALLOWED_TO_DELETE_ACCOUNT']);
}
} else {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $_ARRAYLANG['TXT_ACCESS_INVALID_EXISTING_PASSWORD']);
}
} elseif (isset($_POST['access_change_password'])) {
// change password
\Cx\Core\Csrf\Controller\Csrf::check_code();
if (!empty($_POST['access_user_current_password']) && $objFWUser->objUser->checkPassword(trim(contrexx_stripslashes($_POST['access_user_current_password'])))) {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $objFWUser->objUser->setPassword(isset($_POST['access_user_password']) ? trim(contrexx_stripslashes($_POST['access_user_password'])) : '', isset($_POST['access_user_password_confirmed']) ? trim(contrexx_stripslashes($_POST['access_user_password_confirmed'])) : '', true) && $objFWUser->objUser->store() ? $_ARRAYLANG['TXT_ACCESS_PASSWORD_CHANGED_SUCCESSFULLY'] . (($settingsDone = true) && false) : implode('<br />', $objFWUser->objUser->getErrorMsg()));
} else {
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $_ARRAYLANG['TXT_ACCESS_INVALID_EXISTING_PASSWORD']);
}
} elseif (isset($_POST['access_store'])) {
// store profile
\Cx\Core\Csrf\Controller\Csrf::check_code();
$status = true;
isset($_POST['access_user_username']) ? $objFWUser->objUser->setUsername(trim(contrexx_stripslashes($_POST['access_user_username']))) : null;
$objFWUser->objUser->setEmail(isset($_POST['access_user_email']) ? trim(contrexx_stripslashes($_POST['access_user_email'])) : $objFWUser->objUser->getEmail());
$currentLangId = $objFWUser->objUser->getFrontendLanguage();
$objFWUser->objUser->setFrontendLanguage(isset($_POST['access_user_frontend_language']) ? intval($_POST['access_user_frontend_language']) : $objFWUser->objUser->getFrontendLanguage());
$objFWUser->objUser->setEmailAccess(isset($_POST['access_user_email_access']) && $objFWUser->objUser->isAllowedToChangeEmailAccess() ? contrexx_stripslashes($_POST['access_user_email_access']) : $objFWUser->objUser->getEmailAccess());
$objFWUser->objUser->setProfileAccess(isset($_POST['access_user_profile_access']) && $objFWUser->objUser->isAllowedToChangeProfileAccess() ? contrexx_stripslashes($_POST['access_user_profile_access']) : $objFWUser->objUser->getProfileAccess());
if (isset($_POST['access_profile_attribute']) && is_array($_POST['access_profile_attribute'])) {
$arrProfile = $_POST['access_profile_attribute'];
if (isset($_FILES['access_profile_attribute_images']) && is_array($_FILES['access_profile_attribute_images']) && ($result = $this->addUploadedImagesToProfile($objFWUser->objUser, $arrProfile, $_FILES['access_profile_attribute_images'])) !== true) {
$status = false;
}
$objFWUser->objUser->setProfile($arrProfile);
}
$objFWUser->objUser->setSubscribedNewsletterListIDs(isset($_POST['access_user_newsletters']) && is_array($_POST['access_user_newsletters']) ? $_POST['access_user_newsletters'] : array());
if ($status) {
if ($objFWUser->objUser->checkMandatoryCompliance() && $objFWUser->objUser->store()) {
$msg = $_ARRAYLANG['TXT_ACCESS_USER_ACCOUNT_STORED_SUCCESSFULLY'];
$settingsDone = true;
$this->setLanguageCookie($currentLangId, $objFWUser->objUser->getFrontendLanguage());
} else {
$msg = implode('<br />', $objFWUser->objUser->getErrorMsg());
}
} else {
$msg = implode('<br />', $result);
}
$this->_objTpl->setVariable('ACCESS_SETTINGS_MESSAGE', $msg);
} elseif ($_GET['act'] == 'disconnect') {
$objFWUser->objUser->getNetworks()->deleteNetwork($_GET['provider']);
$currentUrl = clone \Env::get('Resolver')->getUrl();
$currentUrl->setParams(array('act' => null, 'provider' => null));
header('Location: ' . $currentUrl->__toString());
exit;
}
$this->parseAccountAttributes($objFWUser->objUser, true);
$this->parseNewsletterLists($objFWUser->objUser);
while (!$objFWUser->objUser->objAttribute->EOF) {
$objAttribute = $objFWUser->objUser->objAttribute->getById($objFWUser->objUser->objAttribute->getId());
if (!$objAttribute->isProtected() || (\Permission::checkAccess($objAttribute->getAccessId(), 'dynamic', true) || $objAttribute->checkModifyPermission())) {
$this->parseAttribute($objFWUser->objUser, $objAttribute->getId(), 0, true);
}
$objFWUser->objUser->objAttribute->next();
}
$this->attachJavaScriptFunction('accessSetWebsite');
$this->_objTpl->setVariable(array('ACCESS_DELETE_ACCOUNT_BUTTON' => '<input type="submit" name="access_delete_account" value="' . $_ARRAYLANG['TXT_ACCESS_DELETE_ACCOUNT'] . '" />', 'ACCESS_USER_PASSWORD_INPUT' => '<input type="password" name="access_user_password" />', 'ACCESS_STORE_BUTTON' => '<input type="submit" name="access_store" value="' . $_ARRAYLANG['TXT_ACCESS_SAVE'] . '" />', 'ACCESS_CHANGE_PASSWORD_BUTTON' => '<input type="submit" name="access_change_password" value="' . $_ARRAYLANG['TXT_ACCESS_CHANGE_PASSWORD'] . '" />', 'ACCESS_JAVASCRIPT_FUNCTIONS' => $this->getJavaScriptCode()));
$arrSettings = \User_Setting::getSettings();
if (function_exists('curl_init') && $arrSettings['sociallogin']['status']) {
$this->parseNetworks($objFWUser->objUser);
}
if ($this->_objTpl->blockExists('access_user_networks')) {
$this->_objTpl->{function_exists('curl_init') && $arrSettings['sociallogin']['status'] ? 'touchBlock' : 'hideBlock'}('access_user_networks');
}
if ($this->_objTpl->blockExists('access_settings')) {
$this->_objTpl->{$settingsDone ? 'hideBlock' : 'touchBlock'}('access_settings');
}
if ($this->_objTpl->blockExists('access_settings_done')) {
//.........这里部分代码省略.........
示例4: newFeed
/**
* Add a new entry
* @access public
* @param string $parentId
* @global ADONewConnection
* @global array
* @global array
*/
function newFeed()
{
global $objDatabase, $_ARRAYLANG, $_CONFIG;
$status = "error";
if (!$this->settings['addFeed']['value'] == '1' || !$this->communityModul && $this->settings['addFeed_only_community']['value'] == '1') {
\Cx\Core\Csrf\Controller\Csrf::header('Location: ' . CONTREXX_SCRIPT_PATH . '?section=Directory');
exit;
} elseif ($this->settings['addFeed_only_community']['value'] == '1') {
$objFWUser = \FWUser::getFWUserObject();
if ($objFWUser->objUser->login()) {
if (!\Permission::checkAccess(96, 'static', true)) {
\Cx\Core\Csrf\Controller\Csrf::header("Location: " . CONTREXX_SCRIPT_PATH . "?section=Login&cmd=noaccess");
exit;
}
} else {
$link = base64_encode(CONTREXX_SCRIPT_PATH . '?' . $_SERVER['QUERY_STRING']);
\Cx\Core\Csrf\Controller\Csrf::header("Location: " . CONTREXX_SCRIPT_PATH . "?section=Login&redirect=" . $link);
exit;
}
} else {
$objFWUser = \FWUser::getFWUserObject();
}
$this->_objTpl->setTemplate($this->pageContent, true, true);
//set navigation
$verlauf = " » <a href='" . CONTREXX_SCRIPT_PATH . "?section=Directory&cmd=add'>" . $_ARRAYLANG['TXT_DIR_F_NEW_ENTREE'] . "</a>";
//get search
$this->getSearch();
//get categories, languages, platforms and username
$catId = 0;
$levelId = 0;
$categories = $this->getCategories($catId, 1);
$levels = $this->getLevels($levelId, 1);
// TODO: $osId is not defined
//$osId = 0;
// TODO: Never used
// $platforms = $this->getPlatforms($osId);
// TODO: $langId is not defined
//$langId = 0;
// TODO: Never used
// $languages = $this->getLanguages($langId);
//get inputfields
$this->getInputfields($objFWUser->objUser->login() ? $objFWUser->objUser->getId() : 0, "add", "", "frontend");
//add feed
if (isset($_POST['addSubmit'])) {
\Cx\Core\Csrf\Controller\Csrf::check_code();
$status = $this->addFeed();
}
$this->_objTpl->setVariable(array('DIRECTORY_CATEGORY_NAVI' => $verlauf, 'TXT_DIRECTORY_DIR' => $_ARRAYLANG['TXT_DIR_DIRECTORY']));
if ($status != "error") {
//send mail
if ($this->settings['adminMail']['value'] != '') {
$this->sendMail($status, $this->settings['adminMail']['value']);
}
// set variables
$this->_objTpl->setVariable(array('DIRECTORY_FEED_ADDED' => $_ARRAYLANG['DIRECTORY_FEED_ADDED'], 'TXT_DIRECTORY_BACK' => '<a href="' . CONTREXX_SCRIPT_PATH . '?section=Directory">' . $_ARRAYLANG['TXT_DIRECTORY_BACK'] . '</a>'));
$this->_objTpl->parse('directoryMessage');
$this->_objTpl->hideBlock('directoryInputFields');
} else {
// set variables
$this->_objTpl->setVariable(array('TXT_DIRECTORY_ADD' => $_ARRAYLANG['TXT_DIR_F_ADD'], 'TXT_DIRECTORY_RSSLINK' => $_ARRAYLANG['TXT_DIRECTORY_RSS'], 'TXT_DIRECTORY_FILE' => $_ARRAYLANG['TXT_DIRECTORY_UPLOAD'], 'TXT_DIRECTORY_LINK' => $_ARRAYLANG['TXT_DIRECTORY_LINK'], 'TXT_DIRECTORY_ATTACHMENT' => $_ARRAYLANG['TXT_DIRECTORY_ATTACHMENT'], 'TXT_DIRECTORY_MAKE_SELECTION' => $_ARRAYLANG['TXT_DIRECTORY_PLEASE_CHOSE'], 'TXT_DIRECTORY_FILETYPE' => $_ARRAYLANG['TXT_DIRECTORY_FILETYP'], 'TXT_FIELDS_REQUIRED' => $_ARRAYLANG['DIRECTORY_CHECK_REQIERED'], 'TXT_DIRECTORY_LEVEL' => $_ARRAYLANG['TXT_LEVEL'], 'TXT_DIRECTORY_CATEGORY' => $_ARRAYLANG['TXT_DIR_F_CATEGORIE'], 'DIRECTORY_CATEGORIES_DESELECTED' => $categories, 'DIRECTORY_LEVELS_DESELECTED' => $levels));
if ($this->settings['levels']['value'] == '0') {
$this->_objTpl->hideBlock('directoryLevels');
}
if ($this->_isGoogleMapEnabled('frontend')) {
$this->_objTpl->addBlockFile('DIRECTORY_GOOGLEMAP_JAVASCRIPT_BLOCK', 'direcoryGoogleMapJavascript', 'modules/Directory/View/Template/Backend/module_directory_googlemap_include.html');
$this->_objTpl->setVariable(array('DIRECTORY_GOOGLE_API_KEY' => $_CONFIG["googleMapsAPIKey"], 'TXT_DIR_GEO_SPECIFY_ADDRESS_OR_CHOOSE_MANUALLY' => $_ARRAYLANG['TXT_DIR_GEO_SPECIFY_ADDRESS_OR_CHOOSE_MANUALLY'], 'TXT_DIR_GEO_TOO_MANY_QUERIES' => $_ARRAYLANG['TXT_DIR_GEO_TOO_MANY_QUERIES'], 'TXT_DIR_GEO_SERVER_ERROR' => $_ARRAYLANG['TXT_DIR_GEO_SERVER_ERROR'], 'TXT_DIR_GEO_NOT_FOUND' => $_ARRAYLANG['TXT_DIR_GEO_NOT_FOUND'], 'TXT_DIR_GEO_SUCCESS' => $_ARRAYLANG['TXT_DIR_GEO_SUCCESS'], 'TXT_DIR_GEO_MISSING' => $_ARRAYLANG['TXT_DIR_GEO_MISSING'], 'TXT_DIR_GEO_UNKNOWN' => $_ARRAYLANG['TXT_DIR_GEO_UNKNOWN'], 'TXT_DIR_GEO_UNAVAILABLE' => $_ARRAYLANG['TXT_DIR_GEO_UNAVAILABLE'], 'TXT_DIR_GEO_BAD_KEY' => $_ARRAYLANG['TXT_DIR_GEO_BAD_KEY'], 'DIRECTORY_START_X' => 'null', 'DIRECTORY_START_Y' => 'null', 'DIRECTORY_START_ZOOM' => 'null', 'DIRECTORY_ENTRY_NAME' => 'null', 'DIRECTORY_ENTRY_COMPANY' => 'null', 'DIRECTORY_ENTRY_STREET' => 'null', 'DIRECTORY_ENTRY_ZIP' => 'null', 'DIRECTORY_ENTRY_LOCATION' => 'null', 'DIRECTORY_MAP_LON_BACKEND' => $this->googleMapStartPoint['lon'], 'DIRECTORY_MAP_LAT_BACKEND' => $this->googleMapStartPoint['lat'], 'DIRECTORY_MAP_ZOOM_BACKEND' => $this->googleMapStartPoint['zoom'], 'IS_BACKEND' => 'true'));
if ($this->_objTpl->blockExists('direcoryGoogleMapJavascript')) {
$this->_objTpl->parse('direcoryGoogleMapJavascript');
}
}
$this->_objTpl->hideBlock('directoryMessage');
$this->_objTpl->parse('directoryInputFields');
}
}
示例5: addComment
/**
* Insert a new comment for a message into database, if the function is activated. Furthermore, all input values are validated.
* Sends also the notification mail to the administrator, if it is enabled in options.
*
* @global ADONewConnection
* @global array
* @global array
*/
function addComment()
{
global $objDatabase, $_ARRAYLANG, $_CONFIG;
\Cx\Core\Csrf\Controller\Csrf::check_code();
$this->initUserId();
//Check for activated function
if (!$this->_arrSettings['blog_comments_activated']) {
$this->_strErrorMessage = $_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_INSERT_ERROR_ACTIVATED'];
return;
}
if ($this->hasUserJustCommented()) {
$this->_strErrorMessage = str_replace('[SECONDS]', intval($this->_arrSettings['blog_comments_timeout']), $_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_INSERT_ERROR_TIMEOUT']);
return;
}
//Create validator-object
$objValidator = new \FWValidator();
//Get general-input
$intMessageId = intval($_POST['frmAddComment_MessageId']);
$strSubject = contrexx_addslashes(strip_tags($_POST['frmAddComment_Subject']));
$strComment = \Cx\Core\Wysiwyg\Wysiwyg::prepareBBCodeForDb($_POST['frmAddComment_Comment']);
//Get specified-input
if ($this->_intCurrentUserId == 0) {
$intUserId = 0;
$strName = contrexx_addslashes(strip_tags($_POST['frmAddComment_Name']));
$strEMail = contrexx_addslashes(strip_tags($_POST['frmAddComment_EMail']));
$strWWW = contrexx_addslashes(strip_tags($objValidator->getUrl($_POST['frmAddComment_WWW'])));
} else {
$intUserId = $this->_intCurrentUserId;
$strName = '';
$strEMail = '';
$strWWW = '';
}
//Get options
$intIsActive = intval($this->_arrSettings['blog_comments_autoactivate']);
$intIsNotification = intval($this->_arrSettings['blog_comments_notification']);
//Validate general-input
if ($intMessageId <= 0) {
$this->_strErrorMessage .= $this->getFormError($_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_INSERT_MID']);
}
if (empty($strSubject)) {
$this->_strErrorMessage .= $this->getFormError($_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_ADD_SUBJECT']);
}
if (empty($strComment)) {
$this->_strErrorMessage .= $this->getFormError($_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_ADD_COMMENT']);
}
//Validate specified-input
if ($this->_intCurrentUserId == 0) {
if (empty($strName)) {
$this->_strErrorMessage .= $this->getFormError($_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_ADD_NAME']);
}
if (!$objValidator->isEmail($strEMail)) {
$this->_strErrorMessage .= $this->getFormError($_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_ADD_EMAIL']);
}
}
$captchaCheck = true;
if (!\FWUser::getFWUserObject()->objUser->login() && !\Cx\Core_Modules\Captcha\Controller\Captcha::getInstance()->check()) {
$captchaCheck = false;
}
//Now check error-string
if (empty($this->_strErrorMessage) && $captchaCheck) {
//No errors, insert entry
$objDatabase->Execute(' INSERT INTO ' . DBPREFIX . 'module_blog_comments
SET message_id = ' . $intMessageId . ',
lang_id = ' . $this->_intLanguageId . ',
is_active = "' . $intIsActive . '",
time_created = ' . time() . ',
ip_address = "' . $_SERVER['REMOTE_ADDR'] . '",
user_id = ' . $intUserId . ',
user_name = "' . $strName . '",
user_mail = "' . $strEMail . '",
user_www = "' . $strWWW . '",
subject = "' . $strSubject . '",
comment = "' . $strComment . '"
');
//Set a cookie with the current timestamp. Avoids flooding.
setcookie('BlogCommentLast', time(), 0, ASCMS_PATH_OFFSET . '/');
$this->_strStatusMessage = $_ARRAYLANG['TXT_BLOG_FRONTEND_DETAILS_COMMENT_INSERT_SUCCESS'];
$this->writeCommentRSS();
if ($intIsNotification) {
//Send notification to administrator
if (\Env::get('ClassLoader')->loadFile(ASCMS_LIBRARY_PATH . '/phpmailer/class.phpmailer.php')) {
$objMail = new \phpmailer();
if ($_CONFIG['coreSmtpServer'] > 0) {
if (($arrSmtp = \SmtpSettings::getSmtpAccount($_CONFIG['coreSmtpServer'])) !== false) {
$objMail->IsSMTP();
$objMail->Host = $arrSmtp['hostname'];
$objMail->Port = $arrSmtp['port'];
$objMail->SMTPAuth = true;
$objMail->Username = $arrSmtp['username'];
$objMail->Password = $arrSmtp['password'];
}
}
//.........这里部分代码省略.........