Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_modules / PostContact [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
06 Aug 2002 20:18:29postnuke_modules/PostContactindex.php,1.2,1.3 pninit.php,1.2,1.3 pntables.php,1.2,1.3Richard Cave
 ADODB conversion.

Update of /home/cvsroot/postnuke_modules/PostContact
In directory ns7.hostnuke.net:/tmp/cvs-serv18000/PostContact

Modified Files:
	index.php pninit.php pntables.php 
Log Message:
ADODB conversion.


Index: index.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/PostContact/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php	23 Jul 2002 11:51:04 -0000	1.2
--- index.php	6 Aug 2002 20:18:27 -0000	1.3
***************
*** 1,4 ****
--- 1,28 ----
  <?
  // $Id$ $Name$
+ // ----------------------------------------------------------------------
+ // POST-NUKE Content Management System
+ // Copyright (C) 2002 by the PostNuke Development Team.
+ // http://www.postnuke.com/
+ // ----------------------------------------------------------------------
+ // LICENSE
+ //
+ // This program is free software; you can redistribute it and/or
+ // modify it under the terms of the GNU General Public License (GPL)
+ // as published by the Free Software Foundation; either version 2
+ // of the License, or (at your option) any later version.
+ //
+ // This program is distributed in the hope that it will be useful,
+ // but WIthOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ // GNU General Public License for more details.
+ //
+ // To read the license please visit http://www.gnu.org/copyleft/gpl.html
+ // ----------------------------------------------------------------------
+ // Original Author of file: Bjarne Var�ystrand and Bjarne Var�ystrand
+ // Modifications by: Richard Cave
+ // Purpose of file:  Display contact information
+ // ----------------------------------------------------------------------
+ 
  
  if (!defined("LOADED_AS_MODULE")) {
***************
*** 16,318 ****
  
  function theindex($mode=''){
! global $ModName,$sitename;
! 	list($dbconn) = pnDBGetConn();
! 	$pntable	= PostContact_pntables();
! 	$prefix		= pnConfigGetVar('prefix');
! 	$sitename	= pnConfigGetVar('sitename');
  
! 	$table		= $pntable['persons_table'];
! 	$column		= &$pntable['person'];
  
  
! 	$query 					= "SELECT * FROM ".$table." WHERE (".$column['hide']."='1') and (".$column['lang']."='$currentlang' or ".$column['lang']."='all') ORDER BY ".$column['firstname']."";
! 	$membersInDepartment 	= @mysql_query($query);
! 	if(mysql_error()){
! 		$error_report .= "<br><li>".mysql_error()."</li>";
! 	}else{
! 		$persons_exists 		= mysql_numrows($membersInDepartment);
! 	}
! 	$table	= $pntable['company_table'];
! 	$column	= &$pntable['company'];
  
! 	$currentlang = pnUserGetLang();
! 	$result 			= @mysql_query("SELECT * FROM ".$table." WHERE ".$column['hide']."='0' order by ".$column['name']."");
! 	if(mysql_error()){
! 		$error_report .= "<br><li>".mysql_error()."</li>";
! 	}else{
! 		$company_exists 	= mysql_numrows($result);
! 		for ($i = 0 ;$i < $company_exists; $i++){
! 			$companyName				= mysql_result($result, $i, $column['name']);
! 			$companyAddress				= mysql_result($result, $i, $column['address']);
! 			$companyCity				= mysql_result($result, $i, $column['city']);
! 			$companyZip					= mysql_result($result, $i, $column['zip']);
! 			$companyCountry				= mysql_result($result, $i, $column['country']);
! 			$companyPhone				= mysql_result($result, $i, $column['phone']);
! 			$companyFax					= mysql_result($result, $i, $column['fax']);
! 			$companyMail				= mysql_result($result, $i, $column['mail']);
! 			$companyLogo				= mysql_result($result, $i, $column['logo']);
! 			$companyState				= mysql_result($result, $i, $column['state']);
! 			$companyDefaultCountry		= mysql_result($result, $i, $column['defaultcountry']);
! 		}
! 	}
! 	
! if($currentlang == ""){
! 	$currentlang = $companyDefaultCountry;
! }
  
! if(is_file($companyLogo)){
! 	$companyLogo = "<p><img src=\"".$companyLogo."\"></p>";
! }else{
! 	$companyLogo = "";
! }
  
! $city	= getCity($prefix,$companyCity);
! $lang 	= "_COUNTRY_".strtoupper($companyCountry);
! $all 	= get_defined_constants();
! $companyCountry = $all[$lang];
! 	if($mode == ""){
! 		$table	= $pntable['departments_table'];
! 		$column	= &$pntable['departments'];
! 		$result = mysql_query("SELECT * FROM ".$table." WHERE (".$column['hide']."='0') and (".$column['cid']."='$currentlang' or ".$column['cid']."='all') order by ".$column['name']."");
! 		if(mysql_error()){
! 			$error_report .= "<br><li>".mysql_error()."</li>";
! 		}else{
! 			$departments_exists = mysql_numrows($result);
! 			if(!$departments_exists){
! 				$mode = 1;
! 				$NoInfoExtraText = "<p><font class=\"pn-normal\">"._CIYOUAREALWAYSWELCOME."</font></p>";
! 			}
! 		}
! 	}	
! 	if($mode == ""){
! 		// PAGE ONE FOR COMPANY CONTACT INFORMATION
! 		if($departments_exists){
! 		echo mysql_error();
! 		if($departments_exists > 0){
! 			echo "<link rel=\"StyleSheet\" href=\"modules/$ModName/css/style.css\" type=\"text/css\"><p><b><font class=\"pn-title\">"._CICONTACT." ".$companyName."</font></b></p>".$companyLogo;
! 			echo "<p><font class=\"pn-normal\">"._CIYOUAREALWAYSWELCOME."</font></p>";
! 			echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">";
! 			for ($i = 0 ;$i < $departments_exists; $i++){
! 				$departmentID				= mysql_result($result, $i, $column['id']);
! 				$departmentEmail			= mysql_result($result, $i, $column['email']);
! 				$departmentName				= mysql_result($result, $i, $column['name']);
! 				$departmentPhone			= mysql_result($result, $i, $column['phone']);
! 				$departmentCountry			= mysql_result($result, $i, $column['country']);
! 				$departmentFax				= mysql_result($result, $i, $column['fax']);
! 				if(!$departmentFax){
! 					$departmentFax = $companyFax;
! 				}
! 				if(!$departmentPhone){
! 					$departmentPhone = $companyPhone;
! 				}
! 				if(!$departmentEmail){
! 					$departmentEmail = $companyMail;
! 				}
! 				$lang = "_COUNTRY_".strtoupper($departmentCountry);
! 				$all = get_defined_constants();
! 				$departmentCountry = $all[$lang];
  
! 				echo "
! 				<tr>
! 				<td width=\"10\" align=\"center\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\">"._CIBULLET."</font></td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\"><b>".$departmentName."</b></font></td>
! 				<td width=\"15\"><a href=\"javascript:ShowForm('','$departmentID','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" border=\"0\" /></a></td>
! 				</tr><tr>
! 				<td width=\"10\" align=\"center\">&nbsp;</td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIMAIL.":</b> ".$departmentEmail."</font></td>
! 				<td width=\"15\">&nbsp;</td>
! 				</tr><tr>
! 				<td width=\"10\" align=\"center\">&nbsp;</td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIPHONE.":</b> ".$departmentPhone."<br />&nbsp;</font></td>
! 				<td width=\"15\">&nbsp;</td>
! 				</tr>
! 				";
! 			}
! 			echo "</table>";
! 		}
! 			if(($company_exists) or ($persons_exists)){
! 				echo "<p><font class=\"pn-normal\">"._CIDOYOUNEEDFURTHERINFO1." ".$companyName.", "._CIDOYOUNEEDFURTHERINFO2." <a href=\"".$PHP_SELF."?op=modload&name=".$ModName."&file=".$GLOBALS['file']."&mode=2\">"._CIDOYOUNEEDFURTHERINFO3."</a>.</font></p>";
! 			}
! 		}else{
! 			if($company_exists){
! 				echo "<p><font class=\"pn-normal\">"._CIDOYOUNEEDFURTHERINFO1." ".$companyName.", "._CIDOYOUNEEDFURTHERINFO2." <a href=\"".$PHP_SELF."?op=modload&name=".$ModName."&file=".$GLOBALS['file']."&mode=2\">"._CIDOYOUNEEDFURTHERINFO3."</a>.</font></p>";
! 			}else{
! 				echo "<p><font class=\"pn-normal\">"._CINOCOMPANY_EXISTS_."</font></p>";
! 			}
! 		}
! 	}else{
! 	
  
  
  
! 		// PAGE TWO FOR COMPANY CONTACT INFORMATION IF THE COMPANY POST IS ACTIVE THEN DISPLAY THE INFORMATION
! 		if($company_exists){
! 			echo "<link rel=\"StyleSheet\" href=\"modules/$ModName/css/style.css\" type=\"text/css\">";
! 		
! 			echo "<p><b><font class=\"pn-title\">"._CICONTACTINFOFOR." ".$sitename."</font></b></p>";
  
! 		// if($companyName){
! 		// 	echo "<p><b><font class=\"pn-title\">"._CICONTACTINFOFOR." ".$companyName."</font></b></p>";
! 		// }
! 		echo "<table><tr><td>$companyLogo</td><td>&nbsp;&nbsp;&nbsp;</td><td><table  border=\"0\"  cellspacing=\"0\" cellpadding=\"1\">";
! 		if($companyName){
! 			echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\"><b>".$companyName."</b></font></td></tr>";
! 		}
! 		if($companyAddress or $companyZip or $city['name'] or $companyState){
! 			echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyAddress;
! 			if($companyAddress && $companyZip){
! 				echo ", ";
! 			}
! 			echo $companyZip;
! 			if(($companyZip && $city['name']) or ($companyAddress && $city['name'])){
! 				echo " ";
! 			}
! 			echo $city['name'];
! 			
! 			if($companyAddress or $companyZip or $city['name']){
! 				echo ", ";
! 			}
! 			echo $companyState;
! 			echo "</font></td></tr>";
! 		}
! 		if($companyCountry){
! 			echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyCountry."</font></td></tr>";
! 		}
! 		if($companyPhone || $companyFax || $companyMail){
! 			echo "<tr><td colspan=\"4\" nowrap=\"nowrap\"><img src=\"modules/$ModName/images/dots.gif\" width=\"207\" height=\"1\" border=\"0\" /></td></tr>";
  
! 			if($companyPhone){
! 				echo "
! 				<tr>
! 				<td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">"._CIPHONE.":&nbsp;</b></font></td>
! 				<td colspan=\"2\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyPhone."</font></td>
! 				</tr>
! 				";
! 			}
! 			if($companyFax){
! 				echo "
! 				<tr>
! 				<td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIFAX.":&nbsp;</b></font></td>
! 				<td colspan=\"2\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyFax."</font></td>
! 				</tr>
! 				";
! 			}
! 			if($companyMail){
! 				echo "
! 				<tr>
! 				<td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">"._CIEMAIL.":&nbsp;</b></font></td>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyMail."</font></td>
! 				<td nowrap=\"nowrap\"><a href=\"javascript:ShowForm('','','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" align=\"absmiddle\" border=\"0\" /></a></td>
! 				</tr>
! 				";
! 			}
! 		}
! 			echo "</table></td></tr></table>";
! 			if($companyPhone || $companyFax || $companyMail || $companyAddress || $companyZip || $companyCountry || $city['name'] || $companyName){
! 				echo "<hr />";
! 			}
! 		}
! 		
! 		echo $NoInfoExtraText;
! 			
!                 // query from both persons and attributes tables
! 		$table		= $pntable['persons_table'];
! 		$column		= &$pntable['person'];
! 		$table2         = $pntable['attributes_table'];
! 		$column2        = &$pntable['attribute'];
!                 $contactType    = "P";
  
! 		$query = "SELECT * FROM ".$table.", ".$table2.
!                          " WHERE (".$column['hide']."='1')" .
!                          " AND (".$column['lang']."='".$currentlang."' or ".$column['lang']."='all')" .
!                          " AND ".$column['id']."=".$column2['id'].
!                          " AND ".$column2['contacttype']."='".$contactType."'" .
!                          " ORDER BY ".$column['firstname']."";
  
! 		$membersInDepartment = @mysql_query($query);
  
! 		if(mysql_error()){
! 			$error_report .= "<br><li>".mysql_error()."</li>";
!         		echo "<p>".$query."</p>";
! 		}else{
! 			$members = mysql_numrows($membersInDepartment);
! 		}
  
! 		if($members > 0){
! 			echo "<p><font class=\"pn-normal\">"._CIIFYOUKNOWWHOTOCONTACT."</font></p><table  border=\"0\"  cellspacing=\"0\" cellpadding=\"1\">";
! 			for ($x = 0 ;$x < $members; $x++){
! 				$personID					= mysql_result($membersInDepartment, $x, $column['id']);
! 				$personFirstName			= mysql_result($membersInDepartment, $x, $column['firstname']);
! 				$personLastName				= mysql_result($membersInDepartment, $x, $column['lastname']);
! 				$personMail					= mysql_result($membersInDepartment, $x, $column['mail']);
! 				$personMobile				= mysql_result($membersInDepartment, $x, $column['mobile']);
! 				$personPhone				= mysql_result($membersInDepartment, $x, $column['phone']);
! 				$personAddress				= mysql_result($membersInDepartment, $x, $column['address']);
! 				$personCountry				= mysql_result($membersInDepartment, $x, $column['country']);
! 				$personCounpersonFaxtry		= mysql_result($membersInDepartment, $x, $column['fax']);
! 				$personTitleID				= mysql_result($membersInDepartment, $x, $column['titleID']);
! 				$attributeShowName			= mysql_result($membersInDepartment, $x, $column2['showname']);
! 				$attributeShowAddress		= mysql_result($membersInDepartment, $x, $column2['showaddress']);
! 				$attributeShowAddress2		= mysql_result($membersInDepartment, $x, $column2['showaddress2']);
! 				$attributeShowZip			= mysql_result($membersInDepartment, $x, $column2['showzip']);
! 				$attributeShowCity			= mysql_result($membersInDepartment, $x, $column2['showcity']);
! 				$attributeShowCountry		= mysql_result($membersInDepartment, $x, $column2['showcountry']);
! 				$attributeShowPhone			= mysql_result($membersInDepartment, $x, $column2['showphone']);
! 				$attributeShowFax			= mysql_result($membersInDepartment, $x, $column2['showfax']);
! 				$attributeShowMobile		= mysql_result($membersInDepartment, $x, $column2['showmobile']);
! 				$attributeShowPager			= mysql_result($membersInDepartment, $x, $column2['showpager']);
! 				$attributeShowEmail			= mysql_result($membersInDepartment, $x, $column2['showemail']);
! 				$attributeShowICQ			= mysql_result($membersInDepartment, $x, $column2['showICQ']);
! 				$attributeShowAIM			= mysql_result($membersInDepartment, $x, $column2['showAIM']);
! 				$attributeShowYIM			= mysql_result($membersInDepartment, $x, $column2['showYIM']);
! 				$attributeShowMSNM			= mysql_result($membersInDepartment, $x, $column2['showMSNM']);
! 				$attributeShowTitle			= mysql_result($membersInDepartment, $x, $column2['showtitle']);
! 				$attributeShowState			= mysql_result($membersInDepartment, $x, $column2['showState']);
! 				$attributeShowDepartment	= mysql_result($membersInDepartment, $x, $column2['showdepartment']);
  
! 				if(($attributeShowEmail == "0") or (strlen($personMail) < 3)){
! 					$personMail = $companyMail;
! 				}
! 				
! 				$personTitle = getTitle($prefix,$personTitleID);
! 				
! 				if(!$attributeShowTitle){
! 					$personTitle = "";
! 				}
! 				
! 				echo "
! 				<tr>
! 				<td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$personFirstName." ".$personLastName."</font></td>
! 				<td class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">".$personTitle['name']."</b></font></td>
! 				<td align=\"center\" valign=\"middle\"><a href=\"javascript:ShowUser('".$personID."','','');\"><img src=\"modules/$ModName/images/questionmark.gif\" width=\"14\" height=\"14\" align=\"absmiddle\" border=\"0\" /></a></td>
! 				<td align=\"center\" valign=\"middle\">";
! 				if(checkMailInfo($personID) == TRUE){
! 					echo "<a href=\"javascript:ShowForm('".$personID."','','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" border=\"0\" /></a>";
! 				}
  
! 				echo "</td></tr>";
! 				
! 				if($personMail){
! 					echo "<tr>
! 					<td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIEMAIL.":&nbsp;</b>".$personMail."</font></td>
! 					</tr>";
! 				}
  
! 				echo "
! 				<tr>
! 				<td colspan=\"4\"><hr /></td>
! 				</tr>";
! 			}
! 			echo "</table>";
! 		}
! 	}
! 	if($error_report){
! 		openTable();
! 		echo $error_report;
! 		closeTable();
! 	}
  }
  theindex($GLOBALS['mode']);
--- 40,396 ----
  
  function theindex($mode=''){
!     global $ModName,$sitename;
!     list($dbconn)  = pnDBGetConn();
!     $pntable       = PostContact_pntables();
!     $prefix        = pnConfigGetVar('prefix');
!     $sitename      = pnConfigGetVar('sitename');
  
!     $table         = $pntable['persons_table'];
!     $column        = &$pntable['person'];
  
  
!     $query = "SELECT  ".$column['id'].
!         " FROM ".$table." WHERE (".$column['hide']."='1') and (".$column['lang']."='$currentlang' or ".$column['lang']."='all') ORDER BY ".$column['firstname']."";
!     $result = $dbconn->Execute( $query );
!     if ( $result == false ) {
!         PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" );
!     }
!     if( $result->EOF ) {
!         $persons_exists = false; 
!     } else {
!         $persons_exists = true;
!     }
!     
!     $table    = $pntable['company_table'];
!     $column    = &$pntable['company'];
  
!     $currentlang = pnUserGetLang();
!     $query = "SELECT ".$column['name'].
!         ", ".$column['address'].", ".$column['address2'].
!         ", ".$column['city'].", ".$column['state'].
!         ", ".$column['zip'].", ".$column['country'].
!         ", ".$column['phone'].
!         ", ".$column['fax'].", ".$column['mail'].
!         ", ".$column['logo'].", ".$column['defaultcountry'].
!         " FROM ".$table." WHERE ".$column['hide']."='0' order by ".$column['name']."";
!     $result = $dbconn->Execute( $query );
!     if ( $result == false ) {
!         PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" );
!     }
!     if( $result->EOF ) {
!         $company_exists = false; 
!     } else {
!         $company_exists = true; 
!         for (; !$result->EOF; $result->MoveNext() ) {
!             $companyName            = $result->fields[0];  
!             $companyAddress         = $result->fields[1];  
!             $companyAddress2        = $result->fields[2];  
!             $companyCity            = $result->fields[3];  
!             $companyState           = $result->fields[4];  
!             $companyZip             = $result->fields[5];  
!             $companyCountry         = $result->fields[6];  
!             $companyPhone           = $result->fields[7];  
!             $companyFax             = $result->fields[8];  
!             $companyMail            = $result->fields[9];  
!             $companyLogo            = $result->fields[10];  
!             $companyDefaultCountry  = $result->fields[11];  
!        }
!     }
!     
!     if($currentlang == ""){
!         $currentlang = $companyDefaultCountry;
!     }
  
!     if(is_file($companyLogo)){
!         $companyLogo = "<p><img src=\"".$companyLogo."\"></p>";
!     }else{
!         $companyLogo = "";
!     }
  
!     $city    = getCity($prefix,$companyCity);
!     $lang     = "_COUNTRY_".strtoupper($companyCountry);
!     $all     = get_defined_constants();
!     $companyCountry = $all[$lang];
  
!     if($mode == ""){
!         $table    = $pntable['departments_table'];
!         $column    = &$pntable['departments'];
!         $query = "SELECT ".$column['id'].", ".$column['email'].
!             ", ".$column['name'].", ".$column['phone'].
!             ", ".$column['country'].", ".$column['fax'].
!             " FROM ".$table." WHERE (".$column['hide']."='0') and (".$column['cid']."='$currentlang' or ".$column['cid']."='all')".
!             " order by ".$column['name']."";
!         $result = $dbconn->Execute( $query );
!         if ( $result == false ) {
!             PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" );
!         }
!         if( !$result->EOF ) {
!             $departments_exists = true;
!         } else {
!             $departments_exists = false;
!             $mode = 1;
!             $NoInfoExtraText = "<p><font class=\"pn-normal\">"._CIYOUAREALWAYSWELCOME."</font></p>";
!         }
!     } // if($mode == "")
  
+     if($mode == ""){
+         // PAGE ONE FOR COMPANY CONTACT INFORMATION
+         if($departments_exists){
+             echo "<link rel=\"StyleSheet\" href=\"modules/$ModName/css/style.css\" type=\"text/css\"><p><b><font class=\"pn-title\">"._CICONTACT." ".$companyName."</font></b></p>".$companyLogo;
+             echo "<p><font class=\"pn-normal\">"._CIYOUAREALWAYSWELCOME."</font></p>";
+             echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">";
+             for (; !$result->EOF; $result->MoveNext() ) {
+                 $departmentID          = $result->fields[0];  
+                 $departmentEmail       = $result->fields[1];  
+                 $departmentName        = $result->fields[2];  
+                 $departmentPhone       = $result->fields[3];  
+                 $departmentCountry     = $result->fields[4];  
+                 $departmentFax         = $result->fields[5];  
  
+                 if(!$departmentFax){
+                     $departmentFax = $companyFax;
+                 }
+                 if(!$departmentPhone){
+                     $departmentPhone = $companyPhone;
+                 }
+                 if(!$departmentEmail){
+                     $departmentEmail = $companyMail;
+                 }
+                 $lang = "_COUNTRY_".strtoupper($departmentCountry);
+                 $all = get_defined_constants();
+                 $departmentCountry = $all[$lang];
  
!                 echo "
!                 <tr>
!                 <td width=\"10\" align=\"center\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\">"._CIBULLET."</font></td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\"><b>".$departmentName."</b></font></td>
!                 <td width=\"15\"><a href=\"javascript:ShowForm('','$departmentID','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" border=\"0\" /></a></td>
!                 </tr><tr>
!                 <td width=\"10\" align=\"center\">&nbsp;</td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIMAIL.":</b> ".$departmentEmail."</font></td>
!                 <td width=\"15\">&nbsp;</td>
!                 </tr><tr>
!                 <td width=\"10\" align=\"center\">&nbsp;</td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIPHONE.":</b> ".$departmentPhone."<br />&nbsp;</font></td>
!                 <td width=\"15\">&nbsp;</td>
!                 </tr>
!                 ";
!             }
!             echo "</table>";
!         }
  
!         if(($company_exists) or ($persons_exists)){
!             echo "<p><font class=\"pn-normal\">"._CIDOYOUNEEDFURTHERINFO1." ".$companyName.", "._CIDOYOUNEEDFURTHERINFO2." <a href=\"".$PHP_SELF."?op=modload&name=".$ModName."&file=".$GLOBALS['file']."&mode=2\">"._CIDOYOUNEEDFURTHERINFO3."</a>.</font></p>";
!         }else if($company_exists){
!                 echo "<p><font class=\"pn-normal\">"._CIDOYOUNEEDFURTHERINFO1." ".$companyName.", "._CIDOYOUNEEDFURTHERINFO2." <a href=\"".$PHP_SELF."?op=modload&name=".$ModName."&file=".$GLOBALS['file']."&mode=2\">"._CIDOYOUNEEDFURTHERINFO3."</a>.</font></p>";
!         }else{
!                 echo "<p><font class=\"pn-normal\">"._CINOCOMPANY_EXISTS_."</font></p>";
!         }
  
!     }else{
  
!         // PAGE TWO FOR COMPANY CONTACT INFORMATION IF THE COMPANY POST IS ACTIVE THEN DISPLAY THE INFORMATION
!         if($company_exists){
!             echo "<link rel=\"StyleSheet\" href=\"modules/$ModName/css/style.css\" type=\"text/css\">";
!         
!             echo "<p><b><font class=\"pn-title\">"._CICONTACTINFOFOR." ".$sitename."</font></b></p>";
  
!         // if($companyName){
!         //     echo "<p><b><font class=\"pn-title\">"._CICONTACTINFOFOR." ".$companyName."</font></b></p>";
!         // }
!         echo "<table><tr><td>$companyLogo</td><td>&nbsp;&nbsp;&nbsp;</td><td><table  border=\"0\"  cellspacing=\"0\" cellpadding=\"1\">";
!         if($companyName){
!             echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoHeader\"><font class=\"ContactInfoHeader\"><b>".$companyName."</b></font></td></tr>";
!         }
!         if($companyAddress or $companyState or $companyZip or $city['name']){
!             echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyAddress;
!             if($companyAddress && $city['name']){
!                 echo ", ";
!             }
!             echo $city['name'];
!             if($city['name'] && $companyState){
!                 echo ", ";
!             }
!             echo $companyState;
!             //if(($companyState && $companyZip) or ($companyAddress && $companyZip)){
!                 echo " ";
!             //}
!             echo $companyZip."</font></td></tr>";
!         }
!         if($companyCountry){
!             echo "<tr><td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyCountry."</font></td></tr>";
!         }
!         if($companyPhone || $companyFax || $companyMail){
!             echo "<tr><td colspan=\"4\" nowrap=\"nowrap\"><img src=\"modules/$ModName/images/dots.gif\" width=\"207\" height=\"1\" border=\"0\" /></td></tr>";
  
!             if($companyPhone){
!                 echo "
!                 <tr>
!                 <td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">"._CIPHONE.":&nbsp;</b></font></td>
!                 <td colspan=\"2\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyPhone."</font></td>
!                 </tr>
!                 ";
!             }
!             if($companyFax){
!                 echo "
!                 <tr>
!                 <td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIFAX.":&nbsp;</b></font></td>
!                 <td colspan=\"2\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyFax."</font></td>
!                 </tr>
!                 ";
!             }
!             if($companyMail){
!                 echo "
!                 <tr>
!                 <td width=\"30\" nowrap=\"nowrap\">&nbsp;</td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">"._CIEMAIL.":&nbsp;</b></font></td>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\">".$companyMail."</font></td>
!                 <td nowrap=\"nowrap\"><a href=\"javascript:ShowForm('','','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" align=\"absmiddle\" border=\"0\" /></a></td>
!                 </tr>
!                 ";
!             }
!         }
!         echo "</table></td></tr></table>";
!         if($companyPhone || $companyFax || $companyMail || $companyAddress || $companyZip || $companyCountry || $city['name'] || $companyName){
!             echo "<hr />";
!         }
!     }
!         
!         echo $NoInfoExtraText;
!             
!         // query from both persons and attributes tables
!         $table        = $pntable['persons_table'];
!         $column        = &$pntable['person'];
!         $table2        = $pntable['attributes_table'];
!         $column2    = &$pntable['attribute'];
!         $contactType    = "P";
  
!     $query = "SELECT ".$column['id'].    ", ".$column['mail'].
!         ", ".$column['firstname'].    ", ".$column['lastname'].
!         ", ".$column['mobile'].        ", ".$column['phone'].
!         ", ".$column['address'].    ", ".$column['address2'].
!         ", ".$column['city'].        ", ".$column['state'].
!         ", ".$column['zip'].        ", ".$column['country'].
!         ", ".$column['lang'].
!         ", ".$column['fax'].        ", ".$column['hide'].
!         ", ".$column['image'].        ", ".$column['pager'].
!         ", ".$column['ICQ'].        ", ".$column['AIM'].
!         ", ".$column['YIM'].        ", ".$column['MSNM'].
!         ", ".$column['typephone'].    ", ".$column['typefax'].
!         ", ".$column['typepager'].    ", ".$column['typemobile'].
!         ", ".$column['titleID'].
!         ", ".$column2['showname'].
!         ", ".$column2['showaddress'].    ", ".$column2['showaddress2'].
!         ", ".$column2['showcity'].    ", ".$column2['showstate'].
!         ", ".$column2['showzip'].    ", ".$column2['showcountry']. 
!         ", ".$column2['showphone'].    ", ".$column2['showfax'].
!         ", ".$column2['showmobile'].    ", ".$column2['showpager'].
!         ", ".$column2['showemail'].    ", ".$column2['showICQ'].
!         ", ".$column2['showAIM'].    ", ".$column2['showYIM'].
!         ", ".$column2['showMSNM'].    ", ".$column2['showtitle'].
!         ", ".$column2['showdepartment'].", ".$column2['showimage'].
!         " FROM ".$table.", ".$table2.
!         " WHERE (".$column['hide']."='1')" .
!         " AND (".$column['lang']."='".$currentlang."' or ".$column['lang']."='all')" .
!         " AND ".$column['id']."=".$column2['id'].
!         " AND ".$column2['contacttype']."='".$contactType."'" .
!         " ORDER BY ".$column['firstname'];
  
!         $result = $dbconn->Execute( $query );
!         if ( $result == false ) {
!             PN_DBMsgError( $dbconn, __FILE__, __LINE__, "Error accessing the database" );
!         }
!         if( !$result->EOF ) {
!             echo "<p><font class=\"pn-normal\">"._CIIFYOUKNOWWHOTOCONTACT."</font></p><table  border=\"0\"  cellspacing=\"0\" cellpadding=\"1\">";
!             for (; !$result->EOF; $result->MoveNext() ) {
!                 $personID                   = $result->fields[0];  
!                 $personMail                 = $result->fields[1];  
!                 $personFirstName            = $result->fields[2];  
!                 $personLastName             = $result->fields[3];  
!                 $personMobile               = $result->fields[4];  
!                 $personPhone                = $result->fields[5];  
!                 $personAddress              = $result->fields[6];  
!                 $personAddress2             = $result->fields[7];  
!                 $personCity                 = $result->fields[8];  
!                 $personState                = $result->fields[9];  
!                 $personZip                  = $result->fields[10];  
!                 $personCountry              = $result->fields[11];  
!                 $personLang                 = $result->fields[12];  
!                 $personFax                  = $result->fields[13];  
!                 $personHide                 = $result->fields[14];
!                 $personImage                = $result->fields[15];  
!                 $personPager                = $result->fields[16];  
!                 $personICQ                  = $result->fields[17];  
!                 $personAIM                  = $result->fields[18];  
!                 $personYIM                  = $result->fields[19];  
!                 $personMSNM                 = $result->fields[20];  
!                 $personTypePhone            = $result->fields[21];  
!                 $personTypeFax              = $result->fields[22];  
!                 $personTypePager            = $result->fields[23];  
!                 $personTypeMobile           = $result->fields[24];  
!                 $personTitleID              = $result->fields[25];  
!                 $attributeShowName          = $result->fields[26];  
!                 $attributeShowAddress       = $result->fields[27];  
!                 $attributeShowAddress2      = $result->fields[28];  
!                 $attributeShowCity          = $result->fields[29];  
!                 $attributeShowState         = $result->fields[30];  
!                 $attributeShowZip           = $result->fields[31];  
!                 $attributeShowCountry       = $result->fields[32];  
!                 $attributeShowPhone         = $result->fields[33];  
!                 $attributeShowFax           = $result->fields[34];  
!                 $attributeShowMobile        = $result->fields[35];  
!                 $attributeShowPager         = $result->fields[36];  
!                 $attributeShowEmail         = $result->fields[37];  
!                 $attributeShowICQ           = $result->fields[38];  
!                 $attributeShowAIM           = $result->fields[39];  
!                 $attributeShowYIM           = $result->fields[40];  
!                 $attributeShowMSNM          = $result->fields[41];  
!                 $attributeShowTitle         = $result->fields[42];  
!                 $attributeShowDepartment    = $result->fields[43];  
!                 $attributeShowImage         = $result->fields[44];  
  
!                 if(($attributeShowEmail == "0") or (strlen($personMail) < 3)){
!                     $personMail = $companyMail;
!                 }
!                 
!                 $personTitle = getTitle($prefix,$personTitleID);
!                 
!                 if(!$attributeShowTitle){
!                     $personTitle = "";
!                 }
!                 
!                 echo "
!                 <tr>
!                 <td nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><a href=\"javascript:ShowUser('".$personID."','','');\">".$personFirstName." ".$personLastName."</a></font></td>
!                 <td class=\"ContactInfoText\"><b><font class=\"ContactInfoText\">".$personTitle['name']."</b></font></td>
!                 <td align=\"center\" valign=\"middle\"><a href=\"javascript:ShowUser('".$personID."','','');\"><img src=\"modules/$ModName/images/questionmark.gif\" width=\"14\" height=\"14\" align=\"absmiddle\" border=\"0\" /></a></td>
!                 <td align=\"center\" valign=\"middle\">";
!                 if(checkMailInfo($personID) == TRUE){
!                     echo "<a href=\"javascript:ShowForm('".$personID."','','');\"><img src=\"modules/$ModName/images/friend.gif\" width=\"15\" height=\"11\" border=\"0\" /></a>";
!             } // for (; !$result->EOF; $result->MoveNext() )
  
!                 echo "</td></tr>";
!                 
!                 if($personMail){
!                     echo "<tr>
!                     <td colspan=\"4\" nowrap=\"nowrap\" class=\"ContactInfoText\"><font class=\"ContactInfoText\"><b>"._CIEMAIL.":&nbsp;</b>".$personMail."</font></td>
!                     </tr>";
!                 }
! 
!                 echo "
!                 <tr>
!                 <td colspan=\"4\"><hr /></td>
!                 </tr>";
!             }
!             echo "</table>";
!         }
!     }
!     if($error_report){
!         openTable();
!         echo $error_report;
!         closeTable();
!     }
  }
  theindex($GLOBALS['mode']);

Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/PostContact/pninit.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pninit.php	23 Jul 2002 11:49:56 -0000	1.2
--- pninit.php	6 Aug 2002 20:18:27 -0000	1.3
***************
*** 1,326 ****
  <?
  // $Id$ $Name$
  if(basename($PHP_SELF) == basename(__FILE__)){
! echo "You have no access to this file!!!";
! exit;
  }
  
  function PostContact_init(){
!    list($dbconn)	= pnDBGetConn();
!     $pntable		= pnDBGetTables();
[...1255 lines suppressed...]
!         pnSessionSetVar('errormsg', _DROPTABLEFAILED);
!         return false;
!     }
      $sql = "DROP TABLE IF EXISTS ".$pntable['countrymembers_table'];
!     $result = $dbconn->Execute( $sql );
!     if ($result == false) {
!         pnSessionSetVar('errormsg', _DROPTABLEFAILED);
!         return false;
!     }
      $sql = "DROP TABLE IF EXISTS ".$pntable['company_table'];
!     $result = $dbconn->Execute( $sql );
!     if ($result == false) {
!         pnSessionSetVar('errormsg', _DROPTABLEFAILED);
!         return false;
!     }
! 
!     return true;
  }
  
! ?>

Index: pntables.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/PostContact/pntables.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pntables.php	23 Jul 2002 11:51:09 -0000	1.2
--- pntables.php	6 Aug 2002 20:18:27 -0000	1.3
***************
*** 1,4 ****
--- 1,28 ----
  <?
  // $Id$ $Name$
+ // ----------------------------------------------------------------------
+ // POST-NUKE Content Management System
+ // Copyright (C) 2002 by the PostNuke Development Team.
+ // http://www.postnuke.com/
+ // ----------------------------------------------------------------------
+ // LICENSE
+ //
+ // This program is free software; you can redistribute it and/or
+ // modify it under the terms of the GNU General Public License (GPL)
+ // as published by the Free Software Foundation; either version 2
+ // of the License, or (at your option) any later version.
+ //
+ // This program is distributed in the hope that it will be useful,
+ // but WIthOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ // GNU General Public License for more details.
+ //
+ // To read the license please visit http://www.gnu.org/copyleft/gpl.html
+ // ----------------------------------------------------------------------
+ // Original Author of file: Bjarne Var�ystrand and Bjarne Var�ystrand
+ // Modifications by: Richard Cave
+ // Purpose of file:  Table information for template module
+ // ----------------------------------------------------------------------
+ 
  if(basename($PHP_SELF) == basename(__FILE__)){
  echo "You have no access to this file!!!";
***************
*** 7,227 ****
  
  function PostContact_pntables(){
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      $pntable = array();
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                            contact_departments
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $departments 					= pnConfigGetVar('prefix') . '_postcontact_departments';
!     $pntable['departments_table']	= $departments;
!     $pntable['departments'] 		= array(
!     'id'    => $departments . '.departmentID',
! 	'email'   => $departments . '.departmentEmail',
! 	'name'   => $departments . '.departmentName',
! 	'phone'   => $departments . '.departmentPhone',
! 	'fax'   => $departments . '.departmentFax',
! 	'state'   => $departments . '.departmentState',
! 	'country'   => $departments . '.departmentCountry',
! 	'cid'   => $departments . '.countryID',
! 	'hide'   => $departments . '.departmentHide'
! 	);
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                        contact_departments_members
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $departments_members 					= pnConfigGetVar('prefix') . '_postcontact_departments_members';
!     $pntable['department_members_table']	= $departments_members;
!     $pntable['department_members'] 			= array(
!     'id'    => $departments_members . '.personID',
! 	'depid'   => $departments_members . '.departmentID'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                              contact_titles
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $titles 					= pnConfigGetVar('prefix') . '_postcontact_titles';
!     $pntable['titles_table']	= $titles;
!     $pntable['titles'] 			= array(
!     'id'    => $titles . '.titleID',
!     'name'    => $titles . '.titleName',
! 	'cid'   => $titles . '.countryID'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                               contact_city
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $city 					= pnConfigGetVar('prefix') . '_postcontact_city';
!     $pntable['city_table']	= $city;
!     $pntable['city'] 		= array(
!     'id'    => $city . '.cityID',
!     'name'    => $city . '.cityName',
! 	'cid'   => $city . '.countryID'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                              contact_country
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $city 						= pnConfigGetVar('prefix') . '_postcontact_country';
!     $pntable['country_table']	= $city;
!     $pntable['country'] 		= array(
!     'id'    => $city . '.countryID',
!     'name'    => $city . '.countryName',
! 	'lang'   => $city . '.countryLang'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                             contact_infoType
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $infoType 					= pnConfigGetVar('prefix') . '_postcontact_infoType';
!     $pntable['infotype_table']	= $infoType;
!     $pntable['infotype'] 		= array(
!     'id'    => $infoType . '.typeID',
!     'name'    => $infoType . '.typeName',
! 	'cid'   => $infoType . '.countryID'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                             contact_persons
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $person 					= pnConfigGetVar('prefix') . '_postcontact_persons';
!     $pntable['persons_table']	= $person;
!     $pntable['person'] 		= array(
!     'id'    => $person . '.personID',
!     'mail'    => $person . '.personMail',
!     'firstname'    => $person . '.personFirstName',
!     'lastname'    => $person . '.personLastName',
!     'mobile'    => $person . '.personMobile',
!     'phone'    => $person . '.personPhone',
!     'address'    => $person . '.personAddress',
!     'country'    => $person . '.personCountry',
!     'lang'    => $person . '.personLang',
!     'fax'    => $person . '.personFax',
!     'hide'    => $person . '.personHide',
!     'city'    => $person . '.personCity',
!     'image'    => $person . '.personImage',
!     'pager'    => $person . '.personPager',
!     'ICQ'    => $person . '.personICQ',
!     'AIM'    => $person . '.personAIM',
!     'YIM'    => $person . '.personYIM',
!     'state'    => $person . '.personState',
!     'MSNM'    => $person . '.personMSNM',
!     'address2'    => $person . '.personAddress2',
!     'typephone'    => $person . '.personTypePhone',
!     'typefax'    => $person . '.personTypeFax',
!     'titleID'    => $person . '.personTitleID',
!     'typepager'    => $person . '.personTypePager',
      'typemobile'    => $person . '.personTypeMobile',
!     'zip'    => $person . '.personZip'
! 	);
  
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                                attributes
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $attribute			= pnConfigGetVar('prefix') . '_postcontact_attributes';
  
      // Set the table name
!     $pntable['attributes_table']	= $attribute;
  
      // Set the column names
!     $pntable['attribute'] 		= array(
!     'id'              => $attribute . '.attributeID',
!     'contacttype'     => $attribute . '.attributeContactType',
!     'showname'        => $attribute . '.attributeShowName',
!     'showaddress'     => $attribute . '.attributeShowAddress',
!     'showaddress2'    => $attribute . '.attributeShowAddress2',
!     'showzip'         => $attribute . '.attributeShowZip',
!     'showcountry'     => $attribute . '.attributeShowCountry',
!     'showphone'       => $attribute . '.attributeShowPhone',
!     'showfax'         => $attribute . '.attributeShowFax',
!     'showmobile'      => $attribute . '.attributeShowMobile',
!     'showpager'       => $attribute . '.attributeShowPager',
!     'showemail'       => $attribute . '.attributeShowEmail',
!     'showtitle'       => $attribute . '.attributeShowTitle',
!     'showICQ'         => $attribute . '.attributeShowICQ',
!     'showAIM'         => $attribute . '.attributeShowAIM',
!     'showYIM'         => $attribute . '.attributeShowYIM',
!     'showState'       => $attribute . '.attributeShowState',
!     'showMSNM'        => $attribute . '.attributeShowMSNM',
!     'showcity'        => $attribute . '.attributeShowCity',
!     'showdepartment'  => $attribute . '.attributeShowDepartment',
!     'showimage'       => $attribute . '.attributeShowImage'
! 	);
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                           contact_company_prefs
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $company 						= pnConfigGetVar('prefix') . '_postcontact_company_prefs';
!     $pntable['company_table']	= $company;
!     $pntable['company'] 		= array(
!     'id'    => $company . '.companyID',
!     'name'    => $company . '.companyName',
!     'phone'    => $company . '.companyPhone',
!     'fax'    => $company . '.companyFax',
!     'mail'    => $company . '.companyMail',
!     'address'    => $company . '.companyAddress',
!     'address2'    => $company . '.companyAddress2',
!     'zip'    => $company . '.companyZip',
!     'logo'    => $company . '.companyLogo',
!     'country'    => $company . '.companyCountry',
!     'state'    => $company . '.companyState',
!     'hide'    => $company . '.companyHide',
!     'defaultcountry'    => $company . '.companyDefaultCountry',
!     'city'    => $company . '.companyCity'
! 	);
  
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                           contact_lang_members
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $langmembers 						= pnConfigGetVar('prefix') . '_postcontact_lang_members';
!     $pntable['langmembers_table']	= $langmembers;
!     $pntable['langmembers'] 		= array(
!     'id'    => $langmembers . '.personID',
!     'cid'    => $langmembers . '.countryID'
! 	);
  
  
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! 	// ============================== NEXT TABLE ===============================
! 	//                           contact_country_members
! 	// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $countrymembers 					= pnConfigGetVar('prefix') . '_postcontact_country_members';
!     $pntable['countrymembers_table']	= $countrymembers;
!     $pntable['countrymembers'] 		= array(
!     'id'    => $countrymembers . '.personID',
!     'cid'    => $countrymembers . '.countryID'
! 	);
! 	return $pntable;
  }
  ?>
--- 31,252 ----
  
  function PostContact_pntables(){
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      $pntable = array();
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                            contact_departments
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $departments            = pnConfigGetVar('prefix') . '_postcontact_departments';
!     $pntable['departments_table']    = $departments;
!     $pntable['departments']     = array(
!     'id'            => $departments . '.departmentID',
!     'email'         => $departments . '.departmentEmail',
!     'name'          => $departments . '.departmentName',
!     'phone'         => $departments . '.departmentPhone',
!     'fax'           => $departments . '.departmentFax',
!     'state'         => $departments . '.departmentState',
!     'country'       => $departments . '.departmentCountry',
!     'cid'           => $departments . '.countryID',
!     'hide'          => $departments . '.departmentHide'
!     );
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                        contact_departments_members
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $departments_members             = pnConfigGetVar('prefix') . '_postcontact_departments_members';
!     $pntable['department_members_table']    = $departments_members;
!     $pntable['department_members']         = array(
!     'id'            => $departments_members . '.personID',
!     'depid'         => $departments_members . '.departmentID'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                              contact_titles
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $titles             = pnConfigGetVar('prefix') . '_postcontact_titles';
!     $pntable['titles_table']    = $titles;
!     $pntable['titles']         = array(
!     'id'            => $titles . '.titleID',
!     'name'          => $titles . '.titleName',
!     'cid'           => $titles . '.countryID'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                               contact_city
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $city                 = pnConfigGetVar('prefix') . '_postcontact_city';
!     $pntable['city_table']        = $city;
!     $pntable['city']         = array(
!     'id'            => $city . '.cityID',
!     'name'          => $city . '.cityName',
!     'cid'           => $city . '.countryID'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                              contact_country
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $city                 = pnConfigGetVar('prefix') . '_postcontact_country';
!     $pntable['country_table']    = $city;
!     $pntable['country']         = array(
!     'id'            => $city . '.countryID',
!     'name'          => $city . '.countryName',
!     'lang'          => $city . '.countryLang'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                             contact_infoType
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $infoType             = pnConfigGetVar('prefix') . '_postcontact_infoType';
!     $pntable['infotype_table']    = $infoType;
!     $pntable['infotype']         = array(
!     'id'            => $infoType . '.typeID',
!     'name'          => $infoType . '.typeName',
!     'cid'           => $infoType . '.countryID'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                             contact_persons
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $person             = pnConfigGetVar('prefix') . '_postcontact_persons';
!     $pntable['persons_table']    = $person;
!     $pntable['person']         = array(
!     'id'            => $person . '.personID',
!     'firstname'     => $person . '.personFirstName',
!     'lastname'      => $person . '.personLastName',
!     'address'       => $person . '.personAddress',
!     'address2'      => $person . '.personAddress2',
!     'city'          => $person . '.personCity',
!     'state'         => $person . '.personState',
!     'zip'           => $person . '.personZip',
!     'country'       => $person . '.personCountry',
!     'mail'          => $person . '.personMail',
!     'phone'         => $person . '.personPhone',
!     'fax'           => $person . '.personFax',
!     'mobile'        => $person . '.personMobile',
!     'pager'         => $person . '.personPager',
!     'typephone'     => $person . '.personTypePhone',
!     'typefax'       => $person . '.personTypeFax',
      'typemobile'    => $person . '.personTypeMobile',
!     'typepager'     => $person . '.personTypePager',
!     'lang'          => $person . '.personLang',
!     'ICQ'           => $person . '.personICQ',
!     'AIM'           => $person . '.personAIM',
!     'YIM'           => $person . '.personYIM',
!     'MSNM'          => $person . '.personMSNM',
!     'titleID'       => $person . '.personTitleID',
!     'image'         => $person . '.personImage',
!     'hide'          => $person . '.personHide'
!     );
  
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                                attributes
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $attribute            = pnConfigGetVar('prefix') . '_postcontact_attributes';
  
      // Set the table name
!     $pntable['attributes_table']    = $attribute;
  
      // Set the column names
!     $pntable['attribute']         = array(
!     'id'            => $attribute . '.attributeID',
!     'contacttype'   => $attribute . '.attributeContactType',
!     'showname'      => $attribute . '.attributeShowName',
!     'showaddress'   => $attribute . '.attributeShowAddress',
!     'showaddress2'  => $attribute . '.attributeShowAddress2',
!     'showcity'      => $attribute . '.attributeShowCity',
!     'showstate'     => $attribute . '.attributeShowState',
!     'showzip'       => $attribute . '.attributeShowZip',
!     'showcountry'   => $attribute . '.attributeShowCountry',
!     'showemail'     => $attribute . '.attributeShowEmail',
!     'showphone'     => $attribute . '.attributeShowPhone',
!     'showfax'       => $attribute . '.attributeShowFax',
!     'showmobile'    => $attribute . '.attributeShowMobile',
!     'showpager'     => $attribute . '.attributeShowPager',
!     'showICQ'       => $attribute . '.attributeShowICQ',
!     'showAIM'       => $attribute . '.attributeShowAIM',
!     'showYIM'       => $attribute . '.attributeShowYIM',
!     'showMSNM'      => $attribute . '.attributeShowMSNM',
!     'showtitle'     => $attribute . '.attributeShowTitle',
!     'showdepartment' => $attribute . '.attributeShowDepartment',
!     'showimage'     => $attribute . '.attributeShowImage'
!     );
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                           contact_company_prefs
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $company             = pnConfigGetVar('prefix') . '_postcontact_company_prefs';
!     $pntable['company_table']    = $company;
!     $pntable['company']         = array(
!     'id'            => $company . '.companyID',
!     'name'          => $company . '.companyName',
!     'address'       => $company . '.companyAddress',
!     'address2'      => $company . '.companyAddress2',
!     'city'          => $company . '.companyCity',
!     'state'         => $company . '.companyState',
!     'zip'           => $company . '.companyZip',
!     'country'       => $company . '.companyCountry',
!     'phone'         => $company . '.companyPhone',
!     'fax'           => $company . '.companyFax',
!     'mail'          => $company . '.companyMail',
!     'logo'          => $company . '.companyLogo',
!     'hide'          => $company . '.companyHide',
!     'defaultcountry' => $company . '.companyDefaultCountry'
!     );
  
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                           contact_lang_members
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $langmembers             = pnConfigGetVar('prefix') . '_postcontact_lang_members';
!     $pntable['langmembers_table']    = $langmembers;
!     $pntable['langmembers']     = array(
!     'id'            => $langmembers . '.personID',
!     'cid'           => $langmembers . '.countryID'
!     );
  
  
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
!     // ============================== NEXT TABLE ===============================
!     //                           contact_country_members
!     // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      // Get the name for the template item table.  This is not necessary
      // but helps in the following statements and keeps them readable
!     $countrymembers             = pnConfigGetVar('prefix') . '_postcontact_country_members';
!     $pntable['countrymembers_table']    = $countrymembers;
!     $pntable['countrymembers']         = array(
!     'id'            => $countrymembers . '.personID',
!     'cid'           => $countrymembers . '.countryID'
!     );
! 
!     return $pntable;
  }
  ?>


Directory filter : [ all ] / postnuke_modules / PostContact [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3