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.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- class position {
- var $db = null;
- var $ypos = null;
- var $gpos = null;
- var $rpos = null;
- var $yhpos = null;
- var $bpos = null;
- var $wspos = null;
- var $options = null;
- var $lipos = null;
- var $competitor = null;
- protected $cols = null;
- protected $version = 1.39999999999999991118216;
- var $conf = null;
- var $liconf = null;
- protected $ln = null;
- var $date = null;
- var $licheck = null;
- var $excel = null;
- var $reg = null;
- var $queryList = null;
- var $allReg = false;
- var $gZone = false;
- var $queryid = array( );
- var $temppos = array( );
- var $count = array( );
- function __construct($status = false) {
- $this->db = new db( );
- $this->ypos = new ypos( $this->db );
- $this->gpos = new gpos( $this->db );
- $this->rpos = new rpos( $this->db );
- $this->yhpos = new yhpos( $this->db );
- $this->bpos = new bpos( $this->db );
- $this->wspos = new wspos( $this->db );
- $this->options = new posoptions( $this->db );
- $this->competitor = new competitor( );
- $this->lipos = new lipos( $this->db );
- $this->conf = $this->getConf( );
- $this->ln = $this->check_ln( $status );
- $this->getCols( $status );
- $this->liconf = $this->getLiConf( );
- }
- function BarPercent($req) {
- $stats = '';
- if ($req == 0) {
- $stats = '<div class="percent0"></div>';
- }
- if (( 0 < $req && $req <= 25 )) {
- $stats = '<div class="percent1"></div>';
- }
- if (( 25 < $req && $req <= 50 )) {
- $stats = '<div class="percent2"></div>';
- }
- if (( 50 < $req && $req <= 75 )) {
- $stats = '<div class="percent3"></div>';
- }
- if (( 75 < $req && $req < 100 )) {
- $stats = '<div class="percent4"></div>';
- }
- if ($req == 100) {
- $stats = '<div class="percent5"></div>';
- }
- return $stats;
- }
- function getLiConf() {
- $res = array( );
- foreach ($this->cols as $key => $value) {
- switch ($value['name']) {
- case 'libpos': {
- array_push( $res, 'libpos' );
- break;
- }
- case 'ligpos': {
- array_push( $res, 'ligpos' );
- break;
- }
- case 'lirpos': {
- array_push( $res, 'lirpos' );
- break;
- }
- case 'liyhpos': {
- array_push( $res, 'liyhpos' );
- break;
- }
- case 'liypos': {
- array_push( $res, 'liypos' );
- }
- }
- }
- return $res;
- }
- function check_ln($status) {
- if ($status) {
- if (PHP_SAPI == 'cli') {
- $host = str_replace( '/pos_autoupdate.php', '', $_SERVER['SCRIPT_NAME'] );
- $host = explode( '/', $host );
- $host = $host[count( $host ) - 1];
- if (!stristr( $host, '.' )) {
- $host = $host[count( $host ) - 2];
- }
- $ip = gethostbyname( $host );
- $ln = strtoupper( md5( $host . $ip . 'a595029b6a289ddc2dd77140a435aa9a' ) );
- $ln = substr( $ln, 20, 5 ) . '-' . substr( $ln, 15, 5 ) . '-' . substr( $ln, 10, 5 ) . '-' . substr( $ln, 5, 5 ) . '-' . substr( $ln, 0, 5 );
- if ($this->conf['license'] == $ln) {
- return true;
- }
- return false;
- }
- $host = preg_replace( '[^http:\/\/|^https:\/\/|www.]', '', getenv( 'HTTP_HOST' ) );
- $ip = gethostbyname( $host );
- $ln = strtoupper( md5( $host . $ip . 'a595029b6a289ddc2dd77140a435aa9a' ) );
- $ln = substr( $ln, 20, 5 ) . '-' . substr( $ln, 15, 5 ) . '-' . substr( $ln, 10, 5 ) . '-' . substr( $ln, 5, 5 ) . '-' . substr( $ln, 0, 5 );
- if ($this->conf['license'] == $ln) {
- return true;
- }
- return false;
- }
- if (empty( $this->conf['license'] )) {
- return false;
- }
- if (!isset( $_REQUEST['PHPSESSID'] )) {
- $phpsessid = str_replace( 'PHPSESSID=', '', $_SERVER['HTTP_COOKIE'] );
- } else {
- $phpsessid = $_REQUEST['PHPSESSID'];
- }
- if (!isset( $_SESSION[md5( '166' . $phpsessid )] )) {
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, 'http://users.site-control.ru/verify/' );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );
- curl_setopt( $ch, CURLOPT_POST, 1 );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, array( 'host' => $_SERVER['HTTP_HOST'], 'ip' => $_SERVER['SERVER_ADDR'], 'module' => 166 ) );
- $data = curl_exec( $ch );
- curl_close( $ch );
- if ($data !== false) {
- $data = json_decode( $data, true );
- if (0 < count( $data )) {
- if (( !empty( $this->conf['license'] ) && trim( $data['key'] ) == trim( $this->conf['license'] ) )) {
- if ((double)$this->version <= (double)$data['version']) {
- $_SESSION[md5( '166' . $phpsessid )] = TRUE;
- return true;
- }
- return false;
- }
- return false;
- }
- return false;
- }
- $host = preg_replace( '[^http:\/\/|^https:\/\/|www.]', '', getenv( 'HTTP_HOST' ) );
- $ip = gethostbyname( $host );
- $ln = strtoupper( md5( $host . $ip . 'a595029b6a289ddc2dd77140a435aa9a' ) );
- $ln = substr( $ln, 20, 5 ) . '-' . substr( $ln, 15, 5 ) . '-' . substr( $ln, 10, 5 ) . '-' . substr( $ln, 5, 5 ) . '-' . substr( $ln, 0, 5 );
- if ($this->conf['license'] == $ln) {
- return true;
- }
- return false;
- }
- return true;
- }
- function delDomen($id) {
- $this->options->DelDomen( $id );
- }
- function getCols($status, $group = false) {
- if ($status) {
- $group = 298;
- }
- if (( !$group && !$status )) {
- $group = $_SESSION['group'];
- }
- $freeconf = array( 'gpos', 'ypos', 'update' );
- if (( !empty( $group ) && !stristr( $group, ',' ) )) {
- $res = $this->db->query( 'SELECT `id`,`name`,`rank`,`value` FROM `' . DBPREFIX . 'pos_conf` WHERE `value`=\'true\' AND `group`=\'' . $group . '\' ORDER BY `rank`' );
- } else {
- $res = $this->db->query( 'SELECT * FROM `' . DBPREFIX . 'pos_conf` WHERE `value`=\'true\' AND (ISNULL(`group`) OR `group`=0) ORDER BY `rank`' );
- }
- $cols = array( );
- if ($row = $this->db->get_row( $res )) {
- if (!$this->ln) {
- if (in_array( $row['name'], $freeconf )) {
- $cols[$row['rank']] = array( 'id' => $row['id'], 'name' => $row['name'], 'value' => $row['value'] );
- }
- }
- $cols[$row['rank']] = array( 'id' => $row['id'], 'name' => $row['name'], 'value' => $row['value'] );
- }
- $this->cols = $cols;
- }
- function getConf() {
- $res = $this->db->query( 'SELECT * FROM `' . DBPREFIX . 'pos_conf` WHERE `rank`=0 AND ISNULL(`group`)' );
- $conf = array( );
- if ($row = $this->db->get_row( $res )) {
- $conf[$row['name']] = $row['value'];
- }
- return $conf;
- }
- function delGroup($id) {
- $this->db->query( 'DELETE FROM `' . DBPREFIX . 'pos_conf` WHERE `group`=' . $id );
- }
- function check_geo($siteid, $qry) {
- if (!$this->ln) {
- return 0;
- }
- if (empty( $this->conf )) {
- $this->conf = $this->getConf( );
- }
- $query = $this->options->getQueryById( $qry );
- if ((int)$this->conf['proxy_ypos'] == 1) {
- $this->getProxy( 1 );
- $proxy = $this->conf['proxy'];
- $type_scan = 473;
- } else {
- $this->getProxy( 2 );
- $proxy = $this->conf['servers'];
- $type_scan = 472;
- }
- $reg = array( '213', '54' );
- if ((int)$this->conf['api_yp'] == 0) {
- $f = array( );
- foreach ($reg as $regid) {
- $geodp = $this->ypos->ypos_proxy( '', $query[0]['query'], 10, $regid, $proxy, $type_scan, $this->conf['antigate'], (int)$this->conf['ypos_sleep'], true, true );
- if (0 < count( $geodp )) {
- $f[$regid] = '';
- foreach ($geodp as $node) {
- $regid;
- $f-> .= $node['url'];
- }
- continue;
- }
- }
- if (( isset( $f[213] ) && isset( $f[54] ) )) {
- if ($f[213] == $f[54]) {
- $geodp = 472;
- } else {
- $geodp = 0 - 1;
- }
- } else {
- $geodp = 0 - 2;
- }
- } else {
- $f = array( );
- foreach ($reg as $regid) {
- $geodp = $this->ypos->ypos_xml( '', $query[0]['query'], 50, $regid, $proxy, $type_scan, true, true );
- if (0 < count( $geodp )) {
- $f[$regid] = '';
- foreach ($geodp as $node) {
- $regid;
- $f-> .= $node['url'];
- }
- continue;
- }
- }
- if (( isset( $f[213] ) && isset( $f[54] ) )) {
- if ($f[213] == $f[54]) {
- $geodp = 472;
- } else {
- $geodp = 0 - 1;
- }
- } else {
- $geodp = 0 - 2;
- }
- }
- switch ($geodp) {
- case 0: {
- $this->options->updateValueGeoDep( $siteid, $qry, $geodp );
- '<td id="trgeodep_' . $qry . '" width="16" align="center" onclick="updateGeoDep(' . $siteid . ',' . $qry . ');"><div class="geo_no_dependent"></div></td>';
- }
- case 0 - 1: {
- $this->options->updateValueGeoDep( $siteid, $qry, $geodp );
- '<td id="trgeodep_' . $qry . '" width="16" align="center" onclick="updateGeoDep(' . $siteid . ',' . $qry . ');"><div class="geo_dependent"></div></td>';
- }
- case 0 - 2: {
- '<td id="trgeodep_' . $qry . '" width="16" align="center" onclick="updateGeoDep(' . $siteid . ',' . $qry . ');"><div class="geo_error"></div></td>';
- }
- }
- return ;
- }
- function ParsePostData($data) {
- $data = explode( '&', $data );
- $arr = array( );
- foreach ($data as $value) {
- $val = explode( '=', $value );
- $arr[$val[0]] = ($val[1] == 'on' ? 1 : urldecode( $val[1] ));
- }
- return $arr;
- }
- ......................................................................
- ..............................
- ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement