-
Notifications
You must be signed in to change notification settings - Fork 3
/
aaaout_cron.php
198 lines (143 loc) · 5.47 KB
/
aaaout_cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
include('config.php');
$okpay_allow = mysql_fetch_object(mysql_query("SELECT * FROM `instant_okpay` WHERE (`id` = '1' )"));
$cashout = mysql_fetch_object(mysql_query("SELECT * FROM `cashout` WHERE (`pending`='0' AND `method`='ok' AND `skip`='0') "));
if($cashout->pending == '0'){
if($cashout->i >= 11){
$usernamehere00 = mysql_query("SELECT * FROM `users` WHERE ( `id` = '{$cashout->id}' ) ");
$usernamehere1 = mysql_fetch_object($usernamehere00);
if ($okpay_allow->wallet > $cashout->cash) {
mysql_query("UPDATE `cashout` SET `pending`='5' WHERE `i`='{$cashout->i}'");
if ($usernamehere1->bought != '99') {
mysql_query("UPDATE `instant_okpay` SET `paid_num`=`paid_num`+'1' WHERE `id`='1'");
mysql_query("UPDATE `instant_okpay` SET `paid`=`paid`+'{$cashout->cash}' WHERE `id`='1'");
mysql_query("UPDATE `instant_okpay` SET `wallet`=`wallet`-'{$cashout->cash}' WHERE `id`='1'");
ini_set("display_errors", 1);
try
{
$secWord = "p3NDs7j5M8JgHz9x6R4Wtf2T9";
$WalletID = "OK232416930";
$datePart = gmdate("Ymd");
$timePart = gmdate("H");
$authString = $secWord.":".$datePart.":".$timePart;
$sha256 = bin2hex(mhash(MHASH_SHA256, $authString));
$secToken = strtoupper($sha256);
$client = new SoapClient("https://api.okpay.com/OkPayAPI?wsdl");
$webService = $client->Get_Date_Time();
$wsResult = $webService->Get_Date_TimeResult;
$obj = new stdClass();
$e = new stdClass();
$obj->WalletID = $WalletID;
$obj->SecurityToken = $secToken;
$obj->Currency = "USD";
$webService1 = $client->Wallet_Get_Currency_Balance($obj);
$wsResult1 = $webService1->Wallet_Get_Currency_BalanceResult;
//print_r($wsResult1);
$obj->WalletID = $WalletID;
$obj->SecurityToken = $secToken;
$webService1 = $client->Wallet_Get_Balance($obj);
$wsResult1 = $webService1->Wallet_Get_BalanceResult;
//print_r($wsResult1);
$obj->WalletID = $WalletID;
$obj->SecurityToken = $secToken;
$obj->Currency = "USD";
$obj->Receiver = $cashout->adr;
$obj->Amount = $cashout->cash - 0.01;
$obj->Comment = "Payout from LikesPlanet.com";
$obj->IsReceiverPaysFees = FALSE;
$webService1 = $client->Send_Money($obj);
$wsResult1 = $webService1->Send_MoneyResult;
print_r($wsResult1->Status);
if ($wsResult1->Status == "Completed") {
$cashoutdata0 = mysql_query("SELECT * FROM `cashout` WHERE ( `i` = '{$cashout->i}' ) ");
$cashoutdata = mysql_fetch_object($cashoutdata0);
$usernamehere0 = mysql_query("SELECT * FROM `users` WHERE ( `id` = '{$cashoutdata->id}' ) ");
$usernamehere = mysql_fetch_object($usernamehere0);
// Send another email to confirm support.
// To email address
$email = $usernamehere->email;
$email_name = 'LikesPlanet.com network';
// From email address
$from = $siteme->site_email;
$from_name = 'LikesPlanet.com';
// The message
$subject = 'LikesPlanet | OKPay Payment Sent.';
$message = "Hello ".$usernamehere->login." !
Your OKPay Payment already Paid.
http://www.likesplanet.com/cashoutmy.php
";
$message_html = "<html><body><p>
</p>
Hello ".$usernamehere->login." !
<br /><br /><br /><br />
<font color='blue' size=3><b>
Your OKPay Payment Already Paid.
</b></font>
<br /><br /><br /><br /><br /><br />
Do you want to Duplicate Your Earnings?
<br /><br />
Post your payment proof on 5 blogs, to get Payment Amount x1000 Points.
<br /><br />
http://www.likesplanet.com/prompay.php
<br /><br />
or Post here to get points = Payment amount x500.
http://blog.likesplanet.com/payments-proofs-post-your-payment-proof-and-earn-extra-pointsmoney/
<br /><br /><br /><br />
You like to earn 600 or 1,000 Points ?
<br /><br />
Make a blog write about LikesPlanet, Use this application to get paid:
<br /><br />
http://www.likesplanet.com/extrapoints.php
<br /><br />
<br /><br /><br /><br />
http://likesplanet.com/cashoutmy.php
<br /><br /><br /><br />
<br />
Thanks for using LikesPlanet network.
<br />
<br />
<br /> * This is Automatic email generated by computer. No need to reply.
</body></html>";
/***********************************************/
/* No need to modify anything down here */
/* Note that these are needed to send the mail */
/***********************************************/
// Generate text + html version
$random_hash = md5(date("r", time()));
$mailmessage = "
--PHP-alt-".$random_hash."
Content-Type: text/plain; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit
$message
--PHP-alt-".$random_hash."
Content-Type: text/html; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit
$message_html
--PHP-alt-".$random_hash."--
";
// Headers
// To send HTML mail, the Content-type header must be set
$headers = "From: ".$from_name." <".$from.">" . "\r\n";
$headers .= "Reply-To: ".$from_name." <".$from.">" . "\r\n";
$headers .= "Date: ".date("r") . "\r\n";
// Additional headers
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"PHP-alt-" . $random_hash . "\"\r\n";
$headers .= "Message-Id: <" . md5(uniqid(microtime())) . "@" . $_SERVER["SERVER_NAME"] . ">\r\n";
// Send the mail
mail($email, $subject, $mailmessage, $headers);
mysql_query("UPDATE `cashout` SET `pending`='1' WHERE `i`='{$cashout->i}'");
}
$obj->WalletID = $WalletID;
$obj->SecurityToken = $secToken;
$obj->TxnID = "123456789";
//$webService3 = $client->Transaction_Get($obj);
//$wsResult3 = $webService3->Transaction_GetResult;
//print_r($wsResult3);
}
catch (Exception $e)
{
print "Caught exception: ". $wsResult1 . "\n";
}}}}}
echo $okpay_allow->wallet;
?>