[GEZ] Php Ontwikkelaar

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Pagina: « vorige 1 2

- Ariën  -
Beheerder

- Ariën -

16/11/2016 16:37:23
Quote Anchor link
Het script zal wel bepaalde eisen hebben, en dan heeft het ook te maken met de configuratie van de webserver c.q. PHP die erop afgesteld moet zijn. Zit er een eisenlijst / requirements zij?
Gewijzigd op 16/11/2016 16:37:46 door - Ariën -
 
PHP hulp

PHP hulp

24/12/2024 03:25:35
 
Bjorn Louer

Bjorn Louer

16/11/2016 16:40:14
Quote Anchor link
EISEN LIJST

Since all deposits are added "the present number", based on 100 hours of going on JS script.
Most logical to change the date when the sample from the database and bring it under the right, for example, 2 days, 10 minutes,
etc.
After the counter comes to zero - will be the status PENDING

1. Open home.php (/ resource / page /)
This code is to be inserted where eating kommentary "HERE"
$ NewDate = date ('Ymd H: i: s', strtotime ($ Row ['date']. "-1 Days"));
$ Row ['date'] = $ NewDate;
-1 Days, + 1 days, +1 week, +2 days, +4 hours, -21 seconds - all these commands allow you to change the time for some period
These may be used alone, or together but without commas

looking for $Pay = json_decode(file_get_contents('https://api.coinbase.com/v2/receive?method='.WALLET.'&callback='.urlencode(URL.'/deposit?u='.$_POST['wallet'].'&secret='.Secret($_POST['wallet']).'&ref='.$REF)));
$Pay = 'your_btc_address here';

2. Open setting.php - there I said constant DOUBLE_SUM - how many times will double the deposit ?! 2, 1.5, 0.3, etc.

3. It is necessary to change the display in the admin applications that expect payment (time ischerpnno)
Open admin.php (/ resource / page /)
Looking for $ Query = mysqli_query ($ CONNECT, "SELECT` id`, `sum`,` date`, `adress` FROM` deposit` WHERE `status` = 0 AND` ref`
= '0' AND `date` <SUBTIME (NOW (), '0 99: 00: 0') ");
There I left koment "Here it is"
The numbers in the late '99 0: 00: 0' - this is a sample, if you are all changed in the code above for example 23 hours, there is
also need to change to 0 24:00:00
Like all :)
 
- Ariën  -
Beheerder

- Ariën -

16/11/2016 16:42:21
Quote Anchor link
Dat is geen eisenlijst, maar installatie uitleg.
Gewijzigd op 16/11/2016 16:42:48 door - Ariën -
 
Bjorn Louer

Bjorn Louer

16/11/2016 16:46:32
Quote Anchor link
ohja sorry! ik heb er niet echt een guide bij gekregen ofzo enkel deze installatie lijst.
 
- Ariën  -
Beheerder

- Ariën -

16/11/2016 16:50:28
Quote Anchor link
Klinkt dus als een incompleet geheel ;-).
Ikzelf zou altijd een 'requirements' verwachten bij een aankoop. En de vraga is ook of er updates voor vrijkomen, straks is PHP 7 zeer veel gebruikt en dan is het de vraag of het direct werkt, of juist niet. En wie bouwt de boel dan om?
 
Bjorn Louer

Bjorn Louer

16/11/2016 16:51:57
Quote Anchor link
Ja precies! ben sowieso wel een type als het script niet werkt gooi ik het de prullenbak in, en geef deze gewoon weg aan iemand die eraan wilt knutselen. Heb dit script gekocht voor 5USD dus stelt misschien niet veel voor. Maar zou wel leuk zijn als dit zou werken uiteraard.
 
- Ariën  -
Beheerder

- Ariën -

16/11/2016 17:32:41
Quote Anchor link
Kan je wat relevante code tonen?
 
Bjorn Louer

Bjorn Louer

16/11/2016 17:51:54
Quote Anchor link
Tuurlijk

EERSTE FILE:
Index.php

--------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?php


include_once 'setting.php';
session_start();

$CONNECT = mysqli_connect(HOST, USER, PASS, DB);


if (!$_COOKIE['UNIQID']) setcookie('UNIQID', uniqid(), strtotime('+90 days'), '/');
if (!$_SESSION['USER_ANTIBOT']) $_SESSION['USER_ANTIBOT'] = date('Y-m-d H:i:s');

if ($_COOKIE['UNIQID'] and $_SESSION['LOGIN_IN'] == 0) {
$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `adr`, `wallet` FROM `users` WHERE `uid` = '$_COOKIE[UNIQID]'"));
if (!$Row['adr'] or !$Row['wallet']) $_SESSION['LOGIN_IN'] = -1;
else {
$_SESSION['WALLET'] = $Row['wallet'];
$_SESSION['PAY'] = $Row['adr'];
$_SESSION['LOGIN_IN'] = 1;
}
}




if ($_SERVER['REQUEST_URI'] == '/') {
$Page = '/';
$Module = '/';
}
else {
$URL_Path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$URL_Parts = explode('/', trim($URL_Path, ' /'));
$Page = array_shift($URL_Parts);
$Module = array_shift($URL_Parts);
}


if ($Page == 'ref' and $Module and !$_COOKIE['REF'] and $_COOKIE['UNIQID'] != $Module) {
setcookie('REF', $Module, strtotime('+90 days'), '/');
Location();
}

if ($Page != 'deposit' and !$_SESSION['DOS']) exit(include 'resource/page/dos.php');

if ($Page == '/' and $Module == '/' or $Page == 'ref' and $Module or $Page == 'all' or $Page == 'my' or $Page == 'payouts') include 'resource/page/home.php';
else if ($Page == 'affiliate') include 'resource/page/affiliate.php';
else if ($Page == 'terms') include 'resource/page/terms.php';
else if ($Page == 'support') include 'resource/page/support.php';
else if ($Page == 'deposit') include 'resource/page/deposit.php';
else if ($Page == 'loader') include 'resource/page/loader.php';
else if ($Page == 'admin' and $Module == ADMIN_KEY) include 'resource/page/admin.php';
else Message(1, 'Page not found.');

function
Form($p1) {
return nl2br(htmlspecialchars(trim($p1), ENT_QUOTES), false);
}


function
Secret($p1) {
return md5('SECRET'.md5(md5('KEY').$p1.md5('FOR')).'1'.md5('2').'3'.md5($p1 + 'PAY').'BTC');
}


function
MKT($p1) {
$exp1 = explode(' ', $p1);
$D = explode('-', $exp1[0]);
$H = explode(':', $exp1[1]);
return mktime($H[0], $H[1], $H[2], $D[1], $D[2], $D[0]);
}


function
TSP($p1, $p2) {
$razniza = ($p2 - $p1);
$razniza_2 = ($razniza / 60);
$Hour = floor($razniza_2 / 60);
$Minute = ($razniza_2 % 60);
$Second = ($razniza % 60);
if ($Hour <= 0 and $Minute <= 0 and $Second<=  0) return '<td><span class="st0">PENDING</span></td>';
if (strlen($Hour) == 1) $Hour  = '0'.$Hour;
if (strlen($Minute) == 1) $Minute  = '0'.$Minute;
if (strlen($Second) == 1) $Second = '0'.$Second;
return '<td class="countdown">'.$Hour.':'.$Minute.':'.$Second.'</td>';
}


function
JQMessageShow() {
if ($_SESSION['MESSAGE']) {
$Message = explode('|', $_SESSION['MESSAGE']);
echo '<script>$(document).ready(function(){ModalOpen()}); function ModalOpen() {$("#window").fadeIn(500).delay(3000).fadeOut(500)}</script><div class="Message" id="window"><span class="Type'.$Message[0].'">'.$Message[1].'</span></div>';
}

$_SESSION['MESSAGE'] = array();
}


function
Message($p1, $p2, $p3 = '') {
$_SESSION['MESSAGE'] = $p1.'|'.$p2;
if (!$p3) Location();
else exit(header('Location: '.$p3));
}


function
Location() {
    echo "<script>window.location.href = '../';</script>";
  //exit(header('Location: /'));
}


function
Status($p1) {
if (!$p1) return '<span class="st0">PENDING</span>';
else return '<span class="st1">PAID</span>';
}


function
AntiBot() {
$Date = date('Y-m-d H:i:s');
if (strtotime($Date) < strtotime($_SESSION['USER_ANTIBOT']) && !empty($_SESSION['USER_ANTIBOT'])){
  Message(1, 'Limit exceeded activity. Please wait '.TIMEOUT.' seconds and try again.');  
}
else {
 $_SESSION['USER_ANTIBOT'] = date('Y-m-d H:i:s', strtotime('+'.TIMEOUT.' seconds'));  
}
}


function
ValidateBTC($address){
$decoded = decodeBase58($address);
$d1 = hash("sha256", substr($decoded,0,21), true);
$d2 = hash("sha256", $d1, true);
if(substr_compare($decoded, $d2, 21, 4)) {
 Message(1, 'Invalid bitcoin waller adress.');  
}

return true;
}


function
decodeBase58($input) {
$alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
$out = array_fill(0, 25, 0);
for($i=0;$i<strlen($input);$i++){
if(($p=strpos($alphabet, $input[$i])) === false)Message(1, 'Invalid bitcoin waller adress.');
$c = $p;
for ($j = 25; $j--; ) {
$c += (int)(58 * $out[$j]);
$out[$j] = (int)($c % 256);
$c /= 256;
$c = (int)$c;
}

if($c != 0) Message(1, 'Invalid bitcoin waller adress.');
}

$result = "";
foreach($out as $val) $result .= chr($val);
return $result;
}
 

function
Head($p1) {
if ($_SESSION['LOGIN_IN'] == 1) $DRAW = '<center>Send Bitcoins to:<b>'.$_SESSION['PAY'].'</b> (Min - <span class="affiliate">0.001 BTC</span>, max - <span class="affiliate">0.05 BTC</span>) <center>';
else $DRAW = '<form action="/" method="post"><input type="text" class="wallet" pattern="[A-Za-z-0-9]{34,34}" title="34 characters" maxlength="34" name="wallet" placeholder="Enter your Bitcoin address" required><input type="submit" name="enter" value="DOUBLE BITCOINS"></form>';
echo '<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<title>'
.$p1.'</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/resource/style/style.css" rel="stylesheet">
<link rel="icon" href="/resource/img/favicon.ico" type="image/x-icon">
<script type="text/javascript" src="/resource/jquery.min.js"></script>
</head>

<body>
<div class="wrapper">
<div class="header"><a class="Bar" href="/support">Support</a><a class="Bar" href="/terms">Terms</a><a class="Bar" href="/affiliate">Affiliate Program <span class="affiliate">'
.REWARD.'%</span></a><a href="/"><div class="logo"></div></a></div>
<div class="content1"><div class="Start">'
.$DRAW.'</div></div>';
}

?>


volledig script van 1 file.
 
- Ariën  -
Beheerder

- Ariën -

16/11/2016 17:55:44
Quote Anchor link
Zie je notice-error.
Het gaat om home.php.
 
Bjorn Louer

Bjorn Louer

16/11/2016 17:58:03
Quote Anchor link
HOME.PHP
--------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
199
200
201
202
203
<?php

if ($_POST['enter'] and $_POST['wallet'] and !$_SESSION['LOGIN_IN'] != 1 and $_COOKIE['UNIQID']) {

AntiBot();

$_POST['wallet'] = Form($_POST['wallet']);

ValidateBTC($_POST['wallet']);

$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `uid` FROM `users` WHERE `wallet` = '$_POST[wallet]'"));

if ($Row['uid']) Message(1, 'Account <b>'.$_POST['wallet'].'</b> already exists.');

$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `wallet` FROM `users` WHERE `uid` = '$_COOKIE[UNIQID]'"));

if ($Row['wallet']) Message(1, 'Account <b>'.$_COOKIE['UNIQID'].'</b> already exists.');

if ($_COOKIE['REF']) {

$REF = $_COOKIE['REF'];

$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `uid` FROM `users` WHERE `uid` = '$REF'"));

if (!$Row['uid']) $REF = 0;

}
else $REF = 0;

$Pay = json_decode(file_get_contents('https://api.blockchain.info/v2/receive?xpub='.XPUB.'&callback='.urlencode(URL.'/deposit?u='.$_POST['wallet'].'&secret='.Secret($_POST['wallet']).'&ref='.$REF).'&key=a325944d-50ae-4e21-b80e-3a16a5a80fc9'));

$Pay = $Pay->address;

mysqli_query($CONNECT, "INSERT INTO `users`  VALUES ('', '$_COOKIE[UNIQID]', '$_POST[wallet]', '$REF', '$Pay', NOW())");

$_SESSION['WALLET'] = $_POST['wallet'];

$_SESSION['PAY'] = $Pay;

$_SESSION['LOGIN_IN'] = 1;

Message(2,'Account has been successfully created. Address for payment generated.');

}




$LIMIT = LIMIT;

$_SESSION['LIMIT'] = array();



$Count1 = mysqli_fetch_row(mysqli_query($CONNECT, "SELECT COUNT(`id`) FROM `deposit` WHERE `status` = '0' AND `ref` = 0"));

if ($_SESSION['LOGIN_IN'] == 1) $Count2 = mysqli_fetch_row(mysqli_query($CONNECT, "SELECT COUNT(`id`) FROM `deposit` WHERE `uid` = '$_COOKIE[UNIQID]' AND `ref` = 0"));

else $Count2[0] = 0;

$Count3 = mysqli_fetch_row(mysqli_query($CONNECT, "SELECT COUNT(`id`) FROM `deposit` WHERE `status` != '0'"));





if ($Page == '/' or $Page == 'all') {

$_SESSION['POINT'] = 1;

$_SESSION['COUNTER'] = $Count1[0];

if ($Count1[0] > $LIMIT) $LOADER = 1;

$Query = mysqli_query($CONNECT, "SELECT `date`, `adress`, `sum`, `tx` FROM `deposit` WHERE `status` = '0' AND `ref` = 0 ORDER BY `date` DESC LIMIT 0, $LIMIT");

while ($Row = mysqli_fetch_assoc($Query)) {

//????

$DRAW .= '<tr><td>'.$Row['date'].'</td><td><a href="https://blockchain.info/address/'.$Row['adress'].'" target="blank">'.$Row['adress'].'</a></td><td><a href="https://blockchain.info/tx/'.$Row['tx'].'" target="blank">'.$Row['sum'].' BTC</a></td>'.TSP(MKT(date("Y-m-d H:i:s")), MKT(date("Y-m-d H:i:s", strtotime($Row['date'].' +24 hours')))).'<td>'.($Row['sum'] * DOUBLE_SUM).' BTC</td></tr>';

}



}
else if ($Page == 'my') {

$_SESSION['POINT'] = 2;

$_SESSION['COUNTER'] = $Count2[0];

if ($Count2[0] > $LIMIT) $LOADER = 1;

if ($_SESSION['LOGIN_IN'] != 1) Message(1, 'You must log in.');

if (!$Count2[0]) Message(2, 'Your investment is not found.');

$Query = mysqli_query($CONNECT, "SELECT `date`, `adress`, `sum`, `tx`, `status` FROM `deposit` WHERE `uid` = '$_COOKIE[UNIQID]' AND `ref` = 0 ORDER BY `date` DESC LIMIT 0, $LIMIT");

while ($Row = mysqli_fetch_assoc($Query)) {



//? ????

if ($Row['status'] == '0') $COBRA = TSP(MKT(date("Y-m-d H:i:s")), MKT(date("Y-m-d H:i:s", strtotime($Row['date'].' +100 hours'))));

else $COBRA = '<td>'.Status($Row['status']).'</td>';

$DRAW .= '<tr><td>'.$Row['date'].'</td><td><a href="https://blockchain.info/address/'.$Row['adress'].'" target="blank">'.$Row['adress'].'</a></td><td><a href="https://blockchain.info/tx/'.$Row['tx'].'" target="blank">'.$Row['sum'].' BTC</a></td>'.$COBRA.'<td>'.($Row['sum'] * DOUBLE_SUM).' BTC</td></tr>';

}



}
else if ($Page == 'payouts') {

$_SESSION['POINT'] = 3;

$_SESSION['COUNTER'] = $Count3[0];

if ($Count3[0] > $LIMIT) $LOADER = 1;

$Query = mysqli_query($CONNECT, "SELECT `date`, `adress`, `sum`, `status`, `tx` FROM `deposit` WHERE `status` != '0' AND `ref` = 0 ORDER BY `date` DESC LIMIT 0, $LIMIT");

while ($Row = mysqli_fetch_assoc($Query)) {

$DRAW .= '<tr><td>'.$Row['date'].'</td><td><a href="https://blockchain.info/address/'.$Row['adress'].'" target="blank">'.$Row['adress'].'</a></td><td>'.$Row['sum'].' BTC</td><td>'.Status($Row['status']).'</td><td><a href="https://blockchain.info/tx/'.$Row['tx'].'" target="blank">'.($Row['sum'] * DOUBLE_SUM).' BTC</a></td></tr>';

}





}




Head('x2 Bitcoins');



echo '<div class="content2">

<div class="Menu">

<a href="/all">All Investments ('
.$Count1[0].')</a>

<a href="/my">My Investments ('
.$Count2[0].')</a>

<a href="/payouts">Payouts ('
.$Count3[0].')</a>

</div>'
;

?>




<script>

$(document).ready(function(){setInterval(function(){$('.countdown').each(function(){var time=$(this).text().split(':');var timestamp=time[0]*3600+ time[1]*60+ time[2]*1;timestamp-=timestamp>0;var hours=Math.floor(timestamp/3600);var minutes=Math.floor((timestamp- hours*3600)/ 60);

var seconds=timestamp- hours*3600- minutes*60;if(hours<10){hours='0'+ hours;}

if(minutes<10){minutes='0'+ minutes;}

if(seconds<10){seconds='0'+ seconds;}

$(this).text(hours+':'+ minutes+':'+ seconds);});},1000);})

$(document).ready(function(){$('#loader').click(function(){$.get('/loader', function(data){$('#space').append(data)})})});

</script>





<table id="space">

<tr><th>DATE</th><th>ADDRESS</th><th>DEPOSIT AMOUNT</th><th>TIME LEFT</th><th>PAY AMOUNT</th></tr>

<?php if ($LOADER) $WOW ='<div id="loader">LOAD MORE</div>';

echo $DRAW .'</table>'.$WOW ?>


</div>





<div class="footer"></div>

</div>



<?php JQMessageShow()?>

</body>

</html>

- Ariën -:
Gelieve in het vervolg bij code de [code][/code]-tags gebruiken.
Hier kan je meer lezen over de mogelijke opmaakcodes.
Alvast bedankt!
Gewijzigd op 16/11/2016 18:15:39 door - Ariën -
 
- Ariën  -
Beheerder

- Ariën -

16/11/2016 18:18:28
Quote Anchor link
De variabelen worden nergens aangemaakt en komen meteen vanuit het niets in het script. Boven lijn 71 moet je $LOADER even defineren:

$LOADER = 0;
Dan is de Notice-melding van de LOADER ook weer weg.
 

Pagina: « vorige 1 2



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.