Script ending probleem
Beste,
Ik gebruik PHP-fusion en heb een PHP foutje, iets met de ending,
Error: Parse error: syntax error, unexpected $end in /usr/home/deb39797/domains/chrisbulterman.nl/public_html/startfm/infusions/mg_login_panel/mg_login_panel.php on line 132
Ik kan het foutje zelf niet vinden
Ik gebruik PHP-fusion en heb een PHP foutje, iets met de ending,
Error: Parse error: syntax error, unexpected $end in /usr/home/deb39797/domains/chrisbulterman.nl/public_html/startfm/infusions/mg_login_panel/mg_login_panel.php on line 132
Quote:
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
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
<?
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: mg_login_panel.php
| Author: MarcusG
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// Turn off all error reporting
error_reporting(0);
// Report all PHP errors (see changelog)
//error_reporting(E_ALL);
//error_reporting(E_ALL & ~E_NOTICE);
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."mg_login_panel/locale/German.php";
}
add_to_head("
<link rel='stylesheet' type='text/css' href='".INFUSIONS."mg_login_panel/includes/mg_login.css' />\n
");
# Konfiguration ##################################################
$use_panel = 1; // 1 = Anzeige im Panel, 0 = Anzeige im Header #
# Hier nur ändern wenn oben Anzeige im Header gewählt. #
$pos_top = "100px"; // Position der Buttons von oben #
# Hier unbedingt nur eins ausfüllen: entweder rechts ODER links! #
$pos_left = ""; // Position der Buttons von links #
$pos_right = "270px"; // Position der Buttons von rechts #
# Konfiguration Ende #############################################
$pos_xy = ($pos_left != "" ? " left:".$pos_left.";" : " right:".($pos_right != "" ? $pos_right : "200px").";");
if (!iMEMBER) {
($use_panel == 1 ? openside($locale['MG_LOG_001']) : "");
echo "<div class='mg_login_overlay' id='mg_login_overlay' style='display:none;'></div>";
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">\n
<a class='mg_link_button' id='mg_login_box'>".$locale['MG_LOG_001']."</a>";
if ($settings['enable_registration']) {
echo "<a class='mg_link_button' id='mg_register_box' href='".BASEDIR."register.php'>".$locale['MG_LOG_002']."</a>";
}
echo "</div>";
echo "<div id='mg_loginbox'>";
echo "<a class='mg_loginboxclose' id='mg_loginboxclose'></a><br />";
echo "<form name='mg_loginform' method='post' action='".FUSION_SELF."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='user_name default-value' value='".$locale['global_101']."' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='user_pass default-value' value='".$locale['global_102']."' style='width:100px' /><br />\n";
echo $locale['global_103'].": <input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n<br />";
echo "<input type='submit' name='login' id='login_button' value='".$locale['global_104']."' class='mg_link_button' /><br />\n";
echo "</form>\n<br />\n";
echo $locale['global_106']."</div>";
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER) {
openside($userdata['user_name']);
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo THEME_BULLET." <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Bekijk Mijn Profiel</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count) { echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong></div>\n"; }
} else {
($use_panel == 1 ? closeside() : "");
($use_panel == 1 ? openside($userdata['user_name']) : "");
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">
<a id='mg_logout_box' href='".BASEDIR."setuser.php?logout=yes' class='mg_link_button'>".$locale['global_124']."</a>
</div>";
($use_panel == 1 ? closeside() : "");
echo "<script type='text/javascript'>
$(document).ready(function(){
$('.default-value').each(function() {
var default_value = this.value;
$(this).focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
$(this).blur(function() {
if(this.value == '') {
this.value = default_value;
}
});
});
});
$(function() {
$('#mg_login_box').click(function() {
$('#mg_login_overlay').fadeIn('fast',function(){
$('#mg_loginbox').slideDown('slow', function(){
$('#mg_loginboxclose').fadeIn('slow');
});
});
});
$('#mg_loginboxclose').click(function() {
$('#mg_loginboxclose').fadeOut('slow', function(){
$('#mg_loginbox').slideUp('slow', function(){
$('#mg_login_overlay').fadeOut('fast');
});
});
});
$('#mg_login_overlay').click(function() {
$('#mg_loginboxclose').fadeOut('slow', function(){
$('#mg_loginbox').slideUp('slow', function(){
$('#mg_login_overlay').fadeOut('fast');
});
});
});
});
</script>
?>
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: mg_login_panel.php
| Author: MarcusG
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// Turn off all error reporting
error_reporting(0);
// Report all PHP errors (see changelog)
//error_reporting(E_ALL);
//error_reporting(E_ALL & ~E_NOTICE);
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."mg_login_panel/locale/German.php";
}
add_to_head("
<link rel='stylesheet' type='text/css' href='".INFUSIONS."mg_login_panel/includes/mg_login.css' />\n
");
# Konfiguration ##################################################
$use_panel = 1; // 1 = Anzeige im Panel, 0 = Anzeige im Header #
# Hier nur ändern wenn oben Anzeige im Header gewählt. #
$pos_top = "100px"; // Position der Buttons von oben #
# Hier unbedingt nur eins ausfüllen: entweder rechts ODER links! #
$pos_left = ""; // Position der Buttons von links #
$pos_right = "270px"; // Position der Buttons von rechts #
# Konfiguration Ende #############################################
$pos_xy = ($pos_left != "" ? " left:".$pos_left.";" : " right:".($pos_right != "" ? $pos_right : "200px").";");
if (!iMEMBER) {
($use_panel == 1 ? openside($locale['MG_LOG_001']) : "");
echo "<div class='mg_login_overlay' id='mg_login_overlay' style='display:none;'></div>";
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">\n
<a class='mg_link_button' id='mg_login_box'>".$locale['MG_LOG_001']."</a>";
if ($settings['enable_registration']) {
echo "<a class='mg_link_button' id='mg_register_box' href='".BASEDIR."register.php'>".$locale['MG_LOG_002']."</a>";
}
echo "</div>";
echo "<div id='mg_loginbox'>";
echo "<a class='mg_loginboxclose' id='mg_loginboxclose'></a><br />";
echo "<form name='mg_loginform' method='post' action='".FUSION_SELF."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='user_name default-value' value='".$locale['global_101']."' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='user_pass default-value' value='".$locale['global_102']."' style='width:100px' /><br />\n";
echo $locale['global_103'].": <input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n<br />";
echo "<input type='submit' name='login' id='login_button' value='".$locale['global_104']."' class='mg_link_button' /><br />\n";
echo "</form>\n<br />\n";
echo $locale['global_106']."</div>";
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER) {
openside($userdata['user_name']);
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo THEME_BULLET." <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Bekijk Mijn Profiel</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count) { echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong></div>\n"; }
} else {
($use_panel == 1 ? closeside() : "");
($use_panel == 1 ? openside($userdata['user_name']) : "");
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">
<a id='mg_logout_box' href='".BASEDIR."setuser.php?logout=yes' class='mg_link_button'>".$locale['global_124']."</a>
</div>";
($use_panel == 1 ? closeside() : "");
echo "<script type='text/javascript'>
$(document).ready(function(){
$('.default-value').each(function() {
var default_value = this.value;
$(this).focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
$(this).blur(function() {
if(this.value == '') {
this.value = default_value;
}
});
});
});
$(function() {
$('#mg_login_box').click(function() {
$('#mg_login_overlay').fadeIn('fast',function(){
$('#mg_loginbox').slideDown('slow', function(){
$('#mg_loginboxclose').fadeIn('slow');
});
});
});
$('#mg_loginboxclose').click(function() {
$('#mg_loginboxclose').fadeOut('slow', function(){
$('#mg_loginbox').slideUp('slow', function(){
$('#mg_login_overlay').fadeOut('fast');
});
});
});
$('#mg_login_overlay').click(function() {
$('#mg_loginboxclose').fadeOut('slow', function(){
$('#mg_loginbox').slideUp('slow', function(){
$('#mg_login_overlay').fadeOut('fast');
});
});
});
});
</script>
?>
Ik kan het foutje zelf niet vinden
Gewijzigd op 25/02/2011 20:03:41 door Chris b
Gesponsorde koppelingen:
Hij word niet goed afgesloten, dus waarschijnlijk mis je ergens een }.
Ja, en dan waar ? :P
Op lijn 68 open je een { maar waar word hij afgesloten?
Op line 77 ?
Je echoot JavaScript, maar je vergeet een dubbele quote en een puntkomma na de </script> tag aan het eind.
Bedankt ! Hij werkt weer!
Toevoeging op 25/02/2011 20:21:20:
Ohnee, hij werkt niet, nu heb ik zelfde error en heb achter </script> "; gezet
Toevoeging op 25/02/2011 20:21:20:
Ohnee, hij werkt niet, nu heb ik zelfde error en heb achter </script> "; gezet
En waar word 75 dan afgesloten ?
Goeie vraag, als ik er } bij zet, geeft ie aan, Unspected } on line 75
Toevoeging op 25/02/2011 20:27:46:
Dus waar moet ik de } zetten ?
Toevoeging op 25/02/2011 20:27:46:
Dus waar moet ik de } zetten ?
ik zie al waar de fout zit
op regel 58 open je { maar die sluit niet die moet je boven de echo van javascript zetten dus op regel 90 dan werkt het.
p.s. zelf getest
Toevoeging op 25/02/2011 22:30:35:
en probeer is meet in te springen dit is de code van jou aangepast door mij.
Zodoende kon ik de fout ook traceren.
op regel 58 open je { maar die sluit niet die moet je boven de echo van javascript zetten dus op regel 90 dan werkt het.
p.s. zelf getest
Toevoeging op 25/02/2011 22:30:35:
en probeer is meet in te springen dit is de code van jou aangepast door mij.
Zodoende kon ik de fout ook traceren.
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
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
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: mg_login_panel.php
| Author: MarcusG
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// Turn off all error reporting
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
// Report all PHP errors (see changelog)
//error_reporting(E_ALL);
//error_reporting(E_ALL & ~E_NOTICE);
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php"))
{
// Load the locale file matching the current site locale setting.
include INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php";
}
else
{
// Load the infusion's default locale file.
include INFUSIONS."mg_login_panel/locale/German.php";
}
add_to_head("<link rel='stylesheet' type='text/css' href='".INFUSIONS."mg_login_panel/includes/mg_login.css' />\n");
# Konfiguration ##################################################
$use_panel = 1; // 1 = Anzeige im Panel, 0 = Anzeige im Header #
# Hier nur ändern wenn oben Anzeige im Header gewählt. #
$pos_top = "100px"; // Position der Buttons von oben #
# Hier unbedingt nur eins ausfüllen: entweder rechts ODER links! #
$pos_left = ""; // Position der Buttons von links #
$pos_right = "270px"; // Position der Buttons von rechts #
# Konfiguration Ende #############################################
$pos_xy = ($pos_left != "" ? " left:".$pos_left.";" : " right:".($pos_right != "" ? $pos_right : "200px").";");
if (!iMEMBER)
{
($use_panel == 1 ? openside($locale['MG_LOG_001']) : "");
echo "<div class='mg_login_overlay' id='mg_login_overlay' style='display:none;'></div>";
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">\n
<a class='mg_link_button' id='mg_login_box'>".$locale['MG_LOG_001']."</a>";
if ($settings['enable_registration'])
{
echo "<a class='mg_link_button' id='mg_register_box' href='".BASEDIR."register.php'>".$locale['MG_LOG_002']."</a>";
}
echo "</div>";
echo "<div id='mg_loginbox'>";
echo "<a class='mg_loginboxclose' id='mg_loginboxclose'></a><br />";
echo "<form name='mg_loginform' method='post' action='".FUSION_SELF."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='user_name default-value' value='".$locale['global_101']."' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='user_pass default-value' value='".$locale['global_102']."' style='width:100px' /><br />\n";
echo $locale['global_103'].": <input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n<br />";
echo "<input type='submit' name='login' id='login_button' value='".$locale['global_104']."' class='mg_link_button' /><br />\n";
echo "</form>\n<br />\n";
echo $locale['global_106']."</div>";
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER)
{
openside($userdata['user_name']);
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo THEME_BULLET." <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Bekijk Mijn Profiel</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C"))
{
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count)
{
echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] :
$locale['global_127'])."</a></strong></div>\n";
}
}
else
{
($use_panel == 1 ? closeside() : "");
($use_panel == 1 ? openside($userdata['user_name']) : "");
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">
<a id='mg_logout_box' href='".BASEDIR."setuser.php?logout=yes' class='mg_link_button'>".$locale['global_124']."</a></div>";
($use_panel == 1 ? closeside() : "");
}
}
echo "<script type='text/javascript'>
$(document).ready(function()
{
$('.default-value').each(function()
{
var default_value = this.value;
$(this).focus(function()
{
if(this.value == default_value)
{
this.value = '';
}
});
$(this).blur(function()
{
if(this.value == '')
{
this.value = default_value;
}
});
});
});
$(function()
{
$('#mg_login_box').click(function()
{
$('#mg_login_overlay').fadeIn('fast',function()
{
$('#mg_loginbox').slideDown('slow', function()
{
$('#mg_loginboxclose').fadeIn('slow');
});
});
});
$('#mg_loginboxclose').click(function()
{
$('#mg_loginboxclose').fadeOut('slow', function()
{
$('#mg_loginbox').slideUp('slow', function()
{
$('#mg_login_overlay').fadeOut('fast');
});
});
});
$('#mg_login_overlay').click(function()
{
$('#mg_loginboxclose').fadeOut('slow', function()
{
$('#mg_loginbox').slideUp('slow', function()
{
$('#mg_login_overlay').fadeOut('fast');
});
});
});
</script>";
?>
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: mg_login_panel.php
| Author: MarcusG
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
// Turn off all error reporting
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
// Report all PHP errors (see changelog)
//error_reporting(E_ALL);
//error_reporting(E_ALL & ~E_NOTICE);
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php"))
{
// Load the locale file matching the current site locale setting.
include INFUSIONS."mg_login_panel/locale/".$settings['locale'].".php";
}
else
{
// Load the infusion's default locale file.
include INFUSIONS."mg_login_panel/locale/German.php";
}
add_to_head("<link rel='stylesheet' type='text/css' href='".INFUSIONS."mg_login_panel/includes/mg_login.css' />\n");
# Konfiguration ##################################################
$use_panel = 1; // 1 = Anzeige im Panel, 0 = Anzeige im Header #
# Hier nur ändern wenn oben Anzeige im Header gewählt. #
$pos_top = "100px"; // Position der Buttons von oben #
# Hier unbedingt nur eins ausfüllen: entweder rechts ODER links! #
$pos_left = ""; // Position der Buttons von links #
$pos_right = "270px"; // Position der Buttons von rechts #
# Konfiguration Ende #############################################
$pos_xy = ($pos_left != "" ? " left:".$pos_left.";" : " right:".($pos_right != "" ? $pos_right : "200px").";");
if (!iMEMBER)
{
($use_panel == 1 ? openside($locale['MG_LOG_001']) : "");
echo "<div class='mg_login_overlay' id='mg_login_overlay' style='display:none;'></div>";
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">\n
<a class='mg_link_button' id='mg_login_box'>".$locale['MG_LOG_001']."</a>";
if ($settings['enable_registration'])
{
echo "<a class='mg_link_button' id='mg_register_box' href='".BASEDIR."register.php'>".$locale['MG_LOG_002']."</a>";
}
echo "</div>";
echo "<div id='mg_loginbox'>";
echo "<a class='mg_loginboxclose' id='mg_loginboxclose'></a><br />";
echo "<form name='mg_loginform' method='post' action='".FUSION_SELF."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='user_name default-value' value='".$locale['global_101']."' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='user_pass default-value' value='".$locale['global_102']."' style='width:100px' /><br />\n";
echo $locale['global_103'].": <input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n<br />";
echo "<input type='submit' name='login' id='login_button' value='".$locale['global_104']."' class='mg_link_button' /><br />\n";
echo "</form>\n<br />\n";
echo $locale['global_106']."</div>";
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER)
{
openside($userdata['user_name']);
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo THEME_BULLET." <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Bekijk Mijn Profiel</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C"))
{
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count)
{
echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] :
$locale['global_127'])."</a></strong></div>\n";
}
}
else
{
($use_panel == 1 ? closeside() : "");
($use_panel == 1 ? openside($userdata['user_name']) : "");
echo "<div class='mg_login_content'".($use_panel == 0 ? " style='position:absolute; top:".$pos_top.";".$pos_xy."'" : "").">
<a id='mg_logout_box' href='".BASEDIR."setuser.php?logout=yes' class='mg_link_button'>".$locale['global_124']."</a></div>";
($use_panel == 1 ? closeside() : "");
}
}
echo "<script type='text/javascript'>
$(document).ready(function()
{
$('.default-value').each(function()
{
var default_value = this.value;
$(this).focus(function()
{
if(this.value == default_value)
{
this.value = '';
}
});
$(this).blur(function()
{
if(this.value == '')
{
this.value = default_value;
}
});
});
});
$(function()
{
$('#mg_login_box').click(function()
{
$('#mg_login_overlay').fadeIn('fast',function()
{
$('#mg_loginbox').slideDown('slow', function()
{
$('#mg_loginboxclose').fadeIn('slow');
});
});
});
$('#mg_loginboxclose').click(function()
{
$('#mg_loginboxclose').fadeOut('slow', function()
{
$('#mg_loginbox').slideUp('slow', function()
{
$('#mg_login_overlay').fadeOut('fast');
});
});
});
$('#mg_login_overlay').click(function()
{
$('#mg_loginboxclose').fadeOut('slow', function()
{
$('#mg_loginbox').slideUp('slow', function()
{
$('#mg_login_overlay').fadeOut('fast');
});
});
});
</script>";
?>
Ik vind het wel netjes om te echo'en met dubbele quotes (" ") en om dan HTML met single quotes (' ') te doen. Zo houden we er op het www een lekkere structuur in, als iedereen het anders doet! :-)
Echo'en met dubbele quotes is dus NIET wat je wil, aangezien PHP alle informatie gaat parsen. Met enkele quotes wordt de output direct naar het scherm gestuurd.
Bedankt het werkt nu, heb wel een andere probleem, maar de pagina, die probleem heeft niks te maken met PHP, dus die stel ik op de PHP-Fusion Forum



