コード例 #1
0
         $with_anchor = true;
         $session_post_vars[CS_ANNOUNCEMENT_TYPE] = $attach_ids;
         $form->setFormPost($session_post_vars);
      }
      // Back from attaching topics
         elseif ( $backfrom == CS_TOPIC_TYPE ) {
            $session_post_vars = $session->getValue($current_iid.'_post_vars'); // Must be called before attach_return(...)
            $attach_ids = attach_return(CS_TOPIC_TYPE, $current_iid);
            $with_anchor = true;
            $session_post_vars[CS_TOPIC_TYPE] = $attach_ids;
            $form->setFormPost($session_post_vars);
         }
         // Back from attaching institutions
         elseif ( $backfrom == CS_INSTITUTION_TYPE ) {
            $session_post_vars = $session->getValue($current_iid.'_post_vars'); // Must be called before attach_return(...)
            $attach_ids = attach_return(CS_INSTITUTION_TYPE, $current_iid);
            $with_anchor = true;
            $session_post_vars[CS_INSTITUTION_TYPE] = $attach_ids;
            $form->setFormPost($session_post_vars);
         }

         // Load form data from database
         elseif ( isset($item) ) {
            $form->setItem($item);
            if ( $item->isProjectRoom() ) {
               $community_room_list = $item->getCommunityList();
               if ( !$community_room_list->isEmpty() ) {
                  $community_room_array = array();
                  $community_room_item = $community_room_list->getFirst();
                  while ( $community_room_item ) {
                     $temp_array = array();
コード例 #2
0
ファイル: section_edit.php プロジェクト: a2call/commsy
         $form->setFormPost($session_post_vars);
      }

      // Back from multi upload
      elseif ( $from_multiupload ) {
         $session_post_vars = array();
         if ( isset($post_file_ids) AND !empty($post_file_ids) ) {
            $session_post_vars['filelist'] = $post_file_ids;
         }
         $form->setFormPost($session_post_vars);
      }

      // Back from attaching material
      elseif ( $backfrom == CS_MATERIAL_TYPE ) {
         $session_post_vars = $session->getValue($current_iid.'_post_vars'); // Must be called before attach_return(...)
         $attach_ids = attach_return(CS_MATERIAL_TYPE, $current_iid);
         $with_anchor = true;
         $session_post_vars[CS_MATERIAL_TYPE] = $attach_ids;
         $form->setFormPost($session_post_vars);
      }

      // Load form data from database
      elseif ( isset($section_item) ) {
         $form->setItem($section_item);

         // Files
         $file_list = $section_item->getFileList();
         if ( !$file_list->isEmpty() ) {
            $file_array = array();
            $file_item = $file_list->getFirst();
            while ( $file_item ) {
コード例 #3
0
ファイル: profile_edit.php プロジェクト: a2call/commsy
                $form->setIsModerator(true);
             } else {
                $form->setIsModerator(false);
             }
             if (!empty($_POST['with_picture'])) {
                $form->setWithPicture(true);
             } else {
                $form->setWithPicture(false);
             }
          }

          // Back from attaching groups
          // ??? IJ 22.05.2009
          elseif ( $backfrom == CS_GROUP_TYPE ) {
             $session_post_vars = $session->getValue($iid.'_post_vars'); // Must be called before attach_return(...)
             $attach_ids = attach_return(CS_GROUP_TYPE, $iid);
             $with_anchor = true;
             $session_post_vars[CS_GROUP_TYPE] = $attach_ids;
             $form->setFormPost($session_post_vars);
          }

         // first call
         elseif (!empty($iid) and $iid != 'NEW') { // change existing user
             $user_manager = $environment->getUserManager();
             $user_item = $user_manager->getItem($iid);
             
             if(isset($_GET['show_profile']) && $_GET['show_profile'] == 'yes') {
             	$user_manager->setContextLimit($environment->getCurrentPortalID());
             	$user_manager->setUserIDLimit($user_item->getUserID());
             	$user_manager->select();
             	$list = $user_manager->get();