Jump to content

Conver to ADS script problem, help...


hunter_li

Recommended Posts

This is cash convert ads script

 

code:

<?

 

if ($_GET["convert"]=="ads")

{

 

$user=uc($_COOKIE["usNick"]);

 

$sql = "SELECT * FROM tb_users WHERE username='$user'";

$result = mysql_query($sql);

$row = mysql_fetch_array($result);

 

$root=$row["money"];

 

$sqle = "SELECT * FROM tb_config WHERE item='hits' and howmany='1000'";

$resulte = mysql_query($sqle);

$rowe = mysql_fetch_array($resulte);

 

$pricee=$rowe["price"];

 

if ($root<$pricee){

echo "<b>Whoops, you only have $".$row["money"]." You must earn at least $".$pricee." to convert to ads.</b>";

}else{

 

echo "<b>After you request for Convert to Ads your account will be audited to make sure you aren't violating the TOS.</b>";

 

$email=$row["email"];

 

$checkuser = mysql_query("SELECT pemail FROM tb_advertisers WHERE pemail='$email'");

$username_exist = mysql_num_rows($checkuser);

 

if ($username_exist>0) {

 

echo "<br><b>Your advertisers is being proccesed. Processing time: 2-5 working days.</b>";

 

}else{

 

 

 

if (isset($_POST["url"])) {

 

require('config.php');

 

 

if($_POST['code']!=$_SESSION['string']){

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"];

 

$sqlu = "SELECT * FROM tb_users WHERE username='$user'";

$resultu = mysql_query($sqlu);

$rowu = mysql_fetch_array($resultu);

 

$money=$rowu["money"];

 

 

$query = "INSERT INTO tb_advertisers (pemail, plan, url, description, ip, tipo, money) VALUES('$user','1000','$url','$description','$laip','convert','$money')";

mysql_query($query) or die(mysql_error());

 

echo "<br><b>Your advertisers is being proccesed. Processing time: 2-5 working days.</b>";

 

}else{

 

 

?>

<br><br>

Please complete the next form.

 

<form method="post" action="convert.php?convert=ads">

<table>

<tr>

<td><font style="font-size:12px;" face="verdana">

Link's Text:

</td>

<td>

<input type="text" name="description" size="25" maxlength="100">

</td>

</tr>

<tr>

<td><font style="font-size:12px;" face="verdana">

Link's URL (include http://):

</td>

<td>

<input type="text" name="url" size="25" maxlength="150">

</td>

</tr>

<tr>

<td><font style="font-size:12px;" face="verdana">

Choose plan:

</td>

<td>

 

<b><?

 

$sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='1000'";

$result = mysql_query($sql);

$row = mysql_fetch_array($result);

 

 

?>1000 Member visits $<?= $row["price"] ?></b>

</td>

</tr>

<tr>

<td><font size="2" face="verdana">

* Security Code:

</font></td>

<td>

<input type="text" name="code" size="5" maxlength="5"><img src="image.php">

</td>

</tr>

</table>

<input type="submit" value="Procceed to payment">

</form>

 

 

The problem is it only provide one choice "1000 member vists $" ,how to improve it to provide more choice like this: 100 member vists/ 500 member vists/ 5000 member vists or more...?

  guys help me please.

Link to comment
https://forums.phpfreaks.com/topic/83171-conver-to-ads-script-problem-help/
Share on other sites

".$row['howmany']." Member visits $<?= $row["price"] 

 

I changed some code ,but my admin page and money not change. how to improve it?

<option value="<?

$sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='100'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);

echo $row["howmany"];

?>"><?= $row["howmany"] ?> Member visits $<?= $row["price"] ?></option>
<option value="<?

$sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='500'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);

echo $row["howmany"];

?>"><?= $row["howmany"] ?> Member visits $<?= $row["price"] ?></option>
<option value="<?

$sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='1000'";
$result = mysql_query($sql);        
$row = mysql_fetch_array($result);

echo $row["howmany"];

?>"><?= $row["howmany"] ?> Member visits $<?= $row["price"] ?></option>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.