- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 234 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Security Image Not Showing [ ]
Author
Message
d4m4g3
Corporal
Joined: Sep 19, 2003
Posts: 63
Posted:
Wed Mar 10, 2004 5:02 pm
Heres something else to consider. I have a friend who couldn't get the security code to show on his site no matter what we did.... I decided to ask him for the admin password for his site. I logged in as admin, went to modules and low and behold when I looked at Your_Account I was amazed to see that he had changed the setting for who can access Your Account to Registered Users. I changed it back to ALL USERS and miraculously the security code appeared. He is running NSN Nuke 7 on all his domains and subdomains and it was set that way on all of them. After making the change all was ok. Im not saying thats the fix for everyone but it would be something to consider looking into.
alabullet
Nuke Cadet
Joined: Mar 09, 2004
Posts: 3
Posted:
Sun Mar 14, 2004 1:18 am
raven read private message.
ok guys I have same problem I get the red x for any login.
and if I disable the graphic security code like I read how to do on this site.
Then I go to login and it loops back to previous login.
im screwed. raven please do this for me ill pay u.
reptix
Nuke Soldier
Joined: Dec 26, 2003
Posts: 21
Posted:
Sun Mar 14, 2004 5:47 am
Give me the site ill try for free.
alabullet
Nuke Cadet
Joined: Mar 09, 2004
Posts: 3
Posted:
Sun Mar 14, 2004 11:25 am
Hi reptix check your private message I gave u the info
alabullet
Nuke Cadet
Joined: Mar 09, 2004
Posts: 3
Posted:
Sun Mar 14, 2004 1:10 pm
nevermind reptix I got someone doing it. please void my info.
songmon
Nuke Cadet
Joined: Mar 15, 2004
Posts: 2
Posted:
Mon Mar 15, 2004 4:34 am
I've had the same problem and i tried to fix it in 8 days. I do anything when i saw post of Raven.
Today, I CUT the gfx funtions to a new file and change the url of security image to this file. Now it run well.
Exp: i creat a security.php file
and i change url of security image to \"modules/Your_Account/security.php?op=gfx&random_num=$random_num\"
Anyone know what happen is it?
jtp755
Nuke Cadet
Joined: Mar 14, 2004
Posts: 8
Posted:
Mon Mar 15, 2004 5:52 am
i had the same problem as sumo664 had way above and it was where i had set the able to view Your Account to only Registered users. Is there a way i can still set it the registered users only and still be able to login? Any workaround that yall know of? TIA
reptix
Nuke Soldier
Joined: Dec 26, 2003
Posts: 21
Posted:
Mon Mar 15, 2004 6:47 am
You could of corse use the block to login.. But the redirection to Your_Account could still block the user.. Just try and see .. As you can tell I think PHPNuke was made to allow the viewing of Your_Account as all the Settings and Themes have the Your_Account link at the top..
_________________ :: ReptiX ::
jtp755
Nuke Cadet
Joined: Mar 14, 2004
Posts: 8
Posted:
Mon Mar 15, 2004 2:18 pm
yeah. i just realized i worded my above post wrong.... it should say:
"i had the same problem as sumo664 had way above and it was where i had set the ablility to view Your Account to only Registered users and not all visitors. Is there a way i can still set it to the registered users being able to view Your Account only and still be able to login with a normal user and have the "link" show up when you are logged in? Any workaround that yall know of? TIA
jib_intelli
Captain
Joined: Jun 10, 2004
Posts: 338
Location: Lucknow, India
Posted:
Wed Aug 04, 2004 7:14 pm
I am having a similar problem, just checked the blank lines and removed them, also tried turning $gfz_chk = 0; but the problem existed, though the image is being showed in analyze.php!
I am using the Your_Account GreenHAck v 1.1 downloaded from Nukecops.com on PHPNuke 7.3
My site is at http://66.36.242.216/~potter/
and the analyze.php is at http://66.36.242.216/~potter/analyze.php
jib_intelli
Captain
Joined: Jun 10, 2004
Posts: 338
Location: Lucknow, India
Posted:
Wed Aug 04, 2004 10:28 pm
This is my index.php from Your_Account, it is the one I got with the Your_Account GreenHack v1.1
Quote:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Your_Account module hack by Jon Green */
/* greengene@lineone.net */
/* */
/* Added Registration fileds: RealName, Country, State, */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* 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 of the License. */
/************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$userpage = 1;
include("modules/$module_name/navbar.php");
//
// Add any new $Variables for new Registration fields
// function userCheck($username, $user_newfield, $user_newfield2 .......) (
//
function userCheck($username, $realname, $user_email, $user_country, $user_state) {
global $stop, $user_prefix, $db;
if ((!$user_email) || ($user_email=="") || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$user_email))) $stop = "<center>"._ERRORINVEMAIL."</center><br>";
if (strrpos($user_email,' ') > 0) $stop = "<center>"._ERROREMAILSPACES."</center>";
if ((!$username) || ($username=="") || (ereg("[^a-zA-Z0-9_-]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";
//
// Add New $Variable Lines, define ._NEWFIELD2LONG. in Your_Account/Language file
// if (strlen($Variable) > 35) $stop = "<center>"._NEWFIELD2LONG."</center>";
//
if (strlen($username) > 25) $stop = "<center>"._NICK2LONG."</center>";
if (strlen($realname) > 35) $stop = "<center>"._NAME2LONG."</center>";
if (strlen($user_country) > 35) $stop = "<center>"._COUNTRY2LONG."</center>";
if (strlen($user_state) > 35) $stop = "<center>"._STATE2LONG."</center>";
if (eregi("^((root)|(adm)|(linux)|(webmaster)|(admin)|(god)|(administrator)|(administrador)|(nobody)|(anonymous)|(anonimo)|(anónimo)|(operator))$",$username)) $stop = "<center>"._NAMERESERVED."";
if (strrpos($username,' ') > 0) $stop = "<center>"._NICKNOSPACES."</center>";
if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users WHERE username='$username'")) > 0) $stop = "<center>"._NICKTAKEN."</center><br>";
if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users_temp WHERE username='$username'")) > 0) $stop = "<center>"._NICKTAKEN."</center><br>";
if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users WHERE user_email='$user_email'")) > 0) $stop = "<center>"._EMAILREGISTERED."</center><br>";
if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users_temp WHERE user_email='$user_email'")) > 0) $stop = "<center>"._EMAILREGISTERED."</center><br>";
return($stop);
}
function makePass() {
$cons = "bcdfghjklmnpqrstvwxyz";
$vocs = "aeiou";
for ($x=0; $x < 6; $x++) {
mt_srand ((double) microtime() * 1000000);
$con[$x] = substr($cons, mt_rand(0, strlen($cons)-1), 1);
$voc[$x] = substr($vocs, mt_rand(0, strlen($vocs)-1), 1);
}
$makepass = $con[0] . $voc[0] .$con[2] . $con[1] . $voc[1] . $con[3] . $voc[3] . $con[4];
return($makepass);
}
//
// Add new variables to function confirmNewUser
// function confirmNewUser($username, $user_newfield, $user_newfield2 ......etc ) {
//
function confirmNewUser($username, $realname, $user_email, $user_country, $user_state, $user_password, $user_password2, $random_num, $gfx_check) {
global $stop, $EditedMessage, $sitename, $module_name, $minpass;
include("header.php");
include("config.php");
filter_text($username);
$username = $EditedMessage;
$user_viewemail = "0";
//
// Add new variables to: userCheck($username, $user_newfield, $user_newfield2 .....etc );
// Must be the same variables as function userCheck on Line 34
//
userCheck($username, $realname, $user_email, $user_country, $user_state);
if (!$stop) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $_POST[random_num] . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check) {
title(""._NEWUSERERROR."");
OpenTable();
echo "<center><b>"._SECCODEINCOR."</b><br><br>"
.""._GOBACK."</center>";
CloseTable();
include("footer.php");
die();
}
if ($user_password == "" AND $user_password2 == "") {
$user_password = makepass();
} elseif ($user_password != $user_password2) {
title(""._NEWUSERERROR."");
OpenTable();
echo "<center><b>"._PASSDIFFERENT."</b><br><br>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die();
} elseif ($user_password == $user_password2 AND strlen($user_password) < $minpass) {
title(""._NEWUSERERROR."");
OpenTable();
echo "<center>"._YOUPASSMUSTBE." <b>$minpass</b> "._CHARLONG."<br><br>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die();
}
title("$sitename: "._USERREGLOGIN."");
OpenTable();
echo "<center><b>"._USERFINALSTEP."</b><br><br>$username, "._USERCHECKDATA."</center><br><br>"
."<table align='center' border='0'>"
//
// Add Line for each new field and variable
// ."<tr><td><b>"._NEWFIELD.":</b> $user_newfield<br></td></tr>"
//
."<tr><td><b>"._UUSERNAME.":</b> $username<br></td></tr>"
."<tr><td><b>"._UREALNAME.":</b> $realname<br></td></tr>"
."<tr><td><b>"._COUNTRY.":</b> $user_country<br></td></tr>"
."<tr><td><b>"._STATE.":</b> $user_state<br></td></tr>"
."<tr><td><b>"._EMAIL.":</b> $user_email</td></tr></table><br><br>"
."<center><b>"._NOTE."</b> "._YOUWILLRECEIVE."";
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">"
//
// Add Line for each Variable
// ."<input type=\"hidden\" name=\"user_newfield\" value=\"$user_newfield\">"
//
."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">"
."<input type=\"hidden\" name=\"gfx_check\" value=\"$gfx_check\">"
."<input type=\"hidden\" name=\"username\" value=\"$username\">"
."<input type=\"hidden\" name=\"realname\" value=\"$realname\">"
."<input type=\"hidden\" name=\"user_country\" value=\"$user_country\">"
."<input type=\"hidden\" name=\"user_state\" value=\"$user_state\">"
."<input type=\"hidden\" name=\"user_email\" value=\"$user_email\">"
."<input type=\"hidden\" name=\"user_password\" value=\"$user_password\">"
."<input type=\"hidden\" name=\"op\" value=\"finish\"><br><br>"
."<input type=\"submit\" value=\""._FINISH."\"> "._GOBACK."</form></center>";
CloseTable();
} else {
OpenTable();
echo "<center><font class=\"title\"><b>Registration Error!</b></font><br><br>";
echo "<font class=\"content\">$stop<br>"._GOBACK."</font></center>";
CloseTable();
}
include("footer.php");
}
//
// Add new variables to: function finishNewUser($username, $user_newfield, $user_newfield2 .....etc ) (
//
function finishNewUser($username, $realname, $user_email, $user_country, $user_state, $user_password, $random_num, $gfx_check) {
global $stop, $EditedMessage, $adminmail, $sitename, $Default_Theme, $user_prefix, $db, $storyhome, $module_name, $nukeurl;
include("header.php");
include("config.php");
//
// Add new variables to: userCheck($username, $user_newfield, $user_newfield2 .....etc );
// Must be the same variables as function userCheck on Line 34 & 82
//
userCheck($username, $realname, $user_email, $user_country, $user_state);
$user_regdate = date("M d, Y");
if (!isset($stop)) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check) {
Header("Location: modules.php?name=$module_name");
die();
}
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$check_num = mt_rand(0, $maxran);
$check_num = md5($check_num);
$time = time();
$finishlink = "$nukeurl/modules.php?name=$module_name&op=activate&username=$username&check_num=$check_num";
$new_password = md5($user_password);
//
// Add for each variable:
// $variable = check_html($user_newfield, nohtml);
//
$username = check_html($username, nohtml);
$realname = check_html($realname, nohtml);
$user_country = check_html($user_country, nohtml);
$user_state = check_html($user_state, nohtml);
$user_email = check_html($user_email, nohtml);
//
// Include Variables in the INSERT command
// DATABASE: Must ADD COLUMN to nuke_users_temp for each variable
// INSERT INTO....._users_temp (user_id, user_newfield...etc) VALUES (NULL, '$username', '$user_newfield'...etc)");
//
$db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, name, user_country, user_state, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$realname', '$user_country', '$user_state', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')");
if(!$result) {
echo ""._ERROR."<br>";
} else {
$message = ""._WELCOMETO." $sitename!\n\n"._YOUUSEDEMAIL." ($user_email) "._TOREGISTER." $sitename.\n\n "._TOFINISHUSER."\n\n $finishlink\n\n "._FOLLOWINGMEM."\n\n"._UNICKNAME." $username\n"._UPASSWORD." $user_password";
$subject = ""._ACTIVATIONSUB."";
$from = "$adminmail";
mail($user_email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
title("$sitename: "._USERREGLOGIN."");
OpenTable();
echo "<center><b>"._ACCOUNTCREATED."</b><br><br>";
echo ""._YOUAREREGISTERED.""
."<br><br>"
.""._FINISHUSERCONF."<br><br>"
.""._THANKSUSER." $sitename!</center>";
CloseTable();
}
} else {
echo "$stop";
}
include("footer.php");
}
function activate($username, $check_num) {
global $db, $user_prefix, $module_name, $language;
$past = time()-86400;
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
$sql = "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) == 1) {
$row = $db->sql_fetchrow($result);
//
// Include Variables in the INSERT command
// INSERT....".$user_prefix."_users (user_id, user_newfield .....etc) VALUES (NULL, '$row[user_newfield]'.......etc)");
//
if ($check_num == $row[check_num]) {
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, name, user_country, user_state, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[name]', '$row[user_country]', '$row[user_state]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'");
include("header.php");
title(""._ACTIVATIONYES."");
OpenTable();
echo "<center><b>$row[username]:</b> "._ACTMSG."</center>";
CloseTable();
include("footer.php");
die();
} else {
include("header.php");
title(""._ACTIVATIONERROR."");
OpenTable();
echo "<center>"._ACTERROR1."</center>";
CloseTable();
include("footer.php");
die();
}
} else {
include("header.php");
title(""._ACTIVATIONERROR."");
OpenTable();
echo "<center>"._ACTERROR2."</center>";
CloseTable();
include("footer.php");
die();
}
}
function userinfo($username, $bypass=0, $hid=0, $url=0) {
global $user, $cookie, $sitename, $prefix, $user_prefix, $db, $admin, $broadcast_msg, $my_headlines, $module_name;
$sql = "SELECT * FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
$num = $db->sql_numrows($result);
$userinfo = $db->sql_fetchrow($result);
if(!$bypass) cookiedecode($user);
include("header.php");
OpenTable();
echo "<center>";
if(($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<font class=\"option\">$username, "._WELCOMETO." $sitename!</font><br><br>";
echo "<font class=\"content\">"._THISISYOURPAGE."</font></center><br><br>";
nav(1);
echo "<br><br>";
} else {
echo "<font class=\"title\">"._PERSONALINFO.": $username</font></center><br><br>";
}
if ($userinfo[user_website]) {
if (!eregi("http://", $userinfo[user_website])) {
$userinfo[user_website] = "http://$userinfo[user_website]";
}
}
if(($num == 1) && ($userinfo[user_website] || $userinfo[femail] || $userinfo[bio] || $userinfo[user_avatar] || $userinfo[user_icq] || $userinfo[user_aim] || $userinfo[user_yim] || $userinfo[user_msnm] || $userinfo[user_location] || $userinfo[user_occ] || $userinfo[user_interests] || $userinfo[user_sig])) {
echo "<center><font class=\"content\">";
if (ereg("(http)", $userinfo[user_avatar])) { echo "<img src=\"$userinfo[user_avatar]\"><br>\n"; } elseif ($userinfo[user_avatar]) { echo "<img src=\"modules/Forums/images/avatars/gallery/$userinfo[user_avatar]\"><br>\n"; }
if ($userinfo[user_website] != "http://" AND $userinfo[user_website] != "") { echo ""._MYHOMEPAGE." <a href=\"$userinfo[user_website]\" target=\"new\">$userinfo[user_website]</a><br>\n"; }
if ($userinfo[femail]) { echo ""._MYEMAIL." <a href=\"mailto:$userinfo[femail]\">$userinfo[femail]</a><br>\n"; }
//
// Add a New Line for each new field and variable
// if ($userinfo[user_newfield]) echo ""._NEWFIELD.": $userinfo[user_newfield]<br>\n";
//
if ($userinfo[user_address]) echo ""._ADDRESS.": $userinfo[user_address]<br>\n";
if ($userinfo[user_city]) echo ""._CITY.": $userinfo[user_city]<br>\n";
if ($userinfo[user_state]) echo ""._STATE.": $userinfo[user_state]<br>\n";
if ($userinfo[user_zip]) echo ""._ZIP.": $userinfo[user_zip]<br>\n";
if ($userinfo[user_country]) echo ""._COUNTRY.": $userinfo[user_country]<br>\n";
echo "<br>\n";
if ($userinfo[user_icq]) echo ""._ICQ.": $userinfo[user_icq]<br>\n";
if ($userinfo[user_aim]) echo ""._AIM.": $userinfo[user_aim]<br>\n";
if ($userinfo[user_yim]) echo ""._YIM.": $userinfo[user_yim]<br>\n";
if ($userinfo[user_msnm]) echo ""._MSNM.": $userinfo[user_msnm]<br>\n";
if ($userinfo[user_from]) echo ""._LOCATION.": $userinfo[user_from]<br>\n";
if ($userinfo[user_occ]) echo ""._OCCUPATION.": $userinfo[user_occ]<br>\n";
if ($userinfo[user_interests]) echo ""._INTERESTS.": $userinfo[user_interests]<br>\n";
$userinfo[user_sig] = nl2br($userinfo[user_sig]);
if ($userinfo[user_sig]) echo "<br><b>"._SIGNATURE.":</b><br>$userinfo[user_sig]<br>\n";
if ($userinfo[bio]) { echo "<br><b>"._EXTRAINFO.":</b><br>$userinfo[bio]<br>\n"; }
$sql2 = "SELECT uname FROM ".$prefix."_session WHERE uname='$username'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$username_pm = $username;
$username_online = $row2[uname];
if ($username_online == "") {
$online = _OFFLINE;
} else {
$online = _ONLINE;
}
echo ""._USERSTATUS.": <b>$online</b><br>\n";
if (($userinfo[newsletter] == 1) AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[newsletter] == 1))) {
echo "<i>"._SUBSCRIBED."</i><br>";
} elseif (($userinfo[newsletter] == 0) AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2]) OR (is_admin($admin) AND ($userinfo[newsletter] == 0))) {
echo "<i>"._NOTSUBSCRIBED."</i><br>";
}
if (is_active("Journal") AND $cookie[1] != $username) {
$sql3 = "SELECT jid FROM ".$prefix."_journal WHERE aid='$username' AND status='yes' ORDER BY pdate,jid DESC LIMIT 0,1";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$jid = $row3[jid];
if ($jid != "" AND isset($jid)) {
echo "[ <a href=\"modules.php?name=Journal&file=search&bywhat=aid&forwhat=$username\">"._READMYJOURNAL."</a> ]<br>";
}
}
if (is_admin($admin)) {
echo "[ <a href=\"admin.php?op=modifyUser&chng_uid=$userinfo[user_id]\">"._EDITUSER."</a> ]<br>";
}
if (((is_user($user) AND $cookie[1] != $username) OR is_admin($admin)) AND is_active("Private_Messages")) { echo "<br>[ <a href=\"modules.php?name=Private_Messages&mode=post&u=$userinfo[user_id]\">"._USENDPRIVATEMSG." $username_pm</a> ]<br>\n"; }
echo "</center></font>";
} else {
echo "<center>"._NOINFOFOR." $username</center>";
}
CloseTable();
if ($my_headlines == 1 AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._MYHEADLINES."</b><br><br>"
.""._SELECTASITE."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
."<input type=\"hidden\" name=\"username\" value=\"$username\">"
."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
."<input type=\"hidden\" name=\"url\" value=\"0\">"
."<select name=\"hid\" onChange='submit()'>\n"
."<option value=\"0\">"._SELECTASITE2."</option>";
$sql4 = "SELECT hid, sitename FROM ".$prefix."_headlines ORDER BY sitename";
$headl = $db->sql_query($sql4);
while($row4 = $db->sql_fetchrow($headl)) {
$nhid = $row4[hid];
$hsitename = $row4[sitename];
if ($hid == $nhid ) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option value=\"$nhid\" $sel>$hsitename</option>\n";
}
echo "</select></form>"
.""._ORTYPEURL."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"userinfo\">"
."<input type=\"hidden\" name=\"username\" value=\"$username\">"
."<input type=\"hidden\" name=\"bypass\" value=\"$bypass\">"
."<input type=\"hidden\" name=\"hid\" value=\"0\">"
."<input type=\"text\" name=\"url\" size=\"40\" maxlength=\"200\" value=\"http://\"> "
."<input type=\"submit\" value=\""._GO."\"></form>"
."</center><br>";
if ($hid != 0 OR ($hid == 0 AND $url != "0" AND $url != "http://") AND $url != "") {
if ($hid != 0) {
$sql5 = "SELECT sitename, headlinesurl FROM ".$prefix."_headlines WHERE hid='$hid'";
$result5 = $db->sql_query($sql5);
$row5 = $db->sql_fetchrow($result5);
$nsitename = $row5[sitename];
$url = $row5[headlinesurl];
$title = $nsitename;
$siteurl = eregi_replace("http://", "", $url);
$siteurl = explode("/", $siteurl);
} else {
if (!ereg("http://", $url)) {
$url = "http://$url";
}
$siteurl = eregi_replace("http://", "", $url);
$siteurl = explode("/", $siteurl);
$title = "http://$siteurl[0]";
}
$rdf = parse_url($url);
$fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15);
if (!$fp) {
$content = "<center><font class=\"content\">"._RSSPROBLEM."</font></center>";
}
if ($fp) {
fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0\r\n");
fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n");
$string = "";
while(!feof($fp)) {
$pagetext = fgets($fp,300);
$string .= chop($pagetext);
}
fputs($fp,"Connection: close\r\n\r\n");
fclose($fp);
$items = explode("</item>",$string);
$content = "<font class=\"content\">";
for ($i=0;$i<10;$i++) {
$link = ereg_replace(".*<link>","",$items[$i]);
$link = ereg_replace("</link>.*","",$link);
$title2 = ereg_replace(".*<title>","",$items[$i]);
$title2 = ereg_replace("</title>.*","",$title2);
if ($items[$i] == "" AND $cont != 1) {
$content = "<center>"._RSSPROBLEM."</center>";
} else {
if (strcmp($link,$title2) AND $items[$i] != "") {
$cont = 1;
$content .= "<img src=\"images/arrow.gif\" border=\"0\" hspace=\"5\"><a href=\"$link\" target=\"new\">$title2</a><br>\n";
}
}
}
}
if ($content != "") {
OpenTable2();
echo "<center><b>"._HEADLINESFROM." <a href=\"http://$siteurl[0]\" target=\"new\">$title</a></b></center><br>";
echo "$content";
CloseTable2();
} elseif (($cont == 0) OR ($content == "")) {
OpenTable2();
echo "<center>"._RSSPROBLEM."</center><br>";
CloseTable2();
}
echo "<br>";
}
CloseTable();
}
if ($broadcast_msg == 1 AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._BROADCAST."</b><br><br>"._BROADCASTTEXT."<br><br>"
."<form action=\"modules.php?name=$module_name\" method=\"post\">"
."<input type=\"hidden\" name=\"who\" value=\"$username\">"
."<input type=\"hidden\" name=\"op\" value=\"broadcast\">"
."<input type=\"text\" size=\"60\" maxlength=\"255\" name=\"the_message\"> <input type=\"submit\" value=\""._SEND."\">"
."</form></center>";
CloseTable();
}
if (is_active("Private_Messages") AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
echo "<br>";
OpenTable();
echo "<center><b>"._PRIVATEMESSAGES."</b><br><br>";
$numrow = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$userinfo[user_id]' AND (privmsgs_type='1' OR privmsgs_type='5' OR privmsgs_type='0')"));
if (is_active("Members_List")) {
$mem_list = "<a href=\"modules.php?name=Members_List\">"._BROWSEUSERS."</a>";
} else {
$mem_list = "";
}
if (is_active("Search")) {
$mod_search = "<a href=\"modules.php?name=Search&type=users\">"._SEARCHUSERS."</a>";
} else {
$mod_search = "";
}
if ($mem_list != "" AND $mod_search != "") { $a = " | "; } else { $a = ""; }
if ($mem_list != "" OR $mod_search != "") {
$links = "[ $mem_list $a $mod_search ]";
} elseif ($mem_list == "" AND $mod_search == "") {
$links = "";
}
echo ""._YOUHAVE." <a href=\"modules.php?name=Private_Messages\"><b>$numrow</b></a> "._PRIVATEMSG."<br><br>"
."<form action=\"modules.php?name=Private_Messages\" method=\"post\">"
.""._USENDPRIVATEMSG.": <input type=\"text\" name=\"pm_username\" size=\"20\"> $links"
."<input type=\"hidden\" name=\"send\" value=\"1\">"
."</form></center>";
CloseTable();
}
if ($articlecomm == 1) {
echo "<br>";
OpenTable();
echo "<b>"._LAST10COMMENTS." $userinfo[username]:</b><br>";
$sql6 = "SELECT tid, sid, subject FROM ".$prefix."_comments WHERE name='$userinfo[username]' ORDER BY tid DESC LIMIT 0,10";
$result6 = $db->sql_query($sql6);
while($row6 = $db->sql_fetchrow($result6)) {
$tid = $row6[tid];
$sid = $row6[sid];
$subject = $row6[subject];
echo "<li><a href=\"modules.php?name=News&file=article&thold=-1&mode=flat&order=0&sid=$sid#$tid\">$subject</a><br>";
}
CloseTable();
}
echo "<br>";
OpenTable();
echo "<b>"._LAST10SUBMISSIONS." $userinfo[username]:</b><br>";
$sql7 = "SELECT sid, title FROM ".$prefix."_stories WHERE informant='$userinfo[username]' ORDER BY sid DESC LIMIT 0,10";
$result7 = $db->sql_query($sql7);
while($row7 = $db->sql_fetchrow($result7)) {
$sid = $row7[sid];
$title = $row7[title];
echo "<li><a href=\"article.html$sid\">$title</a><br>";
}
CloseTable();
include("footer.php");
}
function main($user) {
global $stop, $module_name, $redirect, $mode, $t, $f;
if(!is_user($user)) {
include("header.php");
if ($stop) {
OpenTable();
echo "<center><font class=\"title\"><b>"._LOGININCOR."</b></font></center>\n";
CloseTable();
echo "<br>\n";
} else {
OpenTable();
echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
CloseTable();
echo "<br>\n";
}
if (!is_user($user)) {
OpenTable();
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">\n"
."<b>"._USERLOGIN."</b><br><br>\n"
."<table border=\"0\"><tr><td>\n"
.""._NICKNAME.":</td><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\"></td></tr>\n"
."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"user_password\" size=\"15\" maxlength=\"20\"></td></tr>\n";
if (extension_loaded("gd")) {
echo "<tr><td colspan='2'>"._SECURITYCODE.": <img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n"
."<tr><td colspan='2'>"._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"></td></tr>\n"
."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
}
echo "</table><input type=\"hidden\" name=\"redirect\" value=$redirect>\n"
."<input type=\"hidden\" name=\"mode\" value=$mode>\n"
."<input type=\"hidden\" name=\"f\" value=$f>\n"
."<input type=\"hidden\" name=\"t\" value=$t>\n"
."<input type=\"hidden\" name=\"op\" value=\"login\">\n"
."<input type=\"submit\" value=\""._LOGIN."\"></form><br>\n\n"
."<center><font class=\"content\">[ <a href=\"modules.php?name=$module_name&op=pass_lost\">"._PASSWORDLOST."</a> | <a href=\"modules.php?name=$module_name&op=new_user\">"._REGNEWUSER."</a> ]</font></center>\n";
CloseTable();
}
include("footer.php");
} elseif (is_user($user)) {
global $cookie;
cookiedecode($user);
userinfo($cookie[1]);
}
}
function gfx($random_num) {
global $prefix, $db, $module_name;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = ImageCreateFromJPEG("modules/$module_name/images/code_bg.jpg");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/jpeg");
ImageString ($image, 5, 12, 2, $code, $text_color);
ImageJPEG($image, '', 75);
ImageDestroy($image);
die();
}
function new_user() {
global $my_headlines, $module_name, $db;
if (!is_user($user)) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
include("header.php");
OpenTable();
echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
CloseTable();
echo "<br>\n";
OpenTable();
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">\n"
."<b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")<br><br>\n"
."<table cellpadding=\"0\" cellspacing=\"10\" border=\"0\">\n"
//
// Add line for New Field
// ."<tr><td>"._NEWFIELD.":</td><td...etc name=\"user_newfield\"....etc </tr>\n"
//
."<tr><td>"._UUSERNAME.":</td><td><input type=\"text\" name=\"username\" size=\"30\" maxlength=\"25\"></td></tr>\n"
."<tr><td>"._UREALNAME.":</td><td><input type=\"text\" name=\"realname\" size=\"30\" maxlength=\"25\"></td></tr>\n"
."<tr><td>"._COUNTRY.":</td><td>"
."<select name=\"user_country\" value=\"United States\">"
."<option value=\"United States\" SELECTED>United States</option>"
."<option value=\"United Kingdom\">United Kingdom</option>"
."<option value=\"Romania\">Romania</option>"
."<option value=\"Afghanistan\">Afghanistan</option>"
."<option value=\"Albania\">Albania</option>"
."<option value=\"Algeria\">Algeria</option>"
."<option value=\"American Samoa\">American Samoa</option>"
."<option value=\"Andorra\">Andorra</option>"
."<option value=\"Angola\">Angola</option>"
."<option value=\"Anguilla\">Anguilla</option>"
."<option value=\"Antarctica\">Antarctica</option>"
."<option value=\"Antigua And Barbuda\">Antigua And Barbuda</option>"
."<option value=\"Argentina\">Argentina</option>"
."<option value=\"Armenia\">Armenia</option>"
."<option value=\"Aruba\">Aruba</option>"
."<option value=\"Australia\">Australia</option>"
."<option value=\"Austria\">Austria</option>"
."<option value=\"Azerbaijan\">Azerbaijan</option>"
."<option value=\"Bahamas\">Bahamas</option>"
."<option value=\"Bahrain\">Bahrain</option>"
."<option value=\"Bangladesh\">Bangladesh</option>"
."<option value=\"Barbados\">Barbados</option>"
."<option value=\"Belarus\">Belarus</option>"
."<option value=\"Belgium\">Belgium</option>"
."<option value=\"Belize\">Belize</option>"
."<option value=\"Benin\">Benin</option>"
."<option value=\"Bermuda\">Bermuda</option>"
."<option value=\"Bhutan\">Bhutan</option>"
."<option value=\"Bolivia\">Bolivia</option>"
."<option value=\"Bosnia And Herzegowina\">Bosnia And Herzegowina</option>"
."<option value=\"Botswana\">Botswana</option>"
."<option value=\"Bouvet Island\">Bouvet Island</option>"
."<option value=\"Brazil\">Brazil</option>"
."<option value=\"British Indian Ocean Territory\">British Indian Ocean Territory</option>"
."<option value=\"Brunei Darussalam\">Brunei Darussalam</option>"
."<option value=\"Bulgaria\">Bulgaria</option>"
."<option value=\"Burkina Faso\">Burkina Faso</option>"
."<option value=\"Burundi\">Burundi</option>"
."<option value=\"Cambodia\">Cambodia</option>"
."<option value=\"Cameroon\">Cameroon</option>"
."<option value=\"Canada\">Canada</option>"
."<option value=\"Cape Verde\">Cape Verde</option>"
."<option value=\"Cayman Islands\">Cayman Islands</option>"
."<option value=\"Central African Republic\">Central African Republic</option>"
."<option value=\"Chad\">Chad</option>"
."<option value=\"Chile\">Chile</option>"
."<option value=\"China\">China</option>"
."<option value=\"Christmas Island\">Christmas Island</option>"
."<option value=\"Cocos (Keeling) Islands\">Cocos (Keeling) Islands</option>"
."<option value=\"Colombia\">Colombia</option>"
."<option value=\"Comoros\">Comoros</option>"
."<option value=\"Congo\">Congo</option>"
."<option value=\"Cook Islands\">Cook Islands</option>"
."<option value=\"Costa Rica\">Costa Rica</option>"
."<option value=\"Cote D Ivoire\">Cote D Ivoire</option>"
."<option value=\"Croatia\">Croatia</option>"
."<option value=\"Cuba\">Cuba</option>"
."<option value=\"Cyprus\">Cyprus</option>"
."<option value=\"Czech Republic\">Czech Republic</option>"
."<option value=\"Denmark\">Denmark</option>"
."<option value=\"Djibouti\">Djibouti</option>"
."<option value=\"Dominica\">Dominica</option>"
."<option value=\"Dominican Republic\">Dominican Republic</option>"
."<option value=\"East Timor\">East Timor</option>"
."<option value=\"Ecuador\">Ecuador</option>"
."<option value=\"Egypt\">Egypt</option>"
."<option value=\"El Salvador\">El Salvador</option>"
."<option value=\"Equatorial Guinea\">Equatorial Guinea</option>"
."<option value=\"Eritrea\">Eritrea</option>"
."<option value=\"Estonia\">Estonia</option>"
."<option value=\"Ethiopia\">Ethiopia</option>"
."<option value=\"Falkland Islands\">Falkland Islands</option>"
."<option value=\"Faroe Islands\">Faroe Islands</option>"
."<option value=\"Fiji\">Fiji</option>"
."<option value=\"Finland\">Finland</option>"
."<option value=\"France\">France</option>"
."<option value=\"France, Metropolitan \">France, Metropolitan </option>"
."<option value=\"French Guiana\">French Guiana</option>"
."<option value=\"French Polynesia\">French Polynesia</option>"
."<option value=\"French Southern Territories\">French Southern Territories</option>"
."<option value=\"Gabon\">Gabon</option>"
."<option value=\"Gambia\">Gambia</option>"
."<option value=\"Georgia\">Georgia</option>"
."<option value=\"Germany\">Germany</option>"
."<option value=\"Ghana\">Ghana</option>"
."<option value=\"Gibraltar\">Gibraltar</option>"
."<option value=\"Greece\">Greece</option>"
."<option value=\"Greenland\">Greenland</option>"
."<option value=\"Grenada\">Grenada</option>"
."<option value=\"Guadeloupe\">Guadeloupe</option>"
."<option value=\"Guam\">Guam</option>"
."<option value=\"Guatemala\">Guatemala</option>"
."<option value=\"Guinea\">Guinea</option>"
."<option value=\"Guinea-Bissau\">Guinea-Bissau</option>"
."<option value=\"Guyana\">Guyana</option>"
."<option value=\"Haiti\">Haiti</option>"
."<option value=\"Heard And Mc Donald Islands\">Heard And Mc Donald Islands</option>"
."<option value=\"Honduras\">Honduras</option>"
."<option value=\"Hong Kong\">Hong Kong</option>"
."<option value=\"Hungary\">Hungary</option>"
."<option value=\"Iceland\">Iceland</option>"
."<option value=\"India\">India</option>"
."<option value=\"Indonesia\">Indonesia</option>"
."<option value=\"Iran\">Iran</option>"
."<option value=\"Iraq\">Iraq</option>"
."<option value=\"Ireland\">Ireland</option>"
."<option value=\"Israel\">Israel</option>"
."<option value=\"Italy\">Italy</option>"
."<option value=\"Jamaica\">Jamaica</option>"
."<option value=\"Japan\">Japan</option>"
."<option value=\"Jordan\">Jordan</option>"
."<option value=\"Kazakhstan\">Kazakhstan</option>"
."<option value=\"Kenya\">Kenya</option>"
."<option value=\"Kiribati\">Kiribati</option>"
."<option value=\"North Korea\">North Korea</option>"
."<option value=\"South Korea\">South Korea</option>"
."<option value=\"Kuwait\">Kuwait</option>"
."<option value=\"Kyrgyzstan\">Kyrgyzstan</option>"
."<option value=\"Lao Peoples Republic\">Lao Peoples Republic</option>"
."<option value=\"Latvia\">Latvia</option>"
."<option value=\"Lebanon\">Lebanon</option>"
."<option value=\"Lesotho\">Lesotho</option>"
."<option value=\"Liberia\">Liberia</option>"
."<option value=\"Libyan Arab Jamahiriya\">Libyan Arab Jamahiriya</option>"
."<option value=\"Liechtenstein\">Liechtenstein</option>"
."<option value=\"Lithuania\">Lithuania</option>"
."<option value=\"Luxembourg\">Luxembourg</option>"
."<option value=\"Macau\">Macau</option>"
."<option value=\"Macedonia\">Macedonia</option>"
."<option value=\"Madagascar\">Madagascar</option>"
."<option value=\"Malawi\">Malawi</option>"
."<option value=\"Malaysia\">Malaysia</option>"
."<option value=\"Maldives\">Maldives</option>"
."<option value=\"Mali\">Mali</option>"
."<option value=\"Malta\">Malta</option>"
."<option value=\"Marshall Islands\">Marshall Islands</option>"
."<option value=\"Martinique\">Martinique</option>"
."<option value=\"Mauritania\">Mauritania</option>"
."<option value=\"Mauritius\">Mauritius</option>"
."<option value=\"Mayotte\">Mayotte</option>"
."<option value=\"Mexico\">Mexico</option>"
."<option value=\"Micronesia\">Micronesia</option>"
."<option value=\"Moldova\">Moldova</option>"
."<option value=\"Monaco\">Monaco</option>"
."<option value=\"Mongolia\">Mongolia</option>"
."<option value=\"Montserrat\">Montserrat</option>"
."<option value=\"Morocco\">Morocco</option>"
."<option value=\"Mozambique\">Mozambique</option>"
."<option value=\"Myanmar\">Myanmar</option>"
."<option value=\"Namibia\">Namibia</option>"
."<option value=\"Nauru\">Nauru</option>"
."<option value=\"Nepal\">Nepal</option>"
."<option value=\"Netherlands\">Netherlands</option>"
."<option value=\"Netherlands Antilles\">Netherlands Antilles</option>"
."<option value=\"New Caledonia\">New Caledonia</option>"
."<option value=\"New Zealand\">New Zealand</option>"
."<option value=\"Nicaragua\">Nicaragua</option>"
."<option value=\"Niger\">Niger</option>"
."<option value=\"Nigeria\">Nigeria</option>"
."<option value=\"Niue\">Niue</option>"
."<option value=\"Norfolk Island\">Norfolk Island</option>"
."<option value=\"Northern Mariana Islands\">Northern Mariana Islands</option>"
."<option value=\"Norway\">Norway</option>"
."<option value=\"Oman\">Oman</option>"
."<option value=\"Pakistan\">Pakistan</option>"
."<option value=\"Palau\">Palau</option>"
."<option value=\"Palestinian Territory\">Palestinian Territory</option>"
."<option value=\"Panama\">Panama</option>"
."<option value=\"Papua New Guinea\">Papua New Guinea</option>"
."<option value=\"Paraguay\">Paraguay</option>"
."<option value=\"Peru\">Peru</option>"
."<option value=\"Philippines\">Philippines</option>"
."<option value=\"Pitcairn\">Pitcairn</option>"
."<option value=\"Poland\">Poland</option>"
."<option value=\"Portugal\">Portugal</option>"
."<option value=\"Puerto Rico\">Puerto Rico</option>"
."<option value=\"Qatar\">Qatar</option>"
."<option value=\"Reunion\">Reunion</option>"
."<option value=\"Romania\">Romania</option>"
."<option value=\"Russian Federation\">Russian Federation</option>"
."<option value=\"Rwanda\">Rwanda</option>"
."<option value=\"Saint Kitts And Nevis\">Saint Kitts And Nevis</option>"
."<option value=\"Saint Lucia\">Saint Lucia</option>"
."<option value=\"Saint Vincent And The Grenadines\">Saint Vincent And The Grenadines</option>"
."<option value=\"Samoa\">Samoa</option>"
."<option value=\"San Marino\">San Marino</option>"
."<option value=\"Sao Tome And Principe\">Sao Tome And Principe</option>"
."<option value=\"Saudi Arabia\">Saudi Arabia</option>"
."<option value=\"Senegal\">Senegal</option>"
."<option value=\"Seychelles\">Seychelles</option>"
."<option value=\"Sierra Leone\">Sierra Leone</option>"
."<option value=\"Singapore\">Singapore</option>"
."<option value=\"Slovakia\">Slovakia</option>"
."<option value=\"Slovenia\">Slovenia</option>"
."<option value=\"Solomon Islands\">Solomon Islands</option>"
."<option value=\"Somalia\">Somalia</option>"
."<option value=\"South Africa\">South Africa</option>"
."<option value=\"South Georgia\">South Georgia</option>"
."<option value=\"The South Sandwich Islands\">The South Sandwich Islands</option>"
."<option value=\"Spain\">Spain</option>"
."<option value=\"Sri Lanka\">Sri Lanka</option>"
."<option value=\"St Helena\">St Helena</option>"
."<option value=\"St Pierre and Miquelon\">St Pierre and Miquelon</option>"
."<option value=\"Sudan\">Sudan</option>"
."<option value=\"Suriname\">Suriname</option>"
."<option value=\"Svalbard And Jan Mayen Islands\">Svalbard And Jan Mayen Islands</option>"
."<option value=\"Swaziland\">Swaziland</option>"
."<option value=\"Sweden\">Sweden</option>"
."<option value=\"Switzerland\">Switzerland</option>"
."<option value=\"Syrian Arab Republic\">Syrian Arab Republic</option>"
."<option value=\"Taiwan\">Taiwan</option>"
."<option value=\"Tajikistan\">Tajikistan</option>"
."<option value=\"Tanzania\">Tanzania</option>"
."<option value=\"Thailand\">Thailand</option>"
."<option value=\"Togo\">Togo</option>"
."<option value=\"Tokelau\">Tokelau</option>"
."<option value=\"Tonga\">Tonga</option>"
."<option value=\"Trinidad And Tobago\">Trinidad And Tobago</option>"
."<option value=\"Tunisia\">Tunisia</option>"
."<option value=\"Turkey\">Turkey</option>"
."<option value=\"Turkmenistan\">Turkmenistan</option>"
."<option value=\"Turks And Caicos Islands\">Turks And Caicos Islands</option>"
."<option value=\"Tuvalu\">Tuvalu</option>"
."<option value=\"Uganda\">Uganda</option>"
."<option value=\"Ukraine\">Ukraine</option>"
."<option value=\"United Arab Emirates\">United Arab Emirates</option>"
."<option value=\"United Kingdom\">United Kingdom</option>"
."<option value=\"United States\">United States</option>"
."<option value=\"US Minor Outlying Islands\">US Minor Outlying Islands</option>"
."<option value=\"Uruguay\">Uruguay</option>"
."<option value=\"Uzbekistan\">Uzbekistan</option>"
."<option value=\"Vanuatu\">Vanuatu</option>"
."<option value=\"Vatican City State\">Vatican City State</option>"
."<option value=\"Venezuela\">Venezuela</option>"
."<option value=\"Viet Nam\">Viet Nam</option>"
."<option value=\"Virgin Islands (British)\">Virgin Islands (British)</option>"
."<option value=\"Virgin Islands (U.S.)\">Virgin Islands (U.S.)</option>"
."<option value=\"Wallis And Futuna Islands\">Wallis And Futuna Islands</option>"
."<option value=\"Western Sahara\">Western Sahara</option>"
."<option value=\"Yemen\">Yemen</option>"
."<option value=\"Yugoslavia\">Yugoslavia</option>"
."<option value=\"Zaire\">Zaire</option>"
."<option value=\"Zambia\">Zambia</option>"
."<option value=\"Zimbabwe\">Zimbabwe</option>"
."<option value=\"Unknown\">--Other--</option>"
."</select></td></tr>\n"
."<tr><td>"._STATE.":</td><td><input type=\"text\" name=\"user_state\" size=\"30\" maxlength=\"35\"></td></tr>\n"
."<tr><td>"._EMAIL.":</td><td><input type=\"text\" name=\"user_email\" size=\"30\" maxlength=\"255\"></td></tr>\n"
."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"user_password\" size=\"11\" maxlength=\"40\"></td></tr>\n"
."<tr><td>"._RETYPEPASSWORD.":</td><td><input type=\"password\" name=\"user_password2\" size=\"11\" maxlength=\"40\"><br><font class=\"tiny\">("._BLANKFORAUTO.")</font></td></tr>\n";
if (extension_loaded("gd")) {
echo "<tr><td>"._SECURITYCODE.":</td><td><img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n"
."<tr><td>"._TYPESECCODE.":</td><td><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"></td></tr>\n"
."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
}
echo "<tr><td colspan='2'>\n"
."<input type=\"hidden\" name=\"op\" value=\"new user\">\n"
."<input type=\"submit\" value=\""._NEWUSER."\">\n"
."</td></tr></table>\n"
."</form>\n"
."<br>\n"
.""._YOUWILLRECEIVE."<br><br>\n"
.""._COOKIEWARNING."<br>\n"
.""._ASREGUSER."<br>\n"
."<ul>\n"
."<li>"._ASREG1."\n"
."<li>"._ASREG3."\n"
."<li>"._ASREG4."\n"
."<li>"._ASREG5."\n";
$handle=opendir('themes');
while ($file = readdir($handle)) {
if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) {
$thmcount++;
}
}
closedir($handle);
if ($thmcount > 1) {
echo "<li>"._ASREG6."\n";
}
$sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$custom_title = $row[custom_title];
if ($custom_title != "") {
echo "<li>"._ACCESSTO." $custom_title\n";
}
}
$sql = "SELECT title FROM ".$prefix."_blocks WHERE active='1' AND view='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$b_title = $row[title];
if ($b_title != "") {
echo "<li>"._ACCESSTO." $b_title\n";
}
}
if (is_active("Journal")) {
echo "<li>"._CREATEJOURNAL."\n";
}
if ($my_headlines == 1) {
echo "<li>"._READHEADLINES."\n";
}
echo "<li>"._ASREG7."\n"
."</ul>\n"
.""._REGISTERNOW."<br>\n"
.""._WEDONTGIVE."<br><br>\n"
."<center><font class=\"content\">[ <a href=\"modules.php?name=$module_name\">"._USERLOGIN."</a> | <a href=\"modules.php?name=$module_name&op=pass_lost\">"._PASSWORDLOST."</a> ]</font></center>\n";
CloseTable();
include("footer.php");
} elseif (is_user($user)) {
global $cookie;
cookiedecode($user);
userinfo($cookie[1]);
}
}
function pass_lost() {
global $user, $module_name;
if (!is_user($user)) {
include("header.php");
OpenTable();
echo "<center><font class=\"title\"><b>"._USERREGLOGIN."</b></font></center>\n";
CloseTable();
echo "<br>\n";
OpenTable();
echo "<b>"._PASSWORDLOST."</b><br><br>\n"
.""._NOPROBLEM."<br><br>\n"
."<form action=\"modules.php?name=$module_name\" method=\"post\">\n"
."<table border=\"0\"><tr><td>\n"
.""._NICKNAME.":</td><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\"></td></tr>\n"
."<tr><td>"._CONFIRMATIONCODE.":</td><td><input type=\"text\" name=\"code\" size=\"11\" maxlength=\"10\"></td></tr></table><br>\n"
."<input type=\"hidden\" name=\"op\" value=\"mailpasswd\">\n"
."<input type=\"submit\" value=\""._SENDPASSWORD."\"></form><br>\n"
."<center><font class=\"content\">[ <a href=\"modules.php?name=$module_name\">"._USERLOGIN."</a> | <a href=\"modules.php?name=$module_name&op=new_user\">"._REGNEWUSER."</a> ]</font></center>\n";
CloseTable();
include("footer.php");
} elseif(is_user($user)) {
global $cookie;
cookiedecode($user);
userinfo($cookie[1]);
}
}
function logout() {
global $prefix, $db, $user, $cookie, $redirect;
cookiedecode($user);
$r_uid = $cookie[0];
$r_username = $cookie[1];
setcookie("user");
$db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$r_username'");
$db->sql_query("DELETE FROM ".$prefix."_bbsessions WHERE session_user_id='$r_uid'");
$user = "";
include("header.php");
OpenTable();
if ($redirect != "") {
echo "<META HTTP-EQUIV=\"refresh\" content=\"3;URL=modules.php?name=$redirect\">";
} else {
echo "<META HTTP-EQUIV=\"refresh\" content=\"3;URL=index.php\">";
}
echo "<center><font class=\"option\"><b>"._YOUARELOGGEDOUT."</b></font></center>";
CloseTable();
include("footer.php");
}
function mail_password($username, $code) {
global $sitename, $adminmail, $nukeurl, $user_prefix, $db, $module_name;
$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
if(!$result) {
include("header.php");
OpenTable();
echo "<center>"._SORRYNOUSERINFO."</center>";
CloseTable();
include("footer.php");
} else {
$host_name = $_SERVER["REMOTE_ADDR"];
$row = $db->sql_fetchrow($result);
$user_email = $row[user_email];
$user_password = $row[user_password];
$areyou = substr($user_password, 0, 10);
if ($areyou==$code) {
$newpass=makepass();
$message = ""._USERACCOUNT." '$username' "._AT." $sitename "._HASTHISEMAIL." "._AWEBUSERFROM." $host_name "._HASREQUESTED."\n\n"._YOURNEWPASSWORD." $newpass\n\n "._YOUCANCHANGE." $nukeurl/modules.php?name=$module_name\n\n"._IFYOUDIDNOTASK."";
$subject = ""._USERPASSWORD4." $username";
mail($user_email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
/* Next step: add the new password to the database */
$cryptpass = md5($newpass);
$query = "UPDATE ".$user_prefix."_users SET user_password='$cryptpass' WHERE username='$username'";
if (!$db->sql_query($query)) {
echo ""._UPDATEFAILED."";
}
include ("header.php");
OpenTable();
echo "<center>"._PASSWORD4." $username "._MAILED."<br><br>"._GOBACK."</center>";
CloseTable();
include ("footer.php");
/* If no Code, send it */
} else {
$sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
if(!$result) {
include ("header.php");
OpenTable();
echo "<center>"._SORRYNOUSERINFO."</center>";
CloseTable();
include ("footer.php");
} else {
$host_name = $_SERVER["REMOTE_ADDR"];
$row = $db->sql_fetchrow($result);
$user_email = $row[user_email];
$user_password = $row[user_password];
$areyou = substr($user_password, 0, 10);
$message = ""._USERACCOUNT." '$username' "._AT." $sitename "._HASTHISEMAIL." "._AWEBUSERFROM." $host_name "._CODEREQUESTED."\n\n"._YOURCODEIS." $areyou \n\n"._WITHTHISCODE." $nukeurl/modules.php?name=$module_name&op=pass_lost\n"._IFYOUDIDNOTASK2."";
$subject=""._CODEFOR." $username";
mail($user_email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
include ("header.php");
OpenTable();
echo "<center>"._CODEFOR." $username "._MAILED."<br><br>"._GOBACK."</center>";
CloseTable();
include ("footer.php");
}
}
}
}
function docookie($setuid, $setusername, $setpass, $setstorynum, $setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax) {
$info = base64_encode("$setuid:$setusername:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax");
setcookie("user","$info",time()+2592000);
}
function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {
global $setinfo, $user_prefix, $db, $module_name, $pm_login, $prefix;
include("config.php");
$sql = "SELECT user_password, user_id, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
$setinfo = $db->sql_fetchrow($result);
$forward = ereg_replace("redirect=", "", "$redirect");
if (ereg("privmsg", $forward)) {
$pm_login = "active";
}
if (($db->sql_numrows($result)==1) AND ($setinfo[user_id] != 1) AND ($setinfo[user_password] != "")) {
$dbpass=$setinfo[user_password];
$non_crypt_pass = $user_password;
$old_crypt_pass = crypt($user_password,substr($dbpass,0,2));
$new_pass = md5($user_password);
if (($dbpass == $non_crypt_pass) OR ($dbpass == $old_crypt_pass)) {
$db->sql_query("UPDATE ".$user_prefix."_users SET user_password='$new_pass' WHERE username='$username'");
$sql = "SELECT user_password FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$dbpass = $row[user_password];
}
if ($dbpass != $new_pass) {
Header("Location: modules.php?name=$module_name&stop=1");
return;
}
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check) {
Header("Location: modules.php?name=$module_name&stop=1");
die();
} else {
docookie($setinfo[user_id], $username, $new_pass, $setinfo[storynum], $setinfo[umode], $setinfo[uorder], $setinfo[thold], $setinfo[noscore], $setinfo[ublockon], $setinfo[theme], $setinfo[commentmax]);
$uname = $_SERVER["REMOTE_ADDR"];
$db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$uname' AND guest='1'");
}
if ($pm_login != "") {
Header("Location: modules.php?name=Private_Messages&file=index&folder=inbox");
exit;
}
if ($redirect == "" ) {
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
} else if ($mode == "") {
Header("Location: modules.php?name=Forums&file=$forward");
} else if ($t !="") {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&t=$t");
} else {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&f=$f");
}
} else {
Header("Location: modules.php?name=$module_name&stop=1");
}
}
function edituser() {
global $u
_________________ It is not our abilities which decide what we truly are, it is our choices.
jib_intelli
Captain
Joined: Jun 10, 2004
Posts: 338
Location: Lucknow, India
Posted:
Wed Aug 04, 2004 10:32 pm
Even after disabling the $gfx_chk variable to 0, the security graphic is being shown as a red cross in the Your_Account module, as a result users cannot log in. Please help me fast.
_________________ It is not our abilities which decide what we truly are, it is our choices.
HalJordan
Support Staff
Joined: Aug 07, 2004
Posts: 1117
Location: Somewhere around Hunan, China
Posted:
Tue Aug 10, 2004 10:09 pm
I installed php-Nuke 7.3 last week (for the first time ever, I might add) and got nearly everything up and running pretty quickly. Except for that &%$^%$ security code, which I disabled in config.php until I could find the solution. It seems a lot of people have this problem, so much that it took me a looong time to find the solution.
Well, analyze.php showed me the problem today -- JPEG support is not enabled on my ISP's server's GD installation. I followed the pointers offered here (see below) and all is well. So, I am one happy newbie. Thank you Raven, chatserv, Humpa and anyone else involved in solving this mystery.
--------------------------------
chatserv wrote:
Here's a workaround by Humpa :
You can use a png of a gif .. the code is easily modified.
To use a png, replace the function gfx in the admin.php with this:
Code:
function gfx($random_num) {
global $prefix, $db;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = imagecreatefrompng("images/admin/code_bg.png");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/png");
ImageString ($image, 5, 12, 2, $code, $text_color);
Imagepng($image, '', 75);
ImageDestroy($image);
die();
}
And, replace the function gfx in the modules/Your_Account/index.php with this:
Code:
function gfx($random_num) {
global $prefix, $db, $module_name;;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = imagecreatefrompng("modules/$module_name/images/code_bg.png");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/png");
ImageString ($image, 5, 12, 2, $code, $text_color);
Imagepng($image, '', 75);
ImageDestroy($image);
die();
}
Upload the code_bg.png to the images/admin folder, and also the modules/Your_Account/images folder.
If you cant use png files either, then try a gif.
To use a gif, replace the function gfx in the admin.php with this:
Code:
function gfx($random_num) {
global $prefix, $db;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = imagecreatefromgif("images/admin/code_bg.gif");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/gif");
ImageString ($image, 5, 12, 2, $code, $text_color);
Imagegif($image, '', 75);
ImageDestroy($image);
die();
}
And, replace the function gfx in the modules/Your_Account/index.php with this:
Code:
function gfx($random_num) {
global $prefix, $db, $module_name;;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = imagecreatefromgif("modules/$module_name/images/code_bg.gif");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/gif");
ImageString ($image, 5, 12, 2, $code, $text_color);
Imagegif($image, '', 75);
ImageDestroy($image);
die();
}
Upload the code_bg.gif to the images/admin folder, and also the modules/Your_Account/images folder.
_________________ Obedezco, pero no cumplo.
Proprietor, www.computernewbie.info
Support staff, www.nukecops.com
NealT
Nuke Cadet
Joined: Aug 09, 2004
Posts: 5
Posted:
Wed Aug 11, 2004 4:48 pm
Raven wrote:
If your site is hosted then your host must install it.
If this is a windows server then uncomment the ;php_gd2.dll setting and restart your server.
If it's linux, then you have to recompile php with gd and jpg support.
BINGO! Thanks Raven...I had not uncommented the setting and once I did, it resolved my problem...
Malkavian
Nuke Soldier
Joined: Sep 09, 2004
Posts: 34
Posted:
Thu Sep 09, 2004 7:20 am
I downloaded the sitevisitors block for v7.0 from phpnuke.org and the code_bg.gif/jpg file was NOT included in the package.
I've since uploaded it to the appropriate dir's both gif and jpg.
I've deleted the the blank lines that were inluded in my languages file after adding the additional definitions and all the other php files mentioned throughout this thread. ("alotta" reading)
These were the results from analyze.
GD Library Information Type Value
GD Version bundled (2.0.23 compatible)
FreeType Support No
T1Lib Support No
GIF Read Support Yes
GIF Create Support No
JPG Support Yes
PNG Support Yes
WBMP Support Yes
XBM Support Yes
· Admin Security Image Found: images/admin/code_bg.jpg
· Your_Account Security Image Found: modules/Your_Account/images/code_bg.jpg.
And the security graphic is visable in analyze.php.
HELP.
Also, I have installed PhPNuke 7.5 and analyze also told me I need to upgrade my phpBB to 2.0.4. Presently it is at 2.0.1.
Does anyone have a url for an upgrade for v7.5?
Posted the link to my analyze in the next post.
Thanks in advance,
- Malkavian
Last edited by Malkavian on Thu Sep 09, 2004 4:26 pm; edited 1 time in total
Goto page Previous 1 , 2 , 3 ... 8 , 9 , 10 , 11 Next
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum