Example #1
0
}
if (isset($_POST['op'])) {
    $op = filter_input(INPUT_POST, 'op');
}
switch ($op) {
    case "mod":
        $autotasksid = isset($_GET['sat_id']) ? (int) $_GET['sat_id'] : 0;
        editautotasks(TRUE, $autotasksid);
        break;
    case "clone":
        $autotasksid = isset($_GET['sat_id']) ? (int) $_GET['sat_id'] : 0;
        editautotasks(TRUE, $autotasksid, TRUE);
        break;
    case "addautotasks":
        $controller = new icms_ipf_Controller($icms_autotasks_handler);
        $controller->storeFromDefaultForm(_CO_ICMS_AUTOTASKS_CREATED, _CO_ICMS_AUTOTASKS_MODIFIED, ICMS_URL . '/modules/system/admin.php?fct=autotasks');
        break;
    case "del":
        $controller = new icms_ipf_Controller($icms_autotasks_handler);
        $controller->handleObjectDeletion();
        break;
    default:
        icms_cp_header();
        $objectTable = new icms_ipf_view_Table($icms_autotasks_handler, FALSE, array('edit'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_name', 'left', FALSE, 'getNameForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_repeat', 'center', 80, 'getRepeatForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_interval', 'center', 80, 'getIntervalForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_enabled', 'center', 80, 'getEnableForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_onfinish', 'center', 120, 'getOnFinishForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_type', 'center', 120, 'getTypeForDisplay'));
        $objectTable->addColumn(new icms_ipf_view_Column('sat_lastruntime', 'center', 180, 'getLastRunTimeForDisplay'));
Example #2
0
    }
}
if (!empty($_GET)) {
    foreach ($_GET as $k => $v) {
        ${$k} = StopXSS($v);
    }
}
$op = isset($_POST['op']) ? trim(filter_input(INPUT_POST, 'op')) : (isset($_GET['op']) ? trim(filter_input(INPUT_GET, 'op')) : '');
switch ($op) {
    case "mod":
        $mimetypeid = isset($_GET['mimetypeid']) ? (int) $_GET['mimetypeid'] : 0;
        editmimetype(TRUE, $mimetypeid);
        break;
    case "addmimetype":
        $controller = new icms_ipf_Controller($icms_mimetype_handler);
        $controller->storeFromDefaultForm(_CO_ICMS_MIMETYPE_CREATED, _CO_ICMS_MIMETYPE_MODIFIED);
        break;
    case "del":
        $controller = new icms_ipf_Controller($icms_mimetype_handler);
        $controller->handleObjectDeletion();
        break;
    default:
        icms_cp_header();
        $objectTable = new icms_ipf_view_Table($icms_mimetype_handler);
        $objectTable->addColumn(new icms_ipf_view_Column('name', _GLOBAL_LEFT, 150));
        $objectTable->addColumn(new icms_ipf_view_Column('extension', _GLOBAL_LEFT, 150));
        $objectTable->addColumn(new icms_ipf_view_Column('types', _GLOBAL_LEFT));
        $objectTable->addIntroButton('addmimetype', 'admin.php?fct=mimetype&op=mod', _CO_ICMS_MIMETYPE_CREATE);
        $objectTable->addQuickSearch(array('name', 'extension', 'types'));
        $icmsAdminTpl->assign('icms_mimetype_table', $objectTable->fetch());
        $icmsAdminTpl->assign('icms_mimetype_explain', TRUE);
Example #3
0
        ${$k} = StopXSS($v);
    }
}
$op = isset($_POST['op']) ? trim(StopXSS($_POST['op'])) : (isset($_GET['op']) ? trim(StopXSS($_GET['op'])) : '');
switch ($op) {
    case "mod":
        $adsenseid = isset($_GET['adsenseid']) ? (int) $_GET['adsenseid'] : 0;
        editadsense(TRUE, $adsenseid);
        break;
    case "clone":
        $adsenseid = isset($_GET['adsenseid']) ? (int) $_GET['adsenseid'] : 0;
        editadsense(TRUE, $adsenseid, TRUE);
        break;
    case "addadsense":
        $controller = new icms_ipf_Controller($icms_adsense_handler);
        $controller->storeFromDefaultForm(_CO_ICMS_ADSENSES_CREATED, _CO_ICMS_ADSENSES_MODIFIED);
        break;
    case "del":
        $controller = new icms_ipf_Controller($icms_adsense_handler);
        $controller->handleObjectDeletion();
        break;
    default:
        icms_cp_header();
        $objectTable = new icms_ipf_view_Table($icms_adsense_handler);
        $objectTable->addColumn(new icms_ipf_view_Column('description', _GLOBAL_LEFT));
        $objectTable->addColumn(new icms_ipf_view_Column(_CO_ICMS_ADSENSE_TAG_CODE, 'center', 200, 'getXoopsCode'));
        $objectTable->addIntroButton('addadsense', 'admin.php?fct=adsense&op=mod', _CO_ICMS_ADSENSES_CREATE);
        $objectTable->addQuickSearch(array('title', 'summary', 'description'));
        $objectTable->addCustomAction('getCloneLink');
        $icmsAdminTpl->assign('icms_adsense_table', $objectTable->fetch());
        $icmsAdminTpl->assign('icms_adsense_explain', TRUE);
Example #4
0
     editpictures($picturesObj);
     break;
 case "addpictures":
     if (!icms::$security->check()) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
     }
     // we need to check whether the user has modified the url for an existing picture (NOT ALLOWED!)
     if (!$picturesObj->isNew() && isset($_POST['url']) && $picturesObj->getVar('url') != $_POST['url']) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
     }
     // check upload limit for this user
     if ($picturesObj->isNew() && !$profile_pictures_handler->checkUploadLimit()) {
         redirect_header(icms_getPreviousPage('index.php'), 3, sprintf(_MD_PROFILE_UPLOADLIMIT, icms::$module->config['nb_pict']));
     }
     $controller = new icms_ipf_Controller($profile_pictures_handler);
     $controller->storeFromDefaultForm(_MD_PROFILE_PICTURES_CREATED, _MD_PROFILE_PICTURES_MODIFIED, PROFILE_URL . basename(__FILE__) . "?uid=" . $_POST['uid_owner']);
     break;
 case "del":
     $picturesObj = $profile_pictures_handler->get($clean_pictures_id);
     if (!$picturesObj->userCanEditAndDelete()) {
         redirect_header($picturesObj->getItemLink(true), 3, _NOPERM);
     }
     if (isset($_POST['confirm'])) {
         if (!icms::$security->check()) {
             redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
         }
     }
     $controller = new icms_ipf_Controller($profile_pictures_handler);
     $controller->handleObjectDeletionFromUserSide();
     $icmsTpl->assign('profile_category_path', $picturesObj->getVar('title') . ' > ' . _DELETE);
     break;
Example #5
0
     } else {
         redirect_header(ICMS_URL . $rtn);
     }
     break;
 case "clone":
     icms_cp_header();
     editblock($clean_bid, TRUE);
     break;
 case "mod":
 case "changedField":
     icms_cp_header();
     editblock($clean_bid);
     break;
 case "addblock":
     $controller = new icms_ipf_Controller($icms_block_handler);
     $controller->storeFromDefaultForm(_AM_SYSTEM_BLOCKSADMIN_CREATED, _AM_SYSTEM_BLOCKSADMIN_MODIFIED);
     break;
 case "del":
     $controller = new icms_ipf_Controller($icms_block_handler);
     $controller->handleObjectDeletion();
     break;
 case "change_blocks":
     foreach ($_POST['SystemBlocksadmin_objects'] as $k => $v) {
         $changed = FALSE;
         $obj = $icms_block_handler->get($v);
         if ($obj->getVar('side', 'e') != $_POST['block_side'][$k]) {
             $obj->setVar('side', (int) $_POST['block_side'][$k]);
             $changed = TRUE;
         }
         if ($obj->getVar('weight', 'e') != $_POST['block_weight'][$k]) {
             $obj->setVar('weight', (int) $_POST['block_weight'][$k]);
Example #6
0
     icms_cp_header();
     editcategory($clean_category_id);
     break;
 case "changedField":
     foreach ($_POST['mod_profile_Category_objects'] as $k => $v) {
         $categoryObj = $profile_category_handler->get($v);
         if ($categoryObj->getVar('cat_weight', 'e') != $_POST['cat_weight'][$k]) {
             $categoryObj->setVar('cat_weight', (int) $_POST['cat_weight'][$k]);
             $profile_category_handler->insert($categoryObj);
         }
     }
     redirect_header('category.php', 3, _AM_PROFILE_CATEGORY_MODIFIED);
     break;
 case "addcategory":
     $controller = new icms_ipf_Controller($profile_category_handler);
     $controller->storeFromDefaultForm(_AM_PROFILE_CATEGORY_CREATED, _AM_PROFILE_CATEGORY_MODIFIED);
     break;
 case "del":
     $controller = new icms_ipf_Controller($profile_category_handler);
     $controller->handleObjectDeletion();
     break;
 default:
     icms_cp_header();
     icms::$module->displayAdminMenu(1, _AM_PROFILE_CATEGORYS);
     $objectTable = new icms_ipf_view_Table($profile_category_handler);
     $objectTable->addColumn(new icms_ipf_view_Column('cat_title', _GLOBAL_LEFT, false, 'getCatTitle'));
     $objectTable->addColumn(new icms_ipf_view_Column('cat_description'));
     $objectTable->addColumn(new icms_ipf_view_Column('cat_weight', _CENTER, false, 'getCat_weightControl'));
     $objectTable->setDefaultSort('cat_weight');
     $objectTable->addIntroButton('addcategory', 'category.php?op=mod', _AM_PROFILE_CATEGORY_CREATE);
     $objectTable->addActionButton('changedField', false, _SUBMIT);
Example #7
0
			break;

		case "clone" :
			icms_cp_header ();
			editpage($clean_page_id, TRUE);
			break;

		case "mod" :
		case "changedField" :
			icms_cp_header ();
			editpage($clean_page_id);
			break;

		case "addpage" :
			$controller = new icms_ipf_Controller($icms_page_handler);
			$controller->storeFromDefaultForm(_AM_SYSTEM_PAGES_CREATED, _AM_SYSTEM_PAGES_MODIFIED);
			break;

		case "del" :
			$controller = new icms_ipf_Controller ($icms_page_handler);
			$controller->handleObjectDeletion();
			break;

		default :
			icms_cp_header();
			$objectTable = new icms_ipf_view_Table($icms_page_handler);
			$objectTable->addColumn(new icms_ipf_view_Column('page_status', 'center', FALSE, 'getCustomPageStatus'));
			$objectTable->addColumn(new icms_ipf_view_Column('page_title', _GLOBAL_LEFT, FALSE, 'getAdminViewItemLink'));
			$objectTable->addColumn(new icms_ipf_view_Column('page_url'));
			$objectTable->addColumn(new icms_ipf_view_Column('page_moduleid', 'center', FALSE, 'getCustomPageModuleid'));
			$objectTable->addIntroButton('addpost', 'admin.php?fct=pages&amp;op=mod', _AM_SYSTEM_PAGES_CREATE);
Example #8
0
 * required
 */
if (in_array($clean_op, $valid_op, true)) {
    switch ($clean_op) {
        case "mod":
            $profile_tribes_handler = icms_getModuleHandler('tribes', basename(dirname(dirname(__FILE__))), 'profile');
            $tribes = $profile_tribes_handler->getAllTribes();
            if (count($tribes) == 0) {
                redirect_header(PROFILE_ADMIN_URL . 'tribeuser.php', 3, _AM_PROFILE_TRIBEUSER_NOTTRIBESYET);
            }
            icms_cp_header();
            edittribeuser($clean_tribeuser_id);
            break;
        case "addtribeuser":
            $controller = new icms_ipf_Controller($profile_tribeuser_handler);
            $controller->storeFromDefaultForm(_AM_PROFILE_TRIBEUSER_CREATED, _AM_PROFILE_TRIBEUSER_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($profile_tribeuser_handler);
            $controller->handleObjectDeletion();
            break;
        default:
            icms_cp_header();
            icms::$module->displayAdminMenu(8, _AM_PROFILE_TRIBEUSERS);
            $objectTable = new icms_ipf_view_Table($profile_tribeuser_handler);
            $objectTable->addColumn(new icms_ipf_view_Column('tribeuser_id', _GLOBAL_LEFT, false, 'getTribeuserId'));
            $objectTable->addColumn(new icms_ipf_view_Column('tribe_id', _GLOBAL_LEFT, false, 'getTribeName', false, false, false));
            $objectTable->addColumn(new icms_ipf_view_Column('user_id', _GLOBAL_LEFT, false, 'getTribeuserSender', false, false, false));
            $objectTable->addIntroButton('addtribeuser', 'tribeuser.php?op=mod', _AM_PROFILE_TRIBEUSER_CREATE);
            $icmsAdminTpl->assign('profile_tribeuser_table', $objectTable->fetch());
            $icmsAdminTpl->display('db:profile_admin_tribeuser.html');
Example #9
0
     icms_cp_header();
     editfield($clean_field_id);
     break;
 case "changedField":
     foreach ($_POST['mod_profile_Field_objects'] as $k => $v) {
         $fieldObj = $profile_field_handler->get($v);
         if ($fieldObj->getVar('field_weight', 'e') != $_POST['field_weight'][$k]) {
             $fieldObj->setVar('field_weight', (int) $_POST['field_weight'][$k]);
             $profile_field_handler->insert($fieldObj);
         }
     }
     redirect_header('field.php', 3, _AM_PROFILE_FIELD_MODIFIED);
     break;
 case "addfield":
     $controller = new icms_ipf_Controller($profile_field_handler);
     $controller->storeFromDefaultForm(_AM_PROFILE_FIELD_CREATED, _AM_PROFILE_FIELD_MODIFIED);
     break;
 case "del":
     $controller = new icms_ipf_Controller($profile_field_handler);
     $controller->handleObjectDeletion();
     break;
 default:
     icms_cp_header();
     icms::$module->displayAdminMenu(2, _AM_PROFILE_FIELDS);
     $objectTable = new icms_ipf_view_Table($profile_field_handler, false, array('edit'));
     $objectTable->addColumn(new icms_ipf_view_Column('field_show', _CENTER, FALSE, 'getShow'));
     $objectTable->addColumn(new icms_ipf_view_Column('catid', _GLOBAL_LEFT, false, 'getCatid', false, false, false));
     $objectTable->addColumn(new icms_ipf_view_Column('field_name', _GLOBAL_LEFT, false, 'getFieldName'));
     $objectTable->addColumn(new icms_ipf_view_Column('field_title'));
     $objectTable->addColumn(new icms_ipf_view_Column('field_description'));
     $objectTable->addColumn(new icms_ipf_view_Column('field_weight', _CENTER, false, 'getField_weightControl'));
Example #10
0
        case "suspend":
            if (empty($clean_uid) || !$profile_isAdmin) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
            }
            editconfigs($configsObj, $clean_uid);
            break;
        case "addconfigs":
            if (!icms::$security->check()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
            }
            //check if current user is allowed to perform this action
            if ($real_uid == 0 || $real_uid != (int) $_POST['config_uid'] && !$profile_isAdmin) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
            }
            $controller = new icms_ipf_Controller($profile_configs_handler);
            $controller->storeFromDefaultForm(_MD_PROFILE_CONFIGS_CREATED, _MD_PROFILE_CONFIGS_MODIFIED, PROFILE_URL);
            break;
        default:
            if ($real_uid > 0 && icms::$user->getVar('uid') == $clean_uid) {
                editconfigs($configsObj);
            } elseif ($profile_isAdmin && $clean_uid > 0) {
                $configsObj = $profile_configs_handler->getConfigPerUser($clean_uid, true);
                editconfigs($configsObj, $clean_uid);
            } else {
                redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
            }
            break;
    }
}
$icmsTpl->assign('profile_category_path', _MD_PROFILE_CONFIGS);
include_once 'footer.php';
Example #11
0
// Again, use a naming convention that indicates the source of the content of the variable
$clean_friendship_id = isset($_GET['friendship_id']) ? (int) $_GET['friendship_id'] : 0;
$profile_friendship_handler = icms_getModuleHandler('friendship', basename(dirname(__FILE__)), 'profile');
/*  Create a whitelist of valid values, be sure to use appropriate types for each value
 * Be sure to include a value for no parameter, if you have a default condition */
$valid_op = array('addfriendship', 'editfriendship', '');
// Only proceed if the supplied operation is a valid operation
if (in_array($clean_op, $valid_op, true) && is_object(icms::$user)) {
    switch ($clean_op) {
        case "addfriendship":
            $uid = (int) filter_input(INPUT_POST, 'friend2_uid');
            if (!icms::$security->check()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
            }
            $controller = new icms_ipf_Controller($profile_friendship_handler);
            $controller->storeFromDefaultForm(_MD_PROFILE_FRIENDSHIP_CREATED, _MD_PROFILE_FRIENDSHIP_MODIFIED, PROFILE_URL . "/index.php?uid=" . $uid);
            break;
        case "editfriendship":
            if (!icms::$security->check()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
            }
            $clean_friendship_id = isset($_POST['friendship_id']) ? (int) $_POST['friendship_id'] : 0;
            $friendshipObj = $profile_friendship_handler->get($clean_friendship_id);
            if (!$friendshipObj->isNew() && $friendshipObj->getVar('friend2_uid') == $uid) {
                $clean_status = isset($_POST['status']) ? (int) $_POST['status'] : '';
                $valid_status = array(PROFILE_FRIENDSHIP_STATUS_ACCEPTED, PROFILE_FRIENDSHIP_STATUS_REJECTED);
                if (in_array($clean_status, $valid_status, true)) {
                    $friendshipObj->setVar('status', $clean_status);
                    $friendshipObj->store(true);
                    if (strpos(icms_getPreviousPage(), $friendshipObj->handler->_moduleUrl . $friendshipObj->handler->_page) !== false) {
                        header('Location: ' . $friendshipObj->handler->_moduleUrl . $friendshipObj->handler->_page . '?uid=' . $uid);
Example #12
0
}
$valid_op = array("mod", "changedField", "clone", "addcustomtag", "del", "");
if (in_array($clean_op, $valid_op, TRUE)) {
    switch ($clean_op) {
        case "mod":
        case "changedField":
            $customtagid = isset($_GET["customtagid"]) ? (int) $_GET["customtagid"] : 0;
            editcustomtag($customtagid);
            break;
        case "clone":
            $customtagid = isset($_GET["customtagid"]) ? (int) $_GET["customtagid"] : 0;
            editcustomtag($customtagid, TRUE);
            break;
        case "addcustomtag":
            $controller = new icms_ipf_Controller($icms_customtag_handler);
            $controller->storeFromDefaultForm(_CO_ICMS_CUSTOMTAG_CREATED, _CO_ICMS_CUSTOMTAG_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($icms_customtag_handler);
            $controller->handleObjectDeletion();
            break;
        default:
            icms_cp_header();
            $objectTable = new icms_ipf_view_Table($icms_customtag_handler);
            $objectTable->addColumn(new icms_ipf_view_Column("name", _GLOBAL_LEFT, 150, "getCustomtagName"));
            $objectTable->addColumn(new icms_ipf_view_Column("description", _GLOBAL_LEFT));
            $objectTable->addColumn(new icms_ipf_view_Column(_CO_ICMS_CUSTOMTAGS_TAG_CODE, "center", 200, "getXoopsCode"));
            $objectTable->addColumn(new icms_ipf_view_Column("language", "center", 150));
            $objectTable->addIntroButton("addcustomtag", "admin.php?fct=customtag&amp;op=mod", _CO_ICMS_CUSTOMTAG_CREATE);
            $objectTable->addQuickSearch(array("title", "summary", "description"));
            $objectTable->addCustomAction("getCloneLink");
Example #13
0
/**
 * in_array() is a native PHP function that will determine if the value of the
 * first argument is found in the array listed in the second argument. Strings
 * are case sensitive and the 3rd argument determines whether type matching is
 * required
*/
if (in_array($clean_op, $valid_op, true)) {
    switch ($clean_op) {
        case "mod":
        case "changedField":
            icms_cp_header();
            editpictures($clean_pictures_id);
            break;
        case "addpictures":
            $controller = new icms_ipf_Controller($profile_pictures_handler);
            $controller->storeFromDefaultForm(_AM_PROFILE_PICTURES_CREATED, _AM_PROFILE_PICTURES_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($profile_pictures_handler);
            $controller->handleObjectDeletion();
            break;
        default:
            icms_cp_header();
            icms::$module->displayAdminMenu(6, _AM_PROFILE_PICTURES);
            $objectTable = new icms_ipf_view_Table($profile_pictures_handler);
            $objectTable->addColumn(new icms_ipf_view_Column('pictures_id'));
            $objectTable->addColumn(new icms_ipf_view_Column('uid_owner', false, false, 'getPictureSender'));
            $objectTable->addColumn(new icms_ipf_view_Column('title', _GLOBAL_LEFT, false, 'getPictureTitle'));
            $objectTable->addColumn(new icms_ipf_view_Column('url', 'center', 330, 'getProfilePicture', false, false, false));
            $objectTable->addQuickSearch(array('title'));
            $objectTable->setDefaultSort('pictures_id');
Example #14
0
$icmsTpl->assign('uid_owner', $uid);
/* Only proceed if the supplied operation is a valid operation */
if (in_array($clean_op, $valid_op, true)) {
    switch ($clean_op) {
        case "mod":
            if ($clean_videos_id > 0 && $videosObj->isNew()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
            }
            editvideos($videosObj);
            break;
        case "addvideos":
            if (!icms::$security->check()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
            }
            $controller = new icms_ipf_Controller($profile_videos_handler);
            $controller->storeFromDefaultForm(_MD_PROFILE_VIDEOS_CREATED, _MD_PROFILE_VIDEOS_MODIFIED, PROFILE_URL . basename(__FILE__));
            break;
        case "del":
            if (!$videosObj->userCanEditAndDelete()) {
                redirect_header($videosObj->getItemLink(true), 3, _NOPERM);
            }
            if (isset($_POST['confirm']) && !icms::$security->check()) {
                redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
            }
            $controller = new icms_ipf_Controller($profile_videos_handler);
            $controller->handleObjectDeletionFromUserSide();
            break;
        default:
            $clean_start = isset($_GET['start']) ? (int) $_GET['start'] : 0;
            if ($real_uid && $real_uid == $uid) {
                editvideos($videosObj, true);
/**
 * in_array() is a native PHP function that will determine if the value of the
 * first argument is found in the array listed in the second argument. Strings
 * are case sensitive and the 3rd argument determines whether type matching is
 * required
*/
if (in_array($clean_op, $valid_op, TRUE)) {
    switch ($clean_op) {
        case "mod":
        case "changedField":
            icms_cp_header();
            editslide($clean_slide_id);
            break;
        case "addslide":
            $controller = new icms_ipf_Controller($billboard_slide_handler);
            $controller->storeFromDefaultForm(_AM_BILLBOARD_SLIDE_CREATED, _AM_BILLBOARD_SLIDE_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($billboard_slide_handler);
            $controller->handleObjectDeletion();
            break;
        case "view":
            $slideObj = $billboard_slide_handler->get($clean_slide_id);
            icms_cp_header();
            $slideObj->displaySingleObject();
            break;
        default:
            icms_cp_header();
            $icmsModule->displayAdminMenu(0, _AM_BILLBOARD_SLIDES);
            $objectTable = new icms_ipf_view_Table($billboard_slide_handler);
            $objectTable->addColumn(new icms_ipf_view_Column("title"));
Example #16
0
        ${$k} = StopXSS($v);
    }
}
$op = isset($_POST['op']) ? trim(filter_input(INPUT_POST, 'op')) : (isset($_GET['op']) ? trim(filter_input(INPUT_GET, 'op')) : '');
switch ($op) {
    case "mod":
        $rank_id = isset($_GET["rank_id"]) ? (int) $_GET["rank_id"] : 0;
        edituserrank(TRUE, $rank_id);
        break;
    case "clone":
        $rank_id = isset($_GET["rank_id"]) ? (int) $_GET["rank_id"] : 0;
        edituserrank(TRUE, $rank_id, TRUE);
        break;
    case "adduserrank":
        $controller = new icms_ipf_Controller($icms_userrank_handler);
        $controller->storeFromDefaultForm(_CO_ICMS_USERRANKS_CREATED, _CO_ICMS_USERRANKS_MODIFIED);
        break;
    case "del":
        $controller = new icms_ipf_Controller($icms_userrank_handler);
        $controller->handleObjectDeletion();
        break;
    default:
        icms_cp_header();
        $objectTable = new icms_ipf_view_Table($icms_userrank_handler);
        $objectTable->addColumn(new icms_ipf_view_Column("rank_title", _GLOBAL_LEFT, FALSE, "getRankTitle"));
        $objectTable->addColumn(new icms_ipf_view_Column("rank_min"));
        $objectTable->addColumn(new icms_ipf_view_Column("rank_max"));
        $objectTable->addColumn(new icms_ipf_view_Column("rank_image", "center", 200, "getRankPicture", FALSE, FALSE, FALSE));
        $objectTable->addIntroButton("adduserrank", "admin.php?fct=userrank&amp;op=mod", _CO_ICMS_USERRANKS_CREATE);
        $objectTable->addQuickSearch(array("rank_title"));
        $objectTable->addCustomAction("getCloneLink");
Example #17
0
/**
 * in_array() is a native PHP function that will determine if the value of the
 * first argument is found in the array listed in the second argument. Strings
 * are case sensitive and the 3rd argument determines whether type matching is
 * required
*/
if (in_array($clean_op, $valid_op, true)) {
    switch ($clean_op) {
        case "mod":
        case "changedField":
            icms_cp_header();
            editregstep($clean_regstep_id);
            break;
        case "addregstep":
            $controller = new icms_ipf_Controller($profile_regstep_handler);
            $controller->storeFromDefaultForm(_AM_PROFILE_REGSTEP_CREATED, _AM_PROFILE_REGSTEP_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($profile_regstep_handler);
            $controller->handleObjectDeletion();
            break;
        default:
            icms_cp_header();
            icms::$module->displayAdminMenu(3, _AM_PROFILE_REGSTEPS);
            $objectTable = new icms_ipf_view_Table($profile_regstep_handler);
            $objectTable->addColumn(new icms_ipf_view_Column('step_order'));
            $objectTable->addColumn(new icms_ipf_view_Column('step_name', false, false, 'getCustomStepName'));
            $objectTable->addColumn(new icms_ipf_view_Column('step_save', 'center', false, 'getCustomStepSave'));
            $objectTable->addColumn(new icms_ipf_view_Column('step_intro'));
            $objectTable->addIntroButton('addregstep', 'regstep.php?op=mod', _AM_PROFILE_REGSTEP_CREATE);
            $icmsAdminTpl->assign('profile_regstep_table', $objectTable->fetch());
Example #18
0
 * are case sensitive and the 3rd argument determines whether type matching is
 * required
 */
if (in_array($clean_op, $valid_op, true)) {
    switch ($clean_op) {
        case "clone":
            icms_cp_header();
            editcontent($clean_content_id, true);
            break;
        case "mod":
            icms_cp_header();
            editcontent($clean_content_id, false, $clean_content_pid);
            break;
        case "addcontent":
            $controller = new icms_ipf_Controller($content_content_handler);
            $controller->storeFromDefaultForm(_AM_CONTENT_CONTENT_CREATED, _AM_CONTENT_CONTENT_MODIFIED);
            break;
        case "del":
            $controller = new icms_ipf_Controller($content_content_handler);
            $controller->handleObjectDeletion();
            break;
        case "view":
            $contentObj = $content_content_handler->get($clean_content_id);
            icms_cp_header();
            icms::$module->displayAdminMenu(0, _AM_CONTENT_CONTENTS . " > " . _PREVIEW . ' > ' . $contentObj->getVar('content_title'));
            $icmsAdminTpl->assign('content_content_singleview', $contentObj->displaySingleObject(true, false, array('edit', 'delete')));
            $icmsAdminTpl->display('db:content_admin_content.html');
            break;
        case "changedField":
            foreach ($_POST['mod_content_Content_objects'] as $k => $v) {
                $changed = false;
Example #19
0
     $tribetopicObj = $profile_tribetopic_handler->get($clean_topic_id);
     if ($tribetopicObj->isNew() || !($tribetopicObj->userCanEditAndDelete() || $isOwner)) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _NOPERM);
     }
     if ($tribetopicObj->toggleClose()) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_TRIBETOPIC_MODIFIED);
     } else {
         redirect_header(icms_getPreviousPage('index.php'), 3, _CO_ICMS_SAVE_ERROR . $tribetopicObj->getHtmlErrors());
     }
     break;
 case "addtribes":
     if (!icms::$security->check()) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
     }
     $controller = new icms_ipf_Controller($profile_tribes_handler);
     $controller->storeFromDefaultForm(_MD_PROFILE_TRIBES_CREATED, _MD_PROFILE_TRIBES_MODIFIED, $tribesObj->isNew() ? PROFILE_URL . basename(__FILE__) : $tribesObj->getItemLink(true));
     break;
 case "del":
     if (!$tribesObj->userCanEditAndDelete()) {
         redirect_header($tribesObj->getItemLink(true), 3, _NOPERM);
     }
     if (isset($_POST['confirm']) && !icms::$security->check()) {
         redirect_header(icms_getPreviousPage('index.php'), 3, _MD_PROFILE_SECURITY_CHECK_FAILED . implode('<br />', icms::$security->getErrors()));
     }
     $controller = new icms_ipf_Controller($profile_tribes_handler);
     $controller->handleObjectDeletionFromUserSide();
     break;
 default:
     if ($userCanEditAndDelete) {
         edittribes($tribesObj, true);
     }