function getMailingDropList($listId, $listType, $order) { $lists = ''; $i = 0; $flag = array(); $lists[0]->name = _ACA_SEL_ALL; $lists[0]->id = '0-0'; $nb = explode(',', $GLOBALS[ACA . 'activelist']); $size = sizeof($nb); for ($k = 0; $k < $size; $k++) { $index = $nb[$k]; if ($listType == $index or $GLOBALS[ACA . 'listype' . $index] == 1 and $GLOBALS[ACA . 'totallist' . $index] > 0) { $i++; $lists[$i]->name = _ACA_ALL . ' ' . @constant($GLOBALS[ACA . 'listnames' . $index]); $lists[$i]->id = $index . '-0'; $flag[$index] = 0; } } if ($listId > 0) { $i++; $getList = lists::getLists($listId, 0, 1, $order, false, false, false); $lists[$i]->name = $getList[0]->list_name; $lists[$i]->id = $getList[0]->list_type . '-' . $getList[0]->id; } else { if ($listType == 0) { $getLists = lists::getLists(0, 0, 1, 'listype_name', false, false, false); } else { $getLists = lists::getLists(0, $listType, 1, $order, false, false, false); } foreach ($getLists as $getList) { $size = sizeof($nb); for ($k = 0; $k < $size; $k++) { $index = $nb[$k]; if ($getList->list_type == $index and !$flag[$index] and $GLOBALS[ACA . 'listype' . $index] == 1 and $GLOBALS[ACA . 'totallist' . $index] > 0) { $i++; $lists[$i]->name = '-- ' . @constant($GLOBALS[ACA . 'listnames' . $index]) . ' --'; $lists[$i]->id = $index . '-0'; $flag[$index] = true; } } if ($GLOBALS[ACA . 'listype' . $getList->list_type]) { $i++; $lists[$i]->name = $getList->list_name; $lists[$i]->id = $getList->list_type . '-' . $getList->id; } } } return $lists; }
public function attachinfo() { $files = lists::common('movies_center'); $files_db = \movies_model::where('attach_files', '!=', '')->lists('attach_files'); foreach ($files as $file) { if (!in_array($file, $files_db)) { $res[] = $file; } } // foreach($files as $file){ // } $data['all_files'] = $files; $data['files'] = $res; $data['attached'] = $files_db->unique(); return $data; }
function notification() { $Itemid = $GLOBALS[ACA . 'itemidAca']; $item = !empty($Itemid) ? '&Itemid=' . $Itemid : ''; if (isset($this->catId) and isset($this->notifType)) { if (lists::getNotifLists($this->lists, $this->notifType, $this->catId)) { $this->linear = 1; $this->introtext = 'Notify me of new product'; $this->redirectURL = 'index.php?option=com_virtuemart&page=shop.browse&category_id=' . $this->catId . $item; $this->buttonRegistered = _CMN_YES; $this->buttonUnregistered = _CMN_NO; $this->_html = '<!-- Beginning Module : ' . acajoom::version() . ' -->' . "\n\r"; $this->_html .= $this->create(); $this->_html .= '<!-- End Module : ' . acajoom::version() . ' -->' . "\n\r"; } } return $this->_html; }
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/config/database.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/objects/list.php'; $database = new database(); $db = $database->getConnection(); $lists = new lists($db); echo "\t<div class='modal fade' id='myModal2' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true' style='display: none;'>"; echo "\t<div class='modal-dialog'>"; echo "\t\t<div class='modal-content'>"; echo "\t\t\t<div class='modal-header'>"; echo "\t\t\t\t<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>X</button>"; echo "\t\t\t\t<h4 class='modal-title' id='myModalLabel'>Pilih Supplier</h4>"; echo "\t\t\t</div>"; echo "\t\t\t<div class='modal-body'>"; echo "\t\t\t<form class='form-horizontal' action='' method='post'>"; echo "\t\t\t\t<div class='form-group'>"; echo "\t\t\t\t\t<label class='col-md-3 control-label' for='supplier_kode'>Nama Supplier</label>"; echo "\t\t\t\t\t<div class='col-md-7'>"; echo "\t\t\t\t\t\t<select id='supplier_kode' name='supplier_kode' class='form-control'>"; echo "\t\t\t\t\t\t\t<option>- PILIH -</option>"; $statement = $lists->ListSupplier(); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { extract($row); echo "<option value={$row['supplier_kode']}>{$row['supplier_nama']}</option>"; } echo "\t\t\t\t\t\t</select>"; echo "\t\t\t\t\t</div>"; echo "\t\t\t\t</div>"; echo "\t\t\t\t<div class='row'>"; echo "\t\t\t\t\t<div class='col-md-8'></div>\t\t";
/** * @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; }
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/objects/list.php'; $lists = new lists($db); if ($_POST) { $orderdetail->order_id = $_POST['order_id']; $orderdetail->item_kode = $_POST['item_kode']; $orderdetail->qty = $_POST['order_qty']; $orderdetail->notes = $_POST['order_notes']; $orderdetail->InsertTemp(); header("refresh: 0"); } ?> <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> <h4 class="modal-title" id="myModalLabel">Order Detail</h4> </div> <div class="modal-body"> <form class="form-horizontal" action="" method="post"> <div class="row"> <div class="form-group"> <label class="col-md-3 control-label" for="order_id">Order ID</label> <div class="col-md-7"> <input type="text" id="order_id" name="order_id" class="form-control" value="<?php echo $orders->order_id; ?> " readonly>
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; }
/** * @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; }
function NEWMAILING() { // // // // // mosMenuBar::endTable(); JToolBarHelper::spacer(); JToolBarHelper::custom('savePreview', 'preview.png', 'preview_f2.png', _ACA_MENU_PREVIEW, false); $listype = 0; if (isset($_GET['listype'])) { $listype = $_GET['listype']; } elseif (isset($_POST['droplist'])) { $maliste = explode('-', $_POST['droplist']); $listype = $maliste[0]; } elseif (isset($_POST['listype'])) { $listype = $_POST['listype']; } elseif (isset($_GET['listid'])) { $maliste = lists::getLists($_GET['listid'], 0, null, 'listnameA', false, false, false, false); $listype = $maliste[0]->list_type; } if ($listype == 1) { JToolBarHelper::spacer(50); JToolBarHelper::custom('saveSend', 'forward.png', 'forward_f2.png', _ACA_MENU_SEND, false); } JToolBarHelper::spacer(50); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::spacer(50); JToolBarHelper::cancel('show'); JToolBarHelper::spacer(); JToolBarHelper::custom('cpanel', 'tool.png', 'tool_f2.png', _ACA_MENU_CPANEL, false); // // mosMenuBar::endTable(); }
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 processConfirmationEmail($subscriberId, $listSub) { $status = true; $qid[0] = $subscriberId; $receiver = subscribers::getSubscribersFromId($qid, false); $listIds = implode(",", $listSub); $lists = lists::getSpecifiedLists($listIds, false); $message = ''; foreach ($lists as $list) { $Sub_TAG = ''; if (substr_count($list->subscribemessage, '[CONFIRM]') < 1) { $Sub_TAG = '[CONFIRM]'; } $mailing = null; if (empty($list->subscribemessage)) { $list->subscribemessage = ' '; } $mailing->subject = _ACA_SUBSCRIBE_SUBJECT_MESS; $mailing->htmlcontent = $list->subscribemessage . $Sub_TAG; $mailing->textonly = $list->subscribemessage . $Sub_TAG; $mailing->fromname = $list->sendername; $mailing->fromemail = $list->senderemail; $mailing->frombounce = $list->bounceadres; $mailing->id = 0; $mailing->issue_nb = 0; $mailing->images = ''; $mailing->attachments = ''; if (!acajoom_mail::sendOne($mailing, $receiver, $list, $message)) { $status = false; } $erro = 'Could not send the confirmation email, for list #:' . $list->id . ' , please contact the webmaster!'; break; } return $status; }
function preview($mailingId, $listId, &$message) { $list = null; $new = null; $mailing = xmailing::getOneMailing($list, $mailingId, '', $new); if ($listId > 0) { $list = lists::getOneList($listId); } else { $list = lists::getOneList($mailing->list_id); } $message = ''; if (ACA_CMSTYPE) { // joomla 15 $previewemailaddress = JRequest::getVar('emailaddress', ''); $previewname = JRequest::getVar('name', ''); $previewhtml = JRequest::getVar('html', '0'); } else { //joomla 1x $previewemailaddress = mosGetParam($_REQUEST, 'emailaddress', ''); $previewname = mosGetParam($_REQUEST, 'name', ''); $previewhtml = mosGetParam($_REQUEST, 'html', 0); } //endif $receivers = null; if (ACA_CMSTYPE) { // joomla 15 $my =& JFactory::getUser(); } else { global $my; } $d['email'] = trim($previewemailaddress); $infos = subscribers::getSubscriberIdFromEmail($d); if (empty($infos['subscriberId'])) { $d['email'] = $my->email; $infos = subscribers::getSubscriberIdFromEmail($d); } if (!empty($infos['subscriberId'])) { $receivers = subscribers::getSubscribersFromId(array($infos['subscriberId'])); } else { $receivers->id = 0; } $receivers->email = $previewemailaddress; $receivers->name = $previewname; $receivers->receive_html = $previewhtml; return acajoom_mail::sendOne($mailing, $receivers, $list, $message); }
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 updateSuscription($suscription) { $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); //$i = 0; //do { //$i++; foreach ($suscription->sub_list_id as $i => $value) { $queues = queue::suscriptionExist($suscription->user_id, $suscription->sub_list_id[$i]); if (!empty($queues)) { if (isset($suscription->subscribed[$i])) { if ($suscription->subscribed[$i] == 0) { $erro->ck = queue::deleteSubsQueue($suscription->user_id, $suscription->sub_list_id[$i]); $erro->Eck(__LINE__, '8520'); } else { $updatedQueue = $queues; $updatedQueue->acc_level = $suscription->acc_level[$i]; if ($queues->mailing_id < 1) { $mailingId = xmailing::getFirstMailingId($queues->list_id); if (!empty($mailingId)) { $list = lists::getOneList($queues->list_id); $mailing = queue::getValidMailing($list, $mailingId); if (!empty($mailing)) { $updatedQueue->type = $mailing->list_type; $updatedQueue->list_id = $list->id; $updatedQueue->mailing_id = $mailing->id; $updatedQueue->published = $list->published; $updatedQueue->send_date = acajoom::getNow(); if ($mailing->list_type == 1 or $mailing->list_type == 7) { $updatedQueue->issue_nb = 0; $updatedQueue->send_date = '0000-00-00 00:00:00'; $updatedQueue->delay = 0; } else { $updatedQueue->issue_nb = $mailing->issue_nb; $updatedQueue->send_date = acajoom::getNow(); $updatedQueue->delay = $mailing->delay; } } } $qid = ''; $qid[0] = $updatedQueue->qid; $erro->ck = queue::updateQueueData($qid, '', $updatedQueue->type, $updatedQueue->list_id, $updatedQueue->mailing_id, $updatedQueue->issue_nb, $updatedQueue->send_date, $updatedQueue->delay, $updatedQueue->acc_level, $updatedQueue->published); $erro->Eck(__LINE__, '8521'); } else { queue::updateAccessLevel($updatedQueue); } } } } else { if (isset($suscription->subscribed[$i])) { if ($suscription->subscribed[$i] == 1) { $subId = array(); $subId[0] = $suscription->user_id; $subList = isset($suscription->sub_list_id[$i]) ? $suscription->sub_list_id[$i] : 0; $subLevel = isset($suscription->acc_level[$i]) ? $suscription->acc_level[$i] : 29; $erro->ck = queue::updateQueues($subId, '', $subList, $subLevel, true); $erro->Eck(__LINE__, '8522'); } } } } //while (count($suscription->sub_list_id ) > $i ); return $erro->R(); }
function showSubscribers($subscribers, $action, $listId, &$lists, $start, $limit, $total, $showAdmin, $theLetterId, $emailsearch, $forms) { global $my; echo $forms['select']; ?> <input type="hidden" name="option" value="com_acajoom" /> <input type="hidden" name="act" value="<?php echo $action; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="listid" value="<?php echo $listId; ?> " /> <input type="hidden" name="limit" value="<?php echo $limit; ?> " /> <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="0"><tbody><tr> <td style="text-align: left; padding-left: 20px;"><span class="sectionname"> <?php if ($listId == 0) { echo _ACA_SUSCRIB_LIST; } else { $lt_name = lists::getLists($listId, 0, null, '', false, false, true); echo _ACA_SUSCRIB_LIST_UNIQUE . "<span style='color: rgb(51, 51, 51);'>" . $lt_name[0]->list_name . "</span>"; } ?> </span> </td> <td style="text-align: right;"> <?php echo _ACA_SEL_LIST . ' : ' . $lists['listid'] . " "; ?> <?php echo _ACA_FILTER; ?> : <input type="text" name="emailsearch" value="<?php echo $emailsearch; ?> " class="inputbox" onChange="document.AcajoomFilterForm.submit();" /> </td></tr></tbody></table> </form> <?php echo $forms['main']; ?> <input type="hidden" name="option" value="com_acajoom" /> <input type="hidden" name="act" value="<?php echo $action; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="userid" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="listid" value="<?php echo $listId; ?> " /> <input type="hidden" name="start" value="<?php echo $start; ?> " /> <input type="hidden" name="limit" value="<?php echo $limit; ?> " /> <input type="hidden" name="emailsearch" value="<?php echo $emailsearch; ?> " /> <table width="100%" border="0" cellspacing="0" cellpadding="4" class="adminlist"> <tr> <th class="title">#</th> <th class="title"> </th> <th class="title"><?php echo _ACA_INPUT_NAME; ?> </th> <th class="title"><?php echo _ACA_INPUT_EMAIL; ?> </th> <th class="title"><?php echo _ACA_SIGNUP_DATE; ?> </th> <th class="title"><center><?php echo _ACA_REGISTERED; ?> ?</center></th> <th class="title"><center><?php echo _ACA_CONFIRMED; ?> ?</center></th> <th class="title"><center><?php echo _ACA_HTML; ?> ?</center></th> <?php if ($my->usertype == 'Administrator' or $my->usertype == 'Super Administrator') { ?> <th class="title">id#</th> <?php } ?> </tr> <?php $i = 0; if (!empty($subscribers)) { foreach ($subscribers as $subscriber) { if ($subscriber->user_id != 0) { $img = 'tick.png'; $alt = 'Registered'; } else { $img = 'publish_x.png'; $alt = 'Unregistered'; } if ($subscriber->confirmed == 1) { $imgC = 'tick.png'; $altC = 'Confirmed'; } else { $imgC = 'publish_x.png'; $altC = 'Not confirmed'; } if ($subscriber->receive_html == 1) { $imgH = 'tick.png'; $altH = 'HTML'; } else { $imgH = 'publish_x.png'; $altH = 'TEXT'; } ?> <tr class="row<?php echo ($i + 1) % 2; ?> "> <td><?php echo $i + 1 + $start; ?> </td> <td> <input type="checkbox" name="cid[<?php echo $i; ?> ]" value="<?php echo $subscriber->id; ?> " onclick="isChecked(this.checked);" /> </td> <td> <a href="index2.php?option=com_acajoom&act=<?php echo $action; ?> &task=show&userid=<?php echo $subscriber->id; ?> " > <?php echo $subscriber->name; ?> </a></td> <td><?php echo $subscriber->email; ?> </td> <td><?php echo $subscriber->subscribe_date; ?> </td> <td align="center"> <img src="images/<?php echo $img; ?> " width="12" height="12" border="0" alt="<?php echo $alt; ?> " /> </td> <td align="center"> <img src="images/<?php echo $imgC; ?> " width="12" height="12" border="0" alt="<?php echo $altC; ?> " /> </td> <td align="center"> <img src="images/<?php echo $imgH; ?> " width="12" height="12" border="0" alt="<?php echo $altH; ?> " /> </td> <?php $i++; if ($my->usertype == 'Administrator' or $my->usertype == 'Super Administrator') { echo '<td align="center">' . $subscriber->id . '</td>'; } } } ?> </tr> </table> </form> <?php backHTML::footerCounts($start, $limit, $emailsearch, $total, 9, $action, $listId, ''); }
function updateUserstoAcajoom($force = false) { global $database; $time = isset($GLOBALS[ACA . 'last_sub_update']) && $GLOBALS[ACA . 'last_sub_update'] > 0 ? $GLOBALS[ACA . 'last_sub_update'] : 10000; $newTask = mktime(date("H") - 1, date("i"), date("s"), date("m"), date("d") - 1, date("Y")); if ($force or $newTask > $GLOBALS[ACA . 'last_sub_update']) { $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); $xf = new xonfig(); $newtime = mktime(date("H", $time) - 1, date("i", $time), date("s", $time), date("m", $time), date("d", $time), date("Y", $time)); $oneDay = date('Y-m-d H:i:s', $newtime); $query = 'SELECT M.* FROM `#__users` AS M ' . ' LEFT JOIN `#__acajoom_subscribers` AS N ON M.id = N.user_id OR M.email = N.email '; $query .= ' WHERE M.registerDate > \'' . $oneDay . '\''; $query .= ' AND N.id IS NULL AND M.block=0 '; $database->setQuery($query); $rows = $database->loadObjectList(); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '8638', $database); if ($erro->result and !empty($rows)) { foreach ($rows as $row) { $query = "INSERT INTO `#__acajoom_subscribers` (`user_id`,`subscribe_date`, `name`,`email`,`confirmed`)"; $query .= " VALUES ( {$row->id} , '{$row->registerDate}', '{$row->name}', '{$row->email}' , 1 ) "; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); $xf->plus('totalsubcribers0', 1); $xf->plus('act_totalsubcribers0', 1); $lists = lists::getLists(0, 0, null, '', true, false, false); if (!empty($lists)) { foreach ($lists as $list) { $qid[0] = subscribers::getSubscriberId($row->registerDate); $subscriber = subscribers::getSubscribersFromId($qid, false); $subId = array(); $subId[0] = $subscriber->id; $erro->ck = queue::updateQueues($subId, '', $list->id, @$list->acc_id, true); $erro->Eck(__LINE__, '8640'); } } } } } }
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 lists($action, $task, $listId, $listType) { global $database, $my; $message = ''; $xf = new xonfig(); $erro = new xerr(__FILE__, __FUNCTION__); $erro->show(); $showLists = true; switch ($task) { case 'new': if ($listType < 1) { $listType = 1; } $filename = $GLOBALS['mosConfig_absolute_path'] . '/components/com_acajoom/templates/default/default.html'; $handle = fopen($filename, "rb"); $template = fread($handle, filesize($filename)); fclose($handle); $template = str_replace('src="', 'src="' . $GLOBALS['mosConfig_live_site'] . '/', $template); $subscriber = subscribers::getSubscriberInfoFromUserId($my->id); $showLists = false; $newList->id = ''; $newList->html = 1; $newList->new_letter = 1; $newList->list_name = ''; $newList->list_desc = ''; $newList->sendername = $subscriber->name; $newList->senderemail = $subscriber->email; $newList->bounceadres = $subscriber->email; $newList->layout = $template; $newList->template = 0; $newList->hidden = 1; $newList->auto_add = 0; $newList->list_type = $listType; $newList->delay_min = 1; $newList->delay_max = 7; $newList->user_choose = 0; $newList->cat_id = 0; $newList->follow_up = ''; $newList->notify_id = 0; $newList->owner = $my->id; $newList->acc_level = 25; $newList->acc_id = 29; $newList->published = 0; $newList->start_date = date('Y-m-d', time()); $newList->next_date = time(); $newList->subscribemessage = _ACA_DEFAULT_SUBSCRIBE_MESS; $newList->unsubscribemessage = _ACA_DEFAULT_UNSUBSCRIBE_MESS; $newList->unsubscribesend = 1; $newList->footer = 1; $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n "; $show = lisType::showType($newList->list_type, 'editlist'); backHTML::_header(_ACA_NEW . ' ' . _ACA_LIST, $GLOBALS[ACA . 'listlogo0'], $message, $task, $action); backHTML::formStart('listedit', $newList->html, ''); listsHTML::editList($newList, $forms, $show); $go[] = acajoom::makeObj('act', $action); $go[] = acajoom::makeObj('listid', $newList->id); backHTML::formEnd($go); break; case 'doNew': $listname = mosGetParam($_REQUEST, 'list_name', ''); $listType = mosGetParam($_REQUEST, 'list_type', 0); $now = acajoom::getNow(); $query = "SELECT `id` FROM `#__acajoom_lists` WHERE `list_name`= '{$listname}' "; $database->setQuery($query); $lId = $database->loadResult(); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '1091', $database); if ($lId > 0) { echo "<script> alert(' This list already exist, please choose another name. '); window.history.go(-1);</script>\n"; return false; } else { $query = "INSERT INTO `#__acajoom_lists` (`list_name`,`createdate`) VALUES ( '" . addslashes($listname) . "' , '{$now}' )"; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); } if ($erro->E(__LINE__, '1001', $database)) { $query = "SELECT * FROM `#__acajoom_lists` WHERE `list_name`= '{$listname}' "; $database->setQuery($query); $database->loadObject($mynewlist); $mynewlist->list_name = stripslashes($mynewlist->list_name); $mynewlist->list_desc = stripslashes($mynewlist->list_desc); $mynewlist->layout = stripslashes($mynewlist->layout); $mynewlist->subscribemessage = stripslashes($mynewlist->subscribemessage); $mynewlist->unsubscribemessage = stripslashes($mynewlist->unsubscribemessage); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '1005'); $listId = $mynewlist->id; $message = acajoom::printYN(lists::updateListFromEdit($listId, '', true), _ACA_LIST_ADDED, _ACA_ERROR); $xf->plus('totallist0', 1); $xf->plus('act_totallist0', 1); $xf->plus('totallist' . $listType, 1); $xf->plus('act_totallist' . $listType, 1); } break; case 'edit': if ($listId == 0) { echo "<script> alert('" . addslashes(_ACA_SELECT_LIST) . "'); window.history.go(-1);</script>\n"; return false; } else { $showLists = false; $query = 'SELECT * FROM `#__acajoom_lists` WHERE `id` = ' . intval($listId); $database->setQuery($query); $database->loadObject($listEdit); $erro->err = $database->getErrorMsg(); if (!$erro->E(__LINE__, '1002')) { return false; } else { $listEdit->list_name = stripslashes($listEdit->list_name); $listEdit->list_desc = stripslashes($listEdit->list_desc); $listEdit->layout = stripslashes($listEdit->layout); $listEdit->subscribemessage = stripslashes($listEdit->subscribemessage); $listEdit->unsubscribemessage = stripslashes($listEdit->unsubscribemessage); $listEdit->new_letter = 0; $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n "; $show = lisType::showType($listEdit->list_type, 'editlist'); backHTML::_header(_ACA_EDIT_A . @constant($GLOBALS[ACA . 'listname' . $listEdit->list_type]) . ' ' . _ACA_LIST, $GLOBALS[ACA . 'listlogo0'], $message, $task, $action); backHTML::formStart('listedit', $listEdit->html, ''); listsHTML::editList($listEdit, $forms, $show); $go[] = acajoom::makeObj('act', $action); $go[] = acajoom::makeObj('listid', $listEdit->id); backHTML::formEnd($go); } } break; case 'update': $message = acajoom::printYN(lists::updateListFromEdit($listId, '', false), _ACA_LIST_UPDATED, _ACA_ERROR); break; case 'delete': $message = acajoom::printYN(lists::deleteList($listId), _ACA_LIST . _ACA_SUCCESS_DELETED, _ACA_ERROR); break; case 'copy': $message = acajoom::printYN(lists::copyList($listId), _ACA_LIST_COPY, _ACA_ERROR); break; case 'publish': $message = acajoom::printYN(lists::updateListFromList($listId, true, false), _ACA_PUBLISHED, _ACA_ERROR); break; case 'unpublish': $message = acajoom::printYN(lists::updateListFromList($listId, false, false), _ACA_UNPUBLISHED, _ACA_ERROR); break; case 'forms': case 'make': if (class_exists('createForm')) { createForm::taskOptions($task); $showLists = false; } else { $showLists = true; } break; case 'cpanel': backHTML::controlPanel(); return true; break; } if ($showLists) { backHTML::_header(_ACA_MENU_LIST, $GLOBALS[ACA . 'listlogo0'], $message, $task, $action); $show = lisType::showType(0, 'showListsBack'); $forms['main'] = " <form action='index2.php' method='post' name='adminForm'> \n"; backHTML::formStart('show_mailing', '', ''); $listing = lists::getLists(0, 0, 1, '', false, false, false); if ($show['list_type']) { $show['list_type'] = lisType::checkOthers(); } listsHTML::showListingLists($listing, $action, 'edit', $forms, $show); $go[] = acajoom::makeObj('act', $action); backHTML::formEnd($go); return true; } }
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/objects/list.php'; $lists = new lists($db); echo "<div class='modal fade' id='myModal1' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true' style='display: none;'>"; echo "\t<div class='modal-dialog'>"; echo "\t\t<div class='modal-content'>"; echo "\t\t\t<div class='modal-header'>"; echo "\t\t\t\t<button type='button' class='close' data-dismiss='modal' aria-hidden='true'>X</button>"; echo "\t\t\t\t<h4 class='modal-title' id='myModalLabel'>Purchase Detail</h4>"; echo "\t\t\t</div>"; echo "\t\t\t<div class='modal-body'>"; echo "\t\t\t<form class='form-horizontal' action='' method='post'>"; echo "\t\t\t\t<div class='row'>"; echo "\t\t\t\t<div class='form-group'>"; echo "\t\t\t\t\t<label class='col-md-3 control-label' for='purchase_id'>Purchase ID</label>"; echo "\t\t\t\t\t<div class='col-md-7'>"; echo "\t\t\t\t\t\t<input type='text' id='purchase_id' name='purchase_id' class='form-control' value='{$purchase->purchase_id}' readonly>"; echo "\t\t\t\t\t</div>"; echo "\t\t\t\t</div>"; echo "\t\t\t\t<div class='form-group'>"; echo "\t\t\t\t\t<label class='col-md-3 control-label' for='item_kode'>Nama Item</label>"; echo "\t\t\t\t\t<div class='col-md-7'>"; echo "\t\t\t\t\t\t<select id='item_kode' name='item_kode' class='form-control'>"; echo "\t\t\t\t\t\t\t<option>- PILIH -</option>"; $statement = $lists->ListBarang(); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { extract($row); echo "<option value={$row['item_kode']}>{$row['item_name']}</option>"; } echo "\t\t\t\t\t\t</select>";
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/config/database.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/objects/list.php'; $database = new database(); $db = $database->getConnection(); $lists = new lists($db); $statement = $lists->ListPelanggan(); ?> <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> <h4 class="modal-title" id="myModalLabel">Pilih Pelanggan</h4> </div> <div class="modal-body"> <form class="form-horizontal" action="#" method="post"> <div class="form-group"> <label class="col-md-3 control-label" for="cust_nama">Nama Pelanggan</label> <div class="col-md-7"> <select id="cust_nama" name="cust_nama" class="form-control"> <option>- PILIH -</option> <?php $statement = $lists->ListPelanggan(); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { extract($row); echo "<option value={$row['cust_nama']}>{$row['cust_nama']}</option>"; } ?>
public function populate_db() { $list = lists::common("xxx"); // err($list); foreach ($list as $val) { // err($val); $ar = explode("/", $val[0]); $data["title"] = $ar[count($ar) - 1]; $data["full_path"] = $val['0']; $data['file_size'] = $val['1']; $data['last_modified'] = $val['2']; $data['ext'] = pathinfo($val[0], PATHINFO_EXTENSION); $data['main_cate'] = $ar[1]; $data['sub_cate1'] = isset($ar[2]) ? $ar[2] : null; $data['sub_cate2'] = isset($ar[3]) ? $ar[3] : null; $data['sub_cate3'] = isset($ar[4]) ? $ar[4] : null; $data['sub_cate4'] = isset($ar[5]) ? $ar[5] : null; Porn_Model::create($data); } // err($data); }
function subject($mailingEdit, $lists, $show) { ?> <fieldset class="acajoomcss"> <legend><?php echo _ACA_LIST_T_GENERAL; ?> </legend> <table class="acajoomtable" cellspacing="1"> <tbody> <tr> <td width="110px" class="key"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_SUBJET; $title = _ACA_SUBJECT; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php $text = str_replace('"', '"', $mailingEdit->subject); if (function_exists('htmlspecialchars_decode')) { $text = htmlspecialchars_decode($text, ENT_NOQUOTES); } elseif (function_exists('html_entity_decode')) { $text = html_entity_decode($text, ENT_NOQUOTES); } echo ' <input type="text" name="subject" class="inputbox" size="50" maxlength="64" value="' . $text . '" />'; ?> </td> </tr> <?php if ($show['issuenb']) { ?> <tr> <td class="key"> <span class="editlinktip"> <?php $tip = _ACA_ISSUE_NB_TIPS; $title = @constant($GLOBALS[ACA . 'listname' . $mailingEdit->list_type]) . ' #'; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php echo $mailingEdit->issue_nb; ?> </td> </tr> <?php } else { echo ' <input type="hidden" name="issue_nb" value="' . $mailingEdit->issue_nb . '" />'; } ?> <?php if ($show['delay']) { ?> <tr> <td class="key"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_DELAY; $title = _ACA_AUTO_DELAY; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php $delay = $mailingEdit->delay / 1440; ?> <input type="text" name="delay" class="inputbox" size="5" maxlength="10" value="<?php echo $delay; ?> " /> </td> </tr> <?php } ?> <?php if ($show['pub_date'] and $GLOBALS[ACA . 'listype2'] == '1' and class_exists('auto')) { ?> <tr> <td class="key"> <span class="editlinktip"> <?php $tip = _ACA_INFO_LIST_DATE; $title = _ACA_LIST_DATE; $tip .= '<br/>(Actual server time is ' . acajoom::getNow() . ' )'; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <input type="text" name="senddate" class="inputbox" size="25" maxlength="25" value="<?php echo $mailingEdit->send_date; ?> " /> </td> </tr> <?php } ?> <tr> <td class="key"> <span class="editlinktip"> <?php $tip = ''; $title = _ACA_LIST_NAME; echo compa::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0); ?> </span> </td> <td> <?php $name = lists::getLists($mailingEdit->list_id, 0, null, '', false, false, true); echo $name[0]->list_name; ?> </td> </tr> </tbody> </table> </fieldset> <?php }
function upgrade_News3() { global $my, $database; $xf = new xonfig(); $newLists = array(); $idImportedList = array(); $i = 0; $database->setQuery("SELECT * FROM #__newsletter_letters"); $newsletters = $database->loadObjectList(); $error = $database->getErrorMsg(); if (!empty($error)) { echo '<p><b>Error (class.upgrade.php->upgrade_News3 () line ' . __LINE__ . '):</b> Error getting newsletters. Database error: <br />' . $error . '</p>'; return false; } else { foreach ($newsletters as $newsletter) { $list->list_name = $newsletter->list_name; $list->list_desc = $newsletter->list_desc; $list->sendername = $newsletter->sendername; $list->senderemail = $newsletter->senderemail; $list->bounceadres = $newsletter->bounceadres; $list->layout = $newsletter->layout; $list->template = 0; $list->subscribemessage = $newsletter->subscribemessage; $list->unsubscribemessage = $newsletter->unsubscribemessage; $list->html = $newsletter->html; $list->hidden = !$newsletter->hidden; $list->unsubscribesend = 1; $list->list_type = '1'; $list->auto_add = 0; $list->user_choose = 0; $list->cat_id = 0; $list->delay_min = 0; $list->delay_max = 0; $list->follow_up = 0; $list->owner = $my->id; $list->auto_add = 0; $list->acc_level = $newsletter->aid; $list->acc_id = 29; $list->published = 1; $list->createdate = acajoom::getNow(); $list->footer = 1; $list->notify_id = 0; $list->notification = 0; $query = 'INSERT INTO `#__acajoom_lists` (`list_name`) VALUES (\'' . $list->list_name . '\' )'; $database->setQuery($query); $database->query(); $error = $database->getErrorMsg(); if (!empty($error)) { echo '<p><b>Error (class.upgrade.php->upgrade_News3() line ' . __LINE__ . '):</b> Error adding list to database. Database error: <br />' . $error . '</p><br /><br />Are you trying to insert a list name which is already in use? The list name has to be different for each list! <br /><br />'; } else { $query = 'SELECT * FROM `#__acajoom_lists` WHERE `list_name`= \'' . $list->list_name . '\''; $database->setQuery($query); $database->loadObject($mynewlist); $error = $database->getErrorMsg(); $xf->plus('totallist0', 1); $xf->plus('act_totallist0', 1); $xf->plus('totallist1', 1); $xf->plus('act_totallist1', 1); if (!empty($error)) { echo '<p><b>Error (class.upgrade.php->upgrade_News3() line ' . __LINE__ . '):</b> Error getting listname. Database error: <br />' . $error . '</p>'; return false; } else { $idImportedList[$newsletter->id] = $mynewlist->id; $newLists[$i] = $mynewlist->id; $i++; $list->id = $mynewlist->id; $error = lists::updateListData($list); if (!$error) { echo '<p><b>Error (class.upgrade.php->upgrade_News3 () line ' . __LINE__ . '):</b> Error inserting list. Database error: <br />' . $error . '</p>'; } else { echo '<br /><b>' . @constant($GLOBALS[ACA . 'listnames1']) . ': </b>' . $list->list_name . ': ' . acajoom::printM('green', _ACA_IMPORT_SUCCESS); $database->setQuery("SELECT * FROM #__newsletter_mailing WHERE `list_id`=" . $newsletter->id); $mailingsImports = $database->loadObjectList(); $error = $database->getErrorMsg(); if (!empty($error)) { echo '<p><b>Error (class.upgrade.php->upgrade_News3() line ' . __LINE__ . '):</b> Error getting mailings. Database error: <br />' . $error . '</p>'; return false; } else { $issue_nb = 1; foreach ($mailingsImports as $mailingsImport) { $mailings->list_id = $mynewlist->id; $mailings->list_type = '1'; $mailings->send_date = $mailingsImport->send_date; $mailings->subject = $mailingsImport->subject; $mailings->htmlcontent = $mailingsImport->htmlcontent; $mailings->textonly = $mailingsImport->textonly; $mailings->attachments = $mailingsImport->attachments; $mailings->images = $mailingsImport->images; $mailings->published = $mailingsImport->published; $mailings->visible = $mailingsImport->visible; $mailings->html = $mynewlist->html; $mailings->fromname = $list->sendername; $mailings->fromemail = $list->senderemail; $mailings->frombounce = $list->bounceadres; $mailings->author_id = $my->id; $mailings->delay = 0; $mailings->issue_nb = $issue_nb; $mailings->acc_level = 25; $mailings->createdate = $list->createdate; $issue_nb++; $error = xmailing::insertMailingData($mailings); if (!$error) { echo '<p><b>Error (class.upgrade.php->upgrade_News3() line ' . __LINE__ . '):</b> Error inserting mailing. Database error: <br />' . $error . '</p>'; } else { echo '<br /><b>' . _ACA_MENU_MAILING_TITLE . ': </b>' . $mailingsImport->subject . ': ' . acajoom::printM('green', _ACA_IMPORT_SUCCESS); } } } } } } } $database->setQuery("SELECT * FROM #__newsletter_subscribers"); $subscribers = $database->loadObjectList(); $error = $database->getErrorMsg(); if (!empty($error)) { echo '<p><b>Error (class.upgrade.php->upgrade_News3() line ' . __LINE__ . '):</b> Error getting subscribers. Database error: <br />' . $error . '</p>'; return false; } else { foreach ($subscribers as $subscriber) { $newSubs = true; $acajoomsubscribers = subscribers::getSubscribers(-1, -1, '', $total, 0, '', '', '', ''); foreach ($acajoomsubscribers as $acajoomsubscriber) { if ($subscriber->subscriber_email == $acajoomsubscriber->email) { $newSubs = false; $subId[0] = $acajoomsubscriber->id; } } if ($newSubs) { $newSubscriber->user_id = $subscriber->userid; $newSubscriber->name = $subscriber->subscriber_name; $newSubscriber->email = $subscriber->subscriber_email; $newSubscriber->receive_html = $subscriber->receive_html; $newSubscriber->confirmed = $subscriber->confirmed; $newSubscriber->subscribe_date = $subscriber->subscribe_date; $newSubscriber->blacklist = 0; $newSubscriber->timezone = '00:00:00'; $newSubscriber->language_iso = 'eng'; $newSubscriber->params = ''; $error = subscribers::insertSubscriber($newSubscriber, $subscriberId); if (!empty($error)) { if ($subscriberId < 1) { echo ' Error inserting subscriber:' . $newSubscriber->name; } $error = ''; $subId[0] = $subscriberId; } else { echo '<br /><b>' . _ACA_MENU_SUBSCRIBERS . ': </b>' . $newSubscriber->name . ': ' . acajoom::printM('green', _ACA_IMPORT_SUCCESS); $d['email'] = $subscriber->email; $erro->ck = subscribers::getSubscriberIdFromEmail($d); $erro->Eck(__LINE__, '8304'); $subId[0] = $d['subscriberId']; } } else { echo '<br /><b>' . _ACA_MENU_SUBSCRIBERS . ': </b>' . $subscriber->subscriber_name . ': ' . acajoom::printM('red', _ACA_IMPORT_EXIST); } $j = 0; $queue = queue::suscriptionExist($subId[0], $idImportedList[$subscriber->list_id]); if (empty($queue)) { $error = queue::insertQueuesForNews($subId, $idImportedList[$subscriber->list_id], 29); if (!$error) { echo '<p><b>Error (class.upgrade.php->upgrade_News3 () line ' . __LINE__ . '):</b> Error inserting queue. Database error: <br />' . $error . '</p>'; } } } } } return true; }
function preview($mailingId, $listId, &$message) { $list = null; $new = null; $mailing = xmailing::getOneMailing($list, $mailingId, '', $new); if ($listId > 0) { $list = lists::getOneList($listId); } else { $list = lists::getOneList($mailing->list_id); } $message = ''; $previewemailaddress = mosGetParam($_REQUEST, 'emailaddress', ''); $previewname = mosGetParam($_REQUEST, 'name', ''); $previewhtml = mosGetParam($_REQUEST, 'html', 0); $receivers = null; $receivers->id = 0; $receivers->email = $previewemailaddress; $receivers->name = $previewname; $receivers->receive_html = $previewhtml; return acajoom_mail::sendOne($mailing, $receivers, $list, $message); }
function controlPanel() { //hack for JOomla 13 ADRIEN unset($GLOBALS["task"]); unset($_REQUEST["task"]); ?> <link rel="stylesheet" href="components/com_acajoom/cssadmin/acajoom.css" type="text/css" > <div align="center" class="centermain"> <div id="acajoom"> <table class="acajoomcss"> <tr> <td width="58%" valign="top"> <?php echo backHTML::iconsPanel(); ?> </td> <td width="42%" valign="top"> <div style="width=100%;"> <form action="index2.php" method="post" name="adminForm"> <?php $tabs = new mosTabs(1); $tabs->startPane('acaControlPanel'); $tabs->startTab(_ACA_MENU_TAB_SUM, "acaControlPanel.Summary"); ?> <table class="acajoom_stats" style="text-align: left; width: 100%; " cellpadding="2" cellspacing="0"> <tbody> <tr> <th style="text-align: center;"><?php echo '#'; ?> </th> <th style="text-align: center;"><?php echo _ACA_MENU_TAB_LIST; ?> </th> <th style="text-align: center;"><?php echo _ACA_MENU_MAILING_TITLE; ?> </th> <th style="text-align: center;"><?php echo _ACA_SENT_MAILING; ?> </th> <th style="text-align: center;"><?php echo _ACA_DESC_SUBSCRIBERS; ?> </th> </tr> <?php $html = ''; $totalist = 0; $totalmail = 0; $totalsub = 0; $totalsent = 0; $nb = explode(',', $GLOBALS[ACA . 'activelist']); $size = sizeof($nb); for ($i = 0; $i < $size; $i++) { $index = $nb[$i]; if ($GLOBALS[ACA . 'listshow' . $index] > 0 and $GLOBALS[ACA . 'listype' . $index] == 1) { $html .= '<tr>'; $html .= '<td><b>' . @constant($GLOBALS[ACA . 'listnames' . $index]) . '</b></td>'; $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totallist' . $index] . ' </td>'; $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totalmailing' . $index] . ' </td>'; $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'totalmailingsent' . $index] . ' </td>'; $html .= '<td style="text-align: center; ">' . $GLOBALS[ACA . 'act_totalsubcribers' . $index] . ' </td>'; $html .= '</tr>'; $totalist = $totalist + $GLOBALS[ACA . 'act_totallist' . $index]; $totalmail = $totalmail + $GLOBALS[ACA . 'act_totalmailing' . $index]; $totalsent = $totalsent + $GLOBALS[ACA . 'totalmailingsent' . $index]; if ($GLOBALS[ACA . 'act_totalsubcribers' . $index] < $totalsub) { $totalsub = $GLOBALS[ACA . 'act_totalsubcribers' . $index]; } } } $html .= '<tr>'; $html .= '<td><b>' . _ACA_CP_TOTAL . '</b></td>'; $html .= '<td style="text-align: center; ">' . $totalist . ' </td>'; $html .= '<td style="text-align: center; ">' . $totalmail . ' </td>'; $html .= '<td style="text-align: center; ">' . $totalsent . ' </td>'; $html .= '<td style="text-align: center; ">' . $totalsub . ' </td>'; $html .= '</tr>'; echo $html; ?> </tbody></table> <br /> <?php if (class_exists('auto')) { echo auto::showQueue(); } $tabs->endTab(); $tabs->startTab(_ACA_MENU_SUBSCRIBERS, "acaControlPanel.Subscribers"); $emailsearch = ''; $listId = 0; $start = mosGetParam($_REQUEST, 'start', 0); $limit = mosGetParam($_REQUEST, 'limit', 15); $order = mosGetParam($_REQUEST, 'order', 'date'); $total = 0; $subscribers = subscribers::getSubscribers($start, $limit, $emailsearch, $total, $listId, '', 1, 1, 'sub_dateD'); mosCommonHTML::loadOverlib(); ?> <script type="text/javascript"> function checkcid(myField) { myField.checked = true; isChecked(true); } </script> <!-- <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> --> <form action="index2.php" method="post" name="adminForm"> <input type="hidden" name="option" value="com_acajoom" /> <input type="hidden" name="act" value="acajoom" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="userid" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="listid" value="<?php echo $listId; ?> " /> <input type="hidden" name="start" value="<?php echo $start; ?> " /> <input type="hidden" name="limit" value="<?php echo $limit; ?> " /> <input type="hidden" name="emailsearch" value="<?php echo $emailsearch; ?> " /> <table width="100%" border="0" cellspacing="0" cellpadding="4" class="adminlist"> <tr> <th class="title">#</th> <th class="title" style="text-align: left;"><?php echo _ACA_INPUT_NAME; ?> </th> <th class="title" style="text-align: left;"><?php echo _ACA_INPUT_EMAIL; ?> </th> <th class="title" style="text-align: center;"><?php echo _ACA_SIGNUP_DATE; ?> </th> </tr> <?php $i = 0; foreach ($subscribers as $subscriber) { ?> <tr class="row<?php echo $i++ % 2; ?> "> <td><?php echo $i + $start; ?> </td> <td style="text-align: left;"> <a href="index2.php?option=com_acajoom&act=subscribers&task=show&userid=<?php echo $subscriber->id; ?> " > <?php echo $subscriber->name; ?> </a></td> <td style="text-align: left;"><?php echo $subscriber->email; ?> </td> <td style="text-align: center;"><?php echo mosFormatDate($subscriber->subscribe_date, '%x'); ?> </td> </tr> <?php } ?> </table> </form> <?php backHTML::footerCounts($start, $limit, $emailsearch, $total, 4, '', $listId, ''); $tabs->endTab(); $tabs->startTab(_ACA_MENU_TAB_LIST, "acaControlPanel.Lists"); $lists = lists::getLists(0, 0, 1, '', false, false, false); ?> <table class="adminlist"> <tr> <th class="title">#</th> <th class="title" width="65%" style="text-align: left;"><?php echo _ACA_LIST_NAME; ?> </th> <th class="title" width="25%" style="text-align: left;"><?php echo _ACA_LIST_TYPE; ?> </th> <th class="title" style="text-align: center;">#id</th> </tr> <?php $i = 0; foreach ($lists as $list) { $i++; $link = 'index2.php?option=com_acajoom&act=mailing&task=show&listid=' . $list->id; ?> <tr> <td><?php echo $i; ?> </td> <td style="text-align: left;"> <a href="<?php echo $link; ?> "> <?php echo $list->list_name; ?> </a> </td> <td style="text-align: left;"><a href='index2.php?option=com_acajoom&act=mailing&listype=<?php echo $list->list_type; ?> '><?php echo @constant($GLOBALS[ACA . 'listname' . $list->list_type]); ?> </a></td> <td style="text-align: center;"><?php echo $list->id; ?> </td> </tr> <?php } ?> <tr> <th colspan="4"> </th> </tr> </table> <?php $tabs->endTab(); $tabs->endPane(); ?> </form> </div> <div style="clear:both; float:left;"> <?php echo acajoom::printM('blue', _ACA_SERVER_LOCAL_TIME . ' :' . mosFormatDate(acajoom::getNow(), '%A, %d %B %Y %H:%M', 0)); ?> </div> <td> </tr> </table> </div> </div> <?php }
function deleteList($listId) { global $database; $erro = new xerr(__FILE__, __FUNCTION__, __CLASS__); $xf = new xonfig(); $list = lists::getOneList($listId); $query = 'DELETE FROM `#__acajoom_lists` WHERE `id` = ' . $listId; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '8317', $database); $query = 'DELETE FROM `#__acajoom_queue` WHERE `list_id` = ' . $listId; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '8319', $database); $mailings = xmailing::getMailings($listId, '', -1, -1, '', $total, '', false, false); if (!empty($mailings)) { foreach ($mailings as $mailing) { $listingList[] = $mailing->id; } $query = "DELETE FROM `#__acajoom_stats_global` WHERE `mailing_id` IN ( " . implode(' , ', $listingList) . " ) "; $database->setQuery($query); $database->query(); $erro->err .= $database->getErrorMsg(); $erro->E(__LINE__, '8320', $database); $query = "DELETE FROM `#__acajoom_stats_details` WHERE `mailing_id` IN ( " . implode(' , ', $listingList) . " ) "; $database->setQuery($query); $database->query(); $erro->err .= $database->getErrorMsg(); $erro->E(__LINE__, '8321', $database); } $query = 'DELETE FROM `#__acajoom_mailings` WHERE `list_id` = ' . $listId; $database->setQuery($query); $database->query(); $erro->err = $database->getErrorMsg(); $erro->E(__LINE__, '8318', $database); if (!$erro->result) { return false; } else { $xf->plus('act_totallist0', -1); $xf->plus('act_totalmailing' . $list->list_type, -1); return true; } }
public static function tax_list($lang = 'en') { $obj = new lists(); return ['cars' => $obj->herchi_1('cars'), 'cars_other' => $obj->herchi_1('cars_other'), 'items_for_sale' => $obj->herchi_1('items_for_sale'), 'appliances' => $obj->herchi_1('appliances'), 'computers' => $obj->herchi_1('computers'), 'laptops' => $obj->herchi_1('laptops'), 'mobile_tablets' => $obj->herchi_1('mobile_tablets'), 'electronics' => $obj->herchi_1('electronics'), 'games' => $obj->herchi_1('games'), 'jobs' => $obj->herchi_1('jops'), 'rent' => $obj->herchi_1('rent'), 'sale' => $obj->herchi_1('sale'), 'places' => $obj->herchi_1('places'), 'cates' => $obj->herchi_1('cates')]; }