Location: PHPKode > projects > oc4ware > oc4ware-0.4.2/oc4ware/forums/member/checklist.php
<?php 
   
    /*   
    oc4ware   
    Portal Software for the Knowledge Society   
    Copyright (C) 2001-2002 oc4 e.V.   
    ----------------------------------------------------------------------   
    This program is free software; you can redistribute it and/or   
    modify it under the terms of the GNU General Public License   
    as published by the Free Software Foundation; either version 2   
    of the License, or (at your option) any later version.   
	   
    This program 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 this program; if not, write to the Free Software   
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.   
	----------------------------------------------------------------------   
    Authors: Sandro.Zic <hide@address.com>; |   
    Your Name <hide@address.com>; |   
    ----------------------------------------------------------------------   
    $Id: checklist.php,v 1.2 2002/10/30 18:49:10 czonsius Exp $   
    */

	$retrieval = OC4_FRAMEWORK::connect('forums/connector/retrieval');
	$forum =  $retrieval->call('getForum', array($_REQUEST['number']));
	
	// check whether the user has access
	$acl = OC4_FRAMEWORK::connect('forums/connector/acl');
	if(!$acl->call('isAuthorized', array($_SESSION[userInfo]->listIdentities(), OC4_FRAMEWORK::uriPrefix('forums').$_REQUEST['number'].$forum["language"]))){

		OC4_AUTHENTICATION::redirectToLogin();
	}

	require_once 'header.php';
	
	echo '<table border="1" cellspacing="0" cellpadding="8">';   
	echo '<tr><td align="left" valign="top"><b>Name:</b></td><td>';   
		if(empty($forum['name'])){   
			echo '<a href="edit.php?number='.$_REQUEST['number'].'">Please update</a>';   
		} else {   
			echo $forum['name'];   
		}   
		echo '</td></tr>';   
		echo '<tr><td align="left" valign="top"><b>Description:</b></td><td>';   
		if(empty($forum['description'])){   
			echo '<a href="edit.php?number='.$_REQUEST['number'].'">Please update</a>';   
		} else {   
			echo nl2br($forum['description']);
		}   
		echo '</td></tr>';   
		echo '<tr><td align="left" valign="top"><b>Language:</b></td><td>';   
		if(empty($forum['language'])){   
			echo '<a href="edit.php?number='.$_REQUEST['number'].'">Please update</a>';   
		} else {   
			echo $forum["language"];
		}   
		echo '</td></tr>';   
		// journal
		echo '<tr><td align="left" valign="top"><b>Journals</b><br>The publisher of your content.</td><td>';
		$journals = $acl->call( 'listOwners', array( $forum["URI"], OC4_FRAMEWORK::uriPrefix('roles').'pbl' ));
		if(count($journals) && is_array($journals)){
			foreach($journals as $journal) {
			  	$journals_repository_retrieval = OC4_FRAMEWORK::connect('journals_repository/connector/retrieval');
				$journals_data[] = $journals_repository_retrieval->call( 'getJournal', array($journal, 'URI'));
			}
			foreach($journals_data as $journal_data){   
			  	$journals_str .= $journal_data['name'].', ';   
			}   
			echo substr($journals_str,0,-2);   
		} else {   
			echo '<a href="journal.php?number='.$_REQUEST['number'].'">Please update</a><br>';   
		}
		echo '</td></tr>';   
		echo '</table>';   

	require_once 'footer.php';
?>
Return current item: oc4ware