Example #1
0
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
 * presenter module for xoops
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GPL 2.0 or later
 * @package         presenter
 * @since           2.5.5
 * @author          XOOPS Development Team <*****@*****.**> - <http://xoops.org>
 * @version         $Id: 1.0 categories.php 11532 Wed 2013/08/28 4:00:27Z XOOPS Development Team $
 */
include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
//It recovered the value of argument op in URL$
$op = presenter_CleanVars($_REQUEST, 'op', 'list', 'string');
echo $adminMenu->addNavigation('categories.php');
switch ($op) {
    case 'list':
    default:
        $adminMenu->addItemButton(_AM_PRESENTER_ADD_CATEGORIES, 'categories.php?op=new', 'add');
        echo $adminMenu->renderButton();
        $criteria = new CriteriaCompo();
        $criteria->setSort('cat_id ASC, cat_id');
        $criteria->setOrder('ASC');
        $numrows = $categoriesHandler->getCount();
        $categories_arr = $categoriesHandler->getAll($criteria);
        // Table view
        if ($numrows > 0) {
            echo "<table width='100%' cellspacing='1' class='outer'>\n                    <tr>\n                        <th class='center'>" . _AM_PRESENTER_CAT_TITLE . "</th>\n                        <th class='center'>" . _AM_PRESENTER_CAT_DESC . "</th>\n                        <th class='center'>" . _AM_PRESENTER_CAT_IMAGE . "</th>\n                        <th class='center'>" . _AM_PRESENTER_CAT_WEIGHT . "</th>\n                        <th class='center'>" . _AM_PRESENTER_CAT_COLOR . "</th>\n                        <th class='center width5'>" . _AM_PRESENTER_FORMACTION . "</th>\n                    </tr>";
            $class = "odd";
Example #2
0
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
 * presenter module for xoops
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GPL 2.0 or later
 * @package         presenter
 * @since           2.5.5
 * @author          XOOPS Development Team <*****@*****.**> - <http://xoops.org>
 * @version         $Id: 1.0 categories.php 11532 Wed 2013/08/28 4:00:27Z XOOPS Development Team $
 */
include_once __DIR__ . '/header.php';
$xoopsOption['template_main'] = 'presenter_categories.tpl';
include_once XOOPS_ROOT_PATH . '/header.php';
$start = presenter_CleanVars($_REQUEST, 'start', 0);
// Define Stylesheet
$xoTheme->addStylesheet($style);
// Get Handler
$categoriesHandler =& xoops_getModuleHandler('categories', 'presenter');
$nb_categories = $GLOBALS['xoopsModuleConfig']['userpager'];
$criteria = new CriteriaCompo();
$categories_count = $categoriesHandler->getCount($criteria);
$categories_arr = $categoriesHandler->getAll($criteria);
if ($categories_count > 0) {
    foreach (array_keys($categories_arr) as $i) {
        $cat['cat_id'] = $categories_arr[$i]->getVar('cat_id');
        $cat['cat_pid'] = $categories_arr[$i]->getVar('cat_pid');
        $cat['cat_title'] = $categories_arr[$i]->getVar('cat_title');
        $cat['cat_desc'] = strip_tags($categories_arr[$i]->getVar('cat_desc'));
        $cat['cat_image'] = $categories_arr[$i]->getVar('cat_image');
Example #3
0
 * presenter module for xoops
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GPL 2.0 or later
 * @package         presenter
 * @since           2.5.5
 * @author          XOOPS Development Team <*****@*****.**> - <http://xoops.org>
 * @version         $Id: 1.0 permissions.php 11532 Wed 2013/08/28 4:00:27Z XOOPS Development Team $
 */
include __DIR__ . '/admin_header.php';
include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
if (!empty($_POST['submit'])) {
    redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/permissions.php', 1, _MP_GPERMUPDATED);
}
echo $adminMenu->addNavigation('permissions.php');
$permission = presenter_CleanVars($_POST, 'permission', 1, 'int');
$selected = array('', '', '');
$selected[$permission - 1] = ' selected';
echo "\n<form method='post' name='fselperm' action='permissions.php'>\n    <table border=0>\n        <tr>\n            <td>\n                <select name='permission' onChange='document.fselperm.submit()'>\n                    <option value='1'" . $selected[0] . ">" . _AM_PRESENTER_PERMISSIONS_ACCESS . "</option>\n                    <option value='2'" . $selected[1] . ">" . _AM_PRESENTER_PERMISSIONS_SUBMIT . "</option>\n                    <option value='3'" . $selected[2] . ">" . _AM_PRESENTER_PERMISSIONS_VIEW . "</option>\n                </select>\n            </td>\n        </tr>\n    </table>\n</form>";
$module_id = $xoopsModule->getVar('mid');
switch ($permission) {
    case 1:
        $formTitle = _AM_PRESENTER_PERMISSIONS_ACCESS;
        $permName = 'presenter_access';
        $permDesc = '';
        break;
    case 2:
        $formTitle = _AM_PRESENTER_PERMISSIONS_SUBMIT;
        $permName = 'presenter_submit';
        $permDesc = '';
        break;