Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.3.0
- * @ Author : DeZender
- * @ Release on : 17.05.2011
- * @ Official site : http://DeZender.Net
- *
- */
- function forceupdate() {
- global $backcheck;
- global $reranktime;
- global $reranks;
- global $uniquetime;
- global $trace_ip;
- global $frequentupdate;
- global $newhour;
- global $newday;
- $recalculate = 0;
- if ($ff = @fopen( 'datafiles/calctime.dat', 'r+' )) {
- flock( $ff, 2 );
- $calctime = array( );
- $calctime = explode( '|', fgets( $ff, 1024 ) );
- $nowtime = time( );
- $newhour = $newday = $clearip = 0;
- if ($reranktime < $nowtime - $calctime[2]) {
- $newhour = 1;
- --$calctime[3];
- $calctime[2] += $reranktime;
- if ($reranktime < $nowtime - $calctime[2]) {
- $calctime[2] = $nowtime;
- }
- if ($calctime[3] <= 0) {
- $newday = 1;
- $calctime[3] = $reranks;
- }
- if (30 < $calctime[3]) {
- $calctime[3] = 1;
- }
- }
- if ($uniquetime < $nowtime - $calctime[1]) {
- $clearip = 1;
- $calctime[1] = $nowtime;
- }
- fseek( $ff, 0 );
- fputs( $ff, $calctime[0] . '|' . $calctime[1] . '|' . $calctime[2] . '|' . $calctime[3] . '|' );
- $recalculate = 1;
- flock( $ff, 3 );
- fclose( $ff );
- if ($clearip) {
- $i = 0;
- while ($i <= 9) {
- $j = 0;
- while ($j <= 9) {
- if ($fc = @fopen( 'datafiles/ips' . $i . $j . '.txt', 'w' )) {
- fwrite( $fc, '
- ' );
- fclose( $fc );
- }
- ++$j;
- }
- ++$i;
- }
- }
- $backcheck = 0;
- recalculate( );
- if (!$frequentupdate) {
- toplist_generate( );
- }
- }
- }
- function recalculate() {
- global $scripts_path;
- global $defaultgroup;
- global $nowtime;
- global $newhour;
- global $newday;
- global $badclickslimit;
- global $badlangratio;
- global $anticheatlink;
- global $affiliateid;
- global $email;
- global $sitename;
- global $scripts_path;
- global $mailstats;
- global $reranks;
- global $frequentupdate;
- global $linkback;
- global $backcheck;
- global $backwards;
- global $adcat;
- global $paydomainok;
- global $logip;
- global $rateby;
- global $resetmode;
- global $hclim;
- global $approve;
- global $jsp;
- global $CATEGORIES;
- global $WAP;
- if (!checkdiscspace( )) {
- return null;
- }
- if (!$nowtime) {
- $nowtime = time( );
- }
- $today = date( 'm.d.Y', $nowtime );
- $dayweek = date( 'l', $nowtime );
- $daymonth = date( 'j', $nowtime );
- $month = date( 'm', $nowtime );
- $hour = date( 'H', $nowtime );
- $hitsin = $hitsout = $linktrack = $refurl = $lang = $popular = $clickpage = $useragent = $ip = array( );
- read_explode( 'datafiles/hitsin.dat', '
- ', $hitsin );
- read_explode( 'datafiles/hitsout.dat', '
- ', $hitsout );
- readunserialize( 'datafiles/linktrack.dat', $linktrack );
- readunserialize( 'datafiles/refurl.dat', $refurl );
- readunserialize( 'datafiles/lang.dat', $lang );
- readunserialize( 'datafiles/clickpage.dat', $clickpage );
- read_explode( 'datafiles/cheat.dat', '|', $popular );
- readunserialize( 'datafiles/useragent.dat', $useragent );
- if ($ff = @fopen( 'datafiles/hitsin.dat', 'w' )) {
- fclose( $ff );
- }
- if ($ff = @fopen( 'datafiles/hitsout.dat', 'w' )) {
- fclose( $ff );
- }
- $totals = array( );
- $uniquetotal = $rawtotal = 0;
- $i = 0;
- while ($i < sizeof( $hitsin )) {
- if ($hitsin[$i]) {
- $aa = array( );
- $aa = explode( '|', $hitsin[$i] );
- if (!file_exists( 'memberfiles/' . $aa[0] . '.dat' )) {
- $aa[0] = 'auxout';
- }
- if ($aa[0] == 'auxout') {
- $aa[4] = 0;
- }
- ++$rawtotal;
- $uniquetotal += $aa[2];
- $found = 0;
- $loop = 0;
- while ($loop < sizeof( $totals )) {
- $bb = array( );
- $bb = explode( '|', $totals[$loop] );
- if ($bb[0] == $aa[0]) {
- ++$bb[4];
- $bb[1] += $aa[2];
- $bb[9] += $aa[4];
- $found = 1;
- $totals[$loop] = $bb[0] . '|' . $bb[1] . '|0|0|' . $bb[4] . '|0|0|0|0|' . $bb[9];
- break;
- }
- ++$loop;
- }
- if ($found == 0) {
- $totals[] = $aa[0] . '|' . $aa[2] . '|0|0|1|0|0|0|0|' . $aa[4];
- }
- }
- ++$i;
- }
- $outtotal = 0;
- $i = 0;
- while ($i < sizeof( $hitsout )) {
- if ($hitsout[$i]) {
- $aa = array( );
- $aa = explode( '|', $hitsout[$i] );
- if (!file_exists( 'memberfiles/' . $aa[0] . '.dat' )) {
- $aa[0] = 'auxout';
- }
- if (( !$nobadouts || !$aa[4] )) {
- if ($aa[0] != 'sponsor') {
- ++$outtotal;
- }
- $found = 0;
- $loop = 0;
- while ($loop < sizeof( $totals )) {
- $bb = array( );
- $bb = explode( '|', $totals[$loop] );
- if ($bb[0] == $aa[0]) {
- ++$bb[2];
- $bb[9] += $aa[6];
- $found = 1;
- $totals[$loop] = $bb[0] . '|' . $bb[1] . '|' . $bb[2] . '|0|' . $bb[4] . '|0|0|0|0|' . $bb[9];
- break;
- }
- ++$loop;
- }
- if ($found == 0) {
- $totals[] = $aa[0] . '|0|1|0|0|0|0|0|0|' . $aa[6];
- }
- }
- }
- ++$i;
- }
- $clicktotal = 0;
- $i = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement