summaryrefslogtreecommitdiff
path: root/ajax_attachment_browser.php
blob: c632d81ac7483afbc4dc34f0681c3b1739c4ccf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * @version $Header: /cvsroot/bitweaver/_bit_liberty/ajax_attachment_browser.php,v 1.7 2007/05/11 17:10:42 wjames5 Exp $
 * @package liberty
 * @subpackage functions
 */

/**
 * required setup
 */
require_once( '../bit_setup_inc.php' );
global $gContent, $gBitSmarty;

$gContent = new LibertyAttachable();
if (isset($_REQUEST['content_id'])) {
	$gContent->mContentId = $_REQUEST['content_id'];
}
$gBitSmarty->assign('attachmentBrowser', true);
include_once( LIBERTY_PKG_PATH.'attachment_browser.php' );

if (isset($_REQUEST['json'])){
	header('Content-type:application/json');
	$gBitSmarty->display( 'bitpackage:liberty/attachment_browser_json.tpl' );
}else{
	echo $gBitSmarty->fetch( 'bitpackage:liberty/attachment_browser.tpl' );
}
?>