";
/*echo "";*/
}
if ($_SESSION["edit_site_id"] == $site_id) { print "
Edit Categories
"; }
}
//Product DB
if ($item['itemtype'] == 8) {
include_once('productdb_public_view.php');
}
//Product DB v.2
if ($item['itemtype'] == 12) {
include_once('productdb_public_view_v2.php');
}
//Database
if ($item["itemtype"] == 6)
{
if ($_SESSION["edit_site_id"] == $site_id) { print "Add data to this database
"; }
if ($_SESSION["edit_site_id"] == $site_id) { print "Edit layout
"; }
$dbinfo = explode("~", $item["text"] );
// actually need to put in item[text] what to order by, desc or asc and how many items to display.
// also, display in a table, or with
's? some of that can be done in the text formatting...
// also what do you do when you have cross table queries?? ach.
// check if just one field is being looked at
if ($_REQUEST["dbitem"] >0)
{
$dbitem = " and dbinfo.record=" . $_REQUEST["dbitem"];
}
else
{ $dbitem=""; }
if (isset($_GET['category'])) {
$category = pg_escape_string($_GET['category']);
$dbcat = " and dbinfo.category=$category";
} else {
$dbcat = '';
}
$sql = "select * from dbinfo,dbfields where dbinfo.fieldid=dbfields.record $dbitem $dbcat and siteid=$site_id and database=" . $item["database"] . " order by setid desc,dbfields.sortorder";
$rs2 = pg_exec($sql);
if (pg_numrows($rs2) > 0)
{
for ($counter=0; $counter0)
{
$text=str_replace("~record~",$data["setid"],$text);
print $text;
}
$text = $item["text"];
$oldsetid = $data["setid"];
}
$text=str_replace("~record~",$data["setid"],$text);
$text=str_replace(("~".$data["field"]."~"),$data["info"],$text);
}
print $text;
}
}
// document indexer
if ($item["itemtype"] == 50)
include($_SERVER['DOCUMENT_ROOT'] . "/document_indexer.php");
// video gallery
if ($item["itemtype"] == 51)
include($_SERVER['DOCUMENT_ROOT'] . "/video_gallery.php");
// Response form
if ($item["itemtype"] == 4)
{
if ($message) { print $message . ""; }
if ($_SESSION["edit_site_id"] == $site_id) { print "Edit this response form
"; }
$fields = explode("\r\n", $item["text"] );
$variable_list = "";
$stage = $_REQUEST["stage"] + 1;
print "
";
}
//News Module - Teaser
if ($item["itemtype"] == 16) {
$newsType = 1;
include('news_display.php');
echo $itemContents;
}
//News Module - Full List
if ($item["itemtype"] == 17) {
$newsType = 2;
include('news_display.php');
}
//Calendar
if ($item["itemtype"] == 18) {
$tpl_table = "linksdb";
include('view_calendar.php');
}
//Calendar
if ($item["itemtype"] == 19) {
include('shared_content.php');
}
// Response form
if ($item["itemtype"] == 10) {
include_once('shoppingcart_checkout.php');
}
if ($item["itemtype"] == 25) {
include_once('newsletter.php');
}
if ($item["itemtype"] == 27) {
include_once('blog.php');
}
if ($item["itemtype"] == 24) {
include_once('pageSearch.php');
}
if ($template["usetable"]==1) { print "