/
lookup_polyline_inc.php
37 lines (34 loc) · 1.21 KB
/
lookup_polyline_inc.php
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
28
29
30
31
32
33
34
35
36
37
<?php
/**
* @version $Header$
*
* Copyright (c) 2007 bitweaver.org
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
* @author Will <will@wjamesphoto.com>
*
* @package gmap
* @subpackage functions
*/
/**
* required setup
*/
global $gContent;
require_once( GMAP_PKG_PATH.'BitGmapPolyline.php');
require_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' );
// if we already have a gContent, we assume someone else created it for us, and has properly loaded everything up.
if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) {
if (!empty($_REQUEST['polyline_id']) && is_numeric($_REQUEST['polyline_id'])) {
// if sample_id supplied, use that
$gContent = new BitGmapPolyline( $_REQUEST['polyline_id'] );
} elseif (!empty($_REQUEST['content_id']) && is_numeric($_REQUEST['content_id'])) {
// if content_id supplied, use that
$gContent = new BitGmapPolyline( NULL, $_REQUEST['content_id'] );
} else {
// otherwise create new object
$gContent = new BitGmapPolyline();
}
$gContent->load();
$gBitSmarty->assign_by_ref( "gContent", $gContent );
}
?>