http facebook image
maar als ik registreer en inloggen via facebook probeer (inloggen is geen probleem ) maar dan neemt die de foto van facebook en dat zet hij die op de website via http:// ipv https
nu weet ik niet als hier een fout in zit mischien dat iemand van jullie mij op weg kan brengen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
if ($buzzywebsite_status==0){
?>
<div class="row">
<div class="span7 offset5"><a href="<?php echo $link_prefix;?>oauth/fb/login_with_facebook.php"><img src="<?php echo $link_prefix;?>img/fb-login.png" style="margin-left:30px!important; display: block; width:365px;" alt="Sign in with Facebook" title="Sign in with Facebook"></a></div>
</div>
<?php } ?>
<?php
if ($buzzywebsite_status==1){
?>
<div class="row">
<div class="span7 offset5"><a href="<?php echo $link_prefix;?>oauth/fb/login_with_facebook.php"><img src="<?php echo $link_prefix;?>img/fb-login.png" style="margin-left:30px!important; display: block; width:365px;" alt="Sign in with Facebook" title="Sign in with Facebook"></a></div>
</div>
<?php } ?>
if ($buzzywebsite_status==0){
?>
<div class="row">
<div class="span7 offset5"><a href="<?php echo $link_prefix;?>oauth/fb/login_with_facebook.php"><img src="<?php echo $link_prefix;?>img/fb-login.png" style="margin-left:30px!important; display: block; width:365px;" alt="Sign in with Facebook" title="Sign in with Facebook"></a></div>
</div>
<?php } ?>
<?php
if ($buzzywebsite_status==1){
?>
<div class="row">
<div class="span7 offset5"><a href="<?php echo $link_prefix;?>oauth/fb/login_with_facebook.php"><img src="<?php echo $link_prefix;?>img/fb-login.png" style="margin-left:30px!important; display: block; width:365px;" alt="Sign in with Facebook" title="Sign in with Facebook"></a></div>
</div>
<?php } ?>
gr rob
- Ariën -:
Gelieve in het vervolg bij code de [code][/code]-tags gebruiken.
Hier kan je meer lezen over de mogelijke opmaakcodes.
Alvast bedankt!
Hier kan je meer lezen over de mogelijke opmaakcodes.
Alvast bedankt!
Gewijzigd op 22/03/2017 20:20:01 door - Ariën -
Gewijzigd op 22/03/2017 20:20:39 door - Ariën -
of als ik www.kaneka.eu kijk via Firefox dan via debugger op lijn 2748 dan zie je dat hij verwijst naar http://facebook ipv https://
gr
Je Facebook foto's die je toont linken daar ook naartoe. Ik heb geen idee waar die link vandaan komt, maar het lijkt mij dat er een s in de URL moet worden toegevoegd.
Verder verwijst je CDN van jQuery ook naar http.
En als ik los van dit alles nog een goede tip mag geven:
Code (php)
1
<img style="width:100px!important; height:100px!important; margin-left:10px!important; margin-bottom:10px!important;" src="img/profile-icon1.jpg" class="img-rounded" alt="" />
Vermijd deze in-line fratsen en benut de kracht van style-sheets. Op deze manier maak je jouw code zeer ongestructureerd en wordt het lang debuggen met CSS als je problemen hebt.
Code (php)
1
2
2
# Do not remove this line or mod_rewrite rules and search engine friendly URLs will stop working
RewriteBase /
RewriteBase /
Toevoeging op 22/03/2017 22:29:58:
dat is al wat er in staat
Gewijzigd op 22/03/2017 22:30:19 door rob migaleddu
Waarom zou er meer in moeten staan? Heb je rewrites gebruikt?
rewrites heb ik nog niet gebruik
Je zult gewoon de verwijzingen in je code goed moeten zetten, en de facebook images zijn niet je enige probleem, zie het bericht van Ariën.
maar ik wil toch een code toevoegen in htaccess zodat hij altijd zo doorverwijzen nar https
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# URL Rewrite
<IfModule mod_rewrite.c>
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
# Remove www subdomain in the URL
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://kaneka.eu/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://kaneka.eu/$1 [R=301,L]
# Force the URL to be https
# RewriteCond %{HTTP:X-Forwarded-SSL} !on
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<IfModule mod_rewrite.c>
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
# Remove www subdomain in the URL
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://kaneka.eu/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://kaneka.eu/$1 [R=301,L]
# Force the URL to be https
# RewriteCond %{HTTP:X-Forwarded-SSL} !on
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Ikzelf gebruik dit:
Code (php)
1
2
2
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Dit verhelpt geen mixed-content vanaf een andere domein.
Gewijzigd op 22/03/2017 23:05:17 door - Ariën -
basic.php
Code (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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);
// Get HTTP/HTTPS (the possible values for this vary from server to server)
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
// Get domain portion
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
// Get path to script
$myUrl .= $_SERVER['REQUEST_URI'];
// Add path info, if any
if (!empty($_SERVER['PATH_INFO'])) $myUrl .= $_SERVER['PATH_INFO'];
// Add query string, if any (some servers include a ?, some don't)
if (!empty($_SERVER['QUERY_STRING'])) $myUrl .= '?'.ltrim($_SERVER['REQUEST_URI'],'?');
if (strpos($myUrl,'http://') !== false) {
$htttp='http://';
}
else if (strpos($myUrl,'https://') !== false) {
$htttp='https://';
}
function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];
if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}
$user_ipreal = getUserIP();
$now = time();
function cm2feet($cm)
{
$inches = $cm/2.54;
$feet = intval($inches/12);
$inches = $inches%12;
return sprintf('%d ft %d ins', $feet, $inches);
}
function kgToLb ($val) {
return number_format((float)$val, 2, '.', '') * 2.20;
}
$website_allcurrencies_query = "SELECT * FROM buzzycurrencylist WHERE buzzycurrencylist_id=1";
$website_userglobals_query = "SELECT * FROM buzzyuserglobals WHERE buzzyuserglobal_id=1";
foreach ($connread->query($website_userglobals_query) as $row) {
$buzzyuserglobal_credits=$row['buzzyuserglobal_credits'];
$buzzyuserglobal_creditprice=$row['buzzyuserglobal_creditprice'];
$twobuzzyuserglobal_credits=2*$buzzyuserglobal_credits;
$twobuzzyuserglobal_creditprice=2*$buzzyuserglobal_creditprice;
$fourbuzzyuserglobal_credits=4*$buzzyuserglobal_credits;
$fourbuzzyuserglobal_creditprice=4*$buzzyuserglobal_creditprice;
$eightbuzzyuserglobal_credits=8*$buzzyuserglobal_credits;
$eightbuzzyuserglobal_creditprice=8*$buzzyuserglobal_creditprice;
$buzzyuserpaypal_currency=$row['buzzyuserpaypal_currency'];
$buzzypaypal_email=$row['buzzypaypal_email'];
$buzzyuserskrill_currency=$row['buzzyuserskrill_currency'];
$buzzyskrill_email=$row['buzzyskrill_email'];
$paypal_url=$row['paypal_url'];
}
$website_premium_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=3";
foreach ($connread->query($website_premium_query) as $row) {
$premiumbuzzypaidservice_title=$row['buzzypaidservice_title'];
$premiumbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$website_gold_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=4";
foreach ($connread->query($website_gold_query) as $row) {
$goldbuzzypaidservice_title=$row['buzzypaidservice_title'];
$goldbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$website_vip_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=5";
foreach ($connread->query($website_vip_query) as $row) {
$vipbuzzypaidservice_title=$row['buzzypaidservice_title'];
$vipbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$lat_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 AND buzzynews_gstatus=0 ORDER by buzzynews_id DESC LIMIT 5";
$website_chosenthemes_query = "SELECT * FROM buzzychosenthemes WHERE buzzychosentheme_id=1";
foreach ($connread->query($website_chosenthemes_query) as $row) {
$buzzytheme_id=$row['buzzytheme_id'];
}
$all_gifts_query = "SELECT * FROM buzzygifts ORDER by buzzygift_id ASC";
$rand_rss_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 AND buzzynews_gstatus=3 ORDER by RAND()LIMIT 5";
if (isset ($_GET['theme'])){
$buzzyfinaltheme_id=$_GET['theme'];
}
else if (!isset ($_GET['theme'])){
$buzzyfinaltheme_id=$buzzytheme_id;
}
$website_options_query = "SELECT * FROM buzzysiteoptions WHERE buzzysiteoptions_id=1";
foreach ($connread->query($website_options_query) as $row) {
$buzzysite_safeupload=$row['buzzysite_safeupload'];
}
$website_emots_query = "SELECT * FROM buzzyemots ORDER by buzzyemot_id ASC";
$website_css_options_query = "SELECT * FROM buzzycss WHERE buzzycss_id=$buzzyfinaltheme_id";
foreach ($connread->query($website_options_query) as $row) {
$buzzysiteurl=$row['buzzysiteurl'];
$buzzysitelogo=$row['buzzysitelogo'];
$buzzyemail=$row['buzzyemail'];
$buzzyoptimizedstatus=$row['buzzyoptimizedstatus'];
$buzzynewslimit=$row['buzzynewslimit'];
$buzzyyoutubeapi=$row['buzzyyoutubeapi'];
$buzzyfortumoid=$row['buzzyfortumoid'];
$buzzyfacebookaccess=$row['buzzyfacebookaccess'];
$buzzyfortumosecret=$row['buzzyfortumosecret'];
$buzzydistance_mesaure=$row['buzzydistance_mesaure'];
$buzzywebsite_status=$row['buzzywebsite_status'];
$buzzyversion=$row['buzzyversion'];
$buzzyupdatestatus=$row['buzzyupdatestatus'];
$buzzytimezone=$row['buzzytimezone'];
$buzzysitemeasure=$row['buzzysitemeasure'];
$buzzyuserimage_status=$row['buzzyuserimage_status'];
$buzzylanguage_status=$row['buzzylanguage_status'];
$buzzy_gzip=$row['buzzy_gzip'];
$unformat_buzzy_theme=$row['buzzy_theme'];
$unbuzzygrideffect=$row['buzzygrideffect'];
if($buzzy_gzip==0){
$gzz='';
}
else if($buzzy_gzip==1){
$gzz='.gz';
}
if ($buzzysitemeasure==0){
$height_array='<input type="number" min="130" max="230" name="buzzyuser_data_height" required class="form-control" id="recipient-name">';
$weight_array='<input type="number" min="35" max="300" name="buzzyuser_data_weight" required class="form-control" id="recipient-name">';
$hes='kg';
$mes='cm';
$mess='cm';
}
else if ($buzzysitemeasure==1){
$hes='lbs';
$weight_array='<input type="number" min="70" max="600" " name="buzzyuser_data_lbweight" required class="form-control" id="recipient-name">';
$height_array='<select class="form-control" name="buzzyuser_data_height" required>
<option value="134.62">
4' 5"
</option>
<option value="137.16">
4' 6"
</option>
<option value="139.7">
4' 7"
</option>
<option value="142.24">
4' 8"
</option>
<option value="144.78">
4' 9"
</option>
<option value="147.32">
4' 10"
</option>
<option value="149.86">
4' 11"
</option>
<option value="152.4">
5' 0"
</option>
<option value="154.94">
5' 1"
</option>
<option value="157.48">
5' 2"
</option>
<option value="160.02">
5' 3"
</option>
<option value="162.56">
5' 4"
</option>
<option value="165.1">
5' 5"
</option>
<option value="167.64">
5' 6"
</option>
<option value="170.18">
5' 7"
</option>
<option value="172.72">
5' 8"
</option>
<option value="175.26">
5' 9"
</option>
<option value="177.8">
5' 10"
</option>
<option value="180.34">
5' 11"
</option>
<option value="182.88">
6' 0"
</option>
<option value="185.42">
6' 1"
</option>
<option value="187.96">
6' 2"
</option>
<option value="190.5">
6' 3"
</option>
<option value="193.04">
6' 4"
</option>
<option value="195.58">
6' 5"
</option>
<option value="198.12">
6' 6"
</option>
<option value="200.66">
6' 7"
</option>
<option value="203.2">
6' 8"
</option>
<option value="205.74">
6' 9"
</option>
<option value="208.28">
6' 10"
</option>
<option value="210.82">
6' 11"
</option>
</select>
';
$mes='Feet and inches';
$mess='';
}
date_default_timezone_set($buzzytimezone);
if ($buzzywebsite_status==0){
$register_inc='registeruser.php';
$fb_loginurl='oauth/fb/login_with_facebook.php';
$log_user='';
$log_pwd='';
}
else if($buzzywebsite_status==1){
$register_inc='registeruserdemo.php';
$fb_loginurl='oauth/fb/login_with_facebook.php';
$log_user='[email protected]';
$log_pwd='123123';
}
if ($buzzydistance_mesaure==0){
$kmm='km';
}
else if ($buzzydistance_mesaure==1){
$kmm='miles';
}
$fortumo_status=$row['fortumo_status'];
$buzzyfb_images=$row['buzzyfb_images'];
$buzzymax_pages=$row['buzzymax_pages'];
if ($fortumo_status==0){
$fok='?test=ok';
}
else if ($fortumo_status==1){
$fok='';
}
}
$actual_link = $htttp . $buzzysiteurl;
if (strpos($actual_link, "localhost") == false) {
$final_actual_link=$actual_link.'/';
}
else if (strpos($actual_link, "localhost")!= false) {
$final_actual_link='';
}
if($buzzyoptimizedstatus==0){
$index_prefix='index.php?category=';
$index_sufix='';
$news_prefix='news.php?news-url=';
$user_id_url='page.php?user-id=';
$profileimg_id_url='page.php?profile-img-id=';
$galleryimg_id_url='page.php?gallery-img-id=';
$my_gallery_id_url='page.php?session-gallery-id=';
$notifications_url='page.php?notifications=';
$privacy_url='page.php?privacy=1';
$terms_url='terms.php?privacy=1';
$matches_url='page.php?matches=';
$news_sufix='';
$link_prefix='';
$allcategories='allcategories.php';
$featured_url='featured.php';
$message_prefix='../';
}
//THIS IS PART FOR OPTIMIZED WEBSITE LINKS. HERE YOU CAN CHANGE YOUR LINK NAMES, BUT YOU MUST CHANGE IT IN HTTACCESS ALSO ---- START
else if($buzzyoptimizedstatus==1){
$index_prefix='category/';
$index_sufix='';
$news_prefix='news/';
$user_id_url='user/';
$profileimg_id_url='profile-img-id/';
$galleryimg_id_url='gallery-img-id/';
$my_gallery_id_url='my-gallery/';
$notifications_url='notifications/';
$privacy_url='privacy/';
$terms_url='terms/';
$matches_url='matches/';
$news_sufix='/';
$link_prefix=$actual_link.'/';
$allcategories='All-categories';
$featured_url='featured';
$message_prefix='';
}
//THIS IS PART FOR OPTIMIZED WEBSITE LINKS. HERE YOU CAN CHANGE YOUR LINK NAMES, BUT YOU MUST CHANGE IT IN HTTACCESS ALSO ---- END
$basicquest="?";
$quest="";
$this_year=date("Y");
$website_language_query = "SELECT * FROM buzzylanguages WHERE buzzylanguage_id=1";
if (isset($_POST['search'])) {
$q=$_POST['q'];
header('Location:'.$link_prefix.'index.php?search-page='.$q.'');
}
foreach ($connread->query($website_css_options_query) as $row) {
$buzzycss_color_css=$row['buzzycss_color_css'];
$buzzycss_color_css1=$row['buzzycss_color_css1'];
$buzzycss_color_css2=$row['buzzycss_color_css2'];
$buzzycss_color_css3=$row['buzzycss_color_css3'];
$buzzycss_width=$row['buzzycss_width'];
$buzzycss_headings_font_family=$row['buzzycss_headings_font_family'];
$buzzycss_headings_font_family_link=preg_replace("/ /","+",$buzzycss_headings_font_family);
$buzzycss_body_font_family=$row['buzzycss_body_font_family'];
$buzzycss_body_font_family_link=preg_replace("/ /","+",$buzzycss_body_font_family);
$buzzycss_style=$row['buzzycss_style'];
$buzzycss_loader=$row['buzzycss_loader'];
$buzzycss_bg=$row['buzzycss_bg'];
$img_cont_width=($buzzycss_width-10)/6;
$img_cont_width2=100/6;
$img_cont_width3=100/5;
$img_cont_width4=100/4;
$img_cont_width5=100/3;
$img_cont_width6=100/2;
}
$basic_limits_query = "SELECT * FROM buzzylimits WHERE buzzylimit_id=1";
foreach ($connread->query($basic_limits_query) as $row) {
$buzzylimit_chatone=$row['buzzylimit_chatone'];
$buzzylimit_chattwo=$row['buzzylimit_chattwo'];
$buzzylimit_chatthree=$row['buzzylimit_chatthree'];
}
$website_conn_query = "SELECT * FROM buzzyconnection WHERE buzzyconnection_id=1";
foreach ($connread->query($website_conn_query) as $row) {
$buzzyconnection_value=$row['buzzyconnection_value'];
if($buzzyconnection_value==0){
$added_val=1;
$connsufix='';
}
else if($buzzyconnection_value==1){
$added_val=0;
$connsufix='two';
}
$buzzyconnection_timestamp=$row['buzzyconnection_timestamp'];
$buzzyconnection_difference=$now-$buzzyconnection_timestamp;
}
if($buzzywebsite_status==1){
$delete_usersunactive_query = "DELETE FROM buzzyusers WHERE buzzyuser_age=0 AND buzzyuser_onlinestatus=0";
$stmt = $connwrite->prepare($delete_usersunactive_query);
$stmt->execute();
$OK = $stmt->rowCount();
}
$mailing_query = "SELECT * FROM buzzymailing_list";
if(2>5){
foreach ($connread->query($mailing_query) as $row) {
$buzzymailing_list_email=$row['buzzymailing_list_email'];
$buzzymailing_list_timestamp=$row['buzzymailing_list_timestamp'];
$from=$buzzyemail;
$to = $buzzymailing_list_email;
$subject = 'Website Change Request';
$message = '<html>
<head>
<title>HTML email</title>
<style>
</style>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$buzzyemail."\r\n".
'Reply-To: '.$buzzyemail."\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($from, $to, $subject, $message, $headers);
}
}[/code]
[size=xsmall][i]Toevoeging op 22/03/2017 23:17:23:[/i][/size]
mixed-content dat zijn uiteraard de ingeladen img
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);
// Get HTTP/HTTPS (the possible values for this vary from server to server)
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
// Get domain portion
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
// Get path to script
$myUrl .= $_SERVER['REQUEST_URI'];
// Add path info, if any
if (!empty($_SERVER['PATH_INFO'])) $myUrl .= $_SERVER['PATH_INFO'];
// Add query string, if any (some servers include a ?, some don't)
if (!empty($_SERVER['QUERY_STRING'])) $myUrl .= '?'.ltrim($_SERVER['REQUEST_URI'],'?');
if (strpos($myUrl,'http://') !== false) {
$htttp='http://';
}
else if (strpos($myUrl,'https://') !== false) {
$htttp='https://';
}
function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];
if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}
return $ip;
}
$user_ipreal = getUserIP();
$now = time();
function cm2feet($cm)
{
$inches = $cm/2.54;
$feet = intval($inches/12);
$inches = $inches%12;
return sprintf('%d ft %d ins', $feet, $inches);
}
function kgToLb ($val) {
return number_format((float)$val, 2, '.', '') * 2.20;
}
$website_allcurrencies_query = "SELECT * FROM buzzycurrencylist WHERE buzzycurrencylist_id=1";
$website_userglobals_query = "SELECT * FROM buzzyuserglobals WHERE buzzyuserglobal_id=1";
foreach ($connread->query($website_userglobals_query) as $row) {
$buzzyuserglobal_credits=$row['buzzyuserglobal_credits'];
$buzzyuserglobal_creditprice=$row['buzzyuserglobal_creditprice'];
$twobuzzyuserglobal_credits=2*$buzzyuserglobal_credits;
$twobuzzyuserglobal_creditprice=2*$buzzyuserglobal_creditprice;
$fourbuzzyuserglobal_credits=4*$buzzyuserglobal_credits;
$fourbuzzyuserglobal_creditprice=4*$buzzyuserglobal_creditprice;
$eightbuzzyuserglobal_credits=8*$buzzyuserglobal_credits;
$eightbuzzyuserglobal_creditprice=8*$buzzyuserglobal_creditprice;
$buzzyuserpaypal_currency=$row['buzzyuserpaypal_currency'];
$buzzypaypal_email=$row['buzzypaypal_email'];
$buzzyuserskrill_currency=$row['buzzyuserskrill_currency'];
$buzzyskrill_email=$row['buzzyskrill_email'];
$paypal_url=$row['paypal_url'];
}
$website_premium_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=3";
foreach ($connread->query($website_premium_query) as $row) {
$premiumbuzzypaidservice_title=$row['buzzypaidservice_title'];
$premiumbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$website_gold_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=4";
foreach ($connread->query($website_gold_query) as $row) {
$goldbuzzypaidservice_title=$row['buzzypaidservice_title'];
$goldbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$website_vip_query = "SELECT * FROM buzzypaidservices WHERE buzzypaidservice_id=5";
foreach ($connread->query($website_vip_query) as $row) {
$vipbuzzypaidservice_title=$row['buzzypaidservice_title'];
$vipbuzzypaidservice_price=$row['buzzypaidservice_price'];
}
$lat_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 AND buzzynews_gstatus=0 ORDER by buzzynews_id DESC LIMIT 5";
$website_chosenthemes_query = "SELECT * FROM buzzychosenthemes WHERE buzzychosentheme_id=1";
foreach ($connread->query($website_chosenthemes_query) as $row) {
$buzzytheme_id=$row['buzzytheme_id'];
}
$all_gifts_query = "SELECT * FROM buzzygifts ORDER by buzzygift_id ASC";
$rand_rss_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 AND buzzynews_gstatus=3 ORDER by RAND()LIMIT 5";
if (isset ($_GET['theme'])){
$buzzyfinaltheme_id=$_GET['theme'];
}
else if (!isset ($_GET['theme'])){
$buzzyfinaltheme_id=$buzzytheme_id;
}
$website_options_query = "SELECT * FROM buzzysiteoptions WHERE buzzysiteoptions_id=1";
foreach ($connread->query($website_options_query) as $row) {
$buzzysite_safeupload=$row['buzzysite_safeupload'];
}
$website_emots_query = "SELECT * FROM buzzyemots ORDER by buzzyemot_id ASC";
$website_css_options_query = "SELECT * FROM buzzycss WHERE buzzycss_id=$buzzyfinaltheme_id";
foreach ($connread->query($website_options_query) as $row) {
$buzzysiteurl=$row['buzzysiteurl'];
$buzzysitelogo=$row['buzzysitelogo'];
$buzzyemail=$row['buzzyemail'];
$buzzyoptimizedstatus=$row['buzzyoptimizedstatus'];
$buzzynewslimit=$row['buzzynewslimit'];
$buzzyyoutubeapi=$row['buzzyyoutubeapi'];
$buzzyfortumoid=$row['buzzyfortumoid'];
$buzzyfacebookaccess=$row['buzzyfacebookaccess'];
$buzzyfortumosecret=$row['buzzyfortumosecret'];
$buzzydistance_mesaure=$row['buzzydistance_mesaure'];
$buzzywebsite_status=$row['buzzywebsite_status'];
$buzzyversion=$row['buzzyversion'];
$buzzyupdatestatus=$row['buzzyupdatestatus'];
$buzzytimezone=$row['buzzytimezone'];
$buzzysitemeasure=$row['buzzysitemeasure'];
$buzzyuserimage_status=$row['buzzyuserimage_status'];
$buzzylanguage_status=$row['buzzylanguage_status'];
$buzzy_gzip=$row['buzzy_gzip'];
$unformat_buzzy_theme=$row['buzzy_theme'];
$unbuzzygrideffect=$row['buzzygrideffect'];
if($buzzy_gzip==0){
$gzz='';
}
else if($buzzy_gzip==1){
$gzz='.gz';
}
if ($buzzysitemeasure==0){
$height_array='<input type="number" min="130" max="230" name="buzzyuser_data_height" required class="form-control" id="recipient-name">';
$weight_array='<input type="number" min="35" max="300" name="buzzyuser_data_weight" required class="form-control" id="recipient-name">';
$hes='kg';
$mes='cm';
$mess='cm';
}
else if ($buzzysitemeasure==1){
$hes='lbs';
$weight_array='<input type="number" min="70" max="600" " name="buzzyuser_data_lbweight" required class="form-control" id="recipient-name">';
$height_array='<select class="form-control" name="buzzyuser_data_height" required>
<option value="134.62">
4' 5"
</option>
<option value="137.16">
4' 6"
</option>
<option value="139.7">
4' 7"
</option>
<option value="142.24">
4' 8"
</option>
<option value="144.78">
4' 9"
</option>
<option value="147.32">
4' 10"
</option>
<option value="149.86">
4' 11"
</option>
<option value="152.4">
5' 0"
</option>
<option value="154.94">
5' 1"
</option>
<option value="157.48">
5' 2"
</option>
<option value="160.02">
5' 3"
</option>
<option value="162.56">
5' 4"
</option>
<option value="165.1">
5' 5"
</option>
<option value="167.64">
5' 6"
</option>
<option value="170.18">
5' 7"
</option>
<option value="172.72">
5' 8"
</option>
<option value="175.26">
5' 9"
</option>
<option value="177.8">
5' 10"
</option>
<option value="180.34">
5' 11"
</option>
<option value="182.88">
6' 0"
</option>
<option value="185.42">
6' 1"
</option>
<option value="187.96">
6' 2"
</option>
<option value="190.5">
6' 3"
</option>
<option value="193.04">
6' 4"
</option>
<option value="195.58">
6' 5"
</option>
<option value="198.12">
6' 6"
</option>
<option value="200.66">
6' 7"
</option>
<option value="203.2">
6' 8"
</option>
<option value="205.74">
6' 9"
</option>
<option value="208.28">
6' 10"
</option>
<option value="210.82">
6' 11"
</option>
</select>
';
$mes='Feet and inches';
$mess='';
}
date_default_timezone_set($buzzytimezone);
if ($buzzywebsite_status==0){
$register_inc='registeruser.php';
$fb_loginurl='oauth/fb/login_with_facebook.php';
$log_user='';
$log_pwd='';
}
else if($buzzywebsite_status==1){
$register_inc='registeruserdemo.php';
$fb_loginurl='oauth/fb/login_with_facebook.php';
$log_user='[email protected]';
$log_pwd='123123';
}
if ($buzzydistance_mesaure==0){
$kmm='km';
}
else if ($buzzydistance_mesaure==1){
$kmm='miles';
}
$fortumo_status=$row['fortumo_status'];
$buzzyfb_images=$row['buzzyfb_images'];
$buzzymax_pages=$row['buzzymax_pages'];
if ($fortumo_status==0){
$fok='?test=ok';
}
else if ($fortumo_status==1){
$fok='';
}
}
$actual_link = $htttp . $buzzysiteurl;
if (strpos($actual_link, "localhost") == false) {
$final_actual_link=$actual_link.'/';
}
else if (strpos($actual_link, "localhost")!= false) {
$final_actual_link='';
}
if($buzzyoptimizedstatus==0){
$index_prefix='index.php?category=';
$index_sufix='';
$news_prefix='news.php?news-url=';
$user_id_url='page.php?user-id=';
$profileimg_id_url='page.php?profile-img-id=';
$galleryimg_id_url='page.php?gallery-img-id=';
$my_gallery_id_url='page.php?session-gallery-id=';
$notifications_url='page.php?notifications=';
$privacy_url='page.php?privacy=1';
$terms_url='terms.php?privacy=1';
$matches_url='page.php?matches=';
$news_sufix='';
$link_prefix='';
$allcategories='allcategories.php';
$featured_url='featured.php';
$message_prefix='../';
}
//THIS IS PART FOR OPTIMIZED WEBSITE LINKS. HERE YOU CAN CHANGE YOUR LINK NAMES, BUT YOU MUST CHANGE IT IN HTTACCESS ALSO ---- START
else if($buzzyoptimizedstatus==1){
$index_prefix='category/';
$index_sufix='';
$news_prefix='news/';
$user_id_url='user/';
$profileimg_id_url='profile-img-id/';
$galleryimg_id_url='gallery-img-id/';
$my_gallery_id_url='my-gallery/';
$notifications_url='notifications/';
$privacy_url='privacy/';
$terms_url='terms/';
$matches_url='matches/';
$news_sufix='/';
$link_prefix=$actual_link.'/';
$allcategories='All-categories';
$featured_url='featured';
$message_prefix='';
}
//THIS IS PART FOR OPTIMIZED WEBSITE LINKS. HERE YOU CAN CHANGE YOUR LINK NAMES, BUT YOU MUST CHANGE IT IN HTTACCESS ALSO ---- END
$basicquest="?";
$quest="";
$this_year=date("Y");
$website_language_query = "SELECT * FROM buzzylanguages WHERE buzzylanguage_id=1";
if (isset($_POST['search'])) {
$q=$_POST['q'];
header('Location:'.$link_prefix.'index.php?search-page='.$q.'');
}
foreach ($connread->query($website_css_options_query) as $row) {
$buzzycss_color_css=$row['buzzycss_color_css'];
$buzzycss_color_css1=$row['buzzycss_color_css1'];
$buzzycss_color_css2=$row['buzzycss_color_css2'];
$buzzycss_color_css3=$row['buzzycss_color_css3'];
$buzzycss_width=$row['buzzycss_width'];
$buzzycss_headings_font_family=$row['buzzycss_headings_font_family'];
$buzzycss_headings_font_family_link=preg_replace("/ /","+",$buzzycss_headings_font_family);
$buzzycss_body_font_family=$row['buzzycss_body_font_family'];
$buzzycss_body_font_family_link=preg_replace("/ /","+",$buzzycss_body_font_family);
$buzzycss_style=$row['buzzycss_style'];
$buzzycss_loader=$row['buzzycss_loader'];
$buzzycss_bg=$row['buzzycss_bg'];
$img_cont_width=($buzzycss_width-10)/6;
$img_cont_width2=100/6;
$img_cont_width3=100/5;
$img_cont_width4=100/4;
$img_cont_width5=100/3;
$img_cont_width6=100/2;
}
$basic_limits_query = "SELECT * FROM buzzylimits WHERE buzzylimit_id=1";
foreach ($connread->query($basic_limits_query) as $row) {
$buzzylimit_chatone=$row['buzzylimit_chatone'];
$buzzylimit_chattwo=$row['buzzylimit_chattwo'];
$buzzylimit_chatthree=$row['buzzylimit_chatthree'];
}
$website_conn_query = "SELECT * FROM buzzyconnection WHERE buzzyconnection_id=1";
foreach ($connread->query($website_conn_query) as $row) {
$buzzyconnection_value=$row['buzzyconnection_value'];
if($buzzyconnection_value==0){
$added_val=1;
$connsufix='';
}
else if($buzzyconnection_value==1){
$added_val=0;
$connsufix='two';
}
$buzzyconnection_timestamp=$row['buzzyconnection_timestamp'];
$buzzyconnection_difference=$now-$buzzyconnection_timestamp;
}
if($buzzywebsite_status==1){
$delete_usersunactive_query = "DELETE FROM buzzyusers WHERE buzzyuser_age=0 AND buzzyuser_onlinestatus=0";
$stmt = $connwrite->prepare($delete_usersunactive_query);
$stmt->execute();
$OK = $stmt->rowCount();
}
$mailing_query = "SELECT * FROM buzzymailing_list";
if(2>5){
foreach ($connread->query($mailing_query) as $row) {
$buzzymailing_list_email=$row['buzzymailing_list_email'];
$buzzymailing_list_timestamp=$row['buzzymailing_list_timestamp'];
$from=$buzzyemail;
$to = $buzzymailing_list_email;
$subject = 'Website Change Request';
$message = '<html>
<head>
<title>HTML email</title>
<style>
</style>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$buzzyemail."\r\n".
'Reply-To: '.$buzzyemail."\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($from, $to, $subject, $message, $headers);
}
}[/code]
[size=xsmall][i]Toevoeging op 22/03/2017 23:17:23:[/i][/size]
mixed-content dat zijn uiteraard de ingeladen img
Dit heb ik:
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
<IfModule mod_rewrite.c>
# Alle non-www request doorsturen naar www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Alles rewriten naar https met de huidige www-hostname.
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# Alle non-www request doorsturen naar www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Alles rewriten naar https met de huidige www-hostname.
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Vergeet ook de sluitende statement op de laatste regel niet.
gr
Waarom zou je het niet mogen? ;-)
gr
Toevoeging op 23/03/2017 22:58:44:
ik heb de fouten ( hersteld ...vermoed ik zo) want ik zie geen echte foutmeldingen meer in crome maar hij weigert toch in https te gaan ( mischien zie jij nog wat er fout is of onveilig ???
www.kaneka.eu
Er is zo te zien niet direct een fout, je mist alleen het redirecten naar https.
maar ik krijg toch foutmelding dat onveilig is
ik heb redirecten van hier boven gebruik van Ariën
Chrome geeft ook geen directe beveiligingsmelding, maar wel een half verborgen melding die luidt als volgt:
Quote:
Mixed Content: The page at 'https://www.kaneka.eu/register.php' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Lato:300,400,700'. This request has been blocked; the content must be served over HTTPS.
Hier kun je gerust https://fonts.googleapis.com/css?family=Lato:300,400,700 van maken. Ook zou ik als ik jou was nog eens naar die redirect kijken, want goed werken doet het niet.
EDIT:
RewriteCond %{HTTPS} off moet zijn RewriteCond %{HTTPS} !=on. %{HTTPS} is meestal leeg wanneer je niet op https zit.
Gewijzigd op 23/03/2017 23:19:09 door Ben van Velzen
Als ik je request-headers bekijk, lijkt het erop dat je Nginx hebt als webserver. En daar werkt .htaccess volgens mij niet op. Je zult dan ook gebruik meoten maken van de Nginx configuratieopties voor je domein:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
# nginx configuration
location / {
if ($http_host !~ "^www\."){
rewrite ^(.*)$ https://www.$http_host$request_uri redirect;
}
rewrite ^(.*)$ https://$http_host$request_uri redirect;
}
location / {
if ($http_host !~ "^www\."){
rewrite ^(.*)$ https://www.$http_host$request_uri redirect;
}
rewrite ^(.*)$ https://$http_host$request_uri redirect;
}
Ik heb uit mijn hoofd geen idee waar je dit voor een losse user kan draaien instellen.
Maar vraag eerst eens na of ze Nginx draaien voordat je onnodige dingen doet.
>> Ik heb uit mijn hoofd geen idee waar je dit voor een losse user kan draaien instellen.
Niet. Nginx heeft geen htaccess variant. Hoeft ook niet erg te zijn, want nginx is alleen echt performant wanneer je rulesets goed zijn opgezet. Dit zou ik niet aan mijn users durven toevertrouwen.
Gewijzigd op 23/03/2017 23:25:33 door Ben van Velzen
ja bedoelt dat Nginx als proxy dient. Dan gaat mijn verhaal inderdaad niet op.