Can't find some Good Voting NX Script Gtop for CypeCMS

Results 1 to 14 of 14
  1. #1
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Can't find some Good Voting NX Script Gtop for CypeCMS

    Can't find some Good Voting NX Script Gtop for CypeCMS.... Anyone can help?


  2. #2
    Extremely Salaried Member cinos11 is offline
    MemberRank
    Jun 2008 Join Date
    In your monitorLocation
    416Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    http://forum.ragezone.com/f690/timed...inos11-767187/

    Just change:
    PHP Code:
    "UPDATE accounts SET votingpoints = votingpoints + 1 WHERE name='".$account."'" 
    to

    PHP Code:
    "UPDATE accounts SET votingpoints = votingpoints + 1, paypalNX = paypalNX + 10000 WHERE name='".$account."'" 

  3. #3
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by cinos11 View Post
    http://forum.ragezone.com/f690/timed...inos11-767187/

    Just change:
    PHP Code:
    "UPDATE accounts SET votingpoints = votingpoints + 1 WHERE name='".$account."'" 
    to

    PHP Code:
    "UPDATE accounts SET votingpoints = votingpoints + 1, paypalNX = paypalNX + 10000 WHERE name='".$account."'" 
    Thank You.. I'll try it.

  4. #4
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    Thank You.. I'll try it.
    Still have problems...

    When I typed my account name and then click vote, it says ' Error - Could not update vote points! '

  5. #5
    Extremely Salaried Member cinos11 is offline
    MemberRank
    Jun 2008 Join Date
    In your monitorLocation
    416Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    Still have problems...

    When I typed my account name and then click vote, it says ' Error - Could not update vote points! '
    Make sure paypalNX is the same name in ur DB

  6. #6
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by cinos11 View Post
    Make sure paypalNX is the same name in ur DB
    Change to nxCredit, but still got the same error... Also I have these errors too

    Notice: Undefined index: name in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 19

    Notice: Undefined variable: redirect in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 52

    Notice: Undefined variable: funct_msg in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 61

    Notice: Undefined variable: funct_error in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 62

  7. #7
    Extremely Salaried Member cinos11 is offline
    MemberRank
    Jun 2008 Join Date
    In your monitorLocation
    416Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    Change to nxCredit, but still got the same error... Also I have these errors too

    Notice: Undefined index: name in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 19

    Notice: Undefined variable: redirect in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 52

    Notice: Undefined variable: funct_msg in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 61

    Notice: Undefined variable: funct_error in C:\wamp\www\CelestiaMS\sources\public\vote.php on line 62
    Its only a warning.
    Pre-define the variables if you don't want it to show.
    EX: $funct_error = 0;

  8. #8
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by cinos11 View Post
    Its only a warning.
    Pre-define the variables if you don't want it to show.
    EX: $funct_error = 0;
    Ok, but for the nxcredit error? What should I fix?

  9. #9
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    Ok, but for the nxcredit error? What should I fix?
    PHP Code:
    <?php
        
    ##########Configuration#############
        #Voting Script by Cinos11 of RageZone#
        #################################
        
    $db['host'] = 'localhost';
        
    $db['user'] = 'root';
        
    $db['pass'] = 'wtfthis';
        
    $db['database'] = 'moopledev';
        
    $links['gtop100'] = 'http://www.gtop100.com/in.php?site=63899';
        
    $settings['require-account'] = false/* Change to true, if you want to require accounts */
        
    $settings['action'] = '/page/vote.html'/* The page your script is located */
        #################################
        
    $conn mysql_connect($db['host'], $db['user'], $db['pass']) or die('Error - Could not connect to MySQL!');
        
    mysql_select_db($db['database']) or die('Error - Could not connect to database!');

        
    $earnedpoints false;$insertnew false;
        
    $ip mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
        
    $time mysql_real_escape_string(time());
        
    $account mysql_real_escape_string($_POST['name']);

        if (
    $account == '' && isset($_POST['submit']) && $settings['require-account'] == true) {$funct_error 'You\'re required to provide your username!';}
        elseif(isset(
    $_POST['submit'])) {
            
    $result mysql_query("SELECT *, SUM(times) as amount FROM votingrecords WHERE NOT account='' AND NOT account='0' AND account='".$account."' OR ip='".$ip."'") or die('Error - Could not look up vote record!');
            
    $row mysql_fetch_array($result);
            
    $timecalc $time $row['date'];

            if (
    $row['amount'] == '' || $timecalc 43200) {
                if(
    $row['amount'] == '') {
                    
    $result mysql_query("INSERT INTO votingrecords (ip, account, date, times) VALUES ('".$ip."', '".$account."', '".$time."', '1')") or die ('Error - Could not update vote records!');
                }
                else {
                    
    $result mysql_query("UPDATE votingrecords SET ip='".$ip."', account='".$account."', date='".$time."', times='1' WHERE ip='".$ip."' OR account='".$account."'") or die ('Error - Could not update vote records!');
                }
                
    $earnedpoints true;
                if (
    $earnedpoints == true) {
                    if (
    $account != '') {$result mysql_query("UPDATE accounts SET votingpoints = votingpoints + 1, nxCredit = nxCredit + 10000 WHERE name='".$account."'") or die ('Error - Could not update vote points!');}
                    
    $funct_msg '<meta http-equiv="refresh" content="0; url='.$links['gtop100'].'">';
                    
    $redirect true;
                }
            }
            elseif(
    $timecalc 43200 && $row['amount'] != '') {
                
    $funct_msg 'You\'ve already voted within the last 12 hours!';
                
    $funct_msg .= '<br />Vote time: 'date('M d\, h:i A'$row['date']);
            }
            else {
                
    $funct_error 'Unknown Error';
            }
        }

        
    mysql_close($conn);

        if(
    $redirect == true) {
            echo 
    $funct_msg;
        }

        else { 
    ?>

            <table style="border-width:1px;border-style:solid;background:#99CCFF;padding:2px;text-align:center;margin:auto;">
                <form action="<?php $settings['action']; ?>" method="post">
                    <?php
                        
    if($funct_msg != '') {echo '<tr><td colspan="2"><div style="background-color:#008000;padding:10px 2px 10px 2px;margin:10px 0 15px 0;text-align:center;color:#000000;">'.$funct_msg.'</div></td></tr>';}
                        if(
    $funct_error != '') {echo '<tr><td colspan="2"><div style="background-color:#FF0000;padding:10px 2px 10px 2px;margin:10px 0 15px 0;text-align:center;color:#000000;">'.$funct_error.'</div></td></tr>';}
                    
    ?>
                    <tr>
                        <td colspan="2" style="padding:5px;"><b>Input your username for 1 votepoint</b></td>
                    </tr>
                    <tr>
                        <td>Username:</td>
                        <td><input type="text" name="name" maxlength="15" /></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="submit" name="submit" value="Vote" />
                        </td>
                    </tr>
                </form>
            </table>
    <?php ?>

  10. #10
    Extremely Salaried Member cinos11 is offline
    MemberRank
    Jun 2008 Join Date
    In your monitorLocation
    416Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    PHP Code:
    <?php
        
    ##########Configuration#############
        #Voting Script by Cinos11 of RageZone#
        #################################
        
    $db['host'] = 'localhost';
        
    $db['user'] = 'root';
        
    $db['pass'] = 'wtfthis';
        
    $db['database'] = 'moopledev';
        
    $links['gtop100'] = 'http://www.gtop100.com/in.php?site=63899';
        
    $settings['require-account'] = false/* Change to true, if you want to require accounts */
        
    $settings['action'] = '/page/vote.html'/* The page your script is located */
        #################################
        
    $conn mysql_connect($db['host'], $db['user'], $db['pass']) or die('Error - Could not connect to MySQL!');
        
    mysql_select_db($db['database']) or die('Error - Could not connect to database!');

        
    $earnedpoints false;$insertnew false;
        
    $ip mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
        
    $time mysql_real_escape_string(time());
        
    $account mysql_real_escape_string($_POST['name']);

        if (
    $account == '' && isset($_POST['submit']) && $settings['require-account'] == true) {$funct_error 'You\'re required to provide your username!';}
        elseif(isset(
    $_POST['submit'])) {
            
    $result mysql_query("SELECT *, SUM(times) as amount FROM votingrecords WHERE NOT account='' AND NOT account='0' AND account='".$account."' OR ip='".$ip."'") or die('Error - Could not look up vote record!');
            
    $row mysql_fetch_array($result);
            
    $timecalc $time $row['date'];

            if (
    $row['amount'] == '' || $timecalc 43200) {
                if(
    $row['amount'] == '') {
                    
    $result mysql_query("INSERT INTO votingrecords (ip, account, date, times) VALUES ('".$ip."', '".$account."', '".$time."', '1')") or die ('Error - Could not update vote records!');
                }
                else {
                    
    $result mysql_query("UPDATE votingrecords SET ip='".$ip."', account='".$account."', date='".$time."', times='1' WHERE ip='".$ip."' OR account='".$account."'") or die ('Error - Could not update vote records!');
                }
                
    $earnedpoints true;
                if (
    $earnedpoints == true) {
                    if (
    $account != '') {$result mysql_query("UPDATE accounts SET votingpoints = votingpoints + 1, nxCredit = nxCredit + 10000 WHERE name='".$account."'") or die ('Error - Could not update vote points!');}
                    
    $funct_msg '<meta http-equiv="refresh" content="0; url='.$links['gtop100'].'">';
                    
    $redirect true;
                }
            }
            elseif(
    $timecalc 43200 && $row['amount'] != '') {
                
    $funct_msg 'You\'ve already voted within the last 12 hours!';
                
    $funct_msg .= '<br />Vote time: 'date('M d\, h:i A'$row['date']);
            }
            else {
                
    $funct_error 'Unknown Error';
            }
        }

        
    mysql_close($conn);

        if(
    $redirect == true) {
            echo 
    $funct_msg;
        }

        else { 
    ?>

            <table style="border-width:1px;border-style:solid;background:#99CCFF;padding:2px;text-align:center;margin:auto;">
                <form action="<?php $settings['action']; ?>" method="post">
                    <?php
                        
    if($funct_msg != '') {echo '<tr><td colspan="2"><div style="background-color:#008000;padding:10px 2px 10px 2px;margin:10px 0 15px 0;text-align:center;color:#000000;">'.$funct_msg.'</div></td></tr>';}
                        if(
    $funct_error != '') {echo '<tr><td colspan="2"><div style="background-color:#FF0000;padding:10px 2px 10px 2px;margin:10px 0 15px 0;text-align:center;color:#000000;">'.$funct_error.'</div></td></tr>';}
                    
    ?>
                    <tr>
                        <td colspan="2" style="padding:5px;"><b>Input your username for 1 votepoint</b></td>
                    </tr>
                    <tr>
                        <td>Username:</td>
                        <td><input type="text" name="name" maxlength="15" /></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="submit" name="submit" value="Vote" />
                        </td>
                    </tr>
                </form>
            </table>
    <?php ?>
    If you changed the nxcredit value, and made things have initial values. It should work.

    Paste in the new errors.

  11. #11
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Still... ' Error - Could not update vote points! '

    Did I did something wrong ?
    Does the action ( voting script is located ) matters?

  12. #12
    Extremely Salaried Member cinos11 is offline
    MemberRank
    Jun 2008 Join Date
    In your monitorLocation
    416Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by SaBeRwInG View Post
    Still... ' Error - Could not update vote points! '

    Did I did something wrong ?
    Does the action ( voting script is located ) matters?
    Changed that line in the database to: mysql_error()
    It will give a more detailed analysis.

  13. #13
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    Quote Originally Posted by cinos11 View Post
    Changed that line in the database to: mysql_error()
    It will give a more detailed analysis.
    Sorry, But, which is it? I searched and can't find it.

  14. #14
    Member SaBeRwInG is offline
    MemberRank
    Nov 2009 Join Date
    Osaka, JapanLocation
    91Posts

    Re: Can't find some Good Voting NX Script Gtop for CypeCMS

    bumpy



Advertisement