function cancel($alt = 'Cancel', $href = '') { compa::showIcon('cancel.png', 'back', 'cancel'); compa::showIcon('cancel_f2.png', 'back', 'cancel', 0); if ($href) { $link = $href; } else { $link = 'javascript:window.history.back();'; } ?> <td> <a class="toolbar" href="<?php echo $link; ?> " onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('cancel','','<?php echo $image2; ?> ',1);"> <?php echo $image; ?> <?php echo $alt; ?> </a> </td> <?php }
function encodeutf($string) { if (compa::joom10()) { return $string; } else { return utf8_encode($string); } }
function quickiconButton($link, $image, $text, $external = false, $accessLevel = '', $frontEnd = false) { if (acajoom::checkPermissions($accessLevel)) { if ($frontEnd and $GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $link = sefRelToAbs($link); } ?> <div style="float:left;"> <div class="icon"> <a href="<?php echo $link; ?> " <?php if ($external) { echo 'target="_blank"'; } ?> > <?php compa::showIcon($image, $text); ?> <span><?php echo $text; ?> </span> </a> </div> </div> <?php } }
function miscSettings($lists) { ?> <fieldset class="acajoomcss"> <legend><?php echo _ACA_MISC_SETTINGS; ?> </legend> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_GUIDE; $tip = _ACA_SHOW_GUIDE_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_guide']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_TIPS; $tip = _ACA_SHOW_TIPS_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_tips']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ITEMID; $tip = _ACA_ITEMID_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <input class="inputbox" type="text" name="config['itemidAca']" size="5" value="<?php echo $GLOBALS[ACA . 'itemidAca']; ?> "> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_AUTO_UPDATE; $tip = _ACA_AUTO_UPDATE_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['update_notification']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_LISTS_TIPS; $title = _ACA_SHOW_LISTS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_lists']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_USE_SEF; $tip = _ACA_USE_SEF_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['use_sef']; ?> </td> </tr> <?php if (class_exists('auto')) { auto::miscSettings($lists); } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_FOOTER_TIPS; $title = _ACA_SHOW_FOOTER; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_footer']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_AUTHOR; $tip = _ACA_SHOW_AUTHOR_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_author']; ?> </td> </tr> <?php if (class_exists('pro')) { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_JCALPRO; $tip = _ACA_SHOW_JCALPRO_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_jcalpro']; ?> </td> </tr> <?php } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ADDEMAILREDLINK; $tip = _ACA_ADDEMAILREDLINK_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['addEmailRedLink']; ?> </td> </tr> <?php if ($GLOBALS[ACA . 'type'] == 'Plus' or $GLOBALS[ACA . 'type'] == 'PRO') { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_SIGNATURE_TIPS; $title = _ACA_SHOW_SIGNATURE; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_signature']; ?> </td> </tr> <?php } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_LISTS_EDITOR_TIPS; $title = _ACA_LISTS_EDITOR; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['listHTMLeditor']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_UPDATE_URL_TIPS . '<br />' . _ACA_UPDATE_URL_WARNING; $title = _ACA_UPDATE_URL; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> <span class="error"> <?php echo acajoom::WarningIcon(_ACA_UPDATE_URL_WARNING); ?> </span> </td> <td> <input class="inputbox" type="text" name="config['update_url']" size="50" value="<?php echo $GLOBALS[ACA . 'update_url']; ?> "> </td> </tr> </tbody> </table> </fieldset> <fieldset class="acajoomcss"> <legend><?php echo _ACA_ERR_SETTINGS; ?> </legend> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ERR_SHOW; $tip = _ACA_ERR_SHOW_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['report_error']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ERR_SEND; $tip = _ACA_ERR_SEND_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['send_error']; ?> </td> </tr> </tbody> </table> </fieldset> <?php }
define('_ACA_JCALTAGS_START_TIPS', compa::encodeutf('Select Yes if you want to insert the start date of the event')); define('_ACA_JCALTAGS_READMORE', compa::encodeutf('Read more:')); define('_ACA_JCALTAGS_READMORE_TIPS', compa::encodeutf('Select Yes if you want to insert a <b>read more link</b> for this event')); define('_ACA_REDIRECTCONFIRMATION', compa::encodeutf('Redirect URL')); define('_ACA_REDIRECTCONFIRMATION_TIPS', compa::encodeutf('If you require a confirmation e-mail, the user will be confirmed and redirected to this URL if he clicks on the confirmation link.')); //since 2.0.0 compatibility with Joomla 1.5 if (!defined('_CMN_SAVE') and defined('CMN_SAVE')) { define('_CMN_SAVE', CMN_SAVE); } if (!defined('_CMN_SAVE')) { define('_CMN_SAVE', 'Save'); } if (!defined('_NO_ACCOUNT')) { define('_NO_ACCOUNT', 'No account yet?'); } if (!defined('_CREATE_ACCOUNT')) { define('_CREATE_ACCOUNT', 'Register'); } if (!defined('_NOT_AUTH')) { define('_NOT_AUTH', 'You are not authorised to view this resource.'); } //since 3.0.0 define('_ACA_DISABLETOOLTIP', compa::encodeutf('Disable Tooltip')); define('_ACA_DISABLETOOLTIP_TIPS', compa::encodeutf('Disable the tooltip on the frontend')); define('_ACA_MINISENDMAIL', compa::encodeutf('Use Mini SendMail')); define('_ACA_MINISENDMAIL_TIPS', compa::encodeutf('If your server use Mini SendMail, select this option to don\'t add the name of the user in the header of the e-mail')); //Since 3.1.5 define('_ACA_READMORE', compa::encodeutf('Read more...')); define('_ACA_VIEWARCHIVE', compa::encodeutf('Click here')); //Acajoom GPL define('_ACA_DESC_GPL', _ACA_DESC_NEWS);
function jcalpro() { if (ACA_CMSTYPE) { $database =& JFactory::getDBO(); } else { global $database; } //endif $tip = _ACA_JCALTAGS_DESC_TIPS; $title = _ACA_JCALTAGS_DESC; $desc = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; $tip = _ACA_JCALTAGS_START_TIPS; $title = _ACA_JCALTAGS_START; $start = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; $tip = _ACA_JCALTAGS_READMORE_TIPS; $title = _ACA_JCALTAGS_READMORE; $read = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; $query = "SELECT `cat_id`,`cat_name` FROM #__jcalpro_categories"; $database->setQuery($query); $jcalcats = $database->loadObjectList(); $events = array(); $year = intval(date('Y')); if (!empty($jcalcats)) { foreach ($jcalcats as $jcalcat) { $query = "SELECT `extid`, `title` ,`start_date` FROM #__jcalpro_events where `cat` = " . $jcalcat->cat_id . " AND (`start_date` >= '" . $year . "' OR `end_date` >= '" . $year . "' ) ORDER BY `start_date` DESC"; $database->setQuery($query); $events[$jcalcat->cat_id] = $database->loadObjectList(); } } ?> <script type="text/javascript"> <!-- var events = new Array; <?php if (!empty($events)) { $i = 0; foreach ($events as $cat => $eventcat) { if (!empty($eventcat)) { foreach ($eventcat as $event) { echo 'events[' . $i . '] = new Array(\'' . $cat . '\',\'' . $event->extid . '\',\'' . addslashes($event->title) . ' (' . $event->start_date . ')\');' . "\n"; $i++; } } } } ?> var formname = 'adminForm'; if(!document.adminForm){ formname = 'mosForm'; } function updatejCalCat(){ var catid = eval('document.'+formname+'.jcal_cat.value'); var list = eval( 'document.'+formname+'.jcal_event'); var i = 0; // empty the list for (i in list.options.length) { list.options[i] = null; } i = 0; for (a in events) { if (events[a][0] == catid) { opt = new Option(); opt.value = events[a][1]; opt.text = events[a][2]; list.options[i++] = opt; } } list.length = i; } function updatejCaltag(){ var eventid = eval('document.'+formname+'.jcal_event.value'); var start = eval('document.'+formname+'.jcal_start'); var desc = eval('document.'+formname+'.jcal_desc'); var read = eval('document.'+formname+'.jcal_read'); var tag = eval('document.'+formname+'.jcal_tag'); for (i=0;i<start.length;i++) { if (start[i].checked) { var start_value = start[i].value; } } for (i=0;i<desc.length;i++) { if (desc[i].checked) { var desc_value = desc[i].value; } } for (i=0;i<read.length;i++) { if (read[i].checked) { var read_value = read[i].value; } } tag.value = "{jcalevent:" + eventid + "|" + start_value + "|" + desc_value + "|" + read_value + "}"; } //--> </script> <table class="acajoomcss_bots" width="100%"> <tr> <td style="vertical-align: top;" colspan="2"> <?php $tip = _ACA_JCALTAGS_TITLE_TIPS; $title = _ACA_JCALTAGS_TITLE; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> <input class="inputbox" type="text" onfocus="this.select();" size="20" name="jcal_tag"/> </td> </tr> <tr> <td> <?php echo $start; ?> </td> <td> <input type="radio" name="jcal_start" value="0" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/publish_x.png" width="12" height="12" border="0" alt="No" /> <input type="radio" name="jcal_start" value="1" checked="checked" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/tick.png" width="12" height="12" border="0" alt="Yes" /> </td> </tr> <tr> <td> <?php echo $desc; ?> </td> <td> <input type="radio" name="jcal_desc" value="0" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/publish_x.png" width="12" height="12" border="0" alt="No" /> <input type="radio" name="jcal_desc" value="1" checked="checked" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/tick.png" width="12" height="12" border="0" alt="Yes" /> </td> </tr> <tr> <td> <?php echo $read; ?> </td> <td> <input type="radio" name="jcal_read" value="0" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/publish_x.png" width="12" height="12" border="0" alt="No" /> <input type="radio" name="jcal_read" value="1" checked="checked" onclick="updatejCaltag();" /> <img src="<?php echo ACA_JPATH_LIVE; ?> /administrator/images/tick.png" width="12" height="12" border="0" alt="Yes" /> </td> </tr> <tr> <td colspan="2"> <?php echo '<select class="inputbox" onchange="updatejCalCat();" size="1" name="jcal_cat">'; if (!empty($jcalcats)) { foreach ($jcalcats as $jcalcat) { echo '<option value="' . $jcalcat->cat_id . '">' . $jcalcat->cat_name . '</option>'; } } echo '</select>'; ?> </td> </tr> <tr> <td colspan="2"> <select name="jcal_event" class="inputbox" size="30" onchange="updatejCaltag();"> <?php if (!empty($jcalcats)) { if (!empty($events[$jcalcats[0]->cat_id])) { foreach ($events[$jcalcats[0]->cat_id] as $event) { echo '<option value="' . $event->extid . '">' . $event->title . ' (' . $event->start_date . ') </option>' . "\n"; } } } ?> </select> </td> </tr> </table> <?php }
/** * @copyright Copyright (C) 2009 Joobi Limited All rights reserved. * @license This file is released under the GPL license (http://www.gnu.org/licenses ) * @link http://www.ijoobi.com */ function subscribers($action, $task, $userid, $listId, $cid) { $erro = new xerr(__FILE__, __FUNCTION__); if (ACA_CMSTYPE) { // joomla 15 $subscriberId = intval(JRequest::getVar('subscriber_id', '')); $message = JRequest::getVar('message', ''); } else { //joomla 1x $subscriberId = intval(mosGetParam($_REQUEST, 'subscriber_id', '')); $message = mosGetParam($_REQUEST, 'message', ''); } //endif $doShowSubscribers = true; subscribers::updateSubscribers(); switch ($task) { case 'updateOneSub': $doShowSubscribers = true; $message = acajoom::printYN(subscribers::updateOneSubscriber(), _ACA_UPDATED_SUCCESSFULLY, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'deleteOneSub': $doShowSubscribers = true; $message = acajoom::printYN(subscribers::deleteOneSubscriber($subscriberId), _ACA_SUBSCRIBER_DELETED, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'cancelSub': $doShowSubscribers = true; backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'edit': foreach ($cid as $id) { compa::redirect('index2.php?option=com_acajoom&act=subscribers&task=show&userid=' . $id); } break; case 'show': $doShowSubscribers = false; $qid[0] = $userid; $subscriber = subscribers::getSubscribersFromId($qid, false); $lists = lists::getLists(0, 0, 1, '', false, false); $queues = queue::getSubscriberLists($userid); $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); backHTML::formStart('', 0, ''); echo subscribersHTML::editSubscriber($subscriber, $lists, $queues, $forms, acajoom::checkPermissions('admin'), false, false); $go[] = acajoom::makeObj('act', $action); $go[] = acajoom::makeObj('subscriber_id', $subscriber->id); $go[] = acajoom::makeObj('user_id', $subscriber->user_id); backHTML::formEnd($go); break; case 'new': case 'add': $doShowSubscribers = false; $newSubscriber->id = ''; $newSubscriber->user_id = 0; $newSubscriber->name = ''; $newSubscriber->email = ''; $newSubscriber->receive_html = 1; $newSubscriber->confirmed = 1; $newSubscriber->blacklist = 0; $newSubscriber->timezone = '00:00:00'; $newSubscriber->language_iso = 'eng'; $newSubscriber->params = ''; $newSubscriber->subscribe_date = acajoom::getNow(); $lists = lists::getLists(0, 0, 1, '', false, false); $queues = ''; $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); backHTML::formStart('', 0, ''); echo subscribersHTML::editSubscriber($newSubscriber, $lists, $queues, $forms, acajoom::checkPermissions('admin'), false, false); $go[] = acajoom::makeObj('act', $action); $go[] = acajoom::makeObj('subscriber_id', $newSubscriber->id); $go[] = acajoom::makeObj('user_id', $newSubscriber->user_id); backHTML::formEnd($go); break; case 'doNew': $doShowSubscribers = true; $message = acajoom::printYN(subscribers::insertOneSubscriber(), _ACA_UPDATED_SUCCESSFULLY, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'delete': if (!is_array($cid) || count($cid) < 1) { echo "<script> alert('Select an item to delete'); window.history.go(-1);</script>\n"; return false; } else { $status = true; foreach ($cid as $id) { $erro->ck = subscribers::deleteOneSubscriber($id); if (!$erro->ck) { $status = false; } } $message = acajoom::printYN($status, _ACA_SUBSCRIBER_DELETED, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); } break; case 'update': if (!is_array($cid) || count($cid) < 1) { echo "<script> alert('Select an item to update'); window.history.go(-1);</script>\n"; return false; } else { foreach ($cid as $id) { if (ACA_CMSTYPE) { // joomla 15 $changes = JRequest::getVar($id, array(0)); } else { //joomla 1x $changes = mosGetParam($_REQUEST, $id, array(0)); } //endif if (!isset($changes['receive_html'])) { $changes['receive_html'] = 0; } if (!isset($changes['confirmed'])) { $changes['confirmed'] = 0; } } } $message = acajoom::print_message(_ACA_UPDATED_SUCCESSFULLY, 1); break; case 'export': $doShowSubscribers = false; subscribersHTML::export($action, $listId); break; case 'doExport': $message = acajoom::printYN(subscribers::export($listId), _EXPORT, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'import': $doShowSubscribers = false; $lists = lists::getLists(0, 0, 1, 'listnameA', false, false, true); subscribersHTML::import($action, $lists); break; case 'doImport': $message = acajoom::printYN(subscribers::import($listId), _ACA_IMPORT_FINISHED, _ACA_ERROR); backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; break; case 'subscribeAll': break; case 'unsubscribeAll': break; case 'cancel': if ($listId != 0) { $listId = 0; } else { compa::redirect('index2.php?option=com_acajoom'); } backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; case 'cpanel': backHTML::controlPanel(); $doShowSubscribers = 0; break; default: backHTML::_header(_ACA_MENU_SUBSCRIBERS, 'addusers.png', $message, $task, $action); break; } if ($doShowSubscribers) { if (ACA_CMSTYPE) { // joomla 15 $start = intval(JRequest::getVar('start', 0)); $conf =& JFactory::getConfig(); $mail->Mailer = $conf->getValue('config.mailer'); // $GLOBALS['mosConfig_mailer']; $limit = intval(JRequest::getVar('limit', $conf->getValue('config.list_limit'))); $emailsearch = JRequest::getVar('emailsearch', ''); } else { //joomla 1x $mail->Mailer = $GLOBALS['mosConfig_mailer']; $start = intval(mosGetParam($_REQUEST, 'start', 0)); $limit = intval(mosGetParam($_REQUEST, 'limit', $GLOBALS['mosConfig_list_limit'])); $emailsearch = mosGetParam($_REQUEST, 'emailsearch', ''); } //endif $total = 0; $subscribers = subscribers::getSubscribers($start, $limit, $emailsearch, $total, $listId, '', '', '', 'sub_dateD'); if ($listId != 0) { $showAdmin = true; } else { $showAdmin = false; } $dropDownList = lisType::getListsDropList(0, '', ''); if (ACA_CMSTYPE) { // joomla 15 $lists['listid'] = JHTML::_('select.genericlist', $dropDownList, 'listid', 'class="inputbox" size="1" onchange="document.AcajoomFilterForm.submit();"', 'id', 'list_name', $listId); } else { //joomla 1x $lists['listid'] = mosHTML::selectList($dropDownList, 'listid', 'class="inputbox" size="1" onchange="document.AcajoomFilterForm.submit();"', 'id', 'list_name', $listId); } //endif $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; $forms['select'] = " <form action='index2.php' method='post' name='AcajoomFilterForm'> \n"; backHTML::formStart('show_mailing', 0, ''); subscribersHTML::showSubscribers($subscribers, $action, $listId, $lists, $start, $limit, $total, $showAdmin, $listId, $emailsearch, $forms); } return true; }
/** * @copyright Copyright (C) 2009 Joobi Limited All rights reserved. * @license This file is released under the GPL license (http://www.gnu.org/licenses ) * @link http://www.ijoobi.com */ function mailing($action, $task, $listId, $listType, $mailingId, $message) { $showMailings = false; switch ($task) { case 'edit': if (ACA_CMSTYPE) { // joomla 15 $issue_nb = intval(JRequest::getVar('issue_nb', 1)); } else { //joomla 1x $issue_nb = intval(mosGetParam($_REQUEST, 'issue_nb', 1)); } //endif $list = lists::getOneList($listId); $mailing = xmailing::getOneMailing($list, $mailingId, $issue_nb, $new); $show = lisType::showType($mailing->list_type, 'editmailing'); if ($mailing->published != 1 or $mailing->list_type != 1 or isset($show['admin']) and $show['admin']) { $forms['main'] = " <form action='index2.php' method='post' enctype='multipart/form-data' name='adminForm'> \n "; xmailing::_header($task, $action, $mailing->list_type, $message, 'edit'); mailingsHTML::editMailing($mailing, $new, $listId, $forms, $show); $go[] = acajoom::makeObj('act', $action); backHTML::formEnd($go); } else { $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n\r"; xmailing::_header($task, $action, $mailing->list_type, $message); //backHTML::formStart(); mailingsHTML::viewMailing($mailing, $forms); $go[] = acajoom::makeObj('act', 'mailing'); $go[] = acajoom::makeObj('task', 'viewmailing'); $go[] = acajoom::makeObj('listid', $mailing->list_id); backHTML::formEnd($go); } break; case 'new': case 'add': if ($listId == 0) { echo "<script> alert('" . addslashes(_ACA_SELCT_MAILING) . "'); window.history.go(-1);</script>\n"; return false; } else { $total = xmailing::countMailings($listId, ''); $total++; compa::redirect('index2.php?option=com_acajoom&act=mailing&task=edit&mailingid=0&issue_nb=' . $total . '&listid=' . $listId); } break; case 'saveSend': xmailing::saveMailing($mailingId, $listId); case 'sendNewsletter': if ($listId < 1 or $listType < 0) { $mailing = xmailing::getOneMailing('', $mailingId, '', $new, true); $listId = $mailing->list_id; $listType = $mailing->list_type; } if (lisType::sendType($listType)) { $checkStatus = lists::checkStatus($listId); if ($checkStatus == false) { $message = acajoom::printYN(0, _ACA_MESSAGE_SENT_SUCCESSFULLY, _ACA_NOT_PUBLISHED); $showMailings = true; } else { $receivers = subscribers::getSubscribers(-1, -1, '', $total, $listId, '', 1, 1, 'sub_emailA'); if (empty($receivers)) { $message = acajoom::printYN(0, _ACA_MESSAGE_SENT_SUCCESSFULLY, _ACA_NO_SUSCRIBERS); $showMailings = true; } else { $status = queue::sendNewsletter(true, $mailingId, $listId, $receivers, $message); $message = acajoom::printYN($status, _ACA_MESSAGE_SENT_SUCCESSFULLY, $message); $showMailings = true; flush(); sleep(5); compa::redirect('index2.php?option=com_acajoom&act=mailing&listype=' . $listType, $message); } } } else { if (class_exists('auto')) { $message = acajoom::printYN(auto::processQueue(true), _ACA_QUEUE_SENT_SUCCESS, _ACA_ERROR); } $showMailings = true; } break; case 'savePreview': xmailing::saveMailing($mailingId, $listId); case 'preview': if (ACA_CMSTYPE) { // joomla 15 $emailaddress = JRequest::getVar('emailaddress', ''); } else { //joomla 1x $emailaddress = mosGetParam($_REQUEST, 'emailaddress', ''); } //endif if (!empty($emailaddress)) { $status = xmailing::preview($mailingId, $listId, $message); $message = acajoom::printYN($status, _ACA_MESSAGE_SENT_SUCCESSFULLY, $message); } backHTML::_header(_ACA_PREVIEW_TITLE, 'preview_f2.png', $message, $task, $action); mailingsHTML::previewMailingHTML($mailingId, $listId, $listType); if ($listId > 0) { $archivemailing = xmailing::getMailingView($mailingId, $listId); } else { $archivemailing = xmailing::getMailingView($mailingId); } $forms['main'] = ''; $list = lists::getOneList($archivemailing->list_id); $textonly = ''; acajoom_mail::getContent($archivemailing->images, $list->layout, $archivemailing->htmlcontent, $textonly); acajoom_mail::replaceClass($archivemailing->htmlcontent, $textonly); mailingsHTML::viewMailing($archivemailing, $forms); break; case 'view': if ($mailingId != 0) { if ($listId > 0) { $archivemailing = xmailing::getMailingView($mailingId, $listId); } else { $archivemailing = xmailing::getMailingView($mailingId); } $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n\r"; xmailing::_header($task, $action, $listType, $message); backHTML::formStart('', 0, ''); mailingsHTML::viewMailing($archivemailing, $forms); $go[] = acajoom::makeObj('act', 'mailing'); $go[] = acajoom::makeObj('task', 'viewmailing'); $go[] = acajoom::makeObj('listid', $archivemailing->list_id); backHTML::formEnd($go); } break; case 'deleteMailing': $d['mailing'] = xmailing::getOneMailing('', $mailingId, '', $new); $message = acajoom::printYN(xmailing::delete($d), @constant($GLOBALS[ACA . 'listname' . $d['mailing']->list_type]) . _ACA_SUCCESS_DELETED, _ACA_ERROR); $showMailings = true; break; case 'cancel': compa::redirect('index2.php?option=com_acajoom'); break; case 'copy': $message = acajoom::printYN(xmailing::copyMailing($mailingId), _ACA_MAILING_COPY, _ACA_ERROR); $showMailings = true; break; case 'cancelMailing': $showMailings = true; break; case 'publishMailing': $mailing = xmailing::getOneMailing('', $mailingId, '', $new); $message = acajoom::printYN(xmailing::publishMailing($mailingId), @constant($GLOBALS[ACA . 'listname' . $mailing->list_type]) . ' ' . _ACA_PUBLISHED, _ACA_ERROR); $showMailings = true; break; case 'unpublishMailing': $mailing = xmailing::getOneMailing('', $mailingId, '', $new); $message = acajoom::printYN(xmailing::unpublishMailing($mailingId), @constant($GLOBALS[ACA . 'listname' . $mailing->list_type]) . ' ' . _ACA_UNPUBLISHED, _ACA_ERROR); $showMailings = true; break; case 'cpanel': backHTML::controlPanel(); break; case 'save': $message = acajoom::printYN(xmailing::saveMailing($mailingId, $listId), _ACA_MAILING_SAVED, _ACA_ERROR); $showMailings = true; unset($GLOBALS["task"]); unset($_REQUEST["task"]); break; case 'show': default: $showMailings = true; break; } if ($showMailings) { xmailing::showMailings($task, $action, $listId, $listType, $message, true, _ACA_MENU_MAILING); } return true; }
} else { $message = frontEnd::newSubscriber($name, $email); } if ($GLOBALS[ACA . 'addEmailRedLink']) { if (preg_match('?', $redirectlink)) { $redirectlink .= '&email=' . $email; } else { $redirectlink .= '?email=' . $email; } } $showMessage = mosGetParam($_REQUEST, 'listname', 0); if (!empty($redirectlink)) { if (!$showMessage) { $message = ''; } compa::redirect($redirectlink, $message); } else { $showPanel = true; } break; case 'list': frontEnd::showLists($subscriberId, $listId, $lisType, $action, $task); break; case 'token': auto::receiveToken(); break; default: if (class_exists('auto')) { $showPanel = auto::getCase($action); } else { $showPanel = true;
function import($listId) { $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); @set_time_limit(0); @ini_set('memory_limit', '128M'); $queue = ''; if (ACA_CMSTYPE) { // joomla 15 $queue->sub_list_id = JRequest::getVar('sub_list_id', ''); $queue->subscribed = JRequest::getVar('subscribed', ''); $queue->acc_level = JRequest::getVar('acc_level', 29); } else { //joomla 1x $queue->sub_list_id = mosGetParam($_REQUEST, 'sub_list_id', ''); $queue->subscribed = mosGetParam($_REQUEST, 'subscribed', ''); $queue->acc_level = mosGetParam($_REQUEST, 'acc_level', 29); } //endif $path = ACA_JPATH_ROOT_NO_ADMIN . $GLOBALS[ACA . 'upload_url']; $filename = $_FILES['importfile']['name']; $path = str_replace(array('/', '\\'), DS, $path); if (is_writable($path)) { if (!@move_uploaded_file($_FILES['importfile']['tmp_name'], $path . $filename)) { $path .= DS; if (!@move_uploaded_file($_FILES['importfile']['tmp_name'], $path . $filename)) { echo _ACA_ERROR_MOVING_UPLOAD; echo '<br/>Please make sure the path ' . ACA_JPATH_ROOT_NO_ADMIN . $GLOBALS[ACA . 'upload_url'] . ' is writable'; } } $import = file_get_contents($path . $filename); $import = str_replace(array("\r\n", "\r"), "\n", $import); $array = explode("\n", $import); if (sizeof($array) > 0) { foreach ($array as $row) { $row = trim($row); if (empty($row)) { continue; } $values = explode(',', $row); if (count($values) != 4) { echo '<br />' . acajoom::printM('red', $row . ' : Acajoom needs 4 arguments for each user separated by a comma (,)'); continue; } $values[0] = trim($values[0]); $values[1] = trim($values[1]); if (isset($values[1])) { $valid = subscribers::validEmail($values[1]); if (!$valid) { echo '<br />' . acajoom::printM('red', $values[1] . ': ' . _ACA_EMAIL_INVALID); continue; } else { $subscriber = null; $values[0] = compa::encodeutf(trim($values[0])); $subscriber->name = addslashes($values[0]); $subscriber->email = $values[1]; $subscriber->receive_html = empty($values[2]) ? '0' : '1'; $subscriber->confirmed = (empty($values[3]) and !$GLOBALS[ACA . 'require_confirmation']) ? '0' : '1'; $subscriber->subscribe_date = acajoom::getNow(); $subscriber->language_iso = 'eng'; $subscriber->timezone = '00:00:00'; $subscriber->blacklist = '0'; $subscriber->params = ''; $d['email'] = $subscriber->email; $erro->ck = subscribers::getSubscriberIdFromEmail($d); $erro->Eck(__LINE__, '8679'); $subscriberId = $d['subscriberId']; if ($subscriberId < 1) { $erro->ck = subscribers::insertSubscriber($subscriber, $subscriberId); $erro->Eck(__LINE__, '8650'); } if (!$erro->ck) { echo '<br />' . acajoom::printM('red', $values[0] . ': ' . _ACA_SUBCRIBER_EXIT); } else { if (!empty($queue->subscribed) and $subscriberId > 0) { $queue->user_id = $subscriberId; $erro->ck = queue::updateSuscription($queue); $erro->Eck(__LINE__, '8651'); if ($GLOBALS[ACA . 'require_confirmation'] == '1' and $values[3] == '0') { $listIds = array(); $size = sizeof($queue->sub_list_id); for ($index = 0; $index < $size; $index++) { if (isset($queue->subscribed[$index])) { if ($queue->subscribed[$index] > 0) { $listIds[] = $queue->sub_list_id[$index]; } } } $erro->ck = acajoom_mail::processConfirmationEmail($subscriberId, $listIds); $erro->Eck(__LINE__, '8652'); } if ($erro->ck) { echo '<br />' . acajoom::printM('green', $values[0] . ': ' . _ACA_IMPORT_SUCCESS); } else { echo '<br />' . acajoom::printM('blue', $values[0] . ': ' . _ACA_PB_QUEUE); } } } } } } return true; } $erro->ck = unlink($path . $filename); $erro->Eck(__LINE__, '8655'); if (!$erro->ck) { echo _ACA_DELETION_OFFILE . ' ' . $path . $filename . ' ' . _ACA_MANUALLY_DELETE . '.</p>'; } } else { echo _ACA_CANNOT_WRITE_DIR . ' ' . $path . '</p>'; return false; } }
define('_ACA_JCALTAGS_START_TIPS', compa::encodeutf('Sélectionnez OUI si vous voulez que la date de début de l\'évènement soit ajoutée')); define('_ACA_JCALTAGS_READMORE', compa::encodeutf('Lire la suite:')); define('_ACA_JCALTAGS_READMORE_TIPS', compa::encodeutf('Sélectionnez OUI si vous voulez qu\'un lien pour lire la suite de de l\'évènement soit ajouté')); define('_ACA_REDIRECTCONFIRMATION', compa::encodeutf('Redirect URL')); define('_ACA_REDIRECTCONFIRMATION_TIPS', compa::encodeutf('If you require a confirmation courriel, the user will be confirmed and redirected to this URL if he clicks on the confirmation link.')); //since 2.0.0 compatibility with Joomla 1.5 if (!defined('_CMN_SAVE') and defined('CMN_SAVE')) { define('_CMN_SAVE', CMN_SAVE); } if (!defined('_CMN_SAVE')) { define('_CMN_SAVE', 'Enregistrer'); } if (!defined('_NO_ACCOUNT')) { define('_NO_ACCOUNT', 'Pas encore de compte ?'); } if (!defined('_CREATE_ACCOUNT')) { define('_CREATE_ACCOUNT', 'Enregistrez-vous'); } if (!defined('_NOT_AUTH')) { define('_NOT_AUTH', 'Vous n\'êtes pas autorisé à voir cette ressource.'); } //since 3.0.0 define('_ACA_DISABLETOOLTIP', compa::encodeutf('Disable Tooltip')); define('_ACA_DISABLETOOLTIP_TIPS', compa::encodeutf('Disable the tooltip on the frontend')); define('_ACA_MINISENDMAIL', compa::encodeutf('Use Mini SendCourriel')); define('_ACA_MINISENDMAIL_TIPS', compa::encodeutf('If your server uses Mini SendCourriel, select this option to don\'t add the name of the user in the header of the courriel')); //Since 3.1.5 define('_ACA_READMORE', compa::encodeutf('Lire la suite...')); define('_ACA_VIEWARCHIVE', compa::encodeutf('Cliquez ici')); //Acajoom GPL define('_ACA_DESC_GPL', _ACA_DESC_NEWS);
function updateListFromEdit($listId, $status, $new) { if (ACA_CMSTYPE) { // joomla 15 $my =& JFactory::getUser(); } else { //joomla 1x global $my; } //endif $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); $listUpdated = ''; $total = 0; $allow_html = compa::allow_html(); $listUpdated->id = $listId; if (ACA_CMSTYPE) { // joomla 15 $issue_nb = JRequest::getVar('issue_nb', '0'); $listUpdated->list_name = JRequest::getVar('list_name', '', 'request', 'string', $allow_html); $listUpdated->list_desc = JRequest::getVar('list_desc', '', 'request', 'string', $allow_html); $listUpdated->sendername = JRequest::getVar('sendername', ''); $listUpdated->senderemail = JRequest::getVar('senderemail', ''); $listUpdated->bounceadres = JRequest::getVar('bounceadres', ''); $listUpdated->layout = JRequest::getVar('layout', '', 'request', 'string', $allow_html); $listUpdated->template = JRequest::getVar('template', 0); $listUpdated->subscribemessage = JRequest::getVar('subscribemessage', '', 'request', 'string', $allow_html); $listUpdated->unsubscribemessage = JRequest::getVar('unsubscribemessage', '', 'request', 'string', $allow_html); $listUpdated->unsubscribesend = JRequest::getVar('unsubscribesend', 1); $listUpdated->html = JRequest::getVar('html', 1); $listUpdated->hidden = JRequest::getVar('hidden', 0); $listUpdated->list_type = JRequest::getVar('list_type', 1); $listUpdated->auto_add = JRequest::getVar('auto_add', 0); $listUpdated->user_choose = JRequest::getVar('user_choose', 0); $listUpdated->cat_id = implode(',', JRequest::getVar('cat_id', array())); $listUpdated->delay_min = JRequest::getVar('delay_min', 0); $listUpdated->delay_max = JRequest::getVar('delay_max', 0); $listUpdated->follow_up = JRequest::getVar('follow_up', 0); $listUpdated->notify_id = $listUpdated->list_type == '7' ? JRequest::getVar('notify_id', 0) : 0; $listUpdated->auto_add = JRequest::getVar('auto_add', 0); $listUpdated->acc_level = JRequest::getVar('acc_level', 25); $listUpdated->acc_id = JRequest::getVar('acc_id', 29); $listUpdated->footer = JRequest::getVar('footer', 1); $listUpdated->start_date = JRequest::getVar('start_date', ''); $listUpdated->next_date = JRequest::getVar('next_date', 0); } else { //joomla 1x $listUpdated->list_name = mosGetParam($_REQUEST, 'list_name', '', $allow_html); $listUpdated->list_desc = mosGetParam($_REQUEST, 'list_desc', '', $allow_html); $listUpdated->sendername = mosGetParam($_REQUEST, 'sendername', ''); $listUpdated->senderemail = mosGetParam($_REQUEST, 'senderemail', ''); $listUpdated->bounceadres = mosGetParam($_REQUEST, 'bounceadres', ''); $listUpdated->layout = mosGetParam($_REQUEST, 'layout', '', $allow_html); $listUpdated->template = mosGetParam($_REQUEST, 'template', 0); $listUpdated->subscribemessage = mosGetParam($_REQUEST, 'subscribemessage', '', $allow_html); $listUpdated->unsubscribemessage = mosGetParam($_REQUEST, 'unsubscribemessage', '', $allow_html); $listUpdated->unsubscribesend = mosGetParam($_REQUEST, 'unsubscribesend', 1); $listUpdated->html = mosGetParam($_REQUEST, 'html', 1); $listUpdated->hidden = mosGetParam($_REQUEST, 'hidden', 0); $listUpdated->list_type = mosGetParam($_REQUEST, 'list_type', 1); $listUpdated->auto_add = mosGetParam($_REQUEST, 'auto_add', 0); $listUpdated->user_choose = mosGetParam($_REQUEST, 'user_choose', 0); $listUpdated->cat_id = implode(',', mosGetParam($_REQUEST, 'cat_id', array())); $listUpdated->delay_min = mosGetParam($_REQUEST, 'delay_min', 0); $listUpdated->delay_max = mosGetParam($_REQUEST, 'delay_max', 0); $listUpdated->follow_up = mosGetParam($_REQUEST, 'follow_up', 0); $listUpdated->notify_id = $listUpdated->list_type == '7' ? mosGetParam($_REQUEST, 'notify_id', 0) : 0; $listUpdated->auto_add = mosGetParam($_REQUEST, 'auto_add', 0); $listUpdated->acc_level = mosGetParam($_REQUEST, 'acc_level', 25); $listUpdated->acc_id = mosGetParam($_REQUEST, 'acc_id', 29); $listUpdated->footer = mosGetParam($_REQUEST, 'footer', 1); $listUpdated->start_date = mosGetParam($_REQUEST, 'start_date', ''); $listUpdated->next_date = mosGetParam($_REQUEST, 'next_date', 0); } //endif $listUpdated->owner = $my->id; $listUpdated->notification = 0; if ($status == '') { if (ACA_CMSTYPE) { // joomla 15 $listUpdated->published = JRequest::getVar('published', 0); } else { $listUpdated->published = intval(mosGetParam($_REQUEST, 'published', 0)); } //endif } else { $listUpdated->published = $status; } if ($listUpdated->published == 0 and ($listUpdated->list_type == 2 or $listUpdated->list_type == 3)) { $published = 0; } else { $published = $listUpdated->published; } if (!empty($listUpdated->hidden)) { $visible = $listUpdated->hidden; } else { $visible = 0; } if ($new) { $published = $listUpdated->published; } if (!lists::updateList($listId, $listUpdated, $listUpdated->published, $new)) { return false; } if ($listUpdated->list_type != 11) { return xmailing::updateMailingFromList($listId, $published, $listUpdated->html, $visible); } else { return true; } }
function miscSettings($lists) { ?> <fieldset class="acajoomcss"> <legend><?php echo _ACA_MISC_SETTINGS; ?> </legend> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_GUIDE; $tip = _ACA_SHOW_GUIDE_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_guide']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_TIPS; $tip = _ACA_SHOW_TIPS_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_tips']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ITEMID; $tip = _ACA_ITEMID_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <input class="inputbox" type="text" name="config['itemidAca']" size="5" value="<?php echo $GLOBALS[ACA . 'itemidAca']; ?> "> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_DISABLETOOLTIP; $tip = _ACA_DISABLETOOLTIP_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['disabletooltip']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php echo compa::toolTip('If your Joomla article does not have a read more link, Acajoom will consider the introduction of your article as the first X characters of the full article. <br/> If you specify the value 0, Acajoom will take the full article', '', 280, 'tooltip.png', 'Article introduction', '', 0); ?> </span> </td> <td> <input class="inputbox" type="text" name="config['word_wrap']" size="10" value="<?php echo $GLOBALS[ACA . 'word_wrap']; ?> "> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_LISTS_TIPS; $title = _ACA_SHOW_LISTS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_lists']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_USE_SEF; $tip = _ACA_USE_SEF_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['use_sef']; ?> </td> </tr> <?php if (class_exists('auto')) { auto::miscSettings($lists); } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_FOOTER_TIPS; $title = _ACA_SHOW_FOOTER; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_footer']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_AUTHOR; $tip = _ACA_SHOW_AUTHOR_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_author']; ?> </td> </tr> <?php if (class_exists('pro')) { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_SHOW_JCALPRO; $tip = _ACA_SHOW_JCALPRO_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_jcalpro']; ?> </td> </tr> <?php } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ADDEMAILREDLINK; $tip = _ACA_ADDEMAILREDLINK_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['addEmailRedLink']; ?> </td> </tr> <?php if ($GLOBALS[ACA . 'type'] == 'Plus' or $GLOBALS[ACA . 'type'] == 'PRO') { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SHOW_SIGNATURE_TIPS; $title = _ACA_SHOW_SIGNATURE; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['show_signature']; ?> </td> </tr> <?php } ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_LISTS_EDITOR_TIPS; $title = _ACA_LISTS_EDITOR; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['listHTMLeditor']; ?> </td> </tr> </tbody> </table> </fieldset> <fieldset class="acajoomcss"> <legend><?php echo _ACA_ERR_SETTINGS; ?> </legend> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = 'Full check Email address'; $tip = 'Check the domain name of the e-mail address during the send process and remove the e-mail from the queue is the e-mail address is not valid'; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['fullcheck']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ERR_SHOW; $tip = _ACA_ERR_SHOW_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['report_error']; ?> </td> </tr> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $title = _ACA_ERR_SEND; $tip = _ACA_ERR_SEND_TIPS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['send_error']; ?> </td> </tr> </tbody> </table> </fieldset> <?php }
function getDisplayRegistration($tab, $user, $ui) { if (ACA_CMSTYPE) { // joomla 15 $my =& JFactory::getUser(); } else { //joomla 1x global $my; } //endif require_once ACA_JPATH_ROOT_NO_ADMIN . '/administrator/components/com_acajoom/classes/class.acajoom.php'; $html = ''; if ($GLOBALS['aca_cb_plugin'] == '1') { $lists = lists::getSpecifiedLists($GLOBALS['aca_cb_listIds'], false); if (!empty($lists)) { $i = 0; $accessLevel = 18; //default access level jack 31 $htmlOK = false; if (!empty($GLOBALS['aca_cb_intro'])) { $html .= '<tr><td class="titleCell" colspan="2">' . $GLOBALS['aca_cb_intro'] . '</td></tr>'; } if ($GLOBALS['aca_cb_showname']) { foreach ($lists as $list) { $i++; $subscribed = 0; if ($list->html == 1) { $htmlOK = true; } $checked = $GLOBALS['aca_cb_checkLists']; if ($list->hidden == 1) { $subscriber->blacklist = 0; if ($checked != 0) { $checkedPrint = ' checked="checked" '; } else { $checkedPrint = ''; } $html .= '<tr>'; if ($GLOBALS['aca_cb_checkLists'] == 1) { $text = "\n" . '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" checked="checked" /></td>'; } else { $text = "\n" . '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' /></td>'; } $text .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; $text .= "\n" . '<td class="fieldCell"><span class="aca_list_name" onclick=\'return false;\'>' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '#', 1) . '</span></td>'; $html .= $text; $html .= '</tr>'; } else { $html .= '<input type="hidden" value=1 name="subscribed[' . $i . ']" />'; $html .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; } $html .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />'; } } else { foreach ($lists as $list) { $i++; $html .= '<input type="hidden" value="1" name="subscribed[' . $i . ']" />'; $html .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; $html .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />'; if ($list->html == 1) { $htmlOK = true; } } } $checked = $GLOBALS['aca_cb_defaultHTML']; if ($htmlOK) { if ($GLOBALS['aca_cb_showHTML']) { $html .= '<tr>'; if ($checked != 0) { $checkedPrint = ' checked="checked" '; } else { $checkedPrint = ''; } $text = '<td class="titleCell" style="text-align: right;"><input type="checkbox" class="inputbox" value="1" name="receive_html" ' . $checkedPrint . ' /></td>'; $text .= '<td class="fieldCell">' . _ACA_RECEIVE_HTML . '</td>'; $html .= acajoom::printLine(false, $text); $html .= '</tr>'; } else { $html .= '<input type="hidden" value="' . $checked . '" name="receive_html" />' . "\n"; } } else { $html .= '<input type="hidden" value="' . $checked . '" name="receive_html" />' . "\n"; } } else { $html = '<input type="hidden" value="' . $GLOBALS['aca_cb_defaultHTML'] . '" name="receive_html" />' . "\n"; } } else { $html = '<input type="hidden" value="' . $GLOBALS['aca_cb_defaultHTML'] . '" name="receive_html" />' . "\n"; } return $html; }
function acajoombot_jcalpro_transformall($html, $text) { $database =& JFactory::getDBO(); $Itemid = $GLOBALS[ACA . 'itemidAca']; preg_match_all('#{jcalevent:.{7,15}}#', $html . $text, $tags); $replace = array(); $replacebyHTML = array(); $replacebyText = array(); if (!empty($tags[0])) { foreach ($tags[0] as $tag) { $isolate = explode(':', $tag); if (count($isolate) != 2) { continue; } $parameters = explode('|', $isolate[1]); if (count($parameters) != 4) { continue; } if (!empty($replace[$tag])) { continue; } $replace[$tag] = $tag; $query = 'SELECT `title`, `description`, `end_date`, `start_date`, `extid` from #__jcalpro_events where `extid` = ' . intval($parameters[0]); $database->setQuery($query); if (ACA_CMSTYPE) { // joomla 15 $event = $database->loadObject(); } else { //joomla 1x $database->loadObject($event); } //endif if (empty($event->extid)) { $replacebyHTML[$tag] = ''; $replacebyText[$tag] = ''; continue; } if (get_magic_quotes_runtime()) { $event->title = stripslashes($event->title); $event->description = stripslashes($event->description); } $eventhtml = ''; if ($parameters[2]) { $eventhtml .= '<div class="eventpaneopen_nws">'; } $eventhtml .= '<span class="eventheading_nws">' . $event->title . '</span>'; $eventtext = strtoupper(acajoom_mail::htmlToText($event->title)); if ($parameters[1]) { $start_date_array = explode('-', $event->start_date); $start_time_array = explode(':', substr($event->start_date, 10, 15)); $date = strftime(JText::_('DATE_FORMAT_LC'), mktime($start_time_array[0], $start_time_array[1], 0, $start_date_array[1], $start_date_array[2], $start_date_array[0])); $eventhtml .= '<br/>' . $date; $eventtext .= "\r\n" . $date; } if ($parameters[2]) { $eventhtml .= '<br/>' . $event->description; $eventtext .= "\r\n" . acajoom_mail::htmlToText($event->description); } if ($parameters[3]) { $link = '.php?option=com_jcalpro&extmode=view&extid=' . $event->extid . '&Itemid=' . $Itemid; compa::completeLink($link, false, $GLOBALS[ACA . 'use_sef']); $eventhtml .= '<br/><a href="' . $link . '"><span class="readon_nws">' . _ACA_READMORE . '</span></a>'; $eventtext .= "\r\n" . ' * ' . _ACA_READMORE . ' ( ' . $link . ' )'; } if ($parameters[2]) { $eventhtml .= '</div>'; } $replacebyHTML[$tag] = $eventhtml; $replacebyText[$tag] = $eventtext; } } $html = str_replace($replace, $replacebyHTML, $html); $text = str_replace($replace, $replacebyText, $text); }
function showPanel() { global $Itemid; if (ACA_CMSTYPE) { $database =& JFactory::getDBO(); $acl =& JFactory::getACL(); $my =& JFactory::getUser(); } else { global $my, $database, $acl; } //endif if (isset($my->id) && $my->id > 0) { if (!empty($my->username)) { $greeting_message = _HI . ' ' . $my->username; } else { $greeting_message = ''; } backHTML::controlPanelBottonStart(_UCP_USER_MENU, 'cpanel.png'); $link = '.php?option=com_acajoom&act=show&Itemid=' . $Itemid; compa::completeLink($link, false); backHTML::quickiconButton($link, 'addusers.png', _UCP_USER_CONTACT, false, 'Registered', false); if (class_exists('pro')) { $aro_id = isset($my->id) && $my->id > 0 ? $acl->get_object_id('users', $my->id, 'ARO') : 1; $qacl = "SELECT `group_id` FROM `#__core_acl_groups_aro_map` WHERE `aro_id` =" . $aro_id; $database->setQuery($qacl); $usergid = $database->loadResult(); $gidAdmin = $acl->get_group_id('Administrator', 'ARO'); $ex_groups = $acl->get_group_children($gidAdmin, 'ARO', 'RECURSE'); $ex_groups[] = $gidAdmin; if (in_array($usergid, $ex_groups)) { $link = '.php?option=com_acajoom&act=list&Itemid=' . $Itemid; compa::completeLink($link, false); backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'admin', false); } else { $lists = lists::getLists(0, 0, true); $access = false; foreach ($lists as $list) { $bit = acajoom::checkPermissions('hello', 0, $list->acc_level); if ($bit) { $access = true; break; } } $link = '.php?option=com_acajoom&act=list&Itemid=' . $Itemid; compa::completeLink($link, false); if ($access) { backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'Registered', false); } } } else { $link = '.php?option=com_acajoom&act=list&Itemid=' . $Itemid; compa::completeLink($link, false); backHTML::quickiconButton($link, 'addedit.png', _ACA_MENU_LIST, false, 'admin', false); } backHTML::controlPanelBottomEnd(); if (class_exists('auto')) { auto::otherPanel(); } } }
function create() { global $my, $mainframe; $Itemid = $GLOBALS[ACA . 'itemidAca']; if (!empty($Itemid)) { $item = '&Itemid=' . $Itemid; } else { $item = ''; } $hidden = ''; $htmlOK = false; $h = ''; if (!empty($this->lists)) { if ($my->id > 0) { $loggedin = true; $subscriber = subscribers::getSubscriberInfoFromUserId($my->id); } else { $loggedin = false; } if (!$loggedin and $GLOBALS[ACA . 'allow_unregistered'] and $this->num == 1) { $h .= ' <script language="javascript" type="text/javascript"> function submitacajoommod(formname) { var form = eval(\'document.\'+formname);' . 'var place = form.email.value.indexOf("@",1);' . 'var point = form.email.value.indexOf(".",place+1);'; if ($this->shownamefield) { $h .= ' if (form.name.value == "" || form.name.value == "' . addslashes(_ACA_NAME) . '") { alert( "' . addslashes(_ACA_REGWARN_NAME) . '" );' . 'return false; } else '; } $h .= ' if (form.email.value == "" || form.email.value == "' . addslashes(_ACA_EMAIL) . '") {' . 'alert( "' . addslashes(_ACA_REGWARN_MAIL) . '" );' . 'return false; } else {' . 'if ((place > -1)&&(form.email.value.length >2)&&(point > 1)){' . 'form.submit();' . 'return true; } ' . 'else {' . 'alert( "' . addslashes(_ACA_REGWARN_MAIL) . '" );' . 'return false;' . '}' . '}' . '}' . '</script>'; } mosCommonHTML::loadOverlib(); $h .= '<link rel="stylesheet" href="' . $GLOBALS['mosConfig_live_site'] . '/components/com_acajoom/css/acajoom.css" type="text/css" >'; $linkForm = 'index.php?option=com_acajoom'; if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $h .= '<form action="' . sefRelToAbs($linkForm) . '" method="post" name="modacajoomForm' . $this->num . '"> <div class="' . $this->moduleclass_sfx . '" style="text-align:' . $this->mod_align . '">'; } else { $h .= '<form action="' . $linkForm . '" method="post" name="modacajoomForm' . $this->num . '"> <div class="' . $this->moduleclass_sfx . '" style="text-align:' . $this->mod_align . '">'; } if (!empty($this->introtext)) { $text = '<span class="pretext' . $this->moduleclass_sfx . '">' . $this->introtext . '</span>'; $h .= acajoom::printLine($this->linear, $text); } $i = 0; $accessLevel = 0; if ($loggedin) { $queues = queue::getSubscriberLists($subscriber->id); } else { $queues = ''; } if ($this->showListName) { foreach ($this->lists as $list) { $i++; $subscribed = 0; $accessLevel = 0; if ($loggedin) { if (!empty($queues)) { foreach ($queues as $queue) { if ($list->id == $queue->list_id) { $subscribed = 1; $accessLevel = $queue->acc_level; } } } } if ($list->html == 1) { $htmlOK = true; } $checked = 0; if ($loggedin) { $checked = $subscribed; } else { if ($this->defaultchecked) { $checked = 1; } $subscriber->blacklist = 0; } if ($checked != 0) { $checkedPrint = ' checked="checked" '; } else { $checkedPrint = ''; } if ($list->hidden == 1) { if ($subscriber->blacklist == 0) { $text = "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' />'; } else { $text = "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribedfake[' . $i . ']" ' . $checkedPrint . ' />'; $text .= "\n" . '<input type="hidden" value="0" name="subscribed[' . $i . ']" />'; } $text .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; $link = ($list->list_type == '1' or $list->list_type == '7') && $GLOBALS[ACA . 'show_archive'] ? 'index.php?option=com_acajoom' . $item . '&act=mailing&task=archive&listid=' . $list->id . '&listype=' . $list->list_type : '#'; $text .= "\n" . '<span class="aca_list_name"'; if ($link == "#") { $text .= " onClick='return false;' "; } $text .= '>' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, $link, 1) . '</span>'; $h .= acajoom::printLine($this->linear, $text); $h .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />' . "\n\r"; } else { if (!$loggedin) { $h .= '<input type="hidden" value="' . $checked . '" name="subscribed[' . $i . ']" />'; $h .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; } } } } else { foreach ($this->lists as $list) { $i++; $subscribed = 0; $accessLevel = 0; if ($loggedin) { if (!empty($queues)) { foreach ($queues as $queue) { if ($list->id == $queue->list_id) { $subscribed = 1; $accessLevel = $queue->acc_level; } } } } if ($list->html == 1) { $htmlOK = true; } $checked = 0; if ($loggedin) { $checked = $subscribed; } else { if ($this->defaultchecked) { $checked = 1; } } $h .= '<input type="hidden" value="' . $checked . '" name="subscribed[' . $i . ']" />'; $h .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; $h .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />'; if ($list->html == 1) { $htmlOK = true; } } } if (!$loggedin) { if ($GLOBALS[ACA . 'allow_unregistered']) { if ($this->shownamefield) { $text = '<input id="wz_11" type="text" size="' . $this->fieldsize . '" value="' . addslashes(_ACA_NAME) . '" class="inputbox" name="name" onblur="if(this.value==\'\') this.value=\'' . addslashes(_ACA_NAME) . '\';" onfocus="if(this.value==\'' . addslashes(_ACA_NAME) . '\') this.value=\'\' ; " />'; $h .= acajoom::printLine($this->linear, $text); } else { $text = '<input id="wz_11" type="hidden" value="" name="name" />'; } $text = '<input id="wz_12" type="text" size="' . $this->fieldsize . '" value="' . addslashes(_ACA_EMAIL) . '" class="inputbox" name="email" onblur="if(this.value==\'\') this.value=\'' . addslashes(_ACA_EMAIL) . '\';" onfocus="if(this.value==\'' . addslashes(_ACA_EMAIL) . '\') this.value=\'\' ; " />'; $h .= acajoom::printLine($this->linear, $text); } else { $h .= acajoom::printLine($this->linear, acajoom::printM('green', _ACA_REGISTER_REQUIRED)); $text = _NO_ACCOUNT . " "; if (isset($GLOBALS[ACA . 'cb_integration']) && $GLOBALS[ACA . 'cb_integration']) { $linkme = 'index.php?option=com_comprofiler&task=registers'; } else { $linkme = 'index.php?option=com_registration&task=register'; } if ($GLOBALS[ACA . 'use_sef'] and function_exists('sefRelToAbs')) { $text .= '<a href="' . sefRelToAbs($linkme) . '">'; } else { $text .= '<a href="' . $linkme . '">'; } $text .= _CREATE_ACCOUNT . "</a>"; $h .= acajoom::printLine($this->linear, $text); $htmlOK = false; } } if ($htmlOK) { if ($loggedin and !empty($subscriber)) { $checked = $subscriber->receive_html; } else { $checked = $this->receivehtmldefault; } if ($this->showreceivehtml) { if ($checked != 0) { $checkedPrint = ' checked="checked" '; } else { $checkedPrint = ''; } $text = '<input id="wz_2" type="checkbox" class="inputbox" value="1" name="receive_html" ' . $checkedPrint . ' />'; $text .= ' ' . _ACA_RECEIVE_HTML; $h .= acajoom::printLine($this->linear, $text); } else { $hidden .= '<input id="wz_2" type="hidden" value="' . $checked . '" name="receive_html" />' . "\n"; } } else { $hidden .= '<input id="wz_2" type="hidden" value="0" name="receive_html" />' . "\n"; } if (!empty($this->posttext)) { $text = '<span class="postext' . $this->moduleclass_sfx . '">' . $this->posttext . '</span>'; $h .= acajoom::printLine($this->linear, $text); } if (!$loggedin) { if ($GLOBALS[ACA . 'allow_unregistered']) { if (isset($this->imgUnregistered)) { $text = '<input id="aca_22" type="image" src="' . $this->imgUnregistered . '" value="' . $this->buttonUnregistered . '" alt="' . $this->buttonUnregistered . '" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />'; } else { $text = '<input id="aca_22" type="button" value="' . $this->buttonUnregistered . '" class="button" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />'; } $h .= acajoom::printLine($this->linear, $text); $h .= ' </div> <input type="hidden" name="act" value="subscribe" /> <input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" /> <input type="hidden" name="listname" value="' . $this->showListName . '" /> '; } else { $h .= '</div>'; } } else { if (isset($this->notifType) and $subscribed) { if (isset($this->imgUnregistered)) { $text = '<input id="aca_22" type="image" src="' . $this->imgUnregistered . '" value="' . $this->buttonUnregistered . '" alt="' . $this->buttonUnregistered . '" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />'; } else { $text = '<input id="aca_22" type="button" value="' . $this->buttonUnregistered . '" class="button" name="' . $this->buttonUnregistered . '" onclick="return submitacajoommod(\'modacajoomForm' . $this->num . '\');" />'; } $h .= acajoom::printLine($this->linear, $text); $h .= ' </div> <input type="hidden" name="act" value="subscribe" /> <input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" /> <input type="hidden" name="listname" value="' . $this->showListName . '" /> '; } else { if (isset($this->imgRegistered)) { $text = '<input id="aca_22" type="image" src="' . $this->imgRegistered . '" value="' . $this->buttonRegistered . '" alt="' . $this->buttonRegistered . '" name="' . $this->buttonRegistered . '">'; } else { $text = '<input id="aca_22" type="submit" value="' . $this->buttonRegistered . '" name="' . $this->buttonRegistered . '" class="button" />'; } $h .= acajoom::printLine($this->linear, $text); $h .= ' </div> <input type="hidden" name="act" value="updatesubscription" /> <input type="hidden" name="redirectlink" value="' . $this->redirectURL . '" /> <input type="hidden" name="listname" value="' . $this->showListName . '" /> '; } } $h .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />'; $h .= $hidden . '</form>'; } else { $h .= acajoom::printM('blue', _ACA_LIST_NOT_AVAIL); } $this->_content = $h; return $h; }
function import($action, $lists) { ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (form.importfile.value == "") { alert( "<?php echo addslashes(_ACA_SELECT_FILE) . ' ' . addslashes(_ACA_MENU_IMPORT) . '!'; ?> " ); } else { submitform(pressbutton); } } </script> <form action="index2.php?option=com_acajoom&act=<?php echo $action; ?> &listid=<?php echo $listId; ?> " method="post" name="adminForm" enctype="multipart/form-data" > <input type="hidden" name="task" value="" /> <table cellpadding="0" cellspacing="0" align="center" class="acajoomcss"> <tr> <th><?php echo _ACA_IMPORT_TIPS; ?> </th> </tr> <tr> <td> <br /> <?php echo _ACA_SELECT_IMPORT_FILE . ' :'; ?> <input type="file" name="importfile" class="inputbox" /> </td> </tr> </table> <?php mosCommonHTML::loadOverlib(); echo '<br /><br /><table>'; echo '<tr><th colspan="2">'; echo _ACA_LIST_IMPORT; echo '</th></tr>'; $i = 0; foreach ($lists as $list) { $i++; echo '<tr><td width="40">'; echo "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" />'; echo "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />'; echo '</td><td>'; echo "\n" . '<span class="aca_list_name onClick=\'return false;\'">' . compa::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '#', 1) . '</span>'; echo "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="0" />'; echo '</td></tr>'; } echo '<tr><td colspan="2"><center><input type="button" value="Import" class="button" onclick="submitbutton(\'doImport\')" /></center></td></tr>'; echo '</table></form>'; }
function mailingEdit($subscriberId, $mailingId, $listId, $listType, $action) { global $my, $Itemid; if (ACA_CMSTYPE) { // joomla 15 $issue_nb = JRequest::getVar('issue_nb', '0'); $my =& JFactory::getUser(); } else { //joomla 1x $issue_nb = intval(mosGetParam($_REQUEST, 'issue_nb', 0)); global $my; } //endif $accessGrant = false; $new = 0; if (class_exists('pro')) { if ($issue_nb == 0) { $issue_nb = xmailing::countMailings($listId, ''); $issue_nb++; } if ($listId > 0) { $list = lists::getOneList($listId); $mailing = xmailing::getOneMailing($list, $mailingId, $issue_nb, $new); $acc_level = $list->acc_level; } else { return false; } if (acajoom::checkPermissions('hello', 0, $acc_level)) { $accessGrant = true; } } else { if ($subscriberId != 0 and ($my->usertype == 'Administrator' or $my->usertype == 'Super Administrator')) { $accessGrant = true; } } if ($accessGrant) { if ($issue_nb == 0) { $issue_nb = xmailing::countMailings($listId, ''); $issue_nb++; } if (empty($mailing)) { if ($mailingId > 0) { $mailing = xmailing::getOneMailing('', $mailingId, $issue_nb, $new); } else { if ($listId > 0) { $list = lists::getOneList($listId); $mailing = xmailing::getOneMailing($list, $mailingId, $issue_nb, $new); } else { return false; } } } $mainLink = '.php?option=com_acajoom&act=savemailing'; compa::completeLink($mainLink, false); $forms['main'] = '<form method="post" enctype="multipart/form-data" action="' . $mainLink . '" onsubmit="submitbutton();return false;" name="adminForm" >' . "\n\r"; $forms['main'] .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />'; $show = lisType::showType($mailing->list_type, 'editmailing'); frontHTML::formStart(_ACA_EDIT_A . @constant($GLOBALS[ACA . 'listname' . $mailing->list_type]), $mailing->html, 'edit_mailing'); mailingsHTML::editMailing($mailing, $new, $listId, $forms, $show); $go[] = acajoom::makeObj('act', $action); frontHTML::formEnd(_CMN_SAVE . ' ' . @constant($GLOBALS[ACA . 'listname' . $mailing->list_type]), $go); } else { echo acajoom::printM('red', _NOT_AUTH); } return true; }
function statistics($listId, $listType, $mailingId, $message, $task, $action) { global $database; $erro = new xerr(__FILE__, __FUNCTION__); switch ($task) { case 'edit': case 'view': $mailing = xmailing::getOneMailing(0, $mailingId, '', $new); $list = lists::getOneList($mailing->list_id); $listId = $list->id; $listType = $list->list_type; if ($mailingId != 0) { $query = 'SELECT * FROM `#__acajoom_stats_global` WHERE `mailing_id` = \'' . $mailingId . '\''; $database->setQuery($query); $database->loadObject($globalStats); $erro->err = $database->getErrorMsg(); if (empty($globalStats)) { $globalStats->html_sent = ''; $globalStats->html_read = 0; $globalStats->text_sent = ''; } $query = 'SELECT U.name, U.email, D.html, D.read FROM `#__acajoom_stats_details` as D ' . 'LEFT JOIN `#__acajoom_subscribers` as U ON D.subscriber_id=U.id WHERE D.mailing_id = \'' . $mailingId . '\''; $database->setQuery($query); $detailedStats = $database->loadObjectList(); $erro->err .= $database->getErrorMsg(); $erro->show(); if (!$erro->E(__LINE__, '8009')) { return false; } else { $html_read = array(); $html_unread = array(); $text = array(); foreach ($detailedStats as $detailedStat) { if ($detailedStat->html == 1) { if ($detailedStat->read == 1) { $html_read[] = $detailedStat; } else { $html_unread[] = $detailedStat; } } else { $text[] = $detailedStat; } } backHTML::_header(_ACA_MENU_STATS, 'query.png', $message, $task, $action); backHTML::showStatistics($list, $mailing, $globalStats, $html_read, $html_unread, $text, $listId); } } else { echo '<p> Please select a mailings id.</p>'; return false; } break; case 'cancel': compa::redirect('index2.php?option=com_acajoom&act=statistics&listid=' . $listId); break; case 'cpanel': backHTML::controlPanel(); break; default: backHTML::_header(_ACA_MENU_STATS, 'query.png', $message, $task, $action); xmailing::showMailings($task, $action, $listId, $listType, '', false, _ACA_MENU_STATS_FOR); } }
function subscription($listEdit, $lists, $show, $html) { global $_VERSION; $joomAca15 = $_VERSION->RELEASE != '1.0' && class_exists('JFactory') ? true : false; if ($joomAca15) { $editor =& JFactory::getEditor(); } if ($show['access'] or $show['auto_subscribe']) { ?> <fieldset class="acajoomcss"> <table class="acajoomtable" width="100%" cellspacing="1"> <tbody> <?php if ($show['auto_subscribe']) { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_ACA_AUTO_SUB; $title = _ACA_AUTO_ADD_NEW_USERS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['auto_add']; ?> <?php if ($listEdit->new_letter == 1) { ?> <span style=" color: rgb(255, 0, 0); font-weight: bold;"> <?php echo _ACA_INFO_LIST_WARNING; ?> </span> <?php } ?> <br /><br /> </td> </tr> <?php } if (class_exists('auto') && $show['access']) { ?> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_ACCESS; $title = _ACA_LIST_ACCESS; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['gid']; ?> </td> </tr> <?php } ?> </tbody> </table> </fieldset> <?php } if ($GLOBALS[ACA . 'require_confirmation']) { ?> <fieldset class="acajoomcss"> <legend><?php echo _ACA_SUB_SETTINGS; ?> </legend> <table class="acajoomtable" width="100%" cellspacing="1"> <tbody> <tr> <td width="185" class="key" style="vertical-align: top;"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_SUB_MESS; $title = _ACA_SUBMESSAGE; ?> <?php echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span><br /> <strong><?php echo _ACA_USABLE_TAGS; ?> </strong><br /> <?php echo _ACA_NAME_AND_CONFIRM; ?> </td> <td> <?php if ($html) { if ($joomAca15) { echo $editor->display('subscribemessage', $listEdit->subscribemessage, '100%', '200', '75', '20'); } else { editorArea('editor3', $listEdit->subscribemessage, 'subscribemessage', '100%;', '200', '75', '20'); } } else { echo '<textarea name="subscribemessage" rows="20" cols="75">' . $listEdit->subscribemessage . '</textarea>'; } ?> </td> </tr> </tbody> </table> </fieldset> <?php } if ($show['unsusbcribe']) { ?> <fieldset class="acajoomcss"> <legend><span class="editlinktip"><?php echo _ACA_UNSUB_SETTINGS; ?> </span></legend> <table class="acajoomtable" width="100%" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_SEND_UNSUBCRIBE_TIPS; $title = _ACA_SEND_UNSUBCRIBE; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['unsubscribesend']; ?> </td> </tr> <tr> <td width="185" class="key" style="vertical-align: top;"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_UNSUB_MESS; $title = _ACA_UNSUB_MESSAGE; ?> <?php echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span><br /> <strong><?php echo _ACA_USABLE_TAGS; ?> </strong><br /> <?php echo _ACA_NAMEREP; ?> <br /> <?php echo _ACA_FIRST_NAME_REP; ?> </td> <td> <?php if ($html) { if ($joomAca15) { echo $editor->display('unsubscribemessage', $listEdit->unsubscribemessage, '100%', '200', '75', '20'); } else { editorArea('editor4', $listEdit->unsubscribemessage, 'unsubscribemessage', '100%;', '200', '75', '20'); } } else { echo '<textarea name="unsubscribemessage" rows="20" cols="75">' . $listEdit->unsubscribemessage . '</textarea>'; } ?> </td> </tr> </tbody> </table> </fieldset> <?php } if ($show['email_unsubcribe'] and class_exists('auto')) { ?> <fieldset class="acajoomcss"> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="185" class="key"> <span class="editlinktip"> <?php $tip = _ACA_LIST_SHOW_UNSUBCRIBE_TIPS; $title = _ACA_LIST_SHOW_UNSUBCRIBE; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $lists['footer']; ?> </td> </tr> </tbody> </table> </fieldset> <?php } }
/** * @copyright Copyright (C) 2009 Joobi Limited All rights reserved. * @license This file is released under the GPL license (http://www.gnu.org/licenses ) * @link http://www.ijoobi.com */ function update($action, $task) { $update = new wupdate(); $showListing = true; $showComplete = false; if (ACA_CMSTYPE) { // joomla 15 $message = JRequest::getVar('message', ''); } else { //joomla 1x $message = mosGetParam($_REQUEST, 'message', ''); } //endif if (ini_get('safe_mode')) { } else { @set_time_limit(60 * $GLOBALS[ACA . 'script_timeout']); } /*if ((ini_get('allow_url_fopen') == false && !in_array('curl', get_loaded_extensions())) || ini_get('safe_mode') == true) { echo _ACA_WARNING_1011; return; }*/ switch ($task) { case 'doUpdate': backHTML::_header(_ACA_MENU_UPDATE, 'update', $message, $task, $action); $update->doUpdate(); $showListing = false; $showComplete = false; break; case 'version': $update->getVersion(); break; case 'complete': $showComplete = true; $showListing = false; break; case 'cancel': compa::redirect('index2.php?option=com_acajoom&act=update'); $showListing = false; break; case 'cpanel': compa::redirect('index2.php?option=com_acajoom'); $showListing = false; break; case 'new1': backHTML::_header(_ACA_MENU_UPDATE, 'backup.png', $message, $task, $action); $message = acajoom::printYN(acajoom::upgrade_News1(), '<br />' . _ACA_IMPORT_SUCCESS . ' Anjel data', _ACA_ERROR); acajoom::resetUpgrade(1); echo '<br />' . $message; break; case 'new2': backHTML::_header(_ACA_MENU_UPDATE, 'backup.png', $message, $task, $action); $message = acajoom::printYN(acajoom::upgrade_News2(), '<br />' . _ACA_IMPORT_SUCCESS . ' Letterman data', _ACA_ERROR); acajoom::resetUpgrade(2); echo '<br />' . $message; break; case 'new3': backHTML::_header(_ACA_MENU_UPDATE, 'backup.png', $message, $task, $action); $message = acajoom::printYN(acajoom::upgrade_News3(), '<br />' . _ACA_IMPORT_SUCCESS . ' YaNC data', _ACA_ERROR); acajoom::resetUpgrade(3); echo '<br />' . $message; break; } if ($showListing) { backHTML::_header(_ACA_MENU_UPDATE, 'backup.png', $message, $task, $action); backHTML::_upgrade(); $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; echo $forms['main']; backHTML::formStart('', '', ''); backHTML::showCompsList($update); $go[] = acajoom::makeObj('act', $action); backHTML::formEnd($go); } elseif ($showComplete) { backHTML::_header(_ACA_MENU_UPDATE, 'backup.png', $message, $task, $action); $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; echo $forms['main']; backHTML::formStart('', '', ''); backHTML::showUpdateOptions($update); $go[] = acajoom::makeObj('act', $action); backHTML::formEnd($go); } }
function send($showHTML, $mailing, $receivers, $list, &$message, $tags = null) { $h = ''; $xf = new xonfig(); if (empty($mailing)) { $message = _ACA_NO_MAILING_ENTERED; return false; } elseif (empty($receivers)) { $message = _ACA_NO_ADDRESS_ENTERED; return false; } elseif (empty($list)) { $message = _ACA_NO_LIST_ENTERED; return false; } else { $message = ''; } $mailingId = $mailing->id; $issue_nb = $mailing->issue_nb; $subject = $mailing->subject; $content = $mailing->htmlcontent; $textonly = $mailing->textonly; $fromname = $mailing->fromname; $fromemail = $mailing->fromemail; $images = $mailing->images; $listId = $list->id; $html = $list->html; $layout = $list->layout; $totalsofar = number_format(0, 4, ',', ''); $nbPause = 0; $tags['issuenb'] = $issue_nb; if (ini_get('safe_mode')) { } else { @set_time_limit(60 * $GLOBALS[ACA . 'script_timeout']); } ignore_user_abort(true); ### create the mail $mail = acajoom_mail::getMailer($mailing); ### create content acajoom_mail::getContent($images, $layout, $content, $textonly); $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; $html_sent = 0; $text_sent = 0; $size = sizeof($receivers); $i = 0; ?> <form action="index2.php" method="post" name="adminForm"> <input type="hidden" name="option" value="com_acajoom" /> <input type="hidden" name="act" value="mailing" /> <input type="hidden" name="listype" value="<?php echo $mailing->list_type; ?> " /> <input type="hidden" name="task" value="" /> </form> <?php if ($showHTML) { echo '<form action="#" name="counterForm">'; echo _ACA_SENDING_EMAIL; echo ': <input type="text" size="6" name="teller" value="0" style="border: 0px solid white; font-family: Arial, Helvetica, sans-serif; font-size: 1.1em;" size="1" /> of ' . $size . '</form>'; } $garde = 0; //If two errors occur, we stop to try while (ob_get_level() > 0 and $garde < 2) { if (!ob_end_flush()) { $garde++; } } $log_detailed = "\r\n" . "\r\n" . '*** ' . strftime(_DATE_FORMAT_LC) . ' ***' . "\r\n"; $skip_subscribers = mosGetParam($_SESSION, 'skip_subscribers' . $mailing->id, 0); if (empty($skip_subscribers)) { $skip_subscribers = mosGetParam($_REQUEST, 'skip_subscribers' . $mailing->id, 0); } $nbsubscribers = count($receivers); foreach ($receivers as $receiver) { $i++; if ($i <= $skip_subscribers) { continue; } $tags['user_id'] = $receiver->user_id; if ($html && intval($receiver->receive_html) == 1) { $mail->IsHTML(true); $ashtml = 1; $Altbody = acajoom_mail::replaceTags($textonly, $receiver, $list, $mailingId, 0, $tags); $mail->AltBody = acajoom_mail::safe_utf8_encode($Altbody, $mail->CharSet); $html_sent++; $mail->Body = acajoom_mail::replaceTags($content, $receiver, $list, $mailingId, $ashtml, $tags); } else { $mail->IsHTML(false); $mail->AltBody = ''; $ashtml = 0; $text_sent++; $mail->Body = acajoom_mail::replaceTags($textonly, $receiver, $list, $mailingId, $ashtml, $tags); if (!empty($images)) { foreach ($images as $image) { $img = explode('|', $image); $attrib = explode("/", $img[0]); $path = $GLOBALS['mosConfig_absolute_path'] . '/images/stories/'; if (count($img) == 1) { $imageName = $img[0]; } else { $imageName = $attrib[count($attrib) - 1]; for ($index = 0; $index < sizeof($attrib) - 1; $index++) { $path .= $attrib[$index] . '/'; } } $mail->AddAttachment($path . $imageName); } } } $tname = explode(" ", $receiver->name); $firstname = $tname[0]; $mail->AddAddress($receiver->email, $receiver->name); $sujetReplaced = str_replace('[NAME]', $receiver->name, $subject); $sujetReplaced = str_replace('[FIRSTNAME]', $firstname, $sujetReplaced); if (class_exists('auto')) { auto::tags($sujetReplaced, $tags); } $mail->Subject = $sujetReplaced; $mailssend = $mail->Send(); if ($showHTML) { echo '<br /><strong>' . $i . ': '; } if ($mail->error_count > 0) { $h .= $receiver->email . '</strong> -> ' . xmailing::M('red', _ACA_MESSAGE_NOT . '! ' . _ACA_MAILER_ERROR . ': ' . $mail->ErrorInfo); $log_detailed .= '[' . $mailingId . '] ' . $subject . ' : ' . $receiver->email . ' -> ' . _ACA_MESSAGE_NOT . "\r\n" . _ACA_MAILER_ERROR . ': ' . $mail->ErrorInfo . "\r\n"; if ($html && intval($receiver->receive_html) == 1) { $html_sent--; } else { $text_sent--; } } else { $h .= $receiver->email . '</strong> -> ' . xmailing::M('green', _ACA_MESSAGE_SENT_SUCCESSFULLY); $log_detailed .= '[' . $mailingId . '] ' . $subject . ' : ' . $receiver->email . ' -> ' . _ACA_MESSAGE_SENT_SUCCESSFULLY . "\r\n"; if ($GLOBALS[ACA . 'enable_statistics'] == 1 and $GLOBALS[ACA . 'statistics_per_subscriber'] == 1) { xmailing::insertStats($mailingId, $receiver->id, $ashtml); } } $mail->ClearAddresses(); if ($showHTML) { echo '<script type="text/javascript" language="javascript">document.counterForm.teller.value=\'' . $i . '\';</script>'; } flush(); if ($i % $GLOBALS[ACA . 'emails_between_pauses'] == 0 and $i < $nbsubscribers) { if ($showHTML) { echo $h; } $h = ''; flush(); $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; if ($totalsofar > 0) { $totaltime = $totalsofar; $totalstr = strval($totaltime); } else { $totaltime = number_format($endtime - $starttime - $nbPause * $GLOBALS[ACA . 'pause_time'], 4, ',', ''); $totalstr = strval($totaltime); } if ($GLOBALS[ACA . 'display_trace'] == 1 and $showHTML) { echo '<br/>Time to send: ' . $totalstr . ' ' . _ACA_SECONDS; echo '<br/>Number of subscribers: ' . ($text_sent + $html_sent) . "<br />" . 'HTML format: ' . $html_sent . "<br />" . 'Text format: ' . $text_sent . "<br />"; } else { echo _ACA_QUEUE_PROCESSED; } if ($GLOBALS[ACA . 'wait_for_user'] == 0) { $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = number_format($endtime - $starttime - $nbPause * $GLOBALS[ACA . 'pause_time'], 4, ',', ''); $totalstr = strval($totaltime); //$h .= '<br /><b>--- Waiting ' . $GLOBALS[ACA.'pause_time']. ' seconds ---</b><br />'; if (!class_exists('auto')) { $h .= '<b>--- Total time so far: ' . $totalstr . ' seconds ---</b><br />'; } $log_detailed .= "\r\n" . '--- Waiting ' . $GLOBALS[ACA . 'pause_time'] . ' seconds ---' . "\r\n\r\n"; $log_detailed .= "\r\n" . '<b>--- Total time so far: ' . $totalstr . ' seconds ---</b><br />' . "\r\n\r\n"; $nbPause++; echo $h; flush(); echo '<br/><b>--- Waiting ' . $GLOBALS[ACA . 'pause_time'] . ' seconds : </b>'; for ($a = 0; $a < $GLOBALS[ACA . 'pause_time'] - 1; $a++) { sleep(1); echo $GLOBALS[ACA . 'pause_time'] - $a - 1 . ' '; flush(); } //ADRIEN REFRESH PAGE if (class_exists('auto')) { $_SESSION['skip_subscribers' . $mailing->id] = $i; //Ecriture des statistiques if ($GLOBALS[ACA . 'enable_statistics'] == 1 and ($html_sent > 0 or $text_sent > 0)) { xmailing::updateStatsGlobal($mailingId, $html_sent, $text_sent, false); } if ($GLOBALS[ACA . 'send_data'] == 1) { acajoom_mail::sendReport($fromemail, $totalstr, $html_sent, $text_sent); } $xf->plus('totalmailingsent' . $list->list_type, $html_sent + $text_sent); $xf->plus('totalmailingsent0', $html_sent + $text_sent); $log_simple = 'Time to send: ' . $totalstr . ' ' . _ACA_SECONDS . "\r\n" . 'Number of subscribers: ' . ($text_sent + $html_sent) . "\r\n" . 'HTML format: ' . $html_sent . "\r\n" . 'Text format: ' . $text_sent . "\r\n"; $log_detailed = $log_simple . 'Details: ' . "\r\n" . $log_detailed . "\r\n"; if (class_exists('lisType')) { acajoom_mail::writeLogs($list, $log_simple, $log_detailed); } echo 0; flush(); $link = 'index2.php?option=com_acajoom&act=mailing&task=sendNewsletter&listid=' . $listId . '&listype=' . $mailing->list_type . '&mailingid=' . $mailing->id; compa::redirect($link); exit(0); } } else { $log_detailed .= "\r\n" . '--- Waiting for user input to continue sending ---' . "\r\n\r\n"; $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = number_format($endtime - $starttime, 4, ',', ''); $timeStr = mosGetParam($_REQUEST, 'time', ''); $time = floatval($timeStr); $totalsofar = $endtime - $starttime + $time; $totalstr = strval($totalsofar); ?> <form action="index2.php" method="post"> <input type="hidden" name="option" value="com_acajoom" /> <input type="hidden" name="act" value="mailing" /> <input type="hidden" name="task" value="sendNewsletter" /> <input type="hidden" name="listid" value="<?php echo $listId; ?> " /> <input type="hidden" name="listype" value="<?php echo $mailing->list_type; ?> " /> <input type="hidden" name="skip_subscribers" value="<?php echo $i; ?> " /> <input type="hidden" name="mailingid" value="<?php echo $mailing->id; ?> " /> <input type="hidden" name="time" value="<?php echo $totalstr; ?> " /> <br /> <input type="submit" name="submit" value="<?php echo _ACA_CONTINUE_SENDING; ?> " /> </form> <?php } } else { if ($showHTML) { echo $h; } $h = ''; } } if ($GLOBALS[ACA . 'enable_statistics'] == 1) { xmailing::updateStatsGlobal($mailingId, $html_sent, $text_sent, false); } unset($_SESSION['skip_subscribers' . $mailing->id]); $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; if ($totalsofar > 0) { $totaltime = $totalsofar; $totalstr = strval($totaltime); } else { $totaltime = number_format($endtime - $starttime - $nbPause * $GLOBALS[ACA . 'pause_time'], 4, ',', ''); $totalstr = strval($totaltime); } if ($GLOBALS[ACA . 'send_data'] == 1) { acajoom_mail::sendReport($fromemail, $totalstr, $html_sent, $text_sent); } $xf->plus('totalmailingsent' . $list->list_type, $html_sent + $text_sent); $xf->plus('totalmailingsent0', $html_sent + $text_sent); $log_simple = 'Time to send: ' . $totalstr . ' ' . _ACA_SECONDS . "\r\n" . 'Number of subscribers: ' . ($text_sent + $html_sent) . "\r\n" . 'HTML format: ' . $html_sent . "\r\n" . 'Text format: ' . $text_sent . "\r\n"; $log_detailed = $log_simple . 'Details: ' . "\r\n" . $log_detailed . "\r\n"; if ($GLOBALS[ACA . 'display_trace'] == 1 and $showHTML) { echo '<br /><b>' . _ACA_SENDING_TOOK . ' ' . $totalstr . ' ' . _ACA_SECONDS . '</b><br />'; echo 'Number of subscribers: ' . ($text_sent + $html_sent) . "<br />" . 'HTML format: ' . $html_sent . "<br />" . 'Text format: ' . $text_sent . "<br />"; } else { echo _ACA_QUEUE_PROCESSED; } if (class_exists('lisType')) { acajoom_mail::writeLogs($list, $log_simple, $log_detailed); } ob_start(); if ($html_sent + $text_sent > 0) { return true; } else { $message = xmailing::M('no', _ACA_NO_MAILING_SENT); return false; } }
function acajoombot_content_editab() { $content_items = acajoombot_content_getitems(); ob_start(); ?> <script type="text/javascript"> <!-- function selectFormFB(){ if(!document.adminForm){ return 'mosForm'; }else{ return 'adminForm'; } } function selectFB(variable){ var formname = selectFormFB(); return eval('document.'+formname+'.'+variable); } function acajoombot_content_update_output() { // get the info var form = document.adminForm; if(!form){ form = document.mosForm; } var content_id = form.content_id.options[form.content_id.selectedIndex].value; //changed to use radio instead of checkbox - p0stman911 for (i=0;i<form.content_type.length;i++) { if (form.content_type[i].checked) { var content_type = form.content_type[i].value; } } // output the tag form.content_tag.value = "{contentitem:" + content_id + "|" + content_type + "}"; } // end function //--> </script> <table class="acajoomcss_bots" width="100%"> <tr> <td style="vertical-align: top;"> <span class="editlinktip"> <?php $tip = _ACA_TITLE_ONLY_TIPS; $title = _ACA_TITLE_ONLY; $title_only = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; $tip = _ACA_INTRO_ONLY_TIPS; $title = _ACA_INTRO_ONLY; $intro_only = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; $tip = _ACA_FULL_ARTICLE_TIPS; $title = _ACA_FULL_ARTICLE; $full_article = "<span class=\"editlinktip\">" . compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>"; ?> </span> <br /><br /> <span class="editlinktip"> <input type="radio" name="content_type" value="0" checked="checked" onclick="acajoombot_content_update_output();" /><?php echo $full_article; ?> <input type="radio" name="content_type" value="1" onclick="acajoombot_content_update_output();" /><?php echo $intro_only; ?> <input type="radio" name="content_type" value="2" onclick="acajoombot_content_update_output();" /><?php echo $title_only; ?> </span> <br /><br /> <span class="editlinktip"> <?php $tip = _ACA_TAGS_TITLE_TIPS; $title = _ACA_TAGS_TITLE . ': '; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> <input type="text" name="content_tag" class="inputbox" size="20" onfocus="this.select();" /> <br /><br /> <select name="content_id" class="inputbox" size="30" onchange="acajoombot_content_update_output();"> <?php if (sizeof($content_items) > 0) { foreach ($content_items as $content_item) { echo '<option value="' . $content_item->id . '">' . $content_item->section . '/' . $content_item->category . '/' . $content_item->title . '</option>' . "\n"; } } ?> </select> </td> </tr> </table> <?php $return = ob_get_contents(); ob_end_clean(); return array(_ACA_CONTENT_ITEM, $return); }
function saveMailing(&$mailingId, $listId) { global $database; $list = lists::getOneList($listId); $allow_html = compa::allow_html(); $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); $xf = new xonfig(); $listType = mosGetParam($_REQUEST, 'listype', 0); $senddate = mosGetParam($_REQUEST, 'senddate', '0000-00-00 00:00:00'); if (mosGetParam($_REQUEST, 'task', '') == 'saveSend') { $senddate = acajoom::getNow(); } $subject = mosGetParam($_REQUEST, 'subject', '', $allow_html); $content = mosGetParam($_REQUEST, 'content', '', $allow_html); $alt_content = mosGetParam($_REQUEST, 'alt_content', '', _MOS_ALLOWRAW); $published = mosGetParam($_REQUEST, 'published', 0); $visible = mosGetParam($_REQUEST, 'visible', 1); $html = mosGetParam($_REQUEST, 'html', 1); $new_list = mosGetParam($_REQUEST, 'new_list', 0); $fromname = mosGetParam($_REQUEST, 'fromname', ''); $fromemail = mosGetParam($_REQUEST, 'fromemail', ''); $frombounce = mosGetParam($_REQUEST, 'frombounce', ''); $userid = mosGetParam($_REQUEST, 'userid', 0); $delay = mosGetParam($_REQUEST, 'delay', 1); $acc_level = mosGetParam($_REQUEST, 'acc_level', $list->acc_id); $issue_nb = mosGetParam($_REQUEST, 'issue_nb', 1); $delay = $delay * 24 * 60; $attachments = mosGetParam($_REQUEST, 'attachments', ''); $attach = ''; if (!empty($attachments)) { foreach ($attachments as $attachment) { $attach .= $attachment . "\n"; } } if (!empty($_FILES['file_0']['name'])) { $otherAttachs = xmailing::uploadFiles(); if (!empty($otherAttachs)) { foreach ($otherAttachs as $otherAttach) { $attach .= '/' . $otherAttach . "\n"; } } } $images = mosGetParam($_REQUEST, 'images', ''); if ($html == 0) { $alt_content = $content; } if ($senddate != '0000-00-00 00:00:00' and $senddate > acajoom::getNow()) { $published = 2; } if ($new_list != 0) { $query = 'INSERT INTO `#__acajoom_mailings` (`list_id`, `list_type`, `send_date`, `subject`, `htmlcontent`, `textonly`, `attachments`, `images`, `published`, `html`, `visible`, `fromname`, `fromemail`, `frombounce`, `author_id`, `delay`, `issue_nb` , `acc_level` , `createdate`) VALUES( \'' . $listId . '\', \'' . $listType . '\', \'' . $senddate . '\', \'' . addslashes($subject) . '\', \'' . addslashes($content) . '\', \'' . addslashes($alt_content) . '\', \'' . $attach . '\', \'' . $images . '\', \'' . $published . '\', \'' . $html . '\', \'' . $visible . '\', \'' . $fromname . '\', \'' . $fromemail . '\', \'' . $frombounce . '\', \'' . $userid . '\', \'' . $delay . '\', \'' . $issue_nb . '\', \'' . $acc_level . '\' , \'' . acajoom::getNow() . '\' ) '; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); $query = 'SELECT max(id) FROM `#__acajoom_mailings` WHERE `list_id` = ' . $listId . ' AND `issue_nb` = \'' . $issue_nb . '\''; $query .= ' AND `published` != -1 '; $database->setQuery($query); $mailingId = $database->loadResult(); $erro->err .= $database->getErrorMsg(); if ($mailingId == 1) { $xf->update('firstmailing', $listType); } $xf->plus('totalmailing0', 1); $xf->plus('act_totalmailing0', 1); $xf->plus('totalmailing' . $listType, 1); $xf->plus('act_totalmailing' . $listType, 1); xmailing::insertStatsGlobal($mailingId); } else { $query = "UPDATE `#__acajoom_mailings` SET " . "\t`subject` = '" . addslashes($subject) . "', " . "\t`htmlcontent` = '" . addslashes($content) . "', " . "\t`textonly` = '" . addslashes($alt_content) . "', " . "\t`attachments` = '{$attach}', " . "\t`images` = '{$images}', " . "\t`published` = '{$published}', " . "\t`html` = {$html} , " . "\t`visible` = {$visible} , " . "\t`fromname` = '{$fromname}', " . "\t`fromemail` = '{$fromemail}', " . "\t`frombounce` = '{$frombounce}', " . "\t`author_id` = '{$userid}' , " . "\t`delay` = {$delay} , " . "\t`acc_level` = {$acc_level} , " . "\t`send_date` = '{$senddate}' " . "\tWHERE `id` = {$mailingId} "; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); } if (!$erro->E(__LINE__, '8414', $database)) { return false; } else { lisType::updateNewsletters(); if ($listType == 2) { if ($new_list) { $subscribers = subscribers::getSubscribers(-1, -1, '', $total, $listId, '', 1, 1, ''); } else { $subscribers = subscribers::getSubscribers(-1, -1, '', $total, $listId, $mailingId, 1, 1, ''); } $subsId = acajoom::convertObjectToIdList($subscribers, 'id'); if (!empty($subsId)) { $queues = queue::getAllOneList($listId); if (!empty($queues)) { if ($queues[0]->mailing_id == 0) { $qids = acajoom::convertObjectToIdList($queues, 'qid'); $erro->ck = queue::updateQueues('', $qids, $listId, $acc_level, false); } else { $erro->ck = queue::updateQueues($subsId, '', $listId, $acc_level, false); } } else { return true; } if (!$erro->Eck(__LINE__, '8415')) { return false; } } } elseif ($listType == 1 and $senddate > acajoom::getNow()) { $subscribers = subscribers::getSubscribers(-1, -1, '', $total, $listId, '', 1, 1, ''); $subsId = acajoom::convertObjectToIdList($subscribers, 'id'); if (!empty($subsId)) { if ($new_list == 1) { if (class_exists('auto')) { $erro->ck = auto::insertQueuesForScheduledNews($subsId, $listId, $acc_level, $mailingId, $senddate); } } else { $queues = queue::getQueueFromMailingId($mailingId); if (!empty($queues)) { $erro->ck = queue::updateQueueData('', $subsId, 1, $listId, $mailingId, $issue_nb, $senddate, 0, $acc_level, 2); return $erro->Eck(__LINE__, '8417', 'put here 1 $d'); } else { if (class_exists('auto')) { $erro->ck = auto::insertQueuesForScheduledNews($subsId, $listId, $acc_level, $mailingId, $senddate); } } } return $erro->Eck(__LINE__, '8416', 'put here 2 $d'); } } return true; } }
function miseEnHTML($title, $tip, $compoment) { $html = '<tr>' . "\n\r"; $html .= ' <td width="185" class="key">' . "\n\r"; $html .= ' <span class="editlinktip">' . "\n\r"; $html .= compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); $html .= ' </span>' . "\n\r"; $html .= ' </td>' . "\n\r"; $html .= ' <td>' . $compoment . ' ' . "\n\r"; $html .= ' </td>' . "\n\r"; $html .= '</tr>' . "\n\r"; return $html; }
function updateListFromEdit($listId, $status, $new) { global $my; $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); $listUpdated = ''; $total = 0; $allow_html = compa::allow_html(); $listUpdated->id = $listId; $listUpdated->list_name = mosGetParam($_REQUEST, 'list_name', '', $allow_html); $listUpdated->list_desc = mosGetParam($_REQUEST, 'list_desc', '', $allow_html); //$listUpdated->list_desc = str_replace('"', '"' , $listUpdated->list_desc); //$listUpdated->list_name = str_replace('"', '"' , $listUpdated->list_name); $listUpdated->sendername = mosGetParam($_REQUEST, 'sendername', ''); $listUpdated->senderemail = mosGetParam($_REQUEST, 'senderemail', ''); $listUpdated->bounceadres = mosGetParam($_REQUEST, 'bounceadres', ''); $listUpdated->layout = mosGetParam($_REQUEST, 'layout', '', $allow_html); $listUpdated->template = mosGetParam($_REQUEST, 'template', 0); $listUpdated->subscribemessage = mosGetParam($_REQUEST, 'subscribemessage', '', $allow_html); $listUpdated->unsubscribemessage = mosGetParam($_REQUEST, 'unsubscribemessage', '', $allow_html); $listUpdated->unsubscribesend = mosGetParam($_REQUEST, 'unsubscribesend', 1); $listUpdated->html = mosGetParam($_REQUEST, 'html', 1); $listUpdated->hidden = mosGetParam($_REQUEST, 'hidden', 0); $listUpdated->list_type = mosGetParam($_REQUEST, 'list_type', 1); $listUpdated->auto_add = mosGetParam($_REQUEST, 'auto_add', 0); $listUpdated->user_choose = mosGetParam($_REQUEST, 'user_choose', 0); $listUpdated->cat_id = mosGetParam($_REQUEST, 'cat_id', 0); $listUpdated->delay_min = mosGetParam($_REQUEST, 'delay_min', 0); $listUpdated->delay_max = mosGetParam($_REQUEST, 'delay_max', 0); $listUpdated->follow_up = mosGetParam($_REQUEST, 'follow_up', 0); $listUpdated->notify_id = $listUpdated->list_type == '7' ? mosGetParam($_REQUEST, 'notify_id', 0) : 0; $listUpdated->owner = $my->id; $listUpdated->auto_add = mosGetParam($_REQUEST, 'auto_add', 0); $listUpdated->acc_level = mosGetParam($_REQUEST, 'acc_level', 25); $listUpdated->acc_id = mosGetParam($_REQUEST, 'acc_id', 29); $listUpdated->footer = mosGetParam($_REQUEST, 'footer', 1); $listUpdated->start_date = mosGetParam($_REQUEST, 'start_date', 0); $listUpdated->next_date = mosGetParam($_REQUEST, 'next_date', 0); $listUpdated->notification = 0; if ($status == '') { $listUpdated->published = mosGetParam($_REQUEST, 'published', 0); } else { $listUpdated->published = $status; } if ($listUpdated->published == 0 and ($listUpdated->list_type == 2 or $listUpdated->list_type == 3)) { $published = 0; } else { $published = $listUpdated->published; } if (!empty($listUpdated->hidden)) { $visible = $listUpdated->hidden; } else { $visible = 0; } if ($new) { $published = $listUpdated->published; } if (!lists::updateList($listId, $listUpdated, $status, $new)) { return false; } if ($listUpdated->list_type != 11) { return xmailing::updateMailingFromList($listId, $published, $listUpdated->html, $visible); } else { return true; } }
function com_install() { global $database; global $_VERSION; require_once $GLOBALS['mosConfig_absolute_path'] . '/components/com_acajoom/defines.php'; require_once WPATH_ADMIN . 'config.acajoom.php'; require_once WPATH_ADMIN . 'admin.acajoom.html.php'; require_once WPATH_CLASS . 'class.acajoom.php'; $update = new wupdate(); $xf = new xonfig(); $return = ''; if (!is_writable($GLOBALS['mosConfig_absolute_path'] . $acajoomConfigFile['upload_url'])) { @chmod($GLOBALS['mosConfig_absolute_path'] . $acajoomConfigFile['upload_url'], 0777); } $query[] = "UPDATE #__components\n\t SET admin_menu_img='../administrator/components/com_acajoom/images/acajoom_icon.png'\n\t WHERE admin_menu_link='option=com_acajoom'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/edit.png',\n\t name='" . compa::encodeutf(_ACA_MENU_LIST) . "',\n\t admin_menu_alt='" . _ACA_MENU_LIST . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=list'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/users_add.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_SUBSCRIBERS) . "',\n\t admin_menu_alt='" . _ACA_MENU_SUBSCRIBERS . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=subscribers'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/messaging_inbox.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_NEWSLETTERS) . "',\n\t admin_menu_alt='" . _ACA_MENU_NEWSLETTERS . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=mailing&listype=1'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/messaging_config.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_AUTOS) . "',\n\t admin_menu_alt='" . _ACA_MENU_AUTOS . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=mailing&listype=2'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/query.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_STATS) . "',\n\t admin_menu_alt='" . _ACA_MENU_STATS . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=statistics'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/menus.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_CONF) . "',\n\t admin_menu_alt='" . _ACA_MENU_CONF . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=configuration'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/restore.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_UPDATE) . "',\n\t admin_menu_alt='" . _ACA_MENU_UPDATE . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=update'"; $query[] = "UPDATE #__components\n\t SET admin_menu_img='../includes/js/ThemeOffice/credits.png' ,\n\t name='" . compa::encodeutf(_ACA_MENU_ABOUT) . "',\n\t admin_menu_alt='" . _ACA_MENU_ABOUT . "'\n\t WHERE admin_menu_link='option=com_acajoom&act=about'"; $q = " SELECT `text` FROM `#__acajoom_xonfig` WHERE `akey` = 'version' "; $database->setQuery($q); $vers = $database->loadResult(); $err = $database->getErrorMsg(); if (!empty($err)) { $q = " SELECT `text` FROM `#__acajoom_xonfig` WHERE `key` = 'version' "; $database->setQuery($q); $vers = $database->loadResult(); if (!empty($vers) and $update->checkVersion($vers, '1.0.6')) { ### UPDATE database if before 1.0.7 $query[] = "ALTER TABLE `#__acajoom_mailings` CHANGE `images` `images` TEXT NOT NULL "; $query[] = "ALTER TABLE `#__acajoom_lists` ADD `footer` TINYINT( 1 ) NOT NULL DEFAULT '1' "; $query[] = "ALTER TABLE `#__acajoom_lists` ADD `notify_id` INT( 10 ) NOT NULL DEFAULT '0' "; $query[] = "ALTER TABLE `#__acajoom_xonfig` DROP INDEX `key` "; $query[] = "ALTER TABLE `#__acajoom_xonfig` CHANGE `key` `akey` VARCHAR( 32 ) NOT NULL "; $query[] = "ALTER TABLE `#__acajoom_xonfig` CHANGE `value` `value` INT( 11 ) NOT NULL "; $query[] = "ALTER TABLE `#__acajoom_stats_global` DROP `listid` "; $query[] = "ALTER TABLE `#__acajoom_stats_global` DROP INDEX `listid` "; $query[] = "ALTER TABLE `#__acajoom_stats_global` ADD PRIMARY KEY ( `mailing_id` ) "; $query[] = "ALTER TABLE `#__acajoom_stats_details` DROP `listid` "; $query[] = "ALTER TABLE `#__acajoom_stats_details` DROP INDEX `listid` "; $query[] = "ALTER TABLE `#__acajoom_stats_details` ADD PRIMARY KEY ( `mailing_id` , `subscriber_id` ) "; ### 1.0.9 $query[] = " ALTER TABLE `#__acajoom_mailings` CHANGE `fromname` `fromname` VARCHAR( 64 ) NOT NULL "; $query[] = " ALTER TABLE `#__acajoom_lists` CHANGE `sendername` `sendername` VARCHAR( 64 ) NOT NULL "; } } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.0.8')) { $query[] = " ALTER TABLE `#__acajoom_mailings` CHANGE `fromname` `fromname` VARCHAR( 64 ) NOT NULL "; $query[] = " ALTER TABLE `#__acajoom_lists` CHANGE `sendername` `sendername` VARCHAR( 64 ) NOT NULL "; ### upgrade path for new versions $xf->insert('wait_for_user', '0', 0); $xf->insert('report_site', 'http://www.acajoom.com', 0); $xf->insert('use_sef', '0', 0); $xf->insert('send_error', '1', 0); $xf->insert('report_error', '1', 0); $xf->insert('wait_for_user', '0', 0); $xf->insert('show_archive', '1', 0); $xf->insert('update_notification', '1', 0); $xf->update('send_log_address', '@acajoom.com'); $xf->update('update_url', 'http://www.acajoom.com/update/'); } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.1.0')) { $query[] = "ALTER TABLE `#__acajoom_lists` ADD `notification` INT( 10 ) NOT NULL DEFAULT '0' "; $xf->update('listname1', '_ACA_NEWSLETTER'); $xf->update('listnames1', '_ACA_MENU_NEWSLETTERS'); } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.1.4')) { $xf->insert('last_sub_update', '', 0); $xf->insert('level', '1', 0); } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.3.0')) { $xf->insert('show_author', '0', 0); } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.5.5')) { $xf->insert('addEmailRedLink', '0', 0); } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.5.5')) { $query[] = " ALTER TABLE `#__acajoom_subscribers` ADD INDEX `subscribe_date` ( `subscribe_date` ) "; $query[] = " ALTER TABLE `#__acajoom_queue` CHANGE `subscriber_id` `subscriber_id` INT( 11 ) DEFAULT '0' NOT NULL "; } if (empty($err) and !empty($vers) and $update->checkVersion($vers, '1.6.4')) { $xf->insert('show_jcalpro', '0', 0); $xf->insert('redirectconfirm', '', 0); $xf->insert('itemidAca', '99', 0); } $query2 = "SHOW COLUMNS FROM `#__acajoom_lists` "; $database->setQuery($query2); $columns = $database->loadResultArray(); if (!in_array('cat_id', $columns)) { $query[] = "ALTER TABLE `#__acajoom_lists` CHANGE `choose_time` `cat_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'"; } if (!in_array('next_date', $columns)) { $query[] = "ALTER TABLE `#__acajoom_lists` ADD `next_date` INT( 11 ) NOT NULL AFTER `notify_id` "; } if (!in_array('start_date', $columns)) { $query[] = "ALTER TABLE `#__acajoom_lists` ADD `start_date` DATE NOT NULL AFTER `next_date`"; } $query[] = 'UPDATE `#__acajoom_lists` SET `acc_level` = 24 WHERE `acc_level` = 0'; foreach ($acajoomConfigFile as $key => $val) { if (!isset($GLOBALS[ACA . $key])) { $xf->insert($key, $val, 0); } } if (!empty($vers) and $update->checkVersion($vers, '1.2.2')) { $query[] = "UPDATE `#__acajoom_lists` SET `acc_id` = '29' WHERE `acc_id` = '25' "; } if (!defined('WADMIN')) { define('WADMIN', 'administrator' . DS . 'components' . DS . 'com_acajoom' . DS); } if (!defined('WFRONT')) { define('WFRONT', 'components' . DS . 'com_acajoom' . DS); } $file[] = 'templates'; $file[] = 'templates/default'; $file[] = 'templates/index.html'; $file[] = 'templates/default/default.html'; $file[] = 'templates/default/tpl0_abovefooter.jpg'; $file[] = 'templates/default/tpl0_powered_by.gif'; $file[] = 'templates/default/tpl0_spacer.gif'; $file[] = 'templates/default/tpl0_top_header.jpg'; $file[] = 'templates/default/tpl0_underban.jpg'; $file[] = 'templates/default/index.html'; foreach ($file as $key5 => $ins) { if (!file_exists($GLOBALS['mosConfig_absolute_path'] . DS . WFRONT . $ins) && file_exists($GLOBALS['mosConfig_absolute_path'] . DS . WADMIN . $ins)) { @rename($GLOBALS['mosConfig_absolute_path'] . DS . WADMIN . $ins, $GLOBALS['mosConfig_absolute_path'] . DS . WFRONT . $ins); } } $size = sizeof($query); for ($index = 0; $index < $size; $index++) { $database->setQuery($query[$index]); $database->query(); } if (empty($vers)) { $xf->filetoDatabase($acajoomConfigFile); } $return .= setupMaiOptions($acajoomConfigFile); $return .= installBots(); $return .= installModule(); if (acajoom::checkCB()) { $return .= installPlugin(); } subscribers::updateSubscribers(true, true); require_once WPATH_ADMIN . 'version.php'; $xf->update('component', $localVersion['component']); $xf->update('type', $localVersion['type']); $xf->update('version', $localVersion['version']); $xf->update('level', $localVersion['level']); $message = acajoom::printM('noimage', _ACA_THANKYOU); backHTML::_header(_ACA_MENU_INSTALL, 'install.png', $message, '', ''); if ($acajoomConfigFile['type'] == 'PRO') { backHTML::about(); } elseif ($acajoomConfigFile['type'] == 'Plus') { backHTML::installPRO(); } else { backHTML::installPlus(); } $link = 'index2.php?option=com_acajoom&act=start'; echo '<table style="width: 100%; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>' . '<td style=" width: 140px;"> </td><td style="text-align: center; vertical-align: middle; width: 140px;"><div id="cpanel">'; backHTML::quickiconButton($link, 'inbox.png', _ACA_GET_STARTED, false, 'admin'); echo '</div><td></td></td></tr></tbody></table>' . '<div style="clear:both;"></div>'; echo '<br/><br/><br/><br/>'; echo compa::encodeutf($return); return $return; }