• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Help]NEED HELP PLS LOOK HERE!!!

Joined
Nov 10, 2009
Messages
269
Reaction score
28
Hello ragezone,

I am using newera CMS
i edited some stuff
i added to my vote1.php script when ppl vote they get 10k nx but not the 1 votepoint
how to fix this pls help me!.

my website = http://9hc.no-ip.biz

Heres my script

<?php include("header.php"); ?>

<div id="container">
<?php

$conn = mysql_connect("localhost", "root", "") or die ('Error connecting to MySQL!');
mysql_select_db("mapleblade");

$earnedpoints = false;
$account = $_POST['name'];
$account = mysql_real_escape_string($account);

if ($account == "") {
echo 'Enter an account name!';
exit();
}

$ip = $_SERVER['REMOTE_ADDR'];
$time = time();

$query = mysql_query("SELECT *, SUM(`times`) as amount FROM votingsite1 WHERE account='$account' OR ip='$ip'");
$lasttime = mysql_fetch_array($query);
$amount = $lasttime['amount'];
$insertnew = false;
if ($amount == "") {
$insertnew = true;
}
$timecalc = $time - $lasttime['date'];
if (!$insertnew) {
if ($timecalc < 43200) {
echo ' Hello '. $account .' you have already voted with this account ('. $account .') or IP ('. $ip .') in the last 12 hours!';
echo ' Last voted on: '. date('M d\, h:i:s A', $lasttime['date']) .'';
echo '<html>';
echo '<head>';
echo '<meta HTTP-EQUIV="REFRESH" content="10; url=/">';
echo '</head>';
echo '<body>';
echo '<br><br>You will be redirected to the main website in 10 seconds.';
echo '</body>';
echo '</html>';
exit();
} else {
$update = mysql_query("UPDATE votingsite1 SET account='$account', date='$time', times=times+1 WHERE ip='$ip'");
if (!$update) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $update;
die($message);
} else {
$earnedpoints = true;
}
}
} else {
$success = mysql_query("INSERT INTO votingsite1 (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");
if (!$success) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $success;
die($message);
} else {
$earnedpoints = true;
}
}




if ($earnedpoints) {
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + '1' WHERE name='" .accounts. "'");
mysql_query("UPDATE accounts SET cardNX = cardNX + '10000' WHERE name='" .accounts. "'");
if (!$points) {

$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
mysql_close($conn);
echo '<html>';
echo '<head>';
echo '<meta HTTP-EQUIV="REFRESH" content="0; url='.$votelink.'">';
echo '</head>';
echo '</html>';
} else {
echo 'There was an error processing your request.';
exit();
}
?>

</div>
<div>
<?php include("footer.php"); ?>
 
Last edited:
Skilled Illusionist
Loyal Member
Joined
Aug 4, 2008
Messages
376
Reaction score
37
You can try this.
PHP:
echo '<meta HTTP-EQUIV="REFRESH" content="0; url='.$votelink.'">';
(replace your current one with this)
 
Upvote 0
Experienced Elementalist
Joined
Jul 8, 2008
Messages
297
Reaction score
126
Just to let you know, posting in capitals doesn't make your point any bigger.
I have no clue what do do, but:
PHP:
echo '<meta HTTP-EQUIV="REFRESH" content="0; url='.$votelink.'">';
I think it can be
PHP:
echo '<meta HTTP-EQUIV="REFRESH" content="0; url='http://gtop100.com/iadfy7078s/'">';

Correct if wrong please.
 
Upvote 0
Skilled Illusionist
Loyal Member
Joined
Aug 4, 2008
Messages
376
Reaction score
37
Try
PHP:
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + 1 WHERE name='" .accounts. "'");
 
Upvote 0
Newbie Spellweaver
Joined
Mar 9, 2012
Messages
15
Reaction score
0
Replace all of this:
PHP:
if ($earnedpoints) {
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + '1' WHERE name='" .accounts. "'");
mysql_query("UPDATE accounts SET cardNX = cardNX + '10000' WHERE name='" .accounts. "'");
if (!$points) {

Place it with this:
PHP:
if ($earnedpoints) {
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + 1 WHERE name='$account'");
$points = mysql_query("UPDATE accounts SET cardNX= cardNX + 10000 WHERE name='$account'");
if (!$points) {
 
Upvote 0
Newbie Spellweaver
Joined
Sep 15, 2011
Messages
76
Reaction score
2
Replace all of this:
PHP:
if ($earnedpoints) {
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + '1' WHERE name='" .accounts. "'");
mysql_query("UPDATE accounts SET cardNX = cardNX + '10000' WHERE name='" .accounts. "'");
if (!$points) {

Place it with this:
PHP:
if ($earnedpoints) {
$points = mysql_query("UPDATE accounts SET votePoints = votePoints + 1 WHERE name='$account'");
$points = mysql_query("UPDATE accounts SET cardNX= cardNX + 10000 WHERE name='$account'");
if (!$points) {
Why the hell bump a nearly 2 year old post?
 
Upvote 0
Back
Top