summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xadmin/schema_inc.php17
-rwxr-xr-xdisplay_contact.php2
-rwxr-xr-xincludes/bit_setup_inc.php1
-rwxr-xr-xincludes/classes/Contact.php45
-rwxr-xr-xlist_contracts.php36
-rwxr-xr-xtemplates/contact_header.tpl12
-rwxr-xr-xtemplates/display_list_header.tpl1
-rwxr-xr-xtemplates/edit.tpl7
-rwxr-xr-xtemplates/edit_key_break.tpl57
-rwxr-xr-xtemplates/edit_xref_key_seal_fields.tpl19
-rwxr-xr-xtemplates/list.tpl6
-rwxr-xr-xtemplates/list1.tpl76
-rwxr-xr-xtemplates/list_contracts.tpl78
-rwxr-xr-xtemplates/view_xref_key_seal.tpl75
14 files changed, 13 insertions, 419 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 2e6391c..7cc477b 100755
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -24,7 +24,7 @@ $tables = [
zone_id I4,
country C(80),
country_id I4,
- last_update_date T DEFAULT CURRENT_TIMESTAMP,
+ last_update_date T DEFAULT LOCALTIMESTAMP,
cltype I2
",
@@ -83,9 +83,7 @@ $gBitInstaller->registerSchemaDefault( CONTACT_PKG_NAME, [
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('type', 'contact','Contact Type List', 0,3,'')",
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('contact','contact','General Contact Details', 1,3,'')",
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('links', 'contact','Linked Contact Items', 2,3,'')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('alarm', 'contact','Security System Links', 3,3,'')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('council','contact','Council reference links', 4,3,'')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('account','contact','Account Details', 5,4,'')",
+ "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_group` (`x_group`,`content_type_guid`,`title`,`sort_order`,`role_id`,`type_href`) VALUES ('account','contact','Account Details', 3,4,'')",
// --- liberty_xref_item (formerly contact_xref_source) ---
// group: type
@@ -112,15 +110,8 @@ $gBitInstaller->registerSchemaDefault( CONTACT_PKG_NAME, [
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('#W','contact','contact','Web Site Url', 1,3,'../contact/?contact_id=','text' )",
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('0', 'contact','contact','Free format information', 1,3,'../contact/?xref=', 'text' )",
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('CON','contact','contact','Contact', 1,3,'../nlpg/?uprn=', 'text' )",
- // group: alarm
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('#A', 'contact','alarm','Alarm Maintainer', 0,3,'../nlpg/?uprn=','text' )",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('#K', 'contact','alarm','Keyholder', 1,3,'../nlpg/?uprn=','phone')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('ALARM','contact','alarm','Alarm System', 0,3,'../nlpg/?uprn=','text' )",
- // group: council
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('CTAX','contact','council','Council Tax', 0,3,'../nlpg/?uprn=','text')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('ER', 'contact','council','Electoral Roll', 0,3,'../nlpg/?uprn=','text')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('HBEN','contact','council','Housing Benefit', 0,3,'../nlpg/?uprn=','text')",
- "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('NNDR','contact','council','National Non-domestic Rates',0,3,'../nlpg/?uprn=','text')",
+ // group: links
+ "INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('SCREF','contact','links','Stock Source Reference',0,3,'../stock/?content_id=','text')",
// group: account
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('ACC_TO','contact','account','Account Turnover', 0,3,'../vat/?vat=', 'text')",
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_xref_item` (`item`,`content_type_guid`,`x_group`,`cross_ref_title`,`multiple`,`role_id`,`cross_ref_href`,`template`) VALUES ('SAGEID','contact','account','SAGE Account Reference', 0,3,'''sage''', 'text')",
diff --git a/display_contact.php b/display_contact.php
index 1d8af5d..48e6a0b 100755
--- a/display_contact.php
+++ b/display_contact.php
@@ -53,5 +53,5 @@ if ($gContent->isCommentable()) {
$gContent->mInfo['type'] = $gContent->getXrefGroupList();
-$gBitSystem->setBrowserTitle("Contact Information");
+$gBitSystem->setBrowserTitle( $gContent->mInfo['title'] );
$gBitSystem->display( 'bitpackage:contact/show_contact.tpl');
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index a8e53e2..7cc860b 100755
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -15,6 +15,7 @@ define( 'CONTACT_PKG_NAME', $pRegisterHash['package_name'] );
define( 'CONTACT_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' );
define( 'CONTACT_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' );
define( 'CONTACT_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
+define( 'CONTACT_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/');
define( 'CONTACT_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
$gBitSystem->registerPackage( $pRegisterHash );
diff --git a/includes/classes/Contact.php b/includes/classes/Contact.php
index c6ed102..4cea7d0 100755
--- a/includes/classes/Contact.php
+++ b/includes/classes/Contact.php
@@ -213,14 +213,14 @@ class Contact extends LibertyContent {
$result = $this->mDb->query($query, [$this->mContentId ] );
foreach ( $pParamHash['contact_types'] as $key => $source ) {
if ( $source == '$00' ) {
- $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`content_id`, `item`, `xkey_ext`, `last_update_date`) VALUES ( ?, ?, ?, NULL )";
- $result = $this->mDb->query($query, [ $this->mContentId, $source, $pParamHash['name'] ] );
+ $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`xref_id`, `content_id`, `item`, `xkey_ext`, `last_update_date`) VALUES ( ?, ?, ?, ?, NULL )";
+ $result = $this->mDb->query($query, [ $this->mDb->GenID('liberty_xref_seq'), $this->mContentId, $source, $pParamHash['name'] ] );
} else if ( $source == '$01' ) {
- $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`content_id`, `item`, `xkey_ext`, `last_update_date`) VALUES ( ?, ?, ?, NULL )";
- $result = $this->mDb->query($query, [ $this->mContentId, $source, $pParamHash['organisation'] ] );
+ $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`xref_id`, `content_id`, `item`, `xkey_ext`, `last_update_date`) VALUES ( ?, ?, ?, ?, NULL )";
+ $result = $this->mDb->query($query, [ $this->mDb->GenID('liberty_xref_seq'), $this->mContentId, $source, $pParamHash['organisation'] ] );
} else {
- $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`content_id`, `item`, `last_update_date`) VALUES ( ?, ?, NULL )";
- $result = $this->mDb->query($query, [ $this->mContentId, $source ] );
+ $query = "INSERT INTO `".BIT_DB_PREFIX."liberty_xref` (`xref_id`, `content_id`, `item`, `last_update_date`) VALUES ( ?, ?, ?, NULL )";
+ $result = $this->mDb->query($query, [ $this->mDb->GenID('liberty_xref_seq'), $this->mContentId, $source ] );
}
}
}
@@ -379,14 +379,6 @@ class Contact extends LibertyContent {
}
$pParamHash["listInfo"]["active"] = $active;
- if( isset( $find_key ) and is_string( $find_key ) and $find_key <> '' ) {
- $whereSql .= " AND UPPER( con.`xkey` ) = ? ";
- $bindVars[] = strtoupper( $find_key );
- $pParamHash["listInfo"]["ihash"]["find_key"] = $find_key;
- $find_title = '';
- $find_location = '';
- $find_postcode = '';
- }
if( isset( $find_title ) and is_string( $find_title ) and $find_title <> '' ) {
$whereSql .= " AND UPPER( lc.`title` ) like ? ";
@@ -460,31 +452,6 @@ class Contact extends LibertyContent {
}
/**
- * Returns Contract Numbers list
- * @param $contract selects a single type of contract to list
- * @return array List of contact numbers in contract number order
- */
- public function getContractList( $contract = 0 ) {
- $query = "SELECT r.`xkey_ext` AS `contract`, r.`content_id`, lc.`title`, r.`xref`, r.`xkey`, r.`data`,
- ap.*, xhA.`xkey_ext` AS house, r.xref,
- CASE WHEN r.`xkey_ext` STARTING 'C' THEN CAST ( SUBSTRING ( r.`xkey_ext` FROM 2 FOR 4 ) AS INTEGER )
- ELSE CAST ( r.`xkey_ext` AS INTEGER ) END AS XORDERBY
- FROM `".BIT_DB_PREFIX."liberty_xref` r
- LEFT JOIN `".BIT_DB_PREFIX."liberty_content` lc ON lc.`content_id` = r.`content_id`
- LEFT JOIN `".BIT_DB_PREFIX."liberty_xref` xhA ON xhA.`content_id` = lc.`content_id` AND xhA.`item` = '#S' AND ( xhA.`end_date` IS NULL OR xhA.`end_date` > CURRENT_TIMESTAMP )
- LEFT JOIN `".BIT_DB_PREFIX."address_postcode` ap ON ap.`postcode` = xhA.`xkey`
- WHERE r.`item` = 'KEY_S' AND r.`xref` = ? AND ( r.`end_date` IS NULL OR r.`end_date` > CURRENT_TIMESTAMP )
- ORDER BY r.`xref`, XORDERBY";
- $result = $this->mDb->query($query, [ $contract ] );
-
- $ret = [];
- while ($res = $result->fetchRow()) {
- $ret[] = $res;
- }
- return $ret;
- }
-
- /**
* getXrefList( &$pParamHash );
* Get list of xref records for this contact record
*/
diff --git a/list_contracts.php b/list_contracts.php
deleted file mode 100755
index cf0d2b4..0000000
--- a/list_contracts.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/**
- * @version $Header: /cvsroot/bitweaver/_bit_contact/list_contacts.php,v 1.4 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/includes/setup_inc.php';
-use Bitweaver\Contact\Contact;
-
-$gBitSystem->isPackageActive('contact', TRUE);
-
-// Now check permissions to access this page
-$gBitSystem->verifyPermission('p_read_contact');
-
-$contacts = new Contact();
-if ( !isset($_REQUEST['contract'])) {
- $_REQUEST['contract'] = 0;
-}
-
-// Get a list of Contracts
-$contracts = $contacts->getContractList( $_REQUEST['contract'] );
-
-$gBitSmarty->assign('listInfo', $_REQUEST['listInfo']);
-$gBitSmarty->assign('list', $contracts);
-
-// Display the template
-$gBitSystem->display( 'bitpackage:contact/list_contracts.tpl', NULL, [ 'display_mode' => 'list' ]);
diff --git a/templates/contact_header.tpl b/templates/contact_header.tpl
index bcc680a..4487ff7 100755
--- a/templates/contact_header.tpl
+++ b/templates/contact_header.tpl
@@ -5,17 +5,7 @@
</div> {* end category *}
{/if}
- <h1>{$gContent->mInfo.xkey}&nbsp;-&nbsp;
-{* {if isset(gContent->mInfo.organisation) && (gContent->mInfo.organisation <> '') }
- {$gContent->mInfo.organisation}
- {elseif isset(gContent->mInfo.surname) && (gContent->mInfo.surname <> '') }
- {$gContent->mInfo.prefix}&nbsp;
- {$gContent->mInfo.forename}&nbsp;
- {$gContent->mInfo.surname}
- {else} *}
- {$gContent->mInfo.title}
-{* {/if} *}
- </h1>
+ <h1>{$gContent->mInfo.title}</h1>
<div class="description">{$gContent->mInfo.description|default:''}</div>
</div> {* end .header *}
diff --git a/templates/display_list_header.tpl b/templates/display_list_header.tpl
index 58269be..c79cee3 100755
--- a/templates/display_list_header.tpl
+++ b/templates/display_list_header.tpl
@@ -5,7 +5,6 @@
{/foreach}
<input type="hidden" name="sort_mode" value="{$sort_mode|default:$smarty.request.sort_mode}" />
- <label class="col-md-1 col-sm-3 col-xs-12">{tr}Key{/tr}:&nbsp;<input size="4" type="text" name="find_key" value="{$find_key|default:$smarty.request.find_key|escape}" /></label>
<label class="col-md-3 col-sm-3 col-xs-12">{tr}Title{/tr}:&nbsp;<input size="20" type="text" name="find_title" value="{$find_title|default:$smarty.request.find_title|escape}" /></label>
<label class="col-md-3 col-sm-3 col-xs-12">{tr}Location{/tr}:&nbsp;<input size="20" type="text" name="find_location" value="{$find_location|default:$smarty.request.find_location|escape}" /></label>
<label class="col-md-2 col-sm-3 col-xs-12">{tr}Postcode{/tr}:&nbsp;<input size="10" type="text" name="find_postcode" value="{$find_postcode|default:$smarty.request.find_postcode|escape}" /></label>
diff --git a/templates/edit.tpl b/templates/edit.tpl
index 65b6627..82a7086 100755
--- a/templates/edit.tpl
+++ b/templates/edit.tpl
@@ -94,13 +94,6 @@
{/if}
{* include edit_personal.tpl *}
- <div class="form-group">
- {formlabel label="Key Number" for="xkey"}
- {forminput}
- <input size="10" type="text" name="xkey" id="xkey" value="{$gContent->mInfo.xkey|escape}" />
- {/forminput}
- <div class="clear"></div>
- </div>
<div class="form-group">
{formlabel label="Note" for="description"}
diff --git a/templates/edit_key_break.tpl b/templates/edit_key_break.tpl
deleted file mode 100755
index bb070af..0000000
--- a/templates/edit_key_break.tpl
+++ /dev/null
@@ -1,57 +0,0 @@
-{strip}
-<div class="floaticon">{bithelp}</div>
-<div class="edit contact_xref">
- <div class="header">
- <h1>{tr}Edit Contact Xref{/tr}: {$title|escape}-{$xref_title|escape}</h1>
- </div>
-
- {formfeedback hash=$feedback}
- {formfeedback warning=$errors.title}
-
- <div class="body">
- {form enctype="multipart/form-data" id="writexref"}
- <input type="hidden" name="content_id" value="{$xrefInfo.content_id}" />
- <input type="hidden" name="xref_id" value="{$xrefInfo.xref_id}" />
-
- {legend legend="Break Seal Contents"}
- <div class="form-group">
- {formlabel label="Seal Break Job Reference" for="xref"}
- {forminput}
- <input type="text" name="xref" id="xref" value="{$xrefInfo.xref|escape}" />
- {formhelp note="Link to job that caused seal break."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Reference Key" for="xkey"}
- {forminput}
- <input type="text" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" />
- {formhelp note="ID Key use to access data in other systems identified by the xref type."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Reference Text" for="xkey_ext"}
- {forminput}
- <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" />
- {formhelp note="Variable text element such as url or email address."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- {formlabel label="Reference Notes" for="data"}
- {capture assign=textarea_help}
- {tr}Keep the text attached to reference items short and use comment records to add larger volumns of text. This should be reserved for simple notes such 'as use after 5PM' or the link.{/tr}
- {/capture}
- {textarea rows=5 noformat=1 id="edittext" nowysiwyg="yes" edit=$xrefInfo.data}
- {/legend}
- <div class="form-group submit">
- <input type="submit" name="fCancel" value="{tr}Cancel{/tr}" />&nbsp;
- <input type="submit" name="fSaveXref" value="{tr}Save{/tr}" />
- </div>
- {/form}
- </div><!-- end .body -->
-</div><!-- end .article -->
-{/strip}
diff --git a/templates/edit_xref_key_seal_fields.tpl b/templates/edit_xref_key_seal_fields.tpl
deleted file mode 100755
index 75f805d..0000000
--- a/templates/edit_xref_key_seal_fields.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{strip}
-<div class="form-group">
- {formlabel label="Key Seal Code" for="`$output`xkey"}
- {forminput}
- <input type="text" name="{$output}xkey" id="xkey" value="{$xrefInfo.xkey|escape}" />
- {formhelp note="Key Seal Code from key management system."}
- {/forminput}
- <div class="clear"></div>
-</div>
-
-<div class="form-group">
- {formlabel label="Contract Number" for="`$output`xkey_ext"}
- {forminput}
- <input type="text" name="{$output}xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" />
- {formhelp note="Contract number."}
- {/forminput}
- <div class="clear"></div>
-</div>
-{/strip}
diff --git a/templates/list.tpl b/templates/list.tpl
index 430ad80..fed9c8a 100755
--- a/templates/list.tpl
+++ b/templates/list.tpl
@@ -14,17 +14,11 @@
<table class="col-xs-12">
<caption>{tr}Available Content{/tr} <span class="total">[ {$listInfo.total_records} ]</span></caption>
<tr>
- <th class="width2p">{smartlink ititle="Contract" isort="xkey" ihash=$listInfo.ihash|default:''}</th>
<th>{smartlink ititle="Title" isort="title" idefault=1 iorder=desc ihash=$listInfo.ihash|default:''}</th>
<th>{smartlink ititle="Address" isort="street" ihash=$listInfo.ihash|default:''}</th>
</tr>
{section name=content loop=$listcontacts}
<tr class="first">
- <td class="alignright">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].xkey}
- </a>
- </td>
<td class="alignleft">
<a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
{$listcontacts[content].title}
diff --git a/templates/list1.tpl b/templates/list1.tpl
deleted file mode 100755
index b9d08c4..0000000
--- a/templates/list1.tpl
+++ /dev/null
@@ -1,76 +0,0 @@
-{strip}
-
-<div class="floaticon">{bithelp}</div>
-
-<div class="listing contacts">
- <div class="header">
- <h1>{tr}Contacts{/tr}</h1>
- </div>
-
- <div class="body">
-
- {include file="bitpackage:contact/display_list_header1.tpl"}
- <div class="table-responsive">
- <table class="col-xs-12">
- <caption>{tr}Available Content{/tr} <span class="total">[ {$listInfo.total_records} ]</span></caption>
- <tr>
- <th class="width2p">{booticon ipackage="icons" iname="icon-link" iexplain="sort by"}</th>
- <th>{smartlink ititle="Contract" isort="xkey" ihash=$listInfo.ihash}</th>
- {* {if $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
- <th>{smartlink ititle="Forename" isort="forename" ihash=$listInfo.ihash}</th>
- <th>{smartlink ititle="Surname" isort="surname" ihash=$listInfo.ihash}</th>
- {/if} *}
- <th>{smartlink ititle="Title" isort="title" idefault=1 iorder=desc ihash=$listInfo.ihash}</th>
- <th>{smartlink ititle="Address" isort="street" ihash=$listInfo.ihash}</th>
- </tr>
- {section name=content loop=$listcontacts}
- <tr class="first">
- <td class="alignright">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].xkey}
- </a>
- </td>
- <td class="alignleft">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].title}
- </a>
- </td>
- <td>{if isset($listcontacts[content].house) && ($listcontacts[content].house <> '') }
- {$listcontacts[content].house},&nbsp;{/if}
- {if isset($listcontacts[content].add1) && ($listcontacts[content].add1 <> '') }
- {$listcontacts[content].add1},&nbsp;{/if}
- {if isset($listcontacts[content].add2) && ($listcontacts[content].add2 <> '') }
- {$listcontacts[content].add2},&nbsp;{/if}
- {if isset($listcontacts[content].add3) && ($listcontacts[content].add3 <> '') }
- {$listcontacts[content].add3},&nbsp;{/if}
- {if isset($listcontacts[content].add4) && ($listcontacts[content].add4 <> '') }
- {$listcontacts[content].add4},&nbsp;{/if}
- {if isset($listcontacts[content].town) && ($listcontacts[content].town <> '') }
- {$listcontacts[content].town},&nbsp;{/if}
- {$listcontacts[content].postcode}</td>
- </tr>
- <tr class="second">
- <td>{$item.display_link}</td>
- <td>{assign var=content_type_guid value=$item.content_type_guid}{$gLibertySystem->getContentTypeName($content_type_guid)}</td>
- <td>
- {tr}Refs{/tr}: {$listcontacts[content].refs|default:0}&nbsp;&nbsp;
- {tr}Tasks{/tr}: {$listcontacts[content].tasks|default:0}&nbsp;&nbsp;
- {tr}Addresses{/tr}: {$listcontacts[content].addresses|default:0}
- </td>
- {if $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
- <td>{if isset($listcontacts[content].dob) && ($listcontacts[content].dob <> '') }DOB: {$listcontacts[content].dob}{/if}</td>
- <td>{if isset($listcontacts[content].nino) && ($listcontacts[content].nino <> '') }NI: {$listcontacts[content].nino}{/if}</td>
- {/if}
- </tr>
- {sectionelse}
- <tr class="norecords">
- <td colspan="8">{tr}No records found{/tr}</td>
- </tr>
- {/section}
- </table>
- </div>
- {pagination}
- </div><!-- end .body -->
-</div><!-- end .contacts -->
-
-{/strip}
diff --git a/templates/list_contracts.tpl b/templates/list_contracts.tpl
deleted file mode 100755
index 1bfc040..0000000
--- a/templates/list_contracts.tpl
+++ /dev/null
@@ -1,78 +0,0 @@
-{* $Header: /cvsroot/bitweaver/_bit_contact/templates/list_contact.tpl,v 1.3 2010/02/09 17:21:21 wjames5 Exp $ *}
-<div class="floaticon">
- {if $gBitUser->hasPermission('p_contact_admin')}
- <a title="{tr}configure listing{/tr}" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=contact">{biticon ipackage="icons" iname="document-properties" iexplain="configure"}</a>
- {/if}
- {bithelp}
-</div>
-
-<div class="admin contact">
-<div class="header">
-<h1><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?contract=2">{tr}Contract Records{/tr}</a></h1>
-</div>
-
-<div class="body">
-
-{*
-<table class="find">
-<tr><td>{tr}Find{/tr}</td>
- <td>
- <form method="get" action="{$gBitLoc.CONTACT_PKG_URL}list_contacts.php">
- <input type="text" name="find" value="{$listInfo.find|escape}" />
- <input type="submit" name="search" value="{tr}find{/tr}" />
- <input type="hidden" name="sort_mode" value="{$listInfo.sort_mode|escape}" />
- </form>
- </td>
-</tr>
-</table>
-*}
-
-<form id="checkform" method="post" action="{$smarty.server.PHP_SELF}">
-<input type="hidden" name="offset" value="{$listInfo.offset|escape}" />
-<input type="hidden" name="sort_mode" value="{$listInfo.sort_mode|escape}" />
-<table class="data">
-<tr>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'contract_desc'}contract_asc{else}contract_desc{/if}">{tr}Contract Number{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'content_id_desc'}content_id_asc{else}content_id_desc{/if}">{tr}Contact Id{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}">{tr}Title{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'town_desc'}town_asc{else}town_desc{/if}">{tr}Town{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'postcode_desc'}postcode_asc{else}postcode_desc{/if}">{tr}Postcode{/tr}</a></th>
-</tr>
-
-{cycle values="even,odd" print=false}
-{section name=changes loop=$list}
-<tr class="{cycle}">
-<td style="text-align:center;">{$list[changes].contract}</td>
-<td><a href="{$gBitLoc.CONTACT_PKG_URL}index.php?content_id={$list[changes].content_id|escape:"url"}" title="{$list[changes].content_id}">{$list[changes].content_id|truncate:20:"...":true}</a>
- {if $gBitUser->hasPermission('p_edit_contact')}
- <br />(<a href="{$gBitLoc.CONTACT_PKG_URL}edit.php?content_id={$list[changes].content_id|escape:"url"}">{tr}edit{/tr}</a>)
- {/if}
-</td>
-<td style="text-align:center;">{$list[changes].title}<br />
- {if isset($list[changes].house) && ($list[changes].house <> '') }
- {$list[changes].house},&nbsp;{/if}
- {if isset($list[changes].add1) && ($list[changes].add1 <> '') }
- {$list[changes].add1},&nbsp;{/if}
- {if isset($list[changes].add2) && ($list[changes].add2 <> '') }
- {$list[changes].add2},&nbsp;{/if}
- {if isset($list[changes].add3) && ($list[changes].add3 <> '') }
- {$list[changes].add3},&nbsp;{/if}
- {if isset($list[changes].add4) && ($list[changes].add4 <> '') }
- {$list[changes].add4},&nbsp;{/if}
-<td style="text-align:center;">{$list[changes].town}<br />
- {$list[changes].county}</td>
-<td style="text-align:center;">{$list[changes].postcode}</td>
-</tr>
-{sectionelse}
- <tr class="norecords"><td colspan="16">
- {tr}No records found{/tr}
- </td></tr>
-{/section}
-</table>
-</form>
-
-</div><!-- end .body -->
-
-{pagination}
-
-</div> {* end .admin *}
diff --git a/templates/view_xref_key_seal.tpl b/templates/view_xref_key_seal.tpl
deleted file mode 100755
index 883e758..0000000
--- a/templates/view_xref_key_seal.tpl
+++ /dev/null
@@ -1,75 +0,0 @@
-{strip}
-<div class="view contact_xref">
- <div class="header">
- <h1>{$xrefInfo.template_title|escape}: {$xref_title|escape} for {$title|escape}</h1>
- </div>
-
- <div class="body">
- {legend legend="Contents"}
- <div class="form-group">
- {formlabel label="`$xrefInfo.template_title`" for="xkey"}
- {forminput}
- {if $xrefInfo.xkey }
- {$xrefInfo.xkey|escape}
- {else}
- Not yet set
- {/if}
- {formhelp note="Key Seal Code from key management system."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Contract Number" for="xkey_ext"}
- {forminput}
- {if $xrefInfo.xkey_ext }
- {$xrefInfo.xkey_ext|escape}
- {else}
- Not yet set
- {/if}
- {formhelp note="Contract number."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="`$xrefInfo.template_title` Notes" for="data"}
- {forminput}
- {$xrefInfo.data|escape}
- {formhelp note="Keep the text attached to reference items short and use comment records to add larger volumns of text. This should be reserved for simple notes such 'as use after 5PM' or the link."}
- {/forminput}
- <div class="clear"></div>
- </div>
- {/legend}
-
- {legend legend="Start and Stop Dates"}
- <div class="form-group">
- {formlabel label="Start Date" for=""}
- {forminput}
- {if $xrefInfo.ignore_start_date eq "y"}
- No start date set
- {else}
- {$xrefInfo.start_date|bit_long_datetime}
- {/if}
- {formhelp note="This key seal code becomes valid on this date."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="End Date" for=""}
- {forminput}
- {if $xrefInfo.ignore_end_date eq "y"}
- No end date set
- {else}
- {$xrefInfo.end_date|bit_long_datetime}
- {/if}
- {formhelp note="This key seal code finishes on this date."}
- {/forminput}
- <div class="clear"></div>
- </div>
- {/legend}
- <a class="item" href="{$smarty.const.CONTACT_PKG_URL}index.php?content_id={$xrefInfo.content_id}">{tr}Return{/tr}</a>
- </div><!-- end .body -->
-</div><!-- end .article -->
-{/strip}