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/contest.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['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 email $sql = "SELECT email FROM 50mm_contest 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){ $sql = "INSERT INTO 50mm_contest (email,ip,entry_time) VALUES ('$email','$ip',NOW())"; 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 = "Thanks for entering the 50mm Los Angeles contest. If a few weeks winners will be randomly chosen and notified via email of where to pick up their prizes. Stay Tuned and good luck!<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." Contest<contest@50mmlosangeles.com>\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 = "contest@50mmlosangeles.com"; mail($vendor_register,$_SESSION['username'],$body,$vendor_headers); header("Location: contestSuccess.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 ="<table><tr><td width=\"500\"><div class=\"error\">That email address has already successfully been entered into this contest. Winners will be notified by email. Good Luck!</div></td></tr></table>"; } } ?> <script>registerDivs = new Array('email');</script> <form action="<?echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" onSubmit="return validateForm(this,registerDivs,'errorRegister');" name="emailForm"> <?echo $err?> <table width="695" cellspacing="0" cellpadding="4" border="0"> <tr> <td><span class="title">50mm Los Angeles random give some shit away contest. Enter to WIN.</span><br> <!--<span class="body">Enter the contest yo.<BR><BR></span>--><br> <table border="0" cellspacing="0" cellpadding="5"> <tr> <td align="right" valign="middle">To enter this contest, you must provide a valid email address:<br>(Winners will receive notice via email.)</td> <td align="left" valign="middle"><span id="erremail" class="error" style="visibility:hidden;"> *</span> <input type="text" name="email" onfocus="if (this.value == this.defaultValue) this.value = '';" size="32" align="left" value="enter your email here..." class="contestfield" maxlength="160"> <input name="register" type="submit" class="contestbutton" value="Enter the Contest!"></td> </tr> </table> </td> </tr> <tr> <td width="350"><div id="errorRegister" class="error" style="visibility:hidden;">OOPS: The email address you entered does not appear to be valid. Please try again. </div></td> </tr> </td> </tr> </table> <input name="refurl" value="<?echo $refurl?>" type="hidden"> </form> <? //content $sql = "SELECT page_body FROM 50mm_pages WHERE page_name ='contest'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $row = $db->sql_fetchrow($result); echo stripslashes($row['page_body']); ?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>