summaryrefslogtreecommitdiff
path: root/list1.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2016-02-07 17:06:26 +0000
committerlsces <lester@lsces.co.uk>2016-02-07 17:06:26 +0000
commit69b08377a8a2d3791b21d96720657d93beda2af0 (patch)
tree924935419d8b9b5fb982ef1aa82b09882204e4d1 /list1.php
parent6da4dfeaa2dba4fbb74dedf5b8577c9095659b61 (diff)
downloadcontact-69b08377a8a2d3791b21d96720657d93beda2af0.tar.gz
contact-69b08377a8a2d3791b21d96720657d93beda2af0.tar.bz2
contact-69b08377a8a2d3791b21d96720657d93beda2af0.zip
Second contact list style
This may need same treatment as fisheye gallery selection
Diffstat (limited to 'list1.php')
-rw-r--r--list1.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/list1.php b/list1.php
new file mode 100644
index 0000000..a818cd9
--- /dev/null
+++ b/list1.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @version $Header: /cvsroot/bitweaver/_bit_contact/list.php,v 1.5 2010/02/08 21:27:22 wjames5 Exp $
+ *
+ * Copyright (c) 2006 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
+ *
+ * @package contact
+ * @subpackage functions
+ */
+
+/**
+ * required setup
+ */
+require_once( '../kernel/setup_inc.php' );
+
+include_once( CONTACT_PKG_PATH.'Contact.php' );
+
+$gBitSystem->verifyPackage( 'contact' );
+$gBitSystem->verifyPermission( 'p_contact_view' );
+
+$gContent = new Contact( );
+$gContent->invokeServices( 'content_list_function', $_REQUEST );
+
+// Handle the request hash storing into the session.
+$gContent->mTypes->processRequestHash($_REQUEST, $_SESSION['contact']);
+
+$listHash = $_REQUEST;
+/*
+ * Setup which contact types we want to view.
+$contactTypes = $gContent->getContactTypes();
+if( $gBitUser->hasPermission("p_contact_view_changes") && $_SESSION['contact']['contact_type_guid'] ) {
+ $listHash['contact_type_guid'] = $_SESSION['contact']['contact_type_guid'];
+} else {
+ foreach ($contactTypes as $key => $val) {
+ if ($gBitSystem->isFeatureActive('contact_default_'.$key)) {
+ $listHash['contact_type_guid'][] = $key;
+ }
+ }
+} */
+// Get a list of matching contact entries
+$listcontacts = $gContent->getList( $listHash );
+
+if ( $listHash['listInfo']['count'] == 1 ){
+ bit_redirect( CONTACT_PKG_URL."display_contact.php?content_id=".$listcontacts[0]['content_id'] );
+}
+
+$gBitSmarty->assignByRef( 'listcontacts', $listcontacts );
+$gBitSmarty->assignByRef( 'listInfo', $listHash['listInfo'] );
+
+$gBitSystem->setBrowserTitle("View Contacts List");
+// Display the template
+$gBitSystem->display( 'bitpackage:contact/list1.tpl', NULL, array( 'display_mode' => 'list' ));
+
+?>