本文整理汇总了PHP中acymailing_checkRobots函数的典型用法代码示例。如果您正苦于以下问题:PHP acymailing_checkRobots函数的具体用法?PHP acymailing_checkRobots怎么用?PHP acymailing_checkRobots使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acymailing_checkRobots函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: optout
function optout()
{
acymailing_checkRobots();
$config = acymailing_config();
$app = JFactory::getApplication();
$userClass = acymailing_get('class.subscriber');
$userClass->geolocRight = true;
$my = JFactory::getUser();
$ajax = JRequest::getInt('ajax', 0);
if ($ajax) {
@ob_end_clean();
header("Content-type:text/html; charset=utf-8");
}
$redirectUrl = urldecode(JRequest::getString('redirectunsub'));
if (!empty($redirectUrl)) {
$this->setRedirect($redirectUrl);
}
$formData = JRequest::getVar('user', array(), '', 'array');
$email = trim(strip_tags(@$formData['email']));
if (empty($email) && !empty($my->email)) {
$email = $my->email;
}
$userHelper = acymailing_get('helper.user');
if (empty($email) || !$userHelper->validEmail($email)) {
if ($ajax) {
echo '{"message":"' . str_replace('"', '\\"', JText::_('VALID_EMAIL')) . '","type":"error","code":"7"}';
} else {
echo "<script>alert('" . JText::_('VALID_EMAIL', true) . "'); window.history.go(-1);</script>";
}
exit;
}
$alreadyExists = $userClass->get($email);
if (empty($alreadyExists->subid)) {
if ($ajax) {
echo '{"message":"' . str_replace('"', '\\"', JText::sprintf('NOT_IN_LIST', '<b><i>' . $email . '</i></b>')) . '","type":"error","code":"8"}';
exit;
}
if (empty($redirectUrl)) {
acymailing_display(JText::sprintf('NOT_IN_LIST', '<b><i>' . $email . '</i></b>'), 'warning');
} else {
$app->enqueueMessage(JText::sprintf('NOT_IN_LIST', '<b><i>' . $email . '</i></b>'), 'notice');
}
return $this->_closepop($redirectUrl);
}
if ($config->get('allow_modif', 'data') == 'none' and empty($my->email) || $my->email != $email) {
$mailClass = acymailing_get('helper.mailer');
$mailClass->checkConfirmField = false;
$mailClass->checkEnabled = false;
$mailClass->report = false;
$mailClass->sendOne('modif', $alreadyExists->subid);
if ($ajax) {
echo '{"message":"' . str_replace('"', '\\"', JText::_('IDENTIFICATION_SENT')) . '","type":"success","code":"9"}';
exit;
}
if (empty($redirectUrl)) {
acymailing_display(JText::_('IDENTIFICATION_SENT'), 'warning');
} else {
$app->enqueueMessage(JText::_('IDENTIFICATION_SENT'), 'notice');
}
return $this->_closepop($redirectUrl);
}
$visibleSubscription = JRequest::getVar('subscription', '', '', 'array');
$currentSubscription = $userClass->getSubscriptionStatus($alreadyExists->subid);
$hiddenSubscription = explode(',', JRequest::getVar('hiddenlists', '', '', 'string'));
$updatelists = array();
$removeSubscription = array_merge($visibleSubscription, $hiddenSubscription);
foreach ($removeSubscription as $idList) {
if (!empty($currentSubscription[$idList]) and $currentSubscription[$idList]->status != '-1') {
$updatelists[-1][] = $idList;
}
}
if (!empty($updatelists)) {
$listsubClass = acymailing_get('class.listsub');
$listsubClass->updateSubscription($alreadyExists->subid, $updatelists);
if ($config->get('unsubscription_message', 1)) {
if ($ajax) {
echo '{"message":"' . str_replace('"', '\\"', JText::_('UNSUBSCRIPTION_OK')) . '","type":"success","code":"10"}';
exit;
}
if (empty($redirectUrl)) {
acymailing_display(JText::_('UNSUBSCRIPTION_OK'), 'info');
} else {
if (strlen(JText::_('UNSUBSCRIPTION_OK')) > 0) {
$app->enqueueMessage(JText::_('UNSUBSCRIPTION_OK'));
}
}
}
} elseif ($config->get('unsubscription_message', 1) || $ajax) {
if ($ajax) {
echo '{"message":"' . str_replace('"', '\\"', JText::_('UNSUBSCRIPTION_NOT_IN_LIST')) . '","type":"success","code":"11"}';
exit;
}
if (empty($redirectUrl)) {
acymailing_display(JText::_('UNSUBSCRIPTION_NOT_IN_LIST'), 'info');
} else {
$app->enqueueMessage(JText::_('UNSUBSCRIPTION_NOT_IN_LIST'));
}
}
if ($ajax) {
exit;
//.........这里部分代码省略.........
示例2: sendarchive
function sendarchive(){
$config = acymailing_config();
if(!$config->get('show_receiveemail',0)) return $this->listing();
JRequest::checkToken() or die( 'Please make sure your cookies are enabled' );
acymailing_checkRobots();
$receiveEmails = JRequest::getVar( 'receivemail', array(), '', 'array' );
$email = trim(JRequest::getString('email'));
$userClass = acymailing_get('helper.user');
if(!$userClass->validEmail($email,true)){
echo "<script>alert('".JText::_('VALID_EMAIL',true)."'); window.history.go(-1);</script>";
exit;
}
$captchaClass = acymailing_get('class.acycaptcha');
$captchaClass->state = 'acycaptchacomponent';
if(!$captchaClass->check(JRequest::getString('acycaptcha'))){
$captchaClass->returnError();
}
JArrayHelper::toInteger( $receiveEmails, array() );
$db = JFactory::getDBO();
$db->setQuery("SELECT mailid FROM #__acymailing_mail WHERE mailid IN ('".implode("','",$receiveEmails)."') AND published = 1 AND visible = 1");
$mailids = acymailing_loadResultArray($db);
$receiver = new stdClass();
$receiver->email = $email;
$receiver->subid = 0;
$receiver->html = 1;
$receiver->name = trim(strip_tags(JRequest::getString('name','')));
$mailerHelper = acymailing_get('helper.mailer');
$mailerHelper->checkConfirmField = false;
$mailerHelper->checkEnabled = false;
$mailerHelper->checkAccept = false;
$mailerHelper->loadedToSend = true;
foreach($mailids as $oneMailid){
$mailerHelper->sendOne($oneMailid,$receiver);
}
return $this->listing();
}
示例3: savechanges
function savechanges()
{
JRequest::checkToken() or die('Please make sure your cookies are enabled');
acymailing_checkRobots();
$app = JFactory::getApplication();
$config = acymailing_config();
$subscriberClass = acymailing_get('class.subscriber');
$status = $subscriberClass->saveForm();
$subscriberClass->sendNotification();
if ($status) {
if ($subscriberClass->confirmationSent) {
if ($config->get('subscription_message', 1)) {
$app->enqueueMessage(JText::_('CONFIRMATION_SENT'), 'message');
}
$redirectlink = $config->get('sub_redirect');
} elseif ($subscriberClass->newUser) {
if ($config->get('subscription_message', 1)) {
$app->enqueueMessage(JText::_('SUBSCRIPTION_OK'), 'message');
}
$redirectlink = $config->get('sub_redirect');
} else {
$app->enqueueMessage(JText::_('SUBSCRIPTION_UPDATED_OK'), 'message');
$redirectlink = $config->get('modif_redirect');
}
} elseif ($subscriberClass->requireId) {
$app->enqueueMessage(JText::_('IDENTIFICATION_SENT'), 'notice');
} else {
$app->enqueueMessage(JText::_('ERROR_SAVING'), 'error');
}
if (!empty($redirectlink)) {
$this->setRedirect($redirectlink);
return;
}
if ($subscriberClass->identify(true)) {
return $this->modify();
}
return $this->subscribe();
}
示例4: savechanges
function savechanges(){
JRequest::checkToken() or die( 'Please make sure your cookies are enabled' );
acymailing_checkRobots();
$app = JFactory::getApplication();
$config = acymailing_config();
$subscriberClass = acymailing_get('class.subscriber');
$subscriberClass->geolocRight = true;
$subscriberClass->extendedEmailVerif = true;
if($config->get('captcha_enabled') AND !$subscriberClass->identify(true)){
$captchaClass = acymailing_get('class.acycaptcha');
$captchaClass->state = 'acycaptchacomponent';
if(!$captchaClass->check(JRequest::getString('acycaptcha'))){
$captchaClass->returnError();
}
}
$status = $subscriberClass->saveForm();
$subscriberClass->sendNotification();
if($status){
if($subscriberClass->confirmationSent){
if($config->get('subscription_message',1) && strlen(JText::_('CONFIRMATION_SENT'))>0) $app->enqueueMessage(JText::_('CONFIRMATION_SENT') ,'message');
$redirectlink = $config->get('sub_redirect');
}elseif($subscriberClass->newUser){
if($config->get('subscription_message',1) && strlen(JText::_('SUBSCRIPTION_OK'))>0) $app->enqueueMessage(JText::_('SUBSCRIPTION_OK'), 'message');
$redirectlink = $config->get('sub_redirect');
}else{
if(strlen(JText::_('SUBSCRIPTION_UPDATE_OK'))>0) $app->enqueueMessage(JText::_('SUBSCRIPTION_UPDATED_OK'), 'message');
$redirectlink = $config->get('modif_redirect');
}
}elseif($subscriberClass->requireId){
if(strlen(JText::_('IDENTIFICATION_SENT'))>0) $app->enqueueMessage(JText::_( 'IDENTIFICATION_SENT' ), 'notice');
}else{
if(strlen(JText::_('ERROR_SAVING'))>0) $app->enqueueMessage(JText::_( 'ERROR_SAVING' ), 'error');
}
if(!empty($redirectlink)){
$this->setRedirect($redirectlink);
return;
}
if($subscriberClass->identify(true)) return $this->modify();
return $this->subscribe();
}