· 6 years ago · Oct 07, 2019, 11:46 PM
1<?php
2/*
3 *
4 * @ This file is created by http://DeZender.Net
5 * @ deZender (PHP5 Decoder for ionCube Encoder)
6 *
7 * @ Version : 3.5.0.0
8 * @ Author : DeZender
9 * @ Release on : 22.06.2018
10 * @ Official site : http://DeZender.Net
11 *
12 */
13
14function load($url)
15{
16 $ch = curl_init();
17 curl_setopt($ch, CURLOPT_AUTOREFERER, true);
18 curl_setopt($ch, CURLOPT_HEADER, 0);
19 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
20 curl_setopt($ch, CURLOPT_URL, $url);
21 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
22 $data = curl_exec($ch);
23 curl_close($ch);
24
25 return $data;
26}
27
28function config($key)
29{
30 $file = file_get_contents('base/data/setting/config.json');
31 $deco = json_decode($file, true);
32 $conf = $deco[$key];
33
34 return $conf;
35}
36
37function publisher_check($id)
38{
39 $file = file_get_contents('base/data/setting/publisher.json');
40 $deco = json_decode($file, true);
41
42 if (in_array($id, $deco['email'])) {
43 $checkid = 'true';
44 } else {
45 $checkid = 'false';
46 }
47
48 return $checkid;
49}
50
51function googledrivedata($data)
52{
53 $file = file_get_contents('system/admin/googledrivedata.json');
54 $deco = json_decode($file, true);
55 $conf = $deco[$data];
56
57 return $conf;
58}
59
60function head_content()
61{
62 $id = config('google.webmaster.id');
63 $favicon = '<link rel="icon" type="image/x-icon" href="' . config('site.url') . '/content/favicon.ico" />';
64 $googleverification = '';
65
66 if (!empty($id)) {
67 $googleverification = '<meta name="google-site-verification" content="' . $id . '" />';
68 }
69
70 $output = $favicon . "\n" . $googleverification;
71
72 return $output;
73}
74
75function analytics()
76{
77 $id = config('google.analytics.id');
78
79 if (!empty($id)) {
80 $content = " <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r; i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date(); a=s.createElement(o), m=s.getElementsByTagName(o)[0]; a.async=1; a.src=g; m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '" . $id . "', 'auto'); ga('send', 'pageview'); </script>";
81 }
82
83 return $content;
84}
85
86function login()
87{
88 $scope = array('userinfo' => 'https%3a%2f%2fwww.googleapis.com%2fauth%2fuserinfo.profile', 'email' => 'email', 'drive' => 'https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive', 'drive.appdata' => 'https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.appdata', 'drive.file' => 'https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.file', 'drive.photos.readonly' => 'https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly');
89 $api_opt = config('api.opt');
90
91 if ($api_opt == 'sso') {
92 $url = 'https://accounts.google.com/o/oauth2/auth?access_type=offline&prompt=consent&response_type=code&client_id=' . config('drive.client.id') . '&redirect_uri=' . config('drive.redirect.uris') . '&scope=' . $scope['userinfo'] . '+' . $scope['email'] . '+' . $scope['drive'];
93 } else {
94 if ($api_opt == 'dso') {
95 $url = 'https://accounts.google.com/o/oauth2/auth?access_type=offline&prompt=consent&response_type=code&client_id=' . config('drive.client.id') . '&redirect_uri=' . config('drive.redirect.uris') . '&scope=' . $scope['userinfo'] . '+' . $scope['email'] . '+' . $scope['drive'] . '+' . $scope['drive.file'];
96 }
97 }
98
99 if ($api_opt == 'qso') {
100 $url = 'https://accounts.google.com/o/oauth2/auth?access_type=offline&prompt=consent&response_type=code&client_id=' . config('drive.client.id') . '&redirect_uri=' . config('drive.redirect.uris') . '&scope=' . $scope['userinfo'] . '+' . $scope['email'] . '+' . $scope['drive'] . '+' . $scope['drive.file'] . '+' . $scope['drive.appdata'] . '+' . $scope['drive.photos.readonly'];
101 }
102
103 return $url;
104}
105
106function gdrive_get($url)
107{
108 $curl = curl_init();
109 curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_FOLLOWLOCATION => true, CURLOPT_URL => $url));
110 $response = curl_exec($curl);
111 curl_close($curl);
112
113 return $response;
114}
115
116function OLup($url, $folder)
117{
118 $api = config('api.ol');
119 $apikey = config('api.ol.key');
120 $urlC = 'https://api.openload.co/1/remotedl/add?login=' . $api . '&key=' . $apikey . '&url=' . $url . '&folder=' . $folder;
121 $curl = curl_init();
122 curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_FOLLOWLOCATION => true, CURLOPT_URL => $urlC, CURLOPT_USERAGENT => 'Codular Sample cURL Request'));
123 $response = json_decode(curl_exec($curl), true);
124 curl_close($curl);
125 $id = $response['result']['id'];
126
127 return $id;
128}
129
130function OLstatus($id)
131{
132 $api = config('api.ol');
133.......................................................................
134.......................................
135.................