Parse error: syntax error, unexpected T_CASE in /home/maxbrpr52/domains/maxflirt.eu/public_html/admi
if(isset($dir) && is_dir($dir) && isset($f)) {
if (!@realpath($dir.'/'.$f) || !file_exists($dir.'/'.$f)) sprintm($x[721]);
if (!is_file($dir.'/'.$f) || !$fi=@fopen($dir.'/'.$f,"r")) sprintm($x[719]);
if (!is_file($dir.'/'.$f) || !$fi=@fopen($dir.'/'.$f,"r+")) sprintm($x[720]);
if(isset($restore))
{
if(is_file($dir.'/'.$f.'.bak') && is_file($dir.'/'.$f))
{
echo "<Tr bgcolor=".COLORH."><Td><span class=head><a href=?do=tedit&c_temp_edit=".C_TEMP_EDIT."&dir=".urlencode($dir).">".$dir.'/</a>'.$f."<br></td></tr>";
echo "</Table></Td></Tr></Table>";
if(!copy($dir.'/'.$f.'.bak',$dir.'/'.$f)) sprintm($x[725]);
else
{
@unlink ($dir.'/'.$f.'.bak');
sprintm(template($x[726],array($f)));
}
die();
}
}
echo "<Tr bgcolor=".COLORH."><Td><span class=head><a href=?do=tedit&c_temp_edit=".C_TEMP_EDIT."&dir=".urlencode($dir).">".$dir.'/</a>'.$f."<br>";
if(isset($do2) && $do2 == 'submit' && isset($text))
{
if(!is_file($dir.'/'.$f.'.bak') && C_TEMPLATE_BACKUP) if(!copy($dir.'/'.$f,$dir.'/'.$f.'.bak')) sprintm($x[723]);
if (!$fi=@fopen($dir.'/'.$f,"w+")) sprintm($x[720]);
fwrite($fi,$text);
fclose($fi);
sprintm($x[722]);
} else {
echo "<form action=? method=post>
<input type=hidden name=do value=tedit>
<input type=hidden name=c_temp_edit value=\"".C_TEMP_EDIT."\">
<input type=hidden name=do2 value=submit>
<input type=hidden name=dir value=\"".htmlspecialchars($dir)."\">
<input type=hidden name=f value=\"".htmlspecialchars($f)."\">
<textarea name=text cols=70 rows=20 style='width: 100%;'>".
htmlspecialchars(fread($fi,filesize($dir.'/'.$f)))."</textarea><p>
<input type=submit value='".$w[263]."'>
</form>";
}
echo "</td></tr>";
} elseif(isset($dir) && is_dir($dir)) dir_tree($dir);
else dir_tree(C_PATH.'/templates/'.C_TEMP_EDIT);
?>
</Table></Td></Tr></Table>
Plaats tekst na echo tussen ' ' --> daarmee hoef je niet alle html te escapen. Maakt je code een stuk leesbaarder/kans op fouten kleiner.
Volgens mij zou je zaken als type=hidden met " " moeten doen om hidden.
Wat geeft Google voor tips op die foutmelding? Je zult vast niet de 1e zijn....
google geeft als het meeste als foutmelding dat die verkeerd is gesloten ( } ) maar dat is niet het geval
Plaats je code tussen de
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
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
<?php
if (isset($dir) && is_dir($dir) && isset($f)) {
if (!@realpath($dir . '/' . $f) || !file_exists($dir . '/' . $f))
sprintm($x[721]);
if (!is_file($dir . '/' . $f) || !$fi = @fopen($dir . '/' . $f, "r"))
sprintm($x[719]);
if (!is_file($dir . '/' . $f) || !$fi = @fopen($dir . '/' . $f, "r+"))
sprintm($x[720]);
if (isset($restore)) {
if (is_file($dir . '/' . $f . '.bak') && is_file($dir . '/' . $f)) {
echo "<Tr bgcolor=" . COLORH . "><Td><span class=head><a href=?do=tedit&c_temp_edit=" . C_TEMP_EDIT . "&dir=" . urlencode($dir) . ">" . $dir . '/</a>' . $f . "<br></td></tr>";
echo "</Table></Td></Tr></Table>";
if (!copy($dir . '/' . $f . '.bak', $dir . '/' . $f))
sprintm($x[725]);
else {
@unlink($dir . '/' . $f . '.bak');
sprintm(template($x[726], array($f)));
}
die();
}
}
echo "<Tr bgcolor=" . COLORH . "><Td><span class=head><a href=?do=tedit&c_temp_edit=" . C_TEMP_EDIT . "&dir=" . urlencode($dir) . ">" . $dir . '/</a>' . $f . "<br>";
if (isset($do2) && $do2 == 'submit' && isset($text)) {
if (!is_file($dir . '/' . $f . '.bak') && C_TEMPLATE_BACKUP)
if (!copy($dir . '/' . $f, $dir . '/' . $f . '.bak'))
sprintm($x[723]);
if (!$fi = @fopen($dir . '/' . $f, "w+"))
sprintm($x[720]);
fwrite($fi, $text);
fclose($fi);
sprintm($x[722]);
} else {
echo "<form action=? method=post>
<input type=hidden name=do value=tedit>
<input type=hidden name=c_temp_edit value=\"" . C_TEMP_EDIT . "\">
<input type=hidden name=do2 value=submit>
<input type=hidden name=dir value=\"" . htmlspecialchars($dir) . "\">
<input type=hidden name=f value=\"" . htmlspecialchars($f) . "\">
<textarea name=text cols=70 rows=20 style='width: 100%;'>" .
htmlspecialchars(fread($fi, filesize($dir . '/' . $f))) . "</textarea><p>
<input type=submit value='" . $w[263] . "'>
</form>";
}
echo "</td></tr>";
} elseif (isset($dir) && is_dir($dir))
dir_tree($dir);
else
dir_tree(C_PATH . '/templates/' . C_TEMP_EDIT);
?>
</Table></Td></Tr></Table>
if (isset($dir) && is_dir($dir) && isset($f)) {
if (!@realpath($dir . '/' . $f) || !file_exists($dir . '/' . $f))
sprintm($x[721]);
if (!is_file($dir . '/' . $f) || !$fi = @fopen($dir . '/' . $f, "r"))
sprintm($x[719]);
if (!is_file($dir . '/' . $f) || !$fi = @fopen($dir . '/' . $f, "r+"))
sprintm($x[720]);
if (isset($restore)) {
if (is_file($dir . '/' . $f . '.bak') && is_file($dir . '/' . $f)) {
echo "<Tr bgcolor=" . COLORH . "><Td><span class=head><a href=?do=tedit&c_temp_edit=" . C_TEMP_EDIT . "&dir=" . urlencode($dir) . ">" . $dir . '/</a>' . $f . "<br></td></tr>";
echo "</Table></Td></Tr></Table>";
if (!copy($dir . '/' . $f . '.bak', $dir . '/' . $f))
sprintm($x[725]);
else {
@unlink($dir . '/' . $f . '.bak');
sprintm(template($x[726], array($f)));
}
die();
}
}
echo "<Tr bgcolor=" . COLORH . "><Td><span class=head><a href=?do=tedit&c_temp_edit=" . C_TEMP_EDIT . "&dir=" . urlencode($dir) . ">" . $dir . '/</a>' . $f . "<br>";
if (isset($do2) && $do2 == 'submit' && isset($text)) {
if (!is_file($dir . '/' . $f . '.bak') && C_TEMPLATE_BACKUP)
if (!copy($dir . '/' . $f, $dir . '/' . $f . '.bak'))
sprintm($x[723]);
if (!$fi = @fopen($dir . '/' . $f, "w+"))
sprintm($x[720]);
fwrite($fi, $text);
fclose($fi);
sprintm($x[722]);
} else {
echo "<form action=? method=post>
<input type=hidden name=do value=tedit>
<input type=hidden name=c_temp_edit value=\"" . C_TEMP_EDIT . "\">
<input type=hidden name=do2 value=submit>
<input type=hidden name=dir value=\"" . htmlspecialchars($dir) . "\">
<input type=hidden name=f value=\"" . htmlspecialchars($f) . "\">
<textarea name=text cols=70 rows=20 style='width: 100%;'>" .
htmlspecialchars(fread($fi, filesize($dir . '/' . $f))) . "</textarea><p>
<input type=submit value='" . $w[263] . "'>
</form>";
}
echo "</td></tr>";
} elseif (isset($dir) && is_dir($dir))
dir_tree($dir);
else
dir_tree(C_PATH . '/templates/' . C_TEMP_EDIT);
?>
</Table></Td></Tr></Table>
Toevoeging op 14/08/2011 13:09:05:
Ik zie de fout overigens niet in bovenstaande code, althans Netbeans zeurt nergens over :)