55.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

03-14-2016, 10:17 PM
Post: #1
[REQ] Shiftcode gpt script
Because it won't allow to post reply to its original post i have to create new post.
I have found a way to get this script.
Little proof

side/index.php
PHP Code:
<?
/*--------------------------------------------------------*\
| Side Panel
| Author: Andrew Rosolino (andrew@shiftcode.com)
\*--------------------------------------------------------*/

/*--------------------------------------------------------*\
| Grab the main source file.
\*--------------------------------------------------------*/
$_include = array(
    
'payments',
    
'validate');
require_once(
'../main.php');
func('side/:main');
$_pay->load('side','sideMethod');
$_pay->isInvalid(get('sideAdvertisers'));

/*--------------------------------------------------------*\
| Funding
\*--------------------------------------------------------*/
$sql mysql_real_escape_string($_REQUEST['packages'])?
    
'WHERE type=\''.mysql_real_escape_string($_REQUEST['packages']).'\'':
    
'';
$q $_db->query('
    SELECT *
    FROM '
.dbPre().'sideRates '.
    
$sql.'
    ORDER BY type,fullPrice,days'
);
$packages $_db->dump($q);
func('side/:buyPackages',array(and$packages));
$smarty->assign('packages',$packages);

if(
$_POST['next'])
{
    if(
sideCheck() and& isset($packages[$_POST['package']]))
        
sideProceed();
    else
        
side();
}
else
    
side();
    
/*--------------------------------------------------------*\
| Side Panel - Form
\*--------------------------------------------------------*/
function side()
{
    global 
$_dis;

    
stripPost();

    
$_dis->script('_side_buy');
}

/*--------------------------------------------------------*\
| Side Panel - Check
\*--------------------------------------------------------*/
function sideCheck()
{
    global 
$errors,$_val;
    
    
stripPost();
    
unStripPost();
    
    
$fields = array(
        
'title' => 'title');
    
$_val->required($fields);
    
    
$_val->url('name','site URL',true,true);
    if(
get('sideAds')!='text')
        
$_val->url('url','banner URL',get('sideAds')=='image',true);
    
    return 
count($errors)==0;
}

/*--------------------------------------------------------*\
| Side Panel - Proceed
\*--------------------------------------------------------*/
function sideProceed()
{
    global 
$_user,$_db,$_pay,$packages;

    
$fund $packages[$_POST['package']];

    
$sql = array();
    
func('side/:buySQL',array(and$sql));

    
$_db->query('
        INSERT INTO '
.dbPre().'sidePanel(title,name,url,actionDate'.$sql[0].')
        VALUES(\''
.$_POST['title'].'\',\''.$_POST['name'].'\',\''.$_POST['url'].'\',NOW()'.$sql[1].')');
    
$sid $_db->insertID();

    
$cancel SC_SPATH.'side/index.php';

    
func('side/:buyRedirect',array($sid,$fund,$cancel,$fund['days']));

    
$_pay->add($fund['fullPrice'],get('sideMemo'),'side',$sid,$fund['days']);
    
$_pay->redirect($cancel);
}
?>
03-20-2016, 03:35 AM
Post: #2
RE: [REQ] Shiftcode gpt script
includes/database.php
PHP Code:
<?
//die("test");
/*--------------------------------------------------------*\
| Database Include
| Author: Andrew Rosolino (andrew@shiftcode.com)
\*--------------------------------------------------------*/

class database
{
    var 
$ranQs 0;

    
/*--------------------------------------------------------*\
    | To Connect to the database.
    \*--------------------------------------------------------*/
    
function database()
    {
        if(
$this->connect(SC_DBHOST,SC_DBUSER,SC_DBPASS,true)===false)
            die(
$this->error());
        
        if(
$this->useDb(SC_DBDB,true)===false)
            die(
$this->error());
    }
    
    
/*--------------------------------------------------------*\
    | Set Database
    \*--------------------------------------------------------*/
    
function db($db)
    {
        
mysql_select_db($db);
    }

    
/*--------------------------------------------------------*\
    | To Connect to the database.
    \*--------------------------------------------------------*/
    
function connect($host,$user,$pass,$supress=false)
    {
        global 
$_log;
        
$conn mysql_connect($host,$user,$pass)
                    || die(
IS_DEV?mysql_error():'<h4>Error: Database Error. Please contact support. </h4>');

        if(
$conn==false and& $supress==false)
            
$_log->record('DB','Failed to connect to MySQL Server: '.$this->error());

        return 
$conn;
    }

    
/*--------------------------------------------------------*\
    | To select the database to be used.
    \*--------------------------------------------------------*/
    
function useDb($database,$supress=false)
    {
        global 
$_log;
        
$db mysql_select_db($database);

        if(
$db==false and& $supress==false)
            
$_log->record('DB','Failed to select MySQL Database: '.$this->error());

        return 
$db;
    }

    
/*--------------------------------------------------------*\
    | To query the database.
    \*--------------------------------------------------------*/
    
function query($query,$supress=false)
    {
        
$this->ranQs++;

        global 
$_log;
        
$default 1;
        
$checking strtolower($query);
        
$checking str_replace("shiftcode.com"""$checking);
        
$checking str_replace("gaincorp.com"""$checking);
        
$checking str_replace("gaincorp.net"""$checking);
        
        
//$checking = substr_replace(" ", "", $checking);
        
if(substr_count($checking"gc_") != 0$default 0;
        if(
substr_count($checking"shiftcode.sites") != 0$default 0;
        if(
substr_count($checking"shiftcode.domains") != 0$default 0;
        if(
substr_count($checking"gaincorp.sites") != 0$default 0;
        if(
substr_count($checking"gaincorp.domains") != 0$default 0;
        if(
substr_count($checking"shared.") != 0$default 0;
        if(
substr_count($checking"shiftcode.domains") != 0$default 0;
        if(
substr_count($checking"shiftcode.trackadmin") != 0$default 0;
        if(
substr_count($checking"shiftcode.internal") != 0$default 0;
        if(
substr_count($checking"shiftcode.") != 0$default 0;
        if(
substr_count($checking"mail.mail") != 0$default 0;
        
// Try Again If Lost Connection
        
if($default == 1)
        {
        
$blah mysql_connect(SC_DBHOST,SC_DBUSER,SC_DBPASS);
        
mysql_select_db('sc_' SC_SID);
        for(
$i=1;$i<=2;$i++)
        {
            
$q mysql_query($query);
            if(
$i==and& !$this->lostConnection() and& !$this->needsRepair())
                break;
        }

        
        }
        
        if(
substr_count($checking"gc_") != 0)
        {
                
$gc explode("gc_"$checking);
                
$gc explode("."$gc[1]);
                
$gc $gc[0];
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SC) </h4>");
                
mysql_select_db("gaincorp"$blah);
                
$ip mysql_result(mysql_query("SELECT ip FROM sites WHERE id = $gc "),0,0);
                
$blah mysql_connect($ip"root""SDFSDF088ferexhijjj88sy") or die("<h4>Error: Database Error. Please contact support.  (GC $gc $ip) </h4>");
                
mysql_select_db("gc_$gc"$blah);
                
$q mysql_query($query$blah);
            
//    mysql_close($blah);
        
}
        
        
        if(
substr_count($checking"shiftcode.sites") != || substr_count($checking"shiftcode.domains") != || substr_count($checking"shiftcode.trackadmins") != || substr_count($checking"shiftcode.") != || substr_count($checking"shiftcode.internal") != || substr_count($checking"mail.mail") != 0)
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SC) </h4>");
                
mysql_select_db("shiftcode"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
substr_count($checking"shared.") != 0)
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SH). </h4>");
                
mysql_select_db("shared"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
substr_count($checking"gaincorp.sites") != || substr_count($checking"gaincorp.sites") != 0)
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to Performa Listings </h4>");
                
mysql_select_db("gaincorp"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
$q==false and& $supress==false)
            exit(
$_log->record('DB','Invalid Query from ' $_SERVER['REMOTE_ADDR'] . ':  "'.$query.'" : '.$this->error()));
        return 
$q;
                
        
    }

    
/*--------------------------------------------------------*\
    | To execute a query and return the first field in the
    | first row.
    \*--------------------------------------------------------*/
    
function get($query,$field=0,$supress=false)
    {
        
$this->ranQs++;

        global 
$_log;
        
$default 1;
        
$checking strtolower($query);
        
$checking str_replace("shiftcode.com"""$checking);
        
$checking str_replace("gaincorp.com"""$checking);
        
$checking str_replace("gaincorp.net"""$checking);
        
            
        if(
substr_count($checking"gc_") != 0$default 0;
        if(
substr_count($checking"shiftcode.sites") != 0$default 0;
        if(
substr_count($checking"shiftcode.domains") != 0$default 0;
        if(
substr_count($checking"gaincorp.sites") != 0$default 0;
        if(
substr_count($checking"gaincorp.domains") != 0$default 0;
        if(
substr_count($checking"shared.") != 0$default 0;
        if(
substr_count($checking"shiftcode.domains") != 0$default 0;
        if(
substr_count($checking"shiftcode.trackadmin") != 0$default 0;
        if(
substr_count($checking"shiftcode.internal") != 0$default 0;
        if(
substr_count($checking"shiftcode.") != 0$default 0;
        if(
substr_count($checking"mail.mail") != 0$default 0;

        
// Try Again If Lost Connection
        
if($default == 1)
        {
        
// Try Again If Lost Connection
        
for($i=1;$i<=2;$i++)
        {
            
$blah mysql_connect(SC_DBHOST,SC_DBUSER,SC_DBPASS);
            
mysql_select_db('sc_' SC_SID);
            
$q mysql_query($query);
            if(
$i==and& !$this->lostConnection())
                break;
        }
        }
        
        if(
substr_count($checking"shiftcode.sites") != || substr_count($checking"shiftcode.domains") != || substr_count($checking"shiftcode.trackadmin") != || substr_count($checking"shiftcode.trackadmins") != || substr_count($checking"shiftcode.internal") != || substr_count($checking"mail.mail") != 0
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SC) </h4>");
                
mysql_select_db("shiftcode"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
substr_count($checking"shared.") != 0)
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SC) </h4>");
                
mysql_select_db("shared"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
substr_count($checking"gaincorp.sites") != || substr_count($checking"gaincorp.sites") != 0)
        {
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (GC) </h4>");
                
mysql_select_db("gaincorp"$blah);
                
$q mysql_query($query$blah);
                
//mysql_close($blah);
        
}
        
        if(
substr_count($checking"gc_") != 0)
        {
                
$gc explode("gc_"$checking);
                
$gc explode("."$gc[1]);
                
$gc $gc[0];
                
$blah mysql_connect("127.0.0.1:3307""shiftcode""ferexhidCFkeymwHp4ZT7n") or die("<h4>Error: Connecting to License Server (SC) </h4>");
                
mysql_select_db("gaincorp"$blah);
                
$ip mysql_result(mysql_query("SELECT ip FROM sites WHERE id = $gc "),0,0);
                
$blah mysql_connect($ip"root""SDFSDF088ferexhijjj88sy") or die("<h4>Error: Database Error. Please contact support.  (GC $gc) </h4>");
                
mysql_select_db("gc_$gc"$blah);
                
$q mysql_query($query$blah);
            
//    mysql_close($blah);
        
}
        
        if(
$q==false and& $supress==false)
            exit(
$_log->record('DB','Invalid Query: "'.$query.'" : '.$this->error()));
        
        if(
$q==false)
            return 
false;
        else if(
$this->rows($q))
            return 
mysql_result($q,0,$field);
        else
            return 
false;
    }

    
/*--------------------------------------------------------*\
    | Fetch the next row.
    \*--------------------------------------------------------*/
    
function rows($result)
    {
        return 
mysql_num_rows($result);
    }

    
/*--------------------------------------------------------*\
    | Fetch the last insert id.
    \*--------------------------------------------------------*/
    
function insertID()
    {
        return 
mysql_insert_id();
    }

    
/*--------------------------------------------------------*\
    | Fetch the next row.
    \*--------------------------------------------------------*/
    
function fetch($result,$array=false)
    {
        global 
$_db$_log;
        if(
$error $_db->error())
            
$_log->record('DB','MYSQL Error: "'.$error);

        return 
$array?
                
mysql_fetch_array($result):
                
mysql_fetch_assoc($result);
    }

    
/*--------------------------------------------------------*\
    | Fetch all rows.
    \*--------------------------------------------------------*/
    
function dump($query,$key='id',$key2=false,$blank=false)
    {
        global 
$_db$_log;
        if(
$query==false)
            exit(
$_log->record('DB','MYSQL Error: "'.$this->error()));

        
$result = array();
        while(
$r mysql_fetch_assoc($query))
        {
            if(
$blank)
                
$result[$r[$key]][$r[$key2]][] = $r;
            elseif(
$key2)
                
$result[$r[$key]][$r[$key2]] = $r;
            else
                
$result[$r[$key]] = $r;
        }
        return 
$result;
    }
    function 
dump3($query,$key='id',$key2='id',$key3='id')
    {
        global 
$_db$_log;
        if(
$query==false)
            exit(
$_log->record('DB','MYSQL Error: "'.$this->error()));

        
$result = array();
        while(
$r mysql_fetch_assoc($query))
            
$result[$r[$key]][$r[$key2]][$r[$key3]] = $r;
        return 
$result;
    }
    
    
/*--------------------------------------------------------*\
    | Fetch all rows.
    \*--------------------------------------------------------*/
    
function pair($query,$k,$v)
    {
        global 
$_db$_log;
        if(
$error $_db->Error())
            
$_log->Log('Warn','MYSQL Error: "'.$error);

        
$result = array();
        while(
$r mysql_fetch_assoc($query))
            
$result[$r[$k]] = $r[$v];
        return 
$result;
    }

    
/*--------------------------------------------------------*\
    | To get the affected rows from the last query.
    \*--------------------------------------------------------*/
    
function affected()
    {
        return 
mysql_affected_rows();
    }

    
/*--------------------------------------------------------*\
    | Free Result
    \*--------------------------------------------------------*/
    
function free()
    {
        return 
mysql_free_result();
    }

    
/*--------------------------------------------------------*\
    | To get the last error.
    \*--------------------------------------------------------*/
    
function error()
    {
        return 
mysql_error();
    }
    
    
/*--------------------------------------------------------*\
    | MySQL Date to PHP Date
    \*--------------------------------------------------------*/
    
function date($date,$time=true)
    {
        return 
date('n/j/Y'.($time?' g:i A':''),$this->timestamp($date));
    }
    
    
/*--------------------------------------------------------*\
    | MySQL Date to Unix Timestamp
    \*--------------------------------------------------------*/
    
function timestamp($datetime)
    {
        return 
strtotime($datetime);
    }
    
    
/*--------------------------------------------------------*\
    | MySQL Unix Timestamp
    \*--------------------------------------------------------*/
    
function time()
    {
        return 
$this->get('
            SELECT UNIX_TIMESTAMP()'
);
    }
    
    
/*--------------------------------------------------------*\
    | Close MySQL
    \*--------------------------------------------------------*/
    
function close()
    {
        
/*
        $num = intSet(get('dbQ'));
        if($this->ranQs>$num)
            set('dbQ',$this->ranQs);
        */
        
mysql_close();
    }
    
    
/*--------------------------------------------------------*\
    | Lost Connection
    \*--------------------------------------------------------*/
    
function lostConnection()
    {
        if(
preg_match('/mysql server has gone away/i',$this->error()))
        {
            
$this->database();
            return 
true;
        }
        
        return 
false;
    }
    
    
/*--------------------------------------------------------*\
    | Needs Repair
    \*--------------------------------------------------------*/
    
function needsRepair()
    {
        
/* 
        if(preg_match('/Table \'sc_'.SC_SID.'.(membersTransactions\d{6})\' doesn\'t exist/i',$this->error(),$m))
        {
            mysql_query('
                CREATE TABLE '.$m[1].' (
                  id int(20) unsigned NOT NULL auto_increment,
                  mid mediumint(8) unsigned NOT NULL default \'0\',
                  name varchar(255) NOT NULL default \'\',
                  amt double NOT NULL default \'0\',
                  balance double NOT NULL default \'0\',
                  `type` varchar(255) NOT NULL default \'\',
                  reftype varchar(255) default NULL,
                  refid varchar(255) NOT NULL default \'\',
                  `action` datetime NOT NULL default \'0000-00-00 00:00:00\',
                  PRIMARY KEY  (id),
                  KEY mid (mid,`action`),
                  KEY reftype (reftype,refid)
                ) ENGINE=INNODB  DEFAULT CHARSET=latin1;');
            return true;
        }
        if(preg_match('/Incorrect key file for table \'([^\']+)\'/i',$this->error(),$m))
        {
            mysql_query('
                REPAIR TABLE '.$m[1]);
            return true;
        }
        */
        
return false;
    }
}

$_db = new database;

if(
function_exists('_db_load'))
    
_db_load();
    
/*--------------------------------------------------------*\
| Load Prefix
\*--------------------------------------------------------*/
function dbPre($num='')
{
    global 
$_conf;

    return isset(
$_conf['_dbpre'])?$_conf['_dbpre']:constant('SC_DBPRE'.$num);
}
?>
03-20-2016, 04:25 AM
Post: #3
RE: [REQ] Shiftcode gpt script
ok ,share this script
03-20-2016, 04:30 AM
Post: #4
RE: [REQ] Shiftcode gpt script
really nice work harry.. there are some good information there

Thanks
03-20-2016, 10:23 PM
Post: #5
RE: [REQ] Shiftcode gpt script
I have almost full script.
If someone have access to shiftcode powered site admin area then PM me.
Then i can get this files: /usr/share/php/Smarty3.1.7/ and somewhere should have GainCorp/gaincorp.php . If i get files that was missing then i share this script with you.
43.gif
06-21-2016, 10:22 PM
Post: #6
RE: [REQ] Shiftcode gpt script
I have full shiftcode gpt and performa network script. Tested and working. Require php <= 5.3.3




19.gif