{$tag})) { $this->{$tag} = ''; } if (empty($array)) { if (empty($action)) { $this->{$tag} = $new; } else { $this->{$tag} .= $new; } } else if ($array == 'row') { $this->{$tag} = $new; } else if (empty($action)) { $this->{$tag}[$array] = $new; } else { $this->{$tag}[$array] .= $new; } return ''; } public function recaptcha($secret, $response) { $captcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $secret . '&response=' . $response); $result = json_decode($captcha); $this->result = $captcha; return $result->success; } } class Nivu { private $con = 'https://nivusoft.com/'; public function settings($product, $primary) { if ($product == 'theme') { return 'themes/' . $primary . '/function.php'; } else if ($product == 'plugin') { return 'plugins/' . $primary . '/index.php'; } } public function detail($product, $pri) { global $ns_filter; if ($product == 'theme') { $this->path = 'themes/' . $pri . '/'; $this->url = ns_filter('siteurl') . 'themes/' . $pri . '/'; } else if ($product == 'plugin') { $this->path = 'plugins/' . $pri . '/'; } return true; } public function MAKontrol($lisans, $product = 'software', $product_id = '1') { global $ayar; if (strstr($ayar->siteurl, $this->servername())) { if (strstr($lisans, $this->createSecurity($product, $product_id))) { return true; } } global $user; $post = ['product' => $product, 'product_id' => $product_id, 'domain' => $this->servername(), 'module' => 'control', 'action' => 'token', 'version' => ns_filter('software_nivusosyal')]; $result = json_decode($this->connect($post), true); if (empty($result['error']) && isset($result['token'])) { if ($product == 'software') { $ayar->select('scriptlisans'); $ayar->item2 = $result['token']; $ayar->update(); } else { if ($product == 'modul') { global $modulpath; ($filicense = fopen($modulpath . '/lisans.php', 'w')) || exit('Unable to open file!'); } else { global $primary; ($filicense = fopen($product . 's/' . ns_filter('primary-' . $product . '-' . $product_id) . '/lisans.php', 'w')) || exit('Unable to open file!'); } $filicenses = 'error = 'lisans güncelleniyor...'; } else { $this->error = $result['error']; } return false; } private function createSecurity($product, $product_id) { $create = sha1(md5($product . $this->domain . $product_id . $product) . 'NIVU-NIVU'); $create = substr($create, 13, 4) . '-' . substr($create, 1, 4) . '-' . substr($create, 5, 4) . '-' . substr($create, 11, 4) . '-' . substr($create, 9, 4); $create = md5(sha1('NIVU-NIVU' . md5($product . $this->domain . $product_id))); $create = substr($create, 28, 4) . '-' . substr($create, 1, 4) . '-' . substr($create, 5, 4) . '-' . substr($create, 11, 4) . '-' . substr($create, 9, 4); return strtoupper($create); } public function update($product = 'software', $primary = 'nivusosyal', $product_id = 1) { global $ayar; global $user; $post = ['product' => $product, 'product_id' => $product_id, 'domain' => $this->servername(), 'module' => 'control', 'action' => 'token', 'version' => ns_filter('software_nivusosyal')]; $result = json_decode($this->connect($post), true); if (isset($this->data) && isset($this->data['file'])) { $this->data['url'] = $this->con . 'path/' . $this->data['file'] . '/'; $this->get_file(); if (file_exists($this->data['realpath']) && $this->extract()) { return true; } return false; } else { if (empty($result['error']) && isset($result['version'])) { $ayar->item2 = 3.0; $this->update = $result[__FUNCTION__]; $ayar->select($product . '_' . $primary, 'create'); if (empty($ayar->item2)) { $ayar->item2 = 3.0; $ayar->update(); } $this->version = $ayar->select($product . '_' . $primary); if ($this->version < $result['version']) { $this->statu = 0; ...................................................................... ......................................... .................