Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
50mmla
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
//var/www/50mmla/register_down061606.php
<?php include_once('includes/static/configure.php'); include_once('includes/static/util.php'); include_once('includes/static/dbcon.php'); include_once('includes/static/gdimg.php'); include_once('includes/static/sessions.php'); include_once('includes/appTop.php'); if(isset($_REQUEST['refurl'])){ $refurl = $_REQUEST['refurl']; }else{ $refurl = "/"; } if(isset($_REQUEST['register'])){ $email = $_REQUEST['email']; $url = $_REQUEST['website']; $uname = strip_tags(trim($_REQUEST['username'])); $password = $_REQUEST['password']; $profile = get_html_text($_REQUEST['profile']); $ip = get_client_ip(); $cur_file = $_FILES['file']['name']; $cur_temp = $_FILES['file']['tmp_name']; $cur_mime = $_FILES['file']['type']; $cur_size = $_FILES['file']['size']; $cur_error = $_FILES['file']['error']; $unique = true; //first check for unique name $sql = "SELECT user_id FROM 50mm_users WHERE username ='$uname'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } if($db->sql_numrows($result) > 0){ $unique = false; } $sql = "SELECT user_id FROM 50mm_users WHERE email ='$email'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } if($db->sql_numrows($result) > 0){ $unique = false; } if($unique){ //username is unique so add this user //store profile image on the server $unique_name = ""; $valid = validate_content($cur_error,$cur_mime,$cur_size,$cur_file,PROFILE_MAX_KB); if($valid['result']){ $type = explode("/",$cur_mime); $cur_type = trim($type[0]); $unique_name = get_unique_filename($cur_file); $image_info = getimagesize($cur_temp); //check to see if image needs resizing if(($image_info[0] > PROFILE_IMG_WIDTH) || ($image_info[1] > PROFILE_IMG_HEIGHT)){ //create image res $gd = new gd_img($cur_mime,$cur_temp); if(!$gd->img_id){ die($gd->gd_error);} //scale image $id = $gd->gd_scale_img(PROFILE_IMG_WIDTH,PROFILE_IMG_WIDTH,IMG_QUALITY); if(!$id){ die($gd->gd_error);} //create image $res = $gd->gd_create_img($id,ROOT_DIR.PROFILE_IMG_DIR.$unique_name); if(!$res){ die($gd->gd_error);} }else{ if (!copy($cur_temp, ROOT_DIR.PROFILE_IMG_DIR.$unique_name)) { die("Failed Image Upload"); } } } $sql = "INSERT INTO 50mm_users (user_type,email,username,password,image,profile,url,ip,verified,entry_time) VALUES ('WEB','$email','$uname','$password','$unique_name','$profile','$url','$ip',0,NOW())"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "SELECT LAST_INSERT_ID() AS user_id"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); $uid = $row['user_id']; //send email $query = "uid=$uid&uname=$uname&refurl=$refurl"; $link = ROOT_URL."/login.php?id=".base64_encode($query); $link = "<a href=\"$link\">$link</a>"; $body = "Please click the link below to complete registration for ".SITE_TITLE."<br><BR>Depending on your email program, you may need to COPY and paste the ENTIRE link into a new browser window.<br><br>"; $body.= "Username: ".$uname."<br>"; $body.= "Password: ".$password."<br>"; $body.= $link; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "To: ".$email." <".$email.">\n"; $headers .= "From: ".SITE_TITLE." <".ADMIN_EMAIL.">\r\n"; $mresult = mail($email,SITE_TITLE,$body,$headers); if(!$mresult){ die("Unable to send email notification!"); } $vendor_headers = "From: ".SITE_TITLE." <".ADMIN_EMAIL.">\r\n"; $vendor_register = "general_registration@50mmlosangeles.com"; mail($vendor_register,'General Registration',$body,$vendor_headers); header("Location: regSuccess.php"); exit(); }else{ session_destroy(); session_write_close(); $url = append_query($_SERVER['PHP_SELF'],"errorCode",1); $url = append_query($url,"refurl",$refurl); header("Location: $url"); exit(); } } $pg_name = basename($_SERVER['PHP_SELF']); include_once('includes/header.php'); $err = ""; if(isset($_REQUEST['errorCode'])){ $errorCode = $_REQUEST['errorCode']; if($errorCode == 1){ $err ="<div class=\"error\">That username or email is already in our records. Please try another one.</div>"; } } ?> <script>registerDivs = new Array('username','email','password');</script> <form action="<?echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" onSubmit="return validateForm(this,registerDivs,'errorRegister');"> <table cellspacing="0" cellpadding="4" border="0"> <tr> <td colspan="2" width="500"><span class="title">New user? Register for free...</span><br><br>Registered users must abide by the rules and policies detailed below. By registering, you declare that you are over the age of 18. <br><br>Although the administrators and editors of 50mm Los Angeles may attempt to keep all objectionable content and messages off this website and forum, it is impossible for us to review everything. All content expresses the views of the authors, and not 50mm Los Angeles. We have the right to remove, edit, move or delete anything for any reason. </td> </tr> <tr> <td align="right">Valid Email Address:<span id="erremail" class="error" style="visibility:hidden;"> *</span></td> <td><input type="text" name="email" value="" class="field" maxlength="120"></td> </tr> <tr> <td align="right">Your Username:<span id="errusername" class="error" style="visibility:hidden;"> *</span></td> <td><input type="text" name="username" value="" class="field" maxlength="30"></td> </tr> <tr> <td align="right">Choose a Password:<span id="errpassword" class="error" style="visibility:hidden;"> *</span></td> <td><input type="password" name="password" value="" class="field" maxlength="30"></td> </tr> <tr> <td align="right">Website:<em>(optional)</em></td> <td><input type="text" name="website" value="http://" class="field"></td> </tr> <tr> <td align="right">Your Profile Image:<em>(optional)</em></td> <td><input type="file" name="file" class="field"></td> </tr> <tr valign="top"> <td align="right">Manifesto:<em>(optional)</em></td> <td><textarea class="body" name="profile" style="width: 400px; height: 200px;"></textarea></td> </tr> <tr> <td> </td> <td width="400"> IMPORTANT DISCLAIMER!!: By clicking the Register button below, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws. All information on 50mmLosAngeles.com cannot be used in court or used as evidence to encriminate an individual and or group of individuals. All information on this site cannot be used by law inforcement or any other anti-graffiti group(s). By clicking the Register button below, you are agreeing to not sue the owners and editors of 50mmLosAngeles.com for anything that goes on in this forum and or website for any reason. You agree that the owners and editors of 50mmLosAngeles.com are not and will not be held responsible for anything that is posted on this website or in the forum. If you do not agree to these terms, leave now. <br><br><input name="register" type="submit" class="button" value="Register"><br> <?echo $err?> <div id="errorRegister" class="error" style="visibility:hidden;">Please correct the fields marked by *</div> </td> </tr> </table> <input name="refurl" value="<?echo $refurl?>" type="hidden"> </form> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>