\n
\nYour new password has been sent to your email address at ".$half_email."
\n\n"; } // ********************************************* NEW CODE MARCH 2006 ************************************************** // ********************************************* NEW CODE MARCH 2006 ************************************************** else if ($cmd=="enc") { /* openLink(); $sql="select password, id from userInfo"; $res=MYSQL_QUERY($sql); while($data=MYSQL_FETCH_ASSOC($res)) { $newPass=crypt($data['password'], $data['password']); $sql2="update userInfo set encPassword='".$newPass."' where id=".$data['id']; $res2=MYSQL_QUERY($sql2); print $sql2; } */} // ********************************************* NEW CODE MARCH 2006 ************************************************** else if($cmd=="logout") { // Only do this is the user really is logged in, after all. if($_COOKIE['session']) { logout(); } $_COOKIE['usr_name']=""; $_COOKIE['session']=""; $_COOKIE['usr_level']=""; $_COOKIE['usr_id']=""; } else if($cmd=="reg") { openLink(); $sql="select password, id from userInfo where usr_name='".addslashes($_REQUEST['usr_name'])."'"; $res=MYSQL_query($sql); if(mysql_num_rows($res)==0) // If that failed, then there is not a user by that name, so it is ok to go ahead and make one. { // choose new validation code if(!$wordList=fopen("./dictionary.txt","r")) debug("Error opening file!"); fseek($wordList, rand(0,301272)); fgets($wordList, 100); $word=ereg_replace("[^a-z]","",fgets($wordList, 100)); if(!fclose($wordList)) debug("Error closing file!"); $valCode=rand(0,666)."_".rand(0,666)."_".$word."_".rand(0,666); // The username is not in the database. Add the user info, set the cookies & session, and log the user in. $ip_address=$_SERVER['REMOTE_ADDR']; if($_REQUEST['remember']=="yes") $sess=2147483647; else $sess=0; if ($_REQUEST['mailing_list']=="yes") $mailing_list=1; else $mailing_list=0; // ********************************************* NEW CODE MARCH 2006 ************************************************** $encPass=crypt($_REQUEST['usr_pass1'],$_REQUEST['usr_pass1']); $sql="insert into userInfo (usr_name, usr_real_name, password, encPassword, usr_email, usr_home, usr_current,usr_url, usr_info, mailing_list, date_created, ip_address, session_length, validation) values ('".addslashes($_REQUEST['usr_name'])."','".addslashes($_REQUEST['name_first'])." ".addslashes($_REQUEST['name_last'])."','".addslashes($_REQUEST['usr_pass1'])."','".$encPass."', '".addslashes($_REQUEST['usr_email'])."','".addslashes($_REQUEST['usr_home'])."','".addslashes($_REQUEST['usr_current'])."','".addslashes($_REQUEST['usr_url'])."','".addslashes($_REQUEST['usr_info'])."', ".$mailing_list.", ".mktime().", '".$ip_address."', ".$sess.", '".$valCode."')"; $TEMP_PRI=$sql; // ********************************************* NEW CODE MARCH 2006 ************************************************** $res=MYSQL_QUERY($sql) or debug("Error in $sql:".mysql_error($sql)); $usr_id=mysql_insert_id(); storeUserFavorites($_REQUEST['band1'], "userBands", $usr_id); storeUserFavorites($_REQUEST['band2'], "userBands",$usr_id); storeUserFavorites($_REQUEST['band3'], "userBands",$usr_id); storeUserFavorites($_REQUEST['band4'], "userBands",$usr_id); storeUserFavorites($_REQUEST['band5'], "userBands",$usr_id); storeUserFavorites($_REQUEST['artist1'], "userArtists",$usr_id); storeUserFavorites($_REQUEST['artist2'], "userArtists",$usr_id); storeUserFavorites($_REQUEST['artist3'], "userArtists",$usr_id); // email code to user $msg="Here is your registration code from indieaddict.com. Welcome to the Addiction!\n--------------------\n\nTo confirm your new account, please either log in to www.indieaddict.com and utilize this string:\n".$valCode."\n\n...or simply visit the following url:\nhttp://www.indieaddict.com/register.php?cmd=val2&code=".$valCode."&usr_name=".$_REQUEST['usr_name']; mail($_REQUEST['usr_email'], "[[IndieAddict]] New Account Created!",$msg, "From: messagebot@indieaddict.com"); $GLOBALS['error'].="An email containing your account validation code has been sent to the address you provided. Please check your email and then follow the instructions we've sent to confirm your new account. Thanks!
\nPage Sponsor
\n"; // Print 120 x 240 pixel banner $phpAds_raw = view_raw ('zone:2', 0, '', '', '0', $phpAds_context); echo $phpAds_raw['html']; } ?>Page Sponsor
| Thread.Title | Creator | Posts | Last.Post |
| 25) print "Page ".($_REQUEST['threadPage']+1)." of ".(floor($totalThreads/25)+1); ?> | ||||
| <- Previous | \n"; else print "<- Previous | \n"; print ""; for($i=1;$i<=(($totalThreads/25)+1);$i++) { print "[$i] "; } print " | \n"; if($_REQUEST['threadPage']<(($totalThreads/25)-1)) print "Next -> | \n"; else print "Next -> | \n"; } ?>