Code:<?php
/************************************************************************/
/* OFxClanList (Profile) v1.2 - An addon module for PHP-Nuke */
/* ===================== */
/* PHP-Nuke OFxClanList (Profile) Module for PHP-Nuke v5.6+ */
/* By Gregory "OFxLedzeplin" Jones OFxLedzeplin@OFxClan.com */
/* http://www.ofxgamer.com */
/* */
/* Bio/Profile file: /modules/module_name/ofxprofile.php */
/* */
/* Use as you wish, please add these sites to your weblinks - PEACE */
/* www.OFxGamer.com - www.OFxClan.com - www.OFxGaming.com */
/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 or a newer version. */
/************************************************************************/
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
if (!isset($mainfile)) { include("mainfile.php"); }
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
if ( $m_id == "" ){echo "Missing MemberID!!!<br>\n";}
global $prefix, $db, $user, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2;
$ThemeSel = get_theme();
include("themes/$ThemeSel/theme.php");
$select = "select m_status, m_membername, m_realname, m_clantitle, m_picture, m_location, m_email, m_age, m_sitename, m_siteurl, m_games, m_impref, m_imid, m_connection, m_info from ".$prefix."_ofxclanlist_members where m_id = ".$m_id."";
$result = $db->sql_query($select) or die( "No Such Member!" );
$member = $db->sql_fetchrow($result);
$select = "select cl_clanname, cl_clantag, cl_clanlogo, cl_active, cl_activegroup, cl_inactive, cl_inactivegroup, cl_honorary, cl_honorarygroup, cl_modulename, cl_underline, cl_width, cl_height, cl_bgcolor1, cl_bgcolor2, cl_bgcolor3, cl_textcolor1, cl_textcolor2 from ".$prefix."_ofxclanlist_config where cl_id = 1";
$clresult = $db->sql_query($select) or die();
$cl = $db->sql_fetchrow($clresult);
$cl_bgcolor1 = $cl[cl_bgcolor1];
$cl_bgcolor2 = $cl[cl_bgcolor2];
$cl_bgcolor3 = $cl[cl_bgcolor3];
$cl_textcolor1 = $cl[cl_textcolor1];
$cl_textcolor2 = $cl[cl_textcolor2];
if ( $cl_bgcolor1 == "" ) {$cl_bgcolor1 = $bgcolor1;}
if ( $cl_bgcolor2 == "" ) {$cl_bgcolor2 = $bgcolor2;}
if ( $cl_bgcolor3 == "" ) {$cl_bgcolor3 = $bgcolor3;}
if ( $cl_textcolor1 == "" ) {$cl_textcolor1 = $textcolor1;}
if ( $cl_textcolor2 == "" ) {$cl_textcolor2 = $textcolor2;}
$cl_clanname = $cl[cl_clanname];
$cl_clantag = $cl[cl_clantag];
$cl[cl_clanlogo] = "modules/".$module_name."/".$cl[cl_clanlogo];
$cl_width = $cl[cl_width];
if (($cl_width == "") or ($cl_width == "0")) { $cl_width = "450"; }
$cl_height = $cl[cl_height];
if (($cl_height == "") or ($cl_height == "0")) { $cl_height = "320"; }
$cl_width = $cl_width - 10;
$cl_height = $cl_height - 25;
$m_membername = $member[m_membername];
$m_picture = "modules/".$module_name."/images/".$member[m_picture];
if ( $member[m_picture] == "CUSTOMJPG" ) {$m_picture = "modules/".$module_name."/images/custom/".$m_membername.".jpg";}
if ( $member[m_picture] == "CUSTOMGIF" ) {$m_picture = "modules/".$module_name."/images/custom/".$m_membername.".gif";}
$m_realname = $member[m_realname];
$m_clantitle = $member[m_clantitle];
$m_location = $member[m_location];
$m_email = $member[m_email];
$m_age = $member[m_age];
$m_sitename = $member[m_sitename];
$m_siteurl = $member[m_siteurl];
$m_games = $member[m_games];
$m_impref = $member[m_impref];
$m_imid = $member[m_imid];
if ( $m_imid == "" ) { $m_impref = ""; }
$m_connection = $member[m_connection];
$m_info = $member[m_info];
if ( $member[m_status] == 0 ) { $m_statusgroup = $cl[cl_inactivegroup]; $m_status = $cl[cl_inactive]; }
if ( $member[m_status] == 1 ) { $m_statusgroup = $cl[cl_activegroup]; $m_status = $cl[cl_active]; }
if ( $member[m_status] == 2 ) { $m_statusgroup = $cl[cl_honorarygroup]; $m_status = $cl[cl_honorary]; }
#Realname-Email link
if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$member[m_email])) {
if ( $member[m_realname] != "") {$realname_email = " $member[m_realname]";} else {$realname_email = " ";}
} else {
$urlno = $member[m_email];
if ( $member[m_realname] != "") {
$realname_email = " <a href=\"mailto:".$urlno."\" ";
if ($cl[cl_underline] == 0) { $realname_email = $realname_email." ST YLE=\"text-decoration: none\" "; }
$realname_email = $realname_email.">$member[m_realname]</a>";
} else {
$realname_email = " <a href=\"mailto:".$urlno."\" ";
if ($cl[cl_underline] == 0) { $realname_email = $realname_email." ST YLE=\"text-decoration: none\" "; }
$realname_email = $realname_email.">Email</a>";
}
}
#Website link
if ($member[m_siteurl] == "") {
if ( $member[m_sitename] != "") {$websitelink = " $member[m_sitename]";} else {$websitelink = " ";}
} else {
$urlno = eregi_replace("http://","",$member[m_siteurl]);
if ( $member[m_sitename] != "") {
$websitelink = " <a href=\"http://$urlno\" target=\"new\"";
if ($cl[cl_underline] == 0) { $websitelink = $websitelink." ST YLE=\"text-decoration: none\" "; }
$websitelink = $websitelink.">$member[m_sitename]</a>";
} else {
$websitelink = " <a href=\"http://$urlno\" target=\"new\"";
if ($cl[cl_underline] == 0) { $websitelink = $websitelink." ST YLE=\"text-decoration: none\" "; }
$websitelink = $websitelink.">Homepage</a>";
}
}
echo "<head>\n<LINK REL=\"ST YLESheet\" HREF=\"themes/$ThemeSel/ST YLE/ST YLE.css\" TYPE=\"text/css\">\n";
echo "<ST YLE TYPE=\"text/css\">\n\tBODY { margin-top:0; margin-bottom:0; margin-left:0; margin-right:0; }\n</ST YLE>\n";
echo "</head>\n";
echo "<ilayer name=\"scroll1\" width=$cl_width height=$cl_height clip=\"0,0,$cl_width,$cl_height\">";
echo "<layer name=\"scroll2\" width=$cl_width height=$cl_height bgColor=\"$bgcolor1\">";
echo "<div id=\"scroll3\" ST YLE=\"width:$cl_width;height:$cl_height;background-color:$bgcolor1;overflow:auto\">";
include("modules/$module_name/profile.html");
echo "</div></layer></ilayer>";
echo "<br><center><a href=\"http://www.OFxGamer.com\" target=\"_new\" ST YLE=\"text-decoration: none; COLOR: $cl_textcolor1; FONT-SIZE: 7px; FONT-FAMILY: Verdana, Helvetica;\">ClanList Profile Viewer - Copyright © 2005 Gregory \"OFxLedzeplin\" Jones</a></center>";
?>
|