verifyPackage( 'contact' ); $gBitSystem->verifyPermission( 'p_contact_view' ); $gContent = new Contact( ); $gContent->invokeServices( 'content_list_function', $_REQUEST ); $gBitSmarty->assign( 'contContactTypes', ContactType::getTypeMarkerList() ); $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 ){ KernelTools::bit_redirect( CONTACT_PKG_URL."display_contact.php?content_id=".$listcontacts[0]['content_id'] ); } $gBitSmarty->assign( 'listcontacts', $listcontacts ); $gBitSmarty->assign( 'listInfo', $listHash['listInfo'] ); $gBitSystem->setBrowserTitle("View Contacts List"); // Display the template $gBitSystem->display( 'bitpackage:contact/list2.tpl', NULL, [ 'display_mode' => 'list' ]);