function preAction()
 {
     global $xoopsUser;
     xoonips_allow_post_method();
     xoonips_deny_guest_access();
     $page = $this->_formdata->getValue('post', 'page', 'i', false);
     xoonips_validate_request($page > 0);
     $resolve_flag = $this->_formdata->getValue('post', 'resolve_conflict_flag', 'i', false);
     xoonips_validate_request(1 == $resolve_flag || 0 == $resolve_flag);
     $itemtype_handler =& xoonips_getormhandler('xoonips', 'item_type');
     foreach ($itemtype_handler->getObjects() as $itemtype) {
         if ('xoonips_index' == $itemtype->get('name')) {
             continue;
         }
         $handler =& xoonips_gethandler($itemtype->get('name'), 'import_item');
         $handler->create();
     }
     $sess_hander =& xoonips_getormhandler('xoonips', 'session');
     $sess =& $sess_hander->get(session_id());
     $session = unserialize($sess->get('sess_data'));
     $this->_collection = unserialize(gzuncompress(base64_decode($session['xoonips_import_items'])));
     xoonips_validate_request($this->_collection);
     $this->_collection->setImportAsNewOption(!is_null($this->_formdata->getValue('post', 'import_as_new', 'i', false)));
     $items =& $this->_collection->getItems();
     foreach (array_keys($items) as $key) {
         if (in_array($items[$key]->getPseudoId(), $this->getUpdatablePseudoId())) {
             // set update flag of displayed item
             $items[$key]->setUpdateFlag(in_array($items[$key]->getPseudoId(), $this->getUpdatePseudoId()));
         }
     }
     $this->_params[] = $this->_collection->getItems();
     $this->_params[] = $xoopsUser->getVar('uid');
     $this->_params[] = $this->_collection->getImportAsNewOption();
 }
 function preAction()
 {
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_requested_item_confirm', false)) {
         die('ticket error');
     }
     global $xoopsUser;
     $item_ids = $this->get_item_ids_to_transfer();
     if (empty($item_ids)) {
         redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_NO_ITEM);
     }
     $result = array();
     foreach ($this->get_item_ids_to_transfer() as $item_id) {
         foreach ($this->get_notify_uids($item_id) as $uid) {
             $result[$uid][$this->get_transferer_uid($item_id)][$this->get_transferee_uid($item_id)][] = $item_id;
         }
     }
     $this->_notify_uid_transferer_transferee_item_ids_map = $result;
     $this->_uid_item_ids_map = $this->getMapOfUidTOItemId($this->get_item_ids_to_transfer());
     $item_ids_to_transfer = $this->get_item_ids_to_transfer();
     if ($this->get_limit_check_result($xoopsUser->getVar('uid'), $this->get_item_ids_to_transfer())) {
         redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php' . '?action=list_item', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_NUMBER_OR_STORAGE_EXCEED);
     }
     if (!$this->is_user_in_group_of_items($xoopsUser->getVar('uid'), $this->get_item_ids_to_transfer())) {
         redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_ACCEPT_ERROR_BAD_SUBSCRIBE_GROUP);
     }
     $this->_params[] = $this->get_item_ids_to_transfer();
     $this->_params[] = $xoopsUser->getVar('uid');
     $this->_params[] = $this->_formdata->getValue('post', 'index_id', 'i', false);
 }
 function preAction()
 {
     global $xoopsUser;
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     xoonips_validate_request($this->is_valid_transferee_user($this->_formdata->getValue('post', 'to_uid', 'i', false)));
     xoonips_validate_request($this->is_readable_all_items($this->get_item_ids_to_transfer(), $xoopsUser->getVar('uid')));
 }
 function preAction()
 {
     global $xoopsUser;
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     $extra_params = xoonips_extra_param_restore();
     xoonips_validate_request($this->is_valid_transferee_user(@$extra_params['to_uid']));
     xoonips_validate_request($this->is_readable_all_items($this->_formdata->getValueArray('post', 'selected_original', 'i', false), $xoopsUser->getVar('uid')));
 }
コード例 #5
0
 function preAction()
 {
     global $xoopsUser;
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     $filetype = $this->_formdata->getValue('post', 'filetype', 's', false);
     xoonips_validate_request('localfile' == $filetype || 'remotefile' == $filetype && $xoopsUser && $xoopsUser->isAdmin());
     xoonips_validate_request($this->_is_importable_index_id($this->_get_xoonips_checked_index_ids($this->_formdata->getValue('post', 'xoonipsCheckedXID', 's', false))));
 }
 function preAction()
 {
     global $xoopsUser;
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     $extra_params = xoonips_extra_param_restore();
     xoonips_validate_request($this->is_valid_transferee_user(@$extra_params['to_uid']));
     if (count($this->get_selected()) > 0 || count($this->get_selected_hidden()) > 0) {
         xoonips_validate_request($this->is_readable_all_items(array_merge($this->get_selected(), $this->get_selected_hidden()), $xoopsUser->getVar('uid')));
     }
 }
 function preAction()
 {
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_requested_item_confirm', false)) {
         die('ticket error');
     }
     $item_ids = $this->get_item_ids_to_transfer();
     if (empty($item_ids)) {
         redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_TRANSFER_USER_REJECT_ERROR_NO_ITEM);
     }
     $this->_params[] = $this->_formdata->getValueArray('post', 'item_ids_to_transfer', 'i', false);
 }
 function doAction()
 {
     xoonips_deny_guest_access();
     global $xoopsUser;
     $item_ids_to_transfer = $this->get_transfer_request_item_ids($xoopsUser->getVar('uid'));
     if (!$this->is_user_in_group_of_items($xoopsUser->getVar('uid'), $item_ids_to_transfer)) {
         $gnames = $this->get_unsubscribed_group_names($xoopsUser->getVar('uid'), $item_ids_to_transfer);
         $msg = sprintf(_MD_XOONIPS_TRANSFER_USER_LIST_ITEM_ERROR_BAD_SUBSCRIBE_GROUP_NAME, $gnames[0]);
         redirect_header(XOOPS_URL . '/', 3, $msg);
     }
     $this->_view_params['item_ids_to_transfer'] = $this->sort_item_ids_by_title($item_ids_to_transfer);
     $this->_view_params['limit_check_result'] = $this->get_limit_check_result($xoopsUser->getVar('uid'), $item_ids_to_transfer);
     $user_hanlder =& xoonips_getormhandler('xoonips', 'users');
     $user =& $user_hanlder->get($xoopsUser->getVar('uid'));
     $this->_view_params['index_options'] = $this->getIndexOptionsTemplateVar($user->get('private_index_id'));
 }
 function preAction()
 {
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     if (!$GLOBALS['xoopsGTicket']->check(true, 'xoonips_transfer_user_item_confirm', false)) {
         die('ticket error');
     }
     global $xoopsUser;
     $all_of_item_ids_to_transfer = array_unique(array_merge($this->get_item_ids_to_transfer(), $this->get_child_item_ids_to_transfer()));
     if (!xoonips_transfer_is_transferrable($xoopsUser->getVar('uid'), $this->get_to_uid(), $all_of_item_ids_to_transfer)) {
         redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php', 3, _MD_XOONIPS_TRANSFER_USER_REQUEST_ERROR);
     }
     if (!$this->is_user_in_group_of_items($this->get_to_uid(), $all_of_item_ids_to_transfer)) {
         redirect_header(XOOPS_URL . '/modules/xoonips/transfer_item.php', 3, _MD_XOONIPS_TRANSFER_USER_REQUEST_ERROR_BAD_SUBSCRIBE_GROUP);
     }
     $this->_params = array($all_of_item_ids_to_transfer, $xoopsUser->getVar('uid'), $this->get_to_uid());
 }
コード例 #10
0
 function preAction()
 {
     xoonips_deny_guest_access();
     xoonips_allow_post_method();
     if (!$GLOBALS['xoopsGTicket']->check(true, 'import', false)) {
         die('ticket error');
     }
     $itemtype_handler =& xoonips_getormhandler('xoonips', 'item_type');
     foreach ($itemtype_handler->getObjects() as $itemtype) {
         if ('xoonips_index' == $itemtype->get('name')) {
             continue;
         }
         $handler =& xoonips_gethandler($itemtype->get('name'), 'import_item');
         $handler->create();
     }
     $sess_handler =& xoonips_getormhandler('xoonips', 'session');
     $sess =& $sess_handler->get(session_id());
     $session = unserialize($sess->get('sess_data'));
     $this->_collection = unserialize(gzuncompress(base64_decode($session['xoonips_import_items'])));
     xoonips_validate_request($this->_collection);
     $this->_make_clone_of_update_item($this->_collection);
     $this->_begin_time = time();
     $this->_params[] =& $this->_collection->getItems();
 }
コード例 #11
0
//  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 this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
$xoopsOption['pagetype'] = 'user';
include 'include/common.inc.php';
include 'class/base/gtickets.php';
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
require_once 'include/lib.php';
require_once 'include/AL.php';
$xnpsid = $_SESSION['XNPSID'];
xoonips_deny_guest_access();
$myuid = is_object($xoopsUser) ? $xoopsUser->getVar('uid', 'n') : UID_GUEST;
$formdata =& xoonips_getutility('formdata');
$uid = $formdata->getValue('both', 'uid', 'i', false, $myuid);
if ($myuid == UID_GUEST) {
    // user id not selected
    redirect_header(XOOPS_URL . '/', 3, _US_SELECTNG);
    exit;
}
//Uncertified user can't access
if (!xnp_is_activated($xnpsid, $uid)) {
    redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_ACCOUNT_NOT_ACTIVATED);
    exit;
}
// private function
function getUserPosiList()
コード例 #12
0
//  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 this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
$xoopsOption['pagetype'] = 'user';
include 'include/common.inc.php';
include_once 'include/lib.php';
include_once 'include/AL.php';
include_once 'include/notification.inc.php';
include 'class/base/gtickets.php';
$xnpsid = $_SESSION['XNPSID'];
xoonips_deny_guest_access('user.php');
//User(Not Moderater) can't control(except XOOPS administrator).
if (!$xoopsUser->isAdmin($xoopsModule->getVar('mid')) && !xnp_is_moderator($xnpsid, $xoopsUser->getVar('uid'))) {
    redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_MODERATOR_SHULD_BE_MODERATOR);
    exit;
}
$textutil =& xoonips_getutility('text');
$formdata =& xoonips_getutility('formdata');
$op_list = array('certify', 'uncertify_confirm', 'uncertify');
$op = $formdata->getValue('post', 'op', 's', false, '');
$certify_uid = $formdata->getValue('post', 'certify_uid', 'i', false, 0);
if ($op == '') {
} else {
    if (in_array($op, $op_list)) {
        if ($certify_uid == 0) {
            die('illegal request');
コード例 #13
0
 function preAction()
 {
     xoonips_deny_guest_access();
     xoonips_allow_both_method();
 }