protected function _indexPage(&$iaView) { if (!empty($_GET['group'])) { $this->_type = 'group'; $this->_typeId = (int) $_GET['group']; iaBreadcrumb::preEnd(iaLanguage::get('usergroups'), IA_ADMIN_URL . 'usergroups/'); } elseif (!empty($_GET['user'])) { $this->_type = 'user'; $this->_typeId = (int) $_GET['user']; iaBreadcrumb::preEnd(iaLanguage::get('members'), IA_ADMIN_URL . 'members/'); } $groupName = isset($this->_iaCore->requestPath[0]) ? $this->_iaCore->requestPath[0] : 'general'; $groupData = $this->_iaDb->row_bind(iaDb::ALL_COLUMNS_SELECTION, '`name` = :name', array('name' => $groupName), iaCore::getConfigGroupsTable()); if (empty($groupData)) { return iaView::errorPage(iaView::ERROR_NOT_FOUND); } $this->_setGroup($iaView, $groupData); if (isset($_POST['save'])) { $this->_save($iaView); } $iaView->assign('custom', (bool) $this->_type); $iaView->assign('group', $groupData); $iaView->assign('params', $this->_getParams($groupName)); $iaView->assign('tooltips', iaLanguage::getTooltips()); }
$fullDate = substr($date['date_added'], 0, strpos($date['date_added'], ' ')); $fullDate = explode('-', $fullDate); if ($fullDate[1] == $j && $fullDate[0] == $y) { if (isset($iaCore->requestPath[0]) && $iaCore->requestPath[0] == $y) { $months[$j]['blogs'] = true; $show['months'] = true; } elseif (!isset($iaCore->requestPath[0]) && !isset($iaCore->requestPath[1])) { $years[$y]['months'][$j]['blogs'] = true; $show['years'] = true; } } } } } if (isset($iaCore->requestPath[0]) && !isset($iaCore->requestPath[1])) { iaBreadcrumb::preEnd('Blog Archive', 'blog/date'); iaBreadcrumb::replaceEnd($iaCore->requestPath[0], IA_SELF); $iaView->title($iaCore->requestPath[0]); } $iaView->assign('show', $show); $iaView->assign('years', $years); $iaView->assign('months', $months); } else { $iaView->setMessages(iaLanguage::get('no_blog_entries'), iaView::ALERT); } } elseif (isset($iaCore->requestPath[0]) && isset($iaCore->requestPath[1])) { $page = empty($_GET['page']) ? 0 : (int) $_GET['page']; $page = $page < 1 ? 1 : $page; $pageUrl = $iaCore->factory('page', iaCore::FRONT)->getUrlByName('blog_date'); $pagination = array('start' => ($page - 1) * $iaCore->get('blog_number'), 'limit' => (int) $iaCore->get('blog_number'), 'template' => $pageUrl . '?page={page}'); $stmt = "`status` = 'active' AND MONTH(b.`date_added`) = '" . $iaCore->requestPath[1] . "' AND YEAR(b.`date_added`) = '" . $iaCore->requestPath[0] . "' ";
protected function _indexPage(&$iaView) { if ('phrases' == $iaView->get('name')) { iaBreadcrumb::preEnd(iaLanguage::get('languages'), IA_ADMIN_URL . 'languages/'); $iaView->assign('action', 'phrases'); $iaView->display('languages'); return true; } $action = isset($this->_iaCore->requestPath[0]) ? $this->_iaCore->requestPath[0] : 'list'; $iaView->assign('action', $action); switch ($action) { case 'search': $pageCaption = iaLanguage::get('search_in_phrases'); break; case 'download': $pageCaption = iaLanguage::get('export_language'); if (isset($_POST['lang']) && $_POST['lang'] || isset($this->_iaCore->requestPath[1]) && array_key_exists($this->_iaCore->requestPath[1], $this->_iaCore->languages)) { $this->_downloadLanguage($iaView); } break; case 'comparison': $pageCaption = iaLanguage::get('languages_comparison'); $this->_compareLanguages($iaView); break; case 'rm': // TODO: set checkAccess $this->_removeLanguage($iaView); iaUtil::go_to($this->getPath()); break; case 'default': $this->_setLanguageAsDefault($iaView); iaUtil::go_to($this->getPath()); break; case 'import': $result = $this->_importLanguage($iaView); iaUtil::go_to($this->getPath() . ($result ? '' : 'download/')); break; } if (isset($pageCaption)) { iaBreadcrumb::toEnd($pageCaption, IA_SELF); $iaView->title($pageCaption); } }
} if (count($itemsFlat) > 0) { $limit = $iaCore->get('num_items_perpage'); foreach ($itemsFlat as $itemName) { if ($class = $iaCore->factoryPackage('item', $itemsList[$itemName], iaCore::FRONT, $itemName)) { $result = method_exists($class, iaUsers::METHOD_NAME_GET_LISTINGS) ? $class->{iaUsers::METHOD_NAME_GET_LISTINGS}($member['id'], $start, $limit) : null; if (!is_null($result)) { if ($result['items']) { $result['items'] = $iaItem->updateItemsFavorites($result['items'], $itemName); } $member['items'][$itemName] = $result; $member['items'][$itemName]['fields'] = $iaField->filter($member['items'][$itemName]['items'], $itemName); } } } } $alpha = substr($member[$filterBy], 0, 1); $alpha || ($alpha = substr($member['username'], 0, 1)); $alpha = strtoupper($alpha); $iaView->set('subpage', $alpha); iaBreadcrumb::preEnd($alpha, $iaPage->getUrlByName('members') . $alpha . IA_URL_DELIMITER); $iaView->assign('item', $member); $iaView->assign('sections', $sections); $title = empty($member['fullname']) ? $member['username'] : $member['fullname']; $iaView->title($title); // add open graph data $avatar = $member['avatar'] ? unserialize($member['avatar']) : ''; $openGraph = array('title' => $title, 'url' => IA_SELF, 'image' => $avatar ? IA_CLEAR_URL . 'uploads/' . $avatar['path'] : ''); $iaView->set('og', $openGraph); $iaView->display('view-member'); }
protected function _indexPage(&$iaView) { $type = null; $customEntryId = false; if (isset($_GET['group'])) { $type = 'group'; $customEntryId = (int) $_GET['group']; iaBreadcrumb::preEnd(iaLanguage::get('usergroups'), IA_ADMIN_URL . 'usergroups/'); } elseif (isset($_GET['user'])) { $type = 'user'; $customEntryId = (int) $_GET['user']; iaBreadcrumb::preEnd(iaLanguage::get('members'), IA_ADMIN_URL . 'members/'); } if (isset($_POST['save'])) { $this->_save($iaView, $type, $customEntryId); } $iaItem = $this->_iaCore->factory('item'); $groupName = isset($this->_iaCore->requestPath[0]) ? $this->_iaCore->requestPath[0] : 'general'; $groupData = $this->_iaDb->row_bind(iaDb::ALL_COLUMNS_SELECTION, '`name` = :name', array('name' => $groupName), iaCore::getConfigGroupsTable()); if (empty($groupData)) { return iaView::errorPage(iaView::ERROR_NOT_FOUND); } $this->_setGroup($iaView, $iaItem, $groupData); $where = "`config_group` = '{$groupName}' AND `type` != 'hidden' " . ($type ? 'AND `custom` = 1' : '') . ' ORDER BY `order`'; $params = $this->_iaDb->all(iaDb::ALL_COLUMNS_SELECTION, $where, null, null, iaCore::getConfigTable()); if ($type) { $custom = 'user' == $type ? $this->_iaCore->getCustomConfig($customEntryId) : $this->_iaCore->getCustomConfig(false, $customEntryId); $custom2 = array(); if ('user' == $type) { $custom2 = $this->_iaDb->getKeyValue('SELECT d.`name`, d.`value` ' . "FROM `{$this->_iaCore->iaDb->prefix}config_custom` d, `{$this->_iaCore->iaDb->prefix}members` a " . "WHERE d.`type` = 'group' AND d.`type_id` = a.`usergroup_id` AND a.`id` = '{$customEntryId}'"); } } $itemsList = $iaItem->getItems(); foreach ($params as $index => $item) { $className = 'default'; if ($type) { $className = 'custom'; if (self::TYPE_DIVIDER != $item['type']) { if (isset($custom2[$item['name']])) { $params[$index]['dtype'] = 'usergroup'; $params[$index]['default'] = $custom2[$item['name']]; $params[$index]['value'] = $custom2[$item['name']]; } else { $params[$index]['dtype'] = 'core'; $params[$index]['default'] = $this->_iaCore->get($item['name']); } if (isset($custom[$item['name']])) { $className = 'common'; $params[$index]['value'] = $custom[$item['name']]; } } } if ('itemscheckbox' == $item['type']) { $array = $this->_iaCore->get($item['extras'] . '_items_implemented'); $array = $array ? explode(',', $array) : array(); $array = array_values(array_intersect($array, $itemsList)); if ($array) { $enabledItems = $iaItem->getEnabledItemsForPlugin($item['extras']); for ($i = 0; $i < count($array); $i++) { $array[$i] = trim($array[$i]); $params[$index]['items'][] = array('name' => $array[$i], 'title' => iaLanguage::get($array[$i]), 'checked' => (int) in_array($array[$i], $enabledItems)); } } } if ('select' == $item['type']) { switch ($item['name']) { case 'timezone': $params[$index]['values'] = iaUtil::getFormattedTimezones(); break; case 'lang': $params[$index]['values'] = $this->_iaCore->languages; break; default: $params[$index]['values'] = explode(',', $item['multiple_values']); } } $params[$index]['classname'] = $className; } $customUrl = ''; if ($type) { $customUrl = isset($_GET['user']) ? '?user='******'user'] : '******' . $_GET['group']; $customUrl = iaSanitize::html($customUrl); } $iaView->assign('group', $groupData); $iaView->assign('params', $params); $iaView->assign('tooltips', iaLanguage::getTooltips()); $iaView->assign('url_custom', $customUrl); }
* (at your option) any later version. * * Subrion is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Subrion. If not, see <http://www.gnu.org/licenses/>. * * * @link http://www.subrion.org/ * ******************************************************************************/ if (iaView::REQUEST_HTML == $iaView->getRequestType()) { iaBreadcrumb::preEnd(iaLanguage::get('payment'), IA_SELF); $transactionId = isset($iaCore->requestPath[0]) ? iaSanitize::paranoid($iaCore->requestPath[0]) : 0; $action = isset($iaCore->requestPath[1]) ? iaSanitize::sql($iaCore->requestPath[1]) : null; if (empty($transactionId)) { return iaView::errorPage(iaView::ERROR_NOT_FOUND); } $iaTransaction = $iaCore->factory('transaction'); $iaPage = $iaCore->factory('page', iaCore::FRONT); $transaction = $iaTransaction->getBy('sec_key', $transactionId); if (empty($transaction)) { return iaView::errorPage(iaView::ERROR_NOT_FOUND, iaLanguage::get('no_transaction')); } // delete transaction if (isset($_GET['delete'])) { $iaTransaction->delete($transaction['id']); $iaView->setMessages(iaLanguage::get('invoice_deleted'), iaView::SUCCESS);