Please choose a different username..."; require("my.query.fpd"); header("LOCATION: register.fpd?error=$error&action=$action"); exit(); } if(!$_REQUEST['regusername'] || !$_REQUEST['regemail'] || ($_REQUEST['regemail'] != $_REQUEST['confirmemail']) || !$_REQUEST['regpassword'] || ($_REQUEST['regpassword'] != $_REQUEST['confirmpassword'])) { $error="
Error: One of the required fields are not filled in, or are incorrect. Please check them."; require("my.query.fpd"); header("LOCATION: register.fpd?error=$error&action=$action"); exit(); } $_REQUEST['regpassword'] = md5($_REQUEST['regpassword']); $usernamecheck=$sql->query_first("SELECT username FROM iworks_users WHERE strlower='".strlower($_REQUEST['regusername'])."'"); if($usernamecheck['username']) { $output="That name is already registered in our database."; $link="register.fpd?action=$action"; require("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } $sql->query("INSERT INTO iworks_users (username,strlower,userpassword,useremail,regemail,regdate,signature,homepage,aim,icq,yahoo,location,interests,occupation) VALUES ('".addslashes($_REQUEST['regusername'])."', '".strlower($_REQUEST['regusername'])."', '".addslashes($_REQUEST['regpassword'])."', '".addslashes($_REQUEST['regemail'])."', '".addslashes($_REQUEST['regmail'])."', '".time()."', '".addslashes($_REQUEST['signature'])."', '".addslashes($_REQUEST['homepage'])."', '".addslashes($_REQUEST['aim'])."', '".addslashes($_REQUEST['icq'])."', '".addslashes($_REQUEST['yahoo'])."', '".addslashes($_REQUEST['location'])."', '".addslashes($_REQUEST['interests'])."', '".addslashes($_REQUEST['occupation'])."')"); $sql->query("INSERT INTO db_users (username,userpassword,useremail,regemail,groupid,regdate,styleid,siggy,homepage,aim,icq,yahoo,location,interests,occupation,activation,activationcode,allowadminemails,sendmailposts,allowpms,sendmailpms,showsigs,showavatars,usexcode) VALUES ('".addslashes($_REQUEST['regusername'])."','".addslashes($_REQUEST['regpassword'])."', '".addslashes($_REQUEST['regemail'])."','".addslashes($_REQUEST['regmail'])."', '3','$time','".$_REQUEST['defaulttheme']."','".addslashes($_REQUEST['signature'])."', '".addslashes($_REQUEST['homepage'])."','".addslashes($_REQUEST['aim'])."', '".addslashes($_REQUEST['icq'])."','".addslashes($_REQUEST['yahoo'])."', '".addslashes($_REQUEST['location'])."','".addslashes($_REQUEST['interests'])."', '".addslashes($_REQUEST['occupation'])."','".$conf['reg_type']."','$regcode','1', '1','1','1','1','1','1')"); require("./file_functions.fpd"); create_directory("./!users/userdata/".$_REQUEST['regusername']."/"); $_REQUEST['regusername'] = str_replace(" ","",$_REQUEST['regusername']); $_REQUEST['regusername'] = strtolower($_REQUEST['regusername']); noavatar($_REQUEST['regusrename']); create_directory("./!users/gallery/".$_REQUEST['regusername']."/"); copy("!system/index.fpd","!users/gallery/".$_REQUEST['regusername']."/index.fpd"); copy("!users/avatars/.gif","!users/avatars/".$_REQUEST['regusername'].".gif"); @chmod("!users/gallery/".$_REQUEST['regusername']."/index.fpd",0777); $output="Thank you for registering. You may begin submitting artwork!"; $link="index.fpd"; require("my.query.fpd"); eval("dooutput(\"".gettemplate("redirect")."\");"); exit(); } require ("my.query.fpd"); eval("dooutput(\"".gettemplate("register")."\");"); } ?>