#Member.pm
# (c) 2006 SapphireGroup
# All rights reserved
######################################################################
# ===================== #
# Member Functions #
# ===================== #
######################################################################
package modules::Member;
use CGI qw(:standard);
my $mycgi=new CGI;
use lib "..";
#use libs::Config;
use libs::DBFunctions;
use libs::Core;
$libs::DBfunctions::db = libs::DBfunctions::connectDB(); my $db = $libs::DBfunctions::db;
my $l=$mycgi->param("l"); if ($l eq ""){$l = "eng";}
my $page=$mycgi->param("page"); $page = 1 unless $page;
use Exporter;
@ISA=qw(Exporter);
@EXPORT=qw(&member_Details);
$VERSION=1.01;
###############################################################################
sub member_Details
{
unless ($mid){
return;
}
my ($query,$table,$rows);
my ($mName,$mCompanyName,$mAddressLine1,$mAddressLine2,$mAddressLine3,$mAddressLine4,$tName,$mPostCode,$mPhone,$mMobile,$mFax,$mEmail,$mURL,$mFacebookURL,$mTwitterURL,$mLinkedinURL,$mPhoto,$mLogo,$mDescription);
$query="SELECT mName,mCompanyName,mAddressLine1,mAddressLine2,mAddressLine3,mAddressLine4,tName,mPostCode,mPhone,mMobile,mFax,mEmail,mURL,mFacebookURL,mTwitterURL,mLinkedinURL,mPhoto,mLogo,mDescription,mStatus FROM ${Settings::table_prefix}member INNER JOIN ${Settings::table_prefix}dict_town on (${Settings::table_prefix}member.tid=${Settings::table_prefix}dict_town.tid) WHERE mid=$mid AND mStatus != 'UnApproved'";
#print "$query
";
$table=$db->prepare($query);
$table->execute;
$table->bind_columns(undef,\($mName,$mCompanyName,$mAddressLine1,$mAddressLine2,$mAddressLine3,$mAddressLine4,$tName,$mPostCode,$mPhone,$mMobile,$mFax,$mEmail,$mURL,$mFacebookURL,$mTwitterURL,$mLinkedinURL,$mPhoto,$mLogo,$mDescription));
$rows = $table->rows;
unless ($table->fetch){
print qq|
|
|;
libs::Template::ShowMessage("Sorry, profile not found");
print qq|
|
| << Back |
|;
return;
}
$mDescription =~ s/\n/
/g;
$mEmail=libs::Core::email_transform($mEmail); #qq|| if $mEmail ne "";
$mURL=libs::Core::url_transform($mURL);
#$mFacebookURL=libs::Core::url_transform($mFacebookURL); # might be https..
#$mTwitterURL=libs::Core::url_transform($mTwitterURL);
#$mLinkedinURL=libs::Core::url_transform($mLinkedinURL);
# Amended by SK 28/09/2010
# This is a right mess - updated the table layout
print qq|
|;
}
###############################################################################
return 1;