champbronc2 Posted October 29, 2008 Share Posted October 29, 2008 <? session_start(); ?> <? include('header'); ?> <? if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"])) { ?> <h3>Convert to Ads/Cash/Premium Membership</h3> <br> <div align="center"><a href="convert.php?convert=ads"><b>Convert to Ads</b></a><br> Advertise on <? include('sitename.php'); ?> <br><br> <a href="convert.php?convert=cash"><b>Convert to Cash via PayPal or Check or AlertPay (if by check you must have $20!)</b></a><br> Get CASH via AlertPay/PayPal/Check. You must earn at least $<? require('config.php'); $sql = "SELECT * FROM config WHERE item='payment' and howmany='1'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); mysql_close($con); echo $row["price"]; ?>. <br><br> <div align="center"><a href="convertpremium.php"><b>Convert to Premium Membership</b></a><br> Convert your balance and upgrade to premium membership.</div> <br><br> <? if ($_GET["convert"]=="cash") { $user=uc($_COOKIE["usNick"]); require('config.php'); $sql = "SELECT * FROM users WHERE username='$user'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $root=$row["money"]; $sqle = "SELECT * FROM config WHERE item='payment' and howmany='1'"; $resulte = mysql_query($sqle); $rowe = mysql_fetch_array($resulte); mysql_close($con); $price=$rowe["price"]; if ($root<$price){ echo "<center><b>Whoops, you only have $".$row["money"]." You must earn at least $".$price." to request payment via AlertPay/PayPal.</b></center>"; }else{ echo "<center><b>After you request for payment your account will be audited to make sure you aren't violating the TOS.<br>A confirmation email has been sent to your PayPal/AlertPay email address to confirm its validity. You must confirm or you will not receive payment.</b></center>"; $username=$row["username"]; require('config.php'); $checkuser = mysql_query("SELECT username FROM payme WHERE username='$username'"); $username_exist = mysql_num_rows($checkuser); mysql_close($con); if ($username_exist>0) { echo "<br><center><b>Your payment is being proccesed. Processing time: 48 hours if payout is via AlertPay/PayPal, up to 14 days if payout is via Check. (it all depends on the post office)<br>A confirmation email has been sent to your PayPal/AlertPay email address to confirm its validity. You must confirm or you will not receive payment.</b></center>"; }else{ $password=$row["password"]; $email=$row["email"]; $pemail=$row["pemail"]; $country=$row["country"]; $money=$row["money"]; $paymentmethod=$row["paymentmethod"]; $laip=getRealIP(); require('config.php'); function createRandomPassword() { $chars = "abcdefghijkmnopqrstuvwxyz023456789"; srand((double)microtime()*1000000); $i = 0; $pass = '' ; while ($i <= 7) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } // Usage $password69 = createRandomPassword(); $emailget = "SELECT pemail FROM users WHERE username='$username'"; $pemail6 = mysql_query($emailget); $email8= mysql_fetch_array($pemail6); $code = md5($password69); $query18 = "INSERT INTO `payme` (username, pasword, email, pemail, country, money, paymentmethod, ip, ccode) VALUES('$username','$password','$email','$pemail','$country','$money','$paymentmethod','$laip', '$code')"; mysql_query($query18) or die(mysql_error()); $lice = "UPDATE `history` SET ccode = '$code' WHERE user = '$username'; mysql_query($query18) or die(mysql_error()); $to = "$email8"; $subject = "ChampBux Payment Confirmation"; $message = "If you didn't ask for payment ignore this.\n\nConfirm your email address by copying and pasting the following link into your URL bar. \n\n http://www.champbux.com/verifypayment.php?code=$code"; $headers = "From: [email protected]"; $mail_sent = @mail( $to, $subject, $message, $headers ); mysql_close($con); } } } if ($_GET["convert"]=="ads") { $user=uc($_COOKIE["usNick"]); require('config.php'); $sql = "SELECT * FROM users WHERE username='$user'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $root=$row["money"]; $sqle = "SELECT * FROM config WHERE item='hits' and howmany='1000'"; $resulte = mysql_query($sqle); $rowe = mysql_fetch_array($resulte); mysql_close($con); $pricee=$rowe["price"]; if ($root<$pricee){ echo "<center><b>Whoops, you only have $".$row["money"]." You must earn at least $".$pricee." to convert to ads.</b></center>"; }else{ echo "<center><b>After you request to Convert to Ads, your account will be audited to make sure you aren't violating the TOS.</b></center>"; $email=$row["email"]; require('config.php'); $checkuser = mysql_query("SELECT pemail FROM advertisers WHERE pemail='$email'"); $username_exist = mysql_num_rows($checkuser); mysql_close($con); if ($username_exist>0) { echo "<br><center><b>Your advertisers is being proccesed. Processing time: 48 hours.</b></center>"; }else{ if (isset($_POST["url"])) { require('config.php'); if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){ echo "SECURITY CODE ERROR... "; exit(); } $url=limpiar($_POST["url"]); $description=limpiar($_POST["description"]); if ($url==""){echo "Error"; exit();} if ($description==""){echo "Error"; exit();} $laip = getRealIP(); $user=$_COOKIE["usNick"]; require('config.php'); $sqlu = "SELECT * FROM users WHERE username='$user'"; $resultu = mysql_query($sqlu); $rowu = mysql_fetch_array($resultu); $money=$rowu["money"]; $query = "INSERT INTO advertisers (pemail, plan, url, description, ip, tipo, money) VALUES('$user','1000','$url','$description','$laip','convert','$money')"; mysql_query($query) or die(mysql_error()); mysql_close($con); echo "<br><center><b>Your advertisers is being proccesed. Processing time: 2-5 working days.</b></center>"; }else{ ?> <br><br> Please complete the next form. <div align="center"><div id="form"> <fieldset><legend> Convert to Ads </legend> <form method="post" action="convert.php?convert=ads"> <table width="400" border="0" align="center"> <tr> <td width="150" align="left"><p><label>Link's Text</label></p></td> <td width="250" align="left"><input type="text" name="description" size="25" maxlength="100" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Link's URL</label></p></td> <td width="250" align="left"><input type="text" name="url" size="25" maxlength="150" autocomplete="off" class="field" value="http://" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Plan</label></p></td> <td width="250" align="left"><? require('config.php'); $sql = "SELECT * FROM config WHERE item='hits' and howmany='1000'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); mysql_close($con);?> <b>1000 Member visits $<?= $row["price"] ?></td> </tr> <tr> <td width="150" align="left"><p><label>Security Code </label></p></td> <td width="250" align="left"><input type='text' size='3' maxlength='3' name='code' autocomplete="off" class="securitycode" value="" tabindex="3" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="left"><img src="image.php?<?php echo $res; ?>" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="right"><input type="submit" value="Convert" class="submit" tabindex="4" /> </td> </tr> </table> </form> </fieldset> </div></div> <? }// final post } } } ?> <? } else { dologin(); } ?> <!--footer starts here--> <? include('footer.php'); ?> Parse error: syntax error, unexpected T_VARIABLE in /home/champbux/public_html/betaconvert.php on line 112 I am not sure what is wrong with the script? It looks fine to me. Link to comment https://forums.phpfreaks.com/topic/130621-unexpected-t_variable-more-php-email-help/ Share on other sites More sharing options...
Mchl Posted October 29, 2008 Share Posted October 29, 2008 You hove unclosed quote in line 110 $lice = "UPDATE `history` SET ccode = '$code' WHERE user = '$username'"; Link to comment https://forums.phpfreaks.com/topic/130621-unexpected-t_variable-more-php-email-help/#findComment-677714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.