• ".mysql_error()."
  • "; }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 .= "
  • ".mysql_error()."
  • "; }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 = "

    "; }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 .= "
  • ".mysql_error()."
  • "; }else{ $departments_exists = mysql_numrows($result); if(!$departments_exists){ $mode = 1; $NoInfoExtraText = "

    "._CIYOUAREALWAYSWELCOME."

    "; } } } if($mode == ""){ // PAGE ONE FOR COMPANY CONTACT INFORMATION if($departments_exists){ echo mysql_error(); if($departments_exists > 0){ echo "

    "._CICONTACT." ".$companyName."

    ".$companyLogo; echo "

    "._CIYOUAREALWAYSWELCOME."

    "; echo ""; 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 " "; } echo "
    "._CIBULLET." ".$departmentName."
      "._CIMAIL.": ".$departmentEmail."  
     
    "; } if(($company_exists) or ($persons_exists)){ echo "

    "._CIDOYOUNEEDFURTHERINFO1." "._CIDOYOUNEEDFURTHERINFO2." "._CIDOYOUNEEDFURTHERINFO3.".

    "; } }else{ if($company_exists){ echo "

    "._CIDOYOUNEEDFURTHERINFO1." ".$companyName.", "._CIDOYOUNEEDFURTHERINFO2." "._CIDOYOUNEEDFURTHERINFO3.".

    "; }else{ echo "

    "._CINOCOMPANY_EXISTS_."

    "; } } }else{ // PAGE TWO FOR COMPANY CONTACT INFORMATION IF THE COMPANY POST IS ACTIVE THEN DISPLAY THE INFORMATION if($company_exists){ echo ""; echo "

    "._CICONTACTINFOFOR." ".$sitename."

    "; // if($companyName){ // echo "

    "._CICONTACTINFOFOR." ".$companyName."

    "; // } echo "
    $companyLogo   "; if($companyName){ echo ""; } if($companyAddress or $companyZip or $city['name'] or $companyState){ echo ""; } if($companyCountry){ echo ""; } if($companyPhone || $companyFax || $companyMail){ echo ""; if($companyPhone){ echo " "; } if($companyFax){ echo " "; } if($companyMail){ echo " "; } } echo "
    ".$companyName."
    ".$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 "
    ".$companyCountry."
      "._CIPHONE.":  ".$companyPhone."
      "._CIFAX.":  ".$companyFax."
      "._CIEMAIL.":  ".$companyMail."
    "; if($companyPhone || $companyFax || $companyMail || $companyAddress || $companyZip || $companyCountry || $city['name'] || $companyName){ echo "
    "; } } 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 .= "
  • ".mysql_error()."
  • "; echo "

    ".$query."

    "; }else{ $members = mysql_numrows($membersInDepartment); } if($members > 0){ echo "

    "._CIIFYOUKNOWWHOTOCONTACT."

    "; 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 " "; if($personMail){ echo ""; } echo " "; } echo "
    ".$personFirstName." ".$personLastName." ".$personTitle['name']." "; if(checkMailInfo($personID) == TRUE){ echo ""; } echo "
    "._CIEMAIL.": ".$personMail."

    "; } } if($error_report){ openTable(); echo $error_report; closeTable(); } } theindex($GLOBALS['mode']); closeTable(); include 'footer.php'; ?>