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


PHP acymailing::getCID方法代码示例

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


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

示例1: scheduleconfirm

 function scheduleconfirm()
 {
     $mailid = acymailing::getCID('mailid');
     $listmailClass = acymailing::get('class.listmail');
     $mailClass = acymailing::get('class.mail');
     $this->assignRef('lists', $listmailClass->getReceivers($mailid));
     $this->assignRef('mail', $mailClass->get($mailid));
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:8,代码来源:view.html.php

示例2: saveForm

 function saveForm()
 {
     $field = null;
     $field->fieldid = acymailing::getCID('fieldid');
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['fields'] as $column => $value) {
         acymailing::secureField($column);
         $field->{$column} = strip_tags($value);
     }
     $fieldsOptions = JRequest::getVar('fieldsoptions', array(), '', 'array');
     foreach ($fieldsOptions as $column => $value) {
         $fieldsOptions[$column] = strip_tags($value);
     }
     $field->options = serialize($fieldsOptions);
     $fieldValues = JRequest::getVar('fieldvalues', array(), '', 'array');
     if (!empty($fieldValues)) {
         $field->value = array();
         foreach ($fieldValues['title'] as $i => $title) {
             if (strlen($title) < 1 and strlen($fieldValues['value'][$i]) < 1) {
                 continue;
             }
             $value = strlen($fieldValues['value'][$i]) < 1 ? $title : $fieldValues['value'][$i];
             $field->value[] = strip_tags($title) . '::' . strip_tags($value);
         }
         $field->value = implode("\n", $field->value);
     }
     if (empty($field->fieldid)) {
         if (empty($field->namekey)) {
             $field->namekey = $field->fieldname;
         }
         $field->namekey = preg_replace('#[^a-z0-9_\\-]#i', '', strtolower($field->namekey));
         if (empty($field->namekey)) {
             $this->errors[] = 'Please specify a namekey';
             return false;
         }
         $columnsTable = $this->database->getTableFields(acymailing::table('subscriber'));
         $columns = reset($columnsTable);
         if (isset($columns[$field->namekey])) {
             $this->errors[] = 'The field "' . $field->namekey . '" already exists';
             return false;
         }
         $query = 'ALTER TABLE `#__acymailing_subscriber` ADD `' . $field->namekey . '` VARCHAR ( 250 ) NULL';
         $this->database->setQuery($query);
         $this->database->query();
     }
     $fieldid = $this->save($field);
     if (!$fieldid) {
         return false;
     }
     if (empty($field->fieldid)) {
         $orderClass = acymailing::get('helper.order');
         $orderClass->pkey = 'fieldid';
         $orderClass->table = 'fields';
         $orderClass->reOrder();
     }
     JRequest::setVar('fieldid', $fieldid);
     return true;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:58,代码来源:fields.php

示例3: saveForm

 function saveForm()
 {
     $app =& JFactory::getApplication();
     $template = null;
     $template->tempid = acymailing::getCID('tempid');
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['template'] as $column => $value) {
         acymailing::secureField($column);
         $template->{$column} = strip_tags($value);
     }
     $styles = JRequest::getVar('styles', array(), '', 'array');
     foreach ($styles as $class => $oneStyle) {
         $styles[$class] = str_replace('"', "'", $oneStyle);
         if (empty($oneStyle)) {
             unset($styles[$class]);
         }
     }
     $newStyles = JRequest::getVar('otherstyles', array(), '', 'array');
     if (!empty($newStyles)) {
         foreach ($newStyles['classname'] as $id => $className) {
             if (!empty($className) and $className != JText::_('CLASS_NAME') and !empty($newStyles['style'][$id]) and $newStyles['style'][$id] != JText::_('CSS_STYLE')) {
                 $styles[$className] = str_replace('"', "'", $newStyles['style'][$id]);
             }
         }
     }
     $template->styles = serialize($styles);
     $template->body = JRequest::getVar('editor_body', '', '', 'string', JREQUEST_ALLOWRAW);
     if (!empty($styles['color_bg'])) {
         $pat1 = '#^([^<]*<[^>]*background-color:)([^;">]{1,10})#i';
         $found = false;
         if (preg_match($pat1, $template->body)) {
             $template->body = preg_replace($pat1, '$1' . $styles['color_bg'], $template->body);
             $found = true;
         }
         $pat2 = '#^([^<]*<[^>]*bgcolor=")([^;">]{1,10})#i';
         if (preg_match($pat2, $template->body)) {
             $template->body = preg_replace($pat2, '$1' . $styles['color_bg'], $template->body);
             $found = true;
         }
         if (!$found) {
             $template->body = '<div style="background-color:' . $styles['color_bg'] . ';" width="100%">' . $template->body . '</div>';
         }
     }
     $template->description = JRequest::getVar('editor_description', '', '', 'string', JREQUEST_ALLOWRAW);
     $tempid = $this->save($template);
     if (!$tempid) {
         return false;
     }
     if (empty($template->tempid)) {
         $orderClass = acymailing::get('helper.order');
         $orderClass->pkey = 'tempid';
         $orderClass->table = 'template';
         $orderClass->reOrder();
     }
     JRequest::setVar('tempid', $tempid);
     return true;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:57,代码来源:template.php

示例4: display

 function display($tpl = null)
 {
     global $Itemid;
     $db =& JFactory::getDBO();
     $app =& JFactory::getApplication();
     $document =& JFactory::getDocument();
     $params =& $app->getParams();
     $feedEmail = @$app->getCfg('feed_email') ? $app->getCfg('feed_email') : 'author';
     $siteEmail = $app->getCfg('mailfrom');
     $menus =& JSite::getMenu();
     $menu = $menus->getActive();
     if (empty($menu) and !empty($Itemid)) {
         $menus->setActive($Itemid);
         $menu = $menus->getItem($Itemid);
     }
     $myItem = empty($Itemid) ? '' : '&Itemid=' . $Itemid;
     if (is_object($menu)) {
         jimport('joomla.html.parameter');
         $menuparams = new JParameter($menu->params);
     }
     $listid = acymailing::getCID('listid');
     if (empty($listid) and !empty($menuparams)) {
         $listid = $menuparams->get('listid');
     }
     $document->link = acymailing::completeLink('archive&listid=' . intval($listid));
     $listClass = acymailing::get('class.list');
     if (empty($listid)) {
         return JError::raiseError(404, 'Mailing List not found');
     }
     $oneList = $listClass->get($listid);
     if (empty($oneList->listid)) {
         return JError::raiseError(404, 'Mailing List not found : ' . $listid);
     }
     if (!acymailing::isAllowed($oneList->access_sub) || !$oneList->published || !$oneList->visible) {
         return JError::raiseError(404, JText::_('ACY_NOTALLOWED'));
     }
     $filters = array();
     $filters[] = 'a.type = \'news\'';
     $filters[] = 'a.published = 1';
     $filters[] = 'a.visible = 1';
     $filters[] = 'c.listid = ' . $oneList->listid;
     $query = 'SELECT a.*';
     $query .= ' FROM ' . acymailing::table('listmail') . ' as c';
     $query .= ' LEFT JOIN ' . acymailing::table('mail') . ' as a on a.mailid = c.mailid ';
     $query .= ' WHERE (' . implode(') AND (', $filters) . ')';
     $query .= ' ORDER BY a.senddate DESC, c.mailid DESC';
     $db->setQuery($query, 0, $app->getCfg('feed_limit'));
     $rows = $db->loadObjectList();
     foreach ($rows as $row) {
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:51,代码来源:view.feed.php

示例5: view

 function view()
 {
     $mailid = acymailing::getCID('mailid');
     if (empty($mailid)) {
         $db =& JFactory::getDBO();
         $query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l LEFT JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid LEFT JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid';
         $query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1';
         if (!empty($listid)) {
             $query .= ' AND l.`listid` = ' . (int) $listid;
         }
         $query .= ' ORDER BY m.`mailid` DESC LIMIT 1';
         $db->setQuery($query);
         $mailid = $db->loadResult();
         if (empty($mailid)) {
             return JError::raiseError(404, 'Newsletter not found');
         }
     }
     $access_sub = true;
     $mailClass = acymailing::get('helper.mailer');
     $oneMail = $mailClass->load($mailid);
     if (empty($oneMail->mailid)) {
         return JError::raiseError(404, 'Newsletter not found : ' . $mailid);
     }
     if (!$access_sub or !$oneMail->published or !$oneMail->visible) {
         $key = JRequest::getString('key');
         if (empty($key) or $key !== $oneMail->key) {
             $app =& JFactory::getApplication();
             $app->enqueueMessage('You can not have access to this e-mail', 'error');
             $app->redirect(acymailing::completeLink('lists', false, true));
             return false;
         }
     }
     $user =& JFactory::getUser();
     if (!empty($user->email)) {
         $userClass = acymailing::get('class.subscriber');
         $receiver = $userClass->get($user->email);
     } else {
         $receiver = null;
         $receiver->name = JText::_('VISITOR');
     }
     $oneMail->sendHTML = true;
     $mailClass->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$oneMail, &$receiver));
     $document =& JFactory::getDocument();
     $document->setTitle($oneMail->subject);
     if (!empty($oneMail->text)) {
         echo nl2br($mailClass->textVersion($oneMail->text, false));
     } else {
         echo nl2br($mailClass->textVersion($oneMail->body, true));
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:50,代码来源:view.pdf.php

示例6: form

    function form()
    {
        $fieldid = acymailing::getCID('fieldid');
        $fieldsClass = acymailing::get('class.fields');
        if (!empty($fieldid)) {
            $field = $fieldsClass->get($fieldid);
        } else {
            $field = null;
            $field->published = 1;
            $field->type = 'text';
            $field->backend = 1;
        }
        if (!empty($field->fieldid)) {
            $fieldTitle = ' : ' . $field->namekey;
        } else {
            $fieldTitle = '';
        }
        acymailing::setTitle(JText::_('FIELD') . $fieldTitle, 'fields', 'fields&task=edit&fieldid=' . $fieldid);
        $script = 'function addLine(){
			var myTable=window.document.getElementById("tablevalues");
			var newline = document.createElement(\'tr\');
			var column = document.createElement(\'td\');
			var column2 = document.createElement(\'td\');
			var input = document.createElement(\'input\');
			var input2 = document.createElement(\'input\');
			input.type = \'text\';
			input2.type = \'text\';
			input.name = \'fieldvalues[title][]\';
			input2.name = \'fieldvalues[value][]\';
			column.appendChild(input);
			column2.appendChild(input2);
			newline.appendChild(column);
			newline.appendChild(column2);
			myTable.appendChild(newline);
		}';
        $doc =& JFactory::getDocument();
        $doc->addScriptDeclaration($script);
        $bar =& JToolBar::getInstance('toolbar');
        JToolBarHelper::save();
        JToolBarHelper::apply();
        JToolBarHelper::cancel();
        JToolBarHelper::divider();
        $bar->appendButton('Pophelp', 'fields-form');
        $this->assignRef('fieldtype', acymailing::get('type.fields'));
        $this->assignRef('field', $field);
        $this->assignRef('fieldsClass', $fieldsClass);
    }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:47,代码来源:view.html.php

示例7: saveForm

 function saveForm()
 {
     $object = null;
     $object->urlid = acymailing::getCID('urlid');
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['url'] as $column => $value) {
         acymailing::secureField($column);
         $object->{$column} = strip_tags($value);
     }
     $urlid = $this->save($object);
     if (!$urlid) {
         return false;
     }
     $js = "window.addEvent('domready', function(){\r\r\n\t\t\t\tvar allLinks = window.parent.document.getElements('a[id^=urlink_" . $urlid . "_]');\r\r\n\t\t\t\ti=0;\r\r\n\t\t\t\twhile(allLinks[i]){\r\r\n\t\t\t\t\tallLinks[i].innerHTML = '" . str_replace(array("'", '"'), array("&#039;", '&quot;'), $object->name) . "';\r\r\n\t\t\t\t\ti++;\r\r\n\t\t\t\t}\r\r\n\t\t\t\twindow.parent.document.getElementById('sbox-window').close();\r\r\n\t\t\t\t})";
     $doc =& JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     return true;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:18,代码来源:url.php

示例8: saveForm

 function saveForm()
 {
     $filter = null;
     $filter->filid = acymailing::getCID('filid');
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['filter'] as $column => $value) {
         acymailing::secureField($column);
         $filter->{$column} = strip_tags($value);
     }
     $config = acymailing::config();
     $alltriggers = array_keys((array) JRequest::getVar('trigger'));
     $filter->trigger = implode(',', $alltriggers);
     $newConfig = null;
     foreach ($alltriggers as $oneTrigger) {
         $name = 'triggerfilter_' . $oneTrigger;
         if ($config->get($name)) {
             continue;
         }
         $newConfig->{$name} = 1;
     }
     if (!empty($newConfig)) {
         $config->save($newConfig);
     }
     $data = array('action', 'filter');
     foreach ($data as $oneData) {
         $filter->{$oneData} = array();
         $formData = JRequest::getVar($oneData);
         foreach ($formData['type'] as $num => $oneType) {
             if (empty($oneType)) {
                 continue;
             }
             $filter->{$oneData}['type'][$num] = $oneType;
             $filter->{$oneData}[$num][$oneType] = $formData[$num][$oneType];
         }
         $filter->{$oneData} = serialize($filter->{$oneData});
     }
     $filid = $this->save($filter);
     if (!$filid) {
         return false;
     }
     JRequest::setVar('filid', $filid);
     return true;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:43,代码来源:filter.php

示例9: sendconfirm

 function sendconfirm()
 {
     $mailid = acymailing::getCID('mailid');
     $mailClass = acymailing::get('class.mail');
     $listmailClass = acymailing::get('class.listmail');
     $queueClass = acymailing::get('class.queue');
     $mail = $mailClass->get($mailid);
     $values = null;
     $values->nbqueue = $queueClass->nbQueue($mailid);
     if (empty($values->nbqueue)) {
         $lists = $listmailClass->getReceivers($mailid);
         $this->assignRef('lists', $lists);
         $db =& JFactory::getDBO();
         $db->setQuery('SELECT count(subid) FROM `#__acymailing_userstats` WHERE `mailid` = ' . intval($mailid));
         $values->alreadySent = $db->loadResult();
     }
     $this->assignRef('values', $values);
     $this->assignRef('mail', $mail);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:19,代码来源:view.html.php

示例10: saveForm

 function saveForm()
 {
     $app =& JFactory::getApplication();
     $list = null;
     $list->listid = acymailing::getCID('listid');
     $formData = JRequest::getVar('data', array(), '', 'array');
     foreach ($formData['list'] as $column => $value) {
         if ($app->isAdmin() or $this->allowedField('list', $column)) {
             acymailing::secureField($column);
             $list->{$column} = strip_tags($value);
         }
     }
     $list->description = JRequest::getVar('editor_description', '', '', 'string', JREQUEST_ALLOWRAW);
     $listid = $this->save($list);
     if (!$listid) {
         return false;
     }
     if (empty($list->listid)) {
         $orderClass = acymailing::get('helper.order');
         $orderClass->pkey = 'listid';
         $orderClass->table = 'list';
         $orderClass->groupMap = 'type';
         $orderClass->groupVal = empty($list->type) ? $this->type : $list->type;
         $orderClass->reOrder();
         $this->newlist = true;
     }
     if (!empty($formData['listcampaign'])) {
         $affectedLists = array();
         foreach ($formData['listcampaign'] as $affectlistid => $receiveme) {
             if (!empty($receiveme)) {
                 $affectedLists[] = $affectlistid;
             }
         }
         $listCampaignClass = acymailing::get('class.listcampaign');
         $listCampaignClass->save($listid, $affectedLists);
     }
     JRequest::setVar('listid', $listid);
     return true;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:39,代码来源:list.php

示例11: continuesend

 function continuesend()
 {
     $config = acymailing::config();
     $newcrontime = time() + 120;
     if ($config->get('cron_next') < $newcrontime) {
         $newValue = null;
         $newValue->cron_next = $newcrontime;
         $config->save($newValue);
     }
     $mailid = acymailing::getCID('mailid');
     $totalSend = JRequest::getVar('totalsend', 0, '', 'int');
     $alreadySent = JRequest::getVar('alreadysent', 0, '', 'int');
     $helperQueue = acymailing::get('helper.queue');
     $helperQueue->mailid = $mailid;
     $helperQueue->report = true;
     $helperQueue->total = $totalSend;
     $helperQueue->start = $alreadySent;
     $helperQueue->pause = $config->get('queue_pause');
     //->Process will exit the current page if it needs to be continued
     $helperQueue->process();
     ob_start();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:22,代码来源:send.php

示例12: store

 function store()
 {
     JRequest::checkToken() or die('Invalid Token');
     $oldMailid = acymailing::getCID('mailid');
     $mailClass = acymailing::get('class.mail');
     if ($mailClass->saveForm()) {
         $data = JRequest::getVar('data');
         $type = @$data['mail']['type'];
         if (!empty($type) and in_array($type, array('unsub', 'welcome'))) {
             $subject = addslashes($data['mail']['subject']);
             $mailid = JRequest::getInt('mailid');
             if ($type == 'unsub') {
                 $js = "var mydrop = window.top.document.getElementById('datalistunsubmailid'); ";
                 $js .= "var type = 'unsub';";
             } else {
                 //type=welcome
                 $js = "var mydrop = window.top.document.getElementById('datalistwelmailid'); ";
                 $js .= "var type = 'welcome';";
             }
             if (empty($oldMailid)) {
                 $js .= 'var optn = document.createElement("OPTION");';
                 $js .= "optn.text = '[{$mailid}] {$subject}'; optn.value = '{$mailid}';";
                 $js .= 'mydrop.options.add(optn);';
                 $js .= 'lastid = 0; while(mydrop.options[lastid+1]){lastid = lastid+1;} mydrop.selectedIndex = lastid;';
                 $js .= 'window.top.changeMessage(type,' . $mailid . ');';
             } else {
                 $js .= "lastid = 0; notfound = true; while(notfound && mydrop.options[lastid]){if(mydrop.options[lastid].value == {$mailid}){mydrop.options[lastid].text = '[{$mailid}] {$subject}';notfound = false;} lastid = lastid+1;}";
             }
             $doc =& JFactory::getDocument();
             $doc->addScriptDeclaration($js);
         }
         acymailing::display(JText::_('JOOMEXT_SUCC_SAVED'), 'success');
     } else {
         acymailing::display(JText::_('ERROR_SAVING'), 'error');
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:36,代码来源:email.php

示例13: form

    function form()
    {
        $db =& JFactory::getDBO();
        $config = acymailing::config();
        $filid = acymailing::getCID('filid');
        $filterClass = acymailing::get('class.filter');
        if (!empty($filid)) {
            $filter = $filterClass->get($filid);
        } else {
            $filter = null;
            $filter->action = JRequest::getVar('action');
            $filter->filter = JRequest::getVar('filter');
            $filter->published = 1;
        }
        JPluginHelper::importPlugin('acymailing');
        $this->dispatcher =& JDispatcher::getInstance();
        $typesFilters = array();
        $typesActions = array();
        $outputFilters = implode('', $this->dispatcher->trigger('onAcyDisplayFilters', array(&$typesFilters)));
        $outputActions = implode('', $this->dispatcher->trigger('onAcyDisplayActions', array(&$typesActions)));
        $typevaluesFilters = array();
        $typevaluesActions = array();
        $typevaluesFilters[] = JHTML::_('select.option', '', JText::_('FILTER_SELECT'));
        $typevaluesActions[] = JHTML::_('select.option', '', JText::_('ACTION_SELECT'));
        $doc =& JFactory::getDocument();
        $js = "function updateFilter(filterNum){";
        foreach ($typesFilters as $oneType => $oneName) {
            $typevaluesFilters[] = JHTML::_('select.option', $oneType, $oneName);
            $js .= "filterArea = 'filter'+filterNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'none';}";
        }
        $js .= "filterArea = 'filter'+filterNum+window.document.getElementById('filtertype'+filterNum).value;\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'block';}\r\n\t\t\t}";
        $js .= "function updateAction(actionNum){";
        foreach ($typesActions as $oneType => $oneName) {
            $typevaluesActions[] = JHTML::_('select.option', $oneType, $oneName);
            $js .= "actionArea = 'action'+actionNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'none';}";
        }
        $js .= "actionArea = 'action'+actionNum+window.document.getElementById('actiontype'+actionNum).value;\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'block';}\r\n\t\t\t}";
        $js .= "var numFilters = 0;\r\n\t\t\t\tvar numActions = 0;\r\n\t\t\t\tfunction addFilter(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'filter'+numFilters;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('filters_original').innerHTML.replace(/__num__/g, numFilters);\r\n\t\t\t\t\tdocument.getElementById('allfilters').appendChild(newdiv); updateFilter(numFilters); numFilters++; }\n\t\t\t\tfunction addAction(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'action'+numActions;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('actions_original').innerHTML.replace(/__num__/g, numActions);\r\n\t\t\t\t\tdocument.getElementById('allactions').appendChild(newdiv); updateAction(numActions); numActions++; }";
        $js .= "window.addEvent('domready', function(){ addFilter(); addAction(); });";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $js .= 'function submitbutton(pressbutton){
						if (pressbutton != \'save\') {
							submitform( pressbutton );
							return;
						}';
        } else {
            $js .= 'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton != \'save\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
        }
        $js .= "if(window.document.getElementById('filterinfo').style.display == 'none'){\r\n\t\t\t\t\t\twindow.document.getElementById('filterinfo').style.display = 'block';\r\n\t\t\t\t\t\ttry{allspans = window.document.getElementById('toolbar-save').getElementsByTagName(\"span\"); allspans[0].className = 'icon-32-apply';}catch(err){}\r\n\t\t\t\t\t\treturn false;}\r\n\t\t\t\t\tif(window.document.getElementById('title').value.length < 2){alert('" . JText::_('ENTER_TITLE', true) . "'); return false;}";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $js .= "submitform( pressbutton );} ";
        } else {
            $js .= "Joomla.submitform(pressbutton,document.adminForm);}; ";
        }
        $doc->addScriptDeclaration($js);
        $js = '';
        $data = array('action', 'filter');
        foreach ($data as $datatype) {
            if (empty($filter->{$datatype})) {
                continue;
            }
            foreach ($filter->{$datatype}['type'] as $num => $oneType) {
                if (empty($oneType)) {
                    continue;
                }
                $js .= "while(!document.getElementById('" . $datatype . "type{$num}')){add" . ucfirst($datatype) . "();}\r\n\t\t\t\t\t\tdocument.getElementById('" . $datatype . "type{$num}').value= '{$oneType}';\r\n\t\t\t\t\t\tupdate" . ucfirst($datatype) . "({$num});";
                if (empty($filter->{$datatype}[$num][$oneType])) {
                    continue;
                }
                foreach ($filter->{$datatype}[$num][$oneType] as $key => $value) {
                    $js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $value)) . "';";
                }
            }
        }
        $listid = JRequest::getInt('listid');
        if (!empty($listid)) {
            $js .= "document.getElementById('actiontype0').value = 'list'; updateAction(0); document.adminForm.elements['action[0][list][selectedlist]'].value = '" . $listid . "';";
        }
        $doc->addScriptDeclaration("window.addEvent('domready', function(){ {$js} });");
        $triggers = array();
        $triggers['daycron'] = JText::_('AUTO_CRON_FILTER');
        $nextDate = $config->get('cron_plugins_next');
        if (!empty($nextDate)) {
            $triggers['daycron'] .= ' (' . JText::_('NEXT_RUN') . ' : ' . acymailing::getDate($nextDate, '%d %B %H:%M') . ')';
        }
        $triggers['subcreate'] = JText::_('ON_USER_CREATE');
        $triggers['subchange'] = JText::_('ON_USER_CHANGE');
        $this->dispatcher->trigger('onAcyDisplayTriggers', array(&$triggers));
        $name = empty($filter->name) ? '' : ' : ' . $filter->name;
        acymailing::setTitle(JText::_('ACY_FILTER') . $name, 'filter', 'filter&task=edit&filid=' . $filid);
        $bar =& JToolBar::getInstance('toolbar');
        $bar->appendButton('Confirm', JText::_('PROCESS_CONFIRMATION'), 'process', JText::_('PROCESS'), 'process', false, false);
        JToolBarHelper::divider();
        if (acymailing::level(3)) {
            JToolBarHelper::save();
            if (!empty($filter->filid)) {
//.........这里部分代码省略.........
开发者ID:bizanto,项目名称:Hooked,代码行数:101,代码来源:view.html.php

示例14: process

 function process()
 {
     $mailid = acymailing::getCID('mailid');
     $queueClass = acymailing::get('class.queue');
     $queueStatus = $queueClass->queueStatus($mailid);
     $nextqueue = $queueClass->queueStatus($mailid, true);
     if (acymailing::level(1)) {
         $scheduleClass = acymailing::get('helper.schedule');
         $scheduleNewsletter = $scheduleClass->getScheduled();
         $this->assignRef('schedNews', $scheduleNewsletter);
     }
     if (empty($queueStatus) and empty($scheduleNewsletter)) {
         acymailing::display(JText::_('NO_PROCESS'), 'info');
     }
     $infos = null;
     $infos->mailid = $mailid;
     $this->assignRef('queue', $queueStatus);
     $this->assignRef('nextqueue', $nextqueue);
     $this->assignRef('infos', $infos);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:20,代码来源:view.html.php

示例15: test

 function test()
 {
     if (!$this->isAllowed($this->aclCat, 'manage')) {
         return;
     }
     $this->store();
     $tempid = acymailing::getCID('tempid');
     $receiver_type = JRequest::getVar('receiver_type', '', '', 'string');
     if (empty($tempid) or empty($receiver_type)) {
         return false;
     }
     $mailer = acymailing::get('helper.mailer');
     $mailer->report = true;
     $config = acymailing::config();
     $subscriberClass = acymailing::get('class.subscriber');
     $userHelper = acymailing::get('helper.user');
     JPluginHelper::importPlugin('acymailing');
     $dispatcher =& JDispatcher::getInstance();
     $app =& JFactory::getApplication();
     $receivers = array();
     if ($receiver_type == 'user') {
         $user = JFactory::getUser();
         $receivers[] = $user->email;
     } elseif ($receiver_type == 'other') {
         $receivers[] = JRequest::getVar('test_email', '', '', 'string');
     } else {
         $gid = substr($receiver_type, strpos($receiver_type, '_') + 1);
         if (empty($gid)) {
             return false;
         }
         $db =& JFactory::getDBO();
         $db->setQuery('SELECT email from ' . acymailing::table('users', false) . ' WHERE gid = ' . intval($gid));
         $receivers = $db->loadResultArray();
     }
     if (empty($receivers)) {
         $app->enqueueMessage(JText::_('NO_SUBSCRIBER'), 'notice');
         return $this->edit();
     }
     $classTemplate = acymailing::get('class.template');
     $myTemplate = $classTemplate->get($tempid);
     $myTemplate->sendHTML = 1;
     $myTemplate->mailid = 0;
     if (empty($myTemplate->subject)) {
         $myTemplate->subject = $myTemplate->name;
     }
     if (empty($myTemplate->altBody)) {
         $myTemplate->altbody = $mailer->textVersion($myTemplate->body);
     }
     $dispatcher->trigger('acymailing_replacetags', array(&$myTemplate));
     $myTemplate->body = acymailing::absoluteURL($myTemplate->body);
     $result = true;
     foreach ($receivers as $receiveremail) {
         $copy = $myTemplate;
         $mailer->clearAll();
         $mailer->setFrom($copy->fromemail, $copy->fromname);
         if (!empty($copy->replyemail)) {
             $replyToName = $config->get('add_names', true) ? $mailer->cleanText($copy->replyname) : '';
             $mailer->AddReplyTo($mailer->cleanText($copy->replyemail), $replyToName);
         }
         $receiver = $subscriberClass->get($receiveremail);
         if (empty($receiver->subid)) {
             if ($userHelper->validEmail($receiveremail)) {
                 $newUser = null;
                 $newUser->email = $receiveremail;
                 $subscriberClass->sendConf = false;
                 $subid = $subscriberClass->save($newUser);
                 $receiver = $subscriberClass->get($subid);
             }
             if (empty($receiver->subid)) {
                 continue;
             }
         }
         $addedName = $config->get('add_names', true) ? $mailer->cleanText($receiver->name) : '';
         $mailer->AddAddress($mailer->cleanText($receiver->email), $addedName);
         $dispatcher->trigger('acymailing_replaceusertags', array(&$copy, &$receiver));
         $mailer->IsHTML(true);
         $mailer->sendHTML = true;
         $mailer->Body = $copy->body;
         $mailer->Subject = $copy->subject;
         if ($config->get('multiple_part', false)) {
             $mailer->AltBody = $copy->altbody;
         }
         $mailer->send();
     }
     return $this->edit();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:86,代码来源:template.php


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